@oneclick.dev/cms-core-modules 0.0.99 → 0.0.100
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/{TableView-zWrTCNvl.mjs → TableView-CIJs118q.mjs} +660 -660
- package/dist/TableView-DzZYf34i.js +4 -0
- package/dist/View-CsudjxCE.mjs +30 -0
- package/dist/View-Dw_wA6kK.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
- package/dist/TableView-CyvIoyUT.js +0 -4
- package/dist/View-C8oQG6gI.js +0 -1
- package/dist/View-CPMontPz.mjs +0 -28
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { isRef as Lt, shallowRef as zt, watch as Se, ref as
|
|
1
|
+
import { isRef as Lt, shallowRef as zt, watch as Se, ref as T, watchEffect as St, defineComponent as ne, h as Q, unref as F, inject as K, resolveComponent as v, openBlock as R, createElementBlock as k, Fragment as U, createElementVNode as D, toDisplayString as z, createVNode as r, withCtx as i, renderList as te, createTextVNode as S, createCommentVNode as Y, computed as be, createBlock as B, normalizeClass as ie, markRaw as Ue, withModifiers as ze, resolveDynamicComponent as rt, useTemplateRef as Ht, reactive as De, onMounted as ke, nextTick as Ne, provide as de } from "vue";
|
|
2
2
|
import { useFlowBuilder as wt, useProjectSettings as xt, useFirebaseIntegration as Gt, useModulePermissions as ve, useModuleStorage as xe, useModuleRoute as Ot, useModuleBreadcrumbs as Bt } from "@oneclick.dev/cms-kit";
|
|
3
3
|
import { i as Ut, v as Re, c as Pe, d as Nt } from "./utils-BVKy9S2J.mjs";
|
|
4
|
-
import { ChevronsLeft as jt, ChevronLeft as qt, ChevronRight as yt, ChevronsRight as Yt, Table2 as Rt, icons as st, ArrowUpDown as Ze, Info as Kt, Check as He, Trash2 as Xt, Plus as
|
|
4
|
+
import { ChevronsLeft as jt, ChevronLeft as qt, ChevronRight as yt, ChevronsRight as Yt, Table2 as Rt, icons as st, ArrowUpDown as Ze, Info as Kt, Check as He, Trash2 as Xt, Plus as Fe, ChevronUp as Jt, ChevronDown as it, X as Qt, CalendarIcon as Wt, MousePointerClick as Zt } from "lucide-vue-next";
|
|
5
5
|
import en from "@oneclick.dev/cms-kit/components";
|
|
6
6
|
import { i as tn } from "./interpolation-BBwG_ON6.mjs";
|
|
7
7
|
import { nodeProps as nn, NodeToolbarWrapper as on, Handle as pt, Position as ct, NodeContextMenu as ln } from "@oneclick.dev/cms-kit/flow-builder";
|
|
8
8
|
import { animations as rn } from "@formkit/drag-and-drop";
|
|
9
|
-
import { $ as sn, a as
|
|
9
|
+
import { $ as sn, a as Ve, b as he } from "./DateFormatter-2B0R-DY4.mjs";
|
|
10
10
|
function Ce(e, o) {
|
|
11
11
|
return typeof e == "function" ? e(o) : e;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function ge(e, o) {
|
|
14
14
|
return (t) => {
|
|
15
15
|
o.setState((n) => ({
|
|
16
16
|
...n,
|
|
@@ -131,7 +131,7 @@ function gn(e, o, t, n) {
|
|
|
131
131
|
m.createColumn == null || m.createColumn(y, e);
|
|
132
132
|
return y;
|
|
133
133
|
}
|
|
134
|
-
const
|
|
134
|
+
const se = "debugHeaders";
|
|
135
135
|
function ft(e, o, t) {
|
|
136
136
|
var n;
|
|
137
137
|
let s = {
|
|
@@ -167,27 +167,27 @@ const pn = {
|
|
|
167
167
|
var s, a;
|
|
168
168
|
const d = (s = n?.map((y) => t.find((m) => m.id === y)).filter(Boolean)) != null ? s : [], u = (a = l?.map((y) => t.find((m) => m.id === y)).filter(Boolean)) != null ? a : [], f = t.filter((y) => !(n != null && n.includes(y.id)) && !(l != null && l.includes(y.id)));
|
|
169
169
|
return Ae(o, [...d, ...f, ...u], e);
|
|
170
|
-
}, G(e.options,
|
|
170
|
+
}, G(e.options, se, "getHeaderGroups")), e.getCenterHeaderGroups = H(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, l) => (t = t.filter((s) => !(n != null && n.includes(s.id)) && !(l != null && l.includes(s.id))), Ae(o, t, e, "center")), G(e.options, se, "getCenterHeaderGroups")), e.getLeftHeaderGroups = H(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
|
|
171
171
|
var l;
|
|
172
172
|
const s = (l = n?.map((a) => t.find((d) => d.id === a)).filter(Boolean)) != null ? l : [];
|
|
173
173
|
return Ae(o, s, e, "left");
|
|
174
|
-
}, G(e.options,
|
|
174
|
+
}, G(e.options, se, "getLeftHeaderGroups")), e.getRightHeaderGroups = H(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
|
|
175
175
|
var l;
|
|
176
176
|
const s = (l = n?.map((a) => t.find((d) => d.id === a)).filter(Boolean)) != null ? l : [];
|
|
177
177
|
return Ae(o, s, e, "right");
|
|
178
|
-
}, G(e.options,
|
|
178
|
+
}, G(e.options, se, "getRightHeaderGroups")), e.getFooterGroups = H(() => [e.getHeaderGroups()], (o) => [...o].reverse(), G(e.options, se, "getFooterGroups")), e.getLeftFooterGroups = H(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), G(e.options, se, "getLeftFooterGroups")), e.getCenterFooterGroups = H(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), G(e.options, se, "getCenterFooterGroups")), e.getRightFooterGroups = H(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), G(e.options, se, "getRightFooterGroups")), e.getFlatHeaders = H(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), G(e.options, se, "getFlatHeaders")), e.getLeftFlatHeaders = H(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), G(e.options, se, "getLeftFlatHeaders")), e.getCenterFlatHeaders = H(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), G(e.options, se, "getCenterFlatHeaders")), e.getRightFlatHeaders = H(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), G(e.options, se, "getRightFlatHeaders")), e.getCenterLeafHeaders = H(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
|
|
179
179
|
var n;
|
|
180
180
|
return !((n = t.subHeaders) != null && n.length);
|
|
181
|
-
}), G(e.options,
|
|
181
|
+
}), G(e.options, se, "getCenterLeafHeaders")), e.getLeftLeafHeaders = H(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
|
|
182
182
|
var n;
|
|
183
183
|
return !((n = t.subHeaders) != null && n.length);
|
|
184
|
-
}), G(e.options,
|
|
184
|
+
}), G(e.options, se, "getLeftLeafHeaders")), e.getRightLeafHeaders = H(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
|
|
185
185
|
var n;
|
|
186
186
|
return !((n = t.subHeaders) != null && n.length);
|
|
187
|
-
}), G(e.options,
|
|
187
|
+
}), G(e.options, se, "getRightLeafHeaders")), e.getLeafHeaders = H(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
|
|
188
188
|
var l, s, a, d, u, f;
|
|
189
189
|
return [...(l = (s = o[0]) == null ? void 0 : s.headers) != null ? l : [], ...(a = (d = t[0]) == null ? void 0 : d.headers) != null ? a : [], ...(u = (f = n[0]) == null ? void 0 : f.headers) != null ? u : []].map((w) => w.getLeafHeaders()).flat();
|
|
190
|
-
}, G(e.options,
|
|
190
|
+
}, G(e.options, se, "getLeafHeaders"));
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
193
|
function Ae(e, o, t, n) {
|
|
@@ -208,15 +208,15 @@ function Ae(e, o, t, n) {
|
|
|
208
208
|
headers: []
|
|
209
209
|
}, g = [];
|
|
210
210
|
m.forEach((_) => {
|
|
211
|
-
const c = [...g].reverse()[0],
|
|
212
|
-
let b,
|
|
213
|
-
if (
|
|
211
|
+
const c = [...g].reverse()[0], V = _.column.depth === C.depth;
|
|
212
|
+
let b, h = !1;
|
|
213
|
+
if (V && _.column.parent ? b = _.column.parent : (b = _.column, h = !0), c && c?.column === b)
|
|
214
214
|
c.subHeaders.push(_);
|
|
215
215
|
else {
|
|
216
216
|
const M = ft(t, b, {
|
|
217
217
|
id: [n, p, b.id, _?.id].filter(Boolean).join("_"),
|
|
218
|
-
isPlaceholder:
|
|
219
|
-
placeholderId:
|
|
218
|
+
isPlaceholder: h,
|
|
219
|
+
placeholderId: h ? `${g.filter((I) => I.column === b).length}` : void 0,
|
|
220
220
|
depth: p,
|
|
221
221
|
index: g.length
|
|
222
222
|
});
|
|
@@ -233,13 +233,13 @@ function Ae(e, o, t, n) {
|
|
|
233
233
|
let g = 0, _ = 0, c = [0];
|
|
234
234
|
C.subHeaders && C.subHeaders.length ? (c = [], y(C.subHeaders).forEach((b) => {
|
|
235
235
|
let {
|
|
236
|
-
colSpan:
|
|
236
|
+
colSpan: h,
|
|
237
237
|
rowSpan: M
|
|
238
238
|
} = b;
|
|
239
|
-
g +=
|
|
239
|
+
g += h, c.push(M);
|
|
240
240
|
})) : g = 1;
|
|
241
|
-
const
|
|
242
|
-
return _ = _ +
|
|
241
|
+
const V = Math.min(...c);
|
|
242
|
+
return _ = _ + V, C.colSpan = g, C.rowSpan = _, {
|
|
243
243
|
colSpan: g,
|
|
244
244
|
rowSpan: _
|
|
245
245
|
};
|
|
@@ -311,16 +311,16 @@ const Dt = (e, o, t) => {
|
|
|
311
311
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
312
312
|
};
|
|
313
313
|
Dt.autoRemove = (e) => ce(e);
|
|
314
|
-
const
|
|
314
|
+
const Ft = (e, o, t) => {
|
|
315
315
|
var n;
|
|
316
316
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === t?.toLowerCase();
|
|
317
317
|
};
|
|
318
|
-
|
|
319
|
-
const
|
|
318
|
+
Ft.autoRemove = (e) => ce(e);
|
|
319
|
+
const Vt = (e, o, t) => {
|
|
320
320
|
var n;
|
|
321
321
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
322
322
|
};
|
|
323
|
-
|
|
323
|
+
Vt.autoRemove = (e) => ce(e);
|
|
324
324
|
const ht = (e, o, t) => !t.some((n) => {
|
|
325
325
|
var l;
|
|
326
326
|
return !((l = e.getValue(o)) != null && l.includes(n));
|
|
@@ -352,8 +352,8 @@ ut.autoRemove = (e) => ce(e) || ce(e[0]) && ce(e[1]);
|
|
|
352
352
|
const me = {
|
|
353
353
|
includesString: bt,
|
|
354
354
|
includesStringSensitive: Dt,
|
|
355
|
-
equalsString:
|
|
356
|
-
arrIncludes:
|
|
355
|
+
equalsString: Ft,
|
|
356
|
+
arrIncludes: Vt,
|
|
357
357
|
arrIncludesAll: ht,
|
|
358
358
|
arrIncludesSome: $t,
|
|
359
359
|
equals: Mt,
|
|
@@ -372,7 +372,7 @@ const fn = {
|
|
|
372
372
|
...e
|
|
373
373
|
}),
|
|
374
374
|
getDefaultOptions: (e) => ({
|
|
375
|
-
onColumnFiltersChange:
|
|
375
|
+
onColumnFiltersChange: ge("columnFilters", e),
|
|
376
376
|
filterFromLeafRows: !1,
|
|
377
377
|
maxLeafRowFilterDepth: 100
|
|
378
378
|
}),
|
|
@@ -501,7 +501,7 @@ const mn = (e, o, t) => t.reduce((n, l) => {
|
|
|
501
501
|
...e
|
|
502
502
|
}),
|
|
503
503
|
getDefaultOptions: (e) => ({
|
|
504
|
-
onGroupingChange:
|
|
504
|
+
onGroupingChange: ge("grouping", e),
|
|
505
505
|
groupedColumnMode: "reorder"
|
|
506
506
|
}),
|
|
507
507
|
createColumn: (e, o) => {
|
|
@@ -561,13 +561,13 @@ function Dn(e, o, t) {
|
|
|
561
561
|
const n = e.filter((s) => !o.includes(s.id));
|
|
562
562
|
return t === "remove" ? n : [...o.map((s) => e.find((a) => a.id === s)).filter(Boolean), ...n];
|
|
563
563
|
}
|
|
564
|
-
const
|
|
564
|
+
const Fn = {
|
|
565
565
|
getInitialState: (e) => ({
|
|
566
566
|
columnOrder: [],
|
|
567
567
|
...e
|
|
568
568
|
}),
|
|
569
569
|
getDefaultOptions: (e) => ({
|
|
570
|
-
onColumnOrderChange:
|
|
570
|
+
onColumnOrderChange: ge("columnOrder", e)
|
|
571
571
|
}),
|
|
572
572
|
createColumn: (e, o) => {
|
|
573
573
|
e.getIndex = H((t) => [Ie(o, t)], (t) => t.findIndex((n) => n.id === e.id), G(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
@@ -601,13 +601,13 @@ const Vn = {
|
|
|
601
601
|
}, qe = () => ({
|
|
602
602
|
left: [],
|
|
603
603
|
right: []
|
|
604
|
-
}),
|
|
604
|
+
}), Vn = {
|
|
605
605
|
getInitialState: (e) => ({
|
|
606
606
|
columnPinning: qe(),
|
|
607
607
|
...e
|
|
608
608
|
}),
|
|
609
609
|
getDefaultOptions: (e) => ({
|
|
610
|
-
onColumnPinningChange:
|
|
610
|
+
onColumnPinningChange: ge("columnPinning", e)
|
|
611
611
|
}),
|
|
612
612
|
createColumn: (e, o) => {
|
|
613
613
|
e.pin = (t) => {
|
|
@@ -702,8 +702,8 @@ const Te = {
|
|
|
702
702
|
getDefaultOptions: (e) => ({
|
|
703
703
|
columnResizeMode: "onEnd",
|
|
704
704
|
columnResizeDirection: "ltr",
|
|
705
|
-
onColumnSizingChange:
|
|
706
|
-
onColumnSizingInfoChange:
|
|
705
|
+
onColumnSizingChange: ge("columnSizing", e),
|
|
706
|
+
onColumnSizingInfoChange: ge("columnSizingInfo", e)
|
|
707
707
|
}),
|
|
708
708
|
createColumn: (e, o) => {
|
|
709
709
|
e.getSize = () => {
|
|
@@ -746,25 +746,25 @@ const Te = {
|
|
|
746
746
|
return (s) => {
|
|
747
747
|
if (!n || !l || (s.persist == null || s.persist(), Ke(s) && s.touches && s.touches.length > 1))
|
|
748
748
|
return;
|
|
749
|
-
const a = e.getSize(), d = e ? e.getLeafHeaders().map((c) => [c.column.id, c.column.getSize()]) : [[n.id, n.getSize()]], u = Ke(s) ? Math.round(s.touches[0].clientX) : s.clientX, f = {}, w = (c,
|
|
750
|
-
typeof
|
|
751
|
-
var
|
|
752
|
-
const I = o.options.columnResizeDirection === "rtl" ? -1 : 1, O = (
|
|
753
|
-
return b.columnSizingStart.forEach((
|
|
754
|
-
let [
|
|
755
|
-
f[
|
|
749
|
+
const a = e.getSize(), d = e ? e.getLeafHeaders().map((c) => [c.column.id, c.column.getSize()]) : [[n.id, n.getSize()]], u = Ke(s) ? Math.round(s.touches[0].clientX) : s.clientX, f = {}, w = (c, V) => {
|
|
750
|
+
typeof V == "number" && (o.setColumnSizingInfo((b) => {
|
|
751
|
+
var h, M;
|
|
752
|
+
const I = o.options.columnResizeDirection === "rtl" ? -1 : 1, O = (V - ((h = b?.startOffset) != null ? h : 0)) * I, q = Math.max(O / ((M = b?.startSize) != null ? M : 0), -0.999999);
|
|
753
|
+
return b.columnSizingStart.forEach((J) => {
|
|
754
|
+
let [Z, le] = J;
|
|
755
|
+
f[Z] = Math.round(Math.max(le + le * q, 0) * 100) / 100;
|
|
756
756
|
}), {
|
|
757
757
|
...b,
|
|
758
758
|
deltaOffset: O,
|
|
759
|
-
deltaPercentage:
|
|
759
|
+
deltaPercentage: q
|
|
760
760
|
};
|
|
761
761
|
}), (o.options.columnResizeMode === "onChange" || c === "end") && o.setColumnSizing((b) => ({
|
|
762
762
|
...b,
|
|
763
763
|
...f
|
|
764
764
|
})));
|
|
765
765
|
}, y = (c) => w("move", c), m = (c) => {
|
|
766
|
-
w("end", c), o.setColumnSizingInfo((
|
|
767
|
-
...
|
|
766
|
+
w("end", c), o.setColumnSizingInfo((V) => ({
|
|
767
|
+
...V,
|
|
768
768
|
isResizingColumn: !1,
|
|
769
769
|
startOffset: null,
|
|
770
770
|
startSize: null,
|
|
@@ -780,8 +780,8 @@ const Te = {
|
|
|
780
780
|
}, g = {
|
|
781
781
|
moveHandler: (c) => (c.cancelable && (c.preventDefault(), c.stopPropagation()), y(c.touches[0].clientX), !1),
|
|
782
782
|
upHandler: (c) => {
|
|
783
|
-
var
|
|
784
|
-
p?.removeEventListener("touchmove", g.moveHandler), p?.removeEventListener("touchend", g.upHandler), c.cancelable && (c.preventDefault(), c.stopPropagation()), m((
|
|
783
|
+
var V;
|
|
784
|
+
p?.removeEventListener("touchmove", g.moveHandler), p?.removeEventListener("touchend", g.upHandler), c.cancelable && (c.preventDefault(), c.stopPropagation()), m((V = c.touches[0]) == null ? void 0 : V.clientX);
|
|
785
785
|
}
|
|
786
786
|
}, _ = Mn() ? {
|
|
787
787
|
passive: !1
|
|
@@ -846,7 +846,7 @@ const In = {
|
|
|
846
846
|
...e
|
|
847
847
|
}),
|
|
848
848
|
getDefaultOptions: (e) => ({
|
|
849
|
-
onColumnVisibilityChange:
|
|
849
|
+
onColumnVisibilityChange: ge("columnVisibility", e)
|
|
850
850
|
}),
|
|
851
851
|
createColumn: (e, o) => {
|
|
852
852
|
e.toggleVisibility = (t) => {
|
|
@@ -901,7 +901,7 @@ const Pn = {
|
|
|
901
901
|
...e
|
|
902
902
|
}),
|
|
903
903
|
getDefaultOptions: (e) => ({
|
|
904
|
-
onGlobalFilterChange:
|
|
904
|
+
onGlobalFilterChange: ge("globalFilter", e),
|
|
905
905
|
globalFilterFn: "auto",
|
|
906
906
|
getColumnCanGlobalFilter: (o) => {
|
|
907
907
|
var t;
|
|
@@ -934,7 +934,7 @@ const Pn = {
|
|
|
934
934
|
...e
|
|
935
935
|
}),
|
|
936
936
|
getDefaultOptions: (e) => ({
|
|
937
|
-
onExpandedChange:
|
|
937
|
+
onExpandedChange: ge("expanded", e),
|
|
938
938
|
paginateExpandedRows: !0
|
|
939
939
|
}),
|
|
940
940
|
createTable: (e) => {
|
|
@@ -1027,7 +1027,7 @@ const Pn = {
|
|
|
1027
1027
|
}
|
|
1028
1028
|
}),
|
|
1029
1029
|
getDefaultOptions: (e) => ({
|
|
1030
|
-
onPaginationChange:
|
|
1030
|
+
onPaginationChange: ge("pagination", e)
|
|
1031
1031
|
}),
|
|
1032
1032
|
createTable: (e) => {
|
|
1033
1033
|
let o = !1, t = !1;
|
|
@@ -1107,7 +1107,7 @@ const Pn = {
|
|
|
1107
1107
|
...e
|
|
1108
1108
|
}),
|
|
1109
1109
|
getDefaultOptions: (e) => ({
|
|
1110
|
-
onRowPinningChange:
|
|
1110
|
+
onRowPinningChange: ge("rowPinning", e)
|
|
1111
1111
|
}),
|
|
1112
1112
|
createRow: (e, o) => {
|
|
1113
1113
|
e.pin = (t, n, l) => {
|
|
@@ -1208,7 +1208,7 @@ const Pn = {
|
|
|
1208
1208
|
...e
|
|
1209
1209
|
}),
|
|
1210
1210
|
getDefaultOptions: (e) => ({
|
|
1211
|
-
onRowSelectionChange:
|
|
1211
|
+
onRowSelectionChange: ge("rowSelection", e),
|
|
1212
1212
|
enableRowSelection: !0,
|
|
1213
1213
|
enableMultiRowSelection: !0,
|
|
1214
1214
|
enableSubRowSelection: !0
|
|
@@ -1405,7 +1405,7 @@ const $e = {
|
|
|
1405
1405
|
sortUndefined: 1
|
|
1406
1406
|
}),
|
|
1407
1407
|
getDefaultOptions: (e) => ({
|
|
1408
|
-
onSortingChange:
|
|
1408
|
+
onSortingChange: ge("sorting", e),
|
|
1409
1409
|
isMultiSortEvent: (o) => o.shiftKey
|
|
1410
1410
|
}),
|
|
1411
1411
|
createColumn: (e, o) => {
|
|
@@ -1487,8 +1487,8 @@ const $e = {
|
|
|
1487
1487
|
}, jn = [
|
|
1488
1488
|
pn,
|
|
1489
1489
|
In,
|
|
1490
|
-
Vn,
|
|
1491
1490
|
Fn,
|
|
1491
|
+
Vn,
|
|
1492
1492
|
cn,
|
|
1493
1493
|
fn,
|
|
1494
1494
|
Pn,
|
|
@@ -1587,8 +1587,8 @@ function qn(e) {
|
|
|
1587
1587
|
getAllColumns: H(() => [l._getColumnDefs()], (m) => {
|
|
1588
1588
|
const p = function(C, g, _) {
|
|
1589
1589
|
return _ === void 0 && (_ = 0), C.map((c) => {
|
|
1590
|
-
const
|
|
1591
|
-
return
|
|
1590
|
+
const V = gn(l, c, _, g), b = c;
|
|
1591
|
+
return V.columns = b.columns ? p(b.columns, V, _ + 1) : [], V;
|
|
1592
1592
|
});
|
|
1593
1593
|
};
|
|
1594
1594
|
return p(m);
|
|
@@ -1824,17 +1824,17 @@ function eo() {
|
|
|
1824
1824
|
for (let p = 0; p < s.length; p += 1) {
|
|
1825
1825
|
var m;
|
|
1826
1826
|
const C = s[p], g = a[C.id], _ = g.sortUndefined, c = (m = C?.desc) != null ? m : !1;
|
|
1827
|
-
let
|
|
1827
|
+
let V = 0;
|
|
1828
1828
|
if (_) {
|
|
1829
|
-
const b = w.getValue(C.id),
|
|
1829
|
+
const b = w.getValue(C.id), h = y.getValue(C.id), M = b === void 0, I = h === void 0;
|
|
1830
1830
|
if (M || I) {
|
|
1831
1831
|
if (_ === "first") return M ? -1 : 1;
|
|
1832
1832
|
if (_ === "last") return M ? 1 : -1;
|
|
1833
|
-
|
|
1833
|
+
V = M && I ? 0 : M ? _ : -_;
|
|
1834
1834
|
}
|
|
1835
1835
|
}
|
|
1836
|
-
if (
|
|
1837
|
-
return c && (
|
|
1836
|
+
if (V === 0 && (V = g.sortingFn(w, y, C.id)), V !== 0)
|
|
1837
|
+
return c && (V *= -1), g.invertSorting && (V *= -1), V;
|
|
1838
1838
|
}
|
|
1839
1839
|
return w.index - y.index;
|
|
1840
1840
|
}), f.forEach((w) => {
|
|
@@ -1901,13 +1901,13 @@ function Me() {
|
|
|
1901
1901
|
}
|
|
1902
1902
|
}, no);
|
|
1903
1903
|
}
|
|
1904
|
-
const vt =
|
|
1904
|
+
const vt = ne({
|
|
1905
1905
|
props: ["render", "props"],
|
|
1906
|
-
setup: (e) => () => typeof e.render == "function" || typeof e.render == "object" ?
|
|
1906
|
+
setup: (e) => () => typeof e.render == "function" || typeof e.render == "object" ? Q(e.render, e.props) : e.render
|
|
1907
1907
|
});
|
|
1908
1908
|
function _t(e) {
|
|
1909
1909
|
return Me(e, {
|
|
1910
|
-
data:
|
|
1910
|
+
data: F(e.data)
|
|
1911
1911
|
});
|
|
1912
1912
|
}
|
|
1913
1913
|
function oo(e) {
|
|
@@ -1936,7 +1936,7 @@ function oo(e) {
|
|
|
1936
1936
|
immediate: !0
|
|
1937
1937
|
});
|
|
1938
1938
|
}
|
|
1939
|
-
const l =
|
|
1939
|
+
const l = T(n.initialState);
|
|
1940
1940
|
return St(() => {
|
|
1941
1941
|
n.setOptions((s) => {
|
|
1942
1942
|
var a;
|
|
@@ -1960,17 +1960,17 @@ function oo(e) {
|
|
|
1960
1960
|
const lo = {
|
|
1961
1961
|
key: 0,
|
|
1962
1962
|
class: "flex flex-wrap items-center justify-between w-full gap-4 pl-2"
|
|
1963
|
-
}, ro = { class: "flex-1 text-sm text-muted-foreground whitespace-nowrap" }, so = { class: "flex items-center space-x-4 @2xl:space-x-8" }, io = { class: "items-center space-x-2 hidden @xl:flex" }, ao = { class: "flex w-[100px] items-center justify-start text-sm font-medium" }, uo = { class: "flex items-center gap-x-2" }, go = { class: "w-full items-center space-x-2 flex @xl:hidden pl-2" }, po = /* @__PURE__ */
|
|
1963
|
+
}, ro = { class: "flex-1 text-sm text-muted-foreground whitespace-nowrap" }, so = { class: "flex items-center space-x-4 @2xl:space-x-8" }, io = { class: "items-center space-x-2 hidden @xl:flex" }, ao = { class: "flex w-[100px] items-center justify-start text-sm font-medium" }, uo = { class: "flex items-center gap-x-2" }, go = { class: "w-full items-center space-x-2 flex @xl:hidden pl-2" }, po = /* @__PURE__ */ ne({
|
|
1964
1964
|
__name: "DataTablePagination",
|
|
1965
1965
|
props: {
|
|
1966
1966
|
table: {}
|
|
1967
1967
|
},
|
|
1968
1968
|
setup(e) {
|
|
1969
|
-
const o =
|
|
1969
|
+
const o = K("sortMode");
|
|
1970
1970
|
return (t, n) => {
|
|
1971
1971
|
const l = v("SelectValue"), s = v("SelectTrigger"), a = v("SelectItem"), d = v("SelectContent"), u = v("Select"), f = v("Button");
|
|
1972
1972
|
return R(), k(U, null, [
|
|
1973
|
-
|
|
1973
|
+
F(o) ? Y("", !0) : (R(), k("div", lo, [
|
|
1974
1974
|
D("div", ro, z(e.table.getFilteredSelectedRowModel().rows.length) + " of " + z(e.table.getFilteredRowModel().rows.length) + " row(s) selected. ", 1),
|
|
1975
1975
|
D("div", so, [
|
|
1976
1976
|
D("div", io, [
|
|
@@ -1990,7 +1990,7 @@ const lo = {
|
|
|
1990
1990
|
}),
|
|
1991
1991
|
r(d, { side: "top" }, {
|
|
1992
1992
|
default: i(() => [
|
|
1993
|
-
(R(), k(U, null,
|
|
1993
|
+
(R(), k(U, null, te([10, 20, 30, 40, 50], (w) => r(a, {
|
|
1994
1994
|
key: w,
|
|
1995
1995
|
value: `${w}`
|
|
1996
1996
|
}, {
|
|
@@ -2016,7 +2016,7 @@ const lo = {
|
|
|
2016
2016
|
}, {
|
|
2017
2017
|
default: i(() => [
|
|
2018
2018
|
n[5] || (n[5] = D("span", { class: "sr-only" }, "Go to first page", -1)),
|
|
2019
|
-
r(
|
|
2019
|
+
r(F(jt), { class: "size-4" })
|
|
2020
2020
|
]),
|
|
2021
2021
|
_: 1
|
|
2022
2022
|
}, 8, ["disabled"]),
|
|
@@ -2028,7 +2028,7 @@ const lo = {
|
|
|
2028
2028
|
}, {
|
|
2029
2029
|
default: i(() => [
|
|
2030
2030
|
n[6] || (n[6] = D("span", { class: "sr-only" }, "Go to previous page", -1)),
|
|
2031
|
-
r(
|
|
2031
|
+
r(F(qt), { class: "size-4" })
|
|
2032
2032
|
]),
|
|
2033
2033
|
_: 1
|
|
2034
2034
|
}, 8, ["disabled"]),
|
|
@@ -2040,7 +2040,7 @@ const lo = {
|
|
|
2040
2040
|
}, {
|
|
2041
2041
|
default: i(() => [
|
|
2042
2042
|
n[7] || (n[7] = D("span", { class: "sr-only" }, "Go to next page", -1)),
|
|
2043
|
-
r(
|
|
2043
|
+
r(F(yt), { class: "size-4" })
|
|
2044
2044
|
]),
|
|
2045
2045
|
_: 1
|
|
2046
2046
|
}, 8, ["disabled"]),
|
|
@@ -2052,7 +2052,7 @@ const lo = {
|
|
|
2052
2052
|
}, {
|
|
2053
2053
|
default: i(() => [
|
|
2054
2054
|
n[8] || (n[8] = D("span", { class: "sr-only" }, "Go to last page", -1)),
|
|
2055
|
-
r(
|
|
2055
|
+
r(F(Yt), { class: "size-4" })
|
|
2056
2056
|
]),
|
|
2057
2057
|
_: 1
|
|
2058
2058
|
}, 8, ["disabled"])
|
|
@@ -2076,7 +2076,7 @@ const lo = {
|
|
|
2076
2076
|
}),
|
|
2077
2077
|
r(d, { side: "top" }, {
|
|
2078
2078
|
default: i(() => [
|
|
2079
|
-
(R(), k(U, null,
|
|
2079
|
+
(R(), k(U, null, te([10, 20, 30, 40, 50], (w) => r(a, {
|
|
2080
2080
|
key: w,
|
|
2081
2081
|
value: `${w}`
|
|
2082
2082
|
}, {
|
|
@@ -2098,7 +2098,7 @@ const lo = {
|
|
|
2098
2098
|
}), co = { class: "w-full" }, fo = { class: "grid gap-2 mb-4" }, mo = {
|
|
2099
2099
|
key: 0,
|
|
2100
2100
|
class: "mt-4"
|
|
2101
|
-
}, vo = { class: "my-4" }, _o = { class: "flex items-center justify-between gap-2" }, Co = /* @__PURE__ */
|
|
2101
|
+
}, vo = { class: "my-4" }, _o = { class: "flex items-center justify-between gap-2" }, Co = /* @__PURE__ */ ne({
|
|
2102
2102
|
__name: "TableRowEditor",
|
|
2103
2103
|
props: {
|
|
2104
2104
|
modelValue: {
|
|
@@ -2108,7 +2108,7 @@ const lo = {
|
|
|
2108
2108
|
},
|
|
2109
2109
|
emits: ["update:modelValue"],
|
|
2110
2110
|
setup(e, { emit: o }) {
|
|
2111
|
-
const t = e, n =
|
|
2111
|
+
const t = e, n = K("allAvailableVariables", []), l = o, s = be({
|
|
2112
2112
|
get: () => t.modelValue,
|
|
2113
2113
|
set: (a) => {
|
|
2114
2114
|
l("update:modelValue", a);
|
|
@@ -2167,7 +2167,7 @@ const lo = {
|
|
|
2167
2167
|
r(C, {
|
|
2168
2168
|
modelValue: s.value.data.returnValueFn,
|
|
2169
2169
|
"onUpdate:modelValue": d[1] || (d[1] = (_) => s.value.data.returnValueFn = _),
|
|
2170
|
-
variables:
|
|
2170
|
+
variables: F(n),
|
|
2171
2171
|
placeholder: "return ...",
|
|
2172
2172
|
class: "mb-1"
|
|
2173
2173
|
}, null, 8, ["modelValue", "variables"]),
|
|
@@ -2181,7 +2181,7 @@ const lo = {
|
|
|
2181
2181
|
r(C, {
|
|
2182
2182
|
modelValue: s.value.data.returnValueFn,
|
|
2183
2183
|
"onUpdate:modelValue": d[2] || (d[2] = (_) => s.value.data.returnValueFn = _),
|
|
2184
|
-
variables:
|
|
2184
|
+
variables: F(n),
|
|
2185
2185
|
placeholder: "return ...",
|
|
2186
2186
|
class: "mb-1"
|
|
2187
2187
|
}, null, 8, ["modelValue", "variables"]),
|
|
@@ -2202,7 +2202,7 @@ const lo = {
|
|
|
2202
2202
|
id: "return-data"
|
|
2203
2203
|
}, null, 8, ["modelValue"])
|
|
2204
2204
|
])
|
|
2205
|
-
], 64)) :
|
|
2205
|
+
], 64)) : Y("", !0)
|
|
2206
2206
|
]);
|
|
2207
2207
|
};
|
|
2208
2208
|
}
|
|
@@ -2213,31 +2213,31 @@ const lo = {
|
|
|
2213
2213
|
__name: "TableRowNode",
|
|
2214
2214
|
props: nn,
|
|
2215
2215
|
setup(e) {
|
|
2216
|
-
return (o, t) => (R(), B(
|
|
2216
|
+
return (o, t) => (R(), B(F(on), {
|
|
2217
2217
|
nodeId: o.id,
|
|
2218
2218
|
toolbarVisible: o.data.toolbarVisible,
|
|
2219
2219
|
toolbarPosition: o.data.toolbarPosition
|
|
2220
2220
|
}, {
|
|
2221
2221
|
default: i(() => [
|
|
2222
|
-
r(
|
|
2222
|
+
r(F(pt), {
|
|
2223
2223
|
type: "target",
|
|
2224
|
-
position:
|
|
2224
|
+
position: F(ct).Left
|
|
2225
2225
|
}, null, 8, ["position"]),
|
|
2226
2226
|
D("div", So, [
|
|
2227
2227
|
D("div", {
|
|
2228
|
-
class:
|
|
2228
|
+
class: ie(["size-8 text-white rounded-xl flex items-center justify-center", `${o.data.method ? "bg-blue-500" : "bg-gray-600 opacity-50"}`])
|
|
2229
2229
|
}, [
|
|
2230
|
-
r(
|
|
2230
|
+
r(F(Rt), { class: "size-5" })
|
|
2231
2231
|
], 2),
|
|
2232
2232
|
D("div", null, [
|
|
2233
2233
|
o.data.method === "CREATE" ? (R(), k("span", wo, "Table: Create row")) : o.data.method === "UPDATE" ? (R(), k("span", xo, "Table: Update row")) : o.data.method === "REMOVE" ? (R(), k("span", yo, "Table: Remove row")) : (R(), k("span", Ro, "Select a table method"))
|
|
2234
2234
|
])
|
|
2235
2235
|
]),
|
|
2236
|
-
r(
|
|
2237
|
-
r(
|
|
2236
|
+
r(F(ln), { nodeId: o.id }, null, 8, ["nodeId"]),
|
|
2237
|
+
r(F(pt), {
|
|
2238
2238
|
type: "source",
|
|
2239
2239
|
id: "success",
|
|
2240
|
-
position:
|
|
2240
|
+
position: F(ct).Right
|
|
2241
2241
|
}, null, 8, ["position"])
|
|
2242
2242
|
]),
|
|
2243
2243
|
_: 1
|
|
@@ -2279,14 +2279,14 @@ const Do = (e, o = {}) => {
|
|
|
2279
2279
|
document.body.appendChild(t);
|
|
2280
2280
|
var n = t.contentWindow.Function;
|
|
2281
2281
|
return document.body.removeChild(t), n(...Object.keys(o), "'use strict';" + e)(...Object.values(o));
|
|
2282
|
-
}, Ct = /* @__PURE__ */
|
|
2282
|
+
}, Ct = /* @__PURE__ */ ne({
|
|
2283
2283
|
__name: "DataTableAction",
|
|
2284
2284
|
props: {
|
|
2285
2285
|
action: {},
|
|
2286
2286
|
row: {}
|
|
2287
2287
|
},
|
|
2288
2288
|
setup(e) {
|
|
2289
|
-
const o = e, t =
|
|
2289
|
+
const o = e, t = K("data"), n = K("isPerformingDataTableAction", T(!1)), { runFlow: l } = wt(), s = be(() => [!0, "true"].includes(tn(o.action.visible, [
|
|
2290
2290
|
{
|
|
2291
2291
|
name: "item",
|
|
2292
2292
|
value: {
|
|
@@ -2336,12 +2336,12 @@ const Do = (e, o = {}) => {
|
|
|
2336
2336
|
variant: "ghost",
|
|
2337
2337
|
size: "icon",
|
|
2338
2338
|
onClick: u[0] || (u[0] = ze((p) => a(), ["stop"])),
|
|
2339
|
-
class:
|
|
2339
|
+
class: ie(["size-5", { "opacity-50": F(n) }]),
|
|
2340
2340
|
"data-title": e.action.label,
|
|
2341
|
-
disabled:
|
|
2341
|
+
disabled: F(n)
|
|
2342
2342
|
}, {
|
|
2343
2343
|
default: i(() => [
|
|
2344
|
-
(R(), B(rt(
|
|
2344
|
+
(R(), B(rt(F(st)[e.action.icon])))
|
|
2345
2345
|
]),
|
|
2346
2346
|
_: 1
|
|
2347
2347
|
}, 8, ["data-title", "disabled", "class"])
|
|
@@ -2356,16 +2356,16 @@ const Do = (e, o = {}) => {
|
|
|
2356
2356
|
})
|
|
2357
2357
|
]),
|
|
2358
2358
|
_: 1
|
|
2359
|
-
})) :
|
|
2359
|
+
})) : Y("", !0);
|
|
2360
2360
|
};
|
|
2361
2361
|
}
|
|
2362
|
-
}),
|
|
2362
|
+
}), Fo = { class: "mx-auto w-full max-w-sm mt-8 px-4 overflow-y-auto" }, Vo = {
|
|
2363
2363
|
key: 0,
|
|
2364
2364
|
class: "flex flex-col gap-1.5 mb-6 px-1"
|
|
2365
|
-
}, ho = { class: "text-muted-foreground text-sm shrink-0" }, $o = ["src", "alt"], Mo = { class: "text-muted-foreground text-sm shrink-0" }, Io = ["href"], Po = { class: "text-muted-foreground text-sm shrink-0" }, ko = ["href"], Ao = { class: "text-muted-foreground text-sm shrink-0" }, To = ["href"], Eo = { class: "text-muted-foreground text-sm shrink-0" }, Lo = { class: "text-sm" }, zo = { class: "w-full flex flex-col gap-2 mb-4" }, Ho = ["innerHTML"], Go = /* @__PURE__ */
|
|
2365
|
+
}, ho = { class: "text-muted-foreground text-sm shrink-0" }, $o = ["src", "alt"], Mo = { class: "text-muted-foreground text-sm shrink-0" }, Io = ["href"], Po = { class: "text-muted-foreground text-sm shrink-0" }, ko = ["href"], Ao = { class: "text-muted-foreground text-sm shrink-0" }, To = ["href"], Eo = { class: "text-muted-foreground text-sm shrink-0" }, Lo = { class: "text-sm" }, zo = { class: "w-full flex flex-col gap-2 mb-4" }, Ho = ["innerHTML"], Go = /* @__PURE__ */ ne({
|
|
2366
2366
|
__name: "DataTableMobileRowActionDrawer",
|
|
2367
2367
|
setup(e, { expose: o }) {
|
|
2368
|
-
const { formatCurrency: t } = xt(), n =
|
|
2368
|
+
const { formatCurrency: t } = xt(), n = K("columns", T([])), l = T(!1), s = T([]), a = T(null), d = be(() => n.value?.filter((m) => m.visible) || []), u = (m, p) => {
|
|
2369
2369
|
if (m)
|
|
2370
2370
|
return p.includes(".") ? p.split(".").reduce((C, g) => C?.[g], m) : m[p];
|
|
2371
2371
|
}, f = (m, p) => {
|
|
@@ -2411,62 +2411,62 @@ const Do = (e, o = {}) => {
|
|
|
2411
2411
|
const C = v("Button"), g = v("DrawerClose"), _ = v("DrawerContent"), c = v("Drawer");
|
|
2412
2412
|
return R(), B(c, {
|
|
2413
2413
|
open: l.value,
|
|
2414
|
-
"onUpdate:open": p[0] || (p[0] = (
|
|
2414
|
+
"onUpdate:open": p[0] || (p[0] = (V) => l.value = V)
|
|
2415
2415
|
}, {
|
|
2416
2416
|
default: i(() => [
|
|
2417
2417
|
r(_, null, {
|
|
2418
2418
|
default: i(() => [
|
|
2419
|
-
D("div",
|
|
2420
|
-
a.value && d.value.length > 0 ? (R(), k("div",
|
|
2421
|
-
(R(!0), k(U, null,
|
|
2422
|
-
key:
|
|
2419
|
+
D("div", Fo, [
|
|
2420
|
+
a.value && d.value.length > 0 ? (R(), k("div", Vo, [
|
|
2421
|
+
(R(!0), k(U, null, te(d.value, (V) => (R(), k("div", {
|
|
2422
|
+
key: V.id,
|
|
2423
2423
|
class: "flex items-start gap-2 min-w-0"
|
|
2424
2424
|
}, [
|
|
2425
|
-
|
|
2426
|
-
D("span", ho, z(
|
|
2427
|
-
u(a.value,
|
|
2425
|
+
V.type === "image" ? (R(), k(U, { key: 0 }, [
|
|
2426
|
+
D("span", ho, z(V.label) + ":", 1),
|
|
2427
|
+
u(a.value, V.property) ? (R(), k("img", {
|
|
2428
2428
|
key: 0,
|
|
2429
|
-
src: u(a.value,
|
|
2430
|
-
alt:
|
|
2429
|
+
src: u(a.value, V.property),
|
|
2430
|
+
alt: V.label,
|
|
2431
2431
|
class: "size-16 object-cover rounded"
|
|
2432
|
-
}, null, 8, $o)) :
|
|
2433
|
-
], 64)) :
|
|
2434
|
-
D("span", Mo, z(
|
|
2432
|
+
}, null, 8, $o)) : Y("", !0)
|
|
2433
|
+
], 64)) : V.type === "URL" ? (R(), k(U, { key: 1 }, [
|
|
2434
|
+
D("span", Mo, z(V.label) + ":", 1),
|
|
2435
2435
|
D("a", {
|
|
2436
|
-
href: u(a.value,
|
|
2436
|
+
href: u(a.value, V.property),
|
|
2437
2437
|
target: "_blank",
|
|
2438
2438
|
class: "text-primary text-sm break-all"
|
|
2439
|
-
}, z(u(a.value,
|
|
2440
|
-
], 64)) :
|
|
2441
|
-
D("span", Po, z(
|
|
2439
|
+
}, z(u(a.value, V.property)), 9, Io)
|
|
2440
|
+
], 64)) : V.type === "email" ? (R(), k(U, { key: 2 }, [
|
|
2441
|
+
D("span", Po, z(V.label) + ":", 1),
|
|
2442
2442
|
D("a", {
|
|
2443
|
-
href: `mailto:${u(a.value,
|
|
2443
|
+
href: `mailto:${u(a.value, V.property)}`,
|
|
2444
2444
|
class: "text-primary text-sm break-all"
|
|
2445
|
-
}, z(u(a.value,
|
|
2446
|
-
], 64)) :
|
|
2447
|
-
D("span", Ao, z(
|
|
2445
|
+
}, z(u(a.value, V.property)), 9, ko)
|
|
2446
|
+
], 64)) : V.type === "phone" ? (R(), k(U, { key: 3 }, [
|
|
2447
|
+
D("span", Ao, z(V.label) + ":", 1),
|
|
2448
2448
|
D("a", {
|
|
2449
|
-
href: `tel:${u(a.value,
|
|
2449
|
+
href: `tel:${u(a.value, V.property)}`,
|
|
2450
2450
|
class: "text-primary text-sm"
|
|
2451
|
-
}, z(u(a.value,
|
|
2451
|
+
}, z(u(a.value, V.property)), 9, To)
|
|
2452
2452
|
], 64)) : (R(), k(U, { key: 4 }, [
|
|
2453
|
-
D("span", Eo, z(
|
|
2454
|
-
D("span", Lo, z(f(u(a.value,
|
|
2453
|
+
D("span", Eo, z(V.label) + ":", 1),
|
|
2454
|
+
D("span", Lo, z(f(u(a.value, V.property), V)), 1)
|
|
2455
2455
|
], 64))
|
|
2456
2456
|
]))), 128))
|
|
2457
|
-
])) :
|
|
2457
|
+
])) : Y("", !0),
|
|
2458
2458
|
D("div", zo, [
|
|
2459
|
-
(R(!0), k(U, null,
|
|
2459
|
+
(R(!0), k(U, null, te(s.value, (V) => (R(), B(C, {
|
|
2460
2460
|
variant: "outline",
|
|
2461
2461
|
class: "w-full h-11 border-none bg-foreground! text-background! rounded-lg",
|
|
2462
|
-
key:
|
|
2463
|
-
onClick: (b) => y(
|
|
2462
|
+
key: V,
|
|
2463
|
+
onClick: (b) => y(V)
|
|
2464
2464
|
}, {
|
|
2465
2465
|
default: i(() => [
|
|
2466
2466
|
D("div", {
|
|
2467
|
-
innerHTML:
|
|
2467
|
+
innerHTML: V.icon
|
|
2468
2468
|
}, null, 8, Ho),
|
|
2469
|
-
S(" " + z(
|
|
2469
|
+
S(" " + z(V.label), 1)
|
|
2470
2470
|
]),
|
|
2471
2471
|
_: 2
|
|
2472
2472
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -2503,46 +2503,46 @@ const Do = (e, o = {}) => {
|
|
|
2503
2503
|
}, tl = {
|
|
2504
2504
|
key: 0,
|
|
2505
2505
|
class: "flex items-center justify-center font-medium border-x border-primary bg-primary/10 -my-[7px] h-[34px] cursor-grab"
|
|
2506
|
-
}, nl = /* @__PURE__ */
|
|
2506
|
+
}, nl = /* @__PURE__ */ ne({
|
|
2507
2507
|
__name: "DataTable",
|
|
2508
2508
|
setup(e, { expose: o }) {
|
|
2509
|
-
const { Button: t, Checkbox: n } = en, { $dragAndDrop: l } = useNuxtApp(), { formatCurrency: s } = xt(), a =
|
|
2510
|
-
if (
|
|
2509
|
+
const { Button: t, Checkbox: n } = en, { $dragAndDrop: l } = useNuxtApp(), { formatCurrency: s } = xt(), a = K("integrationId", T("")), d = K("resourcePath", T("")), u = K("table"), f = K("data"), w = K("columns"), y = K("sortMode", T(!1)), m = K("sortModeProperty", T("")), p = K("filters", T([])), C = K("itemActions", T([])), g = K("isPerformingDataTableAction", T(!1)), _ = Ht("mobileActionDrawer"), c = (E, x) => x.includes(".") ? x.split(".").reduce((L, $) => L?.[$], E) : E[x], V = be(() => w.value?.filter((E) => E.visible && E.showInCompactMode) || []), b = (E, x) => {
|
|
2510
|
+
if (E == null) return "";
|
|
2511
2511
|
if (x.type === "number")
|
|
2512
|
-
return isNaN(
|
|
2512
|
+
return isNaN(E) ? E : parseFloat(E)?.toFixed(2)?.replace(".00", "");
|
|
2513
2513
|
if (x.type === "datetime")
|
|
2514
|
-
return new Date(
|
|
2514
|
+
return new Date(E)?.toLocaleString() ?? "";
|
|
2515
2515
|
if (x.type === "currency")
|
|
2516
|
-
return s(
|
|
2516
|
+
return s(E);
|
|
2517
2517
|
if (x.type === "boolean")
|
|
2518
|
-
return
|
|
2518
|
+
return E ? "Yes" : "No";
|
|
2519
2519
|
if (x.type === "array")
|
|
2520
|
-
return Array.isArray(
|
|
2520
|
+
return Array.isArray(E) ? E.join(", ") : "";
|
|
2521
2521
|
if (x.type === "html") {
|
|
2522
2522
|
const L = document.createElement("div");
|
|
2523
|
-
L.innerHTML =
|
|
2523
|
+
L.innerHTML = E || "";
|
|
2524
2524
|
const $ = L.innerText || L.textContent || "";
|
|
2525
2525
|
return $.length > 100 ? $.substring(0, 100) + "..." : $;
|
|
2526
2526
|
}
|
|
2527
|
-
return String(
|
|
2528
|
-
},
|
|
2529
|
-
_.value?.onRowClick(
|
|
2527
|
+
return String(E);
|
|
2528
|
+
}, h = (E, x) => {
|
|
2529
|
+
_.value?.onRowClick(E, x, !0);
|
|
2530
2530
|
}, M = be(() => {
|
|
2531
|
-
let
|
|
2532
|
-
return y.value ?
|
|
2531
|
+
let E = [];
|
|
2532
|
+
return y.value ? E.push({
|
|
2533
2533
|
id: "drag-handle",
|
|
2534
2534
|
enableSorting: !1,
|
|
2535
2535
|
enableHiding: !1,
|
|
2536
2536
|
header: "",
|
|
2537
|
-
cell: () =>
|
|
2538
|
-
|
|
2537
|
+
cell: () => Q("div", { class: "row-drag-handle cursor-grab text-gray-400" }, [
|
|
2538
|
+
Q("svg", {
|
|
2539
2539
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2540
2540
|
class: "size-4",
|
|
2541
2541
|
fill: "none",
|
|
2542
2542
|
viewBox: "0 0 24 24",
|
|
2543
2543
|
stroke: "currentColor"
|
|
2544
2544
|
}, [
|
|
2545
|
-
|
|
2545
|
+
Q("path", {
|
|
2546
2546
|
"stroke-linecap": "round",
|
|
2547
2547
|
"stroke-linejoin": "round",
|
|
2548
2548
|
"stroke-width": "2",
|
|
@@ -2550,9 +2550,9 @@ const Do = (e, o = {}) => {
|
|
|
2550
2550
|
})
|
|
2551
2551
|
])
|
|
2552
2552
|
])
|
|
2553
|
-
}) :
|
|
2553
|
+
}) : E.push({
|
|
2554
2554
|
id: "select",
|
|
2555
|
-
header: ({ table: x }) =>
|
|
2555
|
+
header: ({ table: x }) => Q(n, {
|
|
2556
2556
|
modelValue: x.getIsAllPageRowsSelected() || x.getIsSomePageRowsSelected() && "indeterminate",
|
|
2557
2557
|
"onUpdate:modelValue": (L) => x.toggleAllPageRowsSelected(!!L),
|
|
2558
2558
|
ariaLabel: "Select all",
|
|
@@ -2563,7 +2563,7 @@ const Do = (e, o = {}) => {
|
|
|
2563
2563
|
(L.key === " " || L.key === "Enter") && L.stopPropagation();
|
|
2564
2564
|
}
|
|
2565
2565
|
}),
|
|
2566
|
-
cell: ({ row: x }) =>
|
|
2566
|
+
cell: ({ row: x }) => Q(n, {
|
|
2567
2567
|
class: "border-ring",
|
|
2568
2568
|
modelValue: x.getIsSelected(),
|
|
2569
2569
|
"onUpdate:modelValue": (L) => x.toggleSelected(!!L),
|
|
@@ -2578,52 +2578,52 @@ const Do = (e, o = {}) => {
|
|
|
2578
2578
|
enableHiding: !1
|
|
2579
2579
|
}), w.value?.forEach((x) => {
|
|
2580
2580
|
let L = !!p.value.find(($) => $.property === x.property);
|
|
2581
|
-
x.visible && (x.type === "text" ?
|
|
2581
|
+
x.visible && (x.type === "text" ? E.push({
|
|
2582
2582
|
id: x.property,
|
|
2583
2583
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2584
|
-
header: ({ column: $ }) =>
|
|
2584
|
+
header: ({ column: $ }) => Q(t, {
|
|
2585
2585
|
variant: "ghost",
|
|
2586
2586
|
disabled: y.value,
|
|
2587
2587
|
onClick: () => $.toggleSorting($.getIsSorted() === "asc")
|
|
2588
|
-
}, () => [x.label,
|
|
2589
|
-
cell: ({ row: $ }) =>
|
|
2588
|
+
}, () => [x.label, Q(Ze, { class: "ml-2 size-4" })]),
|
|
2589
|
+
cell: ({ row: $ }) => Q("div", {}, $.getValue(x.property)),
|
|
2590
2590
|
...L ? {
|
|
2591
2591
|
enableColumnFilter: !0,
|
|
2592
2592
|
filterFn: ($, P, N) => {
|
|
2593
2593
|
if (!Array.isArray(N) || N.length === 0) return !0;
|
|
2594
|
-
const
|
|
2595
|
-
return N.includes(
|
|
2594
|
+
const ue = $.getValue(P);
|
|
2595
|
+
return N.includes(ue);
|
|
2596
2596
|
}
|
|
2597
2597
|
} : {}
|
|
2598
|
-
}) : x.type === "number" ?
|
|
2598
|
+
}) : x.type === "number" ? E.push({
|
|
2599
2599
|
id: x.property,
|
|
2600
2600
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2601
|
-
header: ({ column: $ }) =>
|
|
2601
|
+
header: ({ column: $ }) => Q(t, {
|
|
2602
2602
|
variant: "ghost",
|
|
2603
2603
|
disabled: y.value,
|
|
2604
2604
|
onClick: () => $.toggleSorting($.getIsSorted() === "asc")
|
|
2605
|
-
}, () => [x.label,
|
|
2606
|
-
cell: ({ row: $ }) =>
|
|
2607
|
-
}) : x.type === "date" ?
|
|
2605
|
+
}, () => [x.label, Q(Ze, { class: "ml-2 size-4" })]),
|
|
2606
|
+
cell: ({ row: $ }) => Q("div", { class: "" }, isNaN($.getValue(x.property)) ? $.getValue(x.property) : parseFloat($.getValue(x.property))?.toFixed(2)?.replace(".00", ""))
|
|
2607
|
+
}) : x.type === "date" ? E.push({
|
|
2608
2608
|
id: x.property,
|
|
2609
2609
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2610
2610
|
header: x.label,
|
|
2611
|
-
cell: ({ row: $ }) =>
|
|
2612
|
-
}) : x.type === "datetime" ?
|
|
2611
|
+
cell: ({ row: $ }) => Q("div", { class: "" }, $.getValue(x.property))
|
|
2612
|
+
}) : x.type === "datetime" ? E.push({
|
|
2613
2613
|
id: x.property,
|
|
2614
2614
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2615
2615
|
header: x.label,
|
|
2616
|
-
cell: ({ row: $ }) =>
|
|
2617
|
-
}) : x.type === "boolean" ?
|
|
2616
|
+
cell: ({ row: $ }) => Q("div", { class: "" }, new Date($.getValue(x.property))?.toLocaleString() ?? "")
|
|
2617
|
+
}) : x.type === "boolean" ? E.push({
|
|
2618
2618
|
id: x.property,
|
|
2619
2619
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2620
2620
|
header: x.label,
|
|
2621
|
-
cell: ({ row: $ }) =>
|
|
2622
|
-
}) : x.type === "URL" ?
|
|
2621
|
+
cell: ({ row: $ }) => Q(n, { defaultValue: $.getValue(x.property), disabled: !0, class: "border-ring disabled:cursor-default disabled:opacity-100" })
|
|
2622
|
+
}) : x.type === "URL" ? E.push({
|
|
2623
2623
|
id: x.property,
|
|
2624
2624
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2625
2625
|
header: x.label,
|
|
2626
|
-
cell: ({ row: $ }) =>
|
|
2626
|
+
cell: ({ row: $ }) => Q(
|
|
2627
2627
|
"a",
|
|
2628
2628
|
{
|
|
2629
2629
|
href: $.getValue(x.property),
|
|
@@ -2637,11 +2637,11 @@ const Do = (e, o = {}) => {
|
|
|
2637
2637
|
},
|
|
2638
2638
|
$.getValue(x.property)
|
|
2639
2639
|
)
|
|
2640
|
-
}) : x.type === "email" ?
|
|
2640
|
+
}) : x.type === "email" ? E.push({
|
|
2641
2641
|
id: x.property,
|
|
2642
2642
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2643
2643
|
header: x.label,
|
|
2644
|
-
cell: ({ row: $ }) =>
|
|
2644
|
+
cell: ({ row: $ }) => Q(
|
|
2645
2645
|
"a",
|
|
2646
2646
|
{
|
|
2647
2647
|
href: `mailto:${$.getValue(x.property)}`,
|
|
@@ -2654,11 +2654,11 @@ const Do = (e, o = {}) => {
|
|
|
2654
2654
|
},
|
|
2655
2655
|
$.getValue(x.property)
|
|
2656
2656
|
)
|
|
2657
|
-
}) : x.type === "phone" ?
|
|
2657
|
+
}) : x.type === "phone" ? E.push({
|
|
2658
2658
|
id: x.property,
|
|
2659
2659
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2660
2660
|
header: x.label,
|
|
2661
|
-
cell: ({ row: $ }) =>
|
|
2661
|
+
cell: ({ row: $ }) => Q(
|
|
2662
2662
|
"a",
|
|
2663
2663
|
{
|
|
2664
2664
|
href: `tel:${$.getValue(x.property)}`,
|
|
@@ -2671,25 +2671,25 @@ const Do = (e, o = {}) => {
|
|
|
2671
2671
|
},
|
|
2672
2672
|
$.getValue(x.property)
|
|
2673
2673
|
)
|
|
2674
|
-
}) : x.type === "currency" ?
|
|
2674
|
+
}) : x.type === "currency" ? E.push({
|
|
2675
2675
|
id: x.property,
|
|
2676
2676
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2677
2677
|
header: x.label,
|
|
2678
|
-
cell: ({ row: $ }) =>
|
|
2679
|
-
}) : x.type === "image" ?
|
|
2678
|
+
cell: ({ row: $ }) => Q("div", { class: "" }, s($.getValue(x.property)))
|
|
2679
|
+
}) : x.type === "image" ? E.push({
|
|
2680
2680
|
id: x.property,
|
|
2681
2681
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2682
2682
|
header: x.label,
|
|
2683
|
-
cell: ({ row: $ }) => $.getValue(x.property) ?
|
|
2684
|
-
}) : x.type === "array" ?
|
|
2683
|
+
cell: ({ row: $ }) => $.getValue(x.property) ? Q("img", { src: $.getValue(x.property), alt: x.label, class: "size-16 object-cover" }) : ""
|
|
2684
|
+
}) : x.type === "array" ? E.push({
|
|
2685
2685
|
id: x.property,
|
|
2686
2686
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2687
2687
|
header: x.label,
|
|
2688
2688
|
cell: ({ row: $ }) => {
|
|
2689
2689
|
const P = $.getValue(x.property);
|
|
2690
|
-
return Array.isArray(P) ?
|
|
2690
|
+
return Array.isArray(P) ? Q("div", {}, P.map((N, ue) => Q("div", { key: ue }, N.toString()))) : Q("div", {}, "");
|
|
2691
2691
|
}
|
|
2692
|
-
}) : x.type === "html" &&
|
|
2692
|
+
}) : x.type === "html" && E.push({
|
|
2693
2693
|
id: x.property,
|
|
2694
2694
|
accessorFn: ($) => x.property.includes(".") ? x.property.split(".").reduce((P, N) => P?.[N], $) : $[x.property],
|
|
2695
2695
|
header: x.label,
|
|
@@ -2697,18 +2697,18 @@ const Do = (e, o = {}) => {
|
|
|
2697
2697
|
let P = document.createElement("div");
|
|
2698
2698
|
P.innerHTML = $.getValue(x.property) || "";
|
|
2699
2699
|
const N = P.innerText || P.textContent || "";
|
|
2700
|
-
return
|
|
2700
|
+
return Q("div", { class: "", innerHTML: N.length > 100 ? N.substring(0, 100) + "..." : N });
|
|
2701
2701
|
}
|
|
2702
2702
|
}));
|
|
2703
|
-
}), C.value.length > 0 &&
|
|
2703
|
+
}), C.value.length > 0 && E.push({
|
|
2704
2704
|
id: "actions",
|
|
2705
2705
|
enableHiding: !1,
|
|
2706
|
-
cell: ({ row: x }) =>
|
|
2707
|
-
}),
|
|
2708
|
-
}), I =
|
|
2706
|
+
cell: ({ row: x }) => Q("div", { class: "data-table-row-actions flex items-center justify-center gap-2" }, C.value.map((L) => Q(Ct, { action: L, row: x })))
|
|
2707
|
+
}), E;
|
|
2708
|
+
}), I = T(""), O = T([]), q = T([]), J = T({}), Z = T({}), le = T({}), oe = T({
|
|
2709
2709
|
pageIndex: 0,
|
|
2710
2710
|
pageSize: 10
|
|
2711
|
-
}),
|
|
2711
|
+
}), W = De({
|
|
2712
2712
|
get data() {
|
|
2713
2713
|
return f?.value ? JSON.parse(JSON.stringify(f.value)) : [];
|
|
2714
2714
|
},
|
|
@@ -2720,14 +2720,14 @@ const Do = (e, o = {}) => {
|
|
|
2720
2720
|
getGlobalFilter() {
|
|
2721
2721
|
return I.value;
|
|
2722
2722
|
},
|
|
2723
|
-
onGlobalFilterChange(
|
|
2724
|
-
Re(
|
|
2723
|
+
onGlobalFilterChange(E) {
|
|
2724
|
+
Re(E, I);
|
|
2725
2725
|
},
|
|
2726
|
-
globalFilterFn: (
|
|
2726
|
+
globalFilterFn: (E, x, L) => {
|
|
2727
2727
|
const $ = L.toLowerCase();
|
|
2728
2728
|
return w.value.map((N) => N.property).some((N) => {
|
|
2729
|
-
const
|
|
2730
|
-
return typeof
|
|
2729
|
+
const ue = E.original?.[N];
|
|
2730
|
+
return typeof ue == "string" && ue.toLowerCase().includes($);
|
|
2731
2731
|
});
|
|
2732
2732
|
},
|
|
2733
2733
|
getCoreRowModel: Yn(),
|
|
@@ -2735,30 +2735,30 @@ const Do = (e, o = {}) => {
|
|
|
2735
2735
|
getSortedRowModel: eo(),
|
|
2736
2736
|
getFilteredRowModel: Wn(),
|
|
2737
2737
|
getExpandedRowModel: Kn(),
|
|
2738
|
-
onSortingChange: (
|
|
2739
|
-
onColumnFiltersChange: (
|
|
2740
|
-
onColumnVisibilityChange: (
|
|
2741
|
-
onRowSelectionChange: (
|
|
2742
|
-
onExpandedChange: (
|
|
2743
|
-
onPaginationChange: (
|
|
2738
|
+
onSortingChange: (E) => Re(E, O),
|
|
2739
|
+
onColumnFiltersChange: (E) => Re(E, q),
|
|
2740
|
+
onColumnVisibilityChange: (E) => Re(E, J),
|
|
2741
|
+
onRowSelectionChange: (E) => Re(E, Z),
|
|
2742
|
+
onExpandedChange: (E) => Re(E, le),
|
|
2743
|
+
onPaginationChange: (E) => Re(E, oe),
|
|
2744
2744
|
state: {
|
|
2745
2745
|
get sorting() {
|
|
2746
2746
|
return O.value;
|
|
2747
2747
|
},
|
|
2748
2748
|
get columnFilters() {
|
|
2749
|
-
return
|
|
2749
|
+
return q.value;
|
|
2750
2750
|
},
|
|
2751
2751
|
get columnVisibility() {
|
|
2752
|
-
return
|
|
2752
|
+
return J.value;
|
|
2753
2753
|
},
|
|
2754
2754
|
get rowSelection() {
|
|
2755
|
-
return
|
|
2755
|
+
return Z.value;
|
|
2756
2756
|
},
|
|
2757
2757
|
get expanded() {
|
|
2758
|
-
return
|
|
2758
|
+
return le.value;
|
|
2759
2759
|
},
|
|
2760
2760
|
get pagination() {
|
|
2761
|
-
return
|
|
2761
|
+
return oe.value;
|
|
2762
2762
|
},
|
|
2763
2763
|
get globalFilter() {
|
|
2764
2764
|
return I.value;
|
|
@@ -2766,143 +2766,143 @@ const Do = (e, o = {}) => {
|
|
|
2766
2766
|
}
|
|
2767
2767
|
});
|
|
2768
2768
|
St(() => {
|
|
2769
|
-
u.value = oo(
|
|
2770
|
-
}), Se(y, (
|
|
2771
|
-
|
|
2772
|
-
pageIndex:
|
|
2773
|
-
pageSize:
|
|
2769
|
+
u.value = oo(W);
|
|
2770
|
+
}), Se(y, (E) => {
|
|
2771
|
+
E ? ye() : oe.value = {
|
|
2772
|
+
pageIndex: ae.value,
|
|
2773
|
+
pageSize: re.value
|
|
2774
2774
|
};
|
|
2775
2775
|
});
|
|
2776
|
-
const [
|
|
2776
|
+
const [A, j] = l([], {
|
|
2777
2777
|
plugins: [rn()]
|
|
2778
|
-
}),
|
|
2779
|
-
|
|
2778
|
+
}), re = T(10), ae = T(0), ye = () => {
|
|
2779
|
+
re.value = oe.value.pageSize, ae.value = oe.value.pageIndex, oe.value = {
|
|
2780
2780
|
pageIndex: 0,
|
|
2781
2781
|
pageSize: 1e4
|
|
2782
|
-
},
|
|
2783
|
-
const L =
|
|
2782
|
+
}, j.value = (f?.value ?? []).slice().sort((E, x) => {
|
|
2783
|
+
const L = E[m.value] ?? 0, $ = x[m.value] ?? 0;
|
|
2784
2784
|
return L - $;
|
|
2785
|
-
}).map((
|
|
2786
|
-
id:
|
|
2785
|
+
}).map((E, x) => ({
|
|
2786
|
+
id: E.id,
|
|
2787
2787
|
index: x,
|
|
2788
2788
|
original: {
|
|
2789
|
-
...
|
|
2789
|
+
...E,
|
|
2790
2790
|
[m.value]: x
|
|
2791
2791
|
},
|
|
2792
|
-
getVisibleCells: () => u?.value?.getRowModel().rows?.find((L) => L.original.id ===
|
|
2792
|
+
getVisibleCells: () => u?.value?.getRowModel().rows?.find((L) => L.original.id === E.id)?.getVisibleCells()
|
|
2793
2793
|
}));
|
|
2794
2794
|
};
|
|
2795
2795
|
return o({
|
|
2796
2796
|
saveSortMode: async () => {
|
|
2797
|
-
const { update:
|
|
2797
|
+
const { update: E } = Gt(a.value);
|
|
2798
2798
|
f.value.forEach((x) => {
|
|
2799
|
-
x[m.value] !==
|
|
2799
|
+
x[m.value] !== j.value.findIndex((L) => L.id === x.id) && (x[m.value] = j.value.findIndex((L) => L.id === x.id), E(d.value, x.id, { [m.value]: x[m.value] }));
|
|
2800
2800
|
});
|
|
2801
2801
|
}
|
|
2802
|
-
}), (
|
|
2803
|
-
const L = v("TooltipTrigger"), $ = v("TooltipContent"), P = v("Tooltip"), N = v("TableHead"),
|
|
2802
|
+
}), (E, x) => {
|
|
2803
|
+
const L = v("TooltipTrigger"), $ = v("TooltipContent"), P = v("Tooltip"), N = v("TableHead"), ue = v("TableRow"), At = v("TableHeader"), Be = v("TableCell"), Tt = v("TableBody"), Et = v("Table");
|
|
2804
2804
|
return R(), k(U, null, [
|
|
2805
|
-
|
|
2805
|
+
V.value.length > 0 ? (R(), k("div", {
|
|
2806
2806
|
key: 0,
|
|
2807
|
-
class:
|
|
2807
|
+
class: ie(["@md:hidden -mx-[17px] w-[calc(100%+34px)] bg-background dark:bg-input/30 border-y divide-y", { "cursor-wait": F(g) }])
|
|
2808
2808
|
}, [
|
|
2809
|
-
|
|
2810
|
-
key:
|
|
2809
|
+
F(u).getRowModel().rows?.length ? (R(!0), k(U, { key: 0 }, te(F(u).getRowModel().rows, (ee) => (R(), k("div", {
|
|
2810
|
+
key: ee.id,
|
|
2811
2811
|
"data-slot": "table-row",
|
|
2812
2812
|
class: "flex items-center px-4 py-2.5 active:bg-muted/50 transition-colors",
|
|
2813
|
-
onClick: (X) =>
|
|
2813
|
+
onClick: (X) => h(X, ee.original)
|
|
2814
2814
|
}, [
|
|
2815
2815
|
D("div", Bo, [
|
|
2816
|
-
(R(!0), k(U, null,
|
|
2816
|
+
(R(!0), k(U, null, te(V.value, (X) => (R(), k("div", {
|
|
2817
2817
|
key: X.id,
|
|
2818
2818
|
class: "flex items-center gap-2 min-w-0"
|
|
2819
2819
|
}, [
|
|
2820
2820
|
X.type === "image" ? (R(), k(U, { key: 0 }, [
|
|
2821
2821
|
D("span", Uo, z(X.label) + ":", 1),
|
|
2822
|
-
c(
|
|
2822
|
+
c(ee.original, X.property) ? (R(), k("img", {
|
|
2823
2823
|
key: 0,
|
|
2824
|
-
src: c(
|
|
2824
|
+
src: c(ee.original, X.property),
|
|
2825
2825
|
alt: X.label,
|
|
2826
2826
|
class: "size-10 object-cover rounded"
|
|
2827
|
-
}, null, 8, No)) :
|
|
2827
|
+
}, null, 8, No)) : Y("", !0)
|
|
2828
2828
|
], 64)) : X.type === "URL" ? (R(), k(U, { key: 1 }, [
|
|
2829
2829
|
D("span", jo, z(X.label) + ":", 1),
|
|
2830
2830
|
D("a", {
|
|
2831
|
-
href: c(
|
|
2831
|
+
href: c(ee.original, X.property),
|
|
2832
2832
|
target: "_blank",
|
|
2833
2833
|
class: "text-primary text-sm truncate",
|
|
2834
2834
|
onClick: x[0] || (x[0] = ze(() => {
|
|
2835
2835
|
}, ["stop"]))
|
|
2836
|
-
}, z(c(
|
|
2836
|
+
}, z(c(ee.original, X.property)), 9, qo)
|
|
2837
2837
|
], 64)) : X.type === "email" ? (R(), k(U, { key: 2 }, [
|
|
2838
2838
|
D("span", Yo, z(X.label) + ":", 1),
|
|
2839
2839
|
D("a", {
|
|
2840
|
-
href: `mailto:${c(
|
|
2840
|
+
href: `mailto:${c(ee.original, X.property)}`,
|
|
2841
2841
|
class: "text-primary text-sm truncate",
|
|
2842
2842
|
onClick: x[1] || (x[1] = ze(() => {
|
|
2843
2843
|
}, ["stop"]))
|
|
2844
|
-
}, z(c(
|
|
2844
|
+
}, z(c(ee.original, X.property)), 9, Ko)
|
|
2845
2845
|
], 64)) : X.type === "phone" ? (R(), k(U, { key: 3 }, [
|
|
2846
2846
|
D("span", Xo, z(X.label) + ":", 1),
|
|
2847
2847
|
D("a", {
|
|
2848
|
-
href: `tel:${c(
|
|
2848
|
+
href: `tel:${c(ee.original, X.property)}`,
|
|
2849
2849
|
class: "text-primary text-sm truncate",
|
|
2850
2850
|
onClick: x[2] || (x[2] = ze(() => {
|
|
2851
2851
|
}, ["stop"]))
|
|
2852
|
-
}, z(c(
|
|
2852
|
+
}, z(c(ee.original, X.property)), 9, Jo)
|
|
2853
2853
|
], 64)) : (R(), k(U, { key: 4 }, [
|
|
2854
2854
|
D("span", Qo, z(X.label) + ":", 1),
|
|
2855
|
-
D("span", Wo, z(b(c(
|
|
2855
|
+
D("span", Wo, z(b(c(ee.original, X.property), X)), 1)
|
|
2856
2856
|
], 64))
|
|
2857
2857
|
]))), 128))
|
|
2858
2858
|
]),
|
|
2859
|
-
r(
|
|
2860
|
-
|
|
2861
|
-
(R(!0), k(U, null,
|
|
2859
|
+
r(F(yt), { class: "size-4 text-muted-foreground/50 shrink-0 ml-2" }),
|
|
2860
|
+
F(C).length > 0 ? (R(), k("div", Zo, [
|
|
2861
|
+
(R(!0), k(U, null, te(F(C), (X) => (R(), B(Ct, {
|
|
2862
2862
|
key: X.id,
|
|
2863
2863
|
action: X,
|
|
2864
|
-
row:
|
|
2864
|
+
row: ee
|
|
2865
2865
|
}, null, 8, ["action", "row"]))), 128))
|
|
2866
|
-
])) :
|
|
2866
|
+
])) : Y("", !0)
|
|
2867
2867
|
], 8, Oo))), 128)) : (R(), k("div", el, " No results. "))
|
|
2868
|
-
], 2)) :
|
|
2868
|
+
], 2)) : Y("", !0),
|
|
2869
2869
|
D("div", {
|
|
2870
|
-
class:
|
|
2870
|
+
class: ie(["border bg-background dark:bg-input/30 shadow-xs shadow-xs -mx-[17px] w-[calc(100%+34px)] @md:mx-0 @md:w-full @md:rounded-md", [{ "cursor-wait": F(g) }, V.value.length > 0 ? "hidden @md:block" : ""]])
|
|
2871
2871
|
}, [
|
|
2872
2872
|
r(Et, null, {
|
|
2873
2873
|
default: i(() => [
|
|
2874
2874
|
r(At, null, {
|
|
2875
2875
|
default: i(() => [
|
|
2876
|
-
(R(!0), k(U, null,
|
|
2877
|
-
key:
|
|
2876
|
+
(R(!0), k(U, null, te(F(u).getHeaderGroups(), (ee) => (R(), B(ue, {
|
|
2877
|
+
key: ee.id
|
|
2878
2878
|
}, {
|
|
2879
2879
|
default: i(() => [
|
|
2880
|
-
(R(!0), k(U, null,
|
|
2880
|
+
(R(!0), k(U, null, te(ee.headers, (X) => (R(), B(N, {
|
|
2881
2881
|
key: X.id
|
|
2882
2882
|
}, {
|
|
2883
2883
|
default: i(() => [
|
|
2884
|
-
X.isPlaceholder ?
|
|
2884
|
+
X.isPlaceholder ? Y("", !0) : (R(), B(F(vt), {
|
|
2885
2885
|
key: 0,
|
|
2886
2886
|
render: X.column.columnDef.header,
|
|
2887
2887
|
props: X.getContext()
|
|
2888
2888
|
}, null, 8, ["render", "props"])),
|
|
2889
|
-
|
|
2889
|
+
F(w)?.find((fe) => fe.property === X.column.columnDef.id)?.showInfoButton ? (R(), B(P, { key: 1 }, {
|
|
2890
2890
|
default: i(() => [
|
|
2891
2891
|
r(L, { "as-child": "" }, {
|
|
2892
2892
|
default: i(() => [
|
|
2893
|
-
r(
|
|
2893
|
+
r(F(Kt), { class: "size-4 inline mx-2 -mt-0.5" })
|
|
2894
2894
|
]),
|
|
2895
2895
|
_: 1
|
|
2896
2896
|
}),
|
|
2897
2897
|
r($, null, {
|
|
2898
2898
|
default: i(() => [
|
|
2899
|
-
S(z(
|
|
2899
|
+
S(z(F(w)?.find((fe) => fe.property === X.column.columnDef.id)?.infoTooltipText), 1)
|
|
2900
2900
|
]),
|
|
2901
2901
|
_: 2
|
|
2902
2902
|
}, 1024)
|
|
2903
2903
|
]),
|
|
2904
2904
|
_: 2
|
|
2905
|
-
}, 1024)) :
|
|
2905
|
+
}, 1024)) : Y("", !0)
|
|
2906
2906
|
]),
|
|
2907
2907
|
_: 2
|
|
2908
2908
|
}, 1024))), 128))
|
|
@@ -2914,27 +2914,27 @@ const Do = (e, o = {}) => {
|
|
|
2914
2914
|
}),
|
|
2915
2915
|
r(Tt, {
|
|
2916
2916
|
ref_key: "dragContainer",
|
|
2917
|
-
ref:
|
|
2917
|
+
ref: A
|
|
2918
2918
|
}, {
|
|
2919
2919
|
default: i(() => [
|
|
2920
|
-
|
|
2921
|
-
key:
|
|
2920
|
+
F(u).getRowModel().rows?.length ? (R(!0), k(U, { key: 0 }, te(F(y) ? F(j) : F(u).getRowModel().rows, (ee, X) => (R(), k(U, {
|
|
2921
|
+
key: ee.id
|
|
2922
2922
|
}, [
|
|
2923
|
-
r(
|
|
2924
|
-
"data-state": !
|
|
2923
|
+
r(ue, {
|
|
2924
|
+
"data-state": !F(y) && ee.getIsSelected() && "selected",
|
|
2925
2925
|
class: "group/row",
|
|
2926
|
-
onClick: (fe) =>
|
|
2926
|
+
onClick: (fe) => F(_).onRowClick(fe, ee.original)
|
|
2927
2927
|
}, {
|
|
2928
2928
|
default: i(() => [
|
|
2929
|
-
(R(!0), k(U, null,
|
|
2929
|
+
(R(!0), k(U, null, te(ee.getVisibleCells(), (fe) => (R(), B(Be, {
|
|
2930
2930
|
key: fe.id
|
|
2931
2931
|
}, {
|
|
2932
2932
|
default: i(() => [
|
|
2933
|
-
|
|
2933
|
+
F(y) && fe.column.id === F(m) ? (R(), k("span", tl, z(X), 1)) : (R(), k("div", {
|
|
2934
2934
|
key: 1,
|
|
2935
|
-
class:
|
|
2935
|
+
class: ie(F(y) ? "opacity-50 group-hover/row:opacity-100" : "")
|
|
2936
2936
|
}, [
|
|
2937
|
-
r(
|
|
2937
|
+
r(F(vt), {
|
|
2938
2938
|
render: fe.column.columnDef.cell,
|
|
2939
2939
|
props: fe.getContext()
|
|
2940
2940
|
}, null, 8, ["render", "props"])
|
|
@@ -2945,20 +2945,20 @@ const Do = (e, o = {}) => {
|
|
|
2945
2945
|
]),
|
|
2946
2946
|
_: 2
|
|
2947
2947
|
}, 1032, ["data-state", "onClick"]),
|
|
2948
|
-
!
|
|
2948
|
+
!F(y) && ee.getIsExpanded() ? (R(), B(ue, { key: 0 }, {
|
|
2949
2949
|
default: i(() => [
|
|
2950
2950
|
r(Be, {
|
|
2951
|
-
colspan:
|
|
2951
|
+
colspan: ee.getAllCells().length
|
|
2952
2952
|
}, {
|
|
2953
2953
|
default: i(() => [
|
|
2954
|
-
S(z(JSON.stringify(
|
|
2954
|
+
S(z(JSON.stringify(ee.original)), 1)
|
|
2955
2955
|
]),
|
|
2956
2956
|
_: 2
|
|
2957
2957
|
}, 1032, ["colspan"])
|
|
2958
2958
|
]),
|
|
2959
2959
|
_: 2
|
|
2960
|
-
}, 1024)) :
|
|
2961
|
-
], 64))), 128)) : (R(), B(
|
|
2960
|
+
}, 1024)) : Y("", !0)
|
|
2961
|
+
], 64))), 128)) : (R(), B(ue, { key: 1 }, {
|
|
2962
2962
|
default: i(() => [
|
|
2963
2963
|
r(Be, {
|
|
2964
2964
|
colspan: 999,
|
|
@@ -2979,7 +2979,7 @@ const Do = (e, o = {}) => {
|
|
|
2979
2979
|
_: 1
|
|
2980
2980
|
})
|
|
2981
2981
|
], 2),
|
|
2982
|
-
r(po, { table:
|
|
2982
|
+
r(po, { table: F(u) }, null, 8, ["table"]),
|
|
2983
2983
|
r(Go, {
|
|
2984
2984
|
ref_key: "mobileActionDrawer",
|
|
2985
2985
|
ref: _
|
|
@@ -2990,11 +2990,11 @@ const Do = (e, o = {}) => {
|
|
|
2990
2990
|
}), ol = { class: "grid grid-cols-3 gap-2 mb-2 py-2" }, ll = { class: "flex flex-col items-start gap-1.5" }, rl = { class: "flex flex-col items-start gap-1.5" }, sl = { class: "flex flex-col gap-1.5" }, il = {
|
|
2991
2991
|
key: 0,
|
|
2992
2992
|
class: "flex flex-col gap-2 mb-4"
|
|
2993
|
-
}, al = { class: "flex flex-col gap-1.5" }, ul = { class: "flex flex-col items-start gap-1.5 col-span-4" }, dl = { class: "flex flex-col items-start gap-1.5 col-span-4" }, gl = /* @__PURE__ */
|
|
2993
|
+
}, al = { class: "flex flex-col gap-1.5" }, ul = { class: "flex flex-col items-start gap-1.5 col-span-4" }, dl = { class: "flex flex-col items-start gap-1.5 col-span-4" }, gl = /* @__PURE__ */ ne({
|
|
2994
2994
|
__name: "StatDialog",
|
|
2995
2995
|
emits: ["statAdded", "statEdited", "statRemoved"],
|
|
2996
2996
|
setup(e, { expose: o, emit: t }) {
|
|
2997
|
-
const n = t, l =
|
|
2997
|
+
const n = t, l = K("columns"), s = T(!1), a = T("add"), d = T(null), u = De({
|
|
2998
2998
|
label: "",
|
|
2999
2999
|
method: "",
|
|
3000
3000
|
field: "",
|
|
@@ -3019,15 +3019,15 @@ const Do = (e, o = {}) => {
|
|
|
3019
3019
|
return o({
|
|
3020
3020
|
openDialog: f
|
|
3021
3021
|
}), (C, g) => {
|
|
3022
|
-
const _ = v("DialogTitle"), c = v("DialogDescription"),
|
|
3023
|
-
return R(), B(
|
|
3022
|
+
const _ = v("DialogTitle"), c = v("DialogDescription"), V = v("DialogHeader"), b = v("Label"), h = v("Input"), M = v("SelectValue"), I = v("SelectTrigger"), O = v("SelectItem"), q = v("SelectContent"), J = v("Select"), Z = v("ComboboxTrigger"), le = v("ComboboxInput"), oe = v("ComboboxAnchor"), W = v("ComboboxItem"), A = v("ComboboxGroup"), j = v("ComboboxList"), re = v("Combobox"), ae = v("Button"), ye = v("DialogFooter"), _e = v("DialogScrollContent"), E = v("Dialog");
|
|
3023
|
+
return R(), B(E, {
|
|
3024
3024
|
open: s.value,
|
|
3025
3025
|
"onUpdate:open": g[4] || (g[4] = (x) => s.value = x)
|
|
3026
3026
|
}, {
|
|
3027
3027
|
default: i(() => [
|
|
3028
3028
|
r(_e, { class: "sm:max-w-2xl" }, {
|
|
3029
3029
|
default: i(() => [
|
|
3030
|
-
r(
|
|
3030
|
+
r(V, null, {
|
|
3031
3031
|
default: i(() => [
|
|
3032
3032
|
r(_, null, {
|
|
3033
3033
|
default: i(() => [
|
|
@@ -3055,7 +3055,7 @@ const Do = (e, o = {}) => {
|
|
|
3055
3055
|
])]),
|
|
3056
3056
|
_: 1
|
|
3057
3057
|
}),
|
|
3058
|
-
r(
|
|
3058
|
+
r(h, {
|
|
3059
3059
|
id: "stat_dialog_label",
|
|
3060
3060
|
modelValue: u.label,
|
|
3061
3061
|
"onUpdate:modelValue": g[0] || (g[0] = (x) => u.label = x)
|
|
@@ -3068,7 +3068,7 @@ const Do = (e, o = {}) => {
|
|
|
3068
3068
|
])]),
|
|
3069
3069
|
_: 1
|
|
3070
3070
|
}),
|
|
3071
|
-
r(
|
|
3071
|
+
r(J, {
|
|
3072
3072
|
modelValue: u.method,
|
|
3073
3073
|
"onUpdate:modelValue": g[1] || (g[1] = (x) => u.method = x)
|
|
3074
3074
|
}, {
|
|
@@ -3079,7 +3079,7 @@ const Do = (e, o = {}) => {
|
|
|
3079
3079
|
]),
|
|
3080
3080
|
_: 1
|
|
3081
3081
|
}),
|
|
3082
|
-
r(
|
|
3082
|
+
r(q, null, {
|
|
3083
3083
|
default: i(() => [
|
|
3084
3084
|
r(O, { value: "count" }, {
|
|
3085
3085
|
default: i(() => [...g[7] || (g[7] = [
|
|
@@ -3118,7 +3118,7 @@ const Do = (e, o = {}) => {
|
|
|
3118
3118
|
_: 1
|
|
3119
3119
|
}, 8, ["modelValue"])
|
|
3120
3120
|
]),
|
|
3121
|
-
u.method !== "count" ? (R(), B(
|
|
3121
|
+
u.method !== "count" ? (R(), B(re, {
|
|
3122
3122
|
key: 0,
|
|
3123
3123
|
by: "label",
|
|
3124
3124
|
class: "w-full",
|
|
@@ -3128,10 +3128,10 @@ const Do = (e, o = {}) => {
|
|
|
3128
3128
|
"onUpdate:modelValue": g[3] || (g[3] = (x) => u.field = x)
|
|
3129
3129
|
}, {
|
|
3130
3130
|
default: i(() => [
|
|
3131
|
-
r(
|
|
3131
|
+
r(oe, { class: "w-full" }, {
|
|
3132
3132
|
default: i(() => [
|
|
3133
3133
|
D("div", sl, [
|
|
3134
|
-
r(
|
|
3134
|
+
r(Z, null, {
|
|
3135
3135
|
default: i(() => [
|
|
3136
3136
|
r(b, { class: "text-xs text-muted-foreground" }, {
|
|
3137
3137
|
default: i(() => [...g[12] || (g[12] = [
|
|
@@ -3142,7 +3142,7 @@ const Do = (e, o = {}) => {
|
|
|
3142
3142
|
]),
|
|
3143
3143
|
_: 1
|
|
3144
3144
|
}),
|
|
3145
|
-
r(
|
|
3145
|
+
r(le, {
|
|
3146
3146
|
modelValue: u.field,
|
|
3147
3147
|
"onUpdate:modelValue": g[2] || (g[2] = (x) => u.field = x),
|
|
3148
3148
|
hideIcon: "",
|
|
@@ -3152,11 +3152,11 @@ const Do = (e, o = {}) => {
|
|
|
3152
3152
|
]),
|
|
3153
3153
|
_: 1
|
|
3154
3154
|
}),
|
|
3155
|
-
r(
|
|
3155
|
+
r(j, { class: "w-full" }, {
|
|
3156
3156
|
default: i(() => [
|
|
3157
|
-
r(
|
|
3157
|
+
r(A, null, {
|
|
3158
3158
|
default: i(() => [
|
|
3159
|
-
(R(!0), k(U, null,
|
|
3159
|
+
(R(!0), k(U, null, te(F(l), (x) => (R(), B(W, {
|
|
3160
3160
|
key: x.property,
|
|
3161
3161
|
value: x.property,
|
|
3162
3162
|
onSelect: () => {
|
|
@@ -3165,10 +3165,10 @@ const Do = (e, o = {}) => {
|
|
|
3165
3165
|
}, {
|
|
3166
3166
|
default: i(() => [
|
|
3167
3167
|
S(z(x.property) + " ", 1),
|
|
3168
|
-
u.field === x.property ? (R(), B(
|
|
3168
|
+
u.field === x.property ? (R(), B(F(He), {
|
|
3169
3169
|
key: 0,
|
|
3170
|
-
class:
|
|
3171
|
-
}, null, 8, ["class"])) :
|
|
3170
|
+
class: ie(F(Pe)("ml-auto size-4"))
|
|
3171
|
+
}, null, 8, ["class"])) : Y("", !0)
|
|
3172
3172
|
]),
|
|
3173
3173
|
_: 2
|
|
3174
3174
|
}, 1032, ["value", "onSelect"]))), 128))
|
|
@@ -3180,7 +3180,7 @@ const Do = (e, o = {}) => {
|
|
|
3180
3180
|
})
|
|
3181
3181
|
]),
|
|
3182
3182
|
_: 1
|
|
3183
|
-
}, 8, ["modelValue"])) :
|
|
3183
|
+
}, 8, ["modelValue"])) : Y("", !0)
|
|
3184
3184
|
]),
|
|
3185
3185
|
D("div", null, [
|
|
3186
3186
|
r(b, { class: "mb-1" }, {
|
|
@@ -3191,11 +3191,11 @@ const Do = (e, o = {}) => {
|
|
|
3191
3191
|
}),
|
|
3192
3192
|
g[25] || (g[25] = D("p", { class: "text-xs text-muted-foreground mb-2" }, " Only rows that match the conditions will be included in the calculation of the stat. ", -1)),
|
|
3193
3193
|
u.conditions?.length > 0 ? (R(), k("div", il, [
|
|
3194
|
-
(R(!0), k(U, null,
|
|
3194
|
+
(R(!0), k(U, null, te(u.conditions, (x) => (R(), k("div", {
|
|
3195
3195
|
key: x.id,
|
|
3196
3196
|
class: "grid grid-cols-13 gap-2"
|
|
3197
3197
|
}, [
|
|
3198
|
-
r(
|
|
3198
|
+
r(re, {
|
|
3199
3199
|
by: "label",
|
|
3200
3200
|
class: "col-span-4",
|
|
3201
3201
|
resetSearchTermOnBlur: !1,
|
|
@@ -3204,10 +3204,10 @@ const Do = (e, o = {}) => {
|
|
|
3204
3204
|
"onUpdate:modelValue": (L) => x.field = L
|
|
3205
3205
|
}, {
|
|
3206
3206
|
default: i(() => [
|
|
3207
|
-
r(
|
|
3207
|
+
r(oe, { class: "w-full" }, {
|
|
3208
3208
|
default: i(() => [
|
|
3209
3209
|
D("div", al, [
|
|
3210
|
-
r(
|
|
3210
|
+
r(Z, null, {
|
|
3211
3211
|
default: i(() => [
|
|
3212
3212
|
r(b, { class: "text-xs text-muted-foreground" }, {
|
|
3213
3213
|
default: i(() => [...g[14] || (g[14] = [
|
|
@@ -3218,7 +3218,7 @@ const Do = (e, o = {}) => {
|
|
|
3218
3218
|
]),
|
|
3219
3219
|
_: 1
|
|
3220
3220
|
}),
|
|
3221
|
-
r(
|
|
3221
|
+
r(le, {
|
|
3222
3222
|
modelValue: x.field,
|
|
3223
3223
|
"onUpdate:modelValue": (L) => x.field = L,
|
|
3224
3224
|
hideIcon: "",
|
|
@@ -3228,11 +3228,11 @@ const Do = (e, o = {}) => {
|
|
|
3228
3228
|
]),
|
|
3229
3229
|
_: 2
|
|
3230
3230
|
}, 1024),
|
|
3231
|
-
r(
|
|
3231
|
+
r(j, { class: "w-full" }, {
|
|
3232
3232
|
default: i(() => [
|
|
3233
|
-
r(
|
|
3233
|
+
r(A, null, {
|
|
3234
3234
|
default: i(() => [
|
|
3235
|
-
(R(!0), k(U, null,
|
|
3235
|
+
(R(!0), k(U, null, te(F(l), (L) => (R(), B(W, {
|
|
3236
3236
|
key: L.property,
|
|
3237
3237
|
value: L.property,
|
|
3238
3238
|
onSelect: () => {
|
|
@@ -3241,10 +3241,10 @@ const Do = (e, o = {}) => {
|
|
|
3241
3241
|
}, {
|
|
3242
3242
|
default: i(() => [
|
|
3243
3243
|
S(z(L.property) + " ", 1),
|
|
3244
|
-
x.field === L.property ? (R(), B(
|
|
3244
|
+
x.field === L.property ? (R(), B(F(He), {
|
|
3245
3245
|
key: 0,
|
|
3246
|
-
class:
|
|
3247
|
-
}, null, 8, ["class"])) :
|
|
3246
|
+
class: ie(F(Pe)("ml-auto size-4"))
|
|
3247
|
+
}, null, 8, ["class"])) : Y("", !0)
|
|
3248
3248
|
]),
|
|
3249
3249
|
_: 2
|
|
3250
3250
|
}, 1032, ["value", "onSelect"]))), 128))
|
|
@@ -3264,7 +3264,7 @@ const Do = (e, o = {}) => {
|
|
|
3264
3264
|
])]),
|
|
3265
3265
|
_: 1
|
|
3266
3266
|
}),
|
|
3267
|
-
r(
|
|
3267
|
+
r(J, {
|
|
3268
3268
|
modelValue: x.condition,
|
|
3269
3269
|
"onUpdate:modelValue": (L) => x.condition = L
|
|
3270
3270
|
}, {
|
|
@@ -3275,7 +3275,7 @@ const Do = (e, o = {}) => {
|
|
|
3275
3275
|
]),
|
|
3276
3276
|
_: 1
|
|
3277
3277
|
}),
|
|
3278
|
-
r(
|
|
3278
|
+
r(q, null, {
|
|
3279
3279
|
default: i(() => [
|
|
3280
3280
|
r(O, { value: "==" }, {
|
|
3281
3281
|
default: i(() => [...g[16] || (g[16] = [
|
|
@@ -3336,32 +3336,32 @@ const Do = (e, o = {}) => {
|
|
|
3336
3336
|
])]),
|
|
3337
3337
|
_: 1
|
|
3338
3338
|
}, 8, ["for"]),
|
|
3339
|
-
r(
|
|
3339
|
+
r(h, {
|
|
3340
3340
|
modelValue: x.value,
|
|
3341
3341
|
"onUpdate:modelValue": (L) => x.value = L,
|
|
3342
3342
|
class: "w-full",
|
|
3343
3343
|
id: x.id + "_value"
|
|
3344
3344
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "id"])
|
|
3345
3345
|
]),
|
|
3346
|
-
r(
|
|
3346
|
+
r(ae, {
|
|
3347
3347
|
variant: "ghost",
|
|
3348
3348
|
size: "icon",
|
|
3349
3349
|
class: "rounded-xl self-end col-span-1",
|
|
3350
3350
|
onClick: (L) => y(x.id)
|
|
3351
3351
|
}, {
|
|
3352
3352
|
default: i(() => [
|
|
3353
|
-
r(
|
|
3353
|
+
r(F(Xt), { class: "size-4" })
|
|
3354
3354
|
]),
|
|
3355
3355
|
_: 1
|
|
3356
3356
|
}, 8, ["onClick"])
|
|
3357
3357
|
]))), 128))
|
|
3358
|
-
])) :
|
|
3359
|
-
r(
|
|
3358
|
+
])) : Y("", !0),
|
|
3359
|
+
r(ae, {
|
|
3360
3360
|
variant: "outline",
|
|
3361
3361
|
onClick: w
|
|
3362
3362
|
}, {
|
|
3363
3363
|
default: i(() => [
|
|
3364
|
-
r(
|
|
3364
|
+
r(F(Fe), { class: "size-4" }),
|
|
3365
3365
|
g[24] || (g[24] = S(" Add Condition ", -1))
|
|
3366
3366
|
]),
|
|
3367
3367
|
_: 1
|
|
@@ -3369,7 +3369,7 @@ const Do = (e, o = {}) => {
|
|
|
3369
3369
|
]),
|
|
3370
3370
|
r(ye, null, {
|
|
3371
3371
|
default: i(() => [
|
|
3372
|
-
a.value === "edit" ? (R(), B(
|
|
3372
|
+
a.value === "edit" ? (R(), B(ae, {
|
|
3373
3373
|
key: 0,
|
|
3374
3374
|
variant: "destructive",
|
|
3375
3375
|
onClick: p
|
|
@@ -3378,8 +3378,8 @@ const Do = (e, o = {}) => {
|
|
|
3378
3378
|
S(" Remove Stat ", -1)
|
|
3379
3379
|
])]),
|
|
3380
3380
|
_: 1
|
|
3381
|
-
})) :
|
|
3382
|
-
r(
|
|
3381
|
+
})) : Y("", !0),
|
|
3382
|
+
r(ae, { onClick: m }, {
|
|
3383
3383
|
default: i(() => [
|
|
3384
3384
|
S(z(a.value === "add" ? "Add Stat" : "Save changes"), 1)
|
|
3385
3385
|
]),
|
|
@@ -3396,16 +3396,16 @@ const Do = (e, o = {}) => {
|
|
|
3396
3396
|
}, 8, ["open"]);
|
|
3397
3397
|
};
|
|
3398
3398
|
}
|
|
3399
|
-
}), pl = { class: "flex flex-wrap gap-2 mb-4" }, cl = ["onClick"], fl = { class: "text-2xl font-bold" }, ml = { class: "text-xs text-muted-foreground truncate w-full text-center" }, vl = /* @__PURE__ */
|
|
3399
|
+
}), pl = { class: "flex flex-wrap gap-2 mb-4" }, cl = ["onClick"], fl = { class: "text-2xl font-bold" }, ml = { class: "text-xs text-muted-foreground truncate w-full text-center" }, vl = /* @__PURE__ */ ne({
|
|
3400
3400
|
__name: "Stats",
|
|
3401
3401
|
setup(e) {
|
|
3402
|
-
const o =
|
|
3403
|
-
let
|
|
3404
|
-
(!a.value || a?.value?.length === 0) && (a.value = []), a.value.push({ ...b, id:
|
|
3402
|
+
const o = K("data"), { isAdmin: t } = ve(), { getModuleData: n, setModuleData: l } = xe(), s = T(), a = T([]), d = (b) => {
|
|
3403
|
+
let h = crypto.randomUUID();
|
|
3404
|
+
(!a.value || a?.value?.length === 0) && (a.value = []), a.value.push({ ...b, id: h }), l("stats", a.value);
|
|
3405
3405
|
}, u = (b) => {
|
|
3406
|
-
a.value = a.value.map((
|
|
3406
|
+
a.value = a.value.map((h) => h.id === b.id ? b : h), l("stats", a.value);
|
|
3407
3407
|
}, f = (b) => {
|
|
3408
|
-
a.value = a.value.filter((
|
|
3408
|
+
a.value = a.value.filter((h) => h.id !== b), l("stats", a.value);
|
|
3409
3409
|
}, w = (b) => {
|
|
3410
3410
|
switch (b.method) {
|
|
3411
3411
|
case "count":
|
|
@@ -3423,78 +3423,78 @@ const Do = (e, o = {}) => {
|
|
|
3423
3423
|
}
|
|
3424
3424
|
}, y = (b) => {
|
|
3425
3425
|
if (b) {
|
|
3426
|
-
let
|
|
3427
|
-
return
|
|
3426
|
+
let h = parseFloat(b).toFixed(2).split(".");
|
|
3427
|
+
return h[0] = h[0].replace(/\B(?=(\d{3})+(?!\d))/g, " "), !h[1] || h[1] == "00" ? h[0] : h.join(".");
|
|
3428
3428
|
}
|
|
3429
3429
|
return "...";
|
|
3430
|
-
}, m = (b) =>
|
|
3430
|
+
}, m = (b) => V(b)?.length, p = (b, h) => {
|
|
3431
3431
|
let M = 0;
|
|
3432
|
-
return h
|
|
3432
|
+
return V(h).forEach((I) => {
|
|
3433
3433
|
M += parseFloat(c(I, b)) ? parseFloat(String(c(I, b)).replace(",", ".")) : c(I, b) === !0 ? 1 : 0;
|
|
3434
3434
|
}), M.toFixed(2).slice(-2) == "00" ? M.toFixed(0) : M.toFixed(2);
|
|
3435
|
-
}, C = (b,
|
|
3435
|
+
}, C = (b, h) => {
|
|
3436
3436
|
let M = 0, I = 0;
|
|
3437
|
-
if (h
|
|
3437
|
+
if (V(h).forEach((O) => {
|
|
3438
3438
|
parseFloat(c(O, b)) && (M += parseFloat(String(c(O, b)).replace(",", ".")), I += 1);
|
|
3439
3439
|
}), I > 0) {
|
|
3440
3440
|
const O = M / I;
|
|
3441
3441
|
return O.toFixed(2).slice(-2) == "00" ? O.toFixed(0) : O.toFixed(2);
|
|
3442
3442
|
}
|
|
3443
3443
|
return "...";
|
|
3444
|
-
}, g = (b,
|
|
3445
|
-
let M = h
|
|
3446
|
-
return h
|
|
3444
|
+
}, g = (b, h) => {
|
|
3445
|
+
let M = V(h)[0][b];
|
|
3446
|
+
return V(h).forEach((I) => {
|
|
3447
3447
|
c(I, b) < M && (M = c(I, b));
|
|
3448
3448
|
}), M;
|
|
3449
|
-
}, _ = (b,
|
|
3450
|
-
let M = h
|
|
3451
|
-
return h
|
|
3449
|
+
}, _ = (b, h) => {
|
|
3450
|
+
let M = V(h)[0][b];
|
|
3451
|
+
return V(h).forEach((I) => {
|
|
3452
3452
|
parseFloat(c(I, b)) && c(I, b) > M && (M = c(I, b));
|
|
3453
3453
|
}), parseFloat(String(M).replace(",", ".")).toFixed(2);
|
|
3454
|
-
}, c = (b,
|
|
3455
|
-
if (!b || !
|
|
3456
|
-
const [M, ...I] =
|
|
3457
|
-
return I?.length ? c(b[M], I.join(".")) : b[
|
|
3458
|
-
},
|
|
3459
|
-
let
|
|
3454
|
+
}, c = (b, h) => {
|
|
3455
|
+
if (!b || !h) return;
|
|
3456
|
+
const [M, ...I] = h.split(".");
|
|
3457
|
+
return I?.length ? c(b[M], I.join(".")) : b[h] ?? "";
|
|
3458
|
+
}, V = (b) => {
|
|
3459
|
+
let h = [...o.value];
|
|
3460
3460
|
if (Array.isArray(b))
|
|
3461
3461
|
for (let M = 0; M < b?.length; M++)
|
|
3462
|
-
b[M].condition == "==" ?
|
|
3463
|
-
return
|
|
3462
|
+
b[M].condition == "==" ? h = h.filter((I) => b[M].value?.split(",").indexOf(I[b[M].field]) != -1) : b[M].condition == "!=" ? h = h.filter((I) => b[M].value?.split(",").indexOf(I[b[M].field]) == -1) : b[M].condition == ">" ? h = h.filter((I) => I[b[M].field] > b[M].value) : b[M].condition == ">=" ? h = h.filter((I) => I[b[M].field] >= b[M].value) : b[M].condition == "<" ? h = h.filter((I) => I[b[M].field] < b[M].value) : b[M].condition == "<=" ? h = h.filter((I) => I[b[M].field] <= b[M].value) : b[M].condition == "in" && (h = h.filter((I) => b[M].value?.indexOf(String(I[b[M].field])) != -1));
|
|
3463
|
+
return h;
|
|
3464
3464
|
};
|
|
3465
3465
|
return ke(async () => {
|
|
3466
3466
|
a.value = await n("stats") || [];
|
|
3467
|
-
}), (b,
|
|
3467
|
+
}), (b, h) => (R(), k(U, null, [
|
|
3468
3468
|
D("div", pl, [
|
|
3469
|
-
(R(!0), k(U, null,
|
|
3469
|
+
(R(!0), k(U, null, te(a.value, (M) => (R(), k("div", {
|
|
3470
3470
|
key: M.label,
|
|
3471
|
-
class:
|
|
3472
|
-
onClick: (I) =>
|
|
3471
|
+
class: ie(["flex flex-col items-center justify-center size-24 p-4 border rounded-md", F(t)() ? "hover:bg-muted cursor-pointer" : ""]),
|
|
3472
|
+
onClick: (I) => F(t)() ? s.value.openDialog(M) : null
|
|
3473
3473
|
}, [
|
|
3474
|
-
D("span", fl, z(
|
|
3474
|
+
D("span", fl, z(F(o)?.length > 0 ? y(w(M)) : "..."), 1),
|
|
3475
3475
|
D("span", ml, z(M.label), 1)
|
|
3476
3476
|
], 10, cl))), 128)),
|
|
3477
|
-
|
|
3477
|
+
F(t)() ? (R(), k("div", {
|
|
3478
3478
|
key: 0,
|
|
3479
3479
|
class: "flex flex-col items-center justify-center size-24 p-4 border rounded-md hover:bg-muted cursor-pointer",
|
|
3480
|
-
onClick:
|
|
3480
|
+
onClick: h[0] || (h[0] = (M) => s.value.openDialog())
|
|
3481
3481
|
}, [
|
|
3482
|
-
r(
|
|
3483
|
-
])) :
|
|
3482
|
+
r(F(Fe), { class: "size-8 text-primary" })
|
|
3483
|
+
])) : Y("", !0)
|
|
3484
3484
|
]),
|
|
3485
3485
|
r(gl, {
|
|
3486
3486
|
ref_key: "statDialog",
|
|
3487
3487
|
ref: s,
|
|
3488
|
-
onStatAdded:
|
|
3489
|
-
onStatEdited:
|
|
3490
|
-
onStatRemoved:
|
|
3488
|
+
onStatAdded: h[1] || (h[1] = (M) => d(M)),
|
|
3489
|
+
onStatEdited: h[2] || (h[2] = (M) => u(M)),
|
|
3490
|
+
onStatRemoved: h[3] || (h[3] = (M) => f(M))
|
|
3491
3491
|
}, null, 512)
|
|
3492
3492
|
], 64));
|
|
3493
3493
|
}
|
|
3494
3494
|
}), _l = { class: "grid gap-4 p-4 bg-muted/20 rounded-lg" }, Cl = { class: "grid grid-cols-5 items-center gap-4" }, Sl = { class: "grid grid-cols-5 items-center gap-4" }, wl = { class: "grid grid-cols-5 items-center gap-4" }, xl = { class: "grid grid-cols-5 items-center gap-4" }, yl = { class: "grid grid-cols-5 items-center gap-4" }, Rl = { class: "grid grid-cols-5 items-center gap-4" }, bl = {
|
|
3495
3495
|
key: 0,
|
|
3496
3496
|
class: "grid grid-cols-5 items-center gap-4"
|
|
3497
|
-
}, Dl = { class: "grid grid-cols-5 items-center gap-4" },
|
|
3497
|
+
}, Dl = { class: "grid grid-cols-5 items-center gap-4" }, Fl = /* @__PURE__ */ ne({
|
|
3498
3498
|
__name: "DialogTableColumnItem",
|
|
3499
3499
|
props: {
|
|
3500
3500
|
column: {
|
|
@@ -3510,7 +3510,7 @@ const Do = (e, o = {}) => {
|
|
|
3510
3510
|
}, {
|
|
3511
3511
|
default: i(() => [
|
|
3512
3512
|
r(n, {
|
|
3513
|
-
class:
|
|
3513
|
+
class: ie({ "line-through hover:line-through text-red-400": e.column._remove })
|
|
3514
3514
|
}, {
|
|
3515
3515
|
default: i(() => [
|
|
3516
3516
|
S(z(e.column.label), 1)
|
|
@@ -3521,7 +3521,7 @@ const Do = (e, o = {}) => {
|
|
|
3521
3521
|
default: i(() => [
|
|
3522
3522
|
D("div", _l, [
|
|
3523
3523
|
D("div", {
|
|
3524
|
-
class:
|
|
3524
|
+
class: ie(["grid gap-4", { "opacity-40 pointer-events-none": e.column._remove }])
|
|
3525
3525
|
}, [
|
|
3526
3526
|
D("div", Cl, [
|
|
3527
3527
|
r(l, {
|
|
@@ -3746,7 +3746,7 @@ const Do = (e, o = {}) => {
|
|
|
3746
3746
|
"onUpdate:modelValue": t[6] || (t[6] = (c) => e.column.infoTooltipText = c),
|
|
3747
3747
|
tabindex: e.column._remove ? -1 : 0
|
|
3748
3748
|
}, null, 8, ["modelValue", "tabindex"])
|
|
3749
|
-
])) :
|
|
3749
|
+
])) : Y("", !0)
|
|
3750
3750
|
], 2),
|
|
3751
3751
|
D("div", Dl, [
|
|
3752
3752
|
r(l, { class: "text-right col-span-2" }, {
|
|
@@ -3786,10 +3786,10 @@ const Do = (e, o = {}) => {
|
|
|
3786
3786
|
}, 8, ["value"]);
|
|
3787
3787
|
};
|
|
3788
3788
|
}
|
|
3789
|
-
}),
|
|
3789
|
+
}), Vl = { class: "flex flex-col items-start gap-4 py-4" }, hl = { class: "grid gap-4" }, $l = { class: "grid grid-cols-5 items-center gap-4" }, Ml = { class: "grid grid-cols-5 items-center gap-4" }, Il = { class: "grid grid-cols-5 items-center gap-4" }, Pl = { class: "grid grid-cols-5 items-center gap-4" }, kl = { class: "grid grid-cols-5 items-center gap-4" }, Al = { class: "grid grid-cols-5 items-center gap-4" }, Tl = {
|
|
3790
3790
|
key: 0,
|
|
3791
3791
|
class: "grid grid-cols-5 items-center gap-4"
|
|
3792
|
-
}, El = { class: "flex justify-end gap-2" }, Ll = { class: "absolute left-0 top-0 bottom-0 flex flex-col justify-center gap-1 z-10 opacity-0 group-hover:opacity-100 transition-opacity" }, zl = /* @__PURE__ */
|
|
3792
|
+
}, El = { class: "flex justify-end gap-2" }, Ll = { class: "absolute left-0 top-0 bottom-0 flex flex-col justify-center gap-1 z-10 opacity-0 group-hover:opacity-100 transition-opacity" }, zl = /* @__PURE__ */ ne({
|
|
3793
3793
|
__name: "ColumnEditorDialog",
|
|
3794
3794
|
props: {
|
|
3795
3795
|
open: {
|
|
@@ -3807,7 +3807,7 @@ const Do = (e, o = {}) => {
|
|
|
3807
3807
|
},
|
|
3808
3808
|
emits: ["update:open"],
|
|
3809
3809
|
setup(e, { emit: o }) {
|
|
3810
|
-
const { setModuleData: t } = xe(), n = e, l = o, s =
|
|
3810
|
+
const { setModuleData: t } = xe(), n = e, l = o, s = K("columns"), a = T([]), d = be({
|
|
3811
3811
|
get() {
|
|
3812
3812
|
return n.open;
|
|
3813
3813
|
},
|
|
@@ -3826,7 +3826,7 @@ const Do = (e, o = {}) => {
|
|
|
3826
3826
|
showInCompactMode: !1,
|
|
3827
3827
|
showInfoButton: !1,
|
|
3828
3828
|
infoTooltipText: ""
|
|
3829
|
-
}), f =
|
|
3829
|
+
}), f = T(!1), w = () => {
|
|
3830
3830
|
f.value = !1, u.property = "", u.label = "", u.visible = !0, u.type = "text", u.showInCompactMode = !1, u.showInfoButton = !1, u.infoTooltipText = "";
|
|
3831
3831
|
}, y = () => {
|
|
3832
3832
|
a.value || (a.value = []);
|
|
@@ -3846,7 +3846,7 @@ const Do = (e, o = {}) => {
|
|
|
3846
3846
|
a.value = a.value.filter((g) => !g._remove), t("columns", a.value), s.value = a.value, w(), d.value = !1;
|
|
3847
3847
|
};
|
|
3848
3848
|
return (g, _) => {
|
|
3849
|
-
const c = v("DropdownMenuItem"),
|
|
3849
|
+
const c = v("DropdownMenuItem"), V = v("DialogTrigger"), b = v("DialogTitle"), h = v("DialogDescription"), M = v("DialogHeader"), I = v("Button"), O = v("PopoverTrigger"), q = v("Label"), J = v("Input"), Z = v("Checkbox"), le = v("SelectValue"), oe = v("SelectTrigger"), W = v("SelectLabel"), A = v("SelectItem"), j = v("SelectGroup"), re = v("SelectContent"), ae = v("Select"), ye = v("PopoverContent"), _e = v("Popover"), E = v("Accordion"), x = v("DialogFooter"), L = v("DialogScrollContent"), $ = v("Dialog");
|
|
3850
3850
|
return R(), B($, {
|
|
3851
3851
|
open: d.value,
|
|
3852
3852
|
"onUpdate:open": [
|
|
@@ -3855,7 +3855,7 @@ const Do = (e, o = {}) => {
|
|
|
3855
3855
|
]
|
|
3856
3856
|
}, {
|
|
3857
3857
|
default: i(() => [
|
|
3858
|
-
r(
|
|
3858
|
+
r(V, { asChild: "" }, {
|
|
3859
3859
|
default: i(() => [
|
|
3860
3860
|
r(c, {
|
|
3861
3861
|
onSelect: _[0] || (_[0] = (P) => {
|
|
@@ -3880,7 +3880,7 @@ const Do = (e, o = {}) => {
|
|
|
3880
3880
|
])]),
|
|
3881
3881
|
_: 1
|
|
3882
3882
|
}),
|
|
3883
|
-
r(
|
|
3883
|
+
r(h, null, {
|
|
3884
3884
|
default: i(() => [..._[12] || (_[12] = [
|
|
3885
3885
|
S(" Define all columns for this table. ", -1)
|
|
3886
3886
|
])]),
|
|
@@ -3889,7 +3889,7 @@ const Do = (e, o = {}) => {
|
|
|
3889
3889
|
]),
|
|
3890
3890
|
_: 1
|
|
3891
3891
|
}),
|
|
3892
|
-
D("div",
|
|
3892
|
+
D("div", Vl, [
|
|
3893
3893
|
r(_e, {
|
|
3894
3894
|
open: f.value,
|
|
3895
3895
|
"onUpdate:open": _[8] || (_[8] = (P) => f.value = P)
|
|
@@ -3899,7 +3899,7 @@ const Do = (e, o = {}) => {
|
|
|
3899
3899
|
default: i(() => [
|
|
3900
3900
|
r(I, { variant: "outline" }, {
|
|
3901
3901
|
default: i(() => [
|
|
3902
|
-
r(
|
|
3902
|
+
r(F(Fe), { class: "mr-2 size-4" }),
|
|
3903
3903
|
_[13] || (_[13] = S(" Add column ", -1))
|
|
3904
3904
|
]),
|
|
3905
3905
|
_: 1
|
|
@@ -3911,7 +3911,7 @@ const Do = (e, o = {}) => {
|
|
|
3911
3911
|
default: i(() => [
|
|
3912
3912
|
D("div", hl, [
|
|
3913
3913
|
D("div", $l, [
|
|
3914
|
-
r(
|
|
3914
|
+
r(q, {
|
|
3915
3915
|
for: "property",
|
|
3916
3916
|
class: "text-right col-span-2"
|
|
3917
3917
|
}, {
|
|
@@ -3920,7 +3920,7 @@ const Do = (e, o = {}) => {
|
|
|
3920
3920
|
])]),
|
|
3921
3921
|
_: 1
|
|
3922
3922
|
}),
|
|
3923
|
-
r(
|
|
3923
|
+
r(J, {
|
|
3924
3924
|
id: "property",
|
|
3925
3925
|
class: "col-span-3",
|
|
3926
3926
|
modelValue: u.property,
|
|
@@ -3928,7 +3928,7 @@ const Do = (e, o = {}) => {
|
|
|
3928
3928
|
}, null, 8, ["modelValue"])
|
|
3929
3929
|
]),
|
|
3930
3930
|
D("div", Ml, [
|
|
3931
|
-
r(
|
|
3931
|
+
r(q, {
|
|
3932
3932
|
for: "label",
|
|
3933
3933
|
class: "text-right col-span-2"
|
|
3934
3934
|
}, {
|
|
@@ -3937,7 +3937,7 @@ const Do = (e, o = {}) => {
|
|
|
3937
3937
|
])]),
|
|
3938
3938
|
_: 1
|
|
3939
3939
|
}),
|
|
3940
|
-
r(
|
|
3940
|
+
r(J, {
|
|
3941
3941
|
id: "label",
|
|
3942
3942
|
class: "col-span-3",
|
|
3943
3943
|
modelValue: u.label,
|
|
@@ -3945,7 +3945,7 @@ const Do = (e, o = {}) => {
|
|
|
3945
3945
|
}, null, 8, ["modelValue"])
|
|
3946
3946
|
]),
|
|
3947
3947
|
D("div", Il, [
|
|
3948
|
-
r(
|
|
3948
|
+
r(q, {
|
|
3949
3949
|
for: "visible",
|
|
3950
3950
|
class: "text-right col-span-2"
|
|
3951
3951
|
}, {
|
|
@@ -3954,7 +3954,7 @@ const Do = (e, o = {}) => {
|
|
|
3954
3954
|
])]),
|
|
3955
3955
|
_: 1
|
|
3956
3956
|
}),
|
|
3957
|
-
r(
|
|
3957
|
+
r(Z, {
|
|
3958
3958
|
id: "visible",
|
|
3959
3959
|
class: "col-span-3 border-ring",
|
|
3960
3960
|
modelValue: u.visible,
|
|
@@ -3962,7 +3962,7 @@ const Do = (e, o = {}) => {
|
|
|
3962
3962
|
}, null, 8, ["modelValue"])
|
|
3963
3963
|
]),
|
|
3964
3964
|
D("div", Pl, [
|
|
3965
|
-
r(
|
|
3965
|
+
r(q, {
|
|
3966
3966
|
for: "type",
|
|
3967
3967
|
class: "text-right col-span-2"
|
|
3968
3968
|
}, {
|
|
@@ -3971,94 +3971,94 @@ const Do = (e, o = {}) => {
|
|
|
3971
3971
|
])]),
|
|
3972
3972
|
_: 1
|
|
3973
3973
|
}),
|
|
3974
|
-
r(
|
|
3974
|
+
r(ae, {
|
|
3975
3975
|
modelValue: u.type,
|
|
3976
3976
|
"onUpdate:modelValue": _[4] || (_[4] = (P) => u.type = P)
|
|
3977
3977
|
}, {
|
|
3978
3978
|
default: i(() => [
|
|
3979
|
-
r(
|
|
3979
|
+
r(oe, { class: "w-[180px]" }, {
|
|
3980
3980
|
default: i(() => [
|
|
3981
|
-
r(
|
|
3981
|
+
r(le, { placeholder: "Select a type" })
|
|
3982
3982
|
]),
|
|
3983
3983
|
_: 1
|
|
3984
3984
|
}),
|
|
3985
|
-
r(
|
|
3985
|
+
r(re, null, {
|
|
3986
3986
|
default: i(() => [
|
|
3987
|
-
r(
|
|
3987
|
+
r(j, null, {
|
|
3988
3988
|
default: i(() => [
|
|
3989
|
-
r(
|
|
3989
|
+
r(W, null, {
|
|
3990
3990
|
default: i(() => [..._[18] || (_[18] = [
|
|
3991
3991
|
S("Types", -1)
|
|
3992
3992
|
])]),
|
|
3993
3993
|
_: 1
|
|
3994
3994
|
}),
|
|
3995
|
-
r(
|
|
3995
|
+
r(A, { value: "text" }, {
|
|
3996
3996
|
default: i(() => [..._[19] || (_[19] = [
|
|
3997
3997
|
S(" Text ", -1)
|
|
3998
3998
|
])]),
|
|
3999
3999
|
_: 1
|
|
4000
4000
|
}),
|
|
4001
|
-
r(
|
|
4001
|
+
r(A, { value: "number" }, {
|
|
4002
4002
|
default: i(() => [..._[20] || (_[20] = [
|
|
4003
4003
|
S(" Number ", -1)
|
|
4004
4004
|
])]),
|
|
4005
4005
|
_: 1
|
|
4006
4006
|
}),
|
|
4007
|
-
r(
|
|
4007
|
+
r(A, { value: "date" }, {
|
|
4008
4008
|
default: i(() => [..._[21] || (_[21] = [
|
|
4009
4009
|
S(" Date ", -1)
|
|
4010
4010
|
])]),
|
|
4011
4011
|
_: 1
|
|
4012
4012
|
}),
|
|
4013
|
-
r(
|
|
4013
|
+
r(A, { value: "datetime" }, {
|
|
4014
4014
|
default: i(() => [..._[22] || (_[22] = [
|
|
4015
4015
|
S(" Datetime ", -1)
|
|
4016
4016
|
])]),
|
|
4017
4017
|
_: 1
|
|
4018
4018
|
}),
|
|
4019
|
-
r(
|
|
4019
|
+
r(A, { value: "boolean" }, {
|
|
4020
4020
|
default: i(() => [..._[23] || (_[23] = [
|
|
4021
4021
|
S(" Boolean ", -1)
|
|
4022
4022
|
])]),
|
|
4023
4023
|
_: 1
|
|
4024
4024
|
}),
|
|
4025
|
-
r(
|
|
4025
|
+
r(A, { value: "URL" }, {
|
|
4026
4026
|
default: i(() => [..._[24] || (_[24] = [
|
|
4027
4027
|
S(" URL ", -1)
|
|
4028
4028
|
])]),
|
|
4029
4029
|
_: 1
|
|
4030
4030
|
}),
|
|
4031
|
-
r(
|
|
4031
|
+
r(A, { value: "email" }, {
|
|
4032
4032
|
default: i(() => [..._[25] || (_[25] = [
|
|
4033
4033
|
S(" Email ", -1)
|
|
4034
4034
|
])]),
|
|
4035
4035
|
_: 1
|
|
4036
4036
|
}),
|
|
4037
|
-
r(
|
|
4037
|
+
r(A, { value: "phone" }, {
|
|
4038
4038
|
default: i(() => [..._[26] || (_[26] = [
|
|
4039
4039
|
S(" Phone ", -1)
|
|
4040
4040
|
])]),
|
|
4041
4041
|
_: 1
|
|
4042
4042
|
}),
|
|
4043
|
-
r(
|
|
4043
|
+
r(A, { value: "currency" }, {
|
|
4044
4044
|
default: i(() => [..._[27] || (_[27] = [
|
|
4045
4045
|
S(" Currency ", -1)
|
|
4046
4046
|
])]),
|
|
4047
4047
|
_: 1
|
|
4048
4048
|
}),
|
|
4049
|
-
r(
|
|
4049
|
+
r(A, { value: "image" }, {
|
|
4050
4050
|
default: i(() => [..._[28] || (_[28] = [
|
|
4051
4051
|
S(" Image ", -1)
|
|
4052
4052
|
])]),
|
|
4053
4053
|
_: 1
|
|
4054
4054
|
}),
|
|
4055
|
-
r(
|
|
4055
|
+
r(A, { value: "array" }, {
|
|
4056
4056
|
default: i(() => [..._[29] || (_[29] = [
|
|
4057
4057
|
S(" Array ", -1)
|
|
4058
4058
|
])]),
|
|
4059
4059
|
_: 1
|
|
4060
4060
|
}),
|
|
4061
|
-
r(
|
|
4061
|
+
r(A, { value: "html" }, {
|
|
4062
4062
|
default: i(() => [..._[30] || (_[30] = [
|
|
4063
4063
|
S(" HTML (innerText) ", -1)
|
|
4064
4064
|
])]),
|
|
@@ -4075,7 +4075,7 @@ const Do = (e, o = {}) => {
|
|
|
4075
4075
|
}, 8, ["modelValue"])
|
|
4076
4076
|
]),
|
|
4077
4077
|
D("div", kl, [
|
|
4078
|
-
r(
|
|
4078
|
+
r(q, {
|
|
4079
4079
|
for: "showInCompactMode",
|
|
4080
4080
|
class: "text-right col-span-2"
|
|
4081
4081
|
}, {
|
|
@@ -4084,7 +4084,7 @@ const Do = (e, o = {}) => {
|
|
|
4084
4084
|
])]),
|
|
4085
4085
|
_: 1
|
|
4086
4086
|
}),
|
|
4087
|
-
r(
|
|
4087
|
+
r(Z, {
|
|
4088
4088
|
id: "showInCompactMode",
|
|
4089
4089
|
class: "col-span-3 border-ring",
|
|
4090
4090
|
modelValue: u.showInCompactMode,
|
|
@@ -4092,7 +4092,7 @@ const Do = (e, o = {}) => {
|
|
|
4092
4092
|
}, null, 8, ["modelValue"])
|
|
4093
4093
|
]),
|
|
4094
4094
|
D("div", Al, [
|
|
4095
|
-
r(
|
|
4095
|
+
r(q, {
|
|
4096
4096
|
for: "showInfoButton",
|
|
4097
4097
|
class: "text-right col-span-2"
|
|
4098
4098
|
}, {
|
|
@@ -4101,7 +4101,7 @@ const Do = (e, o = {}) => {
|
|
|
4101
4101
|
])]),
|
|
4102
4102
|
_: 1
|
|
4103
4103
|
}),
|
|
4104
|
-
r(
|
|
4104
|
+
r(Z, {
|
|
4105
4105
|
id: "showInfoButton",
|
|
4106
4106
|
class: "col-span-3 border-ring",
|
|
4107
4107
|
modelValue: u.showInfoButton,
|
|
@@ -4109,7 +4109,7 @@ const Do = (e, o = {}) => {
|
|
|
4109
4109
|
}, null, 8, ["modelValue"])
|
|
4110
4110
|
]),
|
|
4111
4111
|
u.showInfoButton ? (R(), k("div", Tl, [
|
|
4112
|
-
r(
|
|
4112
|
+
r(q, {
|
|
4113
4113
|
for: "infoTooltipText",
|
|
4114
4114
|
class: "text-right col-span-2"
|
|
4115
4115
|
}, {
|
|
@@ -4118,13 +4118,13 @@ const Do = (e, o = {}) => {
|
|
|
4118
4118
|
])]),
|
|
4119
4119
|
_: 1
|
|
4120
4120
|
}),
|
|
4121
|
-
r(
|
|
4121
|
+
r(J, {
|
|
4122
4122
|
id: "infoTooltipText",
|
|
4123
4123
|
class: "col-span-3",
|
|
4124
4124
|
modelValue: u.infoTooltipText,
|
|
4125
4125
|
"onUpdate:modelValue": _[7] || (_[7] = (P) => u.infoTooltipText = P)
|
|
4126
4126
|
}, null, 8, ["modelValue"])
|
|
4127
|
-
])) :
|
|
4127
|
+
])) : Y("", !0),
|
|
4128
4128
|
D("div", El, [
|
|
4129
4129
|
r(I, {
|
|
4130
4130
|
variant: "outline",
|
|
@@ -4150,13 +4150,13 @@ const Do = (e, o = {}) => {
|
|
|
4150
4150
|
_: 1
|
|
4151
4151
|
}, 8, ["open"])
|
|
4152
4152
|
]),
|
|
4153
|
-
r(
|
|
4153
|
+
r(E, {
|
|
4154
4154
|
type: "single",
|
|
4155
4155
|
collapsible: "",
|
|
4156
4156
|
class: "w-full"
|
|
4157
4157
|
}, {
|
|
4158
4158
|
default: i(() => [
|
|
4159
|
-
(R(!0), k(U, null,
|
|
4159
|
+
(R(!0), k(U, null, te(a.value, (P, N) => (R(), k("div", {
|
|
4160
4160
|
key: P.id,
|
|
4161
4161
|
class: "relative group"
|
|
4162
4162
|
}, [
|
|
@@ -4165,11 +4165,11 @@ const Do = (e, o = {}) => {
|
|
|
4165
4165
|
variant: "ghost",
|
|
4166
4166
|
size: "icon",
|
|
4167
4167
|
class: "h-6 w-6",
|
|
4168
|
-
onClick: (
|
|
4168
|
+
onClick: (ue) => m(N),
|
|
4169
4169
|
disabled: N === 0
|
|
4170
4170
|
}, {
|
|
4171
4171
|
default: i(() => [
|
|
4172
|
-
r(
|
|
4172
|
+
r(F(Jt), { class: "h-4 w-4" })
|
|
4173
4173
|
]),
|
|
4174
4174
|
_: 1
|
|
4175
4175
|
}, 8, ["onClick", "disabled"]),
|
|
@@ -4177,16 +4177,16 @@ const Do = (e, o = {}) => {
|
|
|
4177
4177
|
variant: "ghost",
|
|
4178
4178
|
size: "icon",
|
|
4179
4179
|
class: "h-6 w-6",
|
|
4180
|
-
onClick: (
|
|
4180
|
+
onClick: (ue) => p(N),
|
|
4181
4181
|
disabled: N === a.value.length - 1
|
|
4182
4182
|
}, {
|
|
4183
4183
|
default: i(() => [
|
|
4184
|
-
r(
|
|
4184
|
+
r(F(it), { class: "h-4 w-4" })
|
|
4185
4185
|
]),
|
|
4186
4186
|
_: 1
|
|
4187
4187
|
}, 8, ["onClick", "disabled"])
|
|
4188
4188
|
]),
|
|
4189
|
-
r(
|
|
4189
|
+
r(Fl, {
|
|
4190
4190
|
column: P,
|
|
4191
4191
|
class: "pl-10"
|
|
4192
4192
|
}, null, 8, ["column"])
|
|
@@ -4213,10 +4213,10 @@ const Do = (e, o = {}) => {
|
|
|
4213
4213
|
}, 8, ["open", "onUpdate:open"]);
|
|
4214
4214
|
};
|
|
4215
4215
|
}
|
|
4216
|
-
}), Hl = /* @__PURE__ */
|
|
4216
|
+
}), Hl = /* @__PURE__ */ ne({
|
|
4217
4217
|
__name: "ColumnDropdown",
|
|
4218
4218
|
setup(e) {
|
|
4219
|
-
const { isAdmin: o } = ve(), t =
|
|
4219
|
+
const { isAdmin: o } = ve(), t = K("columns"), n = T(null), l = T(null), s = T(!1), a = T(!1), d = () => {
|
|
4220
4220
|
l.value = n.value;
|
|
4221
4221
|
}, u = (w) => {
|
|
4222
4222
|
a.value = w, w || (s.value = !1);
|
|
@@ -4238,7 +4238,7 @@ const Do = (e, o = {}) => {
|
|
|
4238
4238
|
}, {
|
|
4239
4239
|
default: i(() => [
|
|
4240
4240
|
y[3] || (y[3] = S(" Columns ", -1)),
|
|
4241
|
-
r(
|
|
4241
|
+
r(F(it), { class: "ml-2 size-4" })
|
|
4242
4242
|
]),
|
|
4243
4243
|
_: 1
|
|
4244
4244
|
})
|
|
@@ -4247,33 +4247,33 @@ const Do = (e, o = {}) => {
|
|
|
4247
4247
|
}),
|
|
4248
4248
|
r(_, {
|
|
4249
4249
|
align: "end",
|
|
4250
|
-
onCloseAutoFocus: y[2] || (y[2] = (
|
|
4251
|
-
|
|
4250
|
+
onCloseAutoFocus: y[2] || (y[2] = (V) => {
|
|
4251
|
+
V.preventDefault();
|
|
4252
4252
|
})
|
|
4253
4253
|
}, {
|
|
4254
4254
|
default: i(() => [
|
|
4255
|
-
|
|
4255
|
+
F(o)() ? (R(), k(U, { key: 0 }, [
|
|
4256
4256
|
r(zl, {
|
|
4257
4257
|
open: a.value,
|
|
4258
|
-
"onUpdate:open": y[0] || (y[0] = (
|
|
4258
|
+
"onUpdate:open": y[0] || (y[0] = (V) => a.value = V),
|
|
4259
4259
|
onSelect: d,
|
|
4260
4260
|
onOpenChange: u
|
|
4261
4261
|
}, null, 8, ["open"]),
|
|
4262
|
-
|
|
4263
|
-
], 64)) :
|
|
4264
|
-
(R(!0), k(U, null,
|
|
4265
|
-
key:
|
|
4262
|
+
F(t)?.length > 0 ? (R(), B(C, { key: 0 })) : Y("", !0)
|
|
4263
|
+
], 64)) : Y("", !0),
|
|
4264
|
+
(R(!0), k(U, null, te(F(t), (V) => (R(), B(g, {
|
|
4265
|
+
key: V.id,
|
|
4266
4266
|
class: "capitalize",
|
|
4267
|
-
"model-value":
|
|
4267
|
+
"model-value": V.visible,
|
|
4268
4268
|
"onUpdate:modelValue": (b) => {
|
|
4269
|
-
|
|
4269
|
+
V.visible = b;
|
|
4270
4270
|
},
|
|
4271
4271
|
onSelect: y[1] || (y[1] = (b) => {
|
|
4272
4272
|
b.preventDefault();
|
|
4273
4273
|
})
|
|
4274
4274
|
}, {
|
|
4275
4275
|
default: i(() => [
|
|
4276
|
-
S(z(
|
|
4276
|
+
S(z(V.label), 1)
|
|
4277
4277
|
]),
|
|
4278
4278
|
_: 2
|
|
4279
4279
|
}, 1032, ["model-value", "onUpdate:modelValue"]))), 128))
|
|
@@ -4285,26 +4285,26 @@ const Do = (e, o = {}) => {
|
|
|
4285
4285
|
}, 8, ["open"]);
|
|
4286
4286
|
};
|
|
4287
4287
|
}
|
|
4288
|
-
}), Gl = /* @__PURE__ */
|
|
4288
|
+
}), Gl = /* @__PURE__ */ ne({
|
|
4289
4289
|
__name: "Search",
|
|
4290
4290
|
setup(e) {
|
|
4291
|
-
const o =
|
|
4291
|
+
const o = K("table"), t = K("sortMode");
|
|
4292
4292
|
return (n, l) => {
|
|
4293
4293
|
const s = v("Input");
|
|
4294
4294
|
return R(), k("div", {
|
|
4295
|
-
class:
|
|
4295
|
+
class: ie(["flex flex-col items-start gap-1", F(t) ? "opacity-50 pointer-events-none" : ""])
|
|
4296
4296
|
}, [
|
|
4297
4297
|
r(s, {
|
|
4298
4298
|
class: "min-w-48 max-w-48",
|
|
4299
4299
|
placeholder: "Search...",
|
|
4300
|
-
"model-value":
|
|
4301
|
-
"onUpdate:modelValue": l[0] || (l[0] = (a) =>
|
|
4302
|
-
disabled:
|
|
4300
|
+
"model-value": F(o)?.getState().globalFilter,
|
|
4301
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => F(o)?.setGlobalFilter(a)),
|
|
4302
|
+
disabled: F(t)
|
|
4303
4303
|
}, null, 8, ["model-value", "disabled"])
|
|
4304
4304
|
], 2);
|
|
4305
4305
|
};
|
|
4306
4306
|
}
|
|
4307
|
-
}), Ol = { class: "flex flex-col items-start gap-4 py-4" }, Bl = { class: "flex flex-col gap-1.5" }, Ul = { class: "flex items-center gap-2 w-full justify-between" }, Nl = { class: "flex items-center gap-2 ml-auto" }, jl = /* @__PURE__ */
|
|
4307
|
+
}), Ol = { class: "flex flex-col items-start gap-4 py-4" }, Bl = { class: "flex flex-col gap-1.5" }, Ul = { class: "flex items-center gap-2 w-full justify-between" }, Nl = { class: "flex items-center gap-2 ml-auto" }, jl = /* @__PURE__ */ ne({
|
|
4308
4308
|
__name: "SortModeSettingsDialog",
|
|
4309
4309
|
props: {
|
|
4310
4310
|
savedField: {
|
|
@@ -4316,7 +4316,7 @@ const Do = (e, o = {}) => {
|
|
|
4316
4316
|
setup(e, { emit: o }) {
|
|
4317
4317
|
const { isAdmin: t } = ve(), n = o, l = e, s = (m) => {
|
|
4318
4318
|
d.value = m;
|
|
4319
|
-
}, a =
|
|
4319
|
+
}, a = K("columns"), d = T(!1), u = T("");
|
|
4320
4320
|
Se(d, (m) => {
|
|
4321
4321
|
m && (u.value = l.savedField ?? "");
|
|
4322
4322
|
});
|
|
@@ -4328,26 +4328,26 @@ const Do = (e, o = {}) => {
|
|
|
4328
4328
|
n("saved", { field: u.value }), w();
|
|
4329
4329
|
};
|
|
4330
4330
|
return (m, p) => {
|
|
4331
|
-
const C = v("DialogTrigger"), g = v("DialogTitle"), _ = v("DialogDescription"), c = v("DialogHeader"),
|
|
4332
|
-
return R(), B(
|
|
4331
|
+
const C = v("DialogTrigger"), g = v("DialogTitle"), _ = v("DialogDescription"), c = v("DialogHeader"), V = v("Label"), b = v("ComboboxTrigger"), h = v("ComboboxInput"), M = v("ComboboxAnchor"), I = v("ComboboxItem"), O = v("ComboboxGroup"), q = v("ComboboxList"), J = v("Combobox"), Z = v("Button"), le = v("DialogFooter"), oe = v("DialogScrollContent"), W = v("Dialog");
|
|
4332
|
+
return R(), B(W, {
|
|
4333
4333
|
open: d.value,
|
|
4334
4334
|
"onUpdate:open": [
|
|
4335
|
-
p[3] || (p[3] = (
|
|
4335
|
+
p[3] || (p[3] = (A) => d.value = A),
|
|
4336
4336
|
s
|
|
4337
4337
|
]
|
|
4338
4338
|
}, {
|
|
4339
4339
|
default: i(() => [
|
|
4340
4340
|
r(C, { asChild: "" }, {
|
|
4341
4341
|
default: i(() => [
|
|
4342
|
-
|
|
4342
|
+
F(t)() ? (R(), k("button", {
|
|
4343
4343
|
key: 0,
|
|
4344
4344
|
class: "text-xs text-primary hover:underline",
|
|
4345
|
-
onClick: p[0] || (p[0] = (
|
|
4346
|
-
}, "Settings")) :
|
|
4345
|
+
onClick: p[0] || (p[0] = (A) => d.value = !0)
|
|
4346
|
+
}, "Settings")) : Y("", !0)
|
|
4347
4347
|
]),
|
|
4348
4348
|
_: 1
|
|
4349
4349
|
}),
|
|
4350
|
-
r(
|
|
4350
|
+
r(oe, { class: "sm:max-w-lg" }, {
|
|
4351
4351
|
default: i(() => [
|
|
4352
4352
|
r(c, null, {
|
|
4353
4353
|
default: i(() => [
|
|
@@ -4367,13 +4367,13 @@ const Do = (e, o = {}) => {
|
|
|
4367
4367
|
_: 1
|
|
4368
4368
|
}),
|
|
4369
4369
|
D("div", Ol, [
|
|
4370
|
-
r(
|
|
4370
|
+
r(J, {
|
|
4371
4371
|
by: "label",
|
|
4372
4372
|
class: "w-full",
|
|
4373
4373
|
resetSearchTermOnBlur: !1,
|
|
4374
4374
|
resetSearchTermOnSelect: !0,
|
|
4375
4375
|
modelValue: u.value,
|
|
4376
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
4376
|
+
"onUpdate:modelValue": p[2] || (p[2] = (A) => u.value = A)
|
|
4377
4377
|
}, {
|
|
4378
4378
|
default: i(() => [
|
|
4379
4379
|
r(M, { class: "w-full" }, {
|
|
@@ -4381,7 +4381,7 @@ const Do = (e, o = {}) => {
|
|
|
4381
4381
|
D("div", Bl, [
|
|
4382
4382
|
r(b, null, {
|
|
4383
4383
|
default: i(() => [
|
|
4384
|
-
r(
|
|
4384
|
+
r(V, { class: "text-xs text-muted-foreground" }, {
|
|
4385
4385
|
default: i(() => [...p[6] || (p[6] = [
|
|
4386
4386
|
S("Field", -1)
|
|
4387
4387
|
])]),
|
|
@@ -4390,9 +4390,9 @@ const Do = (e, o = {}) => {
|
|
|
4390
4390
|
]),
|
|
4391
4391
|
_: 1
|
|
4392
4392
|
}),
|
|
4393
|
-
r(
|
|
4393
|
+
r(h, {
|
|
4394
4394
|
modelValue: u.value,
|
|
4395
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
4395
|
+
"onUpdate:modelValue": p[1] || (p[1] = (A) => u.value = A),
|
|
4396
4396
|
hideIcon: "",
|
|
4397
4397
|
class: "w-full"
|
|
4398
4398
|
}, null, 8, ["modelValue"])
|
|
@@ -4400,21 +4400,21 @@ const Do = (e, o = {}) => {
|
|
|
4400
4400
|
]),
|
|
4401
4401
|
_: 1
|
|
4402
4402
|
}),
|
|
4403
|
-
r(
|
|
4403
|
+
r(q, { class: "w-full" }, {
|
|
4404
4404
|
default: i(() => [
|
|
4405
4405
|
r(O, null, {
|
|
4406
4406
|
default: i(() => [
|
|
4407
|
-
(R(!0), k(U, null,
|
|
4408
|
-
key:
|
|
4409
|
-
value:
|
|
4410
|
-
onSelect: (
|
|
4407
|
+
(R(!0), k(U, null, te(F(a), (A) => (R(), B(I, {
|
|
4408
|
+
key: A.property,
|
|
4409
|
+
value: A.property,
|
|
4410
|
+
onSelect: (j) => u.value = A.property
|
|
4411
4411
|
}, {
|
|
4412
4412
|
default: i(() => [
|
|
4413
|
-
S(z(
|
|
4414
|
-
u.value ===
|
|
4413
|
+
S(z(A.property) + " ", 1),
|
|
4414
|
+
u.value === A.property ? (R(), B(F(He), {
|
|
4415
4415
|
key: 0,
|
|
4416
|
-
class:
|
|
4417
|
-
}, null, 8, ["class"])) :
|
|
4416
|
+
class: ie(F(Pe)("ml-auto size-4"))
|
|
4417
|
+
}, null, 8, ["class"])) : Y("", !0)
|
|
4418
4418
|
]),
|
|
4419
4419
|
_: 2
|
|
4420
4420
|
}, 1032, ["value", "onSelect"]))), 128))
|
|
@@ -4428,10 +4428,10 @@ const Do = (e, o = {}) => {
|
|
|
4428
4428
|
_: 1
|
|
4429
4429
|
}, 8, ["modelValue"])
|
|
4430
4430
|
]),
|
|
4431
|
-
r(
|
|
4431
|
+
r(le, null, {
|
|
4432
4432
|
default: i(() => [
|
|
4433
4433
|
D("div", Ul, [
|
|
4434
|
-
l.savedField ? (R(), B(
|
|
4434
|
+
l.savedField ? (R(), B(Z, {
|
|
4435
4435
|
key: 0,
|
|
4436
4436
|
variant: "outline",
|
|
4437
4437
|
onClick: f
|
|
@@ -4440,9 +4440,9 @@ const Do = (e, o = {}) => {
|
|
|
4440
4440
|
S(" Disable sort-mode ", -1)
|
|
4441
4441
|
])]),
|
|
4442
4442
|
_: 1
|
|
4443
|
-
})) :
|
|
4443
|
+
})) : Y("", !0),
|
|
4444
4444
|
D("div", Nl, [
|
|
4445
|
-
r(
|
|
4445
|
+
r(Z, {
|
|
4446
4446
|
variant: "outline",
|
|
4447
4447
|
onClick: w
|
|
4448
4448
|
}, {
|
|
@@ -4451,7 +4451,7 @@ const Do = (e, o = {}) => {
|
|
|
4451
4451
|
])]),
|
|
4452
4452
|
_: 1
|
|
4453
4453
|
}),
|
|
4454
|
-
r(
|
|
4454
|
+
r(Z, { onClick: y }, {
|
|
4455
4455
|
default: i(() => [...p[9] || (p[9] = [
|
|
4456
4456
|
S(" Save changes ", -1)
|
|
4457
4457
|
])]),
|
|
@@ -4473,10 +4473,10 @@ const Do = (e, o = {}) => {
|
|
|
4473
4473
|
}), ql = { class: "flex flex-col items-start gap-1" }, Yl = {
|
|
4474
4474
|
key: 1,
|
|
4475
4475
|
class: "flex items-center gap-2"
|
|
4476
|
-
}, Kl = /* @__PURE__ */
|
|
4476
|
+
}, Kl = /* @__PURE__ */ ne({
|
|
4477
4477
|
__name: "SortMode",
|
|
4478
4478
|
setup(e) {
|
|
4479
|
-
const { getModuleData: o, setModuleData: t } = xe(), { isAdmin: n } = ve(), l =
|
|
4479
|
+
const { getModuleData: o, setModuleData: t } = xe(), { isAdmin: n } = ve(), l = K("table"), s = K("data"), a = K("sortMode", T(!1)), d = K("sortModeProperty", T("")), u = K("saveSortMode", () => {
|
|
4480
4480
|
}), f = (C) => {
|
|
4481
4481
|
d.value = C.field, t("sortMode", C);
|
|
4482
4482
|
};
|
|
@@ -4484,7 +4484,7 @@ const Do = (e, o = {}) => {
|
|
|
4484
4484
|
let C = await o("sortMode");
|
|
4485
4485
|
d.value = C?.field ?? "";
|
|
4486
4486
|
});
|
|
4487
|
-
const w =
|
|
4487
|
+
const w = T(0), y = () => {
|
|
4488
4488
|
a.value = !0, w.value = l?.value?.getState().pagination.pageSize, l?.value?.setPageSize(s.value.length);
|
|
4489
4489
|
}, m = () => {
|
|
4490
4490
|
a.value = !1, l?.value?.setPageSize(w.value);
|
|
@@ -4494,26 +4494,26 @@ const Do = (e, o = {}) => {
|
|
|
4494
4494
|
return (C, g) => {
|
|
4495
4495
|
const _ = v("Button");
|
|
4496
4496
|
return R(), k("div", ql, [
|
|
4497
|
-
(
|
|
4497
|
+
(F(d) || F(n)()) && !F(a) ? (R(), B(_, {
|
|
4498
4498
|
key: 0,
|
|
4499
4499
|
variant: "outline",
|
|
4500
|
-
disabled: !
|
|
4500
|
+
disabled: !F(d),
|
|
4501
4501
|
onClick: y
|
|
4502
4502
|
}, {
|
|
4503
4503
|
default: i(() => [
|
|
4504
|
-
r(
|
|
4505
|
-
S(" " + z(
|
|
4504
|
+
r(F(Ze), { class: "size-4" }),
|
|
4505
|
+
S(" " + z(F(a) ? "Save order" : "Reorder rows"), 1)
|
|
4506
4506
|
]),
|
|
4507
4507
|
_: 1
|
|
4508
|
-
}, 8, ["disabled"])) :
|
|
4509
|
-
|
|
4508
|
+
}, 8, ["disabled"])) : Y("", !0),
|
|
4509
|
+
F(a) ? (R(), k("div", Yl, [
|
|
4510
4510
|
r(_, {
|
|
4511
4511
|
variant: "outline",
|
|
4512
4512
|
size: "icon",
|
|
4513
4513
|
onClick: m
|
|
4514
4514
|
}, {
|
|
4515
4515
|
default: i(() => [
|
|
4516
|
-
r(
|
|
4516
|
+
r(F(Qt), { class: "size-4" })
|
|
4517
4517
|
]),
|
|
4518
4518
|
_: 1
|
|
4519
4519
|
}),
|
|
@@ -4523,10 +4523,10 @@ const Do = (e, o = {}) => {
|
|
|
4523
4523
|
])]),
|
|
4524
4524
|
_: 1
|
|
4525
4525
|
})
|
|
4526
|
-
])) :
|
|
4526
|
+
])) : Y("", !0),
|
|
4527
4527
|
r(jl, {
|
|
4528
4528
|
onSaved: f,
|
|
4529
|
-
"saved-field":
|
|
4529
|
+
"saved-field": F(d)
|
|
4530
4530
|
}, null, 8, ["saved-field"])
|
|
4531
4531
|
]);
|
|
4532
4532
|
};
|
|
@@ -4577,7 +4577,7 @@ function Xl() {
|
|
|
4577
4577
|
]
|
|
4578
4578
|
};
|
|
4579
4579
|
}
|
|
4580
|
-
const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" }, Wl = { class: "flex flex-col gap-1.5" }, Zl = { class: "flex flex-col gap-1.5" }, er = { class: "flex items-center gap-2 w-full justify-between" }, tr = { class: "flex items-center gap-2 ml-auto" }, nr = /* @__PURE__ */
|
|
4580
|
+
const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" }, Wl = { class: "flex flex-col gap-1.5" }, Zl = { class: "flex flex-col gap-1.5" }, er = { class: "flex items-center gap-2 w-full justify-between" }, tr = { class: "flex items-center gap-2 ml-auto" }, nr = /* @__PURE__ */ ne({
|
|
4581
4581
|
__name: "DateRangeSettingsDialog",
|
|
4582
4582
|
props: {
|
|
4583
4583
|
savedField: {
|
|
@@ -4593,7 +4593,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4593
4593
|
setup(e, { emit: o }) {
|
|
4594
4594
|
const { isAdmin: t } = ve(), n = o, l = e, s = (C) => {
|
|
4595
4595
|
u.value = C;
|
|
4596
|
-
}, a =
|
|
4596
|
+
}, a = K("sortMode"), d = K("columns"), u = T(!1), f = T(""), w = T("");
|
|
4597
4597
|
Se(u, (C) => {
|
|
4598
4598
|
C && (f.value = l.savedField ?? "", w.value = l.savedDefaultDate ?? "today");
|
|
4599
4599
|
});
|
|
@@ -4605,7 +4605,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4605
4605
|
n("saved", { field: f.value, defaultDate: w.value }), m();
|
|
4606
4606
|
};
|
|
4607
4607
|
return (C, g) => {
|
|
4608
|
-
const _ = v("DialogTrigger"), c = v("DialogTitle"),
|
|
4608
|
+
const _ = v("DialogTrigger"), c = v("DialogTitle"), V = v("DialogDescription"), b = v("DialogHeader"), h = v("Label"), M = v("ComboboxTrigger"), I = v("ComboboxInput"), O = v("ComboboxAnchor"), q = v("ComboboxItem"), J = v("ComboboxGroup"), Z = v("ComboboxList"), le = v("Combobox"), oe = v("SelectValue"), W = v("SelectTrigger"), A = v("SelectItem"), j = v("SelectLabel"), re = v("SelectGroup"), ae = v("SelectContent"), ye = v("Select"), _e = v("Button"), E = v("DialogFooter"), x = v("DialogScrollContent"), L = v("Dialog");
|
|
4609
4609
|
return R(), B(L, {
|
|
4610
4610
|
open: u.value,
|
|
4611
4611
|
"onUpdate:open": [
|
|
@@ -4616,12 +4616,12 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4616
4616
|
default: i(() => [
|
|
4617
4617
|
r(_, { asChild: "" }, {
|
|
4618
4618
|
default: i(() => [
|
|
4619
|
-
|
|
4619
|
+
F(t)() ? (R(), k("button", {
|
|
4620
4620
|
key: 0,
|
|
4621
4621
|
class: "text-xs text-primary hover:underline",
|
|
4622
|
-
disabled:
|
|
4622
|
+
disabled: F(a),
|
|
4623
4623
|
onClick: g[0] || (g[0] = ($) => u.value = !0)
|
|
4624
|
-
}, "Settings", 8, Jl)) :
|
|
4624
|
+
}, "Settings", 8, Jl)) : Y("", !0)
|
|
4625
4625
|
]),
|
|
4626
4626
|
_: 1
|
|
4627
4627
|
}),
|
|
@@ -4635,7 +4635,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4635
4635
|
])]),
|
|
4636
4636
|
_: 1
|
|
4637
4637
|
}),
|
|
4638
|
-
r(
|
|
4638
|
+
r(V, null, {
|
|
4639
4639
|
default: i(() => [...g[6] || (g[6] = [
|
|
4640
4640
|
S(" Select the property (of type date) to filter by. ", -1)
|
|
4641
4641
|
])]),
|
|
@@ -4645,7 +4645,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4645
4645
|
_: 1
|
|
4646
4646
|
}),
|
|
4647
4647
|
D("div", Ql, [
|
|
4648
|
-
r(
|
|
4648
|
+
r(le, {
|
|
4649
4649
|
by: "label",
|
|
4650
4650
|
class: "w-full",
|
|
4651
4651
|
resetSearchTermOnBlur: !1,
|
|
@@ -4659,7 +4659,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4659
4659
|
D("div", Wl, [
|
|
4660
4660
|
r(M, null, {
|
|
4661
4661
|
default: i(() => [
|
|
4662
|
-
r(
|
|
4662
|
+
r(h, { class: "text-xs text-muted-foreground" }, {
|
|
4663
4663
|
default: i(() => [...g[7] || (g[7] = [
|
|
4664
4664
|
S("Field", -1)
|
|
4665
4665
|
])]),
|
|
@@ -4678,21 +4678,21 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4678
4678
|
]),
|
|
4679
4679
|
_: 1
|
|
4680
4680
|
}),
|
|
4681
|
-
r(
|
|
4681
|
+
r(Z, { class: "w-full" }, {
|
|
4682
4682
|
default: i(() => [
|
|
4683
|
-
r(
|
|
4683
|
+
r(J, null, {
|
|
4684
4684
|
default: i(() => [
|
|
4685
|
-
(R(!0), k(U, null,
|
|
4685
|
+
(R(!0), k(U, null, te(F(d), ($) => (R(), B(q, {
|
|
4686
4686
|
key: $.property,
|
|
4687
4687
|
value: $.property,
|
|
4688
4688
|
onSelect: (P) => f.value = $.property
|
|
4689
4689
|
}, {
|
|
4690
4690
|
default: i(() => [
|
|
4691
4691
|
S(z($.property) + " ", 1),
|
|
4692
|
-
f.value === $.property ? (R(), B(
|
|
4692
|
+
f.value === $.property ? (R(), B(F(He), {
|
|
4693
4693
|
key: 0,
|
|
4694
|
-
class:
|
|
4695
|
-
}, null, 8, ["class"])) :
|
|
4694
|
+
class: ie(F(Pe)("ml-auto size-4"))
|
|
4695
|
+
}, null, 8, ["class"])) : Y("", !0)
|
|
4696
4696
|
]),
|
|
4697
4697
|
_: 2
|
|
4698
4698
|
}, 1032, ["value", "onSelect"]))), 128))
|
|
@@ -4706,7 +4706,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4706
4706
|
_: 1
|
|
4707
4707
|
}, 8, ["modelValue"]),
|
|
4708
4708
|
D("div", Zl, [
|
|
4709
|
-
r(
|
|
4709
|
+
r(h, { class: "text-xs text-muted-foreground" }, {
|
|
4710
4710
|
default: i(() => [...g[8] || (g[8] = [
|
|
4711
4711
|
S("Default date", -1)
|
|
4712
4712
|
])]),
|
|
@@ -4717,89 +4717,89 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4717
4717
|
"onUpdate:modelValue": g[3] || (g[3] = ($) => w.value = $)
|
|
4718
4718
|
}, {
|
|
4719
4719
|
default: i(() => [
|
|
4720
|
-
r(
|
|
4720
|
+
r(W, { class: "w-[180px]" }, {
|
|
4721
4721
|
default: i(() => [
|
|
4722
|
-
r(
|
|
4722
|
+
r(oe, { placeholder: "Select a fruit" })
|
|
4723
4723
|
]),
|
|
4724
4724
|
_: 1
|
|
4725
4725
|
}),
|
|
4726
|
-
r(
|
|
4726
|
+
r(ae, null, {
|
|
4727
4727
|
default: i(() => [
|
|
4728
|
-
r(
|
|
4728
|
+
r(re, null, {
|
|
4729
4729
|
default: i(() => [
|
|
4730
|
-
r(
|
|
4730
|
+
r(A, { value: "today" }, {
|
|
4731
4731
|
default: i(() => [...g[9] || (g[9] = [
|
|
4732
4732
|
S(" Today ", -1)
|
|
4733
4733
|
])]),
|
|
4734
4734
|
_: 1
|
|
4735
4735
|
}),
|
|
4736
|
-
r(
|
|
4736
|
+
r(j, null, {
|
|
4737
4737
|
default: i(() => [...g[10] || (g[10] = [
|
|
4738
4738
|
S("Past", -1)
|
|
4739
4739
|
])]),
|
|
4740
4740
|
_: 1
|
|
4741
4741
|
}),
|
|
4742
|
-
r(
|
|
4742
|
+
r(A, { value: "yesterday" }, {
|
|
4743
4743
|
default: i(() => [...g[11] || (g[11] = [
|
|
4744
4744
|
S(" 1 day ago ", -1)
|
|
4745
4745
|
])]),
|
|
4746
4746
|
_: 1
|
|
4747
4747
|
}),
|
|
4748
|
-
r(
|
|
4748
|
+
r(A, { value: "last7days" }, {
|
|
4749
4749
|
default: i(() => [...g[12] || (g[12] = [
|
|
4750
4750
|
S(" Last 7 days ", -1)
|
|
4751
4751
|
])]),
|
|
4752
4752
|
_: 1
|
|
4753
4753
|
}),
|
|
4754
|
-
r(
|
|
4754
|
+
r(A, { value: "lastMonth" }, {
|
|
4755
4755
|
default: i(() => [...g[13] || (g[13] = [
|
|
4756
4756
|
S(" Last 30 days ", -1)
|
|
4757
4757
|
])]),
|
|
4758
4758
|
_: 1
|
|
4759
4759
|
}),
|
|
4760
|
-
r(
|
|
4760
|
+
r(A, { value: "last6months" }, {
|
|
4761
4761
|
default: i(() => [...g[14] || (g[14] = [
|
|
4762
4762
|
S(" Last 6 months ", -1)
|
|
4763
4763
|
])]),
|
|
4764
4764
|
_: 1
|
|
4765
4765
|
}),
|
|
4766
|
-
r(
|
|
4766
|
+
r(A, { value: "lastYear" }, {
|
|
4767
4767
|
default: i(() => [...g[15] || (g[15] = [
|
|
4768
4768
|
S(" Last 12 months ", -1)
|
|
4769
4769
|
])]),
|
|
4770
4770
|
_: 1
|
|
4771
4771
|
}),
|
|
4772
|
-
r(
|
|
4772
|
+
r(j, null, {
|
|
4773
4773
|
default: i(() => [...g[16] || (g[16] = [
|
|
4774
4774
|
S("Future", -1)
|
|
4775
4775
|
])]),
|
|
4776
4776
|
_: 1
|
|
4777
4777
|
}),
|
|
4778
|
-
r(
|
|
4778
|
+
r(A, { value: "tomorrow" }, {
|
|
4779
4779
|
default: i(() => [...g[17] || (g[17] = [
|
|
4780
4780
|
S(" In 1 day ", -1)
|
|
4781
4781
|
])]),
|
|
4782
4782
|
_: 1
|
|
4783
4783
|
}),
|
|
4784
|
-
r(
|
|
4784
|
+
r(A, { value: "next7days" }, {
|
|
4785
4785
|
default: i(() => [...g[18] || (g[18] = [
|
|
4786
4786
|
S(" Next 7 days ", -1)
|
|
4787
4787
|
])]),
|
|
4788
4788
|
_: 1
|
|
4789
4789
|
}),
|
|
4790
|
-
r(
|
|
4790
|
+
r(A, { value: "nextMonth" }, {
|
|
4791
4791
|
default: i(() => [...g[19] || (g[19] = [
|
|
4792
4792
|
S(" Next 30 days ", -1)
|
|
4793
4793
|
])]),
|
|
4794
4794
|
_: 1
|
|
4795
4795
|
}),
|
|
4796
|
-
r(
|
|
4796
|
+
r(A, { value: "next6months" }, {
|
|
4797
4797
|
default: i(() => [...g[20] || (g[20] = [
|
|
4798
4798
|
S(" Next 6 months ", -1)
|
|
4799
4799
|
])]),
|
|
4800
4800
|
_: 1
|
|
4801
4801
|
}),
|
|
4802
|
-
r(
|
|
4802
|
+
r(A, { value: "nextYear" }, {
|
|
4803
4803
|
default: i(() => [...g[21] || (g[21] = [
|
|
4804
4804
|
S(" Next 12 months ", -1)
|
|
4805
4805
|
])]),
|
|
@@ -4816,7 +4816,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4816
4816
|
}, 8, ["modelValue"])
|
|
4817
4817
|
])
|
|
4818
4818
|
]),
|
|
4819
|
-
r(
|
|
4819
|
+
r(E, null, {
|
|
4820
4820
|
default: i(() => [
|
|
4821
4821
|
D("div", er, [
|
|
4822
4822
|
l.savedField ? (R(), B(_e, {
|
|
@@ -4828,7 +4828,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4828
4828
|
S(" Disable date range filter ", -1)
|
|
4829
4829
|
])]),
|
|
4830
4830
|
_: 1
|
|
4831
|
-
})) :
|
|
4831
|
+
})) : Y("", !0),
|
|
4832
4832
|
D("div", tr, [
|
|
4833
4833
|
r(_e, {
|
|
4834
4834
|
variant: "outline",
|
|
@@ -4858,21 +4858,21 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4858
4858
|
}, 8, ["open"]);
|
|
4859
4859
|
};
|
|
4860
4860
|
}
|
|
4861
|
-
}), or = { class: "flex justify-between w-full p-3 pt-0" }, lr = { class: "flex gap-2" }, rr = /* @__PURE__ */
|
|
4861
|
+
}), or = { class: "flex justify-between w-full p-3 pt-0" }, lr = { class: "flex gap-2" }, rr = /* @__PURE__ */ ne({
|
|
4862
4862
|
__name: "DateRangeFilter",
|
|
4863
4863
|
setup(e) {
|
|
4864
|
-
const { getModuleData: o, setModuleData: t } = xe(), { isAdmin: n } = ve(), l =
|
|
4864
|
+
const { getModuleData: o, setModuleData: t } = xe(), { isAdmin: n } = ve(), l = K("sortMode"), s = K("dateRangeFilter"), a = K("getTableData"), d = new sn("en-US", {
|
|
4865
4865
|
dateStyle: "medium"
|
|
4866
|
-
}), u =
|
|
4867
|
-
start: new
|
|
4868
|
-
end: new
|
|
4869
|
-
}), f =
|
|
4866
|
+
}), u = T({
|
|
4867
|
+
start: new Ve(2022, 1, 20),
|
|
4868
|
+
end: new Ve(2022, 1, 20).subtract({ days: 20 })
|
|
4869
|
+
}), f = T(!1), w = T(""), y = T("today"), m = (_) => {
|
|
4870
4870
|
w.value = _.field, y.value = _.defaultDate, t("dateRangeFilter", _);
|
|
4871
4871
|
}, p = (_) => {
|
|
4872
|
-
const c = Xl()?.[_],
|
|
4872
|
+
const c = Xl()?.[_], V = c[0].split("-")?.map((h) => parseInt(h)), b = c[1] ? c[1].split("-")?.map((h) => parseInt(h)) : [];
|
|
4873
4873
|
u.value = {
|
|
4874
|
-
start: new
|
|
4875
|
-
end: b.length > 0 ? new
|
|
4874
|
+
start: new Ve(V[0], V[1], V[2]),
|
|
4875
|
+
end: b.length > 0 ? new Ve(b[0], b[1], b[2]) : new Ve(V[0], V[1], V[2])
|
|
4876
4876
|
};
|
|
4877
4877
|
}, C = (_) => {
|
|
4878
4878
|
p(_), g(), f.value = !1;
|
|
@@ -4883,33 +4883,33 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4883
4883
|
const _ = await o("dateRangeFilter");
|
|
4884
4884
|
w.value = _?.field ?? "", y.value = _?.defaultDate ?? "today", p(y.value), g();
|
|
4885
4885
|
}), (_, c) => {
|
|
4886
|
-
const
|
|
4887
|
-
return w.value ||
|
|
4886
|
+
const V = v("Button"), b = v("PopoverTrigger"), h = v("RangeCalendar"), M = v("DropdownMenuTrigger"), I = v("DropdownMenuItem"), O = v("DropdownMenuSeparator"), q = v("DropdownMenuLabel"), J = v("DropdownMenuGroup"), Z = v("DropdownMenuContent"), le = v("DropdownMenu"), oe = v("PopoverContent"), W = v("Popover");
|
|
4887
|
+
return w.value || F(n)() ? (R(), k("div", {
|
|
4888
4888
|
key: 0,
|
|
4889
|
-
class:
|
|
4889
|
+
class: ie(["flex flex-col items-start gap-1", F(l) ? "opacity-50 pointer-events-none" : ""])
|
|
4890
4890
|
}, [
|
|
4891
|
-
r(
|
|
4891
|
+
r(W, {
|
|
4892
4892
|
open: f.value,
|
|
4893
|
-
"onUpdate:open": c[14] || (c[14] = (
|
|
4893
|
+
"onUpdate:open": c[14] || (c[14] = (A) => f.value = A)
|
|
4894
4894
|
}, {
|
|
4895
4895
|
default: i(() => [
|
|
4896
4896
|
r(b, { "as-child": "" }, {
|
|
4897
4897
|
default: i(() => [
|
|
4898
|
-
r(
|
|
4898
|
+
r(V, {
|
|
4899
4899
|
variant: "outline",
|
|
4900
|
-
class:
|
|
4900
|
+
class: ie(F(Pe)(
|
|
4901
4901
|
"w-[280px] justify-start text-left font-normal",
|
|
4902
4902
|
!u.value && "text-muted-foreground"
|
|
4903
4903
|
)),
|
|
4904
|
-
disabled:
|
|
4904
|
+
disabled: F(l) || !w.value
|
|
4905
4905
|
}, {
|
|
4906
4906
|
default: i(() => [
|
|
4907
|
-
r(
|
|
4907
|
+
r(F(Wt), { class: "size-4" }),
|
|
4908
4908
|
u.value.start ? (R(), k(U, { key: 0 }, [
|
|
4909
4909
|
u.value.end ? (R(), k(U, { key: 0 }, [
|
|
4910
|
-
S(z(
|
|
4910
|
+
S(z(F(d).format(u.value.start.toDate(F(he)()))) + " - " + z(F(d).format(u.value.end.toDate(F(he)()))), 1)
|
|
4911
4911
|
], 64)) : (R(), k(U, { key: 1 }, [
|
|
4912
|
-
S(z(
|
|
4912
|
+
S(z(F(d).format(u.value.start.toDate(F(he)()))), 1)
|
|
4913
4913
|
], 64))
|
|
4914
4914
|
], 64)) : (R(), k(U, { key: 1 }, [
|
|
4915
4915
|
S(" Pick a date ")
|
|
@@ -4920,21 +4920,21 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4920
4920
|
]),
|
|
4921
4921
|
_: 1
|
|
4922
4922
|
}),
|
|
4923
|
-
r(
|
|
4923
|
+
r(oe, { class: "w-auto p-0" }, {
|
|
4924
4924
|
default: i(() => [
|
|
4925
|
-
r(
|
|
4925
|
+
r(h, {
|
|
4926
4926
|
modelValue: u.value,
|
|
4927
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
4927
|
+
"onUpdate:modelValue": c[0] || (c[0] = (A) => u.value = A),
|
|
4928
4928
|
"initial-focus": "",
|
|
4929
4929
|
"number-of-months": 2,
|
|
4930
|
-
"onUpdate:startValue": c[1] || (c[1] = (
|
|
4930
|
+
"onUpdate:startValue": c[1] || (c[1] = (A) => u.value.start = A)
|
|
4931
4931
|
}, null, 8, ["modelValue"]),
|
|
4932
4932
|
D("div", or, [
|
|
4933
|
-
r(
|
|
4933
|
+
r(le, null, {
|
|
4934
4934
|
default: i(() => [
|
|
4935
4935
|
r(M, { "as-child": "" }, {
|
|
4936
4936
|
default: i(() => [
|
|
4937
|
-
r(
|
|
4937
|
+
r(V, { variant: "outline" }, {
|
|
4938
4938
|
default: i(() => [...c[15] || (c[15] = [
|
|
4939
4939
|
S(" Presets ", -1)
|
|
4940
4940
|
])]),
|
|
@@ -4943,12 +4943,12 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4943
4943
|
]),
|
|
4944
4944
|
_: 1
|
|
4945
4945
|
}),
|
|
4946
|
-
r(
|
|
4946
|
+
r(Z, { class: "w-56" }, {
|
|
4947
4947
|
default: i(() => [
|
|
4948
|
-
r(
|
|
4948
|
+
r(J, null, {
|
|
4949
4949
|
default: i(() => [
|
|
4950
4950
|
r(I, {
|
|
4951
|
-
onClick: c[2] || (c[2] = (
|
|
4951
|
+
onClick: c[2] || (c[2] = (A) => C("today"))
|
|
4952
4952
|
}, {
|
|
4953
4953
|
default: i(() => [...c[16] || (c[16] = [
|
|
4954
4954
|
S(" Today ", -1)
|
|
@@ -4956,14 +4956,14 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4956
4956
|
_: 1
|
|
4957
4957
|
}),
|
|
4958
4958
|
r(O),
|
|
4959
|
-
r(
|
|
4959
|
+
r(q, null, {
|
|
4960
4960
|
default: i(() => [...c[17] || (c[17] = [
|
|
4961
4961
|
S("Past", -1)
|
|
4962
4962
|
])]),
|
|
4963
4963
|
_: 1
|
|
4964
4964
|
}),
|
|
4965
4965
|
r(I, {
|
|
4966
|
-
onClick: c[3] || (c[3] = (
|
|
4966
|
+
onClick: c[3] || (c[3] = (A) => C("yesterday"))
|
|
4967
4967
|
}, {
|
|
4968
4968
|
default: i(() => [...c[18] || (c[18] = [
|
|
4969
4969
|
S(" 1 day ago ", -1)
|
|
@@ -4971,7 +4971,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4971
4971
|
_: 1
|
|
4972
4972
|
}),
|
|
4973
4973
|
r(I, {
|
|
4974
|
-
onClick: c[4] || (c[4] = (
|
|
4974
|
+
onClick: c[4] || (c[4] = (A) => C("last7days"))
|
|
4975
4975
|
}, {
|
|
4976
4976
|
default: i(() => [...c[19] || (c[19] = [
|
|
4977
4977
|
S(" Last 7 days ", -1)
|
|
@@ -4979,7 +4979,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4979
4979
|
_: 1
|
|
4980
4980
|
}),
|
|
4981
4981
|
r(I, {
|
|
4982
|
-
onClick: c[5] || (c[5] = (
|
|
4982
|
+
onClick: c[5] || (c[5] = (A) => C("lastMonth"))
|
|
4983
4983
|
}, {
|
|
4984
4984
|
default: i(() => [...c[20] || (c[20] = [
|
|
4985
4985
|
S(" Last 30 days ", -1)
|
|
@@ -4987,7 +4987,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4987
4987
|
_: 1
|
|
4988
4988
|
}),
|
|
4989
4989
|
r(I, {
|
|
4990
|
-
onClick: c[6] || (c[6] = (
|
|
4990
|
+
onClick: c[6] || (c[6] = (A) => C("last6months"))
|
|
4991
4991
|
}, {
|
|
4992
4992
|
default: i(() => [...c[21] || (c[21] = [
|
|
4993
4993
|
S(" Last 6 months ", -1)
|
|
@@ -4995,7 +4995,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4995
4995
|
_: 1
|
|
4996
4996
|
}),
|
|
4997
4997
|
r(I, {
|
|
4998
|
-
onClick: c[7] || (c[7] = (
|
|
4998
|
+
onClick: c[7] || (c[7] = (A) => C("lastYear"))
|
|
4999
4999
|
}, {
|
|
5000
5000
|
default: i(() => [...c[22] || (c[22] = [
|
|
5001
5001
|
S(" Last 12 months ", -1)
|
|
@@ -5003,14 +5003,14 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5003
5003
|
_: 1
|
|
5004
5004
|
}),
|
|
5005
5005
|
r(O),
|
|
5006
|
-
r(
|
|
5006
|
+
r(q, null, {
|
|
5007
5007
|
default: i(() => [...c[23] || (c[23] = [
|
|
5008
5008
|
S("Future", -1)
|
|
5009
5009
|
])]),
|
|
5010
5010
|
_: 1
|
|
5011
5011
|
}),
|
|
5012
5012
|
r(I, {
|
|
5013
|
-
onClick: c[8] || (c[8] = (
|
|
5013
|
+
onClick: c[8] || (c[8] = (A) => C("tomorrow"))
|
|
5014
5014
|
}, {
|
|
5015
5015
|
default: i(() => [...c[24] || (c[24] = [
|
|
5016
5016
|
S(" In 1 day ", -1)
|
|
@@ -5018,7 +5018,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5018
5018
|
_: 1
|
|
5019
5019
|
}),
|
|
5020
5020
|
r(I, {
|
|
5021
|
-
onClick: c[9] || (c[9] = (
|
|
5021
|
+
onClick: c[9] || (c[9] = (A) => C("next7days"))
|
|
5022
5022
|
}, {
|
|
5023
5023
|
default: i(() => [...c[25] || (c[25] = [
|
|
5024
5024
|
S(" Next 7 days ", -1)
|
|
@@ -5026,7 +5026,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5026
5026
|
_: 1
|
|
5027
5027
|
}),
|
|
5028
5028
|
r(I, {
|
|
5029
|
-
onClick: c[10] || (c[10] = (
|
|
5029
|
+
onClick: c[10] || (c[10] = (A) => C("nextMonth"))
|
|
5030
5030
|
}, {
|
|
5031
5031
|
default: i(() => [...c[26] || (c[26] = [
|
|
5032
5032
|
S(" Next 30 days ", -1)
|
|
@@ -5034,7 +5034,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5034
5034
|
_: 1
|
|
5035
5035
|
}),
|
|
5036
5036
|
r(I, {
|
|
5037
|
-
onClick: c[11] || (c[11] = (
|
|
5037
|
+
onClick: c[11] || (c[11] = (A) => C("next6months"))
|
|
5038
5038
|
}, {
|
|
5039
5039
|
default: i(() => [...c[27] || (c[27] = [
|
|
5040
5040
|
S(" Next 6 months ", -1)
|
|
@@ -5042,7 +5042,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5042
5042
|
_: 1
|
|
5043
5043
|
}),
|
|
5044
5044
|
r(I, {
|
|
5045
|
-
onClick: c[12] || (c[12] = (
|
|
5045
|
+
onClick: c[12] || (c[12] = (A) => C("nextYear"))
|
|
5046
5046
|
}, {
|
|
5047
5047
|
default: i(() => [...c[28] || (c[28] = [
|
|
5048
5048
|
S(" Next 12 months ", -1)
|
|
@@ -5059,16 +5059,16 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5059
5059
|
_: 1
|
|
5060
5060
|
}),
|
|
5061
5061
|
D("div", lr, [
|
|
5062
|
-
r(
|
|
5062
|
+
r(V, {
|
|
5063
5063
|
variant: "outline",
|
|
5064
|
-
onClick: c[13] || (c[13] = (
|
|
5064
|
+
onClick: c[13] || (c[13] = (A) => f.value = !1)
|
|
5065
5065
|
}, {
|
|
5066
5066
|
default: i(() => [...c[29] || (c[29] = [
|
|
5067
5067
|
S("Cancel", -1)
|
|
5068
5068
|
])]),
|
|
5069
5069
|
_: 1
|
|
5070
5070
|
}),
|
|
5071
|
-
r(
|
|
5071
|
+
r(V, { onClick: g }, {
|
|
5072
5072
|
default: i(() => [...c[30] || (c[30] = [
|
|
5073
5073
|
S("Apply", -1)
|
|
5074
5074
|
])]),
|
|
@@ -5087,16 +5087,16 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5087
5087
|
"saved-field": w.value,
|
|
5088
5088
|
"saved-default-date": y.value
|
|
5089
5089
|
}, null, 8, ["saved-field", "saved-default-date"])
|
|
5090
|
-
], 2)) :
|
|
5090
|
+
], 2)) : Y("", !0);
|
|
5091
5091
|
};
|
|
5092
5092
|
}
|
|
5093
|
-
}), sr = { class: "grid grid-cols-3 gap-2 mb-2 py-2" }, ir = { class: "flex flex-col items-start gap-1.5" }, ar = { class: "flex flex-col items-start gap-1.5" }, ur = { class: "grid gap-4" }, dr = { class: "grid grid-cols-4 items-center gap-4" }, gr = { class: "grid grid-cols-4 items-center gap-4" }, pr = { class: "grid grid-cols-4 items-center gap-4" }, cr = { class: "flex justify-end gap-2" }, fr = /* @__PURE__ */
|
|
5093
|
+
}), sr = { class: "grid grid-cols-3 gap-2 mb-2 py-2" }, ir = { class: "flex flex-col items-start gap-1.5" }, ar = { class: "flex flex-col items-start gap-1.5" }, ur = { class: "grid gap-4" }, dr = { class: "grid grid-cols-4 items-center gap-4" }, gr = { class: "grid grid-cols-4 items-center gap-4" }, pr = { class: "grid grid-cols-4 items-center gap-4" }, cr = { class: "flex justify-end gap-2" }, fr = /* @__PURE__ */ ne({
|
|
5094
5094
|
__name: "FilterDialog",
|
|
5095
5095
|
emits: ["filterAdded", "filterEdited", "filterRemoved"],
|
|
5096
5096
|
setup(e, { expose: o, emit: t }) {
|
|
5097
5097
|
const n = t;
|
|
5098
|
-
|
|
5099
|
-
const l =
|
|
5098
|
+
K("columns");
|
|
5099
|
+
const l = T(!1), s = T("add"), a = T(null), d = T(!1), u = De({
|
|
5100
5100
|
label: "",
|
|
5101
5101
|
property: "",
|
|
5102
5102
|
options: []
|
|
@@ -5126,17 +5126,17 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5126
5126
|
return o({
|
|
5127
5127
|
openDialog: w
|
|
5128
5128
|
}), (_, c) => {
|
|
5129
|
-
const
|
|
5130
|
-
return R(), B(
|
|
5129
|
+
const V = v("DialogTitle"), b = v("DialogDescription"), h = v("DialogHeader"), M = v("Label"), I = v("Input"), O = v("Button"), q = v("PopoverTrigger"), J = v("Checkbox"), Z = v("PopoverContent"), le = v("Popover"), oe = v("DialogFooter"), W = v("DialogScrollContent"), A = v("Dialog");
|
|
5130
|
+
return R(), B(A, {
|
|
5131
5131
|
open: l.value,
|
|
5132
|
-
"onUpdate:open": c[6] || (c[6] = (
|
|
5132
|
+
"onUpdate:open": c[6] || (c[6] = (j) => l.value = j)
|
|
5133
5133
|
}, {
|
|
5134
5134
|
default: i(() => [
|
|
5135
|
-
r(
|
|
5135
|
+
r(W, { class: "sm:max-w-2xl" }, {
|
|
5136
5136
|
default: i(() => [
|
|
5137
|
-
r(
|
|
5137
|
+
r(h, null, {
|
|
5138
5138
|
default: i(() => [
|
|
5139
|
-
r(
|
|
5139
|
+
r(V, null, {
|
|
5140
5140
|
default: i(() => [
|
|
5141
5141
|
S(z(s.value === "add" ? "Add Filter" : "Edit Filter"), 1)
|
|
5142
5142
|
]),
|
|
@@ -5165,7 +5165,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5165
5165
|
r(I, {
|
|
5166
5166
|
id: "filter_dialog_label",
|
|
5167
5167
|
modelValue: u.label,
|
|
5168
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
5168
|
+
"onUpdate:modelValue": c[0] || (c[0] = (j) => u.label = j)
|
|
5169
5169
|
}, null, 8, ["modelValue"])
|
|
5170
5170
|
]),
|
|
5171
5171
|
D("div", ar, [
|
|
@@ -5181,7 +5181,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5181
5181
|
r(I, {
|
|
5182
5182
|
id: "filter_dialog_property",
|
|
5183
5183
|
modelValue: u.property,
|
|
5184
|
-
"onUpdate:modelValue": c[1] || (c[1] = (
|
|
5184
|
+
"onUpdate:modelValue": c[1] || (c[1] = (j) => u.property = j)
|
|
5185
5185
|
}, null, 8, ["modelValue"])
|
|
5186
5186
|
])
|
|
5187
5187
|
]),
|
|
@@ -5193,16 +5193,16 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5193
5193
|
_: 1
|
|
5194
5194
|
}),
|
|
5195
5195
|
c[16] || (c[16] = D("p", { class: "text-xs text-muted-foreground mb-2" }, " Define all options for this filter. ", -1)),
|
|
5196
|
-
r(
|
|
5196
|
+
r(le, {
|
|
5197
5197
|
open: d.value,
|
|
5198
|
-
"onUpdate:open": c[5] || (c[5] = (
|
|
5198
|
+
"onUpdate:open": c[5] || (c[5] = (j) => d.value = j)
|
|
5199
5199
|
}, {
|
|
5200
5200
|
default: i(() => [
|
|
5201
|
-
r(
|
|
5201
|
+
r(q, { "as-child": "" }, {
|
|
5202
5202
|
default: i(() => [
|
|
5203
5203
|
r(O, { variant: "outline" }, {
|
|
5204
5204
|
default: i(() => [
|
|
5205
|
-
r(
|
|
5205
|
+
r(F(Fe), { class: "mr-2 size-4" }),
|
|
5206
5206
|
c[10] || (c[10] = S(" Add option ", -1))
|
|
5207
5207
|
]),
|
|
5208
5208
|
_: 1
|
|
@@ -5210,7 +5210,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5210
5210
|
]),
|
|
5211
5211
|
_: 1
|
|
5212
5212
|
}),
|
|
5213
|
-
r(
|
|
5213
|
+
r(Z, { class: "w-80" }, {
|
|
5214
5214
|
default: i(() => [
|
|
5215
5215
|
D("div", ur, [
|
|
5216
5216
|
D("div", dr, [
|
|
@@ -5227,7 +5227,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5227
5227
|
id: "value",
|
|
5228
5228
|
class: "col-span-3",
|
|
5229
5229
|
modelValue: f.value,
|
|
5230
|
-
"onUpdate:modelValue": c[2] || (c[2] = (
|
|
5230
|
+
"onUpdate:modelValue": c[2] || (c[2] = (j) => f.value = j)
|
|
5231
5231
|
}, null, 8, ["modelValue"])
|
|
5232
5232
|
]),
|
|
5233
5233
|
D("div", gr, [
|
|
@@ -5244,7 +5244,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5244
5244
|
id: "label",
|
|
5245
5245
|
class: "col-span-3",
|
|
5246
5246
|
modelValue: f.label,
|
|
5247
|
-
"onUpdate:modelValue": c[3] || (c[3] = (
|
|
5247
|
+
"onUpdate:modelValue": c[3] || (c[3] = (j) => f.label = j)
|
|
5248
5248
|
}, null, 8, ["modelValue"])
|
|
5249
5249
|
]),
|
|
5250
5250
|
D("div", pr, [
|
|
@@ -5257,11 +5257,11 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5257
5257
|
])]),
|
|
5258
5258
|
_: 1
|
|
5259
5259
|
}),
|
|
5260
|
-
r(
|
|
5260
|
+
r(J, {
|
|
5261
5261
|
id: "checked",
|
|
5262
5262
|
class: "col-span-3 border-ring",
|
|
5263
5263
|
modelValue: f.checked,
|
|
5264
|
-
"onUpdate:modelValue": c[4] || (c[4] = (
|
|
5264
|
+
"onUpdate:modelValue": c[4] || (c[4] = (j) => f.checked = j)
|
|
5265
5265
|
}, null, 8, ["modelValue"])
|
|
5266
5266
|
]),
|
|
5267
5267
|
D("div", cr, [
|
|
@@ -5290,8 +5290,8 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5290
5290
|
}, 8, ["open"])
|
|
5291
5291
|
]),
|
|
5292
5292
|
D("div", null, [
|
|
5293
|
-
(R(!0), k(U, null,
|
|
5294
|
-
key:
|
|
5293
|
+
(R(!0), k(U, null, te(u.options, (j) => (R(), k("div", {
|
|
5294
|
+
key: j.id,
|
|
5295
5295
|
class: "grid grid-cols-4 items-center gap-4"
|
|
5296
5296
|
}, [
|
|
5297
5297
|
r(M, {
|
|
@@ -5306,12 +5306,12 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5306
5306
|
r(I, {
|
|
5307
5307
|
id: "value",
|
|
5308
5308
|
class: "col-span-3",
|
|
5309
|
-
modelValue:
|
|
5310
|
-
"onUpdate:modelValue": (
|
|
5309
|
+
modelValue: j.value,
|
|
5310
|
+
"onUpdate:modelValue": (re) => j.value = re
|
|
5311
5311
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
5312
5312
|
r(O, {
|
|
5313
5313
|
variant: "destructive",
|
|
5314
|
-
onClick: (
|
|
5314
|
+
onClick: (re) => m(j.id)
|
|
5315
5315
|
}, {
|
|
5316
5316
|
default: i(() => [...c[18] || (c[18] = [
|
|
5317
5317
|
S(" Remove ", -1)
|
|
@@ -5320,7 +5320,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5320
5320
|
}, 8, ["onClick"])
|
|
5321
5321
|
]))), 128))
|
|
5322
5322
|
]),
|
|
5323
|
-
r(
|
|
5323
|
+
r(oe, null, {
|
|
5324
5324
|
default: i(() => [
|
|
5325
5325
|
s.value === "edit" ? (R(), B(O, {
|
|
5326
5326
|
key: 0,
|
|
@@ -5331,7 +5331,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5331
5331
|
S(" Remove Filter ", -1)
|
|
5332
5332
|
])]),
|
|
5333
5333
|
_: 1
|
|
5334
|
-
})) :
|
|
5334
|
+
})) : Y("", !0),
|
|
5335
5335
|
r(O, { onClick: p }, {
|
|
5336
5336
|
default: i(() => [
|
|
5337
5337
|
S(z(s.value === "add" ? "Add Filter" : "Save changes"), 1)
|
|
@@ -5349,10 +5349,10 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5349
5349
|
}, 8, ["open"]);
|
|
5350
5350
|
};
|
|
5351
5351
|
}
|
|
5352
|
-
}), mr = { class: "flex flex-wrap gap-2 mb-4" }, vr = { class: "truncate w-full text-left font-medium" }, _r = ["onClick"], Cr = /* @__PURE__ */
|
|
5352
|
+
}), mr = { class: "flex flex-wrap gap-2 mb-4" }, vr = { class: "truncate w-full text-left font-medium" }, _r = ["onClick"], Cr = /* @__PURE__ */ ne({
|
|
5353
5353
|
__name: "Filters",
|
|
5354
5354
|
setup(e) {
|
|
5355
|
-
const o =
|
|
5355
|
+
const o = K("table"), t = K("data"), n = K("filters", T([])), { getModuleData: l, setModuleData: s } = xe(), { isAdmin: a } = ve(), d = T(), u = T(!1), f = () => {
|
|
5356
5356
|
u.value || !o.value || !n.value?.length || !t.value?.length || !n.value.every((C) => o.value.getColumn(C.property)) || (u.value = !0, n.value.forEach((C) => {
|
|
5357
5357
|
const g = C.options?.filter((_) => _.checked).map((_) => _.value);
|
|
5358
5358
|
o.value.getColumn(C.property)?.setFilterValue(g?.length ? g : void 0);
|
|
@@ -5378,11 +5378,11 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5378
5378
|
), ke(async () => {
|
|
5379
5379
|
n.value = await l("filters") || [], Ne(() => f());
|
|
5380
5380
|
}), (p, C) => {
|
|
5381
|
-
const g = v("Button"), _ = v("DropdownMenuTrigger"), c = v("DropdownMenuCheckboxItem"),
|
|
5381
|
+
const g = v("Button"), _ = v("DropdownMenuTrigger"), c = v("DropdownMenuCheckboxItem"), V = v("DropdownMenuContent"), b = v("DropdownMenu");
|
|
5382
5382
|
return R(), k(U, null, [
|
|
5383
5383
|
D("div", mr, [
|
|
5384
|
-
(R(!0), k(U, null,
|
|
5385
|
-
key:
|
|
5384
|
+
(R(!0), k(U, null, te(F(n), (h) => (R(), k("div", {
|
|
5385
|
+
key: h.id,
|
|
5386
5386
|
class: "flex flex-col items-start gap-1"
|
|
5387
5387
|
}, [
|
|
5388
5388
|
r(b, null, {
|
|
@@ -5394,28 +5394,28 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5394
5394
|
class: "w-[180px] flex items-center justify-between"
|
|
5395
5395
|
}, {
|
|
5396
5396
|
default: i(() => [
|
|
5397
|
-
D("span", vr, z(
|
|
5398
|
-
r(
|
|
5397
|
+
D("span", vr, z(h.label ? h.label : "Filter by " + h.property), 1),
|
|
5398
|
+
r(F(it), { class: "size-4" })
|
|
5399
5399
|
]),
|
|
5400
5400
|
_: 2
|
|
5401
5401
|
}, 1024)
|
|
5402
5402
|
]),
|
|
5403
5403
|
_: 2
|
|
5404
5404
|
}, 1024),
|
|
5405
|
-
r(
|
|
5405
|
+
r(V, {
|
|
5406
5406
|
align: "start",
|
|
5407
5407
|
onCloseAutoFocus: C[1] || (C[1] = (M) => {
|
|
5408
5408
|
M.preventDefault();
|
|
5409
5409
|
})
|
|
5410
5410
|
}, {
|
|
5411
5411
|
default: i(() => [
|
|
5412
|
-
(R(!0), k(U, null,
|
|
5412
|
+
(R(!0), k(U, null, te(h.options, (M) => (R(), B(c, {
|
|
5413
5413
|
key: M.id,
|
|
5414
5414
|
"model-value": M.checked,
|
|
5415
5415
|
"onUpdate:modelValue": (I) => {
|
|
5416
5416
|
M.checked = I;
|
|
5417
|
-
const O =
|
|
5418
|
-
|
|
5417
|
+
const O = h.options?.filter((q) => q.checked).map((q) => q.value);
|
|
5418
|
+
F(o)?.getColumn(h.property)?.setFilterValue(O?.length ? O : void 0);
|
|
5419
5419
|
},
|
|
5420
5420
|
onSelect: C[0] || (C[0] = (I) => {
|
|
5421
5421
|
I.preventDefault();
|
|
@@ -5432,40 +5432,40 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5432
5432
|
]),
|
|
5433
5433
|
_: 2
|
|
5434
5434
|
}, 1024),
|
|
5435
|
-
|
|
5435
|
+
F(a)() ? (R(), k("button", {
|
|
5436
5436
|
key: 0,
|
|
5437
5437
|
class: "text-xs text-primary hover:underline",
|
|
5438
|
-
onClick: (M) => d.value.openDialog(
|
|
5439
|
-
}, "Settings", 8, _r)) :
|
|
5438
|
+
onClick: (M) => d.value.openDialog(h)
|
|
5439
|
+
}, "Settings", 8, _r)) : Y("", !0)
|
|
5440
5440
|
]))), 128)),
|
|
5441
|
-
|
|
5441
|
+
F(a)() ? (R(), B(g, {
|
|
5442
5442
|
key: 0,
|
|
5443
5443
|
variant: "outline",
|
|
5444
5444
|
class: "border-dashed",
|
|
5445
|
-
onClick: C[2] || (C[2] = (
|
|
5445
|
+
onClick: C[2] || (C[2] = (h) => d.value.openDialog())
|
|
5446
5446
|
}, {
|
|
5447
5447
|
default: i(() => [
|
|
5448
|
-
r(
|
|
5448
|
+
r(F(Fe), { class: "size-4" }),
|
|
5449
5449
|
C[6] || (C[6] = S(" Add filter ", -1))
|
|
5450
5450
|
]),
|
|
5451
5451
|
_: 1
|
|
5452
|
-
})) :
|
|
5452
|
+
})) : Y("", !0)
|
|
5453
5453
|
]),
|
|
5454
5454
|
r(fr, {
|
|
5455
5455
|
ref_key: "filterDialog",
|
|
5456
5456
|
ref: d,
|
|
5457
|
-
onFilterAdded: C[3] || (C[3] = (
|
|
5458
|
-
onFilterEdited: C[4] || (C[4] = (
|
|
5459
|
-
onFilterRemoved: C[5] || (C[5] = (
|
|
5457
|
+
onFilterAdded: C[3] || (C[3] = (h) => w(h)),
|
|
5458
|
+
onFilterEdited: C[4] || (C[4] = (h) => y(h)),
|
|
5459
|
+
onFilterRemoved: C[5] || (C[5] = (h) => m(h))
|
|
5460
5460
|
}, null, 512)
|
|
5461
5461
|
], 64);
|
|
5462
5462
|
};
|
|
5463
5463
|
}
|
|
5464
|
-
}), Sr = { class: "grid grid-cols-2 gap-2 mb-2 py-2" }, wr = { class: "flex flex-col items-start gap-1.5" }, xr = { class: "flex flex-col items-start gap-1.5" }, yr = { class: "flex flex-col items-start gap-1.5 col-span-2" }, Rr = /* @__PURE__ */
|
|
5464
|
+
}), Sr = { class: "grid grid-cols-2 gap-2 mb-2 py-2" }, wr = { class: "flex flex-col items-start gap-1.5" }, xr = { class: "flex flex-col items-start gap-1.5" }, yr = { class: "flex flex-col items-start gap-1.5 col-span-2" }, Rr = /* @__PURE__ */ ne({
|
|
5465
5465
|
__name: "ActionDialog",
|
|
5466
5466
|
emits: ["actionAdded", "actionEdited", "actionRemoved"],
|
|
5467
5467
|
setup(e, { expose: o, emit: t }) {
|
|
5468
|
-
const n = t, l =
|
|
5468
|
+
const n = t, l = T(!1), s = T("add"), a = T(null), d = De({
|
|
5469
5469
|
label: "",
|
|
5470
5470
|
icon: "",
|
|
5471
5471
|
visible: "true",
|
|
@@ -5480,10 +5480,10 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5480
5480
|
return o({
|
|
5481
5481
|
openDialog: u
|
|
5482
5482
|
}), (y, m) => {
|
|
5483
|
-
const p = v("DialogTitle"), C = v("DialogDescription"), g = v("DialogHeader"), _ = v("Label"), c = v("Input"),
|
|
5484
|
-
return R(), B(
|
|
5483
|
+
const p = v("DialogTitle"), C = v("DialogDescription"), g = v("DialogHeader"), _ = v("Label"), c = v("Input"), V = v("LucideIconPicker"), b = v("Sandbox"), h = v("FlowBuilderSelect"), M = v("Button"), I = v("DialogFooter"), O = v("DialogScrollContent"), q = v("Dialog");
|
|
5484
|
+
return R(), B(q, {
|
|
5485
5485
|
open: l.value,
|
|
5486
|
-
"onUpdate:open": m[4] || (m[4] = (
|
|
5486
|
+
"onUpdate:open": m[4] || (m[4] = (J) => l.value = J)
|
|
5487
5487
|
}, {
|
|
5488
5488
|
default: i(() => [
|
|
5489
5489
|
r(O, { class: "sm:max-w-2xl" }, {
|
|
@@ -5519,7 +5519,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5519
5519
|
r(c, {
|
|
5520
5520
|
id: "action_dialog_label",
|
|
5521
5521
|
modelValue: d.label,
|
|
5522
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
5522
|
+
"onUpdate:modelValue": m[0] || (m[0] = (J) => d.label = J)
|
|
5523
5523
|
}, null, 8, ["modelValue"])
|
|
5524
5524
|
]),
|
|
5525
5525
|
D("div", xr, [
|
|
@@ -5532,9 +5532,9 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5532
5532
|
])]),
|
|
5533
5533
|
_: 1
|
|
5534
5534
|
}),
|
|
5535
|
-
r(
|
|
5535
|
+
r(V, {
|
|
5536
5536
|
modelValue: d.icon,
|
|
5537
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
5537
|
+
"onUpdate:modelValue": m[1] || (m[1] = (J) => d.icon = J)
|
|
5538
5538
|
}, null, 8, ["modelValue"])
|
|
5539
5539
|
]),
|
|
5540
5540
|
D("div", yr, [
|
|
@@ -5546,18 +5546,18 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5546
5546
|
}),
|
|
5547
5547
|
r(b, {
|
|
5548
5548
|
modelValue: d.visible,
|
|
5549
|
-
"onUpdate:modelValue": m[2] || (m[2] = (
|
|
5549
|
+
"onUpdate:modelValue": m[2] || (m[2] = (J) => d.visible = J),
|
|
5550
5550
|
variables: [],
|
|
5551
5551
|
placeholder: "true",
|
|
5552
5552
|
class: "w-full max-h-[200px]"
|
|
5553
5553
|
}, null, 8, ["modelValue"])
|
|
5554
5554
|
])
|
|
5555
5555
|
]),
|
|
5556
|
-
r(
|
|
5556
|
+
r(h, {
|
|
5557
5557
|
modelValue: d.flow,
|
|
5558
|
-
"onUpdate:modelValue": m[3] || (m[3] = (
|
|
5558
|
+
"onUpdate:modelValue": m[3] || (m[3] = (J) => d.flow = J),
|
|
5559
5559
|
variables: [{ name: "item", type: "object", value: { data: {} }, info: "The row item, access it with item.data" }],
|
|
5560
|
-
"flow-builder-extensions": [
|
|
5560
|
+
"flow-builder-extensions": [F(Oe)()]
|
|
5561
5561
|
}, null, 8, ["modelValue", "flow-builder-extensions"]),
|
|
5562
5562
|
r(I, null, {
|
|
5563
5563
|
default: i(() => [
|
|
@@ -5570,7 +5570,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5570
5570
|
S(" Remove Action ", -1)
|
|
5571
5571
|
])]),
|
|
5572
5572
|
_: 1
|
|
5573
|
-
})) :
|
|
5573
|
+
})) : Y("", !0),
|
|
5574
5574
|
r(M, { onClick: f }, {
|
|
5575
5575
|
default: i(() => [
|
|
5576
5576
|
S(z(s.value === "add" ? "Add Action" : "Save changes"), 1)
|
|
@@ -5588,10 +5588,10 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5588
5588
|
}, 8, ["open"]);
|
|
5589
5589
|
};
|
|
5590
5590
|
}
|
|
5591
|
-
}), br = { class: "grid gap-4 py-4" }, Dr = /* @__PURE__ */
|
|
5591
|
+
}), br = { class: "grid gap-4 py-4" }, Dr = /* @__PURE__ */ ne({
|
|
5592
5592
|
__name: "Actions",
|
|
5593
5593
|
setup(e) {
|
|
5594
|
-
const { setModuleData: o } = xe(), { isAdmin: t } = ve(), n =
|
|
5594
|
+
const { setModuleData: o } = xe(), { isAdmin: t } = ve(), n = T(), l = K("itemActions", T([])), s = (u) => {
|
|
5595
5595
|
let f = crypto.randomUUID();
|
|
5596
5596
|
(!l.value || l?.value?.length === 0) && (l.value = []), l.value.push({ ...u, id: f }), o("itemActions", l.value);
|
|
5597
5597
|
}, a = (u) => {
|
|
@@ -5602,7 +5602,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5602
5602
|
return (u, f) => {
|
|
5603
5603
|
const w = v("Button"), y = v("DialogTrigger"), m = v("DialogTitle"), p = v("DialogDescription"), C = v("DialogHeader"), g = v("DialogContent"), _ = v("Dialog");
|
|
5604
5604
|
return R(), k(U, null, [
|
|
5605
|
-
|
|
5605
|
+
F(t)() ? (R(), B(_, { key: 0 }, {
|
|
5606
5606
|
default: i(() => [
|
|
5607
5607
|
r(y, { "as-child": "" }, {
|
|
5608
5608
|
default: i(() => [
|
|
@@ -5611,7 +5611,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5611
5611
|
class: "text-primary hover:text-primary"
|
|
5612
5612
|
}, {
|
|
5613
5613
|
default: i(() => [
|
|
5614
|
-
r(
|
|
5614
|
+
r(F(Zt), { class: "size-4" }),
|
|
5615
5615
|
f[4] || (f[4] = S(" Edit item actions ", -1))
|
|
5616
5616
|
]),
|
|
5617
5617
|
_: 1
|
|
@@ -5642,19 +5642,19 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5642
5642
|
onClick: f[0] || (f[0] = (c) => n.value.openDialog())
|
|
5643
5643
|
}, {
|
|
5644
5644
|
default: i(() => [
|
|
5645
|
-
r(
|
|
5645
|
+
r(F(Fe), { class: "size-4" }),
|
|
5646
5646
|
f[7] || (f[7] = S(" Add action ", -1))
|
|
5647
5647
|
]),
|
|
5648
5648
|
_: 1
|
|
5649
5649
|
}),
|
|
5650
5650
|
D("div", br, [
|
|
5651
|
-
(R(!0), k(U, null,
|
|
5651
|
+
(R(!0), k(U, null, te(F(l), (c) => (R(), B(w, {
|
|
5652
5652
|
key: c.id,
|
|
5653
|
-
onClick: (
|
|
5653
|
+
onClick: (V) => n.value.openDialog(c),
|
|
5654
5654
|
variant: "outline"
|
|
5655
5655
|
}, {
|
|
5656
5656
|
default: i(() => [
|
|
5657
|
-
(R(), B(rt(
|
|
5657
|
+
(R(), B(rt(F(st)[c.icon]))),
|
|
5658
5658
|
S(" " + z(c.label), 1)
|
|
5659
5659
|
]),
|
|
5660
5660
|
_: 2
|
|
@@ -5665,7 +5665,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5665
5665
|
})
|
|
5666
5666
|
]),
|
|
5667
5667
|
_: 1
|
|
5668
|
-
})) :
|
|
5668
|
+
})) : Y("", !0),
|
|
5669
5669
|
r(Rr, {
|
|
5670
5670
|
ref_key: "actionDialog",
|
|
5671
5671
|
ref: n,
|
|
@@ -5676,10 +5676,10 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5676
5676
|
], 64);
|
|
5677
5677
|
};
|
|
5678
5678
|
}
|
|
5679
|
-
}),
|
|
5679
|
+
}), Fr = { class: "grid grid-cols-2 gap-2 mb-2 py-2" }, Vr = { class: "flex flex-col items-start gap-1.5" }, hr = { class: "flex flex-col items-start gap-1.5" }, $r = /* @__PURE__ */ ne({
|
|
5680
5680
|
__name: "CtaActionDialog",
|
|
5681
5681
|
setup(e, { expose: o }) {
|
|
5682
|
-
const { setModuleData: t } = xe(), n =
|
|
5682
|
+
const { setModuleData: t } = xe(), n = K("ctaButtonSettings", T({})), l = T(!1), s = T("add"), a = T(null), d = De({
|
|
5683
5683
|
label: "",
|
|
5684
5684
|
icon: "",
|
|
5685
5685
|
flow: {}
|
|
@@ -5704,10 +5704,10 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5704
5704
|
return o({
|
|
5705
5705
|
openDialog: u
|
|
5706
5706
|
}), (y, m) => {
|
|
5707
|
-
const p = v("DialogTitle"), C = v("DialogDescription"), g = v("DialogHeader"), _ = v("Label"), c = v("Input"),
|
|
5707
|
+
const p = v("DialogTitle"), C = v("DialogDescription"), g = v("DialogHeader"), _ = v("Label"), c = v("Input"), V = v("LucideIconPicker"), b = v("FlowBuilderSelect"), h = v("Button"), M = v("DialogFooter"), I = v("DialogScrollContent"), O = v("Dialog");
|
|
5708
5708
|
return R(), B(O, {
|
|
5709
5709
|
open: l.value,
|
|
5710
|
-
"onUpdate:open": m[3] || (m[3] = (
|
|
5710
|
+
"onUpdate:open": m[3] || (m[3] = (q) => l.value = q)
|
|
5711
5711
|
}, {
|
|
5712
5712
|
default: i(() => [
|
|
5713
5713
|
r(I, { class: "sm:max-w-2xl" }, {
|
|
@@ -5729,8 +5729,8 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5729
5729
|
]),
|
|
5730
5730
|
_: 1
|
|
5731
5731
|
}),
|
|
5732
|
-
D("div",
|
|
5733
|
-
D("div",
|
|
5732
|
+
D("div", Fr, [
|
|
5733
|
+
D("div", Vr, [
|
|
5734
5734
|
r(_, {
|
|
5735
5735
|
for: "action_dialog_label",
|
|
5736
5736
|
class: "text-xs text-muted-foreground"
|
|
@@ -5743,7 +5743,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5743
5743
|
r(c, {
|
|
5744
5744
|
id: "action_dialog_label",
|
|
5745
5745
|
modelValue: d.label,
|
|
5746
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
5746
|
+
"onUpdate:modelValue": m[0] || (m[0] = (q) => d.label = q)
|
|
5747
5747
|
}, null, 8, ["modelValue"])
|
|
5748
5748
|
]),
|
|
5749
5749
|
D("div", hr, [
|
|
@@ -5756,21 +5756,21 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5756
5756
|
])]),
|
|
5757
5757
|
_: 1
|
|
5758
5758
|
}),
|
|
5759
|
-
r(
|
|
5759
|
+
r(V, {
|
|
5760
5760
|
modelValue: d.icon,
|
|
5761
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
5761
|
+
"onUpdate:modelValue": m[1] || (m[1] = (q) => d.icon = q)
|
|
5762
5762
|
}, null, 8, ["modelValue"])
|
|
5763
5763
|
])
|
|
5764
5764
|
]),
|
|
5765
5765
|
r(b, {
|
|
5766
5766
|
modelValue: d.flow,
|
|
5767
|
-
"onUpdate:modelValue": m[2] || (m[2] = (
|
|
5767
|
+
"onUpdate:modelValue": m[2] || (m[2] = (q) => d.flow = q),
|
|
5768
5768
|
allAvailableVariables: [],
|
|
5769
|
-
"flow-builder-extensions": [
|
|
5769
|
+
"flow-builder-extensions": [F(Oe)()]
|
|
5770
5770
|
}, null, 8, ["modelValue", "flow-builder-extensions"]),
|
|
5771
5771
|
r(M, null, {
|
|
5772
5772
|
default: i(() => [
|
|
5773
|
-
s.value === "edit" ? (R(), B(
|
|
5773
|
+
s.value === "edit" ? (R(), B(h, {
|
|
5774
5774
|
key: 0,
|
|
5775
5775
|
variant: "destructive",
|
|
5776
5776
|
onClick: w
|
|
@@ -5779,8 +5779,8 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5779
5779
|
S(" Remove Button ", -1)
|
|
5780
5780
|
])]),
|
|
5781
5781
|
_: 1
|
|
5782
|
-
})) :
|
|
5783
|
-
r(
|
|
5782
|
+
})) : Y("", !0),
|
|
5783
|
+
r(h, { onClick: f }, {
|
|
5784
5784
|
default: i(() => [
|
|
5785
5785
|
S(z(s.value === "add" ? "Add Button" : "Save Changes"), 1)
|
|
5786
5786
|
]),
|
|
@@ -5803,7 +5803,7 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5803
5803
|
}, Pr = { class: "w-full flex flex-wrap gap-2 items-start" }, kr = { class: "w-full flex gap-2 items-start justify-between" }, Ar = { class: "flex gap-2" }, Tr = {
|
|
5804
5804
|
key: 1,
|
|
5805
5805
|
class: "flex flex-col items-start gap-1"
|
|
5806
|
-
}, jr = /* @__PURE__ */
|
|
5806
|
+
}, jr = /* @__PURE__ */ ne({
|
|
5807
5807
|
__name: "TableView",
|
|
5808
5808
|
props: {
|
|
5809
5809
|
config: {
|
|
@@ -5814,52 +5814,52 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5814
5814
|
setup(e) {
|
|
5815
5815
|
const o = e, t = Ot(), { isAdmin: n } = ve(), { getModuleData: l } = xe(), { runFlow: s } = wt();
|
|
5816
5816
|
Bt(() => []);
|
|
5817
|
-
const a =
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
W
|
|
5817
|
+
const a = T(), d = T(), u = T([]), f = T([]), w = T(), y = T(!1), m = T(""), p = T(), C = T([]), g = T([]), _ = T(!1), c = T(null), V = T(null), b = be(() => o.config?.getItems?.integration), h = async () => {
|
|
5818
|
+
V.value = await l("dateRangeFilter");
|
|
5819
|
+
}, M = async () => V.value !== null ? V.value : await l("dateRangeFilter"), I = async () => {
|
|
5820
|
+
const W = await M();
|
|
5821
|
+
let A;
|
|
5822
|
+
return W && (A = {
|
|
5821
5823
|
name: "dateRangeFilter",
|
|
5822
5824
|
type: "dateRangeFilter",
|
|
5823
5825
|
value: {
|
|
5824
5826
|
from: p.value?.[0],
|
|
5825
5827
|
to: p.value?.[1]
|
|
5826
5828
|
}
|
|
5827
|
-
})
|
|
5828
|
-
|
|
5829
|
-
name: I(E),
|
|
5829
|
+
}), [...Object.entries(t.query).map(([re, ae]) => ({
|
|
5830
|
+
name: J(re),
|
|
5830
5831
|
type: "routeQueryParam",
|
|
5831
|
-
value:
|
|
5832
|
-
})) || [],
|
|
5833
|
-
|
|
5834
|
-
}, F = async () => {
|
|
5832
|
+
value: ae ?? null
|
|
5833
|
+
})) || [], A].filter(Boolean);
|
|
5834
|
+
}, O = async () => {
|
|
5835
5835
|
let W = o.config?.getItems ? JSON.parse(JSON.stringify(o.config?.getItems)) : null;
|
|
5836
5836
|
if (!W) return;
|
|
5837
|
-
const
|
|
5838
|
-
u.value =
|
|
5839
|
-
},
|
|
5837
|
+
const A = await I(), j = await s(W, A);
|
|
5838
|
+
u.value = j || [];
|
|
5839
|
+
}, q = async () => {
|
|
5840
5840
|
f.value = await l("columns"), g.value = await l("itemActions") || [], c.value = await l("ctaButtonSettings") || {};
|
|
5841
5841
|
};
|
|
5842
|
-
function
|
|
5843
|
-
return W.replace(/-([a-z])/g, (
|
|
5842
|
+
function J(W) {
|
|
5843
|
+
return W.replace(/-([a-z])/g, (A, j) => j.toUpperCase());
|
|
5844
5844
|
}
|
|
5845
|
-
const
|
|
5845
|
+
const Z = () => {
|
|
5846
5846
|
d.value.saveSortMode(), y.value = !1;
|
|
5847
|
-
},
|
|
5848
|
-
const W = await
|
|
5849
|
-
await s(c.value.flow,
|
|
5847
|
+
}, le = async () => {
|
|
5848
|
+
const W = (/* @__PURE__ */ new Date()).getTime(), A = await I();
|
|
5849
|
+
console.log("got context in ", (/* @__PURE__ */ new Date()).getTime() - W, "ms"), await s(c.value.flow, A, [], [
|
|
5850
5850
|
Oe({ tableRowActions: {
|
|
5851
|
-
create: (
|
|
5852
|
-
u.value.push(
|
|
5851
|
+
create: (j) => {
|
|
5852
|
+
u.value.push(j);
|
|
5853
5853
|
}
|
|
5854
5854
|
} })
|
|
5855
5855
|
]);
|
|
5856
|
-
},
|
|
5856
|
+
}, oe = () => {
|
|
5857
5857
|
Nt(u.value, "data.csv");
|
|
5858
5858
|
};
|
|
5859
5859
|
return ke(() => {
|
|
5860
|
-
|
|
5861
|
-
}),
|
|
5862
|
-
const
|
|
5860
|
+
q(), h();
|
|
5861
|
+
}), de("data", u), de("columns", f), de("table", w), de("sortMode", y), de("sortModeProperty", m), de("dateRangeFilter", p), de("filters", C), de("itemActions", g), de("isPerformingDataTableAction", _), de("ctaButtonSettings", c), de("integrationId", b), de("getTableData", O), de("saveSortMode", Z), (W, A) => {
|
|
5862
|
+
const j = v("Button");
|
|
5863
5863
|
return R(), k(U, null, [
|
|
5864
5864
|
D("div", Mr, [
|
|
5865
5865
|
D("div", Ir, [
|
|
@@ -5873,43 +5873,43 @@ const Jl = ["disabled"], Ql = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5873
5873
|
D("div", kr, [
|
|
5874
5874
|
r(Cr),
|
|
5875
5875
|
D("div", Ar, [
|
|
5876
|
-
|
|
5876
|
+
F(n)() ? (R(), B(Dr, { key: 0 })) : Y("", !0),
|
|
5877
5877
|
c.value?.enabled ? (R(), k("div", Tr, [
|
|
5878
|
-
r(
|
|
5879
|
-
onClick:
|
|
5878
|
+
r(j, {
|
|
5879
|
+
onClick: le,
|
|
5880
5880
|
disabled: _.value
|
|
5881
5881
|
}, {
|
|
5882
5882
|
default: i(() => [
|
|
5883
|
-
(R(), B(rt(
|
|
5883
|
+
(R(), B(rt(F(st)[c.value?.icon]), { class: "size-4" })),
|
|
5884
5884
|
S(" " + z(c.value?.label), 1)
|
|
5885
5885
|
]),
|
|
5886
5886
|
_: 1
|
|
5887
5887
|
}, 8, ["disabled"]),
|
|
5888
|
-
|
|
5888
|
+
F(n)() ? (R(), k("button", {
|
|
5889
5889
|
key: 0,
|
|
5890
5890
|
class: "text-xs text-primary hover:underline",
|
|
5891
|
-
onClick:
|
|
5892
|
-
}, "Settings")) :
|
|
5893
|
-
])) : c.value &&
|
|
5891
|
+
onClick: A[0] || (A[0] = (re) => a.value.openDialog())
|
|
5892
|
+
}, "Settings")) : Y("", !0)
|
|
5893
|
+
])) : c.value && F(n)() ? (R(), B(j, {
|
|
5894
5894
|
key: 2,
|
|
5895
5895
|
variant: "outline",
|
|
5896
5896
|
class: "border-primary dark:border-primary border-dashed text-primary dark:text-primary",
|
|
5897
|
-
onClick:
|
|
5897
|
+
onClick: A[1] || (A[1] = (re) => a.value.openDialog())
|
|
5898
5898
|
}, {
|
|
5899
5899
|
default: i(() => [
|
|
5900
|
-
r(
|
|
5901
|
-
|
|
5900
|
+
r(F(Fe), { class: "size-4" }),
|
|
5901
|
+
A[2] || (A[2] = S(" Set primary button ", -1))
|
|
5902
5902
|
]),
|
|
5903
5903
|
_: 1
|
|
5904
|
-
})) :
|
|
5904
|
+
})) : Y("", !0)
|
|
5905
5905
|
])
|
|
5906
5906
|
]),
|
|
5907
5907
|
r(nl, {
|
|
5908
5908
|
ref_key: "tableRef",
|
|
5909
5909
|
ref: d
|
|
5910
5910
|
}, null, 512),
|
|
5911
|
-
r(
|
|
5912
|
-
default: i(() => [...
|
|
5911
|
+
r(j, { onClick: oe }, {
|
|
5912
|
+
default: i(() => [...A[3] || (A[3] = [
|
|
5913
5913
|
S(" Download data ", -1)
|
|
5914
5914
|
])]),
|
|
5915
5915
|
_: 1
|