@hortiview/shared-components 2.8.6 → 2.8.8

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 (133) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{AlertBanner-DlgFtlZm.js → AlertBanner-D-NTP_6i.js} +3 -3
  3. package/dist/{BigLoadingSpinner-B_HFhx2F.js → BigLoadingSpinner-CCxsMWnc.js} +1 -1
  4. package/dist/{GenericCard-Cv8qaFLu.js → GenericCard-DOKyENNm.js} +3 -3
  5. package/dist/{ListAreaService-D9HRsvH0.js → ListAreaService-CI-s1Xx5.js} +5 -5
  6. package/dist/{OfflineView-Bw-sbsym.js → OfflineView-DHtzNLwt.js} +3 -3
  7. package/dist/_Map-BmafU0dj.js +113 -0
  8. package/dist/assets/FormSelect.css +1 -1
  9. package/dist/components/AlertBanner/AlertBanner.js +4 -4
  10. package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
  11. package/dist/components/AlertBanner/LinkBanner.js +3 -3
  12. package/dist/components/BaseView/BaseView.js +2 -2
  13. package/dist/components/BasicHeading/BasicHeading.js +2 -2
  14. package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
  15. package/dist/components/BlockView/BlockView.js +1 -1
  16. package/dist/components/ChipCard/ChipCard.js +499 -390
  17. package/dist/components/ContextMenu/ContextMenu.js +4 -4
  18. package/dist/components/DeleteModal/DeleteModal.js +5 -5
  19. package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
  20. package/dist/components/Disclaimer/Disclaimer.js +3 -3
  21. package/dist/components/EmptyView/EmptyView.js +161 -125
  22. package/dist/components/Filter/Filter.js +11 -11
  23. package/dist/components/Filter/Filter.test.js +51 -35
  24. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
  25. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +10 -10
  26. package/dist/components/FormComponents/FormNumber/CustomTextField.js +3 -3
  27. package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
  28. package/dist/components/FormComponents/FormSelect/FormSelect.js +53 -53
  29. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
  30. package/dist/components/FormComponents/FormSlider/FormSlider.js +540 -535
  31. package/dist/components/FormComponents/FormText/FormText.js +2 -2
  32. package/dist/components/FormComponents/FormToggle/FormToggle.js +4 -4
  33. package/dist/components/GenericTable/GenericTable.js +8246 -7153
  34. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
  35. package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
  36. package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
  37. package/dist/components/HashTabView/HashTabView.js +552 -541
  38. package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
  39. package/dist/components/Iconify/Iconify.js +2 -2
  40. package/dist/components/InfoCard/InfoCard.js +4 -4
  41. package/dist/components/InfoGroup/InfoGroup.js +3 -3
  42. package/dist/components/ListArea/ListArea.js +16 -16
  43. package/dist/components/ListArea/ListArea.test.js +20 -20
  44. package/dist/components/ListArea/ListAreaService.js +6 -6
  45. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
  46. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
  47. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +164 -178
  48. package/dist/components/Modal/Modal.js +305 -312
  49. package/dist/components/ModulePadding/ModulePadding.js +8 -8
  50. package/dist/components/OfflineView/OfflineView.js +4 -4
  51. package/dist/components/OfflineView/OfflineView.test.js +1 -1
  52. package/dist/components/OnboardingBanner/OnboardingBanner.js +13 -13
  53. package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
  54. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
  55. package/dist/components/SearchBar/SearchBar.js +2 -2
  56. package/dist/components/SearchBar/SearchBar.test.js +1 -1
  57. package/dist/components/Select/Select.js +2 -2
  58. package/dist/components/Stepper/Stepper.js +1 -1
  59. package/dist/components/Stepper/components/StepperButton.js +1 -1
  60. package/dist/components/Stepper/components/StepperHeader.js +2 -2
  61. package/dist/components/Stepper/components/StepperIndicator.js +1 -1
  62. package/dist/defineProperty-CmuOyxyf.js +318 -0
  63. package/dist/es.string.iterator-DrqCBub-.js +581 -0
  64. package/dist/find-B-dm7n_F.js +88 -0
  65. package/dist/{get-CqneoueQ.js → get-DuK51wnj.js} +1 -1
  66. package/dist/get-u1nFMLdT.js +377 -0
  67. package/dist/hooks/useHelperText.js +1 -1
  68. package/dist/identity-BIZAN_pL.js +213 -0
  69. package/dist/includes-Bt-Stz_B.js +110 -0
  70. package/dist/index-Cpb-8cAN.js +2465 -0
  71. package/dist/index.es-0QJC9VS2.js +325 -0
  72. package/dist/{index.es-CyjMwj5g.js → index.es-45NOgWlB.js} +93 -101
  73. package/dist/index.es-B6ZgiW2s.js +3790 -0
  74. package/dist/{index.es-1zrFd4Te.js → index.es-BGordhUK.js} +352 -323
  75. package/dist/index.es-BRtk0Q33.js +42 -0
  76. package/dist/index.es-BXj90wb_.js +402 -0
  77. package/dist/index.es-Bg8hxXM8.js +912 -0
  78. package/dist/index.es-Bgjh6euR.js +292 -0
  79. package/dist/index.es-Bo1Rhtyb.js +80 -0
  80. package/dist/{index.es-BaX-8joZ.js → index.es-CK4oZMKs.js} +3329 -3232
  81. package/dist/{index.es-nQ0lMwpE.js → index.es-CKdJX75f.js} +74 -78
  82. package/dist/index.es-CmF6xAUJ.js +48 -0
  83. package/dist/{index.es-p4O33fMu.js → index.es-Cq04gn3U.js} +321 -305
  84. package/dist/{index.es-Cdu6tjUC.js → index.es-D1IpdMde.js} +87 -95
  85. package/dist/index.es-DDYCugj-.js +166 -0
  86. package/dist/{index.es-jFaPNuBO.js → index.es-DENZVv7_.js} +427 -444
  87. package/dist/{index.es-Dnrk7XL6.js → index.es-DObVvepK.js} +158 -166
  88. package/dist/index.es-DeF-y7fd.js +122 -0
  89. package/dist/{index.es-ks_RnHLh.js → index.es-Dfju71Pi.js} +27 -37
  90. package/dist/index.es-DqSY-ePE.js +4923 -0
  91. package/dist/index.es-DwzB1d7_.js +1061 -0
  92. package/dist/index.es-IXyb5F6n.js +457 -0
  93. package/dist/index.es-t7hFwQSs.js +67 -0
  94. package/dist/isArray-DN9s620O.js +83 -0
  95. package/dist/{isArray-CSaAxHlq.js → isArray-Dub1wGJM.js} +1 -1
  96. package/dist/{isEmpty-SkzPhavO.js → isEmpty-CxD71Jv8.js} +4 -5
  97. package/dist/{isString-CZsZiWgW.js → isString-BNaBRq3S.js} +2 -2
  98. package/dist/isTypedArray-Dw_IY7Zq.js +212 -0
  99. package/dist/keyboard-B-WUULl-.js +173 -0
  100. package/dist/main.js +2 -2
  101. package/dist/map-Dbvlv_6y.js +707 -0
  102. package/dist/omit-uTAyrUTm.js +645 -0
  103. package/dist/orderBy-BXxEvUw6.js +571 -0
  104. package/dist/parse-int-qVAoFbOL.js +75 -0
  105. package/dist/services/UtilService.js +7 -7
  106. package/dist/slicedToArray-BWk2gTCn.js +436 -0
  107. package/dist/{toString-BFJes2_D.js → toString-CrgB_7Pe.js} +1 -1
  108. package/dist/{uniqueId-DrPMzA-E.js → uniqueId-NU3-C36A.js} +1 -1
  109. package/package.json +3 -3
  110. package/dist/_baseIsEqual-Df2URKWm.js +0 -240
  111. package/dist/_getAllKeys-BQWmkEw5.js +0 -86
  112. package/dist/_getTag-BkGSRa18.js +0 -79
  113. package/dist/_setToString-B6E13pDg.js +0 -580
  114. package/dist/get-DQr2KQKm.js +0 -113
  115. package/dist/index-D5m--65X.js +0 -1491
  116. package/dist/index.es-8MVlRCi4.js +0 -1066
  117. package/dist/index.es-BbaCXS9-.js +0 -45
  118. package/dist/index.es-BikIx4uw.js +0 -3242
  119. package/dist/index.es-CDMu_yu0.js +0 -954
  120. package/dist/index.es-ChSlnpSq.js +0 -309
  121. package/dist/index.es-D66OkZJH.js +0 -4853
  122. package/dist/index.es-DFFyENnI.js +0 -63
  123. package/dist/index.es-DTMwaJ6B.js +0 -56
  124. package/dist/index.es-DgTJmbgD.js +0 -268
  125. package/dist/index.es-DmsyeHLO.js +0 -306
  126. package/dist/index.es-Dw1eih7R.js +0 -159
  127. package/dist/index.es-eKuwB1ll.js +0 -54
  128. package/dist/index.es-qxTN-Bb2.js +0 -107
  129. package/dist/index.es-xnSvM9b9.js +0 -444
  130. package/dist/isArray-DDZrq40X.js +0 -456
  131. package/dist/keyboard-Bpt0aBqQ.js +0 -107
  132. package/dist/omit-BN3qeeaj.js +0 -364
  133. package/dist/orderBy-D4LvP9Az.js +0 -316
@@ -1,12 +1,12 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { a, s as t, f as u, w as d } from "../../react.esm-CX1WJ2Pp.js";
3
- import { act as c } from "react";
4
- import { a as s } from "../../useBreakpoints-MzTZ0tCT.js";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { a, s as t, f as c, w as d } from "../../react.esm-CX1WJ2Pp.js";
3
+ import { act as u } from "react";
4
+ import { a as f } from "../../useBreakpoints-MzTZ0tCT.js";
5
5
  import { Filter as T } from "./Filter.js";
6
- import { a as m, b as f, d as y, t as B, g as e } from "../../vi.CjhMlMwf-CKxPQtd6.js";
6
+ import { a as m, b as s, d as y, t as B, g as e } from "../../vi.CjhMlMwf-CKxPQtd6.js";
7
7
  const o = m.fn();
8
- f(() => {
9
- m.spyOn(s, "useBreakpoints").mockReturnValue({
8
+ s(() => {
9
+ o.mockClear(), m.spyOn(f, "useBreakpoints").mockReturnValue({
10
10
  isDesktop: !0,
11
11
  isMobile: !1,
12
12
  isTablet: !1,
@@ -14,7 +14,7 @@ f(() => {
14
14
  });
15
15
  });
16
16
  y("Filter", () => {
17
- const l = [
17
+ const i = [
18
18
  {
19
19
  id: "1",
20
20
  title: "Filter 1",
@@ -44,17 +44,17 @@ y("Filter", () => {
44
44
  title: "Filter Search",
45
45
  type: "search"
46
46
  }
47
- ], n = [
47
+ ], l = [
48
48
  { id: "1", filterValue: [{ id: "1", text: "Option 1" }], type: "select" },
49
49
  { id: "2", filterValue: [{ id: "3", text: "Option 3" }], type: "select" }
50
50
  ];
51
51
  B("should render filter", () => {
52
52
  a(
53
- /* @__PURE__ */ i(
53
+ /* @__PURE__ */ r(
54
54
  T,
55
55
  {
56
- filters: l,
57
- currentFilter: n,
56
+ filters: i,
57
+ currentFilter: l,
58
58
  closeCallback: o,
59
59
  filterButtonText: "filterButtonText",
60
60
  filterModalTitle: "filterModalTitle",
@@ -63,20 +63,18 @@ y("Filter", () => {
63
63
  clearFilterText: "clearFilterText"
64
64
  }
65
65
  )
66
- ), e(t.getByText("filterButtonText")).toBeInTheDocument(), e(t.getByText("filterModalTitle")).toBeInTheDocument(), e(t.getByText("modalCancelButtonText")).toBeInTheDocument(), e(t.getByText("modalConfirmButtonText")).toBeInTheDocument(), e(t.getByText("clearFilterText")).toBeInTheDocument(), e(t.getByText("Filter 1")).toBeInTheDocument(), e(t.getByText("Filter 2")).toBeInTheDocument(), e(t.getByText("Option 1")).toBeInTheDocument(), e(t.getByText("Option 3")).toBeInTheDocument(), e(t.getByTestId("farm")).toBeInTheDocument(), e(t.getByText("Filter Toggle")).toBeInTheDocument();
67
- const r = t.getByRole("textbox");
68
- e(r.getAttribute("placeholder")).toBe("Filter Search");
69
- const x = t.getByRole("button", { name: "modalConfirmButtonText" });
70
- u.click(x), c(() => {
66
+ ), e(t.getByText("filterButtonText")).toBeInTheDocument(), e(t.getByText("filterModalTitle")).toBeInTheDocument(), e(t.getByText("modalCancelButtonText")).toBeInTheDocument(), e(t.getByText("modalConfirmButtonText")).toBeInTheDocument(), e(t.getByText("clearFilterText")).toBeInTheDocument(), e(t.getByText("Filter 1")).toBeInTheDocument(), e(t.getByText("Filter 2")).toBeInTheDocument(), e(t.getByText("Option 1")).toBeInTheDocument(), e(t.getByText("Option 3")).toBeInTheDocument(), e(t.getByTestId("farm")).toBeInTheDocument(), e(t.getByText("Filter Toggle")).toBeInTheDocument(), e(t.getByTestId("search-bar-icon-button")).toBeInTheDocument(), e(t.getByTestId("search-bar-input")).toBeInTheDocument();
67
+ const n = t.getByRole("button", { name: "modalConfirmButtonText" });
68
+ c.click(n), u(() => {
71
69
  e(o).toHaveBeenCalledTimes(1), e(t.getByText("2")).toBeInTheDocument();
72
70
  });
73
71
  }), B("should clear filter", () => {
74
72
  a(
75
- /* @__PURE__ */ i(
73
+ /* @__PURE__ */ r(
76
74
  T,
77
75
  {
78
- filters: l,
79
- currentFilter: n,
76
+ filters: i,
77
+ currentFilter: l,
80
78
  closeCallback: o,
81
79
  filterButtonText: "filterButtonText",
82
80
  filterModalTitle: "filterModalTitle",
@@ -86,17 +84,19 @@ y("Filter", () => {
86
84
  }
87
85
  )
88
86
  );
89
- const r = t.getByText("clearFilterText");
90
- u.click(r), c(() => {
87
+ const n = t.getByText("clearFilterText");
88
+ c.click(n);
89
+ const x = t.getByRole("button", { name: "modalConfirmButtonText" });
90
+ c.click(x), u(() => {
91
91
  e(o).toHaveBeenCalledTimes(1), e(t.queryByTestId("filter-badge")).not.toBeInTheDocument();
92
92
  });
93
93
  }), B("should close filter", () => {
94
94
  a(
95
- /* @__PURE__ */ i(
95
+ /* @__PURE__ */ r(
96
96
  T,
97
97
  {
98
- filters: l,
99
- currentFilter: n,
98
+ filters: i,
99
+ currentFilter: l,
100
100
  closeCallback: o,
101
101
  filterButtonText: "filterButtonText",
102
102
  filterModalTitle: "filterModalTitle",
@@ -106,19 +106,17 @@ y("Filter", () => {
106
106
  }
107
107
  )
108
108
  );
109
- const r = t.getByRole("button", { name: "modalCancelButtonText" });
110
- u.click(r), c(() => {
111
- e(o).toHaveBeenCalledTimes(1), e(t.queryByTestId("filter-badge")).not.toBeInTheDocument();
112
- }), d(() => {
109
+ const n = t.getByRole("button", { name: "modalCancelButtonText" });
110
+ e(t.getByText("filterModalTitle")).toBeInTheDocument(), c.click(n), d(() => {
113
111
  e(t.queryByText("filterModalTitle")).not.toBeInTheDocument(), e(t.queryByText("modalCancelButtonText")).not.toBeInTheDocument(), e(t.queryByText("modalConfirmButtonText")).not.toBeInTheDocument(), e(t.queryByText("clearFilterText")).not.toBeInTheDocument();
114
112
  });
115
113
  }), B("should render as icon button ", () => {
116
114
  a(
117
- /* @__PURE__ */ i(
115
+ /* @__PURE__ */ r(
118
116
  T,
119
117
  {
120
- filters: l,
121
- currentFilter: n,
118
+ filters: i,
119
+ currentFilter: l,
122
120
  closeCallback: o,
123
121
  filterButtonText: "filterButtonText",
124
122
  filterModalTitle: "filterModalTitle",
@@ -131,11 +129,11 @@ y("Filter", () => {
131
129
  ), e(t.queryByText("filterButtonText")).not.toBeInTheDocument(), e(t.getByText("filter_list_alt")).toBeInTheDocument(), e(t.getByText("filter_list_alt").tagName).toBe("I");
132
130
  }), B("should render filter without modal", () => {
133
131
  a(
134
- /* @__PURE__ */ i(
132
+ /* @__PURE__ */ r(
135
133
  T,
136
134
  {
137
- filters: l,
138
- currentFilter: n,
135
+ filters: i,
136
+ currentFilter: l,
139
137
  closeCallback: o,
140
138
  filterButtonText: "filterButtonText",
141
139
  filterModalTitle: "filterModalTitle",
@@ -146,5 +144,23 @@ y("Filter", () => {
146
144
  }
147
145
  )
148
146
  ), e(t.queryByText("filterButtonText")).not.toBeInTheDocument(), e(t.queryByText("clearFilterText")).not.toBeInTheDocument(), e(t.queryByText("modalCancelButtonText")).not.toBeInTheDocument(), e(t.queryByText("modalConfirmButtonText")).not.toBeInTheDocument(), e(t.queryByText("clearFilterText")).not.toBeInTheDocument(), e(t.getByTestId("farm")).toBeInTheDocument(), e(t.getByText("Filter 1")).toBeInTheDocument(), e(t.getByText("Filter 2")).toBeInTheDocument(), e(t.getByText("Option 1")).toBeInTheDocument(), e(t.getByText("Option 3")).toBeInTheDocument();
147
+ }), B("should call closeCallback when confirm button is clicked", () => {
148
+ a(
149
+ /* @__PURE__ */ r(
150
+ T,
151
+ {
152
+ filters: i,
153
+ currentFilter: l,
154
+ closeCallback: o,
155
+ filterButtonText: "filterButtonText",
156
+ filterModalTitle: "filterModalTitle",
157
+ modalCancelButtonText: "modalCancelButtonText",
158
+ modalConfirmButtonText: "modalConfirmButtonText",
159
+ clearFilterText: "clearFilterText"
160
+ }
161
+ )
162
+ );
163
+ const n = t.getByRole("button", { name: "modalConfirmButtonText" });
164
+ c.click(n), e(o).toHaveBeenCalledTimes(1), e(o).toHaveBeenCalledWith(l);
149
165
  });
150
166
  });
@@ -1,5 +1,5 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { C as m } from "../../../index.es-Dnrk7XL6.js";
2
+ import { C as m } from "../../../index.es-DObVvepK.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,
@@ -1,18 +1,18 @@
1
1
  import { jsx as C, jsxs as pa } from "react/jsx-runtime";
2
- import { B as ba } from "../../../index.es-DmsyeHLO.js";
3
- import { b as u, a as o, c as d, d as s, r as wa, s as be, t as M, m as j, l as D, f as z, e as N, g as ya, D as Pa } from "../../../index.es-D66OkZJH.js";
4
- import { D as ka } from "../../../index.es-ks_RnHLh.js";
5
- import { P as Ma } from "../../../index.es-DFFyENnI.js";
2
+ import { B as ba } from "../../../index.es-0QJC9VS2.js";
3
+ import { b as u, a as o, c as d, d as s, r as wa, s as be, t as M, m as j, l as D, f as z, e as N, g as ya, D as Pa } from "../../../index.es-DqSY-ePE.js";
4
+ import { D as ka } from "../../../index.es-Dfju71Pi.js";
5
+ import { P as Ma } from "../../../index.es-Bo1Rhtyb.js";
6
6
  import { useMemo as V, useState as $a } from "react";
7
7
  import { useFormContext as Wa, Controller as ja } from "react-hook-form";
8
8
  import { useHelperText as Da } from "../../../hooks/useHelperText.js";
9
- import "../../../isEmpty-SkzPhavO.js";
9
+ import "../../../isEmpty-CxD71Jv8.js";
10
10
  import "../../../react-tooltip.min-DSY6KDqS.js";
11
- import "../../../orderBy-D4LvP9Az.js";
12
- import "../../../uniqueId-DrPMzA-E.js";
13
- import "../../../get-CqneoueQ.js";
14
- import "../../../omit-BN3qeeaj.js";
15
- import "../../../isArray-CSaAxHlq.js";
11
+ import "../../../orderBy-BXxEvUw6.js";
12
+ import "../../../uniqueId-NU3-C36A.js";
13
+ import "../../../get-DuK51wnj.js";
14
+ import "../../../omit-uTAyrUTm.js";
15
+ import "../../../isArray-Dub1wGJM.js";
16
16
  import { getFormattedDateTime as za } from "../../../services/UtilService.js";
17
17
  import "../../../types/Time.js";
18
18
  import '../../../assets/FormDatePicker.css';var xa = {
@@ -1,7 +1,7 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import { T as d } from "../../../index.es-jFaPNuBO.js";
3
- import { g as u } from "../../../get-CqneoueQ.js";
4
- import { o as g } from "../../../omit-BN3qeeaj.js";
2
+ import { T as d } from "../../../index.es-DENZVv7_.js";
3
+ import { g as u } from "../../../get-DuK51wnj.js";
4
+ import { o as g } from "../../../omit-uTAyrUTm.js";
5
5
  import { useMemo as f } from "react";
6
6
  import { useFormContext as v } from "react-hook-form";
7
7
  import '../../../assets/CustomTextField.css';const c = "_invalid_1dsbr_1", s = {
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, Fragment as m } from "react/jsx-runtime";
2
- import { R as d } from "../../../index.es-Cdu6tjUC.js";
2
+ import { R as d } from "../../../index.es-D1IpdMde.js";
3
3
  import { useFormContext as s, Controller as c } from "react-hook-form";
4
4
  const g = ({ propertyName: l, options: t }) => {
5
5
  const { control: n, setValue: o } = s(), u = (a) => {
@@ -1,13 +1,13 @@
1
- import { jsx as o, Fragment as g, jsxs as k } from "react/jsx-runtime";
2
- import { g as x } from "../../../get-CqneoueQ.js";
3
- import { i as G } from "../../../isArray-CSaAxHlq.js";
4
- import { useMemo as z } from "react";
5
- import { useFormContext as J, Controller as C } from "react-hook-form";
1
+ import { jsx as o, Fragment as C, jsxs as z } from "react/jsx-runtime";
2
+ import { g as _ } from "../../../get-DuK51wnj.js";
3
+ import { i as G } from "../../../isArray-Dub1wGJM.js";
4
+ import { useMemo as $ } from "react";
5
+ import { useFormContext as J, Controller as H } from "react-hook-form";
6
6
  import { M as L } from "../../../react-tooltip.min-DSY6KDqS.js";
7
7
  import { useHelperText as O } from "../../../hooks/useHelperText.js";
8
8
  import { Select as Q } from "../../Select/Select.js";
9
9
  import { SelectTooltipText as R } from "./SelectTooltipText.js";
10
- import '../../../assets/FormSelect.css';const U = "_invalidHelperText_1qcz0_1", W = "_invalidBorder_1qcz0_5", X = "_invalidPlaceholder_1qcz0_9", Y = "_invalidDropdownIcon_1qcz0_13", Z = "_formSelectContainer_1qcz0_18", N = "_formSelect_1qcz0_18", y = "_multiText_1qcz0_40", K = "_tooltip_1qcz0_49", ee = "_disabled_1qcz0_54", t = {
10
+ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_u3es9_1", W = "_invalidBorder_u3es9_5", X = "_invalidPlaceholder_u3es9_9", Y = "_invalidDropdownIcon_u3es9_13", Z = "_formSelectContainer_u3es9_18", N = "_formSelect_u3es9_18", y = "_multiText_u3es9_45", K = "_tooltip_u3es9_54", ee = "_disabled_u3es9_59", t = {
11
11
  invalidHelperText: U,
12
12
  invalidBorder: W,
13
13
  invalidPlaceholder: X,
@@ -19,109 +19,109 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_1qcz0_1",
19
19
  disabled: ee
20
20
  }, fe = ({
21
21
  propertyName: i,
22
- label: s,
22
+ label: c,
23
23
  options: r,
24
24
  multi: a = !1,
25
- disabled: h = !1,
26
- hoisted: $ = !1,
27
- hidden: H = !1,
25
+ disabled: x = !1,
26
+ hoisted: I = !1,
27
+ hidden: w = !1,
28
28
  valueKey: n = "value",
29
- textKey: u = "text",
30
- clearable: I = !1,
31
- searchable: w = !0,
29
+ textKey: h = "text",
30
+ clearable: D = !1,
31
+ searchable: P = !0,
32
32
  noOptionsMessage: T = "",
33
33
  rules: f,
34
- menuPosition: D = "auto",
34
+ menuPosition: B = "auto",
35
35
  ...l
36
36
  }) => {
37
37
  const {
38
38
  control: v,
39
- getFieldState: P,
40
- formState: { errors: S, isValidating: q }
41
- } = J(), B = z(
42
- () => !q && x(S, i) !== void 0,
43
- [S, i, q]
44
- ), F = z(
39
+ getFieldState: F,
40
+ formState: { errors: S, isValidating: p }
41
+ } = J(), b = $(
42
+ () => !p && _(S, i) !== void 0,
43
+ [S, i, p]
44
+ ), M = $(
45
45
  () => f?.required?.message,
46
46
  [f]
47
- ), { helperText: b, helperTextPersistent: M } = O({
47
+ ), { helperText: j, helperTextPersistent: q } = O({
48
48
  propertyName: i,
49
49
  helperText: l.helperText,
50
- requiredText: F,
50
+ requiredText: M,
51
51
  hasCharacterCount: !1
52
52
  });
53
- return H ? /* @__PURE__ */ o(C, { name: i, control: v, render: () => /* @__PURE__ */ o(g, {}) }) : /* @__PURE__ */ o(
53
+ return w ? /* @__PURE__ */ o(H, { name: i, control: v, render: () => /* @__PURE__ */ o(C, {}) }) : /* @__PURE__ */ o(
54
54
  "div",
55
55
  {
56
56
  "data-testid": "form-select-container",
57
57
  className: t.formSelectContainer,
58
- "data-tooltip-id": s,
58
+ "data-tooltip-id": c,
59
59
  children: /* @__PURE__ */ o(
60
- C,
60
+ H,
61
61
  {
62
62
  name: i,
63
63
  rules: f,
64
64
  control: v,
65
- render: ({ field: { ref: te, onChange: m, value: p, ...j } }) => {
66
- let _ = r;
67
- G(r) && x(r[0], "options") !== void 0 && (_ = r.flatMap((e) => x(e, "options") ?? []));
68
- const d = a ? _?.filter(
69
- (e) => p?.includes(e[n])
70
- ) : _?.find((e) => e[n] === p), A = a && l.multiDisplayType === "text" && l.fixedHeightInput, c = P(i).invalid, E = `
65
+ render: ({ field: { ref: te, onChange: m, value: g, ...A } }) => {
66
+ let u = r;
67
+ G(r) && _(r[0], "options") !== void 0 && (u = r.flatMap((e) => _(e, "options") ?? []));
68
+ const d = a ? u?.filter(
69
+ (e) => g?.includes(e[n])
70
+ ) : u?.find((e) => e[n] === g), E = a && l.multiDisplayType === "text" && l.fixedHeightInput, s = F(i).invalid, V = `
71
71
  ${t.formSelect}
72
- ${c ? t.invalidHelperText : ""}
73
- ${c ? t.invalidDropdownIcon : ""}
74
- ${c ? t.invalidBorder : ""}
75
- ${c ? t.invalidPlaceholder : ""}
76
- ${A ? t.multiText : ""}
77
- ${h ? t.disabled : ""}`;
78
- return /* @__PURE__ */ k(g, { children: [
72
+ ${s ? t.invalidHelperText : ""}
73
+ ${s ? t.invalidDropdownIcon : ""}
74
+ ${s ? t.invalidBorder : ""}
75
+ ${s ? t.invalidPlaceholder : ""}
76
+ ${E ? t.multiText : ""}
77
+ ${x ? t.disabled : ""}`;
78
+ return /* @__PURE__ */ z(C, { children: [
79
79
  /* @__PURE__ */ o(
80
80
  Q,
81
81
  {
82
- ...j,
82
+ ...A,
83
83
  ...l,
84
84
  value: d ?? [],
85
- label: s,
85
+ label: c,
86
86
  variant: "outlined",
87
- helperText: b,
88
- helperTextPersistent: M,
87
+ helperText: j,
88
+ helperTextPersistent: q,
89
89
  options: r,
90
- valid: !B,
90
+ valid: !b,
91
91
  "data-testid": l["data-testid"] ?? `select-${i}`,
92
92
  multiSelect: !r?.length && T ? !1 : a,
93
- className: E,
94
- disabled: h,
93
+ className: V,
94
+ disabled: x,
95
95
  valueKey: n,
96
- textKey: u,
96
+ textKey: h,
97
97
  onChange: (e) => {
98
98
  if (e == null) {
99
99
  m(e);
100
100
  return;
101
101
  }
102
102
  if (a) {
103
- m(e.map((V) => V[n]));
103
+ m(e.map((k) => k[n]));
104
104
  return;
105
105
  }
106
106
  m(e[n]), l?.onChange?.(e);
107
107
  },
108
- hoisted: $,
108
+ hoisted: I,
109
109
  noOptionsMessage: T,
110
- searchable: w,
111
- clearable: I,
112
- menuPosition: D
110
+ searchable: P,
111
+ clearable: D,
112
+ menuPosition: B
113
113
  }
114
114
  ),
115
115
  /* @__PURE__ */ o(
116
116
  L,
117
117
  {
118
- id: s,
118
+ id: c,
119
119
  noArrow: !0,
120
120
  place: "bottom",
121
121
  delayShow: 420,
122
122
  className: t.tooltip,
123
123
  hidden: !d || d.length === 0 || !l.fixedHeightInput,
124
- children: /* @__PURE__ */ o(R, { value: d, textKey: u, valueKey: n })
124
+ children: /* @__PURE__ */ o(R, { value: d, textKey: h, valueKey: n })
125
125
  }
126
126
  )
127
127
  ] });
@@ -1,6 +1,6 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { G as p } from "../../../index.es-Dw1eih7R.js";
3
- import { T as d } from "../../../index.es-1zrFd4Te.js";
2
+ import { G as p } from "../../../index.es-DDYCugj-.js";
3
+ import { T as d } from "../../../index.es-BGordhUK.js";
4
4
  const m = ({ value: r, textKey: t, valueKey: e }) => {
5
5
  if (!(!r || r.length === 0))
6
6
  return Array.isArray(r) ? /* @__PURE__ */ i(p, { "data-testid": "select-tooltip", direction: "vertical", gap: "dense", children: r?.map((o) => /* @__PURE__ */ i(d, { level: 2, children: o[t] }, o[e])) }) : r?.[t];