@oneclick.dev/cms-core-modules 0.0.35 → 0.0.36
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/index.cjs.js +6 -6
- package/dist/index.mjs +393 -397
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -820,8 +820,8 @@ const ho = {
|
|
|
820
820
|
var k, b;
|
|
821
821
|
const D = t.options.columnResizeDirection === "rtl" ? -1 : 1, E = (M - ((k = V == null ? void 0 : V.startOffset) != null ? k : 0)) * D, O = Math.max(E / ((b = V == null ? void 0 : V.startSize) != null ? b : 0), -0.999999);
|
|
822
822
|
return V.columnSizingStart.forEach((L) => {
|
|
823
|
-
let [ee,
|
|
824
|
-
a[ee] = Math.round(Math.max(
|
|
823
|
+
let [ee, B] = L;
|
|
824
|
+
a[ee] = Math.round(Math.max(B + B * O, 0) * 100) / 100;
|
|
825
825
|
}), {
|
|
826
826
|
...V,
|
|
827
827
|
deltaOffset: E,
|
|
@@ -2270,7 +2270,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2270
2270
|
__name: "DataTable",
|
|
2271
2271
|
setup(e, { expose: t }) {
|
|
2272
2272
|
const { Button: n, Checkbox: o } = Ya, { $dragAndDrop: r } = useNuxtApp(), { formatCurrency: i } = Xa(), s = se("integrationId", oe("")), u = se("resourcePath", oe("")), l = se("table"), a = se("data"), c = se("columns"), p = se("sortMode", oe(!1)), v = se("sortModeProperty", oe("")), m = se("filters", oe([])), g = se("itemActions", oe([])), _ = ve(() => {
|
|
2273
|
-
var
|
|
2273
|
+
var Q;
|
|
2274
2274
|
let F = [];
|
|
2275
2275
|
return p.value ? F.push({
|
|
2276
2276
|
id: "drag-handle",
|
|
@@ -2309,11 +2309,11 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2309
2309
|
}),
|
|
2310
2310
|
enableSorting: !1,
|
|
2311
2311
|
enableHiding: !1
|
|
2312
|
-
}), (
|
|
2312
|
+
}), (Q = c.value) == null || Q.forEach((T) => {
|
|
2313
2313
|
let te = !!m.value.find((A) => A.property === T.property);
|
|
2314
2314
|
T.visible && (T.type === "text" ? F.push({
|
|
2315
2315
|
id: T.property,
|
|
2316
|
-
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R,
|
|
2316
|
+
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R, j) => R == null ? void 0 : R[j], A) : A[T.property],
|
|
2317
2317
|
header: ({ column: A }) => Xe(n, {
|
|
2318
2318
|
variant: "ghost",
|
|
2319
2319
|
disabled: p.value,
|
|
@@ -2322,32 +2322,32 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2322
2322
|
cell: ({ row: A }) => Xe("div", {}, A.getValue(T.property)),
|
|
2323
2323
|
...te ? {
|
|
2324
2324
|
enableColumnFilter: !0,
|
|
2325
|
-
filterFn: (A, R,
|
|
2326
|
-
if (!Array.isArray(
|
|
2325
|
+
filterFn: (A, R, j) => {
|
|
2326
|
+
if (!Array.isArray(j) || j.length === 0) return !0;
|
|
2327
2327
|
const G = A.getValue(R);
|
|
2328
|
-
return
|
|
2328
|
+
return j.includes(G);
|
|
2329
2329
|
}
|
|
2330
2330
|
} : {}
|
|
2331
2331
|
}) : T.type === "number" ? F.push({
|
|
2332
2332
|
id: T.property,
|
|
2333
|
-
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R,
|
|
2333
|
+
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R, j) => R == null ? void 0 : R[j], A) : A[T.property],
|
|
2334
2334
|
header: ({ column: A }) => Xe(n, {
|
|
2335
2335
|
variant: "ghost",
|
|
2336
2336
|
disabled: p.value,
|
|
2337
2337
|
onClick: () => A.toggleSorting(A.getIsSorted() === "asc")
|
|
2338
2338
|
}, () => [T.label, Xe(Tr, { class: "ml-2 size-4" })]),
|
|
2339
2339
|
cell: ({ row: A }) => {
|
|
2340
|
-
var R,
|
|
2341
|
-
return Xe("div", { class: "" }, isNaN(A.getValue(T.property)) ? A.getValue(T.property) : (
|
|
2340
|
+
var R, j;
|
|
2341
|
+
return Xe("div", { class: "" }, isNaN(A.getValue(T.property)) ? A.getValue(T.property) : (j = (R = parseFloat(A.getValue(T.property))) == null ? void 0 : R.toFixed(2)) == null ? void 0 : j.replace(".00", ""));
|
|
2342
2342
|
}
|
|
2343
2343
|
}) : T.type === "date" ? F.push({
|
|
2344
2344
|
id: T.property,
|
|
2345
|
-
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R,
|
|
2345
|
+
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R, j) => R == null ? void 0 : R[j], A) : A[T.property],
|
|
2346
2346
|
header: T.label,
|
|
2347
2347
|
cell: ({ row: A }) => Xe("div", { class: "" }, A.getValue(T.property))
|
|
2348
2348
|
}) : T.type === "datetime" ? F.push({
|
|
2349
2349
|
id: T.property,
|
|
2350
|
-
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R,
|
|
2350
|
+
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R, j) => R == null ? void 0 : R[j], A) : A[T.property],
|
|
2351
2351
|
header: T.label,
|
|
2352
2352
|
cell: ({ row: A }) => {
|
|
2353
2353
|
var R;
|
|
@@ -2355,32 +2355,32 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2355
2355
|
}
|
|
2356
2356
|
}) : T.type === "boolean" ? F.push({
|
|
2357
2357
|
id: T.property,
|
|
2358
|
-
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R,
|
|
2358
|
+
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R, j) => R == null ? void 0 : R[j], A) : A[T.property],
|
|
2359
2359
|
header: T.label,
|
|
2360
2360
|
cell: ({ row: A }) => Xe(o, { defaultValue: A.getValue(T.property), disabled: !0, class: "border-ring disabled:cursor-default disabled:opacity-100" })
|
|
2361
2361
|
}) : T.type === "URL" ? F.push({
|
|
2362
2362
|
id: T.property,
|
|
2363
|
-
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R,
|
|
2363
|
+
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R, j) => R == null ? void 0 : R[j], A) : A[T.property],
|
|
2364
2364
|
header: T.label,
|
|
2365
2365
|
cell: ({ row: A }) => Xe("a", { href: A.getValue(T.property), target: "_blank", class: "text-primary" }, A.getValue(T.property))
|
|
2366
2366
|
}) : T.type === "email" ? F.push({
|
|
2367
2367
|
id: T.property,
|
|
2368
|
-
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R,
|
|
2368
|
+
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R, j) => R == null ? void 0 : R[j], A) : A[T.property],
|
|
2369
2369
|
header: T.label,
|
|
2370
2370
|
cell: ({ row: A }) => Xe("a", { href: `mailto:${A.getValue(T.property)}`, class: "text-primary" }, A.getValue(T.property))
|
|
2371
2371
|
}) : T.type === "phone" ? F.push({
|
|
2372
2372
|
id: T.property,
|
|
2373
|
-
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R,
|
|
2373
|
+
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R, j) => R == null ? void 0 : R[j], A) : A[T.property],
|
|
2374
2374
|
header: T.label,
|
|
2375
2375
|
cell: ({ row: A }) => Xe("a", { href: `tel:${A.getValue(T.property)}`, class: "text-primary" }, A.getValue(T.property))
|
|
2376
2376
|
}) : T.type === "currency" ? F.push({
|
|
2377
2377
|
id: T.property,
|
|
2378
|
-
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R,
|
|
2378
|
+
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R, j) => R == null ? void 0 : R[j], A) : A[T.property],
|
|
2379
2379
|
header: T.label,
|
|
2380
2380
|
cell: ({ row: A }) => Xe("div", { class: "" }, i(A.getValue(T.property)))
|
|
2381
2381
|
}) : T.type === "image" && F.push({
|
|
2382
2382
|
id: T.property,
|
|
2383
|
-
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R,
|
|
2383
|
+
accessorFn: (A) => T.property.includes(".") ? T.property.split(".").reduce((R, j) => R == null ? void 0 : R[j], A) : A[T.property],
|
|
2384
2384
|
header: T.label,
|
|
2385
2385
|
cell: ({ row: A }) => A.getValue(T.property) ? Xe("img", { src: A.getValue(T.property), alt: T.label, class: "size-16 object-cover" }) : ""
|
|
2386
2386
|
}));
|
|
@@ -2403,12 +2403,12 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2403
2403
|
onGlobalFilterChange(F) {
|
|
2404
2404
|
Cn(F, I);
|
|
2405
2405
|
},
|
|
2406
|
-
globalFilterFn: (F,
|
|
2406
|
+
globalFilterFn: (F, Q, T) => {
|
|
2407
2407
|
const te = T.toLowerCase();
|
|
2408
2408
|
return c.value.map((R) => R.property).some((R) => {
|
|
2409
2409
|
var G;
|
|
2410
|
-
const
|
|
2411
|
-
return typeof
|
|
2410
|
+
const j = (G = F.original) == null ? void 0 : G[R];
|
|
2411
|
+
return typeof j == "string" && j.toLowerCase().includes(te);
|
|
2412
2412
|
});
|
|
2413
2413
|
},
|
|
2414
2414
|
getCoreRowModel: xd(),
|
|
@@ -2450,14 +2450,14 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2450
2450
|
};
|
|
2451
2451
|
l.value = Ed(F);
|
|
2452
2452
|
}), me(p, (F) => {
|
|
2453
|
-
var
|
|
2454
|
-
F ? ee() : (
|
|
2453
|
+
var Q;
|
|
2454
|
+
F ? ee() : (Q = l == null ? void 0 : l.value) == null || Q.setPageSize(L.value);
|
|
2455
2455
|
});
|
|
2456
2456
|
const [E, O] = r([], {
|
|
2457
2457
|
plugins: [$o()]
|
|
2458
2458
|
}), L = oe(0), ee = () => {
|
|
2459
|
-
var F,
|
|
2460
|
-
L.value = (F = l == null ? void 0 : l.value) == null ? void 0 : F.getState().pagination.pageSize, (
|
|
2459
|
+
var F, Q;
|
|
2460
|
+
L.value = (F = l == null ? void 0 : l.value) == null ? void 0 : F.getState().pagination.pageSize, (Q = l == null ? void 0 : l.value) == null || Q.setPageSize(1e4), O.value = ((a == null ? void 0 : a.value) ?? []).slice().sort((T, te) => {
|
|
2461
2461
|
const A = T[v.value] ?? 0, R = te[v.value] ?? 0;
|
|
2462
2462
|
return A - R;
|
|
2463
2463
|
}).map((T, te) => ({
|
|
@@ -2468,20 +2468,20 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2468
2468
|
[v.value]: te
|
|
2469
2469
|
},
|
|
2470
2470
|
getVisibleCells: () => {
|
|
2471
|
-
var A, R,
|
|
2472
|
-
return (
|
|
2471
|
+
var A, R, j;
|
|
2472
|
+
return (j = (R = (A = l == null ? void 0 : l.value) == null ? void 0 : A.getRowModel().rows) == null ? void 0 : R.find((G) => G.original.id === T.id)) == null ? void 0 : j.getVisibleCells();
|
|
2473
2473
|
}
|
|
2474
2474
|
}));
|
|
2475
2475
|
};
|
|
2476
2476
|
return t({
|
|
2477
2477
|
saveSortMode: async () => {
|
|
2478
2478
|
const { update: F } = ri(s.value);
|
|
2479
|
-
a.value.forEach((
|
|
2480
|
-
|
|
2479
|
+
a.value.forEach((Q) => {
|
|
2480
|
+
Q[v.value] !== O.value.findIndex((T) => T.id === Q.id) && (Q[v.value] = O.value.findIndex((T) => T.id === Q.id), F(u.value, Q.id, { [v.value]: Q[v.value] }));
|
|
2481
2481
|
});
|
|
2482
2482
|
}
|
|
2483
|
-
}), (F,
|
|
2484
|
-
const T = y("TableHead"), te = y("TableRow"), A = y("TableHeader"), R = y("TableCell"),
|
|
2483
|
+
}), (F, Q) => {
|
|
2484
|
+
const T = y("TableHead"), te = y("TableRow"), A = y("TableHeader"), R = y("TableCell"), j = y("TableBody"), G = y("Table");
|
|
2485
2485
|
return w(), P(le, null, [
|
|
2486
2486
|
S("div", Gd, [
|
|
2487
2487
|
d(G, null, {
|
|
@@ -2510,7 +2510,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2510
2510
|
]),
|
|
2511
2511
|
_: 1
|
|
2512
2512
|
}),
|
|
2513
|
-
d(
|
|
2513
|
+
d(j, {
|
|
2514
2514
|
ref_key: "dragContainer",
|
|
2515
2515
|
ref: E
|
|
2516
2516
|
}, {
|
|
@@ -2563,7 +2563,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2563
2563
|
colspan: 999,
|
|
2564
2564
|
class: "h-24 text-center"
|
|
2565
2565
|
}, {
|
|
2566
|
-
default: f(() =>
|
|
2566
|
+
default: f(() => Q[0] || (Q[0] = [
|
|
2567
2567
|
C(" No results. ")
|
|
2568
2568
|
])),
|
|
2569
2569
|
_: 1,
|
|
@@ -2616,7 +2616,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2616
2616
|
return t({
|
|
2617
2617
|
openDialog: a
|
|
2618
2618
|
}), (g, _) => {
|
|
2619
|
-
const I = y("DialogTitle"), x = y("DialogDescription"), M = y("DialogHeader"), V = y("Label"), k = y("Input"), b = y("SelectValue"), D = y("SelectTrigger"), E = y("SelectItem"), O = y("SelectContent"), L = y("Select"), ee = y("ComboboxTrigger"),
|
|
2619
|
+
const I = y("DialogTitle"), x = y("DialogDescription"), M = y("DialogHeader"), V = y("Label"), k = y("Input"), b = y("SelectValue"), D = y("SelectTrigger"), E = y("SelectItem"), O = y("SelectContent"), L = y("Select"), ee = y("ComboboxTrigger"), B = y("ComboboxInput"), F = y("ComboboxAnchor"), Q = y("ComboboxItem"), T = y("ComboboxGroup"), te = y("ComboboxList"), A = y("Combobox"), R = y("Button"), j = y("DialogFooter"), G = y("DialogScrollContent"), U = y("Dialog");
|
|
2620
2620
|
return w(), Z(U, {
|
|
2621
2621
|
open: i.value,
|
|
2622
2622
|
"onUpdate:open": _[4] || (_[4] = (q) => i.value = q)
|
|
@@ -2749,7 +2749,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2749
2749
|
]),
|
|
2750
2750
|
_: 1
|
|
2751
2751
|
}),
|
|
2752
|
-
d(
|
|
2752
|
+
d(B, {
|
|
2753
2753
|
modelValue: l.field,
|
|
2754
2754
|
"onUpdate:modelValue": _[2] || (_[2] = ($) => l.field = $),
|
|
2755
2755
|
hideIcon: "",
|
|
@@ -2763,7 +2763,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2763
2763
|
default: f(() => [
|
|
2764
2764
|
d(T, null, {
|
|
2765
2765
|
default: f(() => [
|
|
2766
|
-
(w(!0), P(le, null, Ie(h(r), ($) => (w(), Z(
|
|
2766
|
+
(w(!0), P(le, null, Ie(h(r), ($) => (w(), Z(Q, {
|
|
2767
2767
|
key: $.property,
|
|
2768
2768
|
value: $.property,
|
|
2769
2769
|
onSelect: () => {
|
|
@@ -2827,7 +2827,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2827
2827
|
]),
|
|
2828
2828
|
_: 1
|
|
2829
2829
|
}),
|
|
2830
|
-
d(
|
|
2830
|
+
d(B, {
|
|
2831
2831
|
modelValue: $.field,
|
|
2832
2832
|
"onUpdate:modelValue": (H) => $.field = H,
|
|
2833
2833
|
hideIcon: "",
|
|
@@ -2841,7 +2841,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2841
2841
|
default: f(() => [
|
|
2842
2842
|
d(T, null, {
|
|
2843
2843
|
default: f(() => [
|
|
2844
|
-
(w(!0), P(le, null, Ie(h(r), (H) => (w(), Z(
|
|
2844
|
+
(w(!0), P(le, null, Ie(h(r), (H) => (w(), Z(Q, {
|
|
2845
2845
|
key: H.property,
|
|
2846
2846
|
value: H.property,
|
|
2847
2847
|
onSelect: () => {
|
|
@@ -2986,7 +2986,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
2986
2986
|
__: [24]
|
|
2987
2987
|
})
|
|
2988
2988
|
]),
|
|
2989
|
-
d(
|
|
2989
|
+
d(j, null, {
|
|
2990
2990
|
default: f(() => [
|
|
2991
2991
|
s.value === "edit" ? (w(), Z(R, {
|
|
2992
2992
|
key: 0,
|
|
@@ -3173,7 +3173,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
3173
3173
|
n("columns", s.value), i.value = s.value, c(), u.value = !1;
|
|
3174
3174
|
};
|
|
3175
3175
|
return (m, g) => {
|
|
3176
|
-
const _ = y("DropdownMenuItem"), I = y("DialogTrigger"), x = y("DialogTitle"), M = y("DialogDescription"), V = y("DialogHeader"), k = y("Button"), b = y("PopoverTrigger"), D = y("Label"), E = y("Input"), O = y("Checkbox"), L = y("SelectValue"), ee = y("SelectTrigger"),
|
|
3176
|
+
const _ = y("DropdownMenuItem"), I = y("DialogTrigger"), x = y("DialogTitle"), M = y("DialogDescription"), V = y("DialogHeader"), k = y("Button"), b = y("PopoverTrigger"), D = y("Label"), E = y("Input"), O = y("Checkbox"), L = y("SelectValue"), ee = y("SelectTrigger"), B = y("SelectLabel"), F = y("SelectItem"), Q = y("SelectGroup"), T = y("SelectContent"), te = y("Select"), A = y("PopoverContent"), R = y("Popover"), j = y("DialogFooter"), G = y("DialogScrollContent"), U = y("Dialog");
|
|
3177
3177
|
return w(), Z(U, {
|
|
3178
3178
|
open: u.value,
|
|
3179
3179
|
"onUpdate:open": [
|
|
@@ -3319,9 +3319,9 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
3319
3319
|
}),
|
|
3320
3320
|
d(T, null, {
|
|
3321
3321
|
default: f(() => [
|
|
3322
|
-
d(
|
|
3322
|
+
d(Q, null, {
|
|
3323
3323
|
default: f(() => [
|
|
3324
|
-
d(
|
|
3324
|
+
d(B, null, {
|
|
3325
3325
|
default: f(() => g[15] || (g[15] = [
|
|
3326
3326
|
C("Types")
|
|
3327
3327
|
])),
|
|
@@ -3515,9 +3515,9 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
3515
3515
|
}),
|
|
3516
3516
|
d(T, null, {
|
|
3517
3517
|
default: f(() => [
|
|
3518
|
-
d(
|
|
3518
|
+
d(Q, null, {
|
|
3519
3519
|
default: f(() => [
|
|
3520
|
-
d(
|
|
3520
|
+
d(B, null, {
|
|
3521
3521
|
default: f(() => g[32] || (g[32] = [
|
|
3522
3522
|
C("Types")
|
|
3523
3523
|
])),
|
|
@@ -3619,7 +3619,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
3619
3619
|
])
|
|
3620
3620
|
]))), 128))
|
|
3621
3621
|
]),
|
|
3622
|
-
d(
|
|
3622
|
+
d(j, null, {
|
|
3623
3623
|
default: f(() => [
|
|
3624
3624
|
d(k, { onClick: v }, {
|
|
3625
3625
|
default: f(() => g[43] || (g[43] = [
|
|
@@ -3759,8 +3759,8 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
3759
3759
|
o("saved", { field: l.value }), c();
|
|
3760
3760
|
};
|
|
3761
3761
|
return (v, m) => {
|
|
3762
|
-
const g = y("DialogTrigger"), _ = y("DialogTitle"), I = y("DialogDescription"), x = y("DialogHeader"), M = y("Label"), V = y("ComboboxTrigger"), k = y("ComboboxInput"), b = y("ComboboxAnchor"), D = y("ComboboxItem"), E = y("ComboboxGroup"), O = y("ComboboxList"), L = y("Combobox"), ee = y("Button"),
|
|
3763
|
-
return w(), Z(
|
|
3762
|
+
const g = y("DialogTrigger"), _ = y("DialogTitle"), I = y("DialogDescription"), x = y("DialogHeader"), M = y("Label"), V = y("ComboboxTrigger"), k = y("ComboboxInput"), b = y("ComboboxAnchor"), D = y("ComboboxItem"), E = y("ComboboxGroup"), O = y("ComboboxList"), L = y("Combobox"), ee = y("Button"), B = y("DialogFooter"), F = y("DialogScrollContent"), Q = y("Dialog");
|
|
3763
|
+
return w(), Z(Q, {
|
|
3764
3764
|
open: u.value,
|
|
3765
3765
|
"onUpdate:open": [
|
|
3766
3766
|
m[3] || (m[3] = (T) => u.value = T),
|
|
@@ -3862,7 +3862,7 @@ const Hd = /* @__PURE__ */ ce({
|
|
|
3862
3862
|
_: 1
|
|
3863
3863
|
}, 8, ["modelValue"])
|
|
3864
3864
|
]),
|
|
3865
|
-
d(
|
|
3865
|
+
d(B, null, {
|
|
3866
3866
|
default: f(() => [
|
|
3867
3867
|
S("div", kc, [
|
|
3868
3868
|
r.savedField ? (w(), Z(ee, {
|
|
@@ -4609,7 +4609,7 @@ const nf = ["disabled"], of = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4609
4609
|
o("saved", { field: a.value, defaultDate: c.value }), v();
|
|
4610
4610
|
};
|
|
4611
4611
|
return (g, _) => {
|
|
4612
|
-
const I = y("DialogTrigger"), x = y("DialogTitle"), M = y("DialogDescription"), V = y("DialogHeader"), k = y("Label"), b = y("ComboboxTrigger"), D = y("ComboboxInput"), E = y("ComboboxAnchor"), O = y("ComboboxItem"), L = y("ComboboxGroup"), ee = y("ComboboxList"),
|
|
4612
|
+
const I = y("DialogTrigger"), x = y("DialogTitle"), M = y("DialogDescription"), V = y("DialogHeader"), k = y("Label"), b = y("ComboboxTrigger"), D = y("ComboboxInput"), E = y("ComboboxAnchor"), O = y("ComboboxItem"), L = y("ComboboxGroup"), ee = y("ComboboxList"), B = y("Combobox"), F = y("SelectValue"), Q = y("SelectTrigger"), T = y("SelectItem"), te = y("SelectLabel"), A = y("SelectGroup"), R = y("SelectContent"), j = y("Select"), G = y("Button"), U = y("DialogFooter"), q = y("DialogScrollContent"), $ = y("Dialog");
|
|
4613
4613
|
return w(), Z($, {
|
|
4614
4614
|
open: l.value,
|
|
4615
4615
|
"onUpdate:open": [
|
|
@@ -4651,7 +4651,7 @@ const nf = ["disabled"], of = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4651
4651
|
_: 1
|
|
4652
4652
|
}),
|
|
4653
4653
|
S("div", of, [
|
|
4654
|
-
d(
|
|
4654
|
+
d(B, {
|
|
4655
4655
|
by: "label",
|
|
4656
4656
|
class: "w-full",
|
|
4657
4657
|
resetSearchTermOnBlur: !1,
|
|
@@ -4720,12 +4720,12 @@ const nf = ["disabled"], of = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4720
4720
|
_: 1,
|
|
4721
4721
|
__: [8]
|
|
4722
4722
|
}),
|
|
4723
|
-
d(
|
|
4723
|
+
d(j, {
|
|
4724
4724
|
modelValue: c.value,
|
|
4725
4725
|
"onUpdate:modelValue": _[3] || (_[3] = (H) => c.value = H)
|
|
4726
4726
|
}, {
|
|
4727
4727
|
default: f(() => [
|
|
4728
|
-
d(
|
|
4728
|
+
d(Q, { class: "w-[180px]" }, {
|
|
4729
4729
|
default: f(() => [
|
|
4730
4730
|
d(F, { placeholder: "Select a fruit" })
|
|
4731
4731
|
]),
|
|
@@ -4908,12 +4908,12 @@ const nf = ["disabled"], of = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4908
4908
|
const I = await t("dateRangeFilter");
|
|
4909
4909
|
c.value = (I == null ? void 0 : I.field) ?? "", p.value = (I == null ? void 0 : I.defaultDate) ?? "today", m(p.value), _();
|
|
4910
4910
|
}), (I, x) => {
|
|
4911
|
-
const M = y("Button"), V = y("PopoverTrigger"), k = y("RangeCalendar"), b = y("DropdownMenuTrigger"), D = y("DropdownMenuItem"), E = y("DropdownMenuSeparator"), O = y("DropdownMenuLabel"), L = y("DropdownMenuGroup"), ee = y("DropdownMenuContent"),
|
|
4911
|
+
const M = y("Button"), V = y("PopoverTrigger"), k = y("RangeCalendar"), b = y("DropdownMenuTrigger"), D = y("DropdownMenuItem"), E = y("DropdownMenuSeparator"), O = y("DropdownMenuLabel"), L = y("DropdownMenuGroup"), ee = y("DropdownMenuContent"), B = y("DropdownMenu"), F = y("PopoverContent"), Q = y("Popover");
|
|
4912
4912
|
return c.value || h(o)() ? (w(), P("div", {
|
|
4913
4913
|
key: 0,
|
|
4914
4914
|
class: Ze(["flex flex-col items-start gap-1", h(r) ? "opacity-50 pointer-events-none" : ""])
|
|
4915
4915
|
}, [
|
|
4916
|
-
d(
|
|
4916
|
+
d(Q, {
|
|
4917
4917
|
open: a.value,
|
|
4918
4918
|
"onUpdate:open": x[14] || (x[14] = (T) => a.value = T)
|
|
4919
4919
|
}, {
|
|
@@ -4955,7 +4955,7 @@ const nf = ["disabled"], of = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
4955
4955
|
"onUpdate:startValue": x[1] || (x[1] = (T) => l.value.start = T)
|
|
4956
4956
|
}, null, 8, ["modelValue"]),
|
|
4957
4957
|
S("div", df, [
|
|
4958
|
-
d(
|
|
4958
|
+
d(B, null, {
|
|
4959
4959
|
default: f(() => [
|
|
4960
4960
|
d(b, { "as-child": "" }, {
|
|
4961
4961
|
default: f(() => [
|
|
@@ -5167,13 +5167,13 @@ const nf = ["disabled"], of = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5167
5167
|
return t({
|
|
5168
5168
|
openDialog: c
|
|
5169
5169
|
}), (I, x) => {
|
|
5170
|
-
const M = y("DialogTitle"), V = y("DialogDescription"), k = y("DialogHeader"), b = y("Label"), D = y("Input"), E = y("Button"), O = y("PopoverTrigger"), L = y("Checkbox"), ee = y("PopoverContent"),
|
|
5170
|
+
const M = y("DialogTitle"), V = y("DialogDescription"), k = y("DialogHeader"), b = y("Label"), D = y("Input"), E = y("Button"), O = y("PopoverTrigger"), L = y("Checkbox"), ee = y("PopoverContent"), B = y("Popover"), F = y("DialogFooter"), Q = y("DialogScrollContent"), T = y("Dialog");
|
|
5171
5171
|
return w(), Z(T, {
|
|
5172
5172
|
open: r.value,
|
|
5173
5173
|
"onUpdate:open": x[6] || (x[6] = (te) => r.value = te)
|
|
5174
5174
|
}, {
|
|
5175
5175
|
default: f(() => [
|
|
5176
|
-
d(
|
|
5176
|
+
d(Q, { class: "sm:max-w-2xl" }, {
|
|
5177
5177
|
default: f(() => [
|
|
5178
5178
|
d(k, null, {
|
|
5179
5179
|
default: f(() => [
|
|
@@ -5237,7 +5237,7 @@ const nf = ["disabled"], of = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5237
5237
|
__: [9]
|
|
5238
5238
|
}),
|
|
5239
5239
|
x[16] || (x[16] = S("p", { class: "text-xs text-muted-foreground mb-2" }, " Define all options for this filter. ", -1)),
|
|
5240
|
-
d(
|
|
5240
|
+
d(B, {
|
|
5241
5241
|
open: u.value,
|
|
5242
5242
|
"onUpdate:open": x[5] || (x[5] = (te) => u.value = te)
|
|
5243
5243
|
}, {
|
|
@@ -5868,53 +5868,49 @@ const nf = ["disabled"], of = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5868
5868
|
const t = e, n = Rt(), { isAdmin: o } = St(), { getModuleData: r } = qt(), { navigateTo: i } = Rt(), { setModuleBreadcrumbs: s } = Zo(), { runFlow: u } = Bs();
|
|
5869
5869
|
s([]);
|
|
5870
5870
|
const l = oe(), a = oe(), c = oe([]), p = oe([]), v = oe(), m = oe(!1), g = oe(""), _ = oe(), I = oe([]), x = oe([]), M = oe({}), V = ve(() => {
|
|
5871
|
-
var
|
|
5872
|
-
return (F = (
|
|
5871
|
+
var B, F;
|
|
5872
|
+
return (F = (B = t.config) == null ? void 0 : B.getItems) == null ? void 0 : F.integration;
|
|
5873
5873
|
}), k = async () => {
|
|
5874
5874
|
var te, A;
|
|
5875
|
-
const
|
|
5875
|
+
const B = await r("dateRangeFilter");
|
|
5876
5876
|
let F;
|
|
5877
|
-
|
|
5877
|
+
return B && (F = {
|
|
5878
5878
|
name: "dateRangeFilter",
|
|
5879
5879
|
type: "dateRangeFilter",
|
|
5880
5880
|
value: {
|
|
5881
5881
|
from: (te = _.value) == null ? void 0 : te[0],
|
|
5882
5882
|
to: (A = _.value) == null ? void 0 : A[1]
|
|
5883
5883
|
}
|
|
5884
|
-
})
|
|
5885
|
-
const J = Object.entries(n.query).map(([R, B]) => ({
|
|
5884
|
+
}), [...Object.entries(n.query).map(([R, j]) => ({
|
|
5886
5885
|
name: E(R),
|
|
5887
5886
|
type: "routeQueryParam",
|
|
5888
|
-
value:
|
|
5889
|
-
})) || [];
|
|
5890
|
-
return console.log("route.query", n.query), console.log("routeQueryVars", J), [...J, F].filter(Boolean);
|
|
5887
|
+
value: j ?? null
|
|
5888
|
+
})) || [], F].filter(Boolean);
|
|
5891
5889
|
}, b = async () => {
|
|
5892
5890
|
var T, te;
|
|
5893
|
-
let
|
|
5894
|
-
if (!
|
|
5895
|
-
const F = await k();
|
|
5896
|
-
|
|
5897
|
-
const J = await u(j, F);
|
|
5898
|
-
c.value = J || [];
|
|
5891
|
+
let B = (T = t.config) != null && T.getItems ? JSON.parse(JSON.stringify((te = t.config) == null ? void 0 : te.getItems)) : null;
|
|
5892
|
+
if (!B) return;
|
|
5893
|
+
const F = await k(), Q = await u(B, F);
|
|
5894
|
+
c.value = Q || [];
|
|
5899
5895
|
}, D = async () => {
|
|
5900
5896
|
p.value = await r("columns"), x.value = await r("itemActions") || [], M.value = await r("ctaButtonSettings");
|
|
5901
5897
|
};
|
|
5902
|
-
function E(
|
|
5903
|
-
return
|
|
5898
|
+
function E(B) {
|
|
5899
|
+
return B.replace(/-([a-z])/g, (F, Q) => Q.toUpperCase());
|
|
5904
5900
|
}
|
|
5905
5901
|
const O = () => {
|
|
5906
5902
|
a.value.saveSortMode(), m.value = !1;
|
|
5907
5903
|
}, L = async () => {
|
|
5908
|
-
const
|
|
5904
|
+
const B = await k(), F = await u(M.value.flow, B);
|
|
5909
5905
|
console.log(F);
|
|
5910
5906
|
}, ee = () => {
|
|
5911
5907
|
Md(c.value, "data.csv");
|
|
5912
5908
|
};
|
|
5913
5909
|
return lt(() => {
|
|
5914
5910
|
b(), D();
|
|
5915
|
-
}), Le("data", c), Le("columns", p), Le("table", v), Le("sortMode", m), Le("sortModeProperty", g), Le("dateRangeFilter", _), Le("filters", I), Le("itemActions", x), Le("ctaButtonSettings", M), Le("integrationId", V), Le("getTableData", b), Le("saveSortMode", O), (
|
|
5911
|
+
}), Le("data", c), Le("columns", p), Le("table", v), Le("sortMode", m), Le("sortModeProperty", g), Le("dateRangeFilter", _), Le("filters", I), Le("itemActions", x), Le("ctaButtonSettings", M), Le("integrationId", V), Le("getTableData", b), Le("saveSortMode", O), (B, F) => {
|
|
5916
5912
|
var T;
|
|
5917
|
-
const
|
|
5913
|
+
const Q = y("Button");
|
|
5918
5914
|
return w(), P(le, null, [
|
|
5919
5915
|
S("div", Ff, [
|
|
5920
5916
|
S("div", zf, [
|
|
@@ -5930,7 +5926,7 @@ const nf = ["disabled"], of = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5930
5926
|
S("div", jf, [
|
|
5931
5927
|
h(o)() ? (w(), Z(Mf, { key: 0 })) : ie("", !0),
|
|
5932
5928
|
(T = M.value) != null && T.enabled ? (w(), P("div", Bf, [
|
|
5933
|
-
d(
|
|
5929
|
+
d(Q, { onClick: L }, {
|
|
5934
5930
|
default: f(() => {
|
|
5935
5931
|
var te, A;
|
|
5936
5932
|
return [
|
|
@@ -5945,7 +5941,7 @@ const nf = ["disabled"], of = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5945
5941
|
class: "text-xs text-primary hover:underline",
|
|
5946
5942
|
onClick: F[0] || (F[0] = (te) => l.value.openDialog())
|
|
5947
5943
|
}, "Settings")) : ie("", !0)
|
|
5948
|
-
])) : h(o)() ? (w(), Z(
|
|
5944
|
+
])) : h(o)() ? (w(), Z(Q, {
|
|
5949
5945
|
key: 2,
|
|
5950
5946
|
variant: "outline",
|
|
5951
5947
|
class: "border-primary dark:border-primary border-dashed text-primary dark:text-primary",
|
|
@@ -5964,7 +5960,7 @@ const nf = ["disabled"], of = { class: "flex flex-col items-start gap-4 py-4" },
|
|
|
5964
5960
|
ref_key: "tableRef",
|
|
5965
5961
|
ref: a
|
|
5966
5962
|
}, null, 512),
|
|
5967
|
-
d(
|
|
5963
|
+
d(Q, { onClick: ee }, {
|
|
5968
5964
|
default: f(() => F[3] || (F[3] = [
|
|
5969
5965
|
C(" Download data ")
|
|
5970
5966
|
])),
|
|
@@ -6384,7 +6380,7 @@ const _p = { class: "relative" }, yp = {
|
|
|
6384
6380
|
r("Loaded products", { module: "products" }), i("Product saved without proper SEO", { module: "products" }), s("Product failed to save", { module: "products" }), c();
|
|
6385
6381
|
}), (k, b) => {
|
|
6386
6382
|
var Pe;
|
|
6387
|
-
const D = y("Input"), E = y("Button"), O = y("PopoverTrigger"), L = y("ComboboxTrigger"), ee = y("ComboboxAnchor"),
|
|
6383
|
+
const D = y("Input"), E = y("Button"), O = y("PopoverTrigger"), L = y("ComboboxTrigger"), ee = y("ComboboxAnchor"), B = y("ComboboxInput"), F = y("ComboboxEmpty"), Q = y("ComboboxItemIndicator"), T = y("ComboboxItem"), te = y("ScrollArea"), A = y("ComboboxGroup"), R = y("ComboboxList"), j = y("Combobox"), G = y("Checkbox"), U = y("PopoverContent"), q = y("Popover"), $ = y("SegmentedControlButton"), H = y("SegmentedControl"), de = y("PaginationFirst"), Ee = y("PaginationPrev"), W = y("PaginationListItem"), ne = y("PaginationEllipsis"), ye = y("PaginationNext"), K = y("PaginationLast"), be = y("PaginationList"), Ve = y("Pagination");
|
|
6388
6384
|
return w(), P("div", _p, [
|
|
6389
6385
|
S("div", yp, [
|
|
6390
6386
|
S("div", bp, [
|
|
@@ -6434,7 +6430,7 @@ const _p = { class: "relative" }, yp = {
|
|
|
6434
6430
|
d(U, { class: "w-64" }, {
|
|
6435
6431
|
default: f(() => [
|
|
6436
6432
|
b[15] || (b[15] = S("p", { class: "text-sm font-medium text-muted-foreground mb-4" }, " Filter by Category ", -1)),
|
|
6437
|
-
d(
|
|
6433
|
+
d(j, {
|
|
6438
6434
|
modelValue: M.value.collections,
|
|
6439
6435
|
"onUpdate:modelValue": b[1] || (b[1] = (Te) => M.value.collections = Te),
|
|
6440
6436
|
by: "label",
|
|
@@ -6465,7 +6461,7 @@ const _p = { class: "relative" }, yp = {
|
|
|
6465
6461
|
d(R, null, {
|
|
6466
6462
|
default: f(() => [
|
|
6467
6463
|
S("div", Rp, [
|
|
6468
|
-
d(
|
|
6464
|
+
d(B, { placeholder: "Select category..." })
|
|
6469
6465
|
]),
|
|
6470
6466
|
d(F, null, {
|
|
6471
6467
|
default: f(() => b[10] || (b[10] = [
|
|
@@ -6484,7 +6480,7 @@ const _p = { class: "relative" }, yp = {
|
|
|
6484
6480
|
}, {
|
|
6485
6481
|
default: f(() => [
|
|
6486
6482
|
C(Y(Te.label) + " ", 1),
|
|
6487
|
-
d(
|
|
6483
|
+
d(Q, null, {
|
|
6488
6484
|
default: f(() => [
|
|
6489
6485
|
d(h(Dn), {
|
|
6490
6486
|
class: Ze(h(gn)("ml-auto size-4"))
|
|
@@ -6634,7 +6630,7 @@ const _p = { class: "relative" }, yp = {
|
|
|
6634
6630
|
}, null, 8, ["index"]))
|
|
6635
6631
|
], 64))), 256)),
|
|
6636
6632
|
d(ye),
|
|
6637
|
-
d(
|
|
6633
|
+
d(K)
|
|
6638
6634
|
]),
|
|
6639
6635
|
_: 1
|
|
6640
6636
|
})
|
|
@@ -7618,7 +7614,7 @@ function Ll(e, t, n) {
|
|
|
7618
7614
|
type: s,
|
|
7619
7615
|
validate: M.value ? A : void 0,
|
|
7620
7616
|
schema: V ? t : void 0
|
|
7621
|
-
}),
|
|
7617
|
+
}), B = ve(() => L.value[0]);
|
|
7622
7618
|
m && wm({
|
|
7623
7619
|
value: b,
|
|
7624
7620
|
prop: m,
|
|
@@ -7628,11 +7624,11 @@ function Ll(e, t, n) {
|
|
|
7628
7624
|
const F = (W, ne = !1) => {
|
|
7629
7625
|
E.touched = !0, ne && T();
|
|
7630
7626
|
};
|
|
7631
|
-
async function
|
|
7627
|
+
async function Q(W) {
|
|
7632
7628
|
var ne, ye;
|
|
7633
7629
|
if (I != null && I.validateSchema) {
|
|
7634
|
-
const { results:
|
|
7635
|
-
return (ne =
|
|
7630
|
+
const { results: K } = await I.validateSchema(W);
|
|
7631
|
+
return (ne = K[he(x)]) !== null && ne !== void 0 ? ne : { valid: !0, errors: [] };
|
|
7636
7632
|
}
|
|
7637
7633
|
return M.value ? Al(b.value, M.value, {
|
|
7638
7634
|
name: he(x),
|
|
@@ -7641,7 +7637,7 @@ function Ll(e, t, n) {
|
|
|
7641
7637
|
bails: i
|
|
7642
7638
|
}) : { valid: !0, errors: [] };
|
|
7643
7639
|
}
|
|
7644
|
-
const T = Hr(async () => (E.pending = !0, E.validated = !0,
|
|
7640
|
+
const T = Hr(async () => (E.pending = !0, E.validated = !0, Q("validated-only")), (W) => (ee.pendingUnmount[de.id] || (O({ errors: W.errors }), E.pending = !1, E.valid = W.valid), W)), te = Hr(async () => Q("silent"), (W) => (E.valid = W.valid, W));
|
|
7645
7641
|
function A(W) {
|
|
7646
7642
|
return (W == null ? void 0 : W.mode) === "silent" ? te() : T();
|
|
7647
7643
|
}
|
|
@@ -7654,7 +7650,7 @@ function Ll(e, t, n) {
|
|
|
7654
7650
|
return T();
|
|
7655
7651
|
(!I || !I.validateSchema) && te();
|
|
7656
7652
|
});
|
|
7657
|
-
function
|
|
7653
|
+
function j(W) {
|
|
7658
7654
|
E.touched = W;
|
|
7659
7655
|
}
|
|
7660
7656
|
function G(W) {
|
|
@@ -7688,7 +7684,7 @@ function Ll(e, t, n) {
|
|
|
7688
7684
|
value: H,
|
|
7689
7685
|
meta: E,
|
|
7690
7686
|
errors: L,
|
|
7691
|
-
errorMessage:
|
|
7687
|
+
errorMessage: B,
|
|
7692
7688
|
type: s,
|
|
7693
7689
|
checkedValue: u,
|
|
7694
7690
|
uncheckedValue: c,
|
|
@@ -7700,7 +7696,7 @@ function Ll(e, t, n) {
|
|
|
7700
7696
|
handleChange: R,
|
|
7701
7697
|
handleBlur: F,
|
|
7702
7698
|
setState: O,
|
|
7703
|
-
setTouched:
|
|
7699
|
+
setTouched: j,
|
|
7704
7700
|
setErrors: $,
|
|
7705
7701
|
setValue: q
|
|
7706
7702
|
};
|
|
@@ -7715,11 +7711,11 @@ function Ll(e, t, n) {
|
|
|
7715
7711
|
const Ee = ve(() => {
|
|
7716
7712
|
const W = M.value;
|
|
7717
7713
|
return !W || bt(W) || Ao(W) || Mt(W) || Array.isArray(W) ? {} : Object.keys(W).reduce((ne, ye) => {
|
|
7718
|
-
const
|
|
7714
|
+
const K = Kp(W[ye]).map((be) => be.__locatorRef).reduce((be, Ve) => {
|
|
7719
7715
|
const Pe = xt(I.values, Ve) || I.values[Ve];
|
|
7720
7716
|
return Pe !== void 0 && (be[Ve] = Pe), be;
|
|
7721
7717
|
}, {});
|
|
7722
|
-
return Object.assign(ne,
|
|
7718
|
+
return Object.assign(ne, K), ne;
|
|
7723
7719
|
}, {});
|
|
7724
7720
|
});
|
|
7725
7721
|
return me(Ee, (W, ne) => {
|
|
@@ -7734,15 +7730,15 @@ function Ll(e, t, n) {
|
|
|
7734
7730
|
return;
|
|
7735
7731
|
}
|
|
7736
7732
|
ee.pendingUnmount[de.id] = !0;
|
|
7737
|
-
const
|
|
7738
|
-
if (Array.isArray(
|
|
7739
|
-
if (
|
|
7740
|
-
const Ve =
|
|
7733
|
+
const K = I.getPathState(ye);
|
|
7734
|
+
if (Array.isArray(K == null ? void 0 : K.id) && (K != null && K.multiple) ? K != null && K.id.includes(de.id) : (K == null ? void 0 : K.id) === de.id) {
|
|
7735
|
+
if (K != null && K.multiple && Array.isArray(K.value)) {
|
|
7736
|
+
const Ve = K.value.findIndex((Pe) => gt(Pe, he(de.checkedValue)));
|
|
7741
7737
|
if (Ve > -1) {
|
|
7742
|
-
const Pe = [...
|
|
7738
|
+
const Pe = [...K.value];
|
|
7743
7739
|
Pe.splice(Ve, 1), I.setFieldValue(ye, Pe);
|
|
7744
7740
|
}
|
|
7745
|
-
Array.isArray(
|
|
7741
|
+
Array.isArray(K.id) && K.id.splice(K.id.indexOf(de.id), 1);
|
|
7746
7742
|
} else
|
|
7747
7743
|
I.unsetPathValue(he(x));
|
|
7748
7744
|
I.removePathState(ye, k);
|
|
@@ -7850,7 +7846,7 @@ function Cm(e) {
|
|
|
7850
7846
|
}, {})), k = Object.assign({}, (e == null ? void 0 : e.initialErrors) || {}), b = (t = e == null ? void 0 : e.keepValuesOnUnmount) !== null && t !== void 0 ? t : !1, { initialValues: D, originalInitialValues: E, setInitialValues: O } = Vm(c, a, e), L = km(c, a, E, x), ee = ve(() => c.value.reduce((z, N) => {
|
|
7851
7847
|
const X = xt(a, he(N.path));
|
|
7852
7848
|
return Pt(z, he(N.path), X), z;
|
|
7853
|
-
}, {})),
|
|
7849
|
+
}, {})), B = e == null ? void 0 : e.validationSchema;
|
|
7854
7850
|
function F(z, N) {
|
|
7855
7851
|
var X, ae;
|
|
7856
7852
|
const _e = ve(() => xt(D.value, he(z))), Re = v.value[he(z)], Se = (N == null ? void 0 : N.type) === "checkbox" || (N == null ? void 0 : N.type) === "radio";
|
|
@@ -7863,7 +7859,7 @@ function Cm(e) {
|
|
|
7863
7859
|
ct !== -1 && G.splice(ct, 1);
|
|
7864
7860
|
const Be = ve(() => {
|
|
7865
7861
|
var $t, Ln, ir, sr;
|
|
7866
|
-
const lr = he(
|
|
7862
|
+
const lr = he(B);
|
|
7867
7863
|
if (Mt(lr))
|
|
7868
7864
|
return (Ln = ($t = lr.describe) === null || $t === void 0 ? void 0 : $t.call(lr, he(z)).required) !== null && Ln !== void 0 ? Ln : !1;
|
|
7869
7865
|
const ar = he(N == null ? void 0 : N.schema);
|
|
@@ -7901,12 +7897,12 @@ function Cm(e) {
|
|
|
7901
7897
|
});
|
|
7902
7898
|
}), ht;
|
|
7903
7899
|
}
|
|
7904
|
-
const
|
|
7900
|
+
const Q = Gi(Fe, 5), T = Gi(Fe, 5), te = Hr(async (z) => await (z === "silent" ? Q() : T()), (z, [N]) => {
|
|
7905
7901
|
const X = _t(ne.errorBag.value), _e = [
|
|
7906
7902
|
.../* @__PURE__ */ new Set([..._t(z.results), ...c.value.map((Re) => Re.path), ...X])
|
|
7907
7903
|
].sort().reduce((Re, Se) => {
|
|
7908
7904
|
var He;
|
|
7909
|
-
const tt = Se, ct = R(tt) ||
|
|
7905
|
+
const tt = Se, ct = R(tt) || j(tt), Be = ((He = z.results[tt]) === null || He === void 0 ? void 0 : He.errors) || [], ft = he(ct == null ? void 0 : ct.path) || tt, ht = $m({ errors: Be, valid: !Be.length }, Re.results[ft]);
|
|
7910
7906
|
return Re.results[ft] = ht, ht.valid || (Re.errors[ft] = ht.errors[0]), ct && p.value[ft] && delete p.value[ft], ct ? (ct.valid = ht.valid, N === "silent" || N === "validated-only" && !ct.validated || g(ct, ht.errors), Re) : (g(ft, Be), Re);
|
|
7911
7907
|
}, {
|
|
7912
7908
|
valid: z.valid,
|
|
@@ -7927,7 +7923,7 @@ function Cm(e) {
|
|
|
7927
7923
|
const N = typeof z == "string" ? Yn(z) : z;
|
|
7928
7924
|
return typeof N == "string" ? v.value[N] : N;
|
|
7929
7925
|
}
|
|
7930
|
-
function
|
|
7926
|
+
function j(z) {
|
|
7931
7927
|
return c.value.filter((X) => z.startsWith(he(X.path))).reduce((X, ae) => X ? ae.path.length > X.path.length ? ae : X : ae, void 0);
|
|
7932
7928
|
}
|
|
7933
7929
|
let G = [], U;
|
|
@@ -7999,14 +7995,14 @@ function Cm(e) {
|
|
|
7999
7995
|
controlledValues: ee,
|
|
8000
7996
|
errorBag: I,
|
|
8001
7997
|
errors: x,
|
|
8002
|
-
schema:
|
|
7998
|
+
schema: B,
|
|
8003
7999
|
submitCount: u,
|
|
8004
8000
|
meta: L,
|
|
8005
8001
|
isSubmitting: i,
|
|
8006
8002
|
isValidating: s,
|
|
8007
8003
|
fieldArrays: l,
|
|
8008
8004
|
keepValuesOnUnmount: b,
|
|
8009
|
-
validateSchema: h(
|
|
8005
|
+
validateSchema: h(B) ? te : void 0,
|
|
8010
8006
|
validate: ut,
|
|
8011
8007
|
setFieldError: g,
|
|
8012
8008
|
validateField: ot,
|
|
@@ -8040,7 +8036,7 @@ function Cm(e) {
|
|
|
8040
8036
|
const ae = Ne(N), _e = typeof z == "string" ? z : z.path;
|
|
8041
8037
|
R(_e) || F(_e), Pt(a, _e, ae), X && ot(_e);
|
|
8042
8038
|
}
|
|
8043
|
-
function
|
|
8039
|
+
function K(z, N = !0) {
|
|
8044
8040
|
_t(a).forEach((X) => {
|
|
8045
8041
|
delete a[X];
|
|
8046
8042
|
}), _t(z).forEach((X) => {
|
|
@@ -8099,10 +8095,10 @@ function Cm(e) {
|
|
|
8099
8095
|
}
|
|
8100
8096
|
function et(z, N) {
|
|
8101
8097
|
let X = Ne(z != null && z.values ? z.values : E.value);
|
|
8102
|
-
X = N != null && N.force ? X : uo(E.value, X), X = Mt(
|
|
8098
|
+
X = N != null && N.force ? X : uo(E.value, X), X = Mt(B) && bt(B.cast) ? B.cast(X) : X, O(X, { force: N == null ? void 0 : N.force }), A((ae) => {
|
|
8103
8099
|
var _e;
|
|
8104
8100
|
ae.__flags.pendingReset = !0, ae.validated = !1, ae.touched = ((_e = z == null ? void 0 : z.touched) === null || _e === void 0 ? void 0 : _e[he(ae.path)]) || !1, ye(he(ae.path), xt(X, he(ae.path)), !1), g(he(ae.path), void 0);
|
|
8105
|
-
}), N != null && N.force ?
|
|
8101
|
+
}), N != null && N.force ? K(X, !1) : be(X, !1), _((z == null ? void 0 : z.errors) || {}), u.value = (z == null ? void 0 : z.submitCount) || 0, st(() => {
|
|
8106
8102
|
ut({ mode: "silent" }), A((ae) => {
|
|
8107
8103
|
ae.__flags.pendingReset = !1;
|
|
8108
8104
|
});
|
|
@@ -8142,7 +8138,7 @@ function Cm(e) {
|
|
|
8142
8138
|
async function ot(z, N) {
|
|
8143
8139
|
var X;
|
|
8144
8140
|
const ae = R(z);
|
|
8145
|
-
if (ae && (N == null ? void 0 : N.mode) !== "silent" && (ae.validated = !0),
|
|
8141
|
+
if (ae && (N == null ? void 0 : N.mode) !== "silent" && (ae.validated = !0), B) {
|
|
8146
8142
|
const { results: Re } = await te((N == null ? void 0 : N.mode) || "validated-only");
|
|
8147
8143
|
return Re[z] || { errors: [], valid: !0 };
|
|
8148
8144
|
}
|
|
@@ -8158,7 +8154,7 @@ function Cm(e) {
|
|
|
8158
8154
|
Pt(D.value, z, Ne(N)), X && Pt(E.value, z, Ne(N));
|
|
8159
8155
|
}
|
|
8160
8156
|
async function Fe() {
|
|
8161
|
-
const z = h(
|
|
8157
|
+
const z = h(B);
|
|
8162
8158
|
if (!z)
|
|
8163
8159
|
return { valid: !0, results: {}, errors: {}, source: "none" };
|
|
8164
8160
|
s.value = !0;
|
|
@@ -8177,7 +8173,7 @@ function Cm(e) {
|
|
|
8177
8173
|
return;
|
|
8178
8174
|
}
|
|
8179
8175
|
ne.validateSchema && ne.validateSchema("silent");
|
|
8180
|
-
}), We(
|
|
8176
|
+
}), We(B) && me(B, () => {
|
|
8181
8177
|
var z;
|
|
8182
8178
|
(z = ne.validateSchema) === null || z === void 0 || z.call(ne, "validated-only");
|
|
8183
8179
|
}), Le(vi, ne), process.env.NODE_ENV !== "production" && (pm(ne), me(() => Object.assign(Object.assign({ errors: I.value }, L.value), { values: a, isSubmitting: i.value, isValidating: s.value, submitCount: u.value }), Tn, {
|
|
@@ -8965,15 +8961,15 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
8965
8961
|
b.name.trim() ? b.nameError = void 0 : b.nameError = "Option name is required.";
|
|
8966
8962
|
}, x = (b, D, E) => {
|
|
8967
8963
|
var ee;
|
|
8968
|
-
const O = b.target, L = (ee = l.value.find((
|
|
8964
|
+
const O = b.target, L = (ee = l.value.find((B) => B.id === D)) == null ? void 0 : ee.values;
|
|
8969
8965
|
if (b.key === "Backspace" && O.value === "" && (L == null ? void 0 : L.length) > 2) {
|
|
8970
8966
|
_(D, E);
|
|
8971
8967
|
return;
|
|
8972
8968
|
}
|
|
8973
8969
|
}, M = (b, D, E) => {
|
|
8974
|
-
var
|
|
8970
|
+
var B;
|
|
8975
8971
|
b.target;
|
|
8976
|
-
const O = (
|
|
8972
|
+
const O = (B = l.value.find((F) => F.id === D)) == null ? void 0 : B.values, L = O == null ? void 0 : O[E];
|
|
8977
8973
|
L.touched = !0, (O == null ? void 0 : O.every((F) => F.value.trim() !== "")) && m(D);
|
|
8978
8974
|
}, V = (b, D) => {
|
|
8979
8975
|
const E = l.value.find((L) => L.id === b), O = E == null ? void 0 : E.values.every((L, ee) => L.value.trim() !== "" || ee === D);
|
|
@@ -8998,7 +8994,7 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
8998
8994
|
L.minified ? (w(), P("div", {
|
|
8999
8995
|
key: 1,
|
|
9000
8996
|
class: "flex gap-4 p-6 border-b last:border-b-0 hover:bg-accent dark:hover:bg-accent/50 cursor-pointer transition-colors duration-200",
|
|
9001
|
-
onClick: (
|
|
8997
|
+
onClick: (B) => h(l)[ee].minified = !1
|
|
9002
8998
|
}, [
|
|
9003
8999
|
S("div", null, [
|
|
9004
9000
|
S("div", {
|
|
@@ -9012,10 +9008,10 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9012
9008
|
S("div", wg, [
|
|
9013
9009
|
S("p", Sg, Y(L.name), 1),
|
|
9014
9010
|
S("div", Cg, [
|
|
9015
|
-
(w(!0), P(le, null, Ie(L.values, (
|
|
9016
|
-
key:
|
|
9011
|
+
(w(!0), P(le, null, Ie(L.values, (B) => (w(), P(le, {
|
|
9012
|
+
key: B.id
|
|
9017
9013
|
}, [
|
|
9018
|
-
|
|
9014
|
+
B.value ? (w(), P("span", kg, Y(B.value), 1)) : ie("", !0)
|
|
9019
9015
|
], 64))), 128))
|
|
9020
9016
|
])
|
|
9021
9017
|
])
|
|
@@ -9031,8 +9027,8 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9031
9027
|
S("div", mg, [
|
|
9032
9028
|
d(E, {
|
|
9033
9029
|
modelValue: L.name,
|
|
9034
|
-
"onUpdate:modelValue": (
|
|
9035
|
-
onBlur: (
|
|
9030
|
+
"onUpdate:modelValue": (B) => L.name = B,
|
|
9031
|
+
onBlur: (B) => I(L),
|
|
9036
9032
|
"aria-invalid": L.nameError ? "true" : "false",
|
|
9037
9033
|
placeholder: "Color",
|
|
9038
9034
|
spellcheck: "false"
|
|
@@ -9049,30 +9045,30 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9049
9045
|
D[2] || (D[2] = S("label", { class: "block text-sm mb-2" }, "Option values", -1)),
|
|
9050
9046
|
S("div", {
|
|
9051
9047
|
ref_for: !0,
|
|
9052
|
-
ref: (
|
|
9053
|
-
|
|
9048
|
+
ref: (B) => {
|
|
9049
|
+
B && a.value[L.id] && (a.value[L.id].listRef = B);
|
|
9054
9050
|
}
|
|
9055
9051
|
}, [
|
|
9056
|
-
a.value[L.id] ? (w(!0), P(le, { key: 0 }, Ie(a.value[L.id].valuesArray, (
|
|
9057
|
-
key:
|
|
9052
|
+
a.value[L.id] ? (w(!0), P(le, { key: 0 }, Ie(a.value[L.id].valuesArray, (B, F) => (w(), P("div", {
|
|
9053
|
+
key: B.id,
|
|
9058
9054
|
class: "relative flex items-center mb-2"
|
|
9059
9055
|
}, [
|
|
9060
|
-
|
|
9056
|
+
B.touched ? (w(), P("div", _g, [
|
|
9061
9057
|
d(h(ur), { class: "size-4 text-gray-400" })
|
|
9062
9058
|
])) : ie("", !0),
|
|
9063
9059
|
d(E, {
|
|
9064
|
-
modelValue:
|
|
9065
|
-
"onUpdate:modelValue": (
|
|
9060
|
+
modelValue: B.value,
|
|
9061
|
+
"onUpdate:modelValue": (Q) => B.value = Q,
|
|
9066
9062
|
placeholder: "Option value",
|
|
9067
9063
|
class: "pr-12",
|
|
9068
|
-
onKeydown: (
|
|
9069
|
-
onKeyup: (
|
|
9070
|
-
onBlur: (
|
|
9064
|
+
onKeydown: (Q) => x(Q, L.id, F),
|
|
9065
|
+
onKeyup: (Q) => M(Q, L.id, F),
|
|
9066
|
+
onBlur: (Q) => V(L.id, F),
|
|
9071
9067
|
spellcheck: "false"
|
|
9072
9068
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onKeydown", "onKeyup", "onBlur"]),
|
|
9073
|
-
a.value[L.id].valuesArray.length > 2 &&
|
|
9069
|
+
a.value[L.id].valuesArray.length > 2 && B.touched ? (w(), P("button", {
|
|
9074
9070
|
key: 1,
|
|
9075
|
-
onClick: (
|
|
9071
|
+
onClick: (Q) => _(L.id, F),
|
|
9076
9072
|
class: "absolute right-2 top-1/2 -translate-y-1/2 ml-2 p-2 text-muted-foreground hover:text-muted",
|
|
9077
9073
|
type: "button"
|
|
9078
9074
|
}, [
|
|
@@ -9085,7 +9081,7 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9085
9081
|
d(O, {
|
|
9086
9082
|
size: "sm",
|
|
9087
9083
|
variant: "outline",
|
|
9088
|
-
onClick: (
|
|
9084
|
+
onClick: (B) => g(ee),
|
|
9089
9085
|
class: "text-red-500 hover:text-red-600"
|
|
9090
9086
|
}, {
|
|
9091
9087
|
default: f(() => D[3] || (D[3] = [
|
|
@@ -9096,7 +9092,7 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9096
9092
|
}, 1032, ["onClick"]),
|
|
9097
9093
|
d(O, {
|
|
9098
9094
|
size: "sm",
|
|
9099
|
-
onClick: (
|
|
9095
|
+
onClick: (B) => h(l)[ee].minified = !0,
|
|
9100
9096
|
disabled: L.name.trim() === ""
|
|
9101
9097
|
}, {
|
|
9102
9098
|
default: f(() => D[4] || (D[4] = [
|
|
@@ -9178,10 +9174,10 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9178
9174
|
watch(o.options, () => {
|
|
9179
9175
|
l.value === "" && v();
|
|
9180
9176
|
}, { immediate: !0, deep: !0 }), watch(p, (A) => {
|
|
9181
|
-
var
|
|
9177
|
+
var j;
|
|
9182
9178
|
if (!A) return [];
|
|
9183
9179
|
let R = [];
|
|
9184
|
-
(
|
|
9180
|
+
(j = Object.keys(A)) == null || j.forEach((G) => {
|
|
9185
9181
|
R.push({
|
|
9186
9182
|
combinedOptions: G,
|
|
9187
9183
|
name: _(G),
|
|
@@ -9195,26 +9191,26 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9195
9191
|
}, { deep: !0 });
|
|
9196
9192
|
function m(A) {
|
|
9197
9193
|
return A.reduce(
|
|
9198
|
-
(R,
|
|
9194
|
+
(R, j) => R.flatMap((G) => j.map((U) => [...G, U])),
|
|
9199
9195
|
[[]]
|
|
9200
9196
|
);
|
|
9201
9197
|
}
|
|
9202
9198
|
function g(A) {
|
|
9203
|
-
return A.slice().sort((R,
|
|
9199
|
+
return A.slice().sort((R, j) => R.optionId.localeCompare(j.optionId)).map(({ optionId: R, valueId: j }) => `${R}:${j}`).join("|");
|
|
9204
9200
|
}
|
|
9205
|
-
const _ = (A) => A.split("|").map((
|
|
9206
|
-
const [G, U] =
|
|
9201
|
+
const _ = (A) => A.split("|").map((j) => {
|
|
9202
|
+
const [G, U] = j.split(":");
|
|
9207
9203
|
return { optionId: G, valueId: U };
|
|
9208
|
-
}).map((
|
|
9204
|
+
}).map((j) => {
|
|
9209
9205
|
var q, $;
|
|
9210
|
-
const G = (q = o.options) == null ? void 0 : q[
|
|
9206
|
+
const G = (q = o.options) == null ? void 0 : q[j.optionId], U = ($ = G == null ? void 0 : G.values) == null ? void 0 : $.find((H) => H.id === j.valueId);
|
|
9211
9207
|
return (U == null ? void 0 : U.value) || "";
|
|
9212
|
-
}).join(" "), I = (A) => A.split("|").map((
|
|
9213
|
-
const [G, U] =
|
|
9208
|
+
}).join(" "), I = (A) => A.split("|").map((j) => {
|
|
9209
|
+
const [G, U] = j.split(":");
|
|
9214
9210
|
return { optionId: G, valueId: U };
|
|
9215
|
-
}).map((
|
|
9211
|
+
}).map((j) => {
|
|
9216
9212
|
var q, $;
|
|
9217
|
-
const G = (q = o.options) == null ? void 0 : q[
|
|
9213
|
+
const G = (q = o.options) == null ? void 0 : q[j.optionId], U = ($ = G == null ? void 0 : G.values) == null ? void 0 : $.find((H) => H.id === j.valueId);
|
|
9218
9214
|
return {
|
|
9219
9215
|
optionId: G == null ? void 0 : G.id,
|
|
9220
9216
|
option: G == null ? void 0 : G.name,
|
|
@@ -9223,56 +9219,56 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9223
9219
|
};
|
|
9224
9220
|
}), x = computed(() => {
|
|
9225
9221
|
const A = Object.values(o.options).map(
|
|
9226
|
-
(
|
|
9227
|
-
optionId:
|
|
9228
|
-
optionName:
|
|
9222
|
+
(j) => j.values.map((G) => ({
|
|
9223
|
+
optionId: j.id,
|
|
9224
|
+
optionName: j.name,
|
|
9229
9225
|
valueId: G.id,
|
|
9230
9226
|
value: G.value
|
|
9231
9227
|
}))
|
|
9232
9228
|
);
|
|
9233
|
-
return m(A).map((
|
|
9234
|
-
const G = g(
|
|
9229
|
+
return m(A).map((j) => {
|
|
9230
|
+
const G = g(j);
|
|
9235
9231
|
return p.value[G] || (p.value[G] = { price: 0, stock: 0 }), {
|
|
9236
9232
|
key: G,
|
|
9237
|
-
options:
|
|
9233
|
+
options: j,
|
|
9238
9234
|
...p.value[G]
|
|
9239
9235
|
};
|
|
9240
9236
|
});
|
|
9241
9237
|
}), M = computed(() => {
|
|
9242
9238
|
let A = [...x.value];
|
|
9243
9239
|
return u.value && (A = A.filter((R) => {
|
|
9244
|
-
var
|
|
9245
|
-
return (
|
|
9240
|
+
var j;
|
|
9241
|
+
return (j = R.options) == null ? void 0 : j.find((G) => G.value.toLowerCase().includes(u.value.toLowerCase()));
|
|
9246
9242
|
})), A;
|
|
9247
9243
|
}), V = (A, R) => {
|
|
9248
|
-
const
|
|
9244
|
+
const j = M.value.filter((G) => {
|
|
9249
9245
|
var U, q;
|
|
9250
9246
|
return ((q = (U = G.options) == null ? void 0 : U.find(($) => $.optionId === l.value)) == null ? void 0 : q.valueId) === R;
|
|
9251
9247
|
});
|
|
9252
|
-
|
|
9248
|
+
j && j.forEach((G) => {
|
|
9253
9249
|
p.value[g(G.options)].image = A;
|
|
9254
9250
|
});
|
|
9255
|
-
}, k = (A) => x.value.filter((
|
|
9251
|
+
}, k = (A) => x.value.filter((j) => {
|
|
9256
9252
|
var G, U;
|
|
9257
|
-
return ((U = (G =
|
|
9258
|
-
}).every((
|
|
9253
|
+
return ((U = (G = j.options) == null ? void 0 : G.find((q) => q.optionId === l.value)) == null ? void 0 : U.valueId) === A;
|
|
9254
|
+
}).every((j) => !j.image), b = (A) => {
|
|
9259
9255
|
const R = x.value.filter((G) => {
|
|
9260
9256
|
var U, q;
|
|
9261
9257
|
return ((q = (U = G.options) == null ? void 0 : U.find(($) => $.optionId === l.value)) == null ? void 0 : q.valueId) === A;
|
|
9262
9258
|
});
|
|
9263
9259
|
return R.filter((G, U) => G.image && R.findIndex((q) => q.image === G.image) === U).length === 1;
|
|
9264
9260
|
}, D = (A) => {
|
|
9265
|
-
var
|
|
9266
|
-
return (
|
|
9261
|
+
var j;
|
|
9262
|
+
return (j = x.value.filter((G) => {
|
|
9267
9263
|
var U, q;
|
|
9268
9264
|
return ((q = (U = G.options) == null ? void 0 : U.find(($) => $.optionId === l.value)) == null ? void 0 : q.valueId) === A;
|
|
9269
|
-
}).filter((G) => G.image)[0]) == null ? void 0 :
|
|
9265
|
+
}).filter((G) => G.image)[0]) == null ? void 0 : j.image;
|
|
9270
9266
|
}, E = (A) => {
|
|
9271
|
-
var
|
|
9272
|
-
return (
|
|
9267
|
+
var j;
|
|
9268
|
+
return (j = x.value.filter((G) => {
|
|
9273
9269
|
var U, q;
|
|
9274
9270
|
return ((q = (U = G.options) == null ? void 0 : U.find(($) => $.optionId === l.value)) == null ? void 0 : q.valueId) === A;
|
|
9275
|
-
}).filter((G) => G.image)[1]) == null ? void 0 :
|
|
9271
|
+
}).filter((G) => G.image)[1]) == null ? void 0 : j.image;
|
|
9276
9272
|
}, O = (A) => {
|
|
9277
9273
|
var G;
|
|
9278
9274
|
const R = x.value.filter((U) => {
|
|
@@ -9280,26 +9276,26 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9280
9276
|
return (q = U.options) == null ? void 0 : q.find(($) => $.valueId === A);
|
|
9281
9277
|
});
|
|
9282
9278
|
if (R.length === 0) return "0";
|
|
9283
|
-
const
|
|
9284
|
-
return Math.min(...
|
|
9279
|
+
const j = R.map((U) => U.price);
|
|
9280
|
+
return Math.min(...j) === Math.max(...j) ? ((G = j[0]) == null ? void 0 : G.toString()) || "0" : `${Math.min(...j)} - ${Math.max(...j)}`;
|
|
9285
9281
|
}, L = (A) => x.value.filter((R) => {
|
|
9286
|
-
var
|
|
9287
|
-
return (
|
|
9288
|
-
}).reduce((R,
|
|
9289
|
-
var R,
|
|
9282
|
+
var j;
|
|
9283
|
+
return (j = R.options) == null ? void 0 : j.find((G) => G.valueId === A);
|
|
9284
|
+
}).reduce((R, j) => R + j.stock, 0), ee = () => {
|
|
9285
|
+
var R, j, G;
|
|
9290
9286
|
let A = 0;
|
|
9291
|
-
return (G = (
|
|
9287
|
+
return (G = (j = (R = o.options) == null ? void 0 : R[l.value]) == null ? void 0 : j.values) == null || G.forEach((U) => {
|
|
9292
9288
|
A += L(U.id);
|
|
9293
9289
|
}), A;
|
|
9294
|
-
},
|
|
9295
|
-
A.preventDefault(),
|
|
9290
|
+
}, B = ref(null), F = ref(""), Q = async (A, R) => {
|
|
9291
|
+
A.preventDefault(), B.value = R, F.value = "TODO";
|
|
9296
9292
|
}, T = (A) => {
|
|
9297
|
-
|
|
9293
|
+
B.value = null, F.value = "";
|
|
9298
9294
|
}, te = (A) => {
|
|
9299
|
-
p.value = A.reduce((R,
|
|
9300
|
-
price:
|
|
9301
|
-
stock:
|
|
9302
|
-
image:
|
|
9295
|
+
p.value = A.reduce((R, j) => (R[j.combinedOptions] = {
|
|
9296
|
+
price: j.price,
|
|
9297
|
+
stock: j.inventoryCount,
|
|
9298
|
+
image: j.image
|
|
9303
9299
|
}, R), {});
|
|
9304
9300
|
};
|
|
9305
9301
|
return onMounted(() => {
|
|
@@ -9307,7 +9303,7 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9307
9303
|
}), t({
|
|
9308
9304
|
setVariantMap: te
|
|
9309
9305
|
}), (A, R) => {
|
|
9310
|
-
const
|
|
9306
|
+
const j = y("SelectValue"), G = y("SelectTrigger"), U = y("SelectItem"), q = y("SelectContent"), $ = y("Select"), H = y("Button"), de = y("Input"), Ee = y("PopoverTrigger"), W = y("RadioGroupItem"), ne = y("Label"), ye = y("RadioGroup"), K = y("PopoverContent"), be = y("Popover"), Ve = y("Checkbox"), Pe = y("TooltipTrigger"), Te = y("TooltipContent"), Ye = y("Tooltip"), rt = y("MediaPickerDialog"), Qe = y("NumberFieldInput"), Ae = y("NumberFieldContent"), et = y("NumberField"), ut = y("NumberFieldDecrement"), ot = y("NumberFieldIncrement");
|
|
9311
9307
|
return w(), P("div", null, [
|
|
9312
9308
|
S("div", $g, [
|
|
9313
9309
|
Object.keys(e.options).length > 1 ? (w(), P("div", Ig, [
|
|
@@ -9319,7 +9315,7 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9319
9315
|
default: f(() => [
|
|
9320
9316
|
d(G, { size: "sm" }, {
|
|
9321
9317
|
default: f(() => [
|
|
9322
|
-
d(
|
|
9318
|
+
d(j, { placeholder: "Option" })
|
|
9323
9319
|
]),
|
|
9324
9320
|
_: 1
|
|
9325
9321
|
}),
|
|
@@ -9413,7 +9409,7 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9413
9409
|
]),
|
|
9414
9410
|
_: 2
|
|
9415
9411
|
}, 1024),
|
|
9416
|
-
d(
|
|
9412
|
+
d(K, null, {
|
|
9417
9413
|
default: f(() => [
|
|
9418
9414
|
d(ye, {
|
|
9419
9415
|
modelValue: pe.groupBy,
|
|
@@ -9595,10 +9591,10 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9595
9591
|
d(de, {
|
|
9596
9592
|
modelValue: h(F),
|
|
9597
9593
|
"onUpdate:modelValue": R[8] || (R[8] = (Fe) => We(F) ? F.value = Fe : null),
|
|
9598
|
-
class: Ze(["dark:bg-transparent dark:border-ring/50", h(
|
|
9594
|
+
class: Ze(["dark:bg-transparent dark:border-ring/50", h(B) === pe.id ? "" : "text-transparent"]),
|
|
9599
9595
|
onClick: R[9] || (R[9] = Yt(() => {
|
|
9600
9596
|
}, ["stop"])),
|
|
9601
|
-
onFocus: (Fe) =>
|
|
9597
|
+
onFocus: (Fe) => Q(Fe, pe.id),
|
|
9602
9598
|
onBlur: (Fe) => T(pe.id)
|
|
9603
9599
|
}, null, 8, ["modelValue", "class", "onFocus", "onBlur"])
|
|
9604
9600
|
]),
|
|
@@ -9622,7 +9618,7 @@ const ug = /* @__PURE__ */ Sn(lg, [["render", ag]]), dg = {
|
|
|
9622
9618
|
]),
|
|
9623
9619
|
_: 2
|
|
9624
9620
|
}, 1024),
|
|
9625
|
-
h(
|
|
9621
|
+
h(B) !== pe.id ? (w(), P("span", ev, Y(O(pe.id)), 1)) : ie("", !0)
|
|
9626
9622
|
])
|
|
9627
9623
|
]),
|
|
9628
9624
|
S("td", tv, [
|
|
@@ -12886,7 +12882,7 @@ const sh = { class: "relative @container" }, lh = { class: "flex flex-row gap-4
|
|
|
12886
12882
|
{ text: "New Product", href: "/products/new", disabled: !0 }
|
|
12887
12883
|
]) : _();
|
|
12888
12884
|
}), (V, k) => {
|
|
12889
|
-
const b = y("Button"), D = y("MenubarTrigger"), E = y("MenubarMenu"), O = y("MenubarShortcut"), L = y("MenubarItem"), ee = y("MenubarSeparator"),
|
|
12885
|
+
const b = y("Button"), D = y("MenubarTrigger"), E = y("MenubarMenu"), O = y("MenubarShortcut"), L = y("MenubarItem"), ee = y("MenubarSeparator"), B = y("MenubarContent"), F = y("Menubar");
|
|
12890
12886
|
return w(), P("div", sh, [
|
|
12891
12887
|
S("div", lh, [
|
|
12892
12888
|
S("div", ah, [
|
|
@@ -12938,7 +12934,7 @@ const sh = { class: "relative @container" }, lh = { class: "flex flex-row gap-4
|
|
|
12938
12934
|
_: 1,
|
|
12939
12935
|
__: [2]
|
|
12940
12936
|
}),
|
|
12941
|
-
d(
|
|
12937
|
+
d(B, null, {
|
|
12942
12938
|
default: f(() => [
|
|
12943
12939
|
d(L, null, {
|
|
12944
12940
|
default: f(() => [
|
|
@@ -12992,7 +12988,7 @@ const sh = { class: "relative @container" }, lh = { class: "flex flex-row gap-4
|
|
|
12992
12988
|
_: 1,
|
|
12993
12989
|
__: [8]
|
|
12994
12990
|
}),
|
|
12995
|
-
d(
|
|
12991
|
+
d(B, null, {
|
|
12996
12992
|
default: f(() => [
|
|
12997
12993
|
h(n)("edit-product") ? (w(), Z(L, {
|
|
12998
12994
|
key: 0,
|
|
@@ -13571,7 +13567,7 @@ const sh = { class: "relative @container" }, lh = { class: "flex flex-row gap-4
|
|
|
13571
13567
|
return [
|
|
13572
13568
|
(L = O.action) != null && L.integration ? (w(), Z(x, {
|
|
13573
13569
|
key: 0,
|
|
13574
|
-
type: (ee = h(u).find((
|
|
13570
|
+
type: (ee = h(u).find((B) => B.id === O.action.integration)) == null ? void 0 : ee.type,
|
|
13575
13571
|
class: "size-5"
|
|
13576
13572
|
}, null, 8, ["type"])) : ie("", !0),
|
|
13577
13573
|
S("p", Fh, Y(O.label), 1)
|
|
@@ -14659,7 +14655,7 @@ const N_ = (e) => e === ln || Xl(e), L_ = (e) => er(e) && e.nodeType === 11, er
|
|
|
14659
14655
|
const t = bn(e) || ln;
|
|
14660
14656
|
return /object|function/.test(typeof Element) ? e instanceof Element || e instanceof t.Element : e.nodeType === 1 && typeof e.nodeName == "string";
|
|
14661
14657
|
}, G_ = (e) => er(e) && !!e.constructor && /function Object\b/.test(e.constructor.toString()), q_ = (e) => er(e) && typeof e.length < "u" && Ql(e.splice);
|
|
14662
|
-
var
|
|
14658
|
+
var J = {
|
|
14663
14659
|
window: N_,
|
|
14664
14660
|
docFrag: L_,
|
|
14665
14661
|
object: er,
|
|
@@ -14685,7 +14681,7 @@ const Je = {
|
|
|
14685
14681
|
};
|
|
14686
14682
|
function W_(e) {
|
|
14687
14683
|
const t = Ue.Element, n = e.navigator || {};
|
|
14688
|
-
Je.supportsTouch = "ontouchstart" in e ||
|
|
14684
|
+
Je.supportsTouch = "ontouchstart" in e || J.func(e.DocumentTouch) && Ue.document instanceof e.DocumentTouch, Je.supportsPointerEvent = n.pointerEnabled !== !1 && !!Ue.PointerEvent, Je.isIOS = /iP(hone|od|ad)/.test(n.platform), Je.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\d]/.test(n.appVersion), Je.isIe9 = /MSIE 9/.test(n.userAgent), Je.isOperaMobile = n.appName === "Opera" && Je.supportsTouch && /Presto/.test(n.userAgent), Je.prefixedMatchesSelector = "matches" in t.prototype ? "matches" : "webkitMatchesSelector" in t.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in t.prototype ? "mozMatchesSelector" : "oMatchesSelector" in t.prototype ? "oMatchesSelector" : "msMatchesSelector", Je.pEventTypes = Je.supportsPointerEvent ? Ue.PointerEvent === e.MSPointerEvent ? {
|
|
14689
14685
|
up: "MSPointerUp",
|
|
14690
14686
|
down: "MSPointerDown",
|
|
14691
14687
|
over: "mouseover",
|
|
@@ -14715,7 +14711,7 @@ function zn(e) {
|
|
|
14715
14711
|
const t = {};
|
|
14716
14712
|
for (const n in e) {
|
|
14717
14713
|
const o = e[n];
|
|
14718
|
-
|
|
14714
|
+
J.plainObject(o) ? t[n] = zn(o) : J.array(o) ? t[n] = ta(o) : t[n] = o;
|
|
14719
14715
|
}
|
|
14720
14716
|
return t;
|
|
14721
14717
|
}
|
|
@@ -14745,14 +14741,14 @@ var $n = {
|
|
|
14745
14741
|
};
|
|
14746
14742
|
function pn(e, t) {
|
|
14747
14743
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (r) => !0, o = arguments.length > 3 ? arguments[3] : void 0;
|
|
14748
|
-
if (o = o || {},
|
|
14744
|
+
if (o = o || {}, J.string(e) && e.search(" ") !== -1 && (e = hs(e)), J.array(e))
|
|
14749
14745
|
return e.forEach((r) => pn(r, t, n, o)), o;
|
|
14750
|
-
if (
|
|
14746
|
+
if (J.object(e) && (t = e, e = ""), J.func(t) && n(e))
|
|
14751
14747
|
o[e] = o[e] || [], o[e].push(t);
|
|
14752
|
-
else if (
|
|
14748
|
+
else if (J.array(t))
|
|
14753
14749
|
for (const r of t)
|
|
14754
14750
|
pn(e, r, n, o);
|
|
14755
|
-
else if (
|
|
14751
|
+
else if (J.object(t))
|
|
14756
14752
|
for (const r in t) {
|
|
14757
14753
|
const i = hs(r).map((s) => `${e}${s}`);
|
|
14758
14754
|
pn(i, t[r], n, o);
|
|
@@ -14809,7 +14805,7 @@ function mn(e, t) {
|
|
|
14809
14805
|
return !1;
|
|
14810
14806
|
}
|
|
14811
14807
|
function oa(e, t) {
|
|
14812
|
-
for (;
|
|
14808
|
+
for (; J.element(e); ) {
|
|
14813
14809
|
if (xn(e, t))
|
|
14814
14810
|
return e;
|
|
14815
14811
|
e = an(e);
|
|
@@ -14818,8 +14814,8 @@ function oa(e, t) {
|
|
|
14818
14814
|
}
|
|
14819
14815
|
function an(e) {
|
|
14820
14816
|
let t = e.parentNode;
|
|
14821
|
-
if (
|
|
14822
|
-
for (; (t = t.host) &&
|
|
14817
|
+
if (J.docFrag(t)) {
|
|
14818
|
+
for (; (t = t.host) && J.docFrag(t); )
|
|
14823
14819
|
;
|
|
14824
14820
|
return t;
|
|
14825
14821
|
}
|
|
@@ -14829,7 +14825,7 @@ function xn(e, t) {
|
|
|
14829
14825
|
return ln !== Jl && (t = t.replace(/\/deep\//g, " ")), e[Je.prefixedMatchesSelector](t);
|
|
14830
14826
|
}
|
|
14831
14827
|
function Xr(e, t, n) {
|
|
14832
|
-
for (;
|
|
14828
|
+
for (; J.element(e); ) {
|
|
14833
14829
|
if (xn(e, t))
|
|
14834
14830
|
return !0;
|
|
14835
14831
|
if (e = an(e), e === n)
|
|
@@ -14866,7 +14862,7 @@ function bi(e) {
|
|
|
14866
14862
|
return t;
|
|
14867
14863
|
}
|
|
14868
14864
|
function bs(e) {
|
|
14869
|
-
return
|
|
14865
|
+
return J.string(e) ? (Ue.document.querySelector(e), !0) : !1;
|
|
14870
14866
|
}
|
|
14871
14867
|
const X_ = ["webkit", "moz"];
|
|
14872
14868
|
function ra(e, t) {
|
|
@@ -14913,7 +14909,7 @@ function ty(e, t) {
|
|
|
14913
14909
|
return t = t || {}, Je.isOperaMobile && ia(e) ? Bo("screen", e, t) : Bo("client", e, t), t;
|
|
14914
14910
|
}
|
|
14915
14911
|
function Uo(e) {
|
|
14916
|
-
return
|
|
14912
|
+
return J.number(e.pointerId) ? e.pointerId : e.identifier;
|
|
14917
14913
|
}
|
|
14918
14914
|
function ny(e, t, n) {
|
|
14919
14915
|
const o = t.length > 1 ? sa(t) : t[0];
|
|
@@ -14921,7 +14917,7 @@ function ny(e, t, n) {
|
|
|
14921
14917
|
}
|
|
14922
14918
|
function xi(e) {
|
|
14923
14919
|
const t = [];
|
|
14924
|
-
return
|
|
14920
|
+
return J.array(e) ? (t[0] = e[0], t[1] = e[1]) : e.type === "touchend" ? e.touches.length === 1 ? (t[0] = e.touches[0], t[1] = e.changedTouches[0]) : e.touches.length === 0 && (t[0] = e.changedTouches[0], t[1] = e.changedTouches[1]) : (t[0] = e.touches[0], t[1] = e.touches[1]), t;
|
|
14925
14921
|
}
|
|
14926
14922
|
function sa(e) {
|
|
14927
14923
|
const t = {
|
|
@@ -14963,14 +14959,14 @@ function iy(e, t) {
|
|
|
14963
14959
|
return 180 * Math.atan2(s, i) / Math.PI;
|
|
14964
14960
|
}
|
|
14965
14961
|
function sy(e) {
|
|
14966
|
-
return
|
|
14962
|
+
return J.string(e.pointerType) ? e.pointerType : J.number(e.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][e.pointerType] : (
|
|
14967
14963
|
// if the PointerEvent API isn't available, then the "pointer" must
|
|
14968
14964
|
// be either a MouseEvent, TouchEvent, or Touch object
|
|
14969
14965
|
/touch/.test(e.type || "") || e instanceof Ue.Touch ? "touch" : "mouse"
|
|
14970
14966
|
);
|
|
14971
14967
|
}
|
|
14972
14968
|
function la(e) {
|
|
14973
|
-
const t =
|
|
14969
|
+
const t = J.func(e.composedPath) ? e.composedPath() : e.path;
|
|
14974
14970
|
return [ys(t ? t[0] : e.target), ys(e.currentTarget)];
|
|
14975
14971
|
}
|
|
14976
14972
|
function Gn() {
|
|
@@ -15095,7 +15091,7 @@ function ly(e) {
|
|
|
15095
15091
|
function c(v, m) {
|
|
15096
15092
|
const g = qn(m), _ = new ay(v), I = o[v.type], [x] = la(v);
|
|
15097
15093
|
let M = x;
|
|
15098
|
-
for (;
|
|
15094
|
+
for (; J.element(M); ) {
|
|
15099
15095
|
for (let V = 0; V < I.length; V++) {
|
|
15100
15096
|
const k = I[V], {
|
|
15101
15097
|
selector: b,
|
|
@@ -15133,7 +15129,7 @@ class ay {
|
|
|
15133
15129
|
}
|
|
15134
15130
|
}
|
|
15135
15131
|
function qn(e) {
|
|
15136
|
-
return
|
|
15132
|
+
return J.object(e) ? {
|
|
15137
15133
|
capture: !!e.capture,
|
|
15138
15134
|
passive: !!e.passive
|
|
15139
15135
|
} : {
|
|
@@ -15149,7 +15145,7 @@ var uy = {
|
|
|
15149
15145
|
install: ly
|
|
15150
15146
|
};
|
|
15151
15147
|
const dy = function(e) {
|
|
15152
|
-
return /^(always|never|auto)$/.test(e) ? (this.options.preventDefault = e, this) :
|
|
15148
|
+
return /^(always|never|auto)$/.test(e) ? (this.options.preventDefault = e, this) : J.bool(e) ? (this.options.preventDefault = e ? "always" : "never", this) : this.options.preventDefault;
|
|
15153
15149
|
};
|
|
15154
15150
|
function cy(e, t, n) {
|
|
15155
15151
|
const o = e.options.preventDefault;
|
|
@@ -15163,7 +15159,7 @@ function cy(e, t, n) {
|
|
|
15163
15159
|
if (!(i && i.events) || i.events.passive !== !1)
|
|
15164
15160
|
return;
|
|
15165
15161
|
}
|
|
15166
|
-
/^(mouse|pointer|touch)*(down|start)/i.test(n.type) ||
|
|
15162
|
+
/^(mouse|pointer|touch)*(down|start)/i.test(n.type) || J.element(n.target) && xn(n.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || n.preventDefault();
|
|
15167
15163
|
}
|
|
15168
15164
|
}
|
|
15169
15165
|
function fy(e) {
|
|
@@ -15209,7 +15205,7 @@ function ua(e, t, n) {
|
|
|
15209
15205
|
}
|
|
15210
15206
|
function po(e, t, n, o) {
|
|
15211
15207
|
let r = e;
|
|
15212
|
-
return
|
|
15208
|
+
return J.string(r) ? r = ua(r, t, n) : J.func(r) && (r = r(...o)), J.element(r) && (r = bi(r)), r;
|
|
15213
15209
|
}
|
|
15214
15210
|
function or(e) {
|
|
15215
15211
|
return e && {
|
|
@@ -15992,18 +15988,18 @@ class Sy {
|
|
|
15992
15988
|
this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new na(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = n.actions, this.target = t, this._context = n.context || o, this._win = bn(bs(t) ? this._context : t), this._doc = this._win.document, this._scopeEvents = r, this.set(n);
|
|
15993
15989
|
}
|
|
15994
15990
|
setOnEvents(t, n) {
|
|
15995
|
-
return
|
|
15991
|
+
return J.func(n.onstart) && this.on(`${t}start`, n.onstart), J.func(n.onmove) && this.on(`${t}move`, n.onmove), J.func(n.onend) && this.on(`${t}end`, n.onend), J.func(n.oninertiastart) && this.on(`${t}inertiastart`, n.oninertiastart), this;
|
|
15996
15992
|
}
|
|
15997
15993
|
updatePerActionListeners(t, n, o) {
|
|
15998
15994
|
var r;
|
|
15999
15995
|
const i = (r = this._actions.map[t]) == null ? void 0 : r.filterEventType, s = (u) => (i == null || i(u)) && mo(u, this._actions);
|
|
16000
|
-
(
|
|
15996
|
+
(J.array(n) || J.object(n)) && this._onOff(Xt.Off, t, n, void 0, s), (J.array(o) || J.object(o)) && this._onOff(Xt.On, t, o, void 0, s);
|
|
16001
15997
|
}
|
|
16002
15998
|
setPerAction(t, n) {
|
|
16003
15999
|
const o = this._defaults;
|
|
16004
16000
|
for (const r in n) {
|
|
16005
16001
|
const i = r, s = this.options[t], u = n[i];
|
|
16006
|
-
i === "listeners" && this.updatePerActionListeners(t, s.listeners, u),
|
|
16002
|
+
i === "listeners" && this.updatePerActionListeners(t, s.listeners, u), J.array(u) ? s[i] = ta(u) : J.plainObject(u) ? (s[i] = Ce(s[i] || {}, zn(u)), J.object(o.perAction[i]) && "enabled" in o.perAction[i] && (s[i].enabled = u.enabled !== !1)) : J.bool(u) && J.object(o.perAction[i]) ? s[i].enabled = u : s[i] = u;
|
|
16007
16003
|
}
|
|
16008
16004
|
}
|
|
16009
16005
|
/**
|
|
@@ -16014,7 +16010,7 @@ class Sy {
|
|
|
16014
16010
|
* @return {Rect} The object's bounding rectangle.
|
|
16015
16011
|
*/
|
|
16016
16012
|
getRect(t) {
|
|
16017
|
-
return t = t || (
|
|
16013
|
+
return t = t || (J.element(this.target) ? this.target : null), J.string(this.target) && (t = t || this._context.querySelector(this.target)), bi(t);
|
|
16018
16014
|
}
|
|
16019
16015
|
/**
|
|
16020
16016
|
* Returns or sets the function used to calculate the interactable's
|
|
@@ -16025,14 +16021,14 @@ class Sy {
|
|
|
16025
16021
|
* @return {function | object} The checker function or this Interactable
|
|
16026
16022
|
*/
|
|
16027
16023
|
rectChecker(t) {
|
|
16028
|
-
return
|
|
16024
|
+
return J.func(t) ? (this.getRect = (n) => {
|
|
16029
16025
|
const o = Ce({}, t.apply(this, n));
|
|
16030
16026
|
return "width" in o || (o.width = o.right - o.left, o.height = o.bottom - o.top), o;
|
|
16031
16027
|
}, this) : t === null ? (delete this.getRect, this) : this.getRect;
|
|
16032
16028
|
}
|
|
16033
16029
|
/** @internal */
|
|
16034
16030
|
_backCompatOption(t, n) {
|
|
16035
|
-
if (bs(n) ||
|
|
16031
|
+
if (bs(n) || J.object(n)) {
|
|
16036
16032
|
this.options[t] = n;
|
|
16037
16033
|
for (const o in this._actions.map)
|
|
16038
16034
|
this.options[o][t] = n;
|
|
@@ -16069,7 +16065,7 @@ class Sy {
|
|
|
16069
16065
|
const {
|
|
16070
16066
|
target: t
|
|
16071
16067
|
} = this;
|
|
16072
|
-
return
|
|
16068
|
+
return J.string(t) ? Array.from(this._context.querySelectorAll(t)) : J.func(t) && t.getAllElements ? t.getAllElements() : J.element(t) ? [t] : [];
|
|
16073
16069
|
}
|
|
16074
16070
|
/**
|
|
16075
16071
|
* Gets the selector context Node of the Interactable. The default is
|
|
@@ -16089,11 +16085,11 @@ class Sy {
|
|
|
16089
16085
|
}
|
|
16090
16086
|
/** @internal */
|
|
16091
16087
|
testAllow(t, n, o) {
|
|
16092
|
-
return t ?
|
|
16088
|
+
return t ? J.element(o) ? J.string(t) ? Xr(o, t, n) : J.element(t) ? mn(t, o) : !1 : !1 : !0;
|
|
16093
16089
|
}
|
|
16094
16090
|
/** @internal */
|
|
16095
16091
|
testIgnore(t, n, o) {
|
|
16096
|
-
return !t || !
|
|
16092
|
+
return !t || !J.element(o) ? !1 : J.string(t) ? Xr(o, t, n) : J.element(t) ? mn(t, o) : !1;
|
|
16097
16093
|
}
|
|
16098
16094
|
/**
|
|
16099
16095
|
* Calls listeners for the given InteractEvent type bound globally
|
|
@@ -16108,12 +16104,12 @@ class Sy {
|
|
|
16108
16104
|
}
|
|
16109
16105
|
/** @internal */
|
|
16110
16106
|
_onOff(t, n, o, r, i) {
|
|
16111
|
-
|
|
16107
|
+
J.object(n) && !J.array(n) && (r = o, o = null);
|
|
16112
16108
|
const s = pn(n, o, i);
|
|
16113
16109
|
for (let u in s) {
|
|
16114
16110
|
u === "wheel" && (u = Je.wheelEvent);
|
|
16115
16111
|
for (const l of s[u])
|
|
16116
|
-
mo(u, this._actions) ? this.events[t === Xt.On ? "on" : "off"](u, l) :
|
|
16112
|
+
mo(u, this._actions) ? this.events[t === Xt.On ? "on" : "off"](u, l) : J.string(this.target) ? this._scopeEvents[t === Xt.On ? "addDelegate" : "removeDelegate"](this.target, this._context, u, l, r) : this._scopeEvents[t === Xt.On ? "add" : "remove"](this.target, u, l, r);
|
|
16117
16113
|
}
|
|
16118
16114
|
return this;
|
|
16119
16115
|
}
|
|
@@ -16151,7 +16147,7 @@ class Sy {
|
|
|
16151
16147
|
*/
|
|
16152
16148
|
set(t) {
|
|
16153
16149
|
const n = this._defaults;
|
|
16154
|
-
|
|
16150
|
+
J.object(t) || (t = {}), this.options = zn(n.base);
|
|
16155
16151
|
for (const o in this._actions.methodDict) {
|
|
16156
16152
|
const r = o, i = this._actions.methodDict[r];
|
|
16157
16153
|
this.options[r] = {}, this.setPerAction(r, Ce(Ce({}, n.perAction), n.actions[r])), this[i](t[r]);
|
|
@@ -16161,7 +16157,7 @@ class Sy {
|
|
|
16161
16157
|
this.rectChecker(t.getRect);
|
|
16162
16158
|
continue;
|
|
16163
16159
|
}
|
|
16164
|
-
|
|
16160
|
+
J.func(this[o]) && this[o](t[o]);
|
|
16165
16161
|
}
|
|
16166
16162
|
return this;
|
|
16167
16163
|
}
|
|
@@ -16170,7 +16166,7 @@ class Sy {
|
|
|
16170
16166
|
* action capabilities and event listeners
|
|
16171
16167
|
*/
|
|
16172
16168
|
unset() {
|
|
16173
|
-
if (
|
|
16169
|
+
if (J.string(this.target))
|
|
16174
16170
|
for (const t in this._scopeEvents.delegatedEvents) {
|
|
16175
16171
|
const n = this._scopeEvents.delegatedEvents[t];
|
|
16176
16172
|
for (let o = n.length - 1; o >= 0; o--) {
|
|
@@ -16197,7 +16193,7 @@ class Cy {
|
|
|
16197
16193
|
} = n;
|
|
16198
16194
|
const {
|
|
16199
16195
|
target: r
|
|
16200
|
-
} = o, i =
|
|
16196
|
+
} = o, i = J.string(r) ? this.selectorMap[r] : r[this.scope.id], s = tr(i, (u) => u === o);
|
|
16201
16197
|
i.splice(s, 1);
|
|
16202
16198
|
}
|
|
16203
16199
|
});
|
|
@@ -16207,7 +16203,7 @@ class Cy {
|
|
|
16207
16203
|
actions: this.scope.actions
|
|
16208
16204
|
});
|
|
16209
16205
|
const o = new this.scope.Interactable(t, n, this.scope.document, this.scope.events);
|
|
16210
|
-
return this.scope.addDocument(o._doc), this.list.push(o),
|
|
16206
|
+
return this.scope.addDocument(o._doc), this.list.push(o), J.string(t) ? (this.selectorMap[t] || (this.selectorMap[t] = []), this.selectorMap[t].push(o)) : (o.target[this.scope.id] || Object.defineProperty(t, this.scope.id, {
|
|
16211
16207
|
value: [],
|
|
16212
16208
|
configurable: !0
|
|
16213
16209
|
}), t[this.scope.id].push(o)), this.scope.fire("interactable:new", {
|
|
@@ -16218,16 +16214,16 @@ class Cy {
|
|
|
16218
16214
|
}), o;
|
|
16219
16215
|
}
|
|
16220
16216
|
getExisting(t, n) {
|
|
16221
|
-
const o = n && n.context || this.scope.document, r =
|
|
16217
|
+
const o = n && n.context || this.scope.document, r = J.string(t), i = r ? this.selectorMap[t] : t[this.scope.id];
|
|
16222
16218
|
if (i)
|
|
16223
16219
|
return Ro(i, (s) => s._context === o && (r || s.inContext(t)));
|
|
16224
16220
|
}
|
|
16225
16221
|
forEachMatch(t, n) {
|
|
16226
16222
|
for (const o of this.list) {
|
|
16227
16223
|
let r;
|
|
16228
|
-
if ((
|
|
16224
|
+
if ((J.string(o.target) ? (
|
|
16229
16225
|
// target is a selector and the element matches
|
|
16230
|
-
|
|
16226
|
+
J.element(t) && xn(t, o.target)
|
|
16231
16227
|
) : (
|
|
16232
16228
|
// target is the element
|
|
16233
16229
|
t === o.target
|
|
@@ -16247,12 +16243,12 @@ function ky(e) {
|
|
|
16247
16243
|
}, t.isSet = function(n, o) {
|
|
16248
16244
|
return !!this.scope.interactables.get(n, o && o.context);
|
|
16249
16245
|
}, t.on = fo(function(n, o, r) {
|
|
16250
|
-
if (
|
|
16246
|
+
if (J.string(n) && n.search(" ") !== -1 && (n = n.trim().split(/ +/)), J.array(n)) {
|
|
16251
16247
|
for (const i of n)
|
|
16252
16248
|
this.on(i, o, r);
|
|
16253
16249
|
return this;
|
|
16254
16250
|
}
|
|
16255
|
-
if (
|
|
16251
|
+
if (J.object(n)) {
|
|
16256
16252
|
for (const i in n)
|
|
16257
16253
|
this.on(i, n[i], o);
|
|
16258
16254
|
return this;
|
|
@@ -16261,12 +16257,12 @@ function ky(e) {
|
|
|
16261
16257
|
options: r
|
|
16262
16258
|
}), this;
|
|
16263
16259
|
}, "The interact.on() method is being deprecated"), t.off = fo(function(n, o, r) {
|
|
16264
|
-
if (
|
|
16260
|
+
if (J.string(n) && n.search(" ") !== -1 && (n = n.trim().split(/ +/)), J.array(n)) {
|
|
16265
16261
|
for (const i of n)
|
|
16266
16262
|
this.off(i, o, r);
|
|
16267
16263
|
return this;
|
|
16268
16264
|
}
|
|
16269
|
-
if (
|
|
16265
|
+
if (J.object(n)) {
|
|
16270
16266
|
for (const i in n)
|
|
16271
16267
|
this.off(i, n[i], o);
|
|
16272
16268
|
return this;
|
|
@@ -16288,7 +16284,7 @@ function ky(e) {
|
|
|
16288
16284
|
n.stop();
|
|
16289
16285
|
return this;
|
|
16290
16286
|
}, t.pointerMoveTolerance = function(n) {
|
|
16291
|
-
return
|
|
16287
|
+
return J.number(n) ? (this.scope.interactions.pointerMoveTolerance = n, this) : this.scope.interactions.pointerMoveTolerance;
|
|
16292
16288
|
}, t.addDocument = function(n, o) {
|
|
16293
16289
|
this.scope.addDocument(n, o);
|
|
16294
16290
|
}, t.removeDocument = function(n) {
|
|
@@ -16415,7 +16411,7 @@ class Vy {
|
|
|
16415
16411
|
}
|
|
16416
16412
|
}
|
|
16417
16413
|
function $y(e, t) {
|
|
16418
|
-
return e.isInitialized = !0,
|
|
16414
|
+
return e.isInitialized = !0, J.window(t) && Kl(t), Ue.init(t), Je.init(t), $n.init(t), e.window = t, e.document = t.document, e.usePlugin(wy), e.usePlugin(uy), e;
|
|
16419
16415
|
}
|
|
16420
16416
|
function Cs(e) {
|
|
16421
16417
|
return e && e.replace(/\/.*$/, "");
|
|
@@ -16453,10 +16449,10 @@ function Dy(e, t, n, o, r) {
|
|
|
16453
16449
|
return r.fire("auto-start:check", u), u.action;
|
|
16454
16450
|
}
|
|
16455
16451
|
function Ey(e) {
|
|
16456
|
-
return
|
|
16452
|
+
return J.bool(e) ? (this.options.styleCursor = e, this) : e === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
|
|
16457
16453
|
}
|
|
16458
16454
|
function My(e) {
|
|
16459
|
-
return
|
|
16455
|
+
return J.func(e) ? (this.options.actionChecker = e, this) : e === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
|
|
16460
16456
|
}
|
|
16461
16457
|
var Ty = {
|
|
16462
16458
|
id: "auto-start/interactableMethods",
|
|
@@ -16553,7 +16549,7 @@ function va(e, t, n, o, r) {
|
|
|
16553
16549
|
function l(a) {
|
|
16554
16550
|
i.push(a), s.push(u);
|
|
16555
16551
|
}
|
|
16556
|
-
for (;
|
|
16552
|
+
for (; J.element(u); ) {
|
|
16557
16553
|
i = [], s = [], r.interactables.forEachMatch(u, l);
|
|
16558
16554
|
const a = Ny(e, t, n, i, s, o, r);
|
|
16559
16555
|
if (a.action && !a.interactable.options[a.action.name].manualStart)
|
|
@@ -16591,7 +16587,7 @@ function rr(e, t, n, o) {
|
|
|
16591
16587
|
return u > 0;
|
|
16592
16588
|
}
|
|
16593
16589
|
function _a(e, t) {
|
|
16594
|
-
return
|
|
16590
|
+
return J.number(e) ? (t.autoStart.maxInteractions = e, this) : t.autoStart.maxInteractions;
|
|
16595
16591
|
}
|
|
16596
16592
|
function Kr(e, t, n) {
|
|
16597
16593
|
const {
|
|
@@ -16612,7 +16608,7 @@ function ya(e, t) {
|
|
|
16612
16608
|
let i = "";
|
|
16613
16609
|
if (r.name) {
|
|
16614
16610
|
const s = n.options[r.name].cursorChecker;
|
|
16615
|
-
|
|
16611
|
+
J.func(s) ? i = s(r, n, o, e._interacting) : i = t.actions.map[r.name].getCursor(r);
|
|
16616
16612
|
}
|
|
16617
16613
|
Kr(e.element, i || "", t);
|
|
16618
16614
|
}
|
|
@@ -16652,7 +16648,7 @@ function Ly(e, t) {
|
|
|
16652
16648
|
return m;
|
|
16653
16649
|
}
|
|
16654
16650
|
};
|
|
16655
|
-
for (;
|
|
16651
|
+
for (; J.element(p); ) {
|
|
16656
16652
|
const m = t.interactables.forEachMatch(p, v);
|
|
16657
16653
|
if (m) {
|
|
16658
16654
|
n.prepared.name = "drag", n.interactable = m, n.element = p;
|
|
@@ -16778,7 +16774,7 @@ const ke = {
|
|
|
16778
16774
|
};
|
|
16779
16775
|
if (a.x || a.y) {
|
|
16780
16776
|
const c = Vs(i);
|
|
16781
|
-
|
|
16777
|
+
J.window(i) ? i.scrollBy(a.x, a.y) : i && (i.scrollLeft += a.x, i.scrollTop += a.y);
|
|
16782
16778
|
const p = Vs(i), v = {
|
|
16783
16779
|
x: p.x - c.x,
|
|
16784
16780
|
y: p.y - c.y
|
|
@@ -16816,7 +16812,7 @@ const ke = {
|
|
|
16816
16812
|
interactable: u,
|
|
16817
16813
|
element: l
|
|
16818
16814
|
} = t, a = t.prepared.name, c = u.options[a].autoScroll, p = ks(c.container, u, l);
|
|
16819
|
-
if (
|
|
16815
|
+
if (J.window(p))
|
|
16820
16816
|
s = n.clientX < ke.margin, o = n.clientY < ke.margin, r = n.clientX > p.innerWidth - ke.margin, i = n.clientY > p.innerHeight - ke.margin;
|
|
16821
16817
|
else {
|
|
16822
16818
|
const v = yi(p);
|
|
@@ -16826,10 +16822,10 @@ const ke = {
|
|
|
16826
16822
|
}
|
|
16827
16823
|
};
|
|
16828
16824
|
function ks(e, t, n) {
|
|
16829
|
-
return (
|
|
16825
|
+
return (J.string(e) ? ua(e, t, n) : e) || bn(n);
|
|
16830
16826
|
}
|
|
16831
16827
|
function Vs(e) {
|
|
16832
|
-
return
|
|
16828
|
+
return J.window(e) && (e = window.document.body), {
|
|
16833
16829
|
x: e.scrollLeft,
|
|
16834
16830
|
y: e.scrollTop
|
|
16835
16831
|
};
|
|
@@ -16884,7 +16880,7 @@ function $s(e) {
|
|
|
16884
16880
|
}
|
|
16885
16881
|
}
|
|
16886
16882
|
const Yy = function(e) {
|
|
16887
|
-
return
|
|
16883
|
+
return J.object(e) ? (this.options.drag.enabled = e.enabled !== !1, this.setPerAction("drag", e), this.setOnEvents("drag", e), /^(xy|x|y|start)$/.test(e.lockAxis) && (this.options.drag.lockAxis = e.lockAxis), /^(xy|x|y)$/.test(e.startAxis) && (this.options.drag.startAxis = e.startAxis), this) : J.bool(e) ? (this.options.drag.enabled = e, this) : this.options.drag;
|
|
16888
16884
|
}, Do = {
|
|
16889
16885
|
id: "actions/drag",
|
|
16890
16886
|
install: Zy,
|
|
@@ -16945,7 +16941,7 @@ function Jy(e) {
|
|
|
16945
16941
|
const s = Ce({}, t.coords.cur.page), u = n.options.resize;
|
|
16946
16942
|
if (!(!(u && u.enabled) || // check mouseButton setting if the pointer is down
|
|
16947
16943
|
t.pointerIsDown && /mouse|pointer/.test(t.pointerType) && !(i & u.mouseButtons))) {
|
|
16948
|
-
if (
|
|
16944
|
+
if (J.object(u.edges)) {
|
|
16949
16945
|
const l = {
|
|
16950
16946
|
left: !1,
|
|
16951
16947
|
right: !1,
|
|
@@ -16969,13 +16965,13 @@ function Jy(e) {
|
|
|
16969
16965
|
}
|
|
16970
16966
|
}
|
|
16971
16967
|
function Ky(e, t, n) {
|
|
16972
|
-
return
|
|
16968
|
+
return J.object(t) ? (e.options.resize.enabled = t.enabled !== !1, e.setPerAction("resize", t), e.setOnEvents("resize", t), J.string(t.axis) && /^x$|^y$|^xy$/.test(t.axis) ? e.options.resize.axis = t.axis : t.axis === null && (e.options.resize.axis = n.defaults.actions.resize.axis), J.bool(t.preserveAspectRatio) ? e.options.resize.preserveAspectRatio = t.preserveAspectRatio : J.bool(t.square) && (e.options.resize.square = t.square), e) : J.bool(t) ? (e.options.resize.enabled = t, e) : e.options.resize;
|
|
16973
16969
|
}
|
|
16974
16970
|
function Qy(e, t, n, o, r, i, s) {
|
|
16975
16971
|
if (!t)
|
|
16976
16972
|
return !1;
|
|
16977
16973
|
if (t === !0) {
|
|
16978
|
-
const u =
|
|
16974
|
+
const u = J.number(i.width) ? i.width : i.right - i.left, l = J.number(i.height) ? i.height : i.bottom - i.top;
|
|
16979
16975
|
if (s = Math.min(s, Math.abs((e === "left" || e === "right" ? u : l) / 2)), u < 0 && (e === "left" ? e = "right" : e === "right" && (e = "left")), l < 0 && (e === "top" ? e = "bottom" : e === "bottom" && (e = "top")), e === "left") {
|
|
16980
16976
|
const a = u >= 0 ? i.left : i.right;
|
|
16981
16977
|
return n.x < a + s;
|
|
@@ -16989,7 +16985,7 @@ function Qy(e, t, n, o, r, i, s) {
|
|
|
16989
16985
|
if (e === "bottom")
|
|
16990
16986
|
return n.y > (l >= 0 ? i.bottom : i.top) - s;
|
|
16991
16987
|
}
|
|
16992
|
-
return
|
|
16988
|
+
return J.element(o) ? J.element(t) ? (
|
|
16993
16989
|
// the value is an element to use as a resize handle
|
|
16994
16990
|
t === o
|
|
16995
16991
|
) : (
|
|
@@ -17666,7 +17662,7 @@ function hb(e) {
|
|
|
17666
17662
|
t.x = Math.max(Math.min(u.right - i.right, t.x), u.left + i.left), t.y = Math.max(Math.min(u.bottom - i.bottom, t.y), u.top + i.top);
|
|
17667
17663
|
}
|
|
17668
17664
|
function wn(e, t, n) {
|
|
17669
|
-
return
|
|
17665
|
+
return J.func(e) ? po(e, t.interactable, t.element, [n.x, n.y, t]) : po(e, t.interactable, t.element);
|
|
17670
17666
|
}
|
|
17671
17667
|
const _b = {
|
|
17672
17668
|
restriction: null,
|
|
@@ -17863,10 +17859,10 @@ function Pb(e) {
|
|
|
17863
17859
|
for (let m = 0, g = r.targets.length; m < g; m++) {
|
|
17864
17860
|
const _ = r.targets[m];
|
|
17865
17861
|
let I;
|
|
17866
|
-
|
|
17867
|
-
x: (
|
|
17868
|
-
y: (
|
|
17869
|
-
range:
|
|
17862
|
+
J.func(_) ? I = _(p, v, t._proxy, c, m) : I = _, I && l.push({
|
|
17863
|
+
x: (J.number(I.x) ? I.x : p) + c.x,
|
|
17864
|
+
y: (J.number(I.y) ? I.y : v) + c.y,
|
|
17865
|
+
range: J.number(I.range) ? I.range : r.range,
|
|
17870
17866
|
source: _,
|
|
17871
17867
|
index: m,
|
|
17872
17868
|
offset: c
|
|
@@ -17964,7 +17960,7 @@ function Lb(e) {
|
|
|
17964
17960
|
n.options = Ce({}, r), n.options.targets = [];
|
|
17965
17961
|
for (const l of r.targets || []) {
|
|
17966
17962
|
let a;
|
|
17967
|
-
if (
|
|
17963
|
+
if (J.func(l) ? a = l(s.x, s.y, t) : a = l, !!a) {
|
|
17968
17964
|
for (const [c, p] of n.targetFields)
|
|
17969
17965
|
if (c in a || p in a) {
|
|
17970
17966
|
a.x = a[c], a.y = a[p];
|
|
@@ -18065,9 +18061,9 @@ function Wb(e) {
|
|
|
18065
18061
|
_onOff: r
|
|
18066
18062
|
} = n.prototype;
|
|
18067
18063
|
n.prototype._onOff = function(i, s, u, l, a) {
|
|
18068
|
-
if (
|
|
18064
|
+
if (J.string(this.target) || this.target.addEventListener)
|
|
18069
18065
|
return r.call(this, i, s, u, l, a);
|
|
18070
|
-
|
|
18066
|
+
J.object(s) && !J.array(s) && (l = u, u = null);
|
|
18071
18067
|
const c = pn(s, u, a);
|
|
18072
18068
|
for (const p in c)
|
|
18073
18069
|
mo(p, e.actions) || e.logger.warn(Qr + `Can't add native "${p}" event listener to target without \`addEventListener(type, listener, options)\` prop.`);
|
|
@@ -18123,7 +18119,7 @@ function Sa(e, t, n) {
|
|
|
18123
18119
|
}
|
|
18124
18120
|
function Zb(e, t, n) {
|
|
18125
18121
|
let o = e;
|
|
18126
|
-
for (;
|
|
18122
|
+
for (; J.element(o); ) {
|
|
18127
18123
|
if (Sa(o, t, n))
|
|
18128
18124
|
return !0;
|
|
18129
18125
|
o = an(o);
|
|
@@ -18492,7 +18488,7 @@ const Da = (e, t) => {
|
|
|
18492
18488
|
setup(e, { expose: t, emit: n }) {
|
|
18493
18489
|
const o = e, r = n, i = {
|
|
18494
18490
|
el: void 0,
|
|
18495
|
-
calcXY:
|
|
18491
|
+
calcXY: Q
|
|
18496
18492
|
};
|
|
18497
18493
|
t(i);
|
|
18498
18494
|
const s = se("emitter"), u = se("gridLayout");
|
|
@@ -18540,10 +18536,10 @@ const Da = (e, t) => {
|
|
|
18540
18536
|
"no-touch": h(v)
|
|
18541
18537
|
})), p = ve(() => a.resizable && !o.static), v = ve(() => (a.draggable || a.resizable) && !o.static), m = ve(() => u.props.isMirrored), g = ve(() => h(m) ? "vue-resizable-handle vue-rtl-resizable-handle" : "vue-resizable-handle");
|
|
18542
18538
|
function _() {
|
|
18543
|
-
s.on("updateWidth",
|
|
18539
|
+
s.on("updateWidth", j), s.on("setDraggable", I), s.on("setResizable", x), s.on("setBounded", M), s.on("setTransformScale", V), s.on("setRowHeight", k), s.on("setMaxRows", b), s.on("directionchange", D), s.on("setColNum", E);
|
|
18544
18540
|
}
|
|
18545
18541
|
_(), oi(() => {
|
|
18546
|
-
s.off("updateWidth",
|
|
18542
|
+
s.off("updateWidth", j), s.off("setDraggable", I), s.off("setResizable", x), s.off("setBounded", M), s.off("setTransformScale", V), s.off("setRowHeight", k), s.off("setMaxRows", b), s.off("directionchange", D), s.off("setColNum", E), l && l.unset();
|
|
18547
18543
|
}), lt(() => {
|
|
18548
18544
|
const $ = { ...u.props, ...u.state };
|
|
18549
18545
|
$.responsive && $.lastBreakpoint ? a.cols = Ia($.lastBreakpoint, $.cols) : a.cols = $.colNum, a.rowHeight = $.rowHeight, a.containerWidth = $.width !== null ? $.width : 100, a.margin = $.margin !== void 0 ? $.margin : [10, 10], a.maxRows = $.maxRows, o.isDraggable === null ? a.draggable = $.isDraggable : a.draggable = o.isDraggable, o.isResizable === null ? a.resizable = $.isResizable : a.resizable = o.isResizable, o.isBounded === null ? a.bounded = $.isBounded : a.bounded = o.isBounded, a.transformScale = $.transformScale, a.useCssTransforms = $.useCssTransforms, a.useStyleCursor = $.useStyleCursor, O();
|
|
@@ -18656,7 +18652,7 @@ const Da = (e, t) => {
|
|
|
18656
18652
|
ne.w
|
|
18657
18653
|
]);
|
|
18658
18654
|
}
|
|
18659
|
-
function
|
|
18655
|
+
function B($) {
|
|
18660
18656
|
if (o.static || a.isResizing) return;
|
|
18661
18657
|
const H = Ts($);
|
|
18662
18658
|
if (H === null) return;
|
|
@@ -18664,21 +18660,21 @@ const Da = (e, t) => {
|
|
|
18664
18660
|
switch ($.type) {
|
|
18665
18661
|
case "dragstart": {
|
|
18666
18662
|
a.previousX = a.innerX, a.previousY = a.innerY;
|
|
18667
|
-
const ye = $.target.offsetParent.getBoundingClientRect(),
|
|
18663
|
+
const ye = $.target.offsetParent.getBoundingClientRect(), K = $.target.getBoundingClientRect(), be = K.left / a.transformScale, Ve = ye.left / a.transformScale, Pe = K.right / a.transformScale, Te = ye.right / a.transformScale, Ye = K.top / a.transformScale, rt = ye.top / a.transformScale;
|
|
18668
18664
|
h(m) ? W.left = (Pe - Te) * -1 : W.left = be - Ve, W.top = Ye - rt, a.dragging = W, a.isDragging = !0;
|
|
18669
18665
|
break;
|
|
18670
18666
|
}
|
|
18671
18667
|
case "dragend": {
|
|
18672
18668
|
if (!a.isDragging) return;
|
|
18673
|
-
const ye = $.target.offsetParent.getBoundingClientRect(),
|
|
18669
|
+
const ye = $.target.offsetParent.getBoundingClientRect(), K = $.target.getBoundingClientRect(), be = K.left / a.transformScale, Ve = ye.left / a.transformScale, Pe = K.right / a.transformScale, Te = ye.right / a.transformScale, Ye = K.top / a.transformScale, rt = ye.top / a.transformScale;
|
|
18674
18670
|
h(m) ? W.left = (Pe - Te) * -1 : W.left = be - Ve, W.top = Ye - rt, a.dragging = null, a.isDragging = !1;
|
|
18675
18671
|
break;
|
|
18676
18672
|
}
|
|
18677
18673
|
case "dragmove": {
|
|
18678
18674
|
const ye = As(a.lastX, a.lastY, de, Ee);
|
|
18679
18675
|
if (h(m) ? W.left = a.dragging.left - ye.deltaX / a.transformScale : W.left = a.dragging.left + ye.deltaX / a.transformScale, W.top = a.dragging.top + ye.deltaY / a.transformScale, a.bounded) {
|
|
18680
|
-
const
|
|
18681
|
-
W.top = A(W.top, 0,
|
|
18676
|
+
const K = $.target.offsetParent.clientHeight - te(o.h, a.rowHeight, a.margin[1]);
|
|
18677
|
+
W.top = A(W.top, 0, K);
|
|
18682
18678
|
const be = T(), Ve = a.containerWidth - te(o.w, be, a.margin[0]);
|
|
18683
18679
|
W.left = A(W.left, 0, Ve);
|
|
18684
18680
|
}
|
|
@@ -18688,7 +18684,7 @@ const Da = (e, t) => {
|
|
|
18688
18684
|
}
|
|
18689
18685
|
O();
|
|
18690
18686
|
let ne;
|
|
18691
|
-
h(m), ne =
|
|
18687
|
+
h(m), ne = Q(W.top, W.left), a.lastX = de, a.lastY = Ee, (a.innerX !== ne.x || a.innerY !== ne.y) && r("move", o.i, ne.x, ne.y), $.type === "dragend" && (a.previousX !== a.innerX || a.previousY !== a.innerY) && r("moved", o.i, ne.x, ne.y), s.emit("dragEvent", [
|
|
18692
18688
|
$.type,
|
|
18693
18689
|
o.i,
|
|
18694
18690
|
ne.x,
|
|
@@ -18718,7 +18714,7 @@ const Da = (e, t) => {
|
|
|
18718
18714
|
height: Ee === 1 / 0 ? Ee : Math.round(a.rowHeight * Ee + Math.max(0, Ee - 1) * a.margin[1])
|
|
18719
18715
|
}, ne;
|
|
18720
18716
|
}
|
|
18721
|
-
function
|
|
18717
|
+
function Q($, H) {
|
|
18722
18718
|
const de = T();
|
|
18723
18719
|
let Ee = Math.round((H - a.margin[0]) / (de + a.margin[0])), W = Math.round(($ - a.margin[1]) / (a.rowHeight + a.margin[1]));
|
|
18724
18720
|
return Ee = Math.max(Math.min(Ee, a.cols - a.innerW), 0), W = Math.max(Math.min(W, a.maxRows - a.innerH), 0), { x: Ee, y: W };
|
|
@@ -18739,7 +18735,7 @@ const Da = (e, t) => {
|
|
|
18739
18735
|
let W = Math.round((H + a.margin[0]) / (Ee + a.margin[0])), ne = 0;
|
|
18740
18736
|
return de ? ne = Math.ceil(($ + a.margin[1]) / (a.rowHeight + a.margin[1])) : ne = Math.round(($ + a.margin[1]) / (a.rowHeight + a.margin[1])), W = Math.max(Math.min(W, a.cols - a.innerX), 0), ne = Math.max(Math.min(ne, a.maxRows - a.innerY), 0), { w: W, h: ne };
|
|
18741
18737
|
}
|
|
18742
|
-
function
|
|
18738
|
+
function j($, H) {
|
|
18743
18739
|
a.containerWidth = $, H != null && (a.cols = H);
|
|
18744
18740
|
}
|
|
18745
18741
|
function G() {
|
|
@@ -18750,7 +18746,7 @@ const Da = (e, t) => {
|
|
|
18750
18746
|
...o.dragOption
|
|
18751
18747
|
};
|
|
18752
18748
|
l.draggable($), a.dragEventSet || (a.dragEventSet = !0, l.on("dragstart dragmove dragend", (H) => {
|
|
18753
|
-
|
|
18749
|
+
B(H);
|
|
18754
18750
|
}));
|
|
18755
18751
|
} else
|
|
18756
18752
|
l.draggable({
|
|
@@ -19053,27 +19049,27 @@ var Cx = {
|
|
|
19053
19049
|
function b() {
|
|
19054
19050
|
if (x.position === "static") {
|
|
19055
19051
|
m.style.setProperty("position", "relative", a.important ? "important" : "");
|
|
19056
|
-
var O = function(L, ee,
|
|
19057
|
-
function
|
|
19052
|
+
var O = function(L, ee, B, F) {
|
|
19053
|
+
function Q(te) {
|
|
19058
19054
|
return te.replace(/[^-\d\.]/g, "");
|
|
19059
19055
|
}
|
|
19060
|
-
var T =
|
|
19061
|
-
T !== "auto" &&
|
|
19056
|
+
var T = B[F];
|
|
19057
|
+
T !== "auto" && Q(T) !== "0" && (L.warn("An element that is positioned static has style." + F + "=" + T + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + F + " will be set to 0. Element: ", ee), ee.style.setProperty(F, "0", a.important ? "important" : ""));
|
|
19062
19058
|
};
|
|
19063
19059
|
O(t, m, x, "top"), O(t, m, x, "right"), O(t, m, x, "bottom"), O(t, m, x, "left");
|
|
19064
19060
|
}
|
|
19065
19061
|
}
|
|
19066
19062
|
function D() {
|
|
19067
19063
|
I || b();
|
|
19068
|
-
function O(ee,
|
|
19064
|
+
function O(ee, B) {
|
|
19069
19065
|
if (!ee.contentDocument) {
|
|
19070
19066
|
var F = o(ee);
|
|
19071
19067
|
F.checkForObjectDocumentTimeoutId && window.clearTimeout(F.checkForObjectDocumentTimeoutId), F.checkForObjectDocumentTimeoutId = setTimeout(function() {
|
|
19072
|
-
F.checkForObjectDocumentTimeoutId = 0, O(ee,
|
|
19068
|
+
F.checkForObjectDocumentTimeoutId = 0, O(ee, B);
|
|
19073
19069
|
}, 100);
|
|
19074
19070
|
return;
|
|
19075
19071
|
}
|
|
19076
|
-
|
|
19072
|
+
B(ee.contentDocument);
|
|
19077
19073
|
}
|
|
19078
19074
|
var L = this;
|
|
19079
19075
|
O(L, function(ee) {
|
|
@@ -19132,12 +19128,12 @@ var Cx = {
|
|
|
19132
19128
|
};
|
|
19133
19129
|
}
|
|
19134
19130
|
function p(k, b, D) {
|
|
19135
|
-
function E(
|
|
19131
|
+
function E(B, F) {
|
|
19136
19132
|
F = F || function(T) {
|
|
19137
19133
|
k.head.appendChild(T);
|
|
19138
19134
|
};
|
|
19139
|
-
var
|
|
19140
|
-
return
|
|
19135
|
+
var Q = k.createElement("style");
|
|
19136
|
+
return Q.innerHTML = B, Q.id = b, F(Q), Q;
|
|
19141
19137
|
}
|
|
19142
19138
|
if (!k.getElementById(b)) {
|
|
19143
19139
|
var O = D + "_animation", L = D + "_animation_active", ee = `/* Created by the element-resize-detector library. */
|
|
@@ -19184,52 +19180,52 @@ var Cx = {
|
|
|
19184
19180
|
D || (D = b, b = k, k = null), k = k || {};
|
|
19185
19181
|
function E() {
|
|
19186
19182
|
if (k.debug) {
|
|
19187
|
-
var
|
|
19188
|
-
if (
|
|
19189
|
-
t.log.apply(null,
|
|
19183
|
+
var K = Array.prototype.slice.call(arguments);
|
|
19184
|
+
if (K.unshift(r.get(b), "Scroll: "), t.log.apply)
|
|
19185
|
+
t.log.apply(null, K);
|
|
19190
19186
|
else
|
|
19191
|
-
for (var be = 0; be <
|
|
19192
|
-
t.log(
|
|
19187
|
+
for (var be = 0; be < K.length; be++)
|
|
19188
|
+
t.log(K[be]);
|
|
19193
19189
|
}
|
|
19194
19190
|
}
|
|
19195
|
-
function O(
|
|
19191
|
+
function O(K) {
|
|
19196
19192
|
function be(Ve) {
|
|
19197
19193
|
var Pe = Ve.getRootNode && Ve.getRootNode().contains(Ve);
|
|
19198
19194
|
return Ve === Ve.ownerDocument.body || Ve.ownerDocument.body.contains(Ve) || Pe;
|
|
19199
19195
|
}
|
|
19200
|
-
return !be(
|
|
19196
|
+
return !be(K) || window.getComputedStyle(K) === null;
|
|
19201
19197
|
}
|
|
19202
|
-
function L(
|
|
19203
|
-
var be = o(
|
|
19198
|
+
function L(K) {
|
|
19199
|
+
var be = o(K).container.childNodes[0], Ve = window.getComputedStyle(be);
|
|
19204
19200
|
return !Ve.width || Ve.width.indexOf("px") === -1;
|
|
19205
19201
|
}
|
|
19206
19202
|
function ee() {
|
|
19207
|
-
var
|
|
19208
|
-
return be.position =
|
|
19203
|
+
var K = window.getComputedStyle(b), be = {};
|
|
19204
|
+
return be.position = K.position, be.width = b.offsetWidth, be.height = b.offsetHeight, be.top = K.top, be.right = K.right, be.bottom = K.bottom, be.left = K.left, be.widthCSS = K.width, be.heightCSS = K.height, be;
|
|
19209
19205
|
}
|
|
19210
|
-
function
|
|
19211
|
-
var
|
|
19206
|
+
function B() {
|
|
19207
|
+
var K = ee();
|
|
19212
19208
|
o(b).startSize = {
|
|
19213
|
-
width:
|
|
19214
|
-
height:
|
|
19209
|
+
width: K.width,
|
|
19210
|
+
height: K.height
|
|
19215
19211
|
}, E("Element start size", o(b).startSize);
|
|
19216
19212
|
}
|
|
19217
19213
|
function F() {
|
|
19218
19214
|
o(b).listeners = [];
|
|
19219
19215
|
}
|
|
19220
|
-
function
|
|
19216
|
+
function Q() {
|
|
19221
19217
|
if (E("storeStyle invoked."), !o(b)) {
|
|
19222
19218
|
E("Aborting because element has been uninstalled");
|
|
19223
19219
|
return;
|
|
19224
19220
|
}
|
|
19225
|
-
var
|
|
19226
|
-
o(b).style =
|
|
19221
|
+
var K = ee();
|
|
19222
|
+
o(b).style = K;
|
|
19227
19223
|
}
|
|
19228
|
-
function T(
|
|
19229
|
-
o(
|
|
19224
|
+
function T(K, be, Ve) {
|
|
19225
|
+
o(K).lastWidth = be, o(K).lastHeight = Ve;
|
|
19230
19226
|
}
|
|
19231
|
-
function te(
|
|
19232
|
-
return _(
|
|
19227
|
+
function te(K) {
|
|
19228
|
+
return _(K).childNodes[0];
|
|
19233
19229
|
}
|
|
19234
19230
|
function A() {
|
|
19235
19231
|
return 2 * i.width + 1;
|
|
@@ -19237,35 +19233,35 @@ var Cx = {
|
|
|
19237
19233
|
function R() {
|
|
19238
19234
|
return 2 * i.height + 1;
|
|
19239
19235
|
}
|
|
19240
|
-
function
|
|
19241
|
-
return
|
|
19236
|
+
function j(K) {
|
|
19237
|
+
return K + 10 + A();
|
|
19242
19238
|
}
|
|
19243
|
-
function G(
|
|
19244
|
-
return
|
|
19239
|
+
function G(K) {
|
|
19240
|
+
return K + 10 + R();
|
|
19245
19241
|
}
|
|
19246
|
-
function U(
|
|
19247
|
-
return
|
|
19242
|
+
function U(K) {
|
|
19243
|
+
return K * 2 + A();
|
|
19248
19244
|
}
|
|
19249
|
-
function q(
|
|
19250
|
-
return
|
|
19245
|
+
function q(K) {
|
|
19246
|
+
return K * 2 + R();
|
|
19251
19247
|
}
|
|
19252
|
-
function $(
|
|
19253
|
-
var Pe = _(
|
|
19248
|
+
function $(K, be, Ve) {
|
|
19249
|
+
var Pe = _(K), Te = I(K), Ye = j(be), rt = G(Ve), Qe = U(be), Ae = q(Ve);
|
|
19254
19250
|
Pe.scrollLeft = Ye, Pe.scrollTop = rt, Te.scrollLeft = Qe, Te.scrollTop = Ae;
|
|
19255
19251
|
}
|
|
19256
19252
|
function H() {
|
|
19257
|
-
var
|
|
19258
|
-
if (!
|
|
19259
|
-
|
|
19253
|
+
var K = o(b).container;
|
|
19254
|
+
if (!K) {
|
|
19255
|
+
K = document.createElement("div"), K.className = u, K.style.cssText = a(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]), o(b).container = K, v(K), b.appendChild(K);
|
|
19260
19256
|
var be = function() {
|
|
19261
19257
|
o(b).onRendered && o(b).onRendered();
|
|
19262
19258
|
};
|
|
19263
|
-
m(
|
|
19259
|
+
m(K, "animationstart", be), o(b).onAnimationStart = be;
|
|
19264
19260
|
}
|
|
19265
|
-
return
|
|
19261
|
+
return K;
|
|
19266
19262
|
}
|
|
19267
19263
|
function de() {
|
|
19268
|
-
function
|
|
19264
|
+
function K() {
|
|
19269
19265
|
var je = o(b).style;
|
|
19270
19266
|
if (je.position === "static") {
|
|
19271
19267
|
b.style.setProperty("position", "relative", k.important ? "important" : "");
|
|
@@ -19286,7 +19282,7 @@ var Cx = {
|
|
|
19286
19282
|
E("Aborting because element has been uninstalled");
|
|
19287
19283
|
return;
|
|
19288
19284
|
}
|
|
19289
|
-
|
|
19285
|
+
K();
|
|
19290
19286
|
var Ve = o(b).container;
|
|
19291
19287
|
Ve || (Ve = H());
|
|
19292
19288
|
var Pe = i.width, Te = i.height, Ye = a(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]), rt = a(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(be(-(1 + Pe), -(1 + Te), -Te, -Pe))), Qe = a(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]), Ae = a(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]), et = a(["position: absolute", "left: 0", "top: 0"]), ut = a(["position: absolute", "width: 200%", "height: 200%"]), ot = document.createElement("div"), pe = document.createElement("div"), Ge = document.createElement("div"), Vt = document.createElement("div"), Fe = document.createElement("div"), qe = document.createElement("div");
|
|
@@ -19302,8 +19298,8 @@ var Cx = {
|
|
|
19302
19298
|
m(Ge, "scroll", dt), m(Fe, "scroll", vt), o(b).onExpandScroll = dt, o(b).onShrinkScroll = vt;
|
|
19303
19299
|
}
|
|
19304
19300
|
function Ee() {
|
|
19305
|
-
function
|
|
19306
|
-
var ut = te(Qe), ot =
|
|
19301
|
+
function K(Qe, Ae, et) {
|
|
19302
|
+
var ut = te(Qe), ot = j(Ae), pe = G(et);
|
|
19307
19303
|
ut.style.setProperty("width", ot + "px", k.important ? "important" : ""), ut.style.setProperty("height", pe + "px", k.important ? "important" : "");
|
|
19308
19304
|
}
|
|
19309
19305
|
function be(Qe) {
|
|
@@ -19322,7 +19318,7 @@ var Cx = {
|
|
|
19322
19318
|
var ot = b.offsetWidth, pe = b.offsetHeight;
|
|
19323
19319
|
(ot !== Ae || pe !== et) && t.warn(r.get(b), "Scroll: Size changed before updating detector elements.");
|
|
19324
19320
|
}
|
|
19325
|
-
|
|
19321
|
+
K(b, Ae, et);
|
|
19326
19322
|
}
|
|
19327
19323
|
}), n.add(1, function() {
|
|
19328
19324
|
if (!o(b)) {
|
|
@@ -19385,21 +19381,21 @@ var Cx = {
|
|
|
19385
19381
|
}
|
|
19386
19382
|
o(b).onRendered = Te, o(b).onExpand = Ye, o(b).onShrink = Ye;
|
|
19387
19383
|
var rt = o(b).style;
|
|
19388
|
-
|
|
19384
|
+
K(b, rt.width, rt.height);
|
|
19389
19385
|
}
|
|
19390
19386
|
function W() {
|
|
19391
19387
|
if (E("finalizeDomMutation invoked."), !o(b)) {
|
|
19392
19388
|
E("Aborting because element has been uninstalled");
|
|
19393
19389
|
return;
|
|
19394
19390
|
}
|
|
19395
|
-
var
|
|
19396
|
-
T(b,
|
|
19391
|
+
var K = o(b).style;
|
|
19392
|
+
T(b, K.width, K.height), $(b, K.width, K.height);
|
|
19397
19393
|
}
|
|
19398
19394
|
function ne() {
|
|
19399
19395
|
D(b);
|
|
19400
19396
|
}
|
|
19401
19397
|
function ye() {
|
|
19402
|
-
E("Installing..."), F(),
|
|
19398
|
+
E("Installing..."), F(), B(), n.add(0, Q), n.add(1, de), n.add(2, Ee), n.add(3, W), n.add(4, ne);
|
|
19403
19399
|
}
|
|
19404
19400
|
E("Making detectable..."), O(b) ? (E("Element is detached"), H(), E("Waiting until element is attached..."), o(b).onRendered = function() {
|
|
19405
19401
|
E("Element is now attached"), ye();
|
|
@@ -19471,14 +19467,14 @@ var Ox = function(e) {
|
|
|
19471
19467
|
throw new Error("Invalid strategy name: " + p);
|
|
19472
19468
|
var g = {};
|
|
19473
19469
|
function _(M, V, k) {
|
|
19474
|
-
function b(
|
|
19475
|
-
var F = l.get(
|
|
19476
|
-
eo(F, function(
|
|
19477
|
-
|
|
19470
|
+
function b(B) {
|
|
19471
|
+
var F = l.get(B);
|
|
19472
|
+
eo(F, function(Q) {
|
|
19473
|
+
Q(B);
|
|
19478
19474
|
});
|
|
19479
19475
|
}
|
|
19480
|
-
function D(
|
|
19481
|
-
l.add(F,
|
|
19476
|
+
function D(B, F, Q) {
|
|
19477
|
+
l.add(F, Q), B && Q(F);
|
|
19482
19478
|
}
|
|
19483
19479
|
if (k || (k = V, V = M, M = {}), !V)
|
|
19484
19480
|
throw new Error("At least one element required.");
|
|
@@ -19492,23 +19488,23 @@ var Ox = function(e) {
|
|
|
19492
19488
|
return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
|
|
19493
19489
|
var E = 0, O = Zt(M, "callOnAdd", u.callOnAdd), L = Zt(M, "onReady", function() {
|
|
19494
19490
|
}), ee = Zt(M, "debug", u.debug);
|
|
19495
|
-
eo(V, function(
|
|
19496
|
-
Wt.getState(
|
|
19497
|
-
var F = t.get(
|
|
19498
|
-
if (ee && r.log("Attaching listener to element", F,
|
|
19499
|
-
if (ee && r.log(F, "Not detectable."), a.isBusy(
|
|
19500
|
-
ee && r.log(F, "System busy making it detectable"), D(O,
|
|
19491
|
+
eo(V, function(B) {
|
|
19492
|
+
Wt.getState(B) || (Wt.initState(B), t.set(B));
|
|
19493
|
+
var F = t.get(B);
|
|
19494
|
+
if (ee && r.log("Attaching listener to element", F, B), !a.isDetectable(B)) {
|
|
19495
|
+
if (ee && r.log(F, "Not detectable."), a.isBusy(B)) {
|
|
19496
|
+
ee && r.log(F, "System busy making it detectable"), D(O, B, k), g[F] = g[F] || [], g[F].push(function() {
|
|
19501
19497
|
E++, E === V.length && L();
|
|
19502
19498
|
});
|
|
19503
19499
|
return;
|
|
19504
19500
|
}
|
|
19505
|
-
return ee && r.log(F, "Making detectable..."), a.markBusy(
|
|
19506
|
-
if (ee && r.log(F, "onElementDetectable"), Wt.getState(
|
|
19507
|
-
a.markAsDetectable(
|
|
19508
|
-
var T = Wt.getState(
|
|
19501
|
+
return ee && r.log(F, "Making detectable..."), a.markBusy(B, !0), c.makeDetectable({ debug: ee, important: v }, B, function(Q) {
|
|
19502
|
+
if (ee && r.log(F, "onElementDetectable"), Wt.getState(Q)) {
|
|
19503
|
+
a.markAsDetectable(Q), a.markBusy(Q, !1), c.addListener(Q, b), D(O, Q, k);
|
|
19504
|
+
var T = Wt.getState(Q);
|
|
19509
19505
|
if (T && T.startSize) {
|
|
19510
|
-
var te =
|
|
19511
|
-
(T.startSize.width !== te || T.startSize.height !== A) && b(
|
|
19506
|
+
var te = Q.offsetWidth, A = Q.offsetHeight;
|
|
19507
|
+
(T.startSize.width !== te || T.startSize.height !== A) && b(Q);
|
|
19512
19508
|
}
|
|
19513
19509
|
g[F] && eo(g[F], function(R) {
|
|
19514
19510
|
R();
|
|
@@ -19518,7 +19514,7 @@ var Ox = function(e) {
|
|
|
19518
19514
|
delete g[F], E++, E === V.length && L();
|
|
19519
19515
|
});
|
|
19520
19516
|
}
|
|
19521
|
-
ee && r.log(F, "Already detecable, adding listener."), D(O,
|
|
19517
|
+
ee && r.log(F, "Already detecable, adding listener."), D(O, B, k), E++;
|
|
19522
19518
|
}), E === V.length && L();
|
|
19523
19519
|
}
|
|
19524
19520
|
function I(M) {
|
|
@@ -19753,11 +19749,11 @@ const jx = {
|
|
|
19753
19749
|
return !0;
|
|
19754
19750
|
let E = !1, O = 0;
|
|
19755
19751
|
for (; O < b.length; ) {
|
|
19756
|
-
const L = b[O], ee = Object.keys(L),
|
|
19752
|
+
const L = b[O], ee = Object.keys(L), B = D[O], F = Object.keys(B), Q = [.../* @__PURE__ */ new Set([...ee, ...F])];
|
|
19757
19753
|
let T = 0;
|
|
19758
|
-
for (; T <
|
|
19759
|
-
const te =
|
|
19760
|
-
if (L[te] !==
|
|
19754
|
+
for (; T < Q.length; ) {
|
|
19755
|
+
const te = Q[T];
|
|
19756
|
+
if (L[te] !== B[te]) {
|
|
19761
19757
|
E = !0;
|
|
19762
19758
|
break;
|
|
19763
19759
|
}
|
|
@@ -19790,33 +19786,33 @@ const jx = {
|
|
|
19790
19786
|
return `${Jb(l.layout) * (o.rowHeight + D) + D}px`;
|
|
19791
19787
|
}
|
|
19792
19788
|
function _([b, D, E, O, L, ee] = []) {
|
|
19793
|
-
let
|
|
19794
|
-
if (
|
|
19789
|
+
let B = Es(l.layout, D);
|
|
19790
|
+
if (B == null && (B = { x: 0, y: 0 }), b === "dragstart" && !o.verticalCompact && (l.positionsBeforeDrag = l.layout.reduce((F, { i: Q, x: T, y: te }) => ({
|
|
19795
19791
|
...F,
|
|
19796
|
-
[
|
|
19797
|
-
}), {})), b === "dragmove" || b === "dragstart" ? (l.placeholder.x =
|
|
19792
|
+
[Q]: { x: T, y: te }
|
|
19793
|
+
}), {})), b === "dragmove" || b === "dragstart" ? (l.placeholder.x = B.x, l.placeholder.y = B.y, l.placeholder.w = ee, l.placeholder.h = L, l.isDragging = !0) : l.isDragging = !1, l.layout = ti(l.layout, B, E, O, !0, o.preventCollision), o.restoreOnDrag ? (B.static = !0, Qn(l.layout, o.verticalCompact, l.positionsBeforeDrag), B.static = !1) : Qn(l.layout, o.verticalCompact), v(), b === "dragend" && delete l.positionsBeforeDrag, c(o.layout, l.layout)) {
|
|
19798
19794
|
const F = fn(l.layout);
|
|
19799
19795
|
r("layout-updated", F), r("update:layout", F);
|
|
19800
19796
|
}
|
|
19801
19797
|
}
|
|
19802
19798
|
function I([b, D, E, O, L, ee] = []) {
|
|
19803
|
-
let
|
|
19804
|
-
|
|
19799
|
+
let B = Es(l.layout, D);
|
|
19800
|
+
B == null && (B = { h: 0, w: 0 });
|
|
19805
19801
|
let F;
|
|
19806
19802
|
if (o.preventCollision) {
|
|
19807
|
-
const
|
|
19808
|
-
(T) => T.i !==
|
|
19803
|
+
const Q = ka(l.layout, { ...B, w: ee, h: L }).filter(
|
|
19804
|
+
(T) => T.i !== B.i
|
|
19809
19805
|
);
|
|
19810
|
-
if (F =
|
|
19806
|
+
if (F = Q.length > 0, F) {
|
|
19811
19807
|
let T = 1 / 0, te = 1 / 0;
|
|
19812
|
-
|
|
19813
|
-
A.x >
|
|
19814
|
-
}), Number.isFinite(T) && (
|
|
19808
|
+
Q.forEach((A) => {
|
|
19809
|
+
A.x > B.x && (T = Math.min(T, A.x)), A.y > B.y && (te = Math.min(te, A.y));
|
|
19810
|
+
}), Number.isFinite(T) && (B.w = T - B.x), Number.isFinite(te) && (B.h = te - B.y);
|
|
19815
19811
|
}
|
|
19816
19812
|
}
|
|
19817
|
-
if (F || (
|
|
19818
|
-
const
|
|
19819
|
-
r("layout-updated",
|
|
19813
|
+
if (F || (B.w = ee, B.h = L), b === "resizestart" || b === "resizemove" ? (l.placeholder.x = E, l.placeholder.y = O, l.placeholder.w = B.w, l.placeholder.h = B.h, l.isDragging = !0) : l.isDragging = !1, o.responsive && x(), Qn(l.layout, o.verticalCompact), v(), c(o.layout, l.layout)) {
|
|
19814
|
+
const Q = fn(l.layout);
|
|
19815
|
+
r("layout-updated", Q), r("update:layout", Q);
|
|
19820
19816
|
}
|
|
19821
19817
|
}
|
|
19822
19818
|
function x() {
|
|
@@ -20256,16 +20252,16 @@ const f1 = /* @__PURE__ */ Sn(d1, [["render", c1]]), p1 = { class: "grid w-full
|
|
|
20256
20252
|
const E = (U) => {
|
|
20257
20253
|
r.value = U;
|
|
20258
20254
|
};
|
|
20259
|
-
let O, L, ee,
|
|
20260
|
-
const F = oe(!1),
|
|
20255
|
+
let O, L, ee, B;
|
|
20256
|
+
const F = oe(!1), Q = (U) => {
|
|
20261
20257
|
if (!s.value || U.target.closest(".vue-grid-item")) return;
|
|
20262
20258
|
F.value = !0;
|
|
20263
20259
|
const H = O.getBoundingClientRect(), de = O.scrollTop, Ee = O.scrollLeft;
|
|
20264
|
-
ee = U.clientX - H.left + Ee,
|
|
20260
|
+
ee = U.clientX - H.left + Ee, B = U.clientY - H.top + de, L.style.left = ee + "px", L.style.top = B + "px", L.style.width = "0px", L.style.height = "0px", L.style.opacity = "1";
|
|
20265
20261
|
}, T = (U) => {
|
|
20266
20262
|
if (!s.value || !F.value) return;
|
|
20267
|
-
const q = O.getBoundingClientRect(), $ = O.scrollTop, H = O.scrollLeft, de = U.clientX - q.left + H, Ee = U.clientY - q.top + $, W = Math.min(ee, de), ne = Math.min(
|
|
20268
|
-
L.style.left = W + "px", L.style.top = ne + "px", L.style.width = ye + "px", L.style.height =
|
|
20263
|
+
const q = O.getBoundingClientRect(), $ = O.scrollTop, H = O.scrollLeft, de = U.clientX - q.left + H, Ee = U.clientY - q.top + $, W = Math.min(ee, de), ne = Math.min(B, Ee), ye = Math.abs(ee - de), K = Math.abs(B - Ee);
|
|
20264
|
+
L.style.left = W + "px", L.style.top = ne + "px", L.style.width = ye + "px", L.style.height = K + "px";
|
|
20269
20265
|
}, te = () => {
|
|
20270
20266
|
if (!s.value) return;
|
|
20271
20267
|
F.value = !1, L.style.opacity = "0";
|
|
@@ -20285,10 +20281,10 @@ const f1 = /* @__PURE__ */ Sn(d1, [["render", c1]]), p1 = { class: "grid w-full
|
|
|
20285
20281
|
}
|
|
20286
20282
|
async function R(U) {
|
|
20287
20283
|
s.value && U.key === "Backspace" && !A() && (i.value.length > 0 || r.value) && (U.preventDefault(), await t.confirm(`Are you sure you want to delete ${i.value.length > 1 ? "these " + i.value.length + " items" : "this item"}?`) && (i.value.length > 0 ? i.value.forEach(($) => {
|
|
20288
|
-
|
|
20289
|
-
}) :
|
|
20284
|
+
j($);
|
|
20285
|
+
}) : j(r.value.i)), i.value = [], r.value = null);
|
|
20290
20286
|
}
|
|
20291
|
-
const
|
|
20287
|
+
const j = (U) => {
|
|
20292
20288
|
n.layout.splice(n.layout.findIndex((q) => q.i === U), 1);
|
|
20293
20289
|
}, G = (U) => Object.keys(U).includes("visibility") ? ![!0, "true", 1].includes(Xo(U.visibility.trim(), u == null ? void 0 : u.value)) : !1;
|
|
20294
20290
|
return lt(() => {
|
|
@@ -20300,7 +20296,7 @@ const f1 = /* @__PURE__ */ Sn(d1, [["render", c1]]), p1 = { class: "grid w-full
|
|
|
20300
20296
|
ref: l,
|
|
20301
20297
|
id: "custom-module-wrapper",
|
|
20302
20298
|
class: Ze(["relative block w-full overflow-auto bg-muted/80 border border-ring/50 dark:border-ring rounded-xl", { "select-none": h(o) || F.value }]),
|
|
20303
|
-
onMousedown:
|
|
20299
|
+
onMousedown: Q
|
|
20304
20300
|
}, [
|
|
20305
20301
|
S("div", C1, [
|
|
20306
20302
|
S("div", {
|
|
@@ -20444,7 +20440,7 @@ const f1 = /* @__PURE__ */ Sn(d1, [["render", c1]]), p1 = { class: "grid w-full
|
|
|
20444
20440
|
name: $.label,
|
|
20445
20441
|
type: "apiActionResponse",
|
|
20446
20442
|
value: $.action ?? null
|
|
20447
|
-
}))) || [],
|
|
20443
|
+
}))) || [], j = Object.entries(c.elementValues ?? {}).map(([$, H]) => ({
|
|
20448
20444
|
name: $,
|
|
20449
20445
|
type: "element",
|
|
20450
20446
|
value: {
|
|
@@ -20455,10 +20451,10 @@ const f1 = /* @__PURE__ */ Sn(d1, [["render", c1]]), p1 = { class: "grid w-full
|
|
|
20455
20451
|
type: "routeQueryParam",
|
|
20456
20452
|
value: H ?? null
|
|
20457
20453
|
})) || [];
|
|
20458
|
-
return [...A, ...R, ...
|
|
20454
|
+
return [...A, ...R, ...j, ...G].filter(($) => $.name);
|
|
20459
20455
|
});
|
|
20460
20456
|
function m(A) {
|
|
20461
|
-
return A.replace(/-([a-z])/g, (R,
|
|
20457
|
+
return A.replace(/-([a-z])/g, (R, j) => j.toUpperCase());
|
|
20462
20458
|
}
|
|
20463
20459
|
const g = ve(() => {
|
|
20464
20460
|
const A = Object.fromEntries(
|
|
@@ -20473,11 +20469,11 @@ const f1 = /* @__PURE__ */ Sn(d1, [["render", c1]]), p1 = { class: "grid w-full
|
|
|
20473
20469
|
value: I(R.expression, A)
|
|
20474
20470
|
}));
|
|
20475
20471
|
}), _ = ve(() => [...v.value, ...g.value]), I = (A, R) => x(A, R), x = (A, R = {}) => {
|
|
20476
|
-
var
|
|
20472
|
+
var j;
|
|
20477
20473
|
try {
|
|
20478
20474
|
const G = document.createElement("iframe");
|
|
20479
20475
|
G.style.display = "none", document.body.appendChild(G);
|
|
20480
|
-
const U = (
|
|
20476
|
+
const U = (j = G.contentWindow) == null ? void 0 : j.Function;
|
|
20481
20477
|
return document.body.removeChild(G), U == null ? void 0 : U(...Object.keys(R), "'use strict';" + A)(...Object.values(R));
|
|
20482
20478
|
} catch (G) {
|
|
20483
20479
|
return console.error("Sandbox error:", G), "";
|
|
@@ -20512,33 +20508,33 @@ const f1 = /* @__PURE__ */ Sn(d1, [["render", c1]]), p1 = { class: "grid w-full
|
|
|
20512
20508
|
c[R] = p.value[R];
|
|
20513
20509
|
});
|
|
20514
20510
|
}
|
|
20515
|
-
function
|
|
20511
|
+
function B() {
|
|
20516
20512
|
var R;
|
|
20517
20513
|
let A = JSON.parse(JSON.stringify(c));
|
|
20518
|
-
(R = A.apiActions) == null || R.forEach((
|
|
20519
|
-
|
|
20514
|
+
(R = A.apiActions) == null || R.forEach((j) => {
|
|
20515
|
+
j.action.response = null, j.firedAt = null, j.hasFired = !1;
|
|
20520
20516
|
}), A.elementValues = {}, O("state", A), i.value = !1;
|
|
20521
20517
|
}
|
|
20522
20518
|
async function F() {
|
|
20523
20519
|
var R;
|
|
20524
20520
|
const A = await E("state");
|
|
20525
|
-
A && ((R = Object.keys(A)) == null || R.forEach((
|
|
20526
|
-
c[
|
|
20521
|
+
A && ((R = Object.keys(A)) == null || R.forEach((j) => {
|
|
20522
|
+
c[j] = A[j];
|
|
20527
20523
|
}));
|
|
20528
20524
|
}
|
|
20529
|
-
function
|
|
20525
|
+
function Q() {
|
|
20530
20526
|
var A;
|
|
20531
20527
|
(A = c.layout) == null || A.forEach((R) => {
|
|
20532
20528
|
Object.keys(R).includes("defaultValue") && (c.elementValues[R.variableName] = R.defaultValue);
|
|
20533
20529
|
});
|
|
20534
20530
|
}
|
|
20535
20531
|
const T = async () => {
|
|
20536
|
-
await F(),
|
|
20532
|
+
await F(), Q(), console.log("accc", c.apiActions), te();
|
|
20537
20533
|
}, te = () => {
|
|
20538
20534
|
async function A(R) {
|
|
20539
20535
|
console.log("loadAction", R);
|
|
20540
|
-
const { fireAction:
|
|
20541
|
-
let G = await
|
|
20536
|
+
const { fireAction: j } = Mo(R.action.integration);
|
|
20537
|
+
let G = await j(R.action, _.value);
|
|
20542
20538
|
c.apiActions.find((U) => U.id === R.id).action.response = G;
|
|
20543
20539
|
}
|
|
20544
20540
|
c.apiActions.forEach((R) => {
|
|
@@ -20548,11 +20544,11 @@ const f1 = /* @__PURE__ */ Sn(d1, [["render", c1]]), p1 = { class: "grid w-full
|
|
|
20548
20544
|
return lt(() => {
|
|
20549
20545
|
T();
|
|
20550
20546
|
}), (A, R) => {
|
|
20551
|
-
const
|
|
20547
|
+
const j = y("Button");
|
|
20552
20548
|
return w(), P("div", $1, [
|
|
20553
20549
|
h(n) ? (w(), P("div", I1, [
|
|
20554
20550
|
i.value ? (w(), P("div", R1, [
|
|
20555
|
-
d(
|
|
20551
|
+
d(j, {
|
|
20556
20552
|
variant: "outline",
|
|
20557
20553
|
onClick: ee
|
|
20558
20554
|
}, {
|
|
@@ -20562,14 +20558,14 @@ const f1 = /* @__PURE__ */ Sn(d1, [["render", c1]]), p1 = { class: "grid w-full
|
|
|
20562
20558
|
_: 1,
|
|
20563
20559
|
__: [2]
|
|
20564
20560
|
}),
|
|
20565
|
-
d(
|
|
20561
|
+
d(j, { onClick: B }, {
|
|
20566
20562
|
default: f(() => R[3] || (R[3] = [
|
|
20567
20563
|
C("Save")
|
|
20568
20564
|
])),
|
|
20569
20565
|
_: 1,
|
|
20570
20566
|
__: [3]
|
|
20571
20567
|
})
|
|
20572
|
-
])) : (w(), Z(
|
|
20568
|
+
])) : (w(), Z(j, {
|
|
20573
20569
|
key: 0,
|
|
20574
20570
|
onClick: L
|
|
20575
20571
|
}, {
|