@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 a, f as m } from "../../../react.esm-
|
|
2
|
+
import { a as s, s as a, f as m } from "../../../react.esm-FR1-H8iU.js";
|
|
3
3
|
import { FormDatePicker as c } from "./FormDatePicker.js";
|
|
4
|
-
import { v as e, d as f, t as l, g as r } from "../../../vi.
|
|
4
|
+
import { v as e, d as f, t as l, g as r } from "../../../vi.CjhMlMwf-DWv7vrn7.js";
|
|
5
5
|
const i = e.fn();
|
|
6
6
|
e.mock("react-hook-form", () => ({
|
|
7
7
|
...e.importActual("react-hook-form"),
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
+
import "../../../assets/CustomTextField.css";
|
|
1
2
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { Textfield as
|
|
3
|
-
import { get as
|
|
3
|
+
import { Textfield as d } from "@element/react-components";
|
|
4
|
+
import { get as u } from "lodash";
|
|
4
5
|
import { useMemo as f } from "react";
|
|
5
6
|
import { useFormContext as g } from "react-hook-form";
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
const v = "_invalid_1dsbr_1", c = {
|
|
8
|
+
invalid: v
|
|
9
|
+
}, C = ({ ...e }) => {
|
|
8
10
|
const {
|
|
9
11
|
getFieldState: r,
|
|
10
|
-
formState: { errors:
|
|
12
|
+
formState: { errors: a },
|
|
11
13
|
trigger: i,
|
|
12
|
-
watch:
|
|
13
|
-
} = g(),
|
|
14
|
-
if (!(!
|
|
14
|
+
watch: l
|
|
15
|
+
} = g(), n = l(e.propertyName), o = f(() => {
|
|
16
|
+
if (!(!n || e.value === null))
|
|
15
17
|
return e.value;
|
|
16
|
-
}, [
|
|
18
|
+
}, [n, e.value]);
|
|
17
19
|
return /* @__PURE__ */ m(
|
|
18
|
-
|
|
20
|
+
d,
|
|
19
21
|
{
|
|
20
22
|
...e,
|
|
21
|
-
value:
|
|
23
|
+
value: o,
|
|
22
24
|
"data-testid": `numeric-field-${e.propertyName}`,
|
|
23
25
|
fullWidth: !0,
|
|
24
26
|
inputMode: "decimal",
|
|
@@ -30,11 +32,11 @@ const s = ({ ...e }) => {
|
|
|
30
32
|
e.onChange?.(t), e.additionalTrigger === "onChange" && i(e.propertyName);
|
|
31
33
|
},
|
|
32
34
|
valid: !r(e.propertyName).invalid,
|
|
33
|
-
helperTextPersistent:
|
|
34
|
-
className: r(e.propertyName).invalid ?
|
|
35
|
+
helperTextPersistent: u(a, e.propertyName) !== void 0 || e.helperTextPersistent,
|
|
36
|
+
className: r(e.propertyName).invalid ? c.invalid : ""
|
|
35
37
|
}
|
|
36
38
|
);
|
|
37
39
|
};
|
|
38
40
|
export {
|
|
39
|
-
|
|
41
|
+
C as CustomTextField
|
|
40
42
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { g as p } from "../../../get-
|
|
2
|
+
import { g as p } from "../../../get-BiqanC9_.js";
|
|
3
3
|
import { useMemo as h } from "react";
|
|
4
4
|
import { useFormContext as S, Controller as T } from "react-hook-form";
|
|
5
|
-
import { N as g } from "../../../react-number-format.es-
|
|
5
|
+
import { N as g } from "../../../react-number-format.es-BD3_OvMU.js";
|
|
6
6
|
import { useDecimalSeparator as y, useThousandSeparator as F } from "../../../services/NumberService.js";
|
|
7
7
|
import { CustomTextField as V } from "./CustomTextField.js";
|
|
8
8
|
const B = ({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { a, s as n } from "../../../react.esm-
|
|
2
|
+
import { a, s as n } from "../../../react.esm-FR1-H8iU.js";
|
|
3
3
|
import { FormNumber as s } from "./FormNumber.js";
|
|
4
|
-
import { v as e, d as m, t as f, g as r } from "../../../vi.
|
|
5
|
-
const
|
|
4
|
+
import { v as e, d as m, t as f, g as r } from "../../../vi.CjhMlMwf-DWv7vrn7.js";
|
|
5
|
+
const u = e.fn();
|
|
6
6
|
e.mock("react-hook-form", () => ({
|
|
7
7
|
...e.importActual("react-hook-form"),
|
|
8
8
|
Controller: ({
|
|
@@ -10,7 +10,7 @@ e.mock("react-hook-form", () => ({
|
|
|
10
10
|
}) => t({
|
|
11
11
|
field: {
|
|
12
12
|
ref: void 0,
|
|
13
|
-
onChange:
|
|
13
|
+
onChange: u,
|
|
14
14
|
value: 12345
|
|
15
15
|
},
|
|
16
16
|
formState: { defaultValue: { "de-DE": 234 } }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { a as s, s as t, f as m } from "../../../react.esm-
|
|
2
|
+
import { a as s, s as t, f as m } from "../../../react.esm-FR1-H8iU.js";
|
|
3
3
|
import { FormRadio as l } from "./FormRadio.js";
|
|
4
|
-
import { v as e, d as c, t as i, g as o } from "../../../vi.
|
|
4
|
+
import { v as e, d as c, t as i, g as o } from "../../../vi.CjhMlMwf-DWv7vrn7.js";
|
|
5
5
|
const r = e.fn();
|
|
6
6
|
e.mock("react-hook-form", () => ({
|
|
7
7
|
...e.importActual("react-hook-form"),
|
|
@@ -4,7 +4,7 @@ import { FieldPath, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
|
4
4
|
/**
|
|
5
5
|
* a generic FormSelector property type. the generic T represents the interface, which is used in the form, like {@link CreateOrganizationDto}
|
|
6
6
|
*/
|
|
7
|
-
type FormSelectProps<T extends FieldValues> = Omit<SelectProps, 'className' | 'clearable' | 'disabled' | '
|
|
7
|
+
type FormSelectProps<T extends FieldValues> = Omit<SelectProps, 'className' | 'clearable' | 'disabled' | 'helperTextPersistent' | 'hidden' | 'hoisted' | 'label' | 'menuMaxHeight' | 'multi' | 'multiSelect' | 'options' | 'searchable' | 'textKey' | 'valid' | 'value' | 'valueKey' | 'variant'> & {
|
|
8
8
|
/** the name of the property in the form */
|
|
9
9
|
propertyName: Path<T>;
|
|
10
10
|
/** the label of the select */
|
|
@@ -1,130 +1,137 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import "../../../assets/FormSelect.css";
|
|
2
|
+
import { jsx as l, Fragment as I, jsxs as G } from "react/jsx-runtime";
|
|
3
|
+
import { Select as J } from "@element/react-components";
|
|
4
|
+
import { g as p } from "../../../get-BiqanC9_.js";
|
|
5
|
+
import { i as Q } from "../../../isArray-C_5XvIlE.js";
|
|
6
|
+
import { useEffect as R, useMemo as $ } from "react";
|
|
7
|
+
import { useFormContext as U, Controller as w } from "react-hook-form";
|
|
8
|
+
import { H as W } from "../../../react-tooltip.min-c2wVkjF2.js";
|
|
9
|
+
import { useHelperText as X } from "../../../hooks/useHelperText.js";
|
|
10
|
+
import { SelectTooltipText as Y } from "./SelectTooltipText.js";
|
|
11
|
+
const Z = "_invalidHelperText_ht9kd_1", y = "_invalidBorder_ht9kd_5", N = "_invalidPlaceholder_ht9kd_9", K = "_invalidDropdownIcon_ht9kd_13", ee = "_formSelectContainer_ht9kd_18", te = "_formSelect_ht9kd_18", ie = "_multiText_ht9kd_44", le = "_tooltip_ht9kd_53", ne = "_disabled_ht9kd_58", t = {
|
|
12
|
+
invalidHelperText: Z,
|
|
13
|
+
invalidBorder: y,
|
|
14
|
+
invalidPlaceholder: N,
|
|
15
|
+
invalidDropdownIcon: K,
|
|
16
|
+
formSelectContainer: ee,
|
|
17
|
+
formSelect: te,
|
|
18
|
+
multiText: ie,
|
|
19
|
+
tooltip: le,
|
|
20
|
+
disabled: ne
|
|
21
|
+
}, ue = ({
|
|
22
|
+
propertyName: i,
|
|
23
|
+
label: h,
|
|
24
|
+
options: r,
|
|
25
|
+
multi: a = !1,
|
|
26
|
+
disabled: T = !1,
|
|
27
|
+
hoisted: _ = !1,
|
|
28
|
+
hidden: B = !1,
|
|
29
|
+
valueKey: n = "value",
|
|
30
|
+
textKey: v = "text",
|
|
31
|
+
clearable: D = !1,
|
|
32
|
+
searchable: F = !0,
|
|
33
|
+
noOptionsMessage: b = "",
|
|
34
|
+
rules: u,
|
|
24
35
|
menuPosition: d = "auto",
|
|
25
|
-
...
|
|
36
|
+
...o
|
|
26
37
|
}) => {
|
|
27
38
|
const {
|
|
28
|
-
control:
|
|
29
|
-
getFieldState:
|
|
30
|
-
formState: { errors:
|
|
31
|
-
} =
|
|
32
|
-
|
|
33
|
-
if (!(!
|
|
34
|
-
const
|
|
35
|
-
|
|
39
|
+
control: C,
|
|
40
|
+
getFieldState: E,
|
|
41
|
+
formState: { errors: g, isValidating: k }
|
|
42
|
+
} = U(), c = CSS.escape(i) + "-select-container", M = '[id="' + CSS.escape(c) + '"]';
|
|
43
|
+
R(() => {
|
|
44
|
+
if (!(!_ || d === "auto") && !document.getElementById(c)) {
|
|
45
|
+
const s = document.createElement("div");
|
|
46
|
+
s.id = c, s.classList.add(d), document.body.appendChild(s);
|
|
36
47
|
}
|
|
37
|
-
}, [
|
|
38
|
-
const q =
|
|
39
|
-
() => !
|
|
40
|
-
[
|
|
41
|
-
),
|
|
42
|
-
() =>
|
|
43
|
-
[
|
|
44
|
-
),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
return O;
|
|
53
|
-
};
|
|
54
|
-
return w ? /* @__PURE__ */ n(M, { name: t, control: I, render: () => /* @__PURE__ */ n(E, {}) }) : /* @__PURE__ */ n(
|
|
48
|
+
}, [_, d, c]);
|
|
49
|
+
const q = $(
|
|
50
|
+
() => !k && p(g, i) !== void 0,
|
|
51
|
+
[g, i, k]
|
|
52
|
+
), j = $(
|
|
53
|
+
() => u?.required?.message,
|
|
54
|
+
[u]
|
|
55
|
+
), { helperText: A, helperTextPersistent: P } = X({
|
|
56
|
+
propertyName: i,
|
|
57
|
+
helperText: o.helperText,
|
|
58
|
+
requiredText: j,
|
|
59
|
+
hasCharacterCount: !1
|
|
60
|
+
});
|
|
61
|
+
return B ? /* @__PURE__ */ l(w, { name: i, control: C, render: () => /* @__PURE__ */ l(I, {}) }) : /* @__PURE__ */ l(
|
|
55
62
|
"div",
|
|
56
63
|
{
|
|
57
64
|
"data-testid": "form-select-container",
|
|
58
|
-
className:
|
|
59
|
-
"data-tooltip-id":
|
|
60
|
-
children: /* @__PURE__ */
|
|
61
|
-
|
|
65
|
+
className: t.formSelectContainer,
|
|
66
|
+
"data-tooltip-id": h,
|
|
67
|
+
children: /* @__PURE__ */ l(
|
|
68
|
+
w,
|
|
62
69
|
{
|
|
63
|
-
name:
|
|
64
|
-
rules:
|
|
65
|
-
control:
|
|
66
|
-
render: ({ field: { ref:
|
|
67
|
-
let
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
(e) =>
|
|
71
|
-
) :
|
|
72
|
-
${
|
|
73
|
-
${
|
|
74
|
-
${
|
|
75
|
-
${
|
|
76
|
-
${
|
|
77
|
-
${
|
|
78
|
-
${
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
|
|
70
|
+
name: i,
|
|
71
|
+
rules: u,
|
|
72
|
+
control: C,
|
|
73
|
+
render: ({ field: { ref: s, onChange: x, value: H, ...L } }) => {
|
|
74
|
+
let S = r;
|
|
75
|
+
Q(r) && p(r[0], "options") !== void 0 && (S = r.flatMap((e) => p(e, "options") ?? []));
|
|
76
|
+
const f = a ? S?.filter(
|
|
77
|
+
(e) => H?.includes(e[n])
|
|
78
|
+
) : S?.find((e) => e[n] === H), O = a && o.multiDisplayType === "text" && o.fixedHeightInput, m = E(i).invalid, V = `
|
|
79
|
+
${t.formSelect}
|
|
80
|
+
${m ? t.invalidHelperText : ""}
|
|
81
|
+
${m ? t.invalidDropdownIcon : ""}
|
|
82
|
+
${m ? t.invalidBorder : ""}
|
|
83
|
+
${m ? t.invalidPlaceholder : ""}
|
|
84
|
+
${O ? t.multiText : ""}
|
|
85
|
+
${T ? t.disabled : ""}`;
|
|
86
|
+
return /* @__PURE__ */ G(I, { children: [
|
|
87
|
+
/* @__PURE__ */ l(
|
|
88
|
+
J,
|
|
82
89
|
{
|
|
83
|
-
...
|
|
84
|
-
...
|
|
85
|
-
value:
|
|
86
|
-
label:
|
|
90
|
+
...L,
|
|
91
|
+
...o,
|
|
92
|
+
value: f ?? [],
|
|
93
|
+
label: h,
|
|
87
94
|
variant: "outlined",
|
|
88
|
-
helperText:
|
|
89
|
-
helperTextPersistent:
|
|
90
|
-
options:
|
|
95
|
+
helperText: A,
|
|
96
|
+
helperTextPersistent: P,
|
|
97
|
+
options: r,
|
|
91
98
|
valid: !q,
|
|
92
|
-
"data-testid": `select-${
|
|
93
|
-
multiSelect:
|
|
94
|
-
className:
|
|
95
|
-
disabled:
|
|
96
|
-
valueKey:
|
|
97
|
-
textKey:
|
|
99
|
+
"data-testid": `select-${i}`,
|
|
100
|
+
multiSelect: a,
|
|
101
|
+
className: V,
|
|
102
|
+
disabled: T,
|
|
103
|
+
valueKey: n,
|
|
104
|
+
textKey: v,
|
|
98
105
|
onChange: (e) => {
|
|
99
106
|
if (e == null) {
|
|
100
|
-
|
|
107
|
+
x(e);
|
|
101
108
|
return;
|
|
102
109
|
}
|
|
103
|
-
if (
|
|
104
|
-
|
|
110
|
+
if (a) {
|
|
111
|
+
x(e.map((z) => z[n]));
|
|
105
112
|
return;
|
|
106
113
|
}
|
|
107
|
-
|
|
114
|
+
x(e[n]), o?.onChange?.(e);
|
|
108
115
|
},
|
|
109
|
-
hoisted:
|
|
110
|
-
noOptionsMessage:
|
|
111
|
-
searchable:
|
|
112
|
-
clearable:
|
|
116
|
+
hoisted: _,
|
|
117
|
+
noOptionsMessage: b,
|
|
118
|
+
searchable: F,
|
|
119
|
+
clearable: D,
|
|
113
120
|
menuMaxHeight: "15rem",
|
|
114
121
|
menuPosition: d,
|
|
115
|
-
portalContainer: d !== "auto" &&
|
|
122
|
+
portalContainer: d !== "auto" && M
|
|
116
123
|
}
|
|
117
124
|
),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
|
|
125
|
+
/* @__PURE__ */ l(
|
|
126
|
+
W,
|
|
120
127
|
{
|
|
121
|
-
id:
|
|
128
|
+
id: h,
|
|
122
129
|
noArrow: !0,
|
|
123
130
|
place: "bottom",
|
|
124
131
|
delayShow: 420,
|
|
125
|
-
className:
|
|
126
|
-
hidden: !
|
|
127
|
-
children: /* @__PURE__ */
|
|
132
|
+
className: t.tooltip,
|
|
133
|
+
hidden: !f || f.length === 0 || !o.fixedHeightInput,
|
|
134
|
+
children: /* @__PURE__ */ l(Y, { value: f, textKey: v, valueKey: n })
|
|
128
135
|
}
|
|
129
136
|
)
|
|
130
137
|
] });
|
|
@@ -135,5 +142,5 @@ const ne = ({
|
|
|
135
142
|
);
|
|
136
143
|
};
|
|
137
144
|
export {
|
|
138
|
-
|
|
145
|
+
ue as FormSelect
|
|
139
146
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { a, s as t, f as T, w as p } from "../../../react.esm-
|
|
3
|
-
import { u as B } from "../../../index-
|
|
2
|
+
import { a, s as t, f as T, w as p } from "../../../react.esm-FR1-H8iU.js";
|
|
3
|
+
import { u as B } from "../../../index-DzM8o582.js";
|
|
4
4
|
import { FormSelect as i } from "./FormSelect.js";
|
|
5
5
|
import { SelectTooltipText as d } from "./SelectTooltipText.js";
|
|
6
|
-
import { v as n, d as f, t as u, g as e } from "../../../vi.
|
|
6
|
+
import { v as n, d as f, t as u, g as e } from "../../../vi.CjhMlMwf-DWv7vrn7.js";
|
|
7
7
|
const g = n.fn();
|
|
8
8
|
n.mock("react-hook-form", () => ({
|
|
9
9
|
...n.importActual("react-hook-form"),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Group as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Group as t, TypoBody as d } from "@element/react-components";
|
|
3
|
+
const f = ({ value: r, textKey: e, valueKey: o }) => {
|
|
4
4
|
if (!(!r || r.length === 0))
|
|
5
|
-
return Array.isArray(r) ? /* @__PURE__ */
|
|
5
|
+
return Array.isArray(r) ? /* @__PURE__ */ n(t, { direction: "vertical", gap: "dense", children: r?.map((i) => /* @__PURE__ */ n(d, { level: 2, children: i[e] }, i[o])) }) : r?.[e];
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
f as SelectTooltipText
|
|
9
9
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { a, s as n } from "../../../react.esm-
|
|
2
|
+
import { a, s as n } from "../../../react.esm-FR1-H8iU.js";
|
|
3
3
|
import { FormSlider as l } from "./FormSlider.js";
|
|
4
|
-
import { v as e, d as m, t as i, g as r } from "../../../vi.
|
|
4
|
+
import { v as e, d as m, t as i, g as r } from "../../../vi.CjhMlMwf-DWv7vrn7.js";
|
|
5
5
|
const o = e.fn();
|
|
6
6
|
e.mock("react-hook-form", () => ({
|
|
7
7
|
...e.importActual("react-hook-form"),
|