@opengis/admin 0.1.94 → 0.1.96

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/dist/{IconChevronDown-Ckqp2kHy.js → IconChevronDown-uM7Af3-i.js} +1 -1
  2. package/dist/{add-page-CA861uWt.js → add-page-BgPkyqnr.js} +18 -14
  3. package/dist/{admin-interface-CwikaMBm.js → admin-interface-x__pW8O9.js} +52 -51
  4. package/dist/{admin-view-DqduP4RF.js → admin-view-CApDgTHa.js} +153 -148
  5. package/dist/admin.js +1 -1
  6. package/dist/admin.umd.cjs +55 -55
  7. package/dist/{card-view-DZF9Tt0-.js → card-view-CUEAR-Gl.js} +1 -1
  8. package/dist/{edit-page-WEzJslvP.js → edit-page-Xu43ZBzj.js} +1 -1
  9. package/dist/{import-file-BW7hdzkG.js → import-file-CLrvcYj9.js} +5254 -5176
  10. package/dist/style.css +1 -1
  11. package/module/settings/card/admin.roles.table/access.hbs +3 -6
  12. package/module/settings/card/admin.roles.table/index.yml +12 -8
  13. package/module/settings/form/admin.roles.form.json +19 -17
  14. package/module/settings/menu.json +13 -3
  15. package/package.json +3 -3
  16. package/plugin.js +1 -1
  17. package/server/helpers/core/badge.js +16 -0
  18. package/server/helpers/core/buttonHelper.js +14 -0
  19. package/server/helpers/core/select.js +50 -0
  20. package/server/helpers/{controllers → core}/token.js +1 -1
  21. package/server/helpers/index.js +28 -0
  22. package/server/helpers/list/descriptionList.js +19 -10
  23. package/server/helpers/list/tableList.js +32 -19
  24. package/server/helpers/temp/contentList.js +58 -0
  25. package/server/helpers/temp/ifCond.js +101 -0
  26. package/server/helpers/utils/button.js +6 -0
  27. package/server/helpers/utils/buttonDel.js +6 -0
  28. package/server/plugins/access/funcs/getAdminAccess.js +1 -3
  29. package/server/routes/access/controllers/access.group.post.js +11 -6
  30. package/server/routes/access/index.mjs +1 -56
  31. package/server/routes/access/schema.mjs +58 -0
  32. package/server/routes/data/controllers/cardData.js +2 -2
  33. package/server/routes/notifications/funcs/sendNotification.js +27 -40
  34. package/server/helpers/controllers/badge.js +0 -12
  35. package/server/helpers/controllers/hb.js +0 -3
  36. package/server/helpers/controllers/map.js +0 -3
  37. package/server/helpers/controllers/mls.js +0 -3
  38. package/server/helpers/controllers/vue.js +0 -3
  39. package/server/helpers/index.mjs +0 -29
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as t, createElementVNode as n } from "vue";
2
- import { _ as r } from "./import-file-BW7hdzkG.js";
2
+ import { _ as r } from "./import-file-CLrvcYj9.js";
3
3
  const l = {}, s = {
4
4
  xmlns: "http://www.w3.org/2000/svg",
5
5
  viewBox: "0 0 24 24",
@@ -1,12 +1,13 @@
1
- import { _ as g, u as f, c as u } from "./import-file-BW7hdzkG.js";
2
- import { resolveComponent as x, openBlock as b, createElementBlock as w, createElementVNode as n, createBlock as k, createCommentVNode as y } from "vue";
1
+ import { _ as g, u as f, c as u } from "./import-file-CLrvcYj9.js";
2
+ import { resolveComponent as x, openBlock as d, createElementBlock as w, createElementVNode as n, createBlock as k, createCommentVNode as y } from "vue";
3
3
  const v = {
4
4
  data() {
5
5
  return {
6
6
  formValues: {},
7
7
  scheme: null,
8
8
  table: "",
9
- token: ""
9
+ token: "",
10
+ api: ""
10
11
  };
11
12
  },
12
13
  mounted() {
@@ -20,7 +21,7 @@ const v = {
20
21
  }), e;
21
22
  },
22
23
  async getFormScheme() {
23
- var c, a;
24
+ var i, a;
24
25
  const t = this.flattenMenu(f.value);
25
26
  t != null && t.length || this.$router.replace("/404");
26
27
  const e = t == null ? void 0 : t.find((r) => {
@@ -32,24 +33,27 @@ const v = {
32
33
  this.table = o;
33
34
  try {
34
35
  const r = await u.get(`/api/table-data/${o}`), { data: s } = await u.get(
35
- `/api/template/form/${(c = r == null ? void 0 : r.data) == null ? void 0 : c.form}`
36
+ `/api/template/form/${(i = r == null ? void 0 : r.data) == null ? void 0 : i.form}`
36
37
  );
37
- this.scheme = (s == null ? void 0 : s.schema) || s, this.token = (a = r == null ? void 0 : r.data) == null ? void 0 : a.addToken;
38
+ this.scheme = (s == null ? void 0 : s.schema) || s, this.api = (s == null ? void 0 : s.api) || "", this.token = (a = r == null ? void 0 : r.data) == null ? void 0 : a.addToken;
38
39
  } catch {
39
40
  }
40
41
  },
41
42
  async createObject() {
42
- var e, o, c, a, r, s, l, m, d;
43
+ var e, o, i, a, r, s, l, m, b;
43
44
  const t = this.$refs.form;
44
45
  try {
45
- await t.doValidation(), await u.post(`/api/table/${this.token}`, this.formValues), await this.$router.back(), await this.$notify({
46
+ await t.doValidation(), await u.post(
47
+ this.api || `/api/table/${this.token}`,
48
+ this.formValues
49
+ ), await this.$router.back(), await this.$notify({
46
50
  title: "Успішно!",
47
51
  message: "Об'єкт успішно створено",
48
52
  type: "success"
49
53
  });
50
- } catch (i) {
51
- const h = ((e = i == null ? void 0 : i.response) == null ? void 0 : e.data) || "";
52
- let p = ((r = (a = (c = (o = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : o[0]) == null ? void 0 : c[1]) == null ? void 0 : a[0]) == null ? void 0 : r.message) === "Це поле обов'язкове" ? "Заповніть обов'язкові поля" : (d = (m = (l = (s = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : s[0]) == null ? void 0 : l[1]) == null ? void 0 : m[0]) == null ? void 0 : d.message;
54
+ } catch (c) {
55
+ const h = ((e = c == null ? void 0 : c.response) == null ? void 0 : e.data) || "";
56
+ let p = ((r = (a = (i = (o = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : o[0]) == null ? void 0 : i[1]) == null ? void 0 : a[0]) == null ? void 0 : r.message) === "Це поле обов'язкове" ? "Заповніть обов'язкові поля" : (b = (m = (l = (s = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : s[0]) == null ? void 0 : l[1]) == null ? void 0 : m[0]) == null ? void 0 : b.message;
53
57
  this.$notify({
54
58
  title: "Помилка!",
55
59
  message: h || p || "Сталася помилка валідаціі",
@@ -65,9 +69,9 @@ const v = {
65
69
  style: { height: "calc(100vh - 165px)", width: "calc(100vw - 260px)" },
66
70
  class: "bg-gray-50 p-[20px] flex"
67
71
  }, E = { class: "bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
68
- function O(t, e, o, c, a, r) {
72
+ function O(t, e, o, i, a, r) {
69
73
  const s = x("VsForm");
70
- return b(), w("div", V, [
74
+ return d(), w("div", V, [
71
75
  n("div", _, [
72
76
  e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Створити", -1)),
73
77
  n("div", $, [
@@ -83,7 +87,7 @@ function O(t, e, o, c, a, r) {
83
87
  ]),
84
88
  n("div", j, [
85
89
  n("div", E, [
86
- a.scheme ? (b(), k(s, {
90
+ a.scheme ? (d(), k(s, {
87
91
  key: 0,
88
92
  ref: "form",
89
93
  scheme: a.scheme,
@@ -1,6 +1,6 @@
1
- import { _ as v, d as Ve, c as F, V as Ie, e as De, f as Fe, g as je, A as Me, I as qe, u as ye, s as ze } from "./import-file-BW7hdzkG.js";
2
- import { openBlock as o, createElementBlock as a, createTextVNode as j, toDisplayString as T, createCommentVNode as w, createStaticVNode as L, Fragment as S, createElementVNode as l, resolveComponent as h, createVNode as x, withCtx as $, createBlock as _, renderList as D, withModifiers as Le, normalizeClass as I, withDirectives as P, vModelCheckbox as Pe, resolveDynamicComponent as z, Transition as B, renderSlot as Be, vShow as ke, getCurrentInstance as Ue, ref as _e, normalizeStyle as ve } from "vue";
3
- import { I as Oe } from "./IconChevronDown-Ckqp2kHy.js";
1
+ import { _ as v, d as Ve, c as F, V as Ie, e as De, f as Fe, g as je, A as Me, I as qe, u as ye, s as ze } from "./import-file-CLrvcYj9.js";
2
+ import { openBlock as o, createElementBlock as a, createTextVNode as j, toDisplayString as T, createCommentVNode as w, createStaticVNode as L, Fragment as S, createElementVNode as l, resolveComponent as p, createVNode as x, withCtx as $, createBlock as _, renderList as D, withModifiers as Le, normalizeClass as I, withDirectives as P, vModelCheckbox as Pe, resolveDynamicComponent as z, Transition as B, renderSlot as Be, vShow as ke, getCurrentInstance as Ue, ref as _e, normalizeStyle as ve } from "vue";
3
+ import { I as Oe } from "./IconChevronDown-uM7Af3-i.js";
4
4
  const Ee = {
5
5
  data() {
6
6
  return {
@@ -212,7 +212,8 @@ const lt = /* @__PURE__ */ v(et, [["render", st]]), ot = {
212
212
  document.querySelector("body").click(), t != null && t.form ? (await this.$v3plugin.$form({
213
213
  form: t == null ? void 0 : t.form,
214
214
  id: (e = this.item) == null ? void 0 : e.id,
215
- api: t == null ? void 0 : t.api
215
+ api: t == null ? void 0 : t.api,
216
+ title: t == null ? void 0 : t.title
216
217
  }), await this.$emit("update-table")) : await this.$v3plugin.$api({
217
218
  confirm: t == null ? void 0 : t.confirm,
218
219
  api: t == null ? void 0 : t.api,
@@ -223,9 +224,9 @@ const lt = /* @__PURE__ */ v(et, [["render", st]]), ot = {
223
224
  }, rt = { class: "hs-dropdown [--placement:bottom-right] inline-flex" }, at = { class: "inline-flex items-center justify-center bg-white border rounded-lg shadow-sm size-7 gap-x-2 border-stone-200 text-stone-800 hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50" }, it = { class: "flex flex-col items-start" }, ct = ["onClick"], ut = { class: "text-gray-800" }, dt = {
224
225
  key: 1,
225
226
  class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
226
- }, bt = { class: "p-4" }, ht = { class: "flex justify-end mt-4 gap-x-3" };
227
- function pt(t, e, s, i, n, r) {
228
- const u = h("IconMore"), f = h("IconEdit"), p = h("router-link"), m = h("IconDelete"), k = h("VsPopover"), c = h("VsDialog");
227
+ }, bt = { class: "p-4" }, pt = { class: "flex justify-end mt-4 gap-x-3" };
228
+ function ht(t, e, s, i, n, r) {
229
+ const u = p("IconMore"), f = p("IconEdit"), h = p("router-link"), m = p("IconDelete"), k = p("VsPopover"), c = p("VsDialog");
229
230
  return o(), a(S, null, [
230
231
  l("div", rt, [
231
232
  x(k, {
@@ -244,7 +245,7 @@ function pt(t, e, s, i, n, r) {
244
245
  var g, d, C, y, A;
245
246
  return [
246
247
  l("div", it, [
247
- (g = s.actions) != null && g.includes("edit") && s.isForm ? (o(), _(p, {
248
+ (g = s.actions) != null && g.includes("edit") && s.isForm ? (o(), _(h, {
248
249
  key: 0,
249
250
  to: `/edit?table=${(C = (d = t.$route) == null ? void 0 : d.params) == null ? void 0 : C.catchAll}&id=${(y = s.item) == null ? void 0 : y.id}`,
250
251
  class: "w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"
@@ -287,7 +288,7 @@ function pt(t, e, s, i, n, r) {
287
288
  default: $(() => [
288
289
  l("div", bt, [
289
290
  e[6] || (e[6] = l("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
290
- l("div", ht, [
291
+ l("div", pt, [
291
292
  l("button", {
292
293
  type: "button",
293
294
  class: "inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
@@ -305,7 +306,7 @@ function pt(t, e, s, i, n, r) {
305
306
  }, 8, ["visible"])
306
307
  ], 64);
307
308
  }
308
- const ft = /* @__PURE__ */ v(ot, [["render", pt]]), mt = {}, gt = {
309
+ const ft = /* @__PURE__ */ v(ot, [["render", ht]]), mt = {}, gt = {
309
310
  class: "flex-shrink-0 mt-0.5 size-3.5",
310
311
  xmlns: "http://www.w3.org/2000/svg",
311
312
  viewBox: "0 0 24 24",
@@ -462,7 +463,7 @@ const wt = /* @__PURE__ */ v(_t, [["render", kt]]), Ct = {
462
463
  class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
463
464
  };
464
465
  function Bt(t, e, s, i, n, r) {
465
- const u = h("IconExport"), f = h("IconChevronDown"), p = h("IconSuccess"), m = h("VsCheckbox"), k = h("VsDialog");
466
+ const u = p("IconExport"), f = p("IconChevronDown"), h = p("IconSuccess"), m = p("VsCheckbox"), k = p("VsDialog");
466
467
  return o(), a(S, null, [
467
468
  l("button", {
468
469
  onClick: e[0] || (e[0] = (c) => n.isOpen = !0),
@@ -512,7 +513,7 @@ function Bt(t, e, s, i, n, r) {
512
513
  ]),
513
514
  default: $(() => [
514
515
  n.isSuccessTemplate ? (o(), a("div", $t, [
515
- x(p, {
516
+ x(h, {
516
517
  height: "100",
517
518
  width: "100",
518
519
  class: "text-green-200 mb-[20px]"
@@ -617,7 +618,7 @@ function Zt(t, e, s, i, n, r) {
617
618
  var u, f;
618
619
  return o(), a("label", Wt, [
619
620
  P(l("input", {
620
- "onUpdate:modelValue": e[0] || (e[0] = (p) => n.value = p),
621
+ "onUpdate:modelValue": e[0] || (e[0] = (h) => n.value = h),
621
622
  type: "checkbox"
622
623
  }, null, 512), [
623
624
  [Pe, n.value]
@@ -637,8 +638,8 @@ const Gt = /* @__PURE__ */ v(Rt, [["render", Zt]]), Jt = {
637
638
  }
638
639
  }, Kt = { class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, Qt = { class: "py-[10px] px-[10px] w-[260px]" }, Xt = { class: "flex flex-col gap-[3px] max-h-[400px] w-full overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
639
640
  function Yt(t, e, s, i, n, r) {
640
- const u = h("IconColumns"), f = h("AdminTableColumnsHiddenItem"), p = h("VsPopover");
641
- return o(), _(p, {
641
+ const u = p("IconColumns"), f = p("AdminTableColumnsHiddenItem"), h = p("VsPopover");
642
+ return o(), _(h, {
642
643
  trigger: "click",
643
644
  placement: "bottom"
644
645
  }, {
@@ -685,9 +686,9 @@ const we = /* @__PURE__ */ v(tn, [["render", sn]]), ln = {
685
686
  props: { row: Object, column: Object, table: String }
686
687
  };
687
688
  function on(t, e, s, i, n, r) {
688
- var u, f, p, m, k, c, g, d;
689
+ var u, f, h, m, k, c, g, d;
689
690
  return o(), _(z(
690
- ((u = s.column) == null ? void 0 : u.format) === "custom" ? (f = s.column) == null ? void 0 : f.component : `table-format-${((m = (p = s.column) == null ? void 0 : p.format) == null ? void 0 : m.toLowerCase()) || "text"}`
691
+ ((u = s.column) == null ? void 0 : u.format) === "custom" ? (f = s.column) == null ? void 0 : f.component : `table-format-${((m = (h = s.column) == null ? void 0 : h.format) == null ? void 0 : m.toLowerCase()) || "text"}`
691
692
  ), {
692
693
  onUpdateTable: e[0] || (e[0] = (C) => t.$emit("update-table")),
693
694
  name: (k = s.column) == null ? void 0 : k.name,
@@ -727,22 +728,22 @@ const un = /* @__PURE__ */ v(rn, [["render", cn]]), dn = {
727
728
  data() {
728
729
  return { expanded: this.defaultValue };
729
730
  }
730
- }, bn = { class: "hs-accordion" }, hn = { class: "py-0.5 flex items-center gap-x-0.5 w-full" }, pn = { class: "text-sm font-medium" }, fn = { class: "relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b" };
731
+ }, bn = { class: "hs-accordion" }, pn = { class: "py-0.5 flex items-center gap-x-0.5 w-full" }, hn = { class: "text-sm font-medium" }, fn = { class: "relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b" };
731
732
  function mn(t, e, s, i, n, r) {
732
- const u = h("IconPlus"), f = h("IconMinus");
733
+ const u = p("IconPlus"), f = p("IconMinus");
733
734
  return o(), a("div", null, [
734
735
  l("div", null, [
735
736
  l("div", bn, [
736
- l("div", hn, [
737
+ l("div", pn, [
737
738
  l("div", {
738
- onClick: e[0] || (e[0] = (p) => n.expanded = !n.expanded),
739
+ onClick: e[0] || (e[0] = (h) => n.expanded = !n.expanded),
739
740
  class: "rounded-md cursor-pointer grow"
740
741
  }, [
741
- l("span", pn, T(s.title), 1)
742
+ l("span", hn, T(s.title), 1)
742
743
  ]),
743
744
  l("button", {
744
745
  class: "flex items-center justify-center rounded-md size-6 hover:bg-gray-100",
745
- onClick: e[1] || (e[1] = (p) => n.expanded = !n.expanded)
746
+ onClick: e[1] || (e[1] = (h) => n.expanded = !n.expanded)
746
747
  }, [
747
748
  n.expanded ? (o(), _(f, {
748
749
  key: 1,
@@ -783,7 +784,7 @@ const gn = /* @__PURE__ */ v(dn, [["render", mn], ["__scopeId", "data-v-c6318482
783
784
  }, vn = { class: "flex items-center justify-between py-1 gap-x-4" }, kn = { class: "col-span-1" }, wn = { class: "inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500" }, Cn = { class: "col-span-2" }, $n = { class: "font-medium text-[13px] text-gray-800 dark:text-neutral-200" }, An = { class: "table-info-card" }, Sn = { class: "table-info-card" };
784
785
  function Tn(t, e, s, i, n, r) {
785
786
  var g, d, C;
786
- const u = h("AdminComponentIs"), f = h("AdminTree"), p = h("VsWidgetMap"), m = h("VsNoData"), k = h("VsWidgetComments"), c = h("VsWidgetFileList");
787
+ const u = p("AdminComponentIs"), f = p("AdminTree"), h = p("VsWidgetMap"), m = p("VsNoData"), k = p("VsWidgetComments"), c = p("VsWidgetFileList");
787
788
  return o(), a("div", yn, [
788
789
  e[0] || (e[0] = l("div", { class: "p-[10px] pl-[18px] pb-[18px] border-b" }, [
789
790
  l("h2", { class: "text-sm font-medium" }, "Інформація про об'єкт")
@@ -822,7 +823,7 @@ function Tn(t, e, s, i, n, r) {
822
823
  default: $(() => {
823
824
  var y, A;
824
825
  return [
825
- (y = s.row) != null && y.geom ? (o(), _(p, {
826
+ (y = s.row) != null && y.geom ? (o(), _(h, {
826
827
  key: 0,
827
828
  geometry: (A = s.row) == null ? void 0 : A.geom,
828
829
  zoom: 14
@@ -934,10 +935,10 @@ const Ln = /* @__PURE__ */ v(Mn, [["render", zn]]), Pn = {
934
935
  class: "font-medium text-[10px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full dark:bg-neutral-500"
935
936
  }, Un = { class: "filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-white [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
936
937
  function On(t, e, s, i, n, r) {
937
- const u = h("IconFilter"), f = h("VsFilter");
938
+ const u = p("IconFilter"), f = p("VsFilter");
938
939
  return o(), a(S, null, [
939
940
  l("button", {
940
- onClick: e[0] || (e[0] = (p) => n.isFilters = !n.isFilters),
941
+ onClick: e[0] || (e[0] = (h) => n.isFilters = !n.isFilters),
941
942
  class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"
942
943
  }, [
943
944
  x(u, {
@@ -949,7 +950,7 @@ function On(t, e, s, i, n, r) {
949
950
  ]),
950
951
  x(B, { name: "fade" }, {
951
952
  default: $(() => {
952
- var p;
953
+ var h;
953
954
  return [
954
955
  P(l("div", {
955
956
  onClick: e[3] || (e[3] = (...m) => r.closeFilter && r.closeFilter(...m)),
@@ -957,7 +958,7 @@ function On(t, e, s, i, n, r) {
957
958
  class: "fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.5)]"
958
959
  }, [
959
960
  l("div", Un, [
960
- (p = s.scheme) != null && p.length ? (o(), _(f, {
961
+ (h = s.scheme) != null && h.length ? (o(), _(f, {
961
962
  key: 0,
962
963
  ref: "filter",
963
964
  scheme: s.scheme,
@@ -1022,7 +1023,7 @@ const Qn = /* @__PURE__ */ v(Gn, [["render", Kn]]), Xn = {
1022
1023
  props: { filterCustom: String, customList: Array }
1023
1024
  }, Yn = { class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, es = { class: "flex flex-col gap-[4px]" }, ts = ["onClick"];
1024
1025
  function ns(t, e, s, i, n, r) {
1025
- const u = h("IconFilter2"), f = h("VsPopover");
1026
+ const u = p("IconFilter2"), f = p("VsPopover");
1026
1027
  return o(), _(f, {
1027
1028
  ref: "popover",
1028
1029
  placement: "bottom"
@@ -1037,17 +1038,17 @@ function ns(t, e, s, i, n, r) {
1037
1038
  ]),
1038
1039
  default: $(() => [
1039
1040
  l("div", es, [
1040
- (o(!0), a(S, null, D(s.customList, (p, m) => (o(), a("button", {
1041
+ (o(!0), a(S, null, D(s.customList, (h, m) => (o(), a("button", {
1041
1042
  onClick: (k) => {
1042
1043
  var c;
1043
- t.$emit("update:filterCustom", p == null ? void 0 : p.name), (c = t.$refs) == null || c.popover.togglePopover();
1044
+ t.$emit("update:filterCustom", h == null ? void 0 : h.name), (c = t.$refs) == null || c.popover.togglePopover();
1044
1045
  },
1045
1046
  key: m,
1046
- class: I(["p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300", { "bg-gray-100": s.filterCustom === (p == null ? void 0 : p.name) }])
1047
- }, T(p == null ? void 0 : p.label), 11, ts))), 128)),
1047
+ class: I(["p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300", { "bg-gray-100": s.filterCustom === (h == null ? void 0 : h.name) }])
1048
+ }, T(h == null ? void 0 : h.label), 11, ts))), 128)),
1048
1049
  l("button", {
1049
1050
  class: "p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300",
1050
- onClick: e[0] || (e[0] = (p) => {
1051
+ onClick: e[0] || (e[0] = (h) => {
1051
1052
  var m;
1052
1053
  t.$emit("update:filterCustom", void 0), (m = t.$refs) == null || m.popover.togglePopover();
1053
1054
  })
@@ -1063,8 +1064,8 @@ const ss = /* @__PURE__ */ v(Xn, [["render", ns]]), ls = { class: "flex items-ce
1063
1064
  slots: Object
1064
1065
  },
1065
1066
  setup(t) {
1066
- var f, p, m, k, c;
1067
- const { asyncTemplateSlot: e } = (c = (k = (m = (p = (f = Ue()) == null ? void 0 : f.appContext) == null ? void 0 : p.app) == null ? void 0 : m.config) == null ? void 0 : k.globalProperties) == null ? void 0 : c.utils, s = _e(""), i = _e(""), n = t, r = () => {
1067
+ var f, h, m, k, c;
1068
+ const { asyncTemplateSlot: e } = (c = (k = (m = (h = (f = Ue()) == null ? void 0 : f.appContext) == null ? void 0 : h.app) == null ? void 0 : m.config) == null ? void 0 : k.globalProperties) == null ? void 0 : c.utils, s = _e(""), i = _e(""), n = t, r = () => {
1068
1069
  var g, d, C, y, A;
1069
1070
  if ((g = n.slots) != null && g.panelLeft || (i.value = "div"), (C = (d = n.slots) == null ? void 0 : d.panelLeft) != null && C.includes("<")) {
1070
1071
  const V = e("PanelLeft", (y = n.slots) == null ? void 0 : y.panelLeft, [
@@ -1213,22 +1214,22 @@ const ss = /* @__PURE__ */ v(Xn, [["render", ns]]), ls = { class: "flex items-ce
1213
1214
  },
1214
1215
  methods: {
1215
1216
  async checkUrlMounted() {
1216
- var t, e, s, i, n, r, u, f, p, m, k, c, g, d, C, y, A;
1217
- this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((i = (s = this.$route) == null ? void 0 : s.query) == null ? void 0 : i.limit) || 20, this.filters = ((u = decodeURI((r = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : r.filter)) == null ? void 0 : u.replaceAll("+", " ")) || null, this.filterState = ((p = (f = this.$route) == null ? void 0 : f.query) == null ? void 0 : p.filterState) || null, this.filterCustom = ((k = (m = this.$route) == null ? void 0 : m.query) == null ? void 0 : k.custom) || null, this.searchValue = ((g = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : g.search) || "", this.visibleColumns = ((y = (C = (d = this.$route) == null ? void 0 : d.query) == null ? void 0 : C.columns) == null ? void 0 : y.split(",")) || [], (A = this.$route) != null && A.query.card && (this.isVisibleCardInfo = !0);
1217
+ var t, e, s, i, n, r, u, f, h, m, k, c, g, d, C, y, A;
1218
+ this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((i = (s = this.$route) == null ? void 0 : s.query) == null ? void 0 : i.limit) || 20, this.filters = ((u = decodeURI((r = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : r.filter)) == null ? void 0 : u.replaceAll("+", " ")) || null, this.filterState = ((h = (f = this.$route) == null ? void 0 : f.query) == null ? void 0 : h.filterState) || null, this.filterCustom = ((k = (m = this.$route) == null ? void 0 : m.query) == null ? void 0 : k.custom) || null, this.searchValue = ((g = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : g.search) || "", this.visibleColumns = ((y = (C = (d = this.$route) == null ? void 0 : d.query) == null ? void 0 : C.columns) == null ? void 0 : y.split(",")) || [], (A = this.$route) != null && A.query.card && (this.isVisibleCardInfo = !0);
1218
1219
  },
1219
1220
  rowWidth(t) {
1220
1221
  var s, i;
1221
1222
  const e = (i = (s = this.tableData) == null ? void 0 : s.columns) == null ? void 0 : i.find((n) => n.name === t);
1222
1223
  if (e) {
1223
1224
  const n = e == null ? void 0 : e.width;
1224
- return n != null && n.includes("px") ? n : `${n}px`;
1225
+ return typeof n == "number" ? `${n}px` : n != null && n.includes("px") ? n : `${n}px`;
1225
1226
  }
1226
1227
  },
1227
1228
  unmountedData() {
1228
1229
  this.page = 1, this.visibleColumns = [], this.filterCustom = null, this.filterState = null, this.isVisibleCardInfo = !1, this.filterScheme = null, this.filters = null, this.onFilters = 0, this.searchValue = "";
1229
1230
  },
1230
1231
  async getTableData() {
1231
- var t, e, s, i, n, r, u, f, p, m, k;
1232
+ var t, e, s, i, n, r, u, f, h, m, k;
1232
1233
  try {
1233
1234
  const { data: c } = await F.get(`/api/template/table/${this.table}`), g = await F.get(`/api/table-data/${this.table}`, {
1234
1235
  params: {
@@ -1247,7 +1248,7 @@ const ss = /* @__PURE__ */ v(Xn, [["render", ns]]), ls = { class: "flex items-ce
1247
1248
  }, this.initialHiddenColumns = (r = (n = (i = (s = this.tableData) == null ? void 0 : s.columns) == null ? void 0 : i.filter((d) => (d == null ? void 0 : d.hidden) !== !0)) == null ? void 0 : n.map((d) => d == null ? void 0 : d.name)) == null ? void 0 : r.join(","), (u = this.visibleColumns) != null && u.length ? (f = this.tableData) == null || f.columns.forEach((d) => {
1248
1249
  var C;
1249
1250
  (C = this.visibleColumns) != null && C.includes(d == null ? void 0 : d.name) ? d.hidden = !1 : d.hidden = !0;
1250
- }) : this.visibleColumns = (k = (m = (p = this.tableData) == null ? void 0 : p.columns) == null ? void 0 : m.filter((d) => (d == null ? void 0 : d.hidden) !== !0)) == null ? void 0 : k.map((d) => d == null ? void 0 : d.name);
1251
+ }) : this.visibleColumns = (k = (m = (h = this.tableData) == null ? void 0 : h.columns) == null ? void 0 : m.filter((d) => (d == null ? void 0 : d.hidden) !== !0)) == null ? void 0 : k.map((d) => d == null ? void 0 : d.name);
1251
1252
  } catch {
1252
1253
  }
1253
1254
  },
@@ -1298,7 +1299,7 @@ const ss = /* @__PURE__ */ v(Xn, [["render", ns]]), ls = { class: "flex items-ce
1298
1299
  }, is = { class: "w-[calc(100vw - 320px)] bg-gray-50" }, cs = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, us = { class: "text-xl font-medium" }, ds = {
1299
1300
  style: { height: "calc(100vh - 155px)", width: "calc(100vw - 260px)" },
1300
1301
  class: "bg-gray-50 p-[20px] flex pt-[10px]"
1301
- }, bs = { class: "bg-white w-full rounded-xl border p-[20px] pr-0" }, hs = { class: "flex" }, ps = { class: "flex gap-[6px] ml-auto" }, fs = { class: "inline-block w-full align-middle" }, ms = {
1302
+ }, bs = { class: "bg-white w-full rounded-xl border p-[20px] pr-0" }, ps = { class: "flex" }, hs = { class: "flex gap-[6px] ml-auto" }, fs = { class: "inline-block w-full align-middle" }, ms = {
1302
1303
  key: 0,
1303
1304
  class: "relative w-max min-w-full divide-y divide-gray-200 table-fixed dark:divide-neutral-700"
1304
1305
  }, gs = { class: "sticky top-[-1px] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, xs = { class: "right-0 border-t border-stone-200" }, ys = {
@@ -1310,7 +1311,7 @@ const ss = /* @__PURE__ */ v(Xn, [["render", ns]]), ls = { class: "flex items-ce
1310
1311
  };
1311
1312
  function Is(t, e, s, i, n, r) {
1312
1313
  var O, E, N, H, R, W, Z, G, J, K, Q, X, Y, ee, te, ne, se, le, oe, re, ae, ie;
1313
- const u = h("IconPlus"), f = h("router-link"), p = h("AdminTableTabs"), m = h("IconSearch"), k = h("VsText"), c = h("AdminTableCustomButtons"), g = h("AdminTableCustomFilters"), d = h("AdminTableColumnsHidden"), C = h("AdminTableExport"), y = h("AdminTableFilters"), A = h("IconOpenCard"), V = h("AdminTableColumn"), M = h("AdminComponentIs"), U = h("AdminTableControl"), $e = h("AdminNodata"), Ae = h("VsPagination"), Se = h("AdminTableCardInfo");
1314
+ const u = p("IconPlus"), f = p("router-link"), h = p("AdminTableTabs"), m = p("IconSearch"), k = p("VsText"), c = p("AdminTableCustomButtons"), g = p("AdminTableCustomFilters"), d = p("AdminTableColumnsHidden"), C = p("AdminTableExport"), y = p("AdminTableFilters"), A = p("IconOpenCard"), V = p("AdminTableColumn"), M = p("AdminComponentIs"), U = p("AdminTableControl"), $e = p("AdminNodata"), Ae = p("VsPagination"), Se = p("AdminTableCardInfo");
1314
1315
  return o(), a("div", is, [
1315
1316
  l("div", cs, [
1316
1317
  l("h2", us, T(s.title), 1),
@@ -1331,13 +1332,13 @@ function Is(t, e, s, i, n, r) {
1331
1332
  ]),
1332
1333
  l("div", ds, [
1333
1334
  l("div", bs, [
1334
- (H = (N = n.tableData) == null ? void 0 : N.filterState) != null && H.length ? (o(), _(p, {
1335
+ (H = (N = n.tableData) == null ? void 0 : N.filterState) != null && H.length ? (o(), _(h, {
1335
1336
  key: 0,
1336
1337
  tabsList: (R = n.tableData) == null ? void 0 : R.filterState,
1337
1338
  filterState: n.filterState,
1338
1339
  "onUpdate:filterState": e[0] || (e[0] = (b) => n.filterState = b)
1339
1340
  }, null, 8, ["tabsList", "filterState"])) : w("", !0),
1340
- l("div", hs, [
1341
+ l("div", ps, [
1341
1342
  l("div", {
1342
1343
  class: I([n.isVisibleCardInfo ? "w-[calc(100%-360px)]" : "w-full"])
1343
1344
  }, [
@@ -1356,7 +1357,7 @@ function Is(t, e, s, i, n, r) {
1356
1357
  clearable: !0,
1357
1358
  class: "[&>input]:py-[7px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600"
1358
1359
  }, null, 8, ["modelValue"]),
1359
- l("div", ps, [
1360
+ l("div", hs, [
1360
1361
  (W = n.tableData) != null && W.slots ? (o(), _(c, {
1361
1362
  key: 0,
1362
1363
  slots: (Z = n.tableData) == null ? void 0 : Z.slots
@@ -1424,7 +1425,7 @@ function Is(t, e, s, i, n, r) {
1424
1425
  ]),
1425
1426
  l("tbody", _s, [
1426
1427
  (o(!0), a(S, null, D((le = n.tableData) == null ? void 0 : le.rows, (b, Te) => {
1427
- var ce, ue, de, be, he, pe, fe, me, ge, xe;
1428
+ var ce, ue, de, be, pe, he, fe, me, ge, xe;
1428
1429
  return o(), a("tr", {
1429
1430
  key: Te,
1430
1431
  class: I({
@@ -1458,7 +1459,7 @@ function Is(t, e, s, i, n, r) {
1458
1459
  onUpdateTable: r.getTableData
1459
1460
  }, null, 8, ["row", "column", "table", "onUpdateTable"])
1460
1461
  ], 10, ws))), 128)),
1461
- (pe = (he = r.getActions) == null ? void 0 : he.filter((q) => q !== "add")) != null && pe.length ? (o(), a("td", {
1462
+ (he = (pe = r.getActions) == null ? void 0 : pe.filter((q) => q !== "add")) != null && he.length ? (o(), a("td", {
1462
1463
  key: 0,
1463
1464
  class: I(["text-center sticky right-0 w-[80px] px-[10px]", {
1464
1465
  "bg-gray-50": ((me = (fe = t.$route) == null ? void 0 : fe.query) == null ? void 0 : me.card) === (b == null ? void 0 : b.id),
@@ -1523,7 +1524,7 @@ function Is(t, e, s, i, n, r) {
1523
1524
  ])
1524
1525
  ]);
1525
1526
  }
1526
- const Ds = /* @__PURE__ */ v(as, [["render", Is], ["__scopeId", "data-v-6b80b456"]]), Fs = {
1527
+ const Ds = /* @__PURE__ */ v(as, [["render", Is], ["__scopeId", "data-v-f939b7ed"]]), Fs = {
1527
1528
  components: { AdminTable: Ds },
1528
1529
  data() {
1529
1530
  return {
@@ -1581,7 +1582,7 @@ const Ds = /* @__PURE__ */ v(as, [["render", Is], ["__scopeId", "data-v-6b80b456
1581
1582
  }
1582
1583
  }, js = ["innerHTML"];
1583
1584
  function Ms(t, e, s, i, n, r) {
1584
- const u = h("AdminTable");
1585
+ const u = p("AdminTable");
1585
1586
  return n.table ? (o(), _(u, {
1586
1587
  key: 0,
1587
1588
  table: n.table,