@hortiview/default-components 1.4.2 → 1.4.4
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/{Iconify-CUZc8WnW.js → Iconify-aUog1Oez.js} +5 -5
- package/dist/{InfoCard-CFmkh7DJ.js → InfoCard-BxjAQiFE.js} +6 -6
- package/dist/{LoadingSpinner-DVBQ1tGJ.js → LoadingSpinner-DBMjIfY1.js} +9 -9
- package/dist/{OfflineView-DHtzNLwt-BmxTfGZq.js → OfflineView-NUM9WE0F-BI9rnget.js} +4 -4
- package/dist/assets/DefaultFormNumber.css +1 -1
- package/dist/assets/DefaultFormSelect.css +1 -1
- package/dist/assets/GenericTable.css +1 -1
- package/dist/{component-DsB0poTj-CeLHB9Ok.js → component-DsB0poTj-DgsYK0_R.js} +1 -1
- package/dist/components/DefaultFormNumber/DefaultFormNumber.js +294 -293
- package/dist/components/DefaultFormSelect/DefaultFormSelect.js +53 -53
- package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +2 -2
- package/dist/components/GenericTable/GenericTable.js +9553 -8760
- package/dist/components/HealthChecks/DataBaseHealthCheck.js +2 -2
- package/dist/components/HealthChecks/DefaultHealthCheck.js +2 -2
- package/dist/components/HealthChecks/IotServiceHealthCheck.js +2 -2
- package/dist/components/HealthChecks/PlatformHealthCheck.js +2 -2
- package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +2 -2
- package/dist/components/OfflineView/OfflineView.js +2 -2
- package/dist/{index.es-IXyb5F6n-B5afcHX8.js → correct-is-regexp-logic-BBlm4UpN-CvII841s.js} +147 -106
- package/dist/{index.es-0QJC9VS2-CNPew9LK.js → index.es-B0QNuIUR-Bte5aF5M.js} +16 -16
- package/dist/{index.es-Bo1Rhtyb-B650l9Yk.js → index.es-CIsLNz4j-ZEEcPmTs.js} +1 -1
- package/dist/{index.es-DENZVv7_-PUEN9sIa.js → index.es-CvHDFF6V-CjZvA03R.js} +25 -25
- package/dist/{index.es-Cq04gn3U-Bvzrqtm6.js → index.es-DiONypF4-eT98Y3u_.js} +19 -19
- package/dist/{index.es-Bg8hxXM8-BlFd894m.js → index.es-DnEIFMjv-DuuORGfo.js} +234 -273
- package/dist/{index.es-BGordhUK-C36NK84Q.js → index.es-NEYPxnlS-C8xQv2De.js} +42 -42
- package/dist/{index.es-CK4oZMKs-Da8pin7D.js → index.es-fV9oWpEf-BXuhoGtE.js} +4790 -4493
- package/dist/{isTypedArray-Dw_IY7Zq-BZ-4N8-Z.js → isTypedArray-Dw_IY7Zq-wj3MphCb.js} +61 -61
- package/dist/{slicedToArray-BWk2gTCn-Cfzj7tjm.js → slicedToArray-h0Nnkd_P-C4SkVJMK.js} +137 -137
- package/dist/{useHelperText-3ahu6tTS.js → useHelperText-B7OMZXvE.js} +44 -44
- package/dist/{useTranslation-CVaIJbcK.js → useTranslation-B_lNCuLm.js} +2344 -2278
- package/package.json +5 -4
- /package/dist/assets/{OfflineView-DHtzNLwt.css → OfflineView-NUM9WE0F.css} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as o, Fragment as I, jsxs as
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { useEffect as
|
|
5
|
-
import { useFormContext as Z, Controller as
|
|
6
|
-
import { I as k,
|
|
7
|
-
import { O as Q, D as R } from "../../index.es-
|
|
1
|
+
import { jsx as o, Fragment as I, jsxs as q } from "react/jsx-runtime";
|
|
2
|
+
import { a as b, v as U } from "../../useHelperText-B7OMZXvE.js";
|
|
3
|
+
import { z as W, ao as X, u as Y } from "../../useTranslation-B_lNCuLm.js";
|
|
4
|
+
import { useEffect as K, useMemo as P } from "react";
|
|
5
|
+
import { useFormContext as Z, Controller as N } from "react-hook-form";
|
|
6
|
+
import { I as k, K as G, V as J } from "../../index.es-fV9oWpEf-BXuhoGtE.js";
|
|
7
|
+
import { O as Q, D as R } from "../../index.es-NEYPxnlS-C8xQv2De.js";
|
|
8
8
|
import { InternationalizationWrapper as ee } from "../InternationalizationWrapper/InternationalizationWrapper.js";
|
|
9
|
-
import '../../assets/DefaultFormSelect.css';const te = "
|
|
9
|
+
import '../../assets/DefaultFormSelect.css';const te = "_customPortal_1u11g_1", le = "_customSelect_1u11g_8", A = {
|
|
10
10
|
customPortal: te,
|
|
11
11
|
customSelect: le
|
|
12
12
|
}, oe = ({
|
|
@@ -15,18 +15,18 @@ import '../../assets/DefaultFormSelect.css';const te = "_customPortal_8wq49_1",
|
|
|
15
15
|
"data-testid": l = "custom-select",
|
|
16
16
|
className: r,
|
|
17
17
|
hoisted: u,
|
|
18
|
-
...
|
|
18
|
+
..._
|
|
19
19
|
}) => {
|
|
20
20
|
const c = `custom-portal-${t ?? "default"}`, n = k("elementSelectForTestId-");
|
|
21
|
-
return
|
|
21
|
+
return K(() => {
|
|
22
22
|
if (u && !document.getElementById(c)) {
|
|
23
23
|
const s = document.createElement("div");
|
|
24
|
-
s.id = c, s.className = `${
|
|
24
|
+
s.id = c, s.className = `${A.customPortal} ${t ?? ""}`, document.body.appendChild(s);
|
|
25
25
|
}
|
|
26
|
-
}, [u, c, t]),
|
|
26
|
+
}, [u, c, t]), K(() => {
|
|
27
27
|
const s = document.querySelectorAll(`#${n} input[role="combobox"]`);
|
|
28
|
-
s && s.forEach((
|
|
29
|
-
|
|
28
|
+
s && s.forEach((x) => {
|
|
29
|
+
x.setAttribute("data-testid", l);
|
|
30
30
|
});
|
|
31
31
|
}, [l, n]), /* @__PURE__ */ o(
|
|
32
32
|
G,
|
|
@@ -35,8 +35,8 @@ import '../../assets/DefaultFormSelect.css';const te = "_customPortal_8wq49_1",
|
|
|
35
35
|
hoisted: u,
|
|
36
36
|
id: n,
|
|
37
37
|
portalContainer: document.getElementById(c) ? `#${c}` : void 0,
|
|
38
|
-
className: `${
|
|
39
|
-
...
|
|
38
|
+
className: `${A.customSelect} ${r ?? ""}`,
|
|
39
|
+
..._
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
42
|
};
|
|
@@ -44,7 +44,7 @@ var ae = X();
|
|
|
44
44
|
const ie = /* @__PURE__ */ W(ae), ne = ({ value: e, textKey: t, valueKey: l }) => {
|
|
45
45
|
if (!(!e || e.length === 0))
|
|
46
46
|
return Array.isArray(e) ? /* @__PURE__ */ o(Q, { "data-testid": "select-tooltip", direction: "vertical", gap: "dense", children: e == null ? void 0 : e.map((r) => /* @__PURE__ */ o(R, { level: 2, children: r[t] }, r[l])) }) : e == null ? void 0 : e[t];
|
|
47
|
-
}, re = "
|
|
47
|
+
}, re = "_invalidHelperText_zh2wu_1", se = "_invalidBorder_zh2wu_5", de = "_invalidPlaceholder_zh2wu_9", ce = "_invalidDropdownIcon_zh2wu_13", me = "_formSelectContainer_zh2wu_18", ue = "_formSelect_zh2wu_18", pe = "_multiText_zh2wu_53", he = "_tooltip_zh2wu_62", fe = "_disabled_zh2wu_67", d = {
|
|
48
48
|
invalidHelperText: re,
|
|
49
49
|
invalidBorder: se,
|
|
50
50
|
invalidPlaceholder: de,
|
|
@@ -52,19 +52,19 @@ const ie = /* @__PURE__ */ W(ae), ne = ({ value: e, textKey: t, valueKey: l }) =
|
|
|
52
52
|
formSelectContainer: me,
|
|
53
53
|
formSelect: ue,
|
|
54
54
|
multiText: pe,
|
|
55
|
-
tooltip:
|
|
56
|
-
disabled:
|
|
55
|
+
tooltip: he,
|
|
56
|
+
disabled: fe
|
|
57
57
|
}, ve = ({
|
|
58
58
|
propertyName: e,
|
|
59
59
|
label: t,
|
|
60
60
|
options: l,
|
|
61
61
|
multi: r = !1,
|
|
62
62
|
disabled: u = !1,
|
|
63
|
-
hoisted:
|
|
63
|
+
hoisted: _ = !1,
|
|
64
64
|
hidden: c = !1,
|
|
65
65
|
valueKey: n = "value",
|
|
66
66
|
textKey: s = "text",
|
|
67
|
-
clearable:
|
|
67
|
+
clearable: x = !1,
|
|
68
68
|
searchable: M = !0,
|
|
69
69
|
noOptionsMessage: S = "",
|
|
70
70
|
rules: p,
|
|
@@ -74,82 +74,82 @@ const ie = /* @__PURE__ */ W(ae), ne = ({ value: e, textKey: t, valueKey: l }) =
|
|
|
74
74
|
const {
|
|
75
75
|
control: T,
|
|
76
76
|
getFieldState: F,
|
|
77
|
-
formState: { errors:
|
|
78
|
-
} = Z(),
|
|
79
|
-
() => !C &&
|
|
80
|
-
[
|
|
81
|
-
),
|
|
77
|
+
formState: { errors: w, isValidating: C }
|
|
78
|
+
} = Z(), H = P(
|
|
79
|
+
() => !C && b(w, e) !== void 0,
|
|
80
|
+
[w, e, C]
|
|
81
|
+
), O = P(
|
|
82
82
|
() => {
|
|
83
|
-
var
|
|
84
|
-
return (
|
|
83
|
+
var g;
|
|
84
|
+
return (g = p == null ? void 0 : p.required) == null ? void 0 : g.message;
|
|
85
85
|
},
|
|
86
86
|
[p]
|
|
87
|
-
), { helperText:
|
|
87
|
+
), { helperText: $, helperTextPersistent: B } = U({
|
|
88
88
|
propertyName: e,
|
|
89
89
|
helperText: a.helperText,
|
|
90
|
-
requiredText:
|
|
90
|
+
requiredText: O,
|
|
91
91
|
hasCharacterCount: !1
|
|
92
92
|
});
|
|
93
|
-
return c ? /* @__PURE__ */ o(
|
|
93
|
+
return c ? /* @__PURE__ */ o(N, { name: e, control: T, render: () => /* @__PURE__ */ o(I, {}) }) : /* @__PURE__ */ o(
|
|
94
94
|
"div",
|
|
95
95
|
{
|
|
96
96
|
"data-testid": "form-select-container",
|
|
97
97
|
className: d.formSelectContainer,
|
|
98
98
|
"data-tooltip-id": t,
|
|
99
99
|
children: /* @__PURE__ */ o(
|
|
100
|
-
|
|
100
|
+
N,
|
|
101
101
|
{
|
|
102
102
|
name: e,
|
|
103
103
|
rules: p,
|
|
104
104
|
control: T,
|
|
105
|
-
render: ({ field: { ref:
|
|
105
|
+
render: ({ field: { ref: g, onChange: y, value: h, ...E } }) => {
|
|
106
106
|
let m = l;
|
|
107
|
-
ie(l) &&
|
|
108
|
-
const
|
|
109
|
-
(i) =>
|
|
110
|
-
) : m == null ? void 0 : m.find((i) => i[n] ===
|
|
107
|
+
ie(l) && b(l[0], "options") !== void 0 && (m = l.flatMap((i) => b(i, "options") ?? []));
|
|
108
|
+
const f = r ? m == null ? void 0 : m.filter(
|
|
109
|
+
(i) => h == null ? void 0 : h.includes(i[n])
|
|
110
|
+
) : m == null ? void 0 : m.find((i) => i[n] === h), V = r && a.multiDisplayType === "text" && a.fixedHeightInput, v = F(e).invalid, L = `
|
|
111
111
|
${d.formSelect}
|
|
112
112
|
${v ? d.invalidHelperText : ""}
|
|
113
113
|
${v ? d.invalidDropdownIcon : ""}
|
|
114
114
|
${v ? d.invalidBorder : ""}
|
|
115
115
|
${v ? d.invalidPlaceholder : ""}
|
|
116
|
-
${
|
|
116
|
+
${V ? d.multiText : ""}
|
|
117
117
|
${u ? d.disabled : ""}`;
|
|
118
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ q(I, { children: [
|
|
119
119
|
/* @__PURE__ */ o(
|
|
120
120
|
oe,
|
|
121
121
|
{
|
|
122
|
-
...
|
|
122
|
+
...E,
|
|
123
123
|
...a,
|
|
124
|
-
value:
|
|
124
|
+
value: f ?? [],
|
|
125
125
|
label: t,
|
|
126
126
|
variant: "outlined",
|
|
127
|
-
helperText:
|
|
128
|
-
helperTextPersistent:
|
|
127
|
+
helperText: $,
|
|
128
|
+
helperTextPersistent: B,
|
|
129
129
|
options: l,
|
|
130
|
-
valid:
|
|
130
|
+
valid: !H,
|
|
131
131
|
"data-testid": a["data-testid"] ?? `select-${e}`,
|
|
132
132
|
multiSelect: !(l != null && l.length) && S ? !1 : r,
|
|
133
|
-
className:
|
|
133
|
+
className: L,
|
|
134
134
|
disabled: u,
|
|
135
135
|
valueKey: n,
|
|
136
136
|
textKey: s,
|
|
137
137
|
onChange: (i) => {
|
|
138
|
-
var
|
|
138
|
+
var z;
|
|
139
139
|
if (i == null) {
|
|
140
|
-
|
|
140
|
+
y(i);
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
143
143
|
if (r) {
|
|
144
|
-
|
|
144
|
+
y(i.map((j) => j[n]));
|
|
145
145
|
return;
|
|
146
146
|
}
|
|
147
|
-
|
|
147
|
+
y(i[n]), (z = a == null ? void 0 : a.onChange) == null || z.call(a, i);
|
|
148
148
|
},
|
|
149
|
-
hoisted:
|
|
149
|
+
hoisted: _,
|
|
150
150
|
noOptionsMessage: S,
|
|
151
151
|
searchable: M,
|
|
152
|
-
clearable:
|
|
152
|
+
clearable: x,
|
|
153
153
|
menuPosition: D
|
|
154
154
|
}
|
|
155
155
|
),
|
|
@@ -161,8 +161,8 @@ const ie = /* @__PURE__ */ W(ae), ne = ({ value: e, textKey: t, valueKey: l }) =
|
|
|
161
161
|
place: "bottom",
|
|
162
162
|
delayShow: 420,
|
|
163
163
|
className: d.tooltip,
|
|
164
|
-
hidden: !
|
|
165
|
-
children: /* @__PURE__ */ o(ne, { value:
|
|
164
|
+
hidden: !f || f.length === 0 || !a.fixedHeightInput,
|
|
165
|
+
children: /* @__PURE__ */ o(ne, { value: f, textKey: s, valueKey: n })
|
|
166
166
|
}
|
|
167
167
|
)
|
|
168
168
|
] });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { N as t } from "../../LoadingSpinner-
|
|
2
|
+
import { N as t } from "../../LoadingSpinner-DBMjIfY1.js";
|
|
3
3
|
import { InternationalizationWrapper as o } from "../InternationalizationWrapper/InternationalizationWrapper.js";
|
|
4
|
-
import { u as a } from "../../useTranslation-
|
|
4
|
+
import { u as a } from "../../useTranslation-B_lNCuLm.js";
|
|
5
5
|
const l = ({ ...n }) => {
|
|
6
6
|
const { t: r } = a();
|
|
7
7
|
return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(t, { ...n, text: r("loadingSpinner.baseMessage"), impatienceMessage: null }) });
|