@forgerock/login-widget 1.0.0-beta.11 → 1.0.0-beta.12
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/CHANGELOG.md +7 -0
- package/index.cjs +250 -94
- package/index.cjs.map +1 -1
- package/index.d.ts +27 -0
- package/index.js +250 -94
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -16730,6 +16730,8 @@ var backToDefault = "Back to Sign In";
|
|
|
16730
16730
|
var backToLogin = "Back to Sign In";
|
|
16731
16731
|
var dontHaveAnAccount = "No account? <a href='?journey=Registration'>Register here!</a>";
|
|
16732
16732
|
var closeModal = "Close";
|
|
16733
|
+
var charactersCannotRepeatMoreThan = "Character cannot repeat more than {max} times";
|
|
16734
|
+
var charactersCannotRepeatMoreThanCaseInsensitive = "Character cannot repeat more than {max} times (case insensitive)";
|
|
16733
16735
|
var chooseDifferentUsername = "Please choose a different username.";
|
|
16734
16736
|
var confirmPassword = "Confirm password";
|
|
16735
16737
|
var constraintViolationForPassword = "Password does not meet the requirements.";
|
|
@@ -16762,6 +16764,9 @@ var nextButton = "Next";
|
|
|
16762
16764
|
var notToExceedMaximumCharacterLength = "No more than {max} characters";
|
|
16763
16765
|
var noLessThanMinimumCharacterLength = "At least {min} character(s)";
|
|
16764
16766
|
var passwordCallback = "Password";
|
|
16767
|
+
var passwordCannotContainCommonPasswords = "Password cannot contain common passwords";
|
|
16768
|
+
var passwordCannotContainCommonPasswordsOrBeReversible = "Password cannot contain common passwords or reversible text";
|
|
16769
|
+
var passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan = "Password cannot contain common passwords or reversible text less than {min} characters";
|
|
16765
16770
|
var passwordRequirements = "Password requirements:";
|
|
16766
16771
|
var pleaseCheckValue = "Please check this value";
|
|
16767
16772
|
var pleaseConfirm = "Please confirm";
|
|
@@ -16776,6 +16781,10 @@ var requiredField = "Value is required";
|
|
|
16776
16781
|
var securityAnswer = "Security answer";
|
|
16777
16782
|
var securityQuestions = "Security question(s)";
|
|
16778
16783
|
var securityQuestionsPrompt = "Provide security question(s) and answer(s):";
|
|
16784
|
+
var shouldContainANumber = "Should contain a number";
|
|
16785
|
+
var shouldContainAnUppercase = "Should contain an uppercase letter";
|
|
16786
|
+
var shouldContainALowercase = "Should contain a lowercase letter";
|
|
16787
|
+
var shouldContainASymbol = "Should contain a symbol";
|
|
16779
16788
|
var showPassword = "Show password";
|
|
16780
16789
|
var sn = "Last name";
|
|
16781
16790
|
var submitButton = "Submit";
|
|
@@ -16799,6 +16808,8 @@ var fallback = {
|
|
|
16799
16808
|
backToLogin: backToLogin,
|
|
16800
16809
|
dontHaveAnAccount: dontHaveAnAccount,
|
|
16801
16810
|
closeModal: closeModal,
|
|
16811
|
+
charactersCannotRepeatMoreThan: charactersCannotRepeatMoreThan,
|
|
16812
|
+
charactersCannotRepeatMoreThanCaseInsensitive: charactersCannotRepeatMoreThanCaseInsensitive,
|
|
16802
16813
|
chooseDifferentUsername: chooseDifferentUsername,
|
|
16803
16814
|
confirmPassword: confirmPassword,
|
|
16804
16815
|
constraintViolationForPassword: constraintViolationForPassword,
|
|
@@ -16831,6 +16842,9 @@ var fallback = {
|
|
|
16831
16842
|
notToExceedMaximumCharacterLength: notToExceedMaximumCharacterLength,
|
|
16832
16843
|
noLessThanMinimumCharacterLength: noLessThanMinimumCharacterLength,
|
|
16833
16844
|
passwordCallback: passwordCallback,
|
|
16845
|
+
passwordCannotContainCommonPasswords: passwordCannotContainCommonPasswords,
|
|
16846
|
+
passwordCannotContainCommonPasswordsOrBeReversible: passwordCannotContainCommonPasswordsOrBeReversible,
|
|
16847
|
+
passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan: passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan,
|
|
16834
16848
|
passwordRequirements: passwordRequirements,
|
|
16835
16849
|
pleaseCheckValue: pleaseCheckValue,
|
|
16836
16850
|
pleaseConfirm: pleaseConfirm,
|
|
@@ -16845,6 +16859,10 @@ var fallback = {
|
|
|
16845
16859
|
securityAnswer: securityAnswer,
|
|
16846
16860
|
securityQuestions: securityQuestions,
|
|
16847
16861
|
securityQuestionsPrompt: securityQuestionsPrompt,
|
|
16862
|
+
shouldContainANumber: shouldContainANumber,
|
|
16863
|
+
shouldContainAnUppercase: shouldContainAnUppercase,
|
|
16864
|
+
shouldContainALowercase: shouldContainALowercase,
|
|
16865
|
+
shouldContainASymbol: shouldContainASymbol,
|
|
16848
16866
|
showPassword: showPassword,
|
|
16849
16867
|
sn: sn,
|
|
16850
16868
|
submitButton: submitButton,
|
|
@@ -16871,6 +16889,8 @@ const stringsSchema = z
|
|
|
16871
16889
|
backToLogin: z.string(),
|
|
16872
16890
|
dontHaveAnAccount: z.string(),
|
|
16873
16891
|
closeModal: z.string(),
|
|
16892
|
+
charactersCannotRepeatMoreThan: z.string(),
|
|
16893
|
+
charactersCannotRepeatMoreThanCaseInsensitive: z.string(),
|
|
16874
16894
|
chooseDifferentUsername: z.string(),
|
|
16875
16895
|
confirmPassword: z.string(),
|
|
16876
16896
|
constraintViolationForPassword: z.string(),
|
|
@@ -16903,6 +16923,9 @@ const stringsSchema = z
|
|
|
16903
16923
|
notToExceedMaximumCharacterLength: z.string(),
|
|
16904
16924
|
noLessThanMinimumCharacterLength: z.string(),
|
|
16905
16925
|
passwordCallback: z.string(),
|
|
16926
|
+
passwordCannotContainCommonPasswords: z.string(),
|
|
16927
|
+
passwordCannotContainCommonPasswordsOrBeReversible: z.string(),
|
|
16928
|
+
passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan: z.string(),
|
|
16906
16929
|
passwordRequirements: z.string(),
|
|
16907
16930
|
pleaseCheckValue: z.string(),
|
|
16908
16931
|
pleaseConfirm: z.string(),
|
|
@@ -16917,6 +16940,10 @@ const stringsSchema = z
|
|
|
16917
16940
|
securityAnswer: z.string(),
|
|
16918
16941
|
securityQuestions: z.string(),
|
|
16919
16942
|
securityQuestionsPrompt: z.string(),
|
|
16943
|
+
shouldContainANumber: z.string(),
|
|
16944
|
+
shouldContainAnUppercase: z.string(),
|
|
16945
|
+
shouldContainALowercase: z.string(),
|
|
16946
|
+
shouldContainASymbol: z.string(),
|
|
16920
16947
|
showPassword: z.string(),
|
|
16921
16948
|
sn: z.string(),
|
|
16922
16949
|
submitButton: z.string(),
|
|
@@ -20610,12 +20637,41 @@ function getInputTypeFromPolicies(policies) {
|
|
|
20610
20637
|
return 'text';
|
|
20611
20638
|
}
|
|
20612
20639
|
function getValidationFailureParams(failedPolicy) {
|
|
20613
|
-
if (failedPolicy?.policyRequirement === '
|
|
20614
|
-
const params = failedPolicy
|
|
20640
|
+
if (failedPolicy?.policyRequirement === 'DICTIONARY') {
|
|
20641
|
+
const params = failedPolicy.params;
|
|
20642
|
+
const min = params?.['min-substring-length'] || 0;
|
|
20643
|
+
const arr = [];
|
|
20644
|
+
if (params?.['check-substrings'] && params?.['test-reversed-password']) {
|
|
20645
|
+
arr.push({
|
|
20646
|
+
length: min,
|
|
20647
|
+
message: interpolate('passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan', {
|
|
20648
|
+
min: String(min),
|
|
20649
|
+
}),
|
|
20650
|
+
rule: 'reversibleSubstrings',
|
|
20651
|
+
});
|
|
20652
|
+
}
|
|
20653
|
+
else if (params?.['test-reversed-password']) {
|
|
20654
|
+
arr.push({
|
|
20655
|
+
length: null,
|
|
20656
|
+
message: interpolate('passwordCannotContainCommonPasswordsOrBeReversible'),
|
|
20657
|
+
rule: 'reversibleSubstrings',
|
|
20658
|
+
});
|
|
20659
|
+
}
|
|
20660
|
+
else {
|
|
20661
|
+
arr.push({
|
|
20662
|
+
length: null,
|
|
20663
|
+
message: interpolate('passwordCannotContainCommonPasswords'),
|
|
20664
|
+
rule: 'reversibleSubstrings',
|
|
20665
|
+
});
|
|
20666
|
+
}
|
|
20667
|
+
return arr;
|
|
20668
|
+
}
|
|
20669
|
+
else if (failedPolicy?.policyRequirement === 'CHARACTER_SET') {
|
|
20670
|
+
const params = failedPolicy.params;
|
|
20615
20671
|
return params?.['character-sets'].map(convertCharacterSetToRuleObj);
|
|
20616
20672
|
}
|
|
20617
20673
|
else if (failedPolicy?.policyRequirement === 'LENGTH_BASED') {
|
|
20618
|
-
const params = failedPolicy
|
|
20674
|
+
const params = failedPolicy.params;
|
|
20619
20675
|
const min = params?.['min-password-length'] || 0;
|
|
20620
20676
|
const max = params?.['max-password-length'] || null;
|
|
20621
20677
|
const arr = [];
|
|
@@ -20635,6 +20691,26 @@ function getValidationFailureParams(failedPolicy) {
|
|
|
20635
20691
|
}
|
|
20636
20692
|
return arr;
|
|
20637
20693
|
}
|
|
20694
|
+
else if (failedPolicy?.policyRequirement === 'REPEATED_CHARACTERS') {
|
|
20695
|
+
const params = failedPolicy.params;
|
|
20696
|
+
const max = params['max-consecutive-length'] || 0;
|
|
20697
|
+
const arr = [];
|
|
20698
|
+
if (!params['case-sensitive-validation']) {
|
|
20699
|
+
arr.push({
|
|
20700
|
+
length: max,
|
|
20701
|
+
message: interpolate('charactersCannotRepeatMoreThanCaseInsensitive', { max: String(max) }),
|
|
20702
|
+
rule: 'repeatedCharactersCaseInsensitive',
|
|
20703
|
+
});
|
|
20704
|
+
}
|
|
20705
|
+
else {
|
|
20706
|
+
arr.push({
|
|
20707
|
+
length: max,
|
|
20708
|
+
message: interpolate('charactersCannotRepeatMoreThan', { max: String(max) }),
|
|
20709
|
+
rule: 'repeatedCharacters',
|
|
20710
|
+
});
|
|
20711
|
+
}
|
|
20712
|
+
return arr;
|
|
20713
|
+
}
|
|
20638
20714
|
else if (failedPolicy?.policyRequirement === 'VALID_USERNAME') {
|
|
20639
20715
|
return [
|
|
20640
20716
|
{
|
|
@@ -20791,36 +20867,72 @@ function convertCharacterSetToRuleObj(set) {
|
|
|
20791
20867
|
const num = arr[0];
|
|
20792
20868
|
const type = arr[1];
|
|
20793
20869
|
if (type === '0123456789') {
|
|
20794
|
-
|
|
20795
|
-
|
|
20796
|
-
|
|
20797
|
-
|
|
20798
|
-
|
|
20870
|
+
if (num === '0') {
|
|
20871
|
+
return {
|
|
20872
|
+
length: null,
|
|
20873
|
+
message: interpolate('shouldContainANumber'),
|
|
20874
|
+
rule: 'numbers',
|
|
20875
|
+
};
|
|
20876
|
+
}
|
|
20877
|
+
else {
|
|
20878
|
+
return {
|
|
20879
|
+
length: Number(num),
|
|
20880
|
+
message: interpolate('minimumNumberOfNumbers', { num: String(num) }),
|
|
20881
|
+
rule: 'numbers',
|
|
20882
|
+
};
|
|
20883
|
+
}
|
|
20799
20884
|
}
|
|
20800
20885
|
else if (type === 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') {
|
|
20801
|
-
|
|
20802
|
-
|
|
20803
|
-
|
|
20804
|
-
|
|
20805
|
-
|
|
20886
|
+
if (num === '0') {
|
|
20887
|
+
return {
|
|
20888
|
+
length: null,
|
|
20889
|
+
message: interpolate('shouldContainAnUppercase'),
|
|
20890
|
+
rule: 'uppercase',
|
|
20891
|
+
};
|
|
20892
|
+
}
|
|
20893
|
+
else {
|
|
20894
|
+
return {
|
|
20895
|
+
length: Number(num),
|
|
20896
|
+
message: interpolate('minimumNumberOfUppercase', { num: String(num) }),
|
|
20897
|
+
rule: 'uppercase',
|
|
20898
|
+
};
|
|
20899
|
+
}
|
|
20806
20900
|
}
|
|
20807
20901
|
else if (type === 'abcdefghijklmnopqrstuvwxyz') {
|
|
20808
|
-
|
|
20809
|
-
|
|
20810
|
-
|
|
20811
|
-
|
|
20812
|
-
|
|
20902
|
+
if (num === '0') {
|
|
20903
|
+
return {
|
|
20904
|
+
length: null,
|
|
20905
|
+
message: interpolate('shouldContainALowercase'),
|
|
20906
|
+
rule: 'lowercase',
|
|
20907
|
+
};
|
|
20908
|
+
}
|
|
20909
|
+
else {
|
|
20910
|
+
return {
|
|
20911
|
+
length: Number(num),
|
|
20912
|
+
message: interpolate('minimumNumberOfLowercase', { num: String(num) }),
|
|
20913
|
+
rule: 'lowercase',
|
|
20914
|
+
};
|
|
20915
|
+
}
|
|
20813
20916
|
}
|
|
20814
20917
|
else if (type.includes('@') || type.includes('!') || type.includes('*') || type.includes('#')) {
|
|
20815
|
-
|
|
20816
|
-
|
|
20817
|
-
|
|
20818
|
-
|
|
20819
|
-
|
|
20918
|
+
if (num === '0') {
|
|
20919
|
+
return {
|
|
20920
|
+
length: null,
|
|
20921
|
+
message: interpolate('shouldContainASymbol'),
|
|
20922
|
+
rule: 'symbols',
|
|
20923
|
+
};
|
|
20924
|
+
}
|
|
20925
|
+
else {
|
|
20926
|
+
return {
|
|
20927
|
+
length: Number(num),
|
|
20928
|
+
message: interpolate('minimumNumberOfSymbols', { num: String(num) }),
|
|
20929
|
+
rule: 'symbols',
|
|
20930
|
+
};
|
|
20931
|
+
}
|
|
20820
20932
|
}
|
|
20821
20933
|
else {
|
|
20822
20934
|
return {
|
|
20823
|
-
length:
|
|
20935
|
+
length: null,
|
|
20824
20936
|
message: interpolate('pleaseCheckValue'),
|
|
20825
20937
|
rule: 'unknown',
|
|
20826
20938
|
};
|
|
@@ -27135,8 +27247,8 @@ class Eye_icon extends SvelteComponent {
|
|
|
27135
27247
|
|
|
27136
27248
|
function create_default_slot_1$8(ctx) {
|
|
27137
27249
|
let current;
|
|
27138
|
-
const default_slot_template = /*#slots*/ ctx[
|
|
27139
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
|
27250
|
+
const default_slot_template = /*#slots*/ ctx[14].default;
|
|
27251
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[15], null);
|
|
27140
27252
|
|
|
27141
27253
|
return {
|
|
27142
27254
|
c() {
|
|
@@ -27151,15 +27263,15 @@ function create_default_slot_1$8(ctx) {
|
|
|
27151
27263
|
},
|
|
27152
27264
|
p(ctx, dirty) {
|
|
27153
27265
|
if (default_slot) {
|
|
27154
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
27266
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 32768)) {
|
|
27155
27267
|
update_slot_base(
|
|
27156
27268
|
default_slot,
|
|
27157
27269
|
default_slot_template,
|
|
27158
27270
|
ctx,
|
|
27159
|
-
/*$$scope*/ ctx[
|
|
27271
|
+
/*$$scope*/ ctx[15],
|
|
27160
27272
|
!current
|
|
27161
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
|
27162
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
|
27273
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[15])
|
|
27274
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[15], dirty, null),
|
|
27163
27275
|
null
|
|
27164
27276
|
);
|
|
27165
27277
|
}
|
|
@@ -27180,7 +27292,7 @@ function create_default_slot_1$8(ctx) {
|
|
|
27180
27292
|
};
|
|
27181
27293
|
}
|
|
27182
27294
|
|
|
27183
|
-
// (
|
|
27295
|
+
// (59:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
|
|
27184
27296
|
function create_default_slot$f(ctx) {
|
|
27185
27297
|
let t;
|
|
27186
27298
|
let current;
|
|
@@ -27210,7 +27322,7 @@ function create_default_slot$f(ctx) {
|
|
|
27210
27322
|
};
|
|
27211
27323
|
}
|
|
27212
27324
|
|
|
27213
|
-
// (
|
|
27325
|
+
// (53:2)
|
|
27214
27326
|
function create_input_button_slot$1(ctx) {
|
|
27215
27327
|
let button;
|
|
27216
27328
|
let eyeicon;
|
|
@@ -27249,7 +27361,7 @@ function create_input_button_slot$1(ctx) {
|
|
|
27249
27361
|
const eyeicon_changes = {};
|
|
27250
27362
|
if (dirty & /*isVisible*/ 64) eyeicon_changes.visible = /*isVisible*/ ctx[6];
|
|
27251
27363
|
|
|
27252
|
-
if (dirty & /*$$scope*/
|
|
27364
|
+
if (dirty & /*$$scope*/ 32768) {
|
|
27253
27365
|
eyeicon_changes.$$scope = { dirty, ctx };
|
|
27254
27366
|
}
|
|
27255
27367
|
|
|
@@ -27282,18 +27394,18 @@ function create_fragment$q(ctx) {
|
|
|
27282
27394
|
forceValidityFailure: /*forceValidityFailure*/ ctx[0],
|
|
27283
27395
|
isFirstInvalidInput: false,
|
|
27284
27396
|
hasRightIcon: true,
|
|
27285
|
-
key: `${/*key*/ ctx[
|
|
27397
|
+
key: `${/*key*/ ctx[3]}-confirm`,
|
|
27286
27398
|
label: interpolate('confirmPassword', null, 'Confirm Password'),
|
|
27287
|
-
message: /*isInvalid*/ ctx[
|
|
27399
|
+
message: /*isInvalid*/ ctx[1]
|
|
27288
27400
|
? interpolate('passwordConfirmationError', null, 'Passwords do not match')
|
|
27289
27401
|
: undefined,
|
|
27290
|
-
onChange: /*
|
|
27291
|
-
isInvalid: /*isInvalid*/ ctx[
|
|
27292
|
-
isRequired: /*isRequired*/ ctx[
|
|
27293
|
-
showMessage: /*showMessage*/ ctx[
|
|
27402
|
+
onChange: /*onChangeWrapper*/ ctx[9],
|
|
27403
|
+
isInvalid: /*isInvalid*/ ctx[1],
|
|
27404
|
+
isRequired: /*isRequired*/ ctx[2],
|
|
27405
|
+
showMessage: /*showMessage*/ ctx[4],
|
|
27294
27406
|
type: /*type*/ ctx[7],
|
|
27295
|
-
value: typeof /*value*/ ctx[
|
|
27296
|
-
? /*value*/ ctx[
|
|
27407
|
+
value: typeof /*value*/ ctx[5] === 'string'
|
|
27408
|
+
? /*value*/ ctx[5]
|
|
27297
27409
|
: '',
|
|
27298
27410
|
$$slots: {
|
|
27299
27411
|
"input-button": [create_input_button_slot$1],
|
|
@@ -27314,19 +27426,22 @@ function create_fragment$q(ctx) {
|
|
|
27314
27426
|
p(ctx, [dirty]) {
|
|
27315
27427
|
const input_changes = {};
|
|
27316
27428
|
if (dirty & /*forceValidityFailure*/ 1) input_changes.forceValidityFailure = /*forceValidityFailure*/ ctx[0];
|
|
27317
|
-
if (dirty & /*key*/
|
|
27429
|
+
if (dirty & /*key*/ 8) input_changes.key = `${/*key*/ ctx[3]}-confirm`;
|
|
27318
27430
|
|
|
27319
|
-
if (dirty & /*isInvalid*/
|
|
27431
|
+
if (dirty & /*isInvalid*/ 2) input_changes.message = /*isInvalid*/ ctx[1]
|
|
27320
27432
|
? interpolate('passwordConfirmationError', null, 'Passwords do not match')
|
|
27321
27433
|
: undefined;
|
|
27322
27434
|
|
|
27323
|
-
if (dirty & /*
|
|
27324
|
-
if (dirty & /*
|
|
27325
|
-
if (dirty & /*
|
|
27326
|
-
if (dirty & /*showMessage*/ 32) input_changes.showMessage = /*showMessage*/ ctx[5];
|
|
27435
|
+
if (dirty & /*isInvalid*/ 2) input_changes.isInvalid = /*isInvalid*/ ctx[1];
|
|
27436
|
+
if (dirty & /*isRequired*/ 4) input_changes.isRequired = /*isRequired*/ ctx[2];
|
|
27437
|
+
if (dirty & /*showMessage*/ 16) input_changes.showMessage = /*showMessage*/ ctx[4];
|
|
27327
27438
|
if (dirty & /*type*/ 128) input_changes.type = /*type*/ ctx[7];
|
|
27328
27439
|
|
|
27329
|
-
if (dirty &
|
|
27440
|
+
if (dirty & /*value*/ 32) input_changes.value = typeof /*value*/ ctx[5] === 'string'
|
|
27441
|
+
? /*value*/ ctx[5]
|
|
27442
|
+
: '';
|
|
27443
|
+
|
|
27444
|
+
if (dirty & /*$$scope, isVisible*/ 32832) {
|
|
27330
27445
|
input_changes.$$scope = { dirty, ctx };
|
|
27331
27446
|
}
|
|
27332
27447
|
|
|
@@ -27350,10 +27465,11 @@ function create_fragment$q(ctx) {
|
|
|
27350
27465
|
function instance$q($$self, $$props, $$invalidate) {
|
|
27351
27466
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
27352
27467
|
let { forceValidityFailure = false } = $$props;
|
|
27353
|
-
let { key } = $$props;
|
|
27354
|
-
let { onChange } = $$props;
|
|
27355
27468
|
let { isInvalid = false } = $$props;
|
|
27356
27469
|
let { isRequired = true } = $$props;
|
|
27470
|
+
let { key } = $$props;
|
|
27471
|
+
let { onChange } = $$props;
|
|
27472
|
+
let { resetValue } = $$props;
|
|
27357
27473
|
let { style = {} } = $$props;
|
|
27358
27474
|
const Input = style.labels === 'stacked' ? Stacked_label : Floating_label;
|
|
27359
27475
|
let { showMessage = undefined } = $$props;
|
|
@@ -27361,6 +27477,13 @@ function instance$q($$self, $$props, $$invalidate) {
|
|
|
27361
27477
|
let type = 'password';
|
|
27362
27478
|
let value;
|
|
27363
27479
|
|
|
27480
|
+
function onChangeWrapper(event) {
|
|
27481
|
+
$$invalidate(5, value = event.target?.value);
|
|
27482
|
+
|
|
27483
|
+
// TODO: revisit this logic to avoid unnecessary ternary
|
|
27484
|
+
onChange(typeof value === 'string' ? value : undefined);
|
|
27485
|
+
}
|
|
27486
|
+
|
|
27364
27487
|
/**
|
|
27365
27488
|
* @function toggleVisibility - toggles the password from masked to plaintext
|
|
27366
27489
|
*/
|
|
@@ -27371,27 +27494,41 @@ function instance$q($$self, $$props, $$invalidate) {
|
|
|
27371
27494
|
|
|
27372
27495
|
$$self.$$set = $$props => {
|
|
27373
27496
|
if ('forceValidityFailure' in $$props) $$invalidate(0, forceValidityFailure = $$props.forceValidityFailure);
|
|
27374
|
-
if ('
|
|
27375
|
-
if ('
|
|
27376
|
-
if ('
|
|
27377
|
-
if ('
|
|
27378
|
-
if ('
|
|
27379
|
-
if ('
|
|
27380
|
-
if ('
|
|
27497
|
+
if ('isInvalid' in $$props) $$invalidate(1, isInvalid = $$props.isInvalid);
|
|
27498
|
+
if ('isRequired' in $$props) $$invalidate(2, isRequired = $$props.isRequired);
|
|
27499
|
+
if ('key' in $$props) $$invalidate(3, key = $$props.key);
|
|
27500
|
+
if ('onChange' in $$props) $$invalidate(11, onChange = $$props.onChange);
|
|
27501
|
+
if ('resetValue' in $$props) $$invalidate(12, resetValue = $$props.resetValue);
|
|
27502
|
+
if ('style' in $$props) $$invalidate(13, style = $$props.style);
|
|
27503
|
+
if ('showMessage' in $$props) $$invalidate(4, showMessage = $$props.showMessage);
|
|
27504
|
+
if ('$$scope' in $$props) $$invalidate(15, $$scope = $$props.$$scope);
|
|
27505
|
+
};
|
|
27506
|
+
|
|
27507
|
+
$$self.$$.update = () => {
|
|
27508
|
+
if ($$self.$$.dirty & /*resetValue, onChange, value*/ 6176) {
|
|
27509
|
+
{
|
|
27510
|
+
if (resetValue) {
|
|
27511
|
+
$$invalidate(5, value = undefined);
|
|
27512
|
+
onChange(value);
|
|
27513
|
+
}
|
|
27514
|
+
}
|
|
27515
|
+
}
|
|
27381
27516
|
};
|
|
27382
27517
|
|
|
27383
27518
|
return [
|
|
27384
27519
|
forceValidityFailure,
|
|
27385
|
-
key,
|
|
27386
|
-
onChange,
|
|
27387
27520
|
isInvalid,
|
|
27388
27521
|
isRequired,
|
|
27522
|
+
key,
|
|
27389
27523
|
showMessage,
|
|
27524
|
+
value,
|
|
27390
27525
|
isVisible,
|
|
27391
27526
|
type,
|
|
27392
27527
|
Input,
|
|
27393
|
-
|
|
27528
|
+
onChangeWrapper,
|
|
27394
27529
|
toggleVisibility,
|
|
27530
|
+
onChange,
|
|
27531
|
+
resetValue,
|
|
27395
27532
|
style,
|
|
27396
27533
|
slots,
|
|
27397
27534
|
$$scope
|
|
@@ -27404,12 +27541,13 @@ class Confirm_input extends SvelteComponent {
|
|
|
27404
27541
|
|
|
27405
27542
|
init(this, options, instance$q, create_fragment$q, safe_not_equal, {
|
|
27406
27543
|
forceValidityFailure: 0,
|
|
27407
|
-
|
|
27408
|
-
|
|
27409
|
-
|
|
27410
|
-
|
|
27411
|
-
|
|
27412
|
-
|
|
27544
|
+
isInvalid: 1,
|
|
27545
|
+
isRequired: 2,
|
|
27546
|
+
key: 3,
|
|
27547
|
+
onChange: 11,
|
|
27548
|
+
resetValue: 12,
|
|
27549
|
+
style: 13,
|
|
27550
|
+
showMessage: 4
|
|
27413
27551
|
});
|
|
27414
27552
|
}
|
|
27415
27553
|
}
|
|
@@ -27418,8 +27556,8 @@ class Confirm_input extends SvelteComponent {
|
|
|
27418
27556
|
|
|
27419
27557
|
function create_default_slot_1$7(ctx) {
|
|
27420
27558
|
let current;
|
|
27421
|
-
const default_slot_template = /*#slots*/ ctx[
|
|
27422
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
|
27559
|
+
const default_slot_template = /*#slots*/ ctx[21].default;
|
|
27560
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[22], null);
|
|
27423
27561
|
|
|
27424
27562
|
return {
|
|
27425
27563
|
c() {
|
|
@@ -27434,15 +27572,15 @@ function create_default_slot_1$7(ctx) {
|
|
|
27434
27572
|
},
|
|
27435
27573
|
p(ctx, dirty) {
|
|
27436
27574
|
if (default_slot) {
|
|
27437
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
27575
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 4194304)) {
|
|
27438
27576
|
update_slot_base(
|
|
27439
27577
|
default_slot,
|
|
27440
27578
|
default_slot_template,
|
|
27441
27579
|
ctx,
|
|
27442
|
-
/*$$scope*/ ctx[
|
|
27580
|
+
/*$$scope*/ ctx[22],
|
|
27443
27581
|
!current
|
|
27444
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
|
27445
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
|
27582
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[22])
|
|
27583
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[22], dirty, null),
|
|
27446
27584
|
null
|
|
27447
27585
|
);
|
|
27448
27586
|
}
|
|
@@ -27463,7 +27601,7 @@ function create_default_slot_1$7(ctx) {
|
|
|
27463
27601
|
};
|
|
27464
27602
|
}
|
|
27465
27603
|
|
|
27466
|
-
// (
|
|
27604
|
+
// (94:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
|
|
27467
27605
|
function create_default_slot$e(ctx) {
|
|
27468
27606
|
let t;
|
|
27469
27607
|
let current;
|
|
@@ -27493,7 +27631,7 @@ function create_default_slot$e(ctx) {
|
|
|
27493
27631
|
};
|
|
27494
27632
|
}
|
|
27495
27633
|
|
|
27496
|
-
// (
|
|
27634
|
+
// (88:2)
|
|
27497
27635
|
function create_input_button_slot(ctx) {
|
|
27498
27636
|
let button;
|
|
27499
27637
|
let eyeicon;
|
|
@@ -27524,7 +27662,7 @@ function create_input_button_slot(ctx) {
|
|
|
27524
27662
|
current = true;
|
|
27525
27663
|
|
|
27526
27664
|
if (!mounted) {
|
|
27527
|
-
dispose = listen(button, "click", /*toggleVisibility*/ ctx[
|
|
27665
|
+
dispose = listen(button, "click", /*toggleVisibility*/ ctx[17]);
|
|
27528
27666
|
mounted = true;
|
|
27529
27667
|
}
|
|
27530
27668
|
},
|
|
@@ -27532,7 +27670,7 @@ function create_input_button_slot(ctx) {
|
|
|
27532
27670
|
const eyeicon_changes = {};
|
|
27533
27671
|
if (dirty & /*isVisible*/ 1024) eyeicon_changes.visible = /*isVisible*/ ctx[10];
|
|
27534
27672
|
|
|
27535
|
-
if (dirty & /*$$scope*/
|
|
27673
|
+
if (dirty & /*$$scope*/ 4194304) {
|
|
27536
27674
|
eyeicon_changes.$$scope = { dirty, ctx };
|
|
27537
27675
|
}
|
|
27538
27676
|
|
|
@@ -27556,7 +27694,7 @@ function create_input_button_slot(ctx) {
|
|
|
27556
27694
|
};
|
|
27557
27695
|
}
|
|
27558
27696
|
|
|
27559
|
-
// (
|
|
27697
|
+
// (101:0) {#if callbackMetadata?.platform?.confirmPassword}
|
|
27560
27698
|
function create_if_block$a(ctx) {
|
|
27561
27699
|
let confirminput;
|
|
27562
27700
|
let current;
|
|
@@ -27566,7 +27704,8 @@ function create_if_block$a(ctx) {
|
|
|
27566
27704
|
forceValidityFailure: /*doPasswordsMatch*/ ctx[9] === false,
|
|
27567
27705
|
isInvalid: /*doPasswordsMatch*/ ctx[9] === false,
|
|
27568
27706
|
key: /*key*/ ctx[0],
|
|
27569
|
-
onChange: /*confirmInput*/ ctx[
|
|
27707
|
+
onChange: /*confirmInput*/ ctx[15],
|
|
27708
|
+
resetValue: /*resetValue*/ ctx[11],
|
|
27570
27709
|
showMessage: /*doPasswordsMatch*/ ctx[9] === false,
|
|
27571
27710
|
style: /*style*/ ctx[4]
|
|
27572
27711
|
}
|
|
@@ -27585,6 +27724,7 @@ function create_if_block$a(ctx) {
|
|
|
27585
27724
|
if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.forceValidityFailure = /*doPasswordsMatch*/ ctx[9] === false;
|
|
27586
27725
|
if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.isInvalid = /*doPasswordsMatch*/ ctx[9] === false;
|
|
27587
27726
|
if (dirty & /*key*/ 1) confirminput_changes.key = /*key*/ ctx[0];
|
|
27727
|
+
if (dirty & /*resetValue*/ 2048) confirminput_changes.resetValue = /*resetValue*/ ctx[11];
|
|
27588
27728
|
if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.showMessage = /*doPasswordsMatch*/ ctx[9] === false;
|
|
27589
27729
|
if (dirty & /*style*/ 16) confirminput_changes.style = /*style*/ ctx[4];
|
|
27590
27730
|
confirminput.$set(confirminput_changes);
|
|
@@ -27610,20 +27750,20 @@ function create_fragment$p(ctx) {
|
|
|
27610
27750
|
let if_block_anchor;
|
|
27611
27751
|
let current;
|
|
27612
27752
|
|
|
27613
|
-
input = new /*Input*/ ctx[
|
|
27753
|
+
input = new /*Input*/ ctx[14]({
|
|
27614
27754
|
props: {
|
|
27615
27755
|
isFirstInvalidInput: /*callbackMetadata*/ ctx[1]?.derived.isFirstInvalidInput || false,
|
|
27616
27756
|
hasRightIcon: true,
|
|
27617
27757
|
key: /*key*/ ctx[0],
|
|
27618
|
-
label: interpolate(textToKey(/*callbackType*/ ctx[8]), null, /*textInputLabel*/ ctx[
|
|
27758
|
+
label: interpolate(textToKey(/*callbackType*/ ctx[8]), null, /*textInputLabel*/ ctx[12]),
|
|
27619
27759
|
message: /*validationFailure*/ ctx[6] || (/*isRequired*/ ctx[3]
|
|
27620
27760
|
? interpolate('inputRequiredError')
|
|
27621
27761
|
: undefined),
|
|
27622
|
-
onChange: /*setValue*/ ctx[
|
|
27762
|
+
onChange: /*setValue*/ ctx[16],
|
|
27623
27763
|
isInvalid: /*isInvalid*/ ctx[2],
|
|
27624
27764
|
isRequired: /*isRequired*/ ctx[3],
|
|
27625
27765
|
showMessage: /*showMessage*/ ctx[5],
|
|
27626
|
-
type: /*type*/ ctx[
|
|
27766
|
+
type: /*type*/ ctx[13],
|
|
27627
27767
|
value: typeof /*value*/ ctx[7] === 'string'
|
|
27628
27768
|
? /*value*/ ctx[7]
|
|
27629
27769
|
: '',
|
|
@@ -27655,7 +27795,7 @@ function create_fragment$p(ctx) {
|
|
|
27655
27795
|
const input_changes = {};
|
|
27656
27796
|
if (dirty & /*callbackMetadata*/ 2) input_changes.isFirstInvalidInput = /*callbackMetadata*/ ctx[1]?.derived.isFirstInvalidInput || false;
|
|
27657
27797
|
if (dirty & /*key*/ 1) input_changes.key = /*key*/ ctx[0];
|
|
27658
|
-
if (dirty & /*callbackType, textInputLabel*/
|
|
27798
|
+
if (dirty & /*callbackType, textInputLabel*/ 4352) input_changes.label = interpolate(textToKey(/*callbackType*/ ctx[8]), null, /*textInputLabel*/ ctx[12]);
|
|
27659
27799
|
|
|
27660
27800
|
if (dirty & /*validationFailure, isRequired*/ 72) input_changes.message = /*validationFailure*/ ctx[6] || (/*isRequired*/ ctx[3]
|
|
27661
27801
|
? interpolate('inputRequiredError')
|
|
@@ -27664,13 +27804,13 @@ function create_fragment$p(ctx) {
|
|
|
27664
27804
|
if (dirty & /*isInvalid*/ 4) input_changes.isInvalid = /*isInvalid*/ ctx[2];
|
|
27665
27805
|
if (dirty & /*isRequired*/ 8) input_changes.isRequired = /*isRequired*/ ctx[3];
|
|
27666
27806
|
if (dirty & /*showMessage*/ 32) input_changes.showMessage = /*showMessage*/ ctx[5];
|
|
27667
|
-
if (dirty & /*type*/
|
|
27807
|
+
if (dirty & /*type*/ 8192) input_changes.type = /*type*/ ctx[13];
|
|
27668
27808
|
|
|
27669
27809
|
if (dirty & /*value*/ 128) input_changes.value = typeof /*value*/ ctx[7] === 'string'
|
|
27670
27810
|
? /*value*/ ctx[7]
|
|
27671
27811
|
: '';
|
|
27672
27812
|
|
|
27673
|
-
if (dirty & /*$$scope, isVisible*/
|
|
27813
|
+
if (dirty & /*$$scope, isVisible*/ 4195328) {
|
|
27674
27814
|
input_changes.$$scope = { dirty, ctx };
|
|
27675
27815
|
}
|
|
27676
27816
|
|
|
@@ -27734,6 +27874,8 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
|
27734
27874
|
let callbackType;
|
|
27735
27875
|
let doPasswordsMatch;
|
|
27736
27876
|
let isVisible = false;
|
|
27877
|
+
let resetValue = false;
|
|
27878
|
+
let savedValue = '';
|
|
27737
27879
|
let textInputLabel;
|
|
27738
27880
|
let type = 'password';
|
|
27739
27881
|
let value;
|
|
@@ -27742,8 +27884,8 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
|
27742
27884
|
* @function confirmInput - ensures the second password input matches the first
|
|
27743
27885
|
* @param event
|
|
27744
27886
|
*/
|
|
27745
|
-
function confirmInput(
|
|
27746
|
-
$$invalidate(
|
|
27887
|
+
function confirmInput(val) {
|
|
27888
|
+
$$invalidate(19, confirmValue = val);
|
|
27747
27889
|
}
|
|
27748
27890
|
|
|
27749
27891
|
/**
|
|
@@ -27761,6 +27903,8 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
|
27761
27903
|
* for writing values to the callbacks received from AM
|
|
27762
27904
|
*********************************************************************** */
|
|
27763
27905
|
callback.setInputValue(value);
|
|
27906
|
+
|
|
27907
|
+
$$invalidate(20, savedValue = String(value));
|
|
27764
27908
|
}
|
|
27765
27909
|
|
|
27766
27910
|
/**
|
|
@@ -27768,11 +27912,11 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
|
27768
27912
|
*/
|
|
27769
27913
|
function toggleVisibility() {
|
|
27770
27914
|
$$invalidate(10, isVisible = !isVisible);
|
|
27771
|
-
$$invalidate(
|
|
27915
|
+
$$invalidate(13, type = isVisible ? 'text' : 'password');
|
|
27772
27916
|
}
|
|
27773
27917
|
|
|
27774
27918
|
$$self.$$set = $$props => {
|
|
27775
|
-
if ('callback' in $$props) $$invalidate(
|
|
27919
|
+
if ('callback' in $$props) $$invalidate(18, callback = $$props.callback);
|
|
27776
27920
|
if ('callbackMetadata' in $$props) $$invalidate(1, callbackMetadata = $$props.callbackMetadata);
|
|
27777
27921
|
if ('key' in $$props) $$invalidate(0, key = $$props.key);
|
|
27778
27922
|
if ('isInvalid' in $$props) $$invalidate(2, isInvalid = $$props.isInvalid);
|
|
@@ -27780,18 +27924,28 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
|
27780
27924
|
if ('style' in $$props) $$invalidate(4, style = $$props.style);
|
|
27781
27925
|
if ('showMessage' in $$props) $$invalidate(5, showMessage = $$props.showMessage);
|
|
27782
27926
|
if ('validationFailure' in $$props) $$invalidate(6, validationFailure = $$props.validationFailure);
|
|
27783
|
-
if ('$$scope' in $$props) $$invalidate(
|
|
27927
|
+
if ('$$scope' in $$props) $$invalidate(22, $$scope = $$props.$$scope);
|
|
27784
27928
|
};
|
|
27785
27929
|
|
|
27786
27930
|
$$self.$$.update = () => {
|
|
27787
|
-
if ($$self.$$.dirty & /*callback, callbackMetadata,
|
|
27931
|
+
if ($$self.$$.dirty & /*callback, callbackMetadata, savedValue, value, confirmValue*/ 1835138) {
|
|
27788
27932
|
{
|
|
27789
27933
|
$$invalidate(8, callbackType = callback.getType());
|
|
27790
27934
|
$$invalidate(0, key = callback?.payload?.input?.[0].name || `password-${callbackMetadata?.idx}`);
|
|
27791
|
-
$$invalidate(
|
|
27935
|
+
$$invalidate(12, textInputLabel = callback.getPrompt());
|
|
27792
27936
|
$$invalidate(7, value = callback?.getInputValue());
|
|
27793
27937
|
|
|
27794
|
-
|
|
27938
|
+
/**
|
|
27939
|
+
* `savedValue` represents what the user set after blur (local component state)
|
|
27940
|
+
* `value` represents what's in the callback (empties from AM response)
|
|
27941
|
+
*
|
|
27942
|
+
* This unique combination is what produces the most reliable reset flag
|
|
27943
|
+
*/
|
|
27944
|
+
$$invalidate(11, resetValue = !!savedValue && value === '');
|
|
27945
|
+
|
|
27946
|
+
/**
|
|
27947
|
+
* Only assign a boolean if the confirm input has an actual value.
|
|
27948
|
+
*/
|
|
27795
27949
|
$$invalidate(9, doPasswordsMatch = confirmValue !== undefined
|
|
27796
27950
|
? confirmValue === value
|
|
27797
27951
|
: undefined);
|
|
@@ -27811,6 +27965,7 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
|
27811
27965
|
callbackType,
|
|
27812
27966
|
doPasswordsMatch,
|
|
27813
27967
|
isVisible,
|
|
27968
|
+
resetValue,
|
|
27814
27969
|
textInputLabel,
|
|
27815
27970
|
type,
|
|
27816
27971
|
Input,
|
|
@@ -27819,6 +27974,7 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
|
27819
27974
|
toggleVisibility,
|
|
27820
27975
|
callback,
|
|
27821
27976
|
confirmValue,
|
|
27977
|
+
savedValue,
|
|
27822
27978
|
slots,
|
|
27823
27979
|
$$scope
|
|
27824
27980
|
];
|
|
@@ -27829,7 +27985,7 @@ class Base extends SvelteComponent {
|
|
|
27829
27985
|
super();
|
|
27830
27986
|
|
|
27831
27987
|
init(this, options, instance$p, create_fragment$p, safe_not_equal, {
|
|
27832
|
-
callback:
|
|
27988
|
+
callback: 18,
|
|
27833
27989
|
callbackMetadata: 1,
|
|
27834
27990
|
key: 0,
|
|
27835
27991
|
isInvalid: 2,
|