@forgerock/login-widget 1.2.0-beta.6 → 1.2.0-beta.7

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,3 +1,10 @@
1
+ # [1.2.0-beta.7](https://github.com/forgerock/forgerock-web-login-framework/compare/v1.2.0-beta.6...v1.2.0-beta.7) (2023-10-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **e2e-defaults:** improve e2e test usage convention and default redirect url ([e988eb1](https://github.com/forgerock/forgerock-web-login-framework/commit/e988eb14cd616d490ffca9e930f2b0df6f82685f))
7
+
1
8
  # [1.2.0-beta.6](https://github.com/forgerock/forgerock-web-login-framework/compare/v1.2.0-beta.5...v1.2.0-beta.6) (2023-10-19)
2
9
 
3
10
 
package/index.cjs CHANGED
@@ -12347,7 +12347,10 @@ function widgetApiFactory(componentApi) {
12347
12347
  // https://backstage.forgerock.com/docs/am/7/setup-guide/sec-rest-realm-rest.html#rest-api-list-realm
12348
12348
  realmPath: 'alpha',
12349
12349
  // TODO: Once we move to SSR, this default should be more intelligent
12350
- redirectUri: typeof window === 'object' ? window.location.href : 'https://localhost:3000/callback',
12350
+ redirectUri: typeof window === 'object'
12351
+ ? // Construct URL with origin and path only, stripping off hash and query params
12352
+ `${window.location.origin}${window.location.pathname}`
12353
+ : 'https://localhost:3000/callback',
12351
12354
  scope: 'openid email',
12352
12355
  },
12353
12356
  // Let user provided config override defaults
@@ -16534,7 +16537,7 @@ function get_each_context$a(ctx, list, i) {
16534
16537
  return child_ctx;
16535
16538
  }
16536
16539
 
16537
- // (41:8) <Label key={`${key}-${option.value}`} classes="tw_input-spacing tw_grid tw_grid-cols-[2.5em_1fr] tw_relative" >
16540
+ // (40:8) <Label key={`${key}-${option.value}`} classes="tw_input-spacing tw_grid tw_grid-cols-[2.5em_1fr] tw_relative" >
16538
16541
  function create_default_slot$o(ctx) {
16539
16542
  let span;
16540
16543
  let t0;
@@ -16594,7 +16597,6 @@ function create_each_block$a(ctx) {
16594
16597
  t0 = space();
16595
16598
  create_component(label.$$.fragment);
16596
16599
  t1 = space();
16597
- attr(input, "aria-invalid", /*isInvalid*/ ctx[4]);
16598
16600
  attr(input, "class", "tw_radio-input_animated dark:tw_radio-input_animated_dark tw_sr-only");
16599
16601
  input.checked = input_checked_value = /*defaultOption*/ ctx[0] === /*option*/ ctx[13].value;
16600
16602
  attr(input, "id", input_id_value = `${/*key*/ ctx[5]}-${/*option*/ ctx[13].value}`);
@@ -16624,10 +16626,6 @@ function create_each_block$a(ctx) {
16624
16626
  p(new_ctx, dirty) {
16625
16627
  ctx = new_ctx;
16626
16628
 
16627
- if (!current || dirty & /*isInvalid*/ 16) {
16628
- attr(input, "aria-invalid", /*isInvalid*/ ctx[4]);
16629
- }
16630
-
16631
16629
  if (!current || dirty & /*defaultOption, options*/ 257 && input_checked_value !== (input_checked_value = /*defaultOption*/ ctx[0] === /*option*/ ctx[13].value)) {
16632
16630
  input.checked = input_checked_value;
16633
16631
  }
@@ -16745,7 +16743,7 @@ function create_fragment$M(ctx) {
16745
16743
  p(ctx, [dirty]) {
16746
16744
  if (!current || dirty & /*groupLabel*/ 4) set_data(t0, /*groupLabel*/ ctx[2]);
16747
16745
 
16748
- if (dirty & /*key, options, isInvalid, defaultOption, name, isRequired, inputEl, onChange*/ 1529) {
16746
+ if (dirty & /*key, options, defaultOption, name, isRequired, inputEl, onChange*/ 1513) {
16749
16747
  each_value = /*options*/ ctx[8];
16750
16748
  let i;
16751
16749
 
@@ -16889,8 +16887,8 @@ class Animated extends SvelteComponent {
16889
16887
 
16890
16888
  function create_default_slot$n(ctx) {
16891
16889
  let current;
16892
- const default_slot_template = /*#slots*/ ctx[9].default;
16893
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[11], null);
16890
+ const default_slot_template = /*#slots*/ ctx[8].default;
16891
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[10], null);
16894
16892
 
16895
16893
  return {
16896
16894
  c() {
@@ -16905,15 +16903,15 @@ function create_default_slot$n(ctx) {
16905
16903
  },
16906
16904
  p(ctx, dirty) {
16907
16905
  if (default_slot) {
16908
- if (default_slot.p && (!current || dirty & /*$$scope*/ 2048)) {
16906
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 1024)) {
16909
16907
  update_slot_base(
16910
16908
  default_slot,
16911
16909
  default_slot_template,
16912
16910
  ctx,
16913
- /*$$scope*/ ctx[11],
16911
+ /*$$scope*/ ctx[10],
16914
16912
  !current
16915
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[11])
16916
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[11], dirty, null),
16913
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[10])
16914
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[10], dirty, null),
16917
16915
  null
16918
16916
  );
16919
16917
  }
@@ -16945,7 +16943,7 @@ function create_fragment$L(ctx) {
16945
16943
 
16946
16944
  label = new Label({
16947
16945
  props: {
16948
- key: /*key*/ ctx[3],
16946
+ key: /*key*/ ctx[2],
16949
16947
  $$slots: { default: [create_default_slot$n] },
16950
16948
  $$scope: { ctx }
16951
16949
  }
@@ -16956,26 +16954,25 @@ function create_fragment$L(ctx) {
16956
16954
  input = element("input");
16957
16955
  t = space();
16958
16956
  create_component(label.$$.fragment);
16959
- attr(input, "aria-describedby", input_aria_describedby_value = `${/*key*/ ctx[3]}-message`);
16960
- attr(input, "aria-invalid", /*isInvalid*/ ctx[2]);
16957
+ attr(input, "aria-describedby", input_aria_describedby_value = `${/*key*/ ctx[2]}-message`);
16961
16958
  attr(input, "class", "tw_checkbox-input dark:tw_checkbox-input_dark tw_focusable-element dark:tw_focusable-element_dark");
16962
16959
  input.checked = /*checked*/ ctx[0];
16963
- attr(input, "id", /*key*/ ctx[3]);
16964
- attr(input, "name", /*name*/ ctx[4]);
16960
+ attr(input, "id", /*key*/ ctx[2]);
16961
+ attr(input, "name", /*name*/ ctx[3]);
16965
16962
  input.required = /*isRequired*/ ctx[1];
16966
16963
  attr(input, "type", "radio");
16967
- input.value = /*value*/ ctx[6];
16964
+ input.value = /*value*/ ctx[5];
16968
16965
  },
16969
16966
  m(target, anchor) {
16970
16967
  insert(target, input, anchor);
16971
- /*input_binding*/ ctx[10](input);
16968
+ /*input_binding*/ ctx[9](input);
16972
16969
  insert(target, t, anchor);
16973
16970
  mount_component(label, target, anchor);
16974
16971
  current = true;
16975
16972
 
16976
16973
  if (!mounted) {
16977
16974
  dispose = listen(input, "change", function () {
16978
- if (is_function(/*onChange*/ ctx[5])) /*onChange*/ ctx[5].apply(this, arguments);
16975
+ if (is_function(/*onChange*/ ctx[4])) /*onChange*/ ctx[4].apply(this, arguments);
16979
16976
  });
16980
16977
 
16981
16978
  mounted = true;
@@ -16984,38 +16981,34 @@ function create_fragment$L(ctx) {
16984
16981
  p(new_ctx, [dirty]) {
16985
16982
  ctx = new_ctx;
16986
16983
 
16987
- if (!current || dirty & /*key*/ 8 && input_aria_describedby_value !== (input_aria_describedby_value = `${/*key*/ ctx[3]}-message`)) {
16984
+ if (!current || dirty & /*key*/ 4 && input_aria_describedby_value !== (input_aria_describedby_value = `${/*key*/ ctx[2]}-message`)) {
16988
16985
  attr(input, "aria-describedby", input_aria_describedby_value);
16989
16986
  }
16990
16987
 
16991
- if (!current || dirty & /*isInvalid*/ 4) {
16992
- attr(input, "aria-invalid", /*isInvalid*/ ctx[2]);
16993
- }
16994
-
16995
16988
  if (!current || dirty & /*checked*/ 1) {
16996
16989
  input.checked = /*checked*/ ctx[0];
16997
16990
  }
16998
16991
 
16999
- if (!current || dirty & /*key*/ 8) {
17000
- attr(input, "id", /*key*/ ctx[3]);
16992
+ if (!current || dirty & /*key*/ 4) {
16993
+ attr(input, "id", /*key*/ ctx[2]);
17001
16994
  }
17002
16995
 
17003
- if (!current || dirty & /*name*/ 16) {
17004
- attr(input, "name", /*name*/ ctx[4]);
16996
+ if (!current || dirty & /*name*/ 8) {
16997
+ attr(input, "name", /*name*/ ctx[3]);
17005
16998
  }
17006
16999
 
17007
17000
  if (!current || dirty & /*isRequired*/ 2) {
17008
17001
  input.required = /*isRequired*/ ctx[1];
17009
17002
  }
17010
17003
 
17011
- if (!current || dirty & /*value*/ 64) {
17012
- input.value = /*value*/ ctx[6];
17004
+ if (!current || dirty & /*value*/ 32) {
17005
+ input.value = /*value*/ ctx[5];
17013
17006
  }
17014
17007
 
17015
17008
  const label_changes = {};
17016
- if (dirty & /*key*/ 8) label_changes.key = /*key*/ ctx[3];
17009
+ if (dirty & /*key*/ 4) label_changes.key = /*key*/ ctx[2];
17017
17010
 
17018
- if (dirty & /*$$scope*/ 2048) {
17011
+ if (dirty & /*$$scope*/ 1024) {
17019
17012
  label_changes.$$scope = { dirty, ctx };
17020
17013
  }
17021
17014
 
@@ -17032,7 +17025,7 @@ function create_fragment$L(ctx) {
17032
17025
  },
17033
17026
  d(detaching) {
17034
17027
  if (detaching) detach(input);
17035
- /*input_binding*/ ctx[10](null);
17028
+ /*input_binding*/ ctx[9](null);
17036
17029
  if (detaching) detach(t);
17037
17030
  destroy_component(label, detaching);
17038
17031
  mounted = false;
@@ -17046,7 +17039,6 @@ function instance$N($$self, $$props, $$invalidate) {
17046
17039
  let { checked = false } = $$props;
17047
17040
  let { isFirstInvalidInput } = $$props;
17048
17041
  let { isRequired = false } = $$props;
17049
- let { isInvalid = false } = $$props;
17050
17042
  let { key } = $$props;
17051
17043
  let { name } = $$props;
17052
17044
  let { onChange } = $$props;
@@ -17062,26 +17054,24 @@ function instance$N($$self, $$props, $$invalidate) {
17062
17054
  function input_binding($$value) {
17063
17055
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
17064
17056
  inputEl = $$value;
17065
- $$invalidate(7, inputEl);
17057
+ $$invalidate(6, inputEl);
17066
17058
  });
17067
17059
  }
17068
17060
 
17069
17061
  $$self.$$set = $$props => {
17070
17062
  if ('checked' in $$props) $$invalidate(0, checked = $$props.checked);
17071
- if ('isFirstInvalidInput' in $$props) $$invalidate(8, isFirstInvalidInput = $$props.isFirstInvalidInput);
17063
+ if ('isFirstInvalidInput' in $$props) $$invalidate(7, isFirstInvalidInput = $$props.isFirstInvalidInput);
17072
17064
  if ('isRequired' in $$props) $$invalidate(1, isRequired = $$props.isRequired);
17073
- if ('isInvalid' in $$props) $$invalidate(2, isInvalid = $$props.isInvalid);
17074
- if ('key' in $$props) $$invalidate(3, key = $$props.key);
17075
- if ('name' in $$props) $$invalidate(4, name = $$props.name);
17076
- if ('onChange' in $$props) $$invalidate(5, onChange = $$props.onChange);
17077
- if ('value' in $$props) $$invalidate(6, value = $$props.value);
17078
- if ('$$scope' in $$props) $$invalidate(11, $$scope = $$props.$$scope);
17065
+ if ('key' in $$props) $$invalidate(2, key = $$props.key);
17066
+ if ('name' in $$props) $$invalidate(3, name = $$props.name);
17067
+ if ('onChange' in $$props) $$invalidate(4, onChange = $$props.onChange);
17068
+ if ('value' in $$props) $$invalidate(5, value = $$props.value);
17069
+ if ('$$scope' in $$props) $$invalidate(10, $$scope = $$props.$$scope);
17079
17070
  };
17080
17071
 
17081
17072
  return [
17082
17073
  checked,
17083
17074
  isRequired,
17084
- isInvalid,
17085
17075
  key,
17086
17076
  name,
17087
17077
  onChange,
@@ -17100,13 +17090,12 @@ class Radio extends SvelteComponent {
17100
17090
 
17101
17091
  init(this, options, instance$N, create_fragment$L, safe_not_equal, {
17102
17092
  checked: 0,
17103
- isFirstInvalidInput: 8,
17093
+ isFirstInvalidInput: 7,
17104
17094
  isRequired: 1,
17105
- isInvalid: 2,
17106
- key: 3,
17107
- name: 4,
17108
- onChange: 5,
17109
- value: 6
17095
+ key: 2,
17096
+ name: 3,
17097
+ onChange: 4,
17098
+ value: 5
17110
17099
  });
17111
17100
  }
17112
17101
  }
@@ -17119,7 +17108,7 @@ function get_each_context$9(ctx, list, i) {
17119
17108
  return child_ctx;
17120
17109
  }
17121
17110
 
17122
- // (21:6) <Radio checked={defaultOption === option.value} {isFirstInvalidInput} {isRequired} {isInvalid} key={`${key}-${option.value}`} {name} {onChange} value={option.value} >
17111
+ // (21:6) <Radio checked={defaultOption === option.value} {isFirstInvalidInput} {isRequired} key={`${key}-${option.value}`} {name} {onChange} value={option.value} >
17123
17112
  function create_default_slot$m(ctx) {
17124
17113
  let t_value = /*option*/ ctx[11].text + "";
17125
17114
  let t;
@@ -17152,7 +17141,6 @@ function create_each_block$9(ctx) {
17152
17141
  checked: /*defaultOption*/ ctx[0] === /*option*/ ctx[11].value,
17153
17142
  isFirstInvalidInput: /*isFirstInvalidInput*/ ctx[3],
17154
17143
  isRequired: /*isRequired*/ ctx[4],
17155
- isInvalid: /*isInvalid*/ ctx[5],
17156
17144
  key: `${/*key*/ ctx[6]}-${/*option*/ ctx[11].value}`,
17157
17145
  name: /*name*/ ctx[7],
17158
17146
  onChange: /*onChange*/ ctx[8],
@@ -17180,7 +17168,6 @@ function create_each_block$9(ctx) {
17180
17168
  if (dirty & /*defaultOption, options*/ 513) radio_changes.checked = /*defaultOption*/ ctx[0] === /*option*/ ctx[11].value;
17181
17169
  if (dirty & /*isFirstInvalidInput*/ 8) radio_changes.isFirstInvalidInput = /*isFirstInvalidInput*/ ctx[3];
17182
17170
  if (dirty & /*isRequired*/ 16) radio_changes.isRequired = /*isRequired*/ ctx[4];
17183
- if (dirty & /*isInvalid*/ 32) radio_changes.isInvalid = /*isInvalid*/ ctx[5];
17184
17171
  if (dirty & /*key, options*/ 576) radio_changes.key = `${/*key*/ ctx[6]}-${/*option*/ ctx[11].value}`;
17185
17172
  if (dirty & /*name*/ 128) radio_changes.name = /*name*/ ctx[7];
17186
17173
  if (dirty & /*onChange*/ 256) radio_changes.onChange = /*onChange*/ ctx[8];
@@ -17274,7 +17261,7 @@ function create_fragment$K(ctx) {
17274
17261
  p(ctx, [dirty]) {
17275
17262
  if (!current || dirty & /*groupLabel*/ 4) set_data(t0, /*groupLabel*/ ctx[2]);
17276
17263
 
17277
- if (dirty & /*defaultOption, options, isFirstInvalidInput, isRequired, isInvalid, key, name, onChange*/ 1017) {
17264
+ if (dirty & /*defaultOption, options, isFirstInvalidInput, isRequired, key, name, onChange*/ 985) {
17278
17265
  each_value = /*options*/ ctx[9];
17279
17266
  let i;
17280
17267