@forgerock/login-widget 1.0.0-beta.15 → 1.0.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,24 +1,35 @@
1
- # [1.0.0-beta.15](https://github.com/forgerock/forgerock-web-login-framework/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-27)
1
+ # [1.0.0-beta.17](https://github.com/forgerock/forgerock-web-login-framework/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-05)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * **login-failure:** handle 500 failures within login store ([90fb461](https://github.com/forgerock/forgerock-web-login-framework/commit/90fb461e2598f929e4b418c9794f8b085e433e54))
6
+ * **types.ts:** rename the types file where we missed it and fix release ([6071603](https://github.com/forgerock/forgerock-web-login-framework/commit/6071603026ed2134da036c14de0be1d416708fe1))
7
7
 
8
- # [1.0.0-beta.14](https://github.com/forgerock/forgerock-web-login-framework/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-27)
8
+ # [1.0.0-beta.16](https://github.com/forgerock/forgerock-web-login-framework/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-30)
9
9
 
10
10
 
11
11
  ### Bug Fixes
12
12
 
13
- * **configuration:** improve handling and reporting of missing configuration ([a611623](https://github.com/forgerock/forgerock-web-login-framework/commit/a611623d7c33b0af18483ccad81a8725e461be65))
13
+ * **confirm-input:** make confirm input required when password is filled ([0c8325c](https://github.com/forgerock/forgerock-web-login-framework/commit/0c8325cd2e0a9959c3a88b2e4aa8abd6e931456b))
14
14
 
15
- # [1.0.0-beta.13](https://github.com/forgerock/forgerock-web-login-framework/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-27)
15
+ # [1.0.0-beta.15](https://github.com/forgerock/forgerock-web-login-framework/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-27)
16
+
17
+ ### Bug Fixes
18
+
19
+ - **login-failure:** handle 500 failures within login store ([90fb461](https://github.com/forgerock/forgerock-web-login-framework/commit/90fb461e2598f929e4b418c9794f8b085e433e54))
16
20
 
21
+ # [1.0.0-beta.14](https://github.com/forgerock/forgerock-web-login-framework/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-27)
22
+
23
+ ### Bug Fixes
24
+
25
+ - **configuration:** improve handling and reporting of missing configuration ([a611623](https://github.com/forgerock/forgerock-web-login-framework/commit/a611623d7c33b0af18483ccad81a8725e461be65))
26
+
27
+ # [1.0.0-beta.13](https://github.com/forgerock/forgerock-web-login-framework/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-27)
17
28
 
18
29
  ### Bug Fixes
19
30
 
20
- * **password:** fix password confirmation reset and validation failures ([5b7d039](https://github.com/forgerock/forgerock-web-login-framework/commit/5b7d039ed8feb7eb7053b6818425c9a32b0e667c))
21
- * **style:** reworking application of headers and footers of widget ([1aa8306](https://github.com/forgerock/forgerock-web-login-framework/commit/1aa8306366127e38145fb6e69298da160349cd0e))
31
+ - **password:** fix password confirmation reset and validation failures ([5b7d039](https://github.com/forgerock/forgerock-web-login-framework/commit/5b7d039ed8feb7eb7053b6818425c9a32b0e667c))
32
+ - **style:** reworking application of headers and footers of widget ([1aa8306](https://github.com/forgerock/forgerock-web-login-framework/commit/1aa8306366127e38145fb6e69298da160349cd0e))
22
33
 
23
34
  # [1.0.0-beta.12](https://github.com/forgerock/forgerock-web-login-framework/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2023-03-27)
24
35
 
package/index.cjs CHANGED
@@ -17735,8 +17735,7 @@ function initialize$4(initOptions) {
17735
17735
  error: {
17736
17736
  code: nextStep.getCode(),
17737
17737
  message: failureMessageStr,
17738
- // TODO: Should we remove the callbacks for PII info?
17739
- step: prevStep?.payload,
17738
+ stage: prevStep?.payload?.stage,
17740
17739
  troubleshoot: null,
17741
17740
  },
17742
17741
  loading: false,
@@ -17766,8 +17765,7 @@ function initialize$4(initOptions) {
17766
17765
  error: {
17767
17766
  code: nextStep.getCode(),
17768
17767
  message: failureMessageStr,
17769
- // TODO: Should we remove the callbacks for PII info?
17770
- step: prevStep?.payload,
17768
+ stage: prevStep?.payload?.stage,
17771
17769
  troubleshoot: null,
17772
17770
  },
17773
17771
  loading: false,
@@ -23116,7 +23114,7 @@ function get_each_context$7(ctx, list, i) {
23116
23114
  return child_ctx;
23117
23115
  }
23118
23116
 
23119
- // (40:0) {#if labelOrder === 'first'}
23117
+ // (39:0) {#if labelOrder === 'first'}
23120
23118
  function create_if_block_1$a(ctx) {
23121
23119
  let label_1;
23122
23120
  let current;
@@ -23164,7 +23162,7 @@ function create_if_block_1$a(ctx) {
23164
23162
  };
23165
23163
  }
23166
23164
 
23167
- // (41:2) <Label {key} classes={`${labelClasses}`}>
23165
+ // (40:2) <Label {key} classes={`${labelClasses}`}>
23168
23166
  function create_default_slot_1$b(ctx) {
23169
23167
  let t;
23170
23168
 
@@ -23184,7 +23182,7 @@ function create_default_slot_1$b(ctx) {
23184
23182
  };
23185
23183
  }
23186
23184
 
23187
- // (55:2) {#each options as option}
23185
+ // (54:2) {#each options as option}
23188
23186
  function create_each_block$7(ctx) {
23189
23187
  let option;
23190
23188
  let t0_value = /*option*/ ctx[15].text + "";
@@ -23225,7 +23223,7 @@ function create_each_block$7(ctx) {
23225
23223
  };
23226
23224
  }
23227
23225
 
23228
- // (62:0) {#if labelOrder === 'last'}
23226
+ // (61:0) {#if labelOrder === 'last'}
23229
23227
  function create_if_block$g(ctx) {
23230
23228
  let label_1;
23231
23229
  let current;
@@ -23278,7 +23276,7 @@ function create_if_block$g(ctx) {
23278
23276
  };
23279
23277
  }
23280
23278
 
23281
- // (63:2) <Label {key} classes={`${shouldDisplayOption ? labelClasses : 'tw_sr-only'}`}>
23279
+ // (62:2) <Label {key} classes={`${shouldDisplayOption ? labelClasses : 'tw_sr-only'}`}>
23282
23280
  function create_default_slot$i(ctx) {
23283
23281
  let t;
23284
23282
 
@@ -23517,8 +23515,6 @@ function instance$E($$self, $$props, $$invalidate) {
23517
23515
  // Check if text is same as label
23518
23516
  $$invalidate(10, shouldDisplayOption = !(label === selectedOption?.text));
23519
23517
 
23520
- console.log(shouldDisplayOption);
23521
-
23522
23518
  // Continue with calling onChange parameter
23523
23519
  onChange(event);
23524
23520
  }
@@ -27405,8 +27401,8 @@ class Eye_icon extends SvelteComponent {
27405
27401
 
27406
27402
  function create_default_slot_1$8(ctx) {
27407
27403
  let current;
27408
- const default_slot_template = /*#slots*/ ctx[14].default;
27409
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[15], null);
27404
+ const default_slot_template = /*#slots*/ ctx[15].default;
27405
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[16], null);
27410
27406
 
27411
27407
  return {
27412
27408
  c() {
@@ -27421,15 +27417,15 @@ function create_default_slot_1$8(ctx) {
27421
27417
  },
27422
27418
  p(ctx, dirty) {
27423
27419
  if (default_slot) {
27424
- if (default_slot.p && (!current || dirty & /*$$scope*/ 32768)) {
27420
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 65536)) {
27425
27421
  update_slot_base(
27426
27422
  default_slot,
27427
27423
  default_slot_template,
27428
27424
  ctx,
27429
- /*$$scope*/ ctx[15],
27425
+ /*$$scope*/ ctx[16],
27430
27426
  !current
27431
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[15])
27432
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[15], dirty, null),
27427
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[16])
27428
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[16], dirty, null),
27433
27429
  null
27434
27430
  );
27435
27431
  }
@@ -27450,7 +27446,7 @@ function create_default_slot_1$8(ctx) {
27450
27446
  };
27451
27447
  }
27452
27448
 
27453
- // (59:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
27449
+ // (69:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
27454
27450
  function create_default_slot$f(ctx) {
27455
27451
  let t;
27456
27452
  let current;
@@ -27480,7 +27476,7 @@ function create_default_slot$f(ctx) {
27480
27476
  };
27481
27477
  }
27482
27478
 
27483
- // (53:2)
27479
+ // (63:2)
27484
27480
  function create_input_button_slot$1(ctx) {
27485
27481
  let button;
27486
27482
  let eyeicon;
@@ -27511,7 +27507,7 @@ function create_input_button_slot$1(ctx) {
27511
27507
  current = true;
27512
27508
 
27513
27509
  if (!mounted) {
27514
- dispose = listen(button, "click", /*toggleVisibility*/ ctx[10]);
27510
+ dispose = listen(button, "click", /*toggleVisibility*/ ctx[11]);
27515
27511
  mounted = true;
27516
27512
  }
27517
27513
  },
@@ -27519,7 +27515,7 @@ function create_input_button_slot$1(ctx) {
27519
27515
  const eyeicon_changes = {};
27520
27516
  if (dirty & /*isVisible*/ 64) eyeicon_changes.visible = /*isVisible*/ ctx[6];
27521
27517
 
27522
- if (dirty & /*$$scope*/ 32768) {
27518
+ if (dirty & /*$$scope*/ 65536) {
27523
27519
  eyeicon_changes.$$scope = { dirty, ctx };
27524
27520
  }
27525
27521
 
@@ -27547,18 +27543,16 @@ function create_fragment$q(ctx) {
27547
27543
  let input;
27548
27544
  let current;
27549
27545
 
27550
- input = new /*Input*/ ctx[8]({
27546
+ input = new /*Input*/ ctx[9]({
27551
27547
  props: {
27552
27548
  forceValidityFailure: /*forceValidityFailure*/ ctx[0],
27553
27549
  isFirstInvalidInput: false,
27554
27550
  hasRightIcon: true,
27555
27551
  key: `${/*key*/ ctx[3]}-confirm`,
27556
27552
  label: interpolate('confirmPassword', null, 'Confirm Password'),
27557
- message: /*isInvalid*/ ctx[1]
27558
- ? interpolate('passwordConfirmationError', null, 'Passwords do not match')
27559
- : undefined,
27560
- onChange: /*onChangeWrapper*/ ctx[9],
27561
- isInvalid: /*isInvalid*/ ctx[1],
27553
+ message: /*message*/ ctx[8],
27554
+ onChange: /*onChangeWrapper*/ ctx[10],
27555
+ isInvalid: /*passwordsDoNotMatch*/ ctx[1],
27562
27556
  isRequired: /*isRequired*/ ctx[2],
27563
27557
  showMessage: /*showMessage*/ ctx[4],
27564
27558
  type: /*type*/ ctx[7],
@@ -27585,12 +27579,8 @@ function create_fragment$q(ctx) {
27585
27579
  const input_changes = {};
27586
27580
  if (dirty & /*forceValidityFailure*/ 1) input_changes.forceValidityFailure = /*forceValidityFailure*/ ctx[0];
27587
27581
  if (dirty & /*key*/ 8) input_changes.key = `${/*key*/ ctx[3]}-confirm`;
27588
-
27589
- if (dirty & /*isInvalid*/ 2) input_changes.message = /*isInvalid*/ ctx[1]
27590
- ? interpolate('passwordConfirmationError', null, 'Passwords do not match')
27591
- : undefined;
27592
-
27593
- if (dirty & /*isInvalid*/ 2) input_changes.isInvalid = /*isInvalid*/ ctx[1];
27582
+ if (dirty & /*message*/ 256) input_changes.message = /*message*/ ctx[8];
27583
+ if (dirty & /*passwordsDoNotMatch*/ 2) input_changes.isInvalid = /*passwordsDoNotMatch*/ ctx[1];
27594
27584
  if (dirty & /*isRequired*/ 4) input_changes.isRequired = /*isRequired*/ ctx[2];
27595
27585
  if (dirty & /*showMessage*/ 16) input_changes.showMessage = /*showMessage*/ ctx[4];
27596
27586
  if (dirty & /*type*/ 128) input_changes.type = /*type*/ ctx[7];
@@ -27599,7 +27589,7 @@ function create_fragment$q(ctx) {
27599
27589
  ? /*value*/ ctx[5]
27600
27590
  : '';
27601
27591
 
27602
- if (dirty & /*$$scope, isVisible*/ 32832) {
27592
+ if (dirty & /*$$scope, isVisible*/ 65600) {
27603
27593
  input_changes.$$scope = { dirty, ctx };
27604
27594
  }
27605
27595
 
@@ -27623,8 +27613,8 @@ function create_fragment$q(ctx) {
27623
27613
  function instance$q($$self, $$props, $$invalidate) {
27624
27614
  let { $$slots: slots = {}, $$scope } = $$props;
27625
27615
  let { forceValidityFailure = false } = $$props;
27626
- let { isInvalid = false } = $$props;
27627
- let { isRequired = true } = $$props;
27616
+ let { passwordsDoNotMatch = false } = $$props;
27617
+ let { isRequired = false } = $$props;
27628
27618
  let { key } = $$props;
27629
27619
  let { onChange } = $$props;
27630
27620
  let { resetValue } = $$props;
@@ -27634,6 +27624,7 @@ function instance$q($$self, $$props, $$invalidate) {
27634
27624
  let isVisible = false;
27635
27625
  let type = 'password';
27636
27626
  let value;
27627
+ let message = '';
27637
27628
 
27638
27629
  function onChangeWrapper(event) {
27639
27630
  $$invalidate(5, value = event.target?.value);
@@ -27652,36 +27643,45 @@ function instance$q($$self, $$props, $$invalidate) {
27652
27643
 
27653
27644
  $$self.$$set = $$props => {
27654
27645
  if ('forceValidityFailure' in $$props) $$invalidate(0, forceValidityFailure = $$props.forceValidityFailure);
27655
- if ('isInvalid' in $$props) $$invalidate(1, isInvalid = $$props.isInvalid);
27646
+ if ('passwordsDoNotMatch' in $$props) $$invalidate(1, passwordsDoNotMatch = $$props.passwordsDoNotMatch);
27656
27647
  if ('isRequired' in $$props) $$invalidate(2, isRequired = $$props.isRequired);
27657
27648
  if ('key' in $$props) $$invalidate(3, key = $$props.key);
27658
- if ('onChange' in $$props) $$invalidate(11, onChange = $$props.onChange);
27659
- if ('resetValue' in $$props) $$invalidate(12, resetValue = $$props.resetValue);
27660
- if ('style' in $$props) $$invalidate(13, style = $$props.style);
27649
+ if ('onChange' in $$props) $$invalidate(12, onChange = $$props.onChange);
27650
+ if ('resetValue' in $$props) $$invalidate(13, resetValue = $$props.resetValue);
27651
+ if ('style' in $$props) $$invalidate(14, style = $$props.style);
27661
27652
  if ('showMessage' in $$props) $$invalidate(4, showMessage = $$props.showMessage);
27662
- if ('$$scope' in $$props) $$invalidate(15, $$scope = $$props.$$scope);
27653
+ if ('$$scope' in $$props) $$invalidate(16, $$scope = $$props.$$scope);
27663
27654
  };
27664
27655
 
27665
27656
  $$self.$$.update = () => {
27666
- if ($$self.$$.dirty & /*resetValue, onChange, value*/ 6176) {
27657
+ if ($$self.$$.dirty & /*resetValue, onChange, value, passwordsDoNotMatch, isRequired*/ 12326) {
27667
27658
  {
27668
27659
  if (resetValue) {
27669
27660
  $$invalidate(5, value = undefined);
27670
27661
  onChange(value);
27671
27662
  }
27663
+
27664
+ if (passwordsDoNotMatch) {
27665
+ $$invalidate(8, message = interpolate('passwordConfirmationError', null, 'Passwords do not match'));
27666
+ } else if (isRequired) {
27667
+ $$invalidate(8, message = interpolate('requiredField', null, 'This field is required'));
27668
+ } else {
27669
+ $$invalidate(8, message = '');
27670
+ }
27672
27671
  }
27673
27672
  }
27674
27673
  };
27675
27674
 
27676
27675
  return [
27677
27676
  forceValidityFailure,
27678
- isInvalid,
27677
+ passwordsDoNotMatch,
27679
27678
  isRequired,
27680
27679
  key,
27681
27680
  showMessage,
27682
27681
  value,
27683
27682
  isVisible,
27684
27683
  type,
27684
+ message,
27685
27685
  Input,
27686
27686
  onChangeWrapper,
27687
27687
  toggleVisibility,
@@ -27699,12 +27699,12 @@ class Confirm_input extends SvelteComponent {
27699
27699
 
27700
27700
  init(this, options, instance$q, create_fragment$q, safe_not_equal, {
27701
27701
  forceValidityFailure: 0,
27702
- isInvalid: 1,
27702
+ passwordsDoNotMatch: 1,
27703
27703
  isRequired: 2,
27704
27704
  key: 3,
27705
- onChange: 11,
27706
- resetValue: 12,
27707
- style: 13,
27705
+ onChange: 12,
27706
+ resetValue: 13,
27707
+ style: 14,
27708
27708
  showMessage: 4
27709
27709
  });
27710
27710
  }
@@ -27860,8 +27860,9 @@ function create_if_block$a(ctx) {
27860
27860
  confirminput = new Confirm_input({
27861
27861
  props: {
27862
27862
  forceValidityFailure: /*doPasswordsMatch*/ ctx[9] === false,
27863
- isInvalid: /*doPasswordsMatch*/ ctx[9] === false,
27863
+ passwordsDoNotMatch: /*doPasswordsMatch*/ ctx[9] === false,
27864
27864
  key: /*key*/ ctx[0],
27865
+ isRequired: /*value*/ ctx[7].length > 0,
27865
27866
  onChange: /*confirmInput*/ ctx[15],
27866
27867
  resetValue: /*resetValue*/ ctx[11],
27867
27868
  showMessage: /*doPasswordsMatch*/ ctx[9] === false,
@@ -27880,8 +27881,9 @@ function create_if_block$a(ctx) {
27880
27881
  p(ctx, dirty) {
27881
27882
  const confirminput_changes = {};
27882
27883
  if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.forceValidityFailure = /*doPasswordsMatch*/ ctx[9] === false;
27883
- if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.isInvalid = /*doPasswordsMatch*/ ctx[9] === false;
27884
+ if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.passwordsDoNotMatch = /*doPasswordsMatch*/ ctx[9] === false;
27884
27885
  if (dirty & /*key*/ 1) confirminput_changes.key = /*key*/ ctx[0];
27886
+ if (dirty & /*value*/ 128) confirminput_changes.isRequired = /*value*/ ctx[7].length > 0;
27885
27887
  if (dirty & /*resetValue*/ 2048) confirminput_changes.resetValue = /*resetValue*/ ctx[11];
27886
27888
  if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.showMessage = /*doPasswordsMatch*/ ctx[9] === false;
27887
27889
  if (dirty & /*style*/ 16) confirminput_changes.style = /*style*/ ctx[4];