@hortiview/shared-components 2.8.7 → 2.8.8
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [2.8.8](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.8.7...v2.8.8) (2025-12-19)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* alignment issue with helpertext for select component ([8eba98f](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/8eba98f4872a84c755e3719b375478cb9b73f508))
|
|
6
|
+
|
|
1
7
|
## [2.8.7](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.8.6...v2.8.7) (2025-12-18)
|
|
2
8
|
|
|
3
9
|
### Code Refactoring
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._invalidHelperText_u3es9_1+*[class*=mdc-select-helper-text]{color:var(--lmnt-theme-danger)!important}._invalidBorder_u3es9_5 *[class*=mdc-notched-outline]{border-color:var(--lmnt-theme-danger)!important}._invalidPlaceholder_u3es9_9 *[class*=lmnt-select-label]{color:var(--lmnt-theme-danger)!important}._invalidDropdownIcon_u3es9_13 *[class*=mdc-select__dropdown-icon]{fill:var(--lmnt-theme-danger)!important}._formSelectContainer_u3es9_18{display:flex;flex-wrap:wrap;width:100%}._formSelectContainer_u3es9_18>*[class*=lmnt-select-container]{flex-direction:column}._formSelectContainer_u3es9_18 *[class*=mdc-select-helper-text]{color:var(--lmnt-helper-text-color);align-self:flex-start}._formSelectContainer_u3es9_18 *[class*=lmnt__multi-value__label]{overflow:visible}._formSelect_u3es9_18 *[class*=lmnt-select-menu]{z-index:2001}._multiText_u3es9_45 *[class*=lmnt-select-value-container]{white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis;display:block!important;padding:1.125rem 0!important}._tooltip_u3es9_54{z-index:42}._disabled_u3es9_59+*[class*=mdc-select-helper-text]{color:var(--lmnt-theme-on-surface-disabled)}[id*=select-container][class*=top] [class*=mdc-menu-surface--open]{bottom:0}[id*=select-container][class*=bottom] [class*=mdc-menu-surface--open]{top:0}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as o, Fragment as
|
|
2
|
-
import { g as
|
|
1
|
+
import { jsx as o, Fragment as C, jsxs as z } from "react/jsx-runtime";
|
|
2
|
+
import { g as _ } from "../../../get-DuK51wnj.js";
|
|
3
3
|
import { i as G } from "../../../isArray-Dub1wGJM.js";
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { useFormContext as J, Controller as
|
|
4
|
+
import { useMemo as $ } from "react";
|
|
5
|
+
import { useFormContext as J, Controller as H } from "react-hook-form";
|
|
6
6
|
import { M as L } from "../../../react-tooltip.min-DSY6KDqS.js";
|
|
7
7
|
import { useHelperText as O } from "../../../hooks/useHelperText.js";
|
|
8
8
|
import { Select as Q } from "../../Select/Select.js";
|
|
9
9
|
import { SelectTooltipText as R } from "./SelectTooltipText.js";
|
|
10
|
-
import '../../../assets/FormSelect.css';const U = "
|
|
10
|
+
import '../../../assets/FormSelect.css';const U = "_invalidHelperText_u3es9_1", W = "_invalidBorder_u3es9_5", X = "_invalidPlaceholder_u3es9_9", Y = "_invalidDropdownIcon_u3es9_13", Z = "_formSelectContainer_u3es9_18", N = "_formSelect_u3es9_18", y = "_multiText_u3es9_45", K = "_tooltip_u3es9_54", ee = "_disabled_u3es9_59", t = {
|
|
11
11
|
invalidHelperText: U,
|
|
12
12
|
invalidBorder: W,
|
|
13
13
|
invalidPlaceholder: X,
|
|
@@ -19,109 +19,109 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_1qcz0_1",
|
|
|
19
19
|
disabled: ee
|
|
20
20
|
}, fe = ({
|
|
21
21
|
propertyName: i,
|
|
22
|
-
label:
|
|
22
|
+
label: c,
|
|
23
23
|
options: r,
|
|
24
24
|
multi: a = !1,
|
|
25
|
-
disabled:
|
|
26
|
-
hoisted:
|
|
27
|
-
hidden:
|
|
25
|
+
disabled: x = !1,
|
|
26
|
+
hoisted: I = !1,
|
|
27
|
+
hidden: w = !1,
|
|
28
28
|
valueKey: n = "value",
|
|
29
|
-
textKey:
|
|
30
|
-
clearable:
|
|
31
|
-
searchable:
|
|
29
|
+
textKey: h = "text",
|
|
30
|
+
clearable: D = !1,
|
|
31
|
+
searchable: P = !0,
|
|
32
32
|
noOptionsMessage: T = "",
|
|
33
33
|
rules: f,
|
|
34
|
-
menuPosition:
|
|
34
|
+
menuPosition: B = "auto",
|
|
35
35
|
...l
|
|
36
36
|
}) => {
|
|
37
37
|
const {
|
|
38
38
|
control: v,
|
|
39
|
-
getFieldState:
|
|
40
|
-
formState: { errors: S, isValidating:
|
|
41
|
-
} = J(),
|
|
42
|
-
() => !
|
|
43
|
-
[S, i,
|
|
44
|
-
),
|
|
39
|
+
getFieldState: F,
|
|
40
|
+
formState: { errors: S, isValidating: p }
|
|
41
|
+
} = J(), b = $(
|
|
42
|
+
() => !p && _(S, i) !== void 0,
|
|
43
|
+
[S, i, p]
|
|
44
|
+
), M = $(
|
|
45
45
|
() => f?.required?.message,
|
|
46
46
|
[f]
|
|
47
|
-
), { helperText:
|
|
47
|
+
), { helperText: j, helperTextPersistent: q } = O({
|
|
48
48
|
propertyName: i,
|
|
49
49
|
helperText: l.helperText,
|
|
50
|
-
requiredText:
|
|
50
|
+
requiredText: M,
|
|
51
51
|
hasCharacterCount: !1
|
|
52
52
|
});
|
|
53
|
-
return
|
|
53
|
+
return w ? /* @__PURE__ */ o(H, { name: i, control: v, render: () => /* @__PURE__ */ o(C, {}) }) : /* @__PURE__ */ o(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
56
|
"data-testid": "form-select-container",
|
|
57
57
|
className: t.formSelectContainer,
|
|
58
|
-
"data-tooltip-id":
|
|
58
|
+
"data-tooltip-id": c,
|
|
59
59
|
children: /* @__PURE__ */ o(
|
|
60
|
-
|
|
60
|
+
H,
|
|
61
61
|
{
|
|
62
62
|
name: i,
|
|
63
63
|
rules: f,
|
|
64
64
|
control: v,
|
|
65
|
-
render: ({ field: { ref: te, onChange: m, value:
|
|
66
|
-
let
|
|
67
|
-
G(r) &&
|
|
68
|
-
const d = a ?
|
|
69
|
-
(e) =>
|
|
70
|
-
) :
|
|
65
|
+
render: ({ field: { ref: te, onChange: m, value: g, ...A } }) => {
|
|
66
|
+
let u = r;
|
|
67
|
+
G(r) && _(r[0], "options") !== void 0 && (u = r.flatMap((e) => _(e, "options") ?? []));
|
|
68
|
+
const d = a ? u?.filter(
|
|
69
|
+
(e) => g?.includes(e[n])
|
|
70
|
+
) : u?.find((e) => e[n] === g), E = a && l.multiDisplayType === "text" && l.fixedHeightInput, s = F(i).invalid, V = `
|
|
71
71
|
${t.formSelect}
|
|
72
|
-
${
|
|
73
|
-
${
|
|
74
|
-
${
|
|
75
|
-
${
|
|
76
|
-
${
|
|
77
|
-
${
|
|
78
|
-
return /* @__PURE__ */
|
|
72
|
+
${s ? t.invalidHelperText : ""}
|
|
73
|
+
${s ? t.invalidDropdownIcon : ""}
|
|
74
|
+
${s ? t.invalidBorder : ""}
|
|
75
|
+
${s ? t.invalidPlaceholder : ""}
|
|
76
|
+
${E ? t.multiText : ""}
|
|
77
|
+
${x ? t.disabled : ""}`;
|
|
78
|
+
return /* @__PURE__ */ z(C, { children: [
|
|
79
79
|
/* @__PURE__ */ o(
|
|
80
80
|
Q,
|
|
81
81
|
{
|
|
82
|
-
...
|
|
82
|
+
...A,
|
|
83
83
|
...l,
|
|
84
84
|
value: d ?? [],
|
|
85
|
-
label:
|
|
85
|
+
label: c,
|
|
86
86
|
variant: "outlined",
|
|
87
|
-
helperText:
|
|
88
|
-
helperTextPersistent:
|
|
87
|
+
helperText: j,
|
|
88
|
+
helperTextPersistent: q,
|
|
89
89
|
options: r,
|
|
90
|
-
valid: !
|
|
90
|
+
valid: !b,
|
|
91
91
|
"data-testid": l["data-testid"] ?? `select-${i}`,
|
|
92
92
|
multiSelect: !r?.length && T ? !1 : a,
|
|
93
|
-
className:
|
|
94
|
-
disabled:
|
|
93
|
+
className: V,
|
|
94
|
+
disabled: x,
|
|
95
95
|
valueKey: n,
|
|
96
|
-
textKey:
|
|
96
|
+
textKey: h,
|
|
97
97
|
onChange: (e) => {
|
|
98
98
|
if (e == null) {
|
|
99
99
|
m(e);
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
if (a) {
|
|
103
|
-
m(e.map((
|
|
103
|
+
m(e.map((k) => k[n]));
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
m(e[n]), l?.onChange?.(e);
|
|
107
107
|
},
|
|
108
|
-
hoisted:
|
|
108
|
+
hoisted: I,
|
|
109
109
|
noOptionsMessage: T,
|
|
110
|
-
searchable:
|
|
111
|
-
clearable:
|
|
112
|
-
menuPosition:
|
|
110
|
+
searchable: P,
|
|
111
|
+
clearable: D,
|
|
112
|
+
menuPosition: B
|
|
113
113
|
}
|
|
114
114
|
),
|
|
115
115
|
/* @__PURE__ */ o(
|
|
116
116
|
L,
|
|
117
117
|
{
|
|
118
|
-
id:
|
|
118
|
+
id: c,
|
|
119
119
|
noArrow: !0,
|
|
120
120
|
place: "bottom",
|
|
121
121
|
delayShow: 420,
|
|
122
122
|
className: t.tooltip,
|
|
123
123
|
hidden: !d || d.length === 0 || !l.fixedHeightInput,
|
|
124
|
-
children: /* @__PURE__ */ o(R, { value: d, textKey:
|
|
124
|
+
children: /* @__PURE__ */ o(R, { value: d, textKey: h, valueKey: n })
|
|
125
125
|
}
|
|
126
126
|
)
|
|
127
127
|
] });
|
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": "2.8.
|
|
4
|
+
"version": "2.8.8",
|
|
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>",
|