@hortiview/shared-components 0.0.11114 → 0.0.11155
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/dist/BigLoadingSpinner-C3wTbTD0.js +17 -0
- package/dist/GenericCard-B8x1DMa8.js +81 -0
- package/dist/ListAreaService-CRX4eEUJ.js +108 -0
- package/dist/_Map-Dtlps7IZ.js +113 -0
- package/dist/{_commonjsHelpers-CT_km90n.js → _commonjsHelpers-BkfeUUK-.js} +2 -4
- package/dist/_overArg-_0pUmCsX.js +14 -0
- package/dist/assets/Filter.css +1 -0
- package/dist/assets/GenericTable.css +1 -0
- package/dist/assets/main.css +1 -0
- package/dist/components/AlertBanner/AlertBanner.js +22 -16
- package/dist/components/AlertBanner/AlertBanner.test.js +2 -2
- package/dist/components/BaseView/BaseView.js +33 -26
- package/dist/components/BaseView/BaseView.test.js +25 -25
- package/dist/components/BasicHeading/BasicHeading.js +50 -41
- package/dist/components/BasicHeading/BasicHeading.test.js +2 -2
- package/dist/components/BlockView/BlockView.js +51 -42
- package/dist/components/BlockView/BlockView.test.js +2 -2
- package/dist/components/ChipCard/ChipCard.js +12 -10
- package/dist/components/ChipCard/ChipCard.test.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.js +29 -25
- package/dist/components/ContextMenu/ContextMenu.test.js +2 -2
- package/dist/components/DeleteModal/DeleteModal.js +58 -53
- package/dist/components/DeleteModal/DeleteModal.test.js +2 -2
- package/dist/components/Disclaimer/Disclaimer.js +11 -8
- package/dist/components/Disclaimer/Disclaimer.test.js +2 -2
- package/dist/components/EmptyView/EmptyView.test.js +2 -2
- package/dist/components/Filter/Filter.js +107 -125
- package/dist/components/Filter/Filter.test.js +2 -2
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +19 -19
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +2 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +3 -0
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +6081 -7102
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +2 -2
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +16 -14
- package/dist/components/FormComponents/FormNumber/FormNumber.js +2 -2
- package/dist/components/FormComponents/FormNumber/FormNumber.test.js +4 -4
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +2 -2
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +109 -102
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +3 -3
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +5 -5
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +2 -2
- package/dist/components/FormComponents/FormText/FormText.js +95 -96
- package/dist/components/FormComponents/FormText/FormText.test.js +13 -13
- package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +31 -0
- package/dist/components/FormComponents/FormToggle/FormToggle.js +43 -0
- package/dist/components/FormComponents/FormToggle/FormToggle.test.d.ts +1 -0
- package/dist/components/FormComponents/FormToggle/FormToggle.test.js +50 -0
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
- package/dist/components/GenericTable/GenericTable.js +64 -81
- package/dist/components/GenericTable/GenericTable.test.js +2 -2
- package/dist/components/GenericTable/GenericTableService.js +41 -43
- package/dist/components/GenericTable/Mobile/GenericCard.js +6 -68
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +3 -3
- package/dist/components/GenericTable/Mobile/GenericCardList.js +8 -9
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +2 -2
- package/dist/components/HashTabView/HashTabView.js +62 -52
- package/dist/components/HashTabView/HashTabView.test.js +2 -2
- package/dist/components/HeaderFilter/HeaderFilter.js +16 -14
- package/dist/components/HeaderFilter/HeaderFilter.test.js +2 -2
- package/dist/components/HealthCheckFailed/HealthCheckFailed.js +27 -20
- package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +2 -2
- package/dist/components/Iconify/Iconify.js +56 -6
- package/dist/components/Iconify/Iconify.test.js +3 -3
- package/dist/components/InfoGroup/InfoGroup.js +36 -30
- package/dist/components/InfoGroup/InfoGroup.test.js +2 -2
- package/dist/components/ListArea/ListArea.js +45 -357
- package/dist/components/ListArea/ListArea.test.js +4 -4
- package/dist/components/ListArea/ListAreaService.js +8 -92
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +5 -9
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -4
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +28 -26
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +2 -2
- package/dist/components/Modal/Modal.js +6 -4
- package/dist/components/OverflowTooltip/OverflowTooltip.js +21 -19
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +3 -3
- package/dist/components/OverflowTooltip/OverflowTooltipService.js +1 -2
- package/dist/components/Scrollbar/scrollbar.test.js +2 -2
- package/dist/components/SearchBar/SearchBar.js +22 -20
- package/dist/components/SearchBar/SearchBar.test.js +2 -2
- package/dist/components/VerticalDivider/VerticalDivider.js +6 -4
- package/dist/components/VerticalDivider/VerticalDivider.test.js +2 -2
- package/dist/get-BiqanC9_.js +7 -0
- package/dist/get-P-5PYZOE.js +426 -0
- package/dist/hooks/useBreakpoints.test.js +2 -2
- package/dist/hooks/useHelperText.d.ts +13 -0
- package/dist/hooks/useHelperText.js +24 -0
- package/dist/index-DzM8o582.js +10881 -0
- package/dist/isArray-2zMxXFEr.js +83 -0
- package/dist/isArray-C_5XvIlE.js +7 -0
- package/dist/isEmpty-BimaZd5G.js +225 -0
- package/dist/isString-BOHPtrlm.js +44 -0
- package/dist/magic-string.es-D4UQQyt0.js +859 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +33 -31
- package/dist/orderBy-BVQIswlJ.js +765 -0
- package/dist/{react-number-format.es-BeIT_PM7.js → react-number-format.es-BD3_OvMU.js} +156 -159
- package/dist/react-tooltip.min-c2wVkjF2.js +1354 -0
- package/dist/react.esm-FR1-H8iU.js +13471 -0
- package/dist/services/UtilService.js +12 -19
- package/dist/services/services.test.js +1 -1
- package/dist/vi.CjhMlMwf-DWv7vrn7.js +12192 -0
- package/package.json +8 -6
- package/dist/BlockView.module-BPlNT5uh.js +0 -15
- package/dist/HashTabView.module-ZhwSfDeQ.js +0 -16
- package/dist/HeaderFilter.module-DiBmulr5.js +0 -7
- package/dist/Iconify-DoU6pP1o.js +0 -97
- package/dist/_Map-DKsHX-kc.js +0 -59
- package/dist/_baseToString-dkhmFwqS.js +0 -198
- package/dist/_equalByTag-BZEJl6ST.js +0 -158
- package/dist/_overArg-BC4qXKbU.js +0 -9
- package/dist/alertBanner.module-BPiKN0gh.js +0 -11
- package/dist/assets/genericTable.css +0 -1
- package/dist/baseView.module-uWbm_a5f.js +0 -12
- package/dist/basicHeading.module-BYb8xvuk.js +0 -16
- package/dist/bigLoadingSpinner.module-GgbFol8k.js +0 -11
- package/dist/chipCard.module-BjpKuf1b.js +0 -7
- package/dist/contextMenu.module-vNQHb48g.js +0 -9
- package/dist/deleteModal.module-Ds3MDzdl.js +0 -10
- package/dist/disclaimer.module-BZydt-Q_.js +0 -8
- package/dist/formDatePicker.module-BV3ma_7y.js +0 -11
- package/dist/formNumber.module-BA05Gi6_.js +0 -7
- package/dist/formSelect.module-PUiLDSD4.js +0 -15
- package/dist/formText.module-C0by6_DK.js +0 -12
- package/dist/genericCard.module-DrQu86jX.js +0 -15
- package/dist/genericTable.module-Dk3yy2S3.js +0 -17
- package/dist/get-BJn2Enx7.js +0 -47
- package/dist/healthCheckFailed.module-B5P1ogjs.js +0 -12
- package/dist/iconify.module-Cru5NS2X.js +0 -80
- package/dist/index-IMXII42b.js +0 -11708
- package/dist/infoGroup.module-Cxw88dfC.js +0 -12
- package/dist/isArray-thIeLpc5.js +0 -35
- package/dist/isPlainObject-BlCDf1Kc.js +0 -18
- package/dist/listArea.module-BhO_OJ1S.js +0 -20
- package/dist/loadingSpinner.module-CLtqSMWA.js +0 -7
- package/dist/magic-string.es-irX7syie.js +0 -732
- package/dist/modal.module-BlDp1Wiq.js +0 -7
- package/dist/overflowTooltip.module-YyRN2MGc.js +0 -7
- package/dist/react-tooltip.min-BzHiZW8k.js +0 -1380
- package/dist/react.esm-CHvVvf3L.js +0 -12786
- package/dist/searchBar.module-9gKyrZRT.js +0 -7
- package/dist/verticalDivider.module-C3_GL-fH.js +0 -7
- package/dist/vi.JYQecGiw-BpOAB4v6.js +0 -9796
- /package/dist/assets/{alertBanner.css → AlertBanner.css} +0 -0
- /package/dist/assets/{baseView.css → BaseView.css} +0 -0
- /package/dist/assets/{basicHeading.css → BasicHeading.css} +0 -0
- /package/dist/assets/{bigLoadingSpinner.css → BigLoadingSpinner.css} +0 -0
- /package/dist/assets/{chipCard.css → ChipCard.css} +0 -0
- /package/dist/assets/{contextMenu.css → ContextMenu.css} +0 -0
- /package/dist/assets/{formNumber.css → CustomTextField.css} +0 -0
- /package/dist/assets/{deleteModal.css → DeleteModal.css} +0 -0
- /package/dist/assets/{disclaimer.css → Disclaimer.css} +0 -0
- /package/dist/assets/{formDatePicker.css → FormDatePicker.css} +0 -0
- /package/dist/assets/{formSelect.css → FormSelect.css} +0 -0
- /package/dist/assets/{formText.css → FormText.css} +0 -0
- /package/dist/assets/{genericCard.css → GenericCard.css} +0 -0
- /package/dist/assets/{healthCheckFailed.css → HealthCheckFailed.css} +0 -0
- /package/dist/assets/{iconify.css → Iconify.css} +0 -0
- /package/dist/assets/{infoGroup.css → InfoGroup.css} +0 -0
- /package/dist/assets/{listArea.css → ListAreaService.css} +0 -0
- /package/dist/assets/{loadingSpinner.css → LoadingSpinner.css} +0 -0
- /package/dist/assets/{modal.css → Modal.css} +0 -0
- /package/dist/assets/{overflowTooltip.css → OverflowTooltip.css} +0 -0
- /package/dist/assets/{searchBar.css → SearchBar.css} +0 -0
- /package/dist/assets/{verticalDivider.css → VerticalDivider.css} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { a as s, s as o, w as r, f as l } from "../../react.esm-
|
|
2
|
+
import { a as s, s as o, w as r, f as l } from "../../react.esm-FR1-H8iU.js";
|
|
3
3
|
import { EmptyView as c } from "./EmptyView.js";
|
|
4
|
-
import { d as h, t as T, g as e, v as d } from "../../vi.
|
|
4
|
+
import { d as h, t as T, g as e, v as d } from "../../vi.CjhMlMwf-DWv7vrn7.js";
|
|
5
5
|
h("EmptyView", () => {
|
|
6
6
|
T("should render", () => {
|
|
7
7
|
s(/* @__PURE__ */ n(c, {})), e(o.getByText("dashbord")).toBeInTheDocument();
|
|
@@ -1,177 +1,159 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import "../../
|
|
7
|
-
import {
|
|
8
|
-
import "../../react-tooltip.min-
|
|
9
|
-
import "../../
|
|
10
|
-
import "
|
|
11
|
-
import "../../isArray-thIeLpc5.js";
|
|
12
|
-
import "../../_baseToString-dkhmFwqS.js";
|
|
13
|
-
import "../../_equalByTag-BZEJl6ST.js";
|
|
14
|
-
import "../../iconify.module-Cru5NS2X.js";
|
|
15
|
-
import { SearchBar as K } from "../SearchBar/SearchBar.js";
|
|
16
|
-
import "../../listArea.module-BhO_OJ1S.js";
|
|
17
|
-
import "../../verticalDivider.module-C3_GL-fH.js";
|
|
18
|
-
import "../../baseView.module-uWbm_a5f.js";
|
|
19
|
-
import "../../BlockView.module-BPlNT5uh.js";
|
|
20
|
-
import "../../chipCard.module-BjpKuf1b.js";
|
|
1
|
+
import "../../assets/Filter.css";
|
|
2
|
+
import { jsx as e, jsxs as y, Fragment as D } from "react/jsx-runtime";
|
|
3
|
+
import { Group as v, Button as p, Select as T, Switch as W, IconButton as j, NotificationBadge as k } from "@element/react-components";
|
|
4
|
+
import { useState as _ } from "react";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { u as b } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
7
|
+
import { Iconify as z } from "../Iconify/Iconify.js";
|
|
8
|
+
import "../../react-tooltip.min-c2wVkjF2.js";
|
|
9
|
+
import "../../orderBy-BVQIswlJ.js";
|
|
10
|
+
import { SearchBar as H } from "../SearchBar/SearchBar.js";
|
|
21
11
|
import "lodash";
|
|
22
|
-
import "
|
|
23
|
-
import { Modal as G } from "../Modal/Modal.js";
|
|
24
|
-
import "../../deleteModal.module-Ds3MDzdl.js";
|
|
25
|
-
import "../../disclaimer.module-BZydt-Q_.js";
|
|
26
|
-
import "../../genericCard.module-DrQu86jX.js";
|
|
27
|
-
import "../../HashTabView.module-ZhwSfDeQ.js";
|
|
28
|
-
import "../../HeaderFilter.module-DiBmulr5.js";
|
|
29
|
-
import "../../healthCheckFailed.module-B5P1ogjs.js";
|
|
30
|
-
import "../../infoGroup.module-Cxw88dfC.js";
|
|
31
|
-
import "../../bigLoadingSpinner.module-GgbFol8k.js";
|
|
32
|
-
import "../../loadingSpinner.module-CLtqSMWA.js";
|
|
33
|
-
import "../Scrollbar/Scrollbar.js";
|
|
12
|
+
import { Modal as I } from "../Modal/Modal.js";
|
|
34
13
|
import "react-hook-form";
|
|
35
|
-
import "../../
|
|
36
|
-
import "../../
|
|
37
|
-
import "../../
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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", m = {
|
|
18
|
+
filterButton: K,
|
|
19
|
+
relativeParent: G,
|
|
20
|
+
filterBadge: V,
|
|
21
|
+
dense: E
|
|
22
|
+
}, ae = ({
|
|
23
|
+
clearFilterText: u,
|
|
24
|
+
closeCallback: s,
|
|
25
|
+
currentFilter: r,
|
|
26
|
+
filterButtonAsIcon: f = !1,
|
|
27
|
+
filterButtonText: l,
|
|
28
|
+
filterModalTitle: i,
|
|
29
|
+
filters: d,
|
|
48
30
|
modalCancelButtonText: g,
|
|
49
|
-
modalConfirmButtonText:
|
|
50
|
-
useModal:
|
|
51
|
-
selectAllLabel:
|
|
31
|
+
modalConfirmButtonText: h,
|
|
32
|
+
useModal: o = !0,
|
|
33
|
+
selectAllLabel: t
|
|
52
34
|
}) => {
|
|
53
|
-
const { isDesktop:
|
|
54
|
-
|
|
55
|
-
|
|
35
|
+
const { isDesktop: A } = b(), [q, B] = _(!1), [c, C] = _(r), [w, x] = _(0), S = () => {
|
|
36
|
+
B(!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)
|
|
56
38
|
);
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
const
|
|
61
|
-
...
|
|
39
|
+
}, O = () => {
|
|
40
|
+
C([]), x(0);
|
|
41
|
+
}, F = (a) => {
|
|
42
|
+
const n = [
|
|
43
|
+
...c.filter((P) => P.id !== a.id),
|
|
62
44
|
a
|
|
63
45
|
];
|
|
64
|
-
|
|
46
|
+
C(n), o || s(n);
|
|
65
47
|
};
|
|
66
|
-
return
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
48
|
+
return o ? /* @__PURE__ */ y(D, { children: [
|
|
49
|
+
/* @__PURE__ */ e(
|
|
50
|
+
J,
|
|
69
51
|
{
|
|
70
|
-
filterButtonText:
|
|
71
|
-
filterButtonAsIcon:
|
|
72
|
-
count:
|
|
73
|
-
onClick: () =>
|
|
52
|
+
filterButtonText: l,
|
|
53
|
+
filterButtonAsIcon: f,
|
|
54
|
+
count: w,
|
|
55
|
+
onClick: () => B(!0)
|
|
74
56
|
}
|
|
75
57
|
),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
58
|
+
/* @__PURE__ */ e(
|
|
59
|
+
I,
|
|
78
60
|
{
|
|
79
|
-
open:
|
|
80
|
-
onClose:
|
|
81
|
-
title:
|
|
82
|
-
modalSize:
|
|
83
|
-
headerActions: /* @__PURE__ */
|
|
84
|
-
dismissiveButton: /* @__PURE__ */
|
|
85
|
-
primaryButton: /* @__PURE__ */
|
|
86
|
-
children: /* @__PURE__ */
|
|
61
|
+
open: q,
|
|
62
|
+
onClose: S,
|
|
63
|
+
title: i,
|
|
64
|
+
modalSize: A ? "small" : "fullscreen",
|
|
65
|
+
headerActions: /* @__PURE__ */ e(p, { variant: "text", onClick: O, children: u }),
|
|
66
|
+
dismissiveButton: /* @__PURE__ */ e(p, { variant: "outlined", onClick: () => B(!1), children: g }),
|
|
67
|
+
primaryButton: /* @__PURE__ */ e(p, { variant: "filled", onClick: S, children: h }),
|
|
68
|
+
children: /* @__PURE__ */ e(v, { direction: "vertical", children: N(d, c, F, t) })
|
|
87
69
|
}
|
|
88
70
|
)
|
|
89
|
-
] }) : /* @__PURE__ */
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
71
|
+
] }) : /* @__PURE__ */ e(v, { secondaryAlign: "center", fullWidth: !0, children: N(d, c, F, t, !1) });
|
|
72
|
+
}, N = (u, s, r, f, l = !0) => u.map(({ id: i, title: d, availableOptions: g, icon: h, type: o }) => /* @__PURE__ */ y(v, { fullWidth: !0, secondaryAlign: "center", children: [
|
|
73
|
+
h ? /* @__PURE__ */ e(z, { icon: h, iconSize: "medium" }) : null,
|
|
74
|
+
o === "select" && /* @__PURE__ */ e(
|
|
75
|
+
T,
|
|
94
76
|
{
|
|
95
|
-
selectAllLabel:
|
|
96
|
-
className:
|
|
77
|
+
selectAllLabel: f,
|
|
78
|
+
className: l ? void 0 : m.dense,
|
|
97
79
|
variant: "outlined",
|
|
98
80
|
options: g,
|
|
99
|
-
label:
|
|
81
|
+
label: d,
|
|
100
82
|
multiSelect: !0,
|
|
101
83
|
textKey: "text",
|
|
102
84
|
valueKey: "id",
|
|
103
|
-
value:
|
|
104
|
-
onChange: (
|
|
85
|
+
value: s.find((t) => t.id === i)?.filterValue ?? [],
|
|
86
|
+
onChange: (t) => r({ id: i, type: o, filterValue: t }),
|
|
105
87
|
hoisted: !0,
|
|
106
88
|
menuMaxHeight: "300px",
|
|
107
|
-
disabled:
|
|
89
|
+
disabled: i === "location",
|
|
108
90
|
showOptionFilter: !1,
|
|
109
|
-
dense: !
|
|
110
|
-
fixedHeightInput: !
|
|
111
|
-
multiDisplayType:
|
|
91
|
+
dense: !l,
|
|
92
|
+
fixedHeightInput: !l,
|
|
93
|
+
multiDisplayType: l ? "pills" : "text"
|
|
112
94
|
}
|
|
113
95
|
),
|
|
114
|
-
|
|
115
|
-
|
|
96
|
+
o === "toggle" && /* @__PURE__ */ e(
|
|
97
|
+
W,
|
|
116
98
|
{
|
|
117
|
-
label:
|
|
118
|
-
onChange: (
|
|
119
|
-
checked: !!
|
|
99
|
+
label: d,
|
|
100
|
+
onChange: (t) => r({ id: i, type: o, filterValue: t }),
|
|
101
|
+
checked: !!s.find((t) => t.id === i)?.filterValue
|
|
120
102
|
}
|
|
121
103
|
),
|
|
122
|
-
|
|
123
|
-
|
|
104
|
+
o === "search" && /* @__PURE__ */ e(
|
|
105
|
+
H,
|
|
124
106
|
{
|
|
125
|
-
placeholder:
|
|
126
|
-
searchTerm:
|
|
127
|
-
setSearchTerm: (
|
|
107
|
+
placeholder: d,
|
|
108
|
+
searchTerm: s.find((t) => t.id === i)?.filterValue,
|
|
109
|
+
setSearchTerm: (t) => r({ id: i, type: o, filterValue: t })
|
|
128
110
|
}
|
|
129
111
|
)
|
|
130
|
-
] },
|
|
131
|
-
filterButtonText:
|
|
132
|
-
filterButtonAsIcon:
|
|
133
|
-
count:
|
|
134
|
-
onClick:
|
|
112
|
+
] }, i)), J = ({
|
|
113
|
+
filterButtonText: u,
|
|
114
|
+
filterButtonAsIcon: s,
|
|
115
|
+
count: r,
|
|
116
|
+
onClick: f
|
|
135
117
|
}) => {
|
|
136
|
-
const { isDesktop:
|
|
137
|
-
return
|
|
138
|
-
|
|
118
|
+
const { isDesktop: l } = b();
|
|
119
|
+
return s ? /* @__PURE__ */ e(
|
|
120
|
+
j,
|
|
139
121
|
{
|
|
140
122
|
icon: "filter_list_alt",
|
|
141
|
-
onClick:
|
|
142
|
-
badge:
|
|
143
|
-
|
|
123
|
+
onClick: f,
|
|
124
|
+
badge: r !== 0 && /* @__PURE__ */ e(
|
|
125
|
+
k,
|
|
144
126
|
{
|
|
145
|
-
counter:
|
|
146
|
-
className:
|
|
127
|
+
counter: r,
|
|
128
|
+
className: m.filterBadge,
|
|
147
129
|
themeColor: "secondary",
|
|
148
130
|
"data-testid": "filter-badge"
|
|
149
131
|
}
|
|
150
132
|
)
|
|
151
133
|
}
|
|
152
|
-
) : /* @__PURE__ */
|
|
134
|
+
) : /* @__PURE__ */ y(
|
|
153
135
|
"div",
|
|
154
136
|
{
|
|
155
|
-
className:
|
|
156
|
-
style: { height: "100%", width:
|
|
137
|
+
className: m.relativeParent,
|
|
138
|
+
style: { height: "100%", width: l ? void 0 : "100%" },
|
|
157
139
|
children: [
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
|
|
140
|
+
/* @__PURE__ */ e(
|
|
141
|
+
p,
|
|
160
142
|
{
|
|
161
143
|
variant: "outlined",
|
|
162
144
|
themeColor: "primary",
|
|
163
145
|
leadingIcon: "filter_list_alt",
|
|
164
|
-
onClick:
|
|
165
|
-
className:
|
|
166
|
-
fullWidth: !
|
|
167
|
-
children:
|
|
146
|
+
onClick: f,
|
|
147
|
+
className: m.filterButton,
|
|
148
|
+
fullWidth: !l,
|
|
149
|
+
children: u
|
|
168
150
|
}
|
|
169
151
|
),
|
|
170
|
-
|
|
171
|
-
|
|
152
|
+
r !== 0 && /* @__PURE__ */ e(
|
|
153
|
+
k,
|
|
172
154
|
{
|
|
173
|
-
counter:
|
|
174
|
-
className:
|
|
155
|
+
counter: r,
|
|
156
|
+
className: m.filterBadge,
|
|
175
157
|
themeColor: "secondary",
|
|
176
158
|
"data-testid": "filter-badge"
|
|
177
159
|
}
|
|
@@ -181,5 +163,5 @@ const bt = ({
|
|
|
181
163
|
);
|
|
182
164
|
};
|
|
183
165
|
export {
|
|
184
|
-
|
|
166
|
+
ae as Filter
|
|
185
167
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { a, s as t, f as c, t as u, w as d } from "../../react.esm-
|
|
2
|
+
import { a, s as t, f as c, t as u, w as d } from "../../react.esm-FR1-H8iU.js";
|
|
3
3
|
import { a as s } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
4
4
|
import { Filter as T } from "./Filter.js";
|
|
5
|
-
import { v as x, b as f, d as y, t as B, g as e } from "../../vi.
|
|
5
|
+
import { v as x, b as f, d as y, t as B, g as e } from "../../vi.CjhMlMwf-DWv7vrn7.js";
|
|
6
6
|
const o = x.fn();
|
|
7
7
|
f(() => {
|
|
8
8
|
x.spyOn(s, "useBreakpoints").mockReturnValue({
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Checkbox as
|
|
3
|
-
import { useFormContext as
|
|
4
|
-
const
|
|
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/react-components";
|
|
3
|
+
import { useFormContext as l, Controller as u } from "react-hook-form";
|
|
4
|
+
const j = ({
|
|
5
5
|
propertyName: t,
|
|
6
6
|
label: n,
|
|
7
7
|
validate: c,
|
|
8
|
-
required:
|
|
9
|
-
onChange:
|
|
10
|
-
disabled:
|
|
8
|
+
required: s,
|
|
9
|
+
onChange: a,
|
|
10
|
+
disabled: m
|
|
11
11
|
}) => {
|
|
12
|
-
const { control: h } =
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
12
|
+
const { control: h } = l();
|
|
13
|
+
return /* @__PURE__ */ o(
|
|
14
|
+
u,
|
|
15
15
|
{
|
|
16
16
|
name: t,
|
|
17
17
|
control: h,
|
|
18
18
|
rules: {
|
|
19
|
-
required:
|
|
19
|
+
required: s,
|
|
20
20
|
validate: c
|
|
21
21
|
},
|
|
22
|
-
render: ({ field: r, fieldState:
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
22
|
+
render: ({ field: r, fieldState: e }) => /* @__PURE__ */ p(x, { direction: "vertical", gap: "none", children: [
|
|
23
|
+
/* @__PURE__ */ o(
|
|
24
|
+
C,
|
|
25
25
|
{
|
|
26
26
|
"data-testid": "checkbox",
|
|
27
27
|
...r,
|
|
28
28
|
label: n,
|
|
29
|
-
onChange: (...
|
|
30
|
-
r.onChange(...
|
|
29
|
+
onChange: (...i) => {
|
|
30
|
+
r.onChange(...i), a?.();
|
|
31
31
|
},
|
|
32
32
|
checked: r.value,
|
|
33
|
-
disabled:
|
|
33
|
+
disabled: m
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
|
-
|
|
36
|
+
e.error && /* @__PURE__ */ o(d, { "data-testid": "checkbox-error-message", themeColor: "error", children: e.error.message })
|
|
37
37
|
] })
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
j as FormCheckBox
|
|
43
43
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { a as n, s as t, f as m } from "../../../react.esm-
|
|
2
|
+
import { a as n, s as t, f as m } from "../../../react.esm-FR1-H8iU.js";
|
|
3
3
|
import { FormCheckBox as c } from "./FormCheckBox.js";
|
|
4
|
-
import { v as e, d as h, t as l, g as r } from "../../../vi.
|
|
4
|
+
import { v as e, d as h, t as l, g as r } from "../../../vi.CjhMlMwf-DWv7vrn7.js";
|
|
5
5
|
const a = e.fn();
|
|
6
6
|
e.mock("react-hook-form", () => ({
|
|
7
7
|
...e.importActual("react-hook-form"),
|
|
@@ -16,6 +16,8 @@ type DatePickerProps<T extends FieldValues> = {
|
|
|
16
16
|
rules?: Omit<RegisterOptions<T, FieldPath<T>>, 'disabled' | 'valueAsNumber' | 'valueAsDate' | 'setValueAs'> | undefined;
|
|
17
17
|
/** ClassName */
|
|
18
18
|
className?: string;
|
|
19
|
+
/** A helper text, which is shown under the Picker */
|
|
20
|
+
helperText?: string;
|
|
19
21
|
/** Add the number of years to subtract from the current date as bottom of range */
|
|
20
22
|
minRangeYear?: number;
|
|
21
23
|
/** Add the number of years to add to the current date as top of range */
|
|
@@ -36,6 +38,7 @@ type DatePickerProps<T extends FieldValues> = {
|
|
|
36
38
|
* @param locale - locale to be used for the date picker.
|
|
37
39
|
* @param props - additional props to be passed to the date picker, which are the props of the element date picker {@link ElementDatePickerProps}.
|
|
38
40
|
* @param rules - rules for the date picker. default _undefined_ example: _{ required: { value: true, message: 'This field is required' } }_
|
|
41
|
+
* @param helperText - helper text to be displayed under the date picker.
|
|
39
42
|
*
|
|
40
43
|
* @returns A JSX element that renders a date picker form input.
|
|
41
44
|
*/
|