@hortiview/shared-components 0.0.6927 → 0.0.7018
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/BlockView.module-BPlNT5uh.js +15 -0
- package/dist/HashTabView.module-CJX4gxTu.js +13 -0
- package/dist/HeaderFilter.module-DiBmulr5.js +7 -0
- package/dist/Iconify-CY9lZjFd.js +95 -0
- package/dist/_baseToString-BNXOi2Mf.js +197 -0
- package/dist/_equalByTag-DJhSpgVG.js +157 -0
- package/dist/alertBanner.module-HneYdVzN.js +10 -0
- package/dist/assets/{main.css → Filter.css} +1 -1
- package/dist/baseView.module-ve87u_d0.js +12 -0
- package/dist/basicHeading.module-BYb8xvuk.js +16 -0
- package/dist/bigLoadingSpinner.module-GgbFol8k.js +11 -0
- package/dist/components/AlertBanner/AlertBanner.js +12 -17
- package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
- package/dist/components/BaseView/BaseView.js +33 -40
- package/dist/components/BaseView/BaseView.test.js +1 -1
- package/dist/components/BasicHeading/BasicHeading.js +40 -51
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.js +41 -51
- package/dist/components/BlockView/BlockView.test.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +18 -20
- package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
- package/dist/components/DeleteModal/DeleteModal.js +55 -60
- package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +8 -11
- package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
- package/dist/components/EmptyView/EmptyView.test.js +1 -1
- package/dist/components/Filter/Filter.d.ts +27 -0
- package/dist/components/Filter/Filter.js +149 -0
- package/dist/components/Filter/Filter.test.d.ts +1 -0
- package/dist/components/Filter/Filter.test.js +114 -0
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +46 -52
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +68 -73
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
- package/dist/components/FormComponents/FormText/FormText.js +57 -62
- package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
- package/dist/components/GenericTable/GenericTable.js +52 -58
- package/dist/components/GenericTable/GenericTable.test.js +1 -1
- package/dist/components/HashTabView/HashTabView.js +46 -54
- package/dist/components/HashTabView/HashTabView.test.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.js +14 -16
- package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
- package/dist/components/Iconify/Iconify.d.ts +3 -13
- package/dist/components/Iconify/Iconify.js +6 -163
- package/dist/components/Iconify/Iconify.test.js +2 -2
- package/dist/components/InfoGroup/InfoGroup.js +38 -47
- package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
- package/dist/components/ListArea/ListArea.js +258 -490
- package/dist/components/ListArea/ListArea.test.js +2 -2
- package/dist/components/ListArea/ListAreaService.js +82 -8
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +9 -5
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -2
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +13 -15
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +2 -2
- package/dist/components/Scrollbar/scrollbar.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +21 -23
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/VerticalDivider/VerticalDivider.js +4 -6
- package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
- package/dist/contextMenu.module-B7aUMFPe.js +7 -0
- package/dist/deleteModal.module-Ds3MDzdl.js +10 -0
- package/dist/disclaimer.module-BZydt-Q_.js +8 -0
- package/dist/formDatePicker.module-BV3ma_7y.js +11 -0
- package/dist/formSelect.module-C18N-SsT.js +11 -0
- package/dist/formText.module-Blt6Y-SR.js +10 -0
- package/dist/genericTable.module-BkU2VDKR.js +11 -0
- package/dist/get-UxX31Aph.js +47 -0
- package/dist/hooks/useBreakpoints.test.js +1 -1
- package/dist/iconify.module-C89oaw5b.js +79 -0
- package/dist/{index-DP2ENnrX.js → index-BQnj-5Zt.js} +1 -1
- package/dist/infoGroup.module-B3E1gCGi.js +14 -0
- package/dist/isArray-Ca4KR8TK.js +91 -0
- package/dist/listArea.module-B-gPyfbE.js +19 -0
- package/dist/loadingSpinner.module-CLtqSMWA.js +7 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +55 -52
- package/dist/{react.esm-DoZanrUz.js → react.esm-C3jDj5Fe.js} +1 -0
- package/dist/searchBar.module-9gKyrZRT.js +7 -0
- package/dist/types/Filter.d.ts +31 -0
- package/dist/types/Filter.js +1 -0
- package/dist/verticalDivider.module-C3_GL-fH.js +7 -0
- package/package.json +1 -1
- package/dist/BigLoadingSpinner-Df2k3xOD.js +0 -18
- package/dist/ListAreaService-CiewPvfR.js +0 -99
- package/dist/get-BRDhkfK0.js +0 -324
- /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/{ContextMenu.css → contextMenu.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/{GenericTable.css → genericTable.css} +0 -0
- /package/dist/assets/{Iconify.css → iconify.css} +0 -0
- /package/dist/assets/{InfoGroup.css → infoGroup.css} +0 -0
- /package/dist/assets/{ListAreaService.css → listArea.css} +0 -0
- /package/dist/assets/{LoadingSpinner.css → loadingSpinner.css} +0 -0
- /package/dist/assets/{SearchBar.css → searchBar.css} +0 -0
- /package/dist/assets/{VerticalDivider.css → verticalDivider.css} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
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-C3jDj5Fe.js";
|
|
3
3
|
import { FormDatePicker as c } from "./FormDatePicker.js";
|
|
4
4
|
import { v as e, d as f, t as l, g as r } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
const i = e.fn();
|
|
@@ -1,5 +1,5 @@
|
|
|
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-C3jDj5Fe.js";
|
|
3
3
|
import { FormRadio as l } from "./FormRadio.js";
|
|
4
4
|
import { v as e, d as c, t as i, g as o } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
const r = e.fn();
|
|
@@ -1,110 +1,105 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useMemo as
|
|
6
|
-
import { useFormContext as
|
|
7
|
-
import { H as
|
|
8
|
-
import { SelectTooltipText as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
multiText: R,
|
|
14
|
-
tooltip: U
|
|
15
|
-
}, et = ({
|
|
16
|
-
propertyName: i,
|
|
17
|
-
label: f,
|
|
1
|
+
import { jsx as e, Fragment as M, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import { Select as k } from "@element/react-components";
|
|
3
|
+
import { g as h } from "../../../get-UxX31Aph.js";
|
|
4
|
+
import { i as z } from "../../../isArray-Ca4KR8TK.js";
|
|
5
|
+
import { useMemo as S } from "react";
|
|
6
|
+
import { useFormContext as B, Controller as v } from "react-hook-form";
|
|
7
|
+
import { H as G } from "../../../react-tooltip.min-BzHiZW8k.js";
|
|
8
|
+
import { SelectTooltipText as J } from "./SelectTooltipText.js";
|
|
9
|
+
import { s as l } from "../../../formSelect.module-C18N-SsT.js";
|
|
10
|
+
const N = ({
|
|
11
|
+
propertyName: r,
|
|
12
|
+
label: d,
|
|
18
13
|
options: o,
|
|
19
|
-
multi:
|
|
20
|
-
disabled:
|
|
21
|
-
hoisted:
|
|
22
|
-
hidden:
|
|
23
|
-
valueKey:
|
|
14
|
+
multi: a = !1,
|
|
15
|
+
disabled: F = !1,
|
|
16
|
+
hoisted: I = !1,
|
|
17
|
+
hidden: $ = !1,
|
|
18
|
+
valueKey: i = "value",
|
|
24
19
|
textKey: T = "text",
|
|
25
|
-
clearable:
|
|
26
|
-
searchable:
|
|
27
|
-
noOptionsMessage:
|
|
20
|
+
clearable: j = !1,
|
|
21
|
+
searchable: w = !0,
|
|
22
|
+
noOptionsMessage: A = "",
|
|
28
23
|
rules: n,
|
|
29
|
-
...
|
|
24
|
+
...m
|
|
30
25
|
}) => {
|
|
31
26
|
const {
|
|
32
|
-
control:
|
|
33
|
-
formState: { errors:
|
|
34
|
-
} =
|
|
35
|
-
() => !
|
|
36
|
-
[
|
|
37
|
-
),
|
|
27
|
+
control: p,
|
|
28
|
+
formState: { errors: s, isValidating: H }
|
|
29
|
+
} = B(), c = S(
|
|
30
|
+
() => !H && h(s, r) !== void 0,
|
|
31
|
+
[s, r, H]
|
|
32
|
+
), C = S(
|
|
38
33
|
() => n?.required?.value,
|
|
39
34
|
[n]
|
|
40
|
-
),
|
|
35
|
+
), D = S(
|
|
41
36
|
() => n?.required?.message,
|
|
42
37
|
[n]
|
|
43
|
-
),
|
|
44
|
-
if (
|
|
45
|
-
const u =
|
|
38
|
+
), E = () => {
|
|
39
|
+
if (s && s[r]) {
|
|
40
|
+
const u = s[r]?.message;
|
|
46
41
|
return u || "Invalid input";
|
|
47
42
|
}
|
|
48
|
-
return
|
|
43
|
+
return D;
|
|
49
44
|
};
|
|
50
|
-
return
|
|
51
|
-
|
|
45
|
+
return $ ? /* @__PURE__ */ e(v, { name: r, control: p, render: () => /* @__PURE__ */ e(M, {}) }) : /* @__PURE__ */ e("div", { className: l.formSelectContainer, "data-tooltip-id": d, children: /* @__PURE__ */ e(
|
|
46
|
+
v,
|
|
52
47
|
{
|
|
53
|
-
name:
|
|
48
|
+
name: r,
|
|
54
49
|
rules: n,
|
|
55
|
-
control:
|
|
56
|
-
render: ({ field: { ref: u, onChange: x, value:
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
(t) =>
|
|
61
|
-
) :
|
|
62
|
-
return /* @__PURE__ */
|
|
50
|
+
control: p,
|
|
51
|
+
render: ({ field: { ref: u, onChange: x, value: q, ...O } }) => {
|
|
52
|
+
let g = o;
|
|
53
|
+
z(o) && h(o[0], "options") !== void 0 && (g = o.flatMap((t) => h(t, "options") ?? []));
|
|
54
|
+
const f = a ? g?.filter(
|
|
55
|
+
(t) => q?.includes(t[i])
|
|
56
|
+
) : g?.find((t) => t[i] === q), P = a && m.multiDisplayType === "text" && m.fixedHeightInput;
|
|
57
|
+
return /* @__PURE__ */ b(M, { children: [
|
|
63
58
|
/* @__PURE__ */ e(
|
|
64
|
-
|
|
59
|
+
k,
|
|
65
60
|
{
|
|
66
|
-
...
|
|
67
|
-
...
|
|
68
|
-
value:
|
|
69
|
-
label:
|
|
61
|
+
...O,
|
|
62
|
+
...m,
|
|
63
|
+
value: f,
|
|
64
|
+
label: d,
|
|
70
65
|
variant: "outlined",
|
|
71
|
-
helperText:
|
|
72
|
-
helperTextPersistent:
|
|
66
|
+
helperText: E(),
|
|
67
|
+
helperTextPersistent: C || c,
|
|
73
68
|
options: o,
|
|
74
|
-
valid: !
|
|
75
|
-
multiSelect:
|
|
76
|
-
className: `${
|
|
77
|
-
disabled:
|
|
78
|
-
valueKey:
|
|
69
|
+
valid: !c,
|
|
70
|
+
multiSelect: a,
|
|
71
|
+
className: `${l.formSelect} ${c ? l.invalid : ""} ${P ? l.multiText : ""}`,
|
|
72
|
+
disabled: F,
|
|
73
|
+
valueKey: i,
|
|
79
74
|
textKey: T,
|
|
80
75
|
onChange: (t) => {
|
|
81
76
|
if (t == null) {
|
|
82
77
|
x(t);
|
|
83
78
|
return;
|
|
84
79
|
}
|
|
85
|
-
if (
|
|
86
|
-
x(t.map((
|
|
80
|
+
if (a) {
|
|
81
|
+
x(t.map((V) => V[i]));
|
|
87
82
|
return;
|
|
88
83
|
}
|
|
89
|
-
x(t[
|
|
84
|
+
x(t[i]);
|
|
90
85
|
},
|
|
91
|
-
hoisted:
|
|
92
|
-
noOptionsMessage:
|
|
93
|
-
searchable:
|
|
94
|
-
clearable:
|
|
86
|
+
hoisted: I,
|
|
87
|
+
noOptionsMessage: A,
|
|
88
|
+
searchable: w,
|
|
89
|
+
clearable: j,
|
|
95
90
|
menuMaxHeight: "15rem"
|
|
96
91
|
}
|
|
97
92
|
),
|
|
98
93
|
/* @__PURE__ */ e(
|
|
99
|
-
|
|
94
|
+
G,
|
|
100
95
|
{
|
|
101
|
-
id:
|
|
96
|
+
id: d,
|
|
102
97
|
noArrow: !0,
|
|
103
98
|
place: "bottom",
|
|
104
99
|
delayShow: 420,
|
|
105
|
-
className:
|
|
106
|
-
hidden: !
|
|
107
|
-
children: /* @__PURE__ */ e(
|
|
100
|
+
className: l.tooltip,
|
|
101
|
+
hidden: !f || f.length === 0 || !m.fixedHeightInput,
|
|
102
|
+
children: /* @__PURE__ */ e(J, { value: f, textKey: T, valueKey: i })
|
|
108
103
|
}
|
|
109
104
|
)
|
|
110
105
|
] });
|
|
@@ -113,5 +108,5 @@ const J = "_invalid_9uqqc_1", L = "_formSelectContainer_9uqqc_6", Q = "_formSele
|
|
|
113
108
|
) });
|
|
114
109
|
};
|
|
115
110
|
export {
|
|
116
|
-
|
|
111
|
+
N as FormSelect
|
|
117
112
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
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-C3jDj5Fe.js";
|
|
3
|
+
import { u as B } from "../../../index-BQnj-5Zt.js";
|
|
4
4
|
import { FormSelect as i } from "./FormSelect.js";
|
|
5
5
|
import { SelectTooltipText as d } from "./SelectTooltipText.js";
|
|
6
6
|
import { v as n, d as f, t as u, g as e } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
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-C3jDj5Fe.js";
|
|
3
3
|
import { FormSlider as l } from "./FormSlider.js";
|
|
4
4
|
import { v as e, d as m, t as i, g as r } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
const o = e.fn();
|
|
@@ -1,111 +1,106 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
formTextAreaHelperText: w,
|
|
8
|
-
invalid: D,
|
|
9
|
-
required: E,
|
|
10
|
-
formTextArea: G
|
|
11
|
-
}, J = ({
|
|
1
|
+
import { jsx as n, Fragment as C, jsxs as R } from "react/jsx-runtime";
|
|
2
|
+
import { Textfield as V, TypoCaption as W } from "@element/react-components";
|
|
3
|
+
import { useState as b, useMemo as d } from "react";
|
|
4
|
+
import { useFormContext as w, Controller as F } from "react-hook-form";
|
|
5
|
+
import { s as i } from "../../../formText.module-Blt6Y-SR.js";
|
|
6
|
+
const D = ({
|
|
12
7
|
count: e,
|
|
13
|
-
maxCount:
|
|
14
|
-
invalid:
|
|
8
|
+
maxCount: u,
|
|
9
|
+
invalid: c = !1,
|
|
15
10
|
required: r = !1
|
|
16
11
|
}) => /* @__PURE__ */ n(
|
|
17
12
|
"div",
|
|
18
13
|
{
|
|
19
|
-
className: `${i.formTextAreaHelperText} ${
|
|
20
|
-
children: /* @__PURE__ */ n(
|
|
14
|
+
className: `${i.formTextAreaHelperText} ${c ? i.invalid : ""} ${r ? i.required : ""}`,
|
|
15
|
+
children: /* @__PURE__ */ n(W, { children: `${e}/${u}` })
|
|
21
16
|
}
|
|
22
|
-
),
|
|
17
|
+
), X = (e) => e.textarea ? /* @__PURE__ */ n(E, { ...e }) : /* @__PURE__ */ n(G, { ...e }), E = (e) => /* @__PURE__ */ n("div", { className: i.formTextArea, children: /* @__PURE__ */ n($, { ...e }) }), G = (e) => /* @__PURE__ */ n($, { ...e }), $ = ({
|
|
23
18
|
propertyName: e,
|
|
24
|
-
label:
|
|
25
|
-
disabled:
|
|
19
|
+
label: u,
|
|
20
|
+
disabled: c = !1,
|
|
26
21
|
textarea: r = !1,
|
|
27
|
-
hidden:
|
|
28
|
-
placeholder:
|
|
29
|
-
type:
|
|
30
|
-
prefixText:
|
|
31
|
-
inputMode:
|
|
32
|
-
trailingIcon:
|
|
33
|
-
trigger:
|
|
22
|
+
hidden: L = !1,
|
|
23
|
+
placeholder: q,
|
|
24
|
+
type: B,
|
|
25
|
+
prefixText: S,
|
|
26
|
+
inputMode: A,
|
|
27
|
+
trailingIcon: j,
|
|
28
|
+
trigger: f = "likeForm",
|
|
34
29
|
rules: t,
|
|
35
|
-
...
|
|
30
|
+
...g
|
|
36
31
|
}) => {
|
|
37
32
|
const {
|
|
38
|
-
control:
|
|
39
|
-
getFieldState:
|
|
33
|
+
control: h,
|
|
34
|
+
getFieldState: m,
|
|
40
35
|
formState: { errors: s },
|
|
41
|
-
trigger:
|
|
42
|
-
} =
|
|
36
|
+
trigger: v
|
|
37
|
+
} = w(), [H, k] = b(0), z = (a) => {
|
|
43
38
|
const l = a.target.value;
|
|
44
|
-
|
|
45
|
-
},
|
|
39
|
+
k(l?.length ?? 0);
|
|
40
|
+
}, I = () => {
|
|
46
41
|
if (s && s[e]) {
|
|
47
42
|
const a = s[e]?.message;
|
|
48
43
|
return a || "Invalid input";
|
|
49
44
|
}
|
|
50
|
-
return
|
|
45
|
+
return P;
|
|
51
46
|
}, o = d(
|
|
52
47
|
() => t?.maxLength?.value,
|
|
53
48
|
[t]
|
|
54
|
-
),
|
|
49
|
+
), M = d(
|
|
55
50
|
() => t?.minLength?.value,
|
|
56
51
|
[t]
|
|
57
|
-
),
|
|
52
|
+
), x = d(
|
|
58
53
|
() => t?.required?.value,
|
|
59
54
|
[t]
|
|
60
|
-
),
|
|
55
|
+
), P = d(
|
|
61
56
|
() => t?.required?.message,
|
|
62
57
|
[t]
|
|
63
58
|
);
|
|
64
|
-
return
|
|
65
|
-
|
|
59
|
+
return L ? /* @__PURE__ */ n(F, { name: e, control: h, render: () => /* @__PURE__ */ n(C, {}) }) : /* @__PURE__ */ n(
|
|
60
|
+
F,
|
|
66
61
|
{
|
|
67
62
|
name: e,
|
|
68
63
|
rules: t,
|
|
69
|
-
control:
|
|
70
|
-
render: ({ field: { ref: a, ...l } }) => /* @__PURE__ */
|
|
64
|
+
control: h,
|
|
65
|
+
render: ({ field: { ref: a, ...l } }) => /* @__PURE__ */ R(C, { children: [
|
|
71
66
|
/* @__PURE__ */ n(
|
|
72
|
-
|
|
67
|
+
V,
|
|
73
68
|
{
|
|
74
|
-
...
|
|
69
|
+
...g,
|
|
75
70
|
...l,
|
|
76
71
|
value: l.value ?? "",
|
|
77
|
-
type:
|
|
72
|
+
type: B,
|
|
78
73
|
fullWidth: !0,
|
|
79
|
-
inputMode:
|
|
80
|
-
placeholder:
|
|
81
|
-
prefixText:
|
|
82
|
-
disabled:
|
|
83
|
-
helperText:
|
|
84
|
-
helperTextPersistent: s !== void 0 ||
|
|
85
|
-
label:
|
|
74
|
+
inputMode: A,
|
|
75
|
+
placeholder: q,
|
|
76
|
+
prefixText: S,
|
|
77
|
+
disabled: c,
|
|
78
|
+
helperText: I(),
|
|
79
|
+
helperTextPersistent: s !== void 0 || x || o !== void 0 && r,
|
|
80
|
+
label: u,
|
|
86
81
|
variant: "outlined",
|
|
87
82
|
maxlength: o,
|
|
88
|
-
minLength:
|
|
83
|
+
minLength: M,
|
|
89
84
|
textarea: r,
|
|
90
85
|
noResize: !1,
|
|
91
86
|
onBlur: () => {
|
|
92
|
-
|
|
87
|
+
f === "onBlur" && v(e), g.onBlur?.();
|
|
93
88
|
},
|
|
94
|
-
onChange: (
|
|
95
|
-
l.onChange(
|
|
89
|
+
onChange: (T) => {
|
|
90
|
+
l.onChange(T), r && o !== void 0 && z(T), f === "onChange" && v(e);
|
|
96
91
|
},
|
|
97
|
-
valid: !
|
|
98
|
-
className: `${i.formText} ${
|
|
99
|
-
trailingIcon:
|
|
92
|
+
valid: !m(e).invalid,
|
|
93
|
+
className: `${i.formText} ${m(e).invalid ? i.invalid : ""}`,
|
|
94
|
+
trailingIcon: j
|
|
100
95
|
}
|
|
101
96
|
),
|
|
102
97
|
o !== void 0 && r && /* @__PURE__ */ n(
|
|
103
|
-
|
|
98
|
+
D,
|
|
104
99
|
{
|
|
105
|
-
count:
|
|
100
|
+
count: H,
|
|
106
101
|
maxCount: o,
|
|
107
|
-
invalid:
|
|
108
|
-
required:
|
|
102
|
+
invalid: m(e).invalid,
|
|
103
|
+
required: x
|
|
109
104
|
}
|
|
110
105
|
)
|
|
111
106
|
] })
|
|
@@ -113,5 +108,5 @@ const w = "_formTextAreaHelperText_1n0bk_1", D = "_invalid_1n0bk_6", E = "_requi
|
|
|
113
108
|
);
|
|
114
109
|
};
|
|
115
110
|
export {
|
|
116
|
-
|
|
111
|
+
X as FormText
|
|
117
112
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { a as s, s as r, f as d } from "../../../react.esm-
|
|
2
|
+
import { a as s, s as r, f as d } from "../../../react.esm-C3jDj5Fe.js";
|
|
3
3
|
import { FormText as o } from "./FormText.js";
|
|
4
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();
|
|
@@ -1,77 +1,71 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
filterBar: G,
|
|
9
|
-
emptyTable: O,
|
|
10
|
-
elevation: P,
|
|
11
|
-
table: W
|
|
12
|
-
}, z = (n, l) => {
|
|
13
|
-
if (!n)
|
|
1
|
+
import { jsx as e, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import { Elevation as N, Table as B, TableTopBar as v, Group as g, Padding as j, TypoDisplay as C, TypoSubtitle as D } from "@element/react-components";
|
|
3
|
+
import { useMemo as b, Fragment as I } from "react";
|
|
4
|
+
import { ContextMenu as M } from "../ContextMenu/ContextMenu.js";
|
|
5
|
+
import { s as u } from "../../genericTable.module-BkU2VDKR.js";
|
|
6
|
+
const G = (r, l) => {
|
|
7
|
+
if (!r)
|
|
14
8
|
return [];
|
|
15
|
-
let
|
|
16
|
-
return l.length > 0 && (
|
|
17
|
-
const
|
|
18
|
-
return
|
|
19
|
-
})),
|
|
20
|
-
},
|
|
21
|
-
data:
|
|
9
|
+
let i = Object.keys(r).map((t) => t);
|
|
10
|
+
return l.length > 0 && (i = i.sort((t, o) => {
|
|
11
|
+
const p = l.findIndex((c) => c === t), s = l.findIndex((c) => c === o);
|
|
12
|
+
return p === -1 ? 1 : s === -1 ? -1 : p - s;
|
|
13
|
+
})), i;
|
|
14
|
+
}, F = ({
|
|
15
|
+
data: r = [],
|
|
22
16
|
hiddenColumns: l = [],
|
|
23
|
-
order:
|
|
17
|
+
order: i = [],
|
|
24
18
|
cellTemplates: t = void 0,
|
|
25
|
-
tableActions:
|
|
26
|
-
noContentText:
|
|
27
|
-
headerTranslation: s = (
|
|
19
|
+
tableActions: o = [],
|
|
20
|
+
noContentText: p = "No data available",
|
|
21
|
+
headerTranslation: s = (m) => m,
|
|
28
22
|
pagination: c = !1,
|
|
29
|
-
getRowActions:
|
|
23
|
+
getRowActions: d = void 0,
|
|
30
24
|
customColumnWidth: h,
|
|
31
|
-
title:
|
|
25
|
+
title: f
|
|
32
26
|
}) => {
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
27
|
+
const m = b(() => {
|
|
28
|
+
if (r.length === 0)
|
|
35
29
|
return [];
|
|
36
|
-
const a =
|
|
37
|
-
const
|
|
30
|
+
const a = G(r[0], i).map((n) => {
|
|
31
|
+
const x = h ? h[n] : void 0;
|
|
38
32
|
return {
|
|
39
|
-
id:
|
|
40
|
-
header: s(
|
|
41
|
-
accessor:
|
|
42
|
-
cellTemplate: t ? t[
|
|
43
|
-
cellProps: { width:
|
|
33
|
+
id: n,
|
|
34
|
+
header: s(n),
|
|
35
|
+
accessor: n,
|
|
36
|
+
cellTemplate: t ? t[n] : void 0,
|
|
37
|
+
cellProps: { width: x }
|
|
44
38
|
};
|
|
45
39
|
});
|
|
46
|
-
return
|
|
47
|
-
}, [
|
|
48
|
-
const
|
|
49
|
-
return { ...a, actions:
|
|
50
|
-
}) :
|
|
51
|
-
return /* @__PURE__ */ e(
|
|
52
|
-
|
|
40
|
+
return d ? [...a, { id: "actions", header: "", accessor: "actions" }] : a;
|
|
41
|
+
}, [r, t, i, s, d, h]), y = b(() => d ? r.map((a) => {
|
|
42
|
+
const n = /* @__PURE__ */ e(M, { actions: d(a), iconOrientation: "horizontal" });
|
|
43
|
+
return { ...a, actions: n };
|
|
44
|
+
}) : r, [r, d]);
|
|
45
|
+
return /* @__PURE__ */ e(N, { elevation: 1, className: u.elevation, children: /* @__PURE__ */ e(
|
|
46
|
+
B,
|
|
53
47
|
{
|
|
54
|
-
className:
|
|
48
|
+
className: u.table,
|
|
55
49
|
fullWidth: !0,
|
|
56
50
|
alwaysUseDivTags: !0,
|
|
57
51
|
layout: "standard",
|
|
58
52
|
hiddenColumns: l,
|
|
59
|
-
data:
|
|
60
|
-
columns:
|
|
61
|
-
leadingContent:
|
|
62
|
-
|
|
53
|
+
data: y,
|
|
54
|
+
columns: m,
|
|
55
|
+
leadingContent: f && o.length === 0 ? /* @__PURE__ */ e(v, { title: f }) : o.length > 0 && /* @__PURE__ */ e(
|
|
56
|
+
v,
|
|
63
57
|
{
|
|
64
|
-
className:
|
|
65
|
-
filterBar: /* @__PURE__ */
|
|
66
|
-
|
|
58
|
+
className: u.topBar,
|
|
59
|
+
filterBar: /* @__PURE__ */ T(g, { fullWidth: !0, direction: "vertical", gap: "none", children: [
|
|
60
|
+
f && /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(C, { level: 6, children: f }) }),
|
|
67
61
|
/* @__PURE__ */ e(
|
|
68
|
-
|
|
62
|
+
g,
|
|
69
63
|
{
|
|
70
|
-
className:
|
|
64
|
+
className: u.filterBar,
|
|
71
65
|
fullWidth: !0,
|
|
72
66
|
primaryAlign: "center",
|
|
73
67
|
secondaryAlign: "center",
|
|
74
|
-
children:
|
|
68
|
+
children: o.map((a, n) => /* @__PURE__ */ e(I, { children: a }, `action_${n}`))
|
|
75
69
|
}
|
|
76
70
|
)
|
|
77
71
|
] })
|
|
@@ -79,20 +73,20 @@ const M = "_topBar_1msoo_1", G = "_filterBar_1msoo_5", O = "_emptyTable_1msoo_9"
|
|
|
79
73
|
),
|
|
80
74
|
paginated: c,
|
|
81
75
|
sortable: !0,
|
|
82
|
-
noContentIncludeTable: !!
|
|
76
|
+
noContentIncludeTable: !!m,
|
|
83
77
|
noContentMessage: /* @__PURE__ */ e(
|
|
84
|
-
|
|
78
|
+
g,
|
|
85
79
|
{
|
|
86
80
|
fullWidth: !0,
|
|
87
81
|
primaryAlign: "center",
|
|
88
82
|
secondaryAlign: "center",
|
|
89
|
-
className:
|
|
90
|
-
children: /* @__PURE__ */ e(
|
|
83
|
+
className: u.emptyTable,
|
|
84
|
+
children: /* @__PURE__ */ e(D, { children: p })
|
|
91
85
|
}
|
|
92
86
|
)
|
|
93
87
|
}
|
|
94
88
|
) });
|
|
95
89
|
};
|
|
96
90
|
export {
|
|
97
|
-
|
|
91
|
+
F as GenericTable
|
|
98
92
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { a as i, s as e } from "../../react.esm-
|
|
2
|
+
import { a as i, s as e } from "../../react.esm-C3jDj5Fe.js";
|
|
3
3
|
import { GenericTable as c } from "./GenericTable.js";
|
|
4
4
|
import { d as B, t as d, g as t, v as r } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
B("GenericTable Test", () => {
|