@hortiview/shared-components 2.8.7 → 2.9.0
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 +35 -0
- package/dist/{AlertBanner-D-NTP_6i.js → AlertBanner-Dss0v6W0.js} +3 -3
- package/dist/{BigLoadingSpinner-CCxsMWnc.js → BigLoadingSpinner-BeHzqdOg.js} +1 -1
- package/dist/{GenericCard-DOKyENNm.js → GenericCard-MjxZ1L7r.js} +3 -3
- package/dist/ListAreaService-Dx9WBGHB.js +125 -0
- package/dist/{OfflineView-DHtzNLwt.js → OfflineView-D168VIXv.js} +3 -3
- package/dist/assets/BaseView.css +1 -1
- package/dist/assets/BasicHeading.css +1 -1
- package/dist/assets/BlockView.css +1 -1
- package/dist/assets/ContextMenu.css +1 -1
- package/dist/assets/CustomTextField.css +1 -1
- package/dist/assets/EmptyView.css +1 -0
- package/dist/assets/Filter.css +1 -1
- package/dist/assets/FormDatePicker.css +1 -1
- package/dist/assets/FormSelect.css +1 -1
- package/dist/assets/FormText.css +1 -1
- package/dist/assets/HashTabView.css +1 -1
- package/dist/assets/InfoGroup.css +1 -1
- package/dist/assets/ListAreaService.css +1 -1
- package/dist/assets/Modal.css +1 -1
- package/dist/assets/OnboardingBanner.css +1 -1
- package/dist/assets/Select.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.d.ts +17 -1
- package/dist/components/BaseView/BaseView.js +119 -76
- package/dist/components/BaseView/BaseView.service.d.ts +7 -0
- package/dist/components/BaseView/BaseView.service.js +27 -0
- package/dist/components/BaseView/BaseView.test.js +18 -17
- package/dist/components/BasicHeading/BasicHeading.d.ts +6 -1
- package/dist/components/BasicHeading/BasicHeading.js +57 -53
- package/dist/components/BasicHeading/BasicHeading.test.js +24 -24
- package/dist/components/BlockView/BlockView.d.ts +15 -3
- package/dist/components/BlockView/BlockView.js +69 -58
- package/dist/components/ChipCard/ChipCard.js +7 -7
- package/dist/components/ContextMenu/ContextMenu.d.ts +2 -0
- package/dist/components/ContextMenu/ContextMenu.js +52 -41
- package/dist/components/DeleteModal/DeleteModal.js +4 -4
- package/dist/components/DetailContentWrapper/DetailContentWrapper.d.ts +18 -3
- package/dist/components/DetailContentWrapper/DetailContentWrapper.js +13 -11
- package/dist/components/Disclaimer/Disclaimer.js +3 -3
- package/dist/components/EmptyView/EmptyView.d.ts +18 -6
- package/dist/components/EmptyView/EmptyView.js +37 -309
- package/dist/components/EmptyView/EmptyView.test.js +34 -38
- package/dist/components/Filter/Filter.d.ts +5 -1
- package/dist/components/Filter/Filter.js +113 -98
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +4 -4
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +21 -20
- package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +33 -33
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.js +3 -3
- package/dist/components/FormComponents/FormText/FormText.js +45 -44
- package/dist/components/FormComponents/FormToggle/FormToggle.js +3 -3
- package/dist/components/GenericTable/GenericTable.js +17 -17
- 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 +3 -3
- package/dist/components/HashTabView/HashTabView.js +119 -117
- package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
- package/dist/components/Iconify/Iconify.d.ts +4 -0
- package/dist/components/Iconify/Iconify.js +1 -1
- package/dist/components/InfoCard/InfoCard.js +3 -3
- package/dist/components/InfoGroup/InfoGroup.js +47 -38
- package/dist/components/ListArea/ListArea.d.ts +6 -2
- package/dist/components/ListArea/ListArea.js +37 -32
- package/dist/components/ListArea/ListArea.test.js +2 -2
- package/dist/components/ListArea/ListAreaService.js +4 -4
- 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 +4 -4
- package/dist/components/Modal/Modal.js +119 -103
- package/dist/components/OfflineView/OfflineView.js +4 -4
- package/dist/components/OfflineView/OfflineView.test.js +1 -1
- package/dist/components/OnboardingBanner/OnboardingBanner.js +35 -33
- 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/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/{find-B-dm7n_F.js → find-Dpy_M6vm.js} +1 -1
- package/dist/{index.es-DObVvepK.js → index.es-BLIkMu0q.js} +2 -2
- package/dist/{index.es-DENZVv7_.js → index.es-BLolvOHO.js} +5 -5
- package/dist/{index.es-BXj90wb_.js → index.es-BjvSa9Z-.js} +2 -2
- package/dist/{index.es-Dfju71Pi.js → index.es-Bus5gEri.js} +1 -1
- package/dist/{index.es-IXyb5F6n.js → index.es-BzdG6flH.js} +2 -2
- package/dist/{index.es-DqSY-ePE.js → index.es-CXq42ihP.js} +9 -9
- package/dist/{index.es-45NOgWlB.js → index.es-CijDQQVg.js} +2 -2
- package/dist/{index.es-BGordhUK.js → index.es-DCSgIiJH.js} +1 -1
- package/dist/{index.es-D1IpdMde.js → index.es-DDRyb2df.js} +2 -2
- package/dist/{index.es-DeF-y7fd.js → index.es-DNRm4vOy.js} +1 -1
- package/dist/{index.es-0QJC9VS2.js → index.es-DUcI2Zyr.js} +2 -2
- package/dist/{index.es-DwzB1d7_.js → index.es-DYs8W4jv.js} +1 -1
- package/dist/{index.es-B6ZgiW2s.js → index.es-D_hWWij3.js} +13 -13
- package/dist/{index.es-CK4oZMKs.js → index.es-Dq_bXeGZ.js} +13 -13
- package/dist/{index.es-t7hFwQSs.js → index.es-Ds9rRj5B.js} +2 -2
- package/dist/{index.es-DDYCugj-.js → index.es-DsGuBR0Z.js} +1 -1
- package/dist/{index.es-Bg8hxXM8.js → index.es-P5F6NJPB.js} +360 -255
- package/dist/{index.es-Cq04gn3U.js → index.es-b2h35xzk.js} +4 -4
- package/dist/{index.es-Bgjh6euR.js → index.es-vqlyMiew.js} +1 -1
- package/dist/{keyboard-B-WUULl-.js → keyboard-BfmK7HK_.js} +1 -1
- package/dist/main.js +2 -2
- package/dist/{map-Dbvlv_6y.js → map-LUrszKZW.js} +2 -2
- package/dist/{slicedToArray-BWk2gTCn.js → slicedToArray-uk6yv91z.js} +1 -1
- package/package.json +1 -1
- package/dist/ListAreaService-CI-s1Xx5.js +0 -124
- package/dist/includes-Bt-Stz_B.js +0 -110
|
@@ -1,54 +1,50 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { a as
|
|
3
|
-
import { EmptyView as
|
|
4
|
-
import { d as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}),
|
|
9
|
-
|
|
10
|
-
}),
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
}),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
e(i).toBeInTheDocument(), await r(() => l.click(i)), e(t).toHaveBeenCalledTimes(1);
|
|
23
|
-
}), T("should render with a text and a button", async () => {
|
|
24
|
-
const t = a.fn();
|
|
25
|
-
s(
|
|
2
|
+
import { a as i, s as o, w as r, f as l } from "../../react.esm-CX1WJ2Pp.js";
|
|
3
|
+
import { EmptyView as T } from "./EmptyView.js";
|
|
4
|
+
import { d as m, t as s, g as t, a } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
|
+
m("EmptyView", () => {
|
|
6
|
+
s("should render", () => {
|
|
7
|
+
i(/* @__PURE__ */ n(T, {})), t(o.getByTestId("empty-view-container")).toBeInTheDocument();
|
|
8
|
+
}), s("should render with custom icon", () => {
|
|
9
|
+
i(/* @__PURE__ */ n(T, { icon: "add" })), t(o.getByText("add")).toBeInTheDocument();
|
|
10
|
+
}), s("should render with title", () => {
|
|
11
|
+
i(/* @__PURE__ */ n(T, { icon: "add", title: "TITLE" }));
|
|
12
|
+
const e = o.getByText("TITLE");
|
|
13
|
+
t(e).toBeInTheDocument();
|
|
14
|
+
}), s("should render with an action", async () => {
|
|
15
|
+
const e = a.fn();
|
|
16
|
+
i(/* @__PURE__ */ n(T, { icon: "add", action: /* @__PURE__ */ n("button", { onClick: e, children: "BUTTON" }) }));
|
|
17
|
+
const c = o.getByText("BUTTON");
|
|
18
|
+
t(c).toBeInTheDocument(), await r(() => l.click(c)), t(e).toHaveBeenCalledTimes(1);
|
|
19
|
+
}), s("should render with a title and a button", async () => {
|
|
20
|
+
const e = a.fn();
|
|
21
|
+
i(
|
|
26
22
|
/* @__PURE__ */ n(
|
|
27
|
-
|
|
23
|
+
T,
|
|
28
24
|
{
|
|
29
25
|
icon: "add",
|
|
30
|
-
action: /* @__PURE__ */ n("button", { onClick:
|
|
31
|
-
|
|
26
|
+
action: /* @__PURE__ */ n("button", { onClick: e, children: "BUTTON" }),
|
|
27
|
+
title: "MY_TEXT"
|
|
32
28
|
}
|
|
33
29
|
)
|
|
34
30
|
);
|
|
35
|
-
const
|
|
36
|
-
|
|
31
|
+
const c = o.getByText("BUTTON");
|
|
32
|
+
t(c).toBeInTheDocument();
|
|
37
33
|
const d = o.getByText("MY_TEXT");
|
|
38
|
-
|
|
39
|
-
}),
|
|
40
|
-
|
|
34
|
+
t(d).toBeInTheDocument();
|
|
35
|
+
}), s("should render with title only", async () => {
|
|
36
|
+
i(
|
|
41
37
|
/* @__PURE__ */ n(
|
|
42
|
-
|
|
38
|
+
T,
|
|
43
39
|
{
|
|
44
40
|
icon: "add",
|
|
45
|
-
|
|
41
|
+
title: "MY_TEXT"
|
|
46
42
|
}
|
|
47
43
|
)
|
|
48
44
|
);
|
|
49
|
-
const
|
|
50
|
-
e
|
|
51
|
-
const
|
|
52
|
-
|
|
45
|
+
const e = o.queryByText("BUTTON");
|
|
46
|
+
t(e).not.toBeInTheDocument();
|
|
47
|
+
const c = o.getByText("MY_TEXT");
|
|
48
|
+
t(c).toBeInTheDocument();
|
|
53
49
|
});
|
|
54
50
|
});
|
|
@@ -13,6 +13,8 @@ type FilterProps = {
|
|
|
13
13
|
useModal?: boolean;
|
|
14
14
|
selectAllLabel?: string;
|
|
15
15
|
'data-testid'?: string;
|
|
16
|
+
filterButtonSize?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
17
|
+
filterButtonClassName?: string;
|
|
16
18
|
};
|
|
17
19
|
/**
|
|
18
20
|
* Filter component that allows the user to filter the data provided
|
|
@@ -23,11 +25,13 @@ type FilterProps = {
|
|
|
23
25
|
* @param filterButtonText - the text for the filter button
|
|
24
26
|
* @param filterModalTitle - the title for the filter modal
|
|
25
27
|
* @param filters - the filter data
|
|
28
|
+
* @param filterButtonSize - the size of the filter button and filter button as icon 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'
|
|
29
|
+
* @param filterButtonClassName the className of the FilterButton
|
|
26
30
|
* @param modalCancelButtonText - the text for the cancel button in the modal
|
|
27
31
|
* @param modalConfirmButtonText - the text for the confirm button in the modal
|
|
28
32
|
* @param useModal - if the filter should use a modal and a filter button, default is true,
|
|
29
33
|
* if false the filters will be displayed directly in the page, be aware that the filters will be displayed in a row and there needs to be enough space for them
|
|
30
34
|
* @returns
|
|
31
35
|
*/
|
|
32
|
-
export declare const Filter: ({ clearFilterText, closeCallback, currentFilter, filterButtonAsIcon, filterButtonText, filterModalTitle, filters, modalCancelButtonText, modalConfirmButtonText, useModal, selectAllLabel, "data-testid": dataTestId, }: FilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const Filter: ({ clearFilterText, closeCallback, currentFilter, filterButtonAsIcon, filterButtonText, filterModalTitle, filters, modalCancelButtonText, modalConfirmButtonText, useModal, selectAllLabel, filterButtonSize, filterButtonClassName, "data-testid": dataTestId, }: FilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
37
|
export {};
|
|
@@ -1,181 +1,196 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { N as
|
|
3
|
-
import { B as
|
|
4
|
-
import { G as
|
|
5
|
-
import { I as W } from "../../index.es-
|
|
6
|
-
import { S as j } from "../../index.es-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as B, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { N as z } from "../../index.es-D_hWWij3.js";
|
|
3
|
+
import { B as _ } from "../../index.es-DUcI2Zyr.js";
|
|
4
|
+
import { G as v } from "../../index.es-DsGuBR0Z.js";
|
|
5
|
+
import { I as W } from "../../index.es-BzdG6flH.js";
|
|
6
|
+
import { S as j } from "../../index.es-CijDQQVg.js";
|
|
7
|
+
import { c as G } from "../../index-Cpb-8cAN.js";
|
|
8
|
+
import { useState as b } from "react";
|
|
9
|
+
import { Iconify as H } from "../Iconify/Iconify.js";
|
|
10
|
+
import { u as F } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
10
11
|
import "../../react-tooltip.min-DSY6KDqS.js";
|
|
11
12
|
import "../../orderBy-BXxEvUw6.js";
|
|
12
|
-
import { SearchBar as
|
|
13
|
+
import { SearchBar as I } from "../SearchBar/SearchBar.js";
|
|
13
14
|
import "../../uniqueId-NU3-C36A.js";
|
|
14
|
-
import { Modal as
|
|
15
|
-
import { Select as
|
|
15
|
+
import { Modal as K } from "../Modal/Modal.js";
|
|
16
|
+
import { Select as M } from "../Select/Select.js";
|
|
16
17
|
import "react-hook-form";
|
|
17
18
|
import "../../get-DuK51wnj.js";
|
|
18
19
|
import "../../omit-uTAyrUTm.js";
|
|
19
20
|
import "../../isArray-Dub1wGJM.js";
|
|
20
21
|
import "../../isString-BNaBRq3S.js";
|
|
21
22
|
import "../../types/Time.js";
|
|
22
|
-
import '../../assets/Filter.css';const
|
|
23
|
-
filterButton:
|
|
24
|
-
relativeParent:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
import '../../assets/Filter.css';const T = "_filterButton_1qtzn_1", V = "_relativeParent_1qtzn_21", E = "_iconColor_1qtzn_25", J = "_filterBadge_1qtzn_29", Q = "_dense_1qtzn_36", U = "_filterModal_1qtzn_41", X = "_borderRadius_1qtzn_45", s = {
|
|
24
|
+
filterButton: T,
|
|
25
|
+
relativeParent: V,
|
|
26
|
+
iconColor: E,
|
|
27
|
+
filterBadge: J,
|
|
28
|
+
dense: Q,
|
|
29
|
+
filterModal: U,
|
|
30
|
+
borderRadius: X
|
|
31
|
+
}, Bt = ({
|
|
32
|
+
clearFilterText: u,
|
|
33
|
+
closeCallback: d,
|
|
34
|
+
currentFilter: i,
|
|
35
|
+
filterButtonAsIcon: c = !1,
|
|
36
|
+
filterButtonText: f,
|
|
33
37
|
filterModalTitle: t,
|
|
34
|
-
filters:
|
|
35
|
-
modalCancelButtonText:
|
|
36
|
-
modalConfirmButtonText:
|
|
38
|
+
filters: a,
|
|
39
|
+
modalCancelButtonText: m,
|
|
40
|
+
modalConfirmButtonText: h,
|
|
37
41
|
useModal: o = !0,
|
|
38
|
-
selectAllLabel:
|
|
39
|
-
"
|
|
42
|
+
selectAllLabel: r,
|
|
43
|
+
filterButtonSize: q = "medium",
|
|
44
|
+
filterButtonClassName: $,
|
|
45
|
+
"data-testid": k
|
|
40
46
|
}) => {
|
|
41
|
-
const { isDesktop:
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
const { isDesktop: w } = F(), [A, g] = b(!1), [p, C] = b(i), [R, S] = b(0), x = () => {
|
|
48
|
+
g(!1), d(p), S(
|
|
49
|
+
p.reduce((l, { filterValue: n }) => n === void 0 ? l : typeof n == "boolean" ? n ? l + 1 : l : Array.isArray(n) ? l + n.length : typeof n == "string" && n.length ? l + 1 : l, 0)
|
|
44
50
|
);
|
|
45
51
|
}, O = () => {
|
|
46
|
-
C([]),
|
|
47
|
-
},
|
|
52
|
+
C([]), S(0);
|
|
53
|
+
}, y = (l) => {
|
|
48
54
|
const n = [
|
|
49
|
-
...
|
|
55
|
+
...p.filter((P) => P.id !== l.id),
|
|
50
56
|
l
|
|
51
57
|
];
|
|
52
|
-
C(n), o ||
|
|
58
|
+
C(n), o || d(n);
|
|
53
59
|
};
|
|
54
|
-
return o ? /* @__PURE__ */
|
|
60
|
+
return o ? /* @__PURE__ */ B(D, { children: [
|
|
55
61
|
/* @__PURE__ */ e(
|
|
56
|
-
|
|
62
|
+
Y,
|
|
57
63
|
{
|
|
58
|
-
filterButtonText:
|
|
59
|
-
filterButtonAsIcon:
|
|
60
|
-
count:
|
|
61
|
-
onClick: () =>
|
|
62
|
-
"data-testid":
|
|
64
|
+
filterButtonText: f,
|
|
65
|
+
filterButtonAsIcon: c,
|
|
66
|
+
count: R,
|
|
67
|
+
onClick: () => g(!0),
|
|
68
|
+
"data-testid": k,
|
|
69
|
+
filterButtonSize: q,
|
|
70
|
+
filterButtonClassName: $
|
|
63
71
|
}
|
|
64
72
|
),
|
|
65
73
|
/* @__PURE__ */ e(
|
|
66
|
-
|
|
74
|
+
K,
|
|
67
75
|
{
|
|
68
|
-
open:
|
|
69
|
-
|
|
76
|
+
open: A,
|
|
77
|
+
className: s.filterModal,
|
|
78
|
+
onClose: x,
|
|
70
79
|
title: t,
|
|
71
|
-
modalSize:
|
|
72
|
-
headerActions: /* @__PURE__ */ e(
|
|
73
|
-
|
|
74
|
-
|
|
80
|
+
modalSize: w ? "small" : "fullscreen",
|
|
81
|
+
headerActions: /* @__PURE__ */ e(_, { "data-testid": "filter-clear-button", variant: "text", onClick: O, children: u }),
|
|
82
|
+
footerSupplemental: /* @__PURE__ */ e(
|
|
83
|
+
_,
|
|
75
84
|
{
|
|
76
85
|
"data-testid": "filter-cancel-button",
|
|
77
86
|
variant: "outlined",
|
|
78
|
-
onClick: () =>
|
|
79
|
-
children:
|
|
87
|
+
onClick: () => g(!1),
|
|
88
|
+
children: m
|
|
80
89
|
}
|
|
81
90
|
),
|
|
82
|
-
actionButton: /* @__PURE__ */ e(
|
|
83
|
-
children: /* @__PURE__ */ e(
|
|
91
|
+
actionButton: /* @__PURE__ */ e(_, { "data-testid": "filter-confirm-button", variant: "filled", onClick: x, children: h }),
|
|
92
|
+
children: /* @__PURE__ */ e(v, { direction: "vertical", "data-testid": "filter-map-filters", children: N(a, p, y, r) })
|
|
84
93
|
}
|
|
85
94
|
)
|
|
86
|
-
] }) : /* @__PURE__ */ e(
|
|
87
|
-
}, N = (
|
|
88
|
-
|
|
95
|
+
] }) : /* @__PURE__ */ e(v, { secondaryAlign: "center", fullWidth: !0, children: N(a, p, y, r, !1) });
|
|
96
|
+
}, N = (u, d, i, c, f = !0) => u.map(({ id: t, title: a, availableOptions: m, icon: h, type: o }) => /* @__PURE__ */ B(v, { fullWidth: !0, secondaryAlign: "center", "data-testid": `filter-${o}-group-${t}`, children: [
|
|
97
|
+
h ? /* @__PURE__ */ e(H, { icon: h, iconSize: "medium" }) : null,
|
|
89
98
|
o === "select" && /* @__PURE__ */ e(
|
|
90
|
-
|
|
99
|
+
M,
|
|
91
100
|
{
|
|
92
101
|
"data-testid": `filter-select-${t}`,
|
|
93
|
-
selectAllLabel:
|
|
94
|
-
className:
|
|
102
|
+
selectAllLabel: c,
|
|
103
|
+
className: `${f ? void 0 : s.dense} ${s.borderRadius}`,
|
|
95
104
|
variant: "outlined",
|
|
96
|
-
options:
|
|
97
|
-
label:
|
|
105
|
+
options: m,
|
|
106
|
+
label: a,
|
|
98
107
|
multiSelect: !0,
|
|
99
108
|
textKey: "text",
|
|
100
109
|
valueKey: "id",
|
|
101
|
-
value:
|
|
102
|
-
onChange: (
|
|
110
|
+
value: d.find((r) => r.id === t)?.filterValue ?? [],
|
|
111
|
+
onChange: (r) => i({ id: t, type: o, filterValue: r }),
|
|
103
112
|
hoisted: !0,
|
|
104
113
|
menuMaxHeight: "300px",
|
|
105
114
|
disabled: t === "location",
|
|
106
115
|
showOptionFilter: !1,
|
|
107
|
-
dense: !
|
|
108
|
-
fixedHeightInput: !
|
|
109
|
-
multiDisplayType:
|
|
116
|
+
dense: !f,
|
|
117
|
+
fixedHeightInput: !f,
|
|
118
|
+
multiDisplayType: f ? "pills" : "text"
|
|
110
119
|
}
|
|
111
120
|
),
|
|
112
121
|
o === "toggle" && /* @__PURE__ */ e(
|
|
113
122
|
j,
|
|
114
123
|
{
|
|
115
124
|
"data-testid": `filter-switch-${t}`,
|
|
116
|
-
label:
|
|
117
|
-
onChange: (
|
|
118
|
-
checked: !!
|
|
125
|
+
label: a,
|
|
126
|
+
onChange: (r) => i({ id: t, type: o, filterValue: r }),
|
|
127
|
+
checked: !!d.find((r) => r.id === t)?.filterValue
|
|
119
128
|
}
|
|
120
129
|
),
|
|
121
130
|
o === "search" && /* @__PURE__ */ e(
|
|
122
|
-
|
|
131
|
+
I,
|
|
123
132
|
{
|
|
124
133
|
"data-testid": `filter-search-${t}`,
|
|
125
|
-
placeholder:
|
|
126
|
-
searchTerm:
|
|
127
|
-
|
|
134
|
+
placeholder: a,
|
|
135
|
+
searchTerm: d.find((r) => r.id === t)?.filterValue,
|
|
136
|
+
className: s.borderRadius,
|
|
137
|
+
setSearchTerm: (r) => i({ id: t, type: o, filterValue: r })
|
|
128
138
|
}
|
|
129
139
|
)
|
|
130
|
-
] }, t)),
|
|
131
|
-
filterButtonText:
|
|
132
|
-
filterButtonAsIcon:
|
|
133
|
-
count:
|
|
134
|
-
|
|
140
|
+
] }, t)), Y = ({
|
|
141
|
+
filterButtonText: u,
|
|
142
|
+
filterButtonAsIcon: d,
|
|
143
|
+
count: i,
|
|
144
|
+
filterButtonSize: c,
|
|
145
|
+
filterButtonClassName: f,
|
|
146
|
+
"data-testid": t,
|
|
135
147
|
onClick: a
|
|
136
148
|
}) => {
|
|
137
|
-
const { isDesktop:
|
|
138
|
-
return
|
|
149
|
+
const { isDesktop: m } = F();
|
|
150
|
+
return d ? /* @__PURE__ */ e(
|
|
139
151
|
W,
|
|
140
152
|
{
|
|
141
|
-
|
|
153
|
+
className: s.iconColor,
|
|
154
|
+
"data-testid": t ?? "filter-icon-button",
|
|
142
155
|
icon: "filter_list_alt",
|
|
143
156
|
onClick: a,
|
|
144
|
-
|
|
145
|
-
|
|
157
|
+
iconSize: c,
|
|
158
|
+
badge: i !== 0 && /* @__PURE__ */ e(
|
|
159
|
+
z,
|
|
146
160
|
{
|
|
147
|
-
counter:
|
|
148
|
-
className:
|
|
161
|
+
counter: i,
|
|
162
|
+
className: s.filterBadge,
|
|
149
163
|
themeColor: "secondary",
|
|
150
164
|
"data-testid": "filter-badge"
|
|
151
165
|
}
|
|
152
166
|
)
|
|
153
167
|
}
|
|
154
|
-
) : /* @__PURE__ */
|
|
168
|
+
) : /* @__PURE__ */ B(
|
|
155
169
|
"div",
|
|
156
170
|
{
|
|
157
|
-
"data-testid":
|
|
158
|
-
className:
|
|
159
|
-
style: { height: "100%", width:
|
|
171
|
+
"data-testid": t ?? "filter-button-container",
|
|
172
|
+
className: s.relativeParent,
|
|
173
|
+
style: { height: "100%", width: m ? void 0 : "100%" },
|
|
160
174
|
children: [
|
|
161
175
|
/* @__PURE__ */ e(
|
|
162
|
-
|
|
176
|
+
_,
|
|
163
177
|
{
|
|
164
178
|
"data-testid": "filter-button",
|
|
165
179
|
variant: "outlined",
|
|
166
180
|
themeColor: "primary",
|
|
167
181
|
leadingIcon: "filter_list_alt",
|
|
168
182
|
onClick: a,
|
|
169
|
-
className:
|
|
170
|
-
fullWidth: !
|
|
171
|
-
|
|
183
|
+
className: G(f, s.filterButton),
|
|
184
|
+
fullWidth: !m,
|
|
185
|
+
buttonSize: c,
|
|
186
|
+
children: u
|
|
172
187
|
}
|
|
173
188
|
),
|
|
174
|
-
|
|
175
|
-
|
|
189
|
+
i !== 0 && /* @__PURE__ */ e(
|
|
190
|
+
z,
|
|
176
191
|
{
|
|
177
|
-
counter:
|
|
178
|
-
className:
|
|
192
|
+
counter: i,
|
|
193
|
+
className: s.filterBadge,
|
|
179
194
|
themeColor: "secondary",
|
|
180
195
|
"data-testid": "filter-badge"
|
|
181
196
|
}
|
|
@@ -185,5 +200,5 @@ import '../../assets/Filter.css';const K = "_filterButton_qtl7a_1", T = "_relati
|
|
|
185
200
|
);
|
|
186
201
|
};
|
|
187
202
|
export {
|
|
188
|
-
|
|
203
|
+
Bt as Filter
|
|
189
204
|
};
|
|
@@ -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-BLIkMu0q.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,7 +1,7 @@
|
|
|
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-
|
|
2
|
+
import { B as ba } from "../../../index.es-DUcI2Zyr.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-CXq42ihP.js";
|
|
4
|
+
import { D as ka } from "../../../index.es-Bus5gEri.js";
|
|
5
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";
|
|
@@ -28520,7 +28520,7 @@ const FO = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
28520
28520
|
zhCN: NR,
|
|
28521
28521
|
zhHK: dO,
|
|
28522
28522
|
zhTW: EO
|
|
28523
|
-
}, Symbol.toStringTag, { value: "Module" })), AO = "
|
|
28523
|
+
}, Symbol.toStringTag, { value: "Module" })), AO = "_datePickerContainer_1m1xz_1", LO = "_invalid_1m1xz_13", IO = "_fromPickerText_1m1xz_17", RO = "_datePickerCalendar_1m1xz_21", OO = "_trailingContent_1m1xz_25", I = {
|
|
28524
28524
|
datePickerContainer: AO,
|
|
28525
28525
|
invalid: LO,
|
|
28526
28526
|
fromPickerText: IO,
|
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { T as
|
|
3
|
-
import { g
|
|
4
|
-
import { o as
|
|
5
|
-
import { useMemo as
|
|
6
|
-
import { useFormContext as
|
|
7
|
-
import '../../../assets/CustomTextField.css';const c = "
|
|
8
|
-
invalid: c
|
|
2
|
+
import { T as u } from "../../../index.es-BLolvOHO.js";
|
|
3
|
+
import { g } from "../../../get-DuK51wnj.js";
|
|
4
|
+
import { o as f } from "../../../omit-uTAyrUTm.js";
|
|
5
|
+
import { useMemo as v } from "react";
|
|
6
|
+
import { useFormContext as s } from "react-hook-form";
|
|
7
|
+
import '../../../assets/CustomTextField.css';const c = "_invalid_142hx_1", h = "_borderRadius_142hx_5", o = {
|
|
8
|
+
invalid: c,
|
|
9
|
+
borderRadius: h
|
|
9
10
|
}, C = ({ ...e }) => {
|
|
10
11
|
const {
|
|
11
|
-
getFieldState:
|
|
12
|
+
getFieldState: t,
|
|
12
13
|
formState: { errors: n },
|
|
13
14
|
trigger: i,
|
|
14
|
-
watch:
|
|
15
|
-
} =
|
|
15
|
+
watch: l
|
|
16
|
+
} = s(), a = l(e.propertyName), d = v(() => {
|
|
16
17
|
if (!(!a || e.value === null))
|
|
17
18
|
return e.value;
|
|
18
19
|
}, [a, e.value]);
|
|
19
20
|
return /* @__PURE__ */ m(
|
|
20
|
-
|
|
21
|
+
u,
|
|
21
22
|
{
|
|
22
|
-
...
|
|
23
|
-
value:
|
|
23
|
+
...f(e, ["propertyName", "formOnBlur", "additionalTrigger"]),
|
|
24
|
+
value: d,
|
|
24
25
|
"data-testid": `numeric-field-${e.propertyName}`,
|
|
25
26
|
fullWidth: !0,
|
|
26
27
|
inputMode: "decimal",
|
|
27
28
|
variant: "outlined",
|
|
28
|
-
onBlur: (
|
|
29
|
-
e.onBlur?.(
|
|
29
|
+
onBlur: (r) => {
|
|
30
|
+
e.onBlur?.(r), e.formOnBlur(), e.additionalTrigger === "onBlur" && i(e.propertyName);
|
|
30
31
|
},
|
|
31
|
-
onChange: (
|
|
32
|
-
e.onChange?.(
|
|
32
|
+
onChange: (r) => {
|
|
33
|
+
e.onChange?.(r), e.additionalTrigger === "onChange" && i(e.propertyName);
|
|
33
34
|
},
|
|
34
|
-
valid: !
|
|
35
|
-
helperTextPersistent:
|
|
36
|
-
className:
|
|
35
|
+
valid: !t(e.propertyName).invalid,
|
|
36
|
+
helperTextPersistent: g(n, e.propertyName) !== void 0 || e.helperTextPersistent,
|
|
37
|
+
className: `${t(e.propertyName).invalid ? o.invalid : ""} ${o.borderRadius}`
|
|
37
38
|
}
|
|
38
39
|
);
|
|
39
40
|
};
|
|
@@ -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-DDRyb2df.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,20 +1,20 @@
|
|
|
1
|
-
import { jsx as o, Fragment as
|
|
1
|
+
import { jsx as o, Fragment as p, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import { g as x } from "../../../get-DuK51wnj.js";
|
|
3
|
-
import { i as
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { useFormContext as
|
|
6
|
-
import { M as
|
|
7
|
-
import { useHelperText as
|
|
8
|
-
import { Select as
|
|
9
|
-
import { SelectTooltipText as
|
|
10
|
-
import '../../../assets/FormSelect.css';const
|
|
11
|
-
invalidHelperText:
|
|
12
|
-
invalidBorder:
|
|
13
|
-
invalidPlaceholder:
|
|
14
|
-
invalidDropdownIcon:
|
|
15
|
-
formSelectContainer:
|
|
16
|
-
formSelect:
|
|
17
|
-
multiText:
|
|
3
|
+
import { i as z } from "../../../isArray-Dub1wGJM.js";
|
|
4
|
+
import { useMemo as g } from "react";
|
|
5
|
+
import { useFormContext as G, Controller as C } from "react-hook-form";
|
|
6
|
+
import { M as J } from "../../../react-tooltip.min-DSY6KDqS.js";
|
|
7
|
+
import { useHelperText as L } from "../../../hooks/useHelperText.js";
|
|
8
|
+
import { Select as O } from "../../Select/Select.js";
|
|
9
|
+
import { SelectTooltipText as Q } from "./SelectTooltipText.js";
|
|
10
|
+
import '../../../assets/FormSelect.css';const R = "_invalidHelperText_b3jcy_1", U = "_invalidBorder_b3jcy_5", W = "_invalidPlaceholder_b3jcy_9", X = "_invalidDropdownIcon_b3jcy_13", Y = "_formSelectContainer_b3jcy_18", Z = "_formSelect_b3jcy_18", N = "_multiText_b3jcy_53", K = "_tooltip_b3jcy_62", ee = "_disabled_b3jcy_67", t = {
|
|
11
|
+
invalidHelperText: R,
|
|
12
|
+
invalidBorder: U,
|
|
13
|
+
invalidPlaceholder: W,
|
|
14
|
+
invalidDropdownIcon: X,
|
|
15
|
+
formSelectContainer: Y,
|
|
16
|
+
formSelect: Z,
|
|
17
|
+
multiText: N,
|
|
18
18
|
tooltip: K,
|
|
19
19
|
disabled: ee
|
|
20
20
|
}, fe = ({
|
|
@@ -37,20 +37,20 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_1qcz0_1",
|
|
|
37
37
|
const {
|
|
38
38
|
control: v,
|
|
39
39
|
getFieldState: P,
|
|
40
|
-
formState: { errors: S, isValidating:
|
|
41
|
-
} =
|
|
42
|
-
() => !
|
|
43
|
-
[S, i,
|
|
44
|
-
), F =
|
|
40
|
+
formState: { errors: S, isValidating: b }
|
|
41
|
+
} = G(), B = g(
|
|
42
|
+
() => !b && x(S, i) !== void 0,
|
|
43
|
+
[S, i, b]
|
|
44
|
+
), F = g(
|
|
45
45
|
() => f?.required?.message,
|
|
46
46
|
[f]
|
|
47
|
-
), { helperText:
|
|
47
|
+
), { helperText: y, helperTextPersistent: M } = L({
|
|
48
48
|
propertyName: i,
|
|
49
49
|
helperText: l.helperText,
|
|
50
50
|
requiredText: F,
|
|
51
51
|
hasCharacterCount: !1
|
|
52
52
|
});
|
|
53
|
-
return H ? /* @__PURE__ */ o(C, { name: i, control: v, render: () => /* @__PURE__ */ o(
|
|
53
|
+
return H ? /* @__PURE__ */ o(C, { name: i, control: v, render: () => /* @__PURE__ */ o(p, {}) }) : /* @__PURE__ */ o(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
56
|
"data-testid": "form-select-container",
|
|
@@ -62,12 +62,12 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_1qcz0_1",
|
|
|
62
62
|
name: i,
|
|
63
63
|
rules: f,
|
|
64
64
|
control: v,
|
|
65
|
-
render: ({ field: { ref: te, onChange: m, value:
|
|
65
|
+
render: ({ field: { ref: te, onChange: m, value: j, ...q } }) => {
|
|
66
66
|
let _ = r;
|
|
67
|
-
|
|
67
|
+
z(r) && x(r[0], "options") !== void 0 && (_ = r.flatMap((e) => x(e, "options") ?? []));
|
|
68
68
|
const d = a ? _?.filter(
|
|
69
|
-
(e) =>
|
|
70
|
-
) : _?.find((e) => e[n] ===
|
|
69
|
+
(e) => j?.includes(e[n])
|
|
70
|
+
) : _?.find((e) => e[n] === j), A = a && l.multiDisplayType === "text" && l.fixedHeightInput, c = P(i).invalid, E = `
|
|
71
71
|
${t.formSelect}
|
|
72
72
|
${c ? t.invalidHelperText : ""}
|
|
73
73
|
${c ? t.invalidDropdownIcon : ""}
|
|
@@ -75,16 +75,16 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_1qcz0_1",
|
|
|
75
75
|
${c ? t.invalidPlaceholder : ""}
|
|
76
76
|
${A ? t.multiText : ""}
|
|
77
77
|
${h ? t.disabled : ""}`;
|
|
78
|
-
return /* @__PURE__ */ k(
|
|
78
|
+
return /* @__PURE__ */ k(p, { children: [
|
|
79
79
|
/* @__PURE__ */ o(
|
|
80
|
-
|
|
80
|
+
O,
|
|
81
81
|
{
|
|
82
|
-
...
|
|
82
|
+
...q,
|
|
83
83
|
...l,
|
|
84
84
|
value: d ?? [],
|
|
85
85
|
label: s,
|
|
86
86
|
variant: "outlined",
|
|
87
|
-
helperText:
|
|
87
|
+
helperText: y,
|
|
88
88
|
helperTextPersistent: M,
|
|
89
89
|
options: r,
|
|
90
90
|
valid: !B,
|
|
@@ -113,7 +113,7 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_1qcz0_1",
|
|
|
113
113
|
}
|
|
114
114
|
),
|
|
115
115
|
/* @__PURE__ */ o(
|
|
116
|
-
|
|
116
|
+
J,
|
|
117
117
|
{
|
|
118
118
|
id: s,
|
|
119
119
|
noArrow: !0,
|
|
@@ -121,7 +121,7 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_1qcz0_1",
|
|
|
121
121
|
delayShow: 420,
|
|
122
122
|
className: t.tooltip,
|
|
123
123
|
hidden: !d || d.length === 0 || !l.fixedHeightInput,
|
|
124
|
-
children: /* @__PURE__ */ o(
|
|
124
|
+
children: /* @__PURE__ */ o(Q, { value: d, textKey: u, valueKey: n })
|
|
125
125
|
}
|
|
126
126
|
)
|
|
127
127
|
] });
|