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

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.js CHANGED
@@ -35407,7 +35407,7 @@ function create_else_block$1(ctx) {
35407
35407
  };
35408
35408
  }
35409
35409
 
35410
- // (53:36)
35410
+ // (56:52)
35411
35411
  function create_if_block_3(ctx) {
35412
35412
  let div;
35413
35413
  let spinner;
@@ -35448,7 +35448,7 @@ function create_if_block_3(ctx) {
35448
35448
  };
35449
35449
  }
35450
35450
 
35451
- // (27:0) {#if !$journeyStore?.completed}
35451
+ // (30:0) {#if $journeyStore && !$journeyStore.completed}
35452
35452
  function create_if_block$1(ctx) {
35453
35453
  let current_block_type_index;
35454
35454
  let if_block;
@@ -35458,8 +35458,8 @@ function create_if_block$1(ctx) {
35458
35458
  const if_blocks = [];
35459
35459
 
35460
35460
  function select_block_type_1(ctx, dirty) {
35461
- if (!/*$journeyStore*/ ctx[5].step) return 0;
35462
- if (/*$journeyStore*/ ctx[5].step.type === StepType$1.Step) return 1;
35461
+ if (/*$journeyStore*/ ctx[5] && !/*$journeyStore*/ ctx[5].step) return 0;
35462
+ if (/*$journeyStore*/ ctx[5].step?.type === StepType$1.Step) return 1;
35463
35463
  return -1;
35464
35464
  }
35465
35465
 
@@ -35535,7 +35535,7 @@ function create_if_block$1(ctx) {
35535
35535
  };
35536
35536
  }
35537
35537
 
35538
- // (58:2) <Alert id="unrecoverableStepError" needsFocus={alertNeedsFocus} type="error">
35538
+ // (61:2) <Alert id="unrecoverableStepError" needsFocus={alertNeedsFocus} type="error">
35539
35539
  function create_default_slot_1(ctx) {
35540
35540
  let t;
35541
35541
  let current;
@@ -35568,7 +35568,7 @@ function create_default_slot_1(ctx) {
35568
35568
  };
35569
35569
  }
35570
35570
 
35571
- // (61:2) <Button style="secondary" onClick={tryAgain}>
35571
+ // (64:2) <Button style="secondary" onClick={tryAgain}>
35572
35572
  function create_default_slot$1(ctx) {
35573
35573
  let t;
35574
35574
  let current;
@@ -35598,7 +35598,7 @@ function create_default_slot$1(ctx) {
35598
35598
  };
35599
35599
  }
35600
35600
 
35601
- // (32:54)
35601
+ // (35:55)
35602
35602
  function create_if_block_2(ctx) {
35603
35603
  let switch_instance;
35604
35604
  let updating_formEl;
@@ -35720,7 +35720,7 @@ function create_if_block_2(ctx) {
35720
35720
  };
35721
35721
  }
35722
35722
 
35723
- // (28:2) {#if !$journeyStore.step}
35723
+ // (31:2) {#if $journeyStore && !$journeyStore.step}
35724
35724
  function create_if_block_1(ctx) {
35725
35725
  let div;
35726
35726
  let spinner;
@@ -35770,8 +35770,8 @@ function create_fragment$1(ctx) {
35770
35770
  const if_blocks = [];
35771
35771
 
35772
35772
  function select_block_type(ctx, dirty) {
35773
- if (!/*$journeyStore*/ ctx[5]?.completed) return 0;
35774
- if (/*$journeyStore*/ ctx[5]?.successful) return 1;
35773
+ if (/*$journeyStore*/ ctx[5] && !/*$journeyStore*/ ctx[5].completed) return 0;
35774
+ if (/*$journeyStore*/ ctx[5] && /*$journeyStore*/ ctx[5].successful) return 1;
35775
35775
  return 2;
35776
35776
  }
35777
35777
 
@@ -35842,6 +35842,11 @@ function instance$1($$self, $$props, $$invalidate) {
35842
35842
  let { formEl = null } = $$props;
35843
35843
  let { journeyStore } = $$props;
35844
35844
  $$subscribe_journeyStore();
35845
+
35846
+ if (!$journeyStore) {
35847
+ console.error('Widget missing configuration. Import and call `configuration()`, then use `set()` to configure.');
35848
+ }
35849
+
35845
35850
  let alertNeedsFocus = false;
35846
35851
 
35847
35852
  function submitForm() {
@@ -35855,7 +35860,7 @@ function instance$1($$self, $$props, $$invalidate) {
35855
35860
  }
35856
35861
 
35857
35862
  afterUpdate(() => {
35858
- $$invalidate(4, alertNeedsFocus = !$journeyStore.successful);
35863
+ $$invalidate(4, alertNeedsFocus = $journeyStore && !$journeyStore.successful);
35859
35864
  });
35860
35865
 
35861
35866
  function switch_instance_formEl_binding(value) {