@forgerock/login-widget 2.1.0 → 2.2.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/README.md +44 -2
- package/dist/core/journey/journey.interfaces.d.ts +3 -0
- package/dist/core/locale.store.d.ts +3 -0
- package/dist/core/style.store.d.ts +166 -6
- package/dist/index.d.ts +42 -22
- package/dist/index.js +14991 -13082
- package/dist/index.js.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types.d.ts +24 -8
- package/dist/widget.css +1 -1
- package/dist/widget.iife.js +74 -56
- package/dist/widget.iife.js.map +1 -1
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
- [Styling Configuration](#styling-configuration)
|
|
40
40
|
- [Links Configuration](#links-configuration)
|
|
41
41
|
- [Content Configuration](#content-configuration)
|
|
42
|
+
- [CAPTCHA Configuration](#captcha-configuration)
|
|
43
|
+
- [Scripted Text Output](#scripted-text-output)
|
|
42
44
|
- [Supported Callbacks](#supported-callbacks)
|
|
43
45
|
- [Disclaimer](#disclaimer)
|
|
44
46
|
- [License](#license)
|
|
@@ -558,7 +560,6 @@ await configure({
|
|
|
558
560
|
checksAndRadios: 'animated', // OPTIONAL; 'animated' or 'standard'
|
|
559
561
|
labels: 'floating', // OPTIONAL; 'floating' or 'stacked'
|
|
560
562
|
logo: {
|
|
561
|
-
// OPTIONAL; modal only
|
|
562
563
|
dark: 'https://example.com/img/white-logo.png',
|
|
563
564
|
light: 'https://example.com/img/black-logo.png', // REQUIRED if logo provided
|
|
564
565
|
height: 300,
|
|
@@ -571,11 +572,33 @@ await configure({
|
|
|
571
572
|
stage: {
|
|
572
573
|
icon: true, // OPTIONAL; display generic stage icons
|
|
573
574
|
},
|
|
575
|
+
callbacks: {
|
|
576
|
+
// OPTIONAL; per-callback style rules, keyed by AM callback type name
|
|
577
|
+
// — see "Scripted Text Output"; rules are plain string dictionaries
|
|
578
|
+
TextOutputCallback: [{ type: '4', display: 'hidden' }],
|
|
579
|
+
},
|
|
574
580
|
},
|
|
575
581
|
});
|
|
576
582
|
```
|
|
577
583
|
|
|
578
|
-
> **Note**: The `
|
|
584
|
+
> **Note**: The `sections.header` property only applies to the modal form factor. The `logo`
|
|
585
|
+
> property applies to all form factors.
|
|
586
|
+
|
|
587
|
+
#### Logo CSS custom properties
|
|
588
|
+
|
|
589
|
+
The logo configuration is applied as root-level CSS custom properties on the widget root
|
|
590
|
+
element, re-applied after every theme pass. These are the _fallback_ slots; an IDM page-node
|
|
591
|
+
theme sets the primary `--logo-light` / `--logo-dark` slots and takes precedence over them.
|
|
592
|
+
|
|
593
|
+
| Property | CSS custom property | Notes |
|
|
594
|
+
| -------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
595
|
+
| `light` | `--fr-logo-light-fallback` | Consumed via `var(--logo-light, var(--fr-logo-light-fallback))` |
|
|
596
|
+
| `dark` | `--fr-logo-dark-fallback` | Consumed via `var(--logo-dark, var(--fr-logo-dark-fallback))` |
|
|
597
|
+
| `height` | `--fr-logo-height` | Falls back to `72px` when unset; the dialog header logo stretches to the header height instead |
|
|
598
|
+
| `width` | `--fr-logo-width` | Falls back to `200px` on stages, `100%` in the dialog; the dialog header logo stretches to the header height when unset |
|
|
599
|
+
|
|
600
|
+
Valid `light` / `dark` values are `https://` URLs, `data:image/` URIs, or root-relative paths
|
|
601
|
+
(leading `/`). Invalid values are dropped by config validation.
|
|
579
602
|
|
|
580
603
|
### Links Configuration
|
|
581
604
|
|
|
@@ -615,6 +638,25 @@ await configure({
|
|
|
615
638
|
|
|
616
639
|
**Script loading:** The widget automatically injects the required CAPTCHA script at mount time — no manual `<script>` tag is needed. If the provider API (`window.grecaptcha` / `window.hcaptcha`) is already present on the page when the widget mounts, injection is skipped.
|
|
617
640
|
|
|
641
|
+
### Scripted Text Output
|
|
642
|
+
|
|
643
|
+
A journey can return client-side JavaScript as a `TextOutputCallback` with `messageType` `4` — for example a tracking or device-fingerprinting snippet. The widget does not execute these scripts, so by default it prints the script source to the screen as text.
|
|
644
|
+
|
|
645
|
+
Hide them with a per-callback rule list under `callbacks`:
|
|
646
|
+
|
|
647
|
+
```js
|
|
648
|
+
await configure({
|
|
649
|
+
style: {
|
|
650
|
+
callbacks: {
|
|
651
|
+
// omit for default: prints the script source
|
|
652
|
+
TextOutputCallback: [{ type: '4', display: 'hidden' }],
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
});
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
Each rule is a plain string dictionary passed through to that callback's renderer. `type` selects a `TextOutputCallback` message type and `display: 'hidden'` suppresses it. Informational (`0`), warning (`1`), and error (`2`) messages render as usual. The scripts are still not executed either way — the option only controls whether their source is displayed.
|
|
659
|
+
|
|
618
660
|
## Supported Callbacks
|
|
619
661
|
|
|
620
662
|
The widget supports the following ForgeRock callbacks:
|
|
@@ -30,6 +30,7 @@ export interface JourneyStore extends Pick<Writable<JourneyStoreValue>, 'subscri
|
|
|
30
30
|
pop: () => Promise<void>;
|
|
31
31
|
push: (changeOptions: StartParam) => Promise<void>;
|
|
32
32
|
reset: () => void;
|
|
33
|
+
restart: () => Promise<void>;
|
|
33
34
|
resume: (url: string, resumeOptions?: ResumeOptions) => Promise<void>;
|
|
34
35
|
start: (startOptions?: StartParam, recaptchaAction?: string) => Promise<void>;
|
|
35
36
|
redirect: (step: JourneyStep) => Promise<void>;
|
|
@@ -45,6 +46,7 @@ export interface StageJourneyObject {
|
|
|
45
46
|
pop: () => void;
|
|
46
47
|
push: (options: StartParam) => void;
|
|
47
48
|
redirect: (step: JourneyStep) => Promise<void>;
|
|
49
|
+
restart: () => Promise<void>;
|
|
48
50
|
stack: StackStore;
|
|
49
51
|
}
|
|
50
52
|
export type StageComponent = new (options: ComponentConstructorOptions<never>) => SvelteComponent;
|
|
@@ -84,6 +86,7 @@ export interface StepMetadata {
|
|
|
84
86
|
numOfSelfSubmittableCbs: number;
|
|
85
87
|
numOfUserInputCbs: number;
|
|
86
88
|
stageName?: string;
|
|
89
|
+
themeId?: string;
|
|
87
90
|
};
|
|
88
91
|
platform?: Record<string, unknown>;
|
|
89
92
|
}
|
|
@@ -98,6 +98,7 @@ export declare const stringsSchema: z.ZodObject<{
|
|
|
98
98
|
registerHeader: z.ZodString;
|
|
99
99
|
registerSuccess: z.ZodString;
|
|
100
100
|
registerYourDevice: z.ZodString;
|
|
101
|
+
startOver: z.ZodString;
|
|
101
102
|
requiredField: z.ZodString;
|
|
102
103
|
securityAnswer: z.ZodString;
|
|
103
104
|
setupTwoStepVerification: z.ZodString;
|
|
@@ -231,6 +232,7 @@ export declare const partialStringsSchema: z.ZodObject<{
|
|
|
231
232
|
registerHeader: z.ZodOptional<z.ZodString>;
|
|
232
233
|
registerSuccess: z.ZodOptional<z.ZodString>;
|
|
233
234
|
registerYourDevice: z.ZodOptional<z.ZodString>;
|
|
235
|
+
startOver: z.ZodOptional<z.ZodString>;
|
|
234
236
|
requiredField: z.ZodOptional<z.ZodString>;
|
|
235
237
|
securityAnswer: z.ZodOptional<z.ZodString>;
|
|
236
238
|
setupTwoStepVerification: z.ZodOptional<z.ZodString>;
|
|
@@ -372,6 +374,7 @@ export declare function initialize(userLocale?: z.infer<typeof partialStringsSch
|
|
|
372
374
|
registerHeader: z.ZodString;
|
|
373
375
|
registerSuccess: z.ZodString;
|
|
374
376
|
registerYourDevice: z.ZodString;
|
|
377
|
+
startOver: z.ZodString;
|
|
375
378
|
requiredField: z.ZodString;
|
|
376
379
|
securityAnswer: z.ZodString;
|
|
377
380
|
setupTwoStepVerification: z.ZodString;
|
|
@@ -37,19 +37,74 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
37
37
|
}, z.core.$strict>;
|
|
38
38
|
export type ThemeObject = z.infer<typeof themeSchema>;
|
|
39
39
|
export declare const logoSchema: z.ZodObject<{
|
|
40
|
-
dark: z.ZodOptional<z.ZodString
|
|
40
|
+
dark: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
41
41
|
height: z.ZodOptional<z.ZodNumber>;
|
|
42
|
-
light: z.ZodOptional<z.ZodString
|
|
42
|
+
light: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
43
43
|
width: z.ZodOptional<z.ZodNumber>;
|
|
44
44
|
}, z.core.$strict>;
|
|
45
|
+
/** Convenience type alias for the consumer-supplied logo config object. */
|
|
46
|
+
export type LogoObject = z.infer<typeof logoSchema>;
|
|
47
|
+
export declare const callbackStyleRuleSchema: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
48
|
+
export declare const callbackStylesSchema: z.ZodRecord<z.ZodEnum<{
|
|
49
|
+
BooleanAttributeInputCallback: "BooleanAttributeInputCallback";
|
|
50
|
+
ChoiceCallback: "ChoiceCallback";
|
|
51
|
+
ConfirmationCallback: "ConfirmationCallback";
|
|
52
|
+
DeviceProfileCallback: "DeviceProfileCallback";
|
|
53
|
+
HiddenValueCallback: "HiddenValueCallback";
|
|
54
|
+
KbaCreateCallback: "KbaCreateCallback";
|
|
55
|
+
MetadataCallback: "MetadataCallback";
|
|
56
|
+
NameCallback: "NameCallback";
|
|
57
|
+
NumberAttributeInputCallback: "NumberAttributeInputCallback";
|
|
58
|
+
PasswordCallback: "PasswordCallback";
|
|
59
|
+
PingOneProtectEvaluationCallback: "PingOneProtectEvaluationCallback";
|
|
60
|
+
PingOneProtectInitializeCallback: "PingOneProtectInitializeCallback";
|
|
61
|
+
PollingWaitCallback: "PollingWaitCallback";
|
|
62
|
+
ReCaptchaCallback: "ReCaptchaCallback";
|
|
63
|
+
ReCaptchaEnterpriseCallback: "ReCaptchaEnterpriseCallback";
|
|
64
|
+
RedirectCallback: "RedirectCallback";
|
|
65
|
+
SelectIdPCallback: "SelectIdPCallback";
|
|
66
|
+
StringAttributeInputCallback: "StringAttributeInputCallback";
|
|
67
|
+
SuspendedTextOutputCallback: "SuspendedTextOutputCallback";
|
|
68
|
+
TermsAndConditionsCallback: "TermsAndConditionsCallback";
|
|
69
|
+
TextInputCallback: "TextInputCallback";
|
|
70
|
+
TextOutputCallback: "TextOutputCallback";
|
|
71
|
+
ValidatedCreatePasswordCallback: "ValidatedCreatePasswordCallback";
|
|
72
|
+
ValidatedCreateUsernameCallback: "ValidatedCreateUsernameCallback";
|
|
73
|
+
}> & z.core.$partial, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
45
74
|
export declare const styleSchema: z.ZodObject<{
|
|
75
|
+
callbacks: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
76
|
+
BooleanAttributeInputCallback: "BooleanAttributeInputCallback";
|
|
77
|
+
ChoiceCallback: "ChoiceCallback";
|
|
78
|
+
ConfirmationCallback: "ConfirmationCallback";
|
|
79
|
+
DeviceProfileCallback: "DeviceProfileCallback";
|
|
80
|
+
HiddenValueCallback: "HiddenValueCallback";
|
|
81
|
+
KbaCreateCallback: "KbaCreateCallback";
|
|
82
|
+
MetadataCallback: "MetadataCallback";
|
|
83
|
+
NameCallback: "NameCallback";
|
|
84
|
+
NumberAttributeInputCallback: "NumberAttributeInputCallback";
|
|
85
|
+
PasswordCallback: "PasswordCallback";
|
|
86
|
+
PingOneProtectEvaluationCallback: "PingOneProtectEvaluationCallback";
|
|
87
|
+
PingOneProtectInitializeCallback: "PingOneProtectInitializeCallback";
|
|
88
|
+
PollingWaitCallback: "PollingWaitCallback";
|
|
89
|
+
ReCaptchaCallback: "ReCaptchaCallback";
|
|
90
|
+
ReCaptchaEnterpriseCallback: "ReCaptchaEnterpriseCallback";
|
|
91
|
+
RedirectCallback: "RedirectCallback";
|
|
92
|
+
SelectIdPCallback: "SelectIdPCallback";
|
|
93
|
+
StringAttributeInputCallback: "StringAttributeInputCallback";
|
|
94
|
+
SuspendedTextOutputCallback: "SuspendedTextOutputCallback";
|
|
95
|
+
TermsAndConditionsCallback: "TermsAndConditionsCallback";
|
|
96
|
+
TextInputCallback: "TextInputCallback";
|
|
97
|
+
TextOutputCallback: "TextOutputCallback";
|
|
98
|
+
ValidatedCreatePasswordCallback: "ValidatedCreatePasswordCallback";
|
|
99
|
+
ValidatedCreateUsernameCallback: "ValidatedCreateUsernameCallback";
|
|
100
|
+
}> & z.core.$partial, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>>;
|
|
46
101
|
checksAndRadios: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"animated">, z.ZodLiteral<"standard">]>>;
|
|
47
102
|
labels: z.ZodOptional<z.ZodUnion<readonly [z.ZodOptional<z.ZodLiteral<"floating">>, z.ZodLiteral<"stacked">]>>;
|
|
48
103
|
showPassword: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"button">, z.ZodLiteral<"checkbox">]>>;
|
|
49
104
|
logo: z.ZodOptional<z.ZodObject<{
|
|
50
|
-
dark: z.ZodOptional<z.ZodString
|
|
105
|
+
dark: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
51
106
|
height: z.ZodOptional<z.ZodNumber>;
|
|
52
|
-
light: z.ZodOptional<z.ZodString
|
|
107
|
+
light: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
53
108
|
width: z.ZodOptional<z.ZodNumber>;
|
|
54
109
|
}, z.core.$strict>>;
|
|
55
110
|
sections: z.ZodOptional<z.ZodObject<{
|
|
@@ -84,15 +139,67 @@ export declare const styleSchema: z.ZodObject<{
|
|
|
84
139
|
bodyTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
85
140
|
buttonTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
86
141
|
}, z.core.$strict>>;
|
|
142
|
+
themeCatalog: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
143
|
+
primaryColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
144
|
+
primaryOffColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
145
|
+
secondaryColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
146
|
+
backgroundColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
147
|
+
linkColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
148
|
+
linkActiveColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
149
|
+
logo: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
150
|
+
favicon: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
151
|
+
logoHeight: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
fontFamily: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
153
|
+
buttonBorderRadius: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
cardBorderRadius: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
cardBgColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
156
|
+
inputBgColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
157
|
+
inputBorderColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
158
|
+
inputLabelColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
159
|
+
inputFocusRingColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
160
|
+
selectAccentColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
161
|
+
selectHoverBgColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
162
|
+
buttonFocusRingColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
163
|
+
inputTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
164
|
+
cardTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
165
|
+
bodyTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
166
|
+
buttonTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
167
|
+
}, z.core.$strict>>>;
|
|
87
168
|
}, z.core.$strict>;
|
|
88
169
|
export declare const partialStyleSchema: z.ZodObject<{
|
|
170
|
+
callbacks: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
171
|
+
BooleanAttributeInputCallback: "BooleanAttributeInputCallback";
|
|
172
|
+
ChoiceCallback: "ChoiceCallback";
|
|
173
|
+
ConfirmationCallback: "ConfirmationCallback";
|
|
174
|
+
DeviceProfileCallback: "DeviceProfileCallback";
|
|
175
|
+
HiddenValueCallback: "HiddenValueCallback";
|
|
176
|
+
KbaCreateCallback: "KbaCreateCallback";
|
|
177
|
+
MetadataCallback: "MetadataCallback";
|
|
178
|
+
NameCallback: "NameCallback";
|
|
179
|
+
NumberAttributeInputCallback: "NumberAttributeInputCallback";
|
|
180
|
+
PasswordCallback: "PasswordCallback";
|
|
181
|
+
PingOneProtectEvaluationCallback: "PingOneProtectEvaluationCallback";
|
|
182
|
+
PingOneProtectInitializeCallback: "PingOneProtectInitializeCallback";
|
|
183
|
+
PollingWaitCallback: "PollingWaitCallback";
|
|
184
|
+
ReCaptchaCallback: "ReCaptchaCallback";
|
|
185
|
+
ReCaptchaEnterpriseCallback: "ReCaptchaEnterpriseCallback";
|
|
186
|
+
RedirectCallback: "RedirectCallback";
|
|
187
|
+
SelectIdPCallback: "SelectIdPCallback";
|
|
188
|
+
StringAttributeInputCallback: "StringAttributeInputCallback";
|
|
189
|
+
SuspendedTextOutputCallback: "SuspendedTextOutputCallback";
|
|
190
|
+
TermsAndConditionsCallback: "TermsAndConditionsCallback";
|
|
191
|
+
TextInputCallback: "TextInputCallback";
|
|
192
|
+
TextOutputCallback: "TextOutputCallback";
|
|
193
|
+
ValidatedCreatePasswordCallback: "ValidatedCreatePasswordCallback";
|
|
194
|
+
ValidatedCreateUsernameCallback: "ValidatedCreateUsernameCallback";
|
|
195
|
+
}> & z.core.$partial, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>>>;
|
|
89
196
|
checksAndRadios: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"animated">, z.ZodLiteral<"standard">]>>>;
|
|
90
197
|
labels: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodOptional<z.ZodLiteral<"floating">>, z.ZodLiteral<"stacked">]>>>;
|
|
91
198
|
showPassword: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"button">, z.ZodLiteral<"checkbox">]>>>;
|
|
92
199
|
logo: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
93
|
-
dark: z.ZodOptional<z.ZodString
|
|
200
|
+
dark: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
94
201
|
height: z.ZodOptional<z.ZodNumber>;
|
|
95
|
-
light: z.ZodOptional<z.ZodString
|
|
202
|
+
light: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
96
203
|
width: z.ZodOptional<z.ZodNumber>;
|
|
97
204
|
}, z.core.$strict>>>;
|
|
98
205
|
sections: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
@@ -127,6 +234,32 @@ export declare const partialStyleSchema: z.ZodObject<{
|
|
|
127
234
|
bodyTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
128
235
|
buttonTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
129
236
|
}, z.core.$strict>>>;
|
|
237
|
+
themeCatalog: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
238
|
+
primaryColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
239
|
+
primaryOffColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
240
|
+
secondaryColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
241
|
+
backgroundColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
242
|
+
linkColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
243
|
+
linkActiveColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
244
|
+
logo: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
245
|
+
favicon: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
246
|
+
logoHeight: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
fontFamily: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
248
|
+
buttonBorderRadius: z.ZodOptional<z.ZodNumber>;
|
|
249
|
+
cardBorderRadius: z.ZodOptional<z.ZodNumber>;
|
|
250
|
+
cardBgColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
251
|
+
inputBgColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
252
|
+
inputBorderColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
253
|
+
inputLabelColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
254
|
+
inputFocusRingColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
255
|
+
selectAccentColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
256
|
+
selectHoverBgColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
257
|
+
buttonFocusRingColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
258
|
+
inputTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
259
|
+
cardTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
260
|
+
bodyTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
261
|
+
buttonTextColor: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
262
|
+
}, z.core.$strict>>>>;
|
|
130
263
|
}, z.core.$strict>;
|
|
131
264
|
/** Convenience type alias for the resolved widget style object. */
|
|
132
265
|
export type StyleObject = z.infer<typeof partialStyleSchema>;
|
|
@@ -138,6 +271,7 @@ export declare const styleStore: Writable<z.infer<typeof partialStyleSchema>>;
|
|
|
138
271
|
* @example initialize({ checksAndRadios: 'standard' });
|
|
139
272
|
*/
|
|
140
273
|
export declare function initialize(customStyle?: z.infer<typeof partialStyleSchema>): Writable<{
|
|
274
|
+
callbacks?: Partial<Record<"BooleanAttributeInputCallback" | "ChoiceCallback" | "ConfirmationCallback" | "DeviceProfileCallback" | "HiddenValueCallback" | "KbaCreateCallback" | "MetadataCallback" | "NameCallback" | "NumberAttributeInputCallback" | "PasswordCallback" | "PingOneProtectEvaluationCallback" | "PingOneProtectInitializeCallback" | "PollingWaitCallback" | "ReCaptchaCallback" | "ReCaptchaEnterpriseCallback" | "RedirectCallback" | "SelectIdPCallback" | "StringAttributeInputCallback" | "SuspendedTextOutputCallback" | "TermsAndConditionsCallback" | "TextInputCallback" | "TextOutputCallback" | "ValidatedCreatePasswordCallback" | "ValidatedCreateUsernameCallback", Record<string, string>[]>> | undefined;
|
|
141
275
|
checksAndRadios?: "animated" | "standard" | undefined;
|
|
142
276
|
labels?: "floating" | "stacked" | undefined;
|
|
143
277
|
showPassword?: "none" | "button" | "checkbox" | undefined;
|
|
@@ -179,4 +313,30 @@ export declare function initialize(customStyle?: z.infer<typeof partialStyleSche
|
|
|
179
313
|
bodyTextColor?: string | undefined;
|
|
180
314
|
buttonTextColor?: string | undefined;
|
|
181
315
|
} | undefined;
|
|
316
|
+
themeCatalog?: Record<string, {
|
|
317
|
+
primaryColor?: string | undefined;
|
|
318
|
+
primaryOffColor?: string | undefined;
|
|
319
|
+
secondaryColor?: string | undefined;
|
|
320
|
+
backgroundColor?: string | undefined;
|
|
321
|
+
linkColor?: string | undefined;
|
|
322
|
+
linkActiveColor?: string | undefined;
|
|
323
|
+
logo?: string | undefined;
|
|
324
|
+
favicon?: string | undefined;
|
|
325
|
+
logoHeight?: number | undefined;
|
|
326
|
+
fontFamily?: string | undefined;
|
|
327
|
+
buttonBorderRadius?: number | undefined;
|
|
328
|
+
cardBorderRadius?: number | undefined;
|
|
329
|
+
cardBgColor?: string | undefined;
|
|
330
|
+
inputBgColor?: string | undefined;
|
|
331
|
+
inputBorderColor?: string | undefined;
|
|
332
|
+
inputLabelColor?: string | undefined;
|
|
333
|
+
inputFocusRingColor?: string | undefined;
|
|
334
|
+
selectAccentColor?: string | undefined;
|
|
335
|
+
selectHoverBgColor?: string | undefined;
|
|
336
|
+
buttonFocusRingColor?: string | undefined;
|
|
337
|
+
inputTextColor?: string | undefined;
|
|
338
|
+
cardTextColor?: string | undefined;
|
|
339
|
+
bodyTextColor?: string | undefined;
|
|
340
|
+
buttonTextColor?: string | undefined;
|
|
341
|
+
}> | undefined;
|
|
182
342
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,31 +1,46 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
1
|
import './main.css';
|
|
3
2
|
export declare const configure: (options: import("./interfaces").WidgetConfigOptions) => Promise<void>;
|
|
4
3
|
export declare const journey: (options?: import("./interfaces").JourneyOptions) => {
|
|
5
4
|
change: (changeOptions: import("./interfaces").JourneyOptionsChange) => Promise<unknown>;
|
|
6
5
|
start: (startOptions?: import("./interfaces").JourneyOptionsStart) => Promise<unknown>;
|
|
7
|
-
subscribe:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
subscribe: {
|
|
7
|
+
(this: void, run: import("svelte/store").Subscriber<{
|
|
8
|
+
journey: import("./core/journey/journey.interfaces").JourneyStoreValue;
|
|
9
|
+
oauth: import("./core/oauth/oauth.store").OAuthTokenStoreValue;
|
|
10
|
+
user: import("./core/user/user.store").UserStoreValue;
|
|
11
|
+
}>, invalidate?: (() => void) | undefined): import("svelte/store").Unsubscriber;
|
|
12
|
+
(this: void, run: import("svelte/store").Subscriber<{
|
|
13
|
+
journey: import("./core/journey/journey.interfaces").JourneyStoreValue;
|
|
14
|
+
oauth: import("./core/oauth/oauth.store").OAuthTokenStoreValue;
|
|
15
|
+
user: import("./core/user/user.store").UserStoreValue;
|
|
16
|
+
}>, invalidate?: (() => void) | undefined): import("svelte/store").Unsubscriber;
|
|
17
|
+
};
|
|
12
18
|
};
|
|
13
19
|
export declare const component: () => {
|
|
14
20
|
close: (args?: {
|
|
15
21
|
reason: "auto" | "external" | "user";
|
|
16
22
|
}) => void;
|
|
17
23
|
open: () => void;
|
|
18
|
-
subscribe:
|
|
24
|
+
subscribe: {
|
|
25
|
+
(this: void, run: import("svelte/store").Subscriber<Pick<import("./core/component.store").ComponentStoreValue, "open" | "lastAction" | "error" | "mounted" | "reason">>, invalidate?: (() => void) | undefined): import("svelte/store").Unsubscriber;
|
|
26
|
+
(this: void, run: import("svelte/store").Subscriber<Pick<import("./core/component.store").ComponentStoreValue, "open" | "lastAction" | "error" | "mounted" | "reason">>, invalidate?: (() => void) | undefined): import("svelte/store").Unsubscriber;
|
|
27
|
+
};
|
|
19
28
|
};
|
|
20
29
|
export declare const user: {
|
|
21
30
|
info(): {
|
|
22
31
|
get: () => Promise<import("./core/user/user.store").UserStoreValue>;
|
|
23
|
-
subscribe:
|
|
32
|
+
subscribe: {
|
|
33
|
+
(this: void, run: import("svelte/store").Subscriber<import("./core/user/user.store").UserStoreValue>, invalidate?: (() => void) | undefined): import("svelte/store").Unsubscriber;
|
|
34
|
+
(this: void, run: import("svelte/store").Subscriber<import("./core/user/user.store").UserStoreValue>, invalidate?: (() => void) | undefined): import("svelte/store").Unsubscriber;
|
|
35
|
+
};
|
|
24
36
|
};
|
|
25
37
|
logout(): Promise<void>;
|
|
26
38
|
tokens(): {
|
|
27
39
|
get: (options?: import("@forgerock/oidc-client").GetTokensOptions) => Promise<import("./core/oauth/oauth.store").OAuthTokenStoreValue>;
|
|
28
|
-
subscribe:
|
|
40
|
+
subscribe: {
|
|
41
|
+
(this: void, run: import("svelte/store").Subscriber<import("./core/oauth/oauth.store").OAuthTokenStoreValue>, invalidate?: (() => void) | undefined): import("svelte/store").Unsubscriber;
|
|
42
|
+
(this: void, run: import("svelte/store").Subscriber<import("./core/oauth/oauth.store").OAuthTokenStoreValue>, invalidate?: (() => void) | undefined): import("svelte/store").Unsubscriber;
|
|
43
|
+
};
|
|
29
44
|
};
|
|
30
45
|
};
|
|
31
46
|
export declare const protect: {
|
|
@@ -42,18 +57,23 @@ export declare const protect: {
|
|
|
42
57
|
error: string;
|
|
43
58
|
};
|
|
44
59
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
60
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
61
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
62
|
+
$$bindings?: Bindings;
|
|
63
|
+
} & Exports;
|
|
64
|
+
(internal: unknown, props: Props & {
|
|
65
|
+
$$events?: Events;
|
|
66
|
+
$$slots?: Slots;
|
|
67
|
+
}): Exports & {
|
|
68
|
+
$set?: any;
|
|
69
|
+
$on?: any;
|
|
48
70
|
};
|
|
49
|
-
|
|
50
|
-
[evt: string]: CustomEvent<any>;
|
|
51
|
-
};
|
|
52
|
-
slots: {};
|
|
53
|
-
};
|
|
54
|
-
export type IndexProps = typeof __propDef.props;
|
|
55
|
-
export type IndexEvents = typeof __propDef.events;
|
|
56
|
-
export type IndexSlots = typeof __propDef.slots;
|
|
57
|
-
export default class Index extends SvelteComponentTyped<IndexProps, IndexEvents, IndexSlots> {
|
|
71
|
+
z_$$bindings?: Bindings;
|
|
58
72
|
}
|
|
59
|
-
|
|
73
|
+
declare const Index: $$__sveltets_2_IsomorphicComponent<{
|
|
74
|
+
type?: "modal" | "inline";
|
|
75
|
+
}, {
|
|
76
|
+
[evt: string]: CustomEvent<any>;
|
|
77
|
+
}, {}, {}, string>;
|
|
78
|
+
type Index = InstanceType<typeof Index>;
|
|
79
|
+
export default Index;
|