@commercelayer/app-elements 0.0.19 → 0.0.20

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.
Files changed (80) hide show
  1. package/dist/{Async-01069344.js → Async-86d7b52d.js} +18 -17
  2. package/dist/{InputDateComponent-7cc64865.js → InputDateComponent-8fe235f4.js} +2542 -2381
  3. package/dist/{Select-207fa38b.js → Select-c5f20a31.js} +2 -2
  4. package/dist/helpers/date.d.ts +2 -2
  5. package/dist/hooks/useClickAway.d.ts +1 -1
  6. package/dist/{main-29e2c4ad.js → main-b7422b94.js} +843 -706
  7. package/dist/main.d.ts +1 -1
  8. package/dist/main.js +22 -21
  9. package/dist/{overrides-ded5eb26.js → overrides-c4c3ace4.js} +1630 -1529
  10. package/dist/providers/CoreSdkProvider/index.d.ts +2 -2
  11. package/dist/providers/CoreSdkProvider/makeSdkClient.d.ts +1 -1
  12. package/dist/providers/ErrorBoundary.d.ts +1 -1
  13. package/dist/providers/TokenProvider/getInfoFromJwt.d.ts +1 -1
  14. package/dist/providers/TokenProvider/index.d.ts +3 -4
  15. package/dist/providers/TokenProvider/reducer.d.ts +2 -2
  16. package/dist/providers/TokenProvider/storage.d.ts +2 -2
  17. package/dist/providers/TokenProvider/types.d.ts +6 -6
  18. package/dist/providers/TokenProvider/url.d.ts +1 -1
  19. package/dist/providers/TokenProvider/validateToken.d.ts +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/ui/atoms/A.d.ts +0 -1
  22. package/dist/ui/atoms/Avatar.d.ts +0 -1
  23. package/dist/ui/atoms/Badge.d.ts +1 -1
  24. package/dist/ui/atoms/Button.d.ts +3 -4
  25. package/dist/ui/atoms/Card.d.ts +0 -1
  26. package/dist/ui/atoms/Container.d.ts +0 -1
  27. package/dist/ui/atoms/EmptyState.d.ts +2 -2
  28. package/dist/ui/atoms/FlexRow.d.ts +2 -3
  29. package/dist/ui/atoms/Hint.d.ts +2 -2
  30. package/dist/ui/atoms/Icon.d.ts +18 -19
  31. package/dist/ui/atoms/Legend.d.ts +1 -1
  32. package/dist/ui/atoms/PageHeading.d.ts +2 -3
  33. package/dist/ui/atoms/RadialProgress.d.ts +1 -1
  34. package/dist/ui/atoms/Skeleton.d.ts +1 -1
  35. package/dist/ui/atoms/SkeletonTemplate.d.ts +5 -5
  36. package/dist/ui/atoms/Spacer.d.ts +2 -3
  37. package/dist/ui/atoms/Stack.d.ts +1 -1
  38. package/dist/ui/atoms/StatusDot.d.ts +1 -1
  39. package/dist/ui/atoms/Tabs.d.ts +1 -1
  40. package/dist/ui/atoms/Text.d.ts +6 -7
  41. package/dist/ui/atoms/dropdown/DropdownMenu.d.ts +0 -1
  42. package/dist/ui/atoms/dropdown/DropdownMenuDivider.d.ts +0 -1
  43. package/dist/ui/atoms/dropdown/DropdownMenuItem.d.ts +0 -1
  44. package/dist/ui/atoms/tables/Td.d.ts +0 -1
  45. package/dist/ui/atoms/tables/Th.d.ts +0 -1
  46. package/dist/ui/atoms/tables/Tr.d.ts +0 -1
  47. package/dist/ui/composite/ContextMenu.d.ts +0 -1
  48. package/dist/ui/composite/PageLayout.d.ts +2 -2
  49. package/dist/ui/composite/Report.d.ts +1 -1
  50. package/dist/ui/forms/Input.d.ts +2 -3
  51. package/dist/ui/forms/InputCheckbox.d.ts +3 -4
  52. package/dist/ui/forms/InputDate/InputDateComponent.d.ts +3 -4
  53. package/dist/ui/forms/InputDate/index.d.ts +3 -4
  54. package/dist/ui/forms/InputDateRange.d.ts +3 -4
  55. package/dist/ui/forms/InputFeedback.d.ts +1 -1
  56. package/dist/ui/forms/InputFile.d.ts +2 -3
  57. package/dist/ui/forms/InputJson.d.ts +1 -1
  58. package/dist/ui/forms/InputReadonly.d.ts +1 -1
  59. package/dist/ui/forms/InputSelect/Async.d.ts +3 -3
  60. package/dist/ui/forms/InputSelect/Select.d.ts +2 -2
  61. package/dist/ui/forms/InputSelect/index.d.ts +23 -6
  62. package/dist/ui/forms/InputSelect/overrides.d.ts +2 -2
  63. package/dist/ui/forms/InputSelect/styles.d.ts +3 -3
  64. package/dist/ui/forms/InputTextArea.d.ts +2 -3
  65. package/dist/ui/forms/InputToggleBox.d.ts +1 -2
  66. package/dist/ui/forms/InputToggleListBox.d.ts +1 -2
  67. package/dist/ui/forms/InputWrapper.d.ts +2 -2
  68. package/dist/ui/forms/Label.d.ts +0 -1
  69. package/dist/ui/forms/RadioButtons.d.ts +4 -5
  70. package/dist/ui/forms/ToggleButtons.d.ts +5 -6
  71. package/dist/ui/lists/List.d.ts +3 -3
  72. package/dist/ui/lists/ListDetails.d.ts +1 -1
  73. package/dist/ui/lists/ListDetailsItem.d.ts +1 -1
  74. package/dist/ui/lists/ListItem.d.ts +4 -5
  75. package/dist/ui/resources/ResourceList/index.d.ts +5 -5
  76. package/dist/ui/resources/ResourceList/infiniteFetcher.d.ts +3 -3
  77. package/dist/ui/resources/ResourceList/reducer.d.ts +2 -2
  78. package/dist/ui/tables/TableData.d.ts +1 -1
  79. package/dist/utils/children.d.ts +1 -1
  80. package/package.json +22 -22
@@ -1,15 +1,15 @@
1
1
  import * as de from "react";
2
2
  import le, { useRef as W, useState as a, useEffect as z, useCallback as B, forwardRef as ce } from "react";
3
- import { _ as ve, a as s, h as Oe, b as O, c as Se, u as _e, S as he, d as me, s as ge } from "./overrides-ded5eb26.js";
3
+ import { _ as ve, a as s, h as Oe, b as O, c as Se, u as _e, S as he, d as me, s as ge } from "./overrides-c4c3ace4.js";
4
4
  import "react-dom";
5
- import "./main-29e2c4ad.js";
5
+ import "./main-b7422b94.js";
6
6
  import "@commercelayer/sdk";
7
7
  var ye = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
8
8
  function Ce(t) {
9
- var r = t.defaultOptions, n = r === void 0 ? !1 : r, o = t.cacheOptions, u = o === void 0 ? !1 : o, S = t.loadOptions;
9
+ var o = t.defaultOptions, n = o === void 0 ? !1 : o, r = t.cacheOptions, u = r === void 0 ? !1 : r, S = t.loadOptions;
10
10
  t.options;
11
- var I = t.isLoading, F = I === void 0 ? !1 : I, L = t.onInputChange, A = t.filterOption, G = A === void 0 ? null : A, P = ve(t, ye), V = P.inputValue, p = W(void 0), c = W(!1), H = a(Array.isArray(n) ? n : void 0), E = s(H, 2), J = E[0], R = E[1], K = a(typeof V < "u" ? V : ""), D = s(K, 2), $ = D[0], _ = D[1], Q = a(n === !0), x = s(Q, 2), U = x[0], f = x[1], X = a(void 0), M = s(X, 2), h = M[0], m = M[1], Y = a([]), j = s(Y, 2), Z = j[0], g = j[1], k = a(!1), b = s(k, 2), ee = b[0], v = b[1], te = a({}), q = s(te, 2), d = q[0], w = q[1], ne = a(void 0), N = s(ne, 2), ae = N[0], se = N[1], re = a(void 0), T = s(re, 2), oe = T[0], ue = T[1];
12
- u !== oe && (w({}), ue(u)), n !== ae && (R(Array.isArray(n) ? n : void 0), se(n)), z(function() {
11
+ var I = t.isLoading, F = I === void 0 ? !1 : I, A = t.onInputChange, L = t.filterOption, G = L === void 0 ? null : L, P = ve(t, ye), V = P.inputValue, p = W(void 0), c = W(!1), H = a(Array.isArray(n) ? n : void 0), E = s(H, 2), J = E[0], R = E[1], K = a(typeof V < "u" ? V : ""), $ = s(K, 2), D = $[0], _ = $[1], Q = a(n === !0), x = s(Q, 2), U = x[0], f = x[1], X = a(void 0), M = s(X, 2), h = M[0], m = M[1], Y = a([]), j = s(Y, 2), Z = j[0], g = j[1], k = a(!1), b = s(k, 2), ee = b[0], v = b[1], te = a({}), q = s(te, 2), d = q[0], w = q[1], ne = a(void 0), N = s(ne, 2), ae = N[0], se = N[1], oe = a(void 0), T = s(oe, 2), re = T[0], ue = T[1];
12
+ u !== re && (w({}), ue(u)), n !== ae && (R(Array.isArray(n) ? n : void 0), se(n)), z(function() {
13
13
  return c.current = !0, function() {
14
14
  c.current = !1;
15
15
  };
@@ -23,12 +23,12 @@ function Ce(t) {
23
23
  });
24
24
  }, [S]);
25
25
  z(function() {
26
- n === !0 && y($, function(l) {
26
+ n === !0 && y(D, function(l) {
27
27
  c.current && (R(l || []), f(!!p.current));
28
28
  });
29
29
  }, []);
30
30
  var ie = B(function(l, i) {
31
- var e = Oe(l, i, L);
31
+ var e = Oe(l, i, A);
32
32
  if (!e) {
33
33
  p.current = void 0, _(""), m(""), g([]), f(!1), v(!1);
34
34
  return;
@@ -41,7 +41,7 @@ function Ce(t) {
41
41
  c && fe === p.current && (p.current = void 0, f(!1), m(e), g(C || []), v(!1), w(C ? O(O({}, d), {}, Se({}, e, C)) : d));
42
42
  });
43
43
  }
44
- }, [u, y, h, d, L]), pe = ee ? [] : $ && h ? Z : J || [];
44
+ }, [u, y, h, d, A]), pe = ee ? [] : D && h ? Z : J || [];
45
45
  return O(O({}, P), {}, {
46
46
  options: pe,
47
47
  isLoading: U || F,
@@ -49,27 +49,28 @@ function Ce(t) {
49
49
  filterOption: G
50
50
  });
51
51
  }
52
- var Ie = /* @__PURE__ */ ce(function(t, r) {
53
- var n = Ce(t), o = _e(n);
52
+ var Ie = /* @__PURE__ */ ce(function(t, o) {
53
+ var n = Ce(t), r = _e(n);
54
54
  return /* @__PURE__ */ de.createElement(he, me({
55
- ref: r
56
- }, o));
55
+ ref: o
56
+ }, r));
57
57
  });
58
+ const Ae = Ie;
58
59
  function Le({
59
60
  onSelect: t,
60
- noOptionsMessage: r,
61
+ noOptionsMessage: o,
61
62
  initialValues: n,
62
- loadAsyncValues: o,
63
+ loadAsyncValues: r,
63
64
  ...u
64
65
  }) {
65
66
  return /* @__PURE__ */ le.createElement(
66
- Ie,
67
+ Ae,
67
68
  {
68
69
  ...u,
69
70
  defaultOptions: n,
70
71
  onChange: t,
71
- noOptionsMessage: () => r,
72
- loadOptions: o,
72
+ noOptionsMessage: () => o,
73
+ loadOptions: r,
73
74
  components: ge
74
75
  }
75
76
  );