@hortiview/shared-components 0.0.11176 → 0.0.11587
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/README.md +58 -8
- package/dist/BigLoadingSpinner-iegTbDcD.js +16 -0
- package/dist/GenericCard-6J558OgP.js +350 -0
- package/dist/ListAreaService-DOwtdRa4.js +109 -0
- package/dist/_MapCache-B75yWNNd.js +376 -0
- package/dist/_baseIsEqual-D0Dsajdb.js +317 -0
- package/dist/_getTag-BCf9b56Z.js +81 -0
- package/dist/animationframe-EMBh6XeO.js +54 -0
- package/dist/assets/HashTabView.css +1 -1
- package/dist/assets/Select.css +1 -0
- package/dist/component-DsB0poTj.js +571 -0
- package/dist/component-neHBNHRu.js +114 -0
- package/dist/components/AlertBanner/AlertBanner.d.ts +0 -1
- package/dist/components/AlertBanner/AlertBanner.js +15 -15
- package/dist/components/AlertBanner/AlertBanner.test.js +11 -9
- package/dist/components/BaseView/BaseView.d.ts +1 -1
- package/dist/components/BaseView/BaseView.js +27 -28
- package/dist/components/BaseView/BaseView.test.js +25 -25
- package/dist/components/BasicHeading/BasicHeading.d.ts +1 -0
- package/dist/components/BasicHeading/BasicHeading.js +17 -17
- package/dist/components/BasicHeading/BasicHeading.test.js +10 -10
- package/dist/components/BlockView/BlockView.d.ts +1 -0
- package/dist/components/BlockView/BlockView.js +24 -25
- package/dist/components/BlockView/BlockView.test.js +2 -2
- package/dist/components/ChipCard/ChipCard.js +1765 -15
- package/dist/components/ChipCard/ChipCard.test.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.d.ts +3 -2
- package/dist/components/ContextMenu/ContextMenu.js +28 -28
- package/dist/components/ContextMenu/ContextMenu.test.js +2 -2
- package/dist/components/DeleteModal/DeleteModal.d.ts +0 -1
- package/dist/components/DeleteModal/DeleteModal.js +53 -51
- package/dist/components/DeleteModal/DeleteModal.test.js +2 -2
- package/dist/components/Disclaimer/Disclaimer.js +12 -11
- package/dist/components/Disclaimer/Disclaimer.test.js +2 -2
- package/dist/components/EmptyView/EmptyView.d.ts +1 -0
- package/dist/components/EmptyView/EmptyView.js +258 -19
- package/dist/components/EmptyView/EmptyView.test.js +2 -2
- package/dist/components/Filter/Filter.d.ts +1 -0
- package/dist/components/Filter/Filter.js +81 -77
- package/dist/components/Filter/Filter.test.js +2 -2
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.d.ts +1 -0
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +13 -11
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +2 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +3 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5975 -6389
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +2 -2
- package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +2 -1
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +13 -14
- package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +2 -1
- 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.d.ts +1 -0
- package/dist/components/FormComponents/FormRadio/FormRadio.js +4 -4
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +2 -2
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +4 -7
- package/dist/components/FormComponents/FormSelect/FormSelect.js +100 -110
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +3 -3
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.d.ts +1 -0
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -5
- package/dist/components/FormComponents/FormSlider/FormSlider.d.ts +1 -0
- package/dist/components/FormComponents/FormSlider/FormSlider.js +1155 -27
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +2 -2
- package/dist/components/FormComponents/FormText/FormText.d.ts +2 -1
- package/dist/components/FormComponents/FormText/FormText.js +28 -28
- package/dist/components/FormComponents/FormText/FormText.test.js +13 -13
- package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +2 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +17 -15
- package/dist/components/FormComponents/FormToggle/FormToggle.test.js +2 -2
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.d.ts +2 -1
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
- package/dist/components/GenericTable/GenericTable.d.ts +1 -0
- package/dist/components/GenericTable/GenericTable.js +10487 -76
- package/dist/components/GenericTable/GenericTable.test.js +2 -2
- package/dist/components/GenericTable/GenericTableService.d.ts +1 -0
- package/dist/components/GenericTable/GenericTableService.js +41 -41
- package/dist/components/GenericTable/Mobile/GenericCard.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -3
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +3 -3
- package/dist/components/GenericTable/Mobile/GenericCardList.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -8
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +2 -2
- package/dist/components/HashTabView/HashTabView.d.ts +6 -1
- package/dist/components/HashTabView/HashTabView.js +1805 -72
- package/dist/components/HashTabView/HashTabView.test.js +2 -2
- package/dist/components/HeaderFilter/HeaderFilter.d.ts +3 -2
- package/dist/components/HeaderFilter/HeaderFilter.js +14 -14
- package/dist/components/HeaderFilter/HeaderFilter.test.js +2 -2
- package/dist/components/HealthCheckFailed/HealthCheckFailed.js +19 -17
- package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +2 -2
- package/dist/components/Iconify/Iconify.d.ts +2 -3
- package/dist/components/Iconify/Iconify.js +44 -45
- package/dist/components/Iconify/Iconify.test.js +2 -2
- package/dist/components/InfoGroup/InfoGroup.d.ts +4 -3
- package/dist/components/InfoGroup/InfoGroup.js +30 -29
- package/dist/components/InfoGroup/InfoGroup.test.js +2 -2
- package/dist/components/ListArea/ListArea.d.ts +1 -1
- package/dist/components/ListArea/ListArea.js +29 -27
- package/dist/components/ListArea/ListArea.test.js +5 -5
- package/dist/components/ListArea/ListAreaService.d.ts +9 -8
- package/dist/components/ListArea/ListAreaService.js +7 -5
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -3
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +506 -38
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +2 -2
- package/dist/components/Modal/Modal.d.ts +2 -1
- package/dist/components/Modal/Modal.js +926 -10
- package/dist/components/ModulePadding/ModulePadding.d.ts +7 -0
- package/dist/components/ModulePadding/ModulePadding.js +28 -0
- package/dist/components/ModulePadding/ModulePadding.test.d.ts +1 -0
- package/dist/components/ModulePadding/ModulePadding.test.js +22 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +0 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +13 -14
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +4 -4
- package/dist/components/Scrollbar/Scrollbar.js +5 -6
- package/dist/components/Scrollbar/scrollbar.test.js +2 -2
- package/dist/components/SearchBar/SearchBar.js +11 -11
- package/dist/components/SearchBar/SearchBar.test.js +2 -2
- package/dist/components/Select/Select.d.ts +14 -0
- package/dist/components/Select/Select.js +34 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/Select/Select.test.js +28 -0
- package/dist/components/VerticalDivider/VerticalDivider.js +4 -5
- package/dist/components/VerticalDivider/VerticalDivider.test.js +2 -2
- package/dist/floating-ui.dom-CeD8zknG.js +978 -0
- package/dist/get-7ACccM2X.js +114 -0
- package/dist/{get-BiqanC9_.js → get-DFv1gXfq.js} +1 -1
- package/dist/hooks/useBreakpoints.test.js +2 -2
- package/dist/hooks/useHelperText.d.ts +1 -0
- package/dist/hooks/useHelperText.js +1 -1
- package/dist/identity-DLWZln-X.js +1763 -0
- package/dist/{index-DzM8o582.js → index-CrcXCSzI.js} +1940 -1796
- package/dist/index.es-0lQcz8m1.js +444 -0
- package/dist/index.es-25EARqhH.js +2027 -0
- package/dist/index.es-3043KTnb.js +1066 -0
- package/dist/index.es-41ztjcFT.js +724 -0
- package/dist/index.es-6TJ1S8Jr.js +954 -0
- package/dist/index.es-8GOVkuo-.js +374 -0
- package/dist/index.es-B-_jXDuz.js +216 -0
- package/dist/index.es-BWgXLqXn.js +102 -0
- package/dist/index.es-BtjV0oNv.js +360 -0
- package/dist/index.es-BvrQnJ3j.js +509 -0
- package/dist/index.es-CF_xy2ns.js +674 -0
- package/dist/index.es-CL_Heu1n.js +54 -0
- package/dist/index.es-CiqbARoC.js +306 -0
- package/dist/index.es-D-CKRzIB.js +63 -0
- package/dist/index.es-D6N-XWHe.js +56 -0
- package/dist/index.es-DKDgy7Kt.js +45 -0
- package/dist/index.es-DntoATwO.js +159 -0
- package/dist/index.es-UHKFl8Da.js +7075 -0
- package/dist/index.es-d5xhUpJZ.js +3242 -0
- package/dist/index.es-da0cf7oE.js +569 -0
- package/dist/index.es-h2lMdt7G.js +107 -0
- package/dist/index.es-zr101OF5.js +4853 -0
- package/dist/{isArray-2zMxXFEr.js → isArray-DN9s620O.js} +3 -3
- package/dist/{isArray-C_5XvIlE.js → isArray-Dub1wGJM.js} +1 -1
- package/dist/isEmpty-B4GG2s-V.js +31 -0
- package/dist/isPlainObject-C273y67K.js +40 -0
- package/dist/isString-BW9UHONv.js +21 -0
- package/dist/keyboard-Bpt0aBqQ.js +107 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +58 -54
- package/dist/orderBy-Bd48bw88.js +316 -0
- package/dist/{react-number-format.es-BD3_OvMU.js → react-number-format.es-BK1EpVXq.js} +151 -151
- package/dist/react-tooltip.min-DSY6KDqS.js +431 -0
- package/dist/{react.esm-FR1-H8iU.js → react.esm-DNwojocF.js} +5289 -4990
- package/dist/services/BlockService.d.ts +1 -0
- package/dist/services/NumberService.d.ts +1 -0
- package/dist/services/UtilService.d.ts +1 -0
- package/dist/services/UtilService.js +2 -2
- package/dist/services/services.test.js +1 -1
- package/dist/toString-CrgB_7Pe.js +54 -0
- package/dist/tslib.es6-BDCynO9F.js +162 -0
- package/dist/types/GenericTable.d.ts +2 -2
- package/dist/types/HashTab.d.ts +0 -1
- package/dist/types/ListElement.d.ts +0 -1
- package/dist/types/internal/ReactRouterTypes.d.ts +0 -1
- package/dist/uniqueId-NU3-C36A.js +18 -0
- package/dist/util-DA21pZXj.js +78 -0
- package/dist/{vi.CjhMlMwf-DWv7vrn7.js → vi.CjhMlMwf-BCJNwXvu.js} +1 -1
- package/package.json +15 -15
- package/dist/BigLoadingSpinner-C3wTbTD0.js +0 -17
- package/dist/GenericCard-B8x1DMa8.js +0 -81
- package/dist/ListAreaService-CRX4eEUJ.js +0 -108
- package/dist/_Map-Dtlps7IZ.js +0 -113
- package/dist/_overArg-_0pUmCsX.js +0 -14
- package/dist/get-P-5PYZOE.js +0 -426
- package/dist/isEmpty-BimaZd5G.js +0 -225
- package/dist/isString-BOHPtrlm.js +0 -44
- package/dist/orderBy-BVQIswlJ.js +0 -765
- package/dist/react-tooltip.min-c2wVkjF2.js +0 -1354
|
@@ -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-DNwojocF.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.CjhMlMwf-
|
|
4
|
+
import { v as e, d as m, t as i, g as r } from "../../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
const o = e.fn();
|
|
6
6
|
e.mock("react-hook-form", () => ({
|
|
7
7
|
...e.importActual("react-hook-form"),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { TextfieldProps } from '@element/react-
|
|
1
|
+
import { TextfieldProps } from '@element-public/react-textfield';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { FieldPath, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* a generic FormText property type. the generic T represents the interface, which is used in the form, like {@link CreateOrganizationDto}
|
|
6
7
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../../../assets/FormText.css";
|
|
2
1
|
import { jsx as t, Fragment as F, jsxs as D } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { T as G } from "../../../index.es-25EARqhH.js";
|
|
3
|
+
import { a as I } from "../../../index.es-CF_xy2ns.js";
|
|
4
|
+
import { g as J } from "../../../get-DFv1gXfq.js";
|
|
5
5
|
import { useState as q, useCallback as K, useMemo as T, useEffect as O } from "react";
|
|
6
6
|
import { useFormContext as Q, Controller as H } from "react-hook-form";
|
|
7
7
|
import { useHelperText as U } from "../../../hooks/useHelperText.js";
|
|
8
|
-
const X = "_formTextAreaHelperText_168p8_1", Y = "_invalid_168p8_7", Z = "_required_168p8_11", N = "_formTextArea_168p8_1", y = "_characterCount_168p8_25", p = "_withoutCharacterCount_168p8_31",
|
|
8
|
+
import '../../../assets/FormText.css';const X = "_formTextAreaHelperText_168p8_1", Y = "_invalid_168p8_7", Z = "_required_168p8_11", N = "_formTextArea_168p8_1", y = "_characterCount_168p8_25", p = "_withoutCharacterCount_168p8_31", n = {
|
|
9
9
|
formTextAreaHelperText: X,
|
|
10
10
|
invalid: Y,
|
|
11
11
|
required: Z,
|
|
@@ -14,28 +14,28 @@ const X = "_formTextAreaHelperText_168p8_1", Y = "_invalid_168p8_7", Z = "_requi
|
|
|
14
14
|
withoutCharacterCount: p
|
|
15
15
|
}, ee = ({
|
|
16
16
|
count: e,
|
|
17
|
-
maxCount:
|
|
18
|
-
invalid:
|
|
19
|
-
hasRequiredText:
|
|
17
|
+
maxCount: s,
|
|
18
|
+
invalid: u = !1,
|
|
19
|
+
hasRequiredText: r = !1
|
|
20
20
|
}) => /* @__PURE__ */ t(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
23
|
"data-testid": "character-counter-container",
|
|
24
|
-
className: `${
|
|
25
|
-
children: /* @__PURE__ */ t(I, { children: `${e}/${
|
|
24
|
+
className: `${n.formTextAreaHelperText} ${u ? n.invalid : ""} ${r ? n.required : ""}`,
|
|
25
|
+
children: /* @__PURE__ */ t(I, { children: `${e}/${s}` })
|
|
26
26
|
}
|
|
27
|
-
),
|
|
27
|
+
), ue = (e) => e.textarea ? /* @__PURE__ */ t(te, { ...e }) : /* @__PURE__ */ t(re, { ...e }), te = (e) => /* @__PURE__ */ t("div", { "data-testid": "form-text-area", className: n.formTextArea, children: /* @__PURE__ */ t(L, { ...e }) }), re = (e) => /* @__PURE__ */ t(
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
30
|
"data-testid": "form-text-field",
|
|
31
|
-
className: `${e.hasCharacterCount ?
|
|
31
|
+
className: `${e.hasCharacterCount ? n.characterCount : n.withoutCharacterCount}`,
|
|
32
32
|
children: /* @__PURE__ */ t(L, { ...e })
|
|
33
33
|
}
|
|
34
34
|
), L = ({
|
|
35
35
|
propertyName: e,
|
|
36
|
-
label:
|
|
37
|
-
disabled:
|
|
38
|
-
textarea:
|
|
36
|
+
label: s,
|
|
37
|
+
disabled: u = !1,
|
|
38
|
+
textarea: r = !1,
|
|
39
39
|
hasCharacterCount: c = !1,
|
|
40
40
|
hidden: w = !1,
|
|
41
41
|
placeholder: B,
|
|
@@ -47,17 +47,17 @@ const X = "_formTextAreaHelperText_168p8_1", Y = "_invalid_168p8_7", Z = "_requi
|
|
|
47
47
|
rules: a,
|
|
48
48
|
...i
|
|
49
49
|
}) => {
|
|
50
|
-
const { control: g, getFieldState: d, trigger: v } = Q(), [b,
|
|
50
|
+
const { control: g, getFieldState: d, trigger: v } = Q(), [b, m] = q(0), [o, z] = q(), f = K(
|
|
51
51
|
(h) => {
|
|
52
52
|
if (o != null) {
|
|
53
|
-
|
|
53
|
+
m(o.length);
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
if (h) {
|
|
57
|
-
|
|
57
|
+
m(h.length);
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
m(0);
|
|
61
61
|
},
|
|
62
62
|
[o]
|
|
63
63
|
), l = T(
|
|
@@ -74,11 +74,11 @@ const X = "_formTextAreaHelperText_168p8_1", Y = "_invalid_168p8_7", Z = "_requi
|
|
|
74
74
|
helperText: i.helperText,
|
|
75
75
|
requiredText: _,
|
|
76
76
|
maxLength: l,
|
|
77
|
-
hasCharacterCount:
|
|
77
|
+
hasCharacterCount: r || c
|
|
78
78
|
});
|
|
79
79
|
return O(() => {
|
|
80
|
-
(
|
|
81
|
-
}, [o,
|
|
80
|
+
(r || c) && l !== void 0 && o != null && f();
|
|
81
|
+
}, [o, r, c, l, f]), w ? /* @__PURE__ */ t(H, { name: e, control: g, render: () => /* @__PURE__ */ t(F, {}) }) : /* @__PURE__ */ t(
|
|
82
82
|
H,
|
|
83
83
|
{
|
|
84
84
|
name: e,
|
|
@@ -86,7 +86,7 @@ const X = "_formTextAreaHelperText_168p8_1", Y = "_invalid_168p8_7", Z = "_requi
|
|
|
86
86
|
control: g,
|
|
87
87
|
render: ({ field: { ref: h, ...x }, formState: { defaultValues: V } }) => {
|
|
88
88
|
const A = J(V, e);
|
|
89
|
-
return !o && A && (c ||
|
|
89
|
+
return !o && A && (c || r) && f(A), /* @__PURE__ */ D(F, { children: [
|
|
90
90
|
/* @__PURE__ */ t(
|
|
91
91
|
G,
|
|
92
92
|
{
|
|
@@ -99,14 +99,14 @@ const X = "_formTextAreaHelperText_168p8_1", Y = "_invalid_168p8_7", Z = "_requi
|
|
|
99
99
|
inputMode: k,
|
|
100
100
|
placeholder: B,
|
|
101
101
|
prefixText: j,
|
|
102
|
-
disabled:
|
|
102
|
+
disabled: u,
|
|
103
103
|
helperText: M,
|
|
104
104
|
helperTextPersistent: P,
|
|
105
|
-
label:
|
|
105
|
+
label: s,
|
|
106
106
|
variant: "outlined",
|
|
107
107
|
maxlength: l,
|
|
108
108
|
minLength: E,
|
|
109
|
-
textarea:
|
|
109
|
+
textarea: r,
|
|
110
110
|
noResize: !1,
|
|
111
111
|
onBlur: () => {
|
|
112
112
|
C === "onBlur" && v(e), i.onBlur?.();
|
|
@@ -117,11 +117,11 @@ const X = "_formTextAreaHelperText_168p8_1", Y = "_invalid_168p8_7", Z = "_requi
|
|
|
117
117
|
z(W), C === "onChange" && v(e);
|
|
118
118
|
},
|
|
119
119
|
valid: !d(e).invalid,
|
|
120
|
-
className: `${
|
|
120
|
+
className: `${n.formText} ${d(e).invalid ? n.invalid : ""}`,
|
|
121
121
|
trailingIcon: R
|
|
122
122
|
}
|
|
123
123
|
),
|
|
124
|
-
l !== void 0 && (c ||
|
|
124
|
+
l !== void 0 && (c || r) && /* @__PURE__ */ t(
|
|
125
125
|
ee,
|
|
126
126
|
{
|
|
127
127
|
count: b,
|
|
@@ -136,5 +136,5 @@ const X = "_formTextAreaHelperText_168p8_1", Y = "_invalid_168p8_7", Z = "_requi
|
|
|
136
136
|
);
|
|
137
137
|
};
|
|
138
138
|
export {
|
|
139
|
-
|
|
139
|
+
ue as FormText
|
|
140
140
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { a as s, s as r, f as d } from "../../../react.esm-
|
|
3
|
-
import { FormText as
|
|
4
|
-
import { v as a, d as u, t as
|
|
2
|
+
import { a as s, s as r, f as d } from "../../../react.esm-DNwojocF.js";
|
|
3
|
+
import { FormText as o } from "./FormText.js";
|
|
4
|
+
import { v as a, d as u, t as l, g as e } from "../../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
const m = a.fn();
|
|
6
6
|
a.mock("react-hook-form", () => ({
|
|
7
7
|
...a.importActual("react-hook-form"),
|
|
@@ -43,10 +43,10 @@ a.mock("react-hook-form", () => ({
|
|
|
43
43
|
})
|
|
44
44
|
}));
|
|
45
45
|
u("FormText Test", () => {
|
|
46
|
-
|
|
46
|
+
l("render FormText and return single line text field", () => {
|
|
47
47
|
s(
|
|
48
48
|
/* @__PURE__ */ n(
|
|
49
|
-
|
|
49
|
+
o,
|
|
50
50
|
{
|
|
51
51
|
rules: {
|
|
52
52
|
maxLength: {
|
|
@@ -61,10 +61,10 @@ u("FormText Test", () => {
|
|
|
61
61
|
);
|
|
62
62
|
const t = r.getByRole("textbox");
|
|
63
63
|
e(t).toBeInTheDocument(), e(t).toBeInstanceOf(HTMLInputElement), e(t).toHaveAttribute("maxlength", "100"), e(r.getByText("address.line2")).toBeInTheDocument();
|
|
64
|
-
}),
|
|
64
|
+
}), l("change value of single line text field", () => {
|
|
65
65
|
s(
|
|
66
66
|
/* @__PURE__ */ n(
|
|
67
|
-
|
|
67
|
+
o,
|
|
68
68
|
{
|
|
69
69
|
rules: {
|
|
70
70
|
maxLength: {
|
|
@@ -79,10 +79,10 @@ u("FormText Test", () => {
|
|
|
79
79
|
);
|
|
80
80
|
const t = r.getByRole("textbox");
|
|
81
81
|
e(t).toHaveValue("test"), d.change(t, { target: { value: "test-change" } }), e(m).toHaveBeenCalled();
|
|
82
|
-
}),
|
|
82
|
+
}), l("render FormText and return text area", () => {
|
|
83
83
|
s(
|
|
84
84
|
/* @__PURE__ */ n(
|
|
85
|
-
|
|
85
|
+
o,
|
|
86
86
|
{
|
|
87
87
|
rules: {
|
|
88
88
|
required: {
|
|
@@ -102,10 +102,10 @@ u("FormText Test", () => {
|
|
|
102
102
|
);
|
|
103
103
|
const t = r.getByRole("textbox");
|
|
104
104
|
e(t).toBeInTheDocument(), e(t).toBeInstanceOf(HTMLTextAreaElement), e(t).toHaveAttribute("maxlength", "200"), e(r.getByText("address.line1")).toBeInTheDocument(), e(r.getByText("required")).toBeInTheDocument();
|
|
105
|
-
}),
|
|
105
|
+
}), l("render FormText with maxLength indicator", () => {
|
|
106
106
|
s(
|
|
107
107
|
/* @__PURE__ */ n(
|
|
108
|
-
|
|
108
|
+
o,
|
|
109
109
|
{
|
|
110
110
|
rules: {
|
|
111
111
|
maxLength: {
|
|
@@ -119,10 +119,10 @@ u("FormText Test", () => {
|
|
|
119
119
|
}
|
|
120
120
|
)
|
|
121
121
|
), e(r.getByText("address.line1")).toBeInTheDocument(), e(r.queryByText("required")).not.toBeInTheDocument(), e(r.getByText("0/200")).toBeInTheDocument();
|
|
122
|
-
}),
|
|
122
|
+
}), l("change value of text area", () => {
|
|
123
123
|
s(
|
|
124
124
|
/* @__PURE__ */ n(
|
|
125
|
-
|
|
125
|
+
o,
|
|
126
126
|
{
|
|
127
127
|
rules: {
|
|
128
128
|
required: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { SwitchProps } from '@element/react-
|
|
1
|
+
import { SwitchProps } from '@element-public/react-switch';
|
|
2
2
|
import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
|
|
3
4
|
type FormToggleProps<T extends FieldValues> = {
|
|
4
5
|
/** The name of the property that this toggle represents. */
|
|
5
6
|
propertyName: Path<T>;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { G as h } from "../../../index.es-DntoATwO.js";
|
|
3
|
+
import { S as l } from "../../../index.es-8GOVkuo-.js";
|
|
4
|
+
import { a as d } from "../../../index.es-CF_xy2ns.js";
|
|
3
5
|
import { useFormContext as u, Controller as C } from "react-hook-form";
|
|
4
|
-
const
|
|
6
|
+
const F = ({
|
|
5
7
|
propertyName: t,
|
|
6
8
|
label: n,
|
|
7
|
-
validate:
|
|
8
|
-
required:
|
|
9
|
-
onChange:
|
|
10
|
-
disabled:
|
|
9
|
+
validate: m,
|
|
10
|
+
required: s,
|
|
11
|
+
onChange: a,
|
|
12
|
+
disabled: c
|
|
11
13
|
}) => {
|
|
12
14
|
const { control: i } = u();
|
|
13
15
|
return /* @__PURE__ */ o(
|
|
@@ -16,21 +18,21 @@ const v = ({
|
|
|
16
18
|
name: t,
|
|
17
19
|
control: i,
|
|
18
20
|
rules: {
|
|
19
|
-
required:
|
|
20
|
-
validate:
|
|
21
|
+
required: s,
|
|
22
|
+
validate: m
|
|
21
23
|
},
|
|
22
|
-
render: ({ field: r, fieldState: e }) => /* @__PURE__ */ h
|
|
24
|
+
render: ({ field: r, fieldState: e }) => /* @__PURE__ */ g(h, { direction: "vertical", children: [
|
|
23
25
|
/* @__PURE__ */ o(
|
|
24
|
-
|
|
26
|
+
l,
|
|
25
27
|
{
|
|
26
28
|
"data-testid": "checkbox",
|
|
27
29
|
...r,
|
|
28
30
|
label: n,
|
|
29
|
-
onChange: (...
|
|
30
|
-
r.onChange(...
|
|
31
|
+
onChange: (...p) => {
|
|
32
|
+
r.onChange(...p), a?.();
|
|
31
33
|
},
|
|
32
34
|
checked: r.value,
|
|
33
|
-
disabled:
|
|
35
|
+
disabled: c
|
|
34
36
|
}
|
|
35
37
|
),
|
|
36
38
|
e.error && /* @__PURE__ */ o(d, { "data-testid": "toggle-error-message", themeColor: "error", children: e.error.message })
|
|
@@ -39,5 +41,5 @@ const v = ({
|
|
|
39
41
|
);
|
|
40
42
|
};
|
|
41
43
|
export {
|
|
42
|
-
|
|
44
|
+
F as FormToggle
|
|
43
45
|
};
|
|
@@ -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-DNwojocF.js";
|
|
3
3
|
import { FormToggle as l } from "./FormToggle.js";
|
|
4
|
-
import { v as e, d as f, t as c, g as r } from "../../../vi.CjhMlMwf-
|
|
4
|
+
import { v as e, d as f, t as c, g as r } from "../../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
const a = e.fn();
|
|
6
6
|
e.mock("react-hook-form", () => ({
|
|
7
7
|
...e.importActual("react-hook-form"),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React,
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
2
|
import { NumericFormatProps } from 'react-number-format';
|
|
3
3
|
import { LANGUAGE_COUNTRY_CODES } from '../../types/Languages';
|
|
4
|
+
|
|
4
5
|
export type FormattedNumberDisplayProps = {
|
|
5
6
|
/**
|
|
6
7
|
* the number to format
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { N as i } from "../../react-number-format.es-
|
|
2
|
+
import { N as i } from "../../react-number-format.es-BK1EpVXq.js";
|
|
3
3
|
import { useDecimalSeparator as d, useThousandSeparator as n } from "../../services/NumberService.js";
|
|
4
4
|
const y = ({
|
|
5
5
|
typographyComponent: a,
|