@hortiview/shared-components 0.0.9015 → 0.0.9178
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-CY9lZjFd.js → Iconify-DV7QhHmp.js} +7 -6
- package/dist/_Map-CMkK6TmZ.js +54 -0
- package/dist/{_baseToString-BNXOi2Mf.js → _baseToString-CW6fzR92.js} +24 -23
- package/dist/{_equalByTag-DJhSpgVG.js → _equalByTag-D07t7TSb.js} +14 -13
- package/dist/components/BasicHeading/BasicHeading.js +1 -1
- package/dist/components/DeleteModal/DeleteModal.js +1 -1
- package/dist/components/Filter/Filter.js +5 -5
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +30024 -77
- package/dist/components/FormComponents/FormSelect/FormSelect.js +2 -2
- package/dist/components/FormComponents/FormText/FormText.js +1 -1
- package/dist/components/GenericTable/GenericTable.js +4 -4
- package/dist/components/Iconify/Iconify.js +2 -2
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/ListArea/ListArea.js +51 -51
- package/dist/components/ListArea/ListAreaService.js +1 -1
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +17 -3
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +5 -5
- package/dist/{get-UxX31Aph.js → get-BLA_8TrC.js} +2 -2
- package/dist/{iconify.module-C89oaw5b.js → iconify.module-BX040Mko.js} +18 -17
- package/dist/isArray-D_4rqWbH.js +43 -0
- package/dist/main.js +1 -1
- package/dist/services/UtilService.d.ts +6 -0
- package/dist/services/UtilService.js +12 -2
- package/dist/services/services.test.js +49 -18
- package/package.json +1 -1
- package/dist/isArray-Ca4KR8TK.js +0 -91
|
@@ -1,7 +1,7 @@
|
|
|
1
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
|
-
import { g as h } from "../../../get-
|
|
4
|
-
import { i as z } from "../../../isArray-
|
|
3
|
+
import { g as h } from "../../../get-BLA_8TrC.js";
|
|
4
|
+
import { i as z } from "../../../isArray-D_4rqWbH.js";
|
|
5
5
|
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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, Fragment as S, jsxs as J } from "react/jsx-runtime";
|
|
2
2
|
import { Textfield as K, TypoCaption as O } from "@element/react-components";
|
|
3
|
-
import { g as B } from "../../../get-
|
|
3
|
+
import { g as B } from "../../../get-BLA_8TrC.js";
|
|
4
4
|
import { useState as A, useCallback as Q, useMemo as c, useEffect as U } from "react";
|
|
5
5
|
import { useFormContext as X, Controller as j } from "react-hook-form";
|
|
6
6
|
import { s as i } from "../../../formText.module-C0by6_DK.js";
|
|
@@ -4,13 +4,13 @@ import { Fragment as C } from "react";
|
|
|
4
4
|
import { a as t } from "../../genericTable.module-Dk3yy2S3.js";
|
|
5
5
|
import { u as j } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
6
6
|
import "../../alertBanner.module-BPiKN0gh.js";
|
|
7
|
-
import "../../iconify.module-
|
|
8
|
-
import "../../isArray-
|
|
7
|
+
import "../../iconify.module-BX040Mko.js";
|
|
8
|
+
import "../../isArray-D_4rqWbH.js";
|
|
9
9
|
import "../../react-tooltip.min-BzHiZW8k.js";
|
|
10
10
|
import "../../overflowTooltip.module-YyRN2MGc.js";
|
|
11
11
|
import "../../basicHeading.module-BYb8xvuk.js";
|
|
12
|
-
import "../../_baseToString-
|
|
13
|
-
import "../../_equalByTag-
|
|
12
|
+
import "../../_baseToString-CW6fzR92.js";
|
|
13
|
+
import "../../_equalByTag-D07t7TSb.js";
|
|
14
14
|
import "../../searchBar.module-9gKyrZRT.js";
|
|
15
15
|
import "../../listArea.module-BhO_OJ1S.js";
|
|
16
16
|
import "../../verticalDivider.module-C3_GL-fH.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@element/react-components";
|
|
3
|
-
import { I as f } from "../../Iconify-
|
|
3
|
+
import { I as f } from "../../Iconify-DV7QhHmp.js";
|
|
4
4
|
import "../../enums/AvailableCustomIcons.js";
|
|
5
|
-
import "../../iconify.module-
|
|
5
|
+
import "../../iconify.module-BX040Mko.js";
|
|
6
6
|
export {
|
|
7
7
|
f as Iconify
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { I as c } from "../../Iconify-
|
|
2
|
+
import { I as c } from "../../Iconify-DV7QhHmp.js";
|
|
3
3
|
import { AvailableCustomIcons as l } from "../../enums/AvailableCustomIcons.js";
|
|
4
4
|
import { a as r, w as s, s as i } from "../../react.esm-Dy4VzU4L.js";
|
|
5
5
|
import { d as f, t as a, g as o } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as b, jsxs as S, Fragment as tr } from "react/jsx-runtime";
|
|
2
2
|
import { Elevation as ir, Divider as x, List as sr } from "@element/react-components";
|
|
3
3
|
import { g as ur } from "../../_commonjsHelpers-CT_km90n.js";
|
|
4
|
-
import { i as fr, d as lr } from "../../_baseToString-
|
|
5
|
-
import { _ as vr, a as E, b as yr, c as Q, d as Y } from "../../get-
|
|
6
|
-
import { _ as Z, a as pr, b as _r } from "../../_equalByTag-
|
|
7
|
-
import { a as c,
|
|
8
|
-
import { i as W, a as z, b as V, _ as
|
|
9
|
-
import { _ as br, i as M } from "../../Iconify-
|
|
4
|
+
import { i as fr, d as lr } from "../../_baseToString-CW6fzR92.js";
|
|
5
|
+
import { _ as vr, a as E, b as yr, c as Q, d as Y } from "../../get-BLA_8TrC.js";
|
|
6
|
+
import { _ as Z, a as pr, b as _r } from "../../_equalByTag-D07t7TSb.js";
|
|
7
|
+
import { a as c, b as or, d as $r } from "../../isArray-D_4rqWbH.js";
|
|
8
|
+
import { i as W, a as z, b as V, _ as gr, c as cr, d as Ar } from "../../iconify.module-BX040Mko.js";
|
|
9
|
+
import { _ as br, i as M } from "../../Iconify-DV7QhHmp.js";
|
|
10
10
|
import { useState as dr, useMemo as F } from "react";
|
|
11
11
|
import { SearchBar as hr } from "../SearchBar/SearchBar.js";
|
|
12
12
|
import { getGroupedItems as mr, getListedItems as Or } from "./ListAreaService.js";
|
|
@@ -48,18 +48,18 @@ function Xr(r, n) {
|
|
|
48
48
|
var a = typeof r;
|
|
49
49
|
return n = n ?? Hr, !!n && (a == "number" || a != "symbol" && Nr.test(r)) && r > -1 && r % 1 == 0 && r < n;
|
|
50
50
|
}
|
|
51
|
-
var
|
|
52
|
-
function
|
|
51
|
+
var k = Xr, Jr = Ur, Qr = W, Yr = c, Zr = z, Wr = k, zr = V, Vr = Object.prototype, kr = Vr.hasOwnProperty;
|
|
52
|
+
function jr(r, n) {
|
|
53
53
|
var a = Yr(r), e = !a && Qr(r), i = !a && !e && Zr(r), t = !a && !e && !i && zr(r), s = a || e || i || t, u = s ? Jr(r.length, String) : [], f = u.length;
|
|
54
54
|
for (var l in r)
|
|
55
|
-
(n ||
|
|
55
|
+
(n || kr.call(r, l)) && !(s && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
56
56
|
(l == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
57
57
|
i && (l == "offset" || l == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
58
58
|
t && (l == "buffer" || l == "byteLength" || l == "byteOffset") || // Skip index properties.
|
|
59
59
|
Wr(l, f))) && u.push(l);
|
|
60
60
|
return u;
|
|
61
61
|
}
|
|
62
|
-
var rn =
|
|
62
|
+
var rn = jr, nn = rn, an = br, en = M;
|
|
63
63
|
function tn(r) {
|
|
64
64
|
return en(r) ? nn(r) : an(r);
|
|
65
65
|
}
|
|
@@ -68,7 +68,7 @@ function ln(r) {
|
|
|
68
68
|
return sn(r, fn, un);
|
|
69
69
|
}
|
|
70
70
|
var vn = ln, C = vn, yn = 1, pn = Object.prototype, _n = pn.hasOwnProperty;
|
|
71
|
-
function
|
|
71
|
+
function on(r, n, a, e, i, t) {
|
|
72
72
|
var s = a & yn, u = C(r), f = u.length, l = C(n), p = l.length;
|
|
73
73
|
if (f != p && !s)
|
|
74
74
|
return !1;
|
|
@@ -77,29 +77,29 @@ function gn(r, n, a, e, i, t) {
|
|
|
77
77
|
if (!(s ? v in n : _n.call(n, v)))
|
|
78
78
|
return !1;
|
|
79
79
|
}
|
|
80
|
-
var _ = t.get(r),
|
|
81
|
-
if (_ &&
|
|
82
|
-
return _ == n &&
|
|
83
|
-
var
|
|
80
|
+
var _ = t.get(r), g = t.get(n);
|
|
81
|
+
if (_ && g)
|
|
82
|
+
return _ == n && g == r;
|
|
83
|
+
var o = !0;
|
|
84
84
|
t.set(r, n), t.set(n, r);
|
|
85
|
-
for (var
|
|
85
|
+
for (var $ = s; ++y < f; ) {
|
|
86
86
|
v = u[y];
|
|
87
87
|
var d = r[v], h = n[v];
|
|
88
88
|
if (e)
|
|
89
89
|
var B = s ? e(h, d, v, n, r, t) : e(d, h, v, r, n, t);
|
|
90
90
|
if (!(B === void 0 ? d === h || i(d, h, a, e, t) : B)) {
|
|
91
|
-
|
|
91
|
+
o = !1;
|
|
92
92
|
break;
|
|
93
93
|
}
|
|
94
|
-
|
|
94
|
+
$ || ($ = v == "constructor");
|
|
95
95
|
}
|
|
96
|
-
if (
|
|
96
|
+
if (o && !$) {
|
|
97
97
|
var m = r.constructor, O = n.constructor;
|
|
98
|
-
m != O && "constructor" in r && "constructor" in n && !(typeof m == "function" && m instanceof m && typeof O == "function" && O instanceof O) && (
|
|
98
|
+
m != O && "constructor" in r && "constructor" in n && !(typeof m == "function" && m instanceof m && typeof O == "function" && O instanceof O) && (o = !1);
|
|
99
99
|
}
|
|
100
|
-
return t.delete(r), t.delete(n),
|
|
100
|
+
return t.delete(r), t.delete(n), o;
|
|
101
101
|
}
|
|
102
|
-
var
|
|
102
|
+
var $n = on, w = Z, gn = pr, cn = _r, An = $n, I = gr, G = c, q = z, bn = V, dn = 1, D = "[object Arguments]", R = "[object Array]", P = "[object Object]", hn = Object.prototype, U = hn.hasOwnProperty;
|
|
103
103
|
function mn(r, n, a, e, i, t) {
|
|
104
104
|
var s = G(r), u = G(n), f = s ? R : I(r), l = u ? R : I(n);
|
|
105
105
|
f = f == D ? P : f, l = l == D ? P : l;
|
|
@@ -110,21 +110,21 @@ function mn(r, n, a, e, i, t) {
|
|
|
110
110
|
s = !0, p = !1;
|
|
111
111
|
}
|
|
112
112
|
if (v && !p)
|
|
113
|
-
return t || (t = new w()), s || bn(r) ?
|
|
113
|
+
return t || (t = new w()), s || bn(r) ? gn(r, n, a, e, i, t) : cn(r, n, f, a, e, i, t);
|
|
114
114
|
if (!(a & dn)) {
|
|
115
|
-
var _ = p && U.call(r, "__wrapped__"),
|
|
116
|
-
if (_ ||
|
|
117
|
-
var
|
|
118
|
-
return t || (t = new w()), i(
|
|
115
|
+
var _ = p && U.call(r, "__wrapped__"), g = y && U.call(n, "__wrapped__");
|
|
116
|
+
if (_ || g) {
|
|
117
|
+
var o = _ ? r.value() : r, $ = g ? n.value() : n;
|
|
118
|
+
return t || (t = new w()), i(o, $, a, e, t);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
return v ? (t || (t = new w()), An(r, n, a, e, i, t)) : !1;
|
|
122
122
|
}
|
|
123
|
-
var On = mn, Pn = On, H =
|
|
124
|
-
function
|
|
125
|
-
return r === n ? !0 : r == null || n == null || !H(r) && !H(n) ? r !== r && n !== n : Pn(r, n, a, e,
|
|
123
|
+
var On = mn, Pn = On, H = or;
|
|
124
|
+
function j(r, n, a, e, i) {
|
|
125
|
+
return r === n ? !0 : r == null || n == null || !H(r) && !H(n) ? r !== r && n !== n : Pn(r, n, a, e, j, i);
|
|
126
126
|
}
|
|
127
|
-
var rr =
|
|
127
|
+
var rr = j, wn = Z, Ln = rr, En = 1, Mn = 2;
|
|
128
128
|
function Tn(r, n, a, e) {
|
|
129
129
|
var i = a.length, t = i, s = !e;
|
|
130
130
|
if (r == null)
|
|
@@ -150,7 +150,7 @@ function Tn(r, n, a, e) {
|
|
|
150
150
|
}
|
|
151
151
|
return !0;
|
|
152
152
|
}
|
|
153
|
-
var Bn = Tn, Sn =
|
|
153
|
+
var Bn = Tn, Sn = $r;
|
|
154
154
|
function xn(r) {
|
|
155
155
|
return r === r && !Sn(r);
|
|
156
156
|
}
|
|
@@ -179,7 +179,7 @@ var Hn = Un;
|
|
|
179
179
|
function Nn(r, n) {
|
|
180
180
|
return r != null && n in Object(r);
|
|
181
181
|
}
|
|
182
|
-
var Xn = Nn, Jn = vr, Qn = W, Yn = c, Zn =
|
|
182
|
+
var Xn = Nn, Jn = vr, Qn = W, Yn = c, Zn = k, Wn = cr, zn = E;
|
|
183
183
|
function Vn(r, n, a) {
|
|
184
184
|
n = Jn(n, r);
|
|
185
185
|
for (var e = -1, i = n.length, t = !1; ++e < i; ) {
|
|
@@ -190,9 +190,9 @@ function Vn(r, n, a) {
|
|
|
190
190
|
}
|
|
191
191
|
return t || ++e != i ? t : (i = r == null ? 0 : r.length, !!i && Wn(i) && Zn(s, i) && (Yn(r) || Qn(r)));
|
|
192
192
|
}
|
|
193
|
-
var
|
|
193
|
+
var kn = Vn, jn = Xn, ra = kn;
|
|
194
194
|
function na(r, n) {
|
|
195
|
-
return r != null && ra(r, n,
|
|
195
|
+
return r != null && ra(r, n, jn);
|
|
196
196
|
}
|
|
197
197
|
var aa = na, ea = rr, ta = yr, ia = aa, sa = Q, ua = nr, fa = ar, la = E, va = 1, ya = 2;
|
|
198
198
|
function pa(r, n) {
|
|
@@ -202,22 +202,22 @@ function pa(r, n) {
|
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
var _a = pa;
|
|
205
|
-
function
|
|
205
|
+
function oa(r) {
|
|
206
206
|
return r;
|
|
207
207
|
}
|
|
208
|
-
var er =
|
|
209
|
-
function
|
|
208
|
+
var er = oa;
|
|
209
|
+
function $a(r) {
|
|
210
210
|
return function(n) {
|
|
211
211
|
return n?.[r];
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
|
-
var
|
|
214
|
+
var ga = $a, ca = Y;
|
|
215
215
|
function Aa(r) {
|
|
216
216
|
return function(n) {
|
|
217
217
|
return ca(n, r);
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
var ba = Aa, da =
|
|
220
|
+
var ba = Aa, da = ga, ha = ba, ma = Q, Oa = E;
|
|
221
221
|
function Pa(r) {
|
|
222
222
|
return ma(r) ? da(Oa(r)) : ha(r);
|
|
223
223
|
}
|
|
@@ -259,14 +259,14 @@ function Va(r, n) {
|
|
|
259
259
|
e[++a] = n(i, t, s);
|
|
260
260
|
}), e;
|
|
261
261
|
}
|
|
262
|
-
var
|
|
263
|
-
function
|
|
262
|
+
var ka = Va;
|
|
263
|
+
function ja(r, n) {
|
|
264
264
|
var a = r.length;
|
|
265
265
|
for (r.sort(n); a--; )
|
|
266
266
|
r[a] = r[a].value;
|
|
267
267
|
return r;
|
|
268
268
|
}
|
|
269
|
-
var re =
|
|
269
|
+
var re = ja, N = fr;
|
|
270
270
|
function ne(r, n) {
|
|
271
271
|
if (r !== n) {
|
|
272
272
|
var a = r !== void 0, e = r === null, i = r === r, t = N(r), s = n !== void 0, u = n === null, f = n === n, l = N(n);
|
|
@@ -290,8 +290,8 @@ function te(r, n, a) {
|
|
|
290
290
|
}
|
|
291
291
|
return r.index - n.index;
|
|
292
292
|
}
|
|
293
|
-
var ie = te, L = lr, se = Y, ue = xa, fe =
|
|
294
|
-
function
|
|
293
|
+
var ie = te, L = lr, se = Y, ue = xa, fe = ka, le = re, ve = Ar, ye = ie, pe = er, _e = c;
|
|
294
|
+
function oe(r, n, a) {
|
|
295
295
|
n.length ? n = L(n, function(t) {
|
|
296
296
|
return _e(t) ? function(s) {
|
|
297
297
|
return se(s, t.length === 1 ? t[0] : t);
|
|
@@ -309,9 +309,9 @@ function ge(r, n, a) {
|
|
|
309
309
|
return ye(t, s, a);
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
|
-
var
|
|
312
|
+
var $e = oe, ge = $e, X = c;
|
|
313
313
|
function ce(r, n, a, e) {
|
|
314
|
-
return r == null ? [] : (X(n) || (n = n == null ? [] : [n]), a = e ? void 0 : a, X(a) || (a = a == null ? [] : [a]),
|
|
314
|
+
return r == null ? [] : (X(n) || (n = n == null ? [] : [n]), a = e ? void 0 : a, X(a) || (a = a == null ? [] : [a]), ge(r, n, a));
|
|
315
315
|
}
|
|
316
316
|
var Ae = ce;
|
|
317
317
|
const J = /* @__PURE__ */ ur(Ae), xe = ({
|
|
@@ -330,9 +330,9 @@ const J = /* @__PURE__ */ ur(Ae), xe = ({
|
|
|
330
330
|
const [y, v] = dr(""), _ = F(() => {
|
|
331
331
|
if (!y)
|
|
332
332
|
return s ? J(r, "title") : r;
|
|
333
|
-
const
|
|
334
|
-
return s ? J(
|
|
335
|
-
}, [y, r, s]),
|
|
333
|
+
const o = r.filter(($) => $.title.toLowerCase().includes(y.toLowerCase()) || $.subTitle?.toLowerCase().includes(y.toLowerCase()) || $.overlineTitle?.toLowerCase().includes(y.toLowerCase()));
|
|
334
|
+
return s ? J(o, "title") : o;
|
|
335
|
+
}, [y, r, s]), g = F(
|
|
336
336
|
() => a ? mr(_, n, u, p) : Or(_, n, u, p),
|
|
337
337
|
[_, n, u, a, p]
|
|
338
338
|
);
|
|
@@ -354,7 +354,7 @@ const J = /* @__PURE__ */ ur(Ae), xe = ({
|
|
|
354
354
|
/* @__PURE__ */ b(
|
|
355
355
|
sr,
|
|
356
356
|
{
|
|
357
|
-
items:
|
|
357
|
+
items: g,
|
|
358
358
|
className: `${A.list} ${A.primaryText} ${a ? "" : A.roundedBottom}`,
|
|
359
359
|
style: { maxHeight: f },
|
|
360
360
|
showDivider: !1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r, jsxs as B } from "react/jsx-runtime";
|
|
2
2
|
import { TypoButton as C, Group as b, TypoSubtitle as j, TypoBody as O, Icon as G } from "@element/react-components";
|
|
3
|
-
import { I as L } from "../../Iconify-
|
|
3
|
+
import { I as L } from "../../Iconify-DV7QhHmp.js";
|
|
4
4
|
import { AvailableCustomIcons as S } from "../../enums/AvailableCustomIcons.js";
|
|
5
5
|
import { s as n } from "../../listArea.module-BhO_OJ1S.js";
|
|
6
6
|
const D = (t, a, c, l) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { TypoBody as e } from "@element/react-components";
|
|
3
3
|
import { s as r } from "../../../bigLoadingSpinner.module-GgbFol8k.js";
|
|
4
|
-
import { I as n } from "../../../Iconify-
|
|
4
|
+
import { I as n } from "../../../Iconify-DV7QhHmp.js";
|
|
5
5
|
const s = ({ text: o }) => /* @__PURE__ */ a("div", { className: r.bigLoadSpinnerCard, role: "progressbar", "data-testid": "loading-spinner", children: [
|
|
6
6
|
/* @__PURE__ */ i(n, { icon: "hortiview", className: r.logo, "data-testid": "logo-icon" }),
|
|
7
7
|
/* @__PURE__ */ i(e, { tag: "p", bold: !0, level: 1, className: r.bigLoadSpinnerCardText, children: o })
|
|
@@ -5,11 +5,18 @@ import { s as c } from "../../../loadingSpinner.module-CLtqSMWA.js";
|
|
|
5
5
|
const C = ({
|
|
6
6
|
size: i,
|
|
7
7
|
center: o = !1,
|
|
8
|
-
text: e
|
|
8
|
+
text: e,
|
|
9
9
|
textPosition: a = "bottom",
|
|
10
10
|
color: n = "primary",
|
|
11
11
|
spinnerOnly: d = !1
|
|
12
|
-
}) => i === "big" ? /* @__PURE__ */ r(p, { text: e }) : d ? /* @__PURE__ */ r(
|
|
12
|
+
}) => i === "big" ? /* @__PURE__ */ r(p, { text: e }) : d ? /* @__PURE__ */ r(
|
|
13
|
+
t,
|
|
14
|
+
{
|
|
15
|
+
"data-testid": "loading-spinner",
|
|
16
|
+
themeColor: n,
|
|
17
|
+
indicatorSize: i ?? "md"
|
|
18
|
+
}
|
|
19
|
+
) : /* @__PURE__ */ r(
|
|
13
20
|
l,
|
|
14
21
|
{
|
|
15
22
|
variant: "standard",
|
|
@@ -23,7 +30,14 @@ const C = ({
|
|
|
23
30
|
primaryAlign: "center",
|
|
24
31
|
secondaryAlign: "center",
|
|
25
32
|
children: [
|
|
26
|
-
/* @__PURE__ */ r(
|
|
33
|
+
/* @__PURE__ */ r(
|
|
34
|
+
t,
|
|
35
|
+
{
|
|
36
|
+
"data-testid": "loading-spinner",
|
|
37
|
+
themeColor: n,
|
|
38
|
+
indicatorSize: i ?? "lg"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
27
41
|
/* @__PURE__ */ r(m, { themeColor: `text-${n}-on-background`, tag: "div", children: e })
|
|
28
42
|
]
|
|
29
43
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { a as
|
|
3
|
-
import { LoadingSpinner as
|
|
2
|
+
import { a as r, s as e } from "../../../react.esm-Dy4VzU4L.js";
|
|
3
|
+
import { LoadingSpinner as o } from "./LoadingSpinner.js";
|
|
4
4
|
import { d as a, t as i, g as n } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
a("LoadingSpinner Test", () => {
|
|
6
6
|
i("render LoadingSpinner without additional params", () => {
|
|
7
|
-
|
|
7
|
+
r(/* @__PURE__ */ t(o, {})), n(e.getByRole("progressbar")).toBeInTheDocument();
|
|
8
8
|
}), i("render LoadingSpinner with spinner only", () => {
|
|
9
|
-
|
|
9
|
+
r(/* @__PURE__ */ t(o, { spinnerOnly: !0 })), n(e.getByRole("progressbar")).toBeInTheDocument(), n(e.queryByText("Loading")).not.toBeInTheDocument();
|
|
10
10
|
}), i("render LoadingSpinner with custom loading text", () => {
|
|
11
|
-
|
|
11
|
+
r(/* @__PURE__ */ t(o, { text: "Please wait..." })), n(e.getByText("Please wait...")).toBeInTheDocument();
|
|
12
12
|
});
|
|
13
13
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as a } from "./_commonjsHelpers-CT_km90n.js";
|
|
2
|
-
import { a as i } from "./isArray-
|
|
3
|
-
import { i as e, _ as o, a as f } from "./_baseToString-
|
|
2
|
+
import { a as i } from "./isArray-D_4rqWbH.js";
|
|
3
|
+
import { i as e, _ as o, a as f } from "./_baseToString-CW6fzR92.js";
|
|
4
4
|
var g = i, y = e, u = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, m = /^\w*$/;
|
|
5
5
|
function _(r, t) {
|
|
6
6
|
if (g(r))
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import "./assets/iconify.css";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { a as T, _ as P, b as V } from "./_Map-CMkK6TmZ.js";
|
|
3
|
+
import { e as g, _, b as l, g as h } from "./isArray-D_4rqWbH.js";
|
|
4
|
+
var C = T, D = g, F = C(D, "DataView"), G = F, L = T, N = g, W = L(N, "Promise"), q = W, R = T, X = g, z = R(X, "Set"), H = z, J = T, K = g, Q = J(K, "WeakMap"), Y = Q, j = G, y = P, d = q, m = H, A = Y, U = _, i = V, w = "[object Map]", Z = "[object Object]", x = "[object Promise]", M = "[object Set]", S = "[object WeakMap]", I = "[object DataView]", ee = i(j), re = i(y), ae = i(d), te = i(m), oe = i(A), s = U;
|
|
5
|
+
(j && s(new j(new ArrayBuffer(1))) != I || y && s(new y()) != w || d && s(d.resolve()) != x || m && s(new m()) != M || A && s(new A()) != S) && (s = function(e) {
|
|
5
6
|
var a = U(e), n = a == Z ? e.constructor : void 0, o = n ? i(n) : "";
|
|
6
7
|
if (o)
|
|
7
8
|
switch (o) {
|
|
@@ -18,15 +19,15 @@ var C = T, D = g, F = C(D, "DataView"), G = F, L = T, N = g, W = L(N, "Promise")
|
|
|
18
19
|
}
|
|
19
20
|
return a;
|
|
20
21
|
});
|
|
21
|
-
var
|
|
22
|
+
var or = s, se = _, ne = l, ie = "[object Arguments]";
|
|
22
23
|
function ce(e) {
|
|
23
24
|
return ne(e) && se(e) == ie;
|
|
24
25
|
}
|
|
25
|
-
var ge = ce, k = ge, be = l,
|
|
26
|
+
var ge = ce, k = ge, be = l, O = Object.prototype, pe = O.hasOwnProperty, ue = O.propertyIsEnumerable, ve = k(/* @__PURE__ */ function() {
|
|
26
27
|
return arguments;
|
|
27
28
|
}()) ? k : function(e) {
|
|
28
29
|
return be(e) && pe.call(e, "callee") && !ue.call(e, "callee");
|
|
29
|
-
},
|
|
30
|
+
}, sr = ve, fe = 9007199254740991;
|
|
30
31
|
function Te(e) {
|
|
31
32
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= fe;
|
|
32
33
|
}
|
|
@@ -40,11 +41,11 @@ v.exports;
|
|
|
40
41
|
var n = g, o = de, t = a && !a.nodeType && a, b = t && !0 && e && !e.nodeType && e, c = b && b.exports === t, p = c ? n.Buffer : void 0, u = p ? p.isBuffer : void 0, $ = u || o;
|
|
41
42
|
e.exports = $;
|
|
42
43
|
})(v, v.exports);
|
|
43
|
-
var
|
|
44
|
+
var nr = v.exports, me = _, Ae = je, _e = l, le = "[object Arguments]", $e = "[object Array]", we = "[object Boolean]", xe = "[object Date]", Me = "[object Error]", Se = "[object Function]", Ie = "[object Map]", ke = "[object Number]", Ee = "[object Object]", Be = "[object RegExp]", Ue = "[object Set]", Oe = "[object String]", Pe = "[object WeakMap]", Ve = "[object ArrayBuffer]", he = "[object DataView]", Ce = "[object Float32Array]", De = "[object Float64Array]", Fe = "[object Int8Array]", Ge = "[object Int16Array]", Le = "[object Int32Array]", Ne = "[object Uint8Array]", We = "[object Uint8ClampedArray]", qe = "[object Uint16Array]", Re = "[object Uint32Array]", r = {};
|
|
44
45
|
r[Ce] = r[De] = r[Fe] = r[Ge] = r[Le] = r[Ne] = r[We] = r[qe] = r[Re] = !0;
|
|
45
|
-
r[le] = r[$e] = r[
|
|
46
|
+
r[le] = r[$e] = r[Ve] = r[we] = r[he] = r[xe] = r[Me] = r[Se] = r[Ie] = r[ke] = r[Ee] = r[Be] = r[Ue] = r[Oe] = r[Pe] = !1;
|
|
46
47
|
function Xe(e) {
|
|
47
|
-
return
|
|
48
|
+
return _e(e) && Ae(e.length) && !!r[me(e)];
|
|
48
49
|
}
|
|
49
50
|
var ze = Xe;
|
|
50
51
|
function He(e) {
|
|
@@ -55,7 +56,7 @@ function He(e) {
|
|
|
55
56
|
var Je = He, f = { exports: {} };
|
|
56
57
|
f.exports;
|
|
57
58
|
(function(e, a) {
|
|
58
|
-
var n =
|
|
59
|
+
var n = h, o = a && !a.nodeType && a, t = o && !0 && e && !e.nodeType && e, b = t && t.exports === o, c = b && n.process, p = function() {
|
|
59
60
|
try {
|
|
60
61
|
var u = t && t.require && t.require("util").types;
|
|
61
62
|
return u || c && c.binding && c.binding("util");
|
|
@@ -64,16 +65,16 @@ f.exports;
|
|
|
64
65
|
}();
|
|
65
66
|
e.exports = p;
|
|
66
67
|
})(f, f.exports);
|
|
67
|
-
var Ke = f.exports, Qe = ze, Ye = Je, E = Ke, B = E && E.isTypedArray, Ze = B ? Ye(B) : Qe,
|
|
68
|
-
const er = "_image_178sv_1",
|
|
68
|
+
var Ke = f.exports, Qe = ze, Ye = Je, E = Ke, B = E && E.isTypedArray, Ze = B ? Ye(B) : Qe, ir = Ze;
|
|
69
|
+
const er = "_image_178sv_1", cr = {
|
|
69
70
|
image: er
|
|
70
71
|
};
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
or as _,
|
|
74
|
+
nr as a,
|
|
75
|
+
ir as b,
|
|
75
76
|
je as c,
|
|
76
77
|
Je as d,
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
sr as i,
|
|
79
|
+
cr as s
|
|
79
80
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { c as o, g as c } from "./_commonjsHelpers-CT_km90n.js";
|
|
2
|
+
var l = typeof o == "object" && o && o.Object === Object && o, y = l, v = y, T = typeof self == "object" && self && self.Object === Object && self, O = v || T || Function("return this")(), S = O, u = S, d = u.Symbol, s = d, a = s, b = Object.prototype, p = b.hasOwnProperty, m = b.toString, r = a ? a.toStringTag : void 0;
|
|
3
|
+
function $(t) {
|
|
4
|
+
var e = p.call(t, r), f = t[r];
|
|
5
|
+
try {
|
|
6
|
+
t[r] = void 0;
|
|
7
|
+
var g = !0;
|
|
8
|
+
} catch {
|
|
9
|
+
}
|
|
10
|
+
var j = m.call(t);
|
|
11
|
+
return g && (e ? t[r] = f : delete t[r]), j;
|
|
12
|
+
}
|
|
13
|
+
var _ = $, w = Object.prototype, G = w.toString;
|
|
14
|
+
function A(t) {
|
|
15
|
+
return G.call(t);
|
|
16
|
+
}
|
|
17
|
+
var h = A, n = s, P = _, R = h, k = "[object Null]", x = "[object Undefined]", i = n ? n.toStringTag : void 0;
|
|
18
|
+
function F(t) {
|
|
19
|
+
return t == null ? t === void 0 ? x : k : i && i in Object(t) ? P(t) : R(t);
|
|
20
|
+
}
|
|
21
|
+
var z = F;
|
|
22
|
+
function L(t) {
|
|
23
|
+
var e = typeof t;
|
|
24
|
+
return t != null && (e == "object" || e == "function");
|
|
25
|
+
}
|
|
26
|
+
var C = L;
|
|
27
|
+
const B = /* @__PURE__ */ c(C);
|
|
28
|
+
function D(t) {
|
|
29
|
+
return t != null && typeof t == "object";
|
|
30
|
+
}
|
|
31
|
+
var H = D, E = Array.isArray, N = E;
|
|
32
|
+
const I = /* @__PURE__ */ c(N);
|
|
33
|
+
export {
|
|
34
|
+
z as _,
|
|
35
|
+
N as a,
|
|
36
|
+
H as b,
|
|
37
|
+
B as c,
|
|
38
|
+
C as d,
|
|
39
|
+
S as e,
|
|
40
|
+
s as f,
|
|
41
|
+
y as g,
|
|
42
|
+
I as i
|
|
43
|
+
};
|
package/dist/main.js
CHANGED
|
@@ -12,7 +12,7 @@ import { Filter as u } from "./components/Filter/Filter.js";
|
|
|
12
12
|
import { GenericTable as T } from "./components/GenericTable/GenericTable.js";
|
|
13
13
|
import { HashTabView as k } from "./components/HashTabView/HashTabView.js";
|
|
14
14
|
import { HeaderFilter as I } from "./components/HeaderFilter/HeaderFilter.js";
|
|
15
|
-
import { I as A } from "./Iconify-
|
|
15
|
+
import { I as A } from "./Iconify-DV7QhHmp.js";
|
|
16
16
|
import { InfoGroup as L } from "./components/InfoGroup/InfoGroup.js";
|
|
17
17
|
import { ListArea as g } from "./components/ListArea/ListArea.js";
|
|
18
18
|
import { LoadingSpinner as G } from "./components/LoadingSpinner/Default/LoadingSpinner.js";
|
|
@@ -4,3 +4,9 @@
|
|
|
4
4
|
* @returns capitalized text string
|
|
5
5
|
*/
|
|
6
6
|
export declare const capitalizeFirstLetters: (text: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* Removes leading and trailing spaces from all properties that are typeof string from an object
|
|
9
|
+
* @param value
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare const trimLeadingAndTrailingSpaces: <T extends Record<string, unknown>>(obj: T) => T;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { _ as e, a as n, b as a, i as o, c } from "../isArray-D_4rqWbH.js";
|
|
2
|
+
import { g } from "../_commonjsHelpers-CT_km90n.js";
|
|
3
|
+
var p = e, m = n, f = a, b = "[object String]";
|
|
4
|
+
function j(r) {
|
|
5
|
+
return typeof r == "string" || !m(r) && f(r) && p(r) == b;
|
|
6
|
+
}
|
|
7
|
+
var S = j;
|
|
8
|
+
const A = /* @__PURE__ */ g(S), y = (r) => r.split(" ").map((t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()).join(" "), L = (r) => Object.fromEntries(
|
|
9
|
+
Object.entries(r).map(([t, s]) => [t, i(s)])
|
|
10
|
+
), i = (r) => o(r) ? r.map(i) : c(r) ? L(r) : A(r) ? r.trim() : r;
|
|
2
11
|
export {
|
|
3
|
-
|
|
12
|
+
y as capitalizeFirstLetters,
|
|
13
|
+
L as trimLeadingAndTrailingSpaces
|
|
4
14
|
};
|
|
@@ -1,22 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { d as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const t =
|
|
8
|
-
|
|
9
|
-
}),
|
|
10
|
-
const t =
|
|
11
|
-
|
|
1
|
+
import { getBlockNumberByDto as r } from "./BlockService.js";
|
|
2
|
+
import { capitalizeFirstLetters as i, trimLeadingAndTrailingSpaces as o } from "./UtilService.js";
|
|
3
|
+
import { d as n, t as e, g as s } from "../vi.JYQecGiw-BbUbJcT8.js";
|
|
4
|
+
n("Services Test", () => {
|
|
5
|
+
n("capitalizeFirstLetters", () => {
|
|
6
|
+
e("should capitalize first letters of a lower case string", () => {
|
|
7
|
+
const t = i("farm location");
|
|
8
|
+
s(t).toBe("Farm Location");
|
|
9
|
+
}), e("should turn other letters of an all caps string into lower case", () => {
|
|
10
|
+
const t = i("FARM LOCATION");
|
|
11
|
+
s(t).toBe("Farm Location");
|
|
12
12
|
});
|
|
13
|
-
}),
|
|
14
|
-
|
|
15
|
-
const t =
|
|
16
|
-
|
|
17
|
-
}),
|
|
18
|
-
const t =
|
|
19
|
-
|
|
13
|
+
}), n("getBlockNumberByDto", () => {
|
|
14
|
+
e("should get zero", () => {
|
|
15
|
+
const t = r({ position: void 0 }, 3);
|
|
16
|
+
s(t).toBe(0);
|
|
17
|
+
}), e("should get 3", () => {
|
|
18
|
+
const t = r({ position: { row: 1, column: 3 } }, 3);
|
|
19
|
+
s(t).toBe(3);
|
|
20
|
+
});
|
|
21
|
+
}), n("Test trimLeadingAndTrailingSpaces", () => {
|
|
22
|
+
e("should remove leading spaces", () => {
|
|
23
|
+
s(o({ test: " test-1" })).toEqual({ test: "test-1" });
|
|
24
|
+
}), e("should remove trailing spaces", () => {
|
|
25
|
+
s(o({ test: "test-1 " })).toEqual({ test: "test-1" });
|
|
26
|
+
}), e("should not remove other spaces than the leading and trailing once", () => {
|
|
27
|
+
s(o({ test: " t e s t 1 " })).toEqual({ test: "t e s t 1" });
|
|
28
|
+
}), e("should remove leading and trailing spaces", () => {
|
|
29
|
+
s(o({ test1: " test-1 ", test2: "test-2 " })).toEqual({
|
|
30
|
+
test1: "test-1",
|
|
31
|
+
test2: "test-2"
|
|
32
|
+
});
|
|
33
|
+
}), e("should not change other values than strings", () => {
|
|
34
|
+
s(o({ test1: " test-1 ", test2: 123456 })).toEqual({
|
|
35
|
+
test1: "test-1",
|
|
36
|
+
test2: 123456
|
|
37
|
+
});
|
|
38
|
+
}), e("should remove spaces from strings in an nested object", () => {
|
|
39
|
+
s(o({ test1: " test-1 ", test2: { nestedObjectKey: "test-2 " } })).toEqual({
|
|
40
|
+
test1: "test-1",
|
|
41
|
+
test2: { nestedObjectKey: "test-2" }
|
|
42
|
+
});
|
|
43
|
+
}), e("should remove spaces from strings of an array", () => {
|
|
44
|
+
s(o({
|
|
45
|
+
test1: " test-1 ",
|
|
46
|
+
test2: { nestedObjectKey: ["test-2 ", " test-3 ", 2345] }
|
|
47
|
+
})).toEqual({
|
|
48
|
+
test1: "test-1",
|
|
49
|
+
test2: { nestedObjectKey: ["test-2", "test-3", 2345] }
|
|
50
|
+
});
|
|
20
51
|
});
|
|
21
52
|
});
|
|
22
53
|
});
|
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.9178",
|
|
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>",
|