alex-evo-sh-ui-kit 1.1.78 → 1.1.79
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ce, { useEffect as I, useState as k, useRef as U, useCallback as N, createContext as un, useContext as
|
|
1
|
+
import ce, { useEffect as I, useState as k, useRef as U, useCallback as N, createContext as un, useContext as Re, useMemo as ge, forwardRef as Ee, useLayoutEffect as cr, useId as tt, memo as dr, useImperativeHandle as ur } from "react";
|
|
2
2
|
import hr from "react-dom";
|
|
3
3
|
import { NavLink as Sn } from "react-router-dom";
|
|
4
4
|
import './index.css';var wn = { exports: {} }, Ye = {};
|
|
@@ -17,17 +17,17 @@ function fr() {
|
|
|
17
17
|
return Ye;
|
|
18
18
|
Gn = 1;
|
|
19
19
|
var n = ce, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, i = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
20
|
-
function l
|
|
20
|
+
function c(l, a, d) {
|
|
21
21
|
var u, x = {}, f = null, m = null;
|
|
22
22
|
d !== void 0 && (f = "" + d), a.key !== void 0 && (f = "" + a.key), a.ref !== void 0 && (m = a.ref);
|
|
23
23
|
for (u in a)
|
|
24
24
|
s.call(a, u) && !o.hasOwnProperty(u) && (x[u] = a[u]);
|
|
25
|
-
if (
|
|
26
|
-
for (u in a =
|
|
25
|
+
if (l && l.defaultProps)
|
|
26
|
+
for (u in a = l.defaultProps, a)
|
|
27
27
|
x[u] === void 0 && (x[u] = a[u]);
|
|
28
|
-
return { $$typeof: t, type:
|
|
28
|
+
return { $$typeof: t, type: l, key: f, ref: m, props: x, _owner: i.current };
|
|
29
29
|
}
|
|
30
|
-
return Ye.Fragment = r, Ye.jsx =
|
|
30
|
+
return Ye.Fragment = r, Ye.jsx = c, Ye.jsxs = c, Ye;
|
|
31
31
|
}
|
|
32
32
|
var Ue = {};
|
|
33
33
|
/**
|
|
@@ -42,7 +42,7 @@ var Ue = {};
|
|
|
42
42
|
var Zn;
|
|
43
43
|
function xr() {
|
|
44
44
|
return Zn || (Zn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
45
|
-
var n = ce, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"),
|
|
45
|
+
var n = ce, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), _ = Symbol.iterator, j = "@@iterator";
|
|
46
46
|
function p(h) {
|
|
47
47
|
if (h === null || typeof h != "object")
|
|
48
48
|
return null;
|
|
@@ -70,7 +70,7 @@ function xr() {
|
|
|
70
70
|
var v = !1, M = !1, R = !1, A = !1, z = !1, L;
|
|
71
71
|
L = Symbol.for("react.module.reference");
|
|
72
72
|
function P(h) {
|
|
73
|
-
return !!(typeof h == "string" || typeof h == "function" || h === s || h === o || z || h === i || h === d || h === u || A || h === m || v || M || R || typeof h == "object" && h !== null && (h.$$typeof === f || h.$$typeof === x || h.$$typeof ===
|
|
73
|
+
return !!(typeof h == "string" || typeof h == "function" || h === s || h === o || z || h === i || h === d || h === u || A || h === m || v || M || R || typeof h == "object" && h !== null && (h.$$typeof === f || h.$$typeof === x || h.$$typeof === c || h.$$typeof === l || h.$$typeof === a || // This needs to include all possible module reference object
|
|
74
74
|
// types supported by any Flight configuration anywhere since
|
|
75
75
|
// we don't know which Flight build this will end up being used
|
|
76
76
|
// with.
|
|
@@ -109,10 +109,10 @@ function xr() {
|
|
|
109
109
|
}
|
|
110
110
|
if (typeof h == "object")
|
|
111
111
|
switch (h.$$typeof) {
|
|
112
|
-
case
|
|
112
|
+
case l:
|
|
113
113
|
var b = h;
|
|
114
114
|
return H(b) + ".Consumer";
|
|
115
|
-
case
|
|
115
|
+
case c:
|
|
116
116
|
var S = h;
|
|
117
117
|
return H(S._context) + ".Provider";
|
|
118
118
|
case a:
|
|
@@ -280,8 +280,8 @@ function xr() {
|
|
|
280
280
|
} finally {
|
|
281
281
|
D = !1, fe.current = ee, re(), Error.prepareStackTrace = J;
|
|
282
282
|
}
|
|
283
|
-
var Ae = h ? h.displayName || h.name : "",
|
|
284
|
-
return typeof h == "function" && W.set(h,
|
|
283
|
+
var Ae = h ? h.displayName || h.name : "", Oe = Ae ? we(Ae) : "";
|
|
284
|
+
return typeof h == "function" && W.set(h, Oe), Oe;
|
|
285
285
|
}
|
|
286
286
|
function Y(h, b, S) {
|
|
287
287
|
return Ce(h, !1);
|
|
@@ -319,7 +319,7 @@ function xr() {
|
|
|
319
319
|
}
|
|
320
320
|
return "";
|
|
321
321
|
}
|
|
322
|
-
var
|
|
322
|
+
var Ve = Object.prototype.hasOwnProperty, nn = {}, tn = C.ReactDebugCurrentFrame;
|
|
323
323
|
function le(h) {
|
|
324
324
|
if (h) {
|
|
325
325
|
var b = h._owner, S = De(h.type, h._source, b ? b.type : null);
|
|
@@ -329,7 +329,7 @@ function xr() {
|
|
|
329
329
|
}
|
|
330
330
|
function jn(h, b, S, V, J) {
|
|
331
331
|
{
|
|
332
|
-
var ee = Function.call.bind(
|
|
332
|
+
var ee = Function.call.bind(Ve);
|
|
333
333
|
for (var Z in h)
|
|
334
334
|
if (ee(h, Z)) {
|
|
335
335
|
var G = void 0;
|
|
@@ -347,7 +347,7 @@ function xr() {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
var pn = Array.isArray;
|
|
350
|
-
function
|
|
350
|
+
function Te(h) {
|
|
351
351
|
return pn(h);
|
|
352
352
|
}
|
|
353
353
|
function Wt(h) {
|
|
@@ -378,7 +378,7 @@ function xr() {
|
|
|
378
378
|
}, On, Dn, Cn;
|
|
379
379
|
Cn = {};
|
|
380
380
|
function Zt(h) {
|
|
381
|
-
if (
|
|
381
|
+
if (Ve.call(h, "ref")) {
|
|
382
382
|
var b = Object.getOwnPropertyDescriptor(h, "ref").get;
|
|
383
383
|
if (b && b.isReactWarning)
|
|
384
384
|
return !1;
|
|
@@ -386,7 +386,7 @@ function xr() {
|
|
|
386
386
|
return h.ref !== void 0;
|
|
387
387
|
}
|
|
388
388
|
function Yt(h) {
|
|
389
|
-
if (
|
|
389
|
+
if (Ve.call(h, "key")) {
|
|
390
390
|
var b = Object.getOwnPropertyDescriptor(h, "key").get;
|
|
391
391
|
if (b && b.isReactWarning)
|
|
392
392
|
return !1;
|
|
@@ -455,7 +455,7 @@ function xr() {
|
|
|
455
455
|
var ee, Z = {}, G = null, de = null;
|
|
456
456
|
S !== void 0 && (Tn(S), G = "" + S), Yt(b) && (Tn(b.key), G = "" + b.key), Zt(b) && (de = b.ref, Ut(b, J));
|
|
457
457
|
for (ee in b)
|
|
458
|
-
|
|
458
|
+
Ve.call(b, ee) && !Gt.hasOwnProperty(ee) && (Z[ee] = b[ee]);
|
|
459
459
|
if (h && h.defaultProps) {
|
|
460
460
|
var se = h.defaultProps;
|
|
461
461
|
for (ee in se)
|
|
@@ -534,7 +534,7 @@ Check the top-level render call using <` + S + ">.");
|
|
|
534
534
|
{
|
|
535
535
|
if (typeof h != "object")
|
|
536
536
|
return;
|
|
537
|
-
if (
|
|
537
|
+
if (Te(h))
|
|
538
538
|
for (var S = 0; S < h.length; S++) {
|
|
539
539
|
var V = h[S];
|
|
540
540
|
gn(V) && Bn(V, b);
|
|
@@ -596,7 +596,7 @@ Check the top-level render call using <` + S + ">.");
|
|
|
596
596
|
var de = Qt(J);
|
|
597
597
|
de ? G += de : G += An();
|
|
598
598
|
var se;
|
|
599
|
-
h === null ? se = "null" :
|
|
599
|
+
h === null ? se = "null" : Te(h) ? se = "array" : h !== void 0 && h.$$typeof === t ? (se = "<" + (y(h.type) || "Unknown") + " />", G = " Did you accidentally export a JSX literal instead of a component?") : se = typeof h, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", se, G);
|
|
600
600
|
}
|
|
601
601
|
var ie = qt(h, b, S, J, ee);
|
|
602
602
|
if (ie == null)
|
|
@@ -605,7 +605,7 @@ Check the top-level render call using <` + S + ">.");
|
|
|
605
605
|
var xe = b.children;
|
|
606
606
|
if (xe !== void 0)
|
|
607
607
|
if (V)
|
|
608
|
-
if (
|
|
608
|
+
if (Te(xe)) {
|
|
609
609
|
for (var Ae = 0; Ae < xe.length; Ae++)
|
|
610
610
|
Hn(xe[Ae], h);
|
|
611
611
|
Object.freeze && Object.freeze(xe);
|
|
@@ -614,18 +614,18 @@ Check the top-level render call using <` + S + ">.");
|
|
|
614
614
|
else
|
|
615
615
|
Hn(xe, h);
|
|
616
616
|
}
|
|
617
|
-
if (
|
|
618
|
-
var
|
|
617
|
+
if (Ve.call(b, "key")) {
|
|
618
|
+
var Oe = y(h), he = Object.keys(b).filter(function(lr) {
|
|
619
619
|
return lr !== "key";
|
|
620
620
|
}), bn = he.length > 0 ? "{key: someKey, " + he.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
621
|
-
if (!Wn[
|
|
621
|
+
if (!Wn[Oe + bn]) {
|
|
622
622
|
var ar = he.length > 0 ? "{" + he.join(": ..., ") + ": ...}" : "{}";
|
|
623
623
|
g(`A props object containing a "key" prop is being spread into JSX:
|
|
624
624
|
let props = %s;
|
|
625
625
|
<%s {...props} />
|
|
626
626
|
React keys must be passed directly to JSX without using spread:
|
|
627
627
|
let props = %s;
|
|
628
|
-
<%s key={someKey} {...props} />`, bn,
|
|
628
|
+
<%s key={someKey} {...props} />`, bn, Oe, ar, Oe), Wn[Oe + bn] = !0;
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
return h === s ? tr(ie) : nr(ie), ie;
|
|
@@ -672,8 +672,8 @@ const rt = (n) => /* @__PURE__ */ e.jsx(
|
|
|
672
672
|
t.onClick && t.onClick(i);
|
|
673
673
|
let o = document.createElement("span");
|
|
674
674
|
o.classList.add("btn-overlay");
|
|
675
|
-
let
|
|
676
|
-
o.style.left =
|
|
675
|
+
let c = i.pageX - i.currentTarget.offsetLeft, l = i.pageY - i.currentTarget.offsetTop;
|
|
676
|
+
o.style.left = c + "px", o.style.top = l + "px", i.currentTarget.appendChild(o), setTimeout(() => {
|
|
677
677
|
o.remove();
|
|
678
678
|
}, 500);
|
|
679
679
|
}, s = {
|
|
@@ -716,7 +716,7 @@ const hn = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
716
716
|
}
|
|
717
717
|
);
|
|
718
718
|
}, it = ({ bottom: n = 0, ...t }) => {
|
|
719
|
-
const [r, s] = k(!1), [i, o] = k(!0),
|
|
719
|
+
const [r, s] = k(!1), [i, o] = k(!0), c = U(null), l = N(() => {
|
|
720
720
|
s(!0), setTimeout(() => {
|
|
721
721
|
t.onHide(), s(!1), o(!0);
|
|
722
722
|
}, 200);
|
|
@@ -724,12 +724,12 @@ const hn = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
724
724
|
I(() => {
|
|
725
725
|
t.visible && o(!1);
|
|
726
726
|
}, [t.visible]), I(() => {
|
|
727
|
-
!t.visible && !i &&
|
|
728
|
-
}, [t.visible,
|
|
727
|
+
!t.visible && !i && l();
|
|
728
|
+
}, [t.visible, l, i]);
|
|
729
729
|
const a = N((f) => {
|
|
730
|
-
window.innerHeight - f.changedTouches[0].clientY <= 150 &&
|
|
731
|
-
}, [
|
|
732
|
-
window.innerHeight - f.clientY + 20 <= 150 &&
|
|
730
|
+
window.innerHeight - f.changedTouches[0].clientY <= 150 && l(), c.current && (c.current.style.height = `${window.innerHeight - f.changedTouches[0].clientY + 20 - n}px`);
|
|
731
|
+
}, [l]), d = (f) => {
|
|
732
|
+
window.innerHeight - f.clientY + 20 <= 150 && l(), c.current && (c.current.style.height = `${window.innerHeight - f.clientY + 20 - n}px`);
|
|
733
733
|
}, u = () => {
|
|
734
734
|
document.body.removeEventListener("mousemove", d), document.body.removeEventListener("mouseup", u);
|
|
735
735
|
}, x = () => {
|
|
@@ -737,7 +737,7 @@ const hn = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
737
737
|
};
|
|
738
738
|
return I(() => () => {
|
|
739
739
|
document.body.removeEventListener("mousemove", d), document.body.removeEventListener("mouseup", u);
|
|
740
|
-
}), i && !r || !t.children ? null : /* @__PURE__ */ e.jsx(hn, { onHide:
|
|
740
|
+
}), i && !r || !t.children ? null : /* @__PURE__ */ e.jsx(hn, { onHide: l, children: /* @__PURE__ */ e.jsxs("div", { ref: c, style: { paddingBottom: n }, className: `bottom-sheets ${r ? "bottom-sheets_hide" : "bottom-sheets_show"}`, children: [
|
|
741
741
|
/* @__PURE__ */ e.jsx("div", { role: "presentation", "data-testid": "bottom-sheet-handle", className: "bottom-sheets__handle", onMouseDown: x, onTouchMove: a, children: /* @__PURE__ */ e.jsx("span", {}) }),
|
|
742
742
|
/* @__PURE__ */ e.jsx("div", { className: "bottom-sheets__content", children: t.children })
|
|
743
743
|
] }) });
|
|
@@ -775,10 +775,10 @@ const ot = {
|
|
|
775
775
|
density: s = "normal",
|
|
776
776
|
children: i,
|
|
777
777
|
style: o,
|
|
778
|
-
className:
|
|
779
|
-
...
|
|
778
|
+
className: c = "",
|
|
779
|
+
...l
|
|
780
780
|
}) => {
|
|
781
|
-
const a =
|
|
781
|
+
const a = Re(Ge), d = a ? a.screen : t, u = n === "heading" || n === "title" || n === "title-2", x = u ? "h3" : "span", f = {
|
|
782
782
|
fontSize: at(n, d),
|
|
783
783
|
fontWeight: lt(n, r),
|
|
784
784
|
lineHeight: ct(n, s, d),
|
|
@@ -787,9 +787,9 @@ const ot = {
|
|
|
787
787
|
return /* @__PURE__ */ e.jsx(
|
|
788
788
|
x,
|
|
789
789
|
{
|
|
790
|
-
...
|
|
790
|
+
...l,
|
|
791
791
|
style: f,
|
|
792
|
-
className: `${m} ${
|
|
792
|
+
className: `${m} ${c}`,
|
|
793
793
|
children: i
|
|
794
794
|
}
|
|
795
795
|
);
|
|
@@ -802,17 +802,17 @@ const ye = ce.forwardRef(
|
|
|
802
802
|
transparent: s = !1,
|
|
803
803
|
size: i = "medium",
|
|
804
804
|
onClick: o,
|
|
805
|
-
onContextMenu:
|
|
806
|
-
disabled:
|
|
805
|
+
onContextMenu: c,
|
|
806
|
+
disabled: l = !1,
|
|
807
807
|
style: a,
|
|
808
808
|
rippleDisabled: d = !1,
|
|
809
809
|
...u
|
|
810
810
|
}, x) => {
|
|
811
811
|
const f = N(
|
|
812
812
|
(_) => {
|
|
813
|
-
|
|
813
|
+
l || (o == null || o(_), !d && m(_));
|
|
814
814
|
},
|
|
815
|
-
[o,
|
|
815
|
+
[o, l]
|
|
816
816
|
), m = (_) => {
|
|
817
817
|
const j = _.currentTarget, p = document.createElement("span"), C = Math.max(j.clientWidth, j.clientHeight), g = C / 2;
|
|
818
818
|
p.style.width = p.style.height = `${C}px`, p.style.left = `${_.clientX - j.getBoundingClientRect().left - g}px`, p.style.top = `${_.clientY - j.getBoundingClientRect().top - g}px`, p.classList.add("iconbutton-ripple");
|
|
@@ -829,9 +829,9 @@ const ye = ce.forwardRef(
|
|
|
829
829
|
},
|
|
830
830
|
className: `iconbutton iconbutton--${i} ${t}`,
|
|
831
831
|
onClick: f,
|
|
832
|
-
onContextMenu:
|
|
833
|
-
disabled:
|
|
834
|
-
"aria-disabled":
|
|
832
|
+
onContextMenu: c,
|
|
833
|
+
disabled: l,
|
|
834
|
+
"aria-disabled": l,
|
|
835
835
|
...u,
|
|
836
836
|
children: /* @__PURE__ */ e.jsx("div", { className: `iconbutton-container ${r}`, children: n })
|
|
837
837
|
}
|
|
@@ -839,7 +839,7 @@ const ye = ce.forwardRef(
|
|
|
839
839
|
}
|
|
840
840
|
);
|
|
841
841
|
ye.displayName = "IconButton";
|
|
842
|
-
const E = ce.forwardRef(({ className: n, onClick: t, children: r, dpi: s = "24", size: i, primaryColor: o, secondaryColor:
|
|
842
|
+
const E = ce.forwardRef(({ className: n, onClick: t, children: r, dpi: s = "24", size: i, primaryColor: o, secondaryColor: c, tertiaryColor: l, baseColor: a, ...d }, u) => /* @__PURE__ */ e.jsx(
|
|
843
843
|
"svg",
|
|
844
844
|
{
|
|
845
845
|
role: d.role,
|
|
@@ -2154,8 +2154,8 @@ const dt = (n) => /* @__PURE__ */ e.jsx(E, { ...n, className: `${n.className} ic
|
|
|
2154
2154
|
action: s,
|
|
2155
2155
|
onHide: i,
|
|
2156
2156
|
style: o,
|
|
2157
|
-
clearStyle:
|
|
2158
|
-
disableBackplate:
|
|
2157
|
+
clearStyle: c = !1,
|
|
2158
|
+
disableBackplate: l,
|
|
2159
2159
|
marginBottom: a,
|
|
2160
2160
|
maxWidth: d = "560px",
|
|
2161
2161
|
showCloseButton: u = !1,
|
|
@@ -2172,12 +2172,12 @@ const dt = (n) => /* @__PURE__ */ e.jsx(E, { ...n, className: `${n.className} ic
|
|
|
2172
2172
|
hn,
|
|
2173
2173
|
{
|
|
2174
2174
|
onHide: f,
|
|
2175
|
-
disableBackplate:
|
|
2175
|
+
disableBackplate: l,
|
|
2176
2176
|
children: /* @__PURE__ */ e.jsxs(
|
|
2177
2177
|
"div",
|
|
2178
2178
|
{
|
|
2179
2179
|
style: m,
|
|
2180
|
-
className: `${
|
|
2180
|
+
className: `${c ? "" : "dialog-template__container dialog-template_base dialog-template_color_surface-container"} dialog-template ${n}`,
|
|
2181
2181
|
role: "dialog",
|
|
2182
2182
|
"aria-modal": "true",
|
|
2183
2183
|
"aria-label": x || r,
|
|
@@ -2208,11 +2208,11 @@ const qe = ({
|
|
|
2208
2208
|
forceModal: r = !1,
|
|
2209
2209
|
...s
|
|
2210
2210
|
}) => {
|
|
2211
|
-
const { screen: i } =
|
|
2211
|
+
const { screen: i } = Re(Ge);
|
|
2212
2212
|
st(!0, document.body);
|
|
2213
2213
|
const o = () => {
|
|
2214
|
-
var
|
|
2215
|
-
(
|
|
2214
|
+
var l;
|
|
2215
|
+
(l = s.onHide) == null || l.call(s);
|
|
2216
2216
|
};
|
|
2217
2217
|
return t || !r && i === ae.MOBILE ? /* @__PURE__ */ e.jsx(
|
|
2218
2218
|
it,
|
|
@@ -2262,18 +2262,18 @@ const qe = ({
|
|
|
2262
2262
|
actionText: s,
|
|
2263
2263
|
cancelText: i = "Отмена",
|
|
2264
2264
|
onSuccess: o,
|
|
2265
|
-
onCancel:
|
|
2266
|
-
onHide:
|
|
2265
|
+
onCancel: c,
|
|
2266
|
+
onHide: l,
|
|
2267
2267
|
children: a,
|
|
2268
2268
|
disableDefaultButtons: d = !1,
|
|
2269
2269
|
customActions: u,
|
|
2270
2270
|
btns: x
|
|
2271
2271
|
}) => {
|
|
2272
2272
|
const f = N(() => {
|
|
2273
|
-
o == null || o(),
|
|
2274
|
-
}, [o,
|
|
2275
|
-
|
|
2276
|
-
}, [
|
|
2273
|
+
o == null || o(), l == null || l();
|
|
2274
|
+
}, [o, l]), m = N(() => {
|
|
2275
|
+
c == null || c(), l == null || l();
|
|
2276
|
+
}, [c, l]), _ = N(() => u || (d ? null : x ? /* @__PURE__ */ e.jsx(dn, { onHide: m, onSuccess: f, btns: x }) : /* @__PURE__ */ e.jsx(dn, { onHide: m, onSuccess: f, btns: [
|
|
2277
2277
|
{
|
|
2278
2278
|
text: i,
|
|
2279
2279
|
hide: !0,
|
|
@@ -2297,11 +2297,14 @@ const qe = ({
|
|
|
2297
2297
|
]
|
|
2298
2298
|
}
|
|
2299
2299
|
);
|
|
2300
|
-
},
|
|
2301
|
-
|
|
2300
|
+
}, $e = ({ children: n, container: t = document.body }) => t ? hr.createPortal(
|
|
2301
|
+
n,
|
|
2302
|
+
t
|
|
2303
|
+
) : /* @__PURE__ */ e.jsx("p", { children: "container not found" }), Ur = ({ container: n, text: t, header: r, onClick: s, styleType: i, ...o }) => {
|
|
2304
|
+
const [c, l] = k(null);
|
|
2302
2305
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2303
|
-
/* @__PURE__ */ e.jsx(We, { styleType:
|
|
2304
|
-
|
|
2306
|
+
/* @__PURE__ */ e.jsx(We, { styleType: i ?? "filled", ...o, onClick: l }),
|
|
2307
|
+
c !== null && /* @__PURE__ */ e.jsx($e, { container: n, children: /* @__PURE__ */ e.jsx(Yr, { header: r, text: t, onSuccess: () => s == null ? void 0 : s(c), onHide: () => l(null) }) })
|
|
2305
2308
|
] });
|
|
2306
2309
|
};
|
|
2307
2310
|
const Yn = ({
|
|
@@ -2311,9 +2314,9 @@ const Yn = ({
|
|
|
2311
2314
|
className: s = "",
|
|
2312
2315
|
onClick: i,
|
|
2313
2316
|
disabled: o,
|
|
2314
|
-
...
|
|
2317
|
+
...c
|
|
2315
2318
|
}) => {
|
|
2316
|
-
const [
|
|
2319
|
+
const [l, a] = k(!1), d = N(async (f) => {
|
|
2317
2320
|
if (!o) {
|
|
2318
2321
|
try {
|
|
2319
2322
|
await navigator.clipboard.writeText(n), a(!0), setTimeout(() => a(!1), r);
|
|
@@ -2322,7 +2325,7 @@ const Yn = ({
|
|
|
2322
2325
|
}
|
|
2323
2326
|
i == null || i(f);
|
|
2324
2327
|
}
|
|
2325
|
-
}, [n, o, r, i]), u =
|
|
2328
|
+
}, [n, o, r, i]), u = l ? /* @__PURE__ */ e.jsx(Le, { "aria-hidden": "true" }) : /* @__PURE__ */ e.jsx(_t, { "aria-hidden": "true" }), x = l ? "Скопировано!" : "Копировать";
|
|
2326
2329
|
return t ? /* @__PURE__ */ e.jsxs("div", { className: "copy-button", children: [
|
|
2327
2330
|
/* @__PURE__ */ e.jsx(
|
|
2328
2331
|
ye,
|
|
@@ -2332,7 +2335,7 @@ const Yn = ({
|
|
|
2332
2335
|
disabled: o,
|
|
2333
2336
|
"aria-label": `${x} ${n}`,
|
|
2334
2337
|
className: s,
|
|
2335
|
-
...
|
|
2338
|
+
...c
|
|
2336
2339
|
}
|
|
2337
2340
|
),
|
|
2338
2341
|
/* @__PURE__ */ e.jsx(K, { type: "body", "aria-live": "polite", children: x })
|
|
@@ -2344,7 +2347,7 @@ const Yn = ({
|
|
|
2344
2347
|
disabled: o,
|
|
2345
2348
|
"aria-label": `${x} ${n}`,
|
|
2346
2349
|
className: s,
|
|
2347
|
-
...
|
|
2350
|
+
...c
|
|
2348
2351
|
}
|
|
2349
2352
|
);
|
|
2350
2353
|
};
|
|
@@ -2363,7 +2366,7 @@ const Kr = ({ valueDisplayDuration: n = 2e3 }) => {
|
|
|
2363
2366
|
/* CLOSE */
|
|
2364
2367
|
);
|
|
2365
2368
|
}, 500);
|
|
2366
|
-
},
|
|
2369
|
+
}, c = () => {
|
|
2367
2370
|
r(
|
|
2368
2371
|
0
|
|
2369
2372
|
/* OPEN */
|
|
@@ -2374,7 +2377,7 @@ const Kr = ({ valueDisplayDuration: n = 2e3 }) => {
|
|
|
2374
2377
|
return I(() => () => {
|
|
2375
2378
|
s.current && window.clearTimeout(s.current), i.current && window.clearTimeout(i.current);
|
|
2376
2379
|
}, []), {
|
|
2377
|
-
showPopup:
|
|
2380
|
+
showPopup: c,
|
|
2378
2381
|
popupState: t,
|
|
2379
2382
|
hidePopup: o
|
|
2380
2383
|
};
|
|
@@ -2403,8 +2406,8 @@ function Ni(n, t, r) {
|
|
|
2403
2406
|
return s != 0 && (s == 1 ? t = 0 : s < 0.5 ? t = t * r / (s * 2) : t = t * r / (2 - s * 2)), { h: n, s: t, l: s };
|
|
2404
2407
|
}
|
|
2405
2408
|
function Ke(n, t, r) {
|
|
2406
|
-
var s, i, o,
|
|
2407
|
-
switch (arguments.length === 1 && (t = n.s, r = n.v, n = n.h),
|
|
2409
|
+
var s, i, o, c, l, a, d, u;
|
|
2410
|
+
switch (arguments.length === 1 && (t = n.s, r = n.v, n = n.h), c = Math.floor(n * 6), l = n * 6 - c, a = r * (1 - t), d = r * (1 - l * t), u = r * (1 - (1 - l) * t), c % 6) {
|
|
2408
2411
|
case 0:
|
|
2409
2412
|
s = r, i = u, o = a;
|
|
2410
2413
|
break;
|
|
@@ -2439,31 +2442,31 @@ function He(n, t = !1) {
|
|
|
2439
2442
|
}
|
|
2440
2443
|
function an(n, t, r) {
|
|
2441
2444
|
arguments.length === 1 && (t = n.g, r = n.b, n = n.r);
|
|
2442
|
-
var s = Math.max(n, t, r), i = Math.min(n, t, r), o = s - i,
|
|
2445
|
+
var s = Math.max(n, t, r), i = Math.min(n, t, r), o = s - i, c, l = s === 0 ? 0 : o / s, a = s / 255;
|
|
2443
2446
|
switch (s) {
|
|
2444
2447
|
case i:
|
|
2445
|
-
|
|
2448
|
+
c = 0;
|
|
2446
2449
|
break;
|
|
2447
2450
|
case n:
|
|
2448
|
-
|
|
2451
|
+
c = t - r + o * (t < r ? 6 : 0), c /= 6 * o;
|
|
2449
2452
|
break;
|
|
2450
2453
|
case t:
|
|
2451
|
-
|
|
2454
|
+
c = r - n + o * 2, c /= 6 * o;
|
|
2452
2455
|
break;
|
|
2453
2456
|
case r:
|
|
2454
|
-
|
|
2457
|
+
c = n - t + o * 4, c /= 6 * o;
|
|
2455
2458
|
break;
|
|
2456
2459
|
}
|
|
2457
2460
|
return {
|
|
2458
|
-
h:
|
|
2459
|
-
s:
|
|
2461
|
+
h: c,
|
|
2462
|
+
s: l,
|
|
2460
2463
|
v: a
|
|
2461
2464
|
};
|
|
2462
2465
|
}
|
|
2463
2466
|
function ze(n) {
|
|
2464
2467
|
var t = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
2465
|
-
n = n.replace(t, function(s, i, o,
|
|
2466
|
-
return i + i + o + o +
|
|
2468
|
+
n = n.replace(t, function(s, i, o, c) {
|
|
2469
|
+
return i + i + o + o + c + c;
|
|
2467
2470
|
});
|
|
2468
2471
|
var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);
|
|
2469
2472
|
return r ? {
|
|
@@ -2483,25 +2486,25 @@ function yt(n, t, r) {
|
|
|
2483
2486
|
return r ?? "#e0e0e0";
|
|
2484
2487
|
if (n === 1)
|
|
2485
2488
|
return t;
|
|
2486
|
-
const s = r ? ze(r) : null, i = (s == null ? void 0 : s.r) ?? 224, o = (s == null ? void 0 : s.g) ?? 224,
|
|
2489
|
+
const s = r ? ze(r) : null, i = (s == null ? void 0 : s.r) ?? 224, o = (s == null ? void 0 : s.g) ?? 224, c = (s == null ? void 0 : s.b) ?? 224, l = parseInt(t.substring(1, 3), 16), a = parseInt(t.substring(3, 5), 16), d = parseInt(t.substring(5, 7), 16), u = Math.round(i + n * (l - i)), x = Math.round(o + n * (a - o)), f = Math.round(c + n * (d - c));
|
|
2487
2490
|
return `rgb(${u}, ${x}, ${f})`;
|
|
2488
2491
|
}
|
|
2489
2492
|
const ve = (n, t, r = "", s) => {
|
|
2490
|
-
let i, o,
|
|
2491
|
-
if (typeof n != "number" || n < -1 || n > 1 || typeof t != "string" || t[0] != "r" && t[0] != "#" || r && !f || (u = t.length > 9, u = f ? typeof r == "string" && r.length > 9 ? !0 : r == "c" ? !u : !1 : u, a = ve.pSBCr(t),
|
|
2493
|
+
let i, o, c, l, a, d, u, x = Math.round, f = typeof r == "string";
|
|
2494
|
+
if (typeof n != "number" || n < -1 || n > 1 || typeof t != "string" || t[0] != "r" && t[0] != "#" || r && !f || (u = t.length > 9, u = f ? typeof r == "string" && r.length > 9 ? !0 : r == "c" ? !u : !1 : u, a = ve.pSBCr(t), l = n < 0, d = r && typeof r == "string" && r != "c" ? ve.pSBCr(r) : l ? { r: 0, g: 0, b: 0, a: -1 } : { r: 255, g: 255, b: 255, a: -1 }, n = l ? n * -1 : n, l = 1 - n, !a || !d))
|
|
2492
2495
|
return null;
|
|
2493
|
-
s ? (i = x(
|
|
2496
|
+
s ? (i = x(l * (a.r ?? 0) + n * (d.r ?? 0)), o = x(l * (a.g ?? 0) + n * (d.g ?? 0)), c = x(l * (a.b ?? 0) + n * (d.b ?? 0))) : (i = x((l * (a.r ?? 0) ** 2 + n * (d.r ?? 0) ** 2) ** 0.5), o = x((l * (a.g ?? 0) ** 2 + n * (d.g ?? 0) ** 2) ** 0.5), c = x((l * (a.b ?? 0) ** 2 + n * (d.b ?? 0) ** 2) ** 0.5));
|
|
2494
2497
|
let m = a.a ?? 1;
|
|
2495
|
-
return d = d.a ?? 1, a = m >= 0 || d >= 0, m = m >= 0 || d >= 0 ? m < 0 ? d : d < 0 ? m : m *
|
|
2498
|
+
return d = d.a ?? 1, a = m >= 0 || d >= 0, m = m >= 0 || d >= 0 ? m < 0 ? d : d < 0 ? m : m * l + d * n : 0, u ? "rgb" + (a ? "a(" : "(") + i + "," + o + "," + c + (a ? "," + x(m * 1e3) / 1e3 : "") + ")" : "#" + (4294967296 + i * 16777216 + o * 65536 + c * 256 + (a ? x(m * 255) : 0)).toString(16).slice(1, a ? void 0 : -2);
|
|
2496
2499
|
};
|
|
2497
2500
|
ve.pSBCr = (n) => {
|
|
2498
2501
|
const t = parseInt;
|
|
2499
2502
|
let r = n.length, s = {};
|
|
2500
2503
|
if (r > 9) {
|
|
2501
|
-
const i = n.split(","), [o,
|
|
2504
|
+
const i = n.split(","), [o, c, l, a] = i;
|
|
2502
2505
|
if (r = i.length, r < 3 || r > 4)
|
|
2503
2506
|
return null;
|
|
2504
|
-
s.r = t(o[3] == "a" ? o.slice(5) : o.slice(4)), s.g = t(
|
|
2507
|
+
s.r = t(o[3] == "a" ? o.slice(5) : o.slice(4)), s.g = t(c), s.b = t(l), s.a = a ? parseFloat(a) : -1;
|
|
2505
2508
|
} else {
|
|
2506
2509
|
if (r == 8 || r == 6 || r < 4)
|
|
2507
2510
|
return null;
|
|
@@ -2603,7 +2606,7 @@ const kt = {
|
|
|
2603
2606
|
};
|
|
2604
2607
|
},
|
|
2605
2608
|
Surface_container_color: (n, t) => {
|
|
2606
|
-
const r = ve(t ? -0.2 : 0.2, n) ?? n, s = ve(t ? -0.4 : 0.4, n) ?? n, i = ve(t ? 0.2 : -0.2, n) ?? n, o = ve(t ? 0.4 : -0.4, n) ?? n,
|
|
2609
|
+
const r = ve(t ? -0.2 : 0.2, n) ?? n, s = ve(t ? -0.4 : 0.4, n) ?? n, i = ve(t ? 0.2 : -0.2, n) ?? n, o = ve(t ? 0.4 : -0.4, n) ?? n, c = ve(t ? -0.5 : 0.5, n) ?? n;
|
|
2607
2610
|
return {
|
|
2608
2611
|
Surface_container_color: n,
|
|
2609
2612
|
On_surface_color: me(n),
|
|
@@ -2611,7 +2614,7 @@ const kt = {
|
|
|
2611
2614
|
Surface_container_lowest_color: s,
|
|
2612
2615
|
Surface_container_high_color: i,
|
|
2613
2616
|
Surface_container_highest_color: o,
|
|
2614
|
-
Surface_container_hover_color:
|
|
2617
|
+
Surface_container_hover_color: c,
|
|
2615
2618
|
On_surface_variant_color: ve(t ? -0.6 : 0.4, me(n)) ?? me(n)
|
|
2616
2619
|
};
|
|
2617
2620
|
},
|
|
@@ -2621,7 +2624,7 @@ const kt = {
|
|
|
2621
2624
|
})
|
|
2622
2625
|
};
|
|
2623
2626
|
function Qr(n, t = !1) {
|
|
2624
|
-
const [r, s] = k({ ...kt, ...n }), [i, o] = k(t),
|
|
2627
|
+
const [r, s] = k({ ...kt, ...n }), [i, o] = k(t), c = N(
|
|
2625
2628
|
(a, d) => {
|
|
2626
2629
|
const u = qr[a];
|
|
2627
2630
|
if (!u)
|
|
@@ -2635,7 +2638,7 @@ function Qr(n, t = !1) {
|
|
|
2635
2638
|
);
|
|
2636
2639
|
return {
|
|
2637
2640
|
colors: r,
|
|
2638
|
-
setColor:
|
|
2641
|
+
setColor: c,
|
|
2639
2642
|
setReverse: (a) => o(a)
|
|
2640
2643
|
};
|
|
2641
2644
|
}
|
|
@@ -2682,14 +2685,14 @@ const es = {
|
|
|
2682
2685
|
function ts(n = "light") {
|
|
2683
2686
|
const [t, r] = k(
|
|
2684
2687
|
yn
|
|
2685
|
-
), [s, i] = k(n), { colors: o, setColor:
|
|
2688
|
+
), [s, i] = k(n), { colors: o, setColor: c, setReverse: l } = Qr(t[s].colors, t[s].reverse), a = N(
|
|
2686
2689
|
(m) => {
|
|
2687
2690
|
const _ = t[m].colors;
|
|
2688
2691
|
_ && (Object.entries(_).forEach(([j, p]) => {
|
|
2689
|
-
|
|
2690
|
-
}),
|
|
2692
|
+
c(j, p);
|
|
2693
|
+
}), l(t[m].reverse ?? !1), i(m));
|
|
2691
2694
|
},
|
|
2692
|
-
[t,
|
|
2695
|
+
[t, c]
|
|
2693
2696
|
);
|
|
2694
2697
|
I(() => {
|
|
2695
2698
|
a(s);
|
|
@@ -2755,8 +2758,8 @@ const Xe = () => {
|
|
|
2755
2758
|
min: s = 0,
|
|
2756
2759
|
max: i = 100,
|
|
2757
2760
|
step: o = 1,
|
|
2758
|
-
strokeWidth:
|
|
2759
|
-
value:
|
|
2761
|
+
strokeWidth: c = "40px",
|
|
2762
|
+
value: l,
|
|
2760
2763
|
orientation: a = "horizontal",
|
|
2761
2764
|
styleTrack: d = "base",
|
|
2762
2765
|
showValue: u = !0,
|
|
@@ -2766,7 +2769,7 @@ const Xe = () => {
|
|
|
2766
2769
|
className: _ = "",
|
|
2767
2770
|
...j
|
|
2768
2771
|
}) => {
|
|
2769
|
-
const p = U(null), C = U(null), [g, w] = k(
|
|
2772
|
+
const p = U(null), C = U(null), [g, w] = k(l ?? s), [v, M] = k("200px"), { colors: R } = Re(En), { showPopup: A, popupState: z } = Kr({ valueDisplayDuration: x }), L = n ?? R.Primary_color ?? "#0000ff";
|
|
2770
2773
|
I(() => {
|
|
2771
2774
|
var O;
|
|
2772
2775
|
if (a === "vertical" && ((O = C.current) != null && O.parentElement)) {
|
|
@@ -2780,8 +2783,8 @@ const Xe = () => {
|
|
|
2780
2783
|
return C.current.parentElement && Q.observe(C.current.parentElement), () => Q.disconnect();
|
|
2781
2784
|
}
|
|
2782
2785
|
}, [a]), I(() => {
|
|
2783
|
-
|
|
2784
|
-
}, [
|
|
2786
|
+
l !== void 0 && (w(l), P());
|
|
2787
|
+
}, [l]);
|
|
2785
2788
|
const P = N(() => {
|
|
2786
2789
|
u && A();
|
|
2787
2790
|
}, [A]), B = (O) => {
|
|
@@ -2795,22 +2798,22 @@ const Xe = () => {
|
|
|
2795
2798
|
[a === "vertical" ? "height" : "width"]: `${H}%`,
|
|
2796
2799
|
background: d === "point" ? "transperent" : d === "static-color" ? L : yt(H / 100, L, m)
|
|
2797
2800
|
}), [H, L, j.style, a, d]), F = ge(() => a === "vertical" ? {
|
|
2798
|
-
"--range-width":
|
|
2799
|
-
"--point-width": d === "point" ?
|
|
2801
|
+
"--range-width": c,
|
|
2802
|
+
"--point-width": d === "point" ? c : "6px",
|
|
2800
2803
|
"--point-opacity": d === "point" ? "1" : "0",
|
|
2801
2804
|
"--truck-color": L,
|
|
2802
2805
|
width: Un,
|
|
2803
2806
|
height: v,
|
|
2804
2807
|
...j.style
|
|
2805
2808
|
} : {
|
|
2806
|
-
"--range-width":
|
|
2807
|
-
"--point-width": d === "point" ?
|
|
2809
|
+
"--range-width": c,
|
|
2810
|
+
"--point-width": d === "point" ? c : "6px",
|
|
2808
2811
|
"--point-opacity": d === "point" ? "1" : "0",
|
|
2809
2812
|
"--truck-color": L,
|
|
2810
2813
|
width: "100%",
|
|
2811
2814
|
height: Un,
|
|
2812
2815
|
...j.style
|
|
2813
|
-
}, [a, v, j.style,
|
|
2816
|
+
}, [a, v, j.style, c, d, L]), $ = ge(() => a === "vertical" ? {
|
|
2814
2817
|
width: v
|
|
2815
2818
|
} : {
|
|
2816
2819
|
width: "100%"
|
|
@@ -2859,8 +2862,8 @@ const Xe = () => {
|
|
|
2859
2862
|
onChange: s,
|
|
2860
2863
|
onFocus: i,
|
|
2861
2864
|
onBlur: o,
|
|
2862
|
-
styleRange:
|
|
2863
|
-
styleTrack:
|
|
2865
|
+
styleRange: c = "circle",
|
|
2866
|
+
styleTrack: l = "base",
|
|
2864
2867
|
strokeWidth: a = 20,
|
|
2865
2868
|
radius: d = 100,
|
|
2866
2869
|
colorBg: u = "var(--Surface-container-color)",
|
|
@@ -2876,12 +2879,12 @@ const Xe = () => {
|
|
|
2876
2879
|
className: v,
|
|
2877
2880
|
startColor: M
|
|
2878
2881
|
}) => {
|
|
2879
|
-
const R = U(null), A = U(!1), z = d * 2, L = d * 2, P = Math.min(z, L), B = z / 2, H = L / 2, y = P / 2 - a / 2, F =
|
|
2882
|
+
const R = U(null), A = U(!1), z = d * 2, L = d * 2, P = Math.min(z, L), B = z / 2, H = L / 2, y = P / 2 - a / 2, F = l === "point" ? !1 : _, $ = l === "point" ? !0 : j, { colors: O } = Re(En), q = x ?? O.Primary_color ?? "#0000ff", Q = f ?? O.Primary_color ?? "#0000ff", [ne, X] = k(r);
|
|
2880
2883
|
I(() => {
|
|
2881
2884
|
r !== void 0 && X(r);
|
|
2882
2885
|
}, [r]);
|
|
2883
2886
|
const te = N(() => {
|
|
2884
|
-
switch (
|
|
2887
|
+
switch (c) {
|
|
2885
2888
|
case "semicircle":
|
|
2886
2889
|
return 180;
|
|
2887
2890
|
case "brokenCircle":
|
|
@@ -2889,7 +2892,7 @@ const Xe = () => {
|
|
|
2889
2892
|
default:
|
|
2890
2893
|
return 360;
|
|
2891
2894
|
}
|
|
2892
|
-
}, [
|
|
2895
|
+
}, [c]), ue = N(() => c === "semicircle" ? [y * Math.PI, y * Math.PI] : c === "brokenCircle" ? [y * Math.PI * 1.25, y * Math.PI * 1.5] : [y * Math.PI, y * Math.PI * 2], [c, y]), oe = ge(
|
|
2893
2896
|
() => t !== n ? (ne - n) / (t - n) * 100 : 0,
|
|
2894
2897
|
[ne, n, t]
|
|
2895
2898
|
), Me = N(() => {
|
|
@@ -2904,14 +2907,14 @@ const Xe = () => {
|
|
|
2904
2907
|
const Y = R.current.querySelector('[data-el="indicator"]');
|
|
2905
2908
|
if (Y) {
|
|
2906
2909
|
const _e = parseFloat(Y.dataset.percentage ?? "");
|
|
2907
|
-
_e !== null && (_e < oe - 2 || _e > oe + 2) ? Y.style.transition = ".3s" : Y.style.transition = A.current ? "none" : ".3s", Y.dataset.percentage = oe.toString(), Y.style.stroke =
|
|
2910
|
+
_e !== null && (_e < oe - 2 || _e > oe + 2) ? Y.style.transition = ".3s" : Y.style.transition = A.current ? "none" : ".3s", Y.dataset.percentage = oe.toString(), Y.style.stroke = l === "static-color" ? q : yt(oe / 100, q, M), Y.style.strokeWidth = a.toString(), Y.style.strokeLinecap = p ? "round" : "", Y.style.strokeDashoffset = W.toString(), Y.style.strokeDasharray = `${Ce}, ${y * Math.PI * 2 - Ce}`;
|
|
2908
2911
|
}
|
|
2909
2912
|
}
|
|
2910
2913
|
if ($) {
|
|
2911
2914
|
const Y = R.current.querySelector('[data-el="point"]');
|
|
2912
2915
|
if (Y) {
|
|
2913
2916
|
const _e = parseFloat(Y.dataset.percentage ?? "");
|
|
2914
|
-
_e !== null && (_e < oe - 2 || _e > oe + 2) ? Y.style.transition = ".3s" : Y.style.transition = A.current ? "none" : ".3s", Y.dataset.percentage = oe.toString(), Y.style.stroke = Q, Y.style.strokeWidth = a.toString(), Y.style.strokeLinecap = "round", ne === t &&
|
|
2917
|
+
_e !== null && (_e < oe - 2 || _e > oe + 2) ? Y.style.transition = ".3s" : Y.style.transition = A.current ? "none" : ".3s", Y.dataset.percentage = oe.toString(), Y.style.stroke = Q, Y.style.strokeWidth = a.toString(), Y.style.strokeLinecap = "round", ne === t && c === "semicircle" ? Y.style.strokeDashoffset = "0" : Y.style.strokeDashoffset = (W - Ce).toString(), Y.style.strokeDasharray = `0, ${y * Math.PI * 2}`;
|
|
2915
2918
|
}
|
|
2916
2919
|
}
|
|
2917
2920
|
}, [ne, ue, t, n, y, a, u, q, Q, m, F, $, p, oe, M]), re = (W) => {
|
|
@@ -2923,11 +2926,11 @@ const Xe = () => {
|
|
|
2923
2926
|
}, we = N((W) => {
|
|
2924
2927
|
if (!R.current)
|
|
2925
2928
|
return;
|
|
2926
|
-
const pe = te(), Ce = R.current.getBoundingClientRect(), Y = Ce.left + Ce.width / 2, _e = Ce.top + Ce.height / 2, De = W.clientX,
|
|
2929
|
+
const pe = te(), Ce = R.current.getBoundingClientRect(), Y = Ce.left + Ce.width / 2, _e = Ce.top + Ce.height / 2, De = W.clientX, Ve = W.clientY, nn = _e - Ve, tn = Y - De;
|
|
2927
2930
|
let le = Math.atan2(nn, tn) * (180 / Math.PI);
|
|
2928
2931
|
pe === 270 && (le += 45), le < 0 && (le = 360 + le), le < 0 && (le = 0), le > pe && ne > (t - n) / 2 ? le = pe : le > pe && (le = 0);
|
|
2929
|
-
const jn = pe, pn = t - n,
|
|
2930
|
-
X(
|
|
2932
|
+
const jn = pe, pn = t - n, Te = Math.round(le * pn / jn + n);
|
|
2933
|
+
X(Te), Te !== r && s && s(Te);
|
|
2931
2934
|
}, [te, s, t, n, B, H, ne]);
|
|
2932
2935
|
I(() => {
|
|
2933
2936
|
Me();
|
|
@@ -2982,7 +2985,7 @@ const Xe = () => {
|
|
|
2982
2985
|
/* @__PURE__ */ e.jsx("div", { className: `range-circule-children ${v}`, style: D, children: w ?? (C && /* @__PURE__ */ e.jsx(bt, { className: "", text: Math.floor(ne).toString() })) })
|
|
2983
2986
|
] });
|
|
2984
2987
|
};
|
|
2985
|
-
const ss =
|
|
2988
|
+
const ss = Ee(
|
|
2986
2989
|
({
|
|
2987
2990
|
icon: n,
|
|
2988
2991
|
children: t,
|
|
@@ -2990,17 +2993,17 @@ const ss = Re(
|
|
|
2990
2993
|
position: s = "bottom-right",
|
|
2991
2994
|
variant: i = "primary",
|
|
2992
2995
|
className: o = "",
|
|
2993
|
-
...
|
|
2994
|
-
},
|
|
2996
|
+
...c
|
|
2997
|
+
}, l) => {
|
|
2995
2998
|
const a = !!t;
|
|
2996
2999
|
return /* @__PURE__ */ e.jsxs(
|
|
2997
3000
|
"button",
|
|
2998
3001
|
{
|
|
2999
|
-
ref:
|
|
3002
|
+
ref: l,
|
|
3000
3003
|
type: "button",
|
|
3001
3004
|
className: `fab ${a ? "fab--extended" : ""} fab--${r} fab--${i} ${s !== "none" ? `fab--${s}` : ""} ${o}`,
|
|
3002
|
-
"aria-label": a ? void 0 :
|
|
3003
|
-
...
|
|
3005
|
+
"aria-label": a ? void 0 : c["aria-label"] || "Floating action button",
|
|
3006
|
+
...c,
|
|
3004
3007
|
children: [
|
|
3005
3008
|
n && /* @__PURE__ */ e.jsx("span", { className: "fab__icon", children: n }),
|
|
3006
3009
|
a && /* @__PURE__ */ e.jsx("span", { className: "fab__text", children: t })
|
|
@@ -3010,10 +3013,6 @@ const ss = Re(
|
|
|
3010
3013
|
}
|
|
3011
3014
|
);
|
|
3012
3015
|
ss.displayName = "FAB";
|
|
3013
|
-
const Oe = ({ children: n, container: t = document.body }) => t ? hr.createPortal(
|
|
3014
|
-
n,
|
|
3015
|
-
t
|
|
3016
|
-
) : /* @__PURE__ */ e.jsx("p", { children: "container not found" });
|
|
3017
3016
|
const je = ({ style: n, short: t, text: r }) => r ? /* @__PURE__ */ e.jsxs("div", { style: n, className: `divider-and-text ${t ? "short" : ""}`, children: [
|
|
3018
3017
|
/* @__PURE__ */ e.jsx("div", { className: `divider ${t ? "short" : ""}` }),
|
|
3019
3018
|
r,
|
|
@@ -3042,11 +3041,11 @@ const is = ({ item: n, isIcon: t, globalClick: r, autoHide: s, onHide: i }) => {
|
|
|
3042
3041
|
let i = { x: n, y: t };
|
|
3043
3042
|
if (!r)
|
|
3044
3043
|
return i;
|
|
3045
|
-
const o = window.getComputedStyle(r),
|
|
3044
|
+
const o = window.getComputedStyle(r), c = parseFloat(o.getPropertyValue("height")), l = parseFloat(o.getPropertyValue("width")), a = t + c - document.documentElement.clientHeight, d = n + l - document.documentElement.clientWidth;
|
|
3046
3045
|
return a > 0 && (i.y = i.y - a - ((s == null ? void 0 : s.marginBottom) ?? 0)), d > 0 && (i.x = i.x - d - ((s == null ? void 0 : s.marginRight) ?? 0)), i;
|
|
3047
3046
|
};
|
|
3048
3047
|
const os = ({ items: n, onHide: t, smallDisplay: r, globalClick: s, autoHide: i, onGlobalHide: o }) => {
|
|
3049
|
-
const
|
|
3048
|
+
const c = U(null), [l, a] = k({ left: "0px", top: "0px" }), [d, u] = k(!1);
|
|
3050
3049
|
function x(f) {
|
|
3051
3050
|
for (let m of f)
|
|
3052
3051
|
if (m.icon)
|
|
@@ -3054,41 +3053,41 @@ const os = ({ items: n, onHide: t, smallDisplay: r, globalClick: s, autoHide: i,
|
|
|
3054
3053
|
return !1;
|
|
3055
3054
|
}
|
|
3056
3055
|
return I(() => {
|
|
3057
|
-
if (!
|
|
3056
|
+
if (!c.current)
|
|
3058
3057
|
return;
|
|
3059
|
-
let f = mn(
|
|
3058
|
+
let f = mn(c.current.parentElement);
|
|
3060
3059
|
if (!f)
|
|
3061
3060
|
return;
|
|
3062
|
-
let m = Nt(f.left + f.width, f.top,
|
|
3061
|
+
let m = Nt(f.left + f.width, f.top, c.current, { marginRight: f.width });
|
|
3063
3062
|
a({
|
|
3064
3063
|
left: m.x - f.left + "px",
|
|
3065
3064
|
top: m.y - f.top + "px"
|
|
3066
3065
|
}), u(!0);
|
|
3067
3066
|
}, []), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3068
|
-
/* @__PURE__ */ e.jsx("div", { ref:
|
|
3067
|
+
/* @__PURE__ */ e.jsx("div", { ref: c, className: `menu-block menu-block_color_surface-container-highest ${r ? "" : "menu-block_sub"}`, style: { ...l, ...d ? {} : { display: "none" } }, children: n.map((f, m) => /* @__PURE__ */ e.jsx(is, { onHide: o, autoHide: i, item: f, isIcon: x(n), globalClick: s }, m)) }),
|
|
3069
3068
|
r ? null : /* @__PURE__ */ e.jsx("div", { style: { zIndex: 4 }, className: "menu-block-backplate", onClick: t })
|
|
3070
3069
|
] });
|
|
3071
3070
|
}, as = ({ onHide: n, autoHide: t, globalClick: r, item: s, isIcon: i, smallDisplay: o }) => {
|
|
3072
|
-
const [
|
|
3073
|
-
s.subItems ?
|
|
3071
|
+
const [c, l] = k(!1), a = N(() => {
|
|
3072
|
+
s.subItems ? l((d) => !d) : (s.onClick && s.onClick(), r && r(), t && n && n());
|
|
3074
3073
|
}, [s.onClick]);
|
|
3075
3074
|
return /* @__PURE__ */ e.jsxs("div", { className: `menu-item ${s.disabled ? "menu-item_disabled" : ""}`, children: [
|
|
3076
3075
|
/* @__PURE__ */ e.jsxs("div", { className: "menu-item__info", onClick: a, children: [
|
|
3077
3076
|
i ? /* @__PURE__ */ e.jsx("div", { className: "menu-item__info__icon", children: s.icon }) : null,
|
|
3078
3077
|
/* @__PURE__ */ e.jsx("div", { className: "menu-item__info__text", children: s.title }),
|
|
3079
|
-
/* @__PURE__ */ e.jsx("div", { className: "menu-item__info__status ", children: s.subItems ? /* @__PURE__ */ e.jsx("span", { className: `menu-item__info__status__arrow ${
|
|
3078
|
+
/* @__PURE__ */ e.jsx("div", { className: "menu-item__info__status ", children: s.subItems ? /* @__PURE__ */ e.jsx("span", { className: `menu-item__info__status__arrow ${c ? "menu-item__info__status__arrow_active" : ""}` }) : s.activated ? /* @__PURE__ */ e.jsx(Le, {}) : /* @__PURE__ */ e.jsx("span", { className: "menu-item__info__status__none" }) })
|
|
3080
3079
|
] }),
|
|
3081
|
-
|
|
3080
|
+
c && s.subItems ? /* @__PURE__ */ e.jsx(os, { autoHide: t, items: s.subItems, onGlobalHide: n, onHide: () => l(!1), smallDisplay: o }) : null
|
|
3082
3081
|
] });
|
|
3083
3082
|
};
|
|
3084
3083
|
function wt({ block: n, smallDisplay: t, onHide: r, globalClick: s, autoHide: i }) {
|
|
3085
|
-
function o(
|
|
3086
|
-
for (let
|
|
3087
|
-
if (
|
|
3084
|
+
function o(c) {
|
|
3085
|
+
for (let l of c.items)
|
|
3086
|
+
if (l.icon)
|
|
3088
3087
|
return !0;
|
|
3089
3088
|
return !1;
|
|
3090
3089
|
}
|
|
3091
|
-
return /* @__PURE__ */ e.jsx("div", { className: "menu-block", children: n.items.map((
|
|
3090
|
+
return /* @__PURE__ */ e.jsx("div", { className: "menu-block", children: n.items.map((c, l) => /* @__PURE__ */ e.jsx(as, { globalClick: s, autoHide: i, onHide: r, item: c, isIcon: o(n), smallDisplay: t }, l)) });
|
|
3092
3091
|
}
|
|
3093
3092
|
const ls = 100, cs = (n) => {
|
|
3094
3093
|
const t = U(null), [r, s] = k({ left: "0px", top: "0px" }), i = () => {
|
|
@@ -3106,10 +3105,10 @@ const ls = 100, cs = (n) => {
|
|
|
3106
3105
|
ref: t,
|
|
3107
3106
|
className: "base-menu base-menu_color_surface-container-high",
|
|
3108
3107
|
style: { ...r, width: n.width, maxWidth: n.width ? "100%" : void 0 },
|
|
3109
|
-
children: n.blocks.map((o,
|
|
3110
|
-
|
|
3108
|
+
children: n.blocks.map((o, c) => /* @__PURE__ */ e.jsxs(ce.Fragment, { children: [
|
|
3109
|
+
c !== 0 ? /* @__PURE__ */ e.jsx(je, {}) : null,
|
|
3111
3110
|
/* @__PURE__ */ e.jsx(wt, { block: o, smallDisplay: !1, globalClick: n.onClick, autoHide: n.autoHide, onHide: i })
|
|
3112
|
-
] },
|
|
3111
|
+
] }, c))
|
|
3113
3112
|
}
|
|
3114
3113
|
) }) : null;
|
|
3115
3114
|
};
|
|
@@ -3120,8 +3119,8 @@ const ds = (n) => {
|
|
|
3120
3119
|
s !== 0 ? /* @__PURE__ */ e.jsx(je, {}) : null,
|
|
3121
3120
|
/* @__PURE__ */ e.jsx(wt, { block: r, smallDisplay: !0, autoHide: n.autoHide, onHide: n.onHide })
|
|
3122
3121
|
] }, s)) }) });
|
|
3123
|
-
}, St = (n) => n.screensize === ae.MOBILE ? /* @__PURE__ */ e.jsx(
|
|
3124
|
-
const [
|
|
3122
|
+
}, St = (n) => n.screensize === ae.MOBILE ? /* @__PURE__ */ e.jsx($e, { container: n.container, children: /* @__PURE__ */ e.jsx(ds, { ...n }) }) : /* @__PURE__ */ e.jsx($e, { container: n.container, children: /* @__PURE__ */ e.jsx(cs, { ...n }) }), Li = ce.forwardRef(({ screensize: n, autoHide: t, blocks: r, container: s, onClick: i, ...o }, c) => {
|
|
3123
|
+
const [l, a] = k(!1), [d, u] = k(void 0), { screen: x } = Re(Ge), f = () => {
|
|
3125
3124
|
a(!1), u(void 0);
|
|
3126
3125
|
}, m = (j) => {
|
|
3127
3126
|
j.stopPropagation(), a(!0), u({ x: j.clientX, y: j.clientY }), i == null || i(j);
|
|
@@ -3130,7 +3129,7 @@ const ds = (n) => {
|
|
|
3130
3129
|
/* @__PURE__ */ e.jsx(
|
|
3131
3130
|
ye,
|
|
3132
3131
|
{
|
|
3133
|
-
ref:
|
|
3132
|
+
ref: c,
|
|
3134
3133
|
onClick: m,
|
|
3135
3134
|
...o
|
|
3136
3135
|
}
|
|
@@ -3142,7 +3141,7 @@ const ds = (n) => {
|
|
|
3142
3141
|
onHide: f,
|
|
3143
3142
|
autoHide: t,
|
|
3144
3143
|
screensize: n,
|
|
3145
|
-
visible:
|
|
3144
|
+
visible: l,
|
|
3146
3145
|
x: (d == null ? void 0 : d.x) ?? 0,
|
|
3147
3146
|
y: (d == null ? void 0 : d.y) ?? 0,
|
|
3148
3147
|
blocks: r,
|
|
@@ -3159,17 +3158,17 @@ const Mt = ce.forwardRef(
|
|
|
3159
3158
|
readOnly: s,
|
|
3160
3159
|
disabled: i,
|
|
3161
3160
|
checkIcon: o = /* @__PURE__ */ e.jsx(Le, { baseColor: "var(--On-primary-color)" }),
|
|
3162
|
-
size:
|
|
3163
|
-
className:
|
|
3161
|
+
size: c = "medium",
|
|
3162
|
+
className: l,
|
|
3164
3163
|
...a
|
|
3165
3164
|
}, d) => /* @__PURE__ */ e.jsxs(
|
|
3166
3165
|
"label",
|
|
3167
3166
|
{
|
|
3168
3167
|
className: [
|
|
3169
3168
|
"checkbox-container",
|
|
3170
|
-
`checkbox--${
|
|
3169
|
+
`checkbox--${c}`,
|
|
3171
3170
|
i ? "checkbox--disabled" : "",
|
|
3172
|
-
|
|
3171
|
+
l
|
|
3173
3172
|
].filter(Boolean).join(" "),
|
|
3174
3173
|
children: [
|
|
3175
3174
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3194,20 +3193,20 @@ const Mt = ce.forwardRef(
|
|
|
3194
3193
|
);
|
|
3195
3194
|
Mt.displayName = "Checkbox";
|
|
3196
3195
|
const Lt = ce.forwardRef(
|
|
3197
|
-
({ text: n, onDelete: t, big: r, onClick: s, screenSize: i, className: o, disabled:
|
|
3196
|
+
({ text: n, onDelete: t, big: r, onClick: s, screenSize: i, className: o, disabled: c, ...l }, a) => {
|
|
3198
3197
|
const d = (x) => {
|
|
3199
3198
|
x.stopPropagation(), t == null || t(x);
|
|
3200
|
-
}, u =
|
|
3199
|
+
}, u = c ? void 0 : s;
|
|
3201
3200
|
return /* @__PURE__ */ e.jsxs(
|
|
3202
3201
|
"div",
|
|
3203
3202
|
{
|
|
3204
|
-
...
|
|
3203
|
+
...l,
|
|
3205
3204
|
ref: a,
|
|
3206
|
-
className: `chips ${r ? "chips--big" : ""} ${
|
|
3205
|
+
className: `chips ${r ? "chips--big" : ""} ${c ? "disabled" : ""} ${s ? "chips--clickable" : ""} ${o || ""}`,
|
|
3207
3206
|
onClick: u,
|
|
3208
|
-
role:
|
|
3209
|
-
tabIndex:
|
|
3210
|
-
"aria-label":
|
|
3207
|
+
role: l.role ?? s ? "button" : void 0,
|
|
3208
|
+
tabIndex: l.tabIndex ?? s ? 0 : void 0,
|
|
3209
|
+
"aria-label": l["aria-label"] ?? s ? n : void 0,
|
|
3211
3210
|
children: [
|
|
3212
3211
|
/* @__PURE__ */ e.jsx(K, { type: "body", screensize: i, children: n }),
|
|
3213
3212
|
t && /* @__PURE__ */ e.jsx(
|
|
@@ -3216,7 +3215,7 @@ const Lt = ce.forwardRef(
|
|
|
3216
3215
|
className: "chips__delete",
|
|
3217
3216
|
onClick: d,
|
|
3218
3217
|
"aria-label": `Remove ${n}`,
|
|
3219
|
-
disabled:
|
|
3218
|
+
disabled: c,
|
|
3220
3219
|
type: "button",
|
|
3221
3220
|
children: /* @__PURE__ */ e.jsx(ke, {})
|
|
3222
3221
|
}
|
|
@@ -3227,7 +3226,7 @@ const Lt = ce.forwardRef(
|
|
|
3227
3226
|
}
|
|
3228
3227
|
);
|
|
3229
3228
|
Lt.displayName = "Chips";
|
|
3230
|
-
const $t =
|
|
3229
|
+
const $t = Ee(
|
|
3231
3230
|
({
|
|
3232
3231
|
name: n,
|
|
3233
3232
|
currentValue: t,
|
|
@@ -3235,15 +3234,15 @@ const $t = Re(
|
|
|
3235
3234
|
onChange: s,
|
|
3236
3235
|
readOnly: i,
|
|
3237
3236
|
checked: o,
|
|
3238
|
-
defaultChecked:
|
|
3239
|
-
label:
|
|
3237
|
+
defaultChecked: c,
|
|
3238
|
+
label: l,
|
|
3240
3239
|
size: a = "medium",
|
|
3241
3240
|
variant: d = "primary",
|
|
3242
3241
|
showLabel: u = !0,
|
|
3243
3242
|
className: x,
|
|
3244
3243
|
...f
|
|
3245
3244
|
}, m) => {
|
|
3246
|
-
const _ = t !== void 0 ? t === r : o !== void 0 ? o :
|
|
3245
|
+
const _ = t !== void 0 ? t === r : o !== void 0 ? o : c;
|
|
3247
3246
|
return /* @__PURE__ */ e.jsxs("label", { className: `radio-button-container ${x || ""}`, children: [
|
|
3248
3247
|
/* @__PURE__ */ e.jsx(
|
|
3249
3248
|
"input",
|
|
@@ -3257,17 +3256,17 @@ const $t = Re(
|
|
|
3257
3256
|
onChange: s,
|
|
3258
3257
|
readOnly: i,
|
|
3259
3258
|
"aria-checked": _,
|
|
3260
|
-
"aria-label":
|
|
3259
|
+
"aria-label": l || f["aria-label"],
|
|
3261
3260
|
...f
|
|
3262
3261
|
}
|
|
3263
3262
|
),
|
|
3264
3263
|
/* @__PURE__ */ e.jsx("span", { className: `radio-button-ui radio-button-ui--${a} radio-button-ui--${d}` }),
|
|
3265
|
-
u &&
|
|
3264
|
+
u && l && /* @__PURE__ */ e.jsx("span", { className: "radio-button-label", children: l })
|
|
3266
3265
|
] });
|
|
3267
3266
|
}
|
|
3268
3267
|
);
|
|
3269
3268
|
$t.displayName = "RadioButton";
|
|
3270
|
-
const Rt =
|
|
3269
|
+
const Rt = Ee(
|
|
3271
3270
|
({
|
|
3272
3271
|
items: n,
|
|
3273
3272
|
value: t,
|
|
@@ -3275,8 +3274,8 @@ const Rt = Re(
|
|
|
3275
3274
|
name: s,
|
|
3276
3275
|
readOnly: i = !1,
|
|
3277
3276
|
onChange: o,
|
|
3278
|
-
className:
|
|
3279
|
-
size:
|
|
3277
|
+
className: c = "",
|
|
3278
|
+
size: l = "medium",
|
|
3280
3279
|
variant: a = "primary",
|
|
3281
3280
|
...d
|
|
3282
3281
|
}, u) => {
|
|
@@ -3295,7 +3294,7 @@ const Rt = Re(
|
|
|
3295
3294
|
"div",
|
|
3296
3295
|
{
|
|
3297
3296
|
ref: u,
|
|
3298
|
-
className: `segmented-button segmented-button--${
|
|
3297
|
+
className: `segmented-button segmented-button--${l} segmented-button--${a} ${c}`,
|
|
3299
3298
|
role: "group",
|
|
3300
3299
|
...d,
|
|
3301
3300
|
children: n.map((j) => /* @__PURE__ */ e.jsxs(
|
|
@@ -3331,7 +3330,7 @@ const Rt = Re(
|
|
|
3331
3330
|
}
|
|
3332
3331
|
);
|
|
3333
3332
|
Rt.displayName = "SegmentedButton";
|
|
3334
|
-
const Et =
|
|
3333
|
+
const Et = Ee(
|
|
3335
3334
|
({
|
|
3336
3335
|
size: n = "medium",
|
|
3337
3336
|
variant: t = "primary",
|
|
@@ -3339,8 +3338,8 @@ const Et = Re(
|
|
|
3339
3338
|
showLabel: s = !1,
|
|
3340
3339
|
labelOn: i = "On",
|
|
3341
3340
|
labelOff: o = "Off",
|
|
3342
|
-
checked:
|
|
3343
|
-
onChange:
|
|
3341
|
+
checked: c,
|
|
3342
|
+
onChange: l,
|
|
3344
3343
|
...a
|
|
3345
3344
|
}, d) => /* @__PURE__ */ e.jsxs("label", { className: `switch-container ${r}`, children: [
|
|
3346
3345
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3349,14 +3348,14 @@ const Et = Re(
|
|
|
3349
3348
|
ref: d,
|
|
3350
3349
|
type: "checkbox",
|
|
3351
3350
|
role: "switch",
|
|
3352
|
-
"aria-checked":
|
|
3353
|
-
checked:
|
|
3354
|
-
onChange:
|
|
3351
|
+
"aria-checked": c,
|
|
3352
|
+
checked: c,
|
|
3353
|
+
onChange: l,
|
|
3355
3354
|
className: `switch-input switch--${n} switch--${t}`,
|
|
3356
3355
|
...a
|
|
3357
3356
|
}
|
|
3358
3357
|
),
|
|
3359
|
-
s && /* @__PURE__ */ e.jsx("span", { className: "switch-label", children:
|
|
3358
|
+
s && /* @__PURE__ */ e.jsx("span", { className: "switch-label", children: c ? i : o })
|
|
3360
3359
|
] })
|
|
3361
3360
|
);
|
|
3362
3361
|
Et.displayName = "Switch";
|
|
@@ -3367,8 +3366,8 @@ function us({
|
|
|
3367
3366
|
onHide: s,
|
|
3368
3367
|
noHide: i = !1,
|
|
3369
3368
|
name: o = "selection_dialog",
|
|
3370
|
-
confirmText:
|
|
3371
|
-
cancelText:
|
|
3369
|
+
confirmText: c = "Выбрать",
|
|
3370
|
+
cancelText: l = "Отмена",
|
|
3372
3371
|
defaultValue: a,
|
|
3373
3372
|
style: d
|
|
3374
3373
|
}) {
|
|
@@ -3391,8 +3390,8 @@ function us({
|
|
|
3391
3390
|
onHide: m,
|
|
3392
3391
|
onSuccess: f,
|
|
3393
3392
|
disabled: u === void 0,
|
|
3394
|
-
confirmText:
|
|
3395
|
-
cancelText:
|
|
3393
|
+
confirmText: c,
|
|
3394
|
+
cancelText: l
|
|
3396
3395
|
}
|
|
3397
3396
|
),
|
|
3398
3397
|
children: [
|
|
@@ -3465,8 +3464,8 @@ const en = ce.forwardRef(
|
|
|
3465
3464
|
type: s = "text",
|
|
3466
3465
|
transparent: i,
|
|
3467
3466
|
readOnly: o,
|
|
3468
|
-
password:
|
|
3469
|
-
border:
|
|
3467
|
+
password: c,
|
|
3468
|
+
border: l,
|
|
3470
3469
|
onClear: a,
|
|
3471
3470
|
icon: d,
|
|
3472
3471
|
onChange: u,
|
|
@@ -3518,7 +3517,7 @@ const en = ce.forwardRef(
|
|
|
3518
3517
|
input-field
|
|
3519
3518
|
input-field__text-field
|
|
3520
3519
|
${Me[A]}
|
|
3521
|
-
${
|
|
3520
|
+
${l ? "input-field_border" : ""}
|
|
3522
3521
|
${$ ? "input-field_active" : ""}
|
|
3523
3522
|
${i ? "input-field_transparent" : ""}
|
|
3524
3523
|
${y ? "input-field_error" : ""}
|
|
@@ -3538,7 +3537,7 @@ const en = ce.forwardRef(
|
|
|
3538
3537
|
readOnly: o,
|
|
3539
3538
|
disabled: R,
|
|
3540
3539
|
required: !0,
|
|
3541
|
-
type:
|
|
3540
|
+
type: c ? "password" : s,
|
|
3542
3541
|
className: `
|
|
3543
3542
|
input-field__input-container__input
|
|
3544
3543
|
${y ? "input-field__input-container__input_error" : ""}
|
|
@@ -3587,8 +3586,8 @@ const $i = ({
|
|
|
3587
3586
|
onSuccess: s,
|
|
3588
3587
|
onHide: i,
|
|
3589
3588
|
placeholder: o,
|
|
3590
|
-
type:
|
|
3591
|
-
min:
|
|
3589
|
+
type: c = "text",
|
|
3590
|
+
min: l = 0,
|
|
3592
3591
|
max: a = 100,
|
|
3593
3592
|
defaultValue: d = "",
|
|
3594
3593
|
confirmText: u = "OK",
|
|
@@ -3599,24 +3598,24 @@ const $i = ({
|
|
|
3599
3598
|
I(() => {
|
|
3600
3599
|
if (f)
|
|
3601
3600
|
p(f(m));
|
|
3602
|
-
else if (
|
|
3601
|
+
else if (c === "number") {
|
|
3603
3602
|
const v = Number(m);
|
|
3604
|
-
p(!isNaN(v) && v >=
|
|
3603
|
+
p(!isNaN(v) && v >= l && v <= a);
|
|
3605
3604
|
} else
|
|
3606
3605
|
p(!0);
|
|
3607
|
-
}, [m, f,
|
|
3606
|
+
}, [m, f, c, l, a]);
|
|
3608
3607
|
const C = N(() => {
|
|
3609
3608
|
j && (s == null || s(m), i == null || i());
|
|
3610
3609
|
}, [m, j, s, i]), g = N(() => {
|
|
3611
3610
|
i == null || i();
|
|
3612
3611
|
}, [i]), w = (v) => {
|
|
3613
|
-
if (
|
|
3612
|
+
if (c === "number") {
|
|
3614
3613
|
if (v === "") {
|
|
3615
3614
|
_("");
|
|
3616
3615
|
return;
|
|
3617
3616
|
}
|
|
3618
3617
|
const M = Number(v);
|
|
3619
|
-
isNaN(M) || (M <
|
|
3618
|
+
isNaN(M) || (M < l && (v = String(l)), M > a && (v = String(a)), _(v));
|
|
3620
3619
|
} else
|
|
3621
3620
|
_(v);
|
|
3622
3621
|
};
|
|
@@ -3632,7 +3631,7 @@ const $i = ({
|
|
|
3632
3631
|
be,
|
|
3633
3632
|
{
|
|
3634
3633
|
onClick: C,
|
|
3635
|
-
disabled: !j ||
|
|
3634
|
+
disabled: !j || c === "number" && m === "",
|
|
3636
3635
|
children: u
|
|
3637
3636
|
}
|
|
3638
3637
|
)
|
|
@@ -3643,8 +3642,8 @@ const $i = ({
|
|
|
3643
3642
|
/* @__PURE__ */ e.jsx(
|
|
3644
3643
|
en,
|
|
3645
3644
|
{
|
|
3646
|
-
type:
|
|
3647
|
-
min:
|
|
3645
|
+
type: c,
|
|
3646
|
+
min: l,
|
|
3648
3647
|
max: a,
|
|
3649
3648
|
border: !0,
|
|
3650
3649
|
placeholder: o,
|
|
@@ -3653,9 +3652,9 @@ const $i = ({
|
|
|
3653
3652
|
error: !j
|
|
3654
3653
|
}
|
|
3655
3654
|
),
|
|
3656
|
-
!j &&
|
|
3655
|
+
!j && c === "number" && /* @__PURE__ */ e.jsxs(K, { type: "body", children: [
|
|
3657
3656
|
"Введите число от ",
|
|
3658
|
-
|
|
3657
|
+
l,
|
|
3659
3658
|
" до ",
|
|
3660
3659
|
a
|
|
3661
3660
|
] })
|
|
@@ -3671,14 +3670,14 @@ const Ri = ({
|
|
|
3671
3670
|
children: s,
|
|
3672
3671
|
onSave: i,
|
|
3673
3672
|
onHide: o,
|
|
3674
|
-
marginBottom:
|
|
3675
|
-
disableBackplate:
|
|
3673
|
+
marginBottom: c = 0,
|
|
3674
|
+
disableBackplate: l,
|
|
3676
3675
|
saveText: a,
|
|
3677
3676
|
cancelText: d,
|
|
3678
3677
|
forceFullScreen: u,
|
|
3679
3678
|
btns: x
|
|
3680
3679
|
}) => {
|
|
3681
|
-
const { screen: f } =
|
|
3680
|
+
const { screen: f } = Re(Ge);
|
|
3682
3681
|
st(!0, document.body);
|
|
3683
3682
|
const m = () => {
|
|
3684
3683
|
o == null || o();
|
|
@@ -3690,8 +3689,8 @@ const Ri = ({
|
|
|
3690
3689
|
{
|
|
3691
3690
|
style: {
|
|
3692
3691
|
...n,
|
|
3693
|
-
height: `calc(100vh - ${
|
|
3694
|
-
paddingBottom: `${
|
|
3692
|
+
height: `calc(100vh - ${c}px)`,
|
|
3693
|
+
paddingBottom: `${c}px`
|
|
3695
3694
|
},
|
|
3696
3695
|
className: `
|
|
3697
3696
|
full-screen-dialog
|
|
@@ -3721,7 +3720,7 @@ const Ri = ({
|
|
|
3721
3720
|
) : /* @__PURE__ */ e.jsx(
|
|
3722
3721
|
xn,
|
|
3723
3722
|
{
|
|
3724
|
-
disableBackplate:
|
|
3723
|
+
disableBackplate: l,
|
|
3725
3724
|
style: n,
|
|
3726
3725
|
header: r,
|
|
3727
3726
|
className: `full-screen-dialog ${t}`,
|
|
@@ -3734,7 +3733,7 @@ const Ri = ({
|
|
|
3734
3733
|
}
|
|
3735
3734
|
);
|
|
3736
3735
|
};
|
|
3737
|
-
const fs =
|
|
3736
|
+
const fs = Ee(
|
|
3738
3737
|
({
|
|
3739
3738
|
className: n = "",
|
|
3740
3739
|
action: t,
|
|
@@ -3742,8 +3741,8 @@ const fs = Re(
|
|
|
3742
3741
|
alt: s,
|
|
3743
3742
|
header: i,
|
|
3744
3743
|
subhead: o,
|
|
3745
|
-
text:
|
|
3746
|
-
children:
|
|
3744
|
+
text: c,
|
|
3745
|
+
children: l,
|
|
3747
3746
|
iconButtonCell: a,
|
|
3748
3747
|
onClick: d,
|
|
3749
3748
|
screenSize: u,
|
|
@@ -3754,7 +3753,7 @@ const fs = Re(
|
|
|
3754
3753
|
elevation: j = 6,
|
|
3755
3754
|
...p
|
|
3756
3755
|
}, C) => {
|
|
3757
|
-
const { screen: g } =
|
|
3756
|
+
const { screen: g } = Re(Ge), w = u ?? g, v = `elevation-${Math.min(24, Math.max(0, j))}`, M = (z) => {
|
|
3758
3757
|
R(z) && (d == null || d(z), A(z));
|
|
3759
3758
|
}, R = (z) => {
|
|
3760
3759
|
const L = z.target;
|
|
@@ -3804,16 +3803,16 @@ const fs = Re(
|
|
|
3804
3803
|
children: o
|
|
3805
3804
|
}
|
|
3806
3805
|
),
|
|
3807
|
-
|
|
3806
|
+
c && /* @__PURE__ */ e.jsx(
|
|
3808
3807
|
K,
|
|
3809
3808
|
{
|
|
3810
3809
|
type: "body",
|
|
3811
3810
|
screensize: w,
|
|
3812
3811
|
className: "card-text",
|
|
3813
|
-
children:
|
|
3812
|
+
children: c
|
|
3814
3813
|
}
|
|
3815
3814
|
),
|
|
3816
|
-
|
|
3815
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "card-children", children: l }),
|
|
3817
3816
|
t && /* @__PURE__ */ e.jsx("div", { className: "card-actions", children: t })
|
|
3818
3817
|
] }),
|
|
3819
3818
|
m && /* @__PURE__ */ e.jsx("div", { className: "card-loading-indicator" })
|
|
@@ -3824,20 +3823,20 @@ const fs = Re(
|
|
|
3824
3823
|
);
|
|
3825
3824
|
fs.displayName = "Card";
|
|
3826
3825
|
const Ei = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { className: `base-action-card ${t ?? ""}`, children: n });
|
|
3827
|
-
const Fi = ({ children: n, className: t, id: r, height: s, width: i, pozMove: o, draggable:
|
|
3828
|
-
const [
|
|
3826
|
+
const Fi = ({ children: n, className: t, id: r, height: s, width: i, pozMove: o, draggable: c = !0 }) => {
|
|
3827
|
+
const [l, a] = k(!1), [d, u] = k(null), [x, f] = k({ x: 0, y: 0 }), m = (p) => {
|
|
3829
3828
|
p.button == 1 && (a(!1), u(null), document.body.style.cursor = "auto");
|
|
3830
3829
|
}, _ = (p) => {
|
|
3831
|
-
p.button == 1 &&
|
|
3830
|
+
p.button == 1 && c && (u({ x: p.clientX, y: p.clientY }), a(!0), document.body.style.cursor = "move");
|
|
3832
3831
|
}, j = N((p) => {
|
|
3833
|
-
|
|
3832
|
+
l && (f((C) => {
|
|
3834
3833
|
if (!d)
|
|
3835
3834
|
return C;
|
|
3836
3835
|
const g = p.clientX - d.x, w = p.clientY - d.y;
|
|
3837
3836
|
let v = C.x + g, M = C.y + w;
|
|
3838
3837
|
return { x: v, y: M };
|
|
3839
3838
|
}), u({ x: p.clientX, y: p.clientY }));
|
|
3840
|
-
}, [
|
|
3839
|
+
}, [l, d]);
|
|
3841
3840
|
return I(() => {
|
|
3842
3841
|
o && f({ ...o });
|
|
3843
3842
|
}, [o]), /* @__PURE__ */ e.jsx("div", { id: r, style: { height: s, width: i }, className: `big-container ${t}`, onMouseDown: _, onMouseUp: m, onMouseMove: j, children: /* @__PURE__ */ e.jsx("div", { className: "big-container-content", style: { left: x.x, top: x.y }, children: n }) });
|
|
@@ -3849,8 +3848,8 @@ const Vi = ({
|
|
|
3849
3848
|
className: s,
|
|
3850
3849
|
style: i,
|
|
3851
3850
|
countColumn: o,
|
|
3852
|
-
items:
|
|
3853
|
-
onClickColl:
|
|
3851
|
+
items: c,
|
|
3852
|
+
onClickColl: l,
|
|
3854
3853
|
classNameColumn: a,
|
|
3855
3854
|
minColumnWidth: d = "auto"
|
|
3856
3855
|
}) => {
|
|
@@ -3863,9 +3862,9 @@ const Vi = ({
|
|
|
3863
3862
|
}
|
|
3864
3863
|
j[p.indexCol].push(p.node);
|
|
3865
3864
|
}), j;
|
|
3866
|
-
}, []), x = ce.useMemo(() => u(o,
|
|
3867
|
-
|
|
3868
|
-
}, [
|
|
3865
|
+
}, []), x = ce.useMemo(() => u(o, c), [u, o, c]), f = ce.useCallback((m, _) => {
|
|
3866
|
+
l == null || l(m, _);
|
|
3867
|
+
}, [l]);
|
|
3869
3868
|
return /* @__PURE__ */ e.jsx(
|
|
3870
3869
|
"div",
|
|
3871
3870
|
{
|
|
@@ -3898,11 +3897,11 @@ const xs = 10, ms = 2e-3, Ti = ({
|
|
|
3898
3897
|
style: s,
|
|
3899
3898
|
border: i = !1,
|
|
3900
3899
|
collapsible: o = !1,
|
|
3901
|
-
defaultVisible:
|
|
3902
|
-
action:
|
|
3900
|
+
defaultVisible: c = !1,
|
|
3901
|
+
action: l,
|
|
3903
3902
|
onVisibilityChange: a
|
|
3904
3903
|
}) => {
|
|
3905
|
-
const [d, u] = k(o ?
|
|
3904
|
+
const [d, u] = k(o ? c : !0), x = U(null), f = (p) => {
|
|
3906
3905
|
if (!p)
|
|
3907
3906
|
return;
|
|
3908
3907
|
const C = mn(p);
|
|
@@ -3945,18 +3944,18 @@ const xs = 10, ms = 2e-3, Ti = ({
|
|
|
3945
3944
|
},
|
|
3946
3945
|
children: [
|
|
3947
3946
|
/* @__PURE__ */ e.jsx(K, { type: "title", children: t }),
|
|
3948
|
-
/* @__PURE__ */ e.jsx("div", { className: "content-box-action-container", children:
|
|
3947
|
+
/* @__PURE__ */ e.jsx("div", { className: "content-box-action-container", children: l ? /* @__PURE__ */ e.jsx(
|
|
3949
3948
|
"div",
|
|
3950
3949
|
{
|
|
3951
3950
|
className: "content-box-status-container action-btn",
|
|
3952
|
-
onClick:
|
|
3953
|
-
"aria-label":
|
|
3951
|
+
onClick: l.onClick,
|
|
3952
|
+
"aria-label": l.ariaLabel || "Action",
|
|
3954
3953
|
role: "button",
|
|
3955
3954
|
tabIndex: 0,
|
|
3956
3955
|
onKeyDown: (p) => {
|
|
3957
|
-
(p.key === "Enter" || p.key === " ") && (p.preventDefault(),
|
|
3956
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), l.onClick());
|
|
3958
3957
|
},
|
|
3959
|
-
children:
|
|
3958
|
+
children: l.icon
|
|
3960
3959
|
}
|
|
3961
3960
|
) : o ? /* @__PURE__ */ e.jsx("div", { className: "content-box-status-container", children: /* @__PURE__ */ e.jsx(
|
|
3962
3961
|
"span",
|
|
@@ -3998,16 +3997,16 @@ const Oi = ({ children: n, colSpan: t = 1 }) => /* @__PURE__ */ e.jsx(
|
|
|
3998
3997
|
gridRowGap: s = "10px",
|
|
3999
3998
|
gridColumnGap: i = "5px",
|
|
4000
3999
|
itemMinWith: o,
|
|
4001
|
-
itemMaxWith:
|
|
4002
|
-
itemWith:
|
|
4000
|
+
itemMaxWith: c,
|
|
4001
|
+
itemWith: l = "400px"
|
|
4003
4002
|
}) => {
|
|
4004
4003
|
const a = U(null), [d, u] = k([]), x = U(null), f = U(null), m = N(() => {
|
|
4005
4004
|
if (!a.current)
|
|
4006
4005
|
return;
|
|
4007
4006
|
a.current.style.display = "grid", a.current.style.gridRowGap = s, a.current.style.gridColumnGap = i;
|
|
4008
|
-
const C = o ??
|
|
4007
|
+
const C = o ?? l, g = c ?? l;
|
|
4009
4008
|
a.current.style.gridTemplateColumns = `repeat(auto-fill, minmax(${C}, ${g}))`, a.current.style.gridAutoRows = "1px";
|
|
4010
|
-
}, [s, i, o,
|
|
4009
|
+
}, [s, i, o, c, l]), _ = N(() => {
|
|
4011
4010
|
if (a.current) {
|
|
4012
4011
|
const C = a.current.querySelectorAll(".adaptiv-grid-item");
|
|
4013
4012
|
u(Array.from(C));
|
|
@@ -4053,8 +4052,8 @@ const js = ({
|
|
|
4053
4052
|
elevation: s = 1,
|
|
4054
4053
|
padded: i = !0,
|
|
4055
4054
|
borderRadius: o = 12,
|
|
4056
|
-
onClick:
|
|
4057
|
-
onContextMenu:
|
|
4055
|
+
onClick: c,
|
|
4056
|
+
onContextMenu: l
|
|
4058
4057
|
}) => {
|
|
4059
4058
|
const a = `elevation-${Math.min(24, Math.max(0, s))}`;
|
|
4060
4059
|
return /* @__PURE__ */ e.jsx(
|
|
@@ -4064,8 +4063,8 @@ const js = ({
|
|
|
4064
4063
|
borderRadius: `${o}px`,
|
|
4065
4064
|
...r
|
|
4066
4065
|
},
|
|
4067
|
-
onClick:
|
|
4068
|
-
onContextMenu:
|
|
4066
|
+
onClick: c,
|
|
4067
|
+
onContextMenu: l,
|
|
4069
4068
|
className: `alex-evo-sh-ui-kit-panel ${a} ${i ? "padded" : ""} ${t}`,
|
|
4070
4069
|
children: n
|
|
4071
4070
|
}
|
|
@@ -4079,9 +4078,9 @@ const Ai = ({
|
|
|
4079
4078
|
activeTabClassName: s = "active",
|
|
4080
4079
|
onTabClick: i,
|
|
4081
4080
|
activeTabIndex: o,
|
|
4082
|
-
tabContainerClassName:
|
|
4081
|
+
tabContainerClassName: c = ""
|
|
4083
4082
|
}) => {
|
|
4084
|
-
const [
|
|
4083
|
+
const [l, a] = k(0), d = o !== void 0 ? o : l, u = U(null), x = U(null), [f, m] = k(!1), _ = (C) => {
|
|
4085
4084
|
if (u.current) {
|
|
4086
4085
|
const g = t || u.current.offsetWidth / 2;
|
|
4087
4086
|
u.current.scrollBy({
|
|
@@ -4109,7 +4108,7 @@ const Ai = ({
|
|
|
4109
4108
|
o === void 0 && a(C), i && i(C);
|
|
4110
4109
|
};
|
|
4111
4110
|
return /* @__PURE__ */ e.jsxs("div", { className: "alex-evo-ui-kit-tabs-container", children: [
|
|
4112
|
-
/* @__PURE__ */ e.jsxs("div", { className: `alex-evo-ui-kit-tabs-scroll-buttons ${
|
|
4111
|
+
/* @__PURE__ */ e.jsxs("div", { className: `alex-evo-ui-kit-tabs-scroll-buttons ${c}`, children: [
|
|
4113
4112
|
f && /* @__PURE__ */ e.jsx("button", { onClick: () => _("left"), className: "alex-evo-ui-kit-scroll-button", children: "◀" }),
|
|
4114
4113
|
/* @__PURE__ */ e.jsxs(
|
|
4115
4114
|
"div",
|
|
@@ -4137,15 +4136,15 @@ const Ai = ({
|
|
|
4137
4136
|
/* @__PURE__ */ e.jsx("div", { className: "alex-evo-ui-kit-tab-content", children: n[d].content })
|
|
4138
4137
|
] });
|
|
4139
4138
|
};
|
|
4140
|
-
const ps =
|
|
4139
|
+
const ps = Ee(({
|
|
4141
4140
|
children: n,
|
|
4142
4141
|
className: t = "",
|
|
4143
4142
|
maxHeight: r,
|
|
4144
4143
|
scroll: s,
|
|
4145
4144
|
transparent: i,
|
|
4146
4145
|
width: o,
|
|
4147
|
-
padding:
|
|
4148
|
-
margin:
|
|
4146
|
+
padding: c,
|
|
4147
|
+
margin: l,
|
|
4149
4148
|
...a
|
|
4150
4149
|
}, d) => {
|
|
4151
4150
|
const u = {
|
|
@@ -4153,8 +4152,8 @@ const ps = Re(({
|
|
|
4153
4152
|
maxHeight: r,
|
|
4154
4153
|
backgroundColor: i ? "transparent" : void 0,
|
|
4155
4154
|
width: o,
|
|
4156
|
-
padding:
|
|
4157
|
-
margin:
|
|
4155
|
+
padding: c,
|
|
4156
|
+
margin: l
|
|
4158
4157
|
}, x = [
|
|
4159
4158
|
"list-container",
|
|
4160
4159
|
t,
|
|
@@ -4162,15 +4161,15 @@ const ps = Re(({
|
|
|
4162
4161
|
i ? "list-container_transparent" : ""
|
|
4163
4162
|
].filter(Boolean).join(" ");
|
|
4164
4163
|
return /* @__PURE__ */ e.jsx("ul", { ref: d, style: u, className: x, ...a, children: n });
|
|
4165
|
-
}), Cs =
|
|
4164
|
+
}), Cs = Ee(({
|
|
4166
4165
|
icon: n,
|
|
4167
4166
|
control: t,
|
|
4168
4167
|
text: r,
|
|
4169
4168
|
header: s,
|
|
4170
4169
|
description: i,
|
|
4171
4170
|
value: o,
|
|
4172
|
-
onClick:
|
|
4173
|
-
hovered:
|
|
4171
|
+
onClick: c,
|
|
4172
|
+
hovered: l = !0,
|
|
4174
4173
|
className: a = "",
|
|
4175
4174
|
disabled: d = !1,
|
|
4176
4175
|
active: u = !1,
|
|
@@ -4178,12 +4177,12 @@ const ps = Re(({
|
|
|
4178
4177
|
...f
|
|
4179
4178
|
}, m) => {
|
|
4180
4179
|
const _ = (p) => {
|
|
4181
|
-
!d && !p.target.closest(".control-container") && (
|
|
4180
|
+
!d && !p.target.closest(".control-container") && (c == null || c(p));
|
|
4182
4181
|
}, j = [
|
|
4183
4182
|
"list-item-container",
|
|
4184
4183
|
a,
|
|
4185
4184
|
`list-item-container_shadow-${x}`,
|
|
4186
|
-
|
|
4185
|
+
l && !d ? "list-item-container_hovered" : "",
|
|
4187
4186
|
d ? "list-item-container_disabled" : "",
|
|
4188
4187
|
u ? "list-item-container_active" : ""
|
|
4189
4188
|
].filter(Boolean).join(" ");
|
|
@@ -4220,14 +4219,14 @@ function vs(n) {
|
|
|
4220
4219
|
return t[0];
|
|
4221
4220
|
}
|
|
4222
4221
|
const gs = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
4223
|
-
const o = n[t.field],
|
|
4224
|
-
return /* @__PURE__ */ e.jsx("td", { style: { backgroundColor:
|
|
4222
|
+
const o = n[t.field], c = Ft(o);
|
|
4223
|
+
return /* @__PURE__ */ e.jsx("td", { style: { backgroundColor: c.length > 0 && c[0].backgroundColor ? c[0].backgroundColor : s, height: i }, children: t.template ? t.template(c, n) : c.map((l, a) => /* @__PURE__ */ e.jsx(
|
|
4225
4224
|
"p",
|
|
4226
4225
|
{
|
|
4227
|
-
style: { color:
|
|
4228
|
-
className:
|
|
4229
|
-
onClick:
|
|
4230
|
-
children:
|
|
4226
|
+
style: { color: l.color ?? r },
|
|
4227
|
+
className: l.onClick ? "no-click" : "",
|
|
4228
|
+
onClick: l.onClick,
|
|
4229
|
+
children: l.content
|
|
4231
4230
|
},
|
|
4232
4231
|
a
|
|
4233
4232
|
)) });
|
|
@@ -4238,15 +4237,15 @@ const gs = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
4238
4237
|
onContextMenu: s,
|
|
4239
4238
|
onDelete: i,
|
|
4240
4239
|
onEdit: o,
|
|
4241
|
-
onClickRow:
|
|
4242
|
-
index:
|
|
4240
|
+
onClickRow: c,
|
|
4241
|
+
index: l,
|
|
4243
4242
|
maxH: a
|
|
4244
4243
|
}) => {
|
|
4245
4244
|
const d = N(
|
|
4246
4245
|
(u) => {
|
|
4247
|
-
u.target.closest(".no-click") ||
|
|
4246
|
+
u.target.closest(".no-click") || c == null || c(t, l);
|
|
4248
4247
|
},
|
|
4249
|
-
[
|
|
4248
|
+
[l, c, t]
|
|
4250
4249
|
);
|
|
4251
4250
|
return /* @__PURE__ */ e.jsxs("tr", { className: "table-row", onClick: d, children: [
|
|
4252
4251
|
r.map((u, x) => /* @__PURE__ */ e.jsx(
|
|
@@ -4265,18 +4264,18 @@ const gs = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
4265
4264
|
{
|
|
4266
4265
|
transparent: !0,
|
|
4267
4266
|
icon: u.icon,
|
|
4268
|
-
onClick: (f) => u.onClick(f, t,
|
|
4267
|
+
onClick: (f) => u.onClick(f, t, l)
|
|
4269
4268
|
},
|
|
4270
4269
|
x
|
|
4271
4270
|
)) }) }),
|
|
4272
4271
|
(s || i || o) && /* @__PURE__ */ e.jsx("td", { className: "w-[180px] table-edit-button no-click", children: /* @__PURE__ */ e.jsxs("div", { className: "table-edit-button", children: [
|
|
4273
|
-
o && /* @__PURE__ */ e.jsx(ye, { transparent: !0, icon: /* @__PURE__ */ e.jsx(mt, {}), onClick: () => o(t,
|
|
4272
|
+
o && /* @__PURE__ */ e.jsx(ye, { transparent: !0, icon: /* @__PURE__ */ e.jsx(mt, {}), onClick: () => o(t, l) }),
|
|
4274
4273
|
i && /* @__PURE__ */ e.jsx(
|
|
4275
4274
|
ye,
|
|
4276
4275
|
{
|
|
4277
4276
|
transparent: !0,
|
|
4278
4277
|
icon: /* @__PURE__ */ e.jsx(dt, { className: "text-red-500" }),
|
|
4279
|
-
onClick: () => i(t,
|
|
4278
|
+
onClick: () => i(t, l)
|
|
4280
4279
|
}
|
|
4281
4280
|
),
|
|
4282
4281
|
s && /* @__PURE__ */ e.jsx(
|
|
@@ -4284,7 +4283,7 @@ const gs = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
4284
4283
|
{
|
|
4285
4284
|
transparent: !0,
|
|
4286
4285
|
icon: /* @__PURE__ */ e.jsx(ft, {}),
|
|
4287
|
-
onClick: (u) => s(u, t,
|
|
4286
|
+
onClick: (u) => s(u, t, l)
|
|
4288
4287
|
}
|
|
4289
4288
|
)
|
|
4290
4289
|
] }) })
|
|
@@ -4296,12 +4295,12 @@ const gs = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
4296
4295
|
onContextMenu: s,
|
|
4297
4296
|
onEdit: i,
|
|
4298
4297
|
actions: o,
|
|
4299
|
-
onClickRow:
|
|
4298
|
+
onClickRow: c
|
|
4300
4299
|
}) => {
|
|
4301
|
-
const
|
|
4300
|
+
const l = ge(
|
|
4302
4301
|
() => t ?? _s(n),
|
|
4303
4302
|
[n, t]
|
|
4304
|
-
), a =
|
|
4303
|
+
), a = l.length + (o ? 1 : 0) + (r || s || i ? 1 : 0), d = (u) => u ? (Array.isArray(u) ? u : [u]).map((f, m) => typeof f == "string" || typeof f == "number" ? /* @__PURE__ */ e.jsx("span", { children: f }, m) : /* @__PURE__ */ e.jsx(
|
|
4305
4304
|
"span",
|
|
4306
4305
|
{
|
|
4307
4306
|
style: { color: f.color },
|
|
@@ -4310,9 +4309,9 @@ const gs = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
4310
4309
|
},
|
|
4311
4310
|
m
|
|
4312
4311
|
)) : null;
|
|
4313
|
-
return /* @__PURE__ */ e.jsx("div", { className: `table-container mt-3 ${
|
|
4312
|
+
return /* @__PURE__ */ e.jsx("div", { className: `table-container mt-3 ${c ? "clicked" : ""}`, children: /* @__PURE__ */ e.jsxs("table", { children: [
|
|
4314
4313
|
/* @__PURE__ */ e.jsx("thead", { children: /* @__PURE__ */ e.jsxs("tr", { children: [
|
|
4315
|
-
|
|
4314
|
+
l.map((u) => /* @__PURE__ */ e.jsx("th", { className: "min-width", children: u.title }, u.field)),
|
|
4316
4315
|
o && /* @__PURE__ */ e.jsx("th", { className: "table-actions-header", children: "actions" }),
|
|
4317
4316
|
(r || s || i) && /* @__PURE__ */ e.jsx("th", { className: "table-actions-header" })
|
|
4318
4317
|
] }) }),
|
|
@@ -4324,10 +4323,10 @@ const gs = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
4324
4323
|
return /* @__PURE__ */ e.jsx(
|
|
4325
4324
|
bs,
|
|
4326
4325
|
{
|
|
4327
|
-
onClickRow:
|
|
4326
|
+
onClickRow: c,
|
|
4328
4327
|
actions: o,
|
|
4329
4328
|
index: x,
|
|
4330
|
-
columns:
|
|
4329
|
+
columns: l,
|
|
4331
4330
|
item: u,
|
|
4332
4331
|
onDelete: r,
|
|
4333
4332
|
onContextMenu: s,
|
|
@@ -4419,10 +4418,10 @@ const Ns = ({ item: n, onHide: t }) => {
|
|
|
4419
4418
|
) })
|
|
4420
4419
|
] });
|
|
4421
4420
|
};
|
|
4422
|
-
const Hi = ({ visible: n, firstBtn: t, mainBtn: r, onHide: s, otherBtn: i, backBtn: o, openAlways:
|
|
4423
|
-
const
|
|
4421
|
+
const Hi = ({ visible: n, firstBtn: t, mainBtn: r, onHide: s, otherBtn: i, backBtn: o, openAlways: c }) => {
|
|
4422
|
+
const l = (a, d) => a.type === "button" ? /* @__PURE__ */ e.jsx(Je, { active: a.active, onClick: a.onClick, title: a.text, icon: a.icon }, d) : a.type === "link" ? /* @__PURE__ */ e.jsx(Vt, { onClick: () => s(), title: a.text, icon: a.icon, to: a.to }, d) : a.type === "submenu" ? /* @__PURE__ */ e.jsx(Ns, { item: a, onHide: s }, d) : null;
|
|
4424
4423
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
4425
|
-
/* @__PURE__ */ e.jsxs("div", { className: `navigation-drawer ${n ||
|
|
4424
|
+
/* @__PURE__ */ e.jsxs("div", { className: `navigation-drawer ${n || c ? "navigation-drawer_show" : "navigation-drawer_hide"}`, children: [
|
|
4426
4425
|
t ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
4427
4426
|
/* @__PURE__ */ e.jsxs("div", { className: "navigation-drawer__block", children: [
|
|
4428
4427
|
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__header" }),
|
|
@@ -4432,17 +4431,17 @@ const Hi = ({ visible: n, firstBtn: t, mainBtn: r, onHide: s, otherBtn: i, backB
|
|
|
4432
4431
|
] }) : null,
|
|
4433
4432
|
/* @__PURE__ */ e.jsxs("div", { className: "navigation-drawer__block", children: [
|
|
4434
4433
|
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__header" }),
|
|
4435
|
-
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__content", children: r && r.map(
|
|
4434
|
+
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__content", children: r && r.map(l) })
|
|
4436
4435
|
] }),
|
|
4437
4436
|
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__divider", children: /* @__PURE__ */ e.jsx(je, {}) }),
|
|
4438
4437
|
/* @__PURE__ */ e.jsxs("div", { className: "navigation-drawer__block", children: [
|
|
4439
4438
|
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__header" }),
|
|
4440
|
-
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__content", children: i && i.map(
|
|
4439
|
+
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__content", children: i && i.map(l) })
|
|
4441
4440
|
] }),
|
|
4442
4441
|
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__divider", children: /* @__PURE__ */ e.jsx(je, {}) }),
|
|
4443
4442
|
o ? /* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block", children: /* @__PURE__ */ e.jsx(Je, { active: o.active, onClick: o.onClick, title: o.text, icon: o.icon }) }) : null
|
|
4444
4443
|
] }),
|
|
4445
|
-
n && !
|
|
4444
|
+
n && !c ? /* @__PURE__ */ e.jsx("div", { className: "navigation-drawer-backplate", style: { zIndex: 1100 }, onClick: () => s() }) : null
|
|
4446
4445
|
] });
|
|
4447
4446
|
};
|
|
4448
4447
|
const ws = ({ icon: n, title: t, to: r }) => /* @__PURE__ */ e.jsxs(Sn, { to: r, className: "navigation-item navigation-item-rail", children: [
|
|
@@ -4499,13 +4498,13 @@ function Xn(n, t, r, s) {
|
|
|
4499
4498
|
const i = t.getBoundingClientRect();
|
|
4500
4499
|
let o = n.clientY - i.top;
|
|
4501
4500
|
o > i.height && (o = i.height), o < 0 && (o = 0);
|
|
4502
|
-
let
|
|
4503
|
-
|
|
4504
|
-
const
|
|
4505
|
-
s(Math.round(u), Math.round(d)), Tt(r,
|
|
4501
|
+
let c = n.clientX - i.left;
|
|
4502
|
+
c > i.width && (c = i.width), c < 0 && (c = 0);
|
|
4503
|
+
const l = o / i.height, a = c / i.width, d = 100 - 100 * l, u = 100 * a;
|
|
4504
|
+
s(Math.round(u), Math.round(d)), Tt(r, c, o);
|
|
4506
4505
|
}
|
|
4507
4506
|
function Ls(n, t, r, s) {
|
|
4508
|
-
const i = (
|
|
4507
|
+
const i = (c) => Xn(c, t, r, s);
|
|
4509
4508
|
Xn(n, t, r, s), r.classList.add("dragging"), window.addEventListener("mousemove", i), window.addEventListener("mouseup", o);
|
|
4510
4509
|
function o() {
|
|
4511
4510
|
r.classList.remove("dragging"), window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", o);
|
|
@@ -4531,11 +4530,11 @@ function Jn(n, t, r, s) {
|
|
|
4531
4530
|
const i = t.getBoundingClientRect();
|
|
4532
4531
|
let o = n.clientY - i.top;
|
|
4533
4532
|
o > i.height && (o = i.height), o < 0 && (o = 0);
|
|
4534
|
-
const
|
|
4535
|
-
s(
|
|
4533
|
+
const l = 360 - 360 * (o / i.height);
|
|
4534
|
+
s(l), Ot(r, o);
|
|
4536
4535
|
}
|
|
4537
4536
|
function Es(n, t, r, s) {
|
|
4538
|
-
const i = (
|
|
4537
|
+
const i = (c) => Jn(c, r, t, s);
|
|
4539
4538
|
Jn(n, r, t, s), t.classList.add("dragging"), window.addEventListener("mousemove", i), window.addEventListener("mouseup", o);
|
|
4540
4539
|
function o() {
|
|
4541
4540
|
t.classList.remove("dragging"), window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", o);
|
|
@@ -4570,8 +4569,8 @@ const Fs = [
|
|
|
4570
4569
|
onAddColor: s,
|
|
4571
4570
|
autoHide: i,
|
|
4572
4571
|
defaultColor: o,
|
|
4573
|
-
userColors:
|
|
4574
|
-
width:
|
|
4572
|
+
userColors: c = [],
|
|
4573
|
+
width: l = 310,
|
|
4575
4574
|
height: a = "auto"
|
|
4576
4575
|
}) => {
|
|
4577
4576
|
const d = U(null), u = U(null), x = U(null), f = U(null), [m, _] = k(Vs(t)), [j, p] = k(!1), [C, g] = k(
|
|
@@ -4639,8 +4638,8 @@ const Fs = [
|
|
|
4639
4638
|
console.warn("Invalid color format");
|
|
4640
4639
|
}
|
|
4641
4640
|
}, z = N(() => {
|
|
4642
|
-
s == null || s([...
|
|
4643
|
-
}, [s,
|
|
4641
|
+
s == null || s([...c, v]);
|
|
4642
|
+
}, [s, c, v]), L = N(() => {
|
|
4644
4643
|
r == null || r(v), i && (n == null || n());
|
|
4645
4644
|
}, [r, v]), P = N(
|
|
4646
4645
|
(y, F) => {
|
|
@@ -4659,7 +4658,7 @@ const Fs = [
|
|
|
4659
4658
|
className: "color-picker-panel",
|
|
4660
4659
|
onHide: n,
|
|
4661
4660
|
clearStyle: !0,
|
|
4662
|
-
style: { width:
|
|
4661
|
+
style: { width: l, height: a },
|
|
4663
4662
|
children: [
|
|
4664
4663
|
/* @__PURE__ */ e.jsxs("div", { className: "panel-row", style: { padding: 0 }, children: [
|
|
4665
4664
|
/* @__PURE__ */ e.jsx("div", { className: "swatches default-swatches", children: Fs.map((y, F) => /* @__PURE__ */ e.jsx(
|
|
@@ -4762,9 +4761,9 @@ const Fs = [
|
|
|
4762
4761
|
}
|
|
4763
4762
|
)
|
|
4764
4763
|
] }),
|
|
4765
|
-
|
|
4764
|
+
c.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "panel-row", style: { padding: 0 }, children: [
|
|
4766
4765
|
/* @__PURE__ */ e.jsx("h2", { className: "panel-header", children: "User Colors" }),
|
|
4767
|
-
/* @__PURE__ */ e.jsx("div", { id: "user-swatches", className: "swatches custom-swatches", children:
|
|
4766
|
+
/* @__PURE__ */ e.jsx("div", { id: "user-swatches", className: "swatches custom-swatches", children: c.map((y, F) => /* @__PURE__ */ e.jsx(
|
|
4768
4767
|
"button",
|
|
4769
4768
|
{
|
|
4770
4769
|
onClick: () => A(y),
|
|
@@ -4823,8 +4822,8 @@ const Fs = [
|
|
|
4823
4822
|
value: s = "#f00",
|
|
4824
4823
|
className: i = "",
|
|
4825
4824
|
transparent: o = !1,
|
|
4826
|
-
userColors:
|
|
4827
|
-
onAddColor:
|
|
4825
|
+
userColors: c = [],
|
|
4826
|
+
onAddColor: l,
|
|
4828
4827
|
defaultColor: a,
|
|
4829
4828
|
placeholder: d
|
|
4830
4829
|
}) => {
|
|
@@ -4873,12 +4872,12 @@ const Fs = [
|
|
|
4873
4872
|
}
|
|
4874
4873
|
)
|
|
4875
4874
|
] }),
|
|
4876
|
-
u && /* @__PURE__ */ e.jsx(
|
|
4875
|
+
u && /* @__PURE__ */ e.jsx($e, { container: r, children: /* @__PURE__ */ e.jsx(
|
|
4877
4876
|
Ts,
|
|
4878
4877
|
{
|
|
4879
4878
|
defaultColor: a,
|
|
4880
|
-
userColors:
|
|
4881
|
-
onAddColor:
|
|
4879
|
+
userColors: c,
|
|
4880
|
+
onAddColor: l,
|
|
4882
4881
|
onChange: j,
|
|
4883
4882
|
beginColor: f,
|
|
4884
4883
|
onHide: p
|
|
@@ -4900,7 +4899,7 @@ const Os = 2050, Qn = 1900, Se = [
|
|
|
4900
4899
|
"November",
|
|
4901
4900
|
"December"
|
|
4902
4901
|
], Ds = () => Array(Os - Qn).fill(0).map((n, t) => Qn + t), Is = ({ onChange: n, onHide: t }) => {
|
|
4903
|
-
const [r] = k(Se[(/* @__PURE__ */ new Date()).getMonth()]), [s] = k((/* @__PURE__ */ new Date()).getFullYear()), [i] = k((/* @__PURE__ */ new Date()).getDate()), [o,
|
|
4902
|
+
const [r] = k(Se[(/* @__PURE__ */ new Date()).getMonth()]), [s] = k((/* @__PURE__ */ new Date()).getFullYear()), [i] = k((/* @__PURE__ */ new Date()).getDate()), [o, c] = k(Se[(/* @__PURE__ */ new Date()).getMonth()]), [l, a] = k((/* @__PURE__ */ new Date()).getFullYear()), [d, u] = k({
|
|
4904
4903
|
day: (/* @__PURE__ */ new Date()).getDate(),
|
|
4905
4904
|
type: "NOW_MONTH"
|
|
4906
4905
|
/* NOW_MONTH */
|
|
@@ -4919,13 +4918,13 @@ const Os = 2050, Qn = 1900, Se = [
|
|
|
4919
4918
|
f(
|
|
4920
4919
|
"DAYS"
|
|
4921
4920
|
/* DAYS */
|
|
4922
|
-
),
|
|
4921
|
+
), c(v);
|
|
4923
4922
|
}, g = (v) => {
|
|
4924
4923
|
u(v);
|
|
4925
4924
|
}, w = N(() => {
|
|
4926
4925
|
let v = /* @__PURE__ */ new Date();
|
|
4927
|
-
v.setFullYear(
|
|
4928
|
-
}, [o,
|
|
4926
|
+
v.setFullYear(l), d.type === "NEXT_MONTH" ? o === Se[11] ? (v.setMonth(0), v.setFullYear(l + 1)) : v.setMonth(Se.indexOf(o) + 1) : d.type === "PREV_MONTH" ? o === Se[0] ? (v.setMonth(11), v.setFullYear(l - 1)) : v.setMonth(Se.indexOf(o) - 1) : v.setMonth(Se.indexOf(o)), v.setDate(d.day), n && n(v.getFullYear(), v.getMonth(), v.getDate()), t && t();
|
|
4927
|
+
}, [o, l, n, t, d]);
|
|
4929
4928
|
return /* @__PURE__ */ e.jsxs(xn, { className: "calendar-body-container", style: { maxWidth: "328px" }, children: [
|
|
4930
4929
|
/* @__PURE__ */ e.jsxs("div", { className: "calendar-body-select-container", children: [
|
|
4931
4930
|
/* @__PURE__ */ e.jsx("div", { className: "month", children: /* @__PURE__ */ e.jsxs("span", { className: x === "MONTHS" ? "active" : "", onClick: () => f(
|
|
@@ -4940,7 +4939,7 @@ const Os = 2050, Qn = 1900, Se = [
|
|
|
4940
4939
|
"YEARS"
|
|
4941
4940
|
/* YEARS */
|
|
4942
4941
|
), children: [
|
|
4943
|
-
|
|
4942
|
+
l,
|
|
4944
4943
|
" ",
|
|
4945
4944
|
/* @__PURE__ */ e.jsx(ln, {})
|
|
4946
4945
|
] }) })
|
|
@@ -4949,7 +4948,7 @@ const Os = 2050, Qn = 1900, Se = [
|
|
|
4949
4948
|
/* @__PURE__ */ e.jsx("div", { className: "status-container", children: o === v ? /* @__PURE__ */ e.jsx(Le, {}) : null }),
|
|
4950
4949
|
/* @__PURE__ */ e.jsx("div", { className: "content", children: v })
|
|
4951
4950
|
] }, M)) }) : x === "YEARS" ? /* @__PURE__ */ e.jsx("div", { className: "calendar-body-years-container", children: Ds().map((v, M) => /* @__PURE__ */ e.jsxs("div", { className: "calendar-body-year-item", onClick: () => p(v), children: [
|
|
4952
|
-
/* @__PURE__ */ e.jsx("div", { className: "status-container", children:
|
|
4951
|
+
/* @__PURE__ */ e.jsx("div", { className: "status-container", children: l === v ? /* @__PURE__ */ e.jsx(Le, {}) : null }),
|
|
4953
4952
|
/* @__PURE__ */ e.jsx("div", { className: "content", children: v })
|
|
4954
4953
|
] }, M)) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
4955
4954
|
/* @__PURE__ */ e.jsxs("div", { className: "calendar-body-dayofweek-container", children: [
|
|
@@ -4961,7 +4960,7 @@ const Os = 2050, Qn = 1900, Se = [
|
|
|
4961
4960
|
/* @__PURE__ */ e.jsx("span", { children: "S" }),
|
|
4962
4961
|
/* @__PURE__ */ e.jsx("span", { children: "S" })
|
|
4963
4962
|
] }),
|
|
4964
|
-
/* @__PURE__ */ e.jsx("div", { className: "calendar-body-days-container", children: j(
|
|
4963
|
+
/* @__PURE__ */ e.jsx("div", { className: "calendar-body-days-container", children: j(l, Se.indexOf(o)).map((v, M) => /* @__PURE__ */ e.jsx("div", { className: `day ${v.type !== "NOW_MONTH" ? "other" : ""} ${i === v.day && l === s && o === r ? "now" : ""} ${v.day === d.day && v.type === d.type ? "select" : ""}`, onClick: () => g(v), children: v.day }, M)) })
|
|
4965
4964
|
] }),
|
|
4966
4965
|
/* @__PURE__ */ e.jsxs("div", { className: "calendar-body-action-container", children: [
|
|
4967
4966
|
/* @__PURE__ */ e.jsx(be, { className: "little m-0", onClick: t, children: "Cancel" }),
|
|
@@ -4975,13 +4974,13 @@ const Os = 2050, Qn = 1900, Se = [
|
|
|
4975
4974
|
value: s,
|
|
4976
4975
|
className: i,
|
|
4977
4976
|
error: o,
|
|
4978
|
-
container:
|
|
4979
|
-
errorText:
|
|
4977
|
+
container: c,
|
|
4978
|
+
errorText: l,
|
|
4980
4979
|
helperText: a,
|
|
4981
4980
|
size: d = "medium",
|
|
4982
4981
|
disabled: u
|
|
4983
4982
|
}) => {
|
|
4984
|
-
const [x, f] = k(s ?? ""), [m, _] = k(!1), j = o ||
|
|
4983
|
+
const [x, f] = k(s ?? ""), [m, _] = k(!1), j = o || l, p = () => {
|
|
4985
4984
|
_(!0);
|
|
4986
4985
|
}, C = (M) => {
|
|
4987
4986
|
let R = String(M + 1);
|
|
@@ -5019,8 +5018,8 @@ const Os = 2050, Qn = 1900, Se = [
|
|
|
5019
5018
|
}
|
|
5020
5019
|
) })
|
|
5021
5020
|
] }),
|
|
5022
|
-
m ? /* @__PURE__ */ e.jsx(
|
|
5023
|
-
j &&
|
|
5021
|
+
m ? /* @__PURE__ */ e.jsx($e, { container: c, children: /* @__PURE__ */ e.jsx(Is, { onChange: w, onHide: () => _(!1) }) }) : null,
|
|
5022
|
+
j && l && /* @__PURE__ */ e.jsx(K, { type: "small", className: "input-field-container__error-text", children: l }),
|
|
5024
5023
|
a && !j && /* @__PURE__ */ e.jsx(K, { type: "small", className: "input-field-container__helper-text", children: a })
|
|
5025
5024
|
] });
|
|
5026
5025
|
};
|
|
@@ -5043,19 +5042,19 @@ const Ps = {
|
|
|
5043
5042
|
I(() => {
|
|
5044
5043
|
t && o(t);
|
|
5045
5044
|
}, [t]);
|
|
5046
|
-
const
|
|
5045
|
+
const c = N((a) => (d) => {
|
|
5047
5046
|
o((u) => {
|
|
5048
5047
|
const x = d.target.checked ? [...u, a] : u.filter((f) => f !== a);
|
|
5049
5048
|
return n == null || n(x), x;
|
|
5050
5049
|
});
|
|
5051
|
-
}, [n]),
|
|
5050
|
+
}, [n]), l = N((a) => i.includes(a), [i]);
|
|
5052
5051
|
return /* @__PURE__ */ e.jsx("div", { className: `days-week-field-container ${r}`, children: Bs.map((a) => /* @__PURE__ */ e.jsxs("label", { className: "day-of-week-label", children: [
|
|
5053
5052
|
/* @__PURE__ */ e.jsx(
|
|
5054
5053
|
"input",
|
|
5055
5054
|
{
|
|
5056
5055
|
type: "checkbox",
|
|
5057
|
-
onChange:
|
|
5058
|
-
checked:
|
|
5056
|
+
onChange: c(a),
|
|
5057
|
+
checked: l(a),
|
|
5059
5058
|
"aria-label": s[a] || a
|
|
5060
5059
|
}
|
|
5061
5060
|
),
|
|
@@ -5072,8 +5071,8 @@ const zs = ({
|
|
|
5072
5071
|
border: s = !1,
|
|
5073
5072
|
placeholder: i = "Добавить значение",
|
|
5074
5073
|
addButtonLabel: o = "Добавить",
|
|
5075
|
-
separator:
|
|
5076
|
-
disabled:
|
|
5074
|
+
separator: c = ",",
|
|
5075
|
+
disabled: l = !1,
|
|
5077
5076
|
className: a,
|
|
5078
5077
|
ariaLabel: d = "Добавление нового элемента",
|
|
5079
5078
|
chipsAriaLabel: u = "Список элементов",
|
|
@@ -5084,8 +5083,8 @@ const zs = ({
|
|
|
5084
5083
|
}) => {
|
|
5085
5084
|
const [j, p] = k([]), [C, g] = k(""), [w, v] = k(null);
|
|
5086
5085
|
I(() => {
|
|
5087
|
-
p(Ws(t,
|
|
5088
|
-
}, [t,
|
|
5086
|
+
p(Ws(t, c));
|
|
5087
|
+
}, [t, c]);
|
|
5089
5088
|
const M = (L) => {
|
|
5090
5089
|
g(L);
|
|
5091
5090
|
}, R = (L) => {
|
|
@@ -5094,10 +5093,10 @@ const zs = ({
|
|
|
5094
5093
|
if (C.trim() === "" || j.includes(C.trim()))
|
|
5095
5094
|
return;
|
|
5096
5095
|
const L = [...j, C.trim()];
|
|
5097
|
-
p(L), r == null || r(et(L,
|
|
5098
|
-
}, [j, C, r,
|
|
5096
|
+
p(L), r == null || r(et(L, c)), g(""), v(L.length - 1);
|
|
5097
|
+
}, [j, C, r, c]), z = (L) => {
|
|
5099
5098
|
const P = j.filter((B, H) => H !== L);
|
|
5100
|
-
p(P), r == null || r(et(P,
|
|
5099
|
+
p(P), r == null || r(et(P, c)), v(L > 0 ? L - 1 : null);
|
|
5101
5100
|
};
|
|
5102
5101
|
return /* @__PURE__ */ e.jsxs(
|
|
5103
5102
|
"div",
|
|
@@ -5117,7 +5116,7 @@ const zs = ({
|
|
|
5117
5116
|
error: f,
|
|
5118
5117
|
errorText: m,
|
|
5119
5118
|
helperText: _,
|
|
5120
|
-
disabled:
|
|
5119
|
+
disabled: l,
|
|
5121
5120
|
"aria-label": d,
|
|
5122
5121
|
"aria-describedby": x ? `${x}-help` : void 0
|
|
5123
5122
|
}
|
|
@@ -5140,7 +5139,7 @@ const zs = ({
|
|
|
5140
5139
|
{
|
|
5141
5140
|
text: L,
|
|
5142
5141
|
onDelete: () => z(P),
|
|
5143
|
-
disabled:
|
|
5142
|
+
disabled: l,
|
|
5144
5143
|
"aria-label": `Элемент: ${L}`,
|
|
5145
5144
|
"aria-selected": w === P,
|
|
5146
5145
|
role: "option",
|
|
@@ -5156,7 +5155,7 @@ const zs = ({
|
|
|
5156
5155
|
{
|
|
5157
5156
|
onClick: A,
|
|
5158
5157
|
className: "more-text-btn",
|
|
5159
|
-
disabled:
|
|
5158
|
+
disabled: l || !C.trim(),
|
|
5160
5159
|
"aria-label": `${o} элемент`,
|
|
5161
5160
|
children: o
|
|
5162
5161
|
}
|
|
@@ -5176,8 +5175,8 @@ const Dt = ce.forwardRef(({
|
|
|
5176
5175
|
readOnly: s,
|
|
5177
5176
|
border: i,
|
|
5178
5177
|
onClear: o,
|
|
5179
|
-
icon:
|
|
5180
|
-
onChange:
|
|
5178
|
+
icon: c,
|
|
5179
|
+
onChange: l,
|
|
5181
5180
|
name: a,
|
|
5182
5181
|
value: d,
|
|
5183
5182
|
placeholder: u,
|
|
@@ -5203,10 +5202,10 @@ const Dt = ce.forwardRef(({
|
|
|
5203
5202
|
const D = F.current.querySelector("input");
|
|
5204
5203
|
D && D.focus();
|
|
5205
5204
|
}, te = N((D, W) => {
|
|
5206
|
-
|
|
5207
|
-
y.current && (clearTimeout(y.current), y.current = null),
|
|
5205
|
+
l && (y.current && (clearTimeout(y.current), y.current = null), y.current = setTimeout(() => {
|
|
5206
|
+
y.current && (clearTimeout(y.current), y.current = null), l(D, W);
|
|
5208
5207
|
}, 100));
|
|
5209
|
-
}, [
|
|
5208
|
+
}, [l]), ue = N(() => {
|
|
5210
5209
|
Q((D) => {
|
|
5211
5210
|
let W = D ? D + v : v;
|
|
5212
5211
|
return typeof p == "number" && W > p && (W = p), te(W, a), W;
|
|
@@ -5233,7 +5232,7 @@ const Dt = ce.forwardRef(({
|
|
|
5233
5232
|
}, 100);
|
|
5234
5233
|
}, 500);
|
|
5235
5234
|
}, [ue, oe]), Ne = (D) => {
|
|
5236
|
-
q === "" && (Q(0),
|
|
5235
|
+
q === "" && (Q(0), l == null || l(0)), _ == null || _(D);
|
|
5237
5236
|
};
|
|
5238
5237
|
I(() => {
|
|
5239
5238
|
ne(f, d);
|
|
@@ -5263,7 +5262,7 @@ const Dt = ce.forwardRef(({
|
|
|
5263
5262
|
"aria-disabled": w,
|
|
5264
5263
|
"aria-invalid": $,
|
|
5265
5264
|
children: [
|
|
5266
|
-
|
|
5265
|
+
c ? /* @__PURE__ */ e.jsx("div", { className: "input-field__icon-container", onClick: X, "aria-hidden": "true", children: c }) : null,
|
|
5267
5266
|
/* @__PURE__ */ e.jsxs("div", { ref: F, className: "input-field__input-container", onClick: X, children: [
|
|
5268
5267
|
/* @__PURE__ */ e.jsx(
|
|
5269
5268
|
"input",
|
|
@@ -5361,8 +5360,8 @@ const It = ce.forwardRef(
|
|
|
5361
5360
|
transparent: s,
|
|
5362
5361
|
readOnly: i,
|
|
5363
5362
|
border: o,
|
|
5364
|
-
onClear:
|
|
5365
|
-
icon:
|
|
5363
|
+
onClear: c,
|
|
5364
|
+
icon: l,
|
|
5366
5365
|
onChange: a,
|
|
5367
5366
|
name: d,
|
|
5368
5367
|
value: u,
|
|
@@ -5410,7 +5409,7 @@ const It = ce.forwardRef(
|
|
|
5410
5409
|
`,
|
|
5411
5410
|
onClick: O,
|
|
5412
5411
|
children: [
|
|
5413
|
-
|
|
5412
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "input-field__icon-container", "aria-hidden": "true", children: l }),
|
|
5414
5413
|
/* @__PURE__ */ e.jsxs("div", { className: "input-field__input-container input-field__text-area__input-container", ref: z, children: [
|
|
5415
5414
|
/* @__PURE__ */ e.jsx(
|
|
5416
5415
|
"textarea",
|
|
@@ -5444,7 +5443,7 @@ const It = ce.forwardRef(
|
|
|
5444
5443
|
}
|
|
5445
5444
|
)
|
|
5446
5445
|
] }),
|
|
5447
|
-
|
|
5446
|
+
c && u && !g && /* @__PURE__ */ e.jsx("div", { className: "input-field__icon-container input-field__icon-container__clear-btn", onClick: c, children: /* @__PURE__ */ e.jsx(ke, { "aria-label": "Clear textarea" }) })
|
|
5448
5447
|
]
|
|
5449
5448
|
}
|
|
5450
5449
|
),
|
|
@@ -5454,8 +5453,8 @@ const It = ce.forwardRef(
|
|
|
5454
5453
|
}
|
|
5455
5454
|
);
|
|
5456
5455
|
It.displayName = "TextArea";
|
|
5457
|
-
const Gs = ({ setHours: n, setMinutes: t, switchMode: r, hours: s, minutes: i, onCancel: o, onOK:
|
|
5458
|
-
const [
|
|
5456
|
+
const Gs = ({ setHours: n, setMinutes: t, switchMode: r, hours: s, minutes: i, onCancel: o, onOK: c }) => {
|
|
5457
|
+
const [l, a] = k(!1), d = N((f) => {
|
|
5459
5458
|
n(f), a(!0);
|
|
5460
5459
|
}, [n]), u = N((f) => {
|
|
5461
5460
|
t(f), a(!1);
|
|
@@ -5475,11 +5474,11 @@ const Gs = ({ setHours: n, setMinutes: t, switchMode: r, hours: s, minutes: i, o
|
|
|
5475
5474
|
/* @__PURE__ */ e.jsx("span", { className: "text-sm", children: "Minute" })
|
|
5476
5475
|
] })
|
|
5477
5476
|
] }),
|
|
5478
|
-
/* @__PURE__ */ e.jsx("div", { className: "clock-input-container", children:
|
|
5477
|
+
/* @__PURE__ */ e.jsx("div", { className: "clock-input-container", children: l ? /* @__PURE__ */ e.jsx(Ys, { setMinutes: u }) : /* @__PURE__ */ e.jsx(Zs, { setHours: d }) }),
|
|
5479
5478
|
/* @__PURE__ */ e.jsxs("div", { className: "enter-time-action", children: [
|
|
5480
5479
|
/* @__PURE__ */ e.jsx("div", { className: "enter-time-icon", onClick: () => r(), children: /* @__PURE__ */ e.jsx(jt, {}) }),
|
|
5481
5480
|
/* @__PURE__ */ e.jsx(be, { className: "little", onClick: x, children: "Cancel" }),
|
|
5482
|
-
/* @__PURE__ */ e.jsx(be, { className: "little", onClick:
|
|
5481
|
+
/* @__PURE__ */ e.jsx(be, { className: "little", onClick: c, children: "OK" })
|
|
5483
5482
|
] })
|
|
5484
5483
|
] });
|
|
5485
5484
|
};
|
|
@@ -5535,8 +5534,8 @@ function Ys({ setMinutes: n }) {
|
|
|
5535
5534
|
/* @__PURE__ */ e.jsx("span", { className: "center" })
|
|
5536
5535
|
] });
|
|
5537
5536
|
}
|
|
5538
|
-
const Us = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, onCancel: o, onOK:
|
|
5539
|
-
const
|
|
5537
|
+
const Us = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, onCancel: o, onOK: c }) => {
|
|
5538
|
+
const l = (d) => {
|
|
5540
5539
|
let u = Number(d.target.value);
|
|
5541
5540
|
u < 0 && (u = 0), u > 23 && (u = 23), n(u);
|
|
5542
5541
|
}, a = (d) => {
|
|
@@ -5547,7 +5546,7 @@ const Us = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5547
5546
|
/* @__PURE__ */ e.jsx("div", { className: "time-type", children: /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: "Enter time" }) }),
|
|
5548
5547
|
/* @__PURE__ */ e.jsxs("div", { className: "time-input-container", children: [
|
|
5549
5548
|
/* @__PURE__ */ e.jsxs("div", { className: "time-input hours", children: [
|
|
5550
|
-
/* @__PURE__ */ e.jsx("div", { className: "input-container", children: /* @__PURE__ */ e.jsx("input", { type: "number", min: 0, max: 23, value: i, onChange:
|
|
5549
|
+
/* @__PURE__ */ e.jsx("div", { className: "input-container", children: /* @__PURE__ */ e.jsx("input", { type: "number", min: 0, max: 23, value: i, onChange: l }) }),
|
|
5551
5550
|
/* @__PURE__ */ e.jsx("span", { className: "text-sm", children: "Hour" })
|
|
5552
5551
|
] }),
|
|
5553
5552
|
/* @__PURE__ */ e.jsx("div", { className: "time-separator", children: ":" }),
|
|
@@ -5559,18 +5558,18 @@ const Us = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5559
5558
|
/* @__PURE__ */ e.jsxs("div", { className: "enter-time-action", children: [
|
|
5560
5559
|
/* @__PURE__ */ e.jsx("div", { className: "enter-time-icon", onClick: () => r(), children: /* @__PURE__ */ e.jsx(Mn, {}) }),
|
|
5561
5560
|
/* @__PURE__ */ e.jsx(be, { className: "little", onClick: o, children: "Cancel" }),
|
|
5562
|
-
/* @__PURE__ */ e.jsx(be, { className: "little", onClick:
|
|
5561
|
+
/* @__PURE__ */ e.jsx(be, { className: "little", onClick: c, children: "OK" })
|
|
5563
5562
|
] })
|
|
5564
5563
|
] });
|
|
5565
5564
|
}, Ks = (n) => {
|
|
5566
|
-
const [t, r] = k(n.minutes ?? 0), [s, i] = k(n.hours ?? 0), [o,
|
|
5565
|
+
const [t, r] = k(n.minutes ?? 0), [s, i] = k(n.hours ?? 0), [o, c] = k(!0), l = () => {
|
|
5567
5566
|
n.onHide && n.onHide(), r(0), i(0);
|
|
5568
5567
|
}, a = N((u) => {
|
|
5569
5568
|
r(u), n.onChange && n.onChange(s, u), n.onHide && n.onHide();
|
|
5570
5569
|
}, [s]), d = N(() => {
|
|
5571
5570
|
n.onChange && n.onChange(s, t), n.onHide && n.onHide();
|
|
5572
5571
|
}, [s, t]);
|
|
5573
|
-
return o ? /* @__PURE__ */ e.jsx(qe, { className: "enter-time-container", children: /* @__PURE__ */ e.jsx(Gs, { setMinutes: a, setHours: i, minutes: t, hours: s, switchMode: () =>
|
|
5572
|
+
return o ? /* @__PURE__ */ e.jsx(qe, { className: "enter-time-container", children: /* @__PURE__ */ e.jsx(Gs, { setMinutes: a, setHours: i, minutes: t, hours: s, switchMode: () => c(!1), onCancel: l, onOK: d }) }) : /* @__PURE__ */ e.jsx(qe, { className: "enter-time-container", children: /* @__PURE__ */ e.jsx(Us, { setMinutes: r, setHours: i, minutes: t, hours: s, switchMode: () => c(!0), onCancel: l, onOK: d }) });
|
|
5574
5573
|
}, Xs = {
|
|
5575
5574
|
small: "input-field__time-field_small",
|
|
5576
5575
|
medium: "input-field__time-field_medium",
|
|
@@ -5582,8 +5581,8 @@ const Us = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5582
5581
|
value: s = "",
|
|
5583
5582
|
className: i = "",
|
|
5584
5583
|
validEmptyValue: o,
|
|
5585
|
-
error:
|
|
5586
|
-
container:
|
|
5584
|
+
error: c,
|
|
5585
|
+
container: l,
|
|
5587
5586
|
disabled: a = !1,
|
|
5588
5587
|
errorText: d,
|
|
5589
5588
|
helperText: u,
|
|
@@ -5592,7 +5591,7 @@ const Us = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5592
5591
|
ariaLabelledby: m,
|
|
5593
5592
|
style: _
|
|
5594
5593
|
}) => {
|
|
5595
|
-
const [j, p] = k(s), [C, g] = k(!1), w =
|
|
5594
|
+
const [j, p] = k(s), [C, g] = k(!1), w = c || !!d;
|
|
5596
5595
|
I(() => {
|
|
5597
5596
|
p(s);
|
|
5598
5597
|
}, [s]);
|
|
@@ -5667,7 +5666,7 @@ const Us = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5667
5666
|
}
|
|
5668
5667
|
),
|
|
5669
5668
|
L,
|
|
5670
|
-
C && /* @__PURE__ */ e.jsx(
|
|
5669
|
+
C && /* @__PURE__ */ e.jsx($e, { container: l, children: /* @__PURE__ */ e.jsx(
|
|
5671
5670
|
Ks,
|
|
5672
5671
|
{
|
|
5673
5672
|
onHide: () => g(!1),
|
|
@@ -5682,15 +5681,15 @@ function Js(n, t, r, s, i) {
|
|
|
5682
5681
|
return s + (i - s) * ((n - t) / (r - t));
|
|
5683
5682
|
}
|
|
5684
5683
|
const kn = 0, Nn = 100, Zi = ({ showValue: n = !0, ...t }) => {
|
|
5685
|
-
const [r, s] = k(0), [i, o] = k(!1),
|
|
5684
|
+
const [r, s] = k(0), [i, o] = k(!1), c = U(null), l = U(null);
|
|
5686
5685
|
I(() => {
|
|
5687
5686
|
t.value ? s(t.value) : s(0);
|
|
5688
5687
|
}, [t.value]);
|
|
5689
5688
|
const a = (f) => {
|
|
5690
5689
|
s(Number(f.target.value)), t.onChange && t.onChange(f);
|
|
5691
5690
|
}, d = (f, m, _) => {
|
|
5692
|
-
if (
|
|
5693
|
-
let j = mn(
|
|
5691
|
+
if (c.current && l.current) {
|
|
5692
|
+
let j = mn(l.current);
|
|
5694
5693
|
if (j)
|
|
5695
5694
|
return Js(f, m, _, 0, _ - m) * (j.width - 20) / (_ - m);
|
|
5696
5695
|
}
|
|
@@ -5703,33 +5702,33 @@ const kn = 0, Nn = 100, Zi = ({ showValue: n = !0, ...t }) => {
|
|
|
5703
5702
|
return /* @__PURE__ */ e.jsx("div", { className: `range ${t.disabled ? "disabled" : ""}`, children: /* @__PURE__ */ e.jsxs("div", { className: "field", style: t.style, children: [
|
|
5704
5703
|
t.showMinMax ? /* @__PURE__ */ e.jsx("div", { className: "value left", children: t.min ?? kn }) : null,
|
|
5705
5704
|
/* @__PURE__ */ e.jsxs("div", { className: "field-range-container", children: [
|
|
5706
|
-
/* @__PURE__ */ e.jsx("div", { className: "slider-value", ref:
|
|
5705
|
+
/* @__PURE__ */ e.jsx("div", { className: "slider-value", ref: c, style: { width: d(r, t.min ?? kn, t.max ?? Nn) }, children: /* @__PURE__ */ e.jsx("div", { className: "slider-tooltip", style: { display: i ? "block" : "none" }, children: n && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
5707
5706
|
/* @__PURE__ */ e.jsx("span", { className: "slider-tooltip-container" }),
|
|
5708
5707
|
/* @__PURE__ */ e.jsx("span", { className: "slider-tooltip-value", children: r })
|
|
5709
5708
|
] }) }) }),
|
|
5710
|
-
/* @__PURE__ */ e.jsx("input", { disabled: t.disabled, onMouseUp: t.onMouseUp, ref:
|
|
5709
|
+
/* @__PURE__ */ e.jsx("input", { disabled: t.disabled, onMouseUp: t.onMouseUp, ref: l, step: t.step, type: "range", min: t.min ?? kn, max: t.max ?? Nn, onChange: a, value: r, onFocus: u, onBlur: x })
|
|
5711
5710
|
] }),
|
|
5712
5711
|
t.showMinMax ? /* @__PURE__ */ e.jsx("div", { className: "value right", children: t.max ?? Nn }) : null
|
|
5713
5712
|
] }) });
|
|
5714
5713
|
};
|
|
5715
|
-
const Yi = ({ className: n, text: t, title: r, hexColor: s, hexBackground: i, style: o, btn:
|
|
5714
|
+
const Yi = ({ className: n, text: t, title: r, hexColor: s, hexBackground: i, style: o, btn: c }) => /* @__PURE__ */ e.jsxs("div", { className: `alex-evo-sh-ui-kit-empty-page ${n ?? ""}`, style: { background: Jr(i), color: s, ...o }, children: [
|
|
5716
5715
|
/* @__PURE__ */ e.jsx("h2", { children: r }),
|
|
5717
5716
|
t ? /* @__PURE__ */ e.jsx("p", { children: t }) : null,
|
|
5718
|
-
|
|
5717
|
+
c ? /* @__PURE__ */ e.jsx(We, { styleType: c.styleType ?? "filled", style: c.style, className: c.className, onClick: c.onClick, children: c.text }) : null
|
|
5719
5718
|
] });
|
|
5720
|
-
const qs = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initComponent: o, onlyStringValue:
|
|
5721
|
-
const [
|
|
5719
|
+
const qs = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initComponent: o, onlyStringValue: c }) => {
|
|
5720
|
+
const [l, a] = k(""), [d, u] = k(""), [x, f] = k(!1), [m, _] = k(!0), j = N((w, v) => {
|
|
5722
5721
|
s({ ...r, [v]: w });
|
|
5723
5722
|
}, [s, r]), p = N(() => {
|
|
5724
5723
|
u(""), a(""), f(!1);
|
|
5725
5724
|
}, []), C = N(() => {
|
|
5726
5725
|
let w = d;
|
|
5727
5726
|
try {
|
|
5728
|
-
|
|
5727
|
+
c || (w = JSON.parse(w));
|
|
5729
5728
|
} catch {
|
|
5730
5729
|
}
|
|
5731
|
-
p(), s({ ...r, [
|
|
5732
|
-
}, [r, s,
|
|
5730
|
+
p(), s({ ...r, [l]: w });
|
|
5731
|
+
}, [r, s, l, d, p]), g = N((w) => {
|
|
5733
5732
|
let v = { ...r };
|
|
5734
5733
|
delete v[w], s(v);
|
|
5735
5734
|
}, [r, s]);
|
|
@@ -5747,7 +5746,7 @@ const qs = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initCompo
|
|
|
5747
5746
|
(w, v) => /* @__PURE__ */ e.jsx("div", { className: "json-line", children: /* @__PURE__ */ e.jsx(Fn, { readonly: n, onDelete: () => g(w), onChange: (M) => j(M, w), name: w, data: r[w] }) }, v)
|
|
5748
5747
|
) : null }) : null,
|
|
5749
5748
|
x && !n ? /* @__PURE__ */ e.jsxs("div", { className: "json-object-content", children: [
|
|
5750
|
-
/* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: /* @__PURE__ */ e.jsx("input", { size:
|
|
5749
|
+
/* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: /* @__PURE__ */ e.jsx("input", { size: l.length || 10, placeholder: "key", onChange: (w) => a(w.target.value), className: "json-base-data-input", type: "text", value: l }) }),
|
|
5751
5750
|
":",
|
|
5752
5751
|
/* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: /* @__PURE__ */ e.jsx("input", { size: d.length || 10, placeholder: "value", onChange: (w) => u(w.target.value), className: "json-base-data-input", type: "text", value: d }) }),
|
|
5753
5752
|
/* @__PURE__ */ e.jsx("span", { className: "json-base-data-btn-save json-base-data-btn", onClick: C, children: "save" }),
|
|
@@ -5758,20 +5757,20 @@ const qs = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initCompo
|
|
|
5758
5757
|
!n && !o ? /* @__PURE__ */ e.jsx("span", { className: "json-element json-btn", onClick: i, children: /* @__PURE__ */ e.jsx(fn, {}) }) : null
|
|
5759
5758
|
] })
|
|
5760
5759
|
] }) });
|
|
5761
|
-
}, Qs = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initComponent: o, onlyStringValue:
|
|
5762
|
-
const [
|
|
5760
|
+
}, Qs = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initComponent: o, onlyStringValue: c }) => {
|
|
5761
|
+
const [l, a] = k(""), [d, u] = k(!1), [x, f] = k(!0), m = N((C, g) => {
|
|
5763
5762
|
const w = r.slice();
|
|
5764
5763
|
w[g] = C, s(w);
|
|
5765
5764
|
}, [s, r]), _ = N(() => {
|
|
5766
5765
|
a(""), u(!1);
|
|
5767
5766
|
}, []), j = N(() => {
|
|
5768
|
-
let C =
|
|
5767
|
+
let C = l;
|
|
5769
5768
|
try {
|
|
5770
|
-
|
|
5769
|
+
c || (C = JSON.parse(C));
|
|
5771
5770
|
} catch {
|
|
5772
5771
|
}
|
|
5773
5772
|
_(), s([...r, C]);
|
|
5774
|
-
}, [r, s,
|
|
5773
|
+
}, [r, s, l, _]), p = N((C) => {
|
|
5775
5774
|
s(r.filter((g, w) => w !== C));
|
|
5776
5775
|
}, [r, s]);
|
|
5777
5776
|
return /* @__PURE__ */ e.jsx("div", { className: `json-card-container ${n ? "" : "changeable"}`, children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
@@ -5786,7 +5785,7 @@ const qs = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initCompo
|
|
|
5786
5785
|
] }),
|
|
5787
5786
|
x ? /* @__PURE__ */ e.jsx("div", { className: "json-object-content", children: r && r.map((C, g) => /* @__PURE__ */ e.jsx("div", { className: "json-line", children: /* @__PURE__ */ e.jsx(Fn, { readonly: n, onDelete: () => p(g), onChange: (w) => m(w, g), name: String(g), data: C }) }, g)) }) : null,
|
|
5788
5787
|
d ? /* @__PURE__ */ e.jsxs("div", { className: "json-object-content", children: [
|
|
5789
|
-
/* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: /* @__PURE__ */ e.jsx("input", { size:
|
|
5788
|
+
/* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: /* @__PURE__ */ e.jsx("input", { size: l.length || 10, placeholder: "value", onChange: (C) => a(C.target.value), className: "json-base-data-input", type: "text", value: l }) }),
|
|
5790
5789
|
/* @__PURE__ */ e.jsx("span", { className: "json-base-data-btn-save json-base-data-btn", onClick: j, children: "save" }),
|
|
5791
5790
|
/* @__PURE__ */ e.jsx("span", { className: "json-base-data-btn-cancel json-base-data-btn", onClick: _, children: "cancel" })
|
|
5792
5791
|
] }) : null,
|
|
@@ -5796,8 +5795,8 @@ const qs = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initCompo
|
|
|
5796
5795
|
] })
|
|
5797
5796
|
] }) });
|
|
5798
5797
|
}, ei = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i }) => {
|
|
5799
|
-
const o = N((
|
|
5800
|
-
s(
|
|
5798
|
+
const o = N((c) => {
|
|
5799
|
+
s(c.target.value);
|
|
5801
5800
|
}, [s]);
|
|
5802
5801
|
return /* @__PURE__ */ e.jsx("div", { className: `json-card-container ${n ? "" : "changeable"}`, children: /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "json-line", children: [
|
|
5803
5802
|
/* @__PURE__ */ e.jsx("span", { className: "json-object-name", children: t }),
|
|
@@ -5809,8 +5808,8 @@ const qs = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initCompo
|
|
|
5809
5808
|
] }) }) });
|
|
5810
5809
|
};
|
|
5811
5810
|
var At = /* @__PURE__ */ ((n) => (n.NONE = "NONE", n.ARRAY = "ARRAY", n.OBJECT = "OBJECT", n))(At || {});
|
|
5812
|
-
const Fn = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType: o, onlyStringValue:
|
|
5813
|
-
const [
|
|
5811
|
+
const Fn = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType: o, onlyStringValue: c }) => typeof r == "boolean" || typeof r == "number" || typeof r == "string" ? /* @__PURE__ */ e.jsx(ei, { readonly: n, onDelete: i, onChange: s, data: r, name: t }) : r ? Array.isArray(r) ? /* @__PURE__ */ e.jsx(Qs, { readonly: n, onDelete: i, onChange: s, data: r, name: t, initComponent: o === "ARRAY", onlyStringValue: c }) : /* @__PURE__ */ e.jsx(qs, { readonly: n, onDelete: i, onChange: s, data: r, name: t, initComponent: o === "OBJECT", onlyStringValue: c }) : null, Ui = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType: o = At.NONE, onlyStringValue: c }) => {
|
|
5812
|
+
const [l, a] = k(r || void 0), [d, u] = k(""), x = N((_) => {
|
|
5814
5813
|
n || (a(_), s && s(_));
|
|
5815
5814
|
}, [s]), f = N(() => {
|
|
5816
5815
|
n || (a(void 0), i && i());
|
|
@@ -5826,9 +5825,9 @@ const Fn = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5826
5825
|
}, [s, d]);
|
|
5827
5826
|
return I(() => {
|
|
5828
5827
|
a(r);
|
|
5829
|
-
}, [r]), !
|
|
5828
|
+
}, [r]), !l && n ? /* @__PURE__ */ e.jsx("div", { className: `json-object-content ${n ? "" : "changeable"}`, children: /* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: "value" }) }) : l ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
5830
5829
|
/* @__PURE__ */ e.jsx(Yn, { transparent: !0, text: JSON.stringify(r) }),
|
|
5831
|
-
/* @__PURE__ */ e.jsx(Fn, { readonly: n, onDelete: f, onChange: x, data:
|
|
5830
|
+
/* @__PURE__ */ e.jsx(Fn, { readonly: n, onDelete: f, onChange: x, data: l, baseType: o, name: t, onlyStringValue: c })
|
|
5832
5831
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: `json-object-content ${n ? "" : "changeable"}`, children: [
|
|
5833
5832
|
/* @__PURE__ */ e.jsx(Yn, { transparent: !0, text: JSON.stringify(r) }),
|
|
5834
5833
|
/* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: /* @__PURE__ */ e.jsx("input", { size: d.length || 10, placeholder: "value", onChange: (_) => u(_.target.value), className: "alex-evo-sh-ui-kit-json json-base-data-input", type: "text", value: d }) }),
|
|
@@ -5836,20 +5835,20 @@ const Fn = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5836
5835
|
] });
|
|
5837
5836
|
};
|
|
5838
5837
|
const Ki = ({ btn: n, btnComponent: t, onSearch: r, placeholder: s, autoChenge: i, border: o = !1 }) => {
|
|
5839
|
-
const
|
|
5840
|
-
|
|
5838
|
+
const c = U(null), [l, a] = k(""), [d, u] = k(!1), x = () => {
|
|
5839
|
+
c.current && (c.current.focus(), u(!0));
|
|
5841
5840
|
}, f = () => {
|
|
5842
|
-
|
|
5841
|
+
c.current && (c.current.focus(), c.current.value = ""), a(""), u(!0), i && r("");
|
|
5843
5842
|
}, m = () => {
|
|
5844
|
-
f(),
|
|
5843
|
+
f(), c.current && (c.current.blur(), u(!1));
|
|
5845
5844
|
}, _ = (p) => {
|
|
5846
5845
|
a(p.target.value), i && r(p.target.value);
|
|
5847
5846
|
}, j = (p) => {
|
|
5848
|
-
p.code === "Enter" && r(
|
|
5847
|
+
p.code === "Enter" && r(l);
|
|
5849
5848
|
};
|
|
5850
5849
|
return /* @__PURE__ */ e.jsx("div", { className: `search-container ${o ? "border" : ""}`, children: /* @__PURE__ */ e.jsxs("div", { className: "search-field", children: [
|
|
5851
5850
|
d ? /* @__PURE__ */ e.jsx("span", { onClick: m, children: /* @__PURE__ */ e.jsx(Ln, {}) }) : n ? /* @__PURE__ */ e.jsx("span", { onClick: n.onClick, children: n.icon }) : t || null,
|
|
5852
|
-
/* @__PURE__ */ e.jsx("input", { placeholder: s, type: "text", ref:
|
|
5851
|
+
/* @__PURE__ */ e.jsx("input", { placeholder: s, type: "text", ref: c, onChange: _, onKeyDown: j, value: l, onFocus: () => u(!0) }),
|
|
5853
5852
|
d ? /* @__PURE__ */ e.jsx("span", { onClick: f, children: /* @__PURE__ */ e.jsx(ke, {}) }) : /* @__PURE__ */ e.jsx("span", { onClick: x, children: /* @__PURE__ */ e.jsx($n, {}) })
|
|
5854
5853
|
] }) });
|
|
5855
5854
|
};
|
|
@@ -5861,15 +5860,15 @@ const ni = ({
|
|
|
5861
5860
|
onClose: i,
|
|
5862
5861
|
point: o = { x: 50, y: 50 }
|
|
5863
5862
|
}) => {
|
|
5864
|
-
const
|
|
5863
|
+
const c = U(null);
|
|
5865
5864
|
if (I(() => {
|
|
5866
5865
|
const d = (u) => {
|
|
5867
|
-
s &&
|
|
5866
|
+
s && c.current && !c.current.contains(u.target) && i();
|
|
5868
5867
|
};
|
|
5869
5868
|
return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
|
|
5870
5869
|
}, [s, i]), !s)
|
|
5871
5870
|
return null;
|
|
5872
|
-
const
|
|
5871
|
+
const l = (d, u) => {
|
|
5873
5872
|
const x = t[d] || [], f = x.includes(u) ? x.filter((m) => m !== u) : [...x, u];
|
|
5874
5873
|
r({
|
|
5875
5874
|
...t,
|
|
@@ -5880,7 +5879,7 @@ const ni = ({
|
|
|
5880
5879
|
left: `${o.x}px`,
|
|
5881
5880
|
zIndex: 1e3
|
|
5882
5881
|
};
|
|
5883
|
-
return /* @__PURE__ */ e.jsx(hn, { onHide: i, children: /* @__PURE__ */ e.jsx(js, { className: "multi-filter", style: a, children: /* @__PURE__ */ e.jsx("div", { ref:
|
|
5882
|
+
return /* @__PURE__ */ e.jsx(hn, { onHide: i, children: /* @__PURE__ */ e.jsx(js, { className: "multi-filter", style: a, children: /* @__PURE__ */ e.jsx("div", { ref: c, children: n.map(({ name: d, options: u }, x) => /* @__PURE__ */ e.jsxs("div", { style: { marginBottom: 16 }, children: [
|
|
5884
5883
|
x !== 0 && /* @__PURE__ */ e.jsx(je, {}),
|
|
5885
5884
|
/* @__PURE__ */ e.jsx(K, { type: "title-2", weight: "bold", children: d }),
|
|
5886
5885
|
/* @__PURE__ */ e.jsx("div", { className: "filter-block", children: u.map((f) => /* @__PURE__ */ e.jsxs("label", { className: "filter-field", children: [
|
|
@@ -5889,7 +5888,7 @@ const ni = ({
|
|
|
5889
5888
|
{
|
|
5890
5889
|
name: d,
|
|
5891
5890
|
checked: (t[d] || []).includes(f),
|
|
5892
|
-
onChange: () =>
|
|
5891
|
+
onChange: () => l(d, f)
|
|
5893
5892
|
}
|
|
5894
5893
|
),
|
|
5895
5894
|
/* @__PURE__ */ e.jsx(K, { type: "body", children: f })
|
|
@@ -5902,14 +5901,14 @@ const ni = ({
|
|
|
5902
5901
|
filters: s,
|
|
5903
5902
|
selectedFilters: i,
|
|
5904
5903
|
onChangeFilter: o,
|
|
5905
|
-
border:
|
|
5904
|
+
border: c = !1
|
|
5906
5905
|
}) => {
|
|
5907
|
-
const
|
|
5908
|
-
|
|
5906
|
+
const l = U(null), [a, d] = k(""), [u, x] = k(!1), [f, m] = k(null), _ = () => {
|
|
5907
|
+
l.current && (l.current.focus(), x(!0));
|
|
5909
5908
|
}, j = () => {
|
|
5910
|
-
|
|
5909
|
+
l.current && (l.current.focus(), l.current.value = ""), d(""), x(!0), r && n("");
|
|
5911
5910
|
}, p = () => {
|
|
5912
|
-
j(),
|
|
5911
|
+
j(), l.current && (l.current.blur(), x(!1));
|
|
5913
5912
|
}, C = (v) => {
|
|
5914
5913
|
d(v.target.value), r && n(v.target.value);
|
|
5915
5914
|
}, g = (v) => {
|
|
@@ -5923,20 +5922,20 @@ const ni = ({
|
|
|
5923
5922
|
});
|
|
5924
5923
|
};
|
|
5925
5924
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
5926
|
-
/* @__PURE__ */ e.jsx("div", { className: `search-container ${
|
|
5925
|
+
/* @__PURE__ */ e.jsx("div", { className: `search-container ${c ? "border" : ""}`, children: /* @__PURE__ */ e.jsxs("div", { className: "search-field", children: [
|
|
5927
5926
|
u ? /* @__PURE__ */ e.jsx("span", { onClick: p, children: /* @__PURE__ */ e.jsx(Ln, {}) }) : /* @__PURE__ */ e.jsx("span", { onClick: w, children: /* @__PURE__ */ e.jsx(gt, {}) }),
|
|
5928
|
-
/* @__PURE__ */ e.jsx("input", { placeholder: t, type: "text", ref:
|
|
5927
|
+
/* @__PURE__ */ e.jsx("input", { placeholder: t, type: "text", ref: l, onChange: C, onKeyDown: g, value: a, onFocus: () => x(!0) }),
|
|
5929
5928
|
u ? /* @__PURE__ */ e.jsx("span", { onClick: j, children: /* @__PURE__ */ e.jsx(ke, {}) }) : /* @__PURE__ */ e.jsx("span", { onClick: _, children: /* @__PURE__ */ e.jsx($n, {}) })
|
|
5930
5929
|
] }) }),
|
|
5931
|
-
/* @__PURE__ */ e.jsx(
|
|
5930
|
+
/* @__PURE__ */ e.jsx($e, { container: document.body, children: /* @__PURE__ */ e.jsx(ni, { point: f ?? void 0, onClose: () => m(null), isOpen: !!f, filters: s, selectedFilters: i, onChange: o }) })
|
|
5932
5931
|
] });
|
|
5933
5932
|
};
|
|
5934
5933
|
const ti = ({ visible: n, text: t, option: r }) => {
|
|
5935
|
-
const [s, i] = k(n), [o,
|
|
5934
|
+
const [s, i] = k(n), [o, c] = k(!1);
|
|
5936
5935
|
I(() => {
|
|
5937
|
-
n ? (i(!0), setTimeout(() =>
|
|
5936
|
+
n ? (i(!0), setTimeout(() => c(!0), 10)) : (c(!1), setTimeout(() => i(!1), 300));
|
|
5938
5937
|
}, [n]);
|
|
5939
|
-
const
|
|
5938
|
+
const l = () => {
|
|
5940
5939
|
var a;
|
|
5941
5940
|
return (a = r == null ? void 0 : r.onHide) == null ? void 0 : a.call(r);
|
|
5942
5941
|
};
|
|
@@ -5952,7 +5951,7 @@ const ti = ({ visible: n, text: t, option: r }) => {
|
|
|
5952
5951
|
/* @__PURE__ */ e.jsx("div", { className: "snackbar-text", children: t }),
|
|
5953
5952
|
(r == null ? void 0 : r.onClick) && /* @__PURE__ */ e.jsx("div", { className: "snackbar-button-container", children: /* @__PURE__ */ e.jsx(be, { className: "snackbar-btn", onClick: r.onClick, children: r.buttonText ?? "Action" }) })
|
|
5954
5953
|
] }),
|
|
5955
|
-
(r == null ? void 0 : r.closeButton) && /* @__PURE__ */ e.jsx("div", { className: "snackbar-close", children: /* @__PURE__ */ e.jsx("span", { onClick:
|
|
5954
|
+
(r == null ? void 0 : r.closeButton) && /* @__PURE__ */ e.jsx("div", { className: "snackbar-close", children: /* @__PURE__ */ e.jsx("span", { onClick: l, children: /* @__PURE__ */ e.jsx(ke, {}) }) })
|
|
5956
5955
|
]
|
|
5957
5956
|
}
|
|
5958
5957
|
) : null;
|
|
@@ -5964,8 +5963,8 @@ const Ji = ({
|
|
|
5964
5963
|
density: s = "normal",
|
|
5965
5964
|
className: i = "",
|
|
5966
5965
|
text: o,
|
|
5967
|
-
style:
|
|
5968
|
-
onClick:
|
|
5966
|
+
style: c,
|
|
5967
|
+
onClick: l,
|
|
5969
5968
|
onContextMenu: a,
|
|
5970
5969
|
...d
|
|
5971
5970
|
}) => {
|
|
@@ -5973,7 +5972,7 @@ const Ji = ({
|
|
|
5973
5972
|
fontSize: at(n, t),
|
|
5974
5973
|
fontWeight: lt(n, r),
|
|
5975
5974
|
lineHeight: ct(n, s, t),
|
|
5976
|
-
...
|
|
5975
|
+
...c
|
|
5977
5976
|
}, C = _ ? "typography-heading" : "typography-text", g = N(() => {
|
|
5978
5977
|
if (!u.current || !x.current)
|
|
5979
5978
|
return;
|
|
@@ -5987,7 +5986,7 @@ const Ji = ({
|
|
|
5987
5986
|
"div",
|
|
5988
5987
|
{
|
|
5989
5988
|
ref: u,
|
|
5990
|
-
onClick:
|
|
5989
|
+
onClick: l,
|
|
5991
5990
|
onContextMenu: a,
|
|
5992
5991
|
className: `runing-text ${f ? "runing" : ""}`,
|
|
5993
5992
|
children: /* @__PURE__ */ e.jsx(
|
|
@@ -6034,8 +6033,8 @@ const nt = (n, t) => {
|
|
|
6034
6033
|
items: s,
|
|
6035
6034
|
onChange: i,
|
|
6036
6035
|
value: o,
|
|
6037
|
-
placeholder:
|
|
6038
|
-
className:
|
|
6036
|
+
placeholder: c,
|
|
6037
|
+
className: l,
|
|
6039
6038
|
border: a,
|
|
6040
6039
|
name: d,
|
|
6041
6040
|
error: u,
|
|
@@ -6065,7 +6064,7 @@ const nt = (n, t) => {
|
|
|
6065
6064
|
medium: "input-field__text-field_medium",
|
|
6066
6065
|
large: "input-field__text-field_large"
|
|
6067
6066
|
};
|
|
6068
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `input-field-container ${
|
|
6067
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `input-field-container ${l}`, children: [
|
|
6069
6068
|
/* @__PURE__ */ e.jsx("div", { ref: w, style: t, className: `
|
|
6070
6069
|
input-field
|
|
6071
6070
|
input-field__text-field
|
|
@@ -6091,7 +6090,7 @@ const nt = (n, t) => {
|
|
|
6091
6090
|
readOnly: !0
|
|
6092
6091
|
}
|
|
6093
6092
|
),
|
|
6094
|
-
/* @__PURE__ */ e.jsx("label", { className: "input-field__input-container__label", children:
|
|
6093
|
+
/* @__PURE__ */ e.jsx("label", { className: "input-field__input-container__label", children: c ? /* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__label__span", children: c }) : null })
|
|
6095
6094
|
] }) }),
|
|
6096
6095
|
P && C && /* @__PURE__ */ e.jsx(K, { type: "small", className: "input-field-container__error-text", children: C }),
|
|
6097
6096
|
p && !P && /* @__PURE__ */ e.jsx(K, { type: "small", className: "input-field-container__helper-text", children: p }),
|
|
@@ -6101,8 +6100,8 @@ const nt = (n, t) => {
|
|
|
6101
6100
|
);
|
|
6102
6101
|
Pt.displayName = "SelectField";
|
|
6103
6102
|
const ri = ({ icons: n, value: t, onChange: r, disabled: s, placeholder: i, container: o = document.getElementById("root") }) => {
|
|
6104
|
-
const [
|
|
6105
|
-
r == null || r(u),
|
|
6103
|
+
const [c, l] = k(!1), a = n.find((u) => u.id === t), d = (u) => {
|
|
6104
|
+
r == null || r(u), l(!1);
|
|
6106
6105
|
};
|
|
6107
6106
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
6108
6107
|
/* @__PURE__ */ e.jsx(
|
|
@@ -6113,15 +6112,15 @@ const ri = ({ icons: n, value: t, onChange: r, disabled: s, placeholder: i, cont
|
|
|
6113
6112
|
value: a == null ? void 0 : a.name,
|
|
6114
6113
|
readOnly: !0,
|
|
6115
6114
|
disabled: s,
|
|
6116
|
-
onClick: () =>
|
|
6115
|
+
onClick: () => l(!0),
|
|
6117
6116
|
placeholder: i
|
|
6118
6117
|
}
|
|
6119
6118
|
),
|
|
6120
|
-
|
|
6119
|
+
c && /* @__PURE__ */ e.jsx($e, { container: o, children: /* @__PURE__ */ e.jsx(
|
|
6121
6120
|
us,
|
|
6122
6121
|
{
|
|
6123
6122
|
header: "Icons",
|
|
6124
|
-
onHide: () =>
|
|
6123
|
+
onHide: () => l(!1),
|
|
6125
6124
|
onSuccess: d,
|
|
6126
6125
|
items: n.map((u) => ({ icon: u.component, title: u.name, data: u.id }))
|
|
6127
6126
|
}
|
|
@@ -6192,9 +6191,9 @@ const ii = {
|
|
|
6192
6191
|
hideSnackbar: () => {
|
|
6193
6192
|
}
|
|
6194
6193
|
}, oi = un(ii), e1 = ({ children: n }) => {
|
|
6195
|
-
var
|
|
6196
|
-
const [t, r] = k({ visible: !1, text: "" }), s = U(null), i = N((
|
|
6197
|
-
r({ visible: !0, text:
|
|
6194
|
+
var c;
|
|
6195
|
+
const [t, r] = k({ visible: !1, text: "" }), s = U(null), i = N((l, a) => {
|
|
6196
|
+
r({ visible: !0, text: l, option: a }), s.current && clearTimeout(s.current), a != null && a.closeButton || (s.current = setTimeout(() => o(), (a == null ? void 0 : a.delay) ?? 3e3));
|
|
6198
6197
|
}, []), o = N(() => {
|
|
6199
6198
|
s.current && (clearTimeout(s.current), s.current = null), r({ visible: !1, text: "" });
|
|
6200
6199
|
}, []);
|
|
@@ -6205,7 +6204,7 @@ const ii = {
|
|
|
6205
6204
|
...t,
|
|
6206
6205
|
option: {
|
|
6207
6206
|
...t.option,
|
|
6208
|
-
onHide: (
|
|
6207
|
+
onHide: (c = t.option) != null && c.closeButton ? o : void 0
|
|
6209
6208
|
// гарантируем, что при нажатии на X скроется
|
|
6210
6209
|
}
|
|
6211
6210
|
}
|
|
@@ -6223,36 +6222,36 @@ function li(n) {
|
|
|
6223
6222
|
function ci(n) {
|
|
6224
6223
|
return typeof n == "boolean";
|
|
6225
6224
|
}
|
|
6226
|
-
const
|
|
6227
|
-
const { value: t, changeField: r, errors: s } =
|
|
6225
|
+
const Fe = (n) => {
|
|
6226
|
+
const { value: t, changeField: r, errors: s } = Re(Ht), i = N((a) => {
|
|
6228
6227
|
r && r(n, a);
|
|
6229
6228
|
}, [n]), o = N(() => {
|
|
6230
6229
|
const a = t == null ? void 0 : t[n];
|
|
6231
6230
|
return ci(a) ? !!a : li(a) ? Number(a) : ai(a) ? a ?? "" : "";
|
|
6232
|
-
}, [t, n]),
|
|
6231
|
+
}, [t, n]), c = N(() => {
|
|
6233
6232
|
r && r(n, "");
|
|
6234
|
-
}, [n]),
|
|
6233
|
+
}, [n]), l = N(() => {
|
|
6235
6234
|
if (s && Object.keys(s).includes(n))
|
|
6236
6235
|
return s[n];
|
|
6237
6236
|
}, [s, n]);
|
|
6238
6237
|
return {
|
|
6239
6238
|
value: o(),
|
|
6240
|
-
clearHandler:
|
|
6241
|
-
error:
|
|
6239
|
+
clearHandler: c,
|
|
6240
|
+
error: l(),
|
|
6242
6241
|
change: i
|
|
6243
6242
|
};
|
|
6244
6243
|
}, di = (n) => {
|
|
6245
|
-
const { value: t, change: r, error: s } =
|
|
6244
|
+
const { value: t, change: r, error: s } = Fe(n.name);
|
|
6246
6245
|
return /* @__PURE__ */ e.jsx(zs, { ...n, onChange: r, value: String(t), errorText: s, error: !!s });
|
|
6247
6246
|
}, ui = (n) => {
|
|
6248
|
-
const { value: t, change: r, error: s } =
|
|
6247
|
+
const { value: t, change: r, error: s } = Fe(n.name);
|
|
6249
6248
|
return /* @__PURE__ */ e.jsx(Dt, { ...n, value: Number(t), onChange: r, errorText: s, error: !!s });
|
|
6250
6249
|
}, hi = (n) => {
|
|
6251
|
-
const { value: t, change: r, error: s } =
|
|
6250
|
+
const { value: t, change: r, error: s } = Fe(n.name);
|
|
6252
6251
|
return /* @__PURE__ */ e.jsx(Pt, { ...n, container: n.container ?? document.body, value: t, onChange: r, errorText: s, error: !!s });
|
|
6253
6252
|
}, fi = ({ placeholder: n, ref: t, style: r, readOnly: s, className: i, name: o }) => {
|
|
6254
|
-
const { value:
|
|
6255
|
-
|
|
6253
|
+
const { value: c, change: l } = Fe(o), a = (d) => {
|
|
6254
|
+
l && l(d.target.checked);
|
|
6256
6255
|
};
|
|
6257
6256
|
return /* @__PURE__ */ e.jsx("div", { className: `input-field form-switch ${i}`, style: r, children: /* @__PURE__ */ e.jsx(
|
|
6258
6257
|
Et,
|
|
@@ -6261,16 +6260,16 @@ const Ee = (n) => {
|
|
|
6261
6260
|
ref: t,
|
|
6262
6261
|
placeholder: n,
|
|
6263
6262
|
name: o,
|
|
6264
|
-
checked: !!
|
|
6263
|
+
checked: !!c,
|
|
6265
6264
|
onChange: a
|
|
6266
6265
|
}
|
|
6267
6266
|
) });
|
|
6268
6267
|
}, xi = ({ placeholder: n, ref: t, style: r, readOnly: s, className: i, name: o }) => {
|
|
6269
|
-
const { value:
|
|
6268
|
+
const { value: c, change: l } = Fe(o), a = (u) => {
|
|
6270
6269
|
if (u.length > 0)
|
|
6271
|
-
return
|
|
6272
|
-
|
|
6273
|
-
}, d = N(() =>
|
|
6270
|
+
return l && l(!0);
|
|
6271
|
+
l && l(!1);
|
|
6272
|
+
}, d = N(() => c ? [n ?? o] : [], [c, o, n]);
|
|
6274
6273
|
return /* @__PURE__ */ e.jsx(
|
|
6275
6274
|
Rt,
|
|
6276
6275
|
{
|
|
@@ -6285,7 +6284,7 @@ const Ee = (n) => {
|
|
|
6285
6284
|
}
|
|
6286
6285
|
);
|
|
6287
6286
|
}, mi = (n) => {
|
|
6288
|
-
const { error: t, value: r, change: s, clearHandler: i } =
|
|
6287
|
+
const { error: t, value: r, change: s, clearHandler: i } = Fe(n.name);
|
|
6289
6288
|
return /* @__PURE__ */ e.jsx(
|
|
6290
6289
|
en,
|
|
6291
6290
|
{
|
|
@@ -6299,10 +6298,10 @@ const Ee = (n) => {
|
|
|
6299
6298
|
);
|
|
6300
6299
|
};
|
|
6301
6300
|
const ji = (n) => {
|
|
6302
|
-
const { error: t, value: r, change: s, clearHandler: i } =
|
|
6301
|
+
const { error: t, value: r, change: s, clearHandler: i } = Fe(n.name);
|
|
6303
6302
|
return /* @__PURE__ */ e.jsx(It, { ...n, onChange: s, onClear: n.clear ? i : void 0, value: String(r), error: !!t, errorText: t });
|
|
6304
6303
|
}, pi = (n) => {
|
|
6305
|
-
const { error: t, value: r, change: s } =
|
|
6304
|
+
const { error: t, value: r, change: s } = Fe(n.name);
|
|
6306
6305
|
return /* @__PURE__ */ e.jsx(
|
|
6307
6306
|
As,
|
|
6308
6307
|
{
|
|
@@ -6313,25 +6312,25 @@ const ji = (n) => {
|
|
|
6313
6312
|
errorText: t
|
|
6314
6313
|
}
|
|
6315
6314
|
);
|
|
6316
|
-
}, Ci =
|
|
6317
|
-
function({ children: t, value: r, name: s, errors: i, onFinish: o },
|
|
6318
|
-
const [
|
|
6319
|
-
x.preventDefault(), o == null || o(
|
|
6320
|
-
}, [o,
|
|
6315
|
+
}, Ci = Ee(
|
|
6316
|
+
function({ children: t, value: r, name: s, errors: i, onFinish: o }, c) {
|
|
6317
|
+
const [l, a] = k(r ?? {}), d = N((x) => {
|
|
6318
|
+
x.preventDefault(), o == null || o(l);
|
|
6319
|
+
}, [o, l]), u = N((x, f) => {
|
|
6321
6320
|
a((m) => ({
|
|
6322
6321
|
...m,
|
|
6323
6322
|
[x]: f
|
|
6324
6323
|
}));
|
|
6325
6324
|
}, []);
|
|
6326
|
-
return ur(
|
|
6327
|
-
submit: () => o == null ? void 0 : o(
|
|
6325
|
+
return ur(c, () => ({
|
|
6326
|
+
submit: () => o == null ? void 0 : o(l),
|
|
6328
6327
|
setFieldValue: (x, f) => {
|
|
6329
6328
|
a((m) => ({ ...m, [x]: f }));
|
|
6330
6329
|
},
|
|
6331
6330
|
setValues: (x) => a(x),
|
|
6332
|
-
getValues: () =>
|
|
6331
|
+
getValues: () => l,
|
|
6333
6332
|
reset: () => a(r ?? {})
|
|
6334
|
-
}), [o,
|
|
6333
|
+
}), [o, l, r]), /* @__PURE__ */ e.jsx(Ht.Provider, { value: { value: l, changeField: u, errors: i }, children: /* @__PURE__ */ e.jsx("form", { name: s, onSubmit: d, noValidate: !0, children: t }) });
|
|
6335
6334
|
}
|
|
6336
6335
|
), n1 = Object.assign(Ci, {
|
|
6337
6336
|
TextInput: mi,
|
|
@@ -6415,7 +6414,7 @@ export {
|
|
|
6415
6414
|
Ct as Minus,
|
|
6416
6415
|
Mr as MinusUserIcon,
|
|
6417
6416
|
xn as ModalDialogTemplate,
|
|
6418
|
-
|
|
6417
|
+
$e as ModalPortal,
|
|
6419
6418
|
hn as ModalTemplate,
|
|
6420
6419
|
cn as MoreHorizontal,
|
|
6421
6420
|
zs as MoreText,
|