@sme.up/ketchup2 2.0.0-SNAPSHOT-20250617073056 → 2.0.0-SNAPSHOT-20250617130134
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/buttonListAssets.d.ts.map +1 -1
- package/dist/assets/provinces.d.ts +3 -1
- package/dist/assets/provinces.d.ts.map +1 -1
- package/dist/assets/testAsset.d.ts.map +1 -1
- package/dist/basic-components/cell/tests/utils.d.ts +7 -1
- package/dist/basic-components/cell/tests/utils.d.ts.map +1 -1
- package/dist/basic-components/date-picker/date-picker-calendar/date-picker-calendar.d.ts.map +1 -1
- package/dist/basic-components/list/list.d.ts.map +1 -1
- package/dist/components/drawer/drawer.data.d.ts.map +1 -1
- package/dist/components/input-panel/assets/data.d.ts +1 -0
- package/dist/components/input-panel/assets/data.d.ts.map +1 -1
- package/dist/components/input-panel/input-panel-types.d.ts +3 -3
- package/dist/components/input-panel/input-panel-types.d.ts.map +1 -1
- package/dist/components/input-panel/input-panel.d.ts.map +1 -1
- package/dist/ketchup2.cjs.js +11 -11
- package/dist/ketchup2.css +1 -1
- package/dist/ketchup2.es.js +744 -730
- package/dist/types/data-structures.d.ts +1 -0
- package/dist/types/data-structures.d.ts.map +1 -1
- package/dist/utils/data-structures.d.ts +10 -0
- package/dist/utils/data-structures.d.ts.map +1 -0
- package/dist/utils/display-value.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/ketchup2.es.js
CHANGED
|
@@ -148,7 +148,7 @@ function _r() {
|
|
|
148
148
|
configurable: !0
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function u() {
|
|
152
152
|
var h = r(this.type);
|
|
153
153
|
return K[h] || (K[h] = !0, console.error(
|
|
154
154
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
@@ -156,14 +156,14 @@ function _r() {
|
|
|
156
156
|
}
|
|
157
157
|
function c(h, y, T, $, R, A, M, F) {
|
|
158
158
|
return T = A.ref, h = {
|
|
159
|
-
$$typeof:
|
|
159
|
+
$$typeof: d,
|
|
160
160
|
type: h,
|
|
161
161
|
key: y,
|
|
162
162
|
props: A,
|
|
163
163
|
_owner: R
|
|
164
164
|
}, (T !== void 0 ? T : null) !== null ? Object.defineProperty(h, "ref", {
|
|
165
165
|
enumerable: !1,
|
|
166
|
-
get:
|
|
166
|
+
get: u
|
|
167
167
|
}) : Object.defineProperty(h, "ref", { enumerable: !1, value: null }), h._store = {}, Object.defineProperty(h._store, "validated", {
|
|
168
168
|
configurable: !1,
|
|
169
169
|
enumerable: !1,
|
|
@@ -186,7 +186,7 @@ function _r() {
|
|
|
186
186
|
value: F
|
|
187
187
|
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function f(h, y, T, $, R, A, M, F) {
|
|
190
190
|
var N = y.children;
|
|
191
191
|
if (N !== void 0)
|
|
192
192
|
if ($)
|
|
@@ -237,23 +237,23 @@ React keys must be passed directly to JSX without using spread:
|
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
239
|
function l(h) {
|
|
240
|
-
typeof h == "object" && h !== null && h.$$typeof ===
|
|
240
|
+
typeof h == "object" && h !== null && h.$$typeof === d && h._store && (h._store.validated = 1);
|
|
241
241
|
}
|
|
242
|
-
var
|
|
242
|
+
var p = hr, d = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), O = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), L = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), P = Symbol.for("react.client.reference"), D = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, k = Object.prototype.hasOwnProperty, U = Array.isArray, H = console.createTask ? console.createTask : function() {
|
|
243
243
|
return null;
|
|
244
244
|
};
|
|
245
|
-
|
|
245
|
+
p = {
|
|
246
246
|
"react-stack-bottom-frame": function(h) {
|
|
247
247
|
return h();
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
-
var z, K = {}, J =
|
|
251
|
-
|
|
250
|
+
var z, K = {}, J = p["react-stack-bottom-frame"].bind(
|
|
251
|
+
p,
|
|
252
252
|
a
|
|
253
253
|
)(), W = H(n(a)), _ = {};
|
|
254
254
|
Ae.Fragment = g, Ae.jsx = function(h, y, T, $, R) {
|
|
255
255
|
var A = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
256
|
-
return
|
|
256
|
+
return f(
|
|
257
257
|
h,
|
|
258
258
|
y,
|
|
259
259
|
T,
|
|
@@ -265,7 +265,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
265
265
|
);
|
|
266
266
|
}, Ae.jsxs = function(h, y, T, $, R) {
|
|
267
267
|
var A = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
268
|
-
return
|
|
268
|
+
return f(
|
|
269
269
|
h,
|
|
270
270
|
y,
|
|
271
271
|
T,
|
|
@@ -339,33 +339,33 @@ class ze {
|
|
|
339
339
|
}
|
|
340
340
|
function Mr(r, e) {
|
|
341
341
|
if (xt(r)) {
|
|
342
|
-
const
|
|
343
|
-
if (!isNaN(
|
|
344
|
-
return
|
|
342
|
+
const f = new Date(r);
|
|
343
|
+
if (!isNaN(f.getTime()))
|
|
344
|
+
return f;
|
|
345
345
|
}
|
|
346
346
|
const t = /* @__PURE__ */ new Date(), n = r.replaceAll("/", "").replaceAll("-", "");
|
|
347
347
|
let s = "DDMMYYYY";
|
|
348
348
|
e === "en" && (s = "MMDDYYYY");
|
|
349
349
|
const a = s.indexOf("DD"), i = s.indexOf("MM");
|
|
350
|
-
let o = 0,
|
|
350
|
+
let o = 0, u = 0, c = "";
|
|
351
351
|
switch (n.length) {
|
|
352
352
|
case 1:
|
|
353
353
|
case 2:
|
|
354
354
|
return o = parseInt(n), t.setDate(o), Ve(t) ? t : r;
|
|
355
355
|
case 3:
|
|
356
356
|
case 4:
|
|
357
|
-
return o = parseInt(n.substring(0, 2)),
|
|
357
|
+
return o = parseInt(n.substring(0, 2)), u = parseInt(n.substring(2, 4)), i === 0 ? (t.setMonth(o - 1), t.setDate(u)) : a === 0 && (t.setMonth(u - 1), t.setDate(o)), Ve(t) ? t : r;
|
|
358
358
|
case 5:
|
|
359
359
|
case 6: {
|
|
360
|
-
o = parseInt(n.substring(0, 2)),
|
|
361
|
-
let
|
|
362
|
-
return i === 0 ? (
|
|
360
|
+
o = parseInt(n.substring(0, 2)), u = parseInt(n.substring(2, 4)), Number(n.substring(4)) > 50 ? c = "19" + n.substring(4) : c = "20" + n.substring(4);
|
|
361
|
+
let f = 0, l = 0;
|
|
362
|
+
return i === 0 ? (f = u, l = o - 1, t.setFullYear(parseInt(c), l, f)) : a === 0 && (f = o, l = u - 1, t.setFullYear(parseInt(c), l, f)), ht(o, l, parseInt(c)) && Ve(t) ? t : r;
|
|
363
363
|
}
|
|
364
364
|
case 7:
|
|
365
365
|
case 8: {
|
|
366
|
-
o = parseInt(n.substring(0, 2)),
|
|
367
|
-
let
|
|
368
|
-
return i === 0 ? (
|
|
366
|
+
o = parseInt(n.substring(0, 2)), u = parseInt(n.substring(2, 4)), c = n.substring(4);
|
|
367
|
+
let f = 0, l = 0;
|
|
368
|
+
return i === 0 ? (f = u, l = o - 1, t.setFullYear(parseInt(c), l, f)) : a === 0 && (f = o, l = u - 1, t.setFullYear(parseInt(c), l, f)), ht(f, l, parseInt(c)) && Ve(t) ? t : r;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
return r;
|
|
@@ -468,22 +468,22 @@ function St({
|
|
|
468
468
|
enabled: e = !0
|
|
469
469
|
}) {
|
|
470
470
|
const t = ve(null), n = ve(null), [s, a] = Z(0), i = ye(() => {
|
|
471
|
-
const o = t.current,
|
|
472
|
-
if (!o || !
|
|
473
|
-
const { top: c, left:
|
|
471
|
+
const o = t.current, u = n.current;
|
|
472
|
+
if (!o || !u) return;
|
|
473
|
+
const { top: c, left: f, width: l, height: p } = o.getBoundingClientRect();
|
|
474
474
|
a(l);
|
|
475
|
-
const
|
|
476
|
-
if (m === 0 ||
|
|
475
|
+
const d = u.offsetHeight, m = u.offsetWidth;
|
|
476
|
+
if (m === 0 || d === 0) {
|
|
477
477
|
requestAnimationFrame(i);
|
|
478
478
|
return;
|
|
479
479
|
}
|
|
480
|
-
let g = c + window.scrollY, x =
|
|
480
|
+
let g = c + window.scrollY, x = f + window.scrollX;
|
|
481
481
|
switch (r) {
|
|
482
482
|
case "top":
|
|
483
|
-
g -=
|
|
483
|
+
g -= d;
|
|
484
484
|
break;
|
|
485
485
|
case "bottom":
|
|
486
|
-
g +=
|
|
486
|
+
g += p;
|
|
487
487
|
break;
|
|
488
488
|
case "left":
|
|
489
489
|
x -= m;
|
|
@@ -493,7 +493,7 @@ function St({
|
|
|
493
493
|
break;
|
|
494
494
|
}
|
|
495
495
|
requestAnimationFrame(() => {
|
|
496
|
-
|
|
496
|
+
u.style.transform = `translate(${x}px, ${g}px)`;
|
|
497
497
|
});
|
|
498
498
|
}, [r]);
|
|
499
499
|
return Ar(() => {
|
|
@@ -507,6 +507,8 @@ function St({
|
|
|
507
507
|
}, [i, e]), { anchorRef: t, targetRef: n, anchorWidth: s };
|
|
508
508
|
}
|
|
509
509
|
const Xe = (r, e, t) => {
|
|
510
|
+
if (r == "")
|
|
511
|
+
return "";
|
|
510
512
|
if (t)
|
|
511
513
|
switch (t) {
|
|
512
514
|
case "CodeOnly":
|
|
@@ -579,55 +581,55 @@ function Hr() {
|
|
|
579
581
|
function i(l) {
|
|
580
582
|
if (!l || typeof l != "object")
|
|
581
583
|
throw new TypeError("argument obj is required");
|
|
582
|
-
var
|
|
583
|
-
if (!
|
|
584
|
+
var p = l.parameters, d = l.type;
|
|
585
|
+
if (!d || !a.test(d))
|
|
584
586
|
throw new TypeError("invalid type");
|
|
585
|
-
var m =
|
|
586
|
-
if (
|
|
587
|
-
for (var g, x = Object.keys(
|
|
587
|
+
var m = d;
|
|
588
|
+
if (p && typeof p == "object")
|
|
589
|
+
for (var g, x = Object.keys(p).sort(), w = 0; w < x.length; w++) {
|
|
588
590
|
if (g = x[w], !t.test(g))
|
|
589
591
|
throw new TypeError("invalid parameter name");
|
|
590
|
-
m += "; " + g + "=" + c(
|
|
592
|
+
m += "; " + g + "=" + c(p[g]);
|
|
591
593
|
}
|
|
592
594
|
return m;
|
|
593
595
|
}
|
|
594
596
|
function o(l) {
|
|
595
597
|
if (!l)
|
|
596
598
|
throw new TypeError("argument string is required");
|
|
597
|
-
var
|
|
598
|
-
if (typeof
|
|
599
|
+
var p = typeof l == "object" ? u(l) : l;
|
|
600
|
+
if (typeof p != "string")
|
|
599
601
|
throw new TypeError("argument string is required to be a string");
|
|
600
|
-
var
|
|
602
|
+
var d = p.indexOf(";"), m = d !== -1 ? p.slice(0, d).trim() : p.trim();
|
|
601
603
|
if (!a.test(m))
|
|
602
604
|
throw new TypeError("invalid media type");
|
|
603
|
-
var g = new
|
|
604
|
-
if (
|
|
605
|
+
var g = new f(m.toLowerCase());
|
|
606
|
+
if (d !== -1) {
|
|
605
607
|
var x, w, E;
|
|
606
|
-
for (r.lastIndex =
|
|
607
|
-
if (w.index !==
|
|
608
|
+
for (r.lastIndex = d; w = r.exec(p); ) {
|
|
609
|
+
if (w.index !== d)
|
|
608
610
|
throw new TypeError("invalid parameter format");
|
|
609
|
-
|
|
611
|
+
d += w[0].length, x = w[1].toLowerCase(), E = w[2], E.charCodeAt(0) === 34 && (E = E.slice(1, -1), E.indexOf("\\") !== -1 && (E = E.replace(n, "$1"))), g.parameters[x] = E;
|
|
610
612
|
}
|
|
611
|
-
if (
|
|
613
|
+
if (d !== p.length)
|
|
612
614
|
throw new TypeError("invalid parameter format");
|
|
613
615
|
}
|
|
614
616
|
return g;
|
|
615
617
|
}
|
|
616
|
-
function
|
|
617
|
-
var
|
|
618
|
-
if (typeof l.getHeader == "function" ?
|
|
618
|
+
function u(l) {
|
|
619
|
+
var p;
|
|
620
|
+
if (typeof l.getHeader == "function" ? p = l.getHeader("content-type") : typeof l.headers == "object" && (p = l.headers && l.headers["content-type"]), typeof p != "string")
|
|
619
621
|
throw new TypeError("content-type header is missing from object");
|
|
620
|
-
return
|
|
622
|
+
return p;
|
|
621
623
|
}
|
|
622
624
|
function c(l) {
|
|
623
|
-
var
|
|
624
|
-
if (t.test(
|
|
625
|
-
return
|
|
626
|
-
if (
|
|
625
|
+
var p = String(l);
|
|
626
|
+
if (t.test(p))
|
|
627
|
+
return p;
|
|
628
|
+
if (p.length > 0 && !e.test(p))
|
|
627
629
|
throw new TypeError("invalid parameter value");
|
|
628
|
-
return '"' +
|
|
630
|
+
return '"' + p.replace(s, "\\$1") + '"';
|
|
629
631
|
}
|
|
630
|
-
function
|
|
632
|
+
function f(l) {
|
|
631
633
|
this.parameters = /* @__PURE__ */ Object.create(null), this.type = l;
|
|
632
634
|
}
|
|
633
635
|
return Ye;
|
|
@@ -669,8 +671,8 @@ var Br = Hr(), Re = /* @__PURE__ */ new Map(), gr = function(e) {
|
|
|
669
671
|
for (var t = function(i, o) {
|
|
670
672
|
setTimeout(function() {
|
|
671
673
|
if (Array.isArray(xe[e])) {
|
|
672
|
-
var
|
|
673
|
-
|
|
674
|
+
var u = Re.get(e), c = xe[e][i];
|
|
675
|
+
u instanceof SVGSVGElement && c(null, gr(u)), u instanceof Error && c(u), i === xe[e].length - 1 && delete xe[e];
|
|
674
676
|
}
|
|
675
677
|
}, 0);
|
|
676
678
|
}, n = 0, s = xe[e].length; n < s; n++)
|
|
@@ -699,8 +701,8 @@ var Br = Hr(), Re = /* @__PURE__ */ new Map(), gr = function(e) {
|
|
|
699
701
|
}, qr = 0, Jr = function() {
|
|
700
702
|
return ++qr;
|
|
701
703
|
}, me = [], _t = {}, Xr = "http://www.w3.org/2000/svg", at = "http://www.w3.org/1999/xlink", kt = function(e, t, n, s, a, i, o) {
|
|
702
|
-
var
|
|
703
|
-
if (!
|
|
704
|
+
var u = e.getAttribute("data-src") || e.getAttribute("src");
|
|
705
|
+
if (!u) {
|
|
704
706
|
o(new Error("Invalid data-src or src attribute"));
|
|
705
707
|
return;
|
|
706
708
|
}
|
|
@@ -710,15 +712,15 @@ var Br = Hr(), Re = /* @__PURE__ */ new Map(), gr = function(e) {
|
|
|
710
712
|
}
|
|
711
713
|
me.push(e), e.setAttribute("src", "");
|
|
712
714
|
var c = s ? Kr : zr;
|
|
713
|
-
c(
|
|
715
|
+
c(u, a, function(f, l) {
|
|
714
716
|
if (!l) {
|
|
715
|
-
me.splice(me.indexOf(e), 1), e = null, o(
|
|
717
|
+
me.splice(me.indexOf(e), 1), e = null, o(f);
|
|
716
718
|
return;
|
|
717
719
|
}
|
|
718
|
-
var
|
|
719
|
-
|
|
720
|
-
var
|
|
721
|
-
|
|
720
|
+
var p = e.getAttribute("id");
|
|
721
|
+
p && l.setAttribute("id", p);
|
|
722
|
+
var d = e.getAttribute("title");
|
|
723
|
+
d && l.setAttribute("title", d);
|
|
722
724
|
var m = e.getAttribute("width");
|
|
723
725
|
m && l.setAttribute("width", m);
|
|
724
726
|
var g = e.getAttribute("height");
|
|
@@ -726,7 +728,7 @@ var Br = Hr(), Re = /* @__PURE__ */ new Map(), gr = function(e) {
|
|
|
726
728
|
var x = Array.from(new Set(st(st(st([], (l.getAttribute("class") || "").split(" "), !0), ["injected-svg"], !1), (e.getAttribute("class") || "").split(" "), !0))).join(" ").trim();
|
|
727
729
|
l.setAttribute("class", x);
|
|
728
730
|
var w = e.getAttribute("style");
|
|
729
|
-
w && l.setAttribute("style", w), l.setAttribute("data-src",
|
|
731
|
+
w && l.setAttribute("style", w), l.setAttribute("data-src", u);
|
|
730
732
|
var E = [].filter.call(e.attributes, function(W) {
|
|
731
733
|
return /^data-\w[\w-]*$/.test(W.name);
|
|
732
734
|
});
|
|
@@ -771,10 +773,10 @@ var Br = Hr(), Re = /* @__PURE__ */ new Map(), gr = function(e) {
|
|
|
771
773
|
l.removeAttribute("xmlns:a");
|
|
772
774
|
for (var j = l.querySelectorAll("script"), P = [], D, k, U = 0, H = j.length; U < H; U++)
|
|
773
775
|
k = j[U].getAttribute("type"), (!k || k === "application/ecmascript" || k === "application/javascript" || k === "text/javascript") && (D = j[U].innerText || j[U].textContent, D && P.push(D), l.removeChild(j[U]));
|
|
774
|
-
if (P.length > 0 && (t === "always" || t === "once" && !_t[
|
|
776
|
+
if (P.length > 0 && (t === "always" || t === "once" && !_t[u])) {
|
|
775
777
|
for (var z = 0, K = P.length; z < K; z++)
|
|
776
778
|
new Function(P[z])(window);
|
|
777
|
-
_t[
|
|
779
|
+
_t[u] = !0;
|
|
778
780
|
}
|
|
779
781
|
var J = l.querySelectorAll("style");
|
|
780
782
|
if (Array.prototype.forEach.call(J, function(W) {
|
|
@@ -788,14 +790,14 @@ var Br = Hr(), Re = /* @__PURE__ */ new Map(), gr = function(e) {
|
|
|
788
790
|
}, Zr = function(e, t) {
|
|
789
791
|
var n = t === void 0 ? {} : t, s = n.afterAll, a = s === void 0 ? function() {
|
|
790
792
|
} : s, i = n.afterEach, o = i === void 0 ? function() {
|
|
791
|
-
} : i,
|
|
792
|
-
} :
|
|
793
|
+
} : i, u = n.beforeEach, c = u === void 0 ? function() {
|
|
794
|
+
} : u, f = n.cacheRequests, l = f === void 0 ? !0 : f, p = n.evalScripts, d = p === void 0 ? "never" : p, m = n.httpRequestWithCredentials, g = m === void 0 ? !1 : m, x = n.renumerateIRIElements, w = x === void 0 ? !0 : x;
|
|
793
795
|
if (e && "length" in e)
|
|
794
796
|
for (var E = 0, O = 0, S = e.length; O < S; O++)
|
|
795
|
-
kt(e[O],
|
|
797
|
+
kt(e[O], d, w, l, g, c, function(b, L) {
|
|
796
798
|
o(b, L), e && "length" in e && e.length === ++E && a(E);
|
|
797
799
|
});
|
|
798
|
-
else e ? kt(e,
|
|
800
|
+
else e ? kt(e, d, w, l, g, c, function(b, L) {
|
|
799
801
|
o(b, L), a(1), e = null;
|
|
800
802
|
}) : a(0);
|
|
801
803
|
}, Ue = { exports: {} }, We = { exports: {} }, Q = {};
|
|
@@ -811,14 +813,14 @@ var It;
|
|
|
811
813
|
function Qr() {
|
|
812
814
|
if (It) return Q;
|
|
813
815
|
It = 1;
|
|
814
|
-
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, s = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, i = r ? Symbol.for("react.provider") : 60109, o = r ? Symbol.for("react.context") : 60110,
|
|
816
|
+
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, s = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, i = r ? Symbol.for("react.provider") : 60109, o = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, c = r ? Symbol.for("react.concurrent_mode") : 60111, f = r ? Symbol.for("react.forward_ref") : 60112, l = r ? Symbol.for("react.suspense") : 60113, p = r ? Symbol.for("react.suspense_list") : 60120, d = r ? Symbol.for("react.memo") : 60115, m = r ? Symbol.for("react.lazy") : 60116, g = r ? Symbol.for("react.block") : 60121, x = r ? Symbol.for("react.fundamental") : 60117, w = r ? Symbol.for("react.responder") : 60118, E = r ? Symbol.for("react.scope") : 60119;
|
|
815
817
|
function O(b) {
|
|
816
818
|
if (typeof b == "object" && b !== null) {
|
|
817
819
|
var L = b.$$typeof;
|
|
818
820
|
switch (L) {
|
|
819
821
|
case e:
|
|
820
822
|
switch (b = b.type, b) {
|
|
821
|
-
case
|
|
823
|
+
case u:
|
|
822
824
|
case c:
|
|
823
825
|
case n:
|
|
824
826
|
case a:
|
|
@@ -828,9 +830,9 @@ function Qr() {
|
|
|
828
830
|
default:
|
|
829
831
|
switch (b = b && b.$$typeof, b) {
|
|
830
832
|
case o:
|
|
831
|
-
case
|
|
833
|
+
case f:
|
|
832
834
|
case m:
|
|
833
|
-
case
|
|
835
|
+
case d:
|
|
834
836
|
case i:
|
|
835
837
|
return b;
|
|
836
838
|
default:
|
|
@@ -845,8 +847,8 @@ function Qr() {
|
|
|
845
847
|
function S(b) {
|
|
846
848
|
return O(b) === c;
|
|
847
849
|
}
|
|
848
|
-
return Q.AsyncMode =
|
|
849
|
-
return S(b) || O(b) ===
|
|
850
|
+
return Q.AsyncMode = u, Q.ConcurrentMode = c, Q.ContextConsumer = o, Q.ContextProvider = i, Q.Element = e, Q.ForwardRef = f, Q.Fragment = n, Q.Lazy = m, Q.Memo = d, Q.Portal = t, Q.Profiler = a, Q.StrictMode = s, Q.Suspense = l, Q.isAsyncMode = function(b) {
|
|
851
|
+
return S(b) || O(b) === u;
|
|
850
852
|
}, Q.isConcurrentMode = S, Q.isContextConsumer = function(b) {
|
|
851
853
|
return O(b) === o;
|
|
852
854
|
}, Q.isContextProvider = function(b) {
|
|
@@ -854,13 +856,13 @@ function Qr() {
|
|
|
854
856
|
}, Q.isElement = function(b) {
|
|
855
857
|
return typeof b == "object" && b !== null && b.$$typeof === e;
|
|
856
858
|
}, Q.isForwardRef = function(b) {
|
|
857
|
-
return O(b) ===
|
|
859
|
+
return O(b) === f;
|
|
858
860
|
}, Q.isFragment = function(b) {
|
|
859
861
|
return O(b) === n;
|
|
860
862
|
}, Q.isLazy = function(b) {
|
|
861
863
|
return O(b) === m;
|
|
862
864
|
}, Q.isMemo = function(b) {
|
|
863
|
-
return O(b) ===
|
|
865
|
+
return O(b) === d;
|
|
864
866
|
}, Q.isPortal = function(b) {
|
|
865
867
|
return O(b) === t;
|
|
866
868
|
}, Q.isProfiler = function(b) {
|
|
@@ -870,7 +872,7 @@ function Qr() {
|
|
|
870
872
|
}, Q.isSuspense = function(b) {
|
|
871
873
|
return O(b) === l;
|
|
872
874
|
}, Q.isValidElementType = function(b) {
|
|
873
|
-
return typeof b == "string" || typeof b == "function" || b === n || b === c || b === a || b === s || b === l || b ===
|
|
875
|
+
return typeof b == "string" || typeof b == "function" || b === n || b === c || b === a || b === s || b === l || b === p || typeof b == "object" && b !== null && (b.$$typeof === m || b.$$typeof === d || b.$$typeof === i || b.$$typeof === o || b.$$typeof === f || b.$$typeof === x || b.$$typeof === w || b.$$typeof === E || b.$$typeof === g);
|
|
874
876
|
}, Q.typeOf = O, Q;
|
|
875
877
|
}
|
|
876
878
|
var ee = {};
|
|
@@ -885,10 +887,10 @@ var ee = {};
|
|
|
885
887
|
var Nt;
|
|
886
888
|
function en() {
|
|
887
889
|
return Nt || (Nt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
888
|
-
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, s = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, i = r ? Symbol.for("react.provider") : 60109, o = r ? Symbol.for("react.context") : 60110,
|
|
890
|
+
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, s = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, i = r ? Symbol.for("react.provider") : 60109, o = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, c = r ? Symbol.for("react.concurrent_mode") : 60111, f = r ? Symbol.for("react.forward_ref") : 60112, l = r ? Symbol.for("react.suspense") : 60113, p = r ? Symbol.for("react.suspense_list") : 60120, d = r ? Symbol.for("react.memo") : 60115, m = r ? Symbol.for("react.lazy") : 60116, g = r ? Symbol.for("react.block") : 60121, x = r ? Symbol.for("react.fundamental") : 60117, w = r ? Symbol.for("react.responder") : 60118, E = r ? Symbol.for("react.scope") : 60119;
|
|
889
891
|
function O(I) {
|
|
890
892
|
return typeof I == "string" || typeof I == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
891
|
-
I === n || I === c || I === a || I === s || I === l || I ===
|
|
893
|
+
I === n || I === c || I === a || I === s || I === l || I === p || typeof I == "object" && I !== null && (I.$$typeof === m || I.$$typeof === d || I.$$typeof === i || I.$$typeof === o || I.$$typeof === f || I.$$typeof === x || I.$$typeof === w || I.$$typeof === E || I.$$typeof === g);
|
|
892
894
|
}
|
|
893
895
|
function S(I) {
|
|
894
896
|
if (typeof I == "object" && I !== null) {
|
|
@@ -897,7 +899,7 @@ function en() {
|
|
|
897
899
|
case e:
|
|
898
900
|
var X = I.type;
|
|
899
901
|
switch (X) {
|
|
900
|
-
case
|
|
902
|
+
case u:
|
|
901
903
|
case c:
|
|
902
904
|
case n:
|
|
903
905
|
case a:
|
|
@@ -908,9 +910,9 @@ function en() {
|
|
|
908
910
|
var te = X && X.$$typeof;
|
|
909
911
|
switch (te) {
|
|
910
912
|
case o:
|
|
911
|
-
case
|
|
913
|
+
case f:
|
|
912
914
|
case m:
|
|
913
|
-
case
|
|
915
|
+
case d:
|
|
914
916
|
case i:
|
|
915
917
|
return te;
|
|
916
918
|
default:
|
|
@@ -922,9 +924,9 @@ function en() {
|
|
|
922
924
|
}
|
|
923
925
|
}
|
|
924
926
|
}
|
|
925
|
-
var b =
|
|
927
|
+
var b = u, L = c, C = o, Y = i, j = e, P = f, D = n, k = m, U = d, H = t, z = a, K = s, J = l, W = !1;
|
|
926
928
|
function _(I) {
|
|
927
|
-
return W || (W = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), h(I) || S(I) ===
|
|
929
|
+
return W || (W = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), h(I) || S(I) === u;
|
|
928
930
|
}
|
|
929
931
|
function h(I) {
|
|
930
932
|
return S(I) === c;
|
|
@@ -939,7 +941,7 @@ function en() {
|
|
|
939
941
|
return typeof I == "object" && I !== null && I.$$typeof === e;
|
|
940
942
|
}
|
|
941
943
|
function R(I) {
|
|
942
|
-
return S(I) ===
|
|
944
|
+
return S(I) === f;
|
|
943
945
|
}
|
|
944
946
|
function A(I) {
|
|
945
947
|
return S(I) === n;
|
|
@@ -948,7 +950,7 @@ function en() {
|
|
|
948
950
|
return S(I) === m;
|
|
949
951
|
}
|
|
950
952
|
function F(I) {
|
|
951
|
-
return S(I) ===
|
|
953
|
+
return S(I) === d;
|
|
952
954
|
}
|
|
953
955
|
function N(I) {
|
|
954
956
|
return S(I) === t;
|
|
@@ -993,31 +995,31 @@ function tn() {
|
|
|
993
995
|
return !1;
|
|
994
996
|
for (var i = {}, o = 0; o < 10; o++)
|
|
995
997
|
i["_" + String.fromCharCode(o)] = o;
|
|
996
|
-
var
|
|
997
|
-
return i[
|
|
998
|
+
var u = Object.getOwnPropertyNames(i).map(function(f) {
|
|
999
|
+
return i[f];
|
|
998
1000
|
});
|
|
999
|
-
if (
|
|
1001
|
+
if (u.join("") !== "0123456789")
|
|
1000
1002
|
return !1;
|
|
1001
1003
|
var c = {};
|
|
1002
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
1003
|
-
c[
|
|
1004
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(f) {
|
|
1005
|
+
c[f] = f;
|
|
1004
1006
|
}), Object.keys(Object.assign({}, c)).join("") === "abcdefghijklmnopqrst";
|
|
1005
1007
|
} catch {
|
|
1006
1008
|
return !1;
|
|
1007
1009
|
}
|
|
1008
1010
|
}
|
|
1009
1011
|
return it = s() ? Object.assign : function(a, i) {
|
|
1010
|
-
for (var o,
|
|
1011
|
-
o = Object(arguments[
|
|
1012
|
+
for (var o, u = n(a), c, f = 1; f < arguments.length; f++) {
|
|
1013
|
+
o = Object(arguments[f]);
|
|
1012
1014
|
for (var l in o)
|
|
1013
|
-
e.call(o, l) && (
|
|
1015
|
+
e.call(o, l) && (u[l] = o[l]);
|
|
1014
1016
|
if (r) {
|
|
1015
1017
|
c = r(o);
|
|
1016
|
-
for (var
|
|
1017
|
-
t.call(o, c[
|
|
1018
|
+
for (var p = 0; p < c.length; p++)
|
|
1019
|
+
t.call(o, c[p]) && (u[c[p]] = o[c[p]]);
|
|
1018
1020
|
}
|
|
1019
1021
|
}
|
|
1020
|
-
return
|
|
1022
|
+
return u;
|
|
1021
1023
|
}, it;
|
|
1022
1024
|
}
|
|
1023
1025
|
var ot, Vt;
|
|
@@ -1048,29 +1050,29 @@ function rn() {
|
|
|
1048
1050
|
}
|
|
1049
1051
|
};
|
|
1050
1052
|
}
|
|
1051
|
-
function s(a, i, o,
|
|
1053
|
+
function s(a, i, o, u, c) {
|
|
1052
1054
|
if (process.env.NODE_ENV !== "production") {
|
|
1053
|
-
for (var
|
|
1054
|
-
if (n(a,
|
|
1055
|
+
for (var f in a)
|
|
1056
|
+
if (n(a, f)) {
|
|
1055
1057
|
var l;
|
|
1056
1058
|
try {
|
|
1057
|
-
if (typeof a[
|
|
1058
|
-
var
|
|
1059
|
-
(
|
|
1059
|
+
if (typeof a[f] != "function") {
|
|
1060
|
+
var p = Error(
|
|
1061
|
+
(u || "React class") + ": " + o + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1060
1062
|
);
|
|
1061
|
-
throw
|
|
1063
|
+
throw p.name = "Invariant Violation", p;
|
|
1062
1064
|
}
|
|
1063
|
-
l = a[
|
|
1065
|
+
l = a[f](i, f, u, o, null, e);
|
|
1064
1066
|
} catch (m) {
|
|
1065
1067
|
l = m;
|
|
1066
1068
|
}
|
|
1067
1069
|
if (l && !(l instanceof Error) && r(
|
|
1068
|
-
(
|
|
1070
|
+
(u || "React class") + ": type specification of " + o + " `" + f + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof l + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1069
1071
|
), l instanceof Error && !(l.message in t)) {
|
|
1070
1072
|
t[l.message] = !0;
|
|
1071
|
-
var
|
|
1073
|
+
var d = c ? c() : "";
|
|
1072
1074
|
r(
|
|
1073
|
-
"Failed " + o + " type: " + l.message + (
|
|
1075
|
+
"Failed " + o + " type: " + l.message + (d ?? "")
|
|
1074
1076
|
);
|
|
1075
1077
|
}
|
|
1076
1078
|
}
|
|
@@ -1087,24 +1089,24 @@ function nn() {
|
|
|
1087
1089
|
var r = vr(), e = tn(), t = /* @__PURE__ */ wt(), n = /* @__PURE__ */ br(), s = /* @__PURE__ */ rn(), a = function() {
|
|
1088
1090
|
};
|
|
1089
1091
|
process.env.NODE_ENV !== "production" && (a = function(o) {
|
|
1090
|
-
var
|
|
1091
|
-
typeof console < "u" && console.error(
|
|
1092
|
+
var u = "Warning: " + o;
|
|
1093
|
+
typeof console < "u" && console.error(u);
|
|
1092
1094
|
try {
|
|
1093
|
-
throw new Error(
|
|
1095
|
+
throw new Error(u);
|
|
1094
1096
|
} catch {
|
|
1095
1097
|
}
|
|
1096
1098
|
});
|
|
1097
1099
|
function i() {
|
|
1098
1100
|
return null;
|
|
1099
1101
|
}
|
|
1100
|
-
return ut = function(o,
|
|
1101
|
-
var c = typeof Symbol == "function" && Symbol.iterator,
|
|
1102
|
+
return ut = function(o, u) {
|
|
1103
|
+
var c = typeof Symbol == "function" && Symbol.iterator, f = "@@iterator";
|
|
1102
1104
|
function l(h) {
|
|
1103
|
-
var y = h && (c && h[c] || h[
|
|
1105
|
+
var y = h && (c && h[c] || h[f]);
|
|
1104
1106
|
if (typeof y == "function")
|
|
1105
1107
|
return y;
|
|
1106
1108
|
}
|
|
1107
|
-
var
|
|
1109
|
+
var p = "<<anonymous>>", d = {
|
|
1108
1110
|
array: w("array"),
|
|
1109
1111
|
bigint: w("bigint"),
|
|
1110
1112
|
bool: w("boolean"),
|
|
@@ -1136,8 +1138,8 @@ function nn() {
|
|
|
1136
1138
|
if (process.env.NODE_ENV !== "production")
|
|
1137
1139
|
var y = {}, T = 0;
|
|
1138
1140
|
function $(A, M, F, N, q, B, se) {
|
|
1139
|
-
if (N = N ||
|
|
1140
|
-
if (
|
|
1141
|
+
if (N = N || p, B = B || F, se !== t) {
|
|
1142
|
+
if (u) {
|
|
1141
1143
|
var I = new Error(
|
|
1142
1144
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1143
1145
|
);
|
|
@@ -1215,7 +1217,7 @@ function nn() {
|
|
|
1215
1217
|
function L(h) {
|
|
1216
1218
|
function y(T, $, R, A, M) {
|
|
1217
1219
|
if (!(T[$] instanceof h)) {
|
|
1218
|
-
var F = h.name ||
|
|
1220
|
+
var F = h.name || p, N = _(T[$]);
|
|
1219
1221
|
return new g("Invalid " + A + " `" + M + "` of type " + ("`" + N + "` supplied to `" + R + "`, expected ") + ("instance of `" + F + "`."));
|
|
1220
1222
|
}
|
|
1221
1223
|
return null;
|
|
@@ -1396,9 +1398,9 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
1396
1398
|
}
|
|
1397
1399
|
}
|
|
1398
1400
|
function _(h) {
|
|
1399
|
-
return !h.constructor || !h.constructor.name ?
|
|
1401
|
+
return !h.constructor || !h.constructor.name ? p : h.constructor.name;
|
|
1400
1402
|
}
|
|
1401
|
-
return
|
|
1403
|
+
return d.checkPropTypes = s, d.resetWarningCache = s.resetWarningCache, d.PropTypes = d, d;
|
|
1402
1404
|
}, ut;
|
|
1403
1405
|
}
|
|
1404
1406
|
var ft, Ht;
|
|
@@ -1411,12 +1413,12 @@ function sn() {
|
|
|
1411
1413
|
function t() {
|
|
1412
1414
|
}
|
|
1413
1415
|
return t.resetWarningCache = e, ft = function() {
|
|
1414
|
-
function n(i, o,
|
|
1416
|
+
function n(i, o, u, c, f, l) {
|
|
1415
1417
|
if (l !== r) {
|
|
1416
|
-
var
|
|
1418
|
+
var p = new Error(
|
|
1417
1419
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1418
1420
|
);
|
|
1419
|
-
throw
|
|
1421
|
+
throw p.name = "Invariant Violation", p;
|
|
1420
1422
|
}
|
|
1421
1423
|
}
|
|
1422
1424
|
n.isRequired = n;
|
|
@@ -1486,11 +1488,11 @@ var ie = /* @__PURE__ */ an(), on = function(e) {
|
|
|
1486
1488
|
return t.renderSVG = function() {
|
|
1487
1489
|
var s = this;
|
|
1488
1490
|
if (this.reactWrapper instanceof on(this.reactWrapper).Node) {
|
|
1489
|
-
var a = this.props, i = a.desc, o = a.evalScripts,
|
|
1490
|
-
x === "svg" ? (w = document.createElementNS(He, x), w.setAttribute("xmlns", He), w.setAttribute("xmlns:xlink", Gt), E = document.createElementNS(He, x)) : (w = document.createElement(x), E = document.createElement(x)), w.appendChild(E), E.dataset.src =
|
|
1491
|
+
var a = this.props, i = a.desc, o = a.evalScripts, u = a.httpRequestWithCredentials, c = a.renumerateIRIElements, f = a.src, l = a.title, p = a.useRequestCache, d = this.props.onError, m = this.props.beforeInjection, g = this.props.afterInjection, x = this.props.wrapper, w, E;
|
|
1492
|
+
x === "svg" ? (w = document.createElementNS(He, x), w.setAttribute("xmlns", He), w.setAttribute("xmlns:xlink", Gt), E = document.createElementNS(He, x)) : (w = document.createElement(x), E = document.createElement(x)), w.appendChild(E), E.dataset.src = f, this.nonReactWrapper = this.reactWrapper.appendChild(w);
|
|
1491
1493
|
var O = function(C) {
|
|
1492
1494
|
if (s.removeSVG(), !s._isMounted) {
|
|
1493
|
-
|
|
1495
|
+
d(C);
|
|
1494
1496
|
return;
|
|
1495
1497
|
}
|
|
1496
1498
|
s.setState(function() {
|
|
@@ -1499,7 +1501,7 @@ var ie = /* @__PURE__ */ an(), on = function(e) {
|
|
|
1499
1501
|
isLoading: !1
|
|
1500
1502
|
};
|
|
1501
1503
|
}, function() {
|
|
1502
|
-
|
|
1504
|
+
d(C);
|
|
1503
1505
|
});
|
|
1504
1506
|
}, S = function(C, Y) {
|
|
1505
1507
|
if (C) {
|
|
@@ -1539,9 +1541,9 @@ var ie = /* @__PURE__ */ an(), on = function(e) {
|
|
|
1539
1541
|
Zr(E, {
|
|
1540
1542
|
afterEach: S,
|
|
1541
1543
|
beforeEach: b,
|
|
1542
|
-
cacheRequests:
|
|
1544
|
+
cacheRequests: p,
|
|
1543
1545
|
evalScripts: o,
|
|
1544
|
-
httpRequestWithCredentials:
|
|
1546
|
+
httpRequestWithCredentials: u,
|
|
1545
1547
|
renumerateIRIElements: c
|
|
1546
1548
|
});
|
|
1547
1549
|
}
|
|
@@ -1566,8 +1568,8 @@ var ie = /* @__PURE__ */ an(), on = function(e) {
|
|
|
1566
1568
|
s.httpRequestWithCredentials;
|
|
1567
1569
|
var i = s.loading;
|
|
1568
1570
|
s.renumerateIRIElements, s.src, s.title, s.useRequestCache;
|
|
1569
|
-
var o = s.wrapper,
|
|
1570
|
-
return /* @__PURE__ */ Me.createElement(c, Ze({},
|
|
1571
|
+
var o = s.wrapper, u = Ur(s, cn), c = o;
|
|
1572
|
+
return /* @__PURE__ */ Me.createElement(c, Ze({}, u, {
|
|
1571
1573
|
ref: this.refCallback
|
|
1572
1574
|
}, o === "svg" ? {
|
|
1573
1575
|
xmlns: He,
|
|
@@ -1611,7 +1613,7 @@ let gt = {
|
|
|
1611
1613
|
assets: "/"
|
|
1612
1614
|
// Default for storybook isolation development
|
|
1613
1615
|
};
|
|
1614
|
-
const
|
|
1616
|
+
const Rs = (r) => {
|
|
1615
1617
|
gt = { ...gt, ...r };
|
|
1616
1618
|
}, Kt = (r) => `${gt.assets}/${r}`.replace(/\/+/g, "/"), ue = hr.memo(
|
|
1617
1619
|
({
|
|
@@ -1623,19 +1625,19 @@ const Ss = (r) => {
|
|
|
1623
1625
|
disabled: a,
|
|
1624
1626
|
state: i = "base",
|
|
1625
1627
|
rotated: o = !1,
|
|
1626
|
-
onClick:
|
|
1628
|
+
onClick: u,
|
|
1627
1629
|
isInteractable: c = !1,
|
|
1628
|
-
spin:
|
|
1630
|
+
spin: f = !1,
|
|
1629
1631
|
title: l,
|
|
1630
|
-
tabIndex:
|
|
1632
|
+
tabIndex: p
|
|
1631
1633
|
}) => {
|
|
1632
|
-
const [
|
|
1634
|
+
const [d, m] = Z(r), g = (r == null ? void 0 : r.startsWith("http")) || (r == null ? void 0 : r.startsWith("/")), x = g && (r == null ? void 0 : r.toLowerCase().endsWith(".svg")), w = Kt(`assets/svg/${r}.svg`), E = Kt(
|
|
1633
1635
|
`assets/svg/${n}.svg`
|
|
1634
1636
|
), O = {
|
|
1635
1637
|
img: `${c ? "smp-image-interactable" : ""}`,
|
|
1636
|
-
svg: `smp-icon ${i ? `smp-icon-${i}` : ""} ${o ? "smp-icon-rotated" : ""} ${c ? "smp-icon-interactable" : ""} ${
|
|
1638
|
+
svg: `smp-icon ${i ? `smp-icon-${i}` : ""} ${o ? "smp-icon-rotated" : ""} ${c ? "smp-icon-interactable" : ""} ${f ? "smp-icon-spin" : ""}`
|
|
1637
1639
|
}, S = () => {
|
|
1638
|
-
!a && c &&
|
|
1640
|
+
!a && c && u && u();
|
|
1639
1641
|
}, b = (L) => {
|
|
1640
1642
|
!a && c && (L.key === "Enter" || L.key === " ") && (L.preventDefault(), S());
|
|
1641
1643
|
};
|
|
@@ -1654,14 +1656,14 @@ const Ss = (r) => {
|
|
|
1654
1656
|
className: O.svg,
|
|
1655
1657
|
onClick: S,
|
|
1656
1658
|
onKeyDown: b,
|
|
1657
|
-
tabIndex:
|
|
1659
|
+
tabIndex: p
|
|
1658
1660
|
}
|
|
1659
1661
|
) : g ? (
|
|
1660
1662
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
1661
1663
|
/* @__PURE__ */ v.jsx(
|
|
1662
1664
|
"img",
|
|
1663
1665
|
{
|
|
1664
|
-
src:
|
|
1666
|
+
src: d,
|
|
1665
1667
|
width: e || "16px",
|
|
1666
1668
|
height: t || "auto",
|
|
1667
1669
|
alt: l,
|
|
@@ -1689,7 +1691,7 @@ const Ss = (r) => {
|
|
|
1689
1691
|
className: O.svg,
|
|
1690
1692
|
onClick: S,
|
|
1691
1693
|
onKeyDown: b,
|
|
1692
|
-
tabIndex:
|
|
1694
|
+
tabIndex: p
|
|
1693
1695
|
}
|
|
1694
1696
|
) });
|
|
1695
1697
|
}
|
|
@@ -1702,12 +1704,12 @@ const Ss = (r) => {
|
|
|
1702
1704
|
placeholder: a,
|
|
1703
1705
|
isEditable: i = !0,
|
|
1704
1706
|
shapeIcon: o,
|
|
1705
|
-
sizing:
|
|
1707
|
+
sizing: u,
|
|
1706
1708
|
state: c,
|
|
1707
|
-
variant:
|
|
1709
|
+
variant: f,
|
|
1708
1710
|
rotatedShapeIcon: l = !1,
|
|
1709
|
-
onShapeIconClick:
|
|
1710
|
-
ref:
|
|
1711
|
+
onShapeIconClick: p,
|
|
1712
|
+
ref: d,
|
|
1711
1713
|
inputRef: m,
|
|
1712
1714
|
onKeyDown: g,
|
|
1713
1715
|
inputType: x = "text",
|
|
@@ -1724,10 +1726,10 @@ const Ss = (r) => {
|
|
|
1724
1726
|
s == null || s(J.target.value);
|
|
1725
1727
|
}, z = {
|
|
1726
1728
|
wrapper: `smp-textfield-wrapper ${L ? "smp-textfield-fullWidth" : ""}`,
|
|
1727
|
-
container: `smp-textfield ${r ? "smp-textfield-disabled" : ""} ${a ? "smp-textfield-placeholder" : ""} ${
|
|
1729
|
+
container: `smp-textfield ${r ? "smp-textfield-disabled" : ""} ${a ? "smp-textfield-placeholder" : ""} ${u ? `smp-textfield-${u}` : ""} ${D ? `smp-textfield-${D}` : ""} ${b ? `smp-textfield-${b}` : ""} ${i ? "" : "smp-textfield-readOnly"}`,
|
|
1728
1730
|
input: "smp-textfield-input "
|
|
1729
1731
|
};
|
|
1730
|
-
|
|
1732
|
+
f && (f != "notSelectable" || i) && (z.container += `smp-textfield-variant-${f}`);
|
|
1731
1733
|
const K = Y ? { "--smp-textField-width-base": Y } : void 0;
|
|
1732
1734
|
return /* @__PURE__ */ v.jsxs("div", { className: z.wrapper, "data-component": C, children: [
|
|
1733
1735
|
E && /* @__PURE__ */ v.jsx($e, { label: E, disabled: r, htmlFor: j }),
|
|
@@ -1735,7 +1737,7 @@ const Ss = (r) => {
|
|
|
1735
1737
|
"div",
|
|
1736
1738
|
{
|
|
1737
1739
|
className: z.container,
|
|
1738
|
-
ref:
|
|
1740
|
+
ref: d,
|
|
1739
1741
|
style: K,
|
|
1740
1742
|
children: [
|
|
1741
1743
|
t && /* @__PURE__ */ v.jsx(ue, { icon: t, disabled: r }),
|
|
@@ -1763,7 +1765,7 @@ const Ss = (r) => {
|
|
|
1763
1765
|
icon: k,
|
|
1764
1766
|
disabled: r,
|
|
1765
1767
|
state: D,
|
|
1766
|
-
onClick:
|
|
1768
|
+
onClick: p,
|
|
1767
1769
|
rotated: l,
|
|
1768
1770
|
isInteractable: i,
|
|
1769
1771
|
tabIndex: 0
|
|
@@ -1789,26 +1791,26 @@ function xr({
|
|
|
1789
1791
|
containerHeight: t,
|
|
1790
1792
|
overscan: n = 5
|
|
1791
1793
|
}) {
|
|
1792
|
-
const [s, a] = Z(0), i = ve(null), o = r.length * e,
|
|
1794
|
+
const [s, a] = Z(0), i = ve(null), o = r.length * e, u = Math.max(0, Math.floor(s / e) - n), c = Math.min(
|
|
1793
1795
|
r.length - 1,
|
|
1794
1796
|
Math.floor((s + t) / e) + n
|
|
1795
|
-
),
|
|
1796
|
-
for (let
|
|
1797
|
-
|
|
1798
|
-
item: r[
|
|
1799
|
-
index:
|
|
1800
|
-
offsetTop:
|
|
1797
|
+
), f = [];
|
|
1798
|
+
for (let d = u; d <= c; d++)
|
|
1799
|
+
f.push({
|
|
1800
|
+
item: r[d],
|
|
1801
|
+
index: d,
|
|
1802
|
+
offsetTop: d * e
|
|
1801
1803
|
});
|
|
1802
|
-
const l = ye((
|
|
1803
|
-
const m =
|
|
1804
|
+
const l = ye((d) => {
|
|
1805
|
+
const m = d.target.scrollTop;
|
|
1804
1806
|
a(m);
|
|
1805
|
-
}, []),
|
|
1807
|
+
}, []), p = (d) => {
|
|
1806
1808
|
if (!i.current) return;
|
|
1807
|
-
const m =
|
|
1809
|
+
const m = d * e, g = m + e, x = i.current, w = x.scrollTop, E = w + t;
|
|
1808
1810
|
m < w ? x.scrollTop = m : g > E && (x.scrollTop = g - t);
|
|
1809
1811
|
};
|
|
1810
1812
|
return {
|
|
1811
|
-
virtualItems:
|
|
1813
|
+
virtualItems: f,
|
|
1812
1814
|
containerProps: {
|
|
1813
1815
|
ref: i,
|
|
1814
1816
|
style: {
|
|
@@ -1830,13 +1832,15 @@ function xr({
|
|
|
1830
1832
|
scrollTop: s,
|
|
1831
1833
|
viewportHeight: t,
|
|
1832
1834
|
totalHeight: o,
|
|
1833
|
-
startIndex:
|
|
1835
|
+
startIndex: u,
|
|
1834
1836
|
endIndex: c
|
|
1835
1837
|
},
|
|
1836
|
-
scrollToIndex:
|
|
1838
|
+
scrollToIndex: p
|
|
1837
1839
|
};
|
|
1838
1840
|
}
|
|
1839
|
-
const un =
|
|
1841
|
+
const un = {
|
|
1842
|
+
"smp-list": "_smp-list_l1sf5_1"
|
|
1843
|
+
}, fn = 10, Sr = ({
|
|
1840
1844
|
id: r,
|
|
1841
1845
|
options: e,
|
|
1842
1846
|
displayMode: t,
|
|
@@ -1847,40 +1851,40 @@ const un = 10, Sr = ({
|
|
|
1847
1851
|
activeIndex: i = [],
|
|
1848
1852
|
// active element
|
|
1849
1853
|
width: o,
|
|
1850
|
-
onClick:
|
|
1854
|
+
onClick: u,
|
|
1851
1855
|
onKeyDown: c
|
|
1852
1856
|
}) => {
|
|
1853
1857
|
var P;
|
|
1854
|
-
const [
|
|
1858
|
+
const [f, l] = Z(""), p = 24, [d, m] = Z(
|
|
1855
1859
|
a !== null ? a : -1
|
|
1856
|
-
), g = s !== void 0 ? s : e.length >
|
|
1857
|
-
(D) => D.label.toLowerCase().includes(
|
|
1860
|
+
), g = s !== void 0 ? s : e.length > fn, x = f ? e.filter(
|
|
1861
|
+
(D) => D.label.toLowerCase().includes(f.toLowerCase())
|
|
1858
1862
|
) : e, w = (D) => {
|
|
1859
1863
|
l(D);
|
|
1860
1864
|
}, { virtualItems: E, containerProps: O, innerProps: S, scrollToIndex: b } = xr({
|
|
1861
1865
|
items: x,
|
|
1862
|
-
itemHeight:
|
|
1866
|
+
itemHeight: p,
|
|
1863
1867
|
containerHeight: 200,
|
|
1864
1868
|
overscan: 5
|
|
1865
1869
|
});
|
|
1866
1870
|
oe(() => {
|
|
1867
|
-
a !== null && a !==
|
|
1871
|
+
a !== null && a !== d && m(a);
|
|
1868
1872
|
}, [a]), oe(() => {
|
|
1869
|
-
|
|
1870
|
-
}, [
|
|
1873
|
+
d >= 0 && d < x.length && b(d);
|
|
1874
|
+
}, [d, x]);
|
|
1871
1875
|
const L = (D) => {
|
|
1872
1876
|
if (D.key === "ArrowDown" || D.key === "ArrowUp") {
|
|
1873
1877
|
D.preventDefault();
|
|
1874
|
-
let k =
|
|
1875
|
-
D.key === "ArrowDown" ? k =
|
|
1876
|
-
} else D.key === "Enter" ?
|
|
1878
|
+
let k = d;
|
|
1879
|
+
D.key === "ArrowDown" ? k = d < x.length - 1 ? d + 1 : 0 : D.key === "ArrowUp" && (k = d > 0 ? d - 1 : x.length - 1), m(k);
|
|
1880
|
+
} else D.key === "Enter" ? d >= 0 && d < x.length && (u == null || u(x[d])) : D.key === "Escape" && (D.preventDefault(), D.stopPropagation());
|
|
1877
1881
|
c && c(D);
|
|
1878
1882
|
}, C = (D) => {
|
|
1879
1883
|
L(D);
|
|
1880
1884
|
}, Y = (D) => {
|
|
1881
1885
|
L(D);
|
|
1882
1886
|
}, j = {
|
|
1883
|
-
wrapper: "smp-list"
|
|
1887
|
+
wrapper: `${un["smp-list"]}`,
|
|
1884
1888
|
container: "smp-list-container",
|
|
1885
1889
|
virtualScroll: "smp-list-virtualScroll",
|
|
1886
1890
|
listItem: "smp-list-listItem"
|
|
@@ -1899,7 +1903,7 @@ const un = 10, Sr = ({
|
|
|
1899
1903
|
g && /* @__PURE__ */ v.jsx(
|
|
1900
1904
|
Ce,
|
|
1901
1905
|
{
|
|
1902
|
-
bindValue:
|
|
1906
|
+
bindValue: f,
|
|
1903
1907
|
placeholder: "Search...",
|
|
1904
1908
|
onChange: w,
|
|
1905
1909
|
onKeyDown: C
|
|
@@ -1914,7 +1918,7 @@ const un = 10, Sr = ({
|
|
|
1914
1918
|
role: "listbox",
|
|
1915
1919
|
"aria-label": "List",
|
|
1916
1920
|
onKeyDown: Y,
|
|
1917
|
-
"aria-activedescendant":
|
|
1921
|
+
"aria-activedescendant": d >= 0 && d < x.length ? (P = x[d]) == null ? void 0 : P.id : void 0,
|
|
1918
1922
|
children: /* @__PURE__ */ v.jsx("div", { ...S, className: j.virtualScroll, children: E.map(({ item: D, index: k, offsetTop: U }) => {
|
|
1919
1923
|
const H = i.includes(D.id);
|
|
1920
1924
|
return (
|
|
@@ -1924,18 +1928,18 @@ const un = 10, Sr = ({
|
|
|
1924
1928
|
{
|
|
1925
1929
|
role: "option",
|
|
1926
1930
|
id: D.id,
|
|
1927
|
-
"aria-selected":
|
|
1931
|
+
"aria-selected": d === k ? "true" : "false",
|
|
1928
1932
|
tabIndex: -1,
|
|
1929
|
-
className: `${j.listItem} ${
|
|
1933
|
+
className: `${j.listItem} ${d === k ? "selected-item" : ""}`,
|
|
1930
1934
|
"aria-label": D.id + "-" + D.label,
|
|
1931
1935
|
style: {
|
|
1932
|
-
height: `${
|
|
1933
|
-
lineHeight: `calc(${
|
|
1936
|
+
height: `${p}px`,
|
|
1937
|
+
lineHeight: `calc(${p}px - 2*2px)`,
|
|
1934
1938
|
// lineHeight - 2*padding
|
|
1935
1939
|
transform: `translateY(${U}px)`
|
|
1936
1940
|
},
|
|
1937
1941
|
onClick: () => {
|
|
1938
|
-
|
|
1942
|
+
u == null || u(D), m(k);
|
|
1939
1943
|
},
|
|
1940
1944
|
children: [
|
|
1941
1945
|
Xe(D.id, D.label, t),
|
|
@@ -1967,7 +1971,7 @@ const un = 10, Sr = ({
|
|
|
1967
1971
|
Xe(e, t, r)
|
|
1968
1972
|
);
|
|
1969
1973
|
}, [t, r]), /* @__PURE__ */ v.jsx(Ce, { ...n, bindValue: s });
|
|
1970
|
-
},
|
|
1974
|
+
}, dn = (r) => {
|
|
1971
1975
|
const e = ve(null);
|
|
1972
1976
|
return oe(() => () => {
|
|
1973
1977
|
e.current && clearTimeout(e.current);
|
|
@@ -1985,25 +1989,25 @@ const un = 10, Sr = ({
|
|
|
1985
1989
|
minimumChars: a = 3,
|
|
1986
1990
|
isEditable: i = !0,
|
|
1987
1991
|
placeholder: o,
|
|
1988
|
-
fun:
|
|
1992
|
+
fun: u,
|
|
1989
1993
|
_changeOnEnter: c = !1,
|
|
1990
|
-
onChange:
|
|
1994
|
+
onChange: f,
|
|
1991
1995
|
onOptionsRequest: l,
|
|
1992
|
-
_multiActiveIndex:
|
|
1993
|
-
...
|
|
1996
|
+
_multiActiveIndex: p,
|
|
1997
|
+
...d
|
|
1994
1998
|
}) => {
|
|
1995
1999
|
const [m, g] = Z(r), [x, w] = Z(e), [E, O] = Z(!1), [S, b] = Z(t || []), [L, C] = Z(0), [Y, j] = Z([r]), { anchorRef: P, targetRef: D, anchorWidth: k } = St({
|
|
1996
2000
|
position: "bottom",
|
|
1997
2001
|
enabled: E
|
|
1998
2002
|
});
|
|
1999
2003
|
Je(D, () => O(!1));
|
|
2000
|
-
const U =
|
|
2001
|
-
W.length >= a ?
|
|
2002
|
-
const _ = await l(
|
|
2004
|
+
const U = dn(400), H = (W) => {
|
|
2005
|
+
W.length >= a ? u && l && U(async () => {
|
|
2006
|
+
const _ = await l(u, W);
|
|
2003
2007
|
b(_), C(_.length > 0 ? 0 : -1), O(!0);
|
|
2004
|
-
}) : O(!1), g(W), w(e), c ||
|
|
2008
|
+
}) : O(!1), g(W), w(e), c || f == null || f(W, e);
|
|
2005
2009
|
}, z = (W) => {
|
|
2006
|
-
c ? (g(""), w("")) : (g(W.id), w(W.label)),
|
|
2010
|
+
c ? (g(""), w("")) : (g(W.id), w(W.label)), f == null || f(W.id, W.label);
|
|
2007
2011
|
const _ = S.findIndex((h) => h.id === W.id);
|
|
2008
2012
|
C(_), j([W.id]), O(!1);
|
|
2009
2013
|
}, K = (W) => {
|
|
@@ -2015,7 +2019,7 @@ const un = 10, Sr = ({
|
|
|
2015
2019
|
}
|
|
2016
2020
|
switch (W.key) {
|
|
2017
2021
|
case "Enter":
|
|
2018
|
-
L >= 0 && L < S.length ? z(S[L]) : c && (
|
|
2022
|
+
L >= 0 && L < S.length ? z(S[L]) : c && (f == null || f(m, ""), O(!1), g(""), w(""));
|
|
2019
2023
|
break;
|
|
2020
2024
|
case "Escape":
|
|
2021
2025
|
O(!1), C(-1);
|
|
@@ -2026,7 +2030,7 @@ const un = 10, Sr = ({
|
|
|
2026
2030
|
/* @__PURE__ */ v.jsx(
|
|
2027
2031
|
wr,
|
|
2028
2032
|
{
|
|
2029
|
-
...
|
|
2033
|
+
...d,
|
|
2030
2034
|
bindValue: m,
|
|
2031
2035
|
optionalDisplayValue: x,
|
|
2032
2036
|
displayMode: n,
|
|
@@ -2047,7 +2051,7 @@ const un = 10, Sr = ({
|
|
|
2047
2051
|
onClick: z,
|
|
2048
2052
|
ref: D,
|
|
2049
2053
|
selectedIndex: L,
|
|
2050
|
-
activeIndex:
|
|
2054
|
+
activeIndex: p || Y,
|
|
2051
2055
|
width: k,
|
|
2052
2056
|
showFilter: !1,
|
|
2053
2057
|
onKeyDown: K
|
|
@@ -2073,16 +2077,16 @@ const un = 10, Sr = ({
|
|
|
2073
2077
|
sizing: a = "base",
|
|
2074
2078
|
variant: i = "primary",
|
|
2075
2079
|
appearance: o = "raised",
|
|
2076
|
-
showIcon:
|
|
2080
|
+
showIcon: u = !0,
|
|
2077
2081
|
showText: c = !0,
|
|
2078
|
-
fullWidth:
|
|
2082
|
+
fullWidth: f = !1,
|
|
2079
2083
|
loading: l = !1,
|
|
2080
|
-
justify:
|
|
2081
|
-
title:
|
|
2084
|
+
justify: p = "center",
|
|
2085
|
+
title: d,
|
|
2082
2086
|
optionalDisplayValue: m
|
|
2083
2087
|
}) => {
|
|
2084
2088
|
const g = {
|
|
2085
|
-
container: `smp-button smp-button-container ${a ? `smp-button-${a}` : ""} ${i ? `smp-buttonVariant-${i}` : ""} ${o ? `smp-buttonType-${o}` : ""} ${
|
|
2089
|
+
container: `smp-button smp-button-container ${a ? `smp-button-${a}` : ""} ${i ? `smp-buttonVariant-${i}` : ""} ${o ? `smp-buttonType-${o}` : ""} ${f ? "smp-button-fullWidth" : ""} smp-justifyContent-${p}`
|
|
2086
2090
|
};
|
|
2087
2091
|
return /* @__PURE__ */ v.jsx(
|
|
2088
2092
|
"button",
|
|
@@ -2093,9 +2097,9 @@ const un = 10, Sr = ({
|
|
|
2093
2097
|
"aria-label": t,
|
|
2094
2098
|
disabled: s,
|
|
2095
2099
|
"aria-busy": l,
|
|
2096
|
-
title:
|
|
2100
|
+
title: d || r || m,
|
|
2097
2101
|
children: l ? /* @__PURE__ */ v.jsx(ue, { icon: "spinner", state: qt(i), spin: !0 }) : /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
|
|
2098
|
-
n &&
|
|
2102
|
+
n && u && /* @__PURE__ */ v.jsx(
|
|
2099
2103
|
ue,
|
|
2100
2104
|
{
|
|
2101
2105
|
icon: n,
|
|
@@ -2109,7 +2113,7 @@ const un = 10, Sr = ({
|
|
|
2109
2113
|
] })
|
|
2110
2114
|
}
|
|
2111
2115
|
);
|
|
2112
|
-
},
|
|
2116
|
+
}, pn = ({
|
|
2113
2117
|
options: r,
|
|
2114
2118
|
fun: e,
|
|
2115
2119
|
direction: t = "row",
|
|
@@ -2118,22 +2122,22 @@ const un = 10, Sr = ({
|
|
|
2118
2122
|
variant: a,
|
|
2119
2123
|
appearance: i,
|
|
2120
2124
|
showText: o,
|
|
2121
|
-
showIcon:
|
|
2125
|
+
showIcon: u,
|
|
2122
2126
|
fullWidth: c,
|
|
2123
|
-
disabled:
|
|
2127
|
+
disabled: f,
|
|
2124
2128
|
justify: l,
|
|
2125
|
-
onClick:
|
|
2126
|
-
onOptionsRequest:
|
|
2129
|
+
onClick: p,
|
|
2130
|
+
onOptionsRequest: d
|
|
2127
2131
|
}) => {
|
|
2128
2132
|
const [m, g] = Z(r);
|
|
2129
2133
|
oe(() => {
|
|
2130
|
-
!m &&
|
|
2134
|
+
!m && d && e && d(e, void 0).then((E) => g(E)).catch((E) => {
|
|
2131
2135
|
console.error(
|
|
2132
2136
|
"Errore nel caricamento delle opzioni per ButtonList",
|
|
2133
2137
|
E
|
|
2134
2138
|
);
|
|
2135
2139
|
});
|
|
2136
|
-
}, [m, e,
|
|
2140
|
+
}, [m, e, d]);
|
|
2137
2141
|
const x = {
|
|
2138
2142
|
container: `smp-button-list smp-button-list-${t} smp-justifyContent-${n}`
|
|
2139
2143
|
}, w = m == null ? void 0 : m.map((E, O) => {
|
|
@@ -2145,19 +2149,19 @@ const un = 10, Sr = ({
|
|
|
2145
2149
|
variant: a,
|
|
2146
2150
|
appearance: i,
|
|
2147
2151
|
showText: o,
|
|
2148
|
-
showIcon:
|
|
2152
|
+
showIcon: u,
|
|
2149
2153
|
fullWidth: c,
|
|
2150
|
-
disabled:
|
|
2154
|
+
disabled: f,
|
|
2151
2155
|
sizing: s,
|
|
2152
2156
|
justify: l,
|
|
2153
2157
|
onClick: () => {
|
|
2154
|
-
|
|
2158
|
+
p == null || p(E.id, E.fun);
|
|
2155
2159
|
}
|
|
2156
2160
|
};
|
|
2157
2161
|
return /* @__PURE__ */ v.jsx(De, { ...S }, `button-${O}`);
|
|
2158
2162
|
});
|
|
2159
2163
|
return /* @__PURE__ */ v.jsx("div", { role: "list", "data-component": "button-list", className: x.container, children: w });
|
|
2160
|
-
},
|
|
2164
|
+
}, hn = ({
|
|
2161
2165
|
bindValue: r,
|
|
2162
2166
|
_dataComponent: e = "checkbox",
|
|
2163
2167
|
disabled: t,
|
|
@@ -2168,10 +2172,10 @@ const un = 10, Sr = ({
|
|
|
2168
2172
|
}) => {
|
|
2169
2173
|
const o = (c) => {
|
|
2170
2174
|
s && a && a(c.target.checked);
|
|
2171
|
-
},
|
|
2175
|
+
}, u = {
|
|
2172
2176
|
wrapper: "smp-checkbox-wrapper"
|
|
2173
2177
|
};
|
|
2174
|
-
return /* @__PURE__ */ v.jsxs("div", { className:
|
|
2178
|
+
return /* @__PURE__ */ v.jsxs("div", { className: u.wrapper, "data-component": e, children: [
|
|
2175
2179
|
n && /* @__PURE__ */ v.jsx($e, { label: n, disabled: t }),
|
|
2176
2180
|
/* @__PURE__ */ v.jsx(
|
|
2177
2181
|
"input",
|
|
@@ -2184,7 +2188,7 @@ const un = 10, Sr = ({
|
|
|
2184
2188
|
}
|
|
2185
2189
|
)
|
|
2186
2190
|
] });
|
|
2187
|
-
},
|
|
2191
|
+
}, mn = {
|
|
2188
2192
|
titleLarge: "h2",
|
|
2189
2193
|
title: "h3",
|
|
2190
2194
|
body: "h6",
|
|
@@ -2195,7 +2199,7 @@ const un = 10, Sr = ({
|
|
|
2195
2199
|
color: t,
|
|
2196
2200
|
...n
|
|
2197
2201
|
}) => {
|
|
2198
|
-
const s =
|
|
2202
|
+
const s = mn[r], a = {
|
|
2199
2203
|
container: `smp-typography ${r ? `smp-typography-${r}` : ""} ${n.disabled ? "smp-typography-disabled" : ""}`
|
|
2200
2204
|
};
|
|
2201
2205
|
return /* @__PURE__ */ v.jsx(
|
|
@@ -2218,22 +2222,22 @@ const un = 10, Sr = ({
|
|
|
2218
2222
|
backgroundColor: a,
|
|
2219
2223
|
isDraggable: i = !1
|
|
2220
2224
|
}) => {
|
|
2221
|
-
const [o,
|
|
2225
|
+
const [o, u] = Z(null), c = {
|
|
2222
2226
|
container: `${["smp-chips-container"]}`,
|
|
2223
2227
|
element: "smp-chips-element"
|
|
2224
|
-
},
|
|
2225
|
-
n == null || n(r.filter((m, g) => g !==
|
|
2226
|
-
}, l = (
|
|
2227
|
-
|
|
2228
|
-
},
|
|
2229
|
-
if (o === null || o ===
|
|
2228
|
+
}, f = (d) => {
|
|
2229
|
+
n == null || n(r.filter((m, g) => g !== d));
|
|
2230
|
+
}, l = (d) => {
|
|
2231
|
+
u(d);
|
|
2232
|
+
}, p = (d) => {
|
|
2233
|
+
if (o === null || o === d) return;
|
|
2230
2234
|
const m = [...r], [g] = m.splice(o, 1);
|
|
2231
|
-
m.splice(
|
|
2235
|
+
m.splice(d, 0, g), n == null || n(m), u(null);
|
|
2232
2236
|
};
|
|
2233
|
-
return /* @__PURE__ */ v.jsx("div", { className: c.container, role: "list", "data-component": "chip", children: r.flatMap((
|
|
2237
|
+
return /* @__PURE__ */ v.jsx("div", { className: c.container, role: "list", "data-component": "chip", children: r.flatMap((d, m) => {
|
|
2234
2238
|
const g = Xe(
|
|
2235
|
-
|
|
2236
|
-
|
|
2239
|
+
d.bindValue,
|
|
2240
|
+
d.optionalDisplayValue,
|
|
2237
2241
|
t
|
|
2238
2242
|
), x = /* @__PURE__ */ v.jsxs(
|
|
2239
2243
|
"div",
|
|
@@ -2243,7 +2247,7 @@ const un = 10, Sr = ({
|
|
|
2243
2247
|
draggable: i,
|
|
2244
2248
|
onDragStart: () => l(m),
|
|
2245
2249
|
onDragOver: (E) => i && E.preventDefault(),
|
|
2246
|
-
onDrop: () => i &&
|
|
2250
|
+
onDrop: () => i && p(m),
|
|
2247
2251
|
style: {
|
|
2248
2252
|
"--smp-chips-backgroundColor-base": a
|
|
2249
2253
|
},
|
|
@@ -2255,7 +2259,7 @@ const un = 10, Sr = ({
|
|
|
2255
2259
|
{
|
|
2256
2260
|
icon: "close",
|
|
2257
2261
|
isInteractable: !0,
|
|
2258
|
-
onClick: () =>
|
|
2262
|
+
onClick: () => f(m),
|
|
2259
2263
|
color: s
|
|
2260
2264
|
}
|
|
2261
2265
|
)
|
|
@@ -2291,28 +2295,28 @@ function Tr(r, e) {
|
|
|
2291
2295
|
})();
|
|
2292
2296
|
const i = (c) => {
|
|
2293
2297
|
if (c.key === "Escape" || c.key !== "Tab") return;
|
|
2294
|
-
const
|
|
2295
|
-
if (
|
|
2296
|
-
const l =
|
|
2297
|
-
c.shiftKey && document.activeElement === l ? (c.preventDefault(),
|
|
2298
|
+
const f = s();
|
|
2299
|
+
if (f.length === 0) return;
|
|
2300
|
+
const l = f[0], p = f[f.length - 1];
|
|
2301
|
+
c.shiftKey && document.activeElement === l ? (c.preventDefault(), p.focus()) : !c.shiftKey && document.activeElement === p && (c.preventDefault(), l.focus());
|
|
2298
2302
|
}, o = (c) => {
|
|
2299
2303
|
if (n && !n.contains(c.target)) {
|
|
2300
2304
|
c.preventDefault();
|
|
2301
|
-
const
|
|
2302
|
-
|
|
2305
|
+
const f = s();
|
|
2306
|
+
f.length > 0 && f[0].focus();
|
|
2303
2307
|
}
|
|
2304
2308
|
};
|
|
2305
2309
|
document.addEventListener("keydown", i), document.addEventListener("mousedown", o);
|
|
2306
|
-
const
|
|
2310
|
+
const u = document.body.style.overflow;
|
|
2307
2311
|
return document.body.style.overflow = "hidden", () => {
|
|
2308
|
-
document.removeEventListener("keydown", i), document.removeEventListener("mousedown", o), document.body.style.overflow =
|
|
2312
|
+
document.removeEventListener("keydown", i), document.removeEventListener("mousedown", o), document.body.style.overflow = u, t.current && requestAnimationFrame(() => {
|
|
2309
2313
|
var c;
|
|
2310
2314
|
(c = t.current) == null || c.focus();
|
|
2311
2315
|
});
|
|
2312
2316
|
};
|
|
2313
2317
|
}, [r, e]);
|
|
2314
2318
|
}
|
|
2315
|
-
const
|
|
2319
|
+
const gn = ({
|
|
2316
2320
|
bindValue: r,
|
|
2317
2321
|
onChange: e,
|
|
2318
2322
|
options: t = [],
|
|
@@ -2321,26 +2325,26 @@ const mn = ({
|
|
|
2321
2325
|
displayMode: a,
|
|
2322
2326
|
listDisplayMode: i = "Both",
|
|
2323
2327
|
fun: o,
|
|
2324
|
-
onOptionsRequest:
|
|
2328
|
+
onOptionsRequest: u,
|
|
2325
2329
|
multiActiveIndex: c,
|
|
2326
|
-
...
|
|
2330
|
+
...f
|
|
2327
2331
|
}) => {
|
|
2328
|
-
const [l,
|
|
2332
|
+
const [l, p] = Z(!1), [d, m] = Z(t), [g, x] = Z(-1), [w, E] = Z([r]), O = bt(), { anchorRef: S, targetRef: b, anchorWidth: L } = St({
|
|
2329
2333
|
position: "bottom",
|
|
2330
2334
|
enabled: l
|
|
2331
2335
|
});
|
|
2332
|
-
Je(b, () =>
|
|
2336
|
+
Je(b, () => p(!1)), Tr(l, b);
|
|
2333
2337
|
const C = (D) => {
|
|
2334
2338
|
e == null || e(D.id, D.label);
|
|
2335
|
-
const k =
|
|
2336
|
-
x(k), E([D.id]),
|
|
2339
|
+
const k = d.findIndex((U) => U.id === D.id);
|
|
2340
|
+
x(k), E([D.id]), p(!1);
|
|
2337
2341
|
}, Y = (D) => {
|
|
2338
|
-
D.key === "Escape" && (
|
|
2342
|
+
D.key === "Escape" && (p(!1), x(-1));
|
|
2339
2343
|
}, j = (D) => {
|
|
2340
2344
|
(D.key === "ArrowDown" || D.key === "ArrowUp") && (D.preventDefault(), P());
|
|
2341
2345
|
}, P = () => {
|
|
2342
|
-
o &&
|
|
2343
|
-
m(D), x(D.length > 0 ? 0 : -1),
|
|
2346
|
+
o && u && u(o, void 0).then((D) => {
|
|
2347
|
+
m(D), x(D.length > 0 ? 0 : -1), p(!0);
|
|
2344
2348
|
});
|
|
2345
2349
|
};
|
|
2346
2350
|
return /* @__PURE__ */ v.jsxs(
|
|
@@ -2355,7 +2359,7 @@ const mn = ({
|
|
|
2355
2359
|
/* @__PURE__ */ v.jsx(
|
|
2356
2360
|
wr,
|
|
2357
2361
|
{
|
|
2358
|
-
...
|
|
2362
|
+
...f,
|
|
2359
2363
|
bindValue: r,
|
|
2360
2364
|
optionalDisplayValue: n,
|
|
2361
2365
|
displayMode: a,
|
|
@@ -2373,7 +2377,7 @@ const mn = ({
|
|
|
2373
2377
|
Sr,
|
|
2374
2378
|
{
|
|
2375
2379
|
id: O,
|
|
2376
|
-
options:
|
|
2380
|
+
options: d,
|
|
2377
2381
|
displayMode: i,
|
|
2378
2382
|
ref: b,
|
|
2379
2383
|
selectedIndex: g,
|
|
@@ -2392,11 +2396,11 @@ const mn = ({
|
|
|
2392
2396
|
r = n, e = s;
|
|
2393
2397
|
});
|
|
2394
2398
|
return t.resolve = r, t.reject = e, t;
|
|
2395
|
-
}, Jt = (r) => r == null ? "" : "" + r,
|
|
2399
|
+
}, Jt = (r) => r == null ? "" : "" + r, yn = (r, e, t) => {
|
|
2396
2400
|
r.forEach((n) => {
|
|
2397
2401
|
e[n] && (t[n] = e[n]);
|
|
2398
2402
|
});
|
|
2399
|
-
},
|
|
2403
|
+
}, vn = /###/g, Xt = (r) => r && r.indexOf("###") > -1 ? r.replace(vn, ".") : r, Zt = (r) => !r || G(r), _e = (r, e, t) => {
|
|
2400
2404
|
const n = G(e) ? e.split(".") : e;
|
|
2401
2405
|
let s = 0;
|
|
2402
2406
|
for (; s < n.length - 1; ) {
|
|
@@ -2421,7 +2425,7 @@ const mn = ({
|
|
|
2421
2425
|
for (; o.obj === void 0 && i.length; )
|
|
2422
2426
|
a = `${i[i.length - 1]}.${a}`, i = i.slice(0, i.length - 1), o = _e(r, i, Object), o != null && o.obj && typeof o.obj[`${o.k}.${a}`] < "u" && (o.obj = void 0);
|
|
2423
2427
|
o.obj[`${o.k}.${a}`] = t;
|
|
2424
|
-
},
|
|
2428
|
+
}, bn = (r, e, t, n) => {
|
|
2425
2429
|
const {
|
|
2426
2430
|
obj: s,
|
|
2427
2431
|
k: a
|
|
@@ -2434,7 +2438,7 @@ const mn = ({
|
|
|
2434
2438
|
} = _e(r, e);
|
|
2435
2439
|
if (t && Object.prototype.hasOwnProperty.call(t, n))
|
|
2436
2440
|
return t[n];
|
|
2437
|
-
},
|
|
2441
|
+
}, xn = (r, e, t) => {
|
|
2438
2442
|
const n = Qe(r, t);
|
|
2439
2443
|
return n !== void 0 ? n : Qe(e, t);
|
|
2440
2444
|
}, Or = (r, e, t) => {
|
|
@@ -2442,7 +2446,7 @@ const mn = ({
|
|
|
2442
2446
|
n !== "__proto__" && n !== "constructor" && (n in r ? G(r[n]) || r[n] instanceof String || G(e[n]) || e[n] instanceof String ? t && (r[n] = e[n]) : Or(r[n], e[n], t) : r[n] = e[n]);
|
|
2443
2447
|
return r;
|
|
2444
2448
|
}, Oe = (r) => r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
2445
|
-
var
|
|
2449
|
+
var Sn = {
|
|
2446
2450
|
"&": "&",
|
|
2447
2451
|
"<": "<",
|
|
2448
2452
|
">": ">",
|
|
@@ -2450,8 +2454,8 @@ var xn = {
|
|
|
2450
2454
|
"'": "'",
|
|
2451
2455
|
"/": "/"
|
|
2452
2456
|
};
|
|
2453
|
-
const
|
|
2454
|
-
class
|
|
2457
|
+
const wn = (r) => G(r) ? r.replace(/[&<>"'\/]/g, (e) => Sn[e]) : r;
|
|
2458
|
+
class En {
|
|
2455
2459
|
constructor(e) {
|
|
2456
2460
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
2457
2461
|
}
|
|
@@ -2463,11 +2467,11 @@ class wn {
|
|
|
2463
2467
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
|
|
2464
2468
|
}
|
|
2465
2469
|
}
|
|
2466
|
-
const
|
|
2470
|
+
const Tn = [" ", ",", "?", "!", ";"], On = new En(20), Rn = (r, e, t) => {
|
|
2467
2471
|
e = e || "", t = t || "";
|
|
2468
|
-
const n =
|
|
2472
|
+
const n = Tn.filter((i) => e.indexOf(i) < 0 && t.indexOf(i) < 0);
|
|
2469
2473
|
if (n.length === 0) return !0;
|
|
2470
|
-
const s =
|
|
2474
|
+
const s = On.getRegExp(`(${n.map((i) => i === "?" ? "\\?" : i).join("|")})`);
|
|
2471
2475
|
let a = !s.test(r);
|
|
2472
2476
|
if (!a) {
|
|
2473
2477
|
const i = r.indexOf(t);
|
|
@@ -2484,17 +2488,17 @@ const En = [" ", ",", "?", "!", ";"], Tn = new wn(20), On = (r, e, t) => {
|
|
|
2484
2488
|
if (!s || typeof s != "object")
|
|
2485
2489
|
return;
|
|
2486
2490
|
let i, o = "";
|
|
2487
|
-
for (let
|
|
2488
|
-
if (
|
|
2489
|
-
if (["string", "number", "boolean"].indexOf(typeof i) > -1 &&
|
|
2491
|
+
for (let u = a; u < n.length; ++u)
|
|
2492
|
+
if (u !== a && (o += t), o += n[u], i = s[o], i !== void 0) {
|
|
2493
|
+
if (["string", "number", "boolean"].indexOf(typeof i) > -1 && u < n.length - 1)
|
|
2490
2494
|
continue;
|
|
2491
|
-
a +=
|
|
2495
|
+
a += u - a + 1;
|
|
2492
2496
|
break;
|
|
2493
2497
|
}
|
|
2494
2498
|
s = i;
|
|
2495
2499
|
}
|
|
2496
2500
|
return s;
|
|
2497
|
-
}, Ie = (r) => r == null ? void 0 : r.replace("_", "-"),
|
|
2501
|
+
}, Ie = (r) => r == null ? void 0 : r.replace("_", "-"), jn = {
|
|
2498
2502
|
type: "logger",
|
|
2499
2503
|
log(r) {
|
|
2500
2504
|
this.output("log", r);
|
|
@@ -2515,7 +2519,7 @@ class et {
|
|
|
2515
2519
|
this.init(e, t);
|
|
2516
2520
|
}
|
|
2517
2521
|
init(e, t = {}) {
|
|
2518
|
-
this.prefix = t.prefix || "i18next:", this.logger = e ||
|
|
2522
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || jn, this.options = t, this.debug = t.debug;
|
|
2519
2523
|
}
|
|
2520
2524
|
log(...e) {
|
|
2521
2525
|
return this.forward(e, "log", "", !0);
|
|
@@ -2588,12 +2592,12 @@ class er extends rt {
|
|
|
2588
2592
|
t > -1 && this.options.ns.splice(t, 1);
|
|
2589
2593
|
}
|
|
2590
2594
|
getResource(e, t, n, s = {}) {
|
|
2591
|
-
var c,
|
|
2595
|
+
var c, f;
|
|
2592
2596
|
const a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, i = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
2593
2597
|
let o;
|
|
2594
2598
|
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : G(n) && a ? o.push(...n.split(a)) : o.push(n)));
|
|
2595
|
-
const
|
|
2596
|
-
return !
|
|
2599
|
+
const u = Qe(this.data, o);
|
|
2600
|
+
return !u && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), u || !i || !G(n) ? u : yt((f = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : f[t], n, a);
|
|
2597
2601
|
}
|
|
2598
2602
|
addResource(e, t, n, s, a = {
|
|
2599
2603
|
silent: !1
|
|
@@ -2617,11 +2621,11 @@ class er extends rt {
|
|
|
2617
2621
|
}) {
|
|
2618
2622
|
let o = [e, t];
|
|
2619
2623
|
e.indexOf(".") > -1 && (o = e.split("."), s = n, n = t, t = o[1]), this.addNamespaces(t);
|
|
2620
|
-
let
|
|
2621
|
-
i.skipCopy || (n = JSON.parse(JSON.stringify(n))), s ? Or(
|
|
2622
|
-
...
|
|
2624
|
+
let u = Qe(this.data, o) || {};
|
|
2625
|
+
i.skipCopy || (n = JSON.parse(JSON.stringify(n))), s ? Or(u, n, a) : u = {
|
|
2626
|
+
...u,
|
|
2623
2627
|
...n
|
|
2624
|
-
}, Qt(this.data, o,
|
|
2628
|
+
}, Qt(this.data, o, u), i.silent || this.emit("added", e, t, n);
|
|
2625
2629
|
}
|
|
2626
2630
|
removeResourceBundle(e, t) {
|
|
2627
2631
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -2658,7 +2662,7 @@ var Rr = {
|
|
|
2658
2662
|
const tr = {}, rr = (r) => !G(r) && typeof r != "boolean" && typeof r != "number";
|
|
2659
2663
|
class tt extends rt {
|
|
2660
2664
|
constructor(e, t = {}) {
|
|
2661
|
-
super(),
|
|
2665
|
+
super(), yn(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = ge.create("translator");
|
|
2662
2666
|
}
|
|
2663
2667
|
changeLanguage(e) {
|
|
2664
2668
|
e && (this.language = e);
|
|
@@ -2678,10 +2682,10 @@ class tt extends rt {
|
|
|
2678
2682
|
n === void 0 && (n = ":");
|
|
2679
2683
|
const s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
2680
2684
|
let a = t.ns || this.options.defaultNS || [];
|
|
2681
|
-
const i = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !
|
|
2685
|
+
const i = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Rn(e, n, s);
|
|
2682
2686
|
if (i && !o) {
|
|
2683
|
-
const
|
|
2684
|
-
if (
|
|
2687
|
+
const u = e.match(this.interpolator.nestingRegexp);
|
|
2688
|
+
if (u && u.length > 0)
|
|
2685
2689
|
return {
|
|
2686
2690
|
key: e,
|
|
2687
2691
|
namespaces: G(a) ? [a] : a
|
|
@@ -2704,20 +2708,20 @@ class tt extends rt {
|
|
|
2704
2708
|
Array.isArray(e) || (e = [String(e)]);
|
|
2705
2709
|
const a = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails, i = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, {
|
|
2706
2710
|
key: o,
|
|
2707
|
-
namespaces:
|
|
2708
|
-
} = this.extractFromKey(e[e.length - 1], s), c =
|
|
2709
|
-
let
|
|
2710
|
-
|
|
2711
|
-
const l = s.lng || this.language,
|
|
2711
|
+
namespaces: u
|
|
2712
|
+
} = this.extractFromKey(e[e.length - 1], s), c = u[u.length - 1];
|
|
2713
|
+
let f = s.nsSeparator !== void 0 ? s.nsSeparator : this.options.nsSeparator;
|
|
2714
|
+
f === void 0 && (f = ":");
|
|
2715
|
+
const l = s.lng || this.language, p = s.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
2712
2716
|
if ((l == null ? void 0 : l.toLowerCase()) === "cimode")
|
|
2713
|
-
return
|
|
2714
|
-
res: `${c}${
|
|
2717
|
+
return p ? a ? {
|
|
2718
|
+
res: `${c}${f}${o}`,
|
|
2715
2719
|
usedKey: o,
|
|
2716
2720
|
exactUsedKey: o,
|
|
2717
2721
|
usedLng: l,
|
|
2718
2722
|
usedNS: c,
|
|
2719
2723
|
usedParams: this.getUsedParamsDetails(s)
|
|
2720
|
-
} : `${c}${
|
|
2724
|
+
} : `${c}${f}${o}` : a ? {
|
|
2721
2725
|
res: o,
|
|
2722
2726
|
usedKey: o,
|
|
2723
2727
|
exactUsedKey: o,
|
|
@@ -2725,9 +2729,9 @@ class tt extends rt {
|
|
|
2725
2729
|
usedNS: c,
|
|
2726
2730
|
usedParams: this.getUsedParamsDetails(s)
|
|
2727
2731
|
} : o;
|
|
2728
|
-
const
|
|
2729
|
-
let m =
|
|
2730
|
-
const g = (
|
|
2732
|
+
const d = this.resolve(e, s);
|
|
2733
|
+
let m = d == null ? void 0 : d.res;
|
|
2734
|
+
const g = (d == null ? void 0 : d.usedKey) || o, x = (d == null ? void 0 : d.exactUsedKey) || o, w = ["[object Number]", "[object Function]", "[object RegExp]"], E = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, O = !this.i18nFormat || this.i18nFormat.handleAsObject, S = s.count !== void 0 && !G(s.count), b = tt.hasDefaultValue(s), L = S ? this.pluralResolver.getSuffix(l, s.count, s) : "", C = s.ordinal && S ? this.pluralResolver.getSuffix(l, s.count, {
|
|
2731
2735
|
ordinal: !1
|
|
2732
2736
|
}) : "", Y = S && !s.ordinal && s.count === 0, j = Y && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${L}`] || s[`defaultValue${C}`] || s.defaultValue;
|
|
2733
2737
|
let P = m;
|
|
@@ -2738,9 +2742,9 @@ class tt extends rt {
|
|
|
2738
2742
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
2739
2743
|
const U = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, P, {
|
|
2740
2744
|
...s,
|
|
2741
|
-
ns:
|
|
2745
|
+
ns: u
|
|
2742
2746
|
}) : `key '${o} (${this.language})' returned an object instead of string.`;
|
|
2743
|
-
return a ? (
|
|
2747
|
+
return a ? (d.res = U, d.usedParams = this.getUsedParamsDetails(s), d) : U;
|
|
2744
2748
|
}
|
|
2745
2749
|
if (i) {
|
|
2746
2750
|
const U = Array.isArray(P), H = U ? [] : {}, z = U ? x : g;
|
|
@@ -2751,11 +2755,11 @@ class tt extends rt {
|
|
|
2751
2755
|
...s,
|
|
2752
2756
|
defaultValue: rr(j) ? j[K] : void 0,
|
|
2753
2757
|
joinArrays: !1,
|
|
2754
|
-
ns:
|
|
2758
|
+
ns: u
|
|
2755
2759
|
}) : H[K] = this.translate(J, {
|
|
2756
2760
|
...s,
|
|
2757
2761
|
joinArrays: !1,
|
|
2758
|
-
ns:
|
|
2762
|
+
ns: u
|
|
2759
2763
|
}), H[K] === J && (H[K] = P[K]);
|
|
2760
2764
|
}
|
|
2761
2765
|
m = H;
|
|
@@ -2792,13 +2796,13 @@ class tt extends rt {
|
|
|
2792
2796
|
});
|
|
2793
2797
|
}) : h(W, o, j));
|
|
2794
2798
|
}
|
|
2795
|
-
m = this.extendTranslation(m, e, s,
|
|
2799
|
+
m = this.extendTranslation(m, e, s, d, n), H && m === o && this.options.appendNamespaceToMissingKey && (m = `${c}${f}${o}`), (H || U) && this.options.parseMissingKeyHandler && (m = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}${f}${o}` : o, U ? m : void 0, s));
|
|
2796
2800
|
}
|
|
2797
|
-
return a ? (
|
|
2801
|
+
return a ? (d.res = m, d.usedParams = this.getUsedParamsDetails(s), d) : m;
|
|
2798
2802
|
}
|
|
2799
2803
|
extendTranslation(e, t, n, s, a) {
|
|
2800
|
-
var
|
|
2801
|
-
if ((
|
|
2804
|
+
var u, c;
|
|
2805
|
+
if ((u = this.i18nFormat) != null && u.parse)
|
|
2802
2806
|
e = this.i18nFormat.parse(e, {
|
|
2803
2807
|
...this.options.interpolation.defaultVariables,
|
|
2804
2808
|
...n
|
|
@@ -2813,21 +2817,21 @@ class tt extends rt {
|
|
|
2813
2817
|
...n.interpolation
|
|
2814
2818
|
}
|
|
2815
2819
|
});
|
|
2816
|
-
const
|
|
2820
|
+
const f = G(e) && (((c = n == null ? void 0 : n.interpolation) == null ? void 0 : c.skipOnVariables) !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
2817
2821
|
let l;
|
|
2818
|
-
if (
|
|
2819
|
-
const
|
|
2820
|
-
l =
|
|
2822
|
+
if (f) {
|
|
2823
|
+
const d = e.match(this.interpolator.nestingRegexp);
|
|
2824
|
+
l = d && d.length;
|
|
2821
2825
|
}
|
|
2822
|
-
let
|
|
2823
|
-
if (this.options.interpolation.defaultVariables && (
|
|
2826
|
+
let p = n.replace && !G(n.replace) ? n.replace : n;
|
|
2827
|
+
if (this.options.interpolation.defaultVariables && (p = {
|
|
2824
2828
|
...this.options.interpolation.defaultVariables,
|
|
2825
|
-
...
|
|
2826
|
-
}), e = this.interpolator.interpolate(e,
|
|
2827
|
-
const
|
|
2829
|
+
...p
|
|
2830
|
+
}), e = this.interpolator.interpolate(e, p, n.lng || this.language || s.usedLng, n), f) {
|
|
2831
|
+
const d = e.match(this.interpolator.nestingRegexp), m = d && d.length;
|
|
2828
2832
|
l < m && (n.nest = !1);
|
|
2829
2833
|
}
|
|
2830
|
-
!n.lng && s && s.res && (n.lng = this.language || s.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...
|
|
2834
|
+
!n.lng && s && s.res && (n.lng = this.language || s.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...d) => (a == null ? void 0 : a[0]) === d[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`), null) : this.translate(...d, t), n)), n.interpolation && this.interpolator.reset();
|
|
2831
2835
|
}
|
|
2832
2836
|
const i = n.postProcess || this.options.postProcess, o = G(i) ? [i] : i;
|
|
2833
2837
|
return e != null && (o != null && o.length) && n.applyPostProcessor !== !1 && (e = Rr.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
@@ -2840,29 +2844,29 @@ class tt extends rt {
|
|
|
2840
2844
|
}
|
|
2841
2845
|
resolve(e, t = {}) {
|
|
2842
2846
|
let n, s, a, i, o;
|
|
2843
|
-
return G(e) && (e = [e]), e.forEach((
|
|
2847
|
+
return G(e) && (e = [e]), e.forEach((u) => {
|
|
2844
2848
|
if (this.isValidLookup(n)) return;
|
|
2845
|
-
const c = this.extractFromKey(
|
|
2846
|
-
s =
|
|
2849
|
+
const c = this.extractFromKey(u, t), f = c.key;
|
|
2850
|
+
s = f;
|
|
2847
2851
|
let l = c.namespaces;
|
|
2848
2852
|
this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
|
|
2849
|
-
const
|
|
2853
|
+
const p = t.count !== void 0 && !G(t.count), d = p && !t.ordinal && t.count === 0, m = t.context !== void 0 && (G(t.context) || typeof t.context == "number") && t.context !== "", g = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
2850
2854
|
l.forEach((x) => {
|
|
2851
2855
|
var w, E;
|
|
2852
2856
|
this.isValidLookup(n) || (o = x, !tr[`${g[0]}-${x}`] && ((w = this.utils) != null && w.hasLoadedNamespace) && !((E = this.utils) != null && E.hasLoadedNamespace(o)) && (tr[`${g[0]}-${x}`] = !0, this.logger.warn(`key "${s}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), g.forEach((O) => {
|
|
2853
2857
|
var L;
|
|
2854
2858
|
if (this.isValidLookup(n)) return;
|
|
2855
2859
|
i = O;
|
|
2856
|
-
const S = [
|
|
2860
|
+
const S = [f];
|
|
2857
2861
|
if ((L = this.i18nFormat) != null && L.addLookupKeys)
|
|
2858
|
-
this.i18nFormat.addLookupKeys(S,
|
|
2862
|
+
this.i18nFormat.addLookupKeys(S, f, O, x, t);
|
|
2859
2863
|
else {
|
|
2860
2864
|
let C;
|
|
2861
|
-
|
|
2865
|
+
p && (C = this.pluralResolver.getSuffix(O, t.count, t));
|
|
2862
2866
|
const Y = `${this.options.pluralSeparator}zero`, j = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
2863
|
-
if (
|
|
2864
|
-
const P = `${
|
|
2865
|
-
S.push(P),
|
|
2867
|
+
if (p && (S.push(f + C), t.ordinal && C.indexOf(j) === 0 && S.push(f + C.replace(j, this.options.pluralSeparator)), d && S.push(f + Y)), m) {
|
|
2868
|
+
const P = `${f}${this.options.contextSeparator}${t.context}`;
|
|
2869
|
+
S.push(P), p && (S.push(P + C), t.ordinal && C.indexOf(j) === 0 && S.push(P + C.replace(j, this.options.pluralSeparator)), d && S.push(P + Y));
|
|
2866
2870
|
}
|
|
2867
2871
|
}
|
|
2868
2872
|
let b;
|
|
@@ -2985,7 +2989,7 @@ const sr = {
|
|
|
2985
2989
|
pluralCategories: ["one", "other"]
|
|
2986
2990
|
})
|
|
2987
2991
|
};
|
|
2988
|
-
class
|
|
2992
|
+
class Dn {
|
|
2989
2993
|
constructor(e, t = {}) {
|
|
2990
2994
|
this.languageUtils = e, this.options = t, this.logger = ge.create("pluralResolver"), this.pluralRulesCache = {};
|
|
2991
2995
|
}
|
|
@@ -3011,8 +3015,8 @@ class jn {
|
|
|
3011
3015
|
if (!Intl)
|
|
3012
3016
|
return this.logger.error("No Intl support, please use an Intl polyfill!"), ar;
|
|
3013
3017
|
if (!e.match(/-|_/)) return ar;
|
|
3014
|
-
const
|
|
3015
|
-
i = this.getRule(
|
|
3018
|
+
const u = this.languageUtils.getLanguagePartFromCode(e);
|
|
3019
|
+
i = this.getRule(u, t);
|
|
3016
3020
|
}
|
|
3017
3021
|
return this.pluralRulesCache[a] = i, i;
|
|
3018
3022
|
}
|
|
@@ -3033,10 +3037,10 @@ class jn {
|
|
|
3033
3037
|
}
|
|
3034
3038
|
}
|
|
3035
3039
|
const ir = (r, e, t, n = ".", s = !0) => {
|
|
3036
|
-
let a =
|
|
3040
|
+
let a = xn(r, e, t);
|
|
3037
3041
|
return !a && s && G(t) && (a = yt(r, t, n), a === void 0 && (a = yt(e, t, n))), a;
|
|
3038
3042
|
}, dt = (r) => r.replace(/\$/g, "$$$$");
|
|
3039
|
-
class
|
|
3043
|
+
class $n {
|
|
3040
3044
|
constructor(e = {}) {
|
|
3041
3045
|
var t;
|
|
3042
3046
|
this.logger = ge.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((n) => n), this.init(e);
|
|
@@ -3052,19 +3056,19 @@ class Dn {
|
|
|
3052
3056
|
prefix: a,
|
|
3053
3057
|
prefixEscaped: i,
|
|
3054
3058
|
suffix: o,
|
|
3055
|
-
suffixEscaped:
|
|
3059
|
+
suffixEscaped: u,
|
|
3056
3060
|
formatSeparator: c,
|
|
3057
|
-
unescapeSuffix:
|
|
3061
|
+
unescapeSuffix: f,
|
|
3058
3062
|
unescapePrefix: l,
|
|
3059
|
-
nestingPrefix:
|
|
3060
|
-
nestingPrefixEscaped:
|
|
3063
|
+
nestingPrefix: p,
|
|
3064
|
+
nestingPrefixEscaped: d,
|
|
3061
3065
|
nestingSuffix: m,
|
|
3062
3066
|
nestingSuffixEscaped: g,
|
|
3063
3067
|
nestingOptionsSeparator: x,
|
|
3064
3068
|
maxReplaces: w,
|
|
3065
3069
|
alwaysFormat: E
|
|
3066
3070
|
} = e.interpolation;
|
|
3067
|
-
this.escape = t !== void 0 ? t :
|
|
3071
|
+
this.escape = t !== void 0 ? t : wn, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? Oe(a) : i || "{{", this.suffix = o ? Oe(o) : u || "}}", this.formatSeparator = c || ",", this.unescapePrefix = f ? "" : l || "-", this.unescapeSuffix = this.unescapePrefix ? "" : f || "", this.nestingPrefix = p ? Oe(p) : d || Oe("$t("), this.nestingSuffix = m ? Oe(m) : g || Oe(")"), this.nestingOptionsSeparator = x || ",", this.maxReplaces = w || 1e3, this.alwaysFormat = E !== void 0 ? E : !1, this.resetRegExp();
|
|
3068
3072
|
}
|
|
3069
3073
|
reset() {
|
|
3070
3074
|
this.options && this.init(this.options);
|
|
@@ -3074,11 +3078,11 @@ class Dn {
|
|
|
3074
3078
|
this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
|
|
3075
3079
|
}
|
|
3076
3080
|
interpolate(e, t, n, s) {
|
|
3077
|
-
var
|
|
3081
|
+
var d;
|
|
3078
3082
|
let a, i, o;
|
|
3079
|
-
const
|
|
3083
|
+
const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (m) => {
|
|
3080
3084
|
if (m.indexOf(this.formatSeparator) < 0) {
|
|
3081
|
-
const E = ir(t,
|
|
3085
|
+
const E = ir(t, u, m, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
3082
3086
|
return this.alwaysFormat ? this.format(E, void 0, n, {
|
|
3083
3087
|
...s,
|
|
3084
3088
|
...t,
|
|
@@ -3086,14 +3090,14 @@ class Dn {
|
|
|
3086
3090
|
}) : E;
|
|
3087
3091
|
}
|
|
3088
3092
|
const g = m.split(this.formatSeparator), x = g.shift().trim(), w = g.join(this.formatSeparator).trim();
|
|
3089
|
-
return this.format(ir(t,
|
|
3093
|
+
return this.format(ir(t, u, x, this.options.keySeparator, this.options.ignoreJSONStructure), w, n, {
|
|
3090
3094
|
...s,
|
|
3091
3095
|
...t,
|
|
3092
3096
|
interpolationkey: x
|
|
3093
3097
|
});
|
|
3094
3098
|
};
|
|
3095
3099
|
this.resetRegExp();
|
|
3096
|
-
const
|
|
3100
|
+
const f = (s == null ? void 0 : s.missingInterpolationHandler) || this.options.missingInterpolationHandler, l = ((d = s == null ? void 0 : s.interpolation) == null ? void 0 : d.skipOnVariables) !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
3097
3101
|
return [{
|
|
3098
3102
|
regex: this.regexpUnescape,
|
|
3099
3103
|
safeValue: (m) => dt(m)
|
|
@@ -3104,8 +3108,8 @@ class Dn {
|
|
|
3104
3108
|
for (o = 0; a = m.regex.exec(e); ) {
|
|
3105
3109
|
const g = a[1].trim();
|
|
3106
3110
|
if (i = c(g), i === void 0)
|
|
3107
|
-
if (typeof
|
|
3108
|
-
const w =
|
|
3111
|
+
if (typeof f == "function") {
|
|
3112
|
+
const w = f(e, a, s);
|
|
3109
3113
|
i = G(w) ? w : "";
|
|
3110
3114
|
} else if (s && Object.prototype.hasOwnProperty.call(s, g))
|
|
3111
3115
|
i = "";
|
|
@@ -3123,36 +3127,36 @@ class Dn {
|
|
|
3123
3127
|
}
|
|
3124
3128
|
nest(e, t, n = {}) {
|
|
3125
3129
|
let s, a, i;
|
|
3126
|
-
const o = (
|
|
3127
|
-
const
|
|
3128
|
-
if (
|
|
3129
|
-
const l =
|
|
3130
|
-
let
|
|
3131
|
-
|
|
3132
|
-
const
|
|
3133
|
-
(((
|
|
3130
|
+
const o = (u, c) => {
|
|
3131
|
+
const f = this.nestingOptionsSeparator;
|
|
3132
|
+
if (u.indexOf(f) < 0) return u;
|
|
3133
|
+
const l = u.split(new RegExp(`${f}[ ]*{`));
|
|
3134
|
+
let p = `{${l[1]}`;
|
|
3135
|
+
u = l[0], p = this.interpolate(p, i);
|
|
3136
|
+
const d = p.match(/'/g), m = p.match(/"/g);
|
|
3137
|
+
(((d == null ? void 0 : d.length) ?? 0) % 2 === 0 && !m || m.length % 2 !== 0) && (p = p.replace(/'/g, '"'));
|
|
3134
3138
|
try {
|
|
3135
|
-
i = JSON.parse(
|
|
3139
|
+
i = JSON.parse(p), c && (i = {
|
|
3136
3140
|
...c,
|
|
3137
3141
|
...i
|
|
3138
3142
|
});
|
|
3139
3143
|
} catch (g) {
|
|
3140
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${
|
|
3144
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${u}`, g), `${u}${f}${p}`;
|
|
3141
3145
|
}
|
|
3142
|
-
return i.defaultValue && i.defaultValue.indexOf(this.prefix) > -1 && delete i.defaultValue,
|
|
3146
|
+
return i.defaultValue && i.defaultValue.indexOf(this.prefix) > -1 && delete i.defaultValue, u;
|
|
3143
3147
|
};
|
|
3144
3148
|
for (; s = this.nestingRegexp.exec(e); ) {
|
|
3145
|
-
let
|
|
3149
|
+
let u = [];
|
|
3146
3150
|
i = {
|
|
3147
3151
|
...n
|
|
3148
3152
|
}, i = i.replace && !G(i.replace) ? i.replace : i, i.applyPostProcessor = !1, delete i.defaultValue;
|
|
3149
3153
|
let c = !1;
|
|
3150
3154
|
if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
|
|
3151
|
-
const
|
|
3152
|
-
s[1] =
|
|
3155
|
+
const f = s[1].split(this.formatSeparator).map((l) => l.trim());
|
|
3156
|
+
s[1] = f.shift(), u = f, c = !0;
|
|
3153
3157
|
}
|
|
3154
3158
|
if (a = t(o.call(this, s[1].trim(), i), i), a && s[0] === e && !G(a)) return a;
|
|
3155
|
-
G(a) || (a = Jt(a)), a || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), a = ""), c && (a =
|
|
3159
|
+
G(a) || (a = Jt(a)), a || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), a = ""), c && (a = u.reduce((f, l) => this.format(f, l, n.lng, {
|
|
3156
3160
|
...n,
|
|
3157
3161
|
interpolationkey: s[1].trim()
|
|
3158
3162
|
}), a.trim())), e = e.replace(s[0], a), this.regexp.lastIndex = 0;
|
|
@@ -3160,7 +3164,7 @@ class Dn {
|
|
|
3160
3164
|
return e;
|
|
3161
3165
|
}
|
|
3162
3166
|
}
|
|
3163
|
-
const
|
|
3167
|
+
const Cn = (r) => {
|
|
3164
3168
|
let e = r.toLowerCase().trim();
|
|
3165
3169
|
const t = {};
|
|
3166
3170
|
if (r.indexOf("(") > -1) {
|
|
@@ -3169,8 +3173,8 @@ const $n = (r) => {
|
|
|
3169
3173
|
const s = n[1].substring(0, n[1].length - 1);
|
|
3170
3174
|
e === "currency" && s.indexOf(":") < 0 ? t.currency || (t.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? t.range || (t.range = s.trim()) : s.split(";").forEach((i) => {
|
|
3171
3175
|
if (i) {
|
|
3172
|
-
const [o, ...
|
|
3173
|
-
t[
|
|
3176
|
+
const [o, ...u] = i.split(":"), c = u.join(":").trim().replace(/^'+|'+$/g, ""), f = o.trim();
|
|
3177
|
+
t[f] || (t[f] = c), c === "false" && (t[f] = !1), c === "true" && (t[f] = !0), isNaN(c) || (t[f] = parseInt(c, 10));
|
|
3174
3178
|
}
|
|
3175
3179
|
});
|
|
3176
3180
|
}
|
|
@@ -3190,8 +3194,8 @@ const $n = (r) => {
|
|
|
3190
3194
|
let o = e[i];
|
|
3191
3195
|
return o || (o = r(Ie(n), s), e[i] = o), o(t);
|
|
3192
3196
|
};
|
|
3193
|
-
},
|
|
3194
|
-
class
|
|
3197
|
+
}, Pn = (r) => (e, t, n) => r(Ie(t), n)(e);
|
|
3198
|
+
class An {
|
|
3195
3199
|
constructor(e = {}) {
|
|
3196
3200
|
this.logger = ge.create("formatter"), this.options = e, this.init(e);
|
|
3197
3201
|
}
|
|
@@ -3199,7 +3203,7 @@ class Pn {
|
|
|
3199
3203
|
interpolation: {}
|
|
3200
3204
|
}) {
|
|
3201
3205
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
3202
|
-
const n = t.cacheInBuiltFormats ? or :
|
|
3206
|
+
const n = t.cacheInBuiltFormats ? or : Pn;
|
|
3203
3207
|
this.formats = {
|
|
3204
3208
|
number: n((s, a) => {
|
|
3205
3209
|
const i = new Intl.NumberFormat(s, {
|
|
@@ -3243,50 +3247,50 @@ class Pn {
|
|
|
3243
3247
|
format(e, t, n, s = {}) {
|
|
3244
3248
|
const a = t.split(this.formatSeparator);
|
|
3245
3249
|
if (a.length > 1 && a[0].indexOf("(") > 1 && a[0].indexOf(")") < 0 && a.find((o) => o.indexOf(")") > -1)) {
|
|
3246
|
-
const o = a.findIndex((
|
|
3250
|
+
const o = a.findIndex((u) => u.indexOf(")") > -1);
|
|
3247
3251
|
a[0] = [a[0], ...a.splice(1, o)].join(this.formatSeparator);
|
|
3248
3252
|
}
|
|
3249
|
-
return a.reduce((o,
|
|
3253
|
+
return a.reduce((o, u) => {
|
|
3250
3254
|
var l;
|
|
3251
3255
|
const {
|
|
3252
3256
|
formatName: c,
|
|
3253
|
-
formatOptions:
|
|
3254
|
-
} =
|
|
3257
|
+
formatOptions: f
|
|
3258
|
+
} = Cn(u);
|
|
3255
3259
|
if (this.formats[c]) {
|
|
3256
|
-
let
|
|
3260
|
+
let p = o;
|
|
3257
3261
|
try {
|
|
3258
|
-
const
|
|
3259
|
-
|
|
3260
|
-
...
|
|
3262
|
+
const d = ((l = s == null ? void 0 : s.formatParams) == null ? void 0 : l[s.interpolationkey]) || {}, m = d.locale || d.lng || s.locale || s.lng || n;
|
|
3263
|
+
p = this.formats[c](o, m, {
|
|
3264
|
+
...f,
|
|
3261
3265
|
...s,
|
|
3262
|
-
...
|
|
3266
|
+
...d
|
|
3263
3267
|
});
|
|
3264
|
-
} catch (
|
|
3265
|
-
this.logger.warn(
|
|
3268
|
+
} catch (d) {
|
|
3269
|
+
this.logger.warn(d);
|
|
3266
3270
|
}
|
|
3267
|
-
return
|
|
3271
|
+
return p;
|
|
3268
3272
|
} else
|
|
3269
3273
|
this.logger.warn(`there was no format function for ${c}`);
|
|
3270
3274
|
return o;
|
|
3271
3275
|
}, e);
|
|
3272
3276
|
}
|
|
3273
3277
|
}
|
|
3274
|
-
const
|
|
3278
|
+
const Ln = (r, e) => {
|
|
3275
3279
|
r.pending[e] !== void 0 && (delete r.pending[e], r.pendingCount--);
|
|
3276
3280
|
};
|
|
3277
|
-
class
|
|
3281
|
+
class _n extends rt {
|
|
3278
3282
|
constructor(e, t, n, s = {}) {
|
|
3279
3283
|
var a, i;
|
|
3280
3284
|
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = s, this.logger = ge.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], (i = (a = this.backend) == null ? void 0 : a.init) == null || i.call(a, n, s.backend, s);
|
|
3281
3285
|
}
|
|
3282
3286
|
queueLoad(e, t, n, s) {
|
|
3283
|
-
const a = {}, i = {}, o = {},
|
|
3287
|
+
const a = {}, i = {}, o = {}, u = {};
|
|
3284
3288
|
return e.forEach((c) => {
|
|
3285
|
-
let
|
|
3289
|
+
let f = !0;
|
|
3286
3290
|
t.forEach((l) => {
|
|
3287
|
-
const
|
|
3288
|
-
!n.reload && this.store.hasResourceBundle(c, l) ? this.state[
|
|
3289
|
-
}),
|
|
3291
|
+
const p = `${c}|${l}`;
|
|
3292
|
+
!n.reload && this.store.hasResourceBundle(c, l) ? this.state[p] = 2 : this.state[p] < 0 || (this.state[p] === 1 ? i[p] === void 0 && (i[p] = !0) : (this.state[p] = 1, f = !1, i[p] === void 0 && (i[p] = !0), a[p] === void 0 && (a[p] = !0), u[l] === void 0 && (u[l] = !0)));
|
|
3293
|
+
}), f || (o[c] = !0);
|
|
3290
3294
|
}), (Object.keys(a).length || Object.keys(i).length) && this.queue.push({
|
|
3291
3295
|
pending: i,
|
|
3292
3296
|
pendingCount: Object.keys(i).length,
|
|
@@ -3297,7 +3301,7 @@ class Ln extends rt {
|
|
|
3297
3301
|
toLoad: Object.keys(a),
|
|
3298
3302
|
pending: Object.keys(i),
|
|
3299
3303
|
toLoadLanguages: Object.keys(o),
|
|
3300
|
-
toLoadNamespaces: Object.keys(
|
|
3304
|
+
toLoadNamespaces: Object.keys(u)
|
|
3301
3305
|
};
|
|
3302
3306
|
}
|
|
3303
3307
|
loaded(e, t, n) {
|
|
@@ -3306,15 +3310,15 @@ class Ln extends rt {
|
|
|
3306
3310
|
skipCopy: !0
|
|
3307
3311
|
}), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
|
|
3308
3312
|
const o = {};
|
|
3309
|
-
this.queue.forEach((
|
|
3310
|
-
|
|
3313
|
+
this.queue.forEach((u) => {
|
|
3314
|
+
bn(u.loaded, [a], i), Ln(u, e), t && u.errors.push(t), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((c) => {
|
|
3311
3315
|
o[c] || (o[c] = {});
|
|
3312
|
-
const
|
|
3313
|
-
|
|
3316
|
+
const f = u.loaded[c];
|
|
3317
|
+
f.length && f.forEach((l) => {
|
|
3314
3318
|
o[c][l] === void 0 && (o[c][l] = !0);
|
|
3315
3319
|
});
|
|
3316
|
-
}),
|
|
3317
|
-
}), this.emit("loaded", o), this.queue = this.queue.filter((
|
|
3320
|
+
}), u.done = !0, u.errors.length ? u.callback(u.errors) : u.callback());
|
|
3321
|
+
}), this.emit("loaded", o), this.queue = this.queue.filter((u) => !u.done);
|
|
3318
3322
|
}
|
|
3319
3323
|
read(e, t, n, s = 0, a = this.retryTimeout, i) {
|
|
3320
3324
|
if (!e.length) return i(null, {});
|
|
@@ -3330,29 +3334,29 @@ class Ln extends rt {
|
|
|
3330
3334
|
return;
|
|
3331
3335
|
}
|
|
3332
3336
|
this.readingCalls++;
|
|
3333
|
-
const o = (c,
|
|
3337
|
+
const o = (c, f) => {
|
|
3334
3338
|
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
3335
3339
|
const l = this.waitingReads.shift();
|
|
3336
3340
|
this.read(l.lng, l.ns, l.fcName, l.tried, l.wait, l.callback);
|
|
3337
3341
|
}
|
|
3338
|
-
if (c &&
|
|
3342
|
+
if (c && f && s < this.maxRetries) {
|
|
3339
3343
|
setTimeout(() => {
|
|
3340
3344
|
this.read.call(this, e, t, n, s + 1, a * 2, i);
|
|
3341
3345
|
}, a);
|
|
3342
3346
|
return;
|
|
3343
3347
|
}
|
|
3344
|
-
i(c,
|
|
3345
|
-
},
|
|
3346
|
-
if (
|
|
3348
|
+
i(c, f);
|
|
3349
|
+
}, u = this.backend[n].bind(this.backend);
|
|
3350
|
+
if (u.length === 2) {
|
|
3347
3351
|
try {
|
|
3348
|
-
const c =
|
|
3349
|
-
c && typeof c.then == "function" ? c.then((
|
|
3352
|
+
const c = u(e, t);
|
|
3353
|
+
c && typeof c.then == "function" ? c.then((f) => o(null, f)).catch(o) : o(null, c);
|
|
3350
3354
|
} catch (c) {
|
|
3351
3355
|
o(c);
|
|
3352
3356
|
}
|
|
3353
3357
|
return;
|
|
3354
3358
|
}
|
|
3355
|
-
return
|
|
3359
|
+
return u(e, t, o);
|
|
3356
3360
|
}
|
|
3357
3361
|
prepareLoading(e, t, n = {}, s) {
|
|
3358
3362
|
if (!this.backend)
|
|
@@ -3381,26 +3385,26 @@ class Ln extends rt {
|
|
|
3381
3385
|
}
|
|
3382
3386
|
saveMissing(e, t, n, s, a, i = {}, o = () => {
|
|
3383
3387
|
}) {
|
|
3384
|
-
var
|
|
3385
|
-
if ((c = (
|
|
3388
|
+
var u, c, f, l, p;
|
|
3389
|
+
if ((c = (u = this.services) == null ? void 0 : u.utils) != null && c.hasLoadedNamespace && !((l = (f = this.services) == null ? void 0 : f.utils) != null && l.hasLoadedNamespace(t))) {
|
|
3386
3390
|
this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
|
|
3387
3391
|
return;
|
|
3388
3392
|
}
|
|
3389
3393
|
if (!(n == null || n === "")) {
|
|
3390
|
-
if ((
|
|
3391
|
-
const
|
|
3394
|
+
if ((p = this.backend) != null && p.create) {
|
|
3395
|
+
const d = {
|
|
3392
3396
|
...i,
|
|
3393
3397
|
isUpdate: a
|
|
3394
3398
|
}, m = this.backend.create.bind(this.backend);
|
|
3395
3399
|
if (m.length < 6)
|
|
3396
3400
|
try {
|
|
3397
3401
|
let g;
|
|
3398
|
-
m.length === 5 ? g = m(e, t, n, s,
|
|
3402
|
+
m.length === 5 ? g = m(e, t, n, s, d) : g = m(e, t, n, s), g && typeof g.then == "function" ? g.then((x) => o(null, x)).catch(o) : o(null, g);
|
|
3399
3403
|
} catch (g) {
|
|
3400
3404
|
o(g);
|
|
3401
3405
|
}
|
|
3402
3406
|
else
|
|
3403
|
-
m(e, t, n, s, o,
|
|
3407
|
+
m(e, t, n, s, o, d);
|
|
3404
3408
|
}
|
|
3405
3409
|
!e || !e[0] || this.store.addResource(e[0], t, n, s);
|
|
3406
3410
|
}
|
|
@@ -3467,7 +3471,7 @@ const lr = () => ({
|
|
|
3467
3471
|
var e, t;
|
|
3468
3472
|
return G(r.ns) && (r.ns = [r.ns]), G(r.fallbackLng) && (r.fallbackLng = [r.fallbackLng]), G(r.fallbackNS) && (r.fallbackNS = [r.fallbackNS]), ((t = (e = r.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (r.supportedLngs = r.supportedLngs.concat(["cimode"])), typeof r.initImmediate == "boolean" && (r.initAsync = r.initImmediate), r;
|
|
3469
3473
|
}, Be = () => {
|
|
3470
|
-
},
|
|
3474
|
+
}, kn = (r) => {
|
|
3471
3475
|
Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((t) => {
|
|
3472
3476
|
typeof r[t] == "function" && (r[t] = r[t].bind(r));
|
|
3473
3477
|
});
|
|
@@ -3476,7 +3480,7 @@ class Ne extends rt {
|
|
|
3476
3480
|
constructor(e = {}, t) {
|
|
3477
3481
|
if (super(), this.options = cr(e), this.services = {}, this.logger = ge, this.modules = {
|
|
3478
3482
|
external: []
|
|
3479
|
-
},
|
|
3483
|
+
}, kn(this), t && !this.isInitialized && !e.isClone) {
|
|
3480
3484
|
if (!this.options.initAsync)
|
|
3481
3485
|
return this.init(e, t), this;
|
|
3482
3486
|
setTimeout(() => {
|
|
@@ -3499,21 +3503,21 @@ class Ne extends rt {
|
|
|
3499
3503
|
if (!this.options.isClone) {
|
|
3500
3504
|
this.modules.logger ? ge.init(s(this.modules.logger), this.options) : ge.init(null, this.options);
|
|
3501
3505
|
let c;
|
|
3502
|
-
this.modules.formatter ? c = this.modules.formatter : c =
|
|
3503
|
-
const
|
|
3506
|
+
this.modules.formatter ? c = this.modules.formatter : c = An;
|
|
3507
|
+
const f = new nr(this.options);
|
|
3504
3508
|
this.store = new er(this.options.resources, this.options);
|
|
3505
3509
|
const l = this.services;
|
|
3506
|
-
l.logger = ge, l.resourceStore = this.store, l.languageUtils =
|
|
3510
|
+
l.logger = ge, l.resourceStore = this.store, l.languageUtils = f, l.pluralResolver = new Dn(f, {
|
|
3507
3511
|
prepend: this.options.pluralSeparator,
|
|
3508
3512
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
3509
|
-
}), c && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (l.formatter = s(c), l.formatter.init(l, this.options), this.options.interpolation.format = l.formatter.format.bind(l.formatter)), l.interpolator = new
|
|
3513
|
+
}), c && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (l.formatter = s(c), l.formatter.init(l, this.options), this.options.interpolation.format = l.formatter.format.bind(l.formatter)), l.interpolator = new $n(this.options), l.utils = {
|
|
3510
3514
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
3511
|
-
}, l.backendConnector = new
|
|
3512
|
-
this.emit(
|
|
3513
|
-
}), this.modules.languageDetector && (l.languageDetector = s(this.modules.languageDetector), l.languageDetector.init && l.languageDetector.init(l, this.options.detection, this.options)), this.modules.i18nFormat && (l.i18nFormat = s(this.modules.i18nFormat), l.i18nFormat.init && l.i18nFormat.init(this)), this.translator = new tt(this.services, this.options), this.translator.on("*", (
|
|
3514
|
-
this.emit(
|
|
3515
|
-
}), this.modules.external.forEach((
|
|
3516
|
-
|
|
3515
|
+
}, l.backendConnector = new _n(s(this.modules.backend), l.resourceStore, l, this.options), l.backendConnector.on("*", (p, ...d) => {
|
|
3516
|
+
this.emit(p, ...d);
|
|
3517
|
+
}), this.modules.languageDetector && (l.languageDetector = s(this.modules.languageDetector), l.languageDetector.init && l.languageDetector.init(l, this.options.detection, this.options)), this.modules.i18nFormat && (l.i18nFormat = s(this.modules.i18nFormat), l.i18nFormat.init && l.i18nFormat.init(this)), this.translator = new tt(this.services, this.options), this.translator.on("*", (p, ...d) => {
|
|
3518
|
+
this.emit(p, ...d);
|
|
3519
|
+
}), this.modules.external.forEach((p) => {
|
|
3520
|
+
p.init && p.init(this);
|
|
3517
3521
|
});
|
|
3518
3522
|
}
|
|
3519
3523
|
if (this.format = this.options.interpolation.format, t || (t = Be), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
@@ -3521,18 +3525,18 @@ class Ne extends rt {
|
|
|
3521
3525
|
c.length > 0 && c[0] !== "dev" && (this.options.lng = c[0]);
|
|
3522
3526
|
}
|
|
3523
3527
|
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((c) => {
|
|
3524
|
-
this[c] = (...
|
|
3528
|
+
this[c] = (...f) => this.store[c](...f);
|
|
3525
3529
|
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((c) => {
|
|
3526
|
-
this[c] = (...
|
|
3530
|
+
this[c] = (...f) => (this.store[c](...f), this);
|
|
3527
3531
|
});
|
|
3528
|
-
const o = Le(),
|
|
3529
|
-
const c = (
|
|
3530
|
-
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), o.resolve(l), t(
|
|
3532
|
+
const o = Le(), u = () => {
|
|
3533
|
+
const c = (f, l) => {
|
|
3534
|
+
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), o.resolve(l), t(f, l);
|
|
3531
3535
|
};
|
|
3532
3536
|
if (this.languages && !this.isInitialized) return c(null, this.t.bind(this));
|
|
3533
3537
|
this.changeLanguage(this.options.lng, c);
|
|
3534
3538
|
};
|
|
3535
|
-
return this.options.resources || !this.options.initAsync ?
|
|
3539
|
+
return this.options.resources || !this.options.initAsync ? u() : setTimeout(u, 0), o;
|
|
3536
3540
|
}
|
|
3537
3541
|
loadResources(e, t = Be) {
|
|
3538
3542
|
var a, i;
|
|
@@ -3540,13 +3544,13 @@ class Ne extends rt {
|
|
|
3540
3544
|
const s = G(e) ? e : this.language;
|
|
3541
3545
|
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
3542
3546
|
if ((s == null ? void 0 : s.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
3543
|
-
const o = [],
|
|
3547
|
+
const o = [], u = (c) => {
|
|
3544
3548
|
if (!c || c === "cimode") return;
|
|
3545
3549
|
this.services.languageUtils.toResolveHierarchy(c).forEach((l) => {
|
|
3546
3550
|
l !== "cimode" && o.indexOf(l) < 0 && o.push(l);
|
|
3547
3551
|
});
|
|
3548
3552
|
};
|
|
3549
|
-
s ?
|
|
3553
|
+
s ? u(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((f) => u(f)), (i = (a = this.options.preload) == null ? void 0 : a.forEach) == null || i.call(a, (c) => u(c)), this.services.backendConnector.load(o, this.options.ns, (c) => {
|
|
3550
3554
|
!c && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n(c);
|
|
3551
3555
|
});
|
|
3552
3556
|
} else
|
|
@@ -3581,27 +3585,27 @@ class Ne extends rt {
|
|
|
3581
3585
|
this.emit("languageChanging", e);
|
|
3582
3586
|
const s = (o) => {
|
|
3583
3587
|
this.language = o, this.languages = this.services.languageUtils.toResolveHierarchy(o), this.resolvedLanguage = void 0, this.setResolvedLanguage(o);
|
|
3584
|
-
}, a = (o,
|
|
3585
|
-
|
|
3588
|
+
}, a = (o, u) => {
|
|
3589
|
+
u ? this.isLanguageChangingTo === e && (s(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, n.resolve((...c) => this.t(...c)), t && t(o, (...c) => this.t(...c));
|
|
3586
3590
|
}, i = (o) => {
|
|
3587
|
-
var
|
|
3591
|
+
var f, l;
|
|
3588
3592
|
!e && !o && this.services.languageDetector && (o = []);
|
|
3589
|
-
const
|
|
3590
|
-
c && (this.language || s(c), this.translator.language || this.translator.changeLanguage(c), (l = (
|
|
3591
|
-
a(
|
|
3593
|
+
const u = G(o) ? o : o && o[0], c = this.store.hasLanguageSomeTranslations(u) ? u : this.services.languageUtils.getBestMatchFromCodes(G(o) ? [o] : o);
|
|
3594
|
+
c && (this.language || s(c), this.translator.language || this.translator.changeLanguage(c), (l = (f = this.services.languageDetector) == null ? void 0 : f.cacheUserLanguage) == null || l.call(f, c)), this.loadResources(c, (p) => {
|
|
3595
|
+
a(p, c);
|
|
3592
3596
|
});
|
|
3593
3597
|
};
|
|
3594
3598
|
return !e && this.services.languageDetector && !this.services.languageDetector.async ? i(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(i) : this.services.languageDetector.detect(i) : i(e), n;
|
|
3595
3599
|
}
|
|
3596
3600
|
getFixedT(e, t, n) {
|
|
3597
3601
|
const s = (a, i, ...o) => {
|
|
3598
|
-
let
|
|
3599
|
-
typeof i != "object" ?
|
|
3602
|
+
let u;
|
|
3603
|
+
typeof i != "object" ? u = this.options.overloadTranslationOptionHandler([a, i].concat(o)) : u = {
|
|
3600
3604
|
...i
|
|
3601
|
-
},
|
|
3605
|
+
}, u.lng = u.lng || s.lng, u.lngs = u.lngs || s.lngs, u.ns = u.ns || s.ns, u.keyPrefix !== "" && (u.keyPrefix = u.keyPrefix || n || s.keyPrefix);
|
|
3602
3606
|
const c = this.options.keySeparator || ".";
|
|
3603
|
-
let
|
|
3604
|
-
return
|
|
3607
|
+
let f;
|
|
3608
|
+
return u.keyPrefix && Array.isArray(a) ? f = a.map((l) => `${u.keyPrefix}${c}${l}`) : f = u.keyPrefix ? `${u.keyPrefix}${c}${a}` : a, this.t(f, u);
|
|
3605
3609
|
};
|
|
3606
3610
|
return G(e) ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix = n, s;
|
|
3607
3611
|
}
|
|
@@ -3623,8 +3627,8 @@ class Ne extends rt {
|
|
|
3623
3627
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
3624
3628
|
const n = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, a = this.languages[this.languages.length - 1];
|
|
3625
3629
|
if (n.toLowerCase() === "cimode") return !0;
|
|
3626
|
-
const i = (o,
|
|
3627
|
-
const c = this.services.backendConnector.state[`${o}|${
|
|
3630
|
+
const i = (o, u) => {
|
|
3631
|
+
const c = this.services.backendConnector.state[`${o}|${u}`];
|
|
3628
3632
|
return c === -1 || c === 0 || c === 2;
|
|
3629
3633
|
};
|
|
3630
3634
|
if (t.precheck) {
|
|
@@ -3673,15 +3677,15 @@ class Ne extends rt {
|
|
|
3673
3677
|
}, a.services.utils = {
|
|
3674
3678
|
hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
|
|
3675
3679
|
}, n) {
|
|
3676
|
-
const o = Object.keys(this.store.data).reduce((
|
|
3680
|
+
const o = Object.keys(this.store.data).reduce((u, c) => (u[c] = {
|
|
3677
3681
|
...this.store.data[c]
|
|
3678
|
-
},
|
|
3679
|
-
...
|
|
3680
|
-
},
|
|
3682
|
+
}, u[c] = Object.keys(u[c]).reduce((f, l) => (f[l] = {
|
|
3683
|
+
...u[c][l]
|
|
3684
|
+
}, f), u[c]), u), {});
|
|
3681
3685
|
a.store = new er(o, s), a.services.resourceStore = a.store;
|
|
3682
3686
|
}
|
|
3683
|
-
return a.translator = new tt(a.services, s), a.translator.on("*", (o, ...
|
|
3684
|
-
a.emit(o, ...
|
|
3687
|
+
return a.translator = new tt(a.services, s), a.translator.on("*", (o, ...u) => {
|
|
3688
|
+
a.emit(o, ...u);
|
|
3685
3689
|
}), a.init(s, t), a.translator.options = s, a.translator.backendConnector.services.utils = {
|
|
3686
3690
|
hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
|
|
3687
3691
|
}, a;
|
|
@@ -3712,45 +3716,45 @@ ae.setDefaultNamespace;
|
|
|
3712
3716
|
ae.hasLoadedNamespace;
|
|
3713
3717
|
ae.loadNamespaces;
|
|
3714
3718
|
ae.loadLanguages;
|
|
3715
|
-
const
|
|
3719
|
+
const In = { Friday: "Venerdì", FridayShort: "Ven", Monday: "Lunedì", MondayShort: "Lun", Saturday: "Sabato", SaturdayShort: "Sab", Sunday: "Domenica", SundayShort: "Dom", Tuesday: "Martedì", TuesdayShort: "Mar", Thursday: "Giovedì", ThursdayShort: "Gio", Wednesday: "Mercoledì", WednesdayShort: "Mer" }, Nn = { April: "Aprile", August: "Agosto", December: "Dicembre", February: "Febbraio", January: "Gennaio", June: "Giugno", July: "Luglio", March: "Marzo", May: "Maggio", October: "Ottobre", November: "Novembre", September: "Settembre" }, Mn = { CalendarFor: "Calendario per", Close: "Chiudi", SpotlightDefaultPlaceholder: "Esegui Comando" }, Fn = {
|
|
3716
3720
|
Date: { NextDay: "Giorno Successivo", NextMonth: "Mese Successivo", NextWeek: "Settimana Successiva", NextYear: "Anno Successivo", PreviousDay: "Giorno Precedente", PreviousMonth: "Mese Precedente", PreviousWeek: "Settimana Precedente", PreviousYear: "Anno Precedente", Today: "Oggi", Tomorrow: "Domani", Yesterday: "Ieri" },
|
|
3717
|
-
Day:
|
|
3718
|
-
Month:
|
|
3719
|
-
Generic:
|
|
3720
|
-
},
|
|
3721
|
+
Day: In,
|
|
3722
|
+
Month: Nn,
|
|
3723
|
+
Generic: Mn
|
|
3724
|
+
}, Vn = { Friday: "Friday", FridayShort: "Fri", Monday: "Monday", MondayShort: "Mon", Saturday: "Saturday", SaturdayShort: "Sat", Sunday: "Sunday", SundayShort: "Sun", Tuesday: "Tuesday", TuesdayShort: "Tue", Thursday: "Thursday", ThursdayShort: "Thu", Wednesday: "Wednesday", WednesdayShort: "Wed" }, Yn = { April: "April", August: "August", December: "December", February: "February", January: "January", July: "July", June: "June", March: "March", May: "May", November: "November", October: "October", September: "September" }, Un = { CalendarFor: "Calendar for", Close: "Close", SpotlightDefaultPlaceholder: "Execute Command" }, Wn = {
|
|
3721
3725
|
Date: { NextDay: "Next Day", NextMonth: "Next Month", NextWeek: "Next Week", NextYear: "Next Year", PreviousDay: "Previous Day", PreviousMonth: "Previous Month", PreviousWeek: "Previous Week", PreviousYear: "Previous Year", Today: "Today", Tomorrow: "Tomorrow", Yesterday: "Yesterday" },
|
|
3722
|
-
Day:
|
|
3723
|
-
Month:
|
|
3724
|
-
Generic:
|
|
3726
|
+
Day: Vn,
|
|
3727
|
+
Month: Yn,
|
|
3728
|
+
Generic: Un
|
|
3725
3729
|
};
|
|
3726
3730
|
function ur(r, e) {
|
|
3727
|
-
return new RegExp(
|
|
3731
|
+
return new RegExp(Hn(r), e);
|
|
3728
3732
|
}
|
|
3729
|
-
function
|
|
3733
|
+
function Hn(r) {
|
|
3730
3734
|
return r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3731
3735
|
}
|
|
3732
|
-
function
|
|
3736
|
+
function Bn(r, e, t, n) {
|
|
3733
3737
|
let s = e;
|
|
3734
|
-
const a =
|
|
3738
|
+
const a = Gn(r, t);
|
|
3735
3739
|
if (!s) {
|
|
3736
3740
|
const o = Math.abs(a);
|
|
3737
3741
|
o - Math.floor(o) ? s = "0,0.00" : s = "0,0";
|
|
3738
3742
|
}
|
|
3739
|
-
const i =
|
|
3743
|
+
const i = Kn(s);
|
|
3740
3744
|
return new Intl.NumberFormat(n, i).format(a);
|
|
3741
3745
|
}
|
|
3742
|
-
function
|
|
3746
|
+
function Gn(r, e, t, n, s) {
|
|
3743
3747
|
let a = r;
|
|
3744
3748
|
if (typeof a != "number") {
|
|
3745
3749
|
let o;
|
|
3746
3750
|
e && n === void 0 ? o = "," : o = ".";
|
|
3747
|
-
const
|
|
3748
|
-
a = a.replace(ur(
|
|
3751
|
+
const u = o == "." ? "," : ".";
|
|
3752
|
+
a = a.replace(ur(u, "g"), ""), a = a.replace(ur(o, "g"), "."), a = Number(a);
|
|
3749
3753
|
}
|
|
3750
3754
|
const i = Number(a);
|
|
3751
3755
|
return isNaN(i) ? NaN : i;
|
|
3752
3756
|
}
|
|
3753
|
-
function
|
|
3757
|
+
function Kn(r) {
|
|
3754
3758
|
const e = {};
|
|
3755
3759
|
r.includes(",") ? e.useGrouping = !0 : e.useGrouping = !1;
|
|
3756
3760
|
const t = r.indexOf(".");
|
|
@@ -3780,7 +3784,7 @@ ae.init({
|
|
|
3780
3784
|
default:
|
|
3781
3785
|
case "number": {
|
|
3782
3786
|
const a = (n == null ? void 0 : n.inputIsLocalized) ?? !1;
|
|
3783
|
-
return
|
|
3787
|
+
return Bn(r, e, a, t);
|
|
3784
3788
|
}
|
|
3785
3789
|
}
|
|
3786
3790
|
} catch {
|
|
@@ -3790,26 +3794,29 @@ ae.init({
|
|
|
3790
3794
|
},
|
|
3791
3795
|
resources: {
|
|
3792
3796
|
en: {
|
|
3793
|
-
translation:
|
|
3797
|
+
translation: Wn
|
|
3794
3798
|
},
|
|
3795
3799
|
it: {
|
|
3796
|
-
translation:
|
|
3800
|
+
translation: Fn
|
|
3797
3801
|
}
|
|
3798
3802
|
}
|
|
3799
3803
|
});
|
|
3800
|
-
const
|
|
3804
|
+
const zn = (r, e, t, n) => ae.format(r, e, t || ae.language, n), qn = (r, e) => ae.t(r, e);
|
|
3801
3805
|
function nt() {
|
|
3802
3806
|
const r = ye(
|
|
3803
|
-
(n, s, a, i) =>
|
|
3807
|
+
(n, s, a, i) => zn(n, s, a || void 0, i),
|
|
3804
3808
|
[]
|
|
3805
3809
|
), e = ye(() => ae.languages[0], []), t = ye(
|
|
3806
|
-
(n, s) =>
|
|
3810
|
+
(n, s) => qn(n, s),
|
|
3807
3811
|
[]
|
|
3808
3812
|
);
|
|
3809
3813
|
return { format: r, getCurrentLanguage: e, translate: t };
|
|
3810
3814
|
}
|
|
3811
3815
|
var Tt = /* @__PURE__ */ ((r) => (r.CALENDAR_FOR = "Date.CalendarFor", r.CLOSE = "Generic.Close", r.SPOTLIGHT_DEFAULT_PLACEHOLDER = "Generic.SpotlightDefaultPlaceholder", r))(Tt || {}), le = /* @__PURE__ */ ((r) => (r.MONDAY = "Day.Monday", r.MONDAY_SHORT = "Day.MondayShort", r.TUESDAY = "Day.Tuesday", r.TUESDAY_SHORT = "Day.TuesdayShort", r.WEDNESDAY = "Day.Wednesday", r.WEDNESDAY_SHORT = "Day.WednesdayShort", r.THURSDAY = "Day.Thursday", r.THURSDAY_SHORT = "Day.ThursdayShort", r.FRIDAY = "Day.Friday", r.FRIDAY_SHORT = "Day.FridayShort", r.SATURDAY = "Day.Saturday", r.SATURDAY_SHORT = "Day.SaturdayShort", r.SUNDAY = "Day.Sunday", r.SUNDAY_SHORT = "Day.SundayShort", r))(le || {}), fe = /* @__PURE__ */ ((r) => (r.JANUARY = "Month.January", r.FEBRUARY = "Month.February", r.MARCH = "Month.March", r.APRIL = "Month.April", r.MAY = "Month.May", r.JUNE = "Month.June", r.JULY = "Month.July", r.AUGUST = "Month.August", r.SEPTEMBER = "Month.September", r.OCTOBER = "Month.October", r.NOVEMBER = "Month.November", r.DECEMBER = "Month.December", r))(fe || {}), vt = /* @__PURE__ */ ((r) => (r.PREVIOUS_DAY = "Date.PreviousDay", r.PREVIOUS_WEEK = "Date.PreviousWeek", r.PREVIOUS_MONTH = "Date.PreviousMonth", r.PREVIOUS_YEAR = "Date.PreviousYear", r.NEXT_DAY = "Date.NextDay", r.NEXT_WEEK = "Date.NextWeek", r.NEXT_MONTH = "Date.NextMonth", r.NEXT_YEAR = "Date.NextYear", r.YESTERDAY = "Date.Yesterday", r.TODAY = "Date.Today", r.TOMORROW = "Date.Tomorrow", r))(vt || {});
|
|
3812
|
-
|
|
3816
|
+
const Jn = {
|
|
3817
|
+
"smp-datepickercalendar-position": "_smp-datepickercalendar-position_19hwj_1"
|
|
3818
|
+
};
|
|
3819
|
+
function Xn({
|
|
3813
3820
|
selectedDate: r,
|
|
3814
3821
|
onDateChange: e,
|
|
3815
3822
|
disabledDateRanges: t = [],
|
|
@@ -3820,14 +3827,14 @@ function qn({
|
|
|
3820
3827
|
if (!n) return;
|
|
3821
3828
|
const _ = new Date(n);
|
|
3822
3829
|
return isNaN(_.getTime()) ? void 0 : _;
|
|
3823
|
-
}, [o] = Z(/* @__PURE__ */ new Date()), [
|
|
3830
|
+
}, [o] = Z(/* @__PURE__ */ new Date()), [u, c] = Z(
|
|
3824
3831
|
r || i() || /* @__PURE__ */ new Date()
|
|
3825
|
-
), [
|
|
3826
|
-
|
|
3827
|
-
), [
|
|
3828
|
-
|
|
3832
|
+
), [f, l] = Z(
|
|
3833
|
+
u ? u.getMonth() : (/* @__PURE__ */ new Date()).getMonth()
|
|
3834
|
+
), [p, d] = Z(
|
|
3835
|
+
u ? u.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear()
|
|
3829
3836
|
), [m, g] = Z(
|
|
3830
|
-
|
|
3837
|
+
u ? u.getDate() : null
|
|
3831
3838
|
), x = ve(null), w = ve([]), E = [
|
|
3832
3839
|
a(fe.JANUARY),
|
|
3833
3840
|
a(fe.FEBRUARY),
|
|
@@ -3876,9 +3883,9 @@ function qn({
|
|
|
3876
3883
|
}), b = (_) => {
|
|
3877
3884
|
S(_) || (c(_), g(_.getDate()), e && e(Yr(_)));
|
|
3878
3885
|
}, L = () => {
|
|
3879
|
-
|
|
3886
|
+
f === 0 ? (l(11), d(p - 1)) : l(f - 1), g(1);
|
|
3880
3887
|
}, C = () => {
|
|
3881
|
-
|
|
3888
|
+
f === 11 ? (l(0), d(p + 1)) : l(f + 1), g(1);
|
|
3882
3889
|
}, Y = (_, h) => new Date(_, h + 1, 0).getDate(), j = (_, h) => new Date(_, h, 1).getDay(), P = (_) => {
|
|
3883
3890
|
var y;
|
|
3884
3891
|
const h = H.findIndex(
|
|
@@ -3888,14 +3895,14 @@ function qn({
|
|
|
3888
3895
|
}, D = (_, h) => {
|
|
3889
3896
|
const y = H[h];
|
|
3890
3897
|
if (!y) return;
|
|
3891
|
-
const T = Y(
|
|
3898
|
+
const T = Y(p, f), $ = y.getDate();
|
|
3892
3899
|
switch (_.key) {
|
|
3893
3900
|
case "ArrowRight":
|
|
3894
3901
|
_.preventDefault();
|
|
3895
3902
|
{
|
|
3896
|
-
let R = $ + 1, A = new Date(
|
|
3903
|
+
let R = $ + 1, A = new Date(p, f, R);
|
|
3897
3904
|
if (R > T) {
|
|
3898
|
-
const M =
|
|
3905
|
+
const M = f === 11 ? p + 1 : p, F = f === 11 ? 0 : f + 1;
|
|
3899
3906
|
R = 1, A = new Date(M, F, R), C(), setTimeout(() => {
|
|
3900
3907
|
k(1, "forward");
|
|
3901
3908
|
}, 0);
|
|
@@ -3909,9 +3916,9 @@ function qn({
|
|
|
3909
3916
|
case "ArrowLeft":
|
|
3910
3917
|
_.preventDefault();
|
|
3911
3918
|
{
|
|
3912
|
-
let R = $ - 1, A = new Date(
|
|
3919
|
+
let R = $ - 1, A = new Date(p, f, R);
|
|
3913
3920
|
if (R < 1) {
|
|
3914
|
-
const M =
|
|
3921
|
+
const M = f === 0 ? p - 1 : p, F = f === 0 ? 11 : f - 1, N = Y(M, F);
|
|
3915
3922
|
R = N, A = new Date(M, F, R), L(), setTimeout(() => {
|
|
3916
3923
|
k(N, "backward");
|
|
3917
3924
|
}, 0);
|
|
@@ -3923,9 +3930,9 @@ function qn({
|
|
|
3923
3930
|
case "ArrowUp":
|
|
3924
3931
|
_.preventDefault();
|
|
3925
3932
|
{
|
|
3926
|
-
let R = $ - 7, A = new Date(
|
|
3933
|
+
let R = $ - 7, A = new Date(p, f, R);
|
|
3927
3934
|
if (R < 1) {
|
|
3928
|
-
const M =
|
|
3935
|
+
const M = f === 0 ? p - 1 : p, F = f === 0 ? 11 : f - 1;
|
|
3929
3936
|
R = Y(M, F) + R, A = new Date(M, F, R), L(), setTimeout(() => {
|
|
3930
3937
|
k(R, "backward");
|
|
3931
3938
|
}, 0);
|
|
@@ -3937,9 +3944,9 @@ function qn({
|
|
|
3937
3944
|
case "ArrowDown":
|
|
3938
3945
|
_.preventDefault();
|
|
3939
3946
|
{
|
|
3940
|
-
let R = $ + 7, A = new Date(
|
|
3947
|
+
let R = $ + 7, A = new Date(p, f, R);
|
|
3941
3948
|
if (R > T) {
|
|
3942
|
-
const M =
|
|
3949
|
+
const M = f === 11 ? p + 1 : p, F = f === 11 ? 0 : f + 1;
|
|
3943
3950
|
R = R - T, A = new Date(M, F, R), C(), setTimeout(() => {
|
|
3944
3951
|
k(R, "forward");
|
|
3945
3952
|
}, 0);
|
|
@@ -3957,8 +3964,8 @@ function qn({
|
|
|
3957
3964
|
case "PageUp":
|
|
3958
3965
|
_.preventDefault(), L(), setTimeout(() => {
|
|
3959
3966
|
const R = Y(
|
|
3960
|
-
|
|
3961
|
-
|
|
3967
|
+
f === 0 ? p - 1 : p,
|
|
3968
|
+
f === 0 ? 11 : f - 1
|
|
3962
3969
|
), A = Math.min($, R);
|
|
3963
3970
|
k(A, "forward");
|
|
3964
3971
|
}, 0);
|
|
@@ -3966,8 +3973,8 @@ function qn({
|
|
|
3966
3973
|
case "PageDown":
|
|
3967
3974
|
_.preventDefault(), C(), setTimeout(() => {
|
|
3968
3975
|
const R = Y(
|
|
3969
|
-
|
|
3970
|
-
|
|
3976
|
+
f === 11 ? p + 1 : p,
|
|
3977
|
+
f === 11 ? 0 : f + 1
|
|
3971
3978
|
), A = Math.min($, R);
|
|
3972
3979
|
k(A, "forward");
|
|
3973
3980
|
}, 0);
|
|
@@ -3982,10 +3989,10 @@ function qn({
|
|
|
3982
3989
|
break;
|
|
3983
3990
|
}
|
|
3984
3991
|
}, k = (_, h) => {
|
|
3985
|
-
const y = Y(
|
|
3992
|
+
const y = Y(p, f);
|
|
3986
3993
|
if (h === "forward") {
|
|
3987
3994
|
for (let T = _; T <= y; T++) {
|
|
3988
|
-
const $ = new Date(
|
|
3995
|
+
const $ = new Date(p, f, T);
|
|
3989
3996
|
if (!S($)) {
|
|
3990
3997
|
P(T);
|
|
3991
3998
|
return;
|
|
@@ -3996,23 +4003,23 @@ function qn({
|
|
|
3996
4003
|
}, 0);
|
|
3997
4004
|
} else {
|
|
3998
4005
|
for (let A = _; A >= 1; A--) {
|
|
3999
|
-
const M = new Date(
|
|
4006
|
+
const M = new Date(p, f, A);
|
|
4000
4007
|
if (!S(M)) {
|
|
4001
4008
|
P(A);
|
|
4002
4009
|
return;
|
|
4003
4010
|
}
|
|
4004
4011
|
}
|
|
4005
|
-
const T =
|
|
4012
|
+
const T = f === 0 ? p - 1 : p, $ = f === 0 ? 11 : f - 1, R = Y(T, $);
|
|
4006
4013
|
L(), setTimeout(() => {
|
|
4007
4014
|
k(R, "backward");
|
|
4008
4015
|
}, 0);
|
|
4009
4016
|
}
|
|
4010
4017
|
}, H = (() => {
|
|
4011
|
-
const _ = Y(
|
|
4018
|
+
const _ = Y(p, f), h = j(p, f), y = [];
|
|
4012
4019
|
for (let T = 0; T < h; T++)
|
|
4013
4020
|
y.push(null);
|
|
4014
4021
|
for (let T = 1; T <= _; T++) {
|
|
4015
|
-
const $ = new Date(
|
|
4022
|
+
const $ = new Date(p, f, T);
|
|
4016
4023
|
y.push($);
|
|
4017
4024
|
}
|
|
4018
4025
|
return y;
|
|
@@ -4032,10 +4039,10 @@ function qn({
|
|
|
4032
4039
|
);
|
|
4033
4040
|
h !== -1 && w.current[h] && ((_ = w.current[h]) == null || _.focus());
|
|
4034
4041
|
}
|
|
4035
|
-
}, [
|
|
4042
|
+
}, [f, p, m, H]);
|
|
4036
4043
|
const J = {
|
|
4037
4044
|
label: "smp-datepickercalendar-label",
|
|
4038
|
-
wrapper: "smp-datepickercalendar"
|
|
4045
|
+
wrapper: `smp-datepickercalendar ${Jn["smp-datepickercalendar-position"]}`,
|
|
4039
4046
|
calendar: "smp-datepickercalendar",
|
|
4040
4047
|
table: "smp-datepickercalendar-table",
|
|
4041
4048
|
th: "smp-datepickercalendar-th",
|
|
@@ -4044,7 +4051,7 @@ function qn({
|
|
|
4044
4051
|
${h ? "smp-datepickercalendar-td-selected" : ""}
|
|
4045
4052
|
${y ? "smp-datepickercalendar-td-focused" : ""}
|
|
4046
4053
|
${T ? "smp-datepickercalendar-td-disabled" : ""}`
|
|
4047
|
-
}, W = () => `${E[
|
|
4054
|
+
}, W = () => `${E[f]} ${p.toString()}`;
|
|
4048
4055
|
return /* @__PURE__ */ v.jsxs(
|
|
4049
4056
|
"div",
|
|
4050
4057
|
{
|
|
@@ -4103,7 +4110,7 @@ function qn({
|
|
|
4103
4110
|
{
|
|
4104
4111
|
ref: x,
|
|
4105
4112
|
role: "grid",
|
|
4106
|
-
"aria-label": `${a(Tt.CALENDAR_FOR)} ${E[
|
|
4113
|
+
"aria-label": `${a(Tt.CALENDAR_FOR)} ${E[f]} ${p}`,
|
|
4107
4114
|
className: J.table,
|
|
4108
4115
|
children: [
|
|
4109
4116
|
/* @__PURE__ */ v.jsx("thead", { children: /* @__PURE__ */ v.jsx("tr", { children: O.map((_) => /* @__PURE__ */ v.jsx(
|
|
@@ -4131,7 +4138,7 @@ function qn({
|
|
|
4131
4138
|
},
|
|
4132
4139
|
`empty-${T}`
|
|
4133
4140
|
);
|
|
4134
|
-
const R = y.getDate() === o.getDate() && y.getMonth() === o.getMonth() && y.getFullYear() === o.getFullYear(), A =
|
|
4141
|
+
const R = y.getDate() === o.getDate() && y.getMonth() === o.getMonth() && y.getFullYear() === o.getFullYear(), A = u && y.getDate() === u.getDate() && y.getMonth() === u.getMonth() && y.getFullYear() === u.getFullYear(), M = m === y.getDate(), F = S(y);
|
|
4135
4142
|
return /* @__PURE__ */ v.jsx(
|
|
4136
4143
|
"td",
|
|
4137
4144
|
{
|
|
@@ -4164,7 +4171,7 @@ function qn({
|
|
|
4164
4171
|
}
|
|
4165
4172
|
);
|
|
4166
4173
|
}
|
|
4167
|
-
const
|
|
4174
|
+
const Zn = ({
|
|
4168
4175
|
bindValue: r,
|
|
4169
4176
|
placeholder: e,
|
|
4170
4177
|
onChange: t,
|
|
@@ -4172,21 +4179,21 @@ const Jn = ({
|
|
|
4172
4179
|
isEditable: s = !0,
|
|
4173
4180
|
...a
|
|
4174
4181
|
}) => {
|
|
4175
|
-
const [i, o] = Z(!1), [
|
|
4182
|
+
const [i, o] = Z(!1), [u, c] = Z(r || ""), [f, l] = Z(""), { anchorRef: p, targetRef: d } = St({
|
|
4176
4183
|
position: "bottom",
|
|
4177
4184
|
enabled: i
|
|
4178
4185
|
});
|
|
4179
|
-
Je(
|
|
4186
|
+
Je(d, () => {
|
|
4180
4187
|
o(!1);
|
|
4181
|
-
}), Je(
|
|
4188
|
+
}), Je(p, () => {
|
|
4182
4189
|
if (
|
|
4183
4190
|
// FIXME: Copied from useClickOutside.
|
|
4184
|
-
typeof
|
|
4191
|
+
typeof p == "object" && p !== null && "current" in p
|
|
4185
4192
|
) {
|
|
4186
|
-
const C =
|
|
4193
|
+
const C = p.current.querySelector("input");
|
|
4187
4194
|
C && C === document.activeElement && E();
|
|
4188
4195
|
}
|
|
4189
|
-
}), Tr(i,
|
|
4196
|
+
}), Tr(i, d);
|
|
4190
4197
|
const { format: m, getCurrentLanguage: g } = nt(), x = ye(
|
|
4191
4198
|
(C) => {
|
|
4192
4199
|
const Y = C.length > 5 && Mr(C, g()) || C, j = m(Y, void 0, void 0, {
|
|
@@ -4206,7 +4213,7 @@ const Jn = ({
|
|
|
4206
4213
|
c(j && Y || r), l(j && C || r);
|
|
4207
4214
|
}, [r, m, x]);
|
|
4208
4215
|
const w = () => o((C) => !C), E = () => {
|
|
4209
|
-
S(
|
|
4216
|
+
S(f);
|
|
4210
4217
|
}, O = (C) => {
|
|
4211
4218
|
S(C), o(!1);
|
|
4212
4219
|
}, S = (C) => {
|
|
@@ -4215,35 +4222,35 @@ const Jn = ({
|
|
|
4215
4222
|
}, b = (C) => {
|
|
4216
4223
|
l(C);
|
|
4217
4224
|
}, L = (C) => {
|
|
4218
|
-
C.key === "Enter" && (C.preventDefault(), S(
|
|
4225
|
+
C.key === "Enter" && (C.preventDefault(), S(f));
|
|
4219
4226
|
};
|
|
4220
4227
|
return /* @__PURE__ */ v.jsxs("div", { "data-component": "date-picker", children: [
|
|
4221
4228
|
/* @__PURE__ */ v.jsx(
|
|
4222
4229
|
Ce,
|
|
4223
4230
|
{
|
|
4224
|
-
bindValue:
|
|
4231
|
+
bindValue: f,
|
|
4225
4232
|
placeholder: e,
|
|
4226
4233
|
onBlur: E,
|
|
4227
4234
|
onChange: b,
|
|
4228
4235
|
onKeyDown: L,
|
|
4229
4236
|
shapeIcon: "calendar",
|
|
4230
4237
|
onShapeIconClick: w,
|
|
4231
|
-
ref:
|
|
4238
|
+
ref: p,
|
|
4232
4239
|
isEditable: s,
|
|
4233
4240
|
...a
|
|
4234
4241
|
}
|
|
4235
4242
|
),
|
|
4236
4243
|
i && /* @__PURE__ */ v.jsx(
|
|
4237
|
-
|
|
4244
|
+
Xn,
|
|
4238
4245
|
{
|
|
4239
4246
|
disabledDateRanges: n,
|
|
4240
4247
|
onDateChange: O,
|
|
4241
|
-
initialValue: xt(
|
|
4242
|
-
targetRef:
|
|
4248
|
+
initialValue: xt(u) && u || "",
|
|
4249
|
+
targetRef: d
|
|
4243
4250
|
}
|
|
4244
4251
|
)
|
|
4245
4252
|
] });
|
|
4246
|
-
},
|
|
4253
|
+
}, Qn = ({
|
|
4247
4254
|
elements: r,
|
|
4248
4255
|
displayMode: e,
|
|
4249
4256
|
minimumChars: t,
|
|
@@ -4252,11 +4259,11 @@ const Jn = ({
|
|
|
4252
4259
|
placeholder: a,
|
|
4253
4260
|
label: i,
|
|
4254
4261
|
disabled: o,
|
|
4255
|
-
fun:
|
|
4262
|
+
fun: u,
|
|
4256
4263
|
onOptionsRequest: c,
|
|
4257
|
-
onChange:
|
|
4264
|
+
onChange: f
|
|
4258
4265
|
}) => {
|
|
4259
|
-
const l = r.map((m) => m.bindValue),
|
|
4266
|
+
const l = r.map((m) => m.bindValue), p = (m, g) => {
|
|
4260
4267
|
const x = [...r];
|
|
4261
4268
|
if (m == "")
|
|
4262
4269
|
x.pop();
|
|
@@ -4269,14 +4276,14 @@ const Jn = ({
|
|
|
4269
4276
|
optionalDisplayValue: g
|
|
4270
4277
|
});
|
|
4271
4278
|
}
|
|
4272
|
-
|
|
4273
|
-
},
|
|
4279
|
+
f == null || f(x);
|
|
4280
|
+
}, d = {
|
|
4274
4281
|
container: "smp-multipleAutocomplete-container"
|
|
4275
4282
|
};
|
|
4276
4283
|
return /* @__PURE__ */ v.jsxs(
|
|
4277
4284
|
"div",
|
|
4278
4285
|
{
|
|
4279
|
-
className:
|
|
4286
|
+
className: d.container,
|
|
4280
4287
|
"data-component": "multiple-autocomplete",
|
|
4281
4288
|
children: [
|
|
4282
4289
|
i && /* @__PURE__ */ v.jsx($e, { label: i, disabled: o }),
|
|
@@ -4287,7 +4294,7 @@ const Jn = ({
|
|
|
4287
4294
|
displayMode: e,
|
|
4288
4295
|
isEditable: s,
|
|
4289
4296
|
onChange: (m) => {
|
|
4290
|
-
|
|
4297
|
+
f == null || f(m);
|
|
4291
4298
|
}
|
|
4292
4299
|
}
|
|
4293
4300
|
),
|
|
@@ -4295,9 +4302,9 @@ const Jn = ({
|
|
|
4295
4302
|
Er,
|
|
4296
4303
|
{
|
|
4297
4304
|
bindValue: "",
|
|
4298
|
-
fun:
|
|
4305
|
+
fun: u,
|
|
4299
4306
|
isEditable: s,
|
|
4300
|
-
onChange:
|
|
4307
|
+
onChange: p,
|
|
4301
4308
|
_changeOnEnter: !0,
|
|
4302
4309
|
listDisplayMode: n,
|
|
4303
4310
|
minimumChars: t,
|
|
@@ -4309,7 +4316,7 @@ const Jn = ({
|
|
|
4309
4316
|
]
|
|
4310
4317
|
}
|
|
4311
4318
|
);
|
|
4312
|
-
},
|
|
4319
|
+
}, es = ({ ...r }) => {
|
|
4313
4320
|
const [e, t] = Z(!1), n = e ? "visibility-off" : "visibility";
|
|
4314
4321
|
return /* @__PURE__ */ v.jsx(
|
|
4315
4322
|
Ce,
|
|
@@ -4322,7 +4329,7 @@ const Jn = ({
|
|
|
4322
4329
|
"data-component": "password"
|
|
4323
4330
|
}
|
|
4324
4331
|
);
|
|
4325
|
-
},
|
|
4332
|
+
}, ts = ({ ...r }) => {
|
|
4326
4333
|
const [e, t] = Z(r.bindValue), { translate: n } = nt(), s = (a) => {
|
|
4327
4334
|
var i;
|
|
4328
4335
|
a.key === "Enter" && (a.preventDefault(), (i = r.onEnter) == null || i.call(r, e));
|
|
@@ -4341,7 +4348,7 @@ const Jn = ({
|
|
|
4341
4348
|
_dataComponent: "search-bar"
|
|
4342
4349
|
}
|
|
4343
4350
|
);
|
|
4344
|
-
},
|
|
4351
|
+
}, rs = ({
|
|
4345
4352
|
bindValue: r,
|
|
4346
4353
|
optionalDisplayValue: e,
|
|
4347
4354
|
label: t
|
|
@@ -4373,7 +4380,7 @@ class Ee {
|
|
|
4373
4380
|
this.class = e, this.value = t;
|
|
4374
4381
|
}
|
|
4375
4382
|
static fromDataObj(e) {
|
|
4376
|
-
return new Ee(e, e.k.split(";"));
|
|
4383
|
+
return new Ee(e, e.k == "" ? [] : e.k.split(";"));
|
|
4377
4384
|
}
|
|
4378
4385
|
static fromString(e) {
|
|
4379
4386
|
return new Ee(
|
|
@@ -4406,7 +4413,7 @@ const Ge = (r, e, t) => ({
|
|
|
4406
4413
|
bindValue: n,
|
|
4407
4414
|
optionalDisplayValue: t.length >= s ? t[s] : ""
|
|
4408
4415
|
}));
|
|
4409
|
-
},
|
|
4416
|
+
}, ns = (r, e) => {
|
|
4410
4417
|
const t = new Ee(
|
|
4411
4418
|
r.obj,
|
|
4412
4419
|
e.map((s) => s.bindValue)
|
|
@@ -4415,7 +4422,7 @@ const Ge = (r, e, t) => ({
|
|
|
4415
4422
|
e.map((s) => s.optionalDisplayValue ? s.optionalDisplayValue : "")
|
|
4416
4423
|
).getLegacyValue();
|
|
4417
4424
|
return Ge(r, t, n);
|
|
4418
|
-
},
|
|
4425
|
+
}, ss = ({
|
|
4419
4426
|
disabled: r,
|
|
4420
4427
|
bindValue: e,
|
|
4421
4428
|
onChange: t,
|
|
@@ -4424,24 +4431,24 @@ const Ge = (r, e, t) => ({
|
|
|
4424
4431
|
appearance: a,
|
|
4425
4432
|
isEditable: i,
|
|
4426
4433
|
label: o,
|
|
4427
|
-
ariaLabel:
|
|
4434
|
+
ariaLabel: u,
|
|
4428
4435
|
helperText: c,
|
|
4429
|
-
error:
|
|
4436
|
+
error: f,
|
|
4430
4437
|
onBlur: l,
|
|
4431
|
-
onKeyDown:
|
|
4438
|
+
onKeyDown: p
|
|
4432
4439
|
}) => {
|
|
4433
|
-
const
|
|
4440
|
+
const d = bt(), m = `${d}-helper`, g = f ? "danger" : s, x = c || !!f, w = (O) => {
|
|
4434
4441
|
t == null || t(O.target.value);
|
|
4435
4442
|
}, E = {
|
|
4436
4443
|
wrapper: "smp-textarea-wrapper",
|
|
4437
4444
|
container: `smp-textarea ${r ? "smp-textarea-disabled" : ""} ${n ? "smp-textarea-placeholder" : ""} ${g ? `smp-textarea-${g}` : ""} ${a ? `smp-textarea-${a}` : ""} ${i ? "" : "smp-textarea-readOnly"}`
|
|
4438
4445
|
};
|
|
4439
4446
|
return /* @__PURE__ */ v.jsxs("div", { className: E.wrapper, "data-component": "textarea", children: [
|
|
4440
|
-
o && /* @__PURE__ */ v.jsx($e, { htmlFor:
|
|
4447
|
+
o && /* @__PURE__ */ v.jsx($e, { htmlFor: d, label: o, disabled: r }),
|
|
4441
4448
|
/* @__PURE__ */ v.jsx(
|
|
4442
4449
|
"textarea",
|
|
4443
4450
|
{
|
|
4444
|
-
id:
|
|
4451
|
+
id: d,
|
|
4445
4452
|
value: e,
|
|
4446
4453
|
placeholder: n,
|
|
4447
4454
|
onChange: w,
|
|
@@ -4449,9 +4456,9 @@ const Ge = (r, e, t) => ({
|
|
|
4449
4456
|
className: E.container,
|
|
4450
4457
|
disabled: r,
|
|
4451
4458
|
readOnly: !i,
|
|
4452
|
-
onKeyDown:
|
|
4453
|
-
"aria-label": o ? void 0 :
|
|
4454
|
-
"aria-labelledby": o ?
|
|
4459
|
+
onKeyDown: p,
|
|
4460
|
+
"aria-label": o ? void 0 : u,
|
|
4461
|
+
"aria-labelledby": o ? d : void 0,
|
|
4455
4462
|
"aria-describedby": x ? m : void 0
|
|
4456
4463
|
}
|
|
4457
4464
|
),
|
|
@@ -4459,7 +4466,7 @@ const Ge = (r, e, t) => ({
|
|
|
4459
4466
|
mr,
|
|
4460
4467
|
{
|
|
4461
4468
|
id: m,
|
|
4462
|
-
helperText:
|
|
4469
|
+
helperText: f,
|
|
4463
4470
|
disabled: r,
|
|
4464
4471
|
state: g
|
|
4465
4472
|
}
|
|
@@ -4474,12 +4481,12 @@ const Ge = (r, e, t) => ({
|
|
|
4474
4481
|
fun: a,
|
|
4475
4482
|
placeholderIcon: i,
|
|
4476
4483
|
label: o,
|
|
4477
|
-
options:
|
|
4484
|
+
options: u,
|
|
4478
4485
|
onChange: c,
|
|
4479
|
-
onClick:
|
|
4486
|
+
onClick: f,
|
|
4480
4487
|
onEnter: l,
|
|
4481
|
-
onBlur:
|
|
4482
|
-
onOptionsRequest:
|
|
4488
|
+
onBlur: p,
|
|
4489
|
+
onOptionsRequest: d,
|
|
4483
4490
|
isEditable: m
|
|
4484
4491
|
}) => {
|
|
4485
4492
|
const g = {
|
|
@@ -4489,14 +4496,14 @@ const Ge = (r, e, t) => ({
|
|
|
4489
4496
|
icon: s,
|
|
4490
4497
|
fun: a
|
|
4491
4498
|
}, x = {
|
|
4492
|
-
onBlur:
|
|
4493
|
-
onOptionsRequest:
|
|
4499
|
+
onBlur: p,
|
|
4500
|
+
onOptionsRequest: d,
|
|
4494
4501
|
fun: a,
|
|
4495
4502
|
icon: s,
|
|
4496
4503
|
label: o,
|
|
4497
4504
|
isEditable: m,
|
|
4498
4505
|
...n
|
|
4499
|
-
}, w = (S, b, L) => Ir(t) ? Ge(S, new qe(t, b).getLegacyValue()) : Ge(S, b, L), E = (S) => Ge(g, new ze(t, S).getLegacyValue()), O = (S) =>
|
|
4506
|
+
}, w = (S, b, L) => Ir(t) ? Ge(S, new qe(t, b).getLegacyValue()) : Ge(S, b, L), E = (S) => Ge(g, new ze(t, S).getLegacyValue()), O = (S) => ns(g, S);
|
|
4500
4507
|
switch (e) {
|
|
4501
4508
|
case ne.AUTOCOMPLETE: {
|
|
4502
4509
|
const S = {
|
|
@@ -4515,7 +4522,7 @@ const Ge = (r, e, t) => ({
|
|
|
4515
4522
|
bindValue: t.k,
|
|
4516
4523
|
optionalDisplayValue: r,
|
|
4517
4524
|
onClick: () => {
|
|
4518
|
-
|
|
4525
|
+
f == null || f(w(g, t.k));
|
|
4519
4526
|
}
|
|
4520
4527
|
};
|
|
4521
4528
|
return /* @__PURE__ */ v.jsx(De, { ...S });
|
|
@@ -4523,13 +4530,13 @@ const Ge = (r, e, t) => ({
|
|
|
4523
4530
|
case ne.BUTTON_LIST: {
|
|
4524
4531
|
const S = {
|
|
4525
4532
|
...x,
|
|
4526
|
-
options:
|
|
4533
|
+
options: u,
|
|
4527
4534
|
onClick: (b, L) => {
|
|
4528
4535
|
const C = { ...g, fun: L };
|
|
4529
|
-
|
|
4536
|
+
f == null || f(w(C, b));
|
|
4530
4537
|
}
|
|
4531
4538
|
};
|
|
4532
|
-
return /* @__PURE__ */ v.jsx(
|
|
4539
|
+
return /* @__PURE__ */ v.jsx(pn, { ...S });
|
|
4533
4540
|
}
|
|
4534
4541
|
case ne.COMBOBOX: {
|
|
4535
4542
|
const S = {
|
|
@@ -4540,7 +4547,7 @@ const Ge = (r, e, t) => ({
|
|
|
4540
4547
|
c == null || c(w(g, b, L));
|
|
4541
4548
|
}
|
|
4542
4549
|
};
|
|
4543
|
-
return /* @__PURE__ */ v.jsx(
|
|
4550
|
+
return /* @__PURE__ */ v.jsx(gn, { ...S });
|
|
4544
4551
|
}
|
|
4545
4552
|
case ne.SWITCH:
|
|
4546
4553
|
case ne.CHECKBOX: {
|
|
@@ -4552,7 +4559,7 @@ const Ge = (r, e, t) => ({
|
|
|
4552
4559
|
c == null || c(E(b));
|
|
4553
4560
|
}
|
|
4554
4561
|
};
|
|
4555
|
-
return /* @__PURE__ */ v.jsx(
|
|
4562
|
+
return /* @__PURE__ */ v.jsx(hn, { ...S });
|
|
4556
4563
|
}
|
|
4557
4564
|
case ne.CHIP: {
|
|
4558
4565
|
const S = {
|
|
@@ -4569,7 +4576,7 @@ const Ge = (r, e, t) => ({
|
|
|
4569
4576
|
c == null || c(w(g, b));
|
|
4570
4577
|
}
|
|
4571
4578
|
};
|
|
4572
|
-
return /* @__PURE__ */ v.jsx(
|
|
4579
|
+
return /* @__PURE__ */ v.jsx(Zn, { ...S });
|
|
4573
4580
|
}
|
|
4574
4581
|
case ne.ICON:
|
|
4575
4582
|
case ne.IMAGE: {
|
|
@@ -4579,7 +4586,7 @@ const Ge = (r, e, t) => ({
|
|
|
4579
4586
|
placeholderIcon: i,
|
|
4580
4587
|
isInteractable: !!x.fun,
|
|
4581
4588
|
onClick: () => {
|
|
4582
|
-
|
|
4589
|
+
f == null || f(w(g, t.k));
|
|
4583
4590
|
}
|
|
4584
4591
|
};
|
|
4585
4592
|
return /* @__PURE__ */ v.jsx(ue, { ...S });
|
|
@@ -4592,7 +4599,7 @@ const Ge = (r, e, t) => ({
|
|
|
4592
4599
|
c == null || c(O(b));
|
|
4593
4600
|
}
|
|
4594
4601
|
};
|
|
4595
|
-
return /* @__PURE__ */ v.jsx(
|
|
4602
|
+
return /* @__PURE__ */ v.jsx(Qn, { ...S });
|
|
4596
4603
|
}
|
|
4597
4604
|
case ne.MEMO: {
|
|
4598
4605
|
const S = {
|
|
@@ -4603,7 +4610,7 @@ const Ge = (r, e, t) => ({
|
|
|
4603
4610
|
c == null || c(w(g, b));
|
|
4604
4611
|
}
|
|
4605
4612
|
};
|
|
4606
|
-
return /* @__PURE__ */ v.jsx(
|
|
4613
|
+
return /* @__PURE__ */ v.jsx(ss, { ...S });
|
|
4607
4614
|
}
|
|
4608
4615
|
case ne.PASSWORD: {
|
|
4609
4616
|
const S = {
|
|
@@ -4613,7 +4620,7 @@ const Ge = (r, e, t) => ({
|
|
|
4613
4620
|
c == null || c(w(g, b));
|
|
4614
4621
|
}
|
|
4615
4622
|
};
|
|
4616
|
-
return /* @__PURE__ */ v.jsx(
|
|
4623
|
+
return /* @__PURE__ */ v.jsx(es, { ...S });
|
|
4617
4624
|
}
|
|
4618
4625
|
case ne.SPOTLIGHT: {
|
|
4619
4626
|
const S = {
|
|
@@ -4623,7 +4630,7 @@ const Ge = (r, e, t) => ({
|
|
|
4623
4630
|
l == null || l(w(g, b));
|
|
4624
4631
|
}
|
|
4625
4632
|
};
|
|
4626
|
-
return /* @__PURE__ */ v.jsx(
|
|
4633
|
+
return /* @__PURE__ */ v.jsx(ts, { ...S });
|
|
4627
4634
|
}
|
|
4628
4635
|
case ne.TEXT_FIELD: {
|
|
4629
4636
|
const S = {
|
|
@@ -4642,10 +4649,10 @@ const Ge = (r, e, t) => ({
|
|
|
4642
4649
|
bindValue: t.k,
|
|
4643
4650
|
optionalDisplayValue: r
|
|
4644
4651
|
};
|
|
4645
|
-
return /* @__PURE__ */ v.jsx(
|
|
4652
|
+
return /* @__PURE__ */ v.jsx(rs, { ...S });
|
|
4646
4653
|
}
|
|
4647
4654
|
}
|
|
4648
|
-
},
|
|
4655
|
+
}, as = (r, e) => {
|
|
4649
4656
|
const t = [];
|
|
4650
4657
|
for (let n = 0; n < r.length; n += e)
|
|
4651
4658
|
t.push(r.slice(n, n + e));
|
|
@@ -4659,14 +4666,14 @@ const Ge = (r, e, t) => ({
|
|
|
4659
4666
|
content: t.content
|
|
4660
4667
|
};
|
|
4661
4668
|
let n = t.sections, s = t.content;
|
|
4662
|
-
return (i = t.content) != null && i.length && t.columns && +t.columns > 1 && (n =
|
|
4663
|
-
t.content.filter((
|
|
4669
|
+
return (i = t.content) != null && i.length && t.columns && +t.columns > 1 && (n = as(
|
|
4670
|
+
t.content.filter((u) => !!e[u.id]),
|
|
4664
4671
|
+t.columns
|
|
4665
4672
|
).map(
|
|
4666
|
-
(
|
|
4673
|
+
(u, c) => ({
|
|
4667
4674
|
...t,
|
|
4668
4675
|
id: `${t.id}-${c}`,
|
|
4669
|
-
content:
|
|
4676
|
+
content: u,
|
|
4670
4677
|
gridCols: t.columns,
|
|
4671
4678
|
horizontal: !0
|
|
4672
4679
|
})
|
|
@@ -4709,38 +4716,38 @@ const Ge = (r, e, t) => ({
|
|
|
4709
4716
|
]
|
|
4710
4717
|
}
|
|
4711
4718
|
}) => {
|
|
4712
|
-
const t = "--smp-grid-template-cols", n = "--smp-grid-template-rows", s = jr(e.sections || [], r), a = (l) => l == null ? void 0 : l.reduce((
|
|
4719
|
+
const t = "--smp-grid-template-cols", n = "--smp-grid-template-rows", s = jr(e.sections || [], r), a = (l) => l == null ? void 0 : l.reduce((p, d) => {
|
|
4713
4720
|
var E, O;
|
|
4714
4721
|
let m = "", g = {}, x = {}, w = "";
|
|
4715
|
-
return (E =
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
)))) : (O =
|
|
4719
|
-
[t]: `repeat(${
|
|
4722
|
+
return (E = d.sections) != null && E.length ? (m = pe["smp-layout-section-grid"], g = a(d.sections), d.gridCols == null && (w = `${pe[d.horizontal ? "smp-grid-template-cols" : "smp-grid-template-rows"]}`, (d.horizontal || pr(d.sections)) && (x = dr(
|
|
4723
|
+
d.sections,
|
|
4724
|
+
d.horizontal ? t : n
|
|
4725
|
+
)))) : (O = d.content) != null && O.length && (d.gridCols !== void 0 && d.gridCols > 0 ? (m = pe["smp-layout-section-grid"], w = `${pe["smp-grid-template-cols"]}`, x = {
|
|
4726
|
+
[t]: `repeat(${d.gridCols}, 1fr)`
|
|
4720
4727
|
}) : m = pe["smp-layout-section-flex"]), {
|
|
4721
|
-
...
|
|
4728
|
+
...p,
|
|
4722
4729
|
...g,
|
|
4723
|
-
[
|
|
4724
|
-
classes: `${m} ${pe[
|
|
4730
|
+
[d.id]: {
|
|
4731
|
+
classes: `${m} ${pe[d.horizontal ? "smp-layout-section-horizontal" : "smp-layout-section-vertical"]} ${w} ${d.justify ? `smp-justifyContent-${d.justify}` : ""} ${d.align ? `smp-alignItems-${d.align}` : ""}`,
|
|
4725
4732
|
styles: x
|
|
4726
4733
|
}
|
|
4727
4734
|
};
|
|
4728
4735
|
}, {}), i = a(s), o = {
|
|
4729
4736
|
container: `${pe["smp-layout"]} ${e.horizontal ? pe["smp-layout-horizontal"] : pe["smp-layout-vertical"]}`,
|
|
4730
4737
|
sections: i
|
|
4731
|
-
},
|
|
4738
|
+
}, u = e.horizontal || pr(e.sections || []) ? dr(
|
|
4732
4739
|
s,
|
|
4733
4740
|
e.horizontal ? t : n
|
|
4734
4741
|
) : {}, c = (l) => {
|
|
4735
|
-
var
|
|
4736
|
-
const
|
|
4742
|
+
var d;
|
|
4743
|
+
const p = /* @__PURE__ */ v.jsx(
|
|
4737
4744
|
"div",
|
|
4738
4745
|
{
|
|
4739
4746
|
"smp-id": "section-" + l.id,
|
|
4740
4747
|
className: o.sections[l.id].classes,
|
|
4741
4748
|
style: o.sections[l.id].styles,
|
|
4742
|
-
children: (
|
|
4743
|
-
(m) =>
|
|
4749
|
+
children: (d = l.sections) != null && d.length ? l.sections.map((m) => c(m)) : l.content.map(
|
|
4750
|
+
(m) => f(
|
|
4744
4751
|
m,
|
|
4745
4752
|
r[m.id],
|
|
4746
4753
|
l.justify,
|
|
@@ -4758,43 +4765,43 @@ const Ge = (r, e, t) => ({
|
|
|
4758
4765
|
children: /* @__PURE__ */ v.jsx($e, { label: l.title })
|
|
4759
4766
|
}
|
|
4760
4767
|
),
|
|
4761
|
-
|
|
4762
|
-
] }) :
|
|
4763
|
-
},
|
|
4768
|
+
p
|
|
4769
|
+
] }) : p;
|
|
4770
|
+
}, f = (l, p, d, m) => {
|
|
4764
4771
|
const g = l.colSpan !== void 0 ? l.colSpan > 0 ? l.colSpan : l.colStart !== void 0 && l.colStart < 1 ? 1 : null : null, x = g !== null ? `span ${g}` : l.colStart, w = l.colEnd !== void 0 && l.colEnd > 0 ? l.colEnd : "", E = {
|
|
4765
4772
|
gridColumnStart: x,
|
|
4766
4773
|
gridColumnEnd: w
|
|
4767
|
-
}, O = `${pe["smp-layout-cell-container"]} ${
|
|
4768
|
-
return
|
|
4774
|
+
}, O = `${pe["smp-layout-cell-container"]} ${d ? `smp-justifyContent-${d}` : ""} ${m ? `smp-alignItems-${m}` : ""}`;
|
|
4775
|
+
return p ? /* @__PURE__ */ v.jsx(
|
|
4769
4776
|
"div",
|
|
4770
4777
|
{
|
|
4771
4778
|
className: O,
|
|
4772
4779
|
style: { ...E },
|
|
4773
4780
|
"smp-id": l.id,
|
|
4774
|
-
children: /* @__PURE__ */ v.jsx(Ot, { ...
|
|
4781
|
+
children: /* @__PURE__ */ v.jsx(Ot, { ...p })
|
|
4775
4782
|
},
|
|
4776
4783
|
l.id
|
|
4777
4784
|
) : /* @__PURE__ */ v.jsx(v.Fragment, {});
|
|
4778
4785
|
};
|
|
4779
|
-
return /* @__PURE__ */ v.jsx("div", { className: o.container, style:
|
|
4780
|
-
},
|
|
4786
|
+
return /* @__PURE__ */ v.jsx("div", { className: o.container, style: u, "smp-id": "layout", children: s == null ? void 0 : s.map((l) => c(l)) });
|
|
4787
|
+
}, js = ({ data: r, onClick: e, onEnter: t }) => {
|
|
4781
4788
|
var i, o;
|
|
4782
4789
|
const [n, s] = Z(), a = ye(
|
|
4783
|
-
(
|
|
4784
|
-
var
|
|
4785
|
-
if (!((
|
|
4790
|
+
(u) => {
|
|
4791
|
+
var f, l;
|
|
4792
|
+
if (!((f = u.rows) != null && f.length) || !((l = u.columns) != null && l.length))
|
|
4786
4793
|
return {};
|
|
4787
|
-
const c =
|
|
4788
|
-
return
|
|
4789
|
-
const m = c.cells[
|
|
4794
|
+
const c = u.rows[0];
|
|
4795
|
+
return u.columns.filter((p) => p.visible).reduce((p, d) => {
|
|
4796
|
+
const m = c.cells[d.name], g = {
|
|
4790
4797
|
...m,
|
|
4791
4798
|
onChange: (x) => {
|
|
4792
4799
|
s((w) => w && {
|
|
4793
4800
|
...w,
|
|
4794
|
-
[
|
|
4795
|
-
...w[
|
|
4801
|
+
[d.name]: {
|
|
4802
|
+
...w[d.name],
|
|
4796
4803
|
obj: {
|
|
4797
|
-
...w[
|
|
4804
|
+
...w[d.name].obj,
|
|
4798
4805
|
k: x.obj.k
|
|
4799
4806
|
}
|
|
4800
4807
|
}
|
|
@@ -4810,8 +4817,8 @@ const Ge = (r, e, t) => ({
|
|
|
4810
4817
|
}
|
|
4811
4818
|
};
|
|
4812
4819
|
return {
|
|
4813
|
-
...
|
|
4814
|
-
[
|
|
4820
|
+
...p,
|
|
4821
|
+
[d.name]: g
|
|
4815
4822
|
};
|
|
4816
4823
|
}, {});
|
|
4817
4824
|
},
|
|
@@ -4820,7 +4827,7 @@ const Ge = (r, e, t) => ({
|
|
|
4820
4827
|
return oe(() => {
|
|
4821
4828
|
r && s(a(r));
|
|
4822
4829
|
}, [r, a]), !((i = r == null ? void 0 : r.rows) != null && i.length) || !((o = r.columns) != null && o.length) ? null : n && /* @__PURE__ */ v.jsx("header", { className: "smp-appbar", "aria-label": "App Bar", children: /* @__PURE__ */ v.jsx(Rt, { layout: r.rows[0].layout, cells: n }) });
|
|
4823
|
-
},
|
|
4830
|
+
}, is = (r) => {
|
|
4824
4831
|
var e;
|
|
4825
4832
|
return (e = r.children) != null && e.length ? r.children.map((t) => {
|
|
4826
4833
|
var n, s;
|
|
@@ -4831,7 +4838,7 @@ const Ge = (r, e, t) => ({
|
|
|
4831
4838
|
icon: t.icon
|
|
4832
4839
|
};
|
|
4833
4840
|
}) : [];
|
|
4834
|
-
}, ce = (r) => r == null ? !1 : typeof r == "string" ? r.toLocaleLowerCase() == "yes" : r,
|
|
4841
|
+
}, ce = (r) => r == null ? !1 : typeof r == "string" ? r.toLocaleLowerCase() == "yes" : r, Ds = ({
|
|
4835
4842
|
data: r,
|
|
4836
4843
|
logo: e,
|
|
4837
4844
|
open: t,
|
|
@@ -4840,10 +4847,10 @@ const Ge = (r, e, t) => ({
|
|
|
4840
4847
|
onClick: a,
|
|
4841
4848
|
onEnter: i,
|
|
4842
4849
|
onClose: o,
|
|
4843
|
-
loadOptions:
|
|
4850
|
+
loadOptions: u
|
|
4844
4851
|
}) => {
|
|
4845
4852
|
var O, S;
|
|
4846
|
-
const [c,
|
|
4853
|
+
const [c, f] = Z(), [l, p] = Z(t ?? !0), d = ve(null), m = s.trim() ? s : "100vh", g = ye(
|
|
4847
4854
|
(b) => {
|
|
4848
4855
|
var C, Y;
|
|
4849
4856
|
if (!((C = b == null ? void 0 : b.rows) != null && C.length) || !((Y = b == null ? void 0 : b.columns) != null && Y.length))
|
|
@@ -4856,7 +4863,7 @@ const Ge = (r, e, t) => ({
|
|
|
4856
4863
|
const k = {
|
|
4857
4864
|
...D,
|
|
4858
4865
|
onChange: (U) => {
|
|
4859
|
-
|
|
4866
|
+
f((H) => {
|
|
4860
4867
|
const z = { ...H };
|
|
4861
4868
|
return z != null && z[P.name] && (z[P.name].obj.k = U.obj.k), z;
|
|
4862
4869
|
});
|
|
@@ -4868,8 +4875,8 @@ const Ge = (r, e, t) => ({
|
|
|
4868
4875
|
i && i(U);
|
|
4869
4876
|
}
|
|
4870
4877
|
};
|
|
4871
|
-
return
|
|
4872
|
-
(z) =>
|
|
4878
|
+
return u && D.shape == ne.BUTTON_LIST && (k.onOptionsRequest = (U, H) => u(U, H).then(
|
|
4879
|
+
(z) => is(z)
|
|
4873
4880
|
)), !l && ce(n) && (k.data = {
|
|
4874
4881
|
...k.data,
|
|
4875
4882
|
showText: !1,
|
|
@@ -4880,30 +4887,30 @@ const Ge = (r, e, t) => ({
|
|
|
4880
4887
|
};
|
|
4881
4888
|
}, {});
|
|
4882
4889
|
},
|
|
4883
|
-
[l, n, a, i,
|
|
4890
|
+
[l, n, a, i, u]
|
|
4884
4891
|
), x = ye(() => {
|
|
4885
4892
|
o == null || o();
|
|
4886
4893
|
}, [o]), w = () => {
|
|
4887
|
-
ce(n) ?
|
|
4894
|
+
ce(n) ? p((b) => !b) : (p(!1), o == null || o());
|
|
4888
4895
|
};
|
|
4889
4896
|
if (oe(() => {
|
|
4890
|
-
|
|
4897
|
+
f(g(r));
|
|
4891
4898
|
}, [r]), oe(() => {
|
|
4892
|
-
if (!
|
|
4899
|
+
if (!d.current)
|
|
4893
4900
|
return;
|
|
4894
4901
|
if (!ce(n)) {
|
|
4895
|
-
|
|
4902
|
+
f(g(r));
|
|
4896
4903
|
return;
|
|
4897
4904
|
}
|
|
4898
|
-
const b = getComputedStyle(
|
|
4905
|
+
const b = getComputedStyle(d.current).getPropertyValue(
|
|
4899
4906
|
"--smp-drawer-slide-transition"
|
|
4900
4907
|
);
|
|
4901
4908
|
let L = Number(b);
|
|
4902
4909
|
b.endsWith("ms") ? L = parseFloat(b) : b.endsWith("s") && (L = parseFloat(b) * 1e3), setTimeout(() => {
|
|
4903
|
-
|
|
4910
|
+
f(g(r));
|
|
4904
4911
|
}, L / 2);
|
|
4905
4912
|
}, [l, n]), oe(() => {
|
|
4906
|
-
t !== void 0 && !ce(n) &&
|
|
4913
|
+
t !== void 0 && !ce(n) && p(t);
|
|
4907
4914
|
}, [n, t]), !((O = r == null ? void 0 : r.rows) != null && O.length) || !((S = r.columns) != null && S.length))
|
|
4908
4915
|
return null;
|
|
4909
4916
|
const E = {
|
|
@@ -4928,7 +4935,7 @@ const Ge = (r, e, t) => ({
|
|
|
4928
4935
|
/* @__PURE__ */ v.jsx(
|
|
4929
4936
|
"aside",
|
|
4930
4937
|
{
|
|
4931
|
-
ref:
|
|
4938
|
+
ref: d,
|
|
4932
4939
|
className: E.drawer,
|
|
4933
4940
|
style: { height: m },
|
|
4934
4941
|
"aria-label": "Drawer",
|
|
@@ -4962,7 +4969,7 @@ const Ge = (r, e, t) => ({
|
|
|
4962
4969
|
}
|
|
4963
4970
|
)
|
|
4964
4971
|
] });
|
|
4965
|
-
},
|
|
4972
|
+
}, $s = ({
|
|
4966
4973
|
ColumnsNumber: r = 1,
|
|
4967
4974
|
data: e = {},
|
|
4968
4975
|
ForceText: t,
|
|
@@ -4971,12 +4978,12 @@ const Ge = (r, e, t) => ({
|
|
|
4971
4978
|
Fillspace: a,
|
|
4972
4979
|
FontSize: i,
|
|
4973
4980
|
Horizontal: o,
|
|
4974
|
-
ForceIcon:
|
|
4981
|
+
ForceIcon: u,
|
|
4975
4982
|
IconColName: c,
|
|
4976
|
-
IconColor:
|
|
4983
|
+
IconColor: f = "var(--smp-dashList-color-base)",
|
|
4977
4984
|
NumberFormat: l,
|
|
4978
|
-
ForceUM:
|
|
4979
|
-
UmColName:
|
|
4985
|
+
ForceUM: p,
|
|
4986
|
+
UmColName: d,
|
|
4980
4987
|
UmColor: m = "var(--smp-dashList-color-base)",
|
|
4981
4988
|
ForceValue: g,
|
|
4982
4989
|
ValueColName: x,
|
|
@@ -5025,8 +5032,8 @@ const Ge = (r, e, t) => ({
|
|
|
5025
5032
|
};
|
|
5026
5033
|
return {
|
|
5027
5034
|
descr: t || X(n) || te(2) || "",
|
|
5028
|
-
icon:
|
|
5029
|
-
um:
|
|
5035
|
+
icon: u || X(c) || te(3) || "",
|
|
5036
|
+
um: p || X(d) || te(1) || "",
|
|
5030
5037
|
value: g || X(x) || te(0) || ""
|
|
5031
5038
|
};
|
|
5032
5039
|
}, F = (V) => {
|
|
@@ -5041,7 +5048,7 @@ const Ge = (r, e, t) => ({
|
|
|
5041
5048
|
icon: (te) => /* @__PURE__ */ v.jsx("div", { className: X.icon, children: /* @__PURE__ */ v.jsx(
|
|
5042
5049
|
ue,
|
|
5043
5050
|
{
|
|
5044
|
-
color:
|
|
5051
|
+
color: f,
|
|
5045
5052
|
height: z,
|
|
5046
5053
|
icon: te,
|
|
5047
5054
|
width: z
|
|
@@ -5090,22 +5097,22 @@ const Ge = (r, e, t) => ({
|
|
|
5090
5097
|
"smp-table": "_smp-table_8dmh0_1",
|
|
5091
5098
|
"smp-headerCell": "_smp-headerCell_8dmh0_35",
|
|
5092
5099
|
"smp-resizer": "_smp-resizer_8dmh0_44"
|
|
5093
|
-
},
|
|
5094
|
-
rowContent:
|
|
5095
|
-
clickable:
|
|
5096
|
-
indent:
|
|
5097
|
-
toggle:
|
|
5098
|
-
rowLabel:
|
|
5099
|
-
cell:
|
|
5100
|
-
leftSection:
|
|
5100
|
+
}, os = "_rowContent_gazwe_13", ls = "_clickable_gazwe_42", cs = "_indent_gazwe_47", us = "_toggle_gazwe_53", fs = "_rowLabel_gazwe_69", ds = "_cell_gazwe_78", ps = "_leftSection_gazwe_86", we = {
|
|
5101
|
+
rowContent: os,
|
|
5102
|
+
clickable: ls,
|
|
5103
|
+
indent: cs,
|
|
5104
|
+
toggle: us,
|
|
5105
|
+
rowLabel: fs,
|
|
5106
|
+
cell: ds,
|
|
5107
|
+
leftSection: ps
|
|
5101
5108
|
};
|
|
5102
5109
|
function Ke(r) {
|
|
5103
5110
|
return !!r && "children" in r;
|
|
5104
5111
|
}
|
|
5105
|
-
function
|
|
5112
|
+
function hs(r) {
|
|
5106
5113
|
return !Ke(r);
|
|
5107
5114
|
}
|
|
5108
|
-
function
|
|
5115
|
+
function ms(r) {
|
|
5109
5116
|
return JSON.stringify(r).split("").reduce((e, t) => (e << 5) - e + t.charCodeAt(0) | 0, 0).toString();
|
|
5110
5117
|
}
|
|
5111
5118
|
const Dr = ({
|
|
@@ -5116,26 +5123,26 @@ const Dr = ({
|
|
|
5116
5123
|
offsetTop: s
|
|
5117
5124
|
}) => {
|
|
5118
5125
|
var E;
|
|
5119
|
-
const [a, i] = Z(!1), o = Ke(r) && !!((E = r.children) != null && E.length),
|
|
5126
|
+
const [a, i] = Z(!1), o = Ke(r) && !!((E = r.children) != null && E.length), u = r.cells && Object.keys(r.cells).length > 0, c = o, f = t * 20, l = () => {
|
|
5120
5127
|
o && i(!a);
|
|
5121
|
-
},
|
|
5128
|
+
}, p = {
|
|
5122
5129
|
content: `${we.rowContent} ${o ? we.clickable : ""}`,
|
|
5123
5130
|
toggle: `${we.toggle}`,
|
|
5124
5131
|
indent: `${we.indent}`,
|
|
5125
5132
|
cell: `${we.cell}`
|
|
5126
|
-
},
|
|
5133
|
+
}, d = (O) => /* @__PURE__ */ v.jsx(Ot, { ...O }), m = () => /* @__PURE__ */ v.jsx("span", { className: p.toggle, children: c ? a ? "▶" : "▼" : " " }), g = () => /* @__PURE__ */ v.jsx(
|
|
5127
5134
|
"span",
|
|
5128
5135
|
{
|
|
5129
|
-
className:
|
|
5130
|
-
style: { width: `${
|
|
5136
|
+
className: p.indent,
|
|
5137
|
+
style: { width: `${f}px` },
|
|
5131
5138
|
"aria-hidden": "true"
|
|
5132
5139
|
}
|
|
5133
5140
|
), x = () => {
|
|
5134
|
-
const O =
|
|
5141
|
+
const O = hs(r) ? "" : r.decode || (u ? "" : "Untitled"), S = s ?? n * t;
|
|
5135
5142
|
return /* @__PURE__ */ v.jsxs(
|
|
5136
5143
|
"tr",
|
|
5137
5144
|
{
|
|
5138
|
-
className:
|
|
5145
|
+
className: p.content,
|
|
5139
5146
|
onClick: l,
|
|
5140
5147
|
role: o ? "button" : "row",
|
|
5141
5148
|
"aria-expanded": o ? !a : void 0,
|
|
@@ -5162,15 +5169,15 @@ const Dr = ({
|
|
|
5162
5169
|
r.cells && Object.keys(r.cells).length > 0 && Object.entries(r.cells).map(([b, L]) => /* @__PURE__ */ v.jsx(
|
|
5163
5170
|
"td",
|
|
5164
5171
|
{
|
|
5165
|
-
className:
|
|
5172
|
+
className: p.cell,
|
|
5166
5173
|
style: {
|
|
5167
5174
|
width: e[b],
|
|
5168
5175
|
minWidth: e[b],
|
|
5169
5176
|
height: `${n}px`
|
|
5170
5177
|
},
|
|
5171
|
-
children:
|
|
5178
|
+
children: d(L)
|
|
5172
5179
|
},
|
|
5173
|
-
|
|
5180
|
+
ms(L) || b
|
|
5174
5181
|
))
|
|
5175
5182
|
]
|
|
5176
5183
|
}
|
|
@@ -5183,7 +5190,7 @@ const Dr = ({
|
|
|
5183
5190
|
x(),
|
|
5184
5191
|
w()
|
|
5185
5192
|
] });
|
|
5186
|
-
},
|
|
5193
|
+
}, gs = ({
|
|
5187
5194
|
label: r,
|
|
5188
5195
|
rowHeight: e = 28,
|
|
5189
5196
|
offsetTop: t = 0,
|
|
@@ -5228,11 +5235,11 @@ const Dr = ({
|
|
|
5228
5235
|
}
|
|
5229
5236
|
);
|
|
5230
5237
|
};
|
|
5231
|
-
function
|
|
5238
|
+
function ys(r, e) {
|
|
5232
5239
|
const t = new Set(r);
|
|
5233
5240
|
return t.has(e) ? t.delete(e) : t.add(e), t;
|
|
5234
5241
|
}
|
|
5235
|
-
function
|
|
5242
|
+
function vs(r, e) {
|
|
5236
5243
|
return r.map((t) => {
|
|
5237
5244
|
const n = e.find((s) => s.column === t.bindValue);
|
|
5238
5245
|
return {
|
|
@@ -5241,49 +5248,49 @@ function gs(r, e) {
|
|
|
5241
5248
|
};
|
|
5242
5249
|
});
|
|
5243
5250
|
}
|
|
5244
|
-
function
|
|
5251
|
+
function bs(r, e, t, n) {
|
|
5245
5252
|
const s = [];
|
|
5246
5253
|
let a = 0;
|
|
5247
5254
|
return i(r, 0, []), { flatRows: s, offset: a };
|
|
5248
|
-
function i(l,
|
|
5249
|
-
if (
|
|
5250
|
-
|
|
5255
|
+
function i(l, p, d) {
|
|
5256
|
+
if (p >= e.length) {
|
|
5257
|
+
f(l);
|
|
5251
5258
|
return;
|
|
5252
5259
|
}
|
|
5253
|
-
const m = e[
|
|
5260
|
+
const m = e[p].column, g = o(l, m);
|
|
5254
5261
|
for (const [x, w] of g) {
|
|
5255
|
-
const E = [...
|
|
5256
|
-
s.push(c(x, O,
|
|
5262
|
+
const E = [...d, x], O = u(E, p), S = n.has(O);
|
|
5263
|
+
s.push(c(x, O, p, S)), a += t, S && i(w, p + 1, E);
|
|
5257
5264
|
}
|
|
5258
5265
|
}
|
|
5259
|
-
function o(l,
|
|
5266
|
+
function o(l, p) {
|
|
5260
5267
|
var m;
|
|
5261
|
-
const
|
|
5268
|
+
const d = /* @__PURE__ */ new Map();
|
|
5262
5269
|
for (const g of l) {
|
|
5263
|
-
const x = ((m = g.cells[
|
|
5264
|
-
|
|
5270
|
+
const x = ((m = g.cells[p]) == null ? void 0 : m.decode) ?? "N/D";
|
|
5271
|
+
d.has(x) || d.set(x, []), d.get(x).push(g);
|
|
5265
5272
|
}
|
|
5266
|
-
return
|
|
5273
|
+
return d;
|
|
5267
5274
|
}
|
|
5268
|
-
function
|
|
5269
|
-
return `group-${l.join("-")}-${
|
|
5275
|
+
function u(l, p) {
|
|
5276
|
+
return `group-${l.join("-")}-${p}`;
|
|
5270
5277
|
}
|
|
5271
|
-
function c(l,
|
|
5278
|
+
function c(l, p, d, m) {
|
|
5272
5279
|
return {
|
|
5273
5280
|
isGroup: !0,
|
|
5274
5281
|
value: l,
|
|
5275
5282
|
cells: {},
|
|
5276
|
-
rowId:
|
|
5277
|
-
level:
|
|
5283
|
+
rowId: p,
|
|
5284
|
+
level: d,
|
|
5278
5285
|
isExpanded: m
|
|
5279
5286
|
};
|
|
5280
5287
|
}
|
|
5281
|
-
function
|
|
5282
|
-
for (const
|
|
5283
|
-
s.push(
|
|
5288
|
+
function f(l) {
|
|
5289
|
+
for (const p of l)
|
|
5290
|
+
s.push(p), a += t;
|
|
5284
5291
|
}
|
|
5285
5292
|
}
|
|
5286
|
-
const
|
|
5293
|
+
const xs = ({
|
|
5287
5294
|
groups: r = [],
|
|
5288
5295
|
isDraggable: e = !0,
|
|
5289
5296
|
isEditable: t = !0,
|
|
@@ -5317,7 +5324,7 @@ const vs = ({
|
|
|
5317
5324
|
]
|
|
5318
5325
|
}
|
|
5319
5326
|
);
|
|
5320
|
-
},
|
|
5327
|
+
}, Cs = ({
|
|
5321
5328
|
data: r,
|
|
5322
5329
|
lineHeight: e = 28,
|
|
5323
5330
|
TableHeight: t = 400,
|
|
@@ -5326,10 +5333,10 @@ const vs = ({
|
|
|
5326
5333
|
showGroupBar: a = !0
|
|
5327
5334
|
}) => {
|
|
5328
5335
|
var Y;
|
|
5329
|
-
const [i, o] = Z(r), [
|
|
5336
|
+
const [i, o] = Z(r), [u, c] = Z(n || []), [f, l] = Z(/* @__PURE__ */ new Set()), p = i && i.columns ? Object.fromEntries(
|
|
5330
5337
|
i.columns.map((j) => [j.name, 120])
|
|
5331
5338
|
// ADD col.width to manage existing col width
|
|
5332
|
-
) : {}, [
|
|
5339
|
+
) : {}, [d, m] = Z(p), g = ve(null);
|
|
5333
5340
|
oe(() => {
|
|
5334
5341
|
var D;
|
|
5335
5342
|
if (!i || !i.columns || i.columns.length)
|
|
@@ -5370,25 +5377,25 @@ const vs = ({
|
|
|
5370
5377
|
}
|
|
5371
5378
|
m(P);
|
|
5372
5379
|
}, [s, r, i]), oe(() => {
|
|
5373
|
-
if (
|
|
5374
|
-
const { flatRows: j } =
|
|
5380
|
+
if (u != null && u.length && r.rows) {
|
|
5381
|
+
const { flatRows: j } = bs(
|
|
5375
5382
|
r.rows,
|
|
5376
|
-
|
|
5383
|
+
u,
|
|
5377
5384
|
e,
|
|
5378
|
-
|
|
5385
|
+
f
|
|
5379
5386
|
);
|
|
5380
5387
|
o({ ...r, rows: j });
|
|
5381
5388
|
} else
|
|
5382
5389
|
o(r);
|
|
5383
|
-
}, [r,
|
|
5390
|
+
}, [r, u, f, e]);
|
|
5384
5391
|
const x = (j) => {
|
|
5385
|
-
c(
|
|
5392
|
+
c(vs(j, u));
|
|
5386
5393
|
}, w = (j) => {
|
|
5387
5394
|
j.preventDefault();
|
|
5388
5395
|
const P = j.dataTransfer.getData("text/plain");
|
|
5389
|
-
if (!P ||
|
|
5396
|
+
if (!P || u.some((U) => U.column === P))
|
|
5390
5397
|
return;
|
|
5391
|
-
const k = [...
|
|
5398
|
+
const k = [...u, { column: P, visible: !0 }];
|
|
5392
5399
|
c(k);
|
|
5393
5400
|
}, E = (j) => {
|
|
5394
5401
|
j.preventDefault();
|
|
@@ -5398,7 +5405,7 @@ const vs = ({
|
|
|
5398
5405
|
containerHeight: t,
|
|
5399
5406
|
overscan: 5
|
|
5400
5407
|
}), L = (j, P) => {
|
|
5401
|
-
const D = j.clientX, k =
|
|
5408
|
+
const D = j.clientX, k = d[P], U = (z) => {
|
|
5402
5409
|
const K = z.clientX - D, J = Math.max(50, k + K);
|
|
5403
5410
|
m((W) => ({
|
|
5404
5411
|
...W,
|
|
@@ -5422,9 +5429,9 @@ const vs = ({
|
|
|
5422
5429
|
children: /* @__PURE__ */ v.jsxs("table", { children: [
|
|
5423
5430
|
/* @__PURE__ */ v.jsxs("thead", { children: [
|
|
5424
5431
|
(n || a) && /* @__PURE__ */ v.jsx(
|
|
5425
|
-
|
|
5432
|
+
xs,
|
|
5426
5433
|
{
|
|
5427
|
-
groups:
|
|
5434
|
+
groups: u,
|
|
5428
5435
|
onChange: x,
|
|
5429
5436
|
onDrop: w,
|
|
5430
5437
|
onDragOver: E
|
|
@@ -5440,9 +5447,9 @@ const vs = ({
|
|
|
5440
5447
|
P.dataTransfer.setData("text/plain", j.name);
|
|
5441
5448
|
},
|
|
5442
5449
|
style: {
|
|
5443
|
-
width:
|
|
5444
|
-
minWidth:
|
|
5445
|
-
maxWidth:
|
|
5450
|
+
width: d[j.name],
|
|
5451
|
+
minWidth: d[j.name],
|
|
5452
|
+
maxWidth: d[j.name]
|
|
5446
5453
|
},
|
|
5447
5454
|
children: [
|
|
5448
5455
|
/* @__PURE__ */ v.jsx(
|
|
@@ -5468,7 +5475,7 @@ const vs = ({
|
|
|
5468
5475
|
] }),
|
|
5469
5476
|
/* @__PURE__ */ v.jsx("tbody", { ...b, children: O.map(
|
|
5470
5477
|
({ item: j, index: P, offsetTop: D }) => j.isGroup ? /* @__PURE__ */ v.jsx(
|
|
5471
|
-
|
|
5478
|
+
gs,
|
|
5472
5479
|
{
|
|
5473
5480
|
label: j.value || "",
|
|
5474
5481
|
rowHeight: e,
|
|
@@ -5476,7 +5483,7 @@ const vs = ({
|
|
|
5476
5483
|
level: j.level,
|
|
5477
5484
|
onClick: () => {
|
|
5478
5485
|
const k = j.rowId;
|
|
5479
|
-
k && l((U) =>
|
|
5486
|
+
k && l((U) => ys(U, k));
|
|
5480
5487
|
},
|
|
5481
5488
|
isExpanded: j.isExpanded
|
|
5482
5489
|
},
|
|
@@ -5485,7 +5492,7 @@ const vs = ({
|
|
|
5485
5492
|
Dr,
|
|
5486
5493
|
{
|
|
5487
5494
|
row: j,
|
|
5488
|
-
columnWidths:
|
|
5495
|
+
columnWidths: d,
|
|
5489
5496
|
rowHeight: e,
|
|
5490
5497
|
offsetTop: D,
|
|
5491
5498
|
isGroup: !1
|
|
@@ -5497,7 +5504,7 @@ const vs = ({
|
|
|
5497
5504
|
] })
|
|
5498
5505
|
}
|
|
5499
5506
|
);
|
|
5500
|
-
},
|
|
5507
|
+
}, Ps = ({
|
|
5501
5508
|
data: r,
|
|
5502
5509
|
Type: e,
|
|
5503
5510
|
ShowSubmit: t = !1,
|
|
@@ -5506,10 +5513,10 @@ const vs = ({
|
|
|
5506
5513
|
Label: a,
|
|
5507
5514
|
LabelPosition: i = "Left",
|
|
5508
5515
|
onBlur: o,
|
|
5509
|
-
onClick:
|
|
5516
|
+
onClick: u,
|
|
5510
5517
|
onOptionsRequest: c
|
|
5511
5518
|
}) => {
|
|
5512
|
-
const [
|
|
5519
|
+
const [f, l] = Z();
|
|
5513
5520
|
oe(() => {
|
|
5514
5521
|
l(() => {
|
|
5515
5522
|
if (!r)
|
|
@@ -5518,13 +5525,13 @@ const vs = ({
|
|
|
5518
5525
|
return e && (g.shape = e), g.shape == null && (g.shape = ne.TEXT_FIELD), s && (g.obj = Nr(s)), g;
|
|
5519
5526
|
});
|
|
5520
5527
|
}, [r, s, e]);
|
|
5521
|
-
const
|
|
5528
|
+
const d = {
|
|
5522
5529
|
container: `smp-field-container ${ce(t) ? `smp-field-position-${n}` : ""}`
|
|
5523
5530
|
}, m = () => {
|
|
5524
|
-
ce(t) || o == null || o(
|
|
5531
|
+
ce(t) || o == null || o(f);
|
|
5525
5532
|
};
|
|
5526
|
-
if (
|
|
5527
|
-
return /* @__PURE__ */ v.jsxs("div", { className:
|
|
5533
|
+
if (f)
|
|
5534
|
+
return /* @__PURE__ */ v.jsxs("div", { className: d.container, children: [
|
|
5528
5535
|
/* @__PURE__ */ v.jsx(
|
|
5529
5536
|
"div",
|
|
5530
5537
|
{
|
|
@@ -5537,7 +5544,7 @@ const vs = ({
|
|
|
5537
5544
|
children: /* @__PURE__ */ v.jsx(
|
|
5538
5545
|
Ot,
|
|
5539
5546
|
{
|
|
5540
|
-
...
|
|
5547
|
+
...f,
|
|
5541
5548
|
onChange: l,
|
|
5542
5549
|
onOptionsRequest: c,
|
|
5543
5550
|
fun: r == null ? void 0 : r.fun,
|
|
@@ -5553,12 +5560,23 @@ const vs = ({
|
|
|
5553
5560
|
De,
|
|
5554
5561
|
{
|
|
5555
5562
|
optionalDisplayValue: "Confirm",
|
|
5556
|
-
onClick: () =>
|
|
5563
|
+
onClick: () => u == null ? void 0 : u(f),
|
|
5557
5564
|
bindValue: "Confirm"
|
|
5558
5565
|
}
|
|
5559
5566
|
)
|
|
5560
5567
|
] });
|
|
5561
|
-
},
|
|
5568
|
+
}, Ss = (r) => (r == null ? void 0 : r.type) === "SmeupDataTree", ws = (r) => (r == null ? void 0 : r.type) === "SmeupDataTable", Es = (r) => Ss(r) ? r.children ? r.children.map(
|
|
5569
|
+
(e) => ({
|
|
5570
|
+
id: e.obj.k,
|
|
5571
|
+
label: e.value ?? ""
|
|
5572
|
+
})
|
|
5573
|
+
) : [] : ws(r) ? r.rows.map((e) => {
|
|
5574
|
+
const t = e.cells || e.cells, [n, s] = Object.keys(t);
|
|
5575
|
+
return {
|
|
5576
|
+
id: t[n].obj.k,
|
|
5577
|
+
label: t[s].value || t[s].obj.k
|
|
5578
|
+
};
|
|
5579
|
+
}) : [], As = ({
|
|
5562
5580
|
data: r,
|
|
5563
5581
|
readOnly: e = !1,
|
|
5564
5582
|
hiddenSubmitButton: t = !1,
|
|
@@ -5567,19 +5585,19 @@ const vs = ({
|
|
|
5567
5585
|
}) => {
|
|
5568
5586
|
const [a, i] = Z({});
|
|
5569
5587
|
oe(() => {
|
|
5570
|
-
i(
|
|
5588
|
+
i(u(r));
|
|
5571
5589
|
}, [r]);
|
|
5572
5590
|
const o = () => {
|
|
5573
|
-
const
|
|
5591
|
+
const f = c();
|
|
5574
5592
|
s({
|
|
5575
|
-
value:
|
|
5593
|
+
value: f
|
|
5576
5594
|
});
|
|
5577
|
-
},
|
|
5578
|
-
var
|
|
5579
|
-
if (!((
|
|
5595
|
+
}, u = (f) => {
|
|
5596
|
+
var p, d, m;
|
|
5597
|
+
if (!((p = f.rows) != null && p.length) || !((d = f.columns) != null && d.length))
|
|
5580
5598
|
return {};
|
|
5581
|
-
const l = (m =
|
|
5582
|
-
return
|
|
5599
|
+
const l = (m = f.rows) == null ? void 0 : m[0];
|
|
5600
|
+
return f.columns.filter((g) => g.visible ?? !0).reduce((g, x) => {
|
|
5583
5601
|
const w = {
|
|
5584
5602
|
...l.cells[x.name],
|
|
5585
5603
|
label: x.title,
|
|
@@ -5597,29 +5615,25 @@ const vs = ({
|
|
|
5597
5615
|
}));
|
|
5598
5616
|
}
|
|
5599
5617
|
};
|
|
5600
|
-
return w.fun && (w.shape == ne.AUTOCOMPLETE || w.shape == ne.MULTI_AUTOCOMPLETE || w.shape == ne.COMBOBOX) && (w.onOptionsRequest = (E, O) =>
|
|
5618
|
+
return w.fun && (w.shape == ne.AUTOCOMPLETE || w.shape == ne.MULTI_AUTOCOMPLETE || w.shape == ne.COMBOBOX) && (w.onOptionsRequest = async (E, O) => Es(
|
|
5619
|
+
await n(E, O, r, x.name)
|
|
5620
|
+
)), w.isEditable == null && (w.isEditable = !0), e && (w.isEditable = !1), w.isEditable && w.shape == null && (w.shape = ne.TEXT_FIELD), {
|
|
5601
5621
|
...g,
|
|
5602
5622
|
[x.name]: w
|
|
5603
5623
|
};
|
|
5604
5624
|
}, {});
|
|
5605
|
-
}, c = () => {
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
};
|
|
5618
|
-
}), {
|
|
5619
|
-
before: r,
|
|
5620
|
-
after: u
|
|
5621
|
-
};
|
|
5622
|
-
};
|
|
5625
|
+
}, c = () => ({
|
|
5626
|
+
before: r,
|
|
5627
|
+
after: {
|
|
5628
|
+
type: "SmeupDataTable",
|
|
5629
|
+
columns: JSON.parse(JSON.stringify(r.columns)),
|
|
5630
|
+
rows: [
|
|
5631
|
+
{
|
|
5632
|
+
cells: JSON.parse(JSON.stringify(a))
|
|
5633
|
+
}
|
|
5634
|
+
]
|
|
5635
|
+
}
|
|
5636
|
+
});
|
|
5623
5637
|
return a && /* @__PURE__ */ v.jsxs(
|
|
5624
5638
|
"div",
|
|
5625
5639
|
{
|
|
@@ -5645,20 +5659,20 @@ const vs = ({
|
|
|
5645
5659
|
);
|
|
5646
5660
|
};
|
|
5647
5661
|
export {
|
|
5648
|
-
|
|
5662
|
+
js as AppBar,
|
|
5649
5663
|
Er as Autocomplete,
|
|
5650
5664
|
De as Button,
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5665
|
+
pn as ButtonList,
|
|
5666
|
+
hn as Checkbox,
|
|
5667
|
+
gn as Combobox,
|
|
5668
|
+
$s as DashList,
|
|
5669
|
+
Cs as DataTableComponent,
|
|
5670
|
+
Zn as DatePicker,
|
|
5671
|
+
Ds as Drawer,
|
|
5672
|
+
Ps as Field,
|
|
5659
5673
|
ue as Icon,
|
|
5660
|
-
|
|
5661
|
-
|
|
5674
|
+
As as InputPanel,
|
|
5675
|
+
es as Password,
|
|
5662
5676
|
Ce as Textfield,
|
|
5663
|
-
|
|
5677
|
+
Rs as configurePaths
|
|
5664
5678
|
};
|