@hortiview/shared-components 0.0.11528 → 0.0.11587

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 (118) hide show
  1. package/README.md +17 -0
  2. package/dist/{BigLoadingSpinner-D7H28pr5.js → BigLoadingSpinner-iegTbDcD.js} +6 -6
  3. package/dist/GenericCard-6J558OgP.js +350 -0
  4. package/dist/{ListAreaService-YS_UUPh5.js → ListAreaService-DOwtdRa4.js} +18 -16
  5. package/dist/_MapCache-B75yWNNd.js +376 -0
  6. package/dist/_baseIsEqual-D0Dsajdb.js +317 -0
  7. package/dist/_getTag-BCf9b56Z.js +81 -0
  8. package/dist/animationframe-EMBh6XeO.js +54 -0
  9. package/dist/component-DsB0poTj.js +571 -0
  10. package/dist/component-neHBNHRu.js +114 -0
  11. package/dist/components/AlertBanner/AlertBanner.js +16 -15
  12. package/dist/components/BaseView/BaseView.js +5 -5
  13. package/dist/components/BasicHeading/BasicHeading.js +25 -24
  14. package/dist/components/BasicHeading/BasicHeading.test.js +9 -9
  15. package/dist/components/BlockView/BlockView.js +5 -5
  16. package/dist/components/ChipCard/ChipCard.js +1765 -14
  17. package/dist/components/ContextMenu/ContextMenu.d.ts +1 -1
  18. package/dist/components/ContextMenu/ContextMenu.js +28 -27
  19. package/dist/components/DeleteModal/DeleteModal.js +37 -34
  20. package/dist/components/Disclaimer/Disclaimer.js +11 -9
  21. package/dist/components/EmptyView/EmptyView.js +258 -19
  22. package/dist/components/Filter/Filter.js +58 -54
  23. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +13 -11
  24. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +1 -1
  25. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5974 -6387
  26. package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +1 -1
  27. package/dist/components/FormComponents/FormNumber/CustomTextField.js +5 -5
  28. package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +1 -1
  29. package/dist/components/FormComponents/FormNumber/FormNumber.js +1 -1
  30. package/dist/components/FormComponents/FormRadio/FormRadio.js +4 -4
  31. package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +1 -1
  32. package/dist/components/FormComponents/FormSelect/FormSelect.js +3 -3
  33. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -5
  34. package/dist/components/FormComponents/FormSlider/FormSlider.js +1155 -27
  35. package/dist/components/FormComponents/FormText/FormText.d.ts +1 -1
  36. package/dist/components/FormComponents/FormText/FormText.js +33 -32
  37. package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +1 -1
  38. package/dist/components/FormComponents/FormToggle/FormToggle.js +17 -15
  39. package/dist/components/GenericTable/GenericTable.js +10486 -74
  40. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -3
  41. package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
  42. package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -8
  43. package/dist/components/HashTabView/HashTabView.js +1805 -72
  44. package/dist/components/HeaderFilter/HeaderFilter.d.ts +1 -1
  45. package/dist/components/HeaderFilter/HeaderFilter.js +4 -4
  46. package/dist/components/HealthCheckFailed/HealthCheckFailed.js +20 -17
  47. package/dist/components/Iconify/Iconify.d.ts +1 -2
  48. package/dist/components/Iconify/Iconify.js +42 -42
  49. package/dist/components/InfoGroup/InfoGroup.js +30 -28
  50. package/dist/components/ListArea/ListArea.js +29 -27
  51. package/dist/components/ListArea/ListArea.test.js +2 -2
  52. package/dist/components/ListArea/ListAreaService.js +7 -5
  53. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
  54. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
  55. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +506 -37
  56. package/dist/components/Modal/Modal.d.ts +1 -1
  57. package/dist/components/Modal/Modal.js +926 -9
  58. package/dist/components/ModulePadding/ModulePadding.d.ts +7 -0
  59. package/dist/components/ModulePadding/ModulePadding.js +28 -0
  60. package/dist/components/ModulePadding/ModulePadding.test.d.ts +1 -0
  61. package/dist/components/ModulePadding/ModulePadding.test.js +22 -0
  62. package/dist/components/OverflowTooltip/OverflowTooltip.js +6 -6
  63. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
  64. package/dist/components/SearchBar/SearchBar.js +7 -6
  65. package/dist/components/Select/Select.d.ts +1 -1
  66. package/dist/components/Select/Select.js +13 -13
  67. package/dist/floating-ui.dom-CeD8zknG.js +978 -0
  68. package/dist/get-7ACccM2X.js +114 -0
  69. package/dist/{get-BiqanC9_.js → get-DFv1gXfq.js} +1 -1
  70. package/dist/hooks/useHelperText.js +1 -1
  71. package/dist/identity-DLWZln-X.js +1763 -0
  72. package/dist/index.es-0lQcz8m1.js +444 -0
  73. package/dist/index.es-25EARqhH.js +2027 -0
  74. package/dist/index.es-3043KTnb.js +1066 -0
  75. package/dist/index.es-41ztjcFT.js +724 -0
  76. package/dist/index.es-6TJ1S8Jr.js +954 -0
  77. package/dist/index.es-8GOVkuo-.js +374 -0
  78. package/dist/index.es-B-_jXDuz.js +216 -0
  79. package/dist/index.es-BWgXLqXn.js +102 -0
  80. package/dist/index.es-BtjV0oNv.js +360 -0
  81. package/dist/index.es-BvrQnJ3j.js +509 -0
  82. package/dist/index.es-CF_xy2ns.js +674 -0
  83. package/dist/index.es-CL_Heu1n.js +54 -0
  84. package/dist/index.es-CiqbARoC.js +306 -0
  85. package/dist/index.es-D-CKRzIB.js +63 -0
  86. package/dist/index.es-D6N-XWHe.js +56 -0
  87. package/dist/index.es-DKDgy7Kt.js +45 -0
  88. package/dist/index.es-DntoATwO.js +159 -0
  89. package/dist/index.es-UHKFl8Da.js +7075 -0
  90. package/dist/index.es-d5xhUpJZ.js +3242 -0
  91. package/dist/index.es-da0cf7oE.js +569 -0
  92. package/dist/index.es-h2lMdt7G.js +107 -0
  93. package/dist/index.es-zr101OF5.js +4853 -0
  94. package/dist/{isArray-2zMxXFEr.js → isArray-DN9s620O.js} +3 -3
  95. package/dist/{isArray-C_5XvIlE.js → isArray-Dub1wGJM.js} +1 -1
  96. package/dist/isEmpty-B4GG2s-V.js +31 -0
  97. package/dist/isPlainObject-C273y67K.js +40 -0
  98. package/dist/isString-BW9UHONv.js +21 -0
  99. package/dist/keyboard-Bpt0aBqQ.js +107 -0
  100. package/dist/main.d.ts +1 -0
  101. package/dist/main.js +57 -55
  102. package/dist/orderBy-Bd48bw88.js +316 -0
  103. package/dist/react-tooltip.min-DSY6KDqS.js +431 -0
  104. package/dist/services/UtilService.js +2 -2
  105. package/dist/toString-CrgB_7Pe.js +54 -0
  106. package/dist/tslib.es6-BDCynO9F.js +162 -0
  107. package/dist/types/GenericTable.d.ts +1 -1
  108. package/dist/uniqueId-NU3-C36A.js +18 -0
  109. package/dist/util-DA21pZXj.js +78 -0
  110. package/package.json +1 -1
  111. package/dist/GenericCard-jlt8ZsHi.js +0 -80
  112. package/dist/_Map-Dtlps7IZ.js +0 -113
  113. package/dist/_overArg-_0pUmCsX.js +0 -14
  114. package/dist/get-P-5PYZOE.js +0 -426
  115. package/dist/isEmpty-BimaZd5G.js +0 -225
  116. package/dist/isString-BOHPtrlm.js +0 -44
  117. package/dist/orderBy-BVQIswlJ.js +0 -765
  118. package/dist/react-tooltip.min-Czs4RGD1.js +0 -1400
@@ -1,84 +1,88 @@
1
1
  import { jsx as t, jsxs as y, Fragment as D } from "react/jsx-runtime";
2
- import { Group as _, Button as p, Switch as T, IconButton as W, NotificationBadge as k } from "@element-public/react-components";
3
- import { useState as B } from "react";
2
+ import { N } from "../../index.es-d5xhUpJZ.js";
3
+ import { B as h } from "../../index.es-CiqbARoC.js";
4
+ import { G as _ } from "../../index.es-DntoATwO.js";
5
+ import { I } from "../../index.es-0lQcz8m1.js";
6
+ import { S as T } from "../../index.es-8GOVkuo-.js";
7
+ import { useState as v } from "react";
4
8
  import '../../assets/main.css';import '../../assets/Filter.css';/* empty css */
5
9
  import { u as b } from "../../useBreakpoints-MzTZ0tCT.js";
6
- import { Iconify as j } from "../Iconify/Iconify.js";
7
- import "../../react-tooltip.min-Czs4RGD1.js";
8
- import "../../orderBy-BVQIswlJ.js";
9
- import { SearchBar as z } from "../SearchBar/SearchBar.js";
10
- import "lodash";
11
- import { Modal as H } from "../Modal/Modal.js";
12
- import { Select as I } from "../Select/Select.js";
10
+ import { Iconify as W } from "../Iconify/Iconify.js";
11
+ import "../../react-tooltip.min-DSY6KDqS.js";
12
+ import "../../orderBy-Bd48bw88.js";
13
+ import { SearchBar as j } from "../SearchBar/SearchBar.js";
14
+ import "../../uniqueId-NU3-C36A.js";
15
+ import { Modal as z } from "../Modal/Modal.js";
16
+ import { Select as G } from "../Select/Select.js";
13
17
  import "react-hook-form";
14
- import "../../get-BiqanC9_.js";
15
- import "../../isArray-C_5XvIlE.js";
16
- import "../../isString-BOHPtrlm.js";
17
- const K = "_filterButton_qtl7a_1", G = "_relativeParent_qtl7a_6", V = "_filterBadge_qtl7a_10", E = "_dense_qtl7a_17", u = {
18
- filterButton: K,
19
- relativeParent: G,
18
+ import "../../get-DFv1gXfq.js";
19
+ import "../../isArray-Dub1wGJM.js";
20
+ import "../../isString-BW9UHONv.js";
21
+ const H = "_filterButton_qtl7a_1", K = "_relativeParent_qtl7a_6", V = "_filterBadge_qtl7a_10", E = "_dense_qtl7a_17", u = {
22
+ filterButton: H,
23
+ relativeParent: K,
20
24
  filterBadge: V,
21
25
  dense: E
22
- }, at = ({
23
- clearFilterText: m,
26
+ }, dt = ({
27
+ clearFilterText: d,
24
28
  closeCallback: s,
25
29
  currentFilter: r,
26
30
  filterButtonAsIcon: f = !1,
27
- filterButtonText: o,
31
+ filterButtonText: n,
28
32
  filterModalTitle: i,
29
- filters: d,
33
+ filters: m,
30
34
  modalCancelButtonText: g,
31
- modalConfirmButtonText: h,
35
+ modalConfirmButtonText: p,
32
36
  useModal: l = !0,
33
37
  selectAllLabel: e
34
38
  }) => {
35
- const { isDesktop: A } = b(), [q, v] = B(!1), [c, C] = B(r), [w, x] = B(0), S = () => {
36
- v(!1), s(c), x(
37
- c.reduce((a, { filterValue: n }) => n === void 0 ? a : typeof n == "boolean" ? n ? a + 1 : a : Array.isArray(n) ? a + n.length : typeof n == "string" && n.length ? a + 1 : a, 0)
39
+ const { isDesktop: A } = b(), [q, B] = v(!1), [c, C] = v(r), [w, x] = v(0), S = () => {
40
+ B(!1), s(c), x(
41
+ c.reduce((a, { filterValue: o }) => o === void 0 ? a : typeof o == "boolean" ? o ? a + 1 : a : Array.isArray(o) ? a + o.length : typeof o == "string" && o.length ? a + 1 : a, 0)
38
42
  );
39
43
  }, O = () => {
40
44
  C([]), x(0);
41
45
  }, F = (a) => {
42
- const n = [
46
+ const o = [
43
47
  ...c.filter((P) => P.id !== a.id),
44
48
  a
45
49
  ];
46
- C(n), l || s(n);
50
+ C(o), l || s(o);
47
51
  };
48
52
  return l ? /* @__PURE__ */ y(D, { children: [
49
53
  /* @__PURE__ */ t(
50
54
  J,
51
55
  {
52
- filterButtonText: o,
56
+ filterButtonText: n,
53
57
  filterButtonAsIcon: f,
54
58
  count: w,
55
- onClick: () => v(!0)
59
+ onClick: () => B(!0)
56
60
  }
57
61
  ),
58
62
  /* @__PURE__ */ t(
59
- H,
63
+ z,
60
64
  {
61
65
  open: q,
62
66
  onClose: S,
63
67
  title: i,
64
68
  modalSize: A ? "small" : "fullscreen",
65
- headerActions: /* @__PURE__ */ t(p, { variant: "text", onClick: O, children: m }),
66
- dismissiveButton: /* @__PURE__ */ t(p, { variant: "outlined", onClick: () => v(!1), children: g }),
67
- primaryButton: /* @__PURE__ */ t(p, { variant: "filled", onClick: S, children: h }),
68
- children: /* @__PURE__ */ t(_, { direction: "vertical", children: N(d, c, F, e) })
69
+ headerActions: /* @__PURE__ */ t(h, { variant: "text", onClick: O, children: d }),
70
+ dismissiveButton: /* @__PURE__ */ t(h, { variant: "outlined", onClick: () => B(!1), children: g }),
71
+ primaryButton: /* @__PURE__ */ t(h, { variant: "filled", onClick: S, children: p }),
72
+ children: /* @__PURE__ */ t(_, { direction: "vertical", children: k(m, c, F, e) })
69
73
  }
70
74
  )
71
- ] }) : /* @__PURE__ */ t(_, { secondaryAlign: "center", fullWidth: !0, children: N(d, c, F, e, !1) });
72
- }, N = (m, s, r, f, o = !0) => m.map(({ id: i, title: d, availableOptions: g, icon: h, type: l }) => /* @__PURE__ */ y(_, { fullWidth: !0, secondaryAlign: "center", children: [
73
- h ? /* @__PURE__ */ t(j, { icon: h, iconSize: "medium" }) : null,
75
+ ] }) : /* @__PURE__ */ t(_, { secondaryAlign: "center", fullWidth: !0, children: k(m, c, F, e, !1) });
76
+ }, k = (d, s, r, f, n = !0) => d.map(({ id: i, title: m, availableOptions: g, icon: p, type: l }) => /* @__PURE__ */ y(_, { fullWidth: !0, secondaryAlign: "center", children: [
77
+ p ? /* @__PURE__ */ t(W, { icon: p, iconSize: "medium" }) : null,
74
78
  l === "select" && /* @__PURE__ */ t(
75
- I,
79
+ G,
76
80
  {
77
81
  selectAllLabel: f,
78
- className: o ? void 0 : u.dense,
82
+ className: n ? void 0 : u.dense,
79
83
  variant: "outlined",
80
84
  options: g,
81
- label: d,
85
+ label: m,
82
86
  multiSelect: !0,
83
87
  textKey: "text",
84
88
  valueKey: "id",
@@ -88,41 +92,41 @@ const K = "_filterButton_qtl7a_1", G = "_relativeParent_qtl7a_6", V = "_filterBa
88
92
  menuMaxHeight: "300px",
89
93
  disabled: i === "location",
90
94
  showOptionFilter: !1,
91
- dense: !o,
92
- fixedHeightInput: !o,
93
- multiDisplayType: o ? "pills" : "text"
95
+ dense: !n,
96
+ fixedHeightInput: !n,
97
+ multiDisplayType: n ? "pills" : "text"
94
98
  }
95
99
  ),
96
100
  l === "toggle" && /* @__PURE__ */ t(
97
101
  T,
98
102
  {
99
- label: d,
103
+ label: m,
100
104
  onChange: (e) => r({ id: i, type: l, filterValue: e }),
101
105
  checked: !!s.find((e) => e.id === i)?.filterValue
102
106
  }
103
107
  ),
104
108
  l === "search" && /* @__PURE__ */ t(
105
- z,
109
+ j,
106
110
  {
107
- placeholder: d,
111
+ placeholder: m,
108
112
  searchTerm: s.find((e) => e.id === i)?.filterValue,
109
113
  setSearchTerm: (e) => r({ id: i, type: l, filterValue: e })
110
114
  }
111
115
  )
112
116
  ] }, i)), J = ({
113
- filterButtonText: m,
117
+ filterButtonText: d,
114
118
  filterButtonAsIcon: s,
115
119
  count: r,
116
120
  onClick: f
117
121
  }) => {
118
- const { isDesktop: o } = b();
122
+ const { isDesktop: n } = b();
119
123
  return s ? /* @__PURE__ */ t(
120
- W,
124
+ I,
121
125
  {
122
126
  icon: "filter_list_alt",
123
127
  onClick: f,
124
128
  badge: r !== 0 && /* @__PURE__ */ t(
125
- k,
129
+ N,
126
130
  {
127
131
  counter: r,
128
132
  className: u.filterBadge,
@@ -135,22 +139,22 @@ const K = "_filterButton_qtl7a_1", G = "_relativeParent_qtl7a_6", V = "_filterBa
135
139
  "div",
136
140
  {
137
141
  className: u.relativeParent,
138
- style: { height: "100%", width: o ? void 0 : "100%" },
142
+ style: { height: "100%", width: n ? void 0 : "100%" },
139
143
  children: [
140
144
  /* @__PURE__ */ t(
141
- p,
145
+ h,
142
146
  {
143
147
  variant: "outlined",
144
148
  themeColor: "primary",
145
149
  leadingIcon: "filter_list_alt",
146
150
  onClick: f,
147
151
  className: u.filterButton,
148
- fullWidth: !o,
149
- children: m
152
+ fullWidth: !n,
153
+ children: d
150
154
  }
151
155
  ),
152
156
  r !== 0 && /* @__PURE__ */ t(
153
- k,
157
+ N,
154
158
  {
155
159
  counter: r,
156
160
  className: u.filterBadge,
@@ -163,5 +167,5 @@ const K = "_filterButton_qtl7a_1", G = "_relativeParent_qtl7a_6", V = "_filterBa
163
167
  );
164
168
  };
165
169
  export {
166
- at as Filter
170
+ dt as Filter
167
171
  };
@@ -1,13 +1,15 @@
1
1
  import { jsx as o, jsxs as p } from "react/jsx-runtime";
2
- import { Group as x, Checkbox as C, TypoCaption as d } from "@element-public/react-components";
2
+ import { C } from "../../../index.es-BvrQnJ3j.js";
3
+ import { G as x } from "../../../index.es-DntoATwO.js";
4
+ import { a as d } from "../../../index.es-CF_xy2ns.js";
3
5
  import { useFormContext as l, Controller as u } from "react-hook-form";
4
- const j = ({
6
+ const v = ({
5
7
  propertyName: t,
6
8
  label: n,
7
- validate: c,
8
- required: s,
9
- onChange: a,
10
- disabled: m
9
+ validate: a,
10
+ required: m,
11
+ onChange: s,
12
+ disabled: c
11
13
  }) => {
12
14
  const { control: h } = l();
13
15
  return /* @__PURE__ */ o(
@@ -16,8 +18,8 @@ const j = ({
16
18
  name: t,
17
19
  control: h,
18
20
  rules: {
19
- required: s,
20
- validate: c
21
+ required: m,
22
+ validate: a
21
23
  },
22
24
  render: ({ field: r, fieldState: e }) => /* @__PURE__ */ p(x, { direction: "vertical", gap: "none", children: [
23
25
  /* @__PURE__ */ o(
@@ -27,10 +29,10 @@ const j = ({
27
29
  ...r,
28
30
  label: n,
29
31
  onChange: (...i) => {
30
- r.onChange(...i), a?.();
32
+ r.onChange(...i), s?.();
31
33
  },
32
34
  checked: r.value,
33
- disabled: m
35
+ disabled: c
34
36
  }
35
37
  ),
36
38
  e.error && /* @__PURE__ */ o(d, { "data-testid": "checkbox-error-message", themeColor: "error", children: e.error.message })
@@ -39,5 +41,5 @@ const j = ({
39
41
  );
40
42
  };
41
43
  export {
42
- j as FormCheckBox
44
+ v as FormCheckBox
43
45
  };
@@ -1,4 +1,4 @@
1
- import { DatepickerProps as ElementDatePickerProps } from '@element-public/react-components';
1
+ import { DatepickerProps as ElementDatePickerProps } from '@element-public/react-datepicker';
2
2
  import { FieldPath, FieldValues, Path, RegisterOptions } from 'react-hook-form';
3
3
 
4
4
  type DatePickerProps<T extends FieldValues> = {