@forgerock/login-widget 1.0.0-beta.11 → 1.0.0-beta.13

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/index.cjs CHANGED
@@ -706,6 +706,10 @@ function closeComponent(args, shouldCloseDialog) {
706
706
  };
707
707
  });
708
708
  }
709
+ /**
710
+ * @function componentApi - this is a widget external API
711
+ * @returns {object} - the public component API
712
+ */
709
713
  const componentApi = () => {
710
714
  const { update } = componentStore;
711
715
  // Create derived store to minimize what's exposed to the dev
@@ -719,9 +723,19 @@ const componentApi = () => {
719
723
  });
720
724
  });
721
725
  return {
726
+ /**
727
+ * Close a modal
728
+ * @param {object} args - object containing the reason for closing component
729
+ * @returns {void}
730
+ */
722
731
  close: (args) => {
723
732
  closeComponent(args, true);
724
733
  },
734
+ /**
735
+ * Open a modal
736
+ * @param: void
737
+ * @returns: void
738
+ */
725
739
  open: () => {
726
740
  update((state) => {
727
741
  if (state.type === 'inline') {
@@ -743,6 +757,10 @@ const componentApi = () => {
743
757
  };
744
758
  });
745
759
  },
760
+ /**
761
+ * Subscribe to modal events
762
+ * returns the latest value from the event
763
+ */
746
764
  subscribe,
747
765
  };
748
766
  };
@@ -10877,6 +10895,11 @@ var HttpClient = /** @class */ (function (_super) {
10877
10895
  }(event_1.default));
10878
10896
  var _default$2 = httpClient.default = HttpClient;
10879
10897
 
10898
+ /**
10899
+ * @function logErrorAndThrow - Logs an error message and throws an error.
10900
+ * @param {string} type - The type of error. This will be used to determine what error message to log.
10901
+ * @throws {Error} - An error with a message that depends on the value of `type`.
10902
+ */
10880
10903
  function logErrorAndThrow(type) {
10881
10904
  if (type === 'missingStores') {
10882
10905
  const errorMessage = 'Error: missing configuration.';
@@ -14925,6 +14948,11 @@ const configSchema = z
14925
14948
  })
14926
14949
  .strict();
14927
14950
  configSchema.partial();
14951
+ /**
14952
+ * @function - Sets the configuration for the SDK
14953
+ * @param {object} config - The configuration object
14954
+ * @returns {void}
14955
+ */
14928
14956
  function configure (config) {
14929
14957
  configSchema.parse(config);
14930
14958
  Config.set(config);
@@ -14972,6 +15000,12 @@ const fallbackJourneyConfig = Object.keys(defaultJourneys).map((key) => ({
14972
15000
  key,
14973
15001
  }));
14974
15002
  const configuredJourneysStore = writable(fallbackJourneyConfig);
15003
+ /**
15004
+ * @function initialize - Initialize the configured journeys store
15005
+ * @param {object} customJourneys - An object of custom journeys to merge with the default
15006
+ * @returns {object} - The configured journeys store
15007
+ * @example initialize({ login: { journey: 'Login', match: ['?journey=Login'] } })
15008
+ */
14975
15009
  function initialize$6(customJourneys) {
14976
15010
  if (customJourneys) {
14977
15011
  // Provide developer feedback if customized
@@ -16730,6 +16764,8 @@ var backToDefault = "Back to Sign In";
16730
16764
  var backToLogin = "Back to Sign In";
16731
16765
  var dontHaveAnAccount = "No account? <a href='?journey=Registration'>Register here!</a>";
16732
16766
  var closeModal = "Close";
16767
+ var charactersCannotRepeatMoreThan = "Character cannot repeat more than {max} times";
16768
+ var charactersCannotRepeatMoreThanCaseInsensitive = "Character cannot repeat more than {max} times (case insensitive)";
16733
16769
  var chooseDifferentUsername = "Please choose a different username.";
16734
16770
  var confirmPassword = "Confirm password";
16735
16771
  var constraintViolationForPassword = "Password does not meet the requirements.";
@@ -16762,6 +16798,9 @@ var nextButton = "Next";
16762
16798
  var notToExceedMaximumCharacterLength = "No more than {max} characters";
16763
16799
  var noLessThanMinimumCharacterLength = "At least {min} character(s)";
16764
16800
  var passwordCallback = "Password";
16801
+ var passwordCannotContainCommonPasswords = "Password cannot contain common passwords";
16802
+ var passwordCannotContainCommonPasswordsOrBeReversible = "Password cannot contain common passwords or reversible text";
16803
+ var passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan = "Password cannot contain common passwords or reversible text less than {min} characters";
16765
16804
  var passwordRequirements = "Password requirements:";
16766
16805
  var pleaseCheckValue = "Please check this value";
16767
16806
  var pleaseConfirm = "Please confirm";
@@ -16776,6 +16815,10 @@ var requiredField = "Value is required";
16776
16815
  var securityAnswer = "Security answer";
16777
16816
  var securityQuestions = "Security question(s)";
16778
16817
  var securityQuestionsPrompt = "Provide security question(s) and answer(s):";
16818
+ var shouldContainANumber = "Should contain a number";
16819
+ var shouldContainAnUppercase = "Should contain an uppercase letter";
16820
+ var shouldContainALowercase = "Should contain a lowercase letter";
16821
+ var shouldContainASymbol = "Should contain a symbol";
16779
16822
  var showPassword = "Show password";
16780
16823
  var sn = "Last name";
16781
16824
  var submitButton = "Submit";
@@ -16799,6 +16842,8 @@ var fallback = {
16799
16842
  backToLogin: backToLogin,
16800
16843
  dontHaveAnAccount: dontHaveAnAccount,
16801
16844
  closeModal: closeModal,
16845
+ charactersCannotRepeatMoreThan: charactersCannotRepeatMoreThan,
16846
+ charactersCannotRepeatMoreThanCaseInsensitive: charactersCannotRepeatMoreThanCaseInsensitive,
16802
16847
  chooseDifferentUsername: chooseDifferentUsername,
16803
16848
  confirmPassword: confirmPassword,
16804
16849
  constraintViolationForPassword: constraintViolationForPassword,
@@ -16831,6 +16876,9 @@ var fallback = {
16831
16876
  notToExceedMaximumCharacterLength: notToExceedMaximumCharacterLength,
16832
16877
  noLessThanMinimumCharacterLength: noLessThanMinimumCharacterLength,
16833
16878
  passwordCallback: passwordCallback,
16879
+ passwordCannotContainCommonPasswords: passwordCannotContainCommonPasswords,
16880
+ passwordCannotContainCommonPasswordsOrBeReversible: passwordCannotContainCommonPasswordsOrBeReversible,
16881
+ passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan: passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan,
16834
16882
  passwordRequirements: passwordRequirements,
16835
16883
  pleaseCheckValue: pleaseCheckValue,
16836
16884
  pleaseConfirm: pleaseConfirm,
@@ -16845,6 +16893,10 @@ var fallback = {
16845
16893
  securityAnswer: securityAnswer,
16846
16894
  securityQuestions: securityQuestions,
16847
16895
  securityQuestionsPrompt: securityQuestionsPrompt,
16896
+ shouldContainANumber: shouldContainANumber,
16897
+ shouldContainAnUppercase: shouldContainAnUppercase,
16898
+ shouldContainALowercase: shouldContainALowercase,
16899
+ shouldContainASymbol: shouldContainASymbol,
16848
16900
  showPassword: showPassword,
16849
16901
  sn: sn,
16850
16902
  submitButton: submitButton,
@@ -16871,6 +16923,8 @@ const stringsSchema = z
16871
16923
  backToLogin: z.string(),
16872
16924
  dontHaveAnAccount: z.string(),
16873
16925
  closeModal: z.string(),
16926
+ charactersCannotRepeatMoreThan: z.string(),
16927
+ charactersCannotRepeatMoreThanCaseInsensitive: z.string(),
16874
16928
  chooseDifferentUsername: z.string(),
16875
16929
  confirmPassword: z.string(),
16876
16930
  constraintViolationForPassword: z.string(),
@@ -16903,6 +16957,9 @@ const stringsSchema = z
16903
16957
  notToExceedMaximumCharacterLength: z.string(),
16904
16958
  noLessThanMinimumCharacterLength: z.string(),
16905
16959
  passwordCallback: z.string(),
16960
+ passwordCannotContainCommonPasswords: z.string(),
16961
+ passwordCannotContainCommonPasswordsOrBeReversible: z.string(),
16962
+ passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan: z.string(),
16906
16963
  passwordRequirements: z.string(),
16907
16964
  pleaseCheckValue: z.string(),
16908
16965
  pleaseConfirm: z.string(),
@@ -16917,6 +16974,10 @@ const stringsSchema = z
16917
16974
  securityAnswer: z.string(),
16918
16975
  securityQuestions: z.string(),
16919
16976
  securityQuestionsPrompt: z.string(),
16977
+ shouldContainANumber: z.string(),
16978
+ shouldContainAnUppercase: z.string(),
16979
+ shouldContainALowercase: z.string(),
16980
+ shouldContainASymbol: z.string(),
16920
16981
  showPassword: z.string(),
16921
16982
  sn: z.string(),
16922
16983
  submitButton: z.string(),
@@ -16940,6 +17001,11 @@ stringsSchema.partial();
16940
17001
  // Ensure fallback follows schema
16941
17002
  stringsSchema.parse(fallback);
16942
17003
  const stringsStore = writable(null);
17004
+ /**
17005
+ * initialize locale information for Login Widget
17006
+ * @param: userLocale - optional locale object to override default locale
17007
+ * @returns: a schema which represents the user locale schema
17008
+ */
16943
17009
  function initialize$5(userLocale) {
16944
17010
  if (userLocale) {
16945
17011
  /**
@@ -16959,6 +17025,14 @@ function initialize$5(userLocale) {
16959
17025
  * Demo: https://regex101.com/r/Mw9vTB/1
16960
17026
  */
16961
17027
  const valueSchema = z.record(z.string().regex(/^[^<>]*$/)).optional();
17028
+ /**
17029
+ * @function interpolate - Get a translation string
17030
+ * Interpolate a string that contains variables
17031
+ *
17032
+ * @param {string} key - The key to lookup in the translation strings
17033
+ * @param {object} values - An object of values to interpolate into the string
17034
+ * @param {string} externalText - A string to use if no translation is found
17035
+ */
16962
17036
  function interpolate(key, values, externalText) {
16963
17037
  // Let's throw some errors if we're trying to use keys/locales that don't exist.
16964
17038
  // We could improve this by using Typescript and/or fallback values.
@@ -17030,6 +17104,31 @@ function interpolate(key, values, externalText) {
17030
17104
  });
17031
17105
  return messageClean;
17032
17106
  }
17107
+ /**
17108
+ * @function textToKey - Takes a human readable string and returns a key from it.
17109
+ * This key is used to look up the string in the translation files.
17110
+ *
17111
+ * If the item is a number, it will be converted to a string and then
17112
+ * processed as if it were a string.
17113
+ *
17114
+ * If the item is a string that contains word characters (`\w`) mixed with
17115
+ * non-word characters (`\W`), the non-word characters will be removed and
17116
+ * the resulting string will be converted to camelCase.
17117
+ *
17118
+ * @param {string} text - The text that will be converted to a key.
17119
+ * @returns {string} A key that is unique to the given text.
17120
+ *
17121
+ * Examples:
17122
+ * textToKey('hello world') => 'helloWorld'
17123
+ * textToKey('HELLO WORLD') => 'helloWorld'
17124
+ * textToKey('HELLO WORLD!!!') => 'helloWorld'
17125
+ * textToKey('HELLO WORLD!!!') => 'helloWorld'
17126
+ * textToKey('helloWorld') => 'helloWorld'
17127
+ * textToKey('helloWorld123') => 'helloWorld123'
17128
+ * textToKey('hello_world') => 'helloWorld'
17129
+ * textToKey('hello-world') => 'helloWorld'
17130
+ * textToKey('hello.world') => 'helloWorld'
17131
+ */
17033
17132
  function textToKey(text) {
17034
17133
  if (typeof text !== 'string' && typeof text !== 'number') {
17035
17134
  throw new Error('Parameter for textToKey function needs to be of type string or number');
@@ -17171,7 +17270,9 @@ const userInputCallbacks = [
17171
17270
  CallbackType$1.ValidatedCreatePasswordCallback,
17172
17271
  CallbackType$1.ValidatedCreateUsernameCallback,
17173
17272
  ];
17174
- // This eventually will be overridable by user of framework
17273
+ /**
17274
+ * @function forceUserInputOptionalityCallbacks - Determines if a callback should be forced to be optional
17275
+ */
17175
17276
  const forceUserInputOptionalityCallbacks = {
17176
17277
  SelectIdPCallback: (callback) => {
17177
17278
  const selectIdpCb = callback;
@@ -17180,6 +17281,11 @@ const forceUserInputOptionalityCallbacks = {
17180
17281
  .find((provider) => provider.provider === 'localAuthentication');
17181
17282
  },
17182
17283
  };
17284
+ /**
17285
+ * @function isCbReadyByDefault - Determines if a callback is ready to be submitted by default
17286
+ * @param {object} callback - Generic FRCallback from JavaScript SDK
17287
+ * @returns {boolean}
17288
+ */
17183
17289
  function isCbReadyByDefault(callback) {
17184
17290
  if (callback.getType() === CallbackType$1.ConfirmationCallback) {
17185
17291
  const cb = callback;
@@ -17189,6 +17295,11 @@ function isCbReadyByDefault(callback) {
17189
17295
  }
17190
17296
  return false;
17191
17297
  }
17298
+ /**
17299
+ * @function canForceUserInputOptionality
17300
+ * @param {object} callback - generic FRCallback from JavaScript SDK
17301
+ * @returns
17302
+ */
17192
17303
  function canForceUserInputOptionality(callback) {
17193
17304
  // See if a callback function exists within this collection
17194
17305
  const fn = forceUserInputOptionalityCallbacks[callback.getType()];
@@ -17216,9 +17327,9 @@ function isStepSelfSubmittable(callbacks, userInputOptional) {
17216
17327
  return !unsubmittableCallbacks.length;
17217
17328
  }
17218
17329
  /**
17219
- *
17330
+ * @function requiresUserInput - Determines if a callback requires user input
17220
17331
  * @param {object} callback - Generic callback provided by JavaScript SDK
17221
- * @returns
17332
+ * @returns {boolean}
17222
17333
  */
17223
17334
  function requiresUserInput(callback) {
17224
17335
  if (callback.getType() === CallbackType$1.SelectIdPCallback) {
@@ -17234,6 +17345,22 @@ function requiresUserInput(callback) {
17234
17345
  }
17235
17346
  // Notice this function can take a user provided argument function to
17236
17347
  // override behavior (this doesn't have to be well defined)
17348
+ /**
17349
+ * @function isUserInputOptional - Determines if user input is optional
17350
+ * Notice this function can take a user provided argument function to
17351
+ * override behavior (this doesn't have to be well defined)
17352
+ * @param {array} callbackMetadataArray - array of callback metadata
17353
+ * @param {number} numOfUserInputCbs - number of user input requiring callbacks
17354
+ * @param {function} fn - optional function to override default behavior
17355
+ * @returns {boolean} - true if user input is optional
17356
+ * @example isUserInputOptional(callbackMetadataArray, numOfUserInputCbs, (prev, curr) => {
17357
+ * if (curr.derived.canForceUserInputOptionality && numOfUserInputCbs > 0) {
17358
+ * prev = true;
17359
+ * }
17360
+ * return prev;
17361
+ * })
17362
+ * @example isUserInputOptional(callbackMetadataArray, numOfUserInputCbs);
17363
+ */
17237
17364
  function isUserInputOptional(callbackMetadataArray, numOfUserInputCbs, fn) {
17238
17365
  // default reducer function to check if both overriding callback exists
17239
17366
  // along with user input required callbacks
@@ -17250,7 +17377,7 @@ function isUserInputOptional(callbackMetadataArray, numOfUserInputCbs, fn) {
17250
17377
  /**
17251
17378
  * @function buildCallbackMetadata - Constructs an array of callback metadata that matches to original callback array
17252
17379
  * @param {object} step - The modified Widget step object
17253
- * @param checkValidation - function that checks if current callback is the first invalid callback
17380
+ * @param {function} checkValidation - function that checks if current callback is the first invalid callback
17254
17381
  * @returns {array}
17255
17382
  */
17256
17383
  function buildCallbackMetadata(step, checkValidation, stageJson) {
@@ -17698,6 +17825,12 @@ const linksSchema = z
17698
17825
  .strict();
17699
17826
  linksSchema.partial();
17700
17827
  const linksStore = writable();
17828
+ /**
17829
+ * @function initialize - Initialize the links store
17830
+ * @param {object} customLinks - An object of custom links to merge with the default
17831
+ * @returns {object} - The links store
17832
+ * @example initialize({ termsAndConditions: 'https://example.com/terms' });
17833
+ */
17701
17834
  function initialize$3(customLinks) {
17702
17835
  // If customLinks is provided, provide feedback for object
17703
17836
  if (customLinks) {
@@ -17720,7 +17853,19 @@ const oauthStore = writable({
17720
17853
  successful: false,
17721
17854
  response: null,
17722
17855
  });
17856
+ /**
17857
+ * @function initialize - Initializes the OAuth store with a get function and a reset function
17858
+ * @param {object} initOptions - The options to pass to the TokenManager.getTokens function
17859
+ * @returns {object} - The OAuth store
17860
+ * @example initialize({ query: { prompt: 'none' } });
17861
+ */
17723
17862
  function initialize$2(initOptions) {
17863
+ /**
17864
+ * Get tokens from the server
17865
+ * new tokens are available in the subscribe method
17866
+ * @params: getOptions?: GetTokensOptions
17867
+ * @returns: Promise<void>
17868
+ */
17724
17869
  async function get(getOptions) {
17725
17870
  /**
17726
17871
  * Create an options object with getOptions overriding anything from initOptions
@@ -17788,7 +17933,18 @@ const userStore = writable({
17788
17933
  successful: false,
17789
17934
  response: null,
17790
17935
  });
17936
+ /**
17937
+ * @function initialize - Initializes the user store with a get function and a reset function
17938
+ * @param {object} initOptions - The options to pass to the UserManager.getCurrentUser function
17939
+ * @returns {object} - The user store
17940
+ */
17791
17941
  function initialize$1(initOptions) {
17942
+ /**
17943
+ * Get user info from the server
17944
+ * New state is returned in your `userEvents.subscribe` callback function
17945
+ * @params: getOptions?: ConfigOptions
17946
+ * @returns: Promise<void>
17947
+ */
17792
17948
  async function get(getOptions) {
17793
17949
  /**
17794
17950
  * Create an options object with getOptions overriding anything from initOptions
@@ -17880,6 +18036,12 @@ const fallbackStyles = {
17880
18036
  stage: undefined,
17881
18037
  };
17882
18038
  const styleStore = writable(fallbackStyles);
18039
+ /**
18040
+ * @function initialize - Initialize the style store
18041
+ * @param {object} customStyle - An object of custom styles to merge with the default
18042
+ * @returns {object} - The style store
18043
+ * @example initialize({ checksAndRadios: 'standard' });
18044
+ */
17883
18045
  function initialize(customStyle) {
17884
18046
  if (customStyle) {
17885
18047
  styleSchema.parse(customStyle);
@@ -17891,6 +18053,17 @@ function initialize(customStyle) {
17891
18053
  return styleStore;
17892
18054
  }
17893
18055
 
18056
+ /**
18057
+ * @function widgetApiFactory - Creates the widget API
18058
+ * @param {object} componentApi - The component API
18059
+ * @returns {object} - The widget API
18060
+ * @property {object} componentApi - The component API for either inline or modal
18061
+ * @property {object} configuration - Sets the configuration for the widget
18062
+ * @property {function} getStores - Returns the stores: journeyStore, oauthStore, userStore
18063
+ * @property {object} journey - the journey API
18064
+ * @property {function} request - The HttpClient.request function from the SDK
18065
+ * @property {object} user - the user API
18066
+ */
17894
18067
  function widgetApiFactory(componentApi) {
17895
18068
  let journeyStore;
17896
18069
  let oauthStore;
@@ -17939,6 +18112,10 @@ function widgetApiFactory(componentApi) {
17939
18112
  initialize$3(options?.links);
17940
18113
  initialize(options?.style);
17941
18114
  return {
18115
+ /** Set the Login Widget's Configuration
18116
+ * @param {WidgetConfigOptions} options - The configuration options for the Login Widget
18117
+ * @returns {void}
18118
+ **/
17942
18119
  set(setOptions) {
17943
18120
  if (setOptions?.forgerock) {
17944
18121
  configure({
@@ -18060,6 +18237,11 @@ function widgetApiFactory(componentApi) {
18060
18237
  return { change, start, subscribe };
18061
18238
  };
18062
18239
  const user = {
18240
+ /**
18241
+ * User Info
18242
+ * @param: void
18243
+ * @returns: UserStore
18244
+ */
18063
18245
  info() {
18064
18246
  if (!journeyStore || !oauthStore || !userStore) {
18065
18247
  logErrorAndThrow('missingStores');
@@ -18082,6 +18264,12 @@ function widgetApiFactory(componentApi) {
18082
18264
  }
18083
18265
  return { get: wrappedGet, subscribe };
18084
18266
  },
18267
+ /**
18268
+ * Logout a user from an AM Session
18269
+ * @async
18270
+ * @param: void
18271
+ * @returns: Promise<void>
18272
+ **/
18085
18273
  async logout() {
18086
18274
  if (!journeyStore || !oauthStore || !userStore) {
18087
18275
  logErrorAndThrow('missingStores');
@@ -18110,6 +18298,11 @@ function widgetApiFactory(componentApi) {
18110
18298
  // Return undefined as there's no response information to share
18111
18299
  return;
18112
18300
  },
18301
+ /**
18302
+ * Returns the widget's Tokens object
18303
+ * @param void;
18304
+ * @returns OAuthStore
18305
+ */
18113
18306
  tokens() {
18114
18307
  if (!journeyStore || !oauthStore || !userStore) {
18115
18308
  logErrorAndThrow('missingStores');
@@ -20592,6 +20785,11 @@ function matchJourneyAndDecideAction(href, journeys, stack) {
20592
20785
  /** *********************************************
20593
20786
  * NEW "NORMALIZED" METHODS
20594
20787
  */
20788
+ /**
20789
+ * @function getInputTypeFromPolicies - Determines the type of input to use based on the policies object
20790
+ * @param {object} policies - The policies object from the callback
20791
+ * @returns {string} - The type of input to use
20792
+ */
20595
20793
  function getInputTypeFromPolicies(policies) {
20596
20794
  const value = policies?.value;
20597
20795
  if (typeof value !== 'object') {
@@ -20609,13 +20807,47 @@ function getInputTypeFromPolicies(policies) {
20609
20807
  }
20610
20808
  return 'text';
20611
20809
  }
20810
+ /**
20811
+ * @function getValidationFailureParams - Gets the validation failure params from the failed policy object
20812
+ * @param {object} failedPolicy - The failed policy object from the callback
20813
+ * @returns {array} - An array of objects containing the length, message, and rule
20814
+ */
20612
20815
  function getValidationFailureParams(failedPolicy) {
20613
- if (failedPolicy?.policyRequirement === 'CHARACTER_SET') {
20614
- const params = failedPolicy?.params;
20816
+ if (failedPolicy?.policyRequirement === 'DICTIONARY') {
20817
+ const params = failedPolicy.params;
20818
+ const min = params?.['min-substring-length'] || 0;
20819
+ const arr = [];
20820
+ if (params?.['check-substrings'] && params?.['test-reversed-password']) {
20821
+ arr.push({
20822
+ length: min,
20823
+ message: interpolate('passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan', {
20824
+ min: String(min),
20825
+ }),
20826
+ rule: 'reversibleSubstrings',
20827
+ });
20828
+ }
20829
+ else if (params?.['test-reversed-password']) {
20830
+ arr.push({
20831
+ length: null,
20832
+ message: interpolate('passwordCannotContainCommonPasswordsOrBeReversible'),
20833
+ rule: 'reversibleSubstrings',
20834
+ });
20835
+ }
20836
+ else {
20837
+ arr.push({
20838
+ length: null,
20839
+ message: interpolate('passwordCannotContainCommonPasswords'),
20840
+ rule: 'reversibleSubstrings',
20841
+ });
20842
+ }
20843
+ return arr;
20844
+ }
20845
+ else if (failedPolicy?.policyRequirement === 'CHARACTER_SET') {
20846
+ const params = failedPolicy.params;
20615
20847
  return params?.['character-sets'].map(convertCharacterSetToRuleObj);
20616
20848
  }
20617
20849
  else if (failedPolicy?.policyRequirement === 'LENGTH_BASED') {
20618
- const params = failedPolicy?.params;
20850
+ const params = failedPolicy.params;
20619
20851
  const min = params?.['min-password-length'] || 0;
20620
20852
  const max = params?.['max-password-length'] || null;
20621
20853
  const arr = [];
@@ -20635,6 +20867,26 @@ function getValidationFailureParams(failedPolicy) {
20635
20867
  }
20636
20868
  return arr;
20637
20869
  }
20870
+ else if (failedPolicy?.policyRequirement === 'REPEATED_CHARACTERS') {
20871
+ const params = failedPolicy.params;
20872
+ const max = params['max-consecutive-length'] || 0;
20873
+ const arr = [];
20874
+ if (!params['case-sensitive-validation']) {
20875
+ arr.push({
20876
+ length: max,
20877
+ message: interpolate('charactersCannotRepeatMoreThanCaseInsensitive', { max: String(max) }),
20878
+ rule: 'repeatedCharactersCaseInsensitive',
20879
+ });
20880
+ }
20881
+ else {
20882
+ arr.push({
20883
+ length: max,
20884
+ message: interpolate('charactersCannotRepeatMoreThan', { max: String(max) }),
20885
+ rule: 'repeatedCharacters',
20886
+ });
20887
+ }
20888
+ return arr;
20889
+ }
20638
20890
  else if (failedPolicy?.policyRequirement === 'VALID_USERNAME') {
20639
20891
  return [
20640
20892
  {
@@ -20663,6 +20915,11 @@ function getValidationFailureParams(failedPolicy) {
20663
20915
  ];
20664
20916
  }
20665
20917
  }
20918
+ /**
20919
+ * @function getValidationMessageString - Gets the validation message string from the policy object
20920
+ * @param {object} policy - The policy object from the callback
20921
+ * @returns {string} - The validation message string
20922
+ */
20666
20923
  function getValidationMessageString(policy) {
20667
20924
  switch (policy?.policyId) {
20668
20925
  case 'at-least-X-capitals': {
@@ -20746,6 +21003,12 @@ function getValidationMessageString(policy) {
20746
21003
  return '';
20747
21004
  }
20748
21005
  }
21006
+ /**
21007
+ * @function getValidationFailures - Gets the validation failures from the callback object
21008
+ * @param {object} callback - The callback object from the server
21009
+ * @param {string} label - The label of the field
21010
+ * @returns {array} - An array of failed policies
21011
+ */
20749
21012
  function getValidationFailures(callback, label) {
20750
21013
  const failedPolicies = callback.getFailedPolicies && callback.getFailedPolicies();
20751
21014
  const parsedPolicies = parseFailedPolicies(failedPolicies, label);
@@ -20757,6 +21020,11 @@ function getValidationFailures(callback, label) {
20757
21020
  };
20758
21021
  });
20759
21022
  }
21023
+ /**
21024
+ * @function getValidationPolicies - Gets the validation policies from the callback object
21025
+ * @param {object} policies - The policies object from the callback
21026
+ * @returns {array} - An array of policies
21027
+ */
20760
21028
  function getValidationPolicies(policies) {
20761
21029
  if (typeof policies !== 'object' && !policies) {
20762
21030
  return [];
@@ -20775,6 +21043,11 @@ function getValidationPolicies(policies) {
20775
21043
  })
20776
21044
  .filter((policy) => !!policy.message);
20777
21045
  }
21046
+ /**
21047
+ * @function isInputRequired - Checks if the input is required
21048
+ * @param {object} callback - The callback object from the server
21049
+ * @returns {boolean} - Whether the input is required
21050
+ */
20778
21051
  function isInputRequired(callback) {
20779
21052
  const policies = callback.getPolicies && callback.getPolicies();
20780
21053
  let isRequired = false;
@@ -20786,46 +21059,93 @@ function isInputRequired(callback) {
20786
21059
  }
20787
21060
  return isRequired;
20788
21061
  }
21062
+ /**
21063
+ * @function convertCharacterSetToRuleObj - Converts a character set to a rule object
21064
+ * @param {string} set - The character set to convert
21065
+ * @returns {object} - The rule object
21066
+ */
20789
21067
  function convertCharacterSetToRuleObj(set) {
20790
21068
  const arr = set.split(':');
20791
21069
  const num = arr[0];
20792
21070
  const type = arr[1];
20793
21071
  if (type === '0123456789') {
20794
- return {
20795
- length: Number(num),
20796
- message: interpolate('minimumNumberOfNumbers', { num: String(num) }),
20797
- rule: 'numbers',
20798
- };
21072
+ if (num === '0') {
21073
+ return {
21074
+ length: null,
21075
+ message: interpolate('shouldContainANumber'),
21076
+ rule: 'numbers',
21077
+ };
21078
+ }
21079
+ else {
21080
+ return {
21081
+ length: Number(num),
21082
+ message: interpolate('minimumNumberOfNumbers', { num: String(num) }),
21083
+ rule: 'numbers',
21084
+ };
21085
+ }
20799
21086
  }
20800
21087
  else if (type === 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') {
20801
- return {
20802
- length: Number(num),
20803
- message: interpolate('minimumNumberOfUppercase', { num: String(num) }),
20804
- rule: 'uppercase',
20805
- };
21088
+ if (num === '0') {
21089
+ return {
21090
+ length: null,
21091
+ message: interpolate('shouldContainAnUppercase'),
21092
+ rule: 'uppercase',
21093
+ };
21094
+ }
21095
+ else {
21096
+ return {
21097
+ length: Number(num),
21098
+ message: interpolate('minimumNumberOfUppercase', { num: String(num) }),
21099
+ rule: 'uppercase',
21100
+ };
21101
+ }
20806
21102
  }
20807
21103
  else if (type === 'abcdefghijklmnopqrstuvwxyz') {
20808
- return {
20809
- length: Number(num),
20810
- message: interpolate('minimumNumberOfLowercase', { num: String(num) }),
20811
- rule: 'lowercase',
20812
- };
21104
+ if (num === '0') {
21105
+ return {
21106
+ length: null,
21107
+ message: interpolate('shouldContainALowercase'),
21108
+ rule: 'lowercase',
21109
+ };
21110
+ }
21111
+ else {
21112
+ return {
21113
+ length: Number(num),
21114
+ message: interpolate('minimumNumberOfLowercase', { num: String(num) }),
21115
+ rule: 'lowercase',
21116
+ };
21117
+ }
20813
21118
  }
20814
21119
  else if (type.includes('@') || type.includes('!') || type.includes('*') || type.includes('#')) {
20815
- return {
20816
- length: Number(num),
20817
- message: interpolate('minimumNumberOfSymbols', { num: String(num) }),
20818
- rule: 'symbols',
20819
- };
21120
+ if (num === '0') {
21121
+ return {
21122
+ length: null,
21123
+ message: interpolate('shouldContainASymbol'),
21124
+ rule: 'symbols',
21125
+ };
21126
+ }
21127
+ else {
21128
+ return {
21129
+ length: Number(num),
21130
+ message: interpolate('minimumNumberOfSymbols', { num: String(num) }),
21131
+ rule: 'symbols',
21132
+ };
21133
+ }
20820
21134
  }
20821
21135
  else {
20822
21136
  return {
20823
- length: Number(num),
21137
+ length: null,
20824
21138
  message: interpolate('pleaseCheckValue'),
20825
21139
  rule: 'unknown',
20826
21140
  };
20827
21141
  }
20828
21142
  }
21143
+ /**
21144
+ * @function parseFailedPolicies - Parses the failed policies from the callback object
21145
+ * @param {array} policies - The policies array from the callback
21146
+ * @param {string} label - The label of the field
21147
+ * @returns {array} - An array of failed policies
21148
+ */
20829
21149
  function parseFailedPolicies(policies, label) {
20830
21150
  return policies.map((policy) => {
20831
21151
  if (typeof policy === 'string') {
@@ -20841,8 +21161,10 @@ function parseFailedPolicies(policies, label) {
20841
21161
  }
20842
21162
  });
20843
21163
  }
20844
- /** *********************************************
20845
- * OLD METHODS
21164
+ /**
21165
+ * @function getAttributeValidationFailureText - Gets the validation failure text from the callback object
21166
+ * @param {object} callback - The callback object from the server
21167
+ * @returns {string} - The validation failure text
20846
21168
  */
20847
21169
  function getAttributeValidationFailureText(callback) {
20848
21170
  // TODO: Mature this utility for better parsing and display
@@ -21841,13 +22163,6 @@ function instance$I($$self, $$props, $$invalidate) {
21841
22163
  let validationFailure;
21842
22164
 
21843
22165
  function setValue(event) {
21844
- /** ***********************************************************************
21845
- * SDK INTEGRATION POINT
21846
- * Summary: SDK callback methods for setting values
21847
- * ------------------------------------------------------------------------
21848
- * Details: Each callback is wrapped by the SDK to provide helper methods
21849
- * for writing values to the callbacks received from AM
21850
- *********************************************************************** */
21851
22166
  callback.setInputValue(event.target.checked);
21852
22167
  }
21853
22168
 
@@ -23616,7 +23931,7 @@ function create_else_block$6(ctx) {
23616
23931
  };
23617
23932
  }
23618
23933
 
23619
- // (66:0) {#if callbackMetadata?.platform?.displayType === 'radio'}
23934
+ // (52:0) {#if callbackMetadata?.platform?.displayType === 'radio'}
23620
23935
  function create_if_block$f(ctx) {
23621
23936
  let radio;
23622
23937
  let current;
@@ -23771,13 +24086,6 @@ function instance$B($$self, $$props, $$invalidate) {
23771
24086
  * @param {Object} event
23772
24087
  */
23773
24088
  function setValue(event) {
23774
- /** ***********************************************************************
23775
- * SDK INTEGRATION POINT
23776
- * Summary: SDK callback methods for setting values
23777
- * ------------------------------------------------------------------------
23778
- * Details: Each callback is wrapped by the SDK to provide helper methods
23779
- * for writing values to the callbacks received from AM
23780
- *********************************************************************** */
23781
24089
  callback.setChoiceIndex(Number(event.target.value));
23782
24090
  }
23783
24091
 
@@ -23790,13 +24098,6 @@ function instance$B($$self, $$props, $$invalidate) {
23790
24098
  $$self.$$.update = () => {
23791
24099
  if ($$self.$$.dirty & /*callback, callbackMetadata, prompt*/ 2051) {
23792
24100
  {
23793
- /** *************************************************************************
23794
- * SDK INTEGRATION POINT
23795
- * Summary: SDK callback methods for getting values
23796
- * --------------------------------------------------------------------------
23797
- * Details: Each callback is wrapped by the SDK to provide helper methods
23798
- * for accessing values from the callbacks received from AM
23799
- ************************************************************************* */
23800
24101
  $$invalidate(2, choiceOptions = callback.getChoices()?.map((text, idx) => ({
23801
24102
  /**
23802
24103
  * Since locale content keys for the choice component are built off of the
@@ -23961,7 +24262,7 @@ function get_each_context$6(ctx, list, i) {
23961
24262
  return child_ctx;
23962
24263
  }
23963
24264
 
23964
- // (95:0) {#if stepMetadata?.platform?.stageName !== 'OneTimePassword'}
24265
+ // (81:0) {#if stepMetadata?.platform?.stageName !== 'OneTimePassword'}
23965
24266
  function create_if_block$e(ctx) {
23966
24267
  let current_block_type_index;
23967
24268
  let if_block;
@@ -24031,7 +24332,7 @@ function create_if_block$e(ctx) {
24031
24332
  };
24032
24333
  }
24033
24334
 
24034
- // (117:2) {:else}
24335
+ // (103:2) {:else}
24035
24336
  function create_else_block_1(ctx) {
24036
24337
  let grid;
24037
24338
  let current;
@@ -24077,7 +24378,7 @@ function create_else_block_1(ctx) {
24077
24378
  };
24078
24379
  }
24079
24380
 
24080
- // (96:2) {#if !stepMetadata?.derived.isStepSelfSubmittable}
24381
+ // (82:2) {#if !stepMetadata?.derived.isStepSelfSubmittable}
24081
24382
  function create_if_block_1$9(ctx) {
24082
24383
  let current_block_type_index;
24083
24384
  let if_block;
@@ -24147,7 +24448,7 @@ function create_if_block_1$9(ctx) {
24147
24448
  };
24148
24449
  }
24149
24450
 
24150
- // (120:8) <Button style={options.length > 1 && defaultChoice === Number(opt.value) ? 'primary' : buttonStyle} type="button" width="auto" onClick={() => setBtnValue(Number(opt.value))} >
24451
+ // (106:8) <Button style={options.length > 1 && defaultChoice === Number(opt.value) ? 'primary' : buttonStyle} type="button" width="auto" onClick={() => setBtnValue(Number(opt.value))} >
24151
24452
  function create_default_slot_2$5(ctx) {
24152
24453
  let t0_value = /*opt*/ ctx[15].text + "";
24153
24454
  let t0;
@@ -24172,7 +24473,7 @@ function create_default_slot_2$5(ctx) {
24172
24473
  };
24173
24474
  }
24174
24475
 
24175
- // (119:6) {#each options as opt}
24476
+ // (105:6) {#each options as opt}
24176
24477
  function create_each_block$6(ctx) {
24177
24478
  let button;
24178
24479
  let current;
@@ -24233,7 +24534,7 @@ function create_each_block$6(ctx) {
24233
24534
  };
24234
24535
  }
24235
24536
 
24236
- // (118:4) <Grid num={options.length}>
24537
+ // (104:4) <Grid num={options.length}>
24237
24538
  function create_default_slot_1$a(ctx) {
24238
24539
  let each_1_anchor;
24239
24540
  let current;
@@ -24317,7 +24618,7 @@ function create_default_slot_1$a(ctx) {
24317
24618
  };
24318
24619
  }
24319
24620
 
24320
- // (106:4) {:else}
24621
+ // (92:4) {:else}
24321
24622
  function create_else_block$5(ctx) {
24322
24623
  let checkbox;
24323
24624
  let current;
@@ -24368,7 +24669,7 @@ function create_else_block$5(ctx) {
24368
24669
  };
24369
24670
  }
24370
24671
 
24371
- // (97:4) {#if options.length > 1}
24672
+ // (83:4) {#if options.length > 1}
24372
24673
  function create_if_block_2$8(ctx) {
24373
24674
  let select;
24374
24675
  let current;
@@ -24415,7 +24716,7 @@ function create_if_block_2$8(ctx) {
24415
24716
  };
24416
24717
  }
24417
24718
 
24418
- // (107:6) <Checkbox isFirstInvalidInput={callbackMetadata?.derived.isFirstInvalidInput || false} isInvalid={false} key={inputName} onChange={setCheckboxValue} value={false} >
24719
+ // (93:6) <Checkbox isFirstInvalidInput={callbackMetadata?.derived.isFirstInvalidInput || false} isInvalid={false} key={inputName} onChange={setCheckboxValue} value={false} >
24419
24720
  function create_default_slot$h(ctx) {
24420
24721
  let t_value = /*options*/ ctx[3][0].text + "";
24421
24722
  let t;
@@ -24527,13 +24828,6 @@ function instance$z($$self, $$props, $$invalidate) {
24527
24828
  * @param {Object} event
24528
24829
  */
24529
24830
  function setOptionValue(event) {
24530
- /** ***********************************************************************
24531
- * SDK INTEGRATION POINT
24532
- * Summary: SDK callback methods for setting values
24533
- * ------------------------------------------------------------------------
24534
- * Details: Each callback is wrapped by the SDK to provide helper methods
24535
- * for writing values to the callbacks received from AM
24536
- *********************************************************************** */
24537
24831
  callback.setOptionIndex(Number(event.target.value));
24538
24832
  }
24539
24833
 
@@ -24542,13 +24836,6 @@ function instance$z($$self, $$props, $$invalidate) {
24542
24836
  * @param {Object} event
24543
24837
  */
24544
24838
  function setCheckboxValue(event) {
24545
- /** ***********************************************************************
24546
- * SDK INTEGRATION POINT
24547
- * Summary: SDK callback methods for setting values
24548
- * ------------------------------------------------------------------------
24549
- * Details: Each callback is wrapped by the SDK to provide helper methods
24550
- * for writing values to the callbacks received from AM
24551
- *********************************************************************** */
24552
24839
  const value = event.target.checked;
24553
24840
 
24554
24841
  if (value) {
@@ -26560,15 +26847,7 @@ function instance$t($$self, $$props, $$invalidate) {
26560
26847
  ? Stacked_label$1
26561
26848
  : Floating_label$1;
26562
26849
 
26563
- /** *************************************************************************
26564
- * SDK INTEGRATION POINT
26565
- * Summary: SDK callback methods for getting values
26566
- * --------------------------------------------------------------------------
26567
- * Details: Each callback is wrapped by the SDK to provide helper methods
26568
- * for accessing values from the callbacks received from AM
26569
- ************************************************************************* */
26570
26850
  let customQuestionIndex = null;
26571
-
26572
26851
  let displayCustomQuestionInput = false;
26573
26852
  let inputArr;
26574
26853
  let inputName;
@@ -26596,13 +26875,6 @@ function instance$t($$self, $$props, $$invalidate) {
26596
26875
  * @param {Object} event
26597
26876
  */
26598
26877
  function setAnswer(event) {
26599
- /** ***********************************************************************
26600
- * SDK INTEGRATION POINT
26601
- * Summary: SDK callback methods for setting values
26602
- * ------------------------------------------------------------------------
26603
- * Details: Each callback is wrapped by the SDK to provide helper methods
26604
- * for writing values to the callbacks received from AM
26605
- *********************************************************************** */
26606
26878
  callback.setAnswer(event.target.value);
26607
26879
  }
26608
26880
 
@@ -26619,14 +26891,6 @@ function instance$t($$self, $$props, $$invalidate) {
26619
26891
  callback.setAnswer('');
26620
26892
  } else {
26621
26893
  $$invalidate(3, displayCustomQuestionInput = false);
26622
-
26623
- /** ***********************************************************************
26624
- * SDK INTEGRATION POINT
26625
- * Summary: SDK callback methods for setting values
26626
- * ------------------------------------------------------------------------
26627
- * Details: Each callback is wrapped by the SDK to provide helper methods
26628
- * for writing values to the callbacks received from AM
26629
- *********************************************************************** */
26630
26894
  callback.setQuestion(selectValue);
26631
26895
  }
26632
26896
  }
@@ -26637,14 +26901,6 @@ function instance$t($$self, $$props, $$invalidate) {
26637
26901
  */
26638
26902
  function setQuestion(event) {
26639
26903
  const inputValue = event.target.value;
26640
-
26641
- /** ***********************************************************************
26642
- * SDK INTEGRATION POINT
26643
- * Summary: SDK callback methods for setting values
26644
- * ------------------------------------------------------------------------
26645
- * Details: Each callback is wrapped by the SDK to provide helper methods
26646
- * for writing values to the callbacks received from AM
26647
- *********************************************************************** */
26648
26904
  callback.setQuestion(inputValue);
26649
26905
  }
26650
26906
 
@@ -27135,8 +27391,8 @@ class Eye_icon extends SvelteComponent {
27135
27391
 
27136
27392
  function create_default_slot_1$8(ctx) {
27137
27393
  let current;
27138
- const default_slot_template = /*#slots*/ ctx[12].default;
27139
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[13], null);
27394
+ const default_slot_template = /*#slots*/ ctx[14].default;
27395
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[15], null);
27140
27396
 
27141
27397
  return {
27142
27398
  c() {
@@ -27151,15 +27407,15 @@ function create_default_slot_1$8(ctx) {
27151
27407
  },
27152
27408
  p(ctx, dirty) {
27153
27409
  if (default_slot) {
27154
- if (default_slot.p && (!current || dirty & /*$$scope*/ 8192)) {
27410
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 32768)) {
27155
27411
  update_slot_base(
27156
27412
  default_slot,
27157
27413
  default_slot_template,
27158
27414
  ctx,
27159
- /*$$scope*/ ctx[13],
27415
+ /*$$scope*/ ctx[15],
27160
27416
  !current
27161
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[13])
27162
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[13], dirty, null),
27417
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[15])
27418
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[15], dirty, null),
27163
27419
  null
27164
27420
  );
27165
27421
  }
@@ -27180,7 +27436,7 @@ function create_default_slot_1$8(ctx) {
27180
27436
  };
27181
27437
  }
27182
27438
 
27183
- // (47:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible} >
27439
+ // (59:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
27184
27440
  function create_default_slot$f(ctx) {
27185
27441
  let t;
27186
27442
  let current;
@@ -27210,7 +27466,7 @@ function create_default_slot$f(ctx) {
27210
27466
  };
27211
27467
  }
27212
27468
 
27213
- // (41:2)
27469
+ // (53:2)
27214
27470
  function create_input_button_slot$1(ctx) {
27215
27471
  let button;
27216
27472
  let eyeicon;
@@ -27249,7 +27505,7 @@ function create_input_button_slot$1(ctx) {
27249
27505
  const eyeicon_changes = {};
27250
27506
  if (dirty & /*isVisible*/ 64) eyeicon_changes.visible = /*isVisible*/ ctx[6];
27251
27507
 
27252
- if (dirty & /*$$scope*/ 8192) {
27508
+ if (dirty & /*$$scope*/ 32768) {
27253
27509
  eyeicon_changes.$$scope = { dirty, ctx };
27254
27510
  }
27255
27511
 
@@ -27282,18 +27538,18 @@ function create_fragment$q(ctx) {
27282
27538
  forceValidityFailure: /*forceValidityFailure*/ ctx[0],
27283
27539
  isFirstInvalidInput: false,
27284
27540
  hasRightIcon: true,
27285
- key: `${/*key*/ ctx[1]}-confirm`,
27541
+ key: `${/*key*/ ctx[3]}-confirm`,
27286
27542
  label: interpolate('confirmPassword', null, 'Confirm Password'),
27287
- message: /*isInvalid*/ ctx[3]
27543
+ message: /*isInvalid*/ ctx[1]
27288
27544
  ? interpolate('passwordConfirmationError', null, 'Passwords do not match')
27289
27545
  : undefined,
27290
- onChange: /*onChange*/ ctx[2],
27291
- isInvalid: /*isInvalid*/ ctx[3],
27292
- isRequired: /*isRequired*/ ctx[4],
27293
- showMessage: /*showMessage*/ ctx[5],
27546
+ onChange: /*onChangeWrapper*/ ctx[9],
27547
+ isInvalid: /*isInvalid*/ ctx[1],
27548
+ isRequired: /*isRequired*/ ctx[2],
27549
+ showMessage: /*showMessage*/ ctx[4],
27294
27550
  type: /*type*/ ctx[7],
27295
- value: typeof /*value*/ ctx[9] === 'string'
27296
- ? /*value*/ ctx[9]
27551
+ value: typeof /*value*/ ctx[5] === 'string'
27552
+ ? /*value*/ ctx[5]
27297
27553
  : '',
27298
27554
  $$slots: {
27299
27555
  "input-button": [create_input_button_slot$1],
@@ -27314,19 +27570,22 @@ function create_fragment$q(ctx) {
27314
27570
  p(ctx, [dirty]) {
27315
27571
  const input_changes = {};
27316
27572
  if (dirty & /*forceValidityFailure*/ 1) input_changes.forceValidityFailure = /*forceValidityFailure*/ ctx[0];
27317
- if (dirty & /*key*/ 2) input_changes.key = `${/*key*/ ctx[1]}-confirm`;
27573
+ if (dirty & /*key*/ 8) input_changes.key = `${/*key*/ ctx[3]}-confirm`;
27318
27574
 
27319
- if (dirty & /*isInvalid*/ 8) input_changes.message = /*isInvalid*/ ctx[3]
27575
+ if (dirty & /*isInvalid*/ 2) input_changes.message = /*isInvalid*/ ctx[1]
27320
27576
  ? interpolate('passwordConfirmationError', null, 'Passwords do not match')
27321
27577
  : undefined;
27322
27578
 
27323
- if (dirty & /*onChange*/ 4) input_changes.onChange = /*onChange*/ ctx[2];
27324
- if (dirty & /*isInvalid*/ 8) input_changes.isInvalid = /*isInvalid*/ ctx[3];
27325
- if (dirty & /*isRequired*/ 16) input_changes.isRequired = /*isRequired*/ ctx[4];
27326
- if (dirty & /*showMessage*/ 32) input_changes.showMessage = /*showMessage*/ ctx[5];
27579
+ if (dirty & /*isInvalid*/ 2) input_changes.isInvalid = /*isInvalid*/ ctx[1];
27580
+ if (dirty & /*isRequired*/ 4) input_changes.isRequired = /*isRequired*/ ctx[2];
27581
+ if (dirty & /*showMessage*/ 16) input_changes.showMessage = /*showMessage*/ ctx[4];
27327
27582
  if (dirty & /*type*/ 128) input_changes.type = /*type*/ ctx[7];
27328
27583
 
27329
- if (dirty & /*$$scope, isVisible*/ 8256) {
27584
+ if (dirty & /*value*/ 32) input_changes.value = typeof /*value*/ ctx[5] === 'string'
27585
+ ? /*value*/ ctx[5]
27586
+ : '';
27587
+
27588
+ if (dirty & /*$$scope, isVisible*/ 32832) {
27330
27589
  input_changes.$$scope = { dirty, ctx };
27331
27590
  }
27332
27591
 
@@ -27350,10 +27609,11 @@ function create_fragment$q(ctx) {
27350
27609
  function instance$q($$self, $$props, $$invalidate) {
27351
27610
  let { $$slots: slots = {}, $$scope } = $$props;
27352
27611
  let { forceValidityFailure = false } = $$props;
27353
- let { key } = $$props;
27354
- let { onChange } = $$props;
27355
27612
  let { isInvalid = false } = $$props;
27356
27613
  let { isRequired = true } = $$props;
27614
+ let { key } = $$props;
27615
+ let { onChange } = $$props;
27616
+ let { resetValue } = $$props;
27357
27617
  let { style = {} } = $$props;
27358
27618
  const Input = style.labels === 'stacked' ? Stacked_label : Floating_label;
27359
27619
  let { showMessage = undefined } = $$props;
@@ -27361,6 +27621,13 @@ function instance$q($$self, $$props, $$invalidate) {
27361
27621
  let type = 'password';
27362
27622
  let value;
27363
27623
 
27624
+ function onChangeWrapper(event) {
27625
+ $$invalidate(5, value = event.target?.value);
27626
+
27627
+ // TODO: revisit this logic to avoid unnecessary ternary
27628
+ onChange(typeof value === 'string' ? value : undefined);
27629
+ }
27630
+
27364
27631
  /**
27365
27632
  * @function toggleVisibility - toggles the password from masked to plaintext
27366
27633
  */
@@ -27371,27 +27638,41 @@ function instance$q($$self, $$props, $$invalidate) {
27371
27638
 
27372
27639
  $$self.$$set = $$props => {
27373
27640
  if ('forceValidityFailure' in $$props) $$invalidate(0, forceValidityFailure = $$props.forceValidityFailure);
27374
- if ('key' in $$props) $$invalidate(1, key = $$props.key);
27375
- if ('onChange' in $$props) $$invalidate(2, onChange = $$props.onChange);
27376
- if ('isInvalid' in $$props) $$invalidate(3, isInvalid = $$props.isInvalid);
27377
- if ('isRequired' in $$props) $$invalidate(4, isRequired = $$props.isRequired);
27378
- if ('style' in $$props) $$invalidate(11, style = $$props.style);
27379
- if ('showMessage' in $$props) $$invalidate(5, showMessage = $$props.showMessage);
27380
- if ('$$scope' in $$props) $$invalidate(13, $$scope = $$props.$$scope);
27641
+ if ('isInvalid' in $$props) $$invalidate(1, isInvalid = $$props.isInvalid);
27642
+ if ('isRequired' in $$props) $$invalidate(2, isRequired = $$props.isRequired);
27643
+ if ('key' in $$props) $$invalidate(3, key = $$props.key);
27644
+ if ('onChange' in $$props) $$invalidate(11, onChange = $$props.onChange);
27645
+ if ('resetValue' in $$props) $$invalidate(12, resetValue = $$props.resetValue);
27646
+ if ('style' in $$props) $$invalidate(13, style = $$props.style);
27647
+ if ('showMessage' in $$props) $$invalidate(4, showMessage = $$props.showMessage);
27648
+ if ('$$scope' in $$props) $$invalidate(15, $$scope = $$props.$$scope);
27649
+ };
27650
+
27651
+ $$self.$$.update = () => {
27652
+ if ($$self.$$.dirty & /*resetValue, onChange, value*/ 6176) {
27653
+ {
27654
+ if (resetValue) {
27655
+ $$invalidate(5, value = undefined);
27656
+ onChange(value);
27657
+ }
27658
+ }
27659
+ }
27381
27660
  };
27382
27661
 
27383
27662
  return [
27384
27663
  forceValidityFailure,
27385
- key,
27386
- onChange,
27387
27664
  isInvalid,
27388
27665
  isRequired,
27666
+ key,
27389
27667
  showMessage,
27668
+ value,
27390
27669
  isVisible,
27391
27670
  type,
27392
27671
  Input,
27393
- value,
27672
+ onChangeWrapper,
27394
27673
  toggleVisibility,
27674
+ onChange,
27675
+ resetValue,
27395
27676
  style,
27396
27677
  slots,
27397
27678
  $$scope
@@ -27404,12 +27685,13 @@ class Confirm_input extends SvelteComponent {
27404
27685
 
27405
27686
  init(this, options, instance$q, create_fragment$q, safe_not_equal, {
27406
27687
  forceValidityFailure: 0,
27407
- key: 1,
27408
- onChange: 2,
27409
- isInvalid: 3,
27410
- isRequired: 4,
27411
- style: 11,
27412
- showMessage: 5
27688
+ isInvalid: 1,
27689
+ isRequired: 2,
27690
+ key: 3,
27691
+ onChange: 11,
27692
+ resetValue: 12,
27693
+ style: 13,
27694
+ showMessage: 4
27413
27695
  });
27414
27696
  }
27415
27697
  }
@@ -27418,8 +27700,8 @@ class Confirm_input extends SvelteComponent {
27418
27700
 
27419
27701
  function create_default_slot_1$7(ctx) {
27420
27702
  let current;
27421
- const default_slot_template = /*#slots*/ ctx[19].default;
27422
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[20], null);
27703
+ const default_slot_template = /*#slots*/ ctx[21].default;
27704
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[22], null);
27423
27705
 
27424
27706
  return {
27425
27707
  c() {
@@ -27434,15 +27716,15 @@ function create_default_slot_1$7(ctx) {
27434
27716
  },
27435
27717
  p(ctx, dirty) {
27436
27718
  if (default_slot) {
27437
- if (default_slot.p && (!current || dirty & /*$$scope*/ 1048576)) {
27719
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 4194304)) {
27438
27720
  update_slot_base(
27439
27721
  default_slot,
27440
27722
  default_slot_template,
27441
27723
  ctx,
27442
- /*$$scope*/ ctx[20],
27724
+ /*$$scope*/ ctx[22],
27443
27725
  !current
27444
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[20])
27445
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[20], dirty, null),
27726
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[22])
27727
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[22], dirty, null),
27446
27728
  null
27447
27729
  );
27448
27730
  }
@@ -27463,7 +27745,7 @@ function create_default_slot_1$7(ctx) {
27463
27745
  };
27464
27746
  }
27465
27747
 
27466
- // (82:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible} >
27748
+ // (94:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
27467
27749
  function create_default_slot$e(ctx) {
27468
27750
  let t;
27469
27751
  let current;
@@ -27493,7 +27775,7 @@ function create_default_slot$e(ctx) {
27493
27775
  };
27494
27776
  }
27495
27777
 
27496
- // (76:2)
27778
+ // (88:2)
27497
27779
  function create_input_button_slot(ctx) {
27498
27780
  let button;
27499
27781
  let eyeicon;
@@ -27524,7 +27806,7 @@ function create_input_button_slot(ctx) {
27524
27806
  current = true;
27525
27807
 
27526
27808
  if (!mounted) {
27527
- dispose = listen(button, "click", /*toggleVisibility*/ ctx[16]);
27809
+ dispose = listen(button, "click", /*toggleVisibility*/ ctx[17]);
27528
27810
  mounted = true;
27529
27811
  }
27530
27812
  },
@@ -27532,7 +27814,7 @@ function create_input_button_slot(ctx) {
27532
27814
  const eyeicon_changes = {};
27533
27815
  if (dirty & /*isVisible*/ 1024) eyeicon_changes.visible = /*isVisible*/ ctx[10];
27534
27816
 
27535
- if (dirty & /*$$scope*/ 1048576) {
27817
+ if (dirty & /*$$scope*/ 4194304) {
27536
27818
  eyeicon_changes.$$scope = { dirty, ctx };
27537
27819
  }
27538
27820
 
@@ -27556,7 +27838,7 @@ function create_input_button_slot(ctx) {
27556
27838
  };
27557
27839
  }
27558
27840
 
27559
- // (89:0) {#if callbackMetadata?.platform?.confirmPassword}
27841
+ // (101:0) {#if callbackMetadata?.platform?.confirmPassword}
27560
27842
  function create_if_block$a(ctx) {
27561
27843
  let confirminput;
27562
27844
  let current;
@@ -27566,7 +27848,8 @@ function create_if_block$a(ctx) {
27566
27848
  forceValidityFailure: /*doPasswordsMatch*/ ctx[9] === false,
27567
27849
  isInvalid: /*doPasswordsMatch*/ ctx[9] === false,
27568
27850
  key: /*key*/ ctx[0],
27569
- onChange: /*confirmInput*/ ctx[14],
27851
+ onChange: /*confirmInput*/ ctx[15],
27852
+ resetValue: /*resetValue*/ ctx[11],
27570
27853
  showMessage: /*doPasswordsMatch*/ ctx[9] === false,
27571
27854
  style: /*style*/ ctx[4]
27572
27855
  }
@@ -27585,6 +27868,7 @@ function create_if_block$a(ctx) {
27585
27868
  if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.forceValidityFailure = /*doPasswordsMatch*/ ctx[9] === false;
27586
27869
  if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.isInvalid = /*doPasswordsMatch*/ ctx[9] === false;
27587
27870
  if (dirty & /*key*/ 1) confirminput_changes.key = /*key*/ ctx[0];
27871
+ if (dirty & /*resetValue*/ 2048) confirminput_changes.resetValue = /*resetValue*/ ctx[11];
27588
27872
  if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.showMessage = /*doPasswordsMatch*/ ctx[9] === false;
27589
27873
  if (dirty & /*style*/ 16) confirminput_changes.style = /*style*/ ctx[4];
27590
27874
  confirminput.$set(confirminput_changes);
@@ -27610,20 +27894,20 @@ function create_fragment$p(ctx) {
27610
27894
  let if_block_anchor;
27611
27895
  let current;
27612
27896
 
27613
- input = new /*Input*/ ctx[13]({
27897
+ input = new /*Input*/ ctx[14]({
27614
27898
  props: {
27615
27899
  isFirstInvalidInput: /*callbackMetadata*/ ctx[1]?.derived.isFirstInvalidInput || false,
27616
27900
  hasRightIcon: true,
27617
27901
  key: /*key*/ ctx[0],
27618
- label: interpolate(textToKey(/*callbackType*/ ctx[8]), null, /*textInputLabel*/ ctx[11]),
27902
+ label: interpolate(textToKey(/*callbackType*/ ctx[8]), null, /*textInputLabel*/ ctx[12]),
27619
27903
  message: /*validationFailure*/ ctx[6] || (/*isRequired*/ ctx[3]
27620
27904
  ? interpolate('inputRequiredError')
27621
27905
  : undefined),
27622
- onChange: /*setValue*/ ctx[15],
27906
+ onChange: /*setValue*/ ctx[16],
27623
27907
  isInvalid: /*isInvalid*/ ctx[2],
27624
27908
  isRequired: /*isRequired*/ ctx[3],
27625
27909
  showMessage: /*showMessage*/ ctx[5],
27626
- type: /*type*/ ctx[12],
27910
+ type: /*type*/ ctx[13],
27627
27911
  value: typeof /*value*/ ctx[7] === 'string'
27628
27912
  ? /*value*/ ctx[7]
27629
27913
  : '',
@@ -27655,7 +27939,7 @@ function create_fragment$p(ctx) {
27655
27939
  const input_changes = {};
27656
27940
  if (dirty & /*callbackMetadata*/ 2) input_changes.isFirstInvalidInput = /*callbackMetadata*/ ctx[1]?.derived.isFirstInvalidInput || false;
27657
27941
  if (dirty & /*key*/ 1) input_changes.key = /*key*/ ctx[0];
27658
- if (dirty & /*callbackType, textInputLabel*/ 2304) input_changes.label = interpolate(textToKey(/*callbackType*/ ctx[8]), null, /*textInputLabel*/ ctx[11]);
27942
+ if (dirty & /*callbackType, textInputLabel*/ 4352) input_changes.label = interpolate(textToKey(/*callbackType*/ ctx[8]), null, /*textInputLabel*/ ctx[12]);
27659
27943
 
27660
27944
  if (dirty & /*validationFailure, isRequired*/ 72) input_changes.message = /*validationFailure*/ ctx[6] || (/*isRequired*/ ctx[3]
27661
27945
  ? interpolate('inputRequiredError')
@@ -27664,13 +27948,13 @@ function create_fragment$p(ctx) {
27664
27948
  if (dirty & /*isInvalid*/ 4) input_changes.isInvalid = /*isInvalid*/ ctx[2];
27665
27949
  if (dirty & /*isRequired*/ 8) input_changes.isRequired = /*isRequired*/ ctx[3];
27666
27950
  if (dirty & /*showMessage*/ 32) input_changes.showMessage = /*showMessage*/ ctx[5];
27667
- if (dirty & /*type*/ 4096) input_changes.type = /*type*/ ctx[12];
27951
+ if (dirty & /*type*/ 8192) input_changes.type = /*type*/ ctx[13];
27668
27952
 
27669
27953
  if (dirty & /*value*/ 128) input_changes.value = typeof /*value*/ ctx[7] === 'string'
27670
27954
  ? /*value*/ ctx[7]
27671
27955
  : '';
27672
27956
 
27673
- if (dirty & /*$$scope, isVisible*/ 1049600) {
27957
+ if (dirty & /*$$scope, isVisible*/ 4195328) {
27674
27958
  input_changes.$$scope = { dirty, ctx };
27675
27959
  }
27676
27960
 
@@ -27734,6 +28018,8 @@ function instance$p($$self, $$props, $$invalidate) {
27734
28018
  let callbackType;
27735
28019
  let doPasswordsMatch;
27736
28020
  let isVisible = false;
28021
+ let resetValue = false;
28022
+ let savedValue = '';
27737
28023
  let textInputLabel;
27738
28024
  let type = 'password';
27739
28025
  let value;
@@ -27742,8 +28028,8 @@ function instance$p($$self, $$props, $$invalidate) {
27742
28028
  * @function confirmInput - ensures the second password input matches the first
27743
28029
  * @param event
27744
28030
  */
27745
- function confirmInput(event) {
27746
- $$invalidate(18, confirmValue = event.target?.value);
28031
+ function confirmInput(val) {
28032
+ $$invalidate(19, confirmValue = val);
27747
28033
  }
27748
28034
 
27749
28035
  /**
@@ -27761,6 +28047,8 @@ function instance$p($$self, $$props, $$invalidate) {
27761
28047
  * for writing values to the callbacks received from AM
27762
28048
  *********************************************************************** */
27763
28049
  callback.setInputValue(value);
28050
+
28051
+ $$invalidate(20, savedValue = String(value));
27764
28052
  }
27765
28053
 
27766
28054
  /**
@@ -27768,11 +28056,11 @@ function instance$p($$self, $$props, $$invalidate) {
27768
28056
  */
27769
28057
  function toggleVisibility() {
27770
28058
  $$invalidate(10, isVisible = !isVisible);
27771
- $$invalidate(12, type = isVisible ? 'text' : 'password');
28059
+ $$invalidate(13, type = isVisible ? 'text' : 'password');
27772
28060
  }
27773
28061
 
27774
28062
  $$self.$$set = $$props => {
27775
- if ('callback' in $$props) $$invalidate(17, callback = $$props.callback);
28063
+ if ('callback' in $$props) $$invalidate(18, callback = $$props.callback);
27776
28064
  if ('callbackMetadata' in $$props) $$invalidate(1, callbackMetadata = $$props.callbackMetadata);
27777
28065
  if ('key' in $$props) $$invalidate(0, key = $$props.key);
27778
28066
  if ('isInvalid' in $$props) $$invalidate(2, isInvalid = $$props.isInvalid);
@@ -27780,18 +28068,28 @@ function instance$p($$self, $$props, $$invalidate) {
27780
28068
  if ('style' in $$props) $$invalidate(4, style = $$props.style);
27781
28069
  if ('showMessage' in $$props) $$invalidate(5, showMessage = $$props.showMessage);
27782
28070
  if ('validationFailure' in $$props) $$invalidate(6, validationFailure = $$props.validationFailure);
27783
- if ('$$scope' in $$props) $$invalidate(20, $$scope = $$props.$$scope);
28071
+ if ('$$scope' in $$props) $$invalidate(22, $$scope = $$props.$$scope);
27784
28072
  };
27785
28073
 
27786
28074
  $$self.$$.update = () => {
27787
- if ($$self.$$.dirty & /*callback, callbackMetadata, confirmValue, value*/ 393346) {
28075
+ if ($$self.$$.dirty & /*callback, callbackMetadata, savedValue, value, confirmValue*/ 1835138) {
27788
28076
  {
27789
28077
  $$invalidate(8, callbackType = callback.getType());
27790
28078
  $$invalidate(0, key = callback?.payload?.input?.[0].name || `password-${callbackMetadata?.idx}`);
27791
- $$invalidate(11, textInputLabel = callback.getPrompt());
28079
+ $$invalidate(12, textInputLabel = callback.getPrompt());
27792
28080
  $$invalidate(7, value = callback?.getInputValue());
27793
28081
 
27794
- // Only assign a boolean if the confirm input has an actual value
28082
+ /**
28083
+ * `savedValue` represents what the user set after blur (local component state)
28084
+ * `value` represents what's in the callback (empties from AM response)
28085
+ *
28086
+ * This unique combination is what produces the most reliable reset flag
28087
+ */
28088
+ $$invalidate(11, resetValue = !!savedValue && value === '');
28089
+
28090
+ /**
28091
+ * Only assign a boolean if the confirm input has an actual value.
28092
+ */
27795
28093
  $$invalidate(9, doPasswordsMatch = confirmValue !== undefined
27796
28094
  ? confirmValue === value
27797
28095
  : undefined);
@@ -27811,6 +28109,7 @@ function instance$p($$self, $$props, $$invalidate) {
27811
28109
  callbackType,
27812
28110
  doPasswordsMatch,
27813
28111
  isVisible,
28112
+ resetValue,
27814
28113
  textInputLabel,
27815
28114
  type,
27816
28115
  Input,
@@ -27819,6 +28118,7 @@ function instance$p($$self, $$props, $$invalidate) {
27819
28118
  toggleVisibility,
27820
28119
  callback,
27821
28120
  confirmValue,
28121
+ savedValue,
27822
28122
  slots,
27823
28123
  $$scope
27824
28124
  ];
@@ -27829,7 +28129,7 @@ class Base extends SvelteComponent {
27829
28129
  super();
27830
28130
 
27831
28131
  init(this, options, instance$p, create_fragment$p, safe_not_equal, {
27832
- callback: 17,
28132
+ callback: 18,
27833
28133
  callbackMetadata: 1,
27834
28134
  key: 0,
27835
28135
  isInvalid: 2,
@@ -29797,13 +30097,6 @@ function instance$f($$self, $$props, $$invalidate) {
29797
30097
  * @param {Object} event
29798
30098
  */
29799
30099
  function setValue(event) {
29800
- /** ***********************************************************************
29801
- * SDK INTEGRATION POINT
29802
- * Summary: SDK callback methods for setting values
29803
- * ------------------------------------------------------------------------
29804
- * Details: Each callback is wrapped by the SDK to provide helper methods
29805
- * for writing values to the callbacks received from AM
29806
- *********************************************************************** */
29807
30100
  callback.setInputValue(event.target.value);
29808
30101
  }
29809
30102
 
@@ -29992,7 +30285,7 @@ function create_else_block$3(ctx) {
29992
30285
  };
29993
30286
  }
29994
30287
 
29995
- // (41:0) {#if $linksStore?.termsAndConditions}
30288
+ // (27:0) {#if $linksStore?.termsAndConditions}
29996
30289
  function create_if_block$7(ctx) {
29997
30290
  let link;
29998
30291
  let t;
@@ -30070,7 +30363,7 @@ function create_if_block$7(ctx) {
30070
30363
  };
30071
30364
  }
30072
30365
 
30073
- // (42:2) <Link classes="tw_block tw_mb-4" href={$linksStore?.termsAndConditions} target="_blank">
30366
+ // (28:2) <Link classes="tw_block tw_mb-4" href={$linksStore?.termsAndConditions} target="_blank">
30074
30367
  function create_default_slot_1$5(ctx) {
30075
30368
  let t_value = interpolate('termsAndConditionsLinkText') + "";
30076
30369
  let t;
@@ -30089,7 +30382,7 @@ function create_default_slot_1$5(ctx) {
30089
30382
  };
30090
30383
  }
30091
30384
 
30092
- // (45:2) <Checkbox isFirstInvalidInput={callbackMetadata?.derived.isFirstInvalidInput || false} key={inputName} onChange={setValue} value={false} >
30385
+ // (31:2) <Checkbox isFirstInvalidInput={callbackMetadata?.derived.isFirstInvalidInput || false} key={inputName} onChange={setValue} value={false} >
30093
30386
  function create_default_slot$9(ctx) {
30094
30387
  let t;
30095
30388
  let current;
@@ -30197,13 +30490,6 @@ function instance$d($$self, $$props, $$invalidate) {
30197
30490
  let { callback } = $$props;
30198
30491
  let { callbackMetadata } = $$props;
30199
30492
 
30200
- /** *************************************************************************
30201
- * SDK INTEGRATION POINT
30202
- * Summary: SDK callback methods for getting values
30203
- * --------------------------------------------------------------------------
30204
- * Details: Each callback is wrapped by the SDK to provide helper methods
30205
- * for accessing values from the callbacks received from AM
30206
- ************************************************************************* */
30207
30493
  const Checkbox = style.checksAndRadios === 'standard'
30208
30494
  ? Standard$1
30209
30495
  : Animated$1;
@@ -30215,13 +30501,6 @@ function instance$d($$self, $$props, $$invalidate) {
30215
30501
  * @param {Object} event
30216
30502
  */
30217
30503
  function setValue(event) {
30218
- /** ***********************************************************************
30219
- * SDK INTEGRATION POINT
30220
- * Summary: SDK callback methods for setting values
30221
- * ------------------------------------------------------------------------
30222
- * Details: Each callback is wrapped by the SDK to provide helper methods
30223
- * for writing values to the callbacks received from AM
30224
- *********************************************************************** */
30225
30504
  callback.setAccepted(event.target.checked);
30226
30505
  }
30227
30506
 
@@ -30780,13 +31059,6 @@ function instance$9($$self, $$props, $$invalidate) {
30780
31059
  * @param {Object} event
30781
31060
  */
30782
31061
  function setValue(event) {
30783
- /** ***********************************************************************
30784
- * SDK INTEGRATION POINT
30785
- * Summary: SDK callback methods for setting values
30786
- * ------------------------------------------------------------------------
30787
- * Details: Each callback is wrapped by the SDK to provide helper methods
30788
- * for writing values to the callbacks received from AM
30789
- *********************************************************************** */
30790
31062
  callback.setInputValue(event.target.value);
30791
31063
  }
30792
31064
 
@@ -35043,14 +35315,12 @@ class Login extends SvelteComponent {
35043
35315
  }
35044
35316
  }
35045
35317
 
35318
+ /**
35319
+ * @function mapStepToStage - Maps the current step to the proper stage component.
35320
+ * @param {object} currentStep - The current step to check
35321
+ * @returns {object} - The stage Svelte component
35322
+ */
35046
35323
  function mapStepToStage(currentStep) {
35047
- /** *********************************************************************
35048
- * SDK INTEGRATION POINT
35049
- * Summary:SDK step method for getting the stage value
35050
- * ----------------------------------------------------------------------
35051
- * Details: This method is helpful in quickly identifying the stage
35052
- * when you want to provide special layout or handling of the form
35053
- ********************************************************************* */
35054
35324
  if (!currentStep || currentStep.type !== 'Step') {
35055
35325
  return Generic;
35056
35326
  }