@stonecrop/desktop 0.11.7 → 0.11.8
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/desktop.css +1 -1
- package/dist/desktop.js +138 -138
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.tsbuildinfo +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +22 -22
- package/src/components/ActionSet.vue +1 -4
- package/src/components/Desktop.vue +2 -2
- /package/dist/{index.js → src/index.js} +0 -0
- /package/dist/{plugins → src/plugins}/index.js +0 -0
- /package/dist/{router.js → src/router.js} +0 -0
- /package/dist/{types → src/types}/index.js +0 -0
package/dist/desktop.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Ve, ref as
|
|
1
|
+
import { defineComponent as Ve, ref as C, onMounted as yr, openBlock as M, createElementBlock as U, normalizeClass as te, createElementVNode as $, Fragment as ne, renderList as Ce, toDisplayString as At, createCommentVNode as ee, withDirectives as sr, vShow as Br, useTemplateRef as So, computed as N, watch as ot, nextTick as oe, createBlock as ar, Teleport as zi, createVNode as re, Transition as Ri, withCtx as Ne, withModifiers as Io, vModelText as Eo, renderSlot as zr, createTextVNode as ur, toRaw as Oo, isRef as ie, isReactive as _r, toRef as Bt, hasInjectionContext as Kr, inject as je, getCurrentInstance as ko, reactive as Do, markRaw as Ie, effectScope as Ci, getCurrentScope as un, onScopeDispose as cn, toRefs as Vn, provide as Hr, shallowRef as Le, toValue as St, readonly as gr, customRef as ln, unref as nr, useModel as Ni, watchEffect as ji, resolveDynamicComponent as Ln, mergeProps as xi, mergeModels as Un, resolveComponent as $i, withKeys as be, normalizeStyle as Rr } from "vue";
|
|
2
2
|
const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header" }, Pi = ["disabled", "onClick"], qi = { key: 0 }, Vi = { class: "dropdown-header" }, Li = ["onClick"], Ui = ["onClick"], Fi = { class: "dropdown-container" }, Wi = { class: "dropdown" }, Bi = ["onClick"], Ki = ["href"], Hi = { class: "dropdown-item" }, Ji = /* @__PURE__ */ Ve({
|
|
3
3
|
__name: "ActionSet",
|
|
4
4
|
props: {
|
|
@@ -6,9 +6,7 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
6
6
|
},
|
|
7
7
|
emits: ["actionClick"],
|
|
8
8
|
setup(t, { emit: e }) {
|
|
9
|
-
const r = e, n =
|
|
10
|
-
z(-1), z(!1), z(!1);
|
|
11
|
-
const i = z([]);
|
|
9
|
+
const r = e, n = C({}), o = C(!0), i = C([]);
|
|
12
10
|
yr(() => {
|
|
13
11
|
s();
|
|
14
12
|
});
|
|
@@ -58,13 +56,13 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
58
56
|
]),
|
|
59
57
|
sr($("div", Fi, [
|
|
60
58
|
$("div", Wi, [
|
|
61
|
-
(M(!0), U(ne, null, Ce(h.actions, (y
|
|
59
|
+
(M(!0), U(ne, null, Ce(h.actions, (y) => (M(), U("div", {
|
|
62
60
|
key: y.label
|
|
63
61
|
}, [
|
|
64
62
|
y.action != null ? (M(), U("button", {
|
|
65
63
|
key: 0,
|
|
66
64
|
class: "dropdown-item",
|
|
67
|
-
onClick: (
|
|
65
|
+
onClick: (m) => c(y.action, y.label)
|
|
68
66
|
}, At(y.label), 9, Bi)) : y.link != null ? (M(), U("a", {
|
|
69
67
|
key: 1,
|
|
70
68
|
href: y.link
|
|
@@ -85,7 +83,7 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
85
83
|
for (const [n, o] of e)
|
|
86
84
|
r[n] = o;
|
|
87
85
|
return r;
|
|
88
|
-
}, zo = /* @__PURE__ */ Ao(Ji, [["__scopeId", "data-v-
|
|
86
|
+
}, zo = /* @__PURE__ */ Ao(Ji, [["__scopeId", "data-v-3d76328a"]]), Gi = { class: "command-palette-header" }, Qi = ["placeholder"], Yi = {
|
|
89
87
|
key: 0,
|
|
90
88
|
class: "command-palette-results"
|
|
91
89
|
}, Xi = ["onClick", "onMouseover"], Zi = { class: "result-title" }, ts = { class: "result-content" }, es = {
|
|
@@ -101,7 +99,7 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
101
99
|
},
|
|
102
100
|
emits: ["select", "close"],
|
|
103
101
|
setup(t, { emit: e }) {
|
|
104
|
-
const r = e, n =
|
|
102
|
+
const r = e, n = C(""), o = C(0), i = So("input"), s = N(() => n.value ? t.search(n.value).slice(0, t.maxResults) : []);
|
|
105
103
|
ot(
|
|
106
104
|
() => t.isOpen,
|
|
107
105
|
async (l) => {
|
|
@@ -251,7 +249,7 @@ function Kn(t, e, r, n) {
|
|
|
251
249
|
!a && (process.env.NODE_ENV === "production" || !n) && (r.state.value[t] = o ? o() : {});
|
|
252
250
|
const l = process.env.NODE_ENV !== "production" && n ? (
|
|
253
251
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
254
|
-
Vn(
|
|
252
|
+
Vn(C(o ? o() : {}).value)
|
|
255
253
|
) : Vn(r.state.value[t]);
|
|
256
254
|
return wt(l, i, Object.keys(s || {}).reduce((f, h) => (process.env.NODE_ENV !== "production" && h in l && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${t}".`), f[h] = Ie(N(() => {
|
|
257
255
|
cr(r);
|
|
@@ -273,8 +271,8 @@ function Qr(t, e, r = {}, n, o, i) {
|
|
|
273
271
|
let c, l, f = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), d;
|
|
274
272
|
const y = n.state.value[t];
|
|
275
273
|
!i && !y && (process.env.NODE_ENV === "production" || !o) && (n.state.value[t] = {});
|
|
276
|
-
const m =
|
|
277
|
-
let
|
|
274
|
+
const m = C({});
|
|
275
|
+
let A;
|
|
278
276
|
function T(S) {
|
|
279
277
|
let b;
|
|
280
278
|
c = l = !1, process.env.NODE_ENV !== "production" && (d = []), typeof S == "function" ? (S(n.state.value[t]), b = {
|
|
@@ -287,15 +285,15 @@ function Qr(t, e, r = {}, n, o, i) {
|
|
|
287
285
|
storeId: t,
|
|
288
286
|
events: d
|
|
289
287
|
});
|
|
290
|
-
const
|
|
288
|
+
const z = A = /* @__PURE__ */ Symbol();
|
|
291
289
|
oe().then(() => {
|
|
292
|
-
|
|
290
|
+
A === z && (c = !0);
|
|
293
291
|
}), l = !0, Yt(f, b, n.state.value[t]);
|
|
294
292
|
}
|
|
295
293
|
const rt = i ? function() {
|
|
296
|
-
const { state: b } = r,
|
|
294
|
+
const { state: b } = r, z = b ? b() : {};
|
|
297
295
|
this.$patch((J) => {
|
|
298
|
-
wt(J,
|
|
296
|
+
wt(J, z);
|
|
299
297
|
});
|
|
300
298
|
} : (
|
|
301
299
|
/* istanbul ignore next */
|
|
@@ -309,7 +307,7 @@ function Qr(t, e, r = {}, n, o, i) {
|
|
|
309
307
|
const Ot = (S, b = "") => {
|
|
310
308
|
if (Wn in S)
|
|
311
309
|
return S[Cr] = b, S;
|
|
312
|
-
const
|
|
310
|
+
const z = function() {
|
|
313
311
|
cr(n);
|
|
314
312
|
const J = Array.from(arguments), k = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new Set();
|
|
315
313
|
function G(_) {
|
|
@@ -320,7 +318,7 @@ function Qr(t, e, r = {}, n, o, i) {
|
|
|
320
318
|
}
|
|
321
319
|
Yt(h, {
|
|
322
320
|
args: J,
|
|
323
|
-
name:
|
|
321
|
+
name: z[Cr],
|
|
324
322
|
store: O,
|
|
325
323
|
after: G,
|
|
326
324
|
onError: xt
|
|
@@ -333,7 +331,7 @@ function Qr(t, e, r = {}, n, o, i) {
|
|
|
333
331
|
}
|
|
334
332
|
return st instanceof Promise ? st.then((_) => (Yt(k, _), _)).catch((_) => (Yt(P, _), Promise.reject(_))) : (Yt(k, st), st);
|
|
335
333
|
};
|
|
336
|
-
return
|
|
334
|
+
return z[Wn] = !0, z[Cr] = b, z;
|
|
337
335
|
}, X = /* @__PURE__ */ Ie({
|
|
338
336
|
actions: {},
|
|
339
337
|
getters: {},
|
|
@@ -347,14 +345,14 @@ function Qr(t, e, r = {}, n, o, i) {
|
|
|
347
345
|
$patch: T,
|
|
348
346
|
$reset: rt,
|
|
349
347
|
$subscribe(S, b = {}) {
|
|
350
|
-
const
|
|
348
|
+
const z = Fn(f, S, b.detached, () => J()), J = s.run(() => ot(() => n.state.value[t], (k) => {
|
|
351
349
|
(b.flush === "sync" ? l : c) && S({
|
|
352
350
|
storeId: t,
|
|
353
351
|
type: De.direct,
|
|
354
352
|
events: d
|
|
355
353
|
}, k);
|
|
356
354
|
}, wt({}, u, b)));
|
|
357
|
-
return
|
|
355
|
+
return z;
|
|
358
356
|
},
|
|
359
357
|
$dispose: lt
|
|
360
358
|
}, O = Do(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Xt ? wt(
|
|
@@ -374,8 +372,8 @@ function Qr(t, e, r = {}, n, o, i) {
|
|
|
374
372
|
if (ie(b) && !Bn(b) || _r(b))
|
|
375
373
|
process.env.NODE_ENV !== "production" && o ? m.value[S] = Bt(q, S) : i || (y && os(b) && (ie(b) ? b.value = y[S] : Gr(b, y[S])), n.state.value[t][S] = b), process.env.NODE_ENV !== "production" && X.state.push(S);
|
|
376
374
|
else if (typeof b == "function") {
|
|
377
|
-
const
|
|
378
|
-
q[S] =
|
|
375
|
+
const z = process.env.NODE_ENV !== "production" && o ? b : Ot(b, S);
|
|
376
|
+
q[S] = z, process.env.NODE_ENV !== "production" && (X.actions[S] = b), a.actions[S] = b;
|
|
379
377
|
} else process.env.NODE_ENV !== "production" && Bn(b) && (X.getters[S] = i ? (
|
|
380
378
|
// @ts-expect-error
|
|
381
379
|
r.getters[S]
|
|
@@ -394,8 +392,8 @@ function Qr(t, e, r = {}, n, o, i) {
|
|
|
394
392
|
}), process.env.NODE_ENV !== "production" && (O._hotUpdate = Ie((S) => {
|
|
395
393
|
O._hotUpdating = !0, S._hmrPayload.state.forEach((b) => {
|
|
396
394
|
if (b in O.$state) {
|
|
397
|
-
const
|
|
398
|
-
typeof
|
|
395
|
+
const z = S.$state[b], J = O.$state[b];
|
|
396
|
+
typeof z == "object" && Kt(z) && Kt(J) ? Co(z, J) : S.$state[b] = J;
|
|
399
397
|
}
|
|
400
398
|
O[b] = Bt(S.$state, b);
|
|
401
399
|
}), Object.keys(O.$state).forEach((b) => {
|
|
@@ -404,15 +402,15 @@ function Qr(t, e, r = {}, n, o, i) {
|
|
|
404
402
|
c = !0;
|
|
405
403
|
});
|
|
406
404
|
for (const b in S._hmrPayload.actions) {
|
|
407
|
-
const
|
|
405
|
+
const z = S[b];
|
|
408
406
|
O[b] = //
|
|
409
|
-
Ot(
|
|
407
|
+
Ot(z, b);
|
|
410
408
|
}
|
|
411
409
|
for (const b in S._hmrPayload.getters) {
|
|
412
|
-
const
|
|
410
|
+
const z = S._hmrPayload.getters[b], J = i ? (
|
|
413
411
|
// special handling of options api
|
|
414
|
-
N(() => (cr(n),
|
|
415
|
-
) :
|
|
412
|
+
N(() => (cr(n), z.call(O, O)))
|
|
413
|
+
) : z;
|
|
416
414
|
O[b] = //
|
|
417
415
|
J;
|
|
418
416
|
}
|
|
@@ -440,7 +438,7 @@ function Qr(t, e, r = {}, n, o, i) {
|
|
|
440
438
|
pinia: n,
|
|
441
439
|
options: a
|
|
442
440
|
}));
|
|
443
|
-
Object.keys(b || {}).forEach((
|
|
441
|
+
Object.keys(b || {}).forEach((z) => O._customProperties.add(z)), wt(O, b);
|
|
444
442
|
} else
|
|
445
443
|
wt(O, s.run(() => S({
|
|
446
444
|
store: O,
|
|
@@ -508,7 +506,7 @@ function fs(...t) {
|
|
|
508
506
|
return typeof e == "function" ? gr(ln(() => ({
|
|
509
507
|
get: e,
|
|
510
508
|
set: ls
|
|
511
|
-
}))) :
|
|
509
|
+
}))) : C(e);
|
|
512
510
|
}
|
|
513
511
|
function hs(t, e) {
|
|
514
512
|
function r(...n) {
|
|
@@ -647,7 +645,7 @@ function Os(t, e, r, n = {}) {
|
|
|
647
645
|
var o;
|
|
648
646
|
const { flush: i = "pre", deep: s = !0, listenToStorageChanges: a = !0, writeDefaults: u = !0, mergeDefaults: c = !1, shallow: l, window: f = lr, eventFilter: h, onError: d = (k) => {
|
|
649
647
|
console.error(k);
|
|
650
|
-
}, initOnMounted: y } = n, m = (l ? Le :
|
|
648
|
+
}, initOnMounted: y } = n, m = (l ? Le : C)(e), A = N(() => St(t));
|
|
651
649
|
if (!r) try {
|
|
652
650
|
r = Ss("getDefaultStorage", () => lr?.localStorage)();
|
|
653
651
|
} catch (k) {
|
|
@@ -659,20 +657,20 @@ function Os(t, e, r, n = {}) {
|
|
|
659
657
|
deep: s,
|
|
660
658
|
eventFilter: h
|
|
661
659
|
});
|
|
662
|
-
ot(
|
|
660
|
+
ot(A, () => z(), { flush: i });
|
|
663
661
|
let mt = !1;
|
|
664
662
|
const O = (k) => {
|
|
665
|
-
y && !mt ||
|
|
663
|
+
y && !mt || z(k);
|
|
666
664
|
}, jt = (k) => {
|
|
667
665
|
y && !mt || J(k);
|
|
668
666
|
};
|
|
669
667
|
f && a && (r instanceof Storage ? Hn(f, "storage", O, { passive: !0 }) : Hn(f, Jn, jt)), y ? _s(() => {
|
|
670
|
-
mt = !0,
|
|
671
|
-
}) :
|
|
668
|
+
mt = !0, z();
|
|
669
|
+
}) : z();
|
|
672
670
|
function q(k, P) {
|
|
673
671
|
if (f) {
|
|
674
672
|
const G = {
|
|
675
|
-
key:
|
|
673
|
+
key: A.value,
|
|
676
674
|
oldValue: k,
|
|
677
675
|
newValue: P,
|
|
678
676
|
storageArea: r
|
|
@@ -682,21 +680,21 @@ function Os(t, e, r, n = {}) {
|
|
|
682
680
|
}
|
|
683
681
|
function S(k) {
|
|
684
682
|
try {
|
|
685
|
-
const P = r.getItem(
|
|
683
|
+
const P = r.getItem(A.value);
|
|
686
684
|
if (k == null)
|
|
687
|
-
q(P, null), r.removeItem(
|
|
685
|
+
q(P, null), r.removeItem(A.value);
|
|
688
686
|
else {
|
|
689
687
|
const G = lt.write(k);
|
|
690
|
-
P !== G && (r.setItem(
|
|
688
|
+
P !== G && (r.setItem(A.value, G), q(P, G));
|
|
691
689
|
}
|
|
692
690
|
} catch (P) {
|
|
693
691
|
d(P);
|
|
694
692
|
}
|
|
695
693
|
}
|
|
696
694
|
function b(k) {
|
|
697
|
-
const P = k ? k.newValue : r.getItem(
|
|
695
|
+
const P = k ? k.newValue : r.getItem(A.value);
|
|
698
696
|
if (P == null)
|
|
699
|
-
return u && T != null && r.setItem(
|
|
697
|
+
return u && T != null && r.setItem(A.value, lt.write(T)), T;
|
|
700
698
|
if (!k && c) {
|
|
701
699
|
const G = lt.read(P);
|
|
702
700
|
return typeof c == "function" ? c(G, T) : rt === "object" && !Array.isArray(G) ? {
|
|
@@ -705,13 +703,13 @@ function Os(t, e, r, n = {}) {
|
|
|
705
703
|
} : G;
|
|
706
704
|
} else return typeof P != "string" ? P : lt.read(P);
|
|
707
705
|
}
|
|
708
|
-
function
|
|
706
|
+
function z(k) {
|
|
709
707
|
if (!(k && k.storageArea !== r)) {
|
|
710
708
|
if (k && k.key == null) {
|
|
711
709
|
m.value = T;
|
|
712
710
|
return;
|
|
713
711
|
}
|
|
714
|
-
if (!(k && k.key !==
|
|
712
|
+
if (!(k && k.key !== A.value)) {
|
|
715
713
|
Ot();
|
|
716
714
|
try {
|
|
717
715
|
const P = lt.write(m.value);
|
|
@@ -725,7 +723,7 @@ function Os(t, e, r, n = {}) {
|
|
|
725
723
|
}
|
|
726
724
|
}
|
|
727
725
|
function J(k) {
|
|
728
|
-
|
|
726
|
+
z(k.detail);
|
|
729
727
|
}
|
|
730
728
|
return m;
|
|
731
729
|
}
|
|
@@ -765,24 +763,26 @@ function Ds(t) {
|
|
|
765
763
|
}))), e;
|
|
766
764
|
}
|
|
767
765
|
const xo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
768
|
-
const t =
|
|
766
|
+
const t = C({
|
|
769
767
|
maxOperations: 100,
|
|
770
768
|
enableCrossTabSync: !0,
|
|
771
769
|
autoSyncInterval: 3e4,
|
|
772
770
|
enablePersistence: !1,
|
|
773
771
|
persistenceKeyPrefix: "stonecrop-ops"
|
|
774
|
-
}), e =
|
|
772
|
+
}), e = C([]), r = C(-1), n = C(jr()), o = C(!1), i = C([]), s = N(() => r.value < 0 ? !1 : e.value[r.value]?.reversible ?? !1), a = N(() => r.value < e.value.length - 1), u = N(() => {
|
|
775
773
|
let _ = 0;
|
|
776
774
|
for (let I = r.value; I >= 0 && e.value[I]?.reversible; I--)
|
|
777
775
|
_++;
|
|
778
776
|
return _;
|
|
779
|
-
}), c = N(() => e.value.length - 1 - r.value), l = N(
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
777
|
+
}), c = N(() => e.value.length - 1 - r.value), l = N(
|
|
778
|
+
() => ({
|
|
779
|
+
canUndo: s.value,
|
|
780
|
+
canRedo: a.value,
|
|
781
|
+
undoCount: u.value,
|
|
782
|
+
redoCount: c.value,
|
|
783
|
+
currentIndex: r.value
|
|
784
|
+
})
|
|
785
|
+
);
|
|
786
786
|
function f(_) {
|
|
787
787
|
t.value = { ...t.value, ..._ }, t.value.enablePersistence && (G(), st()), t.value.enableCrossTabSync && S();
|
|
788
788
|
}
|
|
@@ -834,12 +834,12 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
834
834
|
};
|
|
835
835
|
return E.forEach((w) => {
|
|
836
836
|
w.ancestorOperationId = H;
|
|
837
|
-
}), i.value.length > 0 ? i.value[i.value.length - 1].operations.push(p) : (e.value.push(...E, p), r.value = e.value.length - 1), t.value.enableCrossTabSync &&
|
|
837
|
+
}), i.value.length > 0 ? i.value[i.value.length - 1].operations.push(p) : (e.value.push(...E, p), r.value = e.value.length - 1), t.value.enableCrossTabSync && z(E, p), i.value.length === 0 && (o.value = !1), H;
|
|
838
838
|
}
|
|
839
839
|
function m() {
|
|
840
840
|
i.value = [], o.value = !1;
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function A(_) {
|
|
843
843
|
if (!s.value) return !1;
|
|
844
844
|
const I = e.value[r.value];
|
|
845
845
|
if (!I.reversible)
|
|
@@ -938,7 +938,7 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
938
938
|
};
|
|
939
939
|
q.postMessage(Xe(I));
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function z(_, I) {
|
|
942
942
|
if (!q) return;
|
|
943
943
|
const E = {
|
|
944
944
|
type: "operation",
|
|
@@ -1033,7 +1033,7 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
1033
1033
|
startBatch: d,
|
|
1034
1034
|
commitBatch: y,
|
|
1035
1035
|
cancelBatch: m,
|
|
1036
|
-
undo:
|
|
1036
|
+
undo: A,
|
|
1037
1037
|
redo: T,
|
|
1038
1038
|
clear: X,
|
|
1039
1039
|
getOperationsFor: mt,
|
|
@@ -1168,15 +1168,15 @@ let As = class or {
|
|
|
1168
1168
|
h && e.store && (l = this.captureSnapshot(e));
|
|
1169
1169
|
for (const m of i)
|
|
1170
1170
|
try {
|
|
1171
|
-
const
|
|
1172
|
-
if (a.push(
|
|
1171
|
+
const A = await this.executeAction(m, e, r.timeout);
|
|
1172
|
+
if (a.push(A), !A.success) {
|
|
1173
1173
|
u = !0;
|
|
1174
1174
|
break;
|
|
1175
1175
|
}
|
|
1176
|
-
} catch (
|
|
1176
|
+
} catch (A) {
|
|
1177
1177
|
const T = {
|
|
1178
1178
|
success: !1,
|
|
1179
|
-
error:
|
|
1179
|
+
error: A instanceof Error ? A : new Error(String(A)),
|
|
1180
1180
|
executionTime: 0,
|
|
1181
1181
|
action: m
|
|
1182
1182
|
};
|
|
@@ -1194,8 +1194,8 @@ let As = class or {
|
|
|
1194
1194
|
for (const m of y)
|
|
1195
1195
|
try {
|
|
1196
1196
|
m.error && this.options.errorHandler(m.error, e, m.action);
|
|
1197
|
-
} catch (
|
|
1198
|
-
console.error("[FieldTriggers] Error in global error handler:",
|
|
1197
|
+
} catch (A) {
|
|
1198
|
+
console.error("[FieldTriggers] Error in global error handler:", A);
|
|
1199
1199
|
}
|
|
1200
1200
|
return {
|
|
1201
1201
|
path: e.path,
|
|
@@ -1446,7 +1446,7 @@ class fr {
|
|
|
1446
1446
|
constructor(e, r, n = "", o = null) {
|
|
1447
1447
|
return this.target = e, this.ancestorPath = n, this.rootNode = o || this, this.doctype = r, this.hst = Zt.getInstance(), new Proxy(this, {
|
|
1448
1448
|
get(i, s) {
|
|
1449
|
-
if (s in i) return i
|
|
1449
|
+
if (s in i) return Reflect.get(i, s);
|
|
1450
1450
|
const a = String(s);
|
|
1451
1451
|
return i.getNode(a);
|
|
1452
1452
|
},
|
|
@@ -2082,9 +2082,9 @@ function Qn(t, e) {
|
|
|
2082
2082
|
}
|
|
2083
2083
|
function Rs(t) {
|
|
2084
2084
|
t || (t = {});
|
|
2085
|
-
const e = t.registry || je("$registry"), r = je("$stonecrop"), n =
|
|
2085
|
+
const e = t.registry || je("$registry"), r = je("$stonecrop"), n = C(), o = C(), i = C({}), s = C(), a = C(), u = C([]), c = C(!1), l = C(null), f = C(), h = N(() => !n.value || !f.value || !t.recordId || t.recordId === "new" ? !0 : n.value.isWorkflowReady(f.value, t.recordId).ready), d = N(() => !n.value || !f.value || !t.recordId || t.recordId === "new" ? [] : n.value.isWorkflowReady(f.value, t.recordId).blockedLinks ?? []), y = r || Ae._root;
|
|
2086
2086
|
y && (n.value = y), t?.doctype && typeof t.doctype != "string" && (f.value = t.doctype);
|
|
2087
|
-
const m =
|
|
2087
|
+
const m = C([]), A = C(-1), T = N(() => n.value?.getOperationLogStore().canUndo ?? !1), rt = N(() => n.value?.getOperationLogStore().canRedo ?? !1), lt = N(() => n.value?.getOperationLogStore().undoCount ?? 0), Ot = N(() => n.value?.getOperationLogStore().redoCount ?? 0), X = N(
|
|
2088
2088
|
() => n.value?.getOperationLogStore().undoRedoState ?? {
|
|
2089
2089
|
canUndo: !1,
|
|
2090
2090
|
canRedo: !1,
|
|
@@ -2098,7 +2098,7 @@ function Rs(t) {
|
|
|
2098
2098
|
n.value?.getOperationLogStore().cancelBatch();
|
|
2099
2099
|
}, b = () => {
|
|
2100
2100
|
n.value?.getOperationLogStore().clear();
|
|
2101
|
-
},
|
|
2101
|
+
}, z = (p, w) => n.value?.getOperationLogStore().getOperationsFor(p, w) ?? [], J = () => n.value?.getOperationLogStore().getSnapshot() ?? {
|
|
2102
2102
|
operations: [],
|
|
2103
2103
|
currentIndex: -1,
|
|
2104
2104
|
totalOperations: 0,
|
|
@@ -2106,13 +2106,13 @@ function Rs(t) {
|
|
|
2106
2106
|
irreversibleOperations: 0
|
|
2107
2107
|
}, k = (p, w) => {
|
|
2108
2108
|
n.value?.getOperationLogStore().markIrreversible(p, w);
|
|
2109
|
-
}, P = (p, w, g,
|
|
2109
|
+
}, P = (p, w, g, D = "success", R) => n.value?.getOperationLogStore().logAction(p, w, g, D, R) ?? "", G = (p) => {
|
|
2110
2110
|
n.value?.getOperationLogStore().configure(p);
|
|
2111
2111
|
};
|
|
2112
2112
|
if (e && n.value)
|
|
2113
2113
|
try {
|
|
2114
2114
|
const p = n.value.getOperationLogStore(), w = ss(p);
|
|
2115
|
-
m.value = w.operations.value,
|
|
2115
|
+
m.value = w.operations.value, A.value = w.currentIndex.value, ot(
|
|
2116
2116
|
() => w.operations.value,
|
|
2117
2117
|
(g) => {
|
|
2118
2118
|
m.value = g;
|
|
@@ -2120,7 +2120,7 @@ function Rs(t) {
|
|
|
2120
2120
|
), ot(
|
|
2121
2121
|
() => w.currentIndex.value,
|
|
2122
2122
|
(g) => {
|
|
2123
|
-
|
|
2123
|
+
A.value = g;
|
|
2124
2124
|
}
|
|
2125
2125
|
);
|
|
2126
2126
|
} catch {
|
|
@@ -2130,28 +2130,28 @@ function Rs(t) {
|
|
|
2130
2130
|
if (!t.doctype && e.router) {
|
|
2131
2131
|
const p = e.router.currentRoute.value;
|
|
2132
2132
|
if (!p.path) return;
|
|
2133
|
-
const w = p.path.split("/").filter((
|
|
2133
|
+
const w = p.path.split("/").filter((D) => D.length > 0), g = w[1]?.toLowerCase();
|
|
2134
2134
|
if (w.length > 0) {
|
|
2135
|
-
const
|
|
2135
|
+
const D = {
|
|
2136
2136
|
path: p.path,
|
|
2137
2137
|
segments: w
|
|
2138
|
-
},
|
|
2139
|
-
if (
|
|
2140
|
-
if (e.addDoctype(
|
|
2141
|
-
const Z = n.value.getRecordById(
|
|
2138
|
+
}, R = await e.getMeta?.(D);
|
|
2139
|
+
if (R) {
|
|
2140
|
+
if (e.addDoctype(R), n.value.setup(R), s.value = R, a.value = g, o.value = n.value.getStore(), e && (u.value = e.resolveSchema(R)), g && g !== "new") {
|
|
2141
|
+
const Z = n.value.getRecordById(R, g);
|
|
2142
2142
|
if (Z)
|
|
2143
2143
|
i.value = Z.get("") || {};
|
|
2144
2144
|
else
|
|
2145
2145
|
try {
|
|
2146
|
-
await n.value.getRecord(
|
|
2147
|
-
const Y = n.value.getRecordById(
|
|
2146
|
+
await n.value.getRecord(R, g);
|
|
2147
|
+
const Y = n.value.getRecordById(R, g);
|
|
2148
2148
|
Y && (i.value = Y.get("") || {});
|
|
2149
2149
|
} catch {
|
|
2150
2150
|
i.value = e.initializeRecord(u.value);
|
|
2151
2151
|
}
|
|
2152
2152
|
} else
|
|
2153
2153
|
i.value = e.initializeRecord(u.value);
|
|
2154
|
-
o.value && xr(
|
|
2154
|
+
o.value && xr(R, g || "new", i, o.value), n.value.runAction(R, "load", g ? [g] : void 0);
|
|
2155
2155
|
}
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
@@ -2163,28 +2163,28 @@ function Rs(t) {
|
|
|
2163
2163
|
let g;
|
|
2164
2164
|
try {
|
|
2165
2165
|
if (g = e.getDoctype(w), !g && e.getMeta) {
|
|
2166
|
-
const
|
|
2166
|
+
const D = {
|
|
2167
2167
|
path: `/${w}`,
|
|
2168
2168
|
segments: [w]
|
|
2169
2169
|
};
|
|
2170
|
-
g = await e.getMeta(
|
|
2170
|
+
g = await e.getMeta(D), g && e.addDoctype(g);
|
|
2171
2171
|
}
|
|
2172
2172
|
g || (l.value = new Error(`Doctype '${w}' not found in registry and getMeta returned no result`));
|
|
2173
|
-
} catch (
|
|
2174
|
-
l.value =
|
|
2173
|
+
} catch (D) {
|
|
2174
|
+
l.value = D instanceof Error ? D : new Error(String(D));
|
|
2175
2175
|
} finally {
|
|
2176
2176
|
c.value = !1;
|
|
2177
2177
|
}
|
|
2178
2178
|
if (f.value = g, !g) return;
|
|
2179
2179
|
if (u.value = e.resolveSchema(g), p && p !== "new") {
|
|
2180
|
-
const
|
|
2181
|
-
if (
|
|
2182
|
-
i.value =
|
|
2180
|
+
const D = n.value.getRecordById(g, p);
|
|
2181
|
+
if (D)
|
|
2182
|
+
i.value = D.get("") || {};
|
|
2183
2183
|
else
|
|
2184
2184
|
try {
|
|
2185
2185
|
await n.value.getRecord(g, p);
|
|
2186
|
-
const
|
|
2187
|
-
|
|
2186
|
+
const R = n.value.getRecordById(g, p);
|
|
2187
|
+
R && (i.value = R.get("") || {});
|
|
2188
2188
|
} catch {
|
|
2189
2189
|
i.value = e.initializeRecord(u.value);
|
|
2190
2190
|
}
|
|
@@ -2198,8 +2198,8 @@ function Rs(t) {
|
|
|
2198
2198
|
else
|
|
2199
2199
|
try {
|
|
2200
2200
|
await n.value.getRecord(w, p);
|
|
2201
|
-
const
|
|
2202
|
-
|
|
2201
|
+
const D = n.value.getRecordById(w, p);
|
|
2202
|
+
D && (i.value = D.get("") || {});
|
|
2203
2203
|
} catch {
|
|
2204
2204
|
i.value = e.initializeRecord(u.value);
|
|
2205
2205
|
}
|
|
@@ -2210,8 +2210,8 @@ function Rs(t) {
|
|
|
2210
2210
|
const xt = (p, w) => {
|
|
2211
2211
|
const g = f.value || s.value;
|
|
2212
2212
|
if (!g) return "";
|
|
2213
|
-
const
|
|
2214
|
-
return `${g.slug}.${
|
|
2213
|
+
const D = w || t.recordId || a.value || "new";
|
|
2214
|
+
return `${g.slug}.${D}.${p}`;
|
|
2215
2215
|
}, st = (p) => {
|
|
2216
2216
|
const w = f.value || s.value;
|
|
2217
2217
|
if (!(!o.value || !n.value || !w))
|
|
@@ -2230,8 +2230,8 @@ function Rs(t) {
|
|
|
2230
2230
|
}
|
|
2231
2231
|
}
|
|
2232
2232
|
o.value.set(p.path, p.value);
|
|
2233
|
-
const
|
|
2234
|
-
|
|
2233
|
+
const D = p.fieldname.split("."), R = { ...i.value };
|
|
2234
|
+
D.length === 1 ? R[D[0]] = p.value : Cs(R, D, p.value), i.value = R;
|
|
2235
2235
|
} catch {
|
|
2236
2236
|
}
|
|
2237
2237
|
};
|
|
@@ -2240,10 +2240,10 @@ function Rs(t) {
|
|
|
2240
2240
|
if (!n.value)
|
|
2241
2241
|
throw new Error("Stonecrop instance not available");
|
|
2242
2242
|
return n.value.initializeNestedData(p, w);
|
|
2243
|
-
}, I = async (p, w, g,
|
|
2243
|
+
}, I = async (p, w, g, D) => {
|
|
2244
2244
|
if (!n.value)
|
|
2245
2245
|
throw new Error("Stonecrop instance not available");
|
|
2246
|
-
return n.value.fetchNestedData(p, w, g,
|
|
2246
|
+
return n.value.fetchNestedData(p, w, g, D);
|
|
2247
2247
|
}, E = (p, w) => {
|
|
2248
2248
|
if (!n.value)
|
|
2249
2249
|
throw new Error("Stonecrop instance not available");
|
|
@@ -2251,15 +2251,15 @@ function Rs(t) {
|
|
|
2251
2251
|
}, H = (p, w) => ({
|
|
2252
2252
|
provideHSTPath: (g) => `${p}.${g}`,
|
|
2253
2253
|
handleHSTChange: (g) => {
|
|
2254
|
-
const
|
|
2254
|
+
const D = g.path.startsWith(p) ? g.path : `${p}.${g.fieldname}`;
|
|
2255
2255
|
st({
|
|
2256
2256
|
...g,
|
|
2257
|
-
path:
|
|
2257
|
+
path: D
|
|
2258
2258
|
});
|
|
2259
2259
|
}
|
|
2260
2260
|
}), v = {
|
|
2261
2261
|
operations: m,
|
|
2262
|
-
currentIndex:
|
|
2262
|
+
currentIndex: A,
|
|
2263
2263
|
undoRedoState: X,
|
|
2264
2264
|
canUndo: T,
|
|
2265
2265
|
canRedo: rt,
|
|
@@ -2271,7 +2271,7 @@ function Rs(t) {
|
|
|
2271
2271
|
commitBatch: q,
|
|
2272
2272
|
cancelBatch: S,
|
|
2273
2273
|
clear: b,
|
|
2274
|
-
getOperationsFor:
|
|
2274
|
+
getOperationsFor: z,
|
|
2275
2275
|
getSnapshot: J,
|
|
2276
2276
|
markIrreversible: k,
|
|
2277
2277
|
logAction: P,
|
|
@@ -3115,9 +3115,9 @@ function mn(t, e, r, n) {
|
|
|
3115
3115
|
if (f)
|
|
3116
3116
|
return this.cacheResult().__iterate(l, f);
|
|
3117
3117
|
var d = 0, y = !0, m = 0;
|
|
3118
|
-
return t.__iterate(function(
|
|
3118
|
+
return t.__iterate(function(A, T) {
|
|
3119
3119
|
if (!(y && (y = d++ < i)))
|
|
3120
|
-
return m++, l(
|
|
3120
|
+
return m++, l(A, n ? T : m - 1, h) !== !1 && m !== u;
|
|
3121
3121
|
}), m;
|
|
3122
3122
|
}, c.__iteratorUncached = function(l, f) {
|
|
3123
3123
|
if (u !== 0 && f)
|
|
@@ -3710,8 +3710,8 @@ ce.prototype.update = function(t, e, r, n, o, i, s) {
|
|
|
3710
3710
|
return h[f ^ 1];
|
|
3711
3711
|
if (l && y && h.length === 1 && co(y))
|
|
3712
3712
|
return y;
|
|
3713
|
-
var m = t && t === this.ownerID,
|
|
3714
|
-
return m ? (this.bitmap =
|
|
3713
|
+
var m = t && t === this.ownerID, A = l ? y ? c : c ^ u : c | u, T = l ? y ? ci(h, f, y, m) : ca(h, f, m) : ua(h, f, y, m);
|
|
3714
|
+
return m ? (this.bitmap = A, this.nodes = T, this) : new ce(t, A, T);
|
|
3715
3715
|
};
|
|
3716
3716
|
var $e = function(t, e, r) {
|
|
3717
3717
|
this.ownerID = t, this.count = e, this.nodes = r;
|
|
@@ -4229,9 +4229,9 @@ function lo(t, e) {
|
|
|
4229
4229
|
return m > dt && (m = dt), function() {
|
|
4230
4230
|
for (; ; ) {
|
|
4231
4231
|
if (h) {
|
|
4232
|
-
var
|
|
4233
|
-
if (
|
|
4234
|
-
return
|
|
4232
|
+
var A = h();
|
|
4233
|
+
if (A !== Re)
|
|
4234
|
+
return A;
|
|
4235
4235
|
h = null;
|
|
4236
4236
|
}
|
|
4237
4237
|
if (y === m)
|
|
@@ -4322,8 +4322,8 @@ function Tt(t, e, r) {
|
|
|
4322
4322
|
var d = t._tail, y = h < f ? vi(t, a - 1) : h > f ? new Pt([], n) : d;
|
|
4323
4323
|
if (d && h > f && s < i && d.array.length) {
|
|
4324
4324
|
c = fe(c, n);
|
|
4325
|
-
for (var m = c,
|
|
4326
|
-
var T = f >>>
|
|
4325
|
+
for (var m = c, A = u; A > L; A -= L) {
|
|
4326
|
+
var T = f >>> A & at;
|
|
4327
4327
|
m = m.array[T] = fe(m.array[T], n);
|
|
4328
4328
|
}
|
|
4329
4329
|
m.array[f >>> L & at] = d;
|
|
@@ -5513,7 +5513,7 @@ function za(...t) {
|
|
|
5513
5513
|
return typeof e == "function" ? gr(ln(() => ({
|
|
5514
5514
|
get: e,
|
|
5515
5515
|
set: Aa
|
|
5516
|
-
}))) :
|
|
5516
|
+
}))) : C(e);
|
|
5517
5517
|
}
|
|
5518
5518
|
function Lr(t) {
|
|
5519
5519
|
return typeof Window < "u" && t instanceof Window ? t.document.documentElement : typeof Document < "u" && t instanceof Document ? t.documentElement : t;
|
|
@@ -5575,7 +5575,7 @@ function $a(...t) {
|
|
|
5575
5575
|
return typeof e == "function" ? gr(ln(() => ({
|
|
5576
5576
|
get: e,
|
|
5577
5577
|
set: xa
|
|
5578
|
-
}))) :
|
|
5578
|
+
}))) : C(e);
|
|
5579
5579
|
}
|
|
5580
5580
|
function Fr(t) {
|
|
5581
5581
|
return typeof Window < "u" && t instanceof Window ? t.document.documentElement : typeof Document < "u" && t instanceof Document ? t.documentElement : t;
|
|
@@ -5637,7 +5637,7 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5637
5637
|
}),
|
|
5638
5638
|
emits: /* @__PURE__ */ Un(["update:schema", "update:data"], ["update:data"]),
|
|
5639
5639
|
setup(t, { emit: e }) {
|
|
5640
|
-
const r = e, n = Ni(t, "data"), o =
|
|
5640
|
+
const r = e, n = Ni(t, "data"), o = C({});
|
|
5641
5641
|
ot(
|
|
5642
5642
|
() => n.value,
|
|
5643
5643
|
(f) => {
|
|
@@ -5662,7 +5662,7 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5662
5662
|
function u(f) {
|
|
5663
5663
|
return f.mode || a.value;
|
|
5664
5664
|
}
|
|
5665
|
-
const c =
|
|
5665
|
+
const c = C([]);
|
|
5666
5666
|
ji(() => {
|
|
5667
5667
|
t.schema && c.value.length !== t.schema.length && (c.value = t.schema.map((f, h) => N({
|
|
5668
5668
|
get() {
|
|
@@ -5698,13 +5698,13 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5698
5698
|
], 64))), 128))
|
|
5699
5699
|
]));
|
|
5700
5700
|
}
|
|
5701
|
-
}), Ua = /* @__PURE__ */ Na(La, [["__scopeId", "data-v-
|
|
5701
|
+
}), Ua = /* @__PURE__ */ Na(La, [["__scopeId", "data-v-8d4cd672"]]), Fa = { class: "tabs" }, Wa = { tabindex: "0" }, Ba = { tabindex: "0" }, Ka = /* @__PURE__ */ Ve({
|
|
5702
5702
|
__name: "SheetNav",
|
|
5703
5703
|
props: {
|
|
5704
5704
|
breadcrumbs: { default: () => [] }
|
|
5705
5705
|
},
|
|
5706
5706
|
setup(t) {
|
|
5707
|
-
const e =
|
|
5707
|
+
const e = C(!0), r = C(!1), n = C(""), o = So("searchinput"), i = N(() => e.value ? "unrotated" : "rotated"), s = () => {
|
|
5708
5708
|
e.value = !e.value;
|
|
5709
5709
|
}, a = async () => {
|
|
5710
5710
|
r.value = !r.value, await oe(() => {
|
|
@@ -5835,7 +5835,7 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5835
5835
|
},
|
|
5836
5836
|
emits: ["action", "navigate", "record:open", "load-records", "load-record"],
|
|
5837
5837
|
setup(t, { emit: e }) {
|
|
5838
|
-
const r = t, n = e, { availableDoctypes: o = [] } = r, { stonecrop: i } = Rs(), s =
|
|
5838
|
+
const r = t, n = e, { availableDoctypes: o = [] } = r, { stonecrop: i } = Rs(), s = C(!1), a = C(!1), u = N({
|
|
5839
5839
|
get() {
|
|
5840
5840
|
if (!i.value || !f.value || !d.value)
|
|
5841
5841
|
return {};
|
|
@@ -5850,8 +5850,8 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5850
5850
|
try {
|
|
5851
5851
|
const p = i.value.getStore();
|
|
5852
5852
|
for (const [w, g] of Object.entries(v)) {
|
|
5853
|
-
const
|
|
5854
|
-
(p.has(
|
|
5853
|
+
const D = `${f.value}.${d.value}.${w}`;
|
|
5854
|
+
(p.has(D) ? p.get(D) : void 0) !== g && p.set(D, g);
|
|
5855
5855
|
}
|
|
5856
5856
|
} catch (p) {
|
|
5857
5857
|
console.warn("HST update failed:", p);
|
|
@@ -5895,18 +5895,18 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5895
5895
|
}
|
|
5896
5896
|
const v = c.value.params.pathMatch;
|
|
5897
5897
|
return v && v.length > 0 ? v.length === 1 ? "records" : "record" : "doctypes";
|
|
5898
|
-
}),
|
|
5898
|
+
}), A = () => {
|
|
5899
5899
|
if (!i.value || !f.value || !d.value)
|
|
5900
5900
|
return [];
|
|
5901
5901
|
try {
|
|
5902
5902
|
const v = i.value.registry.getDoctype(f.value);
|
|
5903
5903
|
if (!v?.workflow) return [];
|
|
5904
5904
|
const p = i.value.getRecordState(f.value, d.value), w = v.getAvailableTransitions(p), g = u.value || {};
|
|
5905
|
-
return w.map(({ name:
|
|
5906
|
-
label: `${
|
|
5905
|
+
return w.map(({ name: D, targetState: R }) => ({
|
|
5906
|
+
label: `${D} (→ ${R})`,
|
|
5907
5907
|
action: () => {
|
|
5908
5908
|
n("action", {
|
|
5909
|
-
name:
|
|
5909
|
+
name: D,
|
|
5910
5910
|
doctype: f.value,
|
|
5911
5911
|
recordId: d.value,
|
|
5912
5912
|
data: g
|
|
@@ -5929,7 +5929,7 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5929
5929
|
});
|
|
5930
5930
|
break;
|
|
5931
5931
|
case "record": {
|
|
5932
|
-
const p =
|
|
5932
|
+
const p = A();
|
|
5933
5933
|
p.length > 0 && v.push({
|
|
5934
5934
|
type: "dropdown",
|
|
5935
5935
|
label: "Actions",
|
|
@@ -6059,13 +6059,13 @@ const Pa = { class: "aform" }, qa = {
|
|
|
6059
6059
|
rows: v
|
|
6060
6060
|
}
|
|
6061
6061
|
];
|
|
6062
|
-
},
|
|
6062
|
+
}, z = () => {
|
|
6063
6063
|
if (!f.value) return [];
|
|
6064
6064
|
if (!i.value) return [];
|
|
6065
6065
|
const v = k(), p = P(), w = r.recordIdField || "id";
|
|
6066
6066
|
if (p.length === 0)
|
|
6067
6067
|
return [];
|
|
6068
|
-
const g = p.find((Y) => Y.fieldname === w),
|
|
6068
|
+
const g = p.find((Y) => Y.fieldname === w), D = p.filter((Y) => Y.fieldname !== w), R = g ? [g, ...D] : p, Z = v.map((Y) => ({
|
|
6069
6069
|
...Y,
|
|
6070
6070
|
// Use the canonical ID field for navigation
|
|
6071
6071
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
@@ -6077,7 +6077,7 @@ const Pa = { class: "aform" }, qa = {
|
|
|
6077
6077
|
fieldname: "records_table",
|
|
6078
6078
|
component: "ATable",
|
|
6079
6079
|
columns: [
|
|
6080
|
-
...
|
|
6080
|
+
...R.map((Y) => ({
|
|
6081
6081
|
label: Y.label,
|
|
6082
6082
|
name: Y.fieldname,
|
|
6083
6083
|
fieldtype: Y.fieldtype,
|
|
@@ -6133,7 +6133,7 @@ const Pa = { class: "aform" }, qa = {
|
|
|
6133
6133
|
case "doctypes":
|
|
6134
6134
|
return b();
|
|
6135
6135
|
case "records":
|
|
6136
|
-
return
|
|
6136
|
+
return z();
|
|
6137
6137
|
case "record":
|
|
6138
6138
|
return J();
|
|
6139
6139
|
default:
|
|
@@ -6157,27 +6157,27 @@ const Pa = { class: "aform" }, qa = {
|
|
|
6157
6157
|
if (w === null) return null;
|
|
6158
6158
|
const g = parseInt(w, 10);
|
|
6159
6159
|
if (isNaN(g)) return null;
|
|
6160
|
-
const
|
|
6161
|
-
if (!
|
|
6160
|
+
const R = k()[g];
|
|
6161
|
+
if (!R) return null;
|
|
6162
6162
|
const Z = r.recordIdField || "id";
|
|
6163
|
-
return
|
|
6163
|
+
return R[Z] || R.id || null;
|
|
6164
6164
|
}, I = async (v) => {
|
|
6165
6165
|
const p = v.target;
|
|
6166
6166
|
p.getAttribute("data-action") === "create" && await S();
|
|
6167
6167
|
const g = p.closest("td, th");
|
|
6168
6168
|
if (g) {
|
|
6169
|
-
const
|
|
6170
|
-
if (
|
|
6171
|
-
const Z =
|
|
6169
|
+
const D = g.textContent?.trim(), R = g.closest("tr");
|
|
6170
|
+
if (D === "View Records" && R) {
|
|
6171
|
+
const Z = R.querySelectorAll("td");
|
|
6172
6172
|
if (Z.length > 0) {
|
|
6173
6173
|
const Je = Z[1].textContent?.trim();
|
|
6174
6174
|
Je && await jt(Je);
|
|
6175
6175
|
}
|
|
6176
|
-
} else if (
|
|
6177
|
-
const Z = _(
|
|
6176
|
+
} else if (D?.includes("Edit") && R) {
|
|
6177
|
+
const Z = _(R);
|
|
6178
6178
|
Z && await q(Z);
|
|
6179
|
-
} else if (
|
|
6180
|
-
const Z = _(
|
|
6179
|
+
} else if (D?.includes("Delete") && R) {
|
|
6180
|
+
const Z = _(R);
|
|
6181
6181
|
Z && await st(Z);
|
|
6182
6182
|
}
|
|
6183
6183
|
}
|