@hortiview/shared-components 2.7.0 → 2.8.1

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 (113) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +49 -22
  3. package/dist/{AlertBanner-JnX0tJGC.js → AlertBanner-DlgFtlZm.js} +3 -3
  4. package/dist/{BigLoadingSpinner-chQoiNY9.js → BigLoadingSpinner-B_HFhx2F.js} +1 -1
  5. package/dist/{GenericCard-c9yuyN3m.js → GenericCard-Cv8qaFLu.js} +3 -3
  6. package/dist/{ListAreaService-BY6ZTds9.js → ListAreaService-D9HRsvH0.js} +5 -5
  7. package/dist/{OfflineView-BUSWAKez.js → OfflineView-Bw-sbsym.js} +3 -3
  8. package/dist/{_baseIsEqual-CZNn3LMM.js → _baseIsEqual-Df2URKWm.js} +27 -28
  9. package/dist/{_getAllKeys-tc1bcd1W.js → _getAllKeys-BQWmkEw5.js} +9 -9
  10. package/dist/_getTag-BkGSRa18.js +79 -0
  11. package/dist/_setToString-B6E13pDg.js +580 -0
  12. package/dist/components/AlertBanner/AlertBanner.js +4 -4
  13. package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
  14. package/dist/components/AlertBanner/LinkBanner.js +3 -3
  15. package/dist/components/BaseView/BaseView.js +2 -2
  16. package/dist/components/BasicHeading/BasicHeading.js +2 -2
  17. package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
  18. package/dist/components/BlockView/BlockView.js +1 -1
  19. package/dist/components/ChipCard/ChipCard.js +5 -5
  20. package/dist/components/ContextMenu/ContextMenu.js +4 -4
  21. package/dist/components/DeleteModal/DeleteModal.js +10 -10
  22. package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
  23. package/dist/components/Disclaimer/Disclaimer.js +3 -3
  24. package/dist/components/EmptyView/EmptyView.js +4 -4
  25. package/dist/components/Filter/Filter.js +33 -33
  26. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
  27. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +4936 -4927
  28. package/dist/components/FormComponents/FormNumber/CustomTextField.js +3 -3
  29. package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
  30. package/dist/components/FormComponents/FormSelect/FormSelect.js +2 -2
  31. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
  32. package/dist/components/FormComponents/FormSlider/FormSlider.js +4 -4
  33. package/dist/components/FormComponents/FormText/FormText.js +2 -2
  34. package/dist/components/FormComponents/FormToggle/FormToggle.js +4 -4
  35. package/dist/components/GenericTable/GenericTable.js +20 -20
  36. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
  37. package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
  38. package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
  39. package/dist/components/HashTabView/HashTabView.js +6 -6
  40. package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
  41. package/dist/components/HealthCheckFailed/HealthCheckFailed.js +4 -4
  42. package/dist/components/Iconify/Iconify.js +2 -2
  43. package/dist/components/InfoGroup/InfoGroup.js +3 -3
  44. package/dist/components/ListArea/ListArea.js +6 -6
  45. package/dist/components/ListArea/ListArea.test.js +3 -3
  46. package/dist/components/ListArea/ListAreaService.js +6 -6
  47. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
  48. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
  49. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +6 -6
  50. package/dist/components/Modal/Modal.d.ts +5 -4
  51. package/dist/components/Modal/Modal.js +94 -92
  52. package/dist/components/ModulePadding/ModulePadding.js +8 -8
  53. package/dist/components/OfflineView/OfflineView.js +4 -4
  54. package/dist/components/OfflineView/OfflineView.test.js +1 -1
  55. package/dist/components/OnboardingBanner/OnboardingBanner.js +7 -7
  56. package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
  57. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
  58. package/dist/components/SafeForm/SafeForm.d.ts +11 -0
  59. package/dist/components/SafeForm/SafeForm.js +9 -0
  60. package/dist/components/SafeForm/SafeForm.test.d.ts +1 -0
  61. package/dist/components/SafeForm/SafeForm.test.js +91 -0
  62. package/dist/components/SearchBar/SearchBar.js +20 -19
  63. package/dist/components/Select/Select.js +2 -2
  64. package/dist/components/Stepper/Stepper.js +1 -1
  65. package/dist/components/Stepper/components/StepperButton.js +1 -1
  66. package/dist/components/Stepper/components/StepperHeader.js +2 -2
  67. package/dist/components/Stepper/components/StepperIndicator.js +1 -1
  68. package/dist/{get-B8c-T4F8.js → get-CqneoueQ.js} +1 -1
  69. package/dist/{get-C7KpEkVs.js → get-DQr2KQKm.js} +12 -13
  70. package/dist/hooks/useHelperText.js +1 -1
  71. package/dist/index-D5m--65X.js +1491 -0
  72. package/dist/{index.es--yyG47az.js → index.es-1zrFd4Te.js} +2 -2
  73. package/dist/{index.es-DErA6zWG.js → index.es-8MVlRCi4.js} +2 -2
  74. package/dist/{index.es-CzUKBF7E.js → index.es-BaX-8joZ.js} +10 -10
  75. package/dist/{index.es-6c1Xbl0N.js → index.es-BbaCXS9-.js} +1 -1
  76. package/dist/{index.es-CPqaUyn3.js → index.es-BikIx4uw.js} +10 -10
  77. package/dist/{index.es-DDo_AHL0.js → index.es-CDMu_yu0.js} +7 -7
  78. package/dist/{index.es-Bf149BSP.js → index.es-Cdu6tjUC.js} +4 -4
  79. package/dist/{index.es-DlzwTKbh.js → index.es-ChSlnpSq.js} +88 -90
  80. package/dist/{index.es-CqgVUhln.js → index.es-CyjMwj5g.js} +3 -3
  81. package/dist/{index.es-BoWmBoqO.js → index.es-D66OkZJH.js} +8 -8
  82. package/dist/{index.es-D-ph6ImM.js → index.es-DFFyENnI.js} +1 -1
  83. package/dist/{index.es-zQBuWUgU.js → index.es-DTMwaJ6B.js} +2 -2
  84. package/dist/{index.es-DOX4XTz_.js → index.es-DgTJmbgD.js} +2 -2
  85. package/dist/{index.es-Bx1E5MPK.js → index.es-DmsyeHLO.js} +4 -4
  86. package/dist/{index.es-oOD85ZwA.js → index.es-Dnrk7XL6.js} +4 -4
  87. package/dist/{index.es-CbBdaRO2.js → index.es-Dw1eih7R.js} +2 -2
  88. package/dist/{index.es-DxDU9C_B.js → index.es-eKuwB1ll.js} +1 -1
  89. package/dist/{index.es-CUuzYysw.js → index.es-jFaPNuBO.js} +4 -4
  90. package/dist/{index.es-BTc2I5pe.js → index.es-ks_RnHLh.js} +2 -2
  91. package/dist/{index.es-DMGNht46.js → index.es-nQ0lMwpE.js} +1 -1
  92. package/dist/{index.es-U5-b20Gv.js → index.es-p4O33fMu.js} +4 -4
  93. package/dist/{index.es-DF11ERDs.js → index.es-qxTN-Bb2.js} +2 -2
  94. package/dist/{index.es-Kg9soDed.js → index.es-xnSvM9b9.js} +3 -3
  95. package/dist/{isArray-Dub1wGJM.js → isArray-CSaAxHlq.js} +1 -1
  96. package/dist/isArray-DDZrq40X.js +456 -0
  97. package/dist/{isEmpty-DsdC9UUD.js → isEmpty-SkzPhavO.js} +3 -3
  98. package/dist/{isString-BW9UHONv.js → isString-CZsZiWgW.js} +2 -2
  99. package/dist/main.d.ts +2 -1
  100. package/dist/main.js +38 -36
  101. package/dist/{omit-1Eom1PmQ.js → omit-BN3qeeaj.js} +62 -64
  102. package/dist/{orderBy-CyjsW2ET.js → orderBy-D4LvP9Az.js} +40 -41
  103. package/dist/services/UtilService.d.ts +1 -1
  104. package/dist/services/UtilService.js +25 -15
  105. package/dist/services/services.test.js +3 -0
  106. package/dist/{toString-CrgB_7Pe.js → toString-BFJes2_D.js} +1 -1
  107. package/dist/{uniqueId-NU3-C36A.js → uniqueId-DrPMzA-E.js} +1 -1
  108. package/package.json +1 -1
  109. package/dist/_MapCache-B75dXJyg.js +0 -376
  110. package/dist/_getTag-DYHrLaIw.js +0 -81
  111. package/dist/_setToString-Do1lSQTZ.js +0 -2034
  112. package/dist/isArray-DN9s620O.js +0 -83
  113. package/dist/isPlainObject-C273y67K.js +0 -40
@@ -1,9 +1,9 @@
1
1
  import { jsx as o, jsxs as f, Fragment as c } from "react/jsx-runtime";
2
- import { B as p } from "../../index.es-Bx1E5MPK.js";
3
- import { G as i } from "../../index.es-CbBdaRO2.js";
4
- import { I } from "../../index.es-DErA6zWG.js";
5
- import { T as l } from "../../index.es--yyG47az.js";
6
- import { u as N } from "../../uniqueId-NU3-C36A.js";
2
+ import { B as p } from "../../index.es-DmsyeHLO.js";
3
+ import { G as i } from "../../index.es-Dw1eih7R.js";
4
+ import { I } from "../../index.es-8MVlRCi4.js";
5
+ import { T as l } from "../../index.es-1zrFd4Te.js";
6
+ import { u as N } from "../../uniqueId-DrPMzA-E.js";
7
7
  import { AvailableCustomIcons as S } from "../../enums/AvailableCustomIcons.js";
8
8
  import { u as x } from "../../useBreakpoints-MzTZ0tCT.js";
9
9
  import { Iconify as B } from "../Iconify/Iconify.js";
@@ -23,9 +23,9 @@ import '../../assets/DeleteModal.css';const O = "_bulletPoint_bd412_1", j = "_mo
23
23
  icon: g,
24
24
  isIconCrossedOut: h,
25
25
  impossibleDeleteHeader: v,
26
- open: y,
26
+ open: _,
27
27
  setOpen: d,
28
- onDelete: _,
28
+ onDelete: y,
29
29
  onCancel: C,
30
30
  isDeletePossible: m = !0,
31
31
  isOnline: u = !0,
@@ -39,16 +39,16 @@ import '../../assets/DeleteModal.css';const O = "_bulletPoint_bd412_1", j = "_mo
39
39
  offlineViewProps: D,
40
40
  className: `${t.modal}`,
41
41
  modalSize: k ? "small" : "fullscreen",
42
- open: y,
42
+ open: _,
43
43
  title: r,
44
44
  onClose: () => d(!1),
45
- primaryButton: /* @__PURE__ */ o(
45
+ actionButton: /* @__PURE__ */ o(
46
46
  p,
47
47
  {
48
48
  "data-testid": "delete-button",
49
49
  variant: "danger",
50
50
  label: e,
51
- onClick: _,
51
+ onClick: y,
52
52
  disabled: !m || !u
53
53
  }
54
54
  ),
@@ -1,5 +1,5 @@
1
1
  import { jsxs as e, jsx as r, Fragment as n } from "react/jsx-runtime";
2
- import { G as i } from "../../index.es-CbBdaRO2.js";
2
+ import { G as i } from "../../index.es-Dw1eih7R.js";
3
3
  import { BasicHeading as a } from "../BasicHeading/BasicHeading.js";
4
4
  import '../../assets/DetailContentWrapper.css';const m = "_formContainer_gf66t_1", s = {
5
5
  formContainer: m
@@ -1,7 +1,7 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
- import { G as n } from "../../index.es-CbBdaRO2.js";
3
- import { I as t } from "../../index.es-DErA6zWG.js";
4
- import { d as m, T as d } from "../../index.es--yyG47az.js";
2
+ import { G as n } from "../../index.es-Dw1eih7R.js";
3
+ import { I as t } from "../../index.es-8MVlRCi4.js";
4
+ import { d as m, T as d } from "../../index.es-1zrFd4Te.js";
5
5
  import '../../assets/Disclaimer.css';const p = "_disclaimer_1k38t_1", y = "_iconArea_1k38t_7", a = {
6
6
  disclaimer: p,
7
7
  iconArea: y
@@ -1,9 +1,9 @@
1
1
  import { jsx as m, jsxs as $ } from "react/jsx-runtime";
2
- import { G as _ } from "../../index.es-CbBdaRO2.js";
3
- import { c as P, _ as T, P as e } from "../../_setToString-Do1lSQTZ.js";
2
+ import { G as _ } from "../../index.es-Dw1eih7R.js";
3
+ import { c as P, _ as T, P as e } from "../../index-D5m--65X.js";
4
4
  import c, { forwardRef as C, useRef as w, useImperativeHandle as H, useMemo as y } from "react";
5
- import { e as N, T as O } from "../../index.es--yyG47az.js";
6
- import { I as B } from "../../index.es-DErA6zWG.js";
5
+ import { e as N, T as O } from "../../index.es-1zrFd4Te.js";
6
+ import { I as B } from "../../index.es-8MVlRCi4.js";
7
7
  const j = {
8
8
  /**
9
9
  * Aligns the Hero contents.
@@ -1,23 +1,23 @@
1
1
  import { jsx as e, jsxs as b, Fragment as D } from "react/jsx-runtime";
2
- import { N as F } from "../../index.es-CPqaUyn3.js";
3
- import { B as h } from "../../index.es-Bx1E5MPK.js";
4
- import { G as _ } from "../../index.es-CbBdaRO2.js";
5
- import { I as W } from "../../index.es-Kg9soDed.js";
6
- import { S as j } from "../../index.es-CqgVUhln.js";
2
+ import { N as F } from "../../index.es-BikIx4uw.js";
3
+ import { B as h } from "../../index.es-DmsyeHLO.js";
4
+ import { G as _ } from "../../index.es-Dw1eih7R.js";
5
+ import { I as W } from "../../index.es-xnSvM9b9.js";
6
+ import { S as j } from "../../index.es-CyjMwj5g.js";
7
7
  import { useState as v } from "react";
8
8
  import { Iconify as z } from "../Iconify/Iconify.js";
9
9
  import { u as k } from "../../useBreakpoints-MzTZ0tCT.js";
10
10
  import "../../react-tooltip.min-DSY6KDqS.js";
11
- import "../../orderBy-CyjsW2ET.js";
11
+ import "../../orderBy-D4LvP9Az.js";
12
12
  import { SearchBar as G } from "../SearchBar/SearchBar.js";
13
- import "../../uniqueId-NU3-C36A.js";
13
+ import "../../uniqueId-DrPMzA-E.js";
14
14
  import { Modal as H } from "../Modal/Modal.js";
15
15
  import { Select as I } from "../Select/Select.js";
16
16
  import "react-hook-form";
17
- import "../../get-B8c-T4F8.js";
18
- import "../../omit-1Eom1PmQ.js";
19
- import "../../isArray-Dub1wGJM.js";
20
- import "../../isString-BW9UHONv.js";
17
+ import "../../get-CqneoueQ.js";
18
+ import "../../omit-BN3qeeaj.js";
19
+ import "../../isArray-CSaAxHlq.js";
20
+ import "../../isString-CZsZiWgW.js";
21
21
  import "../../types/Time.js";
22
22
  import '../../assets/Filter.css';const K = "_filterButton_qtl7a_1", T = "_relativeParent_qtl7a_6", V = "_filterBadge_qtl7a_10", E = "_dense_qtl7a_17", u = {
23
23
  filterButton: K,
@@ -27,7 +27,7 @@ import '../../assets/Filter.css';const K = "_filterButton_qtl7a_1", T = "_relati
27
27
  }, ut = ({
28
28
  clearFilterText: m,
29
29
  closeCallback: s,
30
- currentFilter: i,
30
+ currentFilter: r,
31
31
  filterButtonAsIcon: d = !1,
32
32
  filterButtonText: a,
33
33
  filterModalTitle: t,
@@ -35,21 +35,21 @@ import '../../assets/Filter.css';const K = "_filterButton_qtl7a_1", T = "_relati
35
35
  modalCancelButtonText: g,
36
36
  modalConfirmButtonText: p,
37
37
  useModal: o = !0,
38
- selectAllLabel: r,
38
+ selectAllLabel: i,
39
39
  "data-testid": w
40
40
  }) => {
41
- const { isDesktop: A } = k(), [$, B] = v(!1), [c, y] = v(i), [q, C] = v(0), x = () => {
42
- B(!1), s(c), C(
41
+ const { isDesktop: A } = k(), [$, B] = v(!1), [c, C] = v(r), [q, x] = v(0), y = () => {
42
+ B(!1), s(c), x(
43
43
  c.reduce((l, { filterValue: n }) => n === void 0 ? l : typeof n == "boolean" ? n ? l + 1 : l : Array.isArray(n) ? l + n.length : typeof n == "string" && n.length ? l + 1 : l, 0)
44
44
  );
45
45
  }, O = () => {
46
- y([]), C(0);
46
+ C([]), x(0);
47
47
  }, S = (l) => {
48
48
  const n = [
49
49
  ...c.filter((P) => P.id !== l.id),
50
50
  l
51
51
  ];
52
- y(n), o || s(n);
52
+ C(n), o || s(n);
53
53
  };
54
54
  return o ? /* @__PURE__ */ b(D, { children: [
55
55
  /* @__PURE__ */ e(
@@ -66,7 +66,7 @@ import '../../assets/Filter.css';const K = "_filterButton_qtl7a_1", T = "_relati
66
66
  H,
67
67
  {
68
68
  open: $,
69
- onClose: x,
69
+ onClose: y,
70
70
  title: t,
71
71
  modalSize: A ? "small" : "fullscreen",
72
72
  headerActions: /* @__PURE__ */ e(h, { "data-testid": "filter-clear-button", variant: "text", onClick: O, children: m }),
@@ -79,12 +79,12 @@ import '../../assets/Filter.css';const K = "_filterButton_qtl7a_1", T = "_relati
79
79
  children: g
80
80
  }
81
81
  ),
82
- primaryButton: /* @__PURE__ */ e(h, { "data-testid": "filter-confirm-button", variant: "filled", onClick: x, children: p }),
83
- children: /* @__PURE__ */ e(_, { direction: "vertical", "data-testid": "filter-map-filters", children: N(f, c, S, r) })
82
+ actionButton: /* @__PURE__ */ e(h, { "data-testid": "filter-confirm-button", variant: "filled", onClick: y, children: p }),
83
+ children: /* @__PURE__ */ e(_, { direction: "vertical", "data-testid": "filter-map-filters", children: N(f, c, S, i) })
84
84
  }
85
85
  )
86
- ] }) : /* @__PURE__ */ e(_, { secondaryAlign: "center", fullWidth: !0, children: N(f, c, S, r, !1) });
87
- }, N = (m, s, i, d, a = !0) => m.map(({ id: t, title: f, availableOptions: g, icon: p, type: o }) => /* @__PURE__ */ b(_, { fullWidth: !0, secondaryAlign: "center", "data-testid": `filter-${o}-group-${t}`, children: [
86
+ ] }) : /* @__PURE__ */ e(_, { secondaryAlign: "center", fullWidth: !0, children: N(f, c, S, i, !1) });
87
+ }, N = (m, s, r, d, a = !0) => m.map(({ id: t, title: f, availableOptions: g, icon: p, type: o }) => /* @__PURE__ */ b(_, { fullWidth: !0, secondaryAlign: "center", "data-testid": `filter-${o}-group-${t}`, children: [
88
88
  p ? /* @__PURE__ */ e(z, { icon: p, iconSize: "medium" }) : null,
89
89
  o === "select" && /* @__PURE__ */ e(
90
90
  I,
@@ -98,8 +98,8 @@ import '../../assets/Filter.css';const K = "_filterButton_qtl7a_1", T = "_relati
98
98
  multiSelect: !0,
99
99
  textKey: "text",
100
100
  valueKey: "id",
101
- value: s.find((r) => r.id === t)?.filterValue ?? [],
102
- onChange: (r) => i({ id: t, type: o, filterValue: r }),
101
+ value: s.find((i) => i.id === t)?.filterValue ?? [],
102
+ onChange: (i) => r({ id: t, type: o, filterValue: i }),
103
103
  hoisted: !0,
104
104
  menuMaxHeight: "300px",
105
105
  disabled: t === "location",
@@ -114,8 +114,8 @@ import '../../assets/Filter.css';const K = "_filterButton_qtl7a_1", T = "_relati
114
114
  {
115
115
  "data-testid": `filter-switch-${t}`,
116
116
  label: f,
117
- onChange: (r) => i({ id: t, type: o, filterValue: r }),
118
- checked: !!s.find((r) => r.id === t)?.filterValue
117
+ onChange: (i) => r({ id: t, type: o, filterValue: i }),
118
+ checked: !!s.find((i) => i.id === t)?.filterValue
119
119
  }
120
120
  ),
121
121
  o === "search" && /* @__PURE__ */ e(
@@ -123,14 +123,14 @@ import '../../assets/Filter.css';const K = "_filterButton_qtl7a_1", T = "_relati
123
123
  {
124
124
  "data-testid": `filter-search-${t}`,
125
125
  placeholder: f,
126
- searchTerm: s.find((r) => r.id === t)?.filterValue,
127
- setSearchTerm: (r) => i({ id: t, type: o, filterValue: r })
126
+ searchTerm: s.find((i) => i.id === t)?.filterValue,
127
+ setSearchTerm: (i) => r({ id: t, type: o, filterValue: i })
128
128
  }
129
129
  )
130
130
  ] }, t)), J = ({
131
131
  filterButtonText: m,
132
132
  filterButtonAsIcon: s,
133
- count: i,
133
+ count: r,
134
134
  "data-testid": d,
135
135
  onClick: a
136
136
  }) => {
@@ -141,10 +141,10 @@ import '../../assets/Filter.css';const K = "_filterButton_qtl7a_1", T = "_relati
141
141
  "data-testid": d ?? "filter-icon-button",
142
142
  icon: "filter_list_alt",
143
143
  onClick: a,
144
- badge: i !== 0 && /* @__PURE__ */ e(
144
+ badge: r !== 0 && /* @__PURE__ */ e(
145
145
  F,
146
146
  {
147
- counter: i,
147
+ counter: r,
148
148
  className: u.filterBadge,
149
149
  themeColor: "secondary",
150
150
  "data-testid": "filter-badge"
@@ -171,10 +171,10 @@ import '../../assets/Filter.css';const K = "_filterButton_qtl7a_1", T = "_relati
171
171
  children: m
172
172
  }
173
173
  ),
174
- i !== 0 && /* @__PURE__ */ e(
174
+ r !== 0 && /* @__PURE__ */ e(
175
175
  F,
176
176
  {
177
- counter: i,
177
+ counter: r,
178
178
  className: u.filterBadge,
179
179
  themeColor: "secondary",
180
180
  "data-testid": "filter-badge"
@@ -1,5 +1,5 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { C as m } from "../../../index.es-oOD85ZwA.js";
2
+ import { C as m } from "../../../index.es-Dnrk7XL6.js";
3
3
  import { useFormContext as k, Controller as C } from "react-hook-form";
4
4
  import '../../../assets/FormCheckBox.css';const b = "_invalid_1l2r2_1", d = "_checkbox_1l2r2_5", c = {
5
5
  invalid: b,