@stonecrop/desktop 0.8.1 → 0.8.2
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 +175 -175
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.umd.cjs +3 -3
- package/dist/desktop.umd.cjs.map +1 -1
- package/package.json +5 -5
package/dist/desktop.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as Se, ref as C, onMounted as xe, createElementBlock as
|
|
2
|
-
const jt = { class: "action-menu-icon" },
|
|
1
|
+
import { defineComponent as Se, ref as C, onMounted as xe, createElementBlock as F, openBlock as j, normalizeClass as Ne, createElementVNode as T, Fragment as ue, renderList as be, createCommentVNode as ce, toDisplayString as ee, withDirectives as Re, vShow as ze, useTemplateRef as vt, computed as I, watch as H, nextTick as re, createBlock as Qe, Teleport as At, createVNode as ae, Transition as It, withCtx as we, withModifiers as ft, vModelText as ht, renderSlot as Me, createTextVNode as Ce, inject as Je, provide as Ge, reactive as gt, toRaw as mt, isRef as de, isReactive as Pe, toRef as ne, hasInjectionContext as Tt, getCurrentInstance as yt, markRaw as fe, effectScope as xt, getCurrentScope as Xe, onScopeDispose as Ye, toRefs as ot, shallowRef as $e, toValue as X, readonly as Ve, customRef as et, unref as De, mergeModels as at, useModel as Pt, watchEffect as Ee, resolveComponent as bt, resolveDynamicComponent as Vt, mergeProps as Mt, withKeys as ve, normalizeStyle as je } from "vue";
|
|
2
|
+
const jt = { class: "action-menu-icon" }, Ft = ["disabled", "onClick"], Lt = { key: 1 }, Bt = ["onClick"], Ht = { class: "dropdown-container" }, Ut = { class: "dropdown" }, Wt = ["onClick"], Kt = ["href"], zt = { class: "dropdown-item" }, Jt = /* @__PURE__ */ Se({
|
|
3
3
|
__name: "ActionSet",
|
|
4
4
|
props: {
|
|
5
5
|
elements: { default: () => [] }
|
|
@@ -18,21 +18,21 @@ const jt = { class: "action-menu-icon" }, Lt = ["disabled", "onClick"], Ft = { k
|
|
|
18
18
|
}, 500);
|
|
19
19
|
}, p = () => {
|
|
20
20
|
r.value = !1, c.value = !1, clearTimeout(i.value), n.value = !1;
|
|
21
|
-
}, h = (
|
|
22
|
-
const k = !a.value[
|
|
23
|
-
s(), k && (a.value[
|
|
24
|
-
}, b = (
|
|
25
|
-
o("actionClick", k,
|
|
21
|
+
}, h = (O) => {
|
|
22
|
+
const k = !a.value[O];
|
|
23
|
+
s(), k && (a.value[O] = !0);
|
|
24
|
+
}, b = (O, k) => {
|
|
25
|
+
o("actionClick", k, O);
|
|
26
26
|
};
|
|
27
|
-
return (
|
|
28
|
-
class:
|
|
27
|
+
return (O, k) => (j(), F("div", {
|
|
28
|
+
class: Ne([{ "open-set": n.value, "hovered-and-closed": c.value }, "action-set collapse"]),
|
|
29
29
|
onMouseover: u,
|
|
30
30
|
onMouseleave: p
|
|
31
31
|
}, [
|
|
32
32
|
T("div", jt, [
|
|
33
33
|
T("div", {
|
|
34
34
|
id: "chevron",
|
|
35
|
-
onClick: k[0] || (k[0] = (
|
|
35
|
+
onClick: k[0] || (k[0] = (N) => c.value = !c.value)
|
|
36
36
|
}, [...k[1] || (k[1] = [
|
|
37
37
|
T("svg", {
|
|
38
38
|
id: "Layer_1",
|
|
@@ -67,31 +67,31 @@ const jt = { class: "action-menu-icon" }, Lt = ["disabled", "onClick"], Ft = { k
|
|
|
67
67
|
])])
|
|
68
68
|
]),
|
|
69
69
|
k[2] || (k[2] = T("div", { style: { "margin-right": "30px" } }, null, -1)),
|
|
70
|
-
(j(!0),
|
|
71
|
-
key:
|
|
70
|
+
(j(!0), F(ue, null, be(t.elements, (N, V) => (j(), F("div", {
|
|
71
|
+
key: N.label,
|
|
72
72
|
class: "action-element"
|
|
73
73
|
}, [
|
|
74
|
-
|
|
74
|
+
N.type == "button" ? (j(), F("button", {
|
|
75
75
|
key: 0,
|
|
76
|
-
disabled:
|
|
76
|
+
disabled: N.disabled,
|
|
77
77
|
class: "button-default",
|
|
78
|
-
onClick: (M) => b(
|
|
79
|
-
}, ee(
|
|
80
|
-
|
|
78
|
+
onClick: (M) => b(N.action, N.label)
|
|
79
|
+
}, ee(N.label), 9, Ft)) : ce("", !0),
|
|
80
|
+
N.type == "dropdown" ? (j(), F("div", Lt, [
|
|
81
81
|
T("button", {
|
|
82
82
|
class: "button-default",
|
|
83
83
|
onClick: (M) => h(V)
|
|
84
|
-
}, ee(
|
|
84
|
+
}, ee(N.label), 9, Bt),
|
|
85
85
|
Re(T("div", Ht, [
|
|
86
86
|
T("div", Ut, [
|
|
87
|
-
(j(!0),
|
|
87
|
+
(j(!0), F(ue, null, be(N.actions, (M, x) => (j(), F("div", {
|
|
88
88
|
key: M.label
|
|
89
89
|
}, [
|
|
90
|
-
M.action != null ? (j(),
|
|
90
|
+
M.action != null ? (j(), F("button", {
|
|
91
91
|
key: 0,
|
|
92
92
|
class: "dropdown-item",
|
|
93
93
|
onClick: (W) => b(M.action, M.label)
|
|
94
|
-
}, ee(M.label), 9, Wt)) : M.link != null ? (j(),
|
|
94
|
+
}, ee(M.label), 9, Wt)) : M.link != null ? (j(), F("a", {
|
|
95
95
|
key: 1,
|
|
96
96
|
href: M.link
|
|
97
97
|
}, [
|
|
@@ -159,7 +159,7 @@ const jt = { class: "action-menu-icon" }, Lt = ["disabled", "onClick"], Ft = { k
|
|
|
159
159
|
return (p, h) => (j(), Qe(At, { to: "body" }, [
|
|
160
160
|
ae(It, { name: "fade" }, {
|
|
161
161
|
default: we(() => [
|
|
162
|
-
t.isOpen ? (j(),
|
|
162
|
+
t.isOpen ? (j(), F("div", {
|
|
163
163
|
key: 0,
|
|
164
164
|
class: "command-palette-overlay",
|
|
165
165
|
onClick: c
|
|
@@ -182,12 +182,12 @@ const jt = { class: "action-menu-icon" }, Lt = ["disabled", "onClick"], Ft = { k
|
|
|
182
182
|
[ht, a.value]
|
|
183
183
|
])
|
|
184
184
|
]),
|
|
185
|
-
r.value.length ? (j(),
|
|
186
|
-
(j(!0),
|
|
187
|
-
key:
|
|
188
|
-
class:
|
|
185
|
+
r.value.length ? (j(), F("div", Zt, [
|
|
186
|
+
(j(!0), F(ue, null, be(r.value, (b, O) => (j(), F("div", {
|
|
187
|
+
key: O,
|
|
188
|
+
class: Ne(["command-palette-result", { selected: O === n.value }]),
|
|
189
189
|
onClick: (k) => u(b),
|
|
190
|
-
onMouseover: (k) => n.value =
|
|
190
|
+
onMouseover: (k) => n.value = O
|
|
191
191
|
}, [
|
|
192
192
|
T("div", Xt, [
|
|
193
193
|
Me(p.$slots, "title", { result: b })
|
|
@@ -196,7 +196,7 @@ const jt = { class: "action-menu-icon" }, Lt = ["disabled", "onClick"], Ft = { k
|
|
|
196
196
|
Me(p.$slots, "content", { result: b })
|
|
197
197
|
])
|
|
198
198
|
], 42, Qt))), 128))
|
|
199
|
-
])) : a.value && !r.value.length ? (j(),
|
|
199
|
+
])) : a.value && !r.value.length ? (j(), F("div", eo, [
|
|
200
200
|
Me(p.$slots, "empty", {}, () => [
|
|
201
201
|
Ce(' No results found for "' + ee(a.value) + '" ', 1)
|
|
202
202
|
])
|
|
@@ -247,7 +247,7 @@ function ie(t, ...e) {
|
|
|
247
247
|
o(...e);
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
|
-
const oo = (t) => t(), rt = /* @__PURE__ */ Symbol(),
|
|
250
|
+
const oo = (t) => t(), rt = /* @__PURE__ */ Symbol(), Fe = /* @__PURE__ */ Symbol();
|
|
251
251
|
function qe(t, e) {
|
|
252
252
|
t instanceof Map && e instanceof Map ? e.forEach((o, a) => t.set(a, o)) : t instanceof Set && e instanceof Set && e.forEach(t.add, t);
|
|
253
253
|
for (const o in e) {
|
|
@@ -280,8 +280,8 @@ function it(t, e, o, a) {
|
|
|
280
280
|
) : ot(o.state.value[t]);
|
|
281
281
|
return Q(p, i, Object.keys(r || {}).reduce((h, b) => (process.env.NODE_ENV !== "production" && b in p && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${b}" in store "${t}".`), h[b] = fe(I(() => {
|
|
282
282
|
Ae(o);
|
|
283
|
-
const
|
|
284
|
-
return r[b].call(
|
|
283
|
+
const O = o._s.get(t);
|
|
284
|
+
return r[b].call(O, O);
|
|
285
285
|
})), h), {}));
|
|
286
286
|
}
|
|
287
287
|
return s = Ze(t, u, e, o, a, !0), s;
|
|
@@ -293,24 +293,24 @@ function Ze(t, e, o = {}, a, n, i) {
|
|
|
293
293
|
throw new Error("Pinia destroyed");
|
|
294
294
|
const s = { deep: !0 };
|
|
295
295
|
process.env.NODE_ENV !== "production" && (s.onTrigger = (m) => {
|
|
296
|
-
u ?
|
|
296
|
+
u ? O = m : u == !1 && !E._hotUpdating && (Array.isArray(O) ? O.push(m) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
297
297
|
});
|
|
298
|
-
let u, p, h = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set(),
|
|
298
|
+
let u, p, h = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set(), O;
|
|
299
299
|
const k = a.state.value[t];
|
|
300
300
|
!i && !k && (process.env.NODE_ENV === "production" || !n) && (a.state.value[t] = {});
|
|
301
|
-
const
|
|
301
|
+
const N = C({});
|
|
302
302
|
let V;
|
|
303
303
|
function M(m) {
|
|
304
304
|
let g;
|
|
305
|
-
u = p = !1, process.env.NODE_ENV !== "production" && (
|
|
305
|
+
u = p = !1, process.env.NODE_ENV !== "production" && (O = []), typeof m == "function" ? (m(a.state.value[t]), g = {
|
|
306
306
|
type: me.patchFunction,
|
|
307
307
|
storeId: t,
|
|
308
|
-
events:
|
|
308
|
+
events: O
|
|
309
309
|
}) : (qe(a.state.value[t], m), g = {
|
|
310
310
|
type: me.patchObject,
|
|
311
311
|
payload: m,
|
|
312
312
|
storeId: t,
|
|
313
|
-
events:
|
|
313
|
+
events: O
|
|
314
314
|
});
|
|
315
315
|
const A = V = /* @__PURE__ */ Symbol();
|
|
316
316
|
re().then(() => {
|
|
@@ -333,37 +333,37 @@ function Ze(t, e, o = {}, a, n, i) {
|
|
|
333
333
|
}
|
|
334
334
|
const Z = (m, g = "") => {
|
|
335
335
|
if (rt in m)
|
|
336
|
-
return m[
|
|
336
|
+
return m[Fe] = g, m;
|
|
337
337
|
const A = function() {
|
|
338
338
|
Ae(a);
|
|
339
|
-
const
|
|
339
|
+
const L = Array.from(arguments), G = /* @__PURE__ */ new Set(), D = /* @__PURE__ */ new Set();
|
|
340
340
|
function P($) {
|
|
341
341
|
G.add($);
|
|
342
342
|
}
|
|
343
343
|
function B($) {
|
|
344
|
-
|
|
344
|
+
D.add($);
|
|
345
345
|
}
|
|
346
346
|
ie(b, {
|
|
347
|
-
args:
|
|
348
|
-
name: A[
|
|
347
|
+
args: L,
|
|
348
|
+
name: A[Fe],
|
|
349
349
|
store: E,
|
|
350
350
|
after: P,
|
|
351
351
|
onError: B
|
|
352
352
|
});
|
|
353
353
|
let w;
|
|
354
354
|
try {
|
|
355
|
-
w = m.apply(this && this.$id === t ? this : E,
|
|
355
|
+
w = m.apply(this && this.$id === t ? this : E, L);
|
|
356
356
|
} catch ($) {
|
|
357
|
-
throw ie(
|
|
357
|
+
throw ie(D, $), $;
|
|
358
358
|
}
|
|
359
|
-
return w instanceof Promise ? w.then(($) => (ie(G, $), $)).catch(($) => (ie(
|
|
359
|
+
return w instanceof Promise ? w.then(($) => (ie(G, $), $)).catch(($) => (ie(D, $), Promise.reject($))) : (ie(G, w), w);
|
|
360
360
|
};
|
|
361
|
-
return A[rt] = !0, A[
|
|
361
|
+
return A[rt] = !0, A[Fe] = g, A;
|
|
362
362
|
}, J = /* @__PURE__ */ fe({
|
|
363
363
|
actions: {},
|
|
364
364
|
getters: {},
|
|
365
365
|
state: [],
|
|
366
|
-
hotState:
|
|
366
|
+
hotState: N
|
|
367
367
|
}), K = {
|
|
368
368
|
_p: a,
|
|
369
369
|
// _s: scope,
|
|
@@ -372,11 +372,11 @@ function Ze(t, e, o = {}, a, n, i) {
|
|
|
372
372
|
$patch: M,
|
|
373
373
|
$reset: x,
|
|
374
374
|
$subscribe(m, g = {}) {
|
|
375
|
-
const A = nt(h, m, g.detached, () =>
|
|
375
|
+
const A = nt(h, m, g.detached, () => L()), L = r.run(() => H(() => a.state.value[t], (G) => {
|
|
376
376
|
(g.flush === "sync" ? p : u) && m({
|
|
377
377
|
storeId: t,
|
|
378
378
|
type: me.direct,
|
|
379
|
-
events:
|
|
379
|
+
events: O
|
|
380
380
|
}, G);
|
|
381
381
|
}, Q({}, s, g)));
|
|
382
382
|
return A;
|
|
@@ -397,7 +397,7 @@ function Ze(t, e, o = {}, a, n, i) {
|
|
|
397
397
|
for (const m in U) {
|
|
398
398
|
const g = U[m];
|
|
399
399
|
if (de(g) && !st(g) || Pe(g))
|
|
400
|
-
process.env.NODE_ENV !== "production" && n ?
|
|
400
|
+
process.env.NODE_ENV !== "production" && n ? N.value[m] = ne(U, m) : i || (k && no(g) && (de(g) ? g.value = k[m] : qe(g, k[m])), a.state.value[t][m] = g), process.env.NODE_ENV !== "production" && J.state.push(m);
|
|
401
401
|
else if (typeof g == "function") {
|
|
402
402
|
const A = process.env.NODE_ENV !== "production" && n ? g : Z(g, m);
|
|
403
403
|
U[m] = A, process.env.NODE_ENV !== "production" && (J.actions[m] = g), c.actions[m] = g;
|
|
@@ -408,7 +408,7 @@ function Ze(t, e, o = {}, a, n, i) {
|
|
|
408
408
|
(U._getters = fe([]))).push(m));
|
|
409
409
|
}
|
|
410
410
|
if (Q(E, U), Q(mt(E), U), Object.defineProperty(E, "$state", {
|
|
411
|
-
get: () => process.env.NODE_ENV !== "production" && n ?
|
|
411
|
+
get: () => process.env.NODE_ENV !== "production" && n ? N.value : a.state.value[t],
|
|
412
412
|
set: (m) => {
|
|
413
413
|
if (process.env.NODE_ENV !== "production" && n)
|
|
414
414
|
throw new Error("cannot set hotState");
|
|
@@ -419,8 +419,8 @@ function Ze(t, e, o = {}, a, n, i) {
|
|
|
419
419
|
}), process.env.NODE_ENV !== "production" && (E._hotUpdate = fe((m) => {
|
|
420
420
|
E._hotUpdating = !0, m._hmrPayload.state.forEach((g) => {
|
|
421
421
|
if (g in E.$state) {
|
|
422
|
-
const A = m.$state[g],
|
|
423
|
-
typeof A == "object" && se(A) && se(
|
|
422
|
+
const A = m.$state[g], L = E.$state[g];
|
|
423
|
+
typeof A == "object" && se(A) && se(L) ? Et(A, L) : m.$state[g] = L;
|
|
424
424
|
}
|
|
425
425
|
E[g] = ne(m.$state, g);
|
|
426
426
|
}), Object.keys(E.$state).forEach((g) => {
|
|
@@ -434,12 +434,12 @@ function Ze(t, e, o = {}, a, n, i) {
|
|
|
434
434
|
Z(A, g);
|
|
435
435
|
}
|
|
436
436
|
for (const g in m._hmrPayload.getters) {
|
|
437
|
-
const A = m._hmrPayload.getters[g],
|
|
437
|
+
const A = m._hmrPayload.getters[g], L = i ? (
|
|
438
438
|
// special handling of options api
|
|
439
439
|
I(() => (Ae(a), A.call(E, E)))
|
|
440
440
|
) : A;
|
|
441
441
|
E[g] = //
|
|
442
|
-
|
|
442
|
+
L;
|
|
443
443
|
}
|
|
444
444
|
Object.keys(E._hmrPayload.getters).forEach((g) => {
|
|
445
445
|
g in m._hmrPayload.getters || delete E[g];
|
|
@@ -566,7 +566,7 @@ function fo(t = kt, e = {}) {
|
|
|
566
566
|
eventFilter: r
|
|
567
567
|
};
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function Le(t) {
|
|
570
570
|
return Array.isArray(t) ? t : [t];
|
|
571
571
|
}
|
|
572
572
|
function ho(t) {
|
|
@@ -606,20 +606,20 @@ function So(t) {
|
|
|
606
606
|
}
|
|
607
607
|
function lt(...t) {
|
|
608
608
|
const e = (a, n, i, r) => (a.addEventListener(n, i, r), () => a.removeEventListener(n, i, r)), o = I(() => {
|
|
609
|
-
const a =
|
|
609
|
+
const a = Le(X(t[0])).filter((n) => n != null);
|
|
610
610
|
return a.every((n) => typeof n != "string") ? a : void 0;
|
|
611
611
|
});
|
|
612
612
|
return wo(() => {
|
|
613
613
|
var a, n;
|
|
614
614
|
return [
|
|
615
615
|
(a = (n = o.value) === null || n === void 0 ? void 0 : n.map((i) => So(i))) !== null && a !== void 0 ? a : [Ie].filter((i) => i != null),
|
|
616
|
-
|
|
617
|
-
|
|
616
|
+
Le(X(o.value ? t[1] : t[0])),
|
|
617
|
+
Le(De(o.value ? t[2] : t[1])),
|
|
618
618
|
X(o.value ? t[3] : t[2])
|
|
619
619
|
];
|
|
620
620
|
}, ([a, n, i, r], c, s) => {
|
|
621
621
|
if (!a?.length || !n?.length || !i?.length) return;
|
|
622
|
-
const u = co(r) ? { ...r } : r, p = a.flatMap((h) => n.flatMap((b) => i.map((
|
|
622
|
+
const u = co(r) ? { ...r } : r, p = a.flatMap((h) => n.flatMap((b) => i.map((O) => e(h, b, O, u))));
|
|
623
623
|
s(() => {
|
|
624
624
|
p.forEach((h) => h());
|
|
625
625
|
});
|
|
@@ -635,7 +635,7 @@ function _o(t, e) {
|
|
|
635
635
|
function ko(t) {
|
|
636
636
|
return t == null ? "any" : t instanceof Set ? "set" : t instanceof Map ? "map" : t instanceof Date ? "date" : typeof t == "boolean" ? "boolean" : typeof t == "string" ? "string" : typeof t == "object" ? "object" : Number.isNaN(t) ? "any" : "number";
|
|
637
637
|
}
|
|
638
|
-
const
|
|
638
|
+
const Oo = {
|
|
639
639
|
boolean: {
|
|
640
640
|
read: (t) => t === "true",
|
|
641
641
|
write: (t) => String(t)
|
|
@@ -669,61 +669,61 @@ const Do = {
|
|
|
669
669
|
write: (t) => t.toISOString()
|
|
670
670
|
}
|
|
671
671
|
}, ct = "vueuse-storage";
|
|
672
|
-
function
|
|
672
|
+
function Do(t, e, o, a = {}) {
|
|
673
673
|
var n;
|
|
674
|
-
const { flush: i = "pre", deep: r = !0, listenToStorageChanges: c = !0, writeDefaults: s = !0, mergeDefaults: u = !1, shallow: p, window: h = Ie, eventFilter: b, onError:
|
|
675
|
-
console.error(
|
|
676
|
-
}, initOnMounted: k } = a,
|
|
674
|
+
const { flush: i = "pre", deep: r = !0, listenToStorageChanges: c = !0, writeDefaults: s = !0, mergeDefaults: u = !1, shallow: p, window: h = Ie, eventFilter: b, onError: O = (D) => {
|
|
675
|
+
console.error(D);
|
|
676
|
+
}, initOnMounted: k } = a, N = (p ? $e : C)(e), V = I(() => X(t));
|
|
677
677
|
if (!o) try {
|
|
678
678
|
o = _o("getDefaultStorage", () => Ie?.localStorage)();
|
|
679
|
-
} catch (
|
|
680
|
-
D
|
|
679
|
+
} catch (D) {
|
|
680
|
+
O(D);
|
|
681
681
|
}
|
|
682
|
-
if (!o) return
|
|
683
|
-
const M = X(e), x = ko(M), W = (n = a.serializer) !== null && n !== void 0 ? n :
|
|
682
|
+
if (!o) return N;
|
|
683
|
+
const M = X(e), x = ko(M), W = (n = a.serializer) !== null && n !== void 0 ? n : Oo[x], { pause: Z, resume: J } = yo(N, (D) => g(D), {
|
|
684
684
|
flush: i,
|
|
685
685
|
deep: r,
|
|
686
686
|
eventFilter: b
|
|
687
687
|
});
|
|
688
|
-
H(V, () =>
|
|
688
|
+
H(V, () => L(), { flush: i });
|
|
689
689
|
let K = !1;
|
|
690
|
-
const E = (
|
|
691
|
-
k && !K ||
|
|
692
|
-
}, U = (
|
|
693
|
-
k && !K || G(
|
|
690
|
+
const E = (D) => {
|
|
691
|
+
k && !K || L(D);
|
|
692
|
+
}, U = (D) => {
|
|
693
|
+
k && !K || G(D);
|
|
694
694
|
};
|
|
695
695
|
h && c && (o instanceof Storage ? lt(h, "storage", E, { passive: !0 }) : lt(h, ct, U)), k ? bo(() => {
|
|
696
|
-
K = !0,
|
|
697
|
-
}) :
|
|
698
|
-
function m(
|
|
696
|
+
K = !0, L();
|
|
697
|
+
}) : L();
|
|
698
|
+
function m(D, P) {
|
|
699
699
|
if (h) {
|
|
700
700
|
const B = {
|
|
701
701
|
key: V.value,
|
|
702
|
-
oldValue:
|
|
702
|
+
oldValue: D,
|
|
703
703
|
newValue: P,
|
|
704
704
|
storageArea: o
|
|
705
705
|
};
|
|
706
706
|
h.dispatchEvent(o instanceof Storage ? new StorageEvent("storage", B) : new CustomEvent(ct, { detail: B }));
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
|
-
function g(
|
|
709
|
+
function g(D) {
|
|
710
710
|
try {
|
|
711
711
|
const P = o.getItem(V.value);
|
|
712
|
-
if (
|
|
712
|
+
if (D == null)
|
|
713
713
|
m(P, null), o.removeItem(V.value);
|
|
714
714
|
else {
|
|
715
|
-
const B = W.write(
|
|
715
|
+
const B = W.write(D);
|
|
716
716
|
P !== B && (o.setItem(V.value, B), m(P, B));
|
|
717
717
|
}
|
|
718
718
|
} catch (P) {
|
|
719
|
-
|
|
719
|
+
O(P);
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
|
-
function A(
|
|
723
|
-
const P =
|
|
722
|
+
function A(D) {
|
|
723
|
+
const P = D ? D.newValue : o.getItem(V.value);
|
|
724
724
|
if (P == null)
|
|
725
725
|
return s && M != null && o.setItem(V.value, W.write(M)), M;
|
|
726
|
-
if (!
|
|
726
|
+
if (!D && u) {
|
|
727
727
|
const B = W.read(P);
|
|
728
728
|
return typeof u == "function" ? u(B, M) : x === "object" && !Array.isArray(B) ? {
|
|
729
729
|
...M,
|
|
@@ -731,38 +731,38 @@ function No(t, e, o, a = {}) {
|
|
|
731
731
|
} : B;
|
|
732
732
|
} else return typeof P != "string" ? P : W.read(P);
|
|
733
733
|
}
|
|
734
|
-
function
|
|
735
|
-
if (!(
|
|
736
|
-
if (
|
|
737
|
-
|
|
734
|
+
function L(D) {
|
|
735
|
+
if (!(D && D.storageArea !== o)) {
|
|
736
|
+
if (D && D.key == null) {
|
|
737
|
+
N.value = M;
|
|
738
738
|
return;
|
|
739
739
|
}
|
|
740
|
-
if (!(
|
|
740
|
+
if (!(D && D.key !== V.value)) {
|
|
741
741
|
Z();
|
|
742
742
|
try {
|
|
743
|
-
const P = W.write(
|
|
744
|
-
(
|
|
743
|
+
const P = W.write(N.value);
|
|
744
|
+
(D === void 0 || D?.newValue !== P) && (N.value = A(D));
|
|
745
745
|
} catch (P) {
|
|
746
|
-
|
|
746
|
+
O(P);
|
|
747
747
|
} finally {
|
|
748
|
-
|
|
748
|
+
D ? re(J) : J();
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
|
-
function G(
|
|
754
|
-
|
|
753
|
+
function G(D) {
|
|
754
|
+
L(D.detail);
|
|
755
755
|
}
|
|
756
|
-
return
|
|
756
|
+
return N;
|
|
757
757
|
}
|
|
758
|
-
function
|
|
758
|
+
function No(t, e, o = {}) {
|
|
759
759
|
const { window: a = Ie } = o;
|
|
760
|
-
return
|
|
760
|
+
return Do(t, e, a?.localStorage, o);
|
|
761
761
|
}
|
|
762
762
|
function Be() {
|
|
763
763
|
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function Oe(t) {
|
|
766
766
|
const e = {
|
|
767
767
|
type: t.type,
|
|
768
768
|
clientId: t.clientId,
|
|
@@ -790,7 +790,7 @@ function Ro(t) {
|
|
|
790
790
|
timestamp: new Date(o.timestamp)
|
|
791
791
|
}))), e;
|
|
792
792
|
}
|
|
793
|
-
const
|
|
793
|
+
const Ot = /* @__PURE__ */ ro("hst-operation-log", () => {
|
|
794
794
|
const t = C({
|
|
795
795
|
maxOperations: 100,
|
|
796
796
|
enableCrossTabSync: !0,
|
|
@@ -812,7 +812,7 @@ const Dt = /* @__PURE__ */ ro("hst-operation-log", () => {
|
|
|
812
812
|
function b(v) {
|
|
813
813
|
t.value = { ...t.value, ...v }, t.value.enablePersistence && (w(), _()), t.value.enableCrossTabSync && A();
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function O(v, f = "user") {
|
|
816
816
|
const y = {
|
|
817
817
|
...v,
|
|
818
818
|
id: Be(),
|
|
@@ -828,12 +828,12 @@ const Dt = /* @__PURE__ */ ro("hst-operation-log", () => {
|
|
|
828
828
|
const l = e.value.length - t.value.maxOperations;
|
|
829
829
|
e.value = e.value.slice(l), o.value -= l;
|
|
830
830
|
}
|
|
831
|
-
return t.value.enableCrossTabSync &&
|
|
831
|
+
return t.value.enableCrossTabSync && L(y), y.id;
|
|
832
832
|
}
|
|
833
833
|
function k() {
|
|
834
834
|
n.value = !0, i.value = [], r.value = Be();
|
|
835
835
|
}
|
|
836
|
-
function
|
|
836
|
+
function N(v) {
|
|
837
837
|
if (!n.value || i.value.length === 0)
|
|
838
838
|
return n.value = !1, i.value = [], r.value = null, null;
|
|
839
839
|
const f = r.value, y = i.value.every((S) => S.reversible), l = {
|
|
@@ -874,7 +874,7 @@ const Dt = /* @__PURE__ */ ro("hst-operation-log", () => {
|
|
|
874
874
|
}
|
|
875
875
|
else
|
|
876
876
|
W(f, v);
|
|
877
|
-
return o.value--, t.value.enableCrossTabSync &&
|
|
877
|
+
return o.value--, t.value.enableCrossTabSync && D(f), !0;
|
|
878
878
|
} catch (y) {
|
|
879
879
|
return typeof console < "u" && console.error("Undo failed:", y), !1;
|
|
880
880
|
}
|
|
@@ -939,7 +939,7 @@ const Dt = /* @__PURE__ */ ro("hst-operation-log", () => {
|
|
|
939
939
|
actionResult: l,
|
|
940
940
|
actionError: d
|
|
941
941
|
};
|
|
942
|
-
return
|
|
942
|
+
return O(S);
|
|
943
943
|
}
|
|
944
944
|
let g = null;
|
|
945
945
|
function A() {
|
|
@@ -950,7 +950,7 @@ const Dt = /* @__PURE__ */ ro("hst-operation-log", () => {
|
|
|
950
950
|
y.clientId !== a.value && (y.type === "operation" && y.operation ? (e.value.push({ ...y.operation, source: "sync" }), o.value = e.value.length - 1) : y.type === "operation" && y.operations && (e.value.push(...y.operations.map((l) => ({ ...l, source: "sync" }))), o.value = e.value.length - 1));
|
|
951
951
|
}));
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function L(v) {
|
|
954
954
|
if (!g) return;
|
|
955
955
|
const f = {
|
|
956
956
|
type: "operation",
|
|
@@ -958,7 +958,7 @@ const Dt = /* @__PURE__ */ ro("hst-operation-log", () => {
|
|
|
958
958
|
clientId: a.value,
|
|
959
959
|
timestamp: /* @__PURE__ */ new Date()
|
|
960
960
|
};
|
|
961
|
-
g.postMessage(
|
|
961
|
+
g.postMessage(Oe(f));
|
|
962
962
|
}
|
|
963
963
|
function G(v, f) {
|
|
964
964
|
if (!g) return;
|
|
@@ -968,9 +968,9 @@ const Dt = /* @__PURE__ */ ro("hst-operation-log", () => {
|
|
|
968
968
|
clientId: a.value,
|
|
969
969
|
timestamp: /* @__PURE__ */ new Date()
|
|
970
970
|
};
|
|
971
|
-
g.postMessage(
|
|
971
|
+
g.postMessage(Oe(y));
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function D(v) {
|
|
974
974
|
if (!g) return;
|
|
975
975
|
const f = {
|
|
976
976
|
type: "undo",
|
|
@@ -978,7 +978,7 @@ const Dt = /* @__PURE__ */ ro("hst-operation-log", () => {
|
|
|
978
978
|
clientId: a.value,
|
|
979
979
|
timestamp: /* @__PURE__ */ new Date()
|
|
980
980
|
};
|
|
981
|
-
g.postMessage(
|
|
981
|
+
g.postMessage(Oe(f));
|
|
982
982
|
}
|
|
983
983
|
function P(v) {
|
|
984
984
|
if (!g) return;
|
|
@@ -988,9 +988,9 @@ const Dt = /* @__PURE__ */ ro("hst-operation-log", () => {
|
|
|
988
988
|
clientId: a.value,
|
|
989
989
|
timestamp: /* @__PURE__ */ new Date()
|
|
990
990
|
};
|
|
991
|
-
g.postMessage(
|
|
991
|
+
g.postMessage(Oe(f));
|
|
992
992
|
}
|
|
993
|
-
const B =
|
|
993
|
+
const B = No("stonecrop-ops-operations", null, {
|
|
994
994
|
serializer: {
|
|
995
995
|
read: (v) => {
|
|
996
996
|
try {
|
|
@@ -1051,9 +1051,9 @@ const Dt = /* @__PURE__ */ ro("hst-operation-log", () => {
|
|
|
1051
1051
|
redoCount: p,
|
|
1052
1052
|
// Methods
|
|
1053
1053
|
configure: b,
|
|
1054
|
-
addOperation:
|
|
1054
|
+
addOperation: O,
|
|
1055
1055
|
startBatch: k,
|
|
1056
|
-
commitBatch:
|
|
1056
|
+
commitBatch: N,
|
|
1057
1057
|
cancelBatch: V,
|
|
1058
1058
|
undo: M,
|
|
1059
1059
|
redo: x,
|
|
@@ -1180,9 +1180,9 @@ class ye {
|
|
|
1180
1180
|
let s = !1, u = !1, p;
|
|
1181
1181
|
const h = this.getFieldRollback(a, n), b = o.enableRollback ?? h ?? this.options.enableRollback;
|
|
1182
1182
|
b && e.store && (p = this.captureSnapshot(e));
|
|
1183
|
-
for (const
|
|
1183
|
+
for (const N of i)
|
|
1184
1184
|
try {
|
|
1185
|
-
const V = await this.executeAction(
|
|
1185
|
+
const V = await this.executeAction(N, e, o.timeout);
|
|
1186
1186
|
if (c.push(V), !V.success) {
|
|
1187
1187
|
s = !0;
|
|
1188
1188
|
break;
|
|
@@ -1192,7 +1192,7 @@ class ye {
|
|
|
1192
1192
|
success: !1,
|
|
1193
1193
|
error: V instanceof Error ? V : new Error(String(V)),
|
|
1194
1194
|
executionTime: 0,
|
|
1195
|
-
action:
|
|
1195
|
+
action: N
|
|
1196
1196
|
};
|
|
1197
1197
|
c.push(M), s = !0;
|
|
1198
1198
|
break;
|
|
@@ -1200,22 +1200,22 @@ class ye {
|
|
|
1200
1200
|
if (b && s && p && e.store)
|
|
1201
1201
|
try {
|
|
1202
1202
|
this.restoreSnapshot(e, p), u = !0;
|
|
1203
|
-
} catch (
|
|
1204
|
-
console.error("[FieldTriggers] Rollback failed:",
|
|
1203
|
+
} catch (N) {
|
|
1204
|
+
console.error("[FieldTriggers] Rollback failed:", N);
|
|
1205
1205
|
}
|
|
1206
|
-
const
|
|
1206
|
+
const O = performance.now() - r, k = c.filter((N) => !N.success);
|
|
1207
1207
|
if (k.length > 0 && this.options.errorHandler)
|
|
1208
|
-
for (const
|
|
1208
|
+
for (const N of k)
|
|
1209
1209
|
try {
|
|
1210
|
-
this.options.errorHandler(
|
|
1210
|
+
this.options.errorHandler(N.error, e, N.action);
|
|
1211
1211
|
} catch (V) {
|
|
1212
1212
|
console.error("[FieldTriggers] Error in global error handler:", V);
|
|
1213
1213
|
}
|
|
1214
1214
|
return {
|
|
1215
1215
|
path: e.path,
|
|
1216
1216
|
actionResults: c,
|
|
1217
|
-
totalExecutionTime:
|
|
1218
|
-
allSucceeded: c.every((
|
|
1217
|
+
totalExecutionTime: O,
|
|
1218
|
+
allSucceeded: c.every((N) => N.success),
|
|
1219
1219
|
stoppedOnError: s,
|
|
1220
1220
|
rolledBack: u,
|
|
1221
1221
|
snapshot: this.options.debug && b ? p : void 0
|
|
@@ -1405,7 +1405,7 @@ function ut(t) {
|
|
|
1405
1405
|
}
|
|
1406
1406
|
function dt() {
|
|
1407
1407
|
try {
|
|
1408
|
-
return
|
|
1408
|
+
return Ot();
|
|
1409
1409
|
} catch {
|
|
1410
1410
|
return null;
|
|
1411
1411
|
}
|
|
@@ -1709,7 +1709,7 @@ class Ao {
|
|
|
1709
1709
|
* @internal
|
|
1710
1710
|
*/
|
|
1711
1711
|
getOperationLogStore() {
|
|
1712
|
-
return this._operationLogStore || (this._operationLogStore =
|
|
1712
|
+
return this._operationLogStore || (this._operationLogStore = Ot(), this._operationLogConfig && this._operationLogStore.configure(this._operationLogConfig)), this._operationLogStore;
|
|
1713
1713
|
}
|
|
1714
1714
|
/**
|
|
1715
1715
|
* Initialize the HST store structure
|
|
@@ -1869,7 +1869,7 @@ function Io(t) {
|
|
|
1869
1869
|
const w = t.doctype.schema ? Array.isArray(t.doctype.schema) ? t.doctype.schema : Array.from(t.doctype.schema) : [];
|
|
1870
1870
|
s.value = e.resolveSchema(w);
|
|
1871
1871
|
}
|
|
1872
|
-
const u = C([]), p = C(-1), h = I(() => a.value?.getOperationLogStore().canUndo ?? !1), b = I(() => a.value?.getOperationLogStore().canRedo ?? !1),
|
|
1872
|
+
const u = C([]), p = C(-1), h = I(() => a.value?.getOperationLogStore().canUndo ?? !1), b = I(() => a.value?.getOperationLogStore().canRedo ?? !1), O = I(() => a.value?.getOperationLogStore().undoCount ?? 0), k = I(() => a.value?.getOperationLogStore().redoCount ?? 0), N = I(
|
|
1873
1873
|
() => a.value?.getOperationLogStore().undoRedoState ?? {
|
|
1874
1874
|
canUndo: !1,
|
|
1875
1875
|
canRedo: !1,
|
|
@@ -1970,7 +1970,7 @@ function Io(t) {
|
|
|
1970
1970
|
if (!_) return "";
|
|
1971
1971
|
const v = $ || t.recordId || c.value || "new";
|
|
1972
1972
|
return `${_.slug}.${v}.${w}`;
|
|
1973
|
-
},
|
|
1973
|
+
}, L = (w) => {
|
|
1974
1974
|
const $ = t.doctype || r.value;
|
|
1975
1975
|
if (!(!n.value || !a.value || !$))
|
|
1976
1976
|
try {
|
|
@@ -1993,7 +1993,7 @@ function Io(t) {
|
|
|
1993
1993
|
} catch {
|
|
1994
1994
|
}
|
|
1995
1995
|
};
|
|
1996
|
-
(t.doctype || e?.router) && (Ge("hstPathProvider", A), Ge("hstChangeHandler",
|
|
1996
|
+
(t.doctype || e?.router) && (Ge("hstPathProvider", A), Ge("hstChangeHandler", L));
|
|
1997
1997
|
const G = (w, $, _) => {
|
|
1998
1998
|
if (!a.value)
|
|
1999
1999
|
return oe($);
|
|
@@ -2005,14 +2005,14 @@ function Io(t) {
|
|
|
2005
2005
|
return oe($);
|
|
2006
2006
|
}
|
|
2007
2007
|
return oe($);
|
|
2008
|
-
},
|
|
2008
|
+
}, D = async (w, $) => {
|
|
2009
2009
|
if (!n.value || !a.value)
|
|
2010
2010
|
throw new Error("HST store not initialized");
|
|
2011
2011
|
const _ = `${w.slug}.${$}`, v = { ...n.value.get(_) || {} }, f = w.schema ? Array.isArray(w.schema) ? w.schema : Array.from(w.schema) : [], y = (e ? e.resolveSchema(f) : f).filter(
|
|
2012
2012
|
(l) => "fieldtype" in l && l.fieldtype === "Doctype" && "schema" in l && Array.isArray(l.schema)
|
|
2013
2013
|
);
|
|
2014
2014
|
for (const l of y) {
|
|
2015
|
-
const d = l, S = `${_}.${d.fieldname}`, R =
|
|
2015
|
+
const d = l, S = `${_}.${d.fieldname}`, R = Dt(d.schema, S, n.value);
|
|
2016
2016
|
v[d.fieldname] = R;
|
|
2017
2017
|
}
|
|
2018
2018
|
return v;
|
|
@@ -2020,7 +2020,7 @@ function Io(t) {
|
|
|
2020
2020
|
provideHSTPath: (_) => `${w}.${_}`,
|
|
2021
2021
|
handleHSTChange: (_) => {
|
|
2022
2022
|
const v = _.path.startsWith(w) ? _.path : `${w}.${_.fieldname}`;
|
|
2023
|
-
|
|
2023
|
+
L({
|
|
2024
2024
|
..._,
|
|
2025
2025
|
path: v
|
|
2026
2026
|
});
|
|
@@ -2028,10 +2028,10 @@ function Io(t) {
|
|
|
2028
2028
|
}), B = {
|
|
2029
2029
|
operations: u,
|
|
2030
2030
|
currentIndex: p,
|
|
2031
|
-
undoRedoState:
|
|
2031
|
+
undoRedoState: N,
|
|
2032
2032
|
canUndo: h,
|
|
2033
2033
|
canRedo: b,
|
|
2034
|
-
undoCount:
|
|
2034
|
+
undoCount: O,
|
|
2035
2035
|
redoCount: k,
|
|
2036
2036
|
undo: V,
|
|
2037
2037
|
redo: M,
|
|
@@ -2049,23 +2049,23 @@ function Io(t) {
|
|
|
2049
2049
|
stonecrop: a,
|
|
2050
2050
|
operationLog: B,
|
|
2051
2051
|
provideHSTPath: A,
|
|
2052
|
-
handleHSTChange:
|
|
2052
|
+
handleHSTChange: L,
|
|
2053
2053
|
hstStore: n,
|
|
2054
2054
|
formData: i,
|
|
2055
2055
|
resolvedSchema: s,
|
|
2056
2056
|
loadNestedData: G,
|
|
2057
|
-
saveRecursive:
|
|
2057
|
+
saveRecursive: D,
|
|
2058
2058
|
createNestedContext: P
|
|
2059
2059
|
} : !t.doctype && e?.router ? {
|
|
2060
2060
|
stonecrop: a,
|
|
2061
2061
|
operationLog: B,
|
|
2062
2062
|
provideHSTPath: A,
|
|
2063
|
-
handleHSTChange:
|
|
2063
|
+
handleHSTChange: L,
|
|
2064
2064
|
hstStore: n,
|
|
2065
2065
|
formData: i,
|
|
2066
2066
|
resolvedSchema: s,
|
|
2067
2067
|
loadNestedData: G,
|
|
2068
|
-
saveRecursive:
|
|
2068
|
+
saveRecursive: D,
|
|
2069
2069
|
createNestedContext: P
|
|
2070
2070
|
} : {
|
|
2071
2071
|
stonecrop: a,
|
|
@@ -2123,12 +2123,12 @@ function To(t, e, o) {
|
|
|
2123
2123
|
const n = e[e.length - 1];
|
|
2124
2124
|
a[n] = o;
|
|
2125
2125
|
}
|
|
2126
|
-
function
|
|
2126
|
+
function Dt(t, e, o) {
|
|
2127
2127
|
const a = { ...o.get(e) || {} }, n = t.filter(
|
|
2128
2128
|
(i) => "fieldtype" in i && i.fieldtype === "Doctype" && "schema" in i && Array.isArray(i.schema)
|
|
2129
2129
|
);
|
|
2130
2130
|
for (const i of n) {
|
|
2131
|
-
const r = i, c = `${e}.${r.fieldname}`, s =
|
|
2131
|
+
const r = i, c = `${e}.${r.fieldname}`, s = Dt(r.schema, c, o);
|
|
2132
2132
|
a[r.fieldname] = s;
|
|
2133
2133
|
}
|
|
2134
2134
|
return a;
|
|
@@ -2190,13 +2190,13 @@ function jo() {
|
|
|
2190
2190
|
};
|
|
2191
2191
|
}
|
|
2192
2192
|
jo();
|
|
2193
|
-
const
|
|
2193
|
+
const Fo = (t, e) => {
|
|
2194
2194
|
const o = t.__vccOpts || t;
|
|
2195
2195
|
for (const [a, n] of e)
|
|
2196
2196
|
o[a] = n;
|
|
2197
2197
|
return o;
|
|
2198
2198
|
};
|
|
2199
|
-
function
|
|
2199
|
+
function Lo(t, e) {
|
|
2200
2200
|
return Xe() ? (Ye(t, e), !0) : !1;
|
|
2201
2201
|
}
|
|
2202
2202
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -2232,7 +2232,7 @@ function Uo(t, e = !1) {
|
|
|
2232
2232
|
const r = We(X(t));
|
|
2233
2233
|
!r || !o.value || (r.style.overflow = a, Ke.delete(r), o.value = !1);
|
|
2234
2234
|
};
|
|
2235
|
-
return
|
|
2235
|
+
return Lo(i), I({
|
|
2236
2236
|
get() {
|
|
2237
2237
|
return o.value;
|
|
2238
2238
|
},
|
|
@@ -2304,20 +2304,20 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2304
2304
|
const c = I(() => r.value);
|
|
2305
2305
|
return (s, u) => {
|
|
2306
2306
|
const p = bt("AForm", !0);
|
|
2307
|
-
return j(),
|
|
2308
|
-
(j(!0),
|
|
2309
|
-
"schema" in h && Array.isArray(h.schema) && h.schema.length > 0 ? (j(),
|
|
2310
|
-
h.label ? (j(),
|
|
2307
|
+
return j(), F("form", Ko, [
|
|
2308
|
+
(j(!0), F(ue, null, be(t.schema, (h, b) => (j(), F(ue, { key: b }, [
|
|
2309
|
+
"schema" in h && Array.isArray(h.schema) && h.schema.length > 0 ? (j(), F("div", zo, [
|
|
2310
|
+
h.label ? (j(), F("h4", Jo, ee(h.label), 1)) : ce("", !0),
|
|
2311
2311
|
ae(p, {
|
|
2312
2312
|
data: n.value[h.fieldname],
|
|
2313
|
-
"onUpdate:data": (
|
|
2313
|
+
"onUpdate:data": (O) => n.value[h.fieldname] = O,
|
|
2314
2314
|
schema: h.schema,
|
|
2315
2315
|
"read-only": t.readOnly || h.readOnly
|
|
2316
2316
|
}, null, 8, ["data", "onUpdate:data", "schema", "read-only"])
|
|
2317
2317
|
])) : (j(), Qe(Vt(h.component), Mt({
|
|
2318
2318
|
key: 1,
|
|
2319
2319
|
modelValue: c.value[b].value,
|
|
2320
|
-
"onUpdate:modelValue": (
|
|
2320
|
+
"onUpdate:modelValue": (O) => c.value[b].value = O,
|
|
2321
2321
|
schema: h,
|
|
2322
2322
|
data: a.value[h.fieldname],
|
|
2323
2323
|
"read-only": t.readOnly
|
|
@@ -2326,7 +2326,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2326
2326
|
]);
|
|
2327
2327
|
};
|
|
2328
2328
|
}
|
|
2329
|
-
}), qo = /* @__PURE__ */
|
|
2329
|
+
}), qo = /* @__PURE__ */ Fo(Go, [["__scopeId", "data-v-06e17c5b"]]), Zo = { class: "tabs" }, Qo = { tabindex: "0" }, Xo = { tabindex: "0" }, Yo = /* @__PURE__ */ Se({
|
|
2330
2330
|
__name: "SheetNav",
|
|
2331
2331
|
props: {
|
|
2332
2332
|
breadcrumbs: { default: () => [] }
|
|
@@ -2345,8 +2345,8 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2345
2345
|
}, p = () => {
|
|
2346
2346
|
};
|
|
2347
2347
|
return (h, b) => {
|
|
2348
|
-
const
|
|
2349
|
-
return j(),
|
|
2348
|
+
const O = bt("router-link");
|
|
2349
|
+
return j(), F("footer", null, [
|
|
2350
2350
|
T("ul", Zo, [
|
|
2351
2351
|
T("li", {
|
|
2352
2352
|
class: "hidebreadcrumbs",
|
|
@@ -2355,7 +2355,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2355
2355
|
}, [
|
|
2356
2356
|
T("a", Qo, [
|
|
2357
2357
|
T("div", {
|
|
2358
|
-
class:
|
|
2358
|
+
class: Ne(i.value)
|
|
2359
2359
|
}, "×", 2)
|
|
2360
2360
|
])
|
|
2361
2361
|
], 32),
|
|
@@ -2365,7 +2365,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2365
2365
|
onClick: p,
|
|
2366
2366
|
onKeydown: ve(p, ["enter"])
|
|
2367
2367
|
}, [
|
|
2368
|
-
ae(
|
|
2368
|
+
ae(O, {
|
|
2369
2369
|
to: "/",
|
|
2370
2370
|
tabindex: "0"
|
|
2371
2371
|
}, {
|
|
@@ -2386,11 +2386,11 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2386
2386
|
})
|
|
2387
2387
|
], 36),
|
|
2388
2388
|
T("li", {
|
|
2389
|
-
class:
|
|
2389
|
+
class: Ne(["searchtab", { "search-active": o.value }]),
|
|
2390
2390
|
style: je({ display: e.value ? "block" : "none" })
|
|
2391
2391
|
}, [
|
|
2392
2392
|
T("a", Xo, [
|
|
2393
|
-
Re((j(),
|
|
2393
|
+
Re((j(), F("svg", {
|
|
2394
2394
|
class: "icon search-icon",
|
|
2395
2395
|
role: "button",
|
|
2396
2396
|
"aria-label": "Search",
|
|
@@ -2429,11 +2429,11 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2429
2429
|
])
|
|
2430
2430
|
])
|
|
2431
2431
|
], 6),
|
|
2432
|
-
(j(!0),
|
|
2432
|
+
(j(!0), F(ue, null, be(t.breadcrumbs, (k) => (j(), F("li", {
|
|
2433
2433
|
key: k.title,
|
|
2434
2434
|
style: je({ display: e.value ? "block" : "none" })
|
|
2435
2435
|
}, [
|
|
2436
|
-
ae(
|
|
2436
|
+
ae(O, {
|
|
2437
2437
|
tabindex: "0",
|
|
2438
2438
|
to: k.to
|
|
2439
2439
|
}, {
|
|
@@ -2447,7 +2447,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2447
2447
|
]);
|
|
2448
2448
|
};
|
|
2449
2449
|
}
|
|
2450
|
-
}),
|
|
2450
|
+
}), Nt = /* @__PURE__ */ wt(Yo, [["__scopeId", "data-v-eb5bcbb6"]]), ea = {
|
|
2451
2451
|
key: 1,
|
|
2452
2452
|
class: "loading"
|
|
2453
2453
|
}, ta = {
|
|
@@ -2481,7 +2481,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2481
2481
|
console.warn("HST update failed:", d);
|
|
2482
2482
|
}
|
|
2483
2483
|
}
|
|
2484
|
-
}), r = I(() =>
|
|
2484
|
+
}), r = I(() => De(e.value?.registry.router?.currentRoute)), c = I(() => e.value?.registry.router), s = I(() => {
|
|
2485
2485
|
if (!r.value) return "";
|
|
2486
2486
|
if (r.value.meta?.actualDoctype)
|
|
2487
2487
|
return r.value.meta.actualDoctype;
|
|
@@ -2515,7 +2515,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
const l = r.value.params.pathMatch;
|
|
2517
2517
|
return l && l.length > 0 ? l.length === 1 ? "records" : "record" : "doctypes";
|
|
2518
|
-
}),
|
|
2518
|
+
}), O = () => {
|
|
2519
2519
|
if (!e.value || !s.value || !p.value)
|
|
2520
2520
|
return [];
|
|
2521
2521
|
try {
|
|
@@ -2574,7 +2574,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2574
2574
|
);
|
|
2575
2575
|
break;
|
|
2576
2576
|
case "record": {
|
|
2577
|
-
const d =
|
|
2577
|
+
const d = O();
|
|
2578
2578
|
d.length > 0 && l.push({
|
|
2579
2579
|
type: "dropdown",
|
|
2580
2580
|
label: "Actions",
|
|
@@ -2584,7 +2584,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2584
2584
|
}
|
|
2585
2585
|
}
|
|
2586
2586
|
return l;
|
|
2587
|
-
}),
|
|
2587
|
+
}), N = I(() => {
|
|
2588
2588
|
const l = [];
|
|
2589
2589
|
return b.value === "records" && u.value ? l.push(
|
|
2590
2590
|
{ title: "Home", to: "/" },
|
|
@@ -2713,7 +2713,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2713
2713
|
}, m = () => {
|
|
2714
2714
|
if (!s.value) return [];
|
|
2715
2715
|
if (!e.value) return [];
|
|
2716
|
-
const l = A(), d =
|
|
2716
|
+
const l = A(), d = L();
|
|
2717
2717
|
if (d.length === 0)
|
|
2718
2718
|
return [
|
|
2719
2719
|
{
|
|
@@ -2909,7 +2909,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2909
2909
|
return [];
|
|
2910
2910
|
const d = e.value.records(s.value)?.get("");
|
|
2911
2911
|
return d && typeof d == "object" && !Array.isArray(d) ? Object.values(d) : [];
|
|
2912
|
-
},
|
|
2912
|
+
}, L = () => {
|
|
2913
2913
|
if (!e.value || !s.value) return [];
|
|
2914
2914
|
try {
|
|
2915
2915
|
const d = e.value.registry.registry[s.value];
|
|
@@ -2922,7 +2922,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2922
2922
|
} catch {
|
|
2923
2923
|
}
|
|
2924
2924
|
return [];
|
|
2925
|
-
}, G = () => !e.value || !s.value || h.value ? {} : e.value.getRecordById(s.value, p.value)?.get("") || {},
|
|
2925
|
+
}, G = () => !e.value || !s.value || h.value ? {} : e.value.getRecordById(s.value, p.value)?.get("") || {}, D = I(() => {
|
|
2926
2926
|
switch (b.value) {
|
|
2927
2927
|
case "doctypes":
|
|
2928
2928
|
return U();
|
|
@@ -2935,7 +2935,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
2935
2935
|
}
|
|
2936
2936
|
}), P = C([]);
|
|
2937
2937
|
H(
|
|
2938
|
-
|
|
2938
|
+
D,
|
|
2939
2939
|
(l) => {
|
|
2940
2940
|
P.value = [...l];
|
|
2941
2941
|
},
|
|
@@ -3100,7 +3100,7 @@ const Ko = { class: "aform" }, zo = {
|
|
|
3100
3100
|
return document.addEventListener("keydown", l), () => {
|
|
3101
3101
|
document.removeEventListener("keydown", l);
|
|
3102
3102
|
};
|
|
3103
|
-
}), (l, d) => (j(),
|
|
3103
|
+
}), (l, d) => (j(), F("div", {
|
|
3104
3104
|
class: "desktop",
|
|
3105
3105
|
onClick: v
|
|
3106
3106
|
}, [
|
|
@@ -3108,17 +3108,17 @@ const Ko = { class: "aform" }, zo = {
|
|
|
3108
3108
|
elements: k.value,
|
|
3109
3109
|
onActionClick: $
|
|
3110
3110
|
}, null, 8, ["elements"]),
|
|
3111
|
-
P.value.length > 0 ? (j(), Qe(
|
|
3111
|
+
P.value.length > 0 ? (j(), Qe(De(qo), {
|
|
3112
3112
|
key: 0,
|
|
3113
3113
|
modelValue: P.value,
|
|
3114
3114
|
"onUpdate:modelValue": d[0] || (d[0] = (S) => P.value = S),
|
|
3115
3115
|
data: i.value
|
|
3116
|
-
}, null, 8, ["modelValue", "data"])) :
|
|
3116
|
+
}, null, 8, ["modelValue", "data"])) : De(e) ? (j(), F("div", ta, [
|
|
3117
3117
|
T("p", null, "Loading " + ee(b.value) + " data...", 1)
|
|
3118
|
-
])) : (j(),
|
|
3118
|
+
])) : (j(), F("div", ea, [...d[2] || (d[2] = [
|
|
3119
3119
|
T("p", null, "Initializing Stonecrop...", -1)
|
|
3120
3120
|
])])),
|
|
3121
|
-
ae(
|
|
3121
|
+
ae(Nt, { breadcrumbs: N.value }, null, 8, ["breadcrumbs"]),
|
|
3122
3122
|
ae($t, {
|
|
3123
3123
|
"is-open": n.value,
|
|
3124
3124
|
search: V,
|
|
@@ -3138,14 +3138,14 @@ const Ko = { class: "aform" }, zo = {
|
|
|
3138
3138
|
}
|
|
3139
3139
|
}), ra = {
|
|
3140
3140
|
install: (t) => {
|
|
3141
|
-
t.component("ActionSet", St), t.component("CommandPalette", $t), t.component("Desktop", oa), t.component("SheetNav",
|
|
3141
|
+
t.component("ActionSet", St), t.component("CommandPalette", $t), t.component("Desktop", oa), t.component("SheetNav", Nt);
|
|
3142
3142
|
}
|
|
3143
3143
|
};
|
|
3144
3144
|
export {
|
|
3145
3145
|
St as ActionSet,
|
|
3146
3146
|
$t as CommandPalette,
|
|
3147
3147
|
oa as Desktop,
|
|
3148
|
-
|
|
3148
|
+
Nt as SheetNav,
|
|
3149
3149
|
ra as StonecropDesktop
|
|
3150
3150
|
};
|
|
3151
3151
|
//# sourceMappingURL=desktop.js.map
|