@sfperusacdev/sf-ui 0.2.6 → 0.2.7
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 +128 -122
- package/dist/sf-ui.js.map +1 -1
- package/dist/sf-ui.umd.cjs +1 -1
- package/dist/sf-ui.umd.cjs.map +1 -1
- package/dist/types/src/components/dashboard/DashboardPageFrame.d.ts +14 -1
- package/package.json +1 -1
package/dist/sf-ui.js
CHANGED
|
@@ -11,7 +11,7 @@ import { html as L } from "@codemirror/lang-html";
|
|
|
11
11
|
import { javascript as R } from "@codemirror/lang-javascript";
|
|
12
12
|
import { json as z } from "@codemirror/lang-json";
|
|
13
13
|
import { sql as B } from "@codemirror/lang-sql";
|
|
14
|
-
import { Circle as ee, MapContainer as
|
|
14
|
+
import { Circle as ee, MapContainer as V, Marker as te, Polygon as ne, Polyline as re, TileLayer as H, Tooltip as ie, useMap as U, useMapEvents as ae } from "react-leaflet";
|
|
15
15
|
import oe from "leaflet";
|
|
16
16
|
import { Area as se, AreaChart as W, Bar as ce, BarChart as le, CartesianGrid as ue, Label as de, LabelList as fe, Legend as pe, Line as me, LineChart as he, PolarAngleAxis as ge, PolarGrid as _e, PolarRadiusAxis as ve, Radar as ye, RadarChart as be, ReferenceLine as xe, ResponsiveContainer as Se, Tooltip as Ce, XAxis as we, YAxis as Te } from "recharts";
|
|
17
17
|
import Ee from "react-easy-crop";
|
|
@@ -2720,18 +2720,18 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2720
2720
|
let O = b({
|
|
2721
2721
|
name: t,
|
|
2722
2722
|
control: e.control
|
|
2723
|
-
}), k = String(t), A = O.fieldState.error, j = m(null), M = m(null), [N, P] = h(!1), [F, I] = h(""), [L, R] = h(), [z, B] = h(0), ee = m(null),
|
|
2723
|
+
}), k = String(t), A = O.fieldState.error, j = m(null), M = m(null), [N, P] = h(!1), [F, I] = h(""), [L, R] = h(), [z, B] = h(0), ee = m(null), V = p(() => o ? Jt(O.field.value) : O.field.value ? [String(O.field.value)] : [], [O.field.value, o]), te = p(() => {
|
|
2724
2724
|
let e = /* @__PURE__ */ new Map();
|
|
2725
2725
|
for (let t of n) e.set(t.value, t);
|
|
2726
2726
|
return e;
|
|
2727
|
-
}, [n]),
|
|
2727
|
+
}, [n]), ne = p(() => {
|
|
2728
2728
|
let e = [];
|
|
2729
|
-
for (let t of
|
|
2730
|
-
let n =
|
|
2729
|
+
for (let t of V) {
|
|
2730
|
+
let n = te.get(t);
|
|
2731
2731
|
n && e.push(n);
|
|
2732
2732
|
}
|
|
2733
2733
|
return e;
|
|
2734
|
-
}, [
|
|
2734
|
+
}, [te, V]), re = p(() => {
|
|
2735
2735
|
let e = F.trim().toLowerCase();
|
|
2736
2736
|
return e ? n.filter((t) => t.label.toLowerCase().includes(e)) : n;
|
|
2737
2737
|
}, [n, F]);
|
|
@@ -2740,28 +2740,28 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2740
2740
|
B(ee.current?.scrollTop ?? 0);
|
|
2741
2741
|
}));
|
|
2742
2742
|
}, [N, F]);
|
|
2743
|
-
let
|
|
2743
|
+
let H = (e) => {
|
|
2744
2744
|
O.field.onChange(e), C?.(e);
|
|
2745
|
-
},
|
|
2745
|
+
}, ie = () => {
|
|
2746
2746
|
P(!1), I(""), R(void 0);
|
|
2747
2747
|
}, U = (e) => {
|
|
2748
2748
|
if (g) return;
|
|
2749
2749
|
if (!o) {
|
|
2750
|
-
|
|
2750
|
+
H(e), ie();
|
|
2751
2751
|
return;
|
|
2752
2752
|
}
|
|
2753
|
-
let t =
|
|
2754
|
-
|
|
2753
|
+
let t = V.includes(e) ? V.filter((t) => t !== e) : [...V, e];
|
|
2754
|
+
H(t);
|
|
2755
2755
|
}, ae = (e) => {
|
|
2756
2756
|
if (!g) {
|
|
2757
2757
|
if (!o) {
|
|
2758
|
-
|
|
2758
|
+
H("");
|
|
2759
2759
|
return;
|
|
2760
2760
|
}
|
|
2761
|
-
V
|
|
2761
|
+
H(V.filter((t) => t !== e));
|
|
2762
2762
|
}
|
|
2763
2763
|
}, oe = () => {
|
|
2764
|
-
g ||
|
|
2764
|
+
g || H(o ? [] : "");
|
|
2765
2765
|
}, se = () => {
|
|
2766
2766
|
let e = M.current;
|
|
2767
2767
|
if (!e) return;
|
|
@@ -2786,7 +2786,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2786
2786
|
}, [N]), u(() => {
|
|
2787
2787
|
let e = (e) => {
|
|
2788
2788
|
let t = e.target;
|
|
2789
|
-
j.current?.contains(t) ||
|
|
2789
|
+
j.current?.contains(t) || ie();
|
|
2790
2790
|
};
|
|
2791
2791
|
return document.addEventListener("pointerdown", e), () => {
|
|
2792
2792
|
document.removeEventListener("pointerdown", e);
|
|
@@ -2810,12 +2810,12 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2810
2810
|
onScroll: (e) => {
|
|
2811
2811
|
B(e.currentTarget.scrollTop);
|
|
2812
2812
|
},
|
|
2813
|
-
children:
|
|
2814
|
-
let e = Math.max(72, (L?.maxHeight ?? 288) - yn), t = Math.max(1, Math.ceil(e / bn)), n = Math.max(0, Math.floor(z / bn) - xn), r = Math.min(
|
|
2813
|
+
children: re.length ? (() => {
|
|
2814
|
+
let e = Math.max(72, (L?.maxHeight ?? 288) - yn), t = Math.max(1, Math.ceil(e / bn)), n = Math.max(0, Math.floor(z / bn) - xn), r = Math.min(re.length, n + t + 12), i = n * bn, a = Math.max(0, (re.length - r) * bn), s = re.slice(n, r);
|
|
2815
2815
|
return /* @__PURE__ */ y(_, { children: [
|
|
2816
2816
|
i > 0 && /* @__PURE__ */ v("div", { style: { height: i } }),
|
|
2817
2817
|
s.map((e) => {
|
|
2818
|
-
let t =
|
|
2818
|
+
let t = V.includes(e.value);
|
|
2819
2819
|
return /* @__PURE__ */ y("button", {
|
|
2820
2820
|
type: "button",
|
|
2821
2821
|
onClick: () => U(e.value),
|
|
@@ -2871,10 +2871,10 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2871
2871
|
withRightIcon: !0,
|
|
2872
2872
|
withLeftIcon: !!D,
|
|
2873
2873
|
disabled: g
|
|
2874
|
-
}), "flex items-center gap-1.5 text-left", o &&
|
|
2874
|
+
}), "flex items-center gap-1.5 text-left", o && ne.length > 1 && "h-auto min-h-[2.5rem] py-2"),
|
|
2875
2875
|
children: [/* @__PURE__ */ v("span", {
|
|
2876
2876
|
className: "flex min-w-0 flex-1 flex-wrap items-center gap-1",
|
|
2877
|
-
children:
|
|
2877
|
+
children: ne.length ? o ? /* @__PURE__ */ y(_, { children: [ne.slice(0, Math.max(0, S)).map((e) => /* @__PURE__ */ y("span", {
|
|
2878
2878
|
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",
|
|
2879
2879
|
children: [/* @__PURE__ */ v("span", {
|
|
2880
2880
|
className: "truncate",
|
|
@@ -2887,19 +2887,19 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2887
2887
|
className: "rounded text-slate-400 hover:text-slate-700",
|
|
2888
2888
|
children: /* @__PURE__ */ v(q, { size: 12 })
|
|
2889
2889
|
})]
|
|
2890
|
-
}, e.value)),
|
|
2890
|
+
}, e.value)), ne.length > S && /* @__PURE__ */ y("span", {
|
|
2891
2891
|
className: "inline-flex items-center rounded bg-slate-100 px-1.5 py-0.5 text-xs text-slate-500",
|
|
2892
|
-
children: ["+",
|
|
2892
|
+
children: ["+", ne.length - S]
|
|
2893
2893
|
})] }) : /* @__PURE__ */ v("span", {
|
|
2894
2894
|
className: "truncate",
|
|
2895
|
-
children:
|
|
2895
|
+
children: ne[0]?.label
|
|
2896
2896
|
}) : /* @__PURE__ */ v("span", {
|
|
2897
2897
|
className: "text-slate-400",
|
|
2898
2898
|
children: c
|
|
2899
2899
|
})
|
|
2900
2900
|
}), /* @__PURE__ */ y("span", {
|
|
2901
2901
|
className: "flex items-center gap-1",
|
|
2902
|
-
children: [
|
|
2902
|
+
children: [ne.length > 0 && !g && /* @__PURE__ */ v("button", {
|
|
2903
2903
|
type: "button",
|
|
2904
2904
|
onClick: (e) => {
|
|
2905
2905
|
e.stopPropagation(), oe();
|
|
@@ -3073,7 +3073,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3073
3073
|
pageSize: f
|
|
3074
3074
|
}), z = p(() => c ? Jt(j.field.value) : j.field.value ? [String(j.field.value)] : [], [j.field.value, c]), B = p(() => n.filter((e) => z.includes(e.value)), [n, z]), ee = (e) => {
|
|
3075
3075
|
j.field.onChange(e), m?.(e);
|
|
3076
|
-
},
|
|
3076
|
+
}, V = (e) => {
|
|
3077
3077
|
if (u || d) return;
|
|
3078
3078
|
if (!c) {
|
|
3079
3079
|
ee(e), j.field.onBlur();
|
|
@@ -3081,7 +3081,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3081
3081
|
}
|
|
3082
3082
|
let t = z.includes(e) ? z.filter((t) => t !== e) : [...z, e];
|
|
3083
3083
|
ee(t), j.field.onBlur();
|
|
3084
|
-
},
|
|
3084
|
+
}, te = (e) => {
|
|
3085
3085
|
if (!(u || d)) {
|
|
3086
3086
|
if (!c) {
|
|
3087
3087
|
ee(""), j.field.onBlur();
|
|
@@ -3089,9 +3089,9 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3089
3089
|
}
|
|
3090
3090
|
ee(z.filter((t) => t !== e)), j.field.onBlur();
|
|
3091
3091
|
}
|
|
3092
|
-
},
|
|
3092
|
+
}, ne = () => {
|
|
3093
3093
|
u || d || (ee(c ? [] : ""), j.field.onBlur());
|
|
3094
|
-
},
|
|
3094
|
+
}, re = p(() => [
|
|
3095
3095
|
{
|
|
3096
3096
|
id: "selected",
|
|
3097
3097
|
header: "",
|
|
@@ -3123,9 +3123,9 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3123
3123
|
c,
|
|
3124
3124
|
u,
|
|
3125
3125
|
z
|
|
3126
|
-
]),
|
|
3126
|
+
]), H = M({
|
|
3127
3127
|
data: n,
|
|
3128
|
-
columns:
|
|
3128
|
+
columns: re,
|
|
3129
3129
|
state: {
|
|
3130
3130
|
globalFilter: F,
|
|
3131
3131
|
pagination: L
|
|
@@ -3147,7 +3147,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3147
3147
|
return n != null && String(n).toLowerCase().includes(r);
|
|
3148
3148
|
});
|
|
3149
3149
|
}
|
|
3150
|
-
}),
|
|
3150
|
+
}), ie = H.getRowModel().rows, U = H.getFilteredRowModel().rows.length, ae = Math.max(0, f - ie.length), oe = H.getState().pagination.pageIndex + 1, se = Math.max(1, H.getPageCount()), W = H.getAllLeafColumns().length, ce = C > 0 && F.trim().length < C;
|
|
3151
3151
|
return /* @__PURE__ */ v(Z, {
|
|
3152
3152
|
id: N,
|
|
3153
3153
|
label: a,
|
|
@@ -3171,7 +3171,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3171
3171
|
disabled: u || d,
|
|
3172
3172
|
placeholder: d ? "Cargando..." : x ?? "Buscar...",
|
|
3173
3173
|
onBlur: () => j.field.onBlur(),
|
|
3174
|
-
onChange: (e) =>
|
|
3174
|
+
onChange: (e) => H.setGlobalFilter(e.target.value),
|
|
3175
3175
|
className: "h-8 w-full bg-transparent text-sm text-slate-900 outline-none placeholder:text-slate-400 disabled:cursor-not-allowed"
|
|
3176
3176
|
})]
|
|
3177
3177
|
}),
|
|
@@ -3195,7 +3195,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3195
3195
|
children: e.label
|
|
3196
3196
|
}), !u && /* @__PURE__ */ v("button", {
|
|
3197
3197
|
type: "button",
|
|
3198
|
-
onClick: () =>
|
|
3198
|
+
onClick: () => te(e.value),
|
|
3199
3199
|
className: "shrink-0 rounded text-slate-400 hover:text-slate-700",
|
|
3200
3200
|
children: /* @__PURE__ */ v(q, { size: 12 })
|
|
3201
3201
|
})]
|
|
@@ -3206,7 +3206,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3206
3206
|
})]
|
|
3207
3207
|
}), B.length > 0 && !u && !d && /* @__PURE__ */ v("button", {
|
|
3208
3208
|
type: "button",
|
|
3209
|
-
onClick:
|
|
3209
|
+
onClick: ne,
|
|
3210
3210
|
className: "shrink-0 text-xs font-medium text-slate-500 hover:text-slate-900",
|
|
3211
3211
|
children: "Limpiar"
|
|
3212
3212
|
})]
|
|
@@ -3231,10 +3231,10 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3231
3231
|
]
|
|
3232
3232
|
}) : /* @__PURE__ */ v("table", {
|
|
3233
3233
|
className: "w-full table-fixed border-collapse text-sm",
|
|
3234
|
-
children: /* @__PURE__ */ v("tbody", { children:
|
|
3234
|
+
children: /* @__PURE__ */ v("tbody", { children: ie.length ? /* @__PURE__ */ y(_, { children: [ie.map((e) => {
|
|
3235
3235
|
let t = z.includes(e.original.value);
|
|
3236
3236
|
return /* @__PURE__ */ v("tr", {
|
|
3237
|
-
onClick: () =>
|
|
3237
|
+
onClick: () => V(e.original.value),
|
|
3238
3238
|
className: (0, X.default)("h-10 border-b border-slate-100 last:border-b-0", u || d ? "cursor-default" : "cursor-pointer hover:bg-slate-50", t && "bg-slate-50"),
|
|
3239
3239
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ v("td", {
|
|
3240
3240
|
className: (0, X.default)("px-3 py-2 align-middle text-slate-700", e.column.id === "selected" && "w-10"),
|
|
@@ -3276,8 +3276,8 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3276
3276
|
children: [
|
|
3277
3277
|
/* @__PURE__ */ v("button", {
|
|
3278
3278
|
type: "button",
|
|
3279
|
-
disabled: u || d || !
|
|
3280
|
-
onClick: () =>
|
|
3279
|
+
disabled: u || d || !H.getCanPreviousPage(),
|
|
3280
|
+
onClick: () => H.previousPage(),
|
|
3281
3281
|
className: "rounded border border-slate-300 bg-white px-2 py-1 text-xs text-slate-700 disabled:cursor-not-allowed disabled:opacity-50",
|
|
3282
3282
|
children: "Anterior"
|
|
3283
3283
|
}),
|
|
@@ -3291,8 +3291,8 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3291
3291
|
}),
|
|
3292
3292
|
/* @__PURE__ */ v("button", {
|
|
3293
3293
|
type: "button",
|
|
3294
|
-
disabled: u || d || !
|
|
3295
|
-
onClick: () =>
|
|
3294
|
+
disabled: u || d || !H.getCanNextPage(),
|
|
3295
|
+
onClick: () => H.nextPage(),
|
|
3296
3296
|
className: "rounded border border-slate-300 bg-white px-2 py-1 text-xs text-slate-700 disabled:cursor-not-allowed disabled:opacity-50",
|
|
3297
3297
|
children: "Siguiente"
|
|
3298
3298
|
})
|
|
@@ -4657,7 +4657,7 @@ var Er = (e) => {
|
|
|
4657
4657
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
4658
4658
|
return !0;
|
|
4659
4659
|
};
|
|
4660
|
-
function kr({ 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 = 25, paginationVariant: g = "classic", pageSizeOptions: b, serverPagination: x, fillParentHeight: S = !1, maxBodyHeightPx: C, className: w = "", emptyMessage: N = "No hay datos", title: P = "Tabla", subtitle: F, sidePanel: I = !1, onGroupingChange: L, toolbarSlot: R, belowToolbarSlot: z, loading: B = !1, loadingMessage: ee = "Cargando...", isFetching:
|
|
4660
|
+
function kr({ 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 = 25, paginationVariant: g = "classic", pageSizeOptions: b, serverPagination: x, fillParentHeight: S = !1, maxBodyHeightPx: C, className: w = "", emptyMessage: N = "No hay datos", title: P = "Tabla", subtitle: F, sidePanel: I = !1, onGroupingChange: L, toolbarSlot: R, belowToolbarSlot: z, loading: B = !1, loadingMessage: ee = "Cargando...", isFetching: V = !1, error: te, onRetry: ne, onRefresh: re, onRowClick: H, enableRowSelection: ie = !0, getRowActions: U, getBulkActions: ae, bulkActionsSlot: oe, onSelectionChange: se, headerVariant: W = "default", searchPlaceholder: ce = "Buscar...", embedded: le = !1, detail: ue, controller: de }) {
|
|
4661
4661
|
let [fe, pe] = h(o), [me, he] = h(() => o.length > 0 ? {} : !0), [ge, _e] = h([]), [ve, ye] = h(""), [be, xe] = h([]), [Se, Ce] = h({}), [we, Te] = h({}), [Ee, De] = h(() => Tr(i).map((e) => e.id)), [G, Oe] = h({}), [ke, Ae] = h({
|
|
4662
4662
|
pageIndex: 0,
|
|
4663
4663
|
pageSize: f
|
|
@@ -4674,9 +4674,9 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4674
4674
|
}));
|
|
4675
4675
|
}, Je = p(() => {
|
|
4676
4676
|
let e = [];
|
|
4677
|
-
return We && e.push("__detail"),
|
|
4677
|
+
return We && e.push("__detail"), ie && e.push("__select"), U && e.push("__actions"), e;
|
|
4678
4678
|
}, [
|
|
4679
|
-
|
|
4679
|
+
ie,
|
|
4680
4680
|
U,
|
|
4681
4681
|
We
|
|
4682
4682
|
]), K = p(() => {
|
|
@@ -4708,10 +4708,10 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4708
4708
|
return e;
|
|
4709
4709
|
}, [i, r]), ct = p(() => wr(i, G), [G, i]), lt = p(() => {
|
|
4710
4710
|
let e = [];
|
|
4711
|
-
return We && e.push("__detail"),
|
|
4711
|
+
return We && e.push("__detail"), ie && e.push("__select"), e.push(...Ee), U && e.push("__actions"), e;
|
|
4712
4712
|
}, [
|
|
4713
4713
|
Ee,
|
|
4714
|
-
|
|
4714
|
+
ie,
|
|
4715
4715
|
U,
|
|
4716
4716
|
We
|
|
4717
4717
|
]), ut = p(() => {
|
|
@@ -4783,13 +4783,13 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4783
4783
|
} : null;
|
|
4784
4784
|
return [
|
|
4785
4785
|
...n ? [n] : [],
|
|
4786
|
-
...
|
|
4786
|
+
...ie ? [e] : [],
|
|
4787
4787
|
...ct,
|
|
4788
4788
|
...t ? [t] : []
|
|
4789
4789
|
];
|
|
4790
4790
|
}, [
|
|
4791
4791
|
ct,
|
|
4792
|
-
|
|
4792
|
+
ie,
|
|
4793
4793
|
U,
|
|
4794
4794
|
Re,
|
|
4795
4795
|
We,
|
|
@@ -4921,7 +4921,7 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4921
4921
|
getSubRows: (e) => e.subRows,
|
|
4922
4922
|
getPaginationRowModel: je ? A() : void 0,
|
|
4923
4923
|
filterFns: { columnFilter: _r },
|
|
4924
|
-
enableRowSelection:
|
|
4924
|
+
enableRowSelection: ie
|
|
4925
4925
|
});
|
|
4926
4926
|
Ze.current = Y;
|
|
4927
4927
|
let pt = je ? Y.getPrePaginationRowModel().rows.length : 0;
|
|
@@ -5234,20 +5234,20 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5234
5234
|
})] }), /* @__PURE__ */ y("div", {
|
|
5235
5235
|
className: "sf-table-toolbar-actions",
|
|
5236
5236
|
children: [
|
|
5237
|
-
(
|
|
5237
|
+
(V || re) && /* @__PURE__ */ y("div", {
|
|
5238
5238
|
className: "flex items-center gap-2",
|
|
5239
|
-
children: [
|
|
5239
|
+
children: [V && /* @__PURE__ */ y("span", {
|
|
5240
5240
|
className: "sf-table-toolbar-status",
|
|
5241
5241
|
children: [/* @__PURE__ */ v("span", {
|
|
5242
5242
|
className: "sf-table-spinner sf-table-spinner--sm",
|
|
5243
5243
|
"aria-hidden": "true"
|
|
5244
5244
|
}), "Actualizando"]
|
|
5245
|
-
}),
|
|
5245
|
+
}), re && /* @__PURE__ */ v("button", {
|
|
5246
5246
|
type: "button",
|
|
5247
5247
|
"aria-label": "Refrescar",
|
|
5248
5248
|
className: "sf-table-toolbar-btn",
|
|
5249
|
-
disabled:
|
|
5250
|
-
onClick:
|
|
5249
|
+
disabled: V,
|
|
5250
|
+
onClick: re,
|
|
5251
5251
|
children: /* @__PURE__ */ v(Kn, {
|
|
5252
5252
|
className: "h-5 w-5",
|
|
5253
5253
|
"aria-hidden": "true"
|
|
@@ -5308,7 +5308,7 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5308
5308
|
children: "Agrupado"
|
|
5309
5309
|
}),
|
|
5310
5310
|
typeof R == "function" ? R(mt, { clearSelection: () => Y.resetRowSelection() }) : R,
|
|
5311
|
-
|
|
5311
|
+
ie && mt.length > 0 && /* @__PURE__ */ y("div", {
|
|
5312
5312
|
className: "flex items-center gap-2",
|
|
5313
5313
|
children: [(() => {
|
|
5314
5314
|
let e = ae?.(mt, { clearSelection: () => Y.resetRowSelection() }) ?? [];
|
|
@@ -5346,12 +5346,12 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5346
5346
|
]
|
|
5347
5347
|
})]
|
|
5348
5348
|
}),
|
|
5349
|
-
|
|
5349
|
+
te != null && /* @__PURE__ */ y("div", {
|
|
5350
5350
|
className: "sf-table-error",
|
|
5351
|
-
children: [/* @__PURE__ */ v("div", { children:
|
|
5351
|
+
children: [/* @__PURE__ */ v("div", { children: te }), ne && /* @__PURE__ */ v("button", {
|
|
5352
5352
|
type: "button",
|
|
5353
5353
|
className: "sf-table-error__retry",
|
|
5354
|
-
onClick:
|
|
5354
|
+
onClick: ne,
|
|
5355
5355
|
children: "Reintentar"
|
|
5356
5356
|
})]
|
|
5357
5357
|
}),
|
|
@@ -5406,9 +5406,9 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5406
5406
|
}) }) : /* @__PURE__ */ v(_, { children: Y.getRowModel().rows.map((e) => {
|
|
5407
5407
|
let t = We && !e.getIsGrouped() && Ge(e.original) && Ke(e.id, e.original);
|
|
5408
5408
|
return /* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v("tr", {
|
|
5409
|
-
className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group",
|
|
5410
|
-
onClick:
|
|
5411
|
-
t.target.closest("button, a, input, select, label, [role=\"button\"]") ||
|
|
5409
|
+
className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group", H && !e.getIsGrouped() && "sf-table-row--clickable", t && "sf-table-row--detail-open"),
|
|
5410
|
+
onClick: H && !e.getIsGrouped() ? (t) => {
|
|
5411
|
+
t.target.closest("button, a, input, select, label, [role=\"button\"]") || H(e.original);
|
|
5412
5412
|
} : void 0,
|
|
5413
5413
|
children: e.getVisibleCells().map((t) => {
|
|
5414
5414
|
let n = t.getIsGrouped(), r = t.getIsAggregated(), i = t.getIsPlaceholder();
|
|
@@ -9579,13 +9579,13 @@ var jr = (e) => {
|
|
|
9579
9579
|
lng: e.lng
|
|
9580
9580
|
}), a(Xo(e.lat), Xo(e.lng));
|
|
9581
9581
|
}
|
|
9582
|
-
}), /* @__PURE__ */ y(
|
|
9582
|
+
}), /* @__PURE__ */ y(V, {
|
|
9583
9583
|
center: o,
|
|
9584
9584
|
zoom: n,
|
|
9585
9585
|
scrollWheelZoom: !r,
|
|
9586
9586
|
className: "sf-map-frame",
|
|
9587
9587
|
children: [
|
|
9588
|
-
/* @__PURE__ */ v(
|
|
9588
|
+
/* @__PURE__ */ v(H, {
|
|
9589
9589
|
attribution: ts,
|
|
9590
9590
|
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
9591
9591
|
}),
|
|
@@ -9598,7 +9598,7 @@ var jr = (e) => {
|
|
|
9598
9598
|
readOnly: r,
|
|
9599
9599
|
onPick: a
|
|
9600
9600
|
}),
|
|
9601
|
-
/* @__PURE__ */ v(
|
|
9601
|
+
/* @__PURE__ */ v(te, {
|
|
9602
9602
|
position: o,
|
|
9603
9603
|
icon: qo,
|
|
9604
9604
|
draggable: !r,
|
|
@@ -11714,14 +11714,14 @@ var jr = (e) => {
|
|
|
11714
11714
|
})
|
|
11715
11715
|
]
|
|
11716
11716
|
});
|
|
11717
|
-
}, Sl = ({ title: e, subtitle: t,
|
|
11718
|
-
let [
|
|
11719
|
-
base:
|
|
11717
|
+
}, Sl = ({ title: e, subtitle: t, mode: n = "range", range: r, onApply: i, fromLabel: a = "Desde", toLabel: o = "Hasta", dayLabel: s = "Día de corte", compareFieldLabel: c = n === "day" ? "Nota" : "Comparar", validate: l, error: u = null, loading: d = !1, updatedAt: f = null, live: p = !1, cutoffLabel: m, onRefresh: g, refreshLabel: b = "Actualizar", compareLabel: x = n === "day" ? "" : "con el período anterior de igual duración", pendingLabel: S = n === "day" ? "Pulsa «Aplicar» para consultar el nuevo día" : "Pulsa «Aplicar» para consultar el nuevo rango", applyLabel: C = "Aplicar", filterAriaLabel: w = "Filtro del tablero", slowAfterSeconds: T = 3, className: E, children: D }) => {
|
|
11718
|
+
let [O, k] = h(null), A = O && O.base.from === r.from && O.base.to === r.to ? O : null, j = A?.draft ?? r, M = A?.error ?? null, N = (e) => k({
|
|
11719
|
+
base: r,
|
|
11720
11720
|
draft: e,
|
|
11721
11721
|
error: null
|
|
11722
|
-
}),
|
|
11722
|
+
}), P = j.from !== r.from || j.to !== r.to;
|
|
11723
11723
|
return /* @__PURE__ */ v("div", {
|
|
11724
|
-
className:
|
|
11724
|
+
className: E,
|
|
11725
11725
|
children: /* @__PURE__ */ y(fl, {
|
|
11726
11726
|
header: /* @__PURE__ */ y("div", {
|
|
11727
11727
|
className: "sf-page-frame__header",
|
|
@@ -11732,64 +11732,70 @@ var jr = (e) => {
|
|
|
11732
11732
|
className: "sf-page-frame__subtitle",
|
|
11733
11733
|
children: t
|
|
11734
11734
|
})] }), /* @__PURE__ */ v(xl, {
|
|
11735
|
-
loading:
|
|
11736
|
-
updatedAt:
|
|
11737
|
-
live:
|
|
11738
|
-
cutoffLabel:
|
|
11739
|
-
onRefresh:
|
|
11740
|
-
refreshLabel:
|
|
11741
|
-
slowAfterSeconds:
|
|
11735
|
+
loading: d,
|
|
11736
|
+
updatedAt: f,
|
|
11737
|
+
live: p,
|
|
11738
|
+
cutoffLabel: m,
|
|
11739
|
+
onRefresh: g,
|
|
11740
|
+
refreshLabel: b,
|
|
11741
|
+
slowAfterSeconds: T
|
|
11742
11742
|
})]
|
|
11743
11743
|
}),
|
|
11744
11744
|
children: [
|
|
11745
11745
|
/* @__PURE__ */ y(Aa, {
|
|
11746
|
-
ariaLabel:
|
|
11746
|
+
ariaLabel: w,
|
|
11747
11747
|
onApply: () => {
|
|
11748
|
-
let e =
|
|
11749
|
-
|
|
11750
|
-
base:
|
|
11751
|
-
draft:
|
|
11748
|
+
let e = l ? l(j) : null;
|
|
11749
|
+
k({
|
|
11750
|
+
base: r,
|
|
11751
|
+
draft: j,
|
|
11752
11752
|
error: e
|
|
11753
|
-
}), e ||
|
|
11753
|
+
}), e || i(j);
|
|
11754
11754
|
},
|
|
11755
|
-
applyLabel:
|
|
11756
|
-
applyLoading:
|
|
11757
|
-
children: [
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
|
|
11765
|
-
})
|
|
11755
|
+
applyLabel: C,
|
|
11756
|
+
applyLoading: d && !P,
|
|
11757
|
+
children: [n === "day" ? /* @__PURE__ */ v(ja, {
|
|
11758
|
+
label: s,
|
|
11759
|
+
className: "sf-page-frame__day",
|
|
11760
|
+
children: /* @__PURE__ */ v(Ma, {
|
|
11761
|
+
value: j.to,
|
|
11762
|
+
onChange: (e) => N({
|
|
11763
|
+
...j,
|
|
11764
|
+
to: e
|
|
11766
11765
|
})
|
|
11767
|
-
})
|
|
11768
|
-
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
})
|
|
11766
|
+
})
|
|
11767
|
+
}) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(ja, {
|
|
11768
|
+
label: a,
|
|
11769
|
+
children: /* @__PURE__ */ v(Ma, {
|
|
11770
|
+
value: j.from,
|
|
11771
|
+
onChange: (e) => N({
|
|
11772
|
+
...j,
|
|
11773
|
+
from: e
|
|
11776
11774
|
})
|
|
11777
|
-
})
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11775
|
+
})
|
|
11776
|
+
}), /* @__PURE__ */ v(ja, {
|
|
11777
|
+
label: o,
|
|
11778
|
+
children: /* @__PURE__ */ v(Ma, {
|
|
11779
|
+
value: j.to,
|
|
11780
|
+
onChange: (e) => N({
|
|
11781
|
+
...j,
|
|
11782
|
+
to: e
|
|
11783
11783
|
})
|
|
11784
11784
|
})
|
|
11785
|
-
]
|
|
11785
|
+
})] }), (P ? S : x) && /* @__PURE__ */ v(ja, {
|
|
11786
|
+
label: c,
|
|
11787
|
+
children: /* @__PURE__ */ v("span", {
|
|
11788
|
+
className: "sf-page-frame__compare",
|
|
11789
|
+
children: P ? S : x
|
|
11790
|
+
})
|
|
11791
|
+
})]
|
|
11786
11792
|
}),
|
|
11787
|
-
(
|
|
11793
|
+
(M || u) && /* @__PURE__ */ v(ni, {
|
|
11788
11794
|
variant: "warning",
|
|
11789
11795
|
title: "Rango no válido",
|
|
11790
|
-
message:
|
|
11796
|
+
message: M ?? u
|
|
11791
11797
|
}),
|
|
11792
|
-
|
|
11798
|
+
u ? null : D
|
|
11793
11799
|
]
|
|
11794
11800
|
})
|
|
11795
11801
|
});
|
|
@@ -13516,7 +13522,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13516
13522
|
return C ? /* @__PURE__ */ v("div", {
|
|
13517
13523
|
className: d,
|
|
13518
13524
|
style: T,
|
|
13519
|
-
children: /* @__PURE__ */ y(
|
|
13525
|
+
children: /* @__PURE__ */ y(V, {
|
|
13520
13526
|
center: w,
|
|
13521
13527
|
zoom: s?.zoom ?? t,
|
|
13522
13528
|
scrollWheelZoom: !f,
|
|
@@ -13524,7 +13530,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13524
13530
|
zoomControl: l,
|
|
13525
13531
|
className: "sf-map-frame",
|
|
13526
13532
|
children: [
|
|
13527
|
-
/* @__PURE__ */ v(
|
|
13533
|
+
/* @__PURE__ */ v(H, {
|
|
13528
13534
|
attribution: E ? Eu : h,
|
|
13529
13535
|
url: E ? Tu : m
|
|
13530
13536
|
}, E ? "satellite" : "roadmap"),
|
|
@@ -13535,7 +13541,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13535
13541
|
}),
|
|
13536
13542
|
/* @__PURE__ */ v(nd, { view: s }),
|
|
13537
13543
|
/* @__PURE__ */ v(rd, {}),
|
|
13538
|
-
i.map((e) => /* @__PURE__ */ v(
|
|
13544
|
+
i.map((e) => /* @__PURE__ */ v(ne, {
|
|
13539
13545
|
positions: e.points.map(Ju),
|
|
13540
13546
|
pathOptions: {
|
|
13541
13547
|
color: e.color ?? Mu("var(--sf-map-area-stroke)"),
|
|
@@ -13556,20 +13562,20 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13556
13562
|
dashArray: e.dashed ? "6 6" : void 0
|
|
13557
13563
|
}
|
|
13558
13564
|
}, e.id)),
|
|
13559
|
-
a.filter((e) => e.label).map((e) => /* @__PURE__ */ v(
|
|
13565
|
+
a.filter((e) => e.label).map((e) => /* @__PURE__ */ v(te, {
|
|
13560
13566
|
position: Ju(Fu(e)),
|
|
13561
13567
|
icon: $u(e.label ?? ""),
|
|
13562
13568
|
interactive: !1,
|
|
13563
13569
|
keyboard: !1
|
|
13564
13570
|
}, `${e.id}-label`)),
|
|
13565
|
-
r.map((e) => /* @__PURE__ */ v(
|
|
13571
|
+
r.map((e) => /* @__PURE__ */ v(re, {
|
|
13566
13572
|
positions: e.points.map(Ju),
|
|
13567
13573
|
pathOptions: {
|
|
13568
13574
|
color: e.color ?? Mu("var(--sf-map-route-stroke)"),
|
|
13569
13575
|
weight: 3.5
|
|
13570
13576
|
}
|
|
13571
13577
|
}, e.id)),
|
|
13572
|
-
n.map((e) => /* @__PURE__ */ v(
|
|
13578
|
+
n.map((e) => /* @__PURE__ */ v(te, {
|
|
13573
13579
|
position: Ju(e.position),
|
|
13574
13580
|
icon: Qu(e),
|
|
13575
13581
|
title: e.title ?? e.label,
|
|
@@ -13599,7 +13605,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13599
13605
|
});
|
|
13600
13606
|
}
|
|
13601
13607
|
},
|
|
13602
|
-
children: e.options?.showLabel && e.label && /* @__PURE__ */ v(
|
|
13608
|
+
children: e.options?.showLabel && e.label && /* @__PURE__ */ v(ie, {
|
|
13603
13609
|
permanent: !0,
|
|
13604
13610
|
direction: "top",
|
|
13605
13611
|
className: "sf-map-marker-label",
|
|
@@ -15586,20 +15592,20 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15586
15592
|
role: "region",
|
|
15587
15593
|
"aria-label": f,
|
|
15588
15594
|
children: [
|
|
15589
|
-
g ? /* @__PURE__ */ y(
|
|
15595
|
+
g ? /* @__PURE__ */ y(V, {
|
|
15590
15596
|
center: n,
|
|
15591
15597
|
zoom: r,
|
|
15592
15598
|
scrollWheelZoom: !0,
|
|
15593
15599
|
className: "h-full w-full",
|
|
15594
15600
|
children: [
|
|
15595
|
-
/* @__PURE__ */ v(
|
|
15601
|
+
/* @__PURE__ */ v(H, {
|
|
15596
15602
|
attribution: S.attribution,
|
|
15597
15603
|
url: S.url
|
|
15598
15604
|
}),
|
|
15599
15605
|
c && e.length > 0 && /* @__PURE__ */ v(gp, { nodes: e }),
|
|
15600
15606
|
w.map(({ edge: e, line: t }) => {
|
|
15601
15607
|
let n = ip[e.type ?? "backbone"];
|
|
15602
|
-
return /* @__PURE__ */ v(
|
|
15608
|
+
return /* @__PURE__ */ v(re, {
|
|
15603
15609
|
positions: t,
|
|
15604
15610
|
pathOptions: {
|
|
15605
15611
|
color: ap(n.color),
|
|
@@ -15608,7 +15614,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15608
15614
|
}
|
|
15609
15615
|
}, `${e.from}-${e.to}-${e.type ?? "backbone"}`);
|
|
15610
15616
|
}),
|
|
15611
|
-
e.map((e) => /* @__PURE__ */ v(
|
|
15617
|
+
e.map((e) => /* @__PURE__ */ v(te, {
|
|
15612
15618
|
position: C[e.id],
|
|
15613
15619
|
icon: hp(e, e.id === a),
|
|
15614
15620
|
title: e.label,
|