@descope/sdk-mixins 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/mixins/descopeUiMixin/descopeUiMixin.js +7 -1
- package/dist/cjs/mixins/descopeUiMixin/descopeUiMixin.js.map +1 -1
- package/dist/cjs/mixins/fetchWidgetPagesMixin/createFetchWidgetPagesMixin.js +70 -0
- package/dist/cjs/mixins/fetchWidgetPagesMixin/createFetchWidgetPagesMixin.js.map +1 -0
- package/dist/cjs/mixins/localeMixin/localeMixin.js +33 -0
- package/dist/cjs/mixins/localeMixin/localeMixin.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/mixins/descopeUiMixin/descopeUiMixin.js +8 -2
- package/dist/esm/mixins/descopeUiMixin/descopeUiMixin.js.map +1 -1
- package/dist/esm/mixins/fetchWidgetPagesMixin/createFetchWidgetPagesMixin.js +68 -0
- package/dist/esm/mixins/fetchWidgetPagesMixin/createFetchWidgetPagesMixin.js.map +1 -0
- package/dist/esm/mixins/localeMixin/localeMixin.js +31 -0
- package/dist/esm/mixins/localeMixin/localeMixin.js.map +1 -0
- package/dist/index.d.ts +941 -200
- package/dist/types/index.d.ts +2 -0
- package/dist/types/mixins/configMixin/configMixin.d.ts +14 -14
- package/dist/types/mixins/configMixin/types.d.ts +2 -0
- package/dist/types/mixins/createStateManagementMixin.d.ts +2 -2
- package/dist/types/mixins/createValidateAttributesMixin/createValidateAttributesMixin.d.ts +5 -5
- package/dist/types/mixins/cspNonceMixin.d.ts +5 -5
- package/dist/types/mixins/debuggerMixin/debugger-wc.d.ts +5 -5
- package/dist/types/mixins/debuggerMixin/debuggerMixin.d.ts +8 -8
- package/dist/types/mixins/descopeUiMixin/descopeUiMixin.d.ts +19 -19
- package/dist/types/mixins/fetchWidgetPagesMixin/createFetchWidgetPagesMixin.d.ts +393 -0
- package/dist/types/mixins/fetchWidgetPagesMixin/index.d.ts +1 -0
- package/dist/types/mixins/formMixin.d.ts +2 -2
- package/dist/types/mixins/initElementMixin.d.ts +5 -5
- package/dist/types/mixins/initLifecycleMixin.d.ts +1 -1
- package/dist/types/mixins/injectNpmLibMixin/injectNpmLibMixin.d.ts +2 -2
- package/dist/types/mixins/injectStyleMixin.d.ts +5 -5
- package/dist/types/mixins/localeMixin/index.d.ts +1 -0
- package/dist/types/mixins/localeMixin/localeMixin.d.ts +344 -0
- package/dist/types/mixins/loggerMixin/loggerMixin.d.ts +2 -2
- package/dist/types/mixins/modalMixin/modalMixin.d.ts +23 -23
- package/dist/types/mixins/notificationsMixin/notificationsMixin.d.ts +23 -23
- package/dist/types/mixins/observeAttributesMixin/observeAttributesMixin.d.ts +4 -4
- package/dist/types/mixins/projectIdMixin.d.ts +5 -5
- package/dist/types/mixins/resetMixin.d.ts +6 -6
- package/dist/types/mixins/staticResourcesMixin/staticResourcesMixin.d.ts +10 -10
- package/dist/types/mixins/tenantIdMixin.d.ts +5 -5
- package/dist/types/mixins/themeMixin/themeMixin.d.ts +40 -40
- package/dist/types/mixins/widgetConfigMixin/widgetConfigMixin.d.ts +14 -14
- package/dist/types/mixins/widgetIdMixin.d.ts +5 -5
- package/package.json +3 -3
package/dist/types/index.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export * from './mixins/projectIdMixin';
|
|
|
22
22
|
export * from './mixins/tenantIdMixin';
|
|
23
23
|
export * from './mixins/widgetIdMixin';
|
|
24
24
|
export * from './mixins/widgetConfigMixin';
|
|
25
|
+
export * from './mixins/localeMixin';
|
|
26
|
+
export * from './mixins/fetchWidgetPagesMixin';
|
|
25
27
|
export * from './mixins/baseUrlMixin';
|
|
26
28
|
export * from './mixins/cookieConfigMixin';
|
|
27
29
|
export * from './mixins/injectNpmLibMixin';
|
|
@@ -3,10 +3,10 @@ export declare const configMixin: <T extends CustomElementConstructor>(superclas
|
|
|
3
3
|
new (...params: any[]): {
|
|
4
4
|
init(): Promise<void>;
|
|
5
5
|
readonly config: Promise<Config>;
|
|
6
|
-
"__#
|
|
7
|
-
"__#
|
|
8
|
-
"__#
|
|
9
|
-
"__#
|
|
6
|
+
"__#17956@#configCacheClear"(): void;
|
|
7
|
+
"__#17956@#_configResource": Promise<Config>;
|
|
8
|
+
"__#17956@#fetchConfig": () => Promise<Config>;
|
|
9
|
+
"__#17951@#isInit": boolean;
|
|
10
10
|
connectedCallback: (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
11
11
|
accessKey: string;
|
|
12
12
|
readonly accessKeyLabel: string;
|
|
@@ -333,27 +333,27 @@ export declare const configMixin: <T extends CustomElementConstructor>(superclas
|
|
|
333
333
|
tabIndex: number;
|
|
334
334
|
blur(): void;
|
|
335
335
|
focus(options?: FocusOptions): void;
|
|
336
|
-
"__#
|
|
336
|
+
"__#17955@#callbacks": Map<string, () => void>;
|
|
337
337
|
onReset(sectionId: string, callback: () => void | Promise<void>): () => void;
|
|
338
338
|
reset(...sectionIds: string[]): Promise<void>;
|
|
339
|
-
"__#
|
|
340
|
-
"__#
|
|
339
|
+
"__#17953@#handleError": ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void);
|
|
340
|
+
"__#17952@#observeMappings": {} & {};
|
|
341
341
|
observeAttribute: ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any);
|
|
342
342
|
observeAttributes: ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void);
|
|
343
|
-
"__#
|
|
344
|
-
"__#
|
|
343
|
+
"__#17950@#logger": import("../loggerMixin").Logger;
|
|
344
|
+
"__#17950@#wrapLogger": ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger) & ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger) & ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger) & ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger) & ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger);
|
|
345
345
|
get logger(): import("../loggerMixin").Logger;
|
|
346
346
|
set logger(logger: Partial<import("../loggerMixin").Logger>);
|
|
347
347
|
onLogEvent: ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void);
|
|
348
|
-
"__#
|
|
349
|
-
"__#
|
|
350
|
-
"__#
|
|
351
|
-
"__#
|
|
348
|
+
"__#17954@#lastBaseUrl"?: string;
|
|
349
|
+
"__#17954@#workingBaseUrl"?: string;
|
|
350
|
+
"__#17954@#failedUrls": Set<string>;
|
|
351
|
+
"__#17954@#getResourceUrls"(filename: string): (URL & {
|
|
352
352
|
baseUrl: string;
|
|
353
353
|
}) | (URL & {
|
|
354
354
|
baseUrl: string;
|
|
355
355
|
})[];
|
|
356
|
-
"__#
|
|
356
|
+
"__#17954@#createResourceUrl"(filename: string, baseUrl: string): URL & {
|
|
357
357
|
baseUrl: string;
|
|
358
358
|
};
|
|
359
359
|
fetchStaticResource<F extends "text" | "json">(filename: string, format: F): Promise<{
|
|
@@ -6,8 +6,8 @@ export declare const createStateManagementMixin: <State, CaseReducers extends Sl
|
|
|
6
6
|
new (...args: any): {
|
|
7
7
|
actions: import("@reduxjs/toolkit").CaseReducerActions<CaseReducers, Name> & AsyncActions;
|
|
8
8
|
subscribe: <SelectorR = State extends Draft<infer S> ? S : State>(cb: (state: SelectorR) => void, selector?: (state: State) => SelectorR) => Unsubscribe;
|
|
9
|
-
"__#
|
|
10
|
-
"__#
|
|
9
|
+
"__#17950@#logger": import("./loggerMixin").Logger;
|
|
10
|
+
"__#17950@#wrapLogger"(logger: Partial<import("./loggerMixin").Logger>): import("./loggerMixin").Logger;
|
|
11
11
|
get logger(): import("./loggerMixin").Logger;
|
|
12
12
|
set logger(logger: Partial<import("./loggerMixin").Logger>);
|
|
13
13
|
onLogEvent(logLevel: "error" | "warn" | "info" | "debug", data: any[]): void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare const createValidateAttributesMixin: {
|
|
2
2
|
(mappings: Record<string, CheckValueFn | string>): <T extends CustomElementConstructor>(superclass: T) => {
|
|
3
3
|
new (...args: any): {
|
|
4
|
-
"__#
|
|
4
|
+
"__#17953@#handleError"(attrName: string, newValue: string | null): void;
|
|
5
5
|
init(): Promise<void>;
|
|
6
|
-
"__#
|
|
6
|
+
"__#17952@#observeMappings": {};
|
|
7
7
|
observeAttribute(attrName: string, onAttrChange: (attrName: string, value: string) => void): () => any;
|
|
8
8
|
observeAttributes(attrs: string[], cb: (attrName: string, value: string) => void): () => void;
|
|
9
|
-
"__#
|
|
9
|
+
"__#17951@#isInit": boolean;
|
|
10
10
|
connectedCallback: (() => void) & (() => void) & (() => void);
|
|
11
11
|
accessKey: string;
|
|
12
12
|
readonly accessKeyLabel: string;
|
|
@@ -333,8 +333,8 @@ declare const createValidateAttributesMixin: {
|
|
|
333
333
|
tabIndex: number;
|
|
334
334
|
blur(): void;
|
|
335
335
|
focus(options?: FocusOptions): void;
|
|
336
|
-
"__#
|
|
337
|
-
"__#
|
|
336
|
+
"__#17950@#logger": import("../loggerMixin").Logger;
|
|
337
|
+
"__#17950@#wrapLogger": ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger) & ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger);
|
|
338
338
|
get logger(): import("../loggerMixin").Logger;
|
|
339
339
|
set logger(logger: Partial<import("../loggerMixin").Logger>);
|
|
340
340
|
onLogEvent: ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const cspNonceMixin: <T extends CustomElementConstructor>(superclass: T) => {
|
|
2
2
|
new (...params: any[]): {
|
|
3
3
|
readonly nonce: string;
|
|
4
|
-
"__#
|
|
4
|
+
"__#17957@#setNonce"(): void;
|
|
5
5
|
init(): Promise<void>;
|
|
6
|
-
"__#
|
|
6
|
+
"__#17952@#observeMappings": {};
|
|
7
7
|
observeAttribute(attrName: string, onAttrChange: (attrName: string, value: string) => void): () => any;
|
|
8
8
|
observeAttributes(attrs: string[], cb: (attrName: string, value: string) => void): () => void;
|
|
9
|
-
"__#
|
|
9
|
+
"__#17951@#isInit": boolean;
|
|
10
10
|
connectedCallback: (() => void) & (() => void) & (() => void);
|
|
11
11
|
accessKey: string;
|
|
12
12
|
readonly accessKeyLabel: string;
|
|
@@ -332,8 +332,8 @@ export declare const cspNonceMixin: <T extends CustomElementConstructor>(supercl
|
|
|
332
332
|
tabIndex: number;
|
|
333
333
|
blur(): void;
|
|
334
334
|
focus(options?: FocusOptions): void;
|
|
335
|
-
"__#
|
|
336
|
-
"__#
|
|
335
|
+
"__#17950@#logger": import("./loggerMixin").Logger;
|
|
336
|
+
"__#17950@#wrapLogger"(logger: Partial<import("./loggerMixin").Logger>): import("./loggerMixin").Logger;
|
|
337
337
|
get logger(): import("./loggerMixin").Logger;
|
|
338
338
|
set logger(logger: Partial<import("./loggerMixin").Logger>);
|
|
339
339
|
onLogEvent(logLevel: "error" | "warn" | "info" | "debug", data: any[]): void;
|
|
@@ -10,12 +10,12 @@ declare const BaseClass: {
|
|
|
10
10
|
readonly cssRules: CSSRuleList;
|
|
11
11
|
} | CSSStyleSheet;
|
|
12
12
|
nonce: string;
|
|
13
|
-
"__#
|
|
13
|
+
"__#17957@#setNonce"(): void;
|
|
14
14
|
init(): Promise<void>;
|
|
15
|
-
"__#
|
|
15
|
+
"__#17952@#observeMappings": {};
|
|
16
16
|
observeAttribute(attrName: string, onAttrChange: (attrName: string, value: string) => void): () => any;
|
|
17
17
|
observeAttributes(attrs: string[], cb: (attrName: string, value: string) => void): () => void;
|
|
18
|
-
"__#
|
|
18
|
+
"__#17951@#isInit": boolean;
|
|
19
19
|
connectedCallback: (() => void) & (() => void) & (() => void);
|
|
20
20
|
accessKey: string;
|
|
21
21
|
readonly accessKeyLabel: string;
|
|
@@ -341,8 +341,8 @@ declare const BaseClass: {
|
|
|
341
341
|
tabIndex: number;
|
|
342
342
|
blur(): void;
|
|
343
343
|
focus(options?: FocusOptions): void;
|
|
344
|
-
"__#
|
|
345
|
-
"__#
|
|
344
|
+
"__#17950@#logger": import("../loggerMixin").Logger;
|
|
345
|
+
"__#17950@#wrapLogger"(logger: Partial<import("../loggerMixin").Logger>): import("../loggerMixin").Logger;
|
|
346
346
|
get logger(): import("../loggerMixin").Logger;
|
|
347
347
|
set logger(logger: Partial<import("../loggerMixin").Logger>);
|
|
348
348
|
onLogEvent(logLevel: "error" | "warn" | "info" | "debug", data: any[]): void;
|
|
@@ -2,19 +2,19 @@ import { LogLevel } from '../loggerMixin';
|
|
|
2
2
|
import { DebuggerMessage } from './types';
|
|
3
3
|
export declare const debuggerMixin: <T extends CustomElementConstructor>(superclass: T) => {
|
|
4
4
|
new (...params: any[]): {
|
|
5
|
-
"__#
|
|
5
|
+
"__#17959@#debuggerEle": (HTMLElement & {
|
|
6
6
|
updateData: (data: DebuggerMessage | DebuggerMessage[]) => void;
|
|
7
7
|
}) | null;
|
|
8
|
-
"__#
|
|
9
|
-
"__#
|
|
8
|
+
"__#17959@#disableDebugger"(): void;
|
|
9
|
+
"__#17959@#enableDebugger"(): Promise<void>;
|
|
10
10
|
attributeChangedCallback: (attrName: string, oldValue: string | null, newValue: string | null) => void;
|
|
11
11
|
readonly debug: boolean;
|
|
12
|
-
"__#
|
|
12
|
+
"__#17959@#handleDebugMode"(): void;
|
|
13
13
|
onLogEvent(logLevel: LogLevel, args: any[]): void;
|
|
14
14
|
init(): Promise<void>;
|
|
15
|
-
"__#
|
|
16
|
-
"__#
|
|
17
|
-
"__#
|
|
15
|
+
"__#17959@#updateDebuggerMessages"(title: string, description: string): void;
|
|
16
|
+
"__#17950@#logger": import("../loggerMixin").Logger;
|
|
17
|
+
"__#17950@#wrapLogger"(logger: Partial<import("../loggerMixin").Logger>): import("../loggerMixin").Logger;
|
|
18
18
|
get logger(): import("../loggerMixin").Logger;
|
|
19
19
|
set logger(logger: Partial<import("../loggerMixin").Logger>);
|
|
20
20
|
accessKey: string;
|
|
@@ -342,6 +342,6 @@ export declare const debuggerMixin: <T extends CustomElementConstructor>(supercl
|
|
|
342
342
|
tabIndex: number;
|
|
343
343
|
blur(): void;
|
|
344
344
|
focus(options?: FocusOptions): void;
|
|
345
|
-
"__#
|
|
345
|
+
"__#17951@#isInit": boolean;
|
|
346
346
|
};
|
|
347
347
|
} & T;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export declare const descopeUiMixin: <T extends CustomElementConstructor>(superclass: T) => {
|
|
2
2
|
new (...params: any[]): {
|
|
3
|
-
"__#
|
|
4
|
-
"__#
|
|
5
|
-
"__#
|
|
3
|
+
"__#17960@#getComponentsVersion"(): Promise<string>;
|
|
4
|
+
"__#17960@#getComponentsVersionSri"(): Promise<string>;
|
|
5
|
+
"__#17960@#descopeUi": Promise<any>;
|
|
6
6
|
readonly descopeUi: Promise<any>;
|
|
7
|
-
"__#
|
|
8
|
-
"__#
|
|
7
|
+
"__#17960@#loadDescopeUiComponent"(componentName: string): Promise<any>;
|
|
8
|
+
"__#17960@#getDescopeUi"(): Promise<any>;
|
|
9
9
|
loadDescopeUiComponents(templateOrComponentNames: HTMLTemplateElement | string[]): Promise<any[]>;
|
|
10
10
|
readonly baseCdnUrl: string;
|
|
11
11
|
injectNpmLib(libName: string, version: string, filePath?: string, overrides?: string[], integrity?: string): Promise<import("../injectNpmLibMixin/helpers").ScriptData>;
|
|
12
|
-
"__#
|
|
13
|
-
"__#
|
|
12
|
+
"__#17950@#logger": import("../loggerMixin").Logger;
|
|
13
|
+
"__#17950@#wrapLogger": ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger) & ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger) & ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger) & ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger) & ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger) & ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger) & ((logger: Partial<import("../loggerMixin").Logger>) => import("../loggerMixin").Logger);
|
|
14
14
|
get logger(): import("../loggerMixin").Logger;
|
|
15
15
|
set logger(logger: Partial<import("../loggerMixin").Logger>);
|
|
16
16
|
onLogEvent: ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void);
|
|
@@ -342,26 +342,26 @@ export declare const descopeUiMixin: <T extends CustomElementConstructor>(superc
|
|
|
342
342
|
focus(options?: FocusOptions): void;
|
|
343
343
|
init(): Promise<void>;
|
|
344
344
|
readonly config: Promise<import("../configMixin").Config>;
|
|
345
|
-
"__#
|
|
346
|
-
"__#
|
|
347
|
-
"__#
|
|
348
|
-
"__#
|
|
349
|
-
"__#
|
|
345
|
+
"__#17956@#configCacheClear"(): void;
|
|
346
|
+
"__#17956@#_configResource": Promise<import("../configMixin").Config>;
|
|
347
|
+
"__#17956@#fetchConfig": () => Promise<import("../configMixin").Config>;
|
|
348
|
+
"__#17951@#isInit": boolean;
|
|
349
|
+
"__#17955@#callbacks": Map<string, () => void>;
|
|
350
350
|
onReset(sectionId: string, callback: () => void | Promise<void>): () => void;
|
|
351
351
|
reset(...sectionIds: string[]): Promise<void>;
|
|
352
|
-
"__#
|
|
353
|
-
"__#
|
|
352
|
+
"__#17953@#handleError": ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void);
|
|
353
|
+
"__#17952@#observeMappings": {} & {};
|
|
354
354
|
observeAttribute: ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any);
|
|
355
355
|
observeAttributes: ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void);
|
|
356
|
-
"__#
|
|
357
|
-
"__#
|
|
358
|
-
"__#
|
|
359
|
-
"__#
|
|
356
|
+
"__#17954@#lastBaseUrl"?: string;
|
|
357
|
+
"__#17954@#workingBaseUrl"?: string;
|
|
358
|
+
"__#17954@#failedUrls": Set<string>;
|
|
359
|
+
"__#17954@#getResourceUrls"(filename: string): (URL & {
|
|
360
360
|
baseUrl: string;
|
|
361
361
|
}) | (URL & {
|
|
362
362
|
baseUrl: string;
|
|
363
363
|
})[];
|
|
364
|
-
"__#
|
|
364
|
+
"__#17954@#createResourceUrl"(filename: string, baseUrl: string): URL & {
|
|
365
365
|
baseUrl: string;
|
|
366
366
|
};
|
|
367
367
|
fetchStaticResource<F extends "text" | "json">(filename: string, format: F): Promise<{
|