@wgalleti/primevue-components 1.3.0 → 1.4.0
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/README.md +1 -0
- package/dist/components/charts/WChart.vue.d.ts +12 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/ui/WKanbanBoard.vue.d.ts +2 -2
- package/dist/components/ui/WKpiCard.vue.d.ts +27 -7
- package/dist/components/ui/WKpiGrid.vue.d.ts +15 -2
- package/dist/components/ui/WMeter.vue.d.ts +49 -0
- package/dist/components-BRNk60nY.cjs +25 -0
- package/dist/components-BRNk60nY.cjs.map +1 -0
- package/dist/{components-BHHLGp-P.js → components-DsMEndfN.js} +1809 -1577
- package/dist/components-DsMEndfN.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +2 -2
- package/dist/composables/useFormatters.d.ts +2 -0
- package/dist/{composables-DEPrDTmn.js → composables-B9ywPF1T.js} +89 -81
- package/dist/{composables-DEPrDTmn.js.map → composables-B9ywPF1T.js.map} +1 -1
- package/dist/{composables-COb8tdOP.cjs → composables-BpUFAr7n.cjs} +2 -2
- package/dist/{composables-COb8tdOP.cjs.map → composables-BpUFAr7n.cjs.map} +1 -1
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +39 -39
- package/dist/index.js.map +1 -1
- package/dist/primevue-components.css +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/kpi.d.ts +13 -1
- package/dist/{useFormKeyboardNav-CzKY9ZV2.cjs → useFormKeyboardNav-BTGDH0gB.cjs} +3 -3
- package/dist/useFormKeyboardNav-BTGDH0gB.cjs.map +1 -0
- package/dist/{useFormKeyboardNav-DuxPdAeK.js → useFormKeyboardNav-TqhfyJIg.js} +47 -28
- package/dist/useFormKeyboardNav-TqhfyJIg.js.map +1 -0
- package/dist/utils/chart.d.ts +26 -0
- package/dist/utils/interactiveCard.d.ts +24 -0
- package/dist/utils/meter.d.ts +15 -0
- package/dist/utils/sparkline.d.ts +15 -0
- package/package.json +1 -1
- package/skill/references/components.md +1 -1
- package/dist/components-BHHLGp-P.js.map +0 -1
- package/dist/components-Ml8IKELa.cjs +0 -25
- package/dist/components-Ml8IKELa.cjs.map +0 -1
- package/dist/useFormKeyboardNav-CzKY9ZV2.cjs.map +0 -1
- package/dist/useFormKeyboardNav-DuxPdAeK.js.map +0 -1
package/dist/components.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components-BRNk60nY.cjs");exports.WActionBar=e.h,exports.WAutoCompleteFK=e.J,exports.WChart=e.A,exports.WCheckList=e.u,exports.WCrudColumnRenderer=e.$,exports.WCrudFormDialog=e.H,exports.WCrudSubview=e.L,exports.WCrudView=e.z,exports.WDatePicker=e.q,exports.WDateRange=e.I,exports.WDetailHeader=e.E,exports.WDialog=e.a,exports.WEditableTable=e.R,exports.WEmptyState=e.D,exports.WFileUpload=e.F,exports.WFormRenderer=e.U,exports.WFormSection=e.g,exports.WImageCropper=e.G,exports.WInfoCard=e.T,exports.WKanbanBoard=e.t,exports.WKpiCard=e.w,exports.WKpiGrid=e.C,exports.WMapSelect=e.l,exports.WMarkdownEditor=e.s,exports.WMarkdownToc=e.o,exports.WMarkdownView=e.c,exports.WMeter=e.x,exports.WMoneyInput=e.K,exports.WPageHeader=e.O,exports.WProgressFlow=e.m,exports.WSectionAccordion=e.y,exports.WSectionHeader=e.v,exports.WSectionPanel=e._,exports.WStatusTag=e.k,exports.WStepFlow=e.f,exports.WStepSection=e.d,exports.WTabBar=e.i,exports.WTabNav=e.r,exports.WTabViewport=e.n,exports.WTransferList=e.W,exports.WTreeSelect=e.P;
|
package/dist/components.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { $ as e, A as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, O as f, P as p, R as m, T as h, U as g, W as _, _ as v, a as y, c as b, d as x, f as S, g as C, h as w, i as T, k as E, l as D, m as O, n as k, o as A, q as j, r as M, s as N, t as P, u as F, v as I, w as L, x as R, y as z, z as B } from "./components-DsMEndfN.js";
|
|
2
|
+
export { w as WActionBar, l as WAutoCompleteFK, t as WChart, F as WCheckList, e as WCrudColumnRenderer, s as WCrudFormDialog, d as WCrudSubview, B as WCrudView, j as WDatePicker, c as WDateRange, i as WDetailHeader, y as WDialog, m as WEditableTable, r as WEmptyState, a as WFileUpload, g as WFormRenderer, C as WFormSection, o as WImageCropper, h as WInfoCard, P as WKanbanBoard, L as WKpiCard, n as WKpiGrid, D as WMapSelect, N as WMarkdownEditor, A as WMarkdownToc, b as WMarkdownView, R as WMeter, u as WMoneyInput, f as WPageHeader, O as WProgressFlow, z as WSectionAccordion, I as WSectionHeader, v as WSectionPanel, E as WStatusTag, S as WStepFlow, x as WStepSection, T as WTabBar, M as WTabNav, k as WTabViewport, _ as WTransferList, p as WTreeSelect };
|
|
@@ -2,6 +2,8 @@ import { parseDate, toDateString, toDateTimeString } from '../utils/dates';
|
|
|
2
2
|
import { formatCpf, formatCnpj, formatCpfCnpj, formatTelefone, validateCpf, validateCnpj, validateCpfCnpj } from '../utils/masks';
|
|
3
3
|
export declare function useFormatters(): {
|
|
4
4
|
formatCurrency: (value: number | null | undefined) => string;
|
|
5
|
+
formatCurrencyCompact: (value: number | null | undefined) => string;
|
|
6
|
+
formatNumberCompact: (value: number | null | undefined) => string;
|
|
5
7
|
formatNumber: (value: number | null | undefined, decimals?: number) => string;
|
|
6
8
|
formatDate: (value: string | Date | null | undefined, format?: string) => string;
|
|
7
9
|
formatDateTime: (value: string | Date | null | undefined) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, h as r, m as i, o as a, p as o, r as s, s as c, u as l } from "./useFormKeyboardNav-
|
|
1
|
+
import { a as e, c as t, d as n, h as r, m as i, o as a, p as o, r as s, s as c, u as l } from "./useFormKeyboardNav-TqhfyJIg.js";
|
|
2
2
|
import { a as u, i as d } from "./routeTabs-D6m8PuP6.js";
|
|
3
3
|
import { t as f } from "./labels-CXBhCk2N.js";
|
|
4
4
|
import { computed as p, inject as m, reactive as h, ref as g, shallowReactive as _ } from "vue";
|
|
@@ -14,7 +14,7 @@ function y(_) {
|
|
|
14
14
|
let N = M, P = m(d), ee = _.pageSize ?? P?.defaultPageSize ?? 20, F = {
|
|
15
15
|
...f,
|
|
16
16
|
..._.labels
|
|
17
|
-
}, I = a(), { confirmDelete:
|
|
17
|
+
}, I = a(), { confirmDelete: te } = e(), L = g([]), R = g([]), z = g({}), B = g(!1), V = 0, H = g(!1), U = g(""), W = g(!1), G = g(!1), K = g(null), q = h({}), J = null, Y = h({
|
|
18
18
|
page: 1,
|
|
19
19
|
pageSize: ee,
|
|
20
20
|
rows: 0,
|
|
@@ -30,8 +30,8 @@ function y(_) {
|
|
|
30
30
|
for (let e of Object.keys(re)) q[e] = re[e];
|
|
31
31
|
let Q = p(() => K.value !== null && !G.value), ie = p(() => G.value), ae = p(() => G.value ? F.viewTitle ?? "Visualizar Registro" : Q.value ? F.editTitle : F.createTitle), oe = p(() => Y.page <= 1), se = p(() => Y.page >= Y.totalPages), ce = null;
|
|
32
32
|
async function $(e = {}) {
|
|
33
|
-
let t = ++
|
|
34
|
-
|
|
33
|
+
let t = ++V;
|
|
34
|
+
B.value = !0;
|
|
35
35
|
try {
|
|
36
36
|
let n = {
|
|
37
37
|
page: Y.page,
|
|
@@ -41,10 +41,10 @@ function y(_) {
|
|
|
41
41
|
U.value && (n.search = U.value), X.field && X.order !== 0 && (n.ordering = X.order === -1 ? `-${X.field}` : X.field), E && Object.assign(n, E());
|
|
42
42
|
for (let [e, t] of Object.entries(Z)) t != null && t !== "" && (n[e] = t);
|
|
43
43
|
let r = await N.list(y, n);
|
|
44
|
-
if (t !==
|
|
45
|
-
|
|
44
|
+
if (t !== V) return;
|
|
45
|
+
L.value = O ? O(r.data) : r.data, R.value = [], Y.rows = r.rows, z.value = r.extras ?? {}, r.page && (Y.page = r.page), r.page_size && (Y.pageSize = r.page_size), Y.totalPages = Math.ceil(Y.rows / Y.pageSize) || 0;
|
|
46
46
|
} finally {
|
|
47
|
-
t ===
|
|
47
|
+
t === V && (B.value = !1);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
async function le() {
|
|
@@ -156,7 +156,7 @@ function y(_) {
|
|
|
156
156
|
async function Ae() {
|
|
157
157
|
let e = n(b, q, Q.value);
|
|
158
158
|
if (e) return I.error(e), null;
|
|
159
|
-
|
|
159
|
+
H.value = !0;
|
|
160
160
|
try {
|
|
161
161
|
let e = ke(q);
|
|
162
162
|
if (!Q.value && D) {
|
|
@@ -186,25 +186,25 @@ function y(_) {
|
|
|
186
186
|
if (Q.value && K.value) {
|
|
187
187
|
let e = K.value[x];
|
|
188
188
|
if (a = await N.update(y, e, n, i), !w) {
|
|
189
|
-
let t =
|
|
190
|
-
t !== -1 && (
|
|
189
|
+
let t = L.value.findIndex((t) => t[x] === e);
|
|
190
|
+
t !== -1 && (L.value[t] = a.data);
|
|
191
191
|
}
|
|
192
192
|
I.success(F.successUpdate);
|
|
193
|
-
} else a = await N.create(y, n, i), w || (
|
|
193
|
+
} else a = await N.create(y, n, i), w || (L.value.unshift(a.data), Y.rows++), I.success(F.successCreate);
|
|
194
194
|
return W.value = !1, K.value = null, J = null, w && await $(), A && A(a.data, Q.value), a.data;
|
|
195
195
|
} catch (e) {
|
|
196
196
|
return I.error(s(e, "Erro ao salvar registro")), null;
|
|
197
197
|
} finally {
|
|
198
|
-
|
|
198
|
+
H.value = !1;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
async function je(e, t, n) {
|
|
202
202
|
let a = e[x], o = b.find((e) => e.field === t), c = n;
|
|
203
203
|
o?.type === "date" && c instanceof Date ? c = i(c) : o?.type === "datetime" && c instanceof Date && (c = r(c));
|
|
204
204
|
try {
|
|
205
|
-
let e = await N.update(y, a, { [t]: c }), n =
|
|
206
|
-
n !== -1 && (
|
|
207
|
-
...
|
|
205
|
+
let e = await N.update(y, a, { [t]: c }), n = L.value.findIndex((e) => e[x] === a);
|
|
206
|
+
n !== -1 && (L.value[n] = {
|
|
207
|
+
...L.value[n],
|
|
208
208
|
...e.data
|
|
209
209
|
}), I.success(F.successUpdate);
|
|
210
210
|
} catch (e) {
|
|
@@ -215,17 +215,17 @@ function y(_) {
|
|
|
215
215
|
try {
|
|
216
216
|
let t = e[x];
|
|
217
217
|
await N.delete(y, t);
|
|
218
|
-
let n =
|
|
219
|
-
n !== -1 && (
|
|
218
|
+
let n = L.value.findIndex((e) => e[x] === t);
|
|
219
|
+
n !== -1 && (L.value.splice(n, 1), Y.rows--), I.success(F.successDelete), j && j(e);
|
|
220
220
|
} catch (e) {
|
|
221
221
|
I.error(s(e, "Erro ao excluir registro"));
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
function Ne(e) {
|
|
225
|
-
|
|
225
|
+
te(() => Me(e), F.deleteConfirmMessage);
|
|
226
226
|
}
|
|
227
227
|
function Pe() {
|
|
228
|
-
|
|
228
|
+
R.value = [];
|
|
229
229
|
}
|
|
230
230
|
function Fe(e, t) {
|
|
231
231
|
t == null || t === "" ? delete Z[e] : Z[e] = t, Y.page = 1, $();
|
|
@@ -235,12 +235,12 @@ function y(_) {
|
|
|
235
235
|
Y.page = 1, $();
|
|
236
236
|
}
|
|
237
237
|
return {
|
|
238
|
-
items:
|
|
239
|
-
selectedItems:
|
|
238
|
+
items: L,
|
|
239
|
+
selectedItems: R,
|
|
240
240
|
columnFilters: Z,
|
|
241
|
-
extras:
|
|
242
|
-
loading:
|
|
243
|
-
saving:
|
|
241
|
+
extras: z,
|
|
242
|
+
loading: B,
|
|
243
|
+
saving: H,
|
|
244
244
|
search: U,
|
|
245
245
|
dialogVisible: W,
|
|
246
246
|
editingItem: K,
|
|
@@ -302,21 +302,21 @@ function b(r) {
|
|
|
302
302
|
function I() {
|
|
303
303
|
O.value = null, k.value = -1, P(), F(), D.value = !0;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function te(e) {
|
|
306
306
|
if (l(e, s, A), v) for (let [t, n] of Object.entries(v(e))) A[t] = n;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
O.value = e, k.value = t,
|
|
308
|
+
function L(e, t) {
|
|
309
|
+
O.value = e, k.value = t, te(e), D.value = !0;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
O.value = null, k.value = -1, P(),
|
|
311
|
+
function R(e) {
|
|
312
|
+
O.value = null, k.value = -1, P(), te(e), F(), D.value = !0;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function z(e) {
|
|
315
315
|
if (!m) return;
|
|
316
316
|
let t = typeof m == "function" ? m(e) : e[m];
|
|
317
317
|
if (t != null && t !== "") return String(t);
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function B() {
|
|
320
320
|
let e = n(s, A, M.value);
|
|
321
321
|
if (e) return C.error(e), null;
|
|
322
322
|
let t = c(A, s);
|
|
@@ -328,17 +328,17 @@ function b(r) {
|
|
|
328
328
|
let r = T.value, i = k.value, a = i >= 0, l = a ? {
|
|
329
329
|
...r[i],
|
|
330
330
|
...t
|
|
331
|
-
} : { ...t }, f =
|
|
332
|
-
if (f !== void 0 && r.some((e, t) => t !== i &&
|
|
331
|
+
} : { ...t }, f = z(l);
|
|
332
|
+
if (f !== void 0 && r.some((e, t) => t !== i && z(e) === f)) return C.error(_), null;
|
|
333
333
|
let p = a ? r.map((e, t) => t === i ? l : e) : [...r, l];
|
|
334
334
|
return o(p), x && C.success(a ? S.successUpdate : S.successCreate), y?.(l, a), D.value = !1, O.value = null, k.value = -1, l;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function V(e) {
|
|
337
337
|
let t = T.value, n = t[e];
|
|
338
338
|
n !== void 0 && (o(t.filter((t, n) => n !== e)), x && C.success(S.successDelete), b?.(n, e));
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
w(() =>
|
|
340
|
+
function H(e, t) {
|
|
341
|
+
w(() => V(t), S.deleteConfirmMessage);
|
|
342
342
|
}
|
|
343
343
|
return {
|
|
344
344
|
items: T,
|
|
@@ -350,11 +350,11 @@ function b(r) {
|
|
|
350
350
|
isEditing: M,
|
|
351
351
|
dialogTitle: N,
|
|
352
352
|
openCreateDialog: I,
|
|
353
|
-
openEditDialog:
|
|
354
|
-
openDuplicateDialog:
|
|
355
|
-
save:
|
|
356
|
-
confirmDelete:
|
|
357
|
-
performDelete:
|
|
353
|
+
openEditDialog: L,
|
|
354
|
+
openDuplicateDialog: R,
|
|
355
|
+
save: B,
|
|
356
|
+
confirmDelete: H,
|
|
357
|
+
performDelete: V,
|
|
358
358
|
setFormField: ee,
|
|
359
359
|
resetForm: P,
|
|
360
360
|
labels: S,
|
|
@@ -488,7 +488,7 @@ function E(e) {
|
|
|
488
488
|
if (!e) return;
|
|
489
489
|
let t = JSON.parse(e);
|
|
490
490
|
if (t?.v !== 1 || !Array.isArray(t.tabs)) return;
|
|
491
|
-
f.value = t.tabs.filter((e) => e && typeof e.key == "string" && typeof e.fullPath == "string").map((e) => ({
|
|
491
|
+
f.value = t.tabs.filter((e) => e && typeof e.key == "string" && typeof e.fullPath == "string").filter((e) => S(e.fullPath)).map((e) => ({
|
|
492
492
|
...e,
|
|
493
493
|
hydrated: !1,
|
|
494
494
|
remount: 0
|
|
@@ -496,9 +496,17 @@ function E(e) {
|
|
|
496
496
|
} catch {}
|
|
497
497
|
}
|
|
498
498
|
function S(e) {
|
|
499
|
-
|
|
499
|
+
try {
|
|
500
|
+
let n = t.resolve(e), r = n.matched[n.matched.length - 1];
|
|
501
|
+
return !r || r.redirect ? !1 : o(n);
|
|
502
|
+
} catch {
|
|
503
|
+
return !1;
|
|
504
|
+
}
|
|
500
505
|
}
|
|
501
506
|
function E(e) {
|
|
507
|
+
return f.value.find((t) => t.key === e);
|
|
508
|
+
}
|
|
509
|
+
function D(e) {
|
|
502
510
|
if (e.group) {
|
|
503
511
|
for (let t = f.value.length - 1; t >= 0; --t) if (f.value[t].group === e.group) {
|
|
504
512
|
f.value.splice(t + 1, 0, e);
|
|
@@ -507,22 +515,22 @@ function E(e) {
|
|
|
507
515
|
}
|
|
508
516
|
f.value.push(e);
|
|
509
517
|
}
|
|
510
|
-
function
|
|
518
|
+
function O(e) {
|
|
511
519
|
let t = a(e);
|
|
512
520
|
return t.title ? t.title : typeof e.name == "string" ? e.name : e.path;
|
|
513
521
|
}
|
|
514
|
-
function
|
|
522
|
+
function k(e, t) {
|
|
515
523
|
let r = m.get(e.key);
|
|
516
524
|
if (r && n === "module" && r.route.path !== t.path && (i?.(r.route, t) ?? !0)) {
|
|
517
525
|
m.delete(e.key), r = void 0, e.remount += 1;
|
|
518
526
|
let n = a(t);
|
|
519
|
-
e.title = n.title ??
|
|
527
|
+
e.title = n.title ?? O(t), n.icon && (e.icon = n.icon);
|
|
520
528
|
}
|
|
521
529
|
if (r) r.component = T(t), r.props = w(t), Object.assign(r.route, C(t));
|
|
522
530
|
else {
|
|
523
531
|
if (e.fullPath.split(/[?#]/)[0] !== t.path) {
|
|
524
532
|
let n = a(t);
|
|
525
|
-
e.title = n.title ??
|
|
533
|
+
e.title = n.title ?? O(t), n.icon && (e.icon = n.icon);
|
|
526
534
|
}
|
|
527
535
|
r = {
|
|
528
536
|
component: T(t),
|
|
@@ -531,107 +539,107 @@ function E(e) {
|
|
|
531
539
|
closeGuards: [],
|
|
532
540
|
activatedHooks: [],
|
|
533
541
|
deactivatedHooks: [],
|
|
534
|
-
defaultTitle:
|
|
542
|
+
defaultTitle: O(t)
|
|
535
543
|
}, m.set(e.key, r);
|
|
536
544
|
}
|
|
537
545
|
e.fullPath = t.fullPath, e.hydrated = !0;
|
|
538
546
|
}
|
|
539
|
-
function
|
|
547
|
+
function A() {
|
|
540
548
|
if (!u || f.value.length <= u) return;
|
|
541
549
|
let e = f.value.find((e) => e.key !== p.value && e.closable);
|
|
542
|
-
e &&
|
|
550
|
+
e && P(e.key);
|
|
543
551
|
}
|
|
544
552
|
n === "module" && t.beforeEach(async (e, t) => {
|
|
545
553
|
if (!h || !o(e) || !o(t)) return !0;
|
|
546
554
|
let n = d(e);
|
|
547
|
-
return n !== p.value || n !== d(t) || t.path === e.path || await
|
|
555
|
+
return n !== p.value || n !== d(t) || t.path === e.path || await M(n);
|
|
548
556
|
}), t.afterEach((e, t, n) => {
|
|
549
557
|
if (n) return;
|
|
550
558
|
if ((!h || s && y() !== v) && x(), !o(e)) {
|
|
551
559
|
p.value = null;
|
|
552
560
|
return;
|
|
553
561
|
}
|
|
554
|
-
let r = d(e), i =
|
|
562
|
+
let r = d(e), i = E(r);
|
|
555
563
|
if (!i) {
|
|
556
564
|
let t = a(e);
|
|
557
565
|
i = {
|
|
558
566
|
key: r,
|
|
559
567
|
fullPath: e.fullPath,
|
|
560
|
-
title: t.title ??
|
|
568
|
+
title: t.title ?? O(e),
|
|
561
569
|
icon: t.icon,
|
|
562
570
|
closable: t.closable ?? !0,
|
|
563
571
|
group: t.group,
|
|
564
572
|
color: t.color,
|
|
565
573
|
hydrated: !1,
|
|
566
574
|
remount: 0
|
|
567
|
-
},
|
|
575
|
+
}, D(i);
|
|
568
576
|
}
|
|
569
|
-
|
|
577
|
+
k(i, e), p.value = r, A(), b();
|
|
570
578
|
});
|
|
571
|
-
async function
|
|
572
|
-
let n =
|
|
579
|
+
async function j(e) {
|
|
580
|
+
let n = E(e);
|
|
573
581
|
!n || e === p.value || await t.push(n.fullPath);
|
|
574
582
|
}
|
|
575
|
-
async function
|
|
583
|
+
async function M(e) {
|
|
576
584
|
let t = m.get(e);
|
|
577
585
|
if (!t) return !0;
|
|
578
586
|
for (let e of [...t.closeGuards]) if (!await e()) return !1;
|
|
579
587
|
return !0;
|
|
580
588
|
}
|
|
581
|
-
function
|
|
589
|
+
function N(e) {
|
|
582
590
|
f.value = f.value.filter((t) => t.key !== e), m.delete(e);
|
|
583
591
|
}
|
|
584
|
-
async function
|
|
585
|
-
let n =
|
|
592
|
+
async function P(e) {
|
|
593
|
+
let n = E(e);
|
|
586
594
|
if (!n) return !0;
|
|
587
|
-
if (!n.closable || !await
|
|
595
|
+
if (!n.closable || !await M(e)) return !1;
|
|
588
596
|
let r = f.value.findIndex((t) => t.key === e), i = e === p.value;
|
|
589
|
-
if (
|
|
597
|
+
if (N(e), i) {
|
|
590
598
|
let e = f.value[r - 1] ?? f.value[r] ?? null;
|
|
591
599
|
e ? (p.value = null, await t.push(e.fullPath)) : (p.value = null, await t.push(l));
|
|
592
600
|
}
|
|
593
601
|
return b(), !0;
|
|
594
602
|
}
|
|
595
|
-
async function
|
|
596
|
-
for (let t of f.value.filter((t) => t.key !== e && t.closable)) await
|
|
597
|
-
b(), await
|
|
603
|
+
async function ee(e) {
|
|
604
|
+
for (let t of f.value.filter((t) => t.key !== e && t.closable)) await M(t.key).then((e) => e && N(t.key));
|
|
605
|
+
b(), await j(e);
|
|
598
606
|
}
|
|
599
|
-
async function
|
|
607
|
+
async function F() {
|
|
600
608
|
let e = !1;
|
|
601
609
|
for (let t of [...f.value]) {
|
|
602
|
-
if (!t.closable || !await
|
|
610
|
+
if (!t.closable || !await M(t.key)) {
|
|
603
611
|
e ||= t.key === p.value;
|
|
604
612
|
continue;
|
|
605
613
|
}
|
|
606
|
-
|
|
614
|
+
N(t.key);
|
|
607
615
|
}
|
|
608
616
|
if (b(), !e && p.value) {
|
|
609
617
|
let e = f.value[0];
|
|
610
618
|
p.value = null, await t.push(e ? e.fullPath : l);
|
|
611
619
|
}
|
|
612
620
|
}
|
|
613
|
-
function
|
|
614
|
-
let t =
|
|
621
|
+
function I(e) {
|
|
622
|
+
let t = E(e);
|
|
615
623
|
if (!t?.hydrated) return;
|
|
616
624
|
let n = m.get(e);
|
|
617
625
|
n && (n.closeGuards = [], n.activatedHooks = [], n.deactivatedHooks = []), t.remount += 1;
|
|
618
626
|
}
|
|
619
|
-
function
|
|
620
|
-
let n =
|
|
627
|
+
function te(e, t) {
|
|
628
|
+
let n = E(e);
|
|
621
629
|
n && (n.title = t ?? m.get(e)?.defaultTitle ?? n.title, b());
|
|
622
630
|
}
|
|
623
631
|
function L(e) {
|
|
624
|
-
return
|
|
632
|
+
return E(typeof e == "string" ? e : d(e))?.hydrated ?? !1;
|
|
625
633
|
}
|
|
626
634
|
return {
|
|
627
635
|
tabs: f,
|
|
628
636
|
activeKey: p,
|
|
629
|
-
activate:
|
|
630
|
-
close:
|
|
631
|
-
closeOthers:
|
|
632
|
-
closeAll:
|
|
633
|
-
reload:
|
|
634
|
-
setTitle:
|
|
637
|
+
activate: j,
|
|
638
|
+
close: P,
|
|
639
|
+
closeOthers: ee,
|
|
640
|
+
closeAll: F,
|
|
641
|
+
reload: I,
|
|
642
|
+
setTitle: te,
|
|
635
643
|
isLive: L,
|
|
636
644
|
runtime: (e) => m.get(e)
|
|
637
645
|
};
|
|
@@ -639,4 +647,4 @@ function E(e) {
|
|
|
639
647
|
//#endregion
|
|
640
648
|
export { y as a, b as i, S as n, x as r, E as t };
|
|
641
649
|
|
|
642
|
-
//# sourceMappingURL=composables-
|
|
650
|
+
//# sourceMappingURL=composables-B9ywPF1T.js.map
|