@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.
- package/CHANGELOG.md +12 -0
- package/dist/{AlertBanner-DlgFtlZm.js → AlertBanner-D-NTP_6i.js} +3 -3
- package/dist/{BigLoadingSpinner-B_HFhx2F.js → BigLoadingSpinner-CCxsMWnc.js} +1 -1
- package/dist/{GenericCard-Cv8qaFLu.js → GenericCard-DOKyENNm.js} +3 -3
- package/dist/{ListAreaService-D9HRsvH0.js → ListAreaService-CI-s1Xx5.js} +5 -5
- package/dist/{OfflineView-Bw-sbsym.js → OfflineView-DHtzNLwt.js} +3 -3
- package/dist/_Map-BmafU0dj.js +113 -0
- package/dist/assets/FormSelect.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.js +4 -4
- package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
- package/dist/components/AlertBanner/LinkBanner.js +3 -3
- package/dist/components/BaseView/BaseView.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.js +1 -1
- package/dist/components/ChipCard/ChipCard.js +499 -390
- package/dist/components/ContextMenu/ContextMenu.js +4 -4
- package/dist/components/DeleteModal/DeleteModal.js +5 -5
- package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +3 -3
- package/dist/components/EmptyView/EmptyView.js +161 -125
- package/dist/components/Filter/Filter.js +11 -11
- package/dist/components/Filter/Filter.test.js +51 -35
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +10 -10
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +3 -3
- package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +53 -53
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.js +540 -535
- package/dist/components/FormComponents/FormText/FormText.js +2 -2
- package/dist/components/FormComponents/FormToggle/FormToggle.js +4 -4
- package/dist/components/GenericTable/GenericTable.js +8246 -7153
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
- package/dist/components/HashTabView/HashTabView.js +552 -541
- package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
- package/dist/components/Iconify/Iconify.js +2 -2
- package/dist/components/InfoCard/InfoCard.js +4 -4
- package/dist/components/InfoGroup/InfoGroup.js +3 -3
- package/dist/components/ListArea/ListArea.js +16 -16
- package/dist/components/ListArea/ListArea.test.js +20 -20
- package/dist/components/ListArea/ListAreaService.js +6 -6
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +164 -178
- package/dist/components/Modal/Modal.js +305 -312
- package/dist/components/ModulePadding/ModulePadding.js +8 -8
- package/dist/components/OfflineView/OfflineView.js +4 -4
- package/dist/components/OfflineView/OfflineView.test.js +1 -1
- package/dist/components/OnboardingBanner/OnboardingBanner.js +13 -13
- package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/components/StepperButton.js +1 -1
- package/dist/components/Stepper/components/StepperHeader.js +2 -2
- package/dist/components/Stepper/components/StepperIndicator.js +1 -1
- package/dist/defineProperty-CmuOyxyf.js +318 -0
- package/dist/es.string.iterator-DrqCBub-.js +581 -0
- package/dist/find-B-dm7n_F.js +88 -0
- package/dist/{get-CqneoueQ.js → get-DuK51wnj.js} +1 -1
- package/dist/get-u1nFMLdT.js +377 -0
- package/dist/hooks/useHelperText.js +1 -1
- package/dist/identity-BIZAN_pL.js +213 -0
- package/dist/includes-Bt-Stz_B.js +110 -0
- package/dist/index-Cpb-8cAN.js +2465 -0
- package/dist/index.es-0QJC9VS2.js +325 -0
- package/dist/{index.es-CyjMwj5g.js → index.es-45NOgWlB.js} +93 -101
- package/dist/index.es-B6ZgiW2s.js +3790 -0
- package/dist/{index.es-1zrFd4Te.js → index.es-BGordhUK.js} +352 -323
- package/dist/index.es-BRtk0Q33.js +42 -0
- package/dist/index.es-BXj90wb_.js +402 -0
- package/dist/index.es-Bg8hxXM8.js +912 -0
- package/dist/index.es-Bgjh6euR.js +292 -0
- package/dist/index.es-Bo1Rhtyb.js +80 -0
- package/dist/{index.es-BaX-8joZ.js → index.es-CK4oZMKs.js} +3329 -3232
- package/dist/{index.es-nQ0lMwpE.js → index.es-CKdJX75f.js} +74 -78
- package/dist/index.es-CmF6xAUJ.js +48 -0
- package/dist/{index.es-p4O33fMu.js → index.es-Cq04gn3U.js} +321 -305
- package/dist/{index.es-Cdu6tjUC.js → index.es-D1IpdMde.js} +87 -95
- package/dist/index.es-DDYCugj-.js +166 -0
- package/dist/{index.es-jFaPNuBO.js → index.es-DENZVv7_.js} +427 -444
- package/dist/{index.es-Dnrk7XL6.js → index.es-DObVvepK.js} +158 -166
- package/dist/index.es-DeF-y7fd.js +122 -0
- package/dist/{index.es-ks_RnHLh.js → index.es-Dfju71Pi.js} +27 -37
- package/dist/index.es-DqSY-ePE.js +4923 -0
- package/dist/index.es-DwzB1d7_.js +1061 -0
- package/dist/index.es-IXyb5F6n.js +457 -0
- package/dist/index.es-t7hFwQSs.js +67 -0
- package/dist/isArray-DN9s620O.js +83 -0
- package/dist/{isArray-CSaAxHlq.js → isArray-Dub1wGJM.js} +1 -1
- package/dist/{isEmpty-SkzPhavO.js → isEmpty-CxD71Jv8.js} +4 -5
- package/dist/{isString-CZsZiWgW.js → isString-BNaBRq3S.js} +2 -2
- package/dist/isTypedArray-Dw_IY7Zq.js +212 -0
- package/dist/keyboard-B-WUULl-.js +173 -0
- package/dist/main.js +2 -2
- package/dist/map-Dbvlv_6y.js +707 -0
- package/dist/omit-uTAyrUTm.js +645 -0
- package/dist/orderBy-BXxEvUw6.js +571 -0
- package/dist/parse-int-qVAoFbOL.js +75 -0
- package/dist/services/UtilService.js +7 -7
- package/dist/slicedToArray-BWk2gTCn.js +436 -0
- package/dist/{toString-BFJes2_D.js → toString-CrgB_7Pe.js} +1 -1
- package/dist/{uniqueId-DrPMzA-E.js → uniqueId-NU3-C36A.js} +1 -1
- package/package.json +3 -3
- package/dist/_baseIsEqual-Df2URKWm.js +0 -240
- package/dist/_getAllKeys-BQWmkEw5.js +0 -86
- package/dist/_getTag-BkGSRa18.js +0 -79
- package/dist/_setToString-B6E13pDg.js +0 -580
- package/dist/get-DQr2KQKm.js +0 -113
- package/dist/index-D5m--65X.js +0 -1491
- package/dist/index.es-8MVlRCi4.js +0 -1066
- package/dist/index.es-BbaCXS9-.js +0 -45
- package/dist/index.es-BikIx4uw.js +0 -3242
- package/dist/index.es-CDMu_yu0.js +0 -954
- package/dist/index.es-ChSlnpSq.js +0 -309
- package/dist/index.es-D66OkZJH.js +0 -4853
- package/dist/index.es-DFFyENnI.js +0 -63
- package/dist/index.es-DTMwaJ6B.js +0 -56
- package/dist/index.es-DgTJmbgD.js +0 -268
- package/dist/index.es-DmsyeHLO.js +0 -306
- package/dist/index.es-Dw1eih7R.js +0 -159
- package/dist/index.es-eKuwB1ll.js +0 -54
- package/dist/index.es-qxTN-Bb2.js +0 -107
- package/dist/index.es-xnSvM9b9.js +0 -444
- package/dist/isArray-DDZrq40X.js +0 -456
- package/dist/keyboard-Bpt0aBqQ.js +0 -107
- package/dist/omit-BN3qeeaj.js +0 -364
- package/dist/orderBy-D4LvP9Az.js +0 -316
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { a, s as t, f as
|
|
3
|
-
import { act as
|
|
4
|
-
import { a as
|
|
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
|
|
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
|
-
|
|
9
|
-
m.spyOn(
|
|
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
|
|
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
|
-
],
|
|
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__ */
|
|
53
|
+
/* @__PURE__ */ r(
|
|
54
54
|
T,
|
|
55
55
|
{
|
|
56
|
-
filters:
|
|
57
|
-
currentFilter:
|
|
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
|
|
68
|
-
|
|
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__ */
|
|
73
|
+
/* @__PURE__ */ r(
|
|
76
74
|
T,
|
|
77
75
|
{
|
|
78
|
-
filters:
|
|
79
|
-
currentFilter:
|
|
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
|
|
90
|
-
|
|
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__ */
|
|
95
|
+
/* @__PURE__ */ r(
|
|
96
96
|
T,
|
|
97
97
|
{
|
|
98
|
-
filters:
|
|
99
|
-
currentFilter:
|
|
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
|
|
110
|
-
|
|
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__ */
|
|
115
|
+
/* @__PURE__ */ r(
|
|
118
116
|
T,
|
|
119
117
|
{
|
|
120
|
-
filters:
|
|
121
|
-
currentFilter:
|
|
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__ */
|
|
132
|
+
/* @__PURE__ */ r(
|
|
135
133
|
T,
|
|
136
134
|
{
|
|
137
|
-
filters:
|
|
138
|
-
currentFilter:
|
|
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-
|
|
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-
|
|
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-
|
|
4
|
-
import { D as ka } from "../../../index.es-
|
|
5
|
-
import { P as Ma } from "../../../index.es-
|
|
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-
|
|
9
|
+
import "../../../isEmpty-CxD71Jv8.js";
|
|
10
10
|
import "../../../react-tooltip.min-DSY6KDqS.js";
|
|
11
|
-
import "../../../orderBy-
|
|
12
|
-
import "../../../uniqueId-
|
|
13
|
-
import "../../../get-
|
|
14
|
-
import "../../../omit-
|
|
15
|
-
import "../../../isArray-
|
|
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-
|
|
3
|
-
import { g as u } from "../../../get-
|
|
4
|
-
import { o as g } from "../../../omit-
|
|
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-
|
|
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
|
|
2
|
-
import { g as
|
|
3
|
-
import { i as G } from "../../../isArray-
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { useFormContext as J, Controller as
|
|
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 = "
|
|
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:
|
|
22
|
+
label: c,
|
|
23
23
|
options: r,
|
|
24
24
|
multi: a = !1,
|
|
25
|
-
disabled:
|
|
26
|
-
hoisted:
|
|
27
|
-
hidden:
|
|
25
|
+
disabled: x = !1,
|
|
26
|
+
hoisted: I = !1,
|
|
27
|
+
hidden: w = !1,
|
|
28
28
|
valueKey: n = "value",
|
|
29
|
-
textKey:
|
|
30
|
-
clearable:
|
|
31
|
-
searchable:
|
|
29
|
+
textKey: h = "text",
|
|
30
|
+
clearable: D = !1,
|
|
31
|
+
searchable: P = !0,
|
|
32
32
|
noOptionsMessage: T = "",
|
|
33
33
|
rules: f,
|
|
34
|
-
menuPosition:
|
|
34
|
+
menuPosition: B = "auto",
|
|
35
35
|
...l
|
|
36
36
|
}) => {
|
|
37
37
|
const {
|
|
38
38
|
control: v,
|
|
39
|
-
getFieldState:
|
|
40
|
-
formState: { errors: S, isValidating:
|
|
41
|
-
} = J(),
|
|
42
|
-
() => !
|
|
43
|
-
[S, i,
|
|
44
|
-
),
|
|
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:
|
|
47
|
+
), { helperText: j, helperTextPersistent: q } = O({
|
|
48
48
|
propertyName: i,
|
|
49
49
|
helperText: l.helperText,
|
|
50
|
-
requiredText:
|
|
50
|
+
requiredText: M,
|
|
51
51
|
hasCharacterCount: !1
|
|
52
52
|
});
|
|
53
|
-
return
|
|
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":
|
|
58
|
+
"data-tooltip-id": c,
|
|
59
59
|
children: /* @__PURE__ */ o(
|
|
60
|
-
|
|
60
|
+
H,
|
|
61
61
|
{
|
|
62
62
|
name: i,
|
|
63
63
|
rules: f,
|
|
64
64
|
control: v,
|
|
65
|
-
render: ({ field: { ref: te, onChange: m, value:
|
|
66
|
-
let
|
|
67
|
-
G(r) &&
|
|
68
|
-
const d = a ?
|
|
69
|
-
(e) =>
|
|
70
|
-
) :
|
|
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
|
-
${
|
|
73
|
-
${
|
|
74
|
-
${
|
|
75
|
-
${
|
|
76
|
-
${
|
|
77
|
-
${
|
|
78
|
-
return /* @__PURE__ */
|
|
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
|
-
...
|
|
82
|
+
...A,
|
|
83
83
|
...l,
|
|
84
84
|
value: d ?? [],
|
|
85
|
-
label:
|
|
85
|
+
label: c,
|
|
86
86
|
variant: "outlined",
|
|
87
|
-
helperText:
|
|
88
|
-
helperTextPersistent:
|
|
87
|
+
helperText: j,
|
|
88
|
+
helperTextPersistent: q,
|
|
89
89
|
options: r,
|
|
90
|
-
valid: !
|
|
90
|
+
valid: !b,
|
|
91
91
|
"data-testid": l["data-testid"] ?? `select-${i}`,
|
|
92
92
|
multiSelect: !r?.length && T ? !1 : a,
|
|
93
|
-
className:
|
|
94
|
-
disabled:
|
|
93
|
+
className: V,
|
|
94
|
+
disabled: x,
|
|
95
95
|
valueKey: n,
|
|
96
|
-
textKey:
|
|
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((
|
|
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:
|
|
111
|
-
clearable:
|
|
112
|
-
menuPosition:
|
|
110
|
+
searchable: P,
|
|
111
|
+
clearable: D,
|
|
112
|
+
menuPosition: B
|
|
113
113
|
}
|
|
114
114
|
),
|
|
115
115
|
/* @__PURE__ */ o(
|
|
116
116
|
L,
|
|
117
117
|
{
|
|
118
|
-
id:
|
|
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:
|
|
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-
|
|
3
|
-
import { T as d } from "../../../index.es-
|
|
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];
|