@forgerock/login-widget 1.0.0-beta.8 → 1.0.0-beta.9

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.d.ts CHANGED
@@ -1960,7 +1960,7 @@ declare const partialConfigSchema: ZodObject<{
1960
1960
  }>;
1961
1961
 
1962
1962
  declare const journeyConfigSchema: ZodObject<{
1963
- forgotPassword: ZodObject<{
1963
+ forgotPassword: ZodOptional<ZodObject<{
1964
1964
  journey: ZodOptional<ZodString>;
1965
1965
  match: ZodArray<ZodString, "many">;
1966
1966
  }, "strip", ZodTypeAny, {
@@ -1969,8 +1969,8 @@ declare const journeyConfigSchema: ZodObject<{
1969
1969
  }, {
1970
1970
  match: string[];
1971
1971
  journey?: string | undefined;
1972
- }>;
1973
- forgotUsername: ZodObject<{
1972
+ }>>;
1973
+ forgotUsername: ZodOptional<ZodObject<{
1974
1974
  journey: ZodOptional<ZodString>;
1975
1975
  match: ZodArray<ZodString, "many">;
1976
1976
  }, "strip", ZodTypeAny, {
@@ -1979,8 +1979,8 @@ declare const journeyConfigSchema: ZodObject<{
1979
1979
  }, {
1980
1980
  match: string[];
1981
1981
  journey?: string | undefined;
1982
- }>;
1983
- login: ZodObject<{
1982
+ }>>;
1983
+ login: ZodOptional<ZodObject<{
1984
1984
  journey: ZodOptional<ZodString>;
1985
1985
  match: ZodArray<ZodString, "many">;
1986
1986
  }, "strip", ZodTypeAny, {
@@ -1989,8 +1989,8 @@ declare const journeyConfigSchema: ZodObject<{
1989
1989
  }, {
1990
1990
  match: string[];
1991
1991
  journey?: string | undefined;
1992
- }>;
1993
- register: ZodObject<{
1992
+ }>>;
1993
+ register: ZodOptional<ZodObject<{
1994
1994
  journey: ZodOptional<ZodString>;
1995
1995
  match: ZodArray<ZodString, "many">;
1996
1996
  }, "strip", ZodTypeAny, {
@@ -1999,41 +1999,41 @@ declare const journeyConfigSchema: ZodObject<{
1999
1999
  }, {
2000
2000
  match: string[];
2001
2001
  journey?: string | undefined;
2002
- }>;
2002
+ }>>;
2003
2003
  }, "strip", ZodTypeAny, {
2004
- forgotPassword: {
2004
+ forgotPassword?: {
2005
2005
  match: string[];
2006
2006
  journey?: string | undefined;
2007
- };
2008
- forgotUsername: {
2007
+ } | undefined;
2008
+ forgotUsername?: {
2009
2009
  match: string[];
2010
2010
  journey?: string | undefined;
2011
- };
2012
- login: {
2011
+ } | undefined;
2012
+ login?: {
2013
2013
  match: string[];
2014
2014
  journey?: string | undefined;
2015
- };
2016
- register: {
2015
+ } | undefined;
2016
+ register?: {
2017
2017
  match: string[];
2018
2018
  journey?: string | undefined;
2019
- };
2019
+ } | undefined;
2020
2020
  }, {
2021
- forgotPassword: {
2021
+ forgotPassword?: {
2022
2022
  match: string[];
2023
2023
  journey?: string | undefined;
2024
- };
2025
- forgotUsername: {
2024
+ } | undefined;
2025
+ forgotUsername?: {
2026
2026
  match: string[];
2027
2027
  journey?: string | undefined;
2028
- };
2029
- login: {
2028
+ } | undefined;
2029
+ login?: {
2030
2030
  match: string[];
2031
2031
  journey?: string | undefined;
2032
- };
2033
- register: {
2032
+ } | undefined;
2033
+ register?: {
2034
2034
  match: string[];
2035
2035
  journey?: string | undefined;
2036
- };
2036
+ } | undefined;
2037
2037
  }>;
2038
2038
 
2039
2039
  declare const partialLinksSchema: ZodObject<{
package/index.js CHANGED
@@ -14926,7 +14926,8 @@ function configure (config) {
14926
14926
  Config.set(config);
14927
14927
  }
14928
14928
 
14929
- const journeyConfigItemSchema = z.object({
14929
+ const journeyConfigItemSchema = z
14930
+ .object({
14930
14931
  journey: z.string().optional(),
14931
14932
  match: z
14932
14933
  .string()
@@ -14934,7 +14935,8 @@ const journeyConfigItemSchema = z.object({
14934
14935
  message: 'HREF string must start with `?journey` or `#/service`',
14935
14936
  })
14936
14937
  .array(),
14937
- });
14938
+ })
14939
+ .optional();
14938
14940
  const journeyConfigSchema = z.object({
14939
14941
  forgotPassword: journeyConfigItemSchema,
14940
14942
  forgotUsername: journeyConfigItemSchema,
@@ -14951,8 +14953,8 @@ const defaultJourneys = {
14951
14953
  match: ['#/service/ForgottenUsername', '?journey=ForgottenUsername'],
14952
14954
  },
14953
14955
  login: {
14954
- journey: undefined,
14955
- match: ['#/service/Login', '?journey'],
14956
+ journey: 'Login',
14957
+ match: ['#/service/Login', '?journey', '?journey=Login'],
14956
14958
  },
14957
14959
  register: {
14958
14960
  journey: 'Registration',
@@ -14970,8 +14972,14 @@ function initialize$6(customJourneys) {
14970
14972
  if (customJourneys) {
14971
14973
  // Provide developer feedback if customized
14972
14974
  journeyConfigSchema.parse(customJourneys);
14973
- configuredJourneysStore.set(Object.keys(customJourneys).map((key) => ({
14974
- ...customJourneys[key],
14975
+ // Merge the two journey configs, dev's overwriting the default
14976
+ const mergedJourneyObjects = {
14977
+ ...defaultJourneys,
14978
+ ...customJourneys,
14979
+ };
14980
+ const customJourneyKeys = Object.keys(mergedJourneyObjects);
14981
+ configuredJourneysStore.set(customJourneyKeys.map((key) => ({
14982
+ ...mergedJourneyObjects[key],
14975
14983
  key,
14976
14984
  })));
14977
14985
  }
@@ -17322,6 +17330,15 @@ function initializeStack(initOptions) {
17322
17330
  const { update, set, subscribe } = writable(initialValue);
17323
17331
  // Assign to exported variable (see bottom of file)
17324
17332
  stack = {
17333
+ latest: async () => {
17334
+ return new Promise((resolve) => {
17335
+ // subscribe, grab the current value and unsubscribe
17336
+ subscribe((current) => {
17337
+ const lastItem = current[current.length - 1];
17338
+ resolve(lastItem);
17339
+ })();
17340
+ });
17341
+ },
17325
17342
  pop: async () => {
17326
17343
  return new Promise((resolve) => {
17327
17344
  update((current) => {
@@ -17373,7 +17390,6 @@ const journeyStore = writable({
17373
17390
  });
17374
17391
  function initialize$4(initOptions) {
17375
17392
  const stack = initializeStack();
17376
- let restartOptions;
17377
17393
  let stepNumber = 0;
17378
17394
  async function next(prevStep = null, nextOptions, resumeUrl) {
17379
17395
  if (!Config.get().serverConfig?.baseUrl) {
@@ -17387,14 +17403,6 @@ function initialize$4(initOptions) {
17387
17403
  ...initOptions,
17388
17404
  ...nextOptions,
17389
17405
  };
17390
- // These options are reserved only for restarting a journey after failure
17391
- if (initOptions || nextOptions) {
17392
- restartOptions = {
17393
- // Prioritize next options over initialize options
17394
- ...initOptions,
17395
- ...nextOptions,
17396
- };
17397
- }
17398
17406
  /**
17399
17407
  * Save previous step information just in case we have a total
17400
17408
  * form failure due to 400 response from ForgeRock.
@@ -17481,6 +17489,7 @@ function initialize$4(initOptions) {
17481
17489
  /**
17482
17490
  * SUCCESSFUL COMPLETION BLOCK
17483
17491
  */
17492
+ stack.reset();
17484
17493
  // Set final state
17485
17494
  journeyStore.set({
17486
17495
  completed: true,
@@ -17504,6 +17513,7 @@ function initialize$4(initOptions) {
17504
17513
  /**
17505
17514
  * Restart tree to get fresh step
17506
17515
  */
17516
+ const restartOptions = await stack.latest();
17507
17517
  restartedStep = await FRAuth$1.next(undefined, restartOptions);
17508
17518
  }
17509
17519
  catch (err) {
@@ -17639,6 +17649,18 @@ function initialize$4(initOptions) {
17639
17649
  await next(undefined, resumeOptions, url);
17640
17650
  }
17641
17651
  async function start(startOptions) {
17652
+ const configTree = Config.get().tree;
17653
+ // If no tree is passed in, but there's a configured default tree, use that
17654
+ if (!startOptions?.tree && configTree) {
17655
+ if (startOptions) {
17656
+ startOptions.tree = configTree;
17657
+ }
17658
+ else {
17659
+ startOptions = {
17660
+ tree: configTree,
17661
+ };
17662
+ }
17663
+ }
17642
17664
  await stack.push(startOptions);
17643
17665
  await next(undefined, startOptions);
17644
17666
  }
@@ -17881,8 +17903,6 @@ function widgetApiFactory(componentApi) {
17881
17903
  journeyStore.reset();
17882
17904
  oauthStore.reset();
17883
17905
  userStore.reset();
17884
- // Fetch fresh journey step
17885
- journey().start();
17886
17906
  }
17887
17907
  const configuration = (options) => {
17888
17908
  if (options?.forgerock) {
@@ -20653,18 +20673,36 @@ function getValidationMessageString(policy) {
20653
20673
  }
20654
20674
  case 'cannot-contain-characters': {
20655
20675
  const params = policy?.params;
20656
- const chars = params?.forbiddenChars.reduce((prev, curr) => {
20657
- prev = `${prev ? `${prev}, ` : `${prev}`} ${curr}`;
20658
- return prev;
20659
- }, '');
20676
+ let chars = '';
20677
+ if (typeof params !== 'object') {
20678
+ return '';
20679
+ }
20680
+ if (Array.isArray(params.forbiddenChars)) {
20681
+ chars = params.forbiddenChars.reduce((prev, curr) => {
20682
+ prev = `${prev ? `${prev}, ` : `${prev}`} ${curr}`;
20683
+ return prev;
20684
+ }, '');
20685
+ }
20686
+ else if (typeof params.forbiddenChars === 'string') {
20687
+ chars = params.forbiddenChars;
20688
+ }
20660
20689
  return interpolate('fieldCanNotContainFollowingCharacters', { chars });
20661
20690
  }
20662
20691
  case 'cannot-contain-others': {
20663
20692
  const params = policy?.params;
20664
- const fields = params?.disallowedFields?.reduce((prev, curr) => {
20665
- prev = `${prev ? `${prev}, ` : `${prev}`} ${interpolate(curr)}`;
20666
- return prev;
20667
- }, '');
20693
+ let fields = '';
20694
+ if (typeof params !== 'object') {
20695
+ return '';
20696
+ }
20697
+ if (Array.isArray(params.disallowedFields)) {
20698
+ fields = params.disallowedFields?.reduce((prev, curr) => {
20699
+ prev = `${prev ? `${prev}, ` : `${prev}`} ${interpolate(curr)}`;
20700
+ return prev;
20701
+ }, '');
20702
+ }
20703
+ else if (typeof params.disallowedFields === 'string') {
20704
+ fields = params.disallowedFields;
20705
+ }
20668
20706
  return interpolate('fieldCanNotContainFollowingValues', { fields });
20669
20707
  }
20670
20708
  case 'maximum-length': {
@@ -29214,17 +29252,17 @@ class Select_idp extends SvelteComponent {
29214
29252
 
29215
29253
  function get_each_context_1(ctx, list, i) {
29216
29254
  const child_ctx = ctx.slice();
29217
- child_ctx[10] = list[i];
29255
+ child_ctx[11] = list[i];
29218
29256
  return child_ctx;
29219
29257
  }
29220
29258
 
29221
29259
  function get_each_context$4(ctx, list, i) {
29222
29260
  const child_ctx = ctx.slice();
29223
- child_ctx[7] = list[i];
29261
+ child_ctx[8] = list[i];
29224
29262
  return child_ctx;
29225
29263
  }
29226
29264
 
29227
- // (34:33)
29265
+ // (35:51)
29228
29266
  function create_if_block_1$6(ctx) {
29229
29267
  let div;
29230
29268
  let p;
@@ -29234,7 +29272,7 @@ function create_if_block_1$6(ctx) {
29234
29272
  let div_id_value;
29235
29273
  let current;
29236
29274
  t0 = new Locale_strings({ props: { key: /*messageKey*/ ctx[1] } });
29237
- let each_value_1 = /*validationRules*/ ctx[2];
29275
+ let each_value_1 = /*validationRules*/ ctx[3];
29238
29276
  let each_blocks = [];
29239
29277
 
29240
29278
  for (let i = 0; i < each_value_1.length; i += 1) {
@@ -29276,8 +29314,8 @@ function create_if_block_1$6(ctx) {
29276
29314
  if (dirty & /*messageKey*/ 2) t0_changes.key = /*messageKey*/ ctx[1];
29277
29315
  t0.$set(t0_changes);
29278
29316
 
29279
- if (dirty & /*validationRules*/ 4) {
29280
- each_value_1 = /*validationRules*/ ctx[2];
29317
+ if (dirty & /*validationRules*/ 8) {
29318
+ each_value_1 = /*validationRules*/ ctx[3];
29281
29319
  let i;
29282
29320
 
29283
29321
  for (i = 0; i < each_value_1.length; i += 1) {
@@ -29320,7 +29358,7 @@ function create_if_block_1$6(ctx) {
29320
29358
  };
29321
29359
  }
29322
29360
 
29323
- // (23:0) {#if simplifiedFailures.length}
29361
+ // (24:0) {#if simplifiedFailures.length}
29324
29362
  function create_if_block$8(ctx) {
29325
29363
  let div;
29326
29364
  let p;
@@ -29330,7 +29368,7 @@ function create_if_block$8(ctx) {
29330
29368
  let div_id_value;
29331
29369
  let current;
29332
29370
  t0 = new Locale_strings({ props: { key: /*messageKey*/ ctx[1] } });
29333
- let each_value = /*simplifiedFailures*/ ctx[3];
29371
+ let each_value = /*simplifiedFailures*/ ctx[4];
29334
29372
  let each_blocks = [];
29335
29373
 
29336
29374
  for (let i = 0; i < each_value.length; i += 1) {
@@ -29372,8 +29410,8 @@ function create_if_block$8(ctx) {
29372
29410
  if (dirty & /*messageKey*/ 2) t0_changes.key = /*messageKey*/ ctx[1];
29373
29411
  t0.$set(t0_changes);
29374
29412
 
29375
- if (dirty & /*simplifiedFailures*/ 8) {
29376
- each_value = /*simplifiedFailures*/ ctx[3];
29413
+ if (dirty & /*simplifiedFailures*/ 16) {
29414
+ each_value = /*simplifiedFailures*/ ctx[4];
29377
29415
  let i;
29378
29416
 
29379
29417
  for (i = 0; i < each_value.length; i += 1) {
@@ -29416,10 +29454,10 @@ function create_if_block$8(ctx) {
29416
29454
  };
29417
29455
  }
29418
29456
 
29419
- // (40:6) {#each validationRules as rule}
29457
+ // (41:6) {#each validationRules as rule}
29420
29458
  function create_each_block_1(ctx) {
29421
29459
  let li;
29422
- let t_value = /*rule*/ ctx[10].message + "";
29460
+ let t_value = /*rule*/ ctx[11].message + "";
29423
29461
  let t;
29424
29462
 
29425
29463
  return {
@@ -29433,7 +29471,7 @@ function create_each_block_1(ctx) {
29433
29471
  append(li, t);
29434
29472
  },
29435
29473
  p(ctx, dirty) {
29436
- if (dirty & /*validationRules*/ 4 && t_value !== (t_value = /*rule*/ ctx[10].message + "")) set_data(t, t_value);
29474
+ if (dirty & /*validationRules*/ 8 && t_value !== (t_value = /*rule*/ ctx[11].message + "")) set_data(t, t_value);
29437
29475
  },
29438
29476
  d(detaching) {
29439
29477
  if (detaching) detach(li);
@@ -29441,10 +29479,10 @@ function create_each_block_1(ctx) {
29441
29479
  };
29442
29480
  }
29443
29481
 
29444
- // (29:6) {#each simplifiedFailures as failure}
29482
+ // (30:6) {#each simplifiedFailures as failure}
29445
29483
  function create_each_block$4(ctx) {
29446
29484
  let li;
29447
- let t_value = /*failure*/ ctx[7].message + "";
29485
+ let t_value = /*failure*/ ctx[8].message + "";
29448
29486
  let t;
29449
29487
 
29450
29488
  return {
@@ -29458,7 +29496,7 @@ function create_each_block$4(ctx) {
29458
29496
  append(li, t);
29459
29497
  },
29460
29498
  p(ctx, dirty) {
29461
- if (dirty & /*simplifiedFailures*/ 8 && t_value !== (t_value = /*failure*/ ctx[7].message + "")) set_data(t, t_value);
29499
+ if (dirty & /*simplifiedFailures*/ 16 && t_value !== (t_value = /*failure*/ ctx[8].message + "")) set_data(t, t_value);
29462
29500
  },
29463
29501
  d(detaching) {
29464
29502
  if (detaching) detach(li);
@@ -29475,8 +29513,8 @@ function create_fragment$g(ctx) {
29475
29513
  const if_blocks = [];
29476
29514
 
29477
29515
  function select_block_type(ctx, dirty) {
29478
- if (/*simplifiedFailures*/ ctx[3].length) return 0;
29479
- if (/*validationRules*/ ctx[2].length) return 1;
29516
+ if (/*simplifiedFailures*/ ctx[4].length) return 0;
29517
+ if (/*showPolicies*/ ctx[2] && /*validationRules*/ ctx[3].length) return 1;
29480
29518
  return -1;
29481
29519
  }
29482
29520
 
@@ -29557,6 +29595,7 @@ function instance$g($$self, $$props, $$invalidate) {
29557
29595
  let { key = undefined } = $$props;
29558
29596
  let { label } = $$props;
29559
29597
  let { messageKey } = $$props;
29598
+ let { showPolicies = false } = $$props;
29560
29599
  let validationFailures = getValidationFailures(callback, label);
29561
29600
  let validationRules = getValidationPolicies(callback.getPolicies());
29562
29601
 
@@ -29569,19 +29608,20 @@ function instance$g($$self, $$props, $$invalidate) {
29569
29608
  );
29570
29609
 
29571
29610
  $$self.$$set = $$props => {
29572
- if ('callback' in $$props) $$invalidate(4, callback = $$props.callback);
29611
+ if ('callback' in $$props) $$invalidate(5, callback = $$props.callback);
29573
29612
  if ('key' in $$props) $$invalidate(0, key = $$props.key);
29574
- if ('label' in $$props) $$invalidate(5, label = $$props.label);
29613
+ if ('label' in $$props) $$invalidate(6, label = $$props.label);
29575
29614
  if ('messageKey' in $$props) $$invalidate(1, messageKey = $$props.messageKey);
29615
+ if ('showPolicies' in $$props) $$invalidate(2, showPolicies = $$props.showPolicies);
29576
29616
  };
29577
29617
 
29578
29618
  $$self.$$.update = () => {
29579
- if ($$self.$$.dirty & /*callback, label, validationFailures*/ 112) {
29619
+ if ($$self.$$.dirty & /*callback, label, validationFailures*/ 224) {
29580
29620
  {
29581
- $$invalidate(6, validationFailures = getValidationFailures(callback, label));
29582
- $$invalidate(2, validationRules = getValidationPolicies(callback.getPolicies()));
29621
+ $$invalidate(7, validationFailures = getValidationFailures(callback, label));
29622
+ $$invalidate(3, validationRules = getValidationPolicies(callback.getPolicies()));
29583
29623
 
29584
- $$invalidate(3, simplifiedFailures = validationFailures.reduce(
29624
+ $$invalidate(4, simplifiedFailures = validationFailures.reduce(
29585
29625
  (prev, curr) => {
29586
29626
  prev = prev.concat(curr.restructured);
29587
29627
  return prev;
@@ -29595,6 +29635,7 @@ function instance$g($$self, $$props, $$invalidate) {
29595
29635
  return [
29596
29636
  key,
29597
29637
  messageKey,
29638
+ showPolicies,
29598
29639
  validationRules,
29599
29640
  simplifiedFailures,
29600
29641
  callback,
@@ -29608,10 +29649,11 @@ class Policies extends SvelteComponent {
29608
29649
  super();
29609
29650
 
29610
29651
  init(this, options, instance$g, create_fragment$g, safe_not_equal, {
29611
- callback: 4,
29652
+ callback: 5,
29612
29653
  key: 0,
29613
- label: 5,
29614
- messageKey: 1
29654
+ label: 6,
29655
+ messageKey: 1,
29656
+ showPolicies: 2
29615
29657
  });
29616
29658
  }
29617
29659
  }
@@ -30439,7 +30481,8 @@ function create_default_slot$7(ctx) {
30439
30481
  props: {
30440
30482
  callback: /*callback*/ ctx[0],
30441
30483
  label: /*prompt*/ ctx[3],
30442
- messageKey: "passwordRequirements"
30484
+ messageKey: "passwordRequirements",
30485
+ showPolicies: true
30443
30486
  }
30444
30487
  });
30445
30488
 
@@ -33480,7 +33523,7 @@ function get_each_context$1(ctx, list, i) {
33480
33523
  return child_ctx;
33481
33524
  }
33482
33525
 
33483
- // (44:2) {#if form?.icon}
33526
+ // (41:2) {#if form?.icon}
33484
33527
  function create_if_block_2$2(ctx) {
33485
33528
  let div;
33486
33529
  let newusericon;
@@ -33520,7 +33563,7 @@ function create_if_block_2$2(ctx) {
33520
33563
  };
33521
33564
  }
33522
33565
 
33523
- // (59:2) {#if form.message}
33566
+ // (56:2) {#if form.message}
33524
33567
  function create_if_block_1$2(ctx) {
33525
33568
  let alert;
33526
33569
  let current;
@@ -33568,7 +33611,7 @@ function create_if_block_1$2(ctx) {
33568
33611
  };
33569
33612
  }
33570
33613
 
33571
- // (60:4) <Alert id="formFailureMessageAlert" needsFocus={alertNeedsFocus} type="error">
33614
+ // (57:4) <Alert id="formFailureMessageAlert" needsFocus={alertNeedsFocus} type="error">
33572
33615
  function create_default_slot_2$1(ctx) {
33573
33616
  let t_value = interpolate(/*formMessageKey*/ ctx[6], null, /*form*/ ctx[1]?.message) + "";
33574
33617
  let t;
@@ -33589,7 +33632,7 @@ function create_default_slot_2$1(ctx) {
33589
33632
  };
33590
33633
  }
33591
33634
 
33592
- // (65:2) {#each step?.callbacks as callback, idx}
33635
+ // (62:2) {#each step?.callbacks as callback, idx}
33593
33636
  function create_each_block$1(ctx) {
33594
33637
  let callbackmapper;
33595
33638
  let current;
@@ -33642,7 +33685,7 @@ function create_each_block$1(ctx) {
33642
33685
  };
33643
33686
  }
33644
33687
 
33645
- // (77:2) {#if metadata?.step?.derived.isUserInputOptional || !metadata?.step?.derived.isStepSelfSubmittable}
33688
+ // (74:2) {#if metadata?.step?.derived.isUserInputOptional || !metadata?.step?.derived.isStepSelfSubmittable}
33646
33689
  function create_if_block$3(ctx) {
33647
33690
  let button;
33648
33691
  let current;
@@ -33691,7 +33734,7 @@ function create_if_block$3(ctx) {
33691
33734
  };
33692
33735
  }
33693
33736
 
33694
- // (78:4) <Button busy={journey?.loading} style="primary" type="submit" width="full">
33737
+ // (75:4) <Button busy={journey?.loading} style="primary" type="submit" width="full">
33695
33738
  function create_default_slot_1$2(ctx) {
33696
33739
  let t;
33697
33740
  let current;
@@ -33721,7 +33764,7 @@ function create_default_slot_1$2(ctx) {
33721
33764
  };
33722
33765
  }
33723
33766
 
33724
- // (43:0) <Form bind:formEl ariaDescribedBy="formFailureMessageAlert" onSubmitWhenValid={form?.submit}>
33767
+ // (40:0) <Form bind:formEl ariaDescribedBy="formFailureMessageAlert" onSubmitWhenValid={form?.submit}>
33725
33768
  function create_default_slot$3(ctx) {
33726
33769
  let t0;
33727
33770
  let h1;
@@ -34090,7 +34133,7 @@ class Registration extends SvelteComponent {
34090
34133
  }
34091
34134
  }
34092
34135
 
34093
- /* src/lib/journey/stages/username-password.svelte generated by Svelte v3.55.1 */
34136
+ /* src/lib/journey/stages/login.svelte generated by Svelte v3.55.1 */
34094
34137
 
34095
34138
  function get_each_context(ctx, list, i) {
34096
34139
  const child_ctx = ctx.slice();
@@ -34099,7 +34142,7 @@ function get_each_context(ctx, list, i) {
34099
34142
  return child_ctx;
34100
34143
  }
34101
34144
 
34102
- // (44:2) {#if form?.icon}
34145
+ // (41:2) {#if form?.icon}
34103
34146
  function create_if_block_2$1(ctx) {
34104
34147
  let div;
34105
34148
  let keyicon;
@@ -34139,7 +34182,7 @@ function create_if_block_2$1(ctx) {
34139
34182
  };
34140
34183
  }
34141
34184
 
34142
- // (53:2) {#if form?.message}
34185
+ // (50:2) {#if form?.message}
34143
34186
  function create_if_block_1$1(ctx) {
34144
34187
  let alert;
34145
34188
  let current;
@@ -34187,7 +34230,7 @@ function create_if_block_1$1(ctx) {
34187
34230
  };
34188
34231
  }
34189
34232
 
34190
- // (54:4) <Alert id="formFailureMessageAlert" needsFocus={alertNeedsFocus} type="error">
34233
+ // (51:4) <Alert id="formFailureMessageAlert" needsFocus={alertNeedsFocus} type="error">
34191
34234
  function create_default_slot_2(ctx) {
34192
34235
  let t_value = interpolate(/*formMessageKey*/ ctx[6], null, /*form*/ ctx[1]?.message) + "";
34193
34236
  let t;
@@ -34208,7 +34251,7 @@ function create_default_slot_2(ctx) {
34208
34251
  };
34209
34252
  }
34210
34253
 
34211
- // (59:2) {#each step?.callbacks as callback, idx}
34254
+ // (56:2) {#each step?.callbacks as callback, idx}
34212
34255
  function create_each_block(ctx) {
34213
34256
  let callbackmapper;
34214
34257
  let current;
@@ -34261,7 +34304,7 @@ function create_each_block(ctx) {
34261
34304
  };
34262
34305
  }
34263
34306
 
34264
- // (71:2) {#if metadata?.step?.derived.isUserInputOptional || !metadata?.step?.derived.isStepSelfSubmittable}
34307
+ // (68:2) {#if metadata?.step?.derived.isUserInputOptional || !metadata?.step?.derived.isStepSelfSubmittable}
34265
34308
  function create_if_block$2(ctx) {
34266
34309
  let button;
34267
34310
  let current;
@@ -34310,7 +34353,7 @@ function create_if_block$2(ctx) {
34310
34353
  };
34311
34354
  }
34312
34355
 
34313
- // (72:4) <Button busy={journey?.loading} style="primary" type="submit" width="full">
34356
+ // (69:4) <Button busy={journey?.loading} style="primary" type="submit" width="full">
34314
34357
  function create_default_slot_1$1(ctx) {
34315
34358
  let t;
34316
34359
  let current;
@@ -34340,7 +34383,7 @@ function create_default_slot_1$1(ctx) {
34340
34383
  };
34341
34384
  }
34342
34385
 
34343
- // (43:0) <Form bind:formEl ariaDescribedBy="formFailureMessageAlert" onSubmitWhenValid={form?.submit}>
34386
+ // (40:0) <Form bind:formEl ariaDescribedBy="formFailureMessageAlert" onSubmitWhenValid={form?.submit}>
34344
34387
  function create_default_slot$2(ctx) {
34345
34388
  let t0;
34346
34389
  let h1;
@@ -34742,7 +34785,7 @@ function instance$2($$self, $$props, $$invalidate) {
34742
34785
  ];
34743
34786
  }
34744
34787
 
34745
- class Username_password extends SvelteComponent {
34788
+ class Login extends SvelteComponent {
34746
34789
  constructor(options) {
34747
34790
  super();
34748
34791
 
@@ -34770,10 +34813,10 @@ function mapStepToStage(currentStep) {
34770
34813
  switch (currentStep?.getStage && currentStep.getStage()) {
34771
34814
  case 'OneTimePassword':
34772
34815
  return One_time_password;
34773
- case 'Registration':
34816
+ case 'DefaultRegistration':
34774
34817
  return Registration;
34775
- case 'UsernamePassword':
34776
- return Username_password;
34818
+ case 'DefaultLogin':
34819
+ return Login;
34777
34820
  default:
34778
34821
  return Generic;
34779
34822
  }