react-hook-form-cloudscape 1.3.1 → 1.4.0

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.
@@ -1,6 +1,6 @@
1
- import De, { useMemo as hr, useCallback as x } from "react";
2
- import { AttributeEditor as Er, Autosuggest as mr, Checkbox as yr, Cards as Rr, CodeEditor as _r, DatePicker as gr, DateRangePicker as xr, Input as Tr, Multiselect as jr, RadioGroup as Or, Select as Sr, TagEditor as Pr, TextFilter as wr, Textarea as kr, Tiles as Cr, TimeInput as Dr, Toggle as Fr } from "@cloudscape-design/components";
3
- import { useFormState as Ar, useFieldArray as Ir, get as $r, Controller as S } from "react-hook-form";
1
+ import De, { useMemo as Er, useCallback as x } from "react";
2
+ import { AttributeEditor as hr, Autosuggest as mr, Checkbox as yr, Cards as Rr, CodeEditor as _r, DatePicker as gr, DateRangePicker as xr, Input as jr, Multiselect as Tr, RadioGroup as Or, Select as Sr, Slider as Pr, TagEditor as wr, TextFilter as kr, Textarea as Cr, Tiles as Dr, TimeInput as Fr, Toggle as Ar } from "@cloudscape-design/components";
3
+ import { useFormState as Ir, useFieldArray as $r, get as Wr, Controller as S } from "react-hook-form";
4
4
  var G = { exports: {} }, L = {};
5
5
  /**
6
6
  * @license React
@@ -12,16 +12,16 @@ var G = { exports: {} }, L = {};
12
12
  * LICENSE file in the root directory of this source tree.
13
13
  */
14
14
  var we;
15
- function Wr() {
15
+ function Yr() {
16
16
  if (we) return L;
17
17
  we = 1;
18
- var l = De, u = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, o = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
19
- function t(v, p, g) {
20
- var f, d = {}, R = null, _ = null;
21
- g !== void 0 && (R = "" + g), p.key !== void 0 && (R = "" + p.key), p.ref !== void 0 && (_ = p.ref);
22
- for (f in p) s.call(p, f) && !a.hasOwnProperty(f) && (d[f] = p[f]);
23
- if (v && v.defaultProps) for (f in p = v.defaultProps, p) d[f] === void 0 && (d[f] = p[f]);
24
- return { $$typeof: u, type: v, key: R, ref: _, props: d, _owner: o.current };
18
+ var l = De, u = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, f = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
19
+ function t(d, v, R) {
20
+ var o, p = {}, _ = null, g = null;
21
+ R !== void 0 && (_ = "" + R), v.key !== void 0 && (_ = "" + v.key), v.ref !== void 0 && (g = v.ref);
22
+ for (o in v) s.call(v, o) && !a.hasOwnProperty(o) && (p[o] = v[o]);
23
+ if (d && d.defaultProps) for (o in v = d.defaultProps, v) p[o] === void 0 && (p[o] = v[o]);
24
+ return { $$typeof: u, type: d, key: _, ref: g, props: p, _owner: f.current };
25
25
  }
26
26
  return L.Fragment = n, L.jsx = t, L.jsxs = t, L;
27
27
  }
@@ -36,13 +36,13 @@ var U = {};
36
36
  * LICENSE file in the root directory of this source tree.
37
37
  */
38
38
  var ke;
39
- function Yr() {
39
+ function Mr() {
40
40
  return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
41
- var l = De, u = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), v = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), j = Symbol.iterator, K = "@@iterator";
41
+ var l = De, u = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), d = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), o = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), T = Symbol.iterator, K = "@@iterator";
42
42
  function Ae(e) {
43
43
  if (e === null || typeof e != "object")
44
44
  return null;
45
- var r = j && e[j] || e[K];
45
+ var r = T && e[T] || e[K];
46
46
  return typeof r == "function" ? r : null;
47
47
  }
48
48
  var I = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -66,7 +66,7 @@ function Yr() {
66
66
  var $e = !1, We = !1, Ye = !1, Me = !1, Le = !1, ae;
67
67
  ae = Symbol.for("react.module.reference");
68
68
  function Ue(e) {
69
- return !!(typeof e == "string" || typeof e == "function" || e === s || e === a || Le || e === o || e === g || e === f || Me || e === _ || $e || We || Ye || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === d || e.$$typeof === t || e.$$typeof === v || e.$$typeof === p || // This needs to include all possible module reference object
69
+ return !!(typeof e == "string" || typeof e == "function" || e === s || e === a || Le || e === f || e === R || e === o || Me || e === g || $e || We || Ye || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === p || e.$$typeof === t || e.$$typeof === d || e.$$typeof === v || // This needs to include all possible module reference object
70
70
  // types supported by any Flight configuration anywhere since
71
71
  // we don't know which Flight build this will end up being used
72
72
  // with.
@@ -96,27 +96,27 @@ function Yr() {
96
96
  return "Portal";
97
97
  case a:
98
98
  return "Profiler";
99
- case o:
99
+ case f:
100
100
  return "StrictMode";
101
- case g:
101
+ case R:
102
102
  return "Suspense";
103
- case f:
103
+ case o:
104
104
  return "SuspenseList";
105
105
  }
106
106
  if (typeof e == "object")
107
107
  switch (e.$$typeof) {
108
- case v:
108
+ case d:
109
109
  var r = e;
110
110
  return ie(r) + ".Consumer";
111
111
  case t:
112
112
  var i = e;
113
113
  return ie(i._context) + ".Provider";
114
- case p:
114
+ case v:
115
115
  return Ve(e, e.render, "ForwardRef");
116
- case d:
116
+ case p:
117
117
  var c = e.displayName || null;
118
118
  return c !== null ? c : D(e.type) || "Memo";
119
- case R: {
119
+ case _: {
120
120
  var m = e, y = m._payload, h = m._init;
121
121
  try {
122
122
  return D(h(y));
@@ -258,18 +258,18 @@ function Yr() {
258
258
  if (k && c && typeof k.stack == "string") {
259
259
  for (var b = k.stack.split(`
260
260
  `), w = c.stack.split(`
261
- `), T = b.length - 1, O = w.length - 1; T >= 1 && O >= 0 && b[T] !== w[O]; )
261
+ `), j = b.length - 1, O = w.length - 1; j >= 1 && O >= 0 && b[j] !== w[O]; )
262
262
  O--;
263
- for (; T >= 1 && O >= 0; T--, O--)
264
- if (b[T] !== w[O]) {
265
- if (T !== 1 || O !== 1)
263
+ for (; j >= 1 && O >= 0; j--, O--)
264
+ if (b[j] !== w[O]) {
265
+ if (j !== 1 || O !== 1)
266
266
  do
267
- if (T--, O--, O < 0 || b[T] !== w[O]) {
267
+ if (j--, O--, O < 0 || b[j] !== w[O]) {
268
268
  var C = `
269
- ` + b[T].replace(" at new ", " at ");
269
+ ` + b[j].replace(" at new ", " at ");
270
270
  return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && N.set(e, C), C;
271
271
  }
272
- while (T >= 1 && O >= 0);
272
+ while (j >= 1 && O >= 0);
273
273
  break;
274
274
  }
275
275
  }
@@ -294,18 +294,18 @@ function Yr() {
294
294
  if (typeof e == "string")
295
295
  return V(e);
296
296
  switch (e) {
297
- case g:
297
+ case R:
298
298
  return V("Suspense");
299
- case f:
299
+ case o:
300
300
  return V("SuspenseList");
301
301
  }
302
302
  if (typeof e == "object")
303
303
  switch (e.$$typeof) {
304
- case p:
304
+ case v:
305
305
  return Ge(e.render);
306
- case d:
306
+ case p:
307
307
  return J(e.type, r, i);
308
- case R: {
308
+ case _: {
309
309
  var c = e, m = c._payload, y = c._init;
310
310
  try {
311
311
  return J(y(m), r, i);
@@ -315,13 +315,13 @@ function Yr() {
315
315
  }
316
316
  return "";
317
317
  }
318
- var M = Object.prototype.hasOwnProperty, be = {}, he = I.ReactDebugCurrentFrame;
318
+ var M = Object.prototype.hasOwnProperty, be = {}, Ee = I.ReactDebugCurrentFrame;
319
319
  function q(e) {
320
320
  if (e) {
321
321
  var r = e._owner, i = J(e.type, e._source, r ? r.type : null);
322
- he.setExtraStackFrame(i);
322
+ Ee.setExtraStackFrame(i);
323
323
  } else
324
- he.setExtraStackFrame(null);
324
+ Ee.setExtraStackFrame(null);
325
325
  }
326
326
  function ze(e, r, i, c, m) {
327
327
  {
@@ -335,8 +335,8 @@ function Yr() {
335
335
  throw w.name = "Invariant Violation", w;
336
336
  }
337
337
  b = e[h](r, h, c, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
338
- } catch (T) {
339
- b = T;
338
+ } catch (j) {
339
+ b = j;
340
340
  }
341
341
  b && !(b instanceof Error) && (q(m), P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", i, h, typeof b), q(null)), b instanceof Error && !(b.message in be) && (be[b.message] = !0, q(m), P("Failed %s type: %s", i, b.message), q(null));
342
342
  }
@@ -354,17 +354,17 @@ function Yr() {
354
354
  }
355
355
  function Ze(e) {
356
356
  try {
357
- return Ee(e), !1;
357
+ return he(e), !1;
358
358
  } catch {
359
359
  return !0;
360
360
  }
361
361
  }
362
- function Ee(e) {
362
+ function he(e) {
363
363
  return "" + e;
364
364
  }
365
365
  function me(e) {
366
366
  if (Ze(e))
367
- return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), Ee(e);
367
+ return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), he(e);
368
368
  }
369
369
  var ye = I.ReactCurrentOwner, Qe = {
370
370
  key: !0,
@@ -449,9 +449,9 @@ function Yr() {
449
449
  for (y in r)
450
450
  M.call(r, y) && !Qe.hasOwnProperty(y) && (h[y] = r[y]);
451
451
  if (e && e.defaultProps) {
452
- var T = e.defaultProps;
453
- for (y in T)
454
- h[y] === void 0 && (h[y] = T[y]);
452
+ var j = e.defaultProps;
453
+ for (y in j)
454
+ h[y] === void 0 && (h[y] = j[y]);
455
455
  }
456
456
  if (b || w) {
457
457
  var O = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
@@ -488,7 +488,7 @@ Check the render method of \`` + e + "`.";
488
488
  function lr(e) {
489
489
  return "";
490
490
  }
491
- var Te = {};
491
+ var je = {};
492
492
  function sr(e) {
493
493
  {
494
494
  var r = xe();
@@ -501,15 +501,15 @@ Check the top-level render call using <` + i + ">.");
501
501
  return r;
502
502
  }
503
503
  }
504
- function je(e, r) {
504
+ function Te(e, r) {
505
505
  {
506
506
  if (!e._store || e._store.validated || e.key != null)
507
507
  return;
508
508
  e._store.validated = !0;
509
509
  var i = sr(r);
510
- if (Te[i])
510
+ if (je[i])
511
511
  return;
512
- Te[i] = !0;
512
+ je[i] = !0;
513
513
  var c = "";
514
514
  e && e._owner && e._owner !== Q.current && (c = " It was passed a child from " + D(e._owner.type) + "."), $(e), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, c), $(null);
515
515
  }
@@ -521,7 +521,7 @@ Check the top-level render call using <` + i + ">.");
521
521
  if (Z(e))
522
522
  for (var i = 0; i < e.length; i++) {
523
523
  var c = e[i];
524
- ee(c) && je(c, r);
524
+ ee(c) && Te(c, r);
525
525
  }
526
526
  else if (ee(e))
527
527
  e._store && (e._store.validated = !0);
@@ -529,7 +529,7 @@ Check the top-level render call using <` + i + ">.");
529
529
  var m = Ae(e);
530
530
  if (typeof m == "function" && m !== e.entries)
531
531
  for (var y = m.call(e), h; !(h = y.next()).done; )
532
- ee(h.value) && je(h.value, r);
532
+ ee(h.value) && Te(h.value, r);
533
533
  }
534
534
  }
535
535
  }
@@ -541,9 +541,9 @@ Check the top-level render call using <` + i + ">.");
541
541
  var i;
542
542
  if (typeof r == "function")
543
543
  i = r.propTypes;
544
- else if (typeof r == "object" && (r.$$typeof === p || // Note: Memo only checks outer props here.
544
+ else if (typeof r == "object" && (r.$$typeof === v || // Note: Memo only checks outer props here.
545
545
  // Inner props are checked in the reconciler.
546
- r.$$typeof === d))
546
+ r.$$typeof === p))
547
547
  i = r.propTypes;
548
548
  else
549
549
  return;
@@ -579,8 +579,8 @@ Check the top-level render call using <` + i + ">.");
579
579
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
580
580
  var w = lr();
581
581
  w ? b += w : b += xe();
582
- var T;
583
- e === null ? T = "null" : Z(e) ? T = "array" : e !== void 0 && e.$$typeof === u ? (T = "<" + (D(e.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : T = typeof e, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, b);
582
+ var j;
583
+ e === null ? j = "null" : Z(e) ? j = "array" : e !== void 0 && e.$$typeof === u ? (j = "<" + (D(e.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : j = typeof e, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", j, b);
584
584
  }
585
585
  var O = ir(e, r, i, m, y);
586
586
  if (O == null)
@@ -626,62 +626,62 @@ React keys must be passed directly to JSX without using spread:
626
626
  }()), U;
627
627
  }
628
628
  var Ce;
629
- function Mr() {
630
- return Ce || (Ce = 1, process.env.NODE_ENV === "production" ? G.exports = Wr() : G.exports = Yr()), G.exports;
629
+ function Lr() {
630
+ return Ce || (Ce = 1, process.env.NODE_ENV === "production" ? G.exports = Yr() : G.exports = Mr()), G.exports;
631
631
  }
632
- var E = Mr();
633
- const Jr = ({
632
+ var E = Lr();
633
+ const qr = ({
634
634
  name: l,
635
635
  control: u,
636
636
  onRemoveButtonClick: n,
637
637
  onAddButtonClick: s,
638
- definition: o,
638
+ definition: f,
639
639
  defaultValue: a,
640
640
  handleState: t = !0,
641
- ...v
641
+ ...d
642
642
  }) => {
643
- const { errors: p } = Ar({ control: u }), { fields: g, append: f, remove: d } = Ir({
643
+ const { errors: v } = Ir({ control: u }), { fields: R, append: o, remove: p } = $r({
644
644
  name: l,
645
645
  control: u
646
- }), R = hr(
647
- () => o.map((_) => ({
648
- errorText: (j, K) => _.label && $r(p, `${l}.${K}.${_.label.toString().toLowerCase()}.message`),
649
- ..._
646
+ }), _ = Er(
647
+ () => f.map((g) => ({
648
+ errorText: (T, K) => g.label && Wr(v, `${l}.${K}.${g.label.toString().toLowerCase()}.message`),
649
+ ...g
650
650
  })),
651
- [o, p, l]
651
+ [f, v, l]
652
652
  );
653
653
  return /* @__PURE__ */ E.jsx(
654
- Er,
654
+ hr,
655
655
  {
656
- definition: R,
657
- items: g || [],
658
- onRemoveButtonClick: (_) => {
659
- t && d(_.detail.itemIndex), n == null || n(_, d);
656
+ definition: _,
657
+ items: R || [],
658
+ onRemoveButtonClick: (g) => {
659
+ t && p(g.detail.itemIndex), n == null || n(g, p);
660
660
  },
661
- onAddButtonClick: (_) => {
662
- t && f(a), s == null || s(_, f);
661
+ onAddButtonClick: (g) => {
662
+ t && o(a), s == null || s(g, o);
663
663
  },
664
- ...v
664
+ ...d
665
665
  }
666
666
  );
667
- }, qr = ({
667
+ }, Gr = ({
668
668
  name: l,
669
669
  control: u,
670
670
  defaultValue: n,
671
671
  rules: s,
672
- shouldUnregister: o = !1,
672
+ shouldUnregister: f = !1,
673
673
  onBlur: a,
674
674
  onChange: t,
675
- ...v
675
+ ...d
676
676
  }) => {
677
- const p = x(
678
- (f) => {
679
- a == null || a(f);
677
+ const v = x(
678
+ (o) => {
679
+ a == null || a(o);
680
680
  },
681
681
  [a]
682
- ), g = x(
683
- (f) => {
684
- t == null || t(f);
682
+ ), R = x(
683
+ (o) => {
684
+ t == null || t(o);
685
685
  },
686
686
  [t]
687
687
  );
@@ -692,31 +692,31 @@ const Jr = ({
692
692
  control: u,
693
693
  defaultValue: n,
694
694
  rules: s,
695
- shouldUnregister: o,
696
- render: ({ field: { ref: f, onBlur: d, onChange: R, value: _ } }) => /* @__PURE__ */ E.jsx(
695
+ shouldUnregister: f,
696
+ render: ({ field: { ref: o, onBlur: p, onChange: _, value: g } }) => /* @__PURE__ */ E.jsx(
697
697
  mr,
698
698
  {
699
- ref: f,
699
+ ref: o,
700
700
  name: l,
701
- value: _ || "",
702
- onBlur: (j) => {
703
- d(), p(j);
701
+ value: g || "",
702
+ onBlur: (T) => {
703
+ p(), v(T);
704
704
  },
705
- onChange: (j) => {
706
- R(j.detail.value), g(j);
705
+ onChange: (T) => {
706
+ _(T.detail.value), R(T);
707
707
  },
708
- ...v
708
+ ...d
709
709
  }
710
710
  )
711
711
  }
712
712
  );
713
- }, Gr = ({
713
+ }, Kr = ({
714
714
  name: l,
715
715
  control: u,
716
716
  onChange: n,
717
717
  ...s
718
718
  }) => {
719
- const o = x(
719
+ const f = x(
720
720
  (a, t) => {
721
721
  a(t.detail.checked), n == null || n(t);
722
722
  },
@@ -727,16 +727,16 @@ const Jr = ({
727
727
  {
728
728
  name: l,
729
729
  control: u,
730
- render: ({ field: { ref: a, onChange: t, value: v = !1 } }) => /* @__PURE__ */ E.jsx(yr, { ref: a, onChange: o.bind(null, t), checked: v, ...s })
730
+ render: ({ field: { ref: a, onChange: t, value: d = !1 } }) => /* @__PURE__ */ E.jsx(yr, { ref: a, onChange: f.bind(null, t), checked: d, ...s })
731
731
  }
732
732
  );
733
- }, Kr = ({
733
+ }, zr = ({
734
734
  name: l,
735
735
  control: u,
736
736
  onSelectionChange: n,
737
737
  ...s
738
738
  }) => {
739
- const o = x(
739
+ const f = x(
740
740
  (a, t) => {
741
741
  a(t.detail.selectedItems), n == null || n(t);
742
742
  },
@@ -747,16 +747,16 @@ const Jr = ({
747
747
  {
748
748
  name: l,
749
749
  control: u,
750
- render: ({ field: { onChange: a, value: t } }) => /* @__PURE__ */ E.jsx(Rr, { onSelectionChange: o.bind(null, a), selectedItems: t, ...s })
750
+ render: ({ field: { onChange: a, value: t } }) => /* @__PURE__ */ E.jsx(Rr, { onSelectionChange: f.bind(null, a), selectedItems: t, ...s })
751
751
  }
752
752
  );
753
- }, zr = ({
753
+ }, Xr = ({
754
754
  name: l,
755
755
  control: u,
756
756
  onChange: n,
757
757
  ...s
758
758
  }) => {
759
- const o = x(
759
+ const f = x(
760
760
  (a, t) => {
761
761
  a(t.detail.value), n == null || n(t);
762
762
  },
@@ -767,27 +767,27 @@ const Jr = ({
767
767
  {
768
768
  name: l,
769
769
  control: u,
770
- render: ({ field: { onChange: a, value: t } }) => /* @__PURE__ */ E.jsx(_r, { value: t || "", onChange: o.bind(null, a), ...s })
770
+ render: ({ field: { onChange: a, value: t } }) => /* @__PURE__ */ E.jsx(_r, { value: t || "", onChange: f.bind(null, a), ...s })
771
771
  }
772
772
  );
773
- }, Xr = ({
773
+ }, Hr = ({
774
774
  name: l,
775
775
  control: u,
776
776
  defaultValue: n,
777
777
  rules: s,
778
- shouldUnregister: o = !1,
778
+ shouldUnregister: f = !1,
779
779
  onBlur: a,
780
780
  onChange: t,
781
- ...v
781
+ ...d
782
782
  }) => {
783
- const p = x(
784
- (f) => {
785
- a == null || a(f);
783
+ const v = x(
784
+ (o) => {
785
+ a == null || a(o);
786
786
  },
787
787
  [a]
788
- ), g = x(
789
- (f) => {
790
- t == null || t(f);
788
+ ), R = x(
789
+ (o) => {
790
+ t == null || t(o);
791
791
  },
792
792
  [t]
793
793
  );
@@ -798,39 +798,39 @@ const Jr = ({
798
798
  control: u,
799
799
  defaultValue: n,
800
800
  rules: s,
801
- shouldUnregister: o,
802
- render: ({ field: { ref: f, onChange: d, onBlur: R, value: _ } }) => /* @__PURE__ */ E.jsx(
801
+ shouldUnregister: f,
802
+ render: ({ field: { ref: o, onChange: p, onBlur: _, value: g } }) => /* @__PURE__ */ E.jsx(
803
803
  gr,
804
804
  {
805
- ref: f,
805
+ ref: o,
806
806
  name: l,
807
- value: _,
808
- onBlur: (j) => {
809
- R(), p(j);
807
+ value: g,
808
+ onBlur: (T) => {
809
+ _(), v(T);
810
810
  },
811
- onChange: (j) => {
812
- d(j.detail.value), g(j);
811
+ onChange: (T) => {
812
+ p(T.detail.value), R(T);
813
813
  },
814
- ...v
814
+ ...d
815
815
  }
816
816
  )
817
817
  }
818
818
  );
819
- }, Hr = ({
819
+ }, Zr = ({
820
820
  name: l,
821
821
  control: u,
822
822
  onBlur: n,
823
823
  onChange: s,
824
- ...o
824
+ ...f
825
825
  }) => {
826
826
  const a = x(
827
- (v) => {
828
- n == null || n(v);
827
+ (d) => {
828
+ n == null || n(d);
829
829
  },
830
830
  [n]
831
831
  ), t = x(
832
- (v) => {
833
- s == null || s(v);
832
+ (d) => {
833
+ s == null || s(d);
834
834
  },
835
835
  [s]
836
836
  );
@@ -839,40 +839,40 @@ const Jr = ({
839
839
  {
840
840
  name: l,
841
841
  control: u,
842
- render: ({ field: { ref: v, onBlur: p, onChange: g, value: f } }) => /* @__PURE__ */ E.jsx(
842
+ render: ({ field: { ref: d, onBlur: v, onChange: R, value: o } }) => /* @__PURE__ */ E.jsx(
843
843
  xr,
844
844
  {
845
- ref: v,
846
- value: f,
847
- onBlur: (d) => {
848
- p(), a(d);
845
+ ref: d,
846
+ value: o,
847
+ onBlur: (p) => {
848
+ v(), a(p);
849
849
  },
850
- onChange: (d) => {
851
- g(d.detail.value), t(d);
850
+ onChange: (p) => {
851
+ R(p.detail.value), t(p);
852
852
  },
853
- ...o
853
+ ...f
854
854
  }
855
855
  )
856
856
  }
857
857
  );
858
- }, Zr = ({
858
+ }, Qr = ({
859
859
  name: l,
860
860
  control: u,
861
861
  defaultValue: n,
862
862
  rules: s,
863
- shouldUnregister: o = !1,
863
+ shouldUnregister: f = !1,
864
864
  onBlur: a,
865
865
  onChange: t,
866
- ...v
866
+ ...d
867
867
  }) => {
868
- const p = x(
869
- (f) => {
870
- a == null || a(f);
868
+ const v = x(
869
+ (o) => {
870
+ a == null || a(o);
871
871
  },
872
872
  [a]
873
- ), g = x(
874
- (f) => {
875
- t == null || t(f);
873
+ ), R = x(
874
+ (o) => {
875
+ t == null || t(o);
876
876
  },
877
877
  [t]
878
878
  );
@@ -883,20 +883,20 @@ const Jr = ({
883
883
  control: u,
884
884
  defaultValue: n,
885
885
  rules: s,
886
- shouldUnregister: o,
887
- render: ({ field: { ref: f, onBlur: d, onChange: R, value: _ } }) => /* @__PURE__ */ E.jsx(
888
- Tr,
886
+ shouldUnregister: f,
887
+ render: ({ field: { ref: o, onBlur: p, onChange: _, value: g } }) => /* @__PURE__ */ E.jsx(
888
+ jr,
889
889
  {
890
- ref: f,
890
+ ref: o,
891
891
  name: l,
892
- value: _,
893
- onBlur: (j) => {
894
- d(), p(j);
892
+ value: g,
893
+ onBlur: (T) => {
894
+ p(), v(T);
895
895
  },
896
- onChange: (j) => {
897
- R(j.detail.value), g(j);
896
+ onChange: (T) => {
897
+ _(T.detail.value), R(T);
898
898
  },
899
- ...v
899
+ ...d
900
900
  }
901
901
  )
902
902
  }
@@ -904,31 +904,31 @@ const Jr = ({
904
904
  }, te = (l = []) => l != null && l.length ? l.map((u) => "options" in u ? te(u.options) : u.value).flat() : [], ne = (l = [], u = []) => l != null && l.length && (u != null && u.length) ? l.reduce((n, s) => {
905
905
  if (l != null && l.length) {
906
906
  if ("options" in s) {
907
- const o = ne(s.options, u);
908
- o != null && o.length && n.push(...o);
907
+ const f = ne(s.options, u);
908
+ f != null && f.length && n.push(...f);
909
909
  }
910
- "value" in s && u.find((o) => o === s.value) && n.push(s);
910
+ "value" in s && u.find((f) => f === s.value) && n.push(s);
911
911
  }
912
912
  return n;
913
- }, []).flat() : [], Qr = { transformMultiselectOptionsToArray: te, mapSelectedOptionsWithOptions: ne }, Br = ({
913
+ }, []).flat() : [], Br = { transformMultiselectOptionsToArray: te, mapSelectedOptionsWithOptions: ne }, et = ({
914
914
  name: l,
915
915
  control: u,
916
916
  options: n,
917
917
  defaultValue: s,
918
- rules: o,
918
+ rules: f,
919
919
  onBlur: a,
920
920
  onChange: t,
921
- shouldUnregister: v = !1,
922
- ...p
921
+ shouldUnregister: d = !1,
922
+ ...v
923
923
  }) => {
924
- const g = x(
925
- (d, R) => {
926
- d(), a == null || a(R);
924
+ const R = x(
925
+ (p, _) => {
926
+ p(), a == null || a(_);
927
927
  },
928
928
  [a]
929
- ), f = x(
930
- (d, R) => {
931
- d(te(R.detail.selectedOptions)), t == null || t(R);
929
+ ), o = x(
930
+ (p, _) => {
931
+ p(te(_.detail.selectedOptions)), t == null || t(_);
932
932
  },
933
933
  [t]
934
934
  );
@@ -938,28 +938,28 @@ const Jr = ({
938
938
  name: l,
939
939
  control: u,
940
940
  defaultValue: s,
941
- rules: o,
942
- shouldUnregister: v,
943
- render: ({ field: { ref: d, onChange: R, onBlur: _, value: j } }) => /* @__PURE__ */ E.jsx(
944
- jr,
941
+ rules: f,
942
+ shouldUnregister: d,
943
+ render: ({ field: { ref: p, onChange: _, onBlur: g, value: T } }) => /* @__PURE__ */ E.jsx(
944
+ Tr,
945
945
  {
946
- ref: d,
946
+ ref: p,
947
947
  options: n,
948
- onBlur: () => g.bind(null, _),
949
- onChange: f.bind(null, R),
950
- selectedOptions: ne(n, j),
951
- ...p
948
+ onBlur: () => R.bind(null, g),
949
+ onChange: o.bind(null, _),
950
+ selectedOptions: ne(n, T),
951
+ ...v
952
952
  }
953
953
  )
954
954
  }
955
955
  );
956
- }, et = ({
956
+ }, rt = ({
957
957
  name: l,
958
958
  control: u,
959
959
  onChange: n,
960
960
  ...s
961
961
  }) => {
962
- const o = x(
962
+ const f = x(
963
963
  (a, t) => {
964
964
  a(t.detail.value), n == null || n(t);
965
965
  },
@@ -970,41 +970,41 @@ const Jr = ({
970
970
  {
971
971
  name: l,
972
972
  control: u,
973
- render: ({ field: { onChange: a, value: t } }) => /* @__PURE__ */ E.jsx(Or, { onChange: o.bind(null, a), value: t, items: s.items, ...s })
973
+ render: ({ field: { onChange: a, value: t } }) => /* @__PURE__ */ E.jsx(Or, { onChange: f.bind(null, a), value: t, items: s.items, ...s })
974
974
  }
975
975
  );
976
976
  }, Fe = (l = [], u) => {
977
977
  let n = null;
978
978
  return l && u && (n = l.reduce(
979
- (s, o) => {
980
- if ("options" in o) {
981
- const a = Fe(o.options, u);
979
+ (s, f) => {
980
+ if ("options" in f) {
981
+ const a = Fe(f.options, u);
982
982
  a && s.push(a);
983
983
  }
984
- return "value" in o && o.value === u && s.push(o), s;
984
+ return "value" in f && f.value === u && s.push(f), s;
985
985
  },
986
986
  []
987
987
  )[0]), n || null;
988
- }, Lr = {
988
+ }, Ur = {
989
989
  mapSelectedOptionWithOptions: Fe
990
- }, rt = ({
990
+ }, tt = ({
991
991
  name: l,
992
992
  control: u,
993
993
  defaultValue: n,
994
994
  rules: s,
995
- shouldUnregister: o = !1,
995
+ shouldUnregister: f = !1,
996
996
  onBlur: a,
997
997
  onChange: t,
998
- ...v
998
+ ...d
999
999
  }) => {
1000
- const p = x(
1001
- (f, d) => {
1002
- f(), a == null || a(d);
1000
+ const v = x(
1001
+ (o, p) => {
1002
+ o(), a == null || a(p);
1003
1003
  },
1004
1004
  [a]
1005
- ), g = x(
1006
- (f, d) => {
1007
- f(d.detail.selectedOption.value), t == null || t(d);
1005
+ ), R = x(
1006
+ (o, p) => {
1007
+ o(p.detail.selectedOption.value), t == null || t(p);
1008
1008
  },
1009
1009
  [t]
1010
1010
  );
@@ -1015,26 +1015,61 @@ const Jr = ({
1015
1015
  control: u,
1016
1016
  defaultValue: n,
1017
1017
  rules: s,
1018
- shouldUnregister: o,
1019
- render: ({ field: { ref: f, onChange: d, onBlur: R, value: _ } }) => /* @__PURE__ */ E.jsx(
1018
+ shouldUnregister: f,
1019
+ render: ({ field: { ref: o, onChange: p, onBlur: _, value: g } }) => /* @__PURE__ */ E.jsx(
1020
1020
  Sr,
1021
1021
  {
1022
- ref: f,
1023
- selectedOption: Lr.mapSelectedOptionWithOptions(v.options, _),
1024
- onBlur: p.bind(null, R),
1025
- onChange: g.bind(null, d),
1026
- ...v
1022
+ ref: o,
1023
+ selectedOption: Ur.mapSelectedOptionWithOptions(d.options, g),
1024
+ onBlur: v.bind(null, _),
1025
+ onChange: R.bind(null, p),
1026
+ ...d
1027
1027
  }
1028
1028
  )
1029
1029
  }
1030
1030
  );
1031
- }, tt = ({
1031
+ }, nt = ({
1032
+ name: l,
1033
+ control: u,
1034
+ defaultValue: n,
1035
+ rules: s,
1036
+ shouldUnregister: f = !1,
1037
+ onChange: a,
1038
+ ...t
1039
+ }) => {
1040
+ const d = x(
1041
+ (v) => {
1042
+ a == null || a(v);
1043
+ },
1044
+ [a]
1045
+ );
1046
+ return /* @__PURE__ */ E.jsx(
1047
+ S,
1048
+ {
1049
+ name: l,
1050
+ control: u,
1051
+ defaultValue: n,
1052
+ rules: s,
1053
+ shouldUnregister: f,
1054
+ render: ({ field: { onChange: v, value: R } }) => /* @__PURE__ */ E.jsx(
1055
+ Pr,
1056
+ {
1057
+ value: R,
1058
+ onChange: (o) => {
1059
+ v(o.detail.value), d(o);
1060
+ },
1061
+ ...t
1062
+ }
1063
+ )
1064
+ }
1065
+ );
1066
+ }, at = ({
1032
1067
  name: l,
1033
1068
  control: u,
1034
1069
  onChange: n,
1035
1070
  ...s
1036
1071
  }) => {
1037
- const o = x(
1072
+ const f = x(
1038
1073
  (a, t) => {
1039
1074
  a([...t.detail.tags]), n == null || n(t);
1040
1075
  },
@@ -1045,24 +1080,24 @@ const Jr = ({
1045
1080
  {
1046
1081
  name: l,
1047
1082
  control: u,
1048
- render: ({ field: { ref: a, onChange: t, value: v } }) => /* @__PURE__ */ E.jsx(
1049
- Pr,
1083
+ render: ({ field: { ref: a, onChange: t, value: d } }) => /* @__PURE__ */ E.jsx(
1084
+ wr,
1050
1085
  {
1051
1086
  ref: a,
1052
- tags: v || [],
1053
- onChange: o.bind(null, t),
1087
+ tags: d || [],
1088
+ onChange: f.bind(null, t),
1054
1089
  ...s
1055
1090
  }
1056
1091
  )
1057
1092
  }
1058
1093
  );
1059
- }, nt = ({
1094
+ }, it = ({
1060
1095
  name: l,
1061
1096
  control: u,
1062
1097
  onChange: n,
1063
1098
  ...s
1064
1099
  }) => {
1065
- const o = x(
1100
+ const f = x(
1066
1101
  (a, t) => {
1067
1102
  a(t.detail.filteringText), n == null || n(t);
1068
1103
  },
@@ -1073,35 +1108,35 @@ const Jr = ({
1073
1108
  {
1074
1109
  name: l,
1075
1110
  control: u,
1076
- render: ({ field: { ref: a, onChange: t, value: v } }) => /* @__PURE__ */ E.jsx(
1077
- wr,
1111
+ render: ({ field: { ref: a, onChange: t, value: d } }) => /* @__PURE__ */ E.jsx(
1112
+ kr,
1078
1113
  {
1079
1114
  ref: a,
1080
- filteringText: v,
1081
- onChange: o.bind(null, t),
1115
+ filteringText: d,
1116
+ onChange: f.bind(null, t),
1082
1117
  ...s
1083
1118
  }
1084
1119
  )
1085
1120
  }
1086
1121
  );
1087
- }, at = ({
1122
+ }, lt = ({
1088
1123
  name: l,
1089
1124
  control: u,
1090
1125
  defaultValue: n,
1091
1126
  rules: s,
1092
- shouldUnregister: o = !1,
1127
+ shouldUnregister: f = !1,
1093
1128
  onBlur: a,
1094
1129
  onChange: t,
1095
- ...v
1130
+ ...d
1096
1131
  }) => {
1097
- const p = x(
1098
- (f, d) => {
1099
- f(), a == null || a(d);
1132
+ const v = x(
1133
+ (o, p) => {
1134
+ o(), a == null || a(p);
1100
1135
  },
1101
1136
  [a]
1102
- ), g = x(
1103
- (f, d) => {
1104
- f(d.detail.value), t == null || t(d);
1137
+ ), R = x(
1138
+ (o, p) => {
1139
+ o(p.detail.value), t == null || t(p);
1105
1140
  },
1106
1141
  [t]
1107
1142
  );
@@ -1112,22 +1147,22 @@ const Jr = ({
1112
1147
  control: u,
1113
1148
  defaultValue: n,
1114
1149
  rules: s,
1115
- shouldUnregister: o,
1116
- render: ({ field: { onChange: f, onBlur: d, value: R, ref: _ } }) => /* @__PURE__ */ E.jsx(
1117
- kr,
1150
+ shouldUnregister: f,
1151
+ render: ({ field: { onChange: o, onBlur: p, value: _, ref: g } }) => /* @__PURE__ */ E.jsx(
1152
+ Cr,
1118
1153
  {
1119
- ref: _,
1154
+ ref: g,
1120
1155
  name: l,
1121
- value: R,
1122
- onBlur: p.bind(null, d),
1123
- onChange: g.bind(null, f),
1124
- ...v
1156
+ value: _,
1157
+ onBlur: v.bind(null, p),
1158
+ onChange: R.bind(null, o),
1159
+ ...d
1125
1160
  }
1126
1161
  )
1127
1162
  }
1128
1163
  );
1129
- }, it = ({ name: l, control: u, onChange: n, ...s }) => {
1130
- const o = x(
1164
+ }, st = ({ name: l, control: u, onChange: n, ...s }) => {
1165
+ const f = x(
1131
1166
  (a, t) => {
1132
1167
  a(t.detail.value), n == null || n(t);
1133
1168
  },
@@ -1138,24 +1173,24 @@ const Jr = ({
1138
1173
  {
1139
1174
  name: l,
1140
1175
  control: u,
1141
- render: ({ field: { onChange: a, value: t } }) => /* @__PURE__ */ E.jsx(Cr, { onChange: o.bind(null, a), value: t, items: s.items, ...s })
1176
+ render: ({ field: { onChange: a, value: t } }) => /* @__PURE__ */ E.jsx(Dr, { onChange: f.bind(null, a), value: t, items: s.items, ...s })
1142
1177
  }
1143
1178
  );
1144
- }, lt = ({
1179
+ }, ut = ({
1145
1180
  name: l,
1146
1181
  control: u,
1147
1182
  onBlur: n,
1148
1183
  onChange: s,
1149
- ...o
1184
+ ...f
1150
1185
  }) => {
1151
1186
  const a = x(
1152
- (v, p) => {
1153
- v(), n == null || n(p);
1187
+ (d, v) => {
1188
+ d(), n == null || n(v);
1154
1189
  },
1155
1190
  [n]
1156
1191
  ), t = x(
1157
- (v, p) => {
1158
- v(p.detail.value), s == null || s(p);
1192
+ (d, v) => {
1193
+ d(v.detail.value), s == null || s(v);
1159
1194
  },
1160
1195
  [s]
1161
1196
  );
@@ -1164,26 +1199,26 @@ const Jr = ({
1164
1199
  {
1165
1200
  name: l,
1166
1201
  control: u,
1167
- render: ({ field: { ref: v, onChange: p, onBlur: g, value: f } }) => /* @__PURE__ */ E.jsx(
1168
- Dr,
1202
+ render: ({ field: { ref: d, onChange: v, onBlur: R, value: o } }) => /* @__PURE__ */ E.jsx(
1203
+ Fr,
1169
1204
  {
1170
1205
  name: l,
1171
- ref: v,
1172
- value: f,
1173
- onBlur: a.bind(null, g),
1174
- onChange: t.bind(null, p),
1175
- ...o
1206
+ ref: d,
1207
+ value: o,
1208
+ onBlur: a.bind(null, R),
1209
+ onChange: t.bind(null, v),
1210
+ ...f
1176
1211
  }
1177
1212
  )
1178
1213
  }
1179
1214
  );
1180
- }, st = ({
1215
+ }, ot = ({
1181
1216
  name: l,
1182
1217
  control: u,
1183
1218
  onChange: n,
1184
1219
  ...s
1185
1220
  }) => {
1186
- const o = x(
1221
+ const f = x(
1187
1222
  (a, t) => {
1188
1223
  a(t.detail.checked), n == null || n(t);
1189
1224
  },
@@ -1194,29 +1229,30 @@ const Jr = ({
1194
1229
  {
1195
1230
  name: l,
1196
1231
  control: u,
1197
- render: ({ field: { ref: a, onChange: t, value: v = !1 } }) => /* @__PURE__ */ E.jsx(Fr, { ref: a, name: l, checked: v, onChange: o.bind(null, t), ...s })
1232
+ render: ({ field: { ref: a, onChange: t, value: d = !1 } }) => /* @__PURE__ */ E.jsx(Ar, { ref: a, name: l, checked: d, onChange: f.bind(null, t), ...s })
1198
1233
  }
1199
1234
  );
1200
1235
  };
1201
1236
  export {
1202
- Jr as CAttributeEditor,
1203
- qr as CAutosuggest,
1204
- Kr as CCards,
1205
- Gr as CCheckbox,
1206
- zr as CCodeEditor,
1207
- Xr as CDatePicker,
1208
- Hr as CDateRangePicker,
1209
- Zr as CInput,
1210
- Br as CMultiselect,
1211
- et as CRadioGroup,
1212
- rt as CSelect,
1213
- tt as CTagEditor,
1214
- nt as CTextFilter,
1215
- at as CTextarea,
1216
- it as CTiles,
1217
- lt as CTimeInput,
1218
- st as CToggle,
1219
- Qr as MultiSelectUtils,
1220
- Lr as SelectUtils
1237
+ qr as CAttributeEditor,
1238
+ Gr as CAutosuggest,
1239
+ zr as CCards,
1240
+ Kr as CCheckbox,
1241
+ Xr as CCodeEditor,
1242
+ Hr as CDatePicker,
1243
+ Zr as CDateRangePicker,
1244
+ Qr as CInput,
1245
+ et as CMultiselect,
1246
+ rt as CRadioGroup,
1247
+ tt as CSelect,
1248
+ nt as CSlider,
1249
+ at as CTagEditor,
1250
+ it as CTextFilter,
1251
+ lt as CTextarea,
1252
+ st as CTiles,
1253
+ ut as CTimeInput,
1254
+ ot as CToggle,
1255
+ Br as MultiSelectUtils,
1256
+ Ur as SelectUtils
1221
1257
  };
1222
1258
  //# sourceMappingURL=react-hook-form-cloudscape.es.js.map