@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/index.js CHANGED
@@ -12343,7 +12343,10 @@ function widgetApiFactory(componentApi) {
12343
12343
  // https://backstage.forgerock.com/docs/am/7/setup-guide/sec-rest-realm-rest.html#rest-api-list-realm
12344
12344
  realmPath: 'alpha',
12345
12345
  // TODO: Once we move to SSR, this default should be more intelligent
12346
- redirectUri: typeof window === 'object' ? window.location.href : 'https://localhost:3000/callback',
12346
+ redirectUri: typeof window === 'object'
12347
+ ? // Construct URL with origin and path only, stripping off hash and query params
12348
+ `${window.location.origin}${window.location.pathname}`
12349
+ : 'https://localhost:3000/callback',
12347
12350
  scope: 'openid email',
12348
12351
  },
12349
12352
  // Let user provided config override defaults
@@ -16530,7 +16533,7 @@ function get_each_context$a(ctx, list, i) {
16530
16533
  return child_ctx;
16531
16534
  }
16532
16535
 
16533
- // (41:8) <Label key={`${key}-${option.value}`} classes="tw_input-spacing tw_grid tw_grid-cols-[2.5em_1fr] tw_relative" >
16536
+ // (40:8) <Label key={`${key}-${option.value}`} classes="tw_input-spacing tw_grid tw_grid-cols-[2.5em_1fr] tw_relative" >
16534
16537
  function create_default_slot$o(ctx) {
16535
16538
  let span;
16536
16539
  let t0;
@@ -16590,7 +16593,6 @@ function create_each_block$a(ctx) {
16590
16593
  t0 = space();
16591
16594
  create_component(label.$$.fragment);
16592
16595
  t1 = space();
16593
- attr(input, "aria-invalid", /*isInvalid*/ ctx[4]);
16594
16596
  attr(input, "class", "tw_radio-input_animated dark:tw_radio-input_animated_dark tw_sr-only");
16595
16597
  input.checked = input_checked_value = /*defaultOption*/ ctx[0] === /*option*/ ctx[13].value;
16596
16598
  attr(input, "id", input_id_value = `${/*key*/ ctx[5]}-${/*option*/ ctx[13].value}`);
@@ -16620,10 +16622,6 @@ function create_each_block$a(ctx) {
16620
16622
  p(new_ctx, dirty) {
16621
16623
  ctx = new_ctx;
16622
16624
 
16623
- if (!current || dirty & /*isInvalid*/ 16) {
16624
- attr(input, "aria-invalid", /*isInvalid*/ ctx[4]);
16625
- }
16626
-
16627
16625
  if (!current || dirty & /*defaultOption, options*/ 257 && input_checked_value !== (input_checked_value = /*defaultOption*/ ctx[0] === /*option*/ ctx[13].value)) {
16628
16626
  input.checked = input_checked_value;
16629
16627
  }
@@ -16741,7 +16739,7 @@ function create_fragment$M(ctx) {
16741
16739
  p(ctx, [dirty]) {
16742
16740
  if (!current || dirty & /*groupLabel*/ 4) set_data(t0, /*groupLabel*/ ctx[2]);
16743
16741
 
16744
- if (dirty & /*key, options, isInvalid, defaultOption, name, isRequired, inputEl, onChange*/ 1529) {
16742
+ if (dirty & /*key, options, defaultOption, name, isRequired, inputEl, onChange*/ 1513) {
16745
16743
  each_value = /*options*/ ctx[8];
16746
16744
  let i;
16747
16745
 
@@ -16885,8 +16883,8 @@ class Animated extends SvelteComponent {
16885
16883
 
16886
16884
  function create_default_slot$n(ctx) {
16887
16885
  let current;
16888
- const default_slot_template = /*#slots*/ ctx[9].default;
16889
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[11], null);
16886
+ const default_slot_template = /*#slots*/ ctx[8].default;
16887
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[10], null);
16890
16888
 
16891
16889
  return {
16892
16890
  c() {
@@ -16901,15 +16899,15 @@ function create_default_slot$n(ctx) {
16901
16899
  },
16902
16900
  p(ctx, dirty) {
16903
16901
  if (default_slot) {
16904
- if (default_slot.p && (!current || dirty & /*$$scope*/ 2048)) {
16902
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 1024)) {
16905
16903
  update_slot_base(
16906
16904
  default_slot,
16907
16905
  default_slot_template,
16908
16906
  ctx,
16909
- /*$$scope*/ ctx[11],
16907
+ /*$$scope*/ ctx[10],
16910
16908
  !current
16911
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[11])
16912
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[11], dirty, null),
16909
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[10])
16910
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[10], dirty, null),
16913
16911
  null
16914
16912
  );
16915
16913
  }
@@ -16941,7 +16939,7 @@ function create_fragment$L(ctx) {
16941
16939
 
16942
16940
  label = new Label({
16943
16941
  props: {
16944
- key: /*key*/ ctx[3],
16942
+ key: /*key*/ ctx[2],
16945
16943
  $$slots: { default: [create_default_slot$n] },
16946
16944
  $$scope: { ctx }
16947
16945
  }
@@ -16952,26 +16950,25 @@ function create_fragment$L(ctx) {
16952
16950
  input = element("input");
16953
16951
  t = space();
16954
16952
  create_component(label.$$.fragment);
16955
- attr(input, "aria-describedby", input_aria_describedby_value = `${/*key*/ ctx[3]}-message`);
16956
- attr(input, "aria-invalid", /*isInvalid*/ ctx[2]);
16953
+ attr(input, "aria-describedby", input_aria_describedby_value = `${/*key*/ ctx[2]}-message`);
16957
16954
  attr(input, "class", "tw_checkbox-input dark:tw_checkbox-input_dark tw_focusable-element dark:tw_focusable-element_dark");
16958
16955
  input.checked = /*checked*/ ctx[0];
16959
- attr(input, "id", /*key*/ ctx[3]);
16960
- attr(input, "name", /*name*/ ctx[4]);
16956
+ attr(input, "id", /*key*/ ctx[2]);
16957
+ attr(input, "name", /*name*/ ctx[3]);
16961
16958
  input.required = /*isRequired*/ ctx[1];
16962
16959
  attr(input, "type", "radio");
16963
- input.value = /*value*/ ctx[6];
16960
+ input.value = /*value*/ ctx[5];
16964
16961
  },
16965
16962
  m(target, anchor) {
16966
16963
  insert(target, input, anchor);
16967
- /*input_binding*/ ctx[10](input);
16964
+ /*input_binding*/ ctx[9](input);
16968
16965
  insert(target, t, anchor);
16969
16966
  mount_component(label, target, anchor);
16970
16967
  current = true;
16971
16968
 
16972
16969
  if (!mounted) {
16973
16970
  dispose = listen(input, "change", function () {
16974
- if (is_function(/*onChange*/ ctx[5])) /*onChange*/ ctx[5].apply(this, arguments);
16971
+ if (is_function(/*onChange*/ ctx[4])) /*onChange*/ ctx[4].apply(this, arguments);
16975
16972
  });
16976
16973
 
16977
16974
  mounted = true;
@@ -16980,38 +16977,34 @@ function create_fragment$L(ctx) {
16980
16977
  p(new_ctx, [dirty]) {
16981
16978
  ctx = new_ctx;
16982
16979
 
16983
- if (!current || dirty & /*key*/ 8 && input_aria_describedby_value !== (input_aria_describedby_value = `${/*key*/ ctx[3]}-message`)) {
16980
+ if (!current || dirty & /*key*/ 4 && input_aria_describedby_value !== (input_aria_describedby_value = `${/*key*/ ctx[2]}-message`)) {
16984
16981
  attr(input, "aria-describedby", input_aria_describedby_value);
16985
16982
  }
16986
16983
 
16987
- if (!current || dirty & /*isInvalid*/ 4) {
16988
- attr(input, "aria-invalid", /*isInvalid*/ ctx[2]);
16989
- }
16990
-
16991
16984
  if (!current || dirty & /*checked*/ 1) {
16992
16985
  input.checked = /*checked*/ ctx[0];
16993
16986
  }
16994
16987
 
16995
- if (!current || dirty & /*key*/ 8) {
16996
- attr(input, "id", /*key*/ ctx[3]);
16988
+ if (!current || dirty & /*key*/ 4) {
16989
+ attr(input, "id", /*key*/ ctx[2]);
16997
16990
  }
16998
16991
 
16999
- if (!current || dirty & /*name*/ 16) {
17000
- attr(input, "name", /*name*/ ctx[4]);
16992
+ if (!current || dirty & /*name*/ 8) {
16993
+ attr(input, "name", /*name*/ ctx[3]);
17001
16994
  }
17002
16995
 
17003
16996
  if (!current || dirty & /*isRequired*/ 2) {
17004
16997
  input.required = /*isRequired*/ ctx[1];
17005
16998
  }
17006
16999
 
17007
- if (!current || dirty & /*value*/ 64) {
17008
- input.value = /*value*/ ctx[6];
17000
+ if (!current || dirty & /*value*/ 32) {
17001
+ input.value = /*value*/ ctx[5];
17009
17002
  }
17010
17003
 
17011
17004
  const label_changes = {};
17012
- if (dirty & /*key*/ 8) label_changes.key = /*key*/ ctx[3];
17005
+ if (dirty & /*key*/ 4) label_changes.key = /*key*/ ctx[2];
17013
17006
 
17014
- if (dirty & /*$$scope*/ 2048) {
17007
+ if (dirty & /*$$scope*/ 1024) {
17015
17008
  label_changes.$$scope = { dirty, ctx };
17016
17009
  }
17017
17010
 
@@ -17028,7 +17021,7 @@ function create_fragment$L(ctx) {
17028
17021
  },
17029
17022
  d(detaching) {
17030
17023
  if (detaching) detach(input);
17031
- /*input_binding*/ ctx[10](null);
17024
+ /*input_binding*/ ctx[9](null);
17032
17025
  if (detaching) detach(t);
17033
17026
  destroy_component(label, detaching);
17034
17027
  mounted = false;
@@ -17042,7 +17035,6 @@ function instance$N($$self, $$props, $$invalidate) {
17042
17035
  let { checked = false } = $$props;
17043
17036
  let { isFirstInvalidInput } = $$props;
17044
17037
  let { isRequired = false } = $$props;
17045
- let { isInvalid = false } = $$props;
17046
17038
  let { key } = $$props;
17047
17039
  let { name } = $$props;
17048
17040
  let { onChange } = $$props;
@@ -17058,26 +17050,24 @@ function instance$N($$self, $$props, $$invalidate) {
17058
17050
  function input_binding($$value) {
17059
17051
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
17060
17052
  inputEl = $$value;
17061
- $$invalidate(7, inputEl);
17053
+ $$invalidate(6, inputEl);
17062
17054
  });
17063
17055
  }
17064
17056
 
17065
17057
  $$self.$$set = $$props => {
17066
17058
  if ('checked' in $$props) $$invalidate(0, checked = $$props.checked);
17067
- if ('isFirstInvalidInput' in $$props) $$invalidate(8, isFirstInvalidInput = $$props.isFirstInvalidInput);
17059
+ if ('isFirstInvalidInput' in $$props) $$invalidate(7, isFirstInvalidInput = $$props.isFirstInvalidInput);
17068
17060
  if ('isRequired' in $$props) $$invalidate(1, isRequired = $$props.isRequired);
17069
- if ('isInvalid' in $$props) $$invalidate(2, isInvalid = $$props.isInvalid);
17070
- if ('key' in $$props) $$invalidate(3, key = $$props.key);
17071
- if ('name' in $$props) $$invalidate(4, name = $$props.name);
17072
- if ('onChange' in $$props) $$invalidate(5, onChange = $$props.onChange);
17073
- if ('value' in $$props) $$invalidate(6, value = $$props.value);
17074
- if ('$$scope' in $$props) $$invalidate(11, $$scope = $$props.$$scope);
17061
+ if ('key' in $$props) $$invalidate(2, key = $$props.key);
17062
+ if ('name' in $$props) $$invalidate(3, name = $$props.name);
17063
+ if ('onChange' in $$props) $$invalidate(4, onChange = $$props.onChange);
17064
+ if ('value' in $$props) $$invalidate(5, value = $$props.value);
17065
+ if ('$$scope' in $$props) $$invalidate(10, $$scope = $$props.$$scope);
17075
17066
  };
17076
17067
 
17077
17068
  return [
17078
17069
  checked,
17079
17070
  isRequired,
17080
- isInvalid,
17081
17071
  key,
17082
17072
  name,
17083
17073
  onChange,
@@ -17096,13 +17086,12 @@ class Radio extends SvelteComponent {
17096
17086
 
17097
17087
  init(this, options, instance$N, create_fragment$L, safe_not_equal, {
17098
17088
  checked: 0,
17099
- isFirstInvalidInput: 8,
17089
+ isFirstInvalidInput: 7,
17100
17090
  isRequired: 1,
17101
- isInvalid: 2,
17102
- key: 3,
17103
- name: 4,
17104
- onChange: 5,
17105
- value: 6
17091
+ key: 2,
17092
+ name: 3,
17093
+ onChange: 4,
17094
+ value: 5
17106
17095
  });
17107
17096
  }
17108
17097
  }
@@ -17115,7 +17104,7 @@ function get_each_context$9(ctx, list, i) {
17115
17104
  return child_ctx;
17116
17105
  }
17117
17106
 
17118
- // (21:6) <Radio checked={defaultOption === option.value} {isFirstInvalidInput} {isRequired} {isInvalid} key={`${key}-${option.value}`} {name} {onChange} value={option.value} >
17107
+ // (21:6) <Radio checked={defaultOption === option.value} {isFirstInvalidInput} {isRequired} key={`${key}-${option.value}`} {name} {onChange} value={option.value} >
17119
17108
  function create_default_slot$m(ctx) {
17120
17109
  let t_value = /*option*/ ctx[11].text + "";
17121
17110
  let t;
@@ -17148,7 +17137,6 @@ function create_each_block$9(ctx) {
17148
17137
  checked: /*defaultOption*/ ctx[0] === /*option*/ ctx[11].value,
17149
17138
  isFirstInvalidInput: /*isFirstInvalidInput*/ ctx[3],
17150
17139
  isRequired: /*isRequired*/ ctx[4],
17151
- isInvalid: /*isInvalid*/ ctx[5],
17152
17140
  key: `${/*key*/ ctx[6]}-${/*option*/ ctx[11].value}`,
17153
17141
  name: /*name*/ ctx[7],
17154
17142
  onChange: /*onChange*/ ctx[8],
@@ -17176,7 +17164,6 @@ function create_each_block$9(ctx) {
17176
17164
  if (dirty & /*defaultOption, options*/ 513) radio_changes.checked = /*defaultOption*/ ctx[0] === /*option*/ ctx[11].value;
17177
17165
  if (dirty & /*isFirstInvalidInput*/ 8) radio_changes.isFirstInvalidInput = /*isFirstInvalidInput*/ ctx[3];
17178
17166
  if (dirty & /*isRequired*/ 16) radio_changes.isRequired = /*isRequired*/ ctx[4];
17179
- if (dirty & /*isInvalid*/ 32) radio_changes.isInvalid = /*isInvalid*/ ctx[5];
17180
17167
  if (dirty & /*key, options*/ 576) radio_changes.key = `${/*key*/ ctx[6]}-${/*option*/ ctx[11].value}`;
17181
17168
  if (dirty & /*name*/ 128) radio_changes.name = /*name*/ ctx[7];
17182
17169
  if (dirty & /*onChange*/ 256) radio_changes.onChange = /*onChange*/ ctx[8];
@@ -17270,7 +17257,7 @@ function create_fragment$K(ctx) {
17270
17257
  p(ctx, [dirty]) {
17271
17258
  if (!current || dirty & /*groupLabel*/ 4) set_data(t0, /*groupLabel*/ ctx[2]);
17272
17259
 
17273
- if (dirty & /*defaultOption, options, isFirstInvalidInput, isRequired, isInvalid, key, name, onChange*/ 1017) {
17260
+ if (dirty & /*defaultOption, options, isFirstInvalidInput, isRequired, key, name, onChange*/ 985) {
17274
17261
  each_value = /*options*/ ctx[9];
17275
17262
  let i;
17276
17263