@descope/web-component 3.34.0 → 3.35.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/constants/index.js +1 -1
- package/dist/cjs/constants/index.js.map +1 -1
- package/dist/cjs/descope-wc/BaseDescopeWc.js +1 -1
- package/dist/cjs/descope-wc/BaseDescopeWc.js.map +1 -1
- package/dist/cjs/descope-wc/DescopeWc.js +1 -1
- package/dist/cjs/descope-wc/DescopeWc.js.map +1 -1
- package/dist/cjs/descope-wc/sdkScripts/grecaptcha.js +2 -0
- package/dist/cjs/descope-wc/sdkScripts/grecaptcha.js.map +1 -0
- package/dist/cjs/descope-wc/sdkScripts/index.js +1 -1
- package/dist/cjs/descope-wc/sdkScripts/index.js.map +1 -1
- package/dist/cjs/helpers/conditions.js +1 -1
- package/dist/cjs/helpers/conditions.js.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/constants/index.js.map +1 -1
- package/dist/esm/descope-wc/BaseDescopeWc.js +1 -1
- package/dist/esm/descope-wc/BaseDescopeWc.js.map +1 -1
- package/dist/esm/descope-wc/DescopeWc.js +1 -1
- package/dist/esm/descope-wc/DescopeWc.js.map +1 -1
- package/dist/esm/descope-wc/sdkScripts/grecaptcha.js +2 -0
- package/dist/esm/descope-wc/sdkScripts/grecaptcha.js.map +1 -0
- package/dist/esm/descope-wc/sdkScripts/index.js +1 -1
- package/dist/esm/descope-wc/sdkScripts/index.js.map +1 -1
- package/dist/esm/helpers/conditions.js +1 -1
- package/dist/esm/helpers/conditions.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/index.d.ts +51 -44
- package/dist/index.js +2 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -38,7 +38,6 @@ interface ScreenState {
|
|
|
38
38
|
image?: string;
|
|
39
39
|
redirectUrl?: string;
|
|
40
40
|
};
|
|
41
|
-
clientScripts?: unknown;
|
|
42
41
|
selfProvisionDomains?: unknown;
|
|
43
42
|
user?: unknown;
|
|
44
43
|
sso?: unknown;
|
|
@@ -47,6 +46,7 @@ interface ScreenState {
|
|
|
47
46
|
genericForm?: unknown;
|
|
48
47
|
linkId?: unknown;
|
|
49
48
|
sentTo?: unknown;
|
|
49
|
+
clientScripts?: ClientScript[];
|
|
50
50
|
}
|
|
51
51
|
type SSOQueryParams = {
|
|
52
52
|
oidcIdpStateId?: string;
|
|
@@ -111,12 +111,18 @@ type CustomScreenState = Omit<ScreenState, 'cssVars' | 'componentsConfig' | 'inp
|
|
|
111
111
|
type: ScreenState['errorType'];
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
|
+
type ClientScript = {
|
|
115
|
+
id: string;
|
|
116
|
+
initArgs: Record<string, any>;
|
|
117
|
+
resultKey?: string;
|
|
118
|
+
};
|
|
114
119
|
type NextFn = KeepArgsByIndex<SdkFlowNext, [2, 5]>;
|
|
115
120
|
type FlowStateUpdateFn = (state: FlowState) => void;
|
|
116
121
|
type Operator = 'equal' | 'not-equal' | 'contains' | 'greater-than' | 'less-than' | 'empty' | 'not-empty' | 'is-true' | 'is-false' | 'in' | 'not-in';
|
|
117
122
|
interface ClientConditionResult {
|
|
118
123
|
screenId: string;
|
|
119
124
|
screenName: string;
|
|
125
|
+
clientScripts?: ClientScript[];
|
|
120
126
|
interactionId: string;
|
|
121
127
|
}
|
|
122
128
|
interface ClientCondition {
|
|
@@ -158,6 +164,7 @@ type FlowConfig = {
|
|
|
158
164
|
resultKey?: string;
|
|
159
165
|
}
|
|
160
166
|
];
|
|
167
|
+
clientScripts?: ClientScript[];
|
|
161
168
|
};
|
|
162
169
|
interface ProjectConfiguration {
|
|
163
170
|
componentsVersion: string;
|
|
@@ -522,9 +529,9 @@ declare const BaseClass: {
|
|
|
522
529
|
focus(options?: FocusOptions): void;
|
|
523
530
|
};
|
|
524
531
|
} & (new (...params: any[]) => {
|
|
525
|
-
"__#
|
|
526
|
-
"__#
|
|
527
|
-
"__#
|
|
532
|
+
"__#27127@#lastBaseUrl"?: string;
|
|
533
|
+
"__#27127@#workingBaseUrl"?: string;
|
|
534
|
+
"__#27127@#getResourceUrls"(filename: string): (URL & {
|
|
528
535
|
baseUrl: string;
|
|
529
536
|
}) | (URL & {
|
|
530
537
|
baseUrl: string;
|
|
@@ -862,39 +869,39 @@ declare const BaseClass: {
|
|
|
862
869
|
blur(): void;
|
|
863
870
|
focus(options?: FocusOptions): void;
|
|
864
871
|
readonly projectId: string;
|
|
865
|
-
"__#
|
|
872
|
+
"__#27126@#handleError"(attrName: string, newValue: string): void;
|
|
866
873
|
init(): Promise<void>;
|
|
867
|
-
"__#
|
|
874
|
+
"__#27125@#observeMappings": {};
|
|
868
875
|
observeAttribute(attrName: string, onAttrChange: (attrName: string, value: string) => void): () => any;
|
|
869
876
|
observeAttributes(attrs: string[], cb: (attrName: string, value: string) => void): () => void;
|
|
870
|
-
"__#
|
|
871
|
-
"__#
|
|
872
|
-
"__#
|
|
877
|
+
"__#27124@#isInit": boolean;
|
|
878
|
+
"__#27123@#logger": _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
879
|
+
"__#27123@#wrapLogger": ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger);
|
|
873
880
|
get logger(): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
874
881
|
set logger(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>);
|
|
875
882
|
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);
|
|
876
883
|
}) & (new (...params: any[]) => {
|
|
877
|
-
"__#
|
|
884
|
+
"__#27138@#globalStyleTag": HTMLStyleElement;
|
|
878
885
|
readonly theme: _descope_sdk_mixins_static_resources_mixin.ThemeOptions;
|
|
879
886
|
readonly styleId: string;
|
|
880
|
-
"__#
|
|
881
|
-
"__#
|
|
882
|
-
readonly "__#
|
|
883
|
-
"__#
|
|
884
|
-
"__#
|
|
885
|
-
"__#
|
|
887
|
+
"__#27138@#_themeResource": Promise<void | Record<string, any>>;
|
|
888
|
+
"__#27138@#fetchTheme"(): Promise<Record<string, any>>;
|
|
889
|
+
readonly "__#27138@#themeResource": Promise<void | Record<string, any>>;
|
|
890
|
+
"__#27138@#loadGlobalStyle"(): Promise<void>;
|
|
891
|
+
"__#27138@#loadComponentsStyle"(): Promise<void>;
|
|
892
|
+
"__#27138@#getFontsConfig"(): Promise<Record<string, {
|
|
886
893
|
url?: string;
|
|
887
894
|
}>>;
|
|
888
|
-
"__#
|
|
889
|
-
"__#
|
|
890
|
-
"__#
|
|
891
|
-
"__#
|
|
892
|
-
"__#
|
|
895
|
+
"__#27138@#loadFonts"(): Promise<void>;
|
|
896
|
+
"__#27138@#applyTheme"(): Promise<void>;
|
|
897
|
+
"__#27138@#onThemeChange": () => void;
|
|
898
|
+
"__#27138@#loadTheme"(): void;
|
|
899
|
+
"__#27138@#toggleOsThemeChangeListener": (listen: boolean) => void;
|
|
893
900
|
init(): Promise<void>;
|
|
894
|
-
"__#
|
|
901
|
+
"__#27125@#observeMappings": {};
|
|
895
902
|
observeAttribute: ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any);
|
|
896
903
|
observeAttributes: ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void);
|
|
897
|
-
"__#
|
|
904
|
+
"__#27124@#isInit": boolean;
|
|
898
905
|
connectedCallback: (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
899
906
|
accessKey: string;
|
|
900
907
|
readonly accessKeyLabel: string;
|
|
@@ -1221,24 +1228,24 @@ declare const BaseClass: {
|
|
|
1221
1228
|
tabIndex: number;
|
|
1222
1229
|
blur(): void;
|
|
1223
1230
|
focus(options?: FocusOptions): void;
|
|
1224
|
-
"__#
|
|
1225
|
-
"__#
|
|
1231
|
+
"__#27123@#logger": _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
1232
|
+
"__#27123@#wrapLogger": ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger);
|
|
1226
1233
|
get logger(): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
1227
1234
|
set logger(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>);
|
|
1228
1235
|
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) & ((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) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void);
|
|
1229
1236
|
contentRootElement: HTMLElement;
|
|
1230
1237
|
rootElement: HTMLElement;
|
|
1231
1238
|
readonly config: Promise<_descope_sdk_mixins_static_resources_mixin.Config>;
|
|
1232
|
-
"__#
|
|
1233
|
-
"__#
|
|
1234
|
-
"__#
|
|
1235
|
-
"__#
|
|
1239
|
+
"__#27129@#configCacheClear": (() => void) & (() => void);
|
|
1240
|
+
"__#27129@#_configResource": Promise<_descope_sdk_mixins_static_resources_mixin.Config>;
|
|
1241
|
+
"__#27129@#fetchConfig": (() => Promise<_descope_sdk_mixins_static_resources_mixin.Config>) & (() => Promise<_descope_sdk_mixins_static_resources_mixin.Config>);
|
|
1242
|
+
"__#27128@#callbacks": Map<string, () => void> & Map<string, () => void>;
|
|
1236
1243
|
onReset: ((sectionId: string, callback: () => void | Promise<void>) => () => void) & ((sectionId: string, callback: () => void | Promise<void>) => () => void);
|
|
1237
1244
|
reset: ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>);
|
|
1238
|
-
"__#
|
|
1239
|
-
"__#
|
|
1240
|
-
"__#
|
|
1241
|
-
"__#
|
|
1245
|
+
"__#27126@#handleError": ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void);
|
|
1246
|
+
"__#27127@#lastBaseUrl"?: string;
|
|
1247
|
+
"__#27127@#workingBaseUrl"?: string;
|
|
1248
|
+
"__#27127@#getResourceUrls": ((filename: string) => (URL & {
|
|
1242
1249
|
baseUrl: string;
|
|
1243
1250
|
}) | (URL & {
|
|
1244
1251
|
baseUrl: string;
|
|
@@ -1264,18 +1271,18 @@ declare const BaseClass: {
|
|
|
1264
1271
|
readonly baseStaticUrl: string;
|
|
1265
1272
|
readonly baseUrl: string;
|
|
1266
1273
|
readonly projectId: string;
|
|
1267
|
-
"__#
|
|
1268
|
-
"__#
|
|
1269
|
-
"__#
|
|
1270
|
-
"__#
|
|
1271
|
-
"__#
|
|
1272
|
-
"__#
|
|
1273
|
-
"__#
|
|
1274
|
-
"__#
|
|
1274
|
+
"__#27132@#errorCbsSym": symbol;
|
|
1275
|
+
"__#27132@#loadCbsSym": symbol;
|
|
1276
|
+
"__#27132@#getComponentsVersion"(): Promise<string>;
|
|
1277
|
+
"__#27132@#exposeAlternateEvents"(scriptEle: HTMLScriptElement): void;
|
|
1278
|
+
"__#27132@#handleFallbackScript"(errorCbs: ((error: string) => void)[], loadCbs: (() => void)[], elemId: string, scriptUrl: string): Promise<void>;
|
|
1279
|
+
"__#27132@#registerEvents"(scriptEle: HTMLScriptElement): void;
|
|
1280
|
+
"__#27132@#getDescopeUiLoadingScript"(): Promise<HTMLElement>;
|
|
1281
|
+
"__#27132@#descopeUi": Promise<any>;
|
|
1275
1282
|
readonly descopeUi: Promise<any>;
|
|
1276
|
-
"__#
|
|
1283
|
+
"__#27132@#loadDescopeUiComponent"(componentName: string): Promise<any>;
|
|
1277
1284
|
loadDescopeUiComponents(templateOrComponentNames: string[] | HTMLTemplateElement): Promise<any[]>;
|
|
1278
|
-
"__#
|
|
1285
|
+
"__#27132@#getDescopeUi"(): Promise<unknown>;
|
|
1279
1286
|
readonly baseCdnUrl: string;
|
|
1280
1287
|
}) & {
|
|
1281
1288
|
new (): HTMLElement;
|
|
@@ -1359,7 +1366,7 @@ declare class DescopeWc extends BaseDescopeWc {
|
|
|
1359
1366
|
ssoRedirect?: string;
|
|
1360
1367
|
origin?: string;
|
|
1361
1368
|
} | undefined;
|
|
1362
|
-
loadSdkScripts(): Promise<
|
|
1369
|
+
loadSdkScripts(scripts: ClientScript[]): Promise<unknown>;
|
|
1363
1370
|
init(): Promise<void>;
|
|
1364
1371
|
_init(): Promise<void>;
|
|
1365
1372
|
disconnectedCallback(): void;
|