@sfperusacdev/sf-ui 0.1.24 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sf-ui.css +1 -1
- package/dist/sf-ui.js +494 -460
- package/dist/sf-ui.js.map +1 -1
- package/dist/sf-ui.umd.cjs +7 -7
- package/dist/sf-ui.umd.cjs.map +1 -1
- package/dist/theme/dark.css +7 -0
- package/dist/theme/sark.css +2 -0
- package/dist/theme/sf-tokens.css +10 -6
- package/dist/types/src/hooks/useCustomForm.d.ts +4 -20
- package/package.json +4 -4
package/dist/sf-ui.js
CHANGED
|
@@ -9,22 +9,22 @@ import F from "react-qr-code";
|
|
|
9
9
|
import I from "@uiw/react-codemirror";
|
|
10
10
|
import { html as L } from "@codemirror/lang-html";
|
|
11
11
|
import { javascript as ee } from "@codemirror/lang-javascript";
|
|
12
|
-
import { json as
|
|
13
|
-
import { sql as
|
|
14
|
-
import { MapContainer as z, Marker as ne, Polygon as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { Area as
|
|
18
|
-
import { yupResolver as
|
|
19
|
-
import * as
|
|
12
|
+
import { json as te } from "@codemirror/lang-json";
|
|
13
|
+
import { sql as R } from "@codemirror/lang-sql";
|
|
14
|
+
import { MapContainer as z, Marker as ne, Polygon as re, Polyline as B, TileLayer as V, useMap as ie, useMapEvents as ae } from "react-leaflet";
|
|
15
|
+
import oe from "leaflet";
|
|
16
|
+
import se from "react-easy-crop";
|
|
17
|
+
import { Area as ce, AreaChart as H, Bar as le, BarChart as ue, CartesianGrid as de, Legend as fe, Line as pe, LineChart as me, ResponsiveContainer as he, Tooltip as ge, XAxis as _e, YAxis as ve } from "recharts";
|
|
18
|
+
import { yupResolver as ye } from "@hookform/resolvers/yup";
|
|
19
|
+
import * as U from "yup";
|
|
20
20
|
//#region \0rolldown/runtime.js
|
|
21
|
-
var
|
|
22
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
21
|
+
var be = Object.create, xe = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, Ce = Object.getOwnPropertyNames, we = Object.getPrototypeOf, W = Object.prototype.hasOwnProperty, Te = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Ee = (e, t, n, r) => {
|
|
22
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = Ce(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !W.call(e, s) && s !== n && xe(e, s, {
|
|
23
23
|
get: ((e) => t[e]).bind(null, s),
|
|
24
|
-
enumerable: !(r =
|
|
24
|
+
enumerable: !(r = Se(t, s)) || r.enumerable
|
|
25
25
|
});
|
|
26
26
|
return e;
|
|
27
|
-
}, De = (e, t, n) => (n = e == null ? {} :
|
|
27
|
+
}, De = (e, t, n) => (n = e == null ? {} : be(we(e)), Ee(t || !e || !e.__esModule || !W.call(e, "default") ? xe(n, "default", {
|
|
28
28
|
value: e,
|
|
29
29
|
enumerable: !0
|
|
30
30
|
}) : n, e)), Oe = {
|
|
@@ -116,7 +116,7 @@ function G(t) {
|
|
|
116
116
|
}
|
|
117
117
|
function Be(t) {
|
|
118
118
|
var n = (n) => {
|
|
119
|
-
var
|
|
119
|
+
var r = t.attr, i = t.size, a = t.title, o = je(t, Ae), s = i || n.size || "1em", c;
|
|
120
120
|
return n.className && (c = n.className), t.className && (c = (c ? c + " " : "") + t.className), /*#__PURE__*/ e.createElement("svg", Ne({
|
|
121
121
|
stroke: "currentColor",
|
|
122
122
|
fill: "currentColor",
|
|
@@ -1541,7 +1541,7 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
1541
1541
|
onRefresh: m,
|
|
1542
1542
|
error: T?.message ? String(T.message) : void 0,
|
|
1543
1543
|
children: /* @__PURE__ */ v(Ct, {
|
|
1544
|
-
open: O
|
|
1544
|
+
open: !O && x,
|
|
1545
1545
|
onOpenChange: (e) => {
|
|
1546
1546
|
O || S(e);
|
|
1547
1547
|
},
|
|
@@ -1728,16 +1728,17 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
1728
1728
|
t = F.find((e) => e.value === t)?.parentValue;
|
|
1729
1729
|
}
|
|
1730
1730
|
return !1;
|
|
1731
|
-
},
|
|
1731
|
+
}, te = (e) => {
|
|
1732
1732
|
let t = o ? e : e[0] ?? "";
|
|
1733
1733
|
S.field.onChange(t), o ? _?.(e) : _?.(e[0] ?? ""), o || T(!1);
|
|
1734
|
-
},
|
|
1734
|
+
}, R = (e) => {
|
|
1735
1735
|
if (!f) {
|
|
1736
1736
|
if (o) {
|
|
1737
|
-
|
|
1737
|
+
let t = N.includes(e) ? N.filter((t) => t !== e) : [...N, e];
|
|
1738
|
+
te(t);
|
|
1738
1739
|
return;
|
|
1739
1740
|
}
|
|
1740
|
-
|
|
1741
|
+
te([e]);
|
|
1741
1742
|
}
|
|
1742
1743
|
};
|
|
1743
1744
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -1820,7 +1821,7 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
1820
1821
|
role: "option",
|
|
1821
1822
|
"aria-selected": r,
|
|
1822
1823
|
disabled: e.disabled,
|
|
1823
|
-
onClick: () =>
|
|
1824
|
+
onClick: () => R(e.value),
|
|
1824
1825
|
className: (0, X.default)("sf-tree-select__row", r && "sf-tree-select__row--selected"),
|
|
1825
1826
|
children: e.label
|
|
1826
1827
|
})]
|
|
@@ -2554,49 +2555,49 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2554
2555
|
let D = b({
|
|
2555
2556
|
name: t,
|
|
2556
2557
|
control: e.control
|
|
2557
|
-
}), O = String(t), k = D.fieldState.error, A = m(null), j = m(null), [M, N] = h(!1), [P, F] = h(""), [I, L] = h(), [ee,
|
|
2558
|
+
}), O = String(t), k = D.fieldState.error, A = m(null), j = m(null), [M, N] = h(!1), [P, F] = h(""), [I, L] = h(), [ee, te] = h(0), R = m(null), z = p(() => o ? Nt(D.field.value) : D.field.value ? [String(D.field.value)] : [], [D.field.value, o]), ne = p(() => {
|
|
2558
2559
|
let e = /* @__PURE__ */ new Map();
|
|
2559
2560
|
for (let t of n) e.set(t.value, t);
|
|
2560
2561
|
return e;
|
|
2561
|
-
}, [n]),
|
|
2562
|
+
}, [n]), re = p(() => {
|
|
2562
2563
|
let e = [];
|
|
2563
2564
|
for (let t of z) {
|
|
2564
2565
|
let n = ne.get(t);
|
|
2565
2566
|
n && e.push(n);
|
|
2566
2567
|
}
|
|
2567
2568
|
return e;
|
|
2568
|
-
}, [ne, z]),
|
|
2569
|
+
}, [ne, z]), B = p(() => {
|
|
2569
2570
|
let e = P.trim().toLowerCase();
|
|
2570
2571
|
return e ? n.filter((t) => t.label.toLowerCase().includes(e)) : n;
|
|
2571
2572
|
}, [n, P]);
|
|
2572
2573
|
u(() => {
|
|
2573
|
-
M && (
|
|
2574
|
-
R
|
|
2574
|
+
M && (R.current?.scrollTo({ top: 0 }), queueMicrotask(() => {
|
|
2575
|
+
te(R.current?.scrollTop ?? 0);
|
|
2575
2576
|
}));
|
|
2576
2577
|
}, [M, P]);
|
|
2577
|
-
let
|
|
2578
|
+
let V = (e) => {
|
|
2578
2579
|
D.field.onChange(e), C?.(e);
|
|
2579
|
-
},
|
|
2580
|
+
}, ie = () => {
|
|
2580
2581
|
N(!1), F(""), L(void 0);
|
|
2581
|
-
}, ie = (e) => {
|
|
2582
|
-
if (!g) {
|
|
2583
|
-
if (!o) {
|
|
2584
|
-
H(e), re();
|
|
2585
|
-
return;
|
|
2586
|
-
}
|
|
2587
|
-
H(z.includes(e) ? z.filter((t) => t !== e) : [...z, e]);
|
|
2588
|
-
}
|
|
2589
2582
|
}, ae = (e) => {
|
|
2583
|
+
if (g) return;
|
|
2584
|
+
if (!o) {
|
|
2585
|
+
V(e), ie();
|
|
2586
|
+
return;
|
|
2587
|
+
}
|
|
2588
|
+
let t = z.includes(e) ? z.filter((t) => t !== e) : [...z, e];
|
|
2589
|
+
V(t);
|
|
2590
|
+
}, oe = (e) => {
|
|
2590
2591
|
if (!g) {
|
|
2591
2592
|
if (!o) {
|
|
2592
|
-
|
|
2593
|
+
V("");
|
|
2593
2594
|
return;
|
|
2594
2595
|
}
|
|
2595
|
-
|
|
2596
|
+
V(z.filter((t) => t !== e));
|
|
2596
2597
|
}
|
|
2597
|
-
}, oe = () => {
|
|
2598
|
-
g || H(o ? [] : "");
|
|
2599
2598
|
}, se = () => {
|
|
2599
|
+
g || V(o ? [] : "");
|
|
2600
|
+
}, ce = () => {
|
|
2600
2601
|
let e = j.current;
|
|
2601
2602
|
if (!e) return;
|
|
2602
2603
|
let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom - 12 - 4, r = t.top - 12 - 4, i = r > n && n < 120 ? "top" : "bottom", a = Math.max(120, Math.min(288, i === "top" ? r : n));
|
|
@@ -2610,23 +2611,23 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2610
2611
|
});
|
|
2611
2612
|
};
|
|
2612
2613
|
f(() => {
|
|
2613
|
-
M &&
|
|
2614
|
+
M && ce();
|
|
2614
2615
|
}, [M]), u(() => {
|
|
2615
2616
|
if (!M) return;
|
|
2616
|
-
let e = () =>
|
|
2617
|
+
let e = () => ce();
|
|
2617
2618
|
return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
2618
2619
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
2619
2620
|
};
|
|
2620
2621
|
}, [M]), u(() => {
|
|
2621
2622
|
let e = (e) => {
|
|
2622
2623
|
let t = e.target;
|
|
2623
|
-
A.current?.contains(t) ||
|
|
2624
|
+
A.current?.contains(t) || ie();
|
|
2624
2625
|
};
|
|
2625
2626
|
return document.addEventListener("pointerdown", e), () => {
|
|
2626
2627
|
document.removeEventListener("pointerdown", e);
|
|
2627
2628
|
};
|
|
2628
2629
|
}, []);
|
|
2629
|
-
let
|
|
2630
|
+
let H = /* @__PURE__ */ y("div", {
|
|
2630
2631
|
className: (0, X.default)("flex shrink-0 items-center gap-2 px-3 py-2", I?.direction === "top" ? "border-t border-slate-200" : "border-b border-slate-200"),
|
|
2631
2632
|
children: [/* @__PURE__ */ v(Ke, {
|
|
2632
2633
|
size: 16,
|
|
@@ -2637,22 +2638,22 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2637
2638
|
onChange: (e) => F(e.target.value),
|
|
2638
2639
|
className: "h-8 w-full bg-transparent text-sm text-slate-900 outline-none placeholder:text-slate-400"
|
|
2639
2640
|
})]
|
|
2640
|
-
}),
|
|
2641
|
-
ref:
|
|
2641
|
+
}), le = /* @__PURE__ */ v("div", {
|
|
2642
|
+
ref: R,
|
|
2642
2643
|
className: "overflow-auto py-1",
|
|
2643
2644
|
style: { maxHeight: Math.max(72, (I?.maxHeight ?? 288) - rn) },
|
|
2644
2645
|
onScroll: (e) => {
|
|
2645
|
-
|
|
2646
|
+
te(e.currentTarget.scrollTop);
|
|
2646
2647
|
},
|
|
2647
|
-
children:
|
|
2648
|
-
let e = Math.max(72, (I?.maxHeight ?? 288) - rn), t = Math.max(1, Math.ceil(e / an)), n = Math.max(0, Math.floor(ee / an) - on), r = Math.min(
|
|
2648
|
+
children: B.length ? (() => {
|
|
2649
|
+
let e = Math.max(72, (I?.maxHeight ?? 288) - rn), t = Math.max(1, Math.ceil(e / an)), n = Math.max(0, Math.floor(ee / an) - on), r = Math.min(B.length, n + t + 12), i = n * an, a = Math.max(0, (B.length - r) * an), s = B.slice(n, r);
|
|
2649
2650
|
return /* @__PURE__ */ y(_, { children: [
|
|
2650
2651
|
i > 0 && /* @__PURE__ */ v("div", { style: { height: i } }),
|
|
2651
2652
|
s.map((e) => {
|
|
2652
2653
|
let t = z.includes(e.value);
|
|
2653
2654
|
return /* @__PURE__ */ y("button", {
|
|
2654
2655
|
type: "button",
|
|
2655
|
-
onClick: () =>
|
|
2656
|
+
onClick: () => ae(e.value),
|
|
2656
2657
|
className: (0, X.default)("flex h-10 w-full items-center gap-2 px-3 text-left text-sm hover:bg-slate-50", t ? "text-slate-900" : "text-slate-700"),
|
|
2657
2658
|
children: [/* @__PURE__ */ v("span", {
|
|
2658
2659
|
className: (0, X.default)("flex h-4 w-4 items-center justify-center border", o ? "rounded" : "rounded-full", t ? "border-slate-900 bg-slate-900 text-white" : "border-slate-300 bg-white"),
|
|
@@ -2699,10 +2700,10 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2699
2700
|
className: s,
|
|
2700
2701
|
withRightIcon: !0,
|
|
2701
2702
|
disabled: g
|
|
2702
|
-
}), "flex items-center gap-1.5 text-left", o &&
|
|
2703
|
+
}), "flex items-center gap-1.5 text-left", o && re.length > 1 && "h-auto min-h-[2.5rem] py-2"),
|
|
2703
2704
|
children: [/* @__PURE__ */ v("span", {
|
|
2704
2705
|
className: "flex min-w-0 flex-1 flex-wrap items-center gap-1",
|
|
2705
|
-
children:
|
|
2706
|
+
children: re.length ? o ? /* @__PURE__ */ y(_, { children: [re.slice(0, Math.max(0, S)).map((e) => /* @__PURE__ */ y("span", {
|
|
2706
2707
|
className: "inline-flex max-w-full items-center gap-1 rounded bg-slate-100 px-1.5 py-0.5 text-xs text-slate-700",
|
|
2707
2708
|
children: [/* @__PURE__ */ v("span", {
|
|
2708
2709
|
className: "truncate",
|
|
@@ -2710,27 +2711,27 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2710
2711
|
}), !g && /* @__PURE__ */ v("button", {
|
|
2711
2712
|
type: "button",
|
|
2712
2713
|
onClick: (t) => {
|
|
2713
|
-
t.stopPropagation(),
|
|
2714
|
+
t.stopPropagation(), oe(e.value);
|
|
2714
2715
|
},
|
|
2715
2716
|
className: "rounded text-slate-400 hover:text-slate-700",
|
|
2716
2717
|
children: /* @__PURE__ */ v(Ve, { size: 12 })
|
|
2717
2718
|
})]
|
|
2718
|
-
}, e.value)),
|
|
2719
|
+
}, e.value)), re.length > S && /* @__PURE__ */ y("span", {
|
|
2719
2720
|
className: "inline-flex items-center rounded bg-slate-100 px-1.5 py-0.5 text-xs text-slate-500",
|
|
2720
|
-
children: ["+",
|
|
2721
|
+
children: ["+", re.length - S]
|
|
2721
2722
|
})] }) : /* @__PURE__ */ v("span", {
|
|
2722
2723
|
className: "truncate",
|
|
2723
|
-
children:
|
|
2724
|
+
children: re[0]?.label
|
|
2724
2725
|
}) : /* @__PURE__ */ v("span", {
|
|
2725
2726
|
className: "text-slate-400",
|
|
2726
2727
|
children: c
|
|
2727
2728
|
})
|
|
2728
2729
|
}), /* @__PURE__ */ y("span", {
|
|
2729
2730
|
className: "flex items-center gap-1",
|
|
2730
|
-
children: [
|
|
2731
|
+
children: [re.length > 0 && !g && /* @__PURE__ */ v("button", {
|
|
2731
2732
|
type: "button",
|
|
2732
2733
|
onClick: (e) => {
|
|
2733
|
-
e.stopPropagation(),
|
|
2734
|
+
e.stopPropagation(), se();
|
|
2734
2735
|
},
|
|
2735
2736
|
className: "rounded p-0.5 text-slate-400 hover:text-slate-700",
|
|
2736
2737
|
children: /* @__PURE__ */ v(Ve, { size: 14 })
|
|
@@ -2749,7 +2750,7 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2749
2750
|
maxHeight: I?.maxHeight ?? 0,
|
|
2750
2751
|
visibility: I ? "visible" : "hidden"
|
|
2751
2752
|
},
|
|
2752
|
-
children: I?.direction === "top" ? /* @__PURE__ */ y(_, { children: [
|
|
2753
|
+
children: I?.direction === "top" ? /* @__PURE__ */ y(_, { children: [le, H] }) : /* @__PURE__ */ y(_, { children: [H, le] })
|
|
2753
2754
|
})]
|
|
2754
2755
|
})
|
|
2755
2756
|
});
|
|
@@ -2757,7 +2758,8 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2757
2758
|
let [a, o] = h([]), [c, l] = h(!1), [d, f] = h(), [p, m] = h(!1), g = s(() => {
|
|
2758
2759
|
m(!0), f(void 0), (async () => {
|
|
2759
2760
|
try {
|
|
2760
|
-
|
|
2761
|
+
let t = await e();
|
|
2762
|
+
o(t), l(!0);
|
|
2761
2763
|
} catch {
|
|
2762
2764
|
f(i);
|
|
2763
2765
|
} finally {
|
|
@@ -2831,13 +2833,13 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2831
2833
|
}), p = String(t), m = f.fieldState.error, h = o ? Nt(f.field.value) : f.field.value ? [String(f.field.value)] : [], g = (e) => {
|
|
2832
2834
|
f.field.onChange(e), l?.(e);
|
|
2833
2835
|
}, _ = (e) => {
|
|
2834
|
-
if (
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
}
|
|
2839
|
-
g(h.includes(e) ? h.filter((t) => t !== e) : [...h, e]), f.field.onBlur();
|
|
2836
|
+
if (s || c) return;
|
|
2837
|
+
if (!o) {
|
|
2838
|
+
g(h.includes(e) ? "" : e), f.field.onBlur();
|
|
2839
|
+
return;
|
|
2840
2840
|
}
|
|
2841
|
+
let t = h.includes(e) ? h.filter((t) => t !== e) : [...h, e];
|
|
2842
|
+
g(t), f.field.onBlur();
|
|
2841
2843
|
};
|
|
2842
2844
|
return /* @__PURE__ */ v(Z, {
|
|
2843
2845
|
id: p,
|
|
@@ -2898,13 +2900,13 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2898
2900
|
}), N = p(() => c ? Nt(x.field.value) : x.field.value ? [String(x.field.value)] : [], [x.field.value, c]), P = p(() => n.filter((e) => N.includes(e.value)), [n, N]), F = (e) => {
|
|
2899
2901
|
x.field.onChange(e), m?.(e);
|
|
2900
2902
|
}, I = (e) => {
|
|
2901
|
-
if (
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
}
|
|
2906
|
-
F(N.includes(e) ? N.filter((t) => t !== e) : [...N, e]), x.field.onBlur();
|
|
2903
|
+
if (u || d) return;
|
|
2904
|
+
if (!c) {
|
|
2905
|
+
F(e), x.field.onBlur();
|
|
2906
|
+
return;
|
|
2907
2907
|
}
|
|
2908
|
+
let t = N.includes(e) ? N.filter((t) => t !== e) : [...N, e];
|
|
2909
|
+
F(t), x.field.onBlur();
|
|
2908
2910
|
}, L = (e) => {
|
|
2909
2911
|
if (!(u || d)) {
|
|
2910
2912
|
if (!c) {
|
|
@@ -2915,41 +2917,41 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2915
2917
|
}
|
|
2916
2918
|
}, ee = () => {
|
|
2917
2919
|
u || d || (F(c ? [] : ""), x.field.onBlur());
|
|
2918
|
-
},
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
className: "h-4 w-4 accent-slate-900"
|
|
2933
|
-
});
|
|
2934
|
-
},
|
|
2935
|
-
size: 40,
|
|
2936
|
-
enableGlobalFilter: !1
|
|
2937
|
-
},
|
|
2938
|
-
{
|
|
2939
|
-
accessorKey: "label",
|
|
2940
|
-
header: "",
|
|
2941
|
-
cell: ({ row: e }) => /* @__PURE__ */ v("span", {
|
|
2942
|
-
className: "block truncate",
|
|
2943
|
-
children: e.original.label
|
|
2944
|
-
})
|
|
2920
|
+
}, te = p(() => [
|
|
2921
|
+
{
|
|
2922
|
+
id: "selected",
|
|
2923
|
+
header: "",
|
|
2924
|
+
cell: ({ row: e }) => {
|
|
2925
|
+
let t = N.includes(e.original.value);
|
|
2926
|
+
return /* @__PURE__ */ v("input", {
|
|
2927
|
+
type: c ? "checkbox" : "radio",
|
|
2928
|
+
checked: t,
|
|
2929
|
+
disabled: u,
|
|
2930
|
+
readOnly: !0,
|
|
2931
|
+
tabIndex: -1,
|
|
2932
|
+
className: "h-4 w-4 accent-slate-900"
|
|
2933
|
+
});
|
|
2945
2934
|
},
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2935
|
+
size: 40,
|
|
2936
|
+
enableGlobalFilter: !1
|
|
2937
|
+
},
|
|
2938
|
+
{
|
|
2939
|
+
accessorKey: "label",
|
|
2940
|
+
header: "",
|
|
2941
|
+
cell: ({ row: e }) => /* @__PURE__ */ v("span", {
|
|
2942
|
+
className: "block truncate",
|
|
2943
|
+
children: e.original.label
|
|
2944
|
+
})
|
|
2945
|
+
},
|
|
2946
|
+
...r ?? []
|
|
2947
|
+
], [
|
|
2948
|
+
r,
|
|
2949
|
+
c,
|
|
2950
|
+
u,
|
|
2951
|
+
N
|
|
2952
|
+
]), R = M({
|
|
2953
|
+
data: n,
|
|
2954
|
+
columns: te,
|
|
2953
2955
|
state: {
|
|
2954
2956
|
globalFilter: w,
|
|
2955
2957
|
pagination: k
|
|
@@ -2966,12 +2968,12 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2966
2968
|
getPaginationRowModel: A(),
|
|
2967
2969
|
globalFilterFn: (e, t, n) => {
|
|
2968
2970
|
let r = String(n).trim().toLowerCase();
|
|
2969
|
-
return r
|
|
2971
|
+
return !r || i.some((t) => {
|
|
2970
2972
|
let n = e.original[t];
|
|
2971
|
-
return n
|
|
2972
|
-
})
|
|
2973
|
+
return n != null && String(n).toLowerCase().includes(r);
|
|
2974
|
+
});
|
|
2973
2975
|
}
|
|
2974
|
-
}),
|
|
2976
|
+
}), z = R.getRowModel().rows, ne = R.getFilteredRowModel().rows.length, re = Math.max(0, f - z.length), B = R.getState().pagination.pageIndex + 1, V = Math.max(1, R.getPageCount()), ie = R.getAllLeafColumns().length;
|
|
2975
2977
|
return /* @__PURE__ */ v(Z, {
|
|
2976
2978
|
id: S,
|
|
2977
2979
|
label: a,
|
|
@@ -3033,7 +3035,7 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
3033
3035
|
}),
|
|
3034
3036
|
/* @__PURE__ */ v("table", {
|
|
3035
3037
|
className: "w-full table-fixed border-collapse text-sm",
|
|
3036
|
-
children: /* @__PURE__ */ v("tbody", { children:
|
|
3038
|
+
children: /* @__PURE__ */ v("tbody", { children: z.length ? /* @__PURE__ */ y(_, { children: [z.map((e) => {
|
|
3037
3039
|
let t = N.includes(e.original.value);
|
|
3038
3040
|
return /* @__PURE__ */ v("tr", {
|
|
3039
3041
|
onClick: () => I(e.original.value),
|
|
@@ -3043,22 +3045,22 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
3043
3045
|
children: T(e.column.columnDef.cell, e.getContext())
|
|
3044
3046
|
}, e.id))
|
|
3045
3047
|
}, e.id);
|
|
3046
|
-
}), Array.from({ length:
|
|
3048
|
+
}), Array.from({ length: re }).map((e, t) => /* @__PURE__ */ v("tr", {
|
|
3047
3049
|
className: "h-10 border-b border-slate-100 last:border-b-0",
|
|
3048
|
-
children: Array.from({ length:
|
|
3050
|
+
children: Array.from({ length: ie }).map((e, t) => /* @__PURE__ */ v("td", {
|
|
3049
3051
|
className: (0, X.default)("px-3 py-2 align-middle", t === 0 && "w-10"),
|
|
3050
3052
|
children: "\xA0"
|
|
3051
3053
|
}, t))
|
|
3052
3054
|
}, `empty-${t}`))] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("tr", {
|
|
3053
3055
|
className: "h-10 border-b border-slate-100",
|
|
3054
3056
|
children: /* @__PURE__ */ v("td", {
|
|
3055
|
-
colSpan:
|
|
3057
|
+
colSpan: ie,
|
|
3056
3058
|
className: "px-3 py-3 text-sm text-slate-500",
|
|
3057
3059
|
children: d ? "Cargando..." : l
|
|
3058
3060
|
})
|
|
3059
3061
|
}), Array.from({ length: Math.max(0, f - 1) }).map((e, t) => /* @__PURE__ */ v("tr", {
|
|
3060
3062
|
className: "h-10 border-b border-slate-100 last:border-b-0",
|
|
3061
|
-
children: Array.from({ length:
|
|
3063
|
+
children: Array.from({ length: ie }).map((e, t) => /* @__PURE__ */ v("td", {
|
|
3062
3064
|
className: (0, X.default)("px-3 py-2 align-middle", t === 0 && "w-10"),
|
|
3063
3065
|
children: "\xA0"
|
|
3064
3066
|
}, t))
|
|
@@ -3069,9 +3071,9 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
3069
3071
|
children: [/* @__PURE__ */ y("span", {
|
|
3070
3072
|
className: "text-xs text-slate-500",
|
|
3071
3073
|
children: [
|
|
3072
|
-
|
|
3074
|
+
ne,
|
|
3073
3075
|
" resultado",
|
|
3074
|
-
|
|
3076
|
+
ne === 1 ? "" : "s"
|
|
3075
3077
|
]
|
|
3076
3078
|
}), /* @__PURE__ */ y("div", {
|
|
3077
3079
|
className: "flex items-center gap-2",
|
|
@@ -3492,7 +3494,7 @@ function jn(e) {
|
|
|
3492
3494
|
child: []
|
|
3493
3495
|
}, {
|
|
3494
3496
|
tag: "path",
|
|
3495
|
-
attr: { d: "M17.65 6.35A7.
|
|
3497
|
+
attr: { d: "M17.65 6.35A7.96 7.96 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z" },
|
|
3496
3498
|
child: []
|
|
3497
3499
|
}]
|
|
3498
3500
|
})(e);
|
|
@@ -3510,7 +3512,7 @@ function Mn(e) {
|
|
|
3510
3512
|
child: []
|
|
3511
3513
|
}, {
|
|
3512
3514
|
tag: "path",
|
|
3513
|
-
attr: { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2
|
|
3515
|
+
attr: { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" },
|
|
3514
3516
|
child: []
|
|
3515
3517
|
}]
|
|
3516
3518
|
})(e);
|
|
@@ -3528,7 +3530,7 @@ function Nn(e) {
|
|
|
3528
3530
|
child: []
|
|
3529
3531
|
}, {
|
|
3530
3532
|
tag: "path",
|
|
3531
|
-
attr: { d: "M3 17v2h6v-
|
|
3533
|
+
attr: { d: "M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z" },
|
|
3532
3534
|
child: []
|
|
3533
3535
|
}]
|
|
3534
3536
|
})(e);
|
|
@@ -3541,12 +3543,12 @@ function Pn(e) {
|
|
|
3541
3543
|
tag: "path",
|
|
3542
3544
|
attr: {
|
|
3543
3545
|
fill: "none",
|
|
3544
|
-
d: "M0
|
|
3546
|
+
d: "M0 0h24v24H0z"
|
|
3545
3547
|
},
|
|
3546
3548
|
child: []
|
|
3547
3549
|
}, {
|
|
3548
3550
|
tag: "path",
|
|
3549
|
-
attr: { d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6
|
|
3551
|
+
attr: { d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z" },
|
|
3550
3552
|
child: []
|
|
3551
3553
|
}]
|
|
3552
3554
|
})(e);
|
|
@@ -3559,12 +3561,12 @@ function Fn(e) {
|
|
|
3559
3561
|
tag: "path",
|
|
3560
3562
|
attr: {
|
|
3561
3563
|
fill: "none",
|
|
3562
|
-
d: "M0
|
|
3564
|
+
d: "M0 0h24v24H0z"
|
|
3563
3565
|
},
|
|
3564
3566
|
child: []
|
|
3565
3567
|
}, {
|
|
3566
3568
|
tag: "path",
|
|
3567
|
-
attr: { d: "M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-
|
|
3569
|
+
attr: { d: "M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z" },
|
|
3568
3570
|
child: []
|
|
3569
3571
|
}]
|
|
3570
3572
|
})(e);
|
|
@@ -3582,7 +3584,7 @@ function In(e) {
|
|
|
3582
3584
|
child: []
|
|
3583
3585
|
}, {
|
|
3584
3586
|
tag: "path",
|
|
3585
|
-
attr: { d: "M3 18h6v-
|
|
3587
|
+
attr: { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" },
|
|
3586
3588
|
child: []
|
|
3587
3589
|
}]
|
|
3588
3590
|
})(e);
|
|
@@ -3600,7 +3602,7 @@ function Ln(e) {
|
|
|
3600
3602
|
child: []
|
|
3601
3603
|
}, {
|
|
3602
3604
|
tag: "path",
|
|
3603
|
-
attr: { d: "M10 18h4v-2h-
|
|
3605
|
+
attr: { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" },
|
|
3604
3606
|
child: []
|
|
3605
3607
|
}]
|
|
3606
3608
|
})(e);
|
|
@@ -3613,12 +3615,12 @@ function Rn(e) {
|
|
|
3613
3615
|
tag: "path",
|
|
3614
3616
|
attr: {
|
|
3615
3617
|
fill: "none",
|
|
3616
|
-
d: "M0
|
|
3618
|
+
d: "M0 0h24v24H0z"
|
|
3617
3619
|
},
|
|
3618
3620
|
child: []
|
|
3619
3621
|
}, {
|
|
3620
3622
|
tag: "path",
|
|
3621
|
-
attr: { d: "M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2
|
|
3623
|
+
attr: { d: "M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" },
|
|
3622
3624
|
child: []
|
|
3623
3625
|
}]
|
|
3624
3626
|
})(e);
|
|
@@ -3702,8 +3704,8 @@ var Hn = /^[1-9]\d*\s*-\s*[1-9]\d*$/, Un = ({ limit: e, offset: t }, n) => n <=
|
|
|
3702
3704
|
limit: i - r + 1
|
|
3703
3705
|
};
|
|
3704
3706
|
}, g = () => {
|
|
3705
|
-
let { value:
|
|
3706
|
-
s(null), l !==
|
|
3707
|
+
let e = d.trim().replaceAll(" ", ""), { value: t, limit: r, offset: i } = f(e);
|
|
3708
|
+
s(null), l !== t && n?.(r, i);
|
|
3707
3709
|
};
|
|
3708
3710
|
return /* @__PURE__ */ y("div", {
|
|
3709
3711
|
ref: r,
|
|
@@ -3776,7 +3778,7 @@ var Hn = /^[1-9]\d*\s*-\s*[1-9]\d*$/, Un = ({ limit: e, offset: t }, n) => n <=
|
|
|
3776
3778
|
], qn = (e) => {
|
|
3777
3779
|
if (typeof e != "object" || !e) return !1;
|
|
3778
3780
|
let t = e;
|
|
3779
|
-
return t.type === "string" ? typeof t.value == "string" && typeof t.op == "string" : t.type === "number" ? (typeof t.value == "number" || t.value == null) && typeof t.op == "string" : t.type === "boolean"
|
|
3781
|
+
return t.type === "string" ? typeof t.value == "string" && typeof t.op == "string" : t.type === "number" ? (typeof t.value == "number" || t.value == null) && typeof t.op == "string" : t.type === "boolean" && (typeof t.value == "boolean" || t.value == null) && t.op === "is";
|
|
3780
3782
|
}, Jn = (e) => e === "number" ? {
|
|
3781
3783
|
type: "number",
|
|
3782
3784
|
op: "gt",
|
|
@@ -3794,14 +3796,14 @@ function Yn(e, t, n) {
|
|
|
3794
3796
|
let r = e.getValue(t);
|
|
3795
3797
|
if (n.type === "string") {
|
|
3796
3798
|
let e = String(r ?? "").toLowerCase(), t = String(n.value ?? "").toLowerCase();
|
|
3797
|
-
return t.length === 0 ? !0 : n.op === "contains" ? e.includes(t) : n.op === "notContains" ? !e.includes(t) : n.op === "equals" ? e === t : n.op === "startsWith" ? e.startsWith(t) : n.op
|
|
3799
|
+
return t.length === 0 ? !0 : n.op === "contains" ? e.includes(t) : n.op === "notContains" ? !e.includes(t) : n.op === "equals" ? e === t : n.op === "startsWith" ? e.startsWith(t) : n.op !== "endsWith" || e.endsWith(t);
|
|
3798
3800
|
}
|
|
3799
3801
|
if (n.type === "number") {
|
|
3800
3802
|
let e = Number(r);
|
|
3801
|
-
return Number.isFinite(e) ? n.value == null ? !0 : n.op === "eq" ? e === n.value : n.op === "gt" ? e > n.value : n.op === "gte" ? e >= n.value : n.op === "lt" ? e < n.value : n.op
|
|
3803
|
+
return Number.isFinite(e) ? n.value == null ? !0 : n.op === "eq" ? e === n.value : n.op === "gt" ? e > n.value : n.op === "gte" ? e >= n.value : n.op === "lt" ? e < n.value : n.op !== "lte" || e <= n.value : !1;
|
|
3802
3804
|
}
|
|
3803
3805
|
let i = !!r;
|
|
3804
|
-
return n.value == null
|
|
3806
|
+
return n.value == null || i === n.value;
|
|
3805
3807
|
}
|
|
3806
3808
|
//#endregion
|
|
3807
3809
|
//#region src/components/table/TableFiltersPanel.tsx
|
|
@@ -4086,41 +4088,44 @@ function Zn({ open: e, onClose: t, columnsMeta: n, headerLabelById: r, sorting:
|
|
|
4086
4088
|
}), i.length === 0 ? /* @__PURE__ */ v("div", {
|
|
4087
4089
|
className: "sf-table-panel-empty",
|
|
4088
4090
|
children: "No hay ordenamiento"
|
|
4089
|
-
}) : i.map((e) =>
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
children: "
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4091
|
+
}) : i.map((e) => {
|
|
4092
|
+
let t = r.get(e.id) ?? e.id;
|
|
4093
|
+
return /* @__PURE__ */ y("div", {
|
|
4094
|
+
className: "sf-table-panel-row",
|
|
4095
|
+
children: [
|
|
4096
|
+
/* @__PURE__ */ v("span", {
|
|
4097
|
+
className: "min-w-0 flex-1 truncate",
|
|
4098
|
+
children: t
|
|
4099
|
+
}),
|
|
4100
|
+
/* @__PURE__ */ y("select", {
|
|
4101
|
+
className: "sf-table-panel-field sf-table-panel-field--compact",
|
|
4102
|
+
value: e.desc ? "desc" : "asc",
|
|
4103
|
+
onChange: (t) => {
|
|
4104
|
+
let n = t.target.value === "desc";
|
|
4105
|
+
o(), a.setSorting((t) => t.map((t) => t.id === e.id ? {
|
|
4106
|
+
...t,
|
|
4107
|
+
desc: n
|
|
4108
|
+
} : t));
|
|
4109
|
+
},
|
|
4110
|
+
children: [/* @__PURE__ */ v("option", {
|
|
4111
|
+
value: "asc",
|
|
4112
|
+
children: "asc"
|
|
4113
|
+
}), /* @__PURE__ */ v("option", {
|
|
4114
|
+
value: "desc",
|
|
4115
|
+
children: "desc"
|
|
4116
|
+
})]
|
|
4117
|
+
}),
|
|
4118
|
+
/* @__PURE__ */ v("button", {
|
|
4119
|
+
type: "button",
|
|
4120
|
+
className: "sf-table-panel-link",
|
|
4121
|
+
onClick: () => {
|
|
4122
|
+
o(), a.setSorting((t) => t.filter((t) => t.id !== e.id));
|
|
4123
|
+
},
|
|
4124
|
+
children: "Quitar"
|
|
4125
|
+
})
|
|
4126
|
+
]
|
|
4127
|
+
}, e.id);
|
|
4128
|
+
})]
|
|
4124
4129
|
})]
|
|
4125
4130
|
})]
|
|
4126
4131
|
})]
|
|
@@ -4266,14 +4271,14 @@ var ir = (e) => {
|
|
|
4266
4271
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
4267
4272
|
return !0;
|
|
4268
4273
|
};
|
|
4269
|
-
function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGrouping: o = [], enableGrouping: s = !0, enableSorting: c = !0, enableFiltering: l = !0, enablePagination: d = !1, pageSize: f = 20, fillParentHeight: g = !1, maxBodyHeightPx: b, className: x = "", emptyMessage: S = "No hay datos", title: C = "Tabla", subtitle: w, sidePanel: N = !1, onGroupingChange: P, toolbarSlot: F, belowToolbarSlot: I, loading: L = !1, loadingMessage: ee = "Cargando...", isFetching:
|
|
4270
|
-
let [
|
|
4274
|
+
function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGrouping: o = [], enableGrouping: s = !0, enableSorting: c = !0, enableFiltering: l = !0, enablePagination: d = !1, pageSize: f = 20, fillParentHeight: g = !1, maxBodyHeightPx: b, className: x = "", emptyMessage: S = "No hay datos", title: C = "Tabla", subtitle: w, sidePanel: N = !1, onGroupingChange: P, toolbarSlot: F, belowToolbarSlot: I, loading: L = !1, loadingMessage: ee = "Cargando...", isFetching: te = !1, error: R, onRetry: z, onRefresh: ne, onRowClick: re, enableRowSelection: B = !0, getRowActions: V, getBulkActions: ie, bulkActionsSlot: ae, onSelectionChange: oe, headerVariant: se = "default", embedded: ce = !1, detail: H, controller: le }) {
|
|
4275
|
+
let [ue, de] = h(o), [fe, pe] = h(() => o.length > 0 ? {} : !0), [me, he] = h([]), [ge, _e] = h(""), [ve, ye] = h([]), [U, be] = h({}), [xe, Se] = h({}), [Ce, we] = h(() => rr(i).map((e) => e.id)), [W, Te] = h({}), [Ee, De] = h({
|
|
4271
4276
|
pageIndex: 0,
|
|
4272
4277
|
pageSize: f
|
|
4273
|
-
}), [Oe, ke] = h(!1), [Ae, je] = h(!1), [Me, Ne] = h(!1), [Pe, Fe] = h(null), [Ie, Le] = h(!1), [Re, ze] = h({}), G =
|
|
4278
|
+
}), [Oe, ke] = h(!1), [Ae, je] = h(!1), [Me, Ne] = h(!1), [Pe, Fe] = h(null), [Ie, Le] = h(!1), [Re, ze] = h({}), G = H != null && (H.render != null || H.getRows != null && H.columns != null), Be = (e) => G ? H?.isExpandable?.(e) ?? !0 : !1, Ve = (e, t) => {
|
|
4274
4279
|
let n = Re[e];
|
|
4275
4280
|
if (n != null) return n;
|
|
4276
|
-
let r =
|
|
4281
|
+
let r = H?.defaultExpanded;
|
|
4277
4282
|
return typeof r == "function" ? r(t) : r === !0;
|
|
4278
4283
|
}, He = (e, t) => {
|
|
4279
4284
|
let n = !Ve(e, t);
|
|
@@ -4283,18 +4288,18 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4283
4288
|
}));
|
|
4284
4289
|
}, Ue = p(() => {
|
|
4285
4290
|
let e = [];
|
|
4286
|
-
return G && e.push("__detail"),
|
|
4291
|
+
return G && e.push("__detail"), B && e.push("__select"), V && e.push("__actions"), e;
|
|
4287
4292
|
}, [
|
|
4293
|
+
B,
|
|
4288
4294
|
V,
|
|
4289
|
-
H,
|
|
4290
4295
|
G
|
|
4291
4296
|
]), We = p(() => {
|
|
4292
4297
|
if (e) return t ?? zn();
|
|
4293
|
-
}, [e, t]), Ge = m(!1), K = m(!1), Ke = m(void 0), qe = m(null), Je = m(void 0), q = a ??
|
|
4298
|
+
}, [e, t]), Ge = m(!1), K = m(!1), Ke = m(void 0), qe = m(null), Je = m(void 0), q = a ?? ue, Ye = p(() => w ?? (!s || q.length === 0 ? null : `Agrupado por: ${q.join(" → ")}`), [
|
|
4294
4299
|
w,
|
|
4295
4300
|
s,
|
|
4296
4301
|
q
|
|
4297
|
-
]), Xe =
|
|
4302
|
+
]), Xe = se === "brand", Ze = p(() => rr(i).map((e) => ({
|
|
4298
4303
|
id: e.id,
|
|
4299
4304
|
headerLabel: $n(e.header, e.id)
|
|
4300
4305
|
})).filter((e) => !!e), [i]), Qe = p(() => {
|
|
@@ -4315,13 +4320,13 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4315
4320
|
e.set(t, i);
|
|
4316
4321
|
}
|
|
4317
4322
|
return e;
|
|
4318
|
-
}, [i, r]), et = p(() => nr(i,
|
|
4323
|
+
}, [i, r]), et = p(() => nr(i, W), [W, i]), tt = p(() => {
|
|
4319
4324
|
let e = [];
|
|
4320
|
-
return G && e.push("__detail"),
|
|
4325
|
+
return G && e.push("__detail"), B && e.push("__select"), e.push(...Ce), V && e.push("__actions"), e;
|
|
4321
4326
|
}, [
|
|
4322
|
-
|
|
4327
|
+
Ce,
|
|
4328
|
+
B,
|
|
4323
4329
|
V,
|
|
4324
|
-
H,
|
|
4325
4330
|
G
|
|
4326
4331
|
]), nt = p(() => {
|
|
4327
4332
|
let e = {
|
|
@@ -4349,7 +4354,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4349
4354
|
},
|
|
4350
4355
|
onChange: e.getToggleSelectedHandler()
|
|
4351
4356
|
})
|
|
4352
|
-
}, t =
|
|
4357
|
+
}, t = V == null ? null : {
|
|
4353
4358
|
id: "__actions",
|
|
4354
4359
|
size: 36,
|
|
4355
4360
|
enableSorting: !1,
|
|
@@ -4357,7 +4362,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4357
4362
|
enableHiding: !1,
|
|
4358
4363
|
header: () => null,
|
|
4359
4364
|
cell: ({ row: e }) => {
|
|
4360
|
-
let t =
|
|
4365
|
+
let t = V(e.original);
|
|
4361
4366
|
if (!t || t.length === 0) return null;
|
|
4362
4367
|
let n = e.id;
|
|
4363
4368
|
return /* @__PURE__ */ v(Qn, {
|
|
@@ -4392,22 +4397,22 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4392
4397
|
} : null;
|
|
4393
4398
|
return [
|
|
4394
4399
|
...n ? [n] : [],
|
|
4395
|
-
...
|
|
4400
|
+
...B ? [e] : [],
|
|
4396
4401
|
...et,
|
|
4397
4402
|
...t ? [t] : []
|
|
4398
4403
|
];
|
|
4399
4404
|
}, [
|
|
4400
4405
|
et,
|
|
4406
|
+
B,
|
|
4401
4407
|
V,
|
|
4402
|
-
H,
|
|
4403
4408
|
Pe,
|
|
4404
4409
|
G,
|
|
4405
4410
|
Re,
|
|
4406
|
-
|
|
4411
|
+
H
|
|
4407
4412
|
]), rt = p(() => {
|
|
4408
|
-
let e = Object.entries(
|
|
4413
|
+
let e = Object.entries(W).sort(([e], [t]) => e.localeCompare(t));
|
|
4409
4414
|
return JSON.stringify(e);
|
|
4410
|
-
}, [
|
|
4415
|
+
}, [W]), it = p(() => {
|
|
4411
4416
|
if (s) return k();
|
|
4412
4417
|
}, [s, rt]);
|
|
4413
4418
|
u(() => {
|
|
@@ -4422,7 +4427,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4422
4427
|
try {
|
|
4423
4428
|
let e = JSON.parse(n);
|
|
4424
4429
|
if (K.current) return;
|
|
4425
|
-
a == null && Array.isArray(e.grouping) &&
|
|
4430
|
+
a == null && Array.isArray(e.grouping) && de(e.grouping), e.expanded != null && (e.expanded === !0 && Array.isArray(e.grouping) && e.grouping.length > 0 ? pe({}) : pe(e.expanded)), e.sorting && he(e.sorting), typeof e.globalFilter == "string" && _e(e.globalFilter), e.columnFilters && ye(e.columnFilters), e.columnVisibility && be(e.columnVisibility), e.columnOrder && we(e.columnOrder), e.columnAggregations && Te(e.columnAggregations), e.pagination && De(e.pagination);
|
|
4426
4431
|
} catch {} finally {
|
|
4427
4432
|
Ge.current = !0;
|
|
4428
4433
|
}
|
|
@@ -4435,7 +4440,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4435
4440
|
We
|
|
4436
4441
|
]), u(() => {
|
|
4437
4442
|
let e = rr(i).map((e) => e.id);
|
|
4438
|
-
|
|
4443
|
+
we((t) => {
|
|
4439
4444
|
let n = t.filter((t) => e.includes(t));
|
|
4440
4445
|
for (let t of e) n.includes(t) || n.push(t);
|
|
4441
4446
|
return n;
|
|
@@ -4444,13 +4449,13 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4444
4449
|
if (!e || !We || !Ge.current) return;
|
|
4445
4450
|
let t = {
|
|
4446
4451
|
grouping: a == null ? q : void 0,
|
|
4447
|
-
expanded:
|
|
4448
|
-
sorting:
|
|
4449
|
-
globalFilter:
|
|
4450
|
-
columnFilters:
|
|
4451
|
-
columnVisibility:
|
|
4452
|
-
columnOrder:
|
|
4453
|
-
columnAggregations:
|
|
4452
|
+
expanded: fe,
|
|
4453
|
+
sorting: me,
|
|
4454
|
+
globalFilter: ge,
|
|
4455
|
+
columnFilters: ve,
|
|
4456
|
+
columnVisibility: U,
|
|
4457
|
+
columnOrder: Ce,
|
|
4458
|
+
columnAggregations: W,
|
|
4454
4459
|
pagination: Ee
|
|
4455
4460
|
};
|
|
4456
4461
|
return window.clearTimeout(Ke.current), Ke.current = window.setTimeout(() => {
|
|
@@ -4459,18 +4464,18 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4459
4464
|
window.clearTimeout(Ke.current);
|
|
4460
4465
|
};
|
|
4461
4466
|
}, [
|
|
4462
|
-
|
|
4463
|
-
we,
|
|
4464
|
-
Se,
|
|
4467
|
+
ve,
|
|
4465
4468
|
W,
|
|
4466
|
-
|
|
4467
|
-
|
|
4469
|
+
Ce,
|
|
4470
|
+
U,
|
|
4471
|
+
fe,
|
|
4472
|
+
ge,
|
|
4468
4473
|
a,
|
|
4469
4474
|
e,
|
|
4470
4475
|
Ee,
|
|
4471
4476
|
q,
|
|
4472
4477
|
We,
|
|
4473
|
-
|
|
4478
|
+
me
|
|
4474
4479
|
]);
|
|
4475
4480
|
let J = M({
|
|
4476
4481
|
data: r,
|
|
@@ -4478,40 +4483,42 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4478
4483
|
debugTable: !1,
|
|
4479
4484
|
state: {
|
|
4480
4485
|
grouping: q,
|
|
4481
|
-
expanded:
|
|
4482
|
-
sorting:
|
|
4483
|
-
globalFilter:
|
|
4484
|
-
columnFilters:
|
|
4485
|
-
columnVisibility:
|
|
4486
|
+
expanded: fe,
|
|
4487
|
+
sorting: me,
|
|
4488
|
+
globalFilter: ge,
|
|
4489
|
+
columnFilters: ve,
|
|
4490
|
+
columnVisibility: U,
|
|
4486
4491
|
columnOrder: tt,
|
|
4487
4492
|
pagination: Ee,
|
|
4488
|
-
rowSelection:
|
|
4493
|
+
rowSelection: xe
|
|
4489
4494
|
},
|
|
4490
4495
|
onGroupingChange: (e) => {
|
|
4491
4496
|
K.current = !0;
|
|
4492
4497
|
let t = typeof e == "function" ? e(q) : e;
|
|
4493
|
-
|
|
4498
|
+
de((e) => or(e, t) ? e : t), or(q, t) || P?.(t);
|
|
4494
4499
|
},
|
|
4495
4500
|
onExpandedChange: (e) => {
|
|
4496
|
-
K.current = !0,
|
|
4501
|
+
K.current = !0, pe(e);
|
|
4497
4502
|
},
|
|
4498
4503
|
onSortingChange: (e) => {
|
|
4499
|
-
K.current = !0,
|
|
4504
|
+
K.current = !0, he(e);
|
|
4500
4505
|
},
|
|
4501
4506
|
onGlobalFilterChange: (e) => {
|
|
4502
|
-
K.current = !0,
|
|
4507
|
+
K.current = !0, _e(e);
|
|
4503
4508
|
},
|
|
4504
4509
|
onColumnFiltersChange: (e) => {
|
|
4505
|
-
K.current = !0,
|
|
4510
|
+
K.current = !0, ye(e);
|
|
4506
4511
|
},
|
|
4507
4512
|
onColumnVisibilityChange: (e) => {
|
|
4508
|
-
K.current = !0,
|
|
4513
|
+
K.current = !0, be(e);
|
|
4509
4514
|
},
|
|
4510
4515
|
onRowSelectionChange: (e) => {
|
|
4511
|
-
K.current = !0,
|
|
4516
|
+
K.current = !0, Se(e);
|
|
4512
4517
|
},
|
|
4513
4518
|
onColumnOrderChange: (e) => {
|
|
4514
|
-
K.current = !0
|
|
4519
|
+
K.current = !0;
|
|
4520
|
+
let t = (typeof e == "function" ? e(tt) : e).filter((e) => !Ue.includes(e));
|
|
4521
|
+
we(t);
|
|
4515
4522
|
},
|
|
4516
4523
|
onPaginationChange: (e) => {
|
|
4517
4524
|
K.current = !0, De(e);
|
|
@@ -4530,7 +4537,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4530
4537
|
getSubRows: (e) => e.subRows,
|
|
4531
4538
|
getPaginationRowModel: d ? A() : void 0,
|
|
4532
4539
|
filterFns: { columnFilter: Yn },
|
|
4533
|
-
enableRowSelection:
|
|
4540
|
+
enableRowSelection: B
|
|
4534
4541
|
});
|
|
4535
4542
|
qe.current = J;
|
|
4536
4543
|
let Y = J.getSelectedRowModel().flatRows.map((e) => e.original);
|
|
@@ -4546,13 +4553,13 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4546
4553
|
J,
|
|
4547
4554
|
rt
|
|
4548
4555
|
]), u(() => {
|
|
4549
|
-
|
|
4556
|
+
oe?.(J.getSelectedRowModel().flatRows.map((e) => e.original));
|
|
4550
4557
|
}, [
|
|
4551
|
-
|
|
4552
|
-
|
|
4558
|
+
oe,
|
|
4559
|
+
xe,
|
|
4553
4560
|
J
|
|
4554
4561
|
]), u(() => {
|
|
4555
|
-
|
|
4562
|
+
le && le.register({
|
|
4556
4563
|
selection: {
|
|
4557
4564
|
selectRowFn: (e) => {
|
|
4558
4565
|
let t = Array.isArray(e) ? e : [e];
|
|
@@ -4579,8 +4586,8 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4579
4586
|
}
|
|
4580
4587
|
});
|
|
4581
4588
|
}, [
|
|
4582
|
-
|
|
4583
|
-
|
|
4589
|
+
le,
|
|
4590
|
+
xe,
|
|
4584
4591
|
J
|
|
4585
4592
|
]), u(() => {
|
|
4586
4593
|
s && q.length !== 0 && J.setGrouping(q);
|
|
@@ -4626,7 +4633,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4626
4633
|
children: "Columns"
|
|
4627
4634
|
}), /* @__PURE__ */ v("div", {
|
|
4628
4635
|
className: "sf-table-panel-stack sf-table-panel-stack--tight",
|
|
4629
|
-
children:
|
|
4636
|
+
children: Ce.map((e) => J.getColumn(e)).filter(Boolean).map((e, t) => {
|
|
4630
4637
|
let n = e.id, r = e.getCanHide?.() ?? !0, i = e.getIsVisible(), a = Qe.get(n) ?? n;
|
|
4631
4638
|
return /* @__PURE__ */ y("div", {
|
|
4632
4639
|
draggable: !0,
|
|
@@ -4643,8 +4650,8 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4643
4650
|
e.preventDefault();
|
|
4644
4651
|
let r = ir(e);
|
|
4645
4652
|
if (!r || r === n) return;
|
|
4646
|
-
let i =
|
|
4647
|
-
i !== -1 && J.setColumnOrder(ar(
|
|
4653
|
+
let i = Ce.indexOf(r), a = t;
|
|
4654
|
+
i !== -1 && J.setColumnOrder(ar(Ce, i, a));
|
|
4648
4655
|
},
|
|
4649
4656
|
className: "sf-table-column-row",
|
|
4650
4657
|
children: [/* @__PURE__ */ y("span", {
|
|
@@ -4700,18 +4707,22 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4700
4707
|
children: q.length === 0 ? /* @__PURE__ */ v("div", {
|
|
4701
4708
|
className: "sf-table-panel-empty",
|
|
4702
4709
|
children: "Arrastra columnas aquí"
|
|
4703
|
-
}) : q.map((e) =>
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4710
|
+
}) : q.map((e) => {
|
|
4711
|
+
if (!J.getColumn(e)) return null;
|
|
4712
|
+
let t = Qe.get(e) ?? e;
|
|
4713
|
+
return /* @__PURE__ */ y("div", {
|
|
4714
|
+
className: "sf-table-panel-row",
|
|
4715
|
+
children: [/* @__PURE__ */ v("span", {
|
|
4716
|
+
className: "min-w-0 flex-1 truncate",
|
|
4717
|
+
children: t
|
|
4718
|
+
}), /* @__PURE__ */ v("button", {
|
|
4719
|
+
type: "button",
|
|
4720
|
+
onClick: () => J.setGrouping(q.filter((t) => t !== e)),
|
|
4721
|
+
className: "sf-table-panel-link",
|
|
4722
|
+
children: "Quitar"
|
|
4723
|
+
})]
|
|
4724
|
+
}, e);
|
|
4725
|
+
})
|
|
4715
4726
|
})]
|
|
4716
4727
|
}),
|
|
4717
4728
|
/* @__PURE__ */ y("section", {
|
|
@@ -4732,7 +4743,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4732
4743
|
children: [/* @__PURE__ */ v("p", {
|
|
4733
4744
|
className: "sf-table-panel__section-title",
|
|
4734
4745
|
children: "Aggregations"
|
|
4735
|
-
}), Object.keys(
|
|
4746
|
+
}), Object.keys(W).length > 0 && /* @__PURE__ */ v("button", {
|
|
4736
4747
|
type: "button",
|
|
4737
4748
|
onClick: () => {
|
|
4738
4749
|
K.current = !0, Te({});
|
|
@@ -4745,10 +4756,10 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4745
4756
|
children: [/* @__PURE__ */ v("p", {
|
|
4746
4757
|
className: "sf-table-panel__subtitle",
|
|
4747
4758
|
children: "Nota: solo se ve el resultado cuando la tabla está agrupada."
|
|
4748
|
-
}), Object.keys(
|
|
4759
|
+
}), Object.keys(W).length === 0 ? /* @__PURE__ */ v("div", {
|
|
4749
4760
|
className: "sf-table-panel-empty",
|
|
4750
4761
|
children: "Arrastra columnas aquí"
|
|
4751
|
-
}) : Object.entries(
|
|
4762
|
+
}) : Object.entries(W).map(([e, t]) => /* @__PURE__ */ y("div", {
|
|
4752
4763
|
className: "sf-table-panel-row",
|
|
4753
4764
|
children: [
|
|
4754
4765
|
/* @__PURE__ */ v("span", {
|
|
@@ -4794,7 +4805,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4794
4805
|
columnsMeta: Ze,
|
|
4795
4806
|
headerLabelById: Qe,
|
|
4796
4807
|
columnTypeById: $e,
|
|
4797
|
-
columnFilters:
|
|
4808
|
+
columnFilters: ve,
|
|
4798
4809
|
table: J,
|
|
4799
4810
|
markUserEdit: () => {
|
|
4800
4811
|
K.current = !0;
|
|
@@ -4805,16 +4816,16 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4805
4816
|
onClose: () => Ne(!1),
|
|
4806
4817
|
columnsMeta: Ze,
|
|
4807
4818
|
headerLabelById: Qe,
|
|
4808
|
-
sorting:
|
|
4819
|
+
sorting: me,
|
|
4809
4820
|
table: J,
|
|
4810
4821
|
markUserEdit: () => {
|
|
4811
4822
|
K.current = !0;
|
|
4812
4823
|
}
|
|
4813
4824
|
}),
|
|
4814
4825
|
/* @__PURE__ */ y("div", {
|
|
4815
|
-
className: (0, X.default)(
|
|
4826
|
+
className: (0, X.default)(ce ? "sf-table--embedded w-full" : "sf-table-shell w-full", x),
|
|
4816
4827
|
children: [
|
|
4817
|
-
!
|
|
4828
|
+
!ce && /* @__PURE__ */ y("div", {
|
|
4818
4829
|
className: "sf-table-toolbar",
|
|
4819
4830
|
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h2", {
|
|
4820
4831
|
className: "sf-table-title",
|
|
@@ -4825,9 +4836,9 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4825
4836
|
})] }), /* @__PURE__ */ y("div", {
|
|
4826
4837
|
className: "sf-table-toolbar-actions",
|
|
4827
4838
|
children: [
|
|
4828
|
-
(
|
|
4839
|
+
(te || ne) && /* @__PURE__ */ y("div", {
|
|
4829
4840
|
className: "flex items-center gap-2",
|
|
4830
|
-
children: [
|
|
4841
|
+
children: [te && /* @__PURE__ */ y("span", {
|
|
4831
4842
|
className: "sf-table-toolbar-status",
|
|
4832
4843
|
children: [/* @__PURE__ */ v("span", {
|
|
4833
4844
|
className: "sf-table-spinner sf-table-spinner--sm",
|
|
@@ -4837,7 +4848,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4837
4848
|
type: "button",
|
|
4838
4849
|
"aria-label": "Refrescar",
|
|
4839
4850
|
className: "sf-table-toolbar-btn",
|
|
4840
|
-
disabled:
|
|
4851
|
+
disabled: te,
|
|
4841
4852
|
onClick: ne,
|
|
4842
4853
|
children: /* @__PURE__ */ v(jn, {
|
|
4843
4854
|
className: "h-5 w-5",
|
|
@@ -4887,9 +4898,9 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4887
4898
|
]
|
|
4888
4899
|
}),
|
|
4889
4900
|
l && /* @__PURE__ */ v("input", {
|
|
4890
|
-
value:
|
|
4901
|
+
value: ge,
|
|
4891
4902
|
onChange: (e) => {
|
|
4892
|
-
K.current = !0,
|
|
4903
|
+
K.current = !0, _e(e.target.value);
|
|
4893
4904
|
},
|
|
4894
4905
|
placeholder: "Buscar...",
|
|
4895
4906
|
className: "sf-table-search"
|
|
@@ -4899,10 +4910,10 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4899
4910
|
children: "Agrupado"
|
|
4900
4911
|
}),
|
|
4901
4912
|
typeof F == "function" ? F(Y, { clearSelection: () => J.resetRowSelection() }) : F,
|
|
4902
|
-
|
|
4913
|
+
B && Y.length > 0 && /* @__PURE__ */ y("div", {
|
|
4903
4914
|
className: "flex items-center gap-2",
|
|
4904
4915
|
children: [(() => {
|
|
4905
|
-
let e =
|
|
4916
|
+
let e = ie?.(Y, { clearSelection: () => J.resetRowSelection() }) ?? [];
|
|
4906
4917
|
return e.length === 0 ? null : /* @__PURE__ */ y("div", {
|
|
4907
4918
|
className: "relative",
|
|
4908
4919
|
children: [/* @__PURE__ */ v("button", {
|
|
@@ -4932,14 +4943,14 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4932
4943
|
}, e.label))
|
|
4933
4944
|
})]
|
|
4934
4945
|
});
|
|
4935
|
-
})(),
|
|
4946
|
+
})(), ae?.(Y, { clearSelection: () => J.resetRowSelection() })]
|
|
4936
4947
|
})
|
|
4937
4948
|
]
|
|
4938
4949
|
})]
|
|
4939
4950
|
}),
|
|
4940
|
-
|
|
4951
|
+
R != null && /* @__PURE__ */ y("div", {
|
|
4941
4952
|
className: "sf-table-error",
|
|
4942
|
-
children: [/* @__PURE__ */ v("div", { children:
|
|
4953
|
+
children: [/* @__PURE__ */ v("div", { children: R }), z && /* @__PURE__ */ v("button", {
|
|
4943
4954
|
type: "button",
|
|
4944
4955
|
className: "sf-table-error__retry",
|
|
4945
4956
|
onClick: z,
|
|
@@ -4997,9 +5008,9 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4997
5008
|
}) }) : /* @__PURE__ */ v(_, { children: J.getRowModel().rows.map((e) => {
|
|
4998
5009
|
let t = G && !e.getIsGrouped() && Be(e.original) && Ve(e.id, e.original);
|
|
4999
5010
|
return /* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v("tr", {
|
|
5000
|
-
className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group",
|
|
5001
|
-
onClick:
|
|
5002
|
-
t.target.closest("button, a, input, select, label, [role=\"button\"]") ||
|
|
5011
|
+
className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group", re && !e.getIsGrouped() && "sf-table-row--clickable", t && "sf-table-row--detail-open"),
|
|
5012
|
+
onClick: re && !e.getIsGrouped() ? (t) => {
|
|
5013
|
+
t.target.closest("button, a, input, select, label, [role=\"button\"]") || re(e.original);
|
|
5003
5014
|
} : void 0,
|
|
5004
5015
|
children: e.getVisibleCells().map((t) => {
|
|
5005
5016
|
let n = t.getIsGrouped(), r = t.getIsAggregated(), i = t.getIsPlaceholder();
|
|
@@ -5021,7 +5032,10 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5021
5032
|
]
|
|
5022
5033
|
})
|
|
5023
5034
|
]
|
|
5024
|
-
}) : r ?
|
|
5035
|
+
}) : r ? (() => {
|
|
5036
|
+
let e = t.column.id;
|
|
5037
|
+
return W[e] == null ? null : T(t.column.columnDef.aggregatedCell ?? t.column.columnDef.cell, t.getContext());
|
|
5038
|
+
})() : i ? null : T(t.column.columnDef.cell, t.getContext())
|
|
5025
5039
|
}, t.id);
|
|
5026
5040
|
})
|
|
5027
5041
|
}), t && /* @__PURE__ */ v("tr", {
|
|
@@ -5031,15 +5045,15 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5031
5045
|
colSpan: e.getVisibleCells().length,
|
|
5032
5046
|
children: /* @__PURE__ */ v("div", {
|
|
5033
5047
|
className: "sf-table-detail-inner",
|
|
5034
|
-
children:
|
|
5048
|
+
children: H?.render ? H.render(e.original) : /* @__PURE__ */ v(sr, {
|
|
5035
5049
|
embedded: !0,
|
|
5036
|
-
data:
|
|
5037
|
-
columns:
|
|
5050
|
+
data: H?.getRows?.(e.original) ?? [],
|
|
5051
|
+
columns: H?.columns ?? [],
|
|
5038
5052
|
enableRowSelection: !1,
|
|
5039
5053
|
enableGrouping: !1,
|
|
5040
5054
|
enableFiltering: !1,
|
|
5041
5055
|
enableSorting: !1,
|
|
5042
|
-
emptyMessage:
|
|
5056
|
+
emptyMessage: H?.emptyMessage ?? "Sin detalle"
|
|
5043
5057
|
})
|
|
5044
5058
|
})
|
|
5045
5059
|
})
|
|
@@ -5058,13 +5072,13 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5058
5072
|
Math.max(1, J.getPageCount())
|
|
5059
5073
|
]
|
|
5060
5074
|
}), (() => {
|
|
5061
|
-
let e = J.getPrePaginationRowModel().rows.length, t = J.getState().pagination.pageSize
|
|
5075
|
+
let e = J.getPrePaginationRowModel().rows.length, t = J.getState().pagination.pageSize, n = {
|
|
5076
|
+
totalItems: e,
|
|
5077
|
+
limitItems: t,
|
|
5078
|
+
offsetItems: J.getState().pagination.pageIndex * t
|
|
5079
|
+
};
|
|
5062
5080
|
return /* @__PURE__ */ v(Wn, {
|
|
5063
|
-
pageData:
|
|
5064
|
-
totalItems: e,
|
|
5065
|
-
limitItems: t,
|
|
5066
|
-
offsetItems: J.getState().pagination.pageIndex * t
|
|
5067
|
-
},
|
|
5081
|
+
pageData: n,
|
|
5068
5082
|
maxItemsRange: Math.max(1, e),
|
|
5069
5083
|
onChange: (e, t) => {
|
|
5070
5084
|
let n = Math.max(1, e), r = Math.floor(Math.max(0, t) / n);
|
|
@@ -5439,7 +5453,7 @@ var lr = (e) => {
|
|
|
5439
5453
|
"aria-label": M(e) ? `Ordenar por ${e.header}` : void 0,
|
|
5440
5454
|
onClick: () => N(e),
|
|
5441
5455
|
onKeyDown: (t) => {
|
|
5442
|
-
M(e) && (t.key
|
|
5456
|
+
M(e) && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), N(e));
|
|
5443
5457
|
},
|
|
5444
5458
|
children: /* @__PURE__ */ y("span", {
|
|
5445
5459
|
className: "inline-flex items-center gap-1",
|
|
@@ -5492,7 +5506,7 @@ var lr = (e) => {
|
|
|
5492
5506
|
"aria-label": a ? `Editar ${t.header}` : void 0,
|
|
5493
5507
|
onDoubleClick: s,
|
|
5494
5508
|
onKeyDown: (e) => {
|
|
5495
|
-
!a || o || e.key
|
|
5509
|
+
!a || o || (e.key === "Enter" || e.key === " " || e.key === "F2") && (e.preventDefault(), s());
|
|
5496
5510
|
},
|
|
5497
5511
|
children: o ? /* @__PURE__ */ v("input", {
|
|
5498
5512
|
autoFocus: !0,
|
|
@@ -5628,24 +5642,27 @@ var lr = (e) => {
|
|
|
5628
5642
|
}, Er = ({ children: e, className: t }) => /* @__PURE__ */ v("div", {
|
|
5629
5643
|
className: (0, X.default)("flex flex-wrap items-center gap-3", t),
|
|
5630
5644
|
children: e
|
|
5631
|
-
}), Dr = ({ selected: e = !1, small: t = !1, icon: n, label: r, loading: i = !1, disabled: a, className: o, type: s = "button", ...c }) =>
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5645
|
+
}), Dr = ({ selected: e = !1, small: t = !1, icon: n, label: r, loading: i = !1, disabled: a, className: o, type: s = "button", ...c }) => {
|
|
5646
|
+
let l = a || i, u = c["aria-label"] ?? r;
|
|
5647
|
+
return /* @__PURE__ */ y("button", {
|
|
5648
|
+
type: s,
|
|
5649
|
+
disabled: l,
|
|
5650
|
+
"aria-label": u,
|
|
5651
|
+
"aria-busy": i || void 0,
|
|
5652
|
+
className: (0, X.default)("sf-toolbar-btn", t ? "sf-toolbar-btn--sm" : "sf-toolbar-btn--md", e ? "sf-toolbar-btn--selected" : "sf-toolbar-btn--idle", o),
|
|
5653
|
+
...c,
|
|
5654
|
+
children: [i ? /* @__PURE__ */ v(Qe, {
|
|
5655
|
+
className: (0, X.default)("animate-spin", t ? "h-3.5 w-3.5" : "h-4 w-4"),
|
|
5656
|
+
"aria-hidden": "true"
|
|
5657
|
+
}) : /* @__PURE__ */ v("span", {
|
|
5658
|
+
className: "sf-toolbar-btn__icon",
|
|
5659
|
+
children: n
|
|
5660
|
+
}), r && /* @__PURE__ */ v("span", {
|
|
5661
|
+
className: "sf-toolbar-btn__label",
|
|
5662
|
+
children: r
|
|
5663
|
+
})]
|
|
5664
|
+
});
|
|
5665
|
+
}, Or = ({ onEdit: e, onDelete: t, disabled: n = !1, editLabel: r = "Editar", deleteLabel: i = "Eliminar", className: a }) => /* @__PURE__ */ y("div", {
|
|
5649
5666
|
className: (0, X.default)("sf-row-actions", a),
|
|
5650
5667
|
children: [/* @__PURE__ */ v("button", {
|
|
5651
5668
|
type: "button",
|
|
@@ -7484,47 +7501,50 @@ var lr = (e) => {
|
|
|
7484
7501
|
}),
|
|
7485
7502
|
/* @__PURE__ */ v("ol", {
|
|
7486
7503
|
className: "sf-itinerary-editor__stops",
|
|
7487
|
-
children: a.map((e, t) =>
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
"
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
className: "sf-itinerary-editor__stop-
|
|
7502
|
-
children: [/* @__PURE__ */
|
|
7503
|
-
className: "sf-itinerary-editor__stop-
|
|
7504
|
-
children:
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7504
|
+
children: a.map((e, t) => {
|
|
7505
|
+
let n = t === a.length - 1;
|
|
7506
|
+
return /* @__PURE__ */ y("li", {
|
|
7507
|
+
className: "sf-itinerary-editor__stop",
|
|
7508
|
+
children: [
|
|
7509
|
+
!n && /* @__PURE__ */ v("span", {
|
|
7510
|
+
className: "sf-itinerary-editor__stop-line",
|
|
7511
|
+
"aria-hidden": "true"
|
|
7512
|
+
}),
|
|
7513
|
+
/* @__PURE__ */ v("span", {
|
|
7514
|
+
className: "sf-itinerary-editor__stop-marker",
|
|
7515
|
+
children: e.order
|
|
7516
|
+
}),
|
|
7517
|
+
/* @__PURE__ */ y("article", {
|
|
7518
|
+
className: "sf-itinerary-editor__stop-card",
|
|
7519
|
+
children: [/* @__PURE__ */ y("div", {
|
|
7520
|
+
className: "sf-itinerary-editor__stop-content",
|
|
7521
|
+
children: [/* @__PURE__ */ v("p", {
|
|
7522
|
+
className: "sf-itinerary-editor__stop-name",
|
|
7523
|
+
children: e.name
|
|
7524
|
+
}), e.subtitle && /* @__PURE__ */ v("p", {
|
|
7525
|
+
className: "sf-itinerary-editor__stop-subtitle",
|
|
7526
|
+
children: e.subtitle
|
|
7527
|
+
})]
|
|
7528
|
+
}), /* @__PURE__ */ y("div", {
|
|
7529
|
+
className: "sf-itinerary-editor__stop-actions",
|
|
7530
|
+
children: [e.onGps && /* @__PURE__ */ v($, {
|
|
7531
|
+
type: "button",
|
|
7532
|
+
variant: "outline",
|
|
7533
|
+
size: "sm",
|
|
7534
|
+
onClick: e.onGps,
|
|
7535
|
+
children: "GPS"
|
|
7536
|
+
}), e.onRemove && /* @__PURE__ */ v("button", {
|
|
7537
|
+
type: "button",
|
|
7538
|
+
className: "sf-itinerary-editor__stop-remove",
|
|
7539
|
+
"aria-label": `Eliminar parada ${e.name}`,
|
|
7540
|
+
onClick: e.onRemove,
|
|
7541
|
+
children: /* @__PURE__ */ v(We, { "aria-hidden": "true" })
|
|
7542
|
+
})]
|
|
7523
7543
|
})]
|
|
7524
|
-
})
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
}
|
|
7544
|
+
})
|
|
7545
|
+
]
|
|
7546
|
+
}, e.id);
|
|
7547
|
+
})
|
|
7528
7548
|
})
|
|
7529
7549
|
]
|
|
7530
7550
|
}), ha = (e) => {
|
|
@@ -7829,10 +7849,10 @@ var lr = (e) => {
|
|
|
7829
7849
|
borderTop: "1px solid var(--sf-border, #E2E8EC)",
|
|
7830
7850
|
background: "var(--sf-surface-alt, #EEF0F2)"
|
|
7831
7851
|
}, za = (e) => e >= 100 ? "#1F8A4C" : e >= 60 ? "#2E9E5B" : e > 0 ? "#C76A12" : "var(--sf-text-subtle,#8A98A4)", Ba = ({ routes: e, openRouteId: t, defaultOpenRouteId: n, onOpenRouteChange: r, onPassengerRemove: i, onPassengerBoard: a, onPassengerAbsent: o, onAddPassenger: c, onEvento: l, onCloseManifest: u, className: d, ariaLabel: f = "Torre de control" }) => {
|
|
7832
|
-
let
|
|
7833
|
-
let t =
|
|
7834
|
-
r ? r(t) :
|
|
7835
|
-
}, [r,
|
|
7852
|
+
let m = n ?? e.find((e) => e.defaultOpen)?.id ?? e[0]?.id ?? null, [g, b] = h(m), [x, S] = h({}), C = t === void 0 ? g : t, w = s((e) => {
|
|
7853
|
+
let t = C === e ? null : e;
|
|
7854
|
+
r ? r(t) : b(t);
|
|
7855
|
+
}, [r, C]), T = p(() => e.map((e) => {
|
|
7836
7856
|
let t = e.passengers.filter((e) => e.onboard), n = e.passengers.filter((e) => !e.onboard), r = e.capacity ?? e.units.reduce((e, t) => e + (t.capacity || 0), 0), i = e.onboardCount ?? t.length;
|
|
7837
7857
|
return {
|
|
7838
7858
|
route: e,
|
|
@@ -7847,8 +7867,8 @@ var lr = (e) => {
|
|
|
7847
7867
|
className: (0, X.default)("sf-live-route-board", d),
|
|
7848
7868
|
"aria-label": f,
|
|
7849
7869
|
style: Pa,
|
|
7850
|
-
children:
|
|
7851
|
-
let f =
|
|
7870
|
+
children: T.map(({ route: e, onboard: t, pending: n, cap: r, onboardCount: s, pct: d }) => {
|
|
7871
|
+
let f = C === e.id, p = za(d), m = !!x[e.id], h = e.plate;
|
|
7852
7872
|
return /* @__PURE__ */ y("div", {
|
|
7853
7873
|
style: {
|
|
7854
7874
|
background: "var(--sf-card-bg, #fff)",
|
|
@@ -7863,7 +7883,7 @@ var lr = (e) => {
|
|
|
7863
7883
|
type: "button",
|
|
7864
7884
|
style: Fa,
|
|
7865
7885
|
"aria-expanded": f,
|
|
7866
|
-
onClick: () =>
|
|
7886
|
+
onClick: () => w(e.id),
|
|
7867
7887
|
children: [
|
|
7868
7888
|
/* @__PURE__ */ v("span", { style: {
|
|
7869
7889
|
width: 9,
|
|
@@ -8029,7 +8049,7 @@ var lr = (e) => {
|
|
|
8029
8049
|
/* @__PURE__ */ y("button", {
|
|
8030
8050
|
type: "button",
|
|
8031
8051
|
onClick: () => {
|
|
8032
|
-
|
|
8052
|
+
S((t) => ({
|
|
8033
8053
|
...t,
|
|
8034
8054
|
[e.id]: !t[e.id]
|
|
8035
8055
|
})), c?.(e.id);
|
|
@@ -8418,82 +8438,90 @@ var lr = (e) => {
|
|
|
8418
8438
|
}), to = (e, t) => e.find((e) => e.items.some((e) => e.id === t)), no = (e) => {
|
|
8419
8439
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
8420
8440
|
return t.length === 0 ? "US" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : `${t[0][0] ?? ""}${t[1][0] ?? ""}`.toUpperCase();
|
|
8421
|
-
}, ro = ({ categories: e, activeItemId: t, onChange: r, brand: i, topBar: a, children: o, submenuCollapsed: s = !1, onSubmenuCollapsedChange: c, submenuFooter: l, showSubmenuHeader:
|
|
8422
|
-
let
|
|
8441
|
+
}, ro = ({ categories: e, activeItemId: t, onChange: r, brand: i, topBar: a, children: o, submenuCollapsed: s = !1, onSubmenuCollapsedChange: c, submenuFooter: l, showSubmenuHeader: d = !1, showDefaultTopBar: f = !1, topBarContext: h, branchSelector: g, themeToggle: _, notifications: b, moduleLauncher: x, userMenu: S, helpAction: C, exitToModulesAction: w, className: T, contentClassName: E }) => {
|
|
8442
|
+
let D = m(null);
|
|
8443
|
+
u(() => {
|
|
8444
|
+
let e = D.current?.querySelector(".sf-app-shell__submenu-btn--active");
|
|
8445
|
+
e instanceof HTMLElement && typeof e.scrollIntoView == "function" && e.scrollIntoView({
|
|
8446
|
+
block: "nearest",
|
|
8447
|
+
behavior: "smooth"
|
|
8448
|
+
});
|
|
8449
|
+
}, [t]);
|
|
8450
|
+
let O = p(() => e.map((e) => ({
|
|
8423
8451
|
...e,
|
|
8424
8452
|
items: e.items.filter((e) => !e.hidden)
|
|
8425
|
-
})).filter((e) => e.items.length > 0), [e]),
|
|
8453
|
+
})).filter((e) => e.items.length > 0), [e]), k = p(() => to(e, t) ?? O[0], [
|
|
8426
8454
|
e,
|
|
8427
|
-
|
|
8455
|
+
O,
|
|
8428
8456
|
t
|
|
8429
|
-
]),
|
|
8457
|
+
]), A = k?.id, j = (k?.items ?? []).filter((e) => !e.hidden), M = (k?.items ?? []).find((e) => e.id === t), N = (e) => {
|
|
8430
8458
|
c?.(e);
|
|
8431
|
-
},
|
|
8432
|
-
section:
|
|
8433
|
-
title:
|
|
8434
|
-
icon:
|
|
8435
|
-
},
|
|
8459
|
+
}, P = {
|
|
8460
|
+
section: h?.section ?? k?.label,
|
|
8461
|
+
title: h?.title ?? M?.label,
|
|
8462
|
+
icon: h?.icon ?? k?.icon
|
|
8463
|
+
}, F = !!g || !!_ || !!b || !!C || !!x || !!S, I = S ? S.initials ?? no(S.fullName) : "", L = (e) => {
|
|
8436
8464
|
let t = e.items.find((e) => !e.hidden);
|
|
8437
|
-
t && (r(t.id),
|
|
8438
|
-
},
|
|
8465
|
+
t && (r(t.id), N(!1));
|
|
8466
|
+
}, ee = /* @__PURE__ */ y("div", {
|
|
8439
8467
|
className: "sf-app-shell-default-topbar",
|
|
8440
8468
|
children: [/* @__PURE__ */ y("div", {
|
|
8441
8469
|
className: "sf-app-shell-default-topbar__left",
|
|
8442
|
-
children: [
|
|
8470
|
+
children: [P.icon && /* @__PURE__ */ v("span", {
|
|
8443
8471
|
className: "sf-app-shell-default-topbar__context-icon",
|
|
8444
|
-
children:
|
|
8445
|
-
}), (
|
|
8472
|
+
children: P.icon
|
|
8473
|
+
}), (P.section || P.title) && /* @__PURE__ */ y("div", {
|
|
8446
8474
|
className: "sf-app-shell-default-topbar__context-text",
|
|
8447
|
-
children: [
|
|
8475
|
+
children: [P.section && /* @__PURE__ */ v("span", {
|
|
8448
8476
|
className: "sf-app-shell-default-topbar__section",
|
|
8449
|
-
children:
|
|
8450
|
-
}),
|
|
8477
|
+
children: P.section
|
|
8478
|
+
}), P.title && /* @__PURE__ */ v("span", {
|
|
8451
8479
|
className: "sf-app-shell-default-topbar__title",
|
|
8452
|
-
children:
|
|
8480
|
+
children: P.title
|
|
8453
8481
|
})]
|
|
8454
8482
|
})]
|
|
8455
|
-
}),
|
|
8483
|
+
}), F && /* @__PURE__ */ y("div", {
|
|
8456
8484
|
className: "sf-app-shell-default-topbar__right",
|
|
8457
8485
|
children: [
|
|
8458
|
-
|
|
8486
|
+
g && /* @__PURE__ */ v("label", {
|
|
8459
8487
|
className: "sf-app-shell-default-topbar__branch",
|
|
8460
8488
|
"aria-label": "Seleccionar sucursal",
|
|
8461
8489
|
children: /* @__PURE__ */ v("select", {
|
|
8462
8490
|
className: "sf-app-shell-default-topbar__branch-select",
|
|
8463
|
-
value:
|
|
8464
|
-
onChange: (e) =>
|
|
8465
|
-
children:
|
|
8491
|
+
value: g.value,
|
|
8492
|
+
onChange: (e) => g.onChange(e.target.value),
|
|
8493
|
+
children: g.options.map((e) => /* @__PURE__ */ v("option", {
|
|
8466
8494
|
value: e.value,
|
|
8467
8495
|
children: e.label
|
|
8468
8496
|
}, e.value))
|
|
8469
8497
|
})
|
|
8470
8498
|
}),
|
|
8471
|
-
|
|
8499
|
+
_ && /* @__PURE__ */ v("button", {
|
|
8472
8500
|
type: "button",
|
|
8473
8501
|
className: "sf-app-shell-default-topbar__icon-btn",
|
|
8474
|
-
"aria-label":
|
|
8475
|
-
onClick:
|
|
8476
|
-
children:
|
|
8502
|
+
"aria-label": _.mode === "dark" ? "Cambiar a modo claro" : "Cambiar a modo oscuro",
|
|
8503
|
+
onClick: _.onToggle,
|
|
8504
|
+
children: _.mode === "dark" ? /* @__PURE__ */ v(Ge, { "aria-hidden": "true" }) : /* @__PURE__ */ v(Ye, { "aria-hidden": "true" })
|
|
8477
8505
|
}),
|
|
8478
|
-
|
|
8506
|
+
b && /* @__PURE__ */ v(vi, {
|
|
8479
8507
|
className: "sf-app-shell-default-topbar__notification",
|
|
8480
|
-
items:
|
|
8481
|
-
onItemClick:
|
|
8508
|
+
items: b.items,
|
|
8509
|
+
onItemClick: b.onItemClick
|
|
8482
8510
|
}),
|
|
8483
|
-
|
|
8511
|
+
C && /* @__PURE__ */ v("button", {
|
|
8484
8512
|
type: "button",
|
|
8485
8513
|
className: "sf-app-shell-default-topbar__icon-btn",
|
|
8486
|
-
"aria-label":
|
|
8487
|
-
onClick:
|
|
8488
|
-
children:
|
|
8514
|
+
"aria-label": C.ariaLabel ?? "Información",
|
|
8515
|
+
onClick: C.onClick,
|
|
8516
|
+
children: C.icon ?? /* @__PURE__ */ v($e, { "aria-hidden": "true" })
|
|
8489
8517
|
}),
|
|
8490
|
-
|
|
8518
|
+
x && /* @__PURE__ */ v(ai, {
|
|
8491
8519
|
align: "end",
|
|
8492
8520
|
widthClassName: "w-[27rem] max-w-[calc(100vw-1.5rem)]",
|
|
8493
8521
|
trigger: /* @__PURE__ */ v("span", {
|
|
8494
8522
|
className: "sf-app-shell-default-topbar__icon-btn",
|
|
8495
|
-
title:
|
|
8496
|
-
children:
|
|
8523
|
+
title: x.ariaLabel ?? "Módulos",
|
|
8524
|
+
children: x.triggerIcon ?? /* @__PURE__ */ v($a, {})
|
|
8497
8525
|
}),
|
|
8498
8526
|
children: /* @__PURE__ */ y("div", {
|
|
8499
8527
|
className: "sf-app-shell-module-launcher",
|
|
@@ -8501,12 +8529,12 @@ var lr = (e) => {
|
|
|
8501
8529
|
className: "sf-app-shell-module-launcher__header",
|
|
8502
8530
|
children: [/* @__PURE__ */ v("p", {
|
|
8503
8531
|
className: "sf-app-shell-module-launcher__title",
|
|
8504
|
-
children:
|
|
8532
|
+
children: x.title ?? "Cambiar de módulo"
|
|
8505
8533
|
}), /* @__PURE__ */ v("p", {
|
|
8506
8534
|
className: "sf-app-shell-module-launcher__subtitle",
|
|
8507
|
-
children:
|
|
8535
|
+
children: x.subtitle ?? "Ecosistema SARK"
|
|
8508
8536
|
})]
|
|
8509
|
-
}),
|
|
8537
|
+
}), x.items.length === 0 ? /* @__PURE__ */ v("p", {
|
|
8510
8538
|
className: "sf-notification-bell__empty sf-app-shell-module-launcher__empty",
|
|
8511
8539
|
role: "status",
|
|
8512
8540
|
children: "Sin módulos"
|
|
@@ -8514,7 +8542,7 @@ var lr = (e) => {
|
|
|
8514
8542
|
className: "sf-app-shell-module-launcher__grid",
|
|
8515
8543
|
role: "group",
|
|
8516
8544
|
"aria-label": "Módulos disponibles",
|
|
8517
|
-
children:
|
|
8545
|
+
children: x.items.map((e) => /* @__PURE__ */ y("button", {
|
|
8518
8546
|
type: "button",
|
|
8519
8547
|
role: "menuitem",
|
|
8520
8548
|
className: "sf-app-shell-module-launcher__item",
|
|
@@ -8531,45 +8559,45 @@ var lr = (e) => {
|
|
|
8531
8559
|
})]
|
|
8532
8560
|
})
|
|
8533
8561
|
}),
|
|
8534
|
-
|
|
8562
|
+
S && /* @__PURE__ */ v(ai, {
|
|
8535
8563
|
align: "end",
|
|
8536
8564
|
widthClassName: "w-72",
|
|
8537
8565
|
trigger: /* @__PURE__ */ y("span", {
|
|
8538
8566
|
className: "sf-app-shell-default-topbar__icon-btn sf-app-shell-default-topbar__profile-btn",
|
|
8539
8567
|
children: [/* @__PURE__ */ v(ga, {
|
|
8540
|
-
alt:
|
|
8541
|
-
fallback:
|
|
8568
|
+
alt: S.fullName,
|
|
8569
|
+
fallback: I,
|
|
8542
8570
|
size: "sm"
|
|
8543
8571
|
}), /* @__PURE__ */ y("span", {
|
|
8544
8572
|
className: "sf-app-shell-default-topbar__profile-text",
|
|
8545
8573
|
children: [/* @__PURE__ */ v("span", {
|
|
8546
8574
|
className: "sf-app-shell-default-topbar__profile-name",
|
|
8547
|
-
children:
|
|
8548
|
-
}),
|
|
8575
|
+
children: S.fullName
|
|
8576
|
+
}), S.subtitle && /* @__PURE__ */ v("span", {
|
|
8549
8577
|
className: "sf-app-shell-default-topbar__profile-subtitle",
|
|
8550
8578
|
"aria-hidden": "true",
|
|
8551
|
-
children:
|
|
8579
|
+
children: S.subtitle
|
|
8552
8580
|
})]
|
|
8553
8581
|
})]
|
|
8554
8582
|
}),
|
|
8555
8583
|
children: /* @__PURE__ */ y("div", {
|
|
8556
8584
|
className: "sf-app-shell-user-menu",
|
|
8557
|
-
children: [(
|
|
8585
|
+
children: [(S.fullName || S.subtitle) && /* @__PURE__ */ y("div", {
|
|
8558
8586
|
className: "sf-app-shell-user-menu__header",
|
|
8559
8587
|
children: [/* @__PURE__ */ v("p", {
|
|
8560
8588
|
className: "sf-app-shell-user-menu__name",
|
|
8561
|
-
children:
|
|
8562
|
-
}),
|
|
8589
|
+
children: S.fullName
|
|
8590
|
+
}), S.subtitle && /* @__PURE__ */ v("p", {
|
|
8563
8591
|
className: "sf-app-shell-user-menu__subtitle",
|
|
8564
|
-
children:
|
|
8592
|
+
children: S.subtitle
|
|
8565
8593
|
})]
|
|
8566
|
-
}),
|
|
8594
|
+
}), S.actions.length === 0 ? /* @__PURE__ */ v("p", {
|
|
8567
8595
|
className: "sf-notification-bell__empty",
|
|
8568
8596
|
role: "status",
|
|
8569
8597
|
children: "Sin acciones de perfil"
|
|
8570
8598
|
}) : /* @__PURE__ */ v("div", {
|
|
8571
8599
|
className: "sf-app-shell-user-menu__actions",
|
|
8572
|
-
children:
|
|
8600
|
+
children: S.actions.map((e) => /* @__PURE__ */ y("button", {
|
|
8573
8601
|
type: "button",
|
|
8574
8602
|
role: "menuitem",
|
|
8575
8603
|
className: (0, X.default)("sf-app-shell-user-menu__action", e.danger && "sf-app-shell-user-menu__action--danger"),
|
|
@@ -8587,9 +8615,9 @@ var lr = (e) => {
|
|
|
8587
8615
|
})
|
|
8588
8616
|
]
|
|
8589
8617
|
})]
|
|
8590
|
-
}),
|
|
8618
|
+
}), te = a ?? (f ? ee : null);
|
|
8591
8619
|
return /* @__PURE__ */ y("div", {
|
|
8592
|
-
className: (0, X.default)("sf-app-shell",
|
|
8620
|
+
className: (0, X.default)("sf-app-shell", T),
|
|
8593
8621
|
children: [/* @__PURE__ */ y("aside", {
|
|
8594
8622
|
className: "sf-app-shell__category-rail",
|
|
8595
8623
|
children: [
|
|
@@ -8598,19 +8626,19 @@ var lr = (e) => {
|
|
|
8598
8626
|
children: /* @__PURE__ */ v("button", {
|
|
8599
8627
|
type: "button",
|
|
8600
8628
|
className: "sf-app-shell__brand-button",
|
|
8601
|
-
onClick: () =>
|
|
8629
|
+
onClick: () => N(!s),
|
|
8602
8630
|
"aria-label": "Mostrar u ocultar submenú",
|
|
8603
8631
|
children: i
|
|
8604
8632
|
})
|
|
8605
8633
|
}),
|
|
8606
8634
|
/* @__PURE__ */ v("div", {
|
|
8607
8635
|
className: "sf-app-shell__categories",
|
|
8608
|
-
children:
|
|
8609
|
-
let t =
|
|
8636
|
+
children: O.map((e) => {
|
|
8637
|
+
let t = A === e.id;
|
|
8610
8638
|
return /* @__PURE__ */ y("button", {
|
|
8611
8639
|
type: "button",
|
|
8612
8640
|
title: e.label,
|
|
8613
|
-
onClick: () =>
|
|
8641
|
+
onClick: () => L(e),
|
|
8614
8642
|
className: (0, X.default)("sf-app-shell__category-btn", t && "sf-app-shell__category-btn--active"),
|
|
8615
8643
|
children: [
|
|
8616
8644
|
/* @__PURE__ */ v("span", {
|
|
@@ -8630,42 +8658,43 @@ var lr = (e) => {
|
|
|
8630
8658
|
}, e.id);
|
|
8631
8659
|
})
|
|
8632
8660
|
}),
|
|
8633
|
-
|
|
8661
|
+
w && /* @__PURE__ */ v("div", {
|
|
8634
8662
|
className: "sf-app-shell__rail-exit-wrap",
|
|
8635
8663
|
children: /* @__PURE__ */ v("button", {
|
|
8636
8664
|
type: "button",
|
|
8637
8665
|
className: "sf-app-shell__rail-exit-btn",
|
|
8638
|
-
onClick:
|
|
8639
|
-
"aria-label":
|
|
8640
|
-
title:
|
|
8666
|
+
onClick: w.onClick,
|
|
8667
|
+
"aria-label": w.ariaLabel ?? "Volver a lista de módulos",
|
|
8668
|
+
title: w.label ?? "Volver a módulos",
|
|
8641
8669
|
children: /* @__PURE__ */ v("span", {
|
|
8642
8670
|
className: "sf-app-shell__rail-exit-icon",
|
|
8643
8671
|
"aria-hidden": "true",
|
|
8644
|
-
children:
|
|
8672
|
+
children: w.icon ?? /* @__PURE__ */ v(at, {})
|
|
8645
8673
|
})
|
|
8646
8674
|
})
|
|
8647
8675
|
})
|
|
8648
8676
|
]
|
|
8649
8677
|
}), /* @__PURE__ */ y("div", {
|
|
8650
8678
|
className: "sf-app-shell__workspace",
|
|
8651
|
-
children: [
|
|
8679
|
+
children: [te && /* @__PURE__ */ v("header", {
|
|
8652
8680
|
className: "sf-app-shell__topbar",
|
|
8653
|
-
children:
|
|
8681
|
+
children: te
|
|
8654
8682
|
}), /* @__PURE__ */ y("div", {
|
|
8655
8683
|
className: "sf-app-shell__workspace-body",
|
|
8656
8684
|
children: [/* @__PURE__ */ y("aside", {
|
|
8657
8685
|
className: (0, X.default)("sf-app-shell__submenu", s && "sf-app-shell__submenu--collapsed"),
|
|
8658
8686
|
children: [
|
|
8659
|
-
|
|
8687
|
+
d && /* @__PURE__ */ v("div", {
|
|
8660
8688
|
className: "sf-app-shell__submenu-header",
|
|
8661
8689
|
children: !s && /* @__PURE__ */ v("span", {
|
|
8662
8690
|
className: "sf-app-shell__submenu-title",
|
|
8663
|
-
children:
|
|
8691
|
+
children: k?.label
|
|
8664
8692
|
})
|
|
8665
8693
|
}),
|
|
8666
8694
|
/* @__PURE__ */ v("div", {
|
|
8695
|
+
ref: D,
|
|
8667
8696
|
className: "sf-app-shell__submenu-items",
|
|
8668
|
-
children:
|
|
8697
|
+
children: j.map((e, i) => {
|
|
8669
8698
|
let a = e.id === t;
|
|
8670
8699
|
return /* @__PURE__ */ y(n, { children: [e.dividerBefore && i > 0 && /* @__PURE__ */ v("span", {
|
|
8671
8700
|
className: "sf-app-shell__submenu-divider",
|
|
@@ -8707,7 +8736,7 @@ var lr = (e) => {
|
|
|
8707
8736
|
}), /* @__PURE__ */ v("section", {
|
|
8708
8737
|
className: "sf-app-shell__main",
|
|
8709
8738
|
children: /* @__PURE__ */ v("main", {
|
|
8710
|
-
className: (0, X.default)("sf-app-shell__content",
|
|
8739
|
+
className: (0, X.default)("sf-app-shell__content", E),
|
|
8711
8740
|
children: o
|
|
8712
8741
|
})
|
|
8713
8742
|
})]
|
|
@@ -8844,9 +8873,9 @@ var lr = (e) => {
|
|
|
8844
8873
|
}, po = () => () => void 0, mo = () => g(po, () => !0, () => !1), ho = ({ small: e, error: t, className: n }) => (0, X.default)("sf-input", "sf-input--textarea", "sf-input--code", e && "sf-input--sm", t && "sf-input--error", n), go = (e) => {
|
|
8845
8874
|
switch (e) {
|
|
8846
8875
|
case "javascript": return [ee()];
|
|
8847
|
-
case "json": return [
|
|
8876
|
+
case "json": return [te()];
|
|
8848
8877
|
case "html": return [L()];
|
|
8849
|
-
case "sql": return [
|
|
8878
|
+
case "sql": return [R()];
|
|
8850
8879
|
default: return [];
|
|
8851
8880
|
}
|
|
8852
8881
|
}, _o = {
|
|
@@ -8913,7 +8942,7 @@ var lr = (e) => {
|
|
|
8913
8942
|
})
|
|
8914
8943
|
});
|
|
8915
8944
|
}, yo = ({ target: e, zoom: t = 16 }) => {
|
|
8916
|
-
let n =
|
|
8945
|
+
let n = ie();
|
|
8917
8946
|
return u(() => {
|
|
8918
8947
|
e && n.setView([e.lat, e.lng], t, { animate: !0 });
|
|
8919
8948
|
}, [
|
|
@@ -9007,7 +9036,7 @@ var lr = (e) => {
|
|
|
9007
9036
|
}, `${e.lat}-${e.lng}-${e.label}`))
|
|
9008
9037
|
})]
|
|
9009
9038
|
});
|
|
9010
|
-
}, wo =
|
|
9039
|
+
}, wo = oe.divIcon({
|
|
9011
9040
|
className: "",
|
|
9012
9041
|
html: "<div class=\"sf-map-picker-marker\"></div>",
|
|
9013
9042
|
iconSize: [14, 14],
|
|
@@ -9033,7 +9062,7 @@ var lr = (e) => {
|
|
|
9033
9062
|
lat: String(e.lat ?? To.lat),
|
|
9034
9063
|
lng: String(e.lng ?? To.lng)
|
|
9035
9064
|
} : { ...To }, Mo = "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>", No = ({ lat: e, lng: t }) => {
|
|
9036
|
-
let n =
|
|
9065
|
+
let n = ie();
|
|
9037
9066
|
return u(() => {
|
|
9038
9067
|
n.setView([e, t], n.getZoom(), { animate: !0 });
|
|
9039
9068
|
}, [
|
|
@@ -9041,7 +9070,7 @@ var lr = (e) => {
|
|
|
9041
9070
|
t,
|
|
9042
9071
|
n
|
|
9043
9072
|
]), null;
|
|
9044
|
-
}, Po = ({ readOnly: e, onPick: t }) => (
|
|
9073
|
+
}, Po = ({ readOnly: e, onPick: t }) => (ae({ click(n) {
|
|
9045
9074
|
e || t(Do(n.latlng.lat), Do(n.latlng.lng));
|
|
9046
9075
|
} }), null), Fo = ({ lat: e, lng: t, zoom: n = 13, readOnly: r, showGeocoder: i = !0, onPick: a }) => {
|
|
9047
9076
|
let o = [e, t], [s, c] = h(null);
|
|
@@ -9061,7 +9090,7 @@ var lr = (e) => {
|
|
|
9061
9090
|
scrollWheelZoom: !r,
|
|
9062
9091
|
className: "sf-map-frame",
|
|
9063
9092
|
children: [
|
|
9064
|
-
/* @__PURE__ */ v(
|
|
9093
|
+
/* @__PURE__ */ v(V, {
|
|
9065
9094
|
attribution: Mo,
|
|
9066
9095
|
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
9067
9096
|
}),
|
|
@@ -9934,7 +9963,7 @@ var lr = (e) => {
|
|
|
9934
9963
|
info: "sf-alert-row-list__meta--info",
|
|
9935
9964
|
default: "sf-alert-row-list__meta--default"
|
|
9936
9965
|
}, Fs = (e, t) => {
|
|
9937
|
-
t && (e.key
|
|
9966
|
+
t && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
|
|
9938
9967
|
}, Is = ({ events: e, title: t, maxHeight: n, compact: r = !1, showTimeline: i = !0, viewAllLabel: a, onViewAll: o, className: s }) => {
|
|
9939
9968
|
let c = r ? "text-[11px]" : "text-xs", l = r ? "text-[10px]" : "text-[11px]", u = r ? "text-[9px]" : "text-[10px]", d = r ? "py-1.5" : "py-2.5";
|
|
9940
9969
|
return /* @__PURE__ */ y("div", {
|
|
@@ -10610,7 +10639,8 @@ var lr = (e) => {
|
|
|
10610
10639
|
className: "sr-only",
|
|
10611
10640
|
onBlur: () => S.field.onBlur(),
|
|
10612
10641
|
onChange: (e) => {
|
|
10613
|
-
|
|
10642
|
+
let t = e.target.files?.[0] ?? null;
|
|
10643
|
+
j(t), e.target.value = "";
|
|
10614
10644
|
}
|
|
10615
10645
|
}),
|
|
10616
10646
|
A ? /* @__PURE__ */ y("div", {
|
|
@@ -10898,7 +10928,8 @@ var lr = (e) => {
|
|
|
10898
10928
|
if (d) {
|
|
10899
10929
|
m(!0);
|
|
10900
10930
|
try {
|
|
10901
|
-
|
|
10931
|
+
let n = t.toLowerCase().endsWith(".png") ? "image/png" : "image/jpeg";
|
|
10932
|
+
i(await Cc(e, d, t, n));
|
|
10902
10933
|
} finally {
|
|
10903
10934
|
m(!1);
|
|
10904
10935
|
}
|
|
@@ -10909,7 +10940,7 @@ var lr = (e) => {
|
|
|
10909
10940
|
children: [
|
|
10910
10941
|
/* @__PURE__ */ v("div", {
|
|
10911
10942
|
className: "sf-photo-crop-editor__stage",
|
|
10912
|
-
children: /* @__PURE__ */ v(
|
|
10943
|
+
children: /* @__PURE__ */ v(se, {
|
|
10913
10944
|
image: e,
|
|
10914
10945
|
crop: o,
|
|
10915
10946
|
zoom: l,
|
|
@@ -10978,7 +11009,8 @@ var lr = (e) => {
|
|
|
10978
11009
|
}
|
|
10979
11010
|
T(!0);
|
|
10980
11011
|
try {
|
|
10981
|
-
|
|
11012
|
+
let t = await mc(e);
|
|
11013
|
+
I(t);
|
|
10982
11014
|
} finally {
|
|
10983
11015
|
T(!1);
|
|
10984
11016
|
}
|
|
@@ -11010,7 +11042,8 @@ var lr = (e) => {
|
|
|
11010
11042
|
className: "sr-only",
|
|
11011
11043
|
onBlur: () => C.field.onBlur(),
|
|
11012
11044
|
onChange: (e) => {
|
|
11013
|
-
|
|
11045
|
+
let t = e.target.files?.[0] ?? null;
|
|
11046
|
+
ee(t), e.target.value = "";
|
|
11014
11047
|
}
|
|
11015
11048
|
}),
|
|
11016
11049
|
F ? /* @__PURE__ */ y("div", {
|
|
@@ -11331,12 +11364,12 @@ var lr = (e) => {
|
|
|
11331
11364
|
...t,
|
|
11332
11365
|
config: e
|
|
11333
11366
|
})
|
|
11334
|
-
}), Gc = (e) => [e.lat, e.lng], Kc = (e) =>
|
|
11367
|
+
}), Gc = (e) => [e.lat, e.lng], Kc = (e) => oe.divIcon({
|
|
11335
11368
|
className: "",
|
|
11336
11369
|
html: `<div class="sf-neutral-map-marker" style="${e ? `--sf-neutral-map-marker-bg:${e};` : ""}"></div>`,
|
|
11337
11370
|
iconSize: [18, 18],
|
|
11338
11371
|
iconAnchor: [9, 9]
|
|
11339
|
-
}), qc = ({ readOnly: e, onClick: t }) => (
|
|
11372
|
+
}), qc = ({ readOnly: e, onClick: t }) => (ae({ click(n) {
|
|
11340
11373
|
e || t?.({ location: {
|
|
11341
11374
|
lat: n.latlng.lat,
|
|
11342
11375
|
lng: n.latlng.lng
|
|
@@ -11353,7 +11386,7 @@ var lr = (e) => {
|
|
|
11353
11386
|
doubleClickZoom: !1,
|
|
11354
11387
|
className: "sf-map-frame",
|
|
11355
11388
|
children: [
|
|
11356
|
-
/* @__PURE__ */ v(
|
|
11389
|
+
/* @__PURE__ */ v(V, {
|
|
11357
11390
|
attribution: l,
|
|
11358
11391
|
url: c
|
|
11359
11392
|
}),
|
|
@@ -11361,7 +11394,7 @@ var lr = (e) => {
|
|
|
11361
11394
|
readOnly: s,
|
|
11362
11395
|
onClick: u
|
|
11363
11396
|
}),
|
|
11364
|
-
i.map((e) => /* @__PURE__ */ v(
|
|
11397
|
+
i.map((e) => /* @__PURE__ */ v(re, {
|
|
11365
11398
|
positions: e.points.map(Gc),
|
|
11366
11399
|
pathOptions: {
|
|
11367
11400
|
color: e.color ?? zc("var(--sf-map-area-stroke)"),
|
|
@@ -11370,7 +11403,7 @@ var lr = (e) => {
|
|
|
11370
11403
|
weight: 2.5
|
|
11371
11404
|
}
|
|
11372
11405
|
}, e.id)),
|
|
11373
|
-
r.map((e) => /* @__PURE__ */ v(
|
|
11406
|
+
r.map((e) => /* @__PURE__ */ v(B, {
|
|
11374
11407
|
positions: e.points.map(Gc),
|
|
11375
11408
|
pathOptions: {
|
|
11376
11409
|
color: e.color ?? zc("var(--sf-map-route-stroke)"),
|
|
@@ -11661,12 +11694,12 @@ var lr = (e) => {
|
|
|
11661
11694
|
})
|
|
11662
11695
|
});
|
|
11663
11696
|
}, Tl = ({ title: e, description: t, center: n = Ac, zoom: r = 13, markers: i = [], routes: a = [], areas: o = [], height: s = 360, className: c, readOnly: l, onClick: u, onMarkerClick: d, onMarkerDoubleClick: f, onMarkerDrag: m, onMarkerDragEnd: h }) => {
|
|
11664
|
-
let g = xl();
|
|
11697
|
+
let g = xl(), _ = p(() => g.renderer, [g.renderer]);
|
|
11665
11698
|
return /* @__PURE__ */ v(Dc, {
|
|
11666
11699
|
title: e,
|
|
11667
11700
|
description: t,
|
|
11668
11701
|
className: c,
|
|
11669
|
-
children:
|
|
11702
|
+
children: _({
|
|
11670
11703
|
center: n,
|
|
11671
11704
|
zoom: r,
|
|
11672
11705
|
markers: i,
|
|
@@ -11751,10 +11784,11 @@ var lr = (e) => {
|
|
|
11751
11784
|
type: "button",
|
|
11752
11785
|
onClick: () => {
|
|
11753
11786
|
!navigator.geolocation || d || S || (f(!0), m(null), navigator.geolocation.getCurrentPosition((e) => {
|
|
11754
|
-
|
|
11787
|
+
let t = {
|
|
11755
11788
|
lat: Number(rl(e.coords.latitude)),
|
|
11756
11789
|
lng: Number(rl(e.coords.longitude))
|
|
11757
|
-
}
|
|
11790
|
+
};
|
|
11791
|
+
w(t), m(e.coords.accuracy > 200 ? `Precisión aproximada: ${Math.round(e.coords.accuracy)} m.` : null), f(!1);
|
|
11758
11792
|
}, () => {
|
|
11759
11793
|
m("No se pudo obtener la ubicación. Marca el punto en el mapa."), f(!1);
|
|
11760
11794
|
}, {
|
|
@@ -12426,7 +12460,7 @@ var lr = (e) => {
|
|
|
12426
12460
|
let [r, i] = h(null), a = (n) => (a) => {
|
|
12427
12461
|
if (a.preventDefault(), !r) return;
|
|
12428
12462
|
let o = e.findIndex((e) => e.id === r);
|
|
12429
|
-
o
|
|
12463
|
+
o !== -1 && o !== n && (t(o, n), i(null));
|
|
12430
12464
|
};
|
|
12431
12465
|
return /* @__PURE__ */ v("div", {
|
|
12432
12466
|
className: (0, X.default)("sf-sortable-list", n),
|
|
@@ -12907,7 +12941,7 @@ var lr = (e) => {
|
|
|
12907
12941
|
});
|
|
12908
12942
|
}, Fu = [-12.0464, -77.0428], Iu = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), Lu = (e, t) => {
|
|
12909
12943
|
let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ?? Su[r].slice(0, 3).toUpperCase() : `${e.value}%`, a = Iu(e.label.length > 40 ? `${e.label.slice(0, 37)}…` : e.label), o = t ? " sf-network-marker--selected" : "";
|
|
12910
|
-
return
|
|
12944
|
+
return oe.divIcon({
|
|
12911
12945
|
className: "sf-network-marker-root",
|
|
12912
12946
|
iconAnchor: [24, 42],
|
|
12913
12947
|
iconSize: [48, 48],
|
|
@@ -12917,7 +12951,7 @@ var lr = (e) => {
|
|
|
12917
12951
|
</div>`
|
|
12918
12952
|
});
|
|
12919
12953
|
}, Ru = ({ nodes: e }) => {
|
|
12920
|
-
let t =
|
|
12954
|
+
let t = ie(), n = ju(e);
|
|
12921
12955
|
return u(() => {
|
|
12922
12956
|
n && t.fitBounds(n, {
|
|
12923
12957
|
padding: [32, 32],
|
|
@@ -12944,14 +12978,14 @@ var lr = (e) => {
|
|
|
12944
12978
|
scrollWheelZoom: !0,
|
|
12945
12979
|
className: "h-full w-full",
|
|
12946
12980
|
children: [
|
|
12947
|
-
/* @__PURE__ */ v(
|
|
12981
|
+
/* @__PURE__ */ v(V, {
|
|
12948
12982
|
attribution: S.attribution,
|
|
12949
12983
|
url: S.url
|
|
12950
12984
|
}),
|
|
12951
12985
|
c && e.length > 0 && /* @__PURE__ */ v(Ru, { nodes: e }),
|
|
12952
12986
|
w.map(({ edge: e, line: t }) => {
|
|
12953
12987
|
let n = Eu[e.type ?? "backbone"];
|
|
12954
|
-
return /* @__PURE__ */ v(
|
|
12988
|
+
return /* @__PURE__ */ v(B, {
|
|
12955
12989
|
positions: t,
|
|
12956
12990
|
pathOptions: {
|
|
12957
12991
|
color: Du(n.color),
|
|
@@ -13024,11 +13058,11 @@ var lr = (e) => {
|
|
|
13024
13058
|
role: "status",
|
|
13025
13059
|
children: i
|
|
13026
13060
|
}), e.map((t, n) => {
|
|
13027
|
-
let r = t.eventType ?? "edit";
|
|
13061
|
+
let r = t.eventType ?? "edit", i = n === e.length - 1;
|
|
13028
13062
|
return /* @__PURE__ */ y("li", {
|
|
13029
13063
|
className: "sf-audit-timeline__item",
|
|
13030
13064
|
children: [
|
|
13031
|
-
|
|
13065
|
+
!i && /* @__PURE__ */ v("span", {
|
|
13032
13066
|
className: "sf-audit-timeline__line",
|
|
13033
13067
|
"aria-hidden": "true"
|
|
13034
13068
|
}),
|
|
@@ -13261,11 +13295,11 @@ var lr = (e) => {
|
|
|
13261
13295
|
role: "status",
|
|
13262
13296
|
children: n
|
|
13263
13297
|
}), e.map((t, n) => {
|
|
13264
|
-
let r = t.status ?? "default";
|
|
13298
|
+
let r = t.status ?? "default", i = n === e.length - 1;
|
|
13265
13299
|
return /* @__PURE__ */ y("li", {
|
|
13266
13300
|
className: "sf-timeline__item",
|
|
13267
13301
|
children: [
|
|
13268
|
-
|
|
13302
|
+
!i && /* @__PURE__ */ v("span", {
|
|
13269
13303
|
className: "sf-timeline__line",
|
|
13270
13304
|
"aria-hidden": "true"
|
|
13271
13305
|
}),
|
|
@@ -13386,8 +13420,8 @@ var lr = (e) => {
|
|
|
13386
13420
|
bottom: 0
|
|
13387
13421
|
}, md = {
|
|
13388
13422
|
bar: {
|
|
13389
|
-
Root:
|
|
13390
|
-
renderSeries: (e) => e.map((e, t) => /* @__PURE__ */ v(
|
|
13423
|
+
Root: ue,
|
|
13424
|
+
renderSeries: (e) => e.map((e, t) => /* @__PURE__ */ v(le, {
|
|
13391
13425
|
dataKey: e.key,
|
|
13392
13426
|
name: e.label ?? e.key,
|
|
13393
13427
|
fill: ld(e, t),
|
|
@@ -13400,10 +13434,10 @@ var lr = (e) => {
|
|
|
13400
13434
|
}, e.key))
|
|
13401
13435
|
},
|
|
13402
13436
|
line: {
|
|
13403
|
-
Root:
|
|
13437
|
+
Root: me,
|
|
13404
13438
|
renderSeries: (e) => e.map((e, t) => {
|
|
13405
13439
|
let n = ld(e, t);
|
|
13406
|
-
return /* @__PURE__ */ v(
|
|
13440
|
+
return /* @__PURE__ */ v(pe, {
|
|
13407
13441
|
type: "monotone",
|
|
13408
13442
|
dataKey: e.key,
|
|
13409
13443
|
name: e.label ?? e.key,
|
|
@@ -13418,10 +13452,10 @@ var lr = (e) => {
|
|
|
13418
13452
|
})
|
|
13419
13453
|
},
|
|
13420
13454
|
area: {
|
|
13421
|
-
Root:
|
|
13455
|
+
Root: H,
|
|
13422
13456
|
renderSeries: (e) => e.map((e, t) => {
|
|
13423
13457
|
let n = ld(e, t);
|
|
13424
|
-
return /* @__PURE__ */ v(
|
|
13458
|
+
return /* @__PURE__ */ v(ce, {
|
|
13425
13459
|
type: "monotone",
|
|
13426
13460
|
dataKey: e.key,
|
|
13427
13461
|
name: e.label ?? e.key,
|
|
@@ -13439,29 +13473,29 @@ var lr = (e) => {
|
|
|
13439
13473
|
style: { height: i },
|
|
13440
13474
|
role: "img",
|
|
13441
13475
|
"aria-label": a ?? `Gráfico ${e}`,
|
|
13442
|
-
children: p ? /* @__PURE__ */ v(
|
|
13476
|
+
children: p ? /* @__PURE__ */ v(he, {
|
|
13443
13477
|
width: "100%",
|
|
13444
13478
|
height: "100%",
|
|
13445
13479
|
children: /* @__PURE__ */ y(d, {
|
|
13446
13480
|
data: t,
|
|
13447
13481
|
margin: pd,
|
|
13448
13482
|
children: [
|
|
13449
|
-
c && /* @__PURE__ */ v(
|
|
13483
|
+
c && /* @__PURE__ */ v(de, {
|
|
13450
13484
|
strokeDasharray: "3 3",
|
|
13451
13485
|
vertical: !1
|
|
13452
13486
|
}),
|
|
13453
|
-
/* @__PURE__ */ v(
|
|
13487
|
+
/* @__PURE__ */ v(_e, {
|
|
13454
13488
|
dataKey: n,
|
|
13455
13489
|
tick: dd,
|
|
13456
13490
|
axisLine: { stroke: "var(--sf-chart-grid)" }
|
|
13457
13491
|
}),
|
|
13458
|
-
/* @__PURE__ */ v(
|
|
13492
|
+
/* @__PURE__ */ v(ve, {
|
|
13459
13493
|
tick: dd,
|
|
13460
13494
|
axisLine: { stroke: "var(--sf-chart-grid)" },
|
|
13461
13495
|
width: 48
|
|
13462
13496
|
}),
|
|
13463
|
-
l && /* @__PURE__ */ v(
|
|
13464
|
-
u && /* @__PURE__ */ v(
|
|
13497
|
+
l && /* @__PURE__ */ v(ge, { contentStyle: ud }),
|
|
13498
|
+
u && /* @__PURE__ */ v(fe, { wrapperStyle: fd }),
|
|
13465
13499
|
f(r)
|
|
13466
13500
|
]
|
|
13467
13501
|
})
|
|
@@ -13486,13 +13520,13 @@ var lr = (e) => {
|
|
|
13486
13520
|
},
|
|
13487
13521
|
role: "img",
|
|
13488
13522
|
"aria-label": a,
|
|
13489
|
-
children: l ? /* @__PURE__ */ v(
|
|
13523
|
+
children: l ? /* @__PURE__ */ v(he, {
|
|
13490
13524
|
width: "100%",
|
|
13491
13525
|
height: "100%",
|
|
13492
|
-
children: /* @__PURE__ */ v(
|
|
13526
|
+
children: /* @__PURE__ */ v(me, {
|
|
13493
13527
|
data: e,
|
|
13494
13528
|
margin: u,
|
|
13495
|
-
children: /* @__PURE__ */ v(
|
|
13529
|
+
children: /* @__PURE__ */ v(pe, {
|
|
13496
13530
|
type: "monotone",
|
|
13497
13531
|
dataKey: t,
|
|
13498
13532
|
stroke: c,
|
|
@@ -13699,7 +13733,7 @@ var Ed = (e, t, n) => {
|
|
|
13699
13733
|
return e != null && e === "development";
|
|
13700
13734
|
}, Fd = (e, t) => {
|
|
13701
13735
|
let n = x({
|
|
13702
|
-
resolver:
|
|
13736
|
+
resolver: ye(e),
|
|
13703
13737
|
defaultValues: t?.defaultValues
|
|
13704
13738
|
}), r = (e, t) => n.handleSubmit(e, (e, n) => {
|
|
13705
13739
|
Pd() && console.log(e), t?.(e, n);
|
|
@@ -13742,19 +13776,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13742
13776
|
</Worksheet>
|
|
13743
13777
|
</Workbook>`, a = new Blob([i], { type: "application/vnd.ms-excel" }), o = URL.createObjectURL(a), s = document.createElement("a");
|
|
13744
13778
|
s.href = o, s.download = r.endsWith(".xls") || r.endsWith(".xlsx") ? r : `${r}.xls`, s.click(), URL.revokeObjectURL(o);
|
|
13745
|
-
}, Hd = "Este campo es requerido", Ud = "Introduce una dirección de correo electrónico válida", Wd = "El correo electrónico es obligatorio", Gd = "El valor de este campo es inválido", Kd = "Introduce un número de celular válido", qd = (e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim() : e, Jd = (e = Hd) =>
|
|
13779
|
+
}, Hd = "Este campo es requerido", Ud = "Introduce una dirección de correo electrónico válida", Wd = "El correo electrónico es obligatorio", Gd = "El valor de este campo es inválido", Kd = "Introduce un número de celular válido", qd = (e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim() : e, Jd = (e = Hd) => U.string().transform(qd).required(e), Yd = () => U.string().transform(qd).default(null).nullable(), Xd = (e = Wd) => U.string().transform(qd).email(Ud).required(e), Zd = (e = Ud) => U.string().transform(qd).test("emailTest", e, (e) => e == null || e === "" || U.string().email().isValidSync(e)).default(null).nullable(), Qd = (e, t = Gd, n = Hd) => U.string().transform(qd).trim().test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).required(n), $d = (e, t = Gd) => U.string().transform(qd).test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).default(null).nullable(), ef = (e) => {
|
|
13746
13780
|
let t = e?.minLength == null ? void 0 : Math.max(1, e.minLength);
|
|
13747
13781
|
return {
|
|
13748
13782
|
minLength: t,
|
|
13749
13783
|
maxLength: e?.maxLength == null ? void 0 : Math.max(t ?? 1, e.maxLength)
|
|
13750
13784
|
};
|
|
13751
13785
|
}, tf = (e) => {
|
|
13752
|
-
let { minLength: t, maxLength: n } = ef(e), r = /^[0-9]+$/, i =
|
|
13786
|
+
let { minLength: t, maxLength: n } = ef(e), r = /^[0-9]+$/, i = U.string().transform(qd).test("rgxValidation", (e, t) => e == null || e === "" || e.match(r) != null || t.createError({ message: "El campo debe contener solo caracteres numéricos" }));
|
|
13753
13787
|
return t != null && (i = i.min(t, `El campo debe tener al menos ${t} caracteres`)), n != null && (i = i.max(n, `La longitud máxima permitida es de ${n} caracteres`)), i;
|
|
13754
|
-
}, nf = (e) => tf(e).required(Hd), rf = (e) => tf(e).default(null).nullable(), af = (e = Hd) =>
|
|
13788
|
+
}, nf = (e) => tf(e).required(Hd), rf = (e) => tf(e).default(null).nullable(), af = (e = Hd) => U.boolean().typeError("El tipo de dato debe ser booleano").required(e), of = () => U.boolean().typeError("El tipo de dato debe ser booleano").default(null).nullable(), sf = (e, t) => t == null || t === "" ? null : Number.isNaN(e) ? void 0 : e, cf = (e = Hd) => U.number().transform(sf).typeError("Debe ser numérico").required(e), lf = () => U.number().transform(sf).typeError("Debe ser numérico").default(null).nullable().notRequired(), uf = (e = Hd) => U.number().transform(sf).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").required(e), df = (e = Hd) => uf(e).integer("Este campo debe ser un número entero"), ff = () => U.number().transform(sf).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").default(null).nullable(), pf = () => ff().integer("Este campo debe ser un número entero"), mf = (e) => {
|
|
13755
13789
|
let t = /^(?:\+51)\s?[0-9]{3}\s?[0-9]{3}\s?[0-9]{3}$/;
|
|
13756
|
-
return
|
|
13757
|
-
}, hf = (e = Kd) => mf(e).nullable(), gf = (e = Kd) => mf(e).required(Hd), _f = (e = Hd) =>
|
|
13790
|
+
return U.string().transform((e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim().startsWith("+") ? e.trim() : `+51 ${e.trim()}` : e).test("rgxValidation", e, (e) => e == null || e === "" || e.match(t) != null).default(null);
|
|
13791
|
+
}, hf = (e = Kd) => mf(e).nullable(), gf = (e = Kd) => mf(e).required(Hd), _f = (e = Hd) => U.array().of(Jd()).min(1, "Debe contener al menos un elemento").required(e), vf = () => U.array().of(Yd()).default(null).nullable(), yf = {
|
|
13758
13792
|
transformNullIfEmpty: qd,
|
|
13759
13793
|
requiredString: Jd,
|
|
13760
13794
|
nullableString: Yd,
|
|
@@ -13776,7 +13810,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13776
13810
|
requiredCelular: gf,
|
|
13777
13811
|
requiredStringArray: _f,
|
|
13778
13812
|
nullableStringArray: vf
|
|
13779
|
-
}, bf = (e) =>
|
|
13813
|
+
}, bf = (e) => U.object().shape(e(yf));
|
|
13780
13814
|
//#endregion
|
|
13781
13815
|
export { Vr as AccessDenied, Ki as Accordion, jr as ActionButton, _r as ActiveFiltersBar, wl as AddressSearchInput, Nr as Alert, Bs as AlertLane, Ls as AlertRowList, io as AppBarContainer, ro as AppShell, $a as AppsGridIcon, Pl as AreaInput, dn as AsyncCardSelect, cr as AsyncCustomTable, ln as AsyncSearchSelect, mn as AsyncSearchTableSelect, Vu as AuditTimeline, ga as Avatar, _a as AvatarGroup, ba as Badge, Ut as BooleanCheckbox, Wi as Breadcrumb, $ as Button, Er as ButtonGroup, cd as CHART_SERIES_COLORS, Kt as COUNTRY_DIAL_CODES, Gt as CURRENCY_SYMBOLS, bs as Calendar, pu as CardRadioGroup, un as CardSelect, sd as Carousel, hd as Chart, Rt as Checkbox, zt as CheckboxGroup, vo as CodeEditor, lu as ColorInput, Ti as CommandPalette, ei as ConfirmDialog, pi as ContextMenuProvider, Dl as CoordinatesInput, tn as CurrencyInput, sr as CustomTable, Ws as DashboardCard, qs as DashboardGrid, Zs as DashboardLayout, Js as DashboardSection, Xs as DashboardStatBar, St as DateInput, Dt as DatePicker, nc as DateRangeFields, Cn as DateRangeInput, rc as DateRangeUtcInput, Ya as DateWeekStrip, An as DisplayField, Xt as DniInput, As as DonutGauge, js as DonutGaugeRow, xi as Drawer, ai as DropdownMenu, oi as DropdownMenuItem, Sr as EditableDataGrid, Pr as EmptyState, ts as EntityCard, rs as EntityCardGrid, Ir as ErrorView, Is as EventLog, Tr as ExpandableTableSection, Z as FieldLayout, _c as FileDropInput, On as FileInput, sa as FilterBar, la as FilterBarDate, ca as FilterBarField, ua as FilterBarSelect, da as FilterBarText, kr as FormActions, ia as FormWizard, zi as HeightProvider, yt as Input, ma as ItineraryEditor, Bo as KPICard, Ho as KPIGrid, du as KeyValueInput, Gu as LiveChip, Ba as LiveRouteBoard, rd as LiveStatusBar, zr as LoadingView, El as LocationPicker, bo as MIN_MAP_GEOCODER_QUERY_LENGTH, ps as MONTH_NAMES, fa as MaestroLayout, Dc as MapFrame, Lo as MapPicker, Oc as MapStatus, Tl as MapView, oa as MasterDetailLayout, aa as MasterDetailListItem, ni as MessageDialog, Go as MetricBarList, Wo as MetricBarRow, Qr as Modal, ls as ModuleCard, us as ModuleCardGrid, bc as MultiPhotoInput, xu as NETWORK_BASEMAPS, Eu as NETWORK_EDGE_STYLES, Cu as NETWORK_KIND_COLORS, Su as NETWORK_KIND_LABELS, wu as NETWORK_STATUS_COLORS, Tu as NETWORK_STATUS_LABELS, Kn as NUMBER_FILTER_OPS, Pu as NetworkLegend, zu as NetworkMap, vi as NotificationBell, xt as NumberInput, tu as NumberStepper, mu as ORG_TREE_DEFAULT_THEMES, si as OptionItem, bu as OrgTree, ec as OtpInput, Oi as PageContainer, Ai as PageHeader, Wn as PaginationRangeInput, Oa as PassengerBoardCard, kt as PasswordInput, $t as PhoneInput, Tc as PhotoCropInput, vc as PhotoInput, Ct as Popover, Di as ProductTour, iu as ProgressBar, ou as ProgressBarReadonly, gi as QRView, Bt as RadioGroup, ru as RangeSliderInput, su as RatingInput, os as RecommendationCard, Wu as RecordList, Uu as RecordListItem, Br as RetryBlock, fo as RichTextEditor, Fl as RouteInput, Or as RowActions, Zt as RucInput, Ac as SF_DEFAULT_MAP_CENTER, jc as SF_DEFAULT_MAP_ZOOM, Fc as SF_GOOGLE_ENGINE_CAPABILITIES, Pc as SF_LEAFLET_ENGINE_CAPABILITIES, kc as SF_MAPS_CONFIG_ERROR, Nc as SF_OSM_ATTRIBUTION, Mc as SF_OSM_TILE_URL, Gn as STRING_FILTER_OPS, qi as ScrollArea, sn as SearchSelect, pn as SearchTableSelect, Lt as Select, Ui as Separator, _l as SfProvider, Si as Sheet, ji as SidePanel, Li as SidePanelContainer, yc as SignaturePad, Ur as Skeleton, Zl as SliderInput, Tn as SmartDateInput, nn as SmartInput, Il as SmartMapInput, xc as SmartMediaInput, hn as SmartSelect, fu as SortableList, gd as Sparkline, Rr as Spinner, fs as StatCard, ta as Stepper, Ji as SummaryItem, eo as SyncIcon, ci as TabMenuOption, gr as TableColumnSettings, Xn as TableFiltersPanel, ki as TablePageLayout, Zn as TableSortingPanel, Mi as Tabs, uu as TagsInput, bt as TextArea, wn as TimeRangeInput, od as Timeline, Yr as ToastProvider, Vt as Toggle, Ht as ToggleCard, Dr as ToolbarButton, yi as Tooltip, ds as TramoCard, It as Transfer, Pt as TreeSelect, Va as UnitSelector, Vi as Visibility, Hi as Visivility, ms as WEEKDAY_LABELS, Qa as WeekdayToggleStrip, Wt as YesNoSelect, va as badgeClassName, ya as badgeDotClassName, br as buildActiveFilterChips, _s as buildMonthGrid, hu as buildOrgTreeRows, Ft as buttonClassName, Sn as calcTimeDuration, Bl as clampNumber, ho as codeEditorClassName, Yn as columnFilterFn, Au as countNetworkStatus, _u as countOrgTreeNodes, bf as createFormSchema, zn as createLocalStorageAsyncStateStore, uc as createPhotoItem, mc as cropImageToSquare, Ed as defaultOnSortFunc, ic as emptyDateRange, Wl as emptyKeyValuePairs, Kl as emptyNumberRange, Ec as emptyPhotoItems, Hl as emptyTags, ac as emptyTimeRange, Rd as exportTableCsv, Vd as exportTableXlsx, Q as fieldClassName, yr as formatColumnFilterValue, So as formatMapGeocoderLabel, Vl as formatSliderLabel, yn as fromUtcDateIso, Jn as inferInitialFilterValue, _t as inputFocusTransition, xr as isBlankRow, qn as isColumnFilterValue, _n as isValidDateString, cc as isValidFileType, Nu as networkEdgeLines, ju as networkMapBounds, Mu as networkNodePositions, sc as nextPhotoId, bn as normalizeDateRange, Jl as normalizeHexColor, Gl as normalizeKeyValuePairs, ku as normalizeNetworkEdges, Ou as normalizeNetworkNodes, ql as normalizeNumberRange, pc as normalizePhotoItems, Ul as normalizeTags, xn as normalizeTimeRange, of as nullableBoolean, hf as nullableCelular, Zd as nullableEmail, lf as nullableNumber, $d as nullableOrMatchString, pf as nullablePositiveInteger, ff as nullablePositiveNumber, Yd as nullableString, vf as nullableStringArray, rf as nullableStringNumbersOnly, vu as orgTreeRootNodes, gs as parseYMD, Yl as progressPercent, Ad as readQueryValue, Md as removeQueryValue, af as requiredBoolean, gf as requiredCelular, Xd as requiredEmail, Qd as requiredMatchString, cf as requiredNumber, df as requiredPositiveInteger, uf as requiredPositiveNumber, Jd as requiredString, _f as requiredStringArray, nf as requiredStringNumbersOnly, gu as resolveOrgTreeTheme, ld as resolveSeriesColor, dc as revokePhotoPreview, fc as revokePhotoPreviews, qt as sanitizeDigits, xo as searchMapAddresses, al as sfClampLatitude, ol as sfClampLongitude, rl as sfFormatCoordinate, cl as sfLatLngToString, ul as sfMarkerFromLatLng, ll as sfNormalizeLatLng, sl as sfParseCoordinate, lc as showFilePicker, vt as textareaClassName, Wa as toIsoDate, gn as toLocalDateYMD, hs as toLocalYMD, Nt as toStringArray, vn as toUtcDateIso, qd as transformNullIfEmpty, jd as updateQueryValue, bl as useAddressSearch, Dd as useArrayPaginator, cn as useAsyncOptions, li as useClickAway, Bi as useContainerHeight, hi as useContextMenu, Fd as useCustomForm, lr as useCustomTableController, ii as useDropdownClose, wd as useFilterData, ra as useFormWizard, mo as useIsClient, _d as useMaestroFilter, xl as useMapEngine, Sl as useMapsConfig, $r as useModal, Nd as useQueryStringState, vl as useSf, yl as useSfMaps, Fi as useSidePanelContainer, Ni as useSidePanelHandle, kd as useStoredState, mr as useTableColumnSettings, Xr as useToast, Yt as validateDni, Jt as validateRuc, yf as validators };
|
|
13782
13816
|
|