@webx-ui/module-pages 0.3.7 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,36 +1,36 @@
1
- import { inject as Ae, provide as Ie, defineComponent as F, ref as _, computed as W, openBlock as f, createBlock as C, unref as e, withCtx as i, createElementVNode as K, createElementBlock as N, createVNode as v, createTextVNode as $, toDisplayString as x, createCommentVNode as I, watch as ae, onMounted as ce, onBeforeUnmount as Ue, Fragment as Z, renderList as Ce, normalizeClass as Re, useModel as Le, mergeModels as Oe, useTemplateRef as Ke, nextTick as Fe, isRef as Me, withKeys as Pe, withModifiers as He } from "vue";
2
- import { useRouter as _e, useRoute as je, onBeforeRouteLeave as Ge } from "vue-router";
3
- import { useAdmin as Q, useTranslate as H, useErrorText as ie, WxScreenHead as Je, WxScreen as Qe, WxSaveState as Xe, WxDate as be, WxRowMenu as Ye, rowMenuWidth as Ze, WxListScreen as qe } from "@webx-ui/module-admin";
4
- import { WxCard as et, WxText as U, WxButton as R, confirm as L, toast as V, useLocales as Se, localizedValue as tt, WxSkeleton as ye, WxBadge as xe, WxBreadcrumb as at, WxBreadcrumbItem as fe, WxAlert as ke, WxActionBar as lt, WxEmpty as st, WxTreeSelect as nt, WxFormItem as ne, useModal as Be, WxDialog as De, WxInput as We, WxSpace as we, createModal as Ve, WxTable as it } from "@webx-ui/core";
1
+ import { inject as Ie, provide as Ue, defineComponent as F, ref as _, computed as W, openBlock as f, createBlock as C, unref as e, withCtx as i, createElementVNode as K, createElementBlock as N, createVNode as g, createTextVNode as $, toDisplayString as x, createCommentVNode as I, watch as ae, onMounted as ce, onBeforeUnmount as Re, Fragment as Z, renderList as Ce, normalizeClass as Le, useModel as Oe, mergeModels as Ke, useTemplateRef as Fe, nextTick as He, isRef as Me, withKeys as Pe, withModifiers as je } from "vue";
2
+ import { useRouter as _e, useRoute as Ge, onBeforeRouteLeave as Je } from "vue-router";
3
+ import { useAdmin as Q, useTranslate as H, useErrorText as ie, WxScreenHead as Qe, WxScreen as Xe, WxSaveState as Ye, WxDate as be, WxRowMenu as Ze, rowMenuWidth as qe, WxListScreen as et } from "@webx-ui/module-admin";
4
+ import { WxCard as Se, WxText as U, WxButton as R, confirm as L, toast as V, useLocales as Be, localizedValue as tt, WxSkeleton as ye, WxBadge as xe, WxBreadcrumb as at, WxBreadcrumbItem as fe, WxAlert as ke, WxActionBar as lt, WxEmpty as st, WxTreeSelect as nt, WxFormItem as ne, useModal as De, WxDialog as Ne, WxInput as We, WxSpace as we, createModal as Ve, WxTable as it } from "@webx-ui/core";
5
5
  import { provideBlocksPreview as ot } from "@webx-ui/module-blocks";
6
6
  function q(u) {
7
- const o = `${u.apiPath}/pages`, g = (a) => a.data;
7
+ const o = `${u.apiPath}/pages`, v = (a) => a.data;
8
8
  return {
9
9
  list: (a = {}) => {
10
10
  const s = new URLSearchParams();
11
11
  a.parent != null && s.set("parent", String(a.parent)), a.search && s.set("search", a.search), a.status && s.set("status", a.status), a.trashed && s.set("trashed", "1"), a.flat && s.set("flat", "1");
12
12
  const t = s.size > 0 ? `?${s}` : "";
13
- return u.http.get(`${o}${t}`).then(g);
13
+ return u.http.get(`${o}${t}`).then(v);
14
14
  },
15
- get: (a) => u.http.get(`${o}/${a}`).then(g),
16
- create: (a) => u.http.post(o, a).then(g),
17
- save: (a, s) => u.http.put(`${o}/${a}`, s).then(g),
18
- move: (a, s, t) => u.http.post(`${o}/${a}/move`, { target: s, zone: t }).then(g),
19
- duplicate: (a) => u.http.post(`${o}/${a}/duplicate`, {}).then(g),
20
- publish: (a) => u.http.post(`${o}/${a}/publish`, {}).then(g),
21
- unpublish: (a) => u.http.post(`${o}/${a}/unpublish`, {}).then(g),
15
+ get: (a) => u.http.get(`${o}/${a}`).then(v),
16
+ create: (a) => u.http.post(o, a).then(v),
17
+ save: (a, s) => u.http.put(`${o}/${a}`, s).then(v),
18
+ move: (a, s, t) => u.http.post(`${o}/${a}/move`, { target: s, zone: t }).then(v),
19
+ duplicate: (a) => u.http.post(`${o}/${a}/duplicate`, {}).then(v),
20
+ publish: (a) => u.http.post(`${o}/${a}/publish`, {}).then(v),
21
+ unpublish: (a) => u.http.post(`${o}/${a}/unpublish`, {}).then(v),
22
22
  remove: (a) => u.http.delete(`${o}/${a}`).then((s) => s.data.trashed),
23
23
  restore: (a) => u.http.post(`${o}/${a}/restore`, {}).then((s) => s.data.restored),
24
- versions: (a) => u.http.get(`${o}/${a}/versions`).then(g),
25
- restoreVersion: (a, s) => u.http.post(`${o}/${a}/versions/${s}/restore`, {}).then(g)
24
+ versions: (a) => u.http.get(`${o}/${a}/versions`).then(v),
25
+ restoreVersion: (a, s) => u.http.post(`${o}/${a}/versions/${s}/restore`, {}).then(v)
26
26
  };
27
27
  }
28
- const Ne = /* @__PURE__ */ Symbol("wx-page-editor");
28
+ const Ee = /* @__PURE__ */ Symbol("wx-page-editor");
29
29
  function rt(u) {
30
- Ie(Ne, u);
30
+ Ue(Ee, u);
31
31
  }
32
32
  function Te() {
33
- return Ae(Ne, null);
33
+ return Ie(Ee, null);
34
34
  }
35
35
  const ut = {
36
36
  module: {
@@ -149,7 +149,7 @@ const dt = { class: "wx-page-danger" }, ct = {
149
149
  name: "WxPageDanger",
150
150
  __name: "PageDanger",
151
151
  setup(u) {
152
- const o = Q(), g = q(o), a = _e(), s = Te();
152
+ const o = Q(), v = q(o), a = _e(), s = Te();
153
153
  j();
154
154
  const t = H("webx-pages"), d = ie(), l = _(!1), c = W(() => s?.page.value ?? null), h = W(() => o.can("pages.manage"));
155
155
  async function r() {
@@ -163,7 +163,7 @@ const dt = { class: "wx-page-danger" }, ct = {
163
163
  }))) {
164
164
  l.value = !0;
165
165
  try {
166
- await g.unpublish(w.id), await s?.reload(), V.success(t("page.unpublished"));
166
+ await v.unpublish(w.id), await s?.reload(), V.success(t("page.unpublished"));
167
167
  } catch (b) {
168
168
  V.danger(d(b));
169
169
  } finally {
@@ -184,7 +184,7 @@ const dt = { class: "wx-page-danger" }, ct = {
184
184
  }))) {
185
185
  l.value = !0;
186
186
  try {
187
- await g.remove(w.id), V.success(t("page.deleted")), a.push(s?.base ?? "/pages");
187
+ await v.remove(w.id), V.success(t("page.deleted")), a.push(s?.base ?? "/pages");
188
188
  } catch (b) {
189
189
  V.danger(d(b));
190
190
  } finally {
@@ -192,7 +192,7 @@ const dt = { class: "wx-page-danger" }, ct = {
192
192
  }
193
193
  }
194
194
  }
195
- return (w, z) => c.value && h.value ? (f(), C(e(et), {
195
+ return (w, z) => c.value && h.value ? (f(), C(e(Se), {
196
196
  key: 0,
197
197
  title: e(t)("page.danger")
198
198
  }, {
@@ -200,13 +200,13 @@ const dt = { class: "wx-page-danger" }, ct = {
200
200
  K("div", dt, [
201
201
  c.value.status !== "draft" ? (f(), N("div", ct, [
202
202
  K("div", pt, [
203
- v(e(U), { weight: "medium" }, {
203
+ g(e(U), { weight: "medium" }, {
204
204
  default: i(() => [
205
205
  $(x(e(t)("page.unpublish")), 1)
206
206
  ]),
207
207
  _: 1
208
208
  }),
209
- v(e(U), {
209
+ g(e(U), {
210
210
  size: "sm",
211
211
  tone: "muted"
212
212
  }, {
@@ -216,7 +216,7 @@ const dt = { class: "wx-page-danger" }, ct = {
216
216
  _: 1
217
217
  })
218
218
  ]),
219
- v(e(R), {
219
+ g(e(R), {
220
220
  variant: "outline",
221
221
  loading: l.value,
222
222
  onClick: r
@@ -229,13 +229,13 @@ const dt = { class: "wx-page-danger" }, ct = {
229
229
  ])) : I("", !0),
230
230
  K("div", gt, [
231
231
  K("div", vt, [
232
- v(e(U), { weight: "medium" }, {
232
+ g(e(U), { weight: "medium" }, {
233
233
  default: i(() => [
234
234
  $(x(e(t)("page.delete")), 1)
235
235
  ]),
236
236
  _: 1
237
237
  }),
238
- v(e(U), {
238
+ g(e(U), {
239
239
  size: "sm",
240
240
  tone: "muted"
241
241
  }, {
@@ -245,7 +245,7 @@ const dt = { class: "wx-page-danger" }, ct = {
245
245
  _: 1
246
246
  })
247
247
  ]),
248
- v(e(R), {
248
+ g(e(R), {
249
249
  type: "danger",
250
250
  variant: "outline",
251
251
  disabled: !c.value.can.delete,
@@ -264,19 +264,19 @@ const dt = { class: "wx-page-danger" }, ct = {
264
264
  }, 8, ["title"])) : I("", !0);
265
265
  }
266
266
  }), oe = (u, o) => {
267
- const g = u.__vccOpts || u;
267
+ const v = u.__vccOpts || u;
268
268
  for (const [a, s] of o)
269
- g[a] = s;
270
- return g;
269
+ v[a] = s;
270
+ return v;
271
271
  }, mt = /* @__PURE__ */ oe(ht, [["__scopeId", "data-v-d4a9083f"]]), ft = { class: "wx-page-editor__screen" }, bt = 1200, yt = /* @__PURE__ */ F({
272
272
  __name: "PageEditorPage",
273
273
  props: {
274
274
  base: { default: "/pages" }
275
275
  },
276
276
  setup(u) {
277
- const o = u, g = Q(), a = q(g), s = je(), t = _e(), d = Se();
277
+ const o = u, v = Q(), a = q(v), s = Ge(), t = _e(), d = Be();
278
278
  j();
279
- const l = H("webx-pages"), c = ie(), h = W(() => Number(s.params.id)), r = _(null), k = _([]), w = _({}), z = _(""), b = _(null), p = _({}), M = _(!0), P = _(!1), B = _(!1), le = _({}), A = _(null), ee = _(""), re = _(0), S = W(() => g.can("pages.manage")), te = W(() => JSON.stringify(w.value)), E = W(() => ee.value !== "" && te.value !== ee.value), ue = W(() => P.value ? "saving" : E.value ? "unsaved" : "saved"), de = W(() => {
279
+ const l = H("webx-pages"), c = ie(), h = W(() => Number(s.params.id)), r = _(null), k = _([]), w = _({}), z = _(""), b = _(null), p = _({}), M = _(!0), P = _(!1), B = _(!1), le = _({}), A = _(null), ee = _(""), re = _(0), S = W(() => v.can("pages.manage")), te = W(() => JSON.stringify(w.value)), E = W(() => ee.value !== "" && te.value !== ee.value), ue = W(() => P.value ? "saving" : E.value ? "unsaved" : "saved"), de = W(() => {
280
280
  const y = w.value.title;
281
281
  return tt(y, d.active.value, r.value?.title ?? "");
282
282
  }), pe = W(
@@ -374,16 +374,16 @@ const dt = { class: "wx-page-danger" }, ct = {
374
374
  G();
375
375
  }), ce(() => {
376
376
  G(), window.addEventListener("beforeunload", J);
377
- }), Ue(() => {
377
+ }), Re(() => {
378
378
  clearTimeout(X), window.removeEventListener("beforeunload", J);
379
- }), Ge(async () => !E.value || !S.value || (await O(), !E.value) ? !0 : await L({
379
+ }), Je(async () => !E.value || !S.value || (await O(), !E.value) ? !0 : await L({
380
380
  title: l("page.leave-title"),
381
381
  message: l("page.leave-text"),
382
382
  confirmText: l("page.leave"),
383
383
  cancelText: l("page.cancel"),
384
384
  tone: "danger"
385
385
  }));
386
- const Ee = W(() => {
386
+ const Ae = W(() => {
387
387
  const y = [];
388
388
  return b.value && y.push({ key: "preview", label: l("page.preview"), icon: "eye", href: b.value }), r.value?.url && r.value.status !== "draft" && y.push({ key: "site", label: l("page.open-on-site"), icon: "link", href: r.value.url }), y;
389
389
  });
@@ -392,27 +392,32 @@ const dt = { class: "wx-page-danger" }, ct = {
392
392
  onFocusout: he
393
393
  }, [
394
394
  M.value || !r.value ? (f(), N(Z, { key: 0 }, [
395
- v(e(ye), {
395
+ g(e(ye), {
396
396
  class: "wx-page-editor__ghost",
397
397
  title: "",
398
398
  rows: 1
399
399
  }),
400
- v(e(ye), { rows: 8 })
400
+ g(e(Se), null, {
401
+ default: i(() => [
402
+ g(e(ye), { rows: 8 })
403
+ ]),
404
+ _: 1
405
+ })
401
406
  ], 64)) : (f(), N(Z, { key: 1 }, [
402
- v(e(Je), {
407
+ g(e(Qe), {
403
408
  divider: "",
404
409
  back: u.base,
405
410
  "back-label": e(l)("module.title"),
406
411
  title: r.value.is_home ? e(l)("pages.home") : de.value || e(l)("page.untitled"),
407
- actions: Ee.value
412
+ actions: Ae.value
408
413
  }, {
409
414
  trail: i(() => [
410
- v(e(at), {
415
+ g(e(at), {
411
416
  size: "sm",
412
417
  label: e(l)("page.trail")
413
418
  }, {
414
419
  default: i(() => [
415
- v(e(fe), {
420
+ g(e(fe), {
416
421
  as: "router-link",
417
422
  to: u.base
418
423
  }, {
@@ -431,7 +436,7 @@ const dt = { class: "wx-page-danger" }, ct = {
431
436
  ]),
432
437
  _: 2
433
438
  }, 1032, ["to"]))), 128)),
434
- v(e(fe), { current: "" }, {
439
+ g(e(fe), { current: "" }, {
435
440
  default: i(() => [
436
441
  $(x(r.value.is_home ? e(l)("pages.home") : de.value), 1)
437
442
  ]),
@@ -442,7 +447,7 @@ const dt = { class: "wx-page-danger" }, ct = {
442
447
  }, 8, ["label"])
443
448
  ]),
444
449
  "title-after": i(() => [
445
- v(e(xe), {
450
+ g(e(xe), {
446
451
  type: m(),
447
452
  dot: ""
448
453
  }, {
@@ -461,7 +466,7 @@ const dt = { class: "wx-page-danger" }, ct = {
461
466
  description: A.value.message
462
467
  }, {
463
468
  actions: i(() => [
464
- v(e(R), {
469
+ g(e(R), {
465
470
  size: "sm",
466
471
  variant: "outline",
467
472
  onClick: me
@@ -471,7 +476,7 @@ const dt = { class: "wx-page-danger" }, ct = {
471
476
  ]),
472
477
  _: 1
473
478
  }),
474
- v(e(R), {
479
+ g(e(R), {
475
480
  size: "sm",
476
481
  type: "primary",
477
482
  onClick: n
@@ -485,7 +490,7 @@ const dt = { class: "wx-page-danger" }, ct = {
485
490
  _: 1
486
491
  }, 8, ["title", "description"])) : I("", !0),
487
492
  K("div", ft, [
488
- v(e(Qe), {
493
+ g(e(Xe), {
489
494
  modelValue: w.value,
490
495
  "onUpdate:modelValue": Y[0] || (Y[0] = (D) => w.value = D),
491
496
  name: "pages.form",
@@ -495,10 +500,10 @@ const dt = { class: "wx-page-danger" }, ct = {
495
500
  ]),
496
501
  S.value ? (f(), C(e(lt), { key: 1 }, {
497
502
  state: i(() => [
498
- v(e(Xe), { state: ue.value }, null, 8, ["state"])
503
+ g(e(Ye), { state: ue.value }, null, 8, ["state"])
499
504
  ]),
500
505
  default: i(() => [
501
- v(e(R), {
506
+ g(e(R), {
502
507
  variant: "outline",
503
508
  loading: P.value,
504
509
  disabled: !E.value,
@@ -509,7 +514,7 @@ const dt = { class: "wx-page-danger" }, ct = {
509
514
  ]),
510
515
  _: 1
511
516
  }, 8, ["loading", "disabled"]),
512
- v(e(R), {
517
+ g(e(R), {
513
518
  type: "primary",
514
519
  loading: B.value,
515
520
  disabled: r.value.status === "published" && !E.value,
@@ -526,11 +531,11 @@ const dt = { class: "wx-page-danger" }, ct = {
526
531
  ], 64))
527
532
  ], 32));
528
533
  }
529
- }), wt = /* @__PURE__ */ oe(yt, [["__scopeId", "data-v-653d5926"]]), _t = { class: "wx-page-history" }, xt = { class: "wx-page-history__number" }, kt = { class: "wx-page-history__who" }, Tt = /* @__PURE__ */ F({
534
+ }), wt = /* @__PURE__ */ oe(yt, [["__scopeId", "data-v-1c246b3e"]]), _t = { class: "wx-page-history" }, xt = { class: "wx-page-history__number" }, kt = { class: "wx-page-history__who" }, Tt = /* @__PURE__ */ F({
530
535
  name: "WxPageHistory",
531
536
  __name: "PageHistory",
532
537
  setup(u) {
533
- const o = Q(), g = q(o), a = Te();
538
+ const o = Q(), v = q(o), a = Te();
534
539
  j();
535
540
  const s = H("webx-pages"), t = ie(), d = _(null), l = _(!1), c = W(() => a?.page.value ?? null), h = W(() => o.can("pages.manage")), r = W(
536
541
  () => c.value?.published_at ? d.value?.[0]?.number ?? null : null
@@ -539,7 +544,7 @@ const dt = { class: "wx-page-danger" }, ct = {
539
544
  const z = c.value;
540
545
  if (z)
541
546
  try {
542
- d.value = await g.versions(z.id);
547
+ d.value = await v.versions(z.id);
543
548
  } catch (b) {
544
549
  d.value = [], V.danger(t(b));
545
550
  }
@@ -554,7 +559,7 @@ const dt = { class: "wx-page-danger" }, ct = {
554
559
  }))) {
555
560
  l.value = !0;
556
561
  try {
557
- await g.restoreVersion(b.id, z.number), await a?.reload(), V.success(s("page.restored-version", { number: z.number }));
562
+ await v.restoreVersion(b.id, z.number), await a?.reload(), V.success(s("page.restored-version", { number: z.number }));
558
563
  } catch (M) {
559
564
  V.danger(t(M));
560
565
  } finally {
@@ -580,7 +585,7 @@ const dt = { class: "wx-page-danger" }, ct = {
580
585
  description: e(s)("page.history-empty")
581
586
  }, null, 8, ["description"])) : (f(!0), N(Z, { key: 2 }, Ce(d.value, (p) => (f(), N("div", {
582
587
  key: p.number,
583
- class: Re(["wx-page-history__row", { "is-live": p.number === r.value }])
588
+ class: Le(["wx-page-history__row", { "is-live": p.number === r.value }])
584
589
  }, [
585
590
  K("code", xt, x(e(s)("page.version", { number: p.number })), 1),
586
591
  K("div", kt, [
@@ -590,7 +595,7 @@ const dt = { class: "wx-page-danger" }, ct = {
590
595
  size: "md",
591
596
  tone: "default"
592
597
  }, null, 8, ["value"])) : I("", !0),
593
- v(e(U), {
598
+ g(e(U), {
594
599
  size: "sm",
595
600
  tone: "muted"
596
601
  }, {
@@ -630,7 +635,7 @@ const dt = { class: "wx-page-danger" }, ct = {
630
635
  }
631
636
  }), $t = /* @__PURE__ */ oe(Tt, [["__scopeId", "data-v-41bcd106"]]), $e = /* @__PURE__ */ F({
632
637
  __name: "PagePicker",
633
- props: /* @__PURE__ */ Oe({
638
+ props: /* @__PURE__ */ Ke({
634
639
  exclude: { default: () => [] },
635
640
  placeholder: { default: void 0 },
636
641
  selected: { default: () => [] }
@@ -640,7 +645,7 @@ const dt = { class: "wx-page-danger" }, ct = {
640
645
  }),
641
646
  emits: ["update:modelValue"],
642
647
  setup(u) {
643
- const o = u, g = Le(u, "modelValue"), a = Q(), s = q(a);
648
+ const o = u, v = Oe(u, "modelValue"), a = Q(), s = q(a);
644
649
  j();
645
650
  const t = H("webx-pages"), d = _([]);
646
651
  ce(async () => {
@@ -665,8 +670,8 @@ const dt = { class: "wx-page-danger" }, ct = {
665
670
  return (await s.list({ parent: Number(h.id) })).items.map((k) => l(k));
666
671
  }
667
672
  return (h, r) => (f(), C(e(nt), {
668
- modelValue: g.value,
669
- "onUpdate:modelValue": r[0] || (r[0] = (k) => g.value = k),
673
+ modelValue: v.value,
674
+ "onUpdate:modelValue": r[0] || (r[0] = (k) => v.value = k),
670
675
  nodes: d.value,
671
676
  lazy: "",
672
677
  load: c,
@@ -688,7 +693,7 @@ const dt = { class: "wx-page-danger" }, ct = {
688
693
  name: "WxPagePlace",
689
694
  __name: "PagePlace",
690
695
  setup(u) {
691
- const o = Q(), g = q(o), a = Te(), s = Se();
696
+ const o = Q(), v = q(o), a = Te(), s = Be();
692
697
  j();
693
698
  const t = H("webx-pages"), d = ie(), l = _(!1), c = _(null), h = W(() => a?.page.value ?? null), r = W(() => a?.ancestors.value.length === 0 ? null : a?.prefixes.value[s.active.value] ?? null), k = W(() => {
694
699
  const b = a?.values.value.slug;
@@ -716,7 +721,7 @@ const dt = { class: "wx-page-danger" }, ct = {
716
721
  }
717
722
  l.value = !0;
718
723
  try {
719
- const P = await g.move(p.id, b, "inside");
724
+ const P = await v.move(p.id, b, "inside");
720
725
  V.success(
721
726
  P.addresses_changed > 1 ? t("page.moved", { count: P.addresses_changed }) : t("page.moved-one")
722
727
  ), await a?.reload();
@@ -727,7 +732,7 @@ const dt = { class: "wx-page-danger" }, ct = {
727
732
  }
728
733
  }
729
734
  return (b, p) => h.value ? (f(), N("div", Pt, [
730
- v(e(ne), {
735
+ g(e(ne), {
731
736
  label: e(t)("page.address")
732
737
  }, {
733
738
  default: i(() => [
@@ -754,12 +759,12 @@ const dt = { class: "wx-page-danger" }, ct = {
754
759
  _: 1
755
760
  }, 8, ["label"]),
756
761
  h.value.can.move ? (f(), N(Z, { key: 0 }, [
757
- v(e(ne), {
762
+ g(e(ne), {
758
763
  label: e(t)("page.field-parent"),
759
764
  help: e(t)("page.parent-help")
760
765
  }, {
761
766
  default: i(() => [
762
- v($e, {
767
+ g($e, {
763
768
  modelValue: c.value,
764
769
  "onUpdate:modelValue": [
765
770
  p[0] || (p[0] = (M) => c.value = M),
@@ -771,7 +776,7 @@ const dt = { class: "wx-page-danger" }, ct = {
771
776
  ]),
772
777
  _: 1
773
778
  }, 8, ["label", "help"]),
774
- v(e(ke), {
779
+ g(e(ke), {
775
780
  type: "info",
776
781
  variant: "soft",
777
782
  description: e(t)("page.parent-warning")
@@ -787,11 +792,11 @@ const dt = { class: "wx-page-danger" }, ct = {
787
792
  },
788
793
  emits: ["open", "add", "duplicate", "move", "copy", "remove", "restore"],
789
794
  setup(u, { emit: o }) {
790
- const g = u, a = o;
795
+ const v = u, a = o;
791
796
  j();
792
797
  const s = H("webx-pages"), t = W(() => {
793
- const d = g.page;
794
- if (g.inBin)
798
+ const d = v.page;
799
+ if (v.inBin)
795
800
  return [
796
801
  {
797
802
  key: "restore",
@@ -832,9 +837,9 @@ const dt = { class: "wx-page-danger" }, ct = {
832
837
  run: () => a("remove", d)
833
838
  }), l;
834
839
  });
835
- return (d, l) => (f(), C(e(Ye), {
840
+ return (d, l) => (f(), C(e(Ze), {
836
841
  actions: t.value,
837
- label: g.page.title
842
+ label: v.page.title
838
843
  }, null, 8, ["actions", "label"]));
839
844
  }
840
845
  }), Ct = {
@@ -905,13 +910,13 @@ const St = /* @__PURE__ */ F({
905
910
  parent: { default: null }
906
911
  },
907
912
  setup(u) {
908
- const o = u, { open: g, resolve: a, dismiss: s } = Be(), t = Q(), d = q(t);
913
+ const o = u, { open: v, resolve: a, dismiss: s } = De(), t = Q(), d = q(t);
909
914
  j();
910
- const l = H("webx-pages"), c = _(""), h = _(""), r = _(o.parent?.id ?? null), k = _(!1), w = _({}), z = Ke("field"), b = _(!1);
915
+ const l = H("webx-pages"), c = _(""), h = _(""), r = _(o.parent?.id ?? null), k = _(!1), w = _({}), z = Fe("field"), b = _(!1);
911
916
  ae(c, (M) => {
912
917
  b.value || (h.value = Mt(M));
913
918
  }), ce(async () => {
914
- await Fe(), z.value?.querySelector("input")?.focus();
919
+ await He(), z.value?.querySelector("input")?.focus();
915
920
  });
916
921
  async function p() {
917
922
  if (!(c.value.trim() === "" || k.value)) {
@@ -931,16 +936,16 @@ const St = /* @__PURE__ */ F({
931
936
  }
932
937
  }
933
938
  }
934
- return (M, P) => (f(), C(e(De), {
935
- open: e(g),
936
- "onUpdate:open": P[5] || (P[5] = (B) => Me(g) ? g.value = B : null),
939
+ return (M, P) => (f(), C(e(Ne), {
940
+ open: e(v),
941
+ "onUpdate:open": P[5] || (P[5] = (B) => Me(v) ? v.value = B : null),
937
942
  title: e(l)("page.new-title"),
938
943
  width: 460
939
944
  }, {
940
945
  footer: i(() => [
941
- v(e(we), { size: "sm" }, {
946
+ g(e(we), { size: "sm" }, {
942
947
  default: i(() => [
943
- v(e(R), {
948
+ g(e(R), {
944
949
  variant: "outline",
945
950
  onClick: P[4] || (P[4] = (B) => e(s)())
946
951
  }, {
@@ -949,7 +954,7 @@ const St = /* @__PURE__ */ F({
949
954
  ]),
950
955
  _: 1
951
956
  }),
952
- v(e(R), {
957
+ g(e(R), {
953
958
  type: "primary",
954
959
  loading: k.value,
955
960
  disabled: c.value.trim() === "",
@@ -965,7 +970,7 @@ const St = /* @__PURE__ */ F({
965
970
  })
966
971
  ]),
967
972
  default: i(() => [
968
- v(e(ne), {
973
+ g(e(ne), {
969
974
  label: e(l)("page.field-title"),
970
975
  error: w.value.title?.[0],
971
976
  required: ""
@@ -975,7 +980,7 @@ const St = /* @__PURE__ */ F({
975
980
  ref_key: "field",
976
981
  ref: z
977
982
  }, [
978
- v(e(We), {
983
+ g(e(We), {
979
984
  modelValue: c.value,
980
985
  "onUpdate:modelValue": P[0] || (P[0] = (B) => c.value = B),
981
986
  "aria-label": e(l)("page.field-title"),
@@ -985,13 +990,13 @@ const St = /* @__PURE__ */ F({
985
990
  ]),
986
991
  _: 1
987
992
  }, 8, ["label", "error"]),
988
- v(e(ne), {
993
+ g(e(ne), {
989
994
  label: e(l)("page.field-slug"),
990
995
  error: w.value.slug?.[0],
991
996
  help: e(l)("page.slug-help")
992
997
  }, {
993
998
  default: i(() => [
994
- v(e(We), {
999
+ g(e(We), {
995
1000
  modelValue: h.value,
996
1001
  "onUpdate:modelValue": P[1] || (P[1] = (B) => h.value = B),
997
1002
  "aria-label": e(l)("page.field-slug"),
@@ -1001,12 +1006,12 @@ const St = /* @__PURE__ */ F({
1001
1006
  ]),
1002
1007
  _: 1
1003
1008
  }, 8, ["label", "error", "help"]),
1004
- v(e(ne), {
1009
+ g(e(ne), {
1005
1010
  label: e(l)("page.field-parent"),
1006
1011
  error: w.value.parent_id?.[0]
1007
1012
  }, {
1008
1013
  default: i(() => [
1009
- v($e, {
1014
+ g($e, {
1010
1015
  modelValue: r.value,
1011
1016
  "onUpdate:modelValue": P[3] || (P[3] = (B) => r.value = B),
1012
1017
  selected: o.parent ? [o.parent] : []
@@ -1024,19 +1029,19 @@ const St = /* @__PURE__ */ F({
1024
1029
  page: {}
1025
1030
  },
1026
1031
  setup(u) {
1027
- const o = u, { open: g, resolve: a, dismiss: s } = Be();
1032
+ const o = u, { open: v, resolve: a, dismiss: s } = De();
1028
1033
  j();
1029
1034
  const t = H("webx-pages"), d = _(o.page.parent_id);
1030
- return (l, c) => (f(), C(e(De), {
1031
- open: e(g),
1032
- "onUpdate:open": c[3] || (c[3] = (h) => Me(g) ? g.value = h : null),
1035
+ return (l, c) => (f(), C(e(Ne), {
1036
+ open: e(v),
1037
+ "onUpdate:open": c[3] || (c[3] = (h) => Me(v) ? v.value = h : null),
1033
1038
  title: e(t)("page.move-title", { title: o.page.title }),
1034
1039
  width: 460
1035
1040
  }, {
1036
1041
  footer: i(() => [
1037
- v(e(we), { size: "sm" }, {
1042
+ g(e(we), { size: "sm" }, {
1038
1043
  default: i(() => [
1039
- v(e(R), {
1044
+ g(e(R), {
1040
1045
  variant: "outline",
1041
1046
  onClick: c[1] || (c[1] = (h) => e(s)())
1042
1047
  }, {
@@ -1045,7 +1050,7 @@ const St = /* @__PURE__ */ F({
1045
1050
  ]),
1046
1051
  _: 1
1047
1052
  }),
1048
- v(e(R), {
1053
+ g(e(R), {
1049
1054
  type: "primary",
1050
1055
  disabled: d.value === null || d.value === o.page.parent_id,
1051
1056
  onClick: c[2] || (c[2] = (h) => e(a)(d.value))
@@ -1060,18 +1065,18 @@ const St = /* @__PURE__ */ F({
1060
1065
  })
1061
1066
  ]),
1062
1067
  default: i(() => [
1063
- v(e(we), {
1068
+ g(e(we), {
1064
1069
  direction: "vertical",
1065
1070
  size: "md",
1066
1071
  fill: ""
1067
1072
  }, {
1068
1073
  default: i(() => [
1069
- v(e(ke), {
1074
+ g(e(ke), {
1070
1075
  type: "info",
1071
1076
  variant: "soft",
1072
1077
  description: e(t)("page.move-help")
1073
1078
  }, null, 8, ["description"]),
1074
- v($e, {
1079
+ g($e, {
1075
1080
  modelValue: d.value,
1076
1081
  "onUpdate:modelValue": c[0] || (c[0] = (h) => d.value = h),
1077
1082
  exclude: [o.page.id]
@@ -1089,10 +1094,10 @@ const St = /* @__PURE__ */ F({
1089
1094
  base: { default: "/pages" }
1090
1095
  },
1091
1096
  setup(u) {
1092
- const o = u, g = Q(), a = q(g), s = _e();
1097
+ const o = u, v = Q(), a = q(v), s = _e();
1093
1098
  j();
1094
- const t = H("webx-pages"), d = ie(), l = _(null), c = _([]), h = _(!0), r = _(""), k = _(""), w = Ve(St), z = Ve(Bt), b = W(() => g.can("pages.manage")), p = W(() => k.value === "trashed"), M = W(() => !p.value && r.value.trim() === ""), P = W(
1095
- () => g.state.manifest?.modules.find((n) => n.id === "pages")?.title ?? t("module.title")
1099
+ const t = H("webx-pages"), d = ie(), l = _(null), c = _([]), h = _(!0), r = _(""), k = _(""), w = Ve(St), z = Ve(Bt), b = W(() => v.can("pages.manage")), p = W(() => k.value === "trashed"), M = W(() => !p.value && r.value.trim() === ""), P = W(
1100
+ () => v.state.manifest?.modules.find((n) => n.id === "pages")?.title ?? t("module.title")
1096
1101
  ), B = W(() => [
1097
1102
  { value: "", label: t("page.filter-all") },
1098
1103
  { value: "draft", label: t("page.filter-draft") },
@@ -1120,7 +1125,7 @@ const St = /* @__PURE__ */ F({
1120
1125
  hideBelow: 900,
1121
1126
  hidden: p.value
1122
1127
  },
1123
- { key: "actions", label: "", width: Ze, align: "right" }
1128
+ { key: "actions", label: "", width: qe, align: "right" }
1124
1129
  ]), ee = W(
1125
1130
  () => M.value ? {
1126
1131
  childrenKey: "children",
@@ -1250,7 +1255,7 @@ const St = /* @__PURE__ */ F({
1250
1255
  } }] : []
1251
1256
  );
1252
1257
  return (n, T) => (f(), N("div", Dt, [
1253
- v(e(qe), {
1258
+ g(e(et), {
1254
1259
  view: k.value,
1255
1260
  "onUpdate:view": T[1] || (T[1] = (m) => k.value = m),
1256
1261
  title: P.value,
@@ -1258,7 +1263,7 @@ const St = /* @__PURE__ */ F({
1258
1263
  actions: me.value
1259
1264
  }, {
1260
1265
  default: i(() => [
1261
- v(e(it), {
1266
+ g(e(it), {
1262
1267
  data: le.value,
1263
1268
  columns: A.value,
1264
1269
  "row-key": "id",
@@ -1296,7 +1301,7 @@ const St = /* @__PURE__ */ F({
1296
1301
  href: m.url,
1297
1302
  target: "_blank",
1298
1303
  rel: "noopener",
1299
- onClick: T[0] || (T[0] = He(() => {
1304
+ onClick: T[0] || (T[0] = je(() => {
1300
1305
  }, ["stop"]))
1301
1306
  }, " /" + x(m.path), 9, Et)) : m.path !== null ? (f(), C(e(U), {
1302
1307
  key: 2,
@@ -1335,12 +1340,12 @@ const St = /* @__PURE__ */ F({
1335
1340
  }, 1032, ["type"]))
1336
1341
  ]),
1337
1342
  "cell-updated_at": i(({ row: m }) => [
1338
- v(e(U), {
1343
+ g(e(U), {
1339
1344
  size: "sm",
1340
1345
  tone: "muted"
1341
1346
  }, {
1342
1347
  default: i(() => [
1343
- v(e(be), {
1348
+ g(e(be), {
1344
1349
  value: m.updated_at,
1345
1350
  compact: ""
1346
1351
  }, null, 8, ["value"]),
@@ -1410,7 +1415,7 @@ export {
1410
1415
  Vt as WxPagePlace,
1411
1416
  It as WxPagesPage,
1412
1417
  q as createPagesApi,
1413
- Ne as pageEditorKey,
1418
+ Ee as pageEditorKey,
1414
1419
  Ft as pages,
1415
1420
  ut as pagesMessages,
1416
1421
  rt as providePageEditor,