@sfperusacdev/sf-ui 0.1.36 → 0.1.37
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 +286 -281
- package/dist/sf-ui.js.map +1 -1
- package/dist/sf-ui.umd.cjs +3 -3
- package/dist/sf-ui.umd.cjs.map +1 -1
- package/dist/types/src/components/cards/KPICard.d.ts +9 -1
- package/dist/types/src/components/table/CustomTable.d.ts +3 -1
- package/dist/types/src/components/table/CustomTable.search.test.d.ts +1 -0
- package/package.json +1 -1
package/dist/sf-ui.js
CHANGED
|
@@ -13,7 +13,7 @@ import { json as R } from "@codemirror/lang-json";
|
|
|
13
13
|
import { sql as z } from "@codemirror/lang-sql";
|
|
14
14
|
import { MapContainer as B, Marker as te, Polygon as ne, Polyline as V, TileLayer as H, useMap as U, useMapEvents as re } from "react-leaflet";
|
|
15
15
|
import ie from "leaflet";
|
|
16
|
-
import { Area as ae, AreaChart as oe, Bar as
|
|
16
|
+
import { Area as ae, AreaChart as oe, Bar as se, BarChart as W, CartesianGrid as ce, Label as le, LabelList as ue, Legend as de, Line as fe, LineChart as pe, PolarAngleAxis as me, PolarGrid as he, PolarRadiusAxis as ge, Radar as _e, RadarChart as ve, ReferenceLine as ye, ResponsiveContainer as be, Tooltip as xe, XAxis as Se, YAxis as Ce } from "recharts";
|
|
17
17
|
import we from "react-easy-crop";
|
|
18
18
|
import { yupResolver as Te } from "@hookform/resolvers/yup";
|
|
19
19
|
import * as G from "yup";
|
|
@@ -108,13 +108,13 @@ function Ge(e, t) {
|
|
|
108
108
|
}
|
|
109
109
|
return (t === "string" ? String : Number)(e);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
return t && t.map((t, n) => /*#__PURE__*/ e.createElement(t.tag, He({ key: n }, t.attr),
|
|
111
|
+
function Ke(t) {
|
|
112
|
+
return t && t.map((t, n) => /*#__PURE__*/ e.createElement(t.tag, He({ key: n }, t.attr), Ke(t.child)));
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
return (n) => /*#__PURE__*/ e.createElement(
|
|
114
|
+
function K(t) {
|
|
115
|
+
return (n) => /*#__PURE__*/ e.createElement(qe, Be({ attr: He({}, t.attr) }, n), Ke(t.child));
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function qe(t) {
|
|
118
118
|
var n = (n) => {
|
|
119
119
|
var r = t.attr, i = t.size, a = t.title, o = Re(t, Le), 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", Be({
|
|
@@ -133,8 +133,8 @@ function Ke(t) {
|
|
|
133
133
|
}
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region node_modules/react-icons/fi/index.mjs
|
|
136
|
-
function
|
|
137
|
-
return
|
|
136
|
+
function Je(e) {
|
|
137
|
+
return K({
|
|
138
138
|
tag: "svg",
|
|
139
139
|
attr: {
|
|
140
140
|
viewBox: "0 0 24 24",
|
|
@@ -165,8 +165,8 @@ function qe(e) {
|
|
|
165
165
|
}]
|
|
166
166
|
})(e);
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
return
|
|
168
|
+
function Ye(e) {
|
|
169
|
+
return K({
|
|
170
170
|
tag: "svg",
|
|
171
171
|
attr: {
|
|
172
172
|
viewBox: "0 0 24 24",
|
|
@@ -204,8 +204,8 @@ function J(e) {
|
|
|
204
204
|
]
|
|
205
205
|
})(e);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
return
|
|
207
|
+
function q(e) {
|
|
208
|
+
return K({
|
|
209
209
|
tag: "svg",
|
|
210
210
|
attr: {
|
|
211
211
|
viewBox: "0 0 24 24",
|
|
@@ -230,8 +230,8 @@ function Je(e) {
|
|
|
230
230
|
}]
|
|
231
231
|
})(e);
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
return
|
|
233
|
+
function Xe(e) {
|
|
234
|
+
return K({
|
|
235
235
|
tag: "svg",
|
|
236
236
|
attr: {
|
|
237
237
|
viewBox: "0 0 24 24",
|
|
@@ -275,8 +275,8 @@ function Ye(e) {
|
|
|
275
275
|
]
|
|
276
276
|
})(e);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
return
|
|
278
|
+
function Ze(e) {
|
|
279
|
+
return K({
|
|
280
280
|
tag: "svg",
|
|
281
281
|
attr: {
|
|
282
282
|
viewBox: "0 0 24 24",
|
|
@@ -379,8 +379,8 @@ function Xe(e) {
|
|
|
379
379
|
]
|
|
380
380
|
})(e);
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
return
|
|
382
|
+
function Qe(e) {
|
|
383
|
+
return K({
|
|
384
384
|
tag: "svg",
|
|
385
385
|
attr: {
|
|
386
386
|
viewBox: "0 0 24 24",
|
|
@@ -397,8 +397,8 @@ function Ze(e) {
|
|
|
397
397
|
}]
|
|
398
398
|
})(e);
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
return
|
|
400
|
+
function J(e) {
|
|
401
|
+
return K({
|
|
402
402
|
tag: "svg",
|
|
403
403
|
attr: {
|
|
404
404
|
viewBox: "0 0 24 24",
|
|
@@ -429,7 +429,7 @@ function Qe(e) {
|
|
|
429
429
|
})(e);
|
|
430
430
|
}
|
|
431
431
|
function $e(e) {
|
|
432
|
-
return
|
|
432
|
+
return K({
|
|
433
433
|
tag: "svg",
|
|
434
434
|
attr: {
|
|
435
435
|
viewBox: "0 0 24 24",
|
|
@@ -459,7 +459,7 @@ function $e(e) {
|
|
|
459
459
|
})(e);
|
|
460
460
|
}
|
|
461
461
|
function et(e) {
|
|
462
|
-
return
|
|
462
|
+
return K({
|
|
463
463
|
tag: "svg",
|
|
464
464
|
attr: {
|
|
465
465
|
viewBox: "0 0 24 24",
|
|
@@ -489,7 +489,7 @@ function et(e) {
|
|
|
489
489
|
})(e);
|
|
490
490
|
}
|
|
491
491
|
function tt(e) {
|
|
492
|
-
return
|
|
492
|
+
return K({
|
|
493
493
|
tag: "svg",
|
|
494
494
|
attr: {
|
|
495
495
|
viewBox: "0 0 24 24",
|
|
@@ -521,7 +521,7 @@ function tt(e) {
|
|
|
521
521
|
})(e);
|
|
522
522
|
}
|
|
523
523
|
function nt(e) {
|
|
524
|
-
return
|
|
524
|
+
return K({
|
|
525
525
|
tag: "svg",
|
|
526
526
|
attr: {
|
|
527
527
|
viewBox: "0 0 24 24",
|
|
@@ -539,7 +539,7 @@ function nt(e) {
|
|
|
539
539
|
})(e);
|
|
540
540
|
}
|
|
541
541
|
function rt(e) {
|
|
542
|
-
return
|
|
542
|
+
return K({
|
|
543
543
|
tag: "svg",
|
|
544
544
|
attr: {
|
|
545
545
|
viewBox: "0 0 24 24",
|
|
@@ -561,8 +561,8 @@ function rt(e) {
|
|
|
561
561
|
}]
|
|
562
562
|
})(e);
|
|
563
563
|
}
|
|
564
|
-
function
|
|
565
|
-
return
|
|
564
|
+
function it(e) {
|
|
565
|
+
return K({
|
|
566
566
|
tag: "svg",
|
|
567
567
|
attr: {
|
|
568
568
|
viewBox: "0 0 24 24",
|
|
@@ -579,8 +579,8 @@ function Y(e) {
|
|
|
579
579
|
}]
|
|
580
580
|
})(e);
|
|
581
581
|
}
|
|
582
|
-
function
|
|
583
|
-
return
|
|
582
|
+
function Y(e) {
|
|
583
|
+
return K({
|
|
584
584
|
tag: "svg",
|
|
585
585
|
attr: {
|
|
586
586
|
viewBox: "0 0 24 24",
|
|
@@ -606,7 +606,7 @@ function it(e) {
|
|
|
606
606
|
})(e);
|
|
607
607
|
}
|
|
608
608
|
function at(e) {
|
|
609
|
-
return
|
|
609
|
+
return K({
|
|
610
610
|
tag: "svg",
|
|
611
611
|
attr: {
|
|
612
612
|
viewBox: "0 0 24 24",
|
|
@@ -701,7 +701,7 @@ function at(e) {
|
|
|
701
701
|
})(e);
|
|
702
702
|
}
|
|
703
703
|
function ot(e) {
|
|
704
|
-
return
|
|
704
|
+
return K({
|
|
705
705
|
tag: "svg",
|
|
706
706
|
attr: {
|
|
707
707
|
viewBox: "0 0 24 24",
|
|
@@ -731,7 +731,7 @@ function ot(e) {
|
|
|
731
731
|
})(e);
|
|
732
732
|
}
|
|
733
733
|
function st(e) {
|
|
734
|
-
return
|
|
734
|
+
return K({
|
|
735
735
|
tag: "svg",
|
|
736
736
|
attr: {
|
|
737
737
|
viewBox: "0 0 24 24",
|
|
@@ -775,7 +775,7 @@ function st(e) {
|
|
|
775
775
|
})(e);
|
|
776
776
|
}
|
|
777
777
|
function ct(e) {
|
|
778
|
-
return
|
|
778
|
+
return K({
|
|
779
779
|
tag: "svg",
|
|
780
780
|
attr: {
|
|
781
781
|
viewBox: "0 0 24 24",
|
|
@@ -830,7 +830,7 @@ function ct(e) {
|
|
|
830
830
|
})(e);
|
|
831
831
|
}
|
|
832
832
|
function lt(e) {
|
|
833
|
-
return
|
|
833
|
+
return K({
|
|
834
834
|
tag: "svg",
|
|
835
835
|
attr: {
|
|
836
836
|
viewBox: "0 0 24 24",
|
|
@@ -856,7 +856,7 @@ function lt(e) {
|
|
|
856
856
|
})(e);
|
|
857
857
|
}
|
|
858
858
|
function ut(e) {
|
|
859
|
-
return
|
|
859
|
+
return K({
|
|
860
860
|
tag: "svg",
|
|
861
861
|
attr: {
|
|
862
862
|
viewBox: "0 0 24 24",
|
|
@@ -883,7 +883,7 @@ function ut(e) {
|
|
|
883
883
|
})(e);
|
|
884
884
|
}
|
|
885
885
|
function dt(e) {
|
|
886
|
-
return
|
|
886
|
+
return K({
|
|
887
887
|
tag: "svg",
|
|
888
888
|
attr: {
|
|
889
889
|
viewBox: "0 0 24 24",
|
|
@@ -901,7 +901,7 @@ function dt(e) {
|
|
|
901
901
|
})(e);
|
|
902
902
|
}
|
|
903
903
|
function ft(e) {
|
|
904
|
-
return
|
|
904
|
+
return K({
|
|
905
905
|
tag: "svg",
|
|
906
906
|
attr: {
|
|
907
907
|
viewBox: "0 0 24 24",
|
|
@@ -923,7 +923,7 @@ function ft(e) {
|
|
|
923
923
|
})(e);
|
|
924
924
|
}
|
|
925
925
|
function pt(e) {
|
|
926
|
-
return
|
|
926
|
+
return K({
|
|
927
927
|
tag: "svg",
|
|
928
928
|
attr: {
|
|
929
929
|
viewBox: "0 0 24 24",
|
|
@@ -945,7 +945,7 @@ function pt(e) {
|
|
|
945
945
|
})(e);
|
|
946
946
|
}
|
|
947
947
|
function mt(e) {
|
|
948
|
-
return
|
|
948
|
+
return K({
|
|
949
949
|
tag: "svg",
|
|
950
950
|
attr: {
|
|
951
951
|
viewBox: "0 0 24 24",
|
|
@@ -963,7 +963,7 @@ function mt(e) {
|
|
|
963
963
|
})(e);
|
|
964
964
|
}
|
|
965
965
|
function ht(e) {
|
|
966
|
-
return
|
|
966
|
+
return K({
|
|
967
967
|
tag: "svg",
|
|
968
968
|
attr: {
|
|
969
969
|
viewBox: "0 0 24 24",
|
|
@@ -981,7 +981,7 @@ function ht(e) {
|
|
|
981
981
|
})(e);
|
|
982
982
|
}
|
|
983
983
|
function gt(e) {
|
|
984
|
-
return
|
|
984
|
+
return K({
|
|
985
985
|
tag: "svg",
|
|
986
986
|
attr: {
|
|
987
987
|
viewBox: "0 0 24 24",
|
|
@@ -999,7 +999,7 @@ function gt(e) {
|
|
|
999
999
|
})(e);
|
|
1000
1000
|
}
|
|
1001
1001
|
function _t(e) {
|
|
1002
|
-
return
|
|
1002
|
+
return K({
|
|
1003
1003
|
tag: "svg",
|
|
1004
1004
|
attr: {
|
|
1005
1005
|
viewBox: "0 0 24 24",
|
|
@@ -1017,7 +1017,7 @@ function _t(e) {
|
|
|
1017
1017
|
})(e);
|
|
1018
1018
|
}
|
|
1019
1019
|
function vt(e) {
|
|
1020
|
-
return
|
|
1020
|
+
return K({
|
|
1021
1021
|
tag: "svg",
|
|
1022
1022
|
attr: {
|
|
1023
1023
|
viewBox: "0 0 24 24",
|
|
@@ -1039,7 +1039,7 @@ function vt(e) {
|
|
|
1039
1039
|
})(e);
|
|
1040
1040
|
}
|
|
1041
1041
|
function yt(e) {
|
|
1042
|
-
return
|
|
1042
|
+
return K({
|
|
1043
1043
|
tag: "svg",
|
|
1044
1044
|
attr: {
|
|
1045
1045
|
viewBox: "0 0 24 24",
|
|
@@ -1096,7 +1096,7 @@ function yt(e) {
|
|
|
1096
1096
|
})(e);
|
|
1097
1097
|
}
|
|
1098
1098
|
function bt(e) {
|
|
1099
|
-
return
|
|
1099
|
+
return K({
|
|
1100
1100
|
tag: "svg",
|
|
1101
1101
|
attr: {
|
|
1102
1102
|
viewBox: "0 0 24 24",
|
|
@@ -1125,7 +1125,7 @@ function bt(e) {
|
|
|
1125
1125
|
})(e);
|
|
1126
1126
|
}
|
|
1127
1127
|
function xt(e) {
|
|
1128
|
-
return
|
|
1128
|
+
return K({
|
|
1129
1129
|
tag: "svg",
|
|
1130
1130
|
attr: {
|
|
1131
1131
|
viewBox: "0 0 24 24",
|
|
@@ -1147,7 +1147,7 @@ function xt(e) {
|
|
|
1147
1147
|
})(e);
|
|
1148
1148
|
}
|
|
1149
1149
|
function St(e) {
|
|
1150
|
-
return
|
|
1150
|
+
return K({
|
|
1151
1151
|
tag: "svg",
|
|
1152
1152
|
attr: {
|
|
1153
1153
|
viewBox: "0 0 24 24",
|
|
@@ -1174,7 +1174,7 @@ function St(e) {
|
|
|
1174
1174
|
})(e);
|
|
1175
1175
|
}
|
|
1176
1176
|
function Ct(e) {
|
|
1177
|
-
return
|
|
1177
|
+
return K({
|
|
1178
1178
|
tag: "svg",
|
|
1179
1179
|
attr: {
|
|
1180
1180
|
viewBox: "0 0 24 24",
|
|
@@ -1201,7 +1201,7 @@ function Ct(e) {
|
|
|
1201
1201
|
})(e);
|
|
1202
1202
|
}
|
|
1203
1203
|
function wt(e) {
|
|
1204
|
-
return
|
|
1204
|
+
return K({
|
|
1205
1205
|
tag: "svg",
|
|
1206
1206
|
attr: {
|
|
1207
1207
|
viewBox: "0 0 24 24",
|
|
@@ -1241,7 +1241,7 @@ function wt(e) {
|
|
|
1241
1241
|
})(e);
|
|
1242
1242
|
}
|
|
1243
1243
|
function Tt(e) {
|
|
1244
|
-
return
|
|
1244
|
+
return K({
|
|
1245
1245
|
tag: "svg",
|
|
1246
1246
|
attr: {
|
|
1247
1247
|
viewBox: "0 0 24 24",
|
|
@@ -1360,7 +1360,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
1360
1360
|
let x = b({
|
|
1361
1361
|
name: t,
|
|
1362
1362
|
control: e.control
|
|
1363
|
-
}), S = String(t), C = x.fieldState.error, w = p ?? (h ?
|
|
1363
|
+
}), S = String(t), C = x.fieldState.error, w = p ?? (h ? J : void 0);
|
|
1364
1364
|
return /* @__PURE__ */ v(Z, {
|
|
1365
1365
|
id: S,
|
|
1366
1366
|
label: n,
|
|
@@ -1826,7 +1826,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
1826
1826
|
className: "sf-tree-select__search",
|
|
1827
1827
|
children: /* @__PURE__ */ y("div", {
|
|
1828
1828
|
className: "relative",
|
|
1829
|
-
children: [/* @__PURE__ */ v(
|
|
1829
|
+
children: [/* @__PURE__ */ v(J, {
|
|
1830
1830
|
className: "pointer-events-none absolute left-2 top-1/2 -translate-y-1/2",
|
|
1831
1831
|
size: 14,
|
|
1832
1832
|
"aria-hidden": "true"
|
|
@@ -2675,9 +2675,9 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
2675
2675
|
document.removeEventListener("pointerdown", e);
|
|
2676
2676
|
};
|
|
2677
2677
|
}, []);
|
|
2678
|
-
let
|
|
2678
|
+
let se = /* @__PURE__ */ y("div", {
|
|
2679
2679
|
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"),
|
|
2680
|
-
children: [/* @__PURE__ */ v(
|
|
2680
|
+
children: [/* @__PURE__ */ v(J, {
|
|
2681
2681
|
size: 16,
|
|
2682
2682
|
className: "text-slate-400"
|
|
2683
2683
|
}), /* @__PURE__ */ v("input", {
|
|
@@ -2686,7 +2686,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
2686
2686
|
onChange: (e) => F(e.target.value),
|
|
2687
2687
|
className: "h-8 w-full bg-transparent text-sm text-slate-900 outline-none placeholder:text-slate-400"
|
|
2688
2688
|
})]
|
|
2689
|
-
}),
|
|
2689
|
+
}), W = /* @__PURE__ */ v("div", {
|
|
2690
2690
|
ref: z,
|
|
2691
2691
|
className: "overflow-auto py-1",
|
|
2692
2692
|
style: { maxHeight: Math.max(72, (I?.maxHeight ?? 288) - mn) },
|
|
@@ -2762,7 +2762,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
2762
2762
|
t.stopPropagation(), ie(e.value);
|
|
2763
2763
|
},
|
|
2764
2764
|
className: "rounded text-slate-400 hover:text-slate-700",
|
|
2765
|
-
children: /* @__PURE__ */ v(
|
|
2765
|
+
children: /* @__PURE__ */ v(Je, { size: 12 })
|
|
2766
2766
|
})]
|
|
2767
2767
|
}, e.value)), ne.length > S && /* @__PURE__ */ y("span", {
|
|
2768
2768
|
className: "inline-flex items-center rounded bg-slate-100 px-1.5 py-0.5 text-xs text-slate-500",
|
|
@@ -2782,7 +2782,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
2782
2782
|
e.stopPropagation(), ae();
|
|
2783
2783
|
},
|
|
2784
2784
|
className: "rounded p-0.5 text-slate-400 hover:text-slate-700",
|
|
2785
|
-
children: /* @__PURE__ */ v(
|
|
2785
|
+
children: /* @__PURE__ */ v(Je, { size: 14 })
|
|
2786
2786
|
}), /* @__PURE__ */ v(gt, {
|
|
2787
2787
|
size: x ? 16 : 18,
|
|
2788
2788
|
className: (0, X.default)("text-slate-500 transition-transform", M && "rotate-180")
|
|
@@ -2798,7 +2798,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
2798
2798
|
maxHeight: I?.maxHeight ?? 0,
|
|
2799
2799
|
visibility: I ? "visible" : "hidden"
|
|
2800
2800
|
},
|
|
2801
|
-
children: I?.direction === "top" ? /* @__PURE__ */ y(_, { children: [
|
|
2801
|
+
children: I?.direction === "top" ? /* @__PURE__ */ y(_, { children: [W, se] }) : /* @__PURE__ */ y(_, { children: [se, W] })
|
|
2802
2802
|
})]
|
|
2803
2803
|
})
|
|
2804
2804
|
});
|
|
@@ -3021,7 +3021,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
3021
3021
|
return n != null && String(n).toLowerCase().includes(r);
|
|
3022
3022
|
});
|
|
3023
3023
|
}
|
|
3024
|
-
}), re = U.getRowModel().rows, ie = U.getFilteredRowModel().rows.length, ae = Math.max(0, f - re.length), oe = U.getState().pagination.pageIndex + 1,
|
|
3024
|
+
}), re = U.getRowModel().rows, ie = U.getFilteredRowModel().rows.length, ae = Math.max(0, f - re.length), oe = U.getState().pagination.pageIndex + 1, se = Math.max(1, U.getPageCount()), W = U.getAllLeafColumns().length, ce = C > 0 && F.trim().length < C;
|
|
3025
3025
|
return /* @__PURE__ */ v(Z, {
|
|
3026
3026
|
id: N,
|
|
3027
3027
|
label: a,
|
|
@@ -3035,7 +3035,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
3035
3035
|
children: [
|
|
3036
3036
|
/* @__PURE__ */ y("div", {
|
|
3037
3037
|
className: "flex items-center gap-2 border-b border-slate-200 px-3 py-2",
|
|
3038
|
-
children: [/* @__PURE__ */ v(
|
|
3038
|
+
children: [/* @__PURE__ */ v(J, {
|
|
3039
3039
|
size: 16,
|
|
3040
3040
|
className: "shrink-0 text-slate-400"
|
|
3041
3041
|
}), /* @__PURE__ */ v("input", {
|
|
@@ -3071,7 +3071,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
3071
3071
|
type: "button",
|
|
3072
3072
|
onClick: () => ne(e.value),
|
|
3073
3073
|
className: "shrink-0 rounded text-slate-400 hover:text-slate-700",
|
|
3074
|
-
children: /* @__PURE__ */ v(
|
|
3074
|
+
children: /* @__PURE__ */ v(Je, { size: 12 })
|
|
3075
3075
|
})]
|
|
3076
3076
|
}, e.value)), z.length > 3 && /* @__PURE__ */ y("span", {
|
|
3077
3077
|
className: "shrink-0 rounded-full border border-slate-200 bg-white px-2 py-0.5 text-xs text-slate-500",
|
|
@@ -3092,7 +3092,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
3092
3092
|
/* @__PURE__ */ v("span", {
|
|
3093
3093
|
className: "sf-search-table-select__prompt-icon",
|
|
3094
3094
|
"aria-hidden": "true",
|
|
3095
|
-
children: w ?? /* @__PURE__ */ v(
|
|
3095
|
+
children: w ?? /* @__PURE__ */ v(J, { size: 28 })
|
|
3096
3096
|
}),
|
|
3097
3097
|
/* @__PURE__ */ v("p", {
|
|
3098
3098
|
className: "sf-search-table-select__prompt-title",
|
|
@@ -3117,20 +3117,20 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
3117
3117
|
}, e.id);
|
|
3118
3118
|
}), Array.from({ length: ae }).map((e, t) => /* @__PURE__ */ v("tr", {
|
|
3119
3119
|
className: "h-10 border-b border-slate-100 last:border-b-0",
|
|
3120
|
-
children: Array.from({ length:
|
|
3120
|
+
children: Array.from({ length: W }).map((e, t) => /* @__PURE__ */ v("td", {
|
|
3121
3121
|
className: (0, X.default)("px-3 py-2 align-middle", t === 0 && "w-10"),
|
|
3122
3122
|
children: "\xA0"
|
|
3123
3123
|
}, t))
|
|
3124
3124
|
}, `empty-${t}`))] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("tr", {
|
|
3125
3125
|
className: "h-10 border-b border-slate-100",
|
|
3126
3126
|
children: /* @__PURE__ */ v("td", {
|
|
3127
|
-
colSpan:
|
|
3127
|
+
colSpan: W,
|
|
3128
3128
|
className: "px-3 py-3 text-sm text-slate-500",
|
|
3129
3129
|
children: d ? "Cargando..." : l
|
|
3130
3130
|
})
|
|
3131
3131
|
}), Array.from({ length: Math.max(0, f - 1) }).map((e, t) => /* @__PURE__ */ v("tr", {
|
|
3132
3132
|
className: "h-10 border-b border-slate-100 last:border-b-0",
|
|
3133
|
-
children: Array.from({ length:
|
|
3133
|
+
children: Array.from({ length: W }).map((e, t) => /* @__PURE__ */ v("td", {
|
|
3134
3134
|
className: (0, X.default)("px-3 py-2 align-middle", t === 0 && "w-10"),
|
|
3135
3135
|
children: "\xA0"
|
|
3136
3136
|
}, t))
|
|
@@ -3160,7 +3160,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
3160
3160
|
children: [
|
|
3161
3161
|
oe,
|
|
3162
3162
|
" / ",
|
|
3163
|
-
|
|
3163
|
+
se
|
|
3164
3164
|
]
|
|
3165
3165
|
}),
|
|
3166
3166
|
/* @__PURE__ */ v("button", {
|
|
@@ -3558,7 +3558,7 @@ var X = /* @__PURE__ */ Pe((/* @__PURE__ */ Me(((e, t) => {
|
|
|
3558
3558
|
//#endregion
|
|
3559
3559
|
//#region node_modules/react-icons/md/index.mjs
|
|
3560
3560
|
function Vn(e) {
|
|
3561
|
-
return
|
|
3561
|
+
return K({
|
|
3562
3562
|
tag: "svg",
|
|
3563
3563
|
attr: { viewBox: "0 0 24 24" },
|
|
3564
3564
|
child: [{
|
|
@@ -3576,7 +3576,7 @@ function Vn(e) {
|
|
|
3576
3576
|
})(e);
|
|
3577
3577
|
}
|
|
3578
3578
|
function Hn(e) {
|
|
3579
|
-
return
|
|
3579
|
+
return K({
|
|
3580
3580
|
tag: "svg",
|
|
3581
3581
|
attr: { viewBox: "0 0 24 24" },
|
|
3582
3582
|
child: [{
|
|
@@ -3594,7 +3594,7 @@ function Hn(e) {
|
|
|
3594
3594
|
})(e);
|
|
3595
3595
|
}
|
|
3596
3596
|
function Un(e) {
|
|
3597
|
-
return
|
|
3597
|
+
return K({
|
|
3598
3598
|
tag: "svg",
|
|
3599
3599
|
attr: { viewBox: "0 0 24 24" },
|
|
3600
3600
|
child: [{
|
|
@@ -3612,7 +3612,7 @@ function Un(e) {
|
|
|
3612
3612
|
})(e);
|
|
3613
3613
|
}
|
|
3614
3614
|
function Wn(e) {
|
|
3615
|
-
return
|
|
3615
|
+
return K({
|
|
3616
3616
|
tag: "svg",
|
|
3617
3617
|
attr: { viewBox: "0 0 24 24" },
|
|
3618
3618
|
child: [{
|
|
@@ -3630,7 +3630,7 @@ function Wn(e) {
|
|
|
3630
3630
|
})(e);
|
|
3631
3631
|
}
|
|
3632
3632
|
function Gn(e) {
|
|
3633
|
-
return
|
|
3633
|
+
return K({
|
|
3634
3634
|
tag: "svg",
|
|
3635
3635
|
attr: { viewBox: "0 0 24 24" },
|
|
3636
3636
|
child: [{
|
|
@@ -3648,7 +3648,7 @@ function Gn(e) {
|
|
|
3648
3648
|
})(e);
|
|
3649
3649
|
}
|
|
3650
3650
|
function Kn(e) {
|
|
3651
|
-
return
|
|
3651
|
+
return K({
|
|
3652
3652
|
tag: "svg",
|
|
3653
3653
|
attr: { viewBox: "0 0 24 24" },
|
|
3654
3654
|
child: [{
|
|
@@ -3666,7 +3666,7 @@ function Kn(e) {
|
|
|
3666
3666
|
})(e);
|
|
3667
3667
|
}
|
|
3668
3668
|
function qn(e) {
|
|
3669
|
-
return
|
|
3669
|
+
return K({
|
|
3670
3670
|
tag: "svg",
|
|
3671
3671
|
attr: { viewBox: "0 0 24 24" },
|
|
3672
3672
|
child: [{
|
|
@@ -3684,7 +3684,7 @@ function qn(e) {
|
|
|
3684
3684
|
})(e);
|
|
3685
3685
|
}
|
|
3686
3686
|
function Jn(e) {
|
|
3687
|
-
return
|
|
3687
|
+
return K({
|
|
3688
3688
|
tag: "svg",
|
|
3689
3689
|
attr: { viewBox: "0 0 24 24" },
|
|
3690
3690
|
child: [{
|
|
@@ -3715,7 +3715,7 @@ var Yn = (e = window.localStorage) => ({
|
|
|
3715
3715
|
//#endregion
|
|
3716
3716
|
//#region node_modules/react-icons/gr/index.mjs
|
|
3717
3717
|
function Xn(e) {
|
|
3718
|
-
return
|
|
3718
|
+
return K({
|
|
3719
3719
|
tag: "svg",
|
|
3720
3720
|
attr: { viewBox: "0 0 24 24" },
|
|
3721
3721
|
child: [{
|
|
@@ -3731,7 +3731,7 @@ function Xn(e) {
|
|
|
3731
3731
|
})(e);
|
|
3732
3732
|
}
|
|
3733
3733
|
function Zn(e) {
|
|
3734
|
-
return
|
|
3734
|
+
return K({
|
|
3735
3735
|
tag: "svg",
|
|
3736
3736
|
attr: { viewBox: "0 0 24 24" },
|
|
3737
3737
|
child: [{
|
|
@@ -4347,42 +4347,42 @@ var mr = (e) => {
|
|
|
4347
4347
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
4348
4348
|
return !0;
|
|
4349
4349
|
};
|
|
4350
|
-
function _r({ 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: R = !1, error: z, onRetry: B, onRefresh: te, onRowClick: ne, enableRowSelection: V = !0, getRowActions: H, getBulkActions: U, bulkActionsSlot: re, onSelectionChange: ie, headerVariant: ae = "default",
|
|
4351
|
-
let [
|
|
4350
|
+
function _r({ 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: R = !1, error: z, onRetry: B, onRefresh: te, onRowClick: ne, enableRowSelection: V = !0, getRowActions: H, getBulkActions: U, bulkActionsSlot: re, onSelectionChange: ie, headerVariant: ae = "default", searchPlaceholder: oe = "Buscar...", embedded: se = !1, detail: W, controller: ce }) {
|
|
4351
|
+
let [le, ue] = h(o), [de, fe] = h(() => o.length > 0 ? {} : !0), [pe, me] = h([]), [he, ge] = h(""), [_e, ve] = h([]), [ye, be] = h({}), [xe, Se] = h({}), [Ce, we] = h(() => pr(i).map((e) => e.id)), [Te, G] = h({}), [Ee, De] = h({
|
|
4352
4352
|
pageIndex: 0,
|
|
4353
4353
|
pageSize: f
|
|
4354
|
-
}), [
|
|
4355
|
-
let n =
|
|
4354
|
+
}), [Oe, ke] = h(!1), [Ae, je] = h(!1), [Me, Ne] = h(!1), [Pe, Fe] = h(null), [Ie, Le] = h(!1), [Re, ze] = h({}), Be = W != null && (W.render != null || W.getRows != null && W.columns != null), Ve = (e) => Be ? W?.isExpandable?.(e) ?? !0 : !1, He = (e, t) => {
|
|
4355
|
+
let n = Re[e];
|
|
4356
4356
|
if (n != null) return n;
|
|
4357
4357
|
let r = W?.defaultExpanded;
|
|
4358
4358
|
return typeof r == "function" ? r(t) : r === !0;
|
|
4359
|
-
},
|
|
4360
|
-
let n = !
|
|
4361
|
-
|
|
4359
|
+
}, Ue = (e, t) => {
|
|
4360
|
+
let n = !He(e, t);
|
|
4361
|
+
ze((t) => ({
|
|
4362
4362
|
...t,
|
|
4363
4363
|
[e]: n
|
|
4364
4364
|
}));
|
|
4365
|
-
},
|
|
4365
|
+
}, We = p(() => {
|
|
4366
4366
|
let e = [];
|
|
4367
|
-
return
|
|
4367
|
+
return Be && e.push("__detail"), V && e.push("__select"), H && e.push("__actions"), e;
|
|
4368
4368
|
}, [
|
|
4369
4369
|
V,
|
|
4370
4370
|
H,
|
|
4371
|
-
|
|
4372
|
-
]),
|
|
4371
|
+
Be
|
|
4372
|
+
]), Ge = p(() => {
|
|
4373
4373
|
if (e) return t ?? Yn();
|
|
4374
|
-
}, [e, t]),
|
|
4374
|
+
}, [e, t]), Ke = m(!1), K = m(!1), qe = m(void 0), Je = m(null), Ye = m(void 0), q = a ?? le, Xe = p(() => w ?? (!s || q.length === 0 ? null : `Agrupado por: ${q.join(" → ")}`), [
|
|
4375
4375
|
w,
|
|
4376
4376
|
s,
|
|
4377
|
-
|
|
4378
|
-
]),
|
|
4377
|
+
q
|
|
4378
|
+
]), Ze = ae === "brand", Qe = p(() => pr(i).map((e) => ({
|
|
4379
4379
|
id: e.id,
|
|
4380
4380
|
headerLabel: lr(e.header, e.id)
|
|
4381
|
-
})).filter((e) => !!e), [i]),
|
|
4381
|
+
})).filter((e) => !!e), [i]), J = p(() => {
|
|
4382
4382
|
let e = /* @__PURE__ */ new Map();
|
|
4383
|
-
for (let t of
|
|
4383
|
+
for (let t of Qe) e.set(t.id, t.headerLabel);
|
|
4384
4384
|
return e;
|
|
4385
|
-
}, [
|
|
4385
|
+
}, [Qe]), $e = p(() => {
|
|
4386
4386
|
let e = /* @__PURE__ */ new Map(), t = pr(i);
|
|
4387
4387
|
for (let n of t) {
|
|
4388
4388
|
let t = n.id, i = "string";
|
|
@@ -4396,15 +4396,15 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4396
4396
|
e.set(t, i);
|
|
4397
4397
|
}
|
|
4398
4398
|
return e;
|
|
4399
|
-
}, [i, r]),
|
|
4399
|
+
}, [i, r]), et = p(() => fr(i, Te), [Te, i]), tt = p(() => {
|
|
4400
4400
|
let e = [];
|
|
4401
|
-
return
|
|
4401
|
+
return Be && e.push("__detail"), V && e.push("__select"), e.push(...Ce), H && e.push("__actions"), e;
|
|
4402
4402
|
}, [
|
|
4403
|
-
|
|
4403
|
+
Ce,
|
|
4404
4404
|
V,
|
|
4405
4405
|
H,
|
|
4406
|
-
|
|
4407
|
-
]),
|
|
4406
|
+
Be
|
|
4407
|
+
]), nt = p(() => {
|
|
4408
4408
|
let e = {
|
|
4409
4409
|
id: "__select",
|
|
4410
4410
|
size: 44,
|
|
@@ -4444,11 +4444,11 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4444
4444
|
return /* @__PURE__ */ v(cr, {
|
|
4445
4445
|
row: e.original,
|
|
4446
4446
|
actions: t,
|
|
4447
|
-
open:
|
|
4448
|
-
onOpenChange: (e) =>
|
|
4447
|
+
open: Pe === n,
|
|
4448
|
+
onOpenChange: (e) => Fe(e ? n : null)
|
|
4449
4449
|
});
|
|
4450
4450
|
}
|
|
4451
|
-
}, n =
|
|
4451
|
+
}, n = Be ? {
|
|
4452
4452
|
id: "__detail",
|
|
4453
4453
|
size: 40,
|
|
4454
4454
|
enableSorting: !1,
|
|
@@ -4456,14 +4456,14 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4456
4456
|
enableHiding: !1,
|
|
4457
4457
|
header: () => null,
|
|
4458
4458
|
cell: ({ row: e }) => {
|
|
4459
|
-
if (e.getIsGrouped() || !
|
|
4460
|
-
let t =
|
|
4459
|
+
if (e.getIsGrouped() || !Ve(e.original)) return null;
|
|
4460
|
+
let t = He(e.id, e.original);
|
|
4461
4461
|
return /* @__PURE__ */ v("button", {
|
|
4462
4462
|
type: "button",
|
|
4463
4463
|
className: "sf-table-detail-toggle",
|
|
4464
4464
|
"aria-expanded": t,
|
|
4465
4465
|
"aria-label": t ? "Contraer detalle" : "Expandir detalle",
|
|
4466
|
-
onClick: () =>
|
|
4466
|
+
onClick: () => Ue(e.id, e.original),
|
|
4467
4467
|
children: /* @__PURE__ */ v(t ? Gn : Wn, {
|
|
4468
4468
|
className: "h-4 w-4",
|
|
4469
4469
|
"aria-hidden": "true"
|
|
@@ -4474,38 +4474,38 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4474
4474
|
return [
|
|
4475
4475
|
...n ? [n] : [],
|
|
4476
4476
|
...V ? [e] : [],
|
|
4477
|
-
|
|
4477
|
+
...et,
|
|
4478
4478
|
...t ? [t] : []
|
|
4479
4479
|
];
|
|
4480
4480
|
}, [
|
|
4481
|
-
|
|
4481
|
+
et,
|
|
4482
4482
|
V,
|
|
4483
4483
|
H,
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4484
|
+
Pe,
|
|
4485
|
+
Be,
|
|
4486
|
+
Re,
|
|
4487
4487
|
W
|
|
4488
|
-
]),
|
|
4489
|
-
let e = Object.entries(
|
|
4488
|
+
]), rt = p(() => {
|
|
4489
|
+
let e = Object.entries(Te).sort(([e], [t]) => e.localeCompare(t));
|
|
4490
4490
|
return JSON.stringify(e);
|
|
4491
|
-
}, [
|
|
4491
|
+
}, [Te]), it = p(() => {
|
|
4492
4492
|
if (s) return k();
|
|
4493
|
-
}, [s,
|
|
4493
|
+
}, [s, rt]);
|
|
4494
4494
|
u(() => {
|
|
4495
|
-
if (!e || !
|
|
4495
|
+
if (!e || !Ge) return;
|
|
4496
4496
|
let t = !1;
|
|
4497
4497
|
return (async () => {
|
|
4498
|
-
let n = await
|
|
4498
|
+
let n = await Ge.getItem(ur(e));
|
|
4499
4499
|
if (t || !n) {
|
|
4500
|
-
|
|
4500
|
+
Ke.current = !0;
|
|
4501
4501
|
return;
|
|
4502
4502
|
}
|
|
4503
4503
|
try {
|
|
4504
4504
|
let e = JSON.parse(n);
|
|
4505
4505
|
if (K.current) return;
|
|
4506
|
-
a == null && Array.isArray(e.grouping) &&
|
|
4506
|
+
a == null && Array.isArray(e.grouping) && ue(e.grouping), e.expanded != null && (e.expanded === !0 && Array.isArray(e.grouping) && e.grouping.length > 0 ? fe({}) : fe(e.expanded)), e.sorting && me(e.sorting), typeof e.globalFilter == "string" && ge(e.globalFilter), e.columnFilters && ve(e.columnFilters), e.columnVisibility && be(e.columnVisibility), e.columnOrder && we(e.columnOrder), e.columnAggregations && G(e.columnAggregations), e.pagination && De(e.pagination);
|
|
4507
4507
|
} catch {} finally {
|
|
4508
|
-
|
|
4508
|
+
Ke.current = !0;
|
|
4509
4509
|
}
|
|
4510
4510
|
})(), () => {
|
|
4511
4511
|
t = !0;
|
|
@@ -4513,101 +4513,101 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4513
4513
|
}, [
|
|
4514
4514
|
a,
|
|
4515
4515
|
e,
|
|
4516
|
-
|
|
4516
|
+
Ge
|
|
4517
4517
|
]), u(() => {
|
|
4518
4518
|
let e = pr(i).map((e) => e.id);
|
|
4519
|
-
|
|
4519
|
+
we((t) => {
|
|
4520
4520
|
let n = t.filter((t) => e.includes(t));
|
|
4521
4521
|
for (let t of e) n.includes(t) || n.push(t);
|
|
4522
4522
|
return n;
|
|
4523
4523
|
});
|
|
4524
4524
|
}, [i]), u(() => {
|
|
4525
|
-
if (!e || !
|
|
4525
|
+
if (!e || !Ge || !Ke.current) return;
|
|
4526
4526
|
let t = {
|
|
4527
|
-
grouping: a == null ?
|
|
4528
|
-
expanded:
|
|
4529
|
-
sorting:
|
|
4530
|
-
globalFilter:
|
|
4531
|
-
columnFilters:
|
|
4532
|
-
columnVisibility:
|
|
4533
|
-
columnOrder:
|
|
4534
|
-
columnAggregations:
|
|
4535
|
-
pagination:
|
|
4527
|
+
grouping: a == null ? q : void 0,
|
|
4528
|
+
expanded: de,
|
|
4529
|
+
sorting: pe,
|
|
4530
|
+
globalFilter: he,
|
|
4531
|
+
columnFilters: _e,
|
|
4532
|
+
columnVisibility: ye,
|
|
4533
|
+
columnOrder: Ce,
|
|
4534
|
+
columnAggregations: Te,
|
|
4535
|
+
pagination: Ee
|
|
4536
4536
|
};
|
|
4537
|
-
return window.clearTimeout(
|
|
4538
|
-
|
|
4537
|
+
return window.clearTimeout(qe.current), qe.current = window.setTimeout(() => {
|
|
4538
|
+
Ge.setItem(ur(e), JSON.stringify(t)).catch(() => {});
|
|
4539
4539
|
}, 250), () => {
|
|
4540
|
-
window.clearTimeout(
|
|
4540
|
+
window.clearTimeout(qe.current);
|
|
4541
4541
|
};
|
|
4542
4542
|
}, [
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4543
|
+
_e,
|
|
4544
|
+
Te,
|
|
4545
|
+
Ce,
|
|
4546
|
+
ye,
|
|
4547
|
+
de,
|
|
4548
|
+
he,
|
|
4549
4549
|
a,
|
|
4550
4550
|
e,
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4551
|
+
Ee,
|
|
4552
|
+
q,
|
|
4553
|
+
Ge,
|
|
4554
|
+
pe
|
|
4555
4555
|
]);
|
|
4556
4556
|
let Y = M({
|
|
4557
4557
|
data: r,
|
|
4558
|
-
columns:
|
|
4558
|
+
columns: nt,
|
|
4559
4559
|
debugTable: !1,
|
|
4560
4560
|
state: {
|
|
4561
|
-
grouping:
|
|
4562
|
-
expanded:
|
|
4563
|
-
sorting:
|
|
4564
|
-
globalFilter:
|
|
4565
|
-
columnFilters:
|
|
4566
|
-
columnVisibility:
|
|
4567
|
-
columnOrder:
|
|
4568
|
-
pagination:
|
|
4569
|
-
rowSelection:
|
|
4561
|
+
grouping: q,
|
|
4562
|
+
expanded: de,
|
|
4563
|
+
sorting: pe,
|
|
4564
|
+
globalFilter: he,
|
|
4565
|
+
columnFilters: _e,
|
|
4566
|
+
columnVisibility: ye,
|
|
4567
|
+
columnOrder: tt,
|
|
4568
|
+
pagination: Ee,
|
|
4569
|
+
rowSelection: xe
|
|
4570
4570
|
},
|
|
4571
4571
|
onGroupingChange: (e) => {
|
|
4572
4572
|
K.current = !0;
|
|
4573
|
-
let t = typeof e == "function" ? e(
|
|
4574
|
-
|
|
4573
|
+
let t = typeof e == "function" ? e(q) : e;
|
|
4574
|
+
ue((e) => gr(e, t) ? e : t), gr(q, t) || P?.(t);
|
|
4575
4575
|
},
|
|
4576
4576
|
onExpandedChange: (e) => {
|
|
4577
|
-
K.current = !0,
|
|
4577
|
+
K.current = !0, fe(e);
|
|
4578
4578
|
},
|
|
4579
4579
|
onSortingChange: (e) => {
|
|
4580
|
-
K.current = !0,
|
|
4580
|
+
K.current = !0, me(e);
|
|
4581
4581
|
},
|
|
4582
4582
|
onGlobalFilterChange: (e) => {
|
|
4583
|
-
K.current = !0,
|
|
4583
|
+
K.current = !0, ge(e);
|
|
4584
4584
|
},
|
|
4585
4585
|
onColumnFiltersChange: (e) => {
|
|
4586
|
-
K.current = !0,
|
|
4586
|
+
K.current = !0, ve(e);
|
|
4587
4587
|
},
|
|
4588
4588
|
onColumnVisibilityChange: (e) => {
|
|
4589
|
-
K.current = !0,
|
|
4589
|
+
K.current = !0, be(e);
|
|
4590
4590
|
},
|
|
4591
4591
|
onRowSelectionChange: (e) => {
|
|
4592
|
-
K.current = !0,
|
|
4592
|
+
K.current = !0, Se(e);
|
|
4593
4593
|
},
|
|
4594
4594
|
onColumnOrderChange: (e) => {
|
|
4595
4595
|
K.current = !0;
|
|
4596
|
-
let t = (typeof e == "function" ? e(
|
|
4597
|
-
|
|
4596
|
+
let t = (typeof e == "function" ? e(tt) : e).filter((e) => !We.includes(e));
|
|
4597
|
+
we(t);
|
|
4598
4598
|
},
|
|
4599
4599
|
onPaginationChange: (e) => {
|
|
4600
|
-
K.current = !0,
|
|
4600
|
+
K.current = !0, De(e);
|
|
4601
4601
|
},
|
|
4602
4602
|
autoResetExpanded: !1,
|
|
4603
4603
|
autoResetPageIndex: !1,
|
|
4604
4604
|
enableGrouping: s,
|
|
4605
4605
|
enableSorting: c,
|
|
4606
|
-
paginateExpandedRows:
|
|
4606
|
+
paginateExpandedRows: q.length === 0,
|
|
4607
4607
|
groupedColumnMode: "reorder",
|
|
4608
4608
|
getCoreRowModel: E(),
|
|
4609
4609
|
getFilteredRowModel: l ? O() : void 0,
|
|
4610
|
-
getGroupedRowModel:
|
|
4610
|
+
getGroupedRowModel: it,
|
|
4611
4611
|
getSortedRowModel: c ? j() : void 0,
|
|
4612
4612
|
getExpandedRowModel: D(),
|
|
4613
4613
|
getSubRows: (e) => e.subRows,
|
|
@@ -4615,27 +4615,27 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4615
4615
|
filterFns: { columnFilter: ar },
|
|
4616
4616
|
enableRowSelection: V
|
|
4617
4617
|
});
|
|
4618
|
-
|
|
4619
|
-
let
|
|
4618
|
+
Je.current = Y;
|
|
4619
|
+
let at = Y.getSelectedRowModel().flatRows.map((e) => e.original);
|
|
4620
4620
|
return u(() => {
|
|
4621
|
-
|
|
4622
|
-
}, [
|
|
4621
|
+
at.length === 0 && Le(!1);
|
|
4622
|
+
}, [at.length]), u(() => {
|
|
4623
4623
|
Y.setOptions((e) => ({
|
|
4624
4624
|
...e,
|
|
4625
|
-
columns:
|
|
4625
|
+
columns: nt
|
|
4626
4626
|
}));
|
|
4627
4627
|
}, [
|
|
4628
|
-
|
|
4628
|
+
nt,
|
|
4629
4629
|
Y,
|
|
4630
|
-
|
|
4630
|
+
rt
|
|
4631
4631
|
]), u(() => {
|
|
4632
4632
|
ie?.(Y.getSelectedRowModel().flatRows.map((e) => e.original));
|
|
4633
4633
|
}, [
|
|
4634
4634
|
ie,
|
|
4635
|
-
|
|
4635
|
+
xe,
|
|
4636
4636
|
Y
|
|
4637
4637
|
]), u(() => {
|
|
4638
|
-
|
|
4638
|
+
ce && ce.register({
|
|
4639
4639
|
selection: {
|
|
4640
4640
|
selectRowFn: (e) => {
|
|
4641
4641
|
let t = Array.isArray(e) ? e : [e];
|
|
@@ -4651,37 +4651,37 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4651
4651
|
},
|
|
4652
4652
|
row: {
|
|
4653
4653
|
selectRowFn: (e) => {
|
|
4654
|
-
|
|
4654
|
+
Ye.current = e, Y.resetRowSelection();
|
|
4655
4655
|
let t = Y.getPrePaginationRowModel().flatRows.find((t) => t.original === e);
|
|
4656
4656
|
t && t.toggleSelected(!0);
|
|
4657
4657
|
},
|
|
4658
4658
|
cleanSelectionFn: () => {
|
|
4659
|
-
|
|
4659
|
+
Ye.current = void 0, Y.resetRowSelection();
|
|
4660
4660
|
},
|
|
4661
|
-
getSelectedRowFn: () =>
|
|
4661
|
+
getSelectedRowFn: () => Ye.current
|
|
4662
4662
|
}
|
|
4663
4663
|
});
|
|
4664
4664
|
}, [
|
|
4665
|
-
|
|
4666
|
-
|
|
4665
|
+
ce,
|
|
4666
|
+
xe,
|
|
4667
4667
|
Y
|
|
4668
4668
|
]), u(() => {
|
|
4669
|
-
s &&
|
|
4669
|
+
s && q.length !== 0 && Y.setGrouping(q);
|
|
4670
4670
|
}, [
|
|
4671
4671
|
s,
|
|
4672
|
-
|
|
4672
|
+
q,
|
|
4673
4673
|
Y,
|
|
4674
|
-
|
|
4674
|
+
rt
|
|
4675
4675
|
]), /* @__PURE__ */ y("div", {
|
|
4676
4676
|
className: g ? "flex h-full w-full min-h-0 flex-col" : "flex w-full min-h-0 flex-col",
|
|
4677
4677
|
style: g ? void 0 : { maxHeight: "100dvh" },
|
|
4678
4678
|
children: [
|
|
4679
|
-
N &&
|
|
4679
|
+
N && Oe && /* @__PURE__ */ y("div", {
|
|
4680
4680
|
className: "fixed inset-0 z-50",
|
|
4681
4681
|
children: [/* @__PURE__ */ v("button", {
|
|
4682
4682
|
type: "button",
|
|
4683
4683
|
"aria-label": "Cerrar panel",
|
|
4684
|
-
onClick: () =>
|
|
4684
|
+
onClick: () => ke(!1),
|
|
4685
4685
|
className: "sf-table-panel-scrim"
|
|
4686
4686
|
}), /* @__PURE__ */ y("aside", {
|
|
4687
4687
|
className: "sf-table-panel",
|
|
@@ -4695,7 +4695,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4695
4695
|
children: "Columns, Group By, Aggregations"
|
|
4696
4696
|
})] }), /* @__PURE__ */ v("button", {
|
|
4697
4697
|
type: "button",
|
|
4698
|
-
onClick: () =>
|
|
4698
|
+
onClick: () => ke(!1),
|
|
4699
4699
|
className: "sf-table-panel__close",
|
|
4700
4700
|
children: "Ocultar"
|
|
4701
4701
|
})]
|
|
@@ -4709,8 +4709,8 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4709
4709
|
children: "Columns"
|
|
4710
4710
|
}), /* @__PURE__ */ v("div", {
|
|
4711
4711
|
className: "sf-table-panel-stack sf-table-panel-stack--tight",
|
|
4712
|
-
children:
|
|
4713
|
-
let n = e.id, r = e.getCanHide?.() ?? !0, i = e.getIsVisible(), a =
|
|
4712
|
+
children: Ce.map((e) => Y.getColumn(e)).filter(Boolean).map((e, t) => {
|
|
4713
|
+
let n = e.id, r = e.getCanHide?.() ?? !0, i = e.getIsVisible(), a = J.get(n) ?? n;
|
|
4714
4714
|
return /* @__PURE__ */ y("div", {
|
|
4715
4715
|
draggable: !0,
|
|
4716
4716
|
onDragStart: (e) => {
|
|
@@ -4726,8 +4726,8 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4726
4726
|
e.preventDefault();
|
|
4727
4727
|
let r = mr(e);
|
|
4728
4728
|
if (!r || r === n) return;
|
|
4729
|
-
let i =
|
|
4730
|
-
i !== -1 && Y.setColumnOrder(hr(
|
|
4729
|
+
let i = Ce.indexOf(r), a = t;
|
|
4730
|
+
i !== -1 && Y.setColumnOrder(hr(Ce, i, a));
|
|
4731
4731
|
},
|
|
4732
4732
|
className: "sf-table-column-row",
|
|
4733
4733
|
children: [/* @__PURE__ */ y("span", {
|
|
@@ -4764,7 +4764,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4764
4764
|
let n = Y.getColumn(t);
|
|
4765
4765
|
if (!n || !n.getCanGroup()) return;
|
|
4766
4766
|
n.getIsVisible() || n.toggleVisibility(!0);
|
|
4767
|
-
let r =
|
|
4767
|
+
let r = q.includes(t) ? q : [...q, t];
|
|
4768
4768
|
Y.setGrouping(r);
|
|
4769
4769
|
},
|
|
4770
4770
|
children: [/* @__PURE__ */ y("div", {
|
|
@@ -4772,7 +4772,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4772
4772
|
children: [/* @__PURE__ */ v("p", {
|
|
4773
4773
|
className: "sf-table-panel__section-title",
|
|
4774
4774
|
children: "Group By"
|
|
4775
|
-
}),
|
|
4775
|
+
}), q.length > 0 && /* @__PURE__ */ v("button", {
|
|
4776
4776
|
type: "button",
|
|
4777
4777
|
onClick: () => Y.resetGrouping(),
|
|
4778
4778
|
className: "sf-table-panel-btn-sm",
|
|
@@ -4780,12 +4780,12 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4780
4780
|
})]
|
|
4781
4781
|
}), /* @__PURE__ */ v("div", {
|
|
4782
4782
|
className: "sf-table-panel-stack sf-table-panel-stack--tight",
|
|
4783
|
-
children:
|
|
4783
|
+
children: q.length === 0 ? /* @__PURE__ */ v("div", {
|
|
4784
4784
|
className: "sf-table-panel-empty",
|
|
4785
4785
|
children: "Arrastra columnas aquí"
|
|
4786
|
-
}) :
|
|
4786
|
+
}) : q.map((e) => {
|
|
4787
4787
|
if (!Y.getColumn(e)) return null;
|
|
4788
|
-
let t =
|
|
4788
|
+
let t = J.get(e) ?? e;
|
|
4789
4789
|
return /* @__PURE__ */ y("div", {
|
|
4790
4790
|
className: "sf-table-panel-row",
|
|
4791
4791
|
children: [/* @__PURE__ */ v("span", {
|
|
@@ -4793,7 +4793,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4793
4793
|
children: t
|
|
4794
4794
|
}), /* @__PURE__ */ v("button", {
|
|
4795
4795
|
type: "button",
|
|
4796
|
-
onClick: () => Y.setGrouping(
|
|
4796
|
+
onClick: () => Y.setGrouping(q.filter((t) => t !== e)),
|
|
4797
4797
|
className: "sf-table-panel-link",
|
|
4798
4798
|
children: "Quitar"
|
|
4799
4799
|
})]
|
|
@@ -4809,7 +4809,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4809
4809
|
onDrop: (e) => {
|
|
4810
4810
|
e.preventDefault();
|
|
4811
4811
|
let t = mr(e);
|
|
4812
|
-
t && Y.getColumn(t) &&
|
|
4812
|
+
t && Y.getColumn(t) && G((e) => (K.current = !0, e[t] ? e : {
|
|
4813
4813
|
...e,
|
|
4814
4814
|
[t]: "sum"
|
|
4815
4815
|
}));
|
|
@@ -4819,10 +4819,10 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4819
4819
|
children: [/* @__PURE__ */ v("p", {
|
|
4820
4820
|
className: "sf-table-panel__section-title",
|
|
4821
4821
|
children: "Aggregations"
|
|
4822
|
-
}), Object.keys(
|
|
4822
|
+
}), Object.keys(Te).length > 0 && /* @__PURE__ */ v("button", {
|
|
4823
4823
|
type: "button",
|
|
4824
4824
|
onClick: () => {
|
|
4825
|
-
K.current = !0,
|
|
4825
|
+
K.current = !0, G({});
|
|
4826
4826
|
},
|
|
4827
4827
|
className: "sf-table-panel-btn-sm",
|
|
4828
4828
|
children: "Clear"
|
|
@@ -4832,21 +4832,21 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4832
4832
|
children: [/* @__PURE__ */ v("p", {
|
|
4833
4833
|
className: "sf-table-panel__subtitle",
|
|
4834
4834
|
children: "Nota: solo se ve el resultado cuando la tabla está agrupada."
|
|
4835
|
-
}), Object.keys(
|
|
4835
|
+
}), Object.keys(Te).length === 0 ? /* @__PURE__ */ v("div", {
|
|
4836
4836
|
className: "sf-table-panel-empty",
|
|
4837
4837
|
children: "Arrastra columnas aquí"
|
|
4838
|
-
}) : Object.entries(
|
|
4838
|
+
}) : Object.entries(Te).map(([e, t]) => /* @__PURE__ */ y("div", {
|
|
4839
4839
|
className: "sf-table-panel-row",
|
|
4840
4840
|
children: [
|
|
4841
4841
|
/* @__PURE__ */ v("span", {
|
|
4842
4842
|
className: "min-w-0 flex-1 truncate",
|
|
4843
|
-
children:
|
|
4843
|
+
children: J.get(e) ?? e
|
|
4844
4844
|
}),
|
|
4845
4845
|
/* @__PURE__ */ v("select", {
|
|
4846
4846
|
value: t,
|
|
4847
4847
|
onChange: (t) => {
|
|
4848
4848
|
let n = t.target.value;
|
|
4849
|
-
K.current = !0,
|
|
4849
|
+
K.current = !0, G((t) => ({
|
|
4850
4850
|
...t,
|
|
4851
4851
|
[e]: n
|
|
4852
4852
|
}));
|
|
@@ -4859,7 +4859,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4859
4859
|
}),
|
|
4860
4860
|
/* @__PURE__ */ v("button", {
|
|
4861
4861
|
type: "button",
|
|
4862
|
-
onClick: () =>
|
|
4862
|
+
onClick: () => G((t) => {
|
|
4863
4863
|
K.current = !0;
|
|
4864
4864
|
let n = { ...t };
|
|
4865
4865
|
return delete n[e], n;
|
|
@@ -4875,40 +4875,40 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4875
4875
|
})]
|
|
4876
4876
|
})]
|
|
4877
4877
|
}),
|
|
4878
|
-
N &&
|
|
4879
|
-
open:
|
|
4880
|
-
onClose: () =>
|
|
4881
|
-
columnsMeta:
|
|
4882
|
-
headerLabelById:
|
|
4883
|
-
columnTypeById:
|
|
4884
|
-
columnFilters:
|
|
4878
|
+
N && Ae && /* @__PURE__ */ v(or, {
|
|
4879
|
+
open: Ae,
|
|
4880
|
+
onClose: () => je(!1),
|
|
4881
|
+
columnsMeta: Qe,
|
|
4882
|
+
headerLabelById: J,
|
|
4883
|
+
columnTypeById: $e,
|
|
4884
|
+
columnFilters: _e,
|
|
4885
4885
|
table: Y,
|
|
4886
4886
|
markUserEdit: () => {
|
|
4887
4887
|
K.current = !0;
|
|
4888
4888
|
}
|
|
4889
4889
|
}),
|
|
4890
|
-
N &&
|
|
4891
|
-
open:
|
|
4892
|
-
onClose: () =>
|
|
4893
|
-
columnsMeta:
|
|
4894
|
-
headerLabelById:
|
|
4895
|
-
sorting:
|
|
4890
|
+
N && Me && /* @__PURE__ */ v(sr, {
|
|
4891
|
+
open: Me,
|
|
4892
|
+
onClose: () => Ne(!1),
|
|
4893
|
+
columnsMeta: Qe,
|
|
4894
|
+
headerLabelById: J,
|
|
4895
|
+
sorting: pe,
|
|
4896
4896
|
table: Y,
|
|
4897
4897
|
markUserEdit: () => {
|
|
4898
4898
|
K.current = !0;
|
|
4899
4899
|
}
|
|
4900
4900
|
}),
|
|
4901
4901
|
/* @__PURE__ */ y("div", {
|
|
4902
|
-
className: (0, X.default)(
|
|
4902
|
+
className: (0, X.default)(se ? "sf-table--embedded w-full" : "sf-table-shell w-full", x),
|
|
4903
4903
|
children: [
|
|
4904
|
-
!
|
|
4904
|
+
!se && /* @__PURE__ */ y("div", {
|
|
4905
4905
|
className: "sf-table-toolbar",
|
|
4906
4906
|
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h2", {
|
|
4907
4907
|
className: "sf-table-title",
|
|
4908
4908
|
children: C
|
|
4909
|
-
}),
|
|
4909
|
+
}), Xe != null && Xe !== "" && /* @__PURE__ */ v("p", {
|
|
4910
4910
|
className: "sf-table-subtitle",
|
|
4911
|
-
children:
|
|
4911
|
+
children: Xe
|
|
4912
4912
|
})] }), /* @__PURE__ */ y("div", {
|
|
4913
4913
|
className: "sf-table-toolbar-actions",
|
|
4914
4914
|
children: [
|
|
@@ -4938,7 +4938,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4938
4938
|
/* @__PURE__ */ v("button", {
|
|
4939
4939
|
type: "button",
|
|
4940
4940
|
onClick: () => {
|
|
4941
|
-
|
|
4941
|
+
je(!1), Ne(!1), ke(!0);
|
|
4942
4942
|
},
|
|
4943
4943
|
"aria-label": "Abrir panel de tabla",
|
|
4944
4944
|
className: "sf-table-toolbar-btn",
|
|
@@ -4950,7 +4950,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4950
4950
|
l && /* @__PURE__ */ v("button", {
|
|
4951
4951
|
type: "button",
|
|
4952
4952
|
onClick: () => {
|
|
4953
|
-
|
|
4953
|
+
ke(!1), Ne(!1), je(!0);
|
|
4954
4954
|
},
|
|
4955
4955
|
"aria-label": "Abrir panel de filtros",
|
|
4956
4956
|
className: "sf-table-toolbar-btn",
|
|
@@ -4962,7 +4962,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4962
4962
|
c && /* @__PURE__ */ v("button", {
|
|
4963
4963
|
type: "button",
|
|
4964
4964
|
onClick: () => {
|
|
4965
|
-
|
|
4965
|
+
ke(!1), je(!1), Ne(!0);
|
|
4966
4966
|
},
|
|
4967
4967
|
"aria-label": "Abrir panel de ordenamiento",
|
|
4968
4968
|
className: "sf-table-toolbar-btn",
|
|
@@ -4974,40 +4974,40 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4974
4974
|
]
|
|
4975
4975
|
}),
|
|
4976
4976
|
l && /* @__PURE__ */ v("input", {
|
|
4977
|
-
value:
|
|
4977
|
+
value: he,
|
|
4978
4978
|
onChange: (e) => {
|
|
4979
|
-
K.current = !0,
|
|
4979
|
+
K.current = !0, ge(e.target.value);
|
|
4980
4980
|
},
|
|
4981
|
-
placeholder:
|
|
4981
|
+
placeholder: oe,
|
|
4982
4982
|
className: "sf-table-search"
|
|
4983
4983
|
}),
|
|
4984
|
-
s &&
|
|
4984
|
+
s && q.length > 0 && /* @__PURE__ */ v("div", {
|
|
4985
4985
|
className: "sf-table-group-hint",
|
|
4986
4986
|
children: "Agrupado"
|
|
4987
4987
|
}),
|
|
4988
|
-
typeof F == "function" ? F(
|
|
4989
|
-
V &&
|
|
4988
|
+
typeof F == "function" ? F(at, { clearSelection: () => Y.resetRowSelection() }) : F,
|
|
4989
|
+
V && at.length > 0 && /* @__PURE__ */ y("div", {
|
|
4990
4990
|
className: "flex items-center gap-2",
|
|
4991
4991
|
children: [(() => {
|
|
4992
|
-
let e = U?.(
|
|
4992
|
+
let e = U?.(at, { clearSelection: () => Y.resetRowSelection() }) ?? [];
|
|
4993
4993
|
return e.length === 0 ? null : /* @__PURE__ */ y("div", {
|
|
4994
4994
|
className: "relative",
|
|
4995
4995
|
children: [/* @__PURE__ */ v("button", {
|
|
4996
4996
|
type: "button",
|
|
4997
4997
|
"aria-label": "Acciones",
|
|
4998
4998
|
className: "sf-table-row-action-trigger",
|
|
4999
|
-
onClick: () =>
|
|
4999
|
+
onClick: () => Le((e) => !e),
|
|
5000
5000
|
children: /* @__PURE__ */ v(Hn, {
|
|
5001
5001
|
className: "h-4 w-4",
|
|
5002
5002
|
"aria-hidden": "true"
|
|
5003
5003
|
})
|
|
5004
|
-
}),
|
|
5004
|
+
}), Ie && /* @__PURE__ */ v("div", {
|
|
5005
5005
|
className: "sf-table-row-action-menu min-w-[12.5rem]",
|
|
5006
5006
|
children: e.map((e) => /* @__PURE__ */ y("button", {
|
|
5007
5007
|
type: "button",
|
|
5008
5008
|
disabled: e.disabled,
|
|
5009
5009
|
onClick: () => {
|
|
5010
|
-
|
|
5010
|
+
Le(!1), e.onSelect(at, { clearSelection: () => Y.resetRowSelection() });
|
|
5011
5011
|
},
|
|
5012
5012
|
children: [e.icon ? /* @__PURE__ */ v("span", {
|
|
5013
5013
|
className: "sf-table-row-action-menu__icon",
|
|
@@ -5019,7 +5019,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5019
5019
|
}, e.label))
|
|
5020
5020
|
})]
|
|
5021
5021
|
});
|
|
5022
|
-
})(), re?.(
|
|
5022
|
+
})(), re?.(at, { clearSelection: () => Y.resetRowSelection() })]
|
|
5023
5023
|
})
|
|
5024
5024
|
]
|
|
5025
5025
|
})]
|
|
@@ -5035,7 +5035,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5035
5035
|
}),
|
|
5036
5036
|
I != null && /* @__PURE__ */ v("div", {
|
|
5037
5037
|
className: "mb-3",
|
|
5038
|
-
children: typeof I == "function" ? I(
|
|
5038
|
+
children: typeof I == "function" ? I(at, { clearSelection: () => Y.resetRowSelection() }) : I
|
|
5039
5039
|
}),
|
|
5040
5040
|
/* @__PURE__ */ v("div", {
|
|
5041
5041
|
className: "min-h-0 flex-1",
|
|
@@ -5043,13 +5043,13 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5043
5043
|
children: /* @__PURE__ */ v("div", {
|
|
5044
5044
|
className: "sf-table-scroll h-full",
|
|
5045
5045
|
children: /* @__PURE__ */ y("table", {
|
|
5046
|
-
className: (0, X.default)("sf-table min-w-max w-full border-collapse text-sm",
|
|
5046
|
+
className: (0, X.default)("sf-table min-w-max w-full border-collapse text-sm", Ze && "sf-table--brand-header"),
|
|
5047
5047
|
children: [/* @__PURE__ */ v("thead", {
|
|
5048
|
-
className: (0, X.default)(
|
|
5048
|
+
className: (0, X.default)(Ze && "sf-table__head--brand"),
|
|
5049
5049
|
children: Y.getHeaderGroups().map((e) => /* @__PURE__ */ v("tr", { children: e.headers.map((e) => /* @__PURE__ */ v("th", {
|
|
5050
5050
|
colSpan: e.colSpan,
|
|
5051
5051
|
style: e.colSpan > 1 ? void 0 : { width: e.getSize() },
|
|
5052
|
-
className: (0, X.default)(
|
|
5052
|
+
className: (0, X.default)(Ze && "sf-table__th--brand", e.column.id === "__actions" && "right-0 z-2"),
|
|
5053
5053
|
children: e.isPlaceholder ? null : /* @__PURE__ */ v("div", {
|
|
5054
5054
|
className: "flex items-center gap-2",
|
|
5055
5055
|
children: e.column.getCanSort() ? /* @__PURE__ */ y("button", {
|
|
@@ -5082,7 +5082,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5082
5082
|
className: "sf-table-empty",
|
|
5083
5083
|
children: S
|
|
5084
5084
|
}) }) : /* @__PURE__ */ v(_, { children: Y.getRowModel().rows.map((e) => {
|
|
5085
|
-
let t =
|
|
5085
|
+
let t = Be && !e.getIsGrouped() && Ve(e.original) && He(e.id, e.original);
|
|
5086
5086
|
return /* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v("tr", {
|
|
5087
5087
|
className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group", ne && !e.getIsGrouped() && "sf-table-row--clickable", t && "sf-table-row--detail-open"),
|
|
5088
5088
|
onClick: ne && !e.getIsGrouped() ? (t) => {
|
|
@@ -5110,7 +5110,7 @@ function _r({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5110
5110
|
]
|
|
5111
5111
|
}) : r ? (() => {
|
|
5112
5112
|
let e = t.column.id;
|
|
5113
|
-
return
|
|
5113
|
+
return Te[e] == null ? null : T(t.column.columnDef.aggregatedCell ?? t.column.columnDef.cell, t.getContext());
|
|
5114
5114
|
})() : i ? null : T(t.column.columnDef.cell, t.getContext())
|
|
5115
5115
|
}, t.id);
|
|
5116
5116
|
})
|
|
@@ -5766,7 +5766,7 @@ var yr = (e) => {
|
|
|
5766
5766
|
"aria-label": i,
|
|
5767
5767
|
title: i,
|
|
5768
5768
|
className: "sf-row-action sf-row-action--delete",
|
|
5769
|
-
children: /* @__PURE__ */ v(
|
|
5769
|
+
children: /* @__PURE__ */ v(Xe, {
|
|
5770
5770
|
className: "h-4 w-4",
|
|
5771
5771
|
"aria-hidden": "true"
|
|
5772
5772
|
})
|
|
@@ -5777,7 +5777,7 @@ var yr = (e) => {
|
|
|
5777
5777
|
type: "button",
|
|
5778
5778
|
variant: "outline",
|
|
5779
5779
|
loading: i,
|
|
5780
|
-
icon: i ? void 0 : /* @__PURE__ */ v(
|
|
5780
|
+
icon: i ? void 0 : /* @__PURE__ */ v(Je, {
|
|
5781
5781
|
className: "h-4 w-4",
|
|
5782
5782
|
"aria-hidden": "true"
|
|
5783
5783
|
}),
|
|
@@ -6198,7 +6198,7 @@ var yr = (e) => {
|
|
|
6198
6198
|
onClick: t,
|
|
6199
6199
|
"aria-label": "Cerrar",
|
|
6200
6200
|
className: "sf-modal-close",
|
|
6201
|
-
children: /* @__PURE__ */ v(
|
|
6201
|
+
children: /* @__PURE__ */ v(Je, {
|
|
6202
6202
|
className: "h-5 w-5",
|
|
6203
6203
|
"aria-hidden": "true"
|
|
6204
6204
|
})
|
|
@@ -6633,7 +6633,7 @@ var yr = (e) => {
|
|
|
6633
6633
|
onClick: t,
|
|
6634
6634
|
"aria-label": "Cerrar",
|
|
6635
6635
|
className: "sf-drawer__close",
|
|
6636
|
-
children: /* @__PURE__ */ v(
|
|
6636
|
+
children: /* @__PURE__ */ v(Je, {
|
|
6637
6637
|
className: "h-5 w-5",
|
|
6638
6638
|
"aria-hidden": "true"
|
|
6639
6639
|
})
|
|
@@ -6922,7 +6922,7 @@ var yr = (e) => {
|
|
|
6922
6922
|
onClick: r,
|
|
6923
6923
|
"aria-label": "Cerrar panel",
|
|
6924
6924
|
className: "sf-side-panel__close",
|
|
6925
|
-
children: /* @__PURE__ */ v(
|
|
6925
|
+
children: /* @__PURE__ */ v(Je, {
|
|
6926
6926
|
className: "h-4 w-4",
|
|
6927
6927
|
"aria-hidden": "true"
|
|
6928
6928
|
})
|
|
@@ -7548,7 +7548,7 @@ var yr = (e) => {
|
|
|
7548
7548
|
children: [
|
|
7549
7549
|
n && /* @__PURE__ */ y("div", {
|
|
7550
7550
|
className: "sf-maestro-layout__search",
|
|
7551
|
-
children: [/* @__PURE__ */ v(
|
|
7551
|
+
children: [/* @__PURE__ */ v(J, {
|
|
7552
7552
|
className: "sf-maestro-layout__search-icon",
|
|
7553
7553
|
"aria-hidden": "true"
|
|
7554
7554
|
}), /* @__PURE__ */ v(Sa, {
|
|
@@ -7590,7 +7590,7 @@ var yr = (e) => {
|
|
|
7590
7590
|
left: `${12 + n / Math.max(e.length - 1, 1) * 76}%`,
|
|
7591
7591
|
top: n % 2 == 0 ? "38%" : "58%"
|
|
7592
7592
|
},
|
|
7593
|
-
children: [/* @__PURE__ */ v(
|
|
7593
|
+
children: [/* @__PURE__ */ v(Y, {}), /* @__PURE__ */ y("span", { children: [
|
|
7594
7594
|
t.order,
|
|
7595
7595
|
". ",
|
|
7596
7596
|
t.name
|
|
@@ -7677,7 +7677,7 @@ var yr = (e) => {
|
|
|
7677
7677
|
className: "sf-itinerary-editor__stop-remove",
|
|
7678
7678
|
"aria-label": `Eliminar parada ${e.name}`,
|
|
7679
7679
|
onClick: e.onRemove,
|
|
7680
|
-
children: /* @__PURE__ */ v(
|
|
7680
|
+
children: /* @__PURE__ */ v(Xe, { "aria-hidden": "true" })
|
|
7681
7681
|
})]
|
|
7682
7682
|
})]
|
|
7683
7683
|
})
|
|
@@ -8648,7 +8648,7 @@ var yr = (e) => {
|
|
|
8648
8648
|
className: "sf-app-shell-default-topbar__icon-btn",
|
|
8649
8649
|
"aria-label": _.mode === "dark" ? "Cambiar a modo claro" : "Cambiar a modo oscuro",
|
|
8650
8650
|
onClick: _.onToggle,
|
|
8651
|
-
children: _.mode === "dark" ? /* @__PURE__ */ v(
|
|
8651
|
+
children: _.mode === "dark" ? /* @__PURE__ */ v(Ze, { "aria-hidden": "true" }) : /* @__PURE__ */ v(nt, { "aria-hidden": "true" })
|
|
8652
8652
|
}),
|
|
8653
8653
|
b && /* @__PURE__ */ v(ki, {
|
|
8654
8654
|
className: "sf-app-shell-default-topbar__notification",
|
|
@@ -9159,7 +9159,7 @@ var yr = (e) => {
|
|
|
9159
9159
|
onBlur: () => setTimeout(() => g(!1), 200)
|
|
9160
9160
|
}), /* @__PURE__ */ v("span", {
|
|
9161
9161
|
className: "sf-geocoder-icon",
|
|
9162
|
-
children: o ? "..." : /* @__PURE__ */ v(
|
|
9162
|
+
children: o ? "..." : /* @__PURE__ */ v(J, {
|
|
9163
9163
|
"aria-hidden": "true",
|
|
9164
9164
|
className: "h-3.5 w-3.5"
|
|
9165
9165
|
})
|
|
@@ -9438,10 +9438,10 @@ var yr = (e) => {
|
|
|
9438
9438
|
children: u ? /* @__PURE__ */ v(be, {
|
|
9439
9439
|
width: "100%",
|
|
9440
9440
|
height: "100%",
|
|
9441
|
-
children: n === "bar" ? /* @__PURE__ */ v(
|
|
9441
|
+
children: n === "bar" ? /* @__PURE__ */ v(W, {
|
|
9442
9442
|
data: e,
|
|
9443
9443
|
margin: d,
|
|
9444
|
-
children: /* @__PURE__ */ v(
|
|
9444
|
+
children: /* @__PURE__ */ v(se, {
|
|
9445
9445
|
dataKey: t,
|
|
9446
9446
|
fill: l,
|
|
9447
9447
|
radius: [
|
|
@@ -9529,13 +9529,13 @@ var yr = (e) => {
|
|
|
9529
9529
|
}, _s = {
|
|
9530
9530
|
comfortable: "mb-2",
|
|
9531
9531
|
compact: "mb-1"
|
|
9532
|
-
}, vs = ({ label: e, value: t, sublabel: n, icon: r, iconClassName: i, trend: a, trendLabel: o, trendDirection: s = "up-good", accentTone: c, progress: l, valueFormat: u, formatOptions: d, sparkline: f, layout: p = "stacked", variant: m = "default", size: h = "md", density: g = "comfortable", accentBar: _, iconStyle: b = "solid", labelWrap: x = !1, className: S, onClick: C }) => {
|
|
9533
|
-
let
|
|
9532
|
+
}, vs = ({ label: e, value: t, sublabel: n, icon: r, iconClassName: i, trend: a, trendLabel: o, trendDirection: s = "up-good", accentTone: c, progress: l, valueFormat: u, formatOptions: d, sparkline: f, layout: p = "stacked", variant: m = "default", size: h = "md", density: g = "comfortable", accentBar: _, iconStyle: b = "solid", labelWrap: x = !1, className: S, onClick: C, selected: w = !1, showChevron: T = !0 }) => {
|
|
9533
|
+
let E = a != null, D = E && a >= 0, O = E ? s === "neutral" ? null : s === "down-good" ? !D : D : null, k = l ? us(l.value, l.max) : null, A = l?.label ?? (k === null ? void 0 : `${Math.round(k)}%`), j = _ ?? p === "stacked", M = (e) => typeof e == "number" ? ls(u, d)(e) : e, N = !l && f && f.data.length > 0, P = (e) => {
|
|
9534
9534
|
C && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), C());
|
|
9535
|
-
},
|
|
9535
|
+
}, F = k !== null && /* @__PURE__ */ y("div", {
|
|
9536
9536
|
className: "mt-2 flex items-center gap-2",
|
|
9537
9537
|
role: "progressbar",
|
|
9538
|
-
"aria-valuenow": Math.round(
|
|
9538
|
+
"aria-valuenow": Math.round(k),
|
|
9539
9539
|
"aria-valuemin": 0,
|
|
9540
9540
|
"aria-valuemax": 100,
|
|
9541
9541
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -9543,15 +9543,15 @@ var yr = (e) => {
|
|
|
9543
9543
|
children: /* @__PURE__ */ v("div", {
|
|
9544
9544
|
className: "h-full rounded-full transition-[width]",
|
|
9545
9545
|
style: {
|
|
9546
|
-
width: `${
|
|
9546
|
+
width: `${k}%`,
|
|
9547
9547
|
backgroundColor: c ? ss[c] : "var(--sf-kpi-accent-slate)"
|
|
9548
9548
|
}
|
|
9549
9549
|
})
|
|
9550
|
-
}),
|
|
9550
|
+
}), A && /* @__PURE__ */ v("span", {
|
|
9551
9551
|
className: "shrink-0 text-xs font-semibold tabular-nums sf-card-muted",
|
|
9552
|
-
children:
|
|
9552
|
+
children: A
|
|
9553
9553
|
})]
|
|
9554
|
-
}),
|
|
9554
|
+
}), I = N && /* @__PURE__ */ v("div", {
|
|
9555
9555
|
className: "mt-2",
|
|
9556
9556
|
children: /* @__PURE__ */ v(as, {
|
|
9557
9557
|
data: f.data,
|
|
@@ -9566,11 +9566,12 @@ var yr = (e) => {
|
|
|
9566
9566
|
color: a
|
|
9567
9567
|
} : { background: a };
|
|
9568
9568
|
return /* @__PURE__ */ y("div", {
|
|
9569
|
-
className: (0, X.default)("sf-card flex items-center gap-3", fs[h], m === "filled" ? "sf-kpi-card--filled" : c &&
|
|
9569
|
+
className: (0, X.default)("sf-card flex items-center gap-3", fs[h], m === "filled" ? "sf-kpi-card--filled" : c && j && "sf-kpi-card", m !== "filled" && c && j && os[c], C && "sf-card--interactive", w && "sf-kpi-card--selected", S),
|
|
9570
9570
|
onClick: C,
|
|
9571
|
-
onKeyDown:
|
|
9571
|
+
onKeyDown: P,
|
|
9572
9572
|
role: C ? "button" : void 0,
|
|
9573
9573
|
tabIndex: C ? 0 : void 0,
|
|
9574
|
+
"aria-pressed": C ? w : void 0,
|
|
9574
9575
|
children: [
|
|
9575
9576
|
r && /* @__PURE__ */ v("span", {
|
|
9576
9577
|
className: (0, X.default)("sf-kpi-tile", hs[h], b === "soft" && "sf-kpi-tile--soft", i),
|
|
@@ -9587,15 +9588,19 @@ var yr = (e) => {
|
|
|
9587
9588
|
}),
|
|
9588
9589
|
/* @__PURE__ */ v("p", {
|
|
9589
9590
|
className: (0, X.default)(ms[h], "font-bold tabular-nums sf-card-title"),
|
|
9590
|
-
children:
|
|
9591
|
+
children: M(t)
|
|
9591
9592
|
}),
|
|
9592
|
-
|
|
9593
|
+
k === null ? N ? I : n && /* @__PURE__ */ v("p", {
|
|
9593
9594
|
className: "mt-1 text-xs sf-card-muted",
|
|
9594
9595
|
children: n
|
|
9595
|
-
}) :
|
|
9596
|
+
}) : F,
|
|
9597
|
+
w && /* @__PURE__ */ y("p", {
|
|
9598
|
+
className: "sf-kpi-card__selected-hint",
|
|
9599
|
+
children: [/* @__PURE__ */ v(vt, { "aria-hidden": "true" }), "Seleccionado"]
|
|
9600
|
+
})
|
|
9596
9601
|
]
|
|
9597
9602
|
}),
|
|
9598
|
-
C && /* @__PURE__ */ v("span", {
|
|
9603
|
+
C && T && /* @__PURE__ */ v("span", {
|
|
9599
9604
|
className: "sf-kpi-chevron",
|
|
9600
9605
|
"aria-hidden": "true",
|
|
9601
9606
|
children: /* @__PURE__ */ v(mt, {})
|
|
@@ -9604,9 +9609,9 @@ var yr = (e) => {
|
|
|
9604
9609
|
});
|
|
9605
9610
|
}
|
|
9606
9611
|
return /* @__PURE__ */ y("div", {
|
|
9607
|
-
className: (0, X.default)("sf-card", ds[h], m === "filled" ? "sf-kpi-card--filled" : c &&
|
|
9612
|
+
className: (0, X.default)("sf-card", ds[h], m === "filled" ? "sf-kpi-card--filled" : c && j && "sf-kpi-card", m !== "filled" && c && j && os[c], C && "sf-card--interactive", S),
|
|
9608
9613
|
onClick: C,
|
|
9609
|
-
onKeyDown:
|
|
9614
|
+
onKeyDown: P,
|
|
9610
9615
|
role: C ? "button" : void 0,
|
|
9611
9616
|
tabIndex: C ? 0 : void 0,
|
|
9612
9617
|
children: [
|
|
@@ -9622,20 +9627,20 @@ var yr = (e) => {
|
|
|
9622
9627
|
className: (0, X.default)(x ? "sf-kpi-card__label--wrap" : "truncate", "text-sm font-medium sf-card-subtitle"),
|
|
9623
9628
|
children: e
|
|
9624
9629
|
})]
|
|
9625
|
-
}),
|
|
9626
|
-
className: (0, X.default)("flex shrink-0 items-center gap-0.5 text-xs font-semibold tabular-nums",
|
|
9630
|
+
}), E && /* @__PURE__ */ y("span", {
|
|
9631
|
+
className: (0, X.default)("flex shrink-0 items-center gap-0.5 text-xs font-semibold tabular-nums", O === null ? "text-[var(--sf-text-muted)]" : O ? "text-[var(--sf-success)]" : "text-[var(--sf-danger)]"),
|
|
9627
9632
|
children: [/* @__PURE__ */ v("span", {
|
|
9628
9633
|
"aria-hidden": "true",
|
|
9629
|
-
children:
|
|
9634
|
+
children: D ? "↑" : "↓"
|
|
9630
9635
|
}), cs(a)]
|
|
9631
9636
|
})]
|
|
9632
9637
|
}),
|
|
9633
9638
|
/* @__PURE__ */ v("p", {
|
|
9634
9639
|
className: (0, X.default)(ps[h], "font-semibold tabular-nums sf-card-title truncate"),
|
|
9635
9640
|
title: typeof t == "string" ? t : void 0,
|
|
9636
|
-
children:
|
|
9641
|
+
children: M(t)
|
|
9637
9642
|
}),
|
|
9638
|
-
|
|
9643
|
+
k === null ? N && I : F,
|
|
9639
9644
|
(n || o) && /* @__PURE__ */ y("div", {
|
|
9640
9645
|
className: (0, X.default)("flex items-center justify-between gap-2", gs[g]),
|
|
9641
9646
|
children: [n && /* @__PURE__ */ v("span", {
|
|
@@ -10117,7 +10122,7 @@ var yr = (e) => {
|
|
|
10117
10122
|
className: "sf-tramo-card__apto",
|
|
10118
10123
|
children: /* @__PURE__ */ y("span", {
|
|
10119
10124
|
className: "sf-tramo-card__apto-badge",
|
|
10120
|
-
children: [/* @__PURE__ */ v(
|
|
10125
|
+
children: [/* @__PURE__ */ v(Qe, {
|
|
10121
10126
|
size: 13,
|
|
10122
10127
|
"aria-hidden": "true"
|
|
10123
10128
|
}), i]
|
|
@@ -11190,7 +11195,7 @@ var yr = (e) => {
|
|
|
11190
11195
|
className: "sf-detail-side-panel__close",
|
|
11191
11196
|
onClick: t,
|
|
11192
11197
|
"aria-label": "Cerrar",
|
|
11193
|
-
children: /* @__PURE__ */ v(
|
|
11198
|
+
children: /* @__PURE__ */ v(Je, { "aria-hidden": "true" })
|
|
11194
11199
|
})]
|
|
11195
11200
|
}),
|
|
11196
11201
|
e && /* @__PURE__ */ v("h3", {
|
|
@@ -12173,7 +12178,7 @@ var yr = (e) => {
|
|
|
12173
12178
|
onClick: n,
|
|
12174
12179
|
"aria-label": "Pantalla completa",
|
|
12175
12180
|
title: "Pantalla completa",
|
|
12176
|
-
children: /* @__PURE__ */ v(
|
|
12181
|
+
children: /* @__PURE__ */ v(it, { "aria-hidden": "true" })
|
|
12177
12182
|
}),
|
|
12178
12183
|
r && /* @__PURE__ */ v("button", {
|
|
12179
12184
|
type: "button",
|
|
@@ -13856,7 +13861,7 @@ var yr = (e) => {
|
|
|
13856
13861
|
let n = e.parentId == null || e.parentId === "" ? null : e.parentId;
|
|
13857
13862
|
return n == null || !t.has(n);
|
|
13858
13863
|
});
|
|
13859
|
-
}, Nd = ({ type: e, className: t }) => v(e === "group" ? bt : e === "role" ?
|
|
13864
|
+
}, Nd = ({ type: e, className: t }) => v(e === "group" ? bt : e === "role" ? q : Ye, {
|
|
13860
13865
|
className: t,
|
|
13861
13866
|
"aria-hidden": "true"
|
|
13862
13867
|
}), Pd = ({ nodes: e, title: t = "Estructura", subtitle: n, loading: r = !1, error: i = null, onRefresh: a, canEdit: o = !1, onAddNode: c, onEditNode: l, onDeleteNode: d, showLegend: f = !1, themes: g = Od, onRenderNode: _, maxHeight: b = 480, className: x }) => {
|
|
@@ -14016,7 +14021,7 @@ var yr = (e) => {
|
|
|
14016
14021
|
"aria-label": `Eliminar ${e.label}`,
|
|
14017
14022
|
onClick: () => d(e),
|
|
14018
14023
|
className: "sf-org-tree-row__action sf-org-tree-row__action--danger",
|
|
14019
|
-
children: /* @__PURE__ */ v(
|
|
14024
|
+
children: /* @__PURE__ */ v(Xe, { className: "h-3.5 w-3.5" })
|
|
14020
14025
|
})]
|
|
14021
14026
|
})
|
|
14022
14027
|
]
|
|
@@ -14769,8 +14774,8 @@ var yr = (e) => {
|
|
|
14769
14774
|
style: es
|
|
14770
14775
|
}), { Root: z, renderSeries: B } = {
|
|
14771
14776
|
bar: {
|
|
14772
|
-
Root:
|
|
14773
|
-
renderSeries: () => r.map((e, t) => /* @__PURE__ */ v(
|
|
14777
|
+
Root: W,
|
|
14778
|
+
renderSeries: () => r.map((e, t) => /* @__PURE__ */ v(se, {
|
|
14774
14779
|
dataKey: e.key,
|
|
14775
14780
|
name: e.label ?? e.key,
|
|
14776
14781
|
fill: Xo(e, t),
|