@hortiview/shared-components 0.0.8286 → 0.0.8373
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/formSelect.css +1 -1
- package/dist/components/Filter/Filter.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +38 -38
- package/dist/components/GenericTable/GenericTable.js +1 -1
- package/dist/formSelect.module-DMHh1bp8.js +12 -0
- package/package.json +1 -1
- package/dist/formSelect.module-C18N-SsT.js +0 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._invalid_1iwpu_1+*[class*=mdc-select-helper-text]{color:var(--lmnt-theme-danger)!important}._formSelectContainer_1iwpu_6{display:flex;flex-wrap:wrap;width:100%}._formSelectContainer_1iwpu_6 *[class*=mdc-select-helper-text]{color:var(--lmnt-helper-text-color)}._formSelectContainer_1iwpu_6 *[class*=lmnt__multi-value__label]{overflow:visible}._formSelect_1iwpu_6+*[class*=mdc-select-helper-text]{margin-bottom:-19.33px!important}._formSelect_1iwpu_6 *[class*=lmnt-select-menu]{z-index:2001}._multiText_1iwpu_32 *[class*=lmnt-select-value-container]{white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis;display:block!important;padding:1.125rem 0!important}._tooltip_1iwpu_41{z-index:42}._disabled_1iwpu_46+*[class*=mdc-select-helper-text]{color:var(--lmnt-theme-on-surface-disabled)}
|
|
@@ -32,7 +32,7 @@ import "../../loadingSpinner.module-CLtqSMWA.js";
|
|
|
32
32
|
import "../Scrollbar/Scrollbar.js";
|
|
33
33
|
import "react-hook-form";
|
|
34
34
|
import "../../formDatePicker.module-BV3ma_7y.js";
|
|
35
|
-
import "../../formSelect.module-
|
|
35
|
+
import "../../formSelect.module-DMHh1bp8.js";
|
|
36
36
|
import "../../formText.module-C0by6_DK.js";
|
|
37
37
|
const St = ({
|
|
38
38
|
clearFilterText: m,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, Fragment as
|
|
1
|
+
import { jsx as e, Fragment as $, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import { Select as k } from "@element/react-components";
|
|
3
3
|
import { g as h } from "../../../get-UxX31Aph.js";
|
|
4
4
|
import { i as z } from "../../../isArray-Ca4KR8TK.js";
|
|
@@ -6,72 +6,72 @@ import { useMemo as S } from "react";
|
|
|
6
6
|
import { useFormContext as B, Controller as C } from "react-hook-form";
|
|
7
7
|
import { H as G } from "../../../react-tooltip.min-BzHiZW8k.js";
|
|
8
8
|
import { SelectTooltipText as J } from "./SelectTooltipText.js";
|
|
9
|
-
import { s as
|
|
9
|
+
import { s as n } from "../../../formSelect.module-DMHh1bp8.js";
|
|
10
10
|
const N = ({
|
|
11
11
|
propertyName: r,
|
|
12
12
|
label: d,
|
|
13
|
-
options:
|
|
13
|
+
options: o,
|
|
14
14
|
multi: m = !1,
|
|
15
|
-
disabled:
|
|
16
|
-
hoisted:
|
|
17
|
-
hidden:
|
|
15
|
+
disabled: T = !1,
|
|
16
|
+
hoisted: F = !1,
|
|
17
|
+
hidden: I = !1,
|
|
18
18
|
valueKey: i = "value",
|
|
19
|
-
textKey:
|
|
19
|
+
textKey: p = "text",
|
|
20
20
|
clearable: j = !1,
|
|
21
21
|
searchable: v = !0,
|
|
22
22
|
noOptionsMessage: w = "",
|
|
23
|
-
rules:
|
|
24
|
-
...
|
|
23
|
+
rules: l,
|
|
24
|
+
...s
|
|
25
25
|
}) => {
|
|
26
26
|
const {
|
|
27
|
-
control:
|
|
28
|
-
formState: { errors:
|
|
27
|
+
control: H,
|
|
28
|
+
formState: { errors: a, isValidating: q }
|
|
29
29
|
} = B(), c = S(
|
|
30
|
-
() => !
|
|
31
|
-
[
|
|
30
|
+
() => !q && h(a, r) !== void 0,
|
|
31
|
+
[a, r, q]
|
|
32
32
|
), A = S(
|
|
33
|
-
() =>
|
|
34
|
-
[
|
|
33
|
+
() => l?.required?.value,
|
|
34
|
+
[l]
|
|
35
35
|
), D = S(
|
|
36
|
-
() =>
|
|
37
|
-
[
|
|
36
|
+
() => l?.required?.message,
|
|
37
|
+
[l]
|
|
38
38
|
), E = () => {
|
|
39
|
-
if (
|
|
40
|
-
const u =
|
|
39
|
+
if (a && a[r]) {
|
|
40
|
+
const u = a[r]?.message;
|
|
41
41
|
return u || "Invalid input";
|
|
42
42
|
}
|
|
43
43
|
return D;
|
|
44
44
|
};
|
|
45
|
-
return
|
|
45
|
+
return I ? /* @__PURE__ */ e(C, { name: r, control: H, render: () => /* @__PURE__ */ e($, {}) }) : /* @__PURE__ */ e("div", { className: n.formSelectContainer, "data-tooltip-id": d, children: /* @__PURE__ */ e(
|
|
46
46
|
C,
|
|
47
47
|
{
|
|
48
48
|
name: r,
|
|
49
|
-
rules:
|
|
50
|
-
control:
|
|
51
|
-
render: ({ field: { ref: u, onChange: x, value:
|
|
52
|
-
let g =
|
|
53
|
-
z(
|
|
49
|
+
rules: l,
|
|
50
|
+
control: H,
|
|
51
|
+
render: ({ field: { ref: u, onChange: x, value: M, ...O } }) => {
|
|
52
|
+
let g = o;
|
|
53
|
+
z(o) && h(o[0], "options") !== void 0 && (g = o.flatMap((t) => h(t, "options") ?? []));
|
|
54
54
|
const f = m ? g?.filter(
|
|
55
|
-
(t) =>
|
|
56
|
-
) : g?.find((t) => t[i] ===
|
|
57
|
-
return /* @__PURE__ */ b(
|
|
55
|
+
(t) => M?.includes(t[i])
|
|
56
|
+
) : g?.find((t) => t[i] === M), P = m && s.multiDisplayType === "text" && s.fixedHeightInput;
|
|
57
|
+
return /* @__PURE__ */ b($, { children: [
|
|
58
58
|
/* @__PURE__ */ e(
|
|
59
59
|
k,
|
|
60
60
|
{
|
|
61
61
|
...O,
|
|
62
|
-
...
|
|
62
|
+
...s,
|
|
63
63
|
value: f ?? [],
|
|
64
64
|
label: d,
|
|
65
65
|
variant: "outlined",
|
|
66
66
|
helperText: E(),
|
|
67
67
|
helperTextPersistent: A || c,
|
|
68
|
-
options:
|
|
68
|
+
options: o,
|
|
69
69
|
valid: !c,
|
|
70
70
|
multiSelect: m,
|
|
71
|
-
className: `${
|
|
72
|
-
disabled:
|
|
71
|
+
className: `${n.formSelect} ${c ? n.invalid : ""} ${P ? n.multiText : ""} ${T ? n.disabled : ""}`,
|
|
72
|
+
disabled: T,
|
|
73
73
|
valueKey: i,
|
|
74
|
-
textKey:
|
|
74
|
+
textKey: p,
|
|
75
75
|
onChange: (t) => {
|
|
76
76
|
if (t == null) {
|
|
77
77
|
x(t);
|
|
@@ -81,9 +81,9 @@ const N = ({
|
|
|
81
81
|
x(t.map((V) => V[i]));
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
|
-
x(t[i]),
|
|
84
|
+
x(t[i]), s?.onChange?.(t);
|
|
85
85
|
},
|
|
86
|
-
hoisted:
|
|
86
|
+
hoisted: F,
|
|
87
87
|
noOptionsMessage: w,
|
|
88
88
|
searchable: v,
|
|
89
89
|
clearable: j,
|
|
@@ -97,9 +97,9 @@ const N = ({
|
|
|
97
97
|
noArrow: !0,
|
|
98
98
|
place: "bottom",
|
|
99
99
|
delayShow: 420,
|
|
100
|
-
className:
|
|
101
|
-
hidden: !f || f.length === 0 || !
|
|
102
|
-
children: /* @__PURE__ */ e(J, { value: f, textKey:
|
|
100
|
+
className: n.tooltip,
|
|
101
|
+
hidden: !f || f.length === 0 || !s.fixedHeightInput,
|
|
102
|
+
children: /* @__PURE__ */ e(J, { value: f, textKey: p, valueKey: i })
|
|
103
103
|
}
|
|
104
104
|
)
|
|
105
105
|
] });
|
|
@@ -30,7 +30,7 @@ import "../../loadingSpinner.module-CLtqSMWA.js";
|
|
|
30
30
|
import "../Scrollbar/Scrollbar.js";
|
|
31
31
|
import "react-hook-form";
|
|
32
32
|
import "../../formDatePicker.module-BV3ma_7y.js";
|
|
33
|
-
import "../../formSelect.module-
|
|
33
|
+
import "../../formSelect.module-DMHh1bp8.js";
|
|
34
34
|
import "../../formText.module-C0by6_DK.js";
|
|
35
35
|
import { useGenerateColumns as _, useGenerateTableData as $ } from "./GenericTableService.js";
|
|
36
36
|
import { GenericCardList as A } from "./Mobile/GenericCardList.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./assets/formSelect.css";
|
|
2
|
+
const t = "_invalid_1iwpu_1", i = "_formSelectContainer_1iwpu_6", o = "_formSelect_1iwpu_6", e = "_multiText_1iwpu_32", l = "_tooltip_1iwpu_41", _ = "_disabled_1iwpu_46", s = {
|
|
3
|
+
invalid: t,
|
|
4
|
+
formSelectContainer: i,
|
|
5
|
+
formSelect: o,
|
|
6
|
+
multiText: e,
|
|
7
|
+
tooltip: l,
|
|
8
|
+
disabled: _
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
s
|
|
12
|
+
};
|
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.8373",
|
|
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>",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./assets/formSelect.css";
|
|
2
|
-
const t = "_invalid_9uqqc_1", o = "_formSelectContainer_9uqqc_6", e = "_formSelect_9uqqc_6", c = "_multiText_9uqqc_32", i = "_tooltip_9uqqc_41", n = {
|
|
3
|
-
invalid: t,
|
|
4
|
-
formSelectContainer: o,
|
|
5
|
-
formSelect: e,
|
|
6
|
-
multiText: c,
|
|
7
|
-
tooltip: i
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
n as s
|
|
11
|
-
};
|