@hortiview/shared-components 0.0.5871 → 0.0.6044
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/assets/FormText.css +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +4 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +38 -38
- package/dist/components/FormComponents/FormText/FormText.js +92 -86
- package/dist/components/FormComponents/FormText/FormText.test.js +37 -20
- package/dist/components/ListArea/ListArea.js +1 -1
- package/dist/{get-Dyz8NMrE.js → get-BRDhkfK0.js} +77 -74
- package/package.json +1 -1
package/dist/assets/FormText.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._formTextAreaHelperText_1n0bk_1{align-self:flex-end;color:var(--lmnt-helper-text-color);padding-right:1rem}._invalid_1n0bk_6._formTextAreaHelperText_1n0bk_1{color:var(--lmnt-theme-danger)}._required_1n0bk_9._formTextAreaHelperText_1n0bk_1{margin-top:-1.125rem}._invalid_1n0bk_6+*[class*=mdc-text-field-helper-line] *[class*=mdc-text-field-helper-text]{color:var(--lmnt-theme-danger)!important}._formTextArea_1n0bk_1{width:100%;display:flex;flex-flow:column}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../assets/FormDatePicker.css";
|
|
2
2
|
import { jsx as n, jsxs as F } from "react/jsx-runtime";
|
|
3
3
|
import { Datepicker as O, Divider as Y, Padding as b, Button as j } from "@element/react-components";
|
|
4
|
-
import { g as H } from "../../../get-
|
|
4
|
+
import { g as H } from "../../../get-BRDhkfK0.js";
|
|
5
5
|
import { useMemo as a, useState as M } from "react";
|
|
6
6
|
import { useFormContext as Q, Controller as $ } from "react-hook-form";
|
|
7
7
|
const w = "_datePickerContainer_73m8g_1", B = "_invalid_73m8g_5", E = "_fromPickerText_73m8g_9", I = "_datePickerCalendar_73m8g_13", L = "_trailingContent_73m8g_17", c = {
|
|
@@ -25,6 +25,8 @@ type FormSelectProps<T extends FieldValues> = Omit<SelectProps, 'className' | 'c
|
|
|
25
25
|
multi?: boolean;
|
|
26
26
|
/** if true, the select allows the user to clear the selection */
|
|
27
27
|
clearable?: boolean;
|
|
28
|
+
/** if true, the select allows the user to search for options */
|
|
29
|
+
searchable?: boolean;
|
|
28
30
|
/** a message if no options a present */
|
|
29
31
|
noOptionsMessage?: string;
|
|
30
32
|
/**
|
|
@@ -46,6 +48,7 @@ export type FormSelectOption = {
|
|
|
46
48
|
* creates a Select which should be part of a form component.
|
|
47
49
|
* the Select is wrapped by the react hook forms {@link Controller} component.
|
|
48
50
|
* @param clearable if the select allows the user to clear the selection
|
|
51
|
+
* @param searchable if the select allows the user to search for options
|
|
49
52
|
* @param disabled if the select is disabled
|
|
50
53
|
* @param hidden if the select should be hidden
|
|
51
54
|
* @param hoisted if the select should be rendered outside of the parent
|
|
@@ -60,5 +63,5 @@ export type FormSelectOption = {
|
|
|
60
63
|
*
|
|
61
64
|
* @returns
|
|
62
65
|
*/
|
|
63
|
-
export declare const FormSelect: <T extends FieldValues>({ propertyName, label, options, multi, disabled, hoisted, hidden, valueKey, textKey, clearable, noOptionsMessage, rules, ...props }: FormSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export declare const FormSelect: <T extends FieldValues>({ propertyName, label, options, multi, disabled, hoisted, hidden, valueKey, textKey, clearable, searchable, noOptionsMessage, rules, ...props }: FormSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
64
67
|
export {};
|
|
@@ -1,87 +1,87 @@
|
|
|
1
1
|
import "../../../assets/FormSelect.css";
|
|
2
|
-
import { jsx as l, Fragment as
|
|
3
|
-
import { Select as
|
|
4
|
-
import { g as d } from "../../../get-
|
|
2
|
+
import { jsx as l, Fragment as P } from "react/jsx-runtime";
|
|
3
|
+
import { Select as V } from "@element/react-components";
|
|
4
|
+
import { g as d, i as k } from "../../../get-BRDhkfK0.js";
|
|
5
5
|
import { useMemo as u } from "react";
|
|
6
|
-
import { useFormContext as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
formSelectContainer: B
|
|
6
|
+
import { useFormContext as w, Controller as g } from "react-hook-form";
|
|
7
|
+
const z = "_invalid_1vo1h_1", B = "_formSelect_1vo1h_5", D = "_formSelectContainer_1vo1h_9", S = {
|
|
8
|
+
invalid: z,
|
|
9
|
+
formSelect: B,
|
|
10
|
+
formSelectContainer: D
|
|
12
11
|
}, W = ({
|
|
13
12
|
propertyName: r,
|
|
14
13
|
label: h,
|
|
15
14
|
options: t,
|
|
16
15
|
multi: s = !1,
|
|
17
16
|
disabled: C = !1,
|
|
18
|
-
hoisted:
|
|
19
|
-
hidden:
|
|
17
|
+
hoisted: q = !1,
|
|
18
|
+
hidden: T = !1,
|
|
20
19
|
valueKey: n = "value",
|
|
21
|
-
textKey:
|
|
20
|
+
textKey: p = "text",
|
|
22
21
|
clearable: F = !1,
|
|
23
|
-
|
|
22
|
+
searchable: M = !0,
|
|
23
|
+
noOptionsMessage: H = "",
|
|
24
24
|
rules: i,
|
|
25
|
-
|
|
25
|
+
...$
|
|
26
26
|
}) => {
|
|
27
27
|
const {
|
|
28
28
|
control: v,
|
|
29
29
|
formState: { errors: o, isValidating: x }
|
|
30
|
-
} =
|
|
30
|
+
} = w(), a = u(
|
|
31
31
|
() => !x && d(o, r) !== void 0,
|
|
32
32
|
[o, r, x]
|
|
33
|
-
),
|
|
33
|
+
), b = u(
|
|
34
34
|
() => i?.required?.value,
|
|
35
35
|
[i]
|
|
36
|
-
),
|
|
36
|
+
), j = u(
|
|
37
37
|
() => i?.required?.message,
|
|
38
38
|
[i]
|
|
39
|
-
),
|
|
39
|
+
), A = () => {
|
|
40
40
|
if (o && o[r]) {
|
|
41
41
|
const f = o[r]?.message;
|
|
42
42
|
return f || "Invalid input";
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return j;
|
|
45
45
|
};
|
|
46
|
-
return
|
|
46
|
+
return T ? /* @__PURE__ */ l(g, { name: r, control: v, render: () => /* @__PURE__ */ l(P, {}) }) : /* @__PURE__ */ l("div", { className: S.formSelectContainer, children: /* @__PURE__ */ l(
|
|
47
47
|
g,
|
|
48
48
|
{
|
|
49
49
|
name: r,
|
|
50
50
|
rules: i,
|
|
51
51
|
control: v,
|
|
52
|
-
render: ({ field: { ref: f, onChange:
|
|
53
|
-
let
|
|
54
|
-
k(t) && d(t[0], "options") !== void 0 && (
|
|
55
|
-
const
|
|
52
|
+
render: ({ field: { ref: f, onChange: c, value: _, ...E } }) => {
|
|
53
|
+
let m = t;
|
|
54
|
+
k(t) && d(t[0], "options") !== void 0 && (m = t.flatMap((e) => d(e, "options") ?? []));
|
|
55
|
+
const I = s ? m?.filter(
|
|
56
56
|
(e) => _?.includes(e[n])
|
|
57
|
-
) :
|
|
57
|
+
) : m?.find((e) => e[n] === _);
|
|
58
58
|
return /* @__PURE__ */ l(
|
|
59
|
-
|
|
59
|
+
V,
|
|
60
60
|
{
|
|
61
|
-
...
|
|
62
|
-
|
|
63
|
-
value:
|
|
61
|
+
...E,
|
|
62
|
+
...$,
|
|
63
|
+
value: I,
|
|
64
64
|
label: h,
|
|
65
65
|
variant: "outlined",
|
|
66
|
-
helperText:
|
|
67
|
-
helperTextPersistent:
|
|
66
|
+
helperText: A(),
|
|
67
|
+
helperTextPersistent: b || a,
|
|
68
68
|
options: t,
|
|
69
69
|
valid: !a,
|
|
70
70
|
multiSelect: s,
|
|
71
71
|
className: `${S.formSelect} ${a ? S.invalid : ""}`,
|
|
72
72
|
disabled: C,
|
|
73
73
|
valueKey: n,
|
|
74
|
-
textKey:
|
|
74
|
+
textKey: p,
|
|
75
75
|
onChange: (e) => {
|
|
76
76
|
if (e == null)
|
|
77
|
-
return
|
|
77
|
+
return c(e);
|
|
78
78
|
if (s)
|
|
79
|
-
return
|
|
80
|
-
|
|
79
|
+
return c(e.map((O) => O[n]));
|
|
80
|
+
c(e[n]);
|
|
81
81
|
},
|
|
82
|
-
hoisted:
|
|
83
|
-
noOptionsMessage:
|
|
84
|
-
searchable:
|
|
82
|
+
hoisted: q,
|
|
83
|
+
noOptionsMessage: H,
|
|
84
|
+
searchable: M,
|
|
85
85
|
clearable: F,
|
|
86
86
|
menuMaxHeight: "15rem"
|
|
87
87
|
}
|
|
@@ -1,109 +1,115 @@
|
|
|
1
1
|
import "../../../assets/FormText.css";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Textfield as P } from "@element/react-components";
|
|
4
|
-
import { useState as R, useMemo as
|
|
5
|
-
import { useFormContext as V, Controller as
|
|
6
|
-
const W = "
|
|
2
|
+
import { jsx as n, Fragment as h, jsxs as I } from "react/jsx-runtime";
|
|
3
|
+
import { Textfield as M, TypoCaption as P } from "@element/react-components";
|
|
4
|
+
import { useState as R, useMemo as d } from "react";
|
|
5
|
+
import { useFormContext as V, Controller as C } from "react-hook-form";
|
|
6
|
+
const W = "_formTextAreaHelperText_1n0bk_1", w = "_invalid_1n0bk_6", D = "_required_1n0bk_9", E = "_formTextArea_1n0bk_1", i = {
|
|
7
7
|
formTextAreaHelperText: W,
|
|
8
|
-
invalid:
|
|
9
|
-
|
|
10
|
-
formTextArea:
|
|
11
|
-
},
|
|
8
|
+
invalid: w,
|
|
9
|
+
required: D,
|
|
10
|
+
formTextArea: E
|
|
11
|
+
}, G = ({
|
|
12
12
|
count: e,
|
|
13
13
|
maxCount: c,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}) => /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
invalid: m = !1,
|
|
15
|
+
required: r = !1
|
|
16
|
+
}) => /* @__PURE__ */ n(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: `${i.formTextAreaHelperText} ${m ? i.invalid : ""} ${r ? i.required : ""}`,
|
|
20
|
+
children: /* @__PURE__ */ n(P, { children: `${e}/${c}` })
|
|
21
|
+
}
|
|
22
|
+
), Z = (e) => e.textarea ? /* @__PURE__ */ n(J, { ...e }) : /* @__PURE__ */ n(K, { ...e }), J = (e) => /* @__PURE__ */ n("div", { className: i.formTextArea, children: /* @__PURE__ */ n(_, { ...e }) }), K = (e) => /* @__PURE__ */ n(_, { ...e }), _ = ({
|
|
20
23
|
propertyName: e,
|
|
21
24
|
label: c,
|
|
22
|
-
disabled:
|
|
25
|
+
disabled: m = !1,
|
|
23
26
|
textarea: r = !1,
|
|
24
27
|
hidden: A = !1,
|
|
25
|
-
placeholder:
|
|
26
|
-
type:
|
|
27
|
-
prefixText:
|
|
28
|
-
inputMode:
|
|
29
|
-
trailingIcon:
|
|
30
|
-
trigger:
|
|
31
|
-
rules:
|
|
28
|
+
placeholder: q,
|
|
29
|
+
type: F,
|
|
30
|
+
prefixText: $,
|
|
31
|
+
inputMode: L,
|
|
32
|
+
trailingIcon: k,
|
|
33
|
+
trigger: x = "likeForm",
|
|
34
|
+
rules: t
|
|
32
35
|
}) => {
|
|
33
36
|
const {
|
|
34
37
|
control: f,
|
|
35
38
|
getFieldState: u,
|
|
36
|
-
formState: { errors:
|
|
39
|
+
formState: { errors: s },
|
|
37
40
|
trigger: T
|
|
38
|
-
} = V(), [
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
if (
|
|
43
|
-
const
|
|
44
|
-
return
|
|
41
|
+
} = V(), [H, b] = R(0), S = (a) => {
|
|
42
|
+
const l = a.target.value;
|
|
43
|
+
b(l?.length ?? 0);
|
|
44
|
+
}, B = () => {
|
|
45
|
+
if (s && s[e]) {
|
|
46
|
+
const a = s[e]?.message;
|
|
47
|
+
return a || "Invalid input";
|
|
45
48
|
}
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
() => n?.minLength?.value,
|
|
60
|
-
[n]
|
|
61
|
-
), v = s(
|
|
62
|
-
() => n?.required?.value,
|
|
63
|
-
[n]
|
|
64
|
-
), g = s(
|
|
65
|
-
() => n?.required?.message,
|
|
66
|
-
[n]
|
|
49
|
+
return z;
|
|
50
|
+
}, o = d(
|
|
51
|
+
() => t?.maxLength?.value,
|
|
52
|
+
[t]
|
|
53
|
+
), j = d(
|
|
54
|
+
() => t?.minLength?.value,
|
|
55
|
+
[t]
|
|
56
|
+
), v = d(
|
|
57
|
+
() => t?.required?.value,
|
|
58
|
+
[t]
|
|
59
|
+
), z = d(
|
|
60
|
+
() => t?.required?.message,
|
|
61
|
+
[t]
|
|
67
62
|
);
|
|
68
|
-
return A ? /* @__PURE__ */
|
|
69
|
-
|
|
63
|
+
return A ? /* @__PURE__ */ n(C, { name: e, control: f, render: () => /* @__PURE__ */ n(h, {}) }) : /* @__PURE__ */ n(
|
|
64
|
+
C,
|
|
70
65
|
{
|
|
71
66
|
name: e,
|
|
72
|
-
rules:
|
|
67
|
+
rules: t,
|
|
73
68
|
control: f,
|
|
74
|
-
render: ({ field: { ref:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
69
|
+
render: ({ field: { ref: a, ...l } }) => /* @__PURE__ */ I(h, { children: [
|
|
70
|
+
/* @__PURE__ */ n(
|
|
71
|
+
M,
|
|
72
|
+
{
|
|
73
|
+
...l,
|
|
74
|
+
value: l.value ?? "",
|
|
75
|
+
type: F,
|
|
76
|
+
fullWidth: !0,
|
|
77
|
+
inputMode: L,
|
|
78
|
+
placeholder: q,
|
|
79
|
+
prefixText: $,
|
|
80
|
+
disabled: m,
|
|
81
|
+
helperText: B(),
|
|
82
|
+
helperTextPersistent: s !== void 0 || v || o !== void 0 && r,
|
|
83
|
+
label: c,
|
|
84
|
+
variant: "outlined",
|
|
85
|
+
maxlength: o,
|
|
86
|
+
minLength: j,
|
|
87
|
+
textarea: r,
|
|
88
|
+
noResize: !1,
|
|
89
|
+
onBlur: () => {
|
|
90
|
+
x === "onBlur" && T(e);
|
|
91
|
+
},
|
|
92
|
+
onChange: (g) => {
|
|
93
|
+
l.onChange(g), r && o !== void 0 && S(g), x === "onChange" && T(e);
|
|
94
|
+
},
|
|
95
|
+
valid: !u(e).invalid,
|
|
96
|
+
className: `${i.formText} ${u(e).invalid ? i.invalid : ""}`,
|
|
97
|
+
trailingIcon: k
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
o && r && /* @__PURE__ */ n(
|
|
101
|
+
G,
|
|
102
|
+
{
|
|
103
|
+
count: H,
|
|
104
|
+
maxCount: o,
|
|
105
|
+
invalid: u(e).invalid,
|
|
106
|
+
required: v
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
] })
|
|
104
110
|
}
|
|
105
111
|
);
|
|
106
112
|
};
|
|
107
113
|
export {
|
|
108
|
-
|
|
114
|
+
Z as FormText
|
|
109
115
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { r as s, s as r, f as d } from "../../../react.esm-C0LtovhP.js";
|
|
3
|
-
import { FormText as
|
|
4
|
-
import { v as a, d as i, t as
|
|
3
|
+
import { FormText as o } from "./FormText.js";
|
|
4
|
+
import { v as a, d as i, t as l, g as e } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
const m = a.fn();
|
|
6
6
|
a.mock("react-hook-form", () => ({
|
|
7
7
|
...a.importActual("react-hook-form"),
|
|
8
8
|
Controller: ({
|
|
9
|
-
render:
|
|
10
|
-
}) =>
|
|
9
|
+
render: t
|
|
10
|
+
}) => t({
|
|
11
11
|
field: {
|
|
12
12
|
ref: void 0,
|
|
13
13
|
onChange: m,
|
|
@@ -42,10 +42,10 @@ a.mock("react-hook-form", () => ({
|
|
|
42
42
|
})
|
|
43
43
|
}));
|
|
44
44
|
i("FormText Test", () => {
|
|
45
|
-
|
|
45
|
+
l("render FormText and return single line text field", () => {
|
|
46
46
|
s(
|
|
47
47
|
/* @__PURE__ */ n(
|
|
48
|
-
|
|
48
|
+
o,
|
|
49
49
|
{
|
|
50
50
|
rules: {
|
|
51
51
|
maxLength: {
|
|
@@ -58,12 +58,12 @@ i("FormText Test", () => {
|
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
);
|
|
61
|
-
const
|
|
62
|
-
t
|
|
63
|
-
}),
|
|
61
|
+
const t = r.getByRole("textbox");
|
|
62
|
+
e(t).toBeInTheDocument(), e(t).toBeInstanceOf(HTMLInputElement), e(t).toHaveAttribute("maxlength", "100"), e(r.getByText("address.line2")).toBeInTheDocument();
|
|
63
|
+
}), l("change value of single line text field", () => {
|
|
64
64
|
s(
|
|
65
65
|
/* @__PURE__ */ n(
|
|
66
|
-
|
|
66
|
+
o,
|
|
67
67
|
{
|
|
68
68
|
rules: {
|
|
69
69
|
maxLength: {
|
|
@@ -76,12 +76,12 @@ i("FormText Test", () => {
|
|
|
76
76
|
}
|
|
77
77
|
)
|
|
78
78
|
);
|
|
79
|
-
const
|
|
80
|
-
t
|
|
81
|
-
}),
|
|
79
|
+
const t = r.getByRole("textbox");
|
|
80
|
+
e(t).toHaveValue("test"), d.change(t, { target: { value: "test-change" } }), e(m).toHaveBeenCalled();
|
|
81
|
+
}), l("render FormText and return text area", () => {
|
|
82
82
|
s(
|
|
83
83
|
/* @__PURE__ */ n(
|
|
84
|
-
|
|
84
|
+
o,
|
|
85
85
|
{
|
|
86
86
|
rules: {
|
|
87
87
|
required: {
|
|
@@ -99,12 +99,29 @@ i("FormText Test", () => {
|
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
);
|
|
102
|
-
const
|
|
103
|
-
t
|
|
104
|
-
}),
|
|
102
|
+
const t = r.getByRole("textbox");
|
|
103
|
+
e(t).toBeInTheDocument(), e(t).toBeInstanceOf(HTMLTextAreaElement), e(t).toHaveAttribute("maxlength", "200"), e(r.getByText("address.line1")).toBeInTheDocument(), e(r.getByText("required")).toBeInTheDocument();
|
|
104
|
+
}), l("render FormText with maxLength indicator", () => {
|
|
105
105
|
s(
|
|
106
106
|
/* @__PURE__ */ n(
|
|
107
|
-
|
|
107
|
+
o,
|
|
108
|
+
{
|
|
109
|
+
rules: {
|
|
110
|
+
maxLength: {
|
|
111
|
+
value: 200,
|
|
112
|
+
message: "max length is 200"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
label: "address.line1",
|
|
116
|
+
propertyName: "addressLine1",
|
|
117
|
+
textarea: !0
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
), e(r.getByText("address.line1")).toBeInTheDocument(), e(r.queryByText("required")).not.toBeInTheDocument(), e(r.getByText("0/200")).toBeInTheDocument();
|
|
121
|
+
}), l("change value of text area", () => {
|
|
122
|
+
s(
|
|
123
|
+
/* @__PURE__ */ n(
|
|
124
|
+
o,
|
|
108
125
|
{
|
|
109
126
|
rules: {
|
|
110
127
|
required: {
|
|
@@ -122,7 +139,7 @@ i("FormText Test", () => {
|
|
|
122
139
|
}
|
|
123
140
|
)
|
|
124
141
|
);
|
|
125
|
-
const
|
|
126
|
-
d.change(
|
|
142
|
+
const t = r.getByRole("textbox");
|
|
143
|
+
d.change(t, { target: { value: "test-change" } }), e(m).toHaveBeenCalled();
|
|
127
144
|
});
|
|
128
145
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m, jsxs as J, Fragment as Kr } from "react/jsx-runtime";
|
|
2
2
|
import { Elevation as Ur, Divider as Q, List as qr } from "@element/react-components";
|
|
3
3
|
import { g as Hr } from "../../_commonjsHelpers-CT_km90n.js";
|
|
4
|
-
import { _ as H, a as Tr, b as wr, c as w, d as Nr, e as Wr,
|
|
4
|
+
import { _ as H, a as Tr, b as wr, c as w, d as Nr, e as Wr, f as h, h as N, j as B, k as Xr, l as zr, m as I, n as Yr, o as Zr, p as Jr, q as W, r as Qr, s as Or, t as Pr, u as kr, v as Vr } from "../../get-BRDhkfK0.js";
|
|
5
5
|
import { useState as re, useMemo as k } from "react";
|
|
6
6
|
import { SearchBar as ee } from "../SearchBar/SearchBar.js";
|
|
7
7
|
import { g as ae, a as te, s as T } from "../../ListAreaService-zxVNvD59.js";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as D, c as u } from "./_commonjsHelpers-CT_km90n.js";
|
|
2
2
|
function E(t, e) {
|
|
3
3
|
for (var a = -1, r = t == null ? 0 : t.length, n = Array(r); ++a < r; )
|
|
4
4
|
n[a] = e(t[a], a, t);
|
|
5
5
|
return n;
|
|
6
6
|
}
|
|
7
|
-
var
|
|
7
|
+
var A = E, F = Array.isArray, v = F;
|
|
8
|
+
const lr = /* @__PURE__ */ D(v);
|
|
9
|
+
var K = typeof u == "object" && u && u.Object === Object && u, R = K, L = R, q = typeof self == "object" && self && self.Object === Object && self, U = L || q || Function("return this")(), g = U, J = g, V = J.Symbol, d = V, m = d, x = Object.prototype, X = x.hasOwnProperty, Y = x.toString, h = m ? m.toStringTag : void 0;
|
|
8
10
|
function Z(t) {
|
|
9
11
|
var e = X.call(t, h), a = t[h];
|
|
10
12
|
try {
|
|
@@ -23,15 +25,15 @@ var tt = W, C = d, et = k, at = tt, rt = "[object Null]", nt = "[object Undefine
|
|
|
23
25
|
function it(t) {
|
|
24
26
|
return t == null ? t === void 0 ? nt : rt : S && S in Object(t) ? et(t) : at(t);
|
|
25
27
|
}
|
|
26
|
-
var
|
|
27
|
-
function
|
|
28
|
+
var M = it;
|
|
29
|
+
function st(t) {
|
|
28
30
|
return t != null && typeof t == "object";
|
|
29
31
|
}
|
|
30
|
-
var
|
|
32
|
+
var ot = st, ct = M, ht = ot, ut = "[object Symbol]";
|
|
31
33
|
function vt(t) {
|
|
32
34
|
return typeof t == "symbol" || ht(t) && ct(t) == ut;
|
|
33
35
|
}
|
|
34
|
-
var $ = vt, lt =
|
|
36
|
+
var $ = vt, lt = v, pt = $, ft = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, _t = /^\w*$/;
|
|
35
37
|
function gt(t, e) {
|
|
36
38
|
if (lt(t))
|
|
37
39
|
return !1;
|
|
@@ -43,15 +45,15 @@ function $t(t) {
|
|
|
43
45
|
var e = typeof t;
|
|
44
46
|
return t != null && (e == "object" || e == "function");
|
|
45
47
|
}
|
|
46
|
-
var
|
|
48
|
+
var G = $t, yt = M, bt = G, mt = "[object AsyncFunction]", Ct = "[object Function]", St = "[object GeneratorFunction]", Ot = "[object Proxy]";
|
|
47
49
|
function Tt(t) {
|
|
48
50
|
if (!bt(t))
|
|
49
51
|
return !1;
|
|
50
52
|
var e = yt(t);
|
|
51
53
|
return e == Ct || e == St || e == mt || e == Ot;
|
|
52
54
|
}
|
|
53
|
-
var jt = Tt, Pt = g, wt = Pt["__core-js_shared__"], It = wt,
|
|
54
|
-
var t = /[^.]+$/.exec(
|
|
55
|
+
var jt = Tt, Pt = g, wt = Pt["__core-js_shared__"], It = wt, _ = It, O = function() {
|
|
56
|
+
var t = /[^.]+$/.exec(_ && _.keys && _.keys.IE_PROTO || "");
|
|
55
57
|
return t ? "Symbol(src)_1." + t : "";
|
|
56
58
|
}();
|
|
57
59
|
function Dt(t) {
|
|
@@ -71,14 +73,14 @@ function zt(t) {
|
|
|
71
73
|
}
|
|
72
74
|
return "";
|
|
73
75
|
}
|
|
74
|
-
var Nt = zt, Ht = jt, Et = xt,
|
|
76
|
+
var Nt = zt, Ht = jt, Et = xt, At = G, Ft = Nt, Kt = /[\\^$.*+?()[\]{}|]/g, Rt = /^\[object .+?Constructor\]$/, Lt = Function.prototype, qt = Object.prototype, Ut = Lt.toString, Jt = qt.hasOwnProperty, Vt = RegExp(
|
|
75
77
|
"^" + Ut.call(Jt).replace(Kt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
76
78
|
);
|
|
77
79
|
function Xt(t) {
|
|
78
|
-
if (!
|
|
80
|
+
if (!At(t) || Et(t))
|
|
79
81
|
return !1;
|
|
80
82
|
var e = Ht(t) ? Vt : Rt;
|
|
81
|
-
return e.test(
|
|
83
|
+
return e.test(Ft(t));
|
|
82
84
|
}
|
|
83
85
|
var Yt = Xt;
|
|
84
86
|
function Zt(t, e) {
|
|
@@ -89,7 +91,7 @@ function Wt(t, e) {
|
|
|
89
91
|
var a = Qt(t, e);
|
|
90
92
|
return Bt(a) ? a : void 0;
|
|
91
93
|
}
|
|
92
|
-
var
|
|
94
|
+
var z = Wt, te = z, ee = te(Object, "create"), l = ee, T = l;
|
|
93
95
|
function ae() {
|
|
94
96
|
this.__data__ = T ? T(null) : {}, this.size = 0;
|
|
95
97
|
}
|
|
@@ -98,39 +100,39 @@ function ne(t) {
|
|
|
98
100
|
var e = this.has(t) && delete this.__data__[t];
|
|
99
101
|
return this.size -= e ? 1 : 0, e;
|
|
100
102
|
}
|
|
101
|
-
var ie = ne,
|
|
103
|
+
var ie = ne, se = l, oe = "__lodash_hash_undefined__", ce = Object.prototype, he = ce.hasOwnProperty;
|
|
102
104
|
function ue(t) {
|
|
103
105
|
var e = this.__data__;
|
|
104
|
-
if (
|
|
106
|
+
if (se) {
|
|
105
107
|
var a = e[t];
|
|
106
|
-
return a ===
|
|
108
|
+
return a === oe ? void 0 : a;
|
|
107
109
|
}
|
|
108
110
|
return he.call(e, t) ? e[t] : void 0;
|
|
109
111
|
}
|
|
110
|
-
var ve = ue, le =
|
|
112
|
+
var ve = ue, le = l, pe = Object.prototype, fe = pe.hasOwnProperty;
|
|
111
113
|
function _e(t) {
|
|
112
114
|
var e = this.__data__;
|
|
113
115
|
return le ? e[t] !== void 0 : fe.call(e, t);
|
|
114
116
|
}
|
|
115
|
-
var ge = _e, de =
|
|
117
|
+
var ge = _e, de = l, $e = "__lodash_hash_undefined__";
|
|
116
118
|
function ye(t, e) {
|
|
117
119
|
var a = this.__data__;
|
|
118
120
|
return this.size += this.has(t) ? 0 : 1, a[t] = de && e === void 0 ? $e : e, this;
|
|
119
121
|
}
|
|
120
122
|
var be = ye, me = re, Ce = ie, Se = ve, Oe = ge, Te = be;
|
|
121
|
-
function
|
|
123
|
+
function s(t) {
|
|
122
124
|
var e = -1, a = t == null ? 0 : t.length;
|
|
123
125
|
for (this.clear(); ++e < a; ) {
|
|
124
126
|
var r = t[e];
|
|
125
127
|
this.set(r[0], r[1]);
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var je =
|
|
130
|
+
s.prototype.clear = me;
|
|
131
|
+
s.prototype.delete = Ce;
|
|
132
|
+
s.prototype.get = Se;
|
|
133
|
+
s.prototype.has = Oe;
|
|
134
|
+
s.prototype.set = Te;
|
|
135
|
+
var je = s;
|
|
134
136
|
function Pe() {
|
|
135
137
|
this.__data__ = [], this.size = 0;
|
|
136
138
|
}
|
|
@@ -145,7 +147,7 @@ function Me(t, e) {
|
|
|
145
147
|
return a;
|
|
146
148
|
return -1;
|
|
147
149
|
}
|
|
148
|
-
var
|
|
150
|
+
var p = Me, Ge = p, ze = Array.prototype, Ne = ze.splice;
|
|
149
151
|
function He(t) {
|
|
150
152
|
var e = this.__data__, a = Ge(e, t);
|
|
151
153
|
if (a < 0)
|
|
@@ -153,34 +155,34 @@ function He(t) {
|
|
|
153
155
|
var r = e.length - 1;
|
|
154
156
|
return a == r ? e.pop() : Ne.call(e, a, 1), --this.size, !0;
|
|
155
157
|
}
|
|
156
|
-
var Ee = He,
|
|
157
|
-
function
|
|
158
|
-
var e = this.__data__, a =
|
|
158
|
+
var Ee = He, Ae = p;
|
|
159
|
+
function Fe(t) {
|
|
160
|
+
var e = this.__data__, a = Ae(e, t);
|
|
159
161
|
return a < 0 ? void 0 : e[a][1];
|
|
160
162
|
}
|
|
161
|
-
var Ke =
|
|
163
|
+
var Ke = Fe, Re = p;
|
|
162
164
|
function Le(t) {
|
|
163
165
|
return Re(this.__data__, t) > -1;
|
|
164
166
|
}
|
|
165
|
-
var qe = Le, Ue =
|
|
167
|
+
var qe = Le, Ue = p;
|
|
166
168
|
function Je(t, e) {
|
|
167
169
|
var a = this.__data__, r = Ue(a, t);
|
|
168
170
|
return r < 0 ? (++this.size, a.push([t, e])) : a[r][1] = e, this;
|
|
169
171
|
}
|
|
170
172
|
var Ve = Je, Xe = we, Ye = Ee, Ze = Ke, ke = qe, Be = Ve;
|
|
171
|
-
function
|
|
173
|
+
function o(t) {
|
|
172
174
|
var e = -1, a = t == null ? 0 : t.length;
|
|
173
175
|
for (this.clear(); ++e < a; ) {
|
|
174
176
|
var r = t[e];
|
|
175
177
|
this.set(r[0], r[1]);
|
|
176
178
|
}
|
|
177
179
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
var Qe =
|
|
180
|
+
o.prototype.clear = Xe;
|
|
181
|
+
o.prototype.delete = Ye;
|
|
182
|
+
o.prototype.get = Ze;
|
|
183
|
+
o.prototype.has = ke;
|
|
184
|
+
o.prototype.set = Be;
|
|
185
|
+
var Qe = o, We = z, ta = g, ea = We(ta, "Map"), aa = ea, j = je, ra = Qe, na = aa;
|
|
184
186
|
function ia() {
|
|
185
187
|
this.size = 0, this.__data__ = {
|
|
186
188
|
hash: new j(),
|
|
@@ -188,35 +190,35 @@ function ia() {
|
|
|
188
190
|
string: new j()
|
|
189
191
|
};
|
|
190
192
|
}
|
|
191
|
-
var
|
|
192
|
-
function
|
|
193
|
+
var sa = ia;
|
|
194
|
+
function oa(t) {
|
|
193
195
|
var e = typeof t;
|
|
194
196
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
195
197
|
}
|
|
196
|
-
var ca =
|
|
198
|
+
var ca = oa, ha = ca;
|
|
197
199
|
function ua(t, e) {
|
|
198
200
|
var a = t.__data__;
|
|
199
201
|
return ha(e) ? a[typeof e == "string" ? "string" : "hash"] : a.map;
|
|
200
202
|
}
|
|
201
|
-
var
|
|
203
|
+
var f = ua, va = f;
|
|
202
204
|
function la(t) {
|
|
203
205
|
var e = va(this, t).delete(t);
|
|
204
206
|
return this.size -= e ? 1 : 0, e;
|
|
205
207
|
}
|
|
206
|
-
var pa = la, fa =
|
|
208
|
+
var pa = la, fa = f;
|
|
207
209
|
function _a(t) {
|
|
208
210
|
return fa(this, t).get(t);
|
|
209
211
|
}
|
|
210
|
-
var ga = _a, da =
|
|
212
|
+
var ga = _a, da = f;
|
|
211
213
|
function $a(t) {
|
|
212
214
|
return da(this, t).has(t);
|
|
213
215
|
}
|
|
214
|
-
var ya = $a, ba =
|
|
216
|
+
var ya = $a, ba = f;
|
|
215
217
|
function ma(t, e) {
|
|
216
218
|
var a = ba(this, t), r = a.size;
|
|
217
219
|
return a.set(t, e), this.size += a.size == r ? 0 : 1, this;
|
|
218
220
|
}
|
|
219
|
-
var Ca = ma, Sa =
|
|
221
|
+
var Ca = ma, Sa = sa, Oa = pa, Ta = ga, ja = ya, Pa = Ca;
|
|
220
222
|
function c(t) {
|
|
221
223
|
var e = -1, a = t == null ? 0 : t.length;
|
|
222
224
|
for (this.clear(); ++e < a; ) {
|
|
@@ -229,7 +231,7 @@ c.prototype.delete = Oa;
|
|
|
229
231
|
c.prototype.get = Ta;
|
|
230
232
|
c.prototype.has = ja;
|
|
231
233
|
c.prototype.set = Pa;
|
|
232
|
-
var wa = c,
|
|
234
|
+
var wa = c, N = wa, Ia = "Expected a function";
|
|
233
235
|
function y(t, e) {
|
|
234
236
|
if (typeof t != "function" || e != null && typeof e != "function")
|
|
235
237
|
throw new TypeError(Ia);
|
|
@@ -240,9 +242,9 @@ function y(t, e) {
|
|
|
240
242
|
var b = t.apply(this, r);
|
|
241
243
|
return a.cache = i.set(n, b) || i, b;
|
|
242
244
|
};
|
|
243
|
-
return a.cache = new (y.Cache ||
|
|
245
|
+
return a.cache = new (y.Cache || N)(), a;
|
|
244
246
|
}
|
|
245
|
-
y.Cache =
|
|
247
|
+
y.Cache = N;
|
|
246
248
|
var Da = y, xa = Da, Ma = 500;
|
|
247
249
|
function Ga(t) {
|
|
248
250
|
var e = xa(t, function(r) {
|
|
@@ -250,27 +252,27 @@ function Ga(t) {
|
|
|
250
252
|
}), a = e.cache;
|
|
251
253
|
return e;
|
|
252
254
|
}
|
|
253
|
-
var za = Ga, Na = za, Ha = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Ea = /\\(\\)?/g,
|
|
255
|
+
var za = Ga, Na = za, Ha = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Ea = /\\(\\)?/g, Aa = Na(function(t) {
|
|
254
256
|
var e = [];
|
|
255
257
|
return t.charCodeAt(0) === 46 && e.push(""), t.replace(Ha, function(a, r, n, i) {
|
|
256
258
|
e.push(n ? i.replace(Ea, "$1") : r || a);
|
|
257
259
|
}), e;
|
|
258
|
-
}),
|
|
259
|
-
function
|
|
260
|
+
}), Fa = Aa, P = d, Ka = A, Ra = v, La = $, qa = 1 / 0, w = P ? P.prototype : void 0, I = w ? w.toString : void 0;
|
|
261
|
+
function H(t) {
|
|
260
262
|
if (typeof t == "string")
|
|
261
263
|
return t;
|
|
262
264
|
if (Ra(t))
|
|
263
|
-
return Ka(t,
|
|
265
|
+
return Ka(t, H) + "";
|
|
264
266
|
if (La(t))
|
|
265
267
|
return I ? I.call(t) : "";
|
|
266
268
|
var e = t + "";
|
|
267
269
|
return e == "0" && 1 / t == -qa ? "-0" : e;
|
|
268
270
|
}
|
|
269
|
-
var Ua =
|
|
271
|
+
var Ua = H, Ja = Ua;
|
|
270
272
|
function Va(t) {
|
|
271
273
|
return t == null ? "" : Ja(t);
|
|
272
274
|
}
|
|
273
|
-
var Xa = Va, Ya =
|
|
275
|
+
var Xa = Va, Ya = v, Za = dt, ka = Fa, Ba = Xa;
|
|
274
276
|
function Qa(t, e) {
|
|
275
277
|
return Ya(t) ? t : Za(t, e) ? [t] : ka(Ba(t));
|
|
276
278
|
}
|
|
@@ -282,19 +284,19 @@ function ar(t) {
|
|
|
282
284
|
return e == "0" && 1 / t == -er ? "-0" : e;
|
|
283
285
|
}
|
|
284
286
|
var rr = ar, nr = Wa, ir = rr;
|
|
285
|
-
function
|
|
287
|
+
function sr(t, e) {
|
|
286
288
|
e = nr(e, t);
|
|
287
289
|
for (var a = 0, r = e.length; t != null && a < r; )
|
|
288
290
|
t = t[ir(e[a++])];
|
|
289
291
|
return a && a == r ? t : void 0;
|
|
290
292
|
}
|
|
291
|
-
var
|
|
293
|
+
var or = sr, cr = or;
|
|
292
294
|
function hr(t, e, a) {
|
|
293
295
|
var r = t == null ? void 0 : cr(t, e);
|
|
294
296
|
return r === void 0 ? a : r;
|
|
295
297
|
}
|
|
296
298
|
var ur = hr;
|
|
297
|
-
const
|
|
299
|
+
const pr = /* @__PURE__ */ D(ur);
|
|
298
300
|
export {
|
|
299
301
|
Qe as _,
|
|
300
302
|
aa as a,
|
|
@@ -302,20 +304,21 @@ export {
|
|
|
302
304
|
g as c,
|
|
303
305
|
d,
|
|
304
306
|
De as e,
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
307
|
+
v as f,
|
|
308
|
+
pr as g,
|
|
309
|
+
M as h,
|
|
310
|
+
lr as i,
|
|
311
|
+
ot as j,
|
|
312
|
+
R as k,
|
|
313
|
+
jt as l,
|
|
314
|
+
z as m,
|
|
315
|
+
Nt as n,
|
|
316
|
+
G as o,
|
|
317
|
+
Wa as p,
|
|
318
|
+
rr as q,
|
|
319
|
+
ur as r,
|
|
320
|
+
dt as s,
|
|
321
|
+
or as t,
|
|
322
|
+
$ as u,
|
|
323
|
+
A as v
|
|
321
324
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hortiview/shared-components",
|
|
3
3
|
"description": "This is a shared component library. It should used in the HortiView platform and its modules.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6044",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
|
|
7
7
|
"author": "Falk Menge <falk.menge.ext@bayer.com>",
|