diff --git a/.gitignore b/.gitignore index 4691b9f85..4eb3774c6 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ Thumbs.db *.pem .env +.env.local .nx/* .next diff --git a/packages/sdks/vue-sdk/README.md b/packages/sdks/vue-sdk/README.md index c9551b930..7c3af8a6f 100644 --- a/packages/sdks/vue-sdk/README.md +++ b/packages/sdks/vue-sdk/README.md @@ -53,6 +53,7 @@ app.mount('#app'); + ``` diff --git a/packages/sdks/vue-sdk/src/Descope.vue b/packages/sdks/vue-sdk/src/Descope.vue index 6b4fa4bc4..508992dff 100644 --- a/packages/sdks/vue-sdk/src/Descope.vue +++ b/packages/sdks/vue-sdk/src/Descope.vue @@ -13,6 +13,7 @@ :telemetryKey.attr="telemetryKey" :redirect-url="redirectUrl" :auto-focus="autoFocus" + :style-id="styleId" :validate-on-blur="validateOnBlur" :store-last-authenticated-user="storeLastAuthenticatedUser" :errorTransformer.prop="errorTransformer" @@ -93,6 +94,9 @@ const props = defineProps({ client: { type: Object, }, + styleId: { + type: String, + }, }); // const emit = defineEmits(['success', 'error', 'ready']); const emit = defineEmits<{ diff --git a/packages/sdks/vue-sdk/tests/Descope.test.ts b/packages/sdks/vue-sdk/tests/Descope.test.ts index 5cc5e20dc..153824011 100644 --- a/packages/sdks/vue-sdk/tests/Descope.test.ts +++ b/packages/sdks/vue-sdk/tests/Descope.test.ts @@ -36,6 +36,7 @@ describe('Descope.vue', () => { errorTransformer, form: { test: 'a' }, client: { test: 'b' }, + styleId: 'test-style-id', }, }); @@ -54,6 +55,7 @@ describe('Descope.vue', () => { expect(wrapper.vm.errorTransformer).toBe(errorTransformer); expect(descopeWc.attributes('form')).toBe('{"test":"a"}'); expect(wrapper.vm.client).toStrictEqual({ test: 'b' }); + expect(descopeWc.attributes('style-id')).toBe('test-style-id'); }); it('renders a DescopeWc component with empty props', () => { diff --git a/packages/sdks/web-component/src/lib/descope-wc/index.ts b/packages/sdks/web-component/src/lib/descope-wc/index.ts index d69931302..e20dc3905 100644 --- a/packages/sdks/web-component/src/lib/descope-wc/index.ts +++ b/packages/sdks/web-component/src/lib/descope-wc/index.ts @@ -8,4 +8,5 @@ if (!customElements.get('descope-wc')) { } export default DescopeWc; -export type { AutoFocusOptions, ThemeOptions, ILogger } from '../types'; +export type ILogger = Partial; +export type { AutoFocusOptions, ThemeOptions } from '../types'; diff --git a/packages/sdks/web-component/src/lib/types.ts b/packages/sdks/web-component/src/lib/types.ts index dd4b3d9b9..23baa4a8b 100644 --- a/packages/sdks/web-component/src/lib/types.ts +++ b/packages/sdks/web-component/src/lib/types.ts @@ -157,13 +157,6 @@ export interface Context { abTestingKey?: number; } -export interface ILogger { - info(title: string, description: string, state: any): void; - warn(title: string, description?: string): void; - debug(title: string, description?: string): void; - error(title: string, description?: string, ...optionalParams: any[]): void; -} - export type DescopeUI = Record Promise> & { componentsThemeManager: Record; };