@opengis/admin 0.1.9 → 0.1.11

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.
@@ -1,7 +1,7 @@
1
- import { _ as m, a as v } from "./import-file-NwcjXxtk.js";
2
- import { u as F } from "./userMenu-CT1xO2Pt.js";
3
- import { openBlock as a, createElementBlock as i, createStaticVNode as j, createTextVNode as k, toDisplayString as $, createCommentVNode as I, createElementVNode as r, Fragment as x, resolveComponent as d, createVNode as p, withCtx as y, withModifiers as O, renderList as w, withDirectives as E, vModelCheckbox as N, createBlock as M, vModelText as R, resolveDynamicComponent as W, Transition as G, vShow as J } from "vue";
4
- const K = {}, Q = {
1
+ import { _ as b, a as k } from "./import-file-Vd0__RP7.js";
2
+ import { u as B } from "./userMenu-CT1xO2Pt.js";
3
+ import { openBlock as a, createElementBlock as i, createStaticVNode as V, createTextVNode as v, toDisplayString as $, createCommentVNode as F, createElementVNode as l, Fragment as x, resolveComponent as u, createVNode as p, withCtx as y, withModifiers as N, renderList as C, withDirectives as E, vModelCheckbox as R, createBlock as w, vModelText as G, resolveDynamicComponent as W, Transition as J, vShow as K } from "vue";
4
+ const Q = {}, X = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
6
6
  viewBox: "0 0 24 24",
7
7
  fill: "none",
@@ -11,12 +11,12 @@ const K = {}, Q = {
11
11
  "stroke-linejoin": "round",
12
12
  class: "icon icon-tabler icons-tabler-outline icon-tabler-adjustments-horizontal"
13
13
  };
14
- function X(e, t, n, o, s, l) {
15
- return a(), i("svg", Q, t[0] || (t[0] = [
16
- j('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 6l8 0"></path><path d="M16 6l4 0"></path><path d="M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 12l2 0"></path><path d="M10 12l10 0"></path><path d="M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 18l11 0"></path><path d="M19 18l1 0"></path>', 10)
14
+ function Y(e, t, r, o, n, s) {
15
+ return a(), i("svg", X, t[0] || (t[0] = [
16
+ V('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 6l8 0"></path><path d="M16 6l4 0"></path><path d="M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 12l2 0"></path><path d="M10 12l10 0"></path><path d="M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 18l11 0"></path><path d="M19 18l1 0"></path>', 10)
17
17
  ]));
18
18
  }
19
- const Y = /* @__PURE__ */ m(K, [["render", X]]), Z = {
19
+ const Z = /* @__PURE__ */ b(Q, [["render", Y]]), tt = {
20
20
  data() {
21
21
  return {
22
22
  currentSort: ""
@@ -62,11 +62,11 @@ const Y = /* @__PURE__ */ m(K, [["render", X]]), Z = {
62
62
  },
63
63
  handleClickSortBtn(e) {
64
64
  this.$emit("change-active", this.data.name), this.currentSort = this.changeCurrentSort(e);
65
- const t = this.$route.query, { sort: n, ...o } = t, s = this.currentSort ? `${this.data.name}-${this.currentSort}` : "";
65
+ const t = this.$route.query, { sort: r, ...o } = t, n = this.currentSort ? `${this.data.name}-${this.currentSort}` : "";
66
66
  this.$router.replace({
67
67
  query: {
68
68
  ...o,
69
- ...s && { sort: s }
69
+ ...n && { sort: n }
70
70
  }
71
71
  });
72
72
  },
@@ -74,10 +74,10 @@ const Y = /* @__PURE__ */ m(K, [["render", X]]), Z = {
74
74
  return `${this.data.name}-${e}` === this.selectedSortParam;
75
75
  }
76
76
  }
77
- }, tt = {
77
+ }, et = {
78
78
  scope: "col",
79
79
  class: "min-w-[200px] max-w-[300px] text-start"
80
- }, et = {
80
+ }, rt = {
81
81
  class: "flex-shrink-0 size-3.5",
82
82
  xmlns: "http://www.w3.org/2000/svg",
83
83
  width: "24",
@@ -88,7 +88,7 @@ const Y = /* @__PURE__ */ m(K, [["render", X]]), Z = {
88
88
  "stroke-width": "2",
89
89
  "stroke-linecap": "round",
90
90
  "stroke-linejoin": "round"
91
- }, rt = {
91
+ }, lt = {
92
92
  key: 0,
93
93
  d: "m7 15 5 5 5-5"
94
94
  }, nt = {
@@ -98,23 +98,23 @@ const Y = /* @__PURE__ */ m(K, [["render", X]]), Z = {
98
98
  key: 1,
99
99
  class: "text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500"
100
100
  };
101
- function lt(e, t, n, o, s, l) {
102
- return a(), i("th", tt, [
103
- l.getVisibleIcon ? (a(), i("button", {
101
+ function at(e, t, r, o, n, s) {
102
+ return a(), i("th", et, [
103
+ s.getVisibleIcon ? (a(), i("button", {
104
104
  key: 0,
105
105
  type: "button",
106
106
  class: "text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",
107
- onClick: t[0] || (t[0] = (b) => l.handleClickSortBtn(s.currentSort))
107
+ onClick: t[0] || (t[0] = (m) => s.handleClickSortBtn(n.currentSort))
108
108
  }, [
109
- k($(l.label) + " ", 1),
110
- (a(), i("svg", et, [
111
- s.currentSort === "asc" || s.currentSort === "" ? (a(), i("path", rt)) : I("", !0),
112
- s.currentSort === "desc" || s.currentSort === "" ? (a(), i("path", nt)) : I("", !0)
109
+ v($(s.label) + " ", 1),
110
+ (a(), i("svg", rt, [
111
+ n.currentSort === "asc" || n.currentSort === "" ? (a(), i("path", lt)) : F("", !0),
112
+ n.currentSort === "desc" || n.currentSort === "" ? (a(), i("path", nt)) : F("", !0)
113
113
  ]))
114
- ])) : (a(), i("p", st, $(l.label), 1))
114
+ ])) : (a(), i("p", st, $(s.label), 1))
115
115
  ]);
116
116
  }
117
- const ot = /* @__PURE__ */ m(Z, [["render", lt]]), at = {}, it = {
117
+ const ot = /* @__PURE__ */ b(tt, [["render", at]]), it = {}, ct = {
118
118
  xmlns: "http://www.w3.org/2000/svg",
119
119
  viewBox: "0 0 24 24",
120
120
  fill: "none",
@@ -124,19 +124,19 @@ const ot = /* @__PURE__ */ m(Z, [["render", lt]]), at = {}, it = {
124
124
  "stroke-linejoin": "round",
125
125
  class: "icon icon-tabler icons-tabler-outline icon-tabler-dots-vertical"
126
126
  };
127
- function ut(e, t, n, o, s, l) {
128
- return a(), i("svg", it, t[0] || (t[0] = [
129
- r("path", {
127
+ function ut(e, t, r, o, n, s) {
128
+ return a(), i("svg", ct, t[0] || (t[0] = [
129
+ l("path", {
130
130
  stroke: "none",
131
131
  d: "M0 0h24v24H0z",
132
132
  fill: "none"
133
133
  }, null, -1),
134
- r("path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
135
- r("path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
136
- r("path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
134
+ l("path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
135
+ l("path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
136
+ l("path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
137
137
  ]));
138
138
  }
139
- const ct = /* @__PURE__ */ m(at, [["render", ut]]), dt = {}, pt = {
139
+ const dt = /* @__PURE__ */ b(it, [["render", ut]]), ht = {}, pt = {
140
140
  class: "flex-shrink-0 size-3.5",
141
141
  xmlns: "http://www.w3.org/2000/svg",
142
142
  viewBox: "0 0 24 24",
@@ -146,42 +146,42 @@ const ct = /* @__PURE__ */ m(at, [["render", ut]]), dt = {}, pt = {
146
146
  "stroke-linecap": "round",
147
147
  "stroke-linejoin": "round"
148
148
  };
149
- function ht(e, t, n, o, s, l) {
149
+ function mt(e, t, r, o, n, s) {
150
150
  return a(), i("svg", pt, t[0] || (t[0] = [
151
- j('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>', 5)
151
+ V('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>', 5)
152
152
  ]));
153
153
  }
154
- const bt = /* @__PURE__ */ m(dt, [["render", ht]]), mt = {
154
+ const bt = /* @__PURE__ */ b(ht, [["render", mt]]), ft = {
155
155
  props: {
156
156
  height: { type: String, default: "16" },
157
157
  width: { type: String, default: "12" },
158
158
  color: { type: String, default: "black" }
159
159
  }
160
- }, gt = { style: { display: "none" } }, ft = ["height", "width", "fill"];
161
- function xt(e, t, n, o, s, l) {
160
+ }, gt = { style: { display: "none" } }, xt = ["height", "width", "fill"];
161
+ function yt(e, t, r, o, n, s) {
162
162
  return a(), i(x, null, [
163
163
  (a(), i("svg", gt, t[0] || (t[0] = [
164
- r("symbol", {
164
+ l("symbol", {
165
165
  id: "icon-pencil",
166
166
  viewBox: "0 0 32 32"
167
167
  }, [
168
- r("path", { d: "M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z" })
168
+ l("path", { d: "M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z" })
169
169
  ], -1)
170
170
  ]))),
171
171
  (a(), i("svg", {
172
- height: n.height,
173
- width: n.width,
174
- fill: n.color
172
+ height: r.height,
173
+ width: r.width,
174
+ fill: r.color
175
175
  }, t[1] || (t[1] = [
176
- r("use", { "xlink:href": "#icon-pencil" }, null, -1)
177
- ]), 8, ft))
176
+ l("use", { "xlink:href": "#icon-pencil" }, null, -1)
177
+ ]), 8, xt))
178
178
  ], 64);
179
179
  }
180
- const yt = /* @__PURE__ */ m(mt, [["render", xt]]), _t = {
180
+ const _t = /* @__PURE__ */ b(ft, [["render", yt]]), kt = {
181
181
  components: {
182
- IconMore: ct,
182
+ IconMore: dt,
183
183
  IconDelete: bt,
184
- IconEdit: yt
184
+ IconEdit: _t
185
185
  },
186
186
  emits: ["updateTable"],
187
187
  props: { item: Object, table: String },
@@ -201,7 +201,7 @@ const yt = /* @__PURE__ */ m(mt, [["render", xt]]), _t = {
201
201
  async getData() {
202
202
  var e;
203
203
  try {
204
- const { data: t } = await v.get(
204
+ const { data: t } = await k.get(
205
205
  `/api/table/${this.table}/${(e = this.item) == null ? void 0 : e.id}`
206
206
  );
207
207
  this.formValue = t;
@@ -215,7 +215,7 @@ const yt = /* @__PURE__ */ m(mt, [["render", xt]]), _t = {
215
215
  async deleteElement() {
216
216
  var e;
217
217
  try {
218
- v.delete(`/api/table/${this.table}/${(e = this.item) == null ? void 0 : e.id}`), this.$notify({
218
+ k.delete(`/api/table/${this.table}/${(e = this.item) == null ? void 0 : e.id}`), this.$notify({
219
219
  title: "Успішно!",
220
220
  message: "Об`єкт успішно видалeно",
221
221
  type: "success"
@@ -229,22 +229,22 @@ const yt = /* @__PURE__ */ m(mt, [["render", xt]]), _t = {
229
229
  }
230
230
  }
231
231
  }
232
- }, vt = { class: "hs-dropdown [--placement:bottom-right] inline-flex" }, kt = {
232
+ }, wt = { class: "hs-dropdown [--placement:bottom-right] inline-flex" }, vt = {
233
233
  id: "hs-pro-dupc1",
234
234
  type: "button",
235
235
  class: "gap-x-2 p-2 rounded-lg hover:border-transparent focus:outline-none text-black hover:bg-gray-50"
236
- }, wt = { class: "pt-[7px] pb-[7px] flex flex-col items-start" }, $t = { class: "p-4" }, Ct = { class: "mt-4 flex justify-end gap-x-3" };
237
- function Tt(e, t, n, o, s, l) {
238
- const b = d("IconMore"), u = d("IconEdit"), g = d("router-link"), f = d("IconDelete"), C = d("VsPopover"), A = d("VsDialog");
236
+ }, Ct = { class: "pt-[7px] pb-[7px] flex flex-col items-start" }, $t = { class: "p-4" }, Mt = { class: "mt-4 flex justify-end gap-x-3" };
237
+ function St(e, t, r, o, n, s) {
238
+ const m = u("IconMore"), c = u("IconEdit"), f = u("router-link"), g = u("IconDelete"), M = u("VsPopover"), I = u("VsDialog");
239
239
  return a(), i(x, null, [
240
- r("div", vt, [
241
- p(C, {
240
+ l("div", wt, [
241
+ p(M, {
242
242
  trigger: "click",
243
243
  placement: "left"
244
244
  }, {
245
245
  reference: y(() => [
246
- r("button", kt, [
247
- p(b, {
246
+ l("button", vt, [
247
+ p(m, {
248
248
  height: "16",
249
249
  width: "16"
250
250
  })
@@ -253,25 +253,25 @@ function Tt(e, t, n, o, s, l) {
253
253
  default: y(() => {
254
254
  var _, S, T;
255
255
  return [
256
- r("div", wt, [
257
- p(g, {
258
- to: `/edit?table=${(S = (_ = e.$route) == null ? void 0 : _.params) == null ? void 0 : S.catchAll}&id=${(T = n.item) == null ? void 0 : T.id}`,
256
+ l("div", Ct, [
257
+ p(f, {
258
+ to: `/edit?table=${(S = (_ = e.$route) == null ? void 0 : _.params) == null ? void 0 : S.catchAll}&id=${(T = r.item) == null ? void 0 : T.id}`,
259
259
  class: "w-[100px] ml-[2px] flex items-center justify-center gap-x-3 rounded-lg text-[13px] text-gray-800"
260
260
  }, {
261
261
  default: y(() => [
262
- p(u, { color: "#000" }),
263
- t[4] || (t[4] = k(" Редагувати "))
262
+ p(c, { color: "#000" }),
263
+ t[4] || (t[4] = v(" Редагувати "))
264
264
  ]),
265
265
  _: 1
266
266
  }, 8, ["to"]),
267
- t[6] || (t[6] = r("div", { class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto mt-[10px] mb-[10px]" }, null, -1)),
268
- r("button", {
269
- onClick: t[0] || (t[0] = O((...V) => l.openConfirm && l.openConfirm(...V), ["stop"])),
267
+ t[6] || (t[6] = l("div", { class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto mt-[10px] mb-[10px]" }, null, -1)),
268
+ l("button", {
269
+ onClick: t[0] || (t[0] = N((...D) => s.openConfirm && s.openConfirm(...D), ["stop"])),
270
270
  type: "button",
271
271
  class: "w-[100px] flex items-center justify-center gap-x-3 rounded-lg text-[14px] text-red-500"
272
272
  }, [
273
- p(f),
274
- t[5] || (t[5] = r("span", { class: "text-gray-800" }, "Видалити", -1))
273
+ p(g),
274
+ t[5] || (t[5] = l("span", { class: "text-gray-800" }, "Видалити", -1))
275
275
  ])
276
276
  ])
277
277
  ];
@@ -279,24 +279,24 @@ function Tt(e, t, n, o, s, l) {
279
279
  _: 1
280
280
  })
281
281
  ]),
282
- p(A, {
283
- visible: s.isDeleteConfirm,
284
- "onUpdate:visible": t[3] || (t[3] = (_) => s.isDeleteConfirm = _),
282
+ p(I, {
283
+ visible: n.isDeleteConfirm,
284
+ "onUpdate:visible": t[3] || (t[3] = (_) => n.isDeleteConfirm = _),
285
285
  title: "Ви впевнені?"
286
286
  }, {
287
287
  default: y(() => [
288
- r("div", $t, [
289
- t[7] || (t[7] = r("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
290
- r("div", Ct, [
291
- r("button", {
288
+ l("div", $t, [
289
+ t[7] || (t[7] = l("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
290
+ l("div", Mt, [
291
+ l("button", {
292
292
  type: "button",
293
293
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm 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",
294
- onClick: t[1] || (t[1] = (_) => s.isDeleteConfirm = !1)
294
+ onClick: t[1] || (t[1] = (_) => n.isDeleteConfirm = !1)
295
295
  }, " Скасувати "),
296
- r("button", {
296
+ l("button", {
297
297
  type: "button",
298
298
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",
299
- onClick: t[2] || (t[2] = (..._) => l.deleteElement && l.deleteElement(..._))
299
+ onClick: t[2] || (t[2] = (..._) => s.deleteElement && s.deleteElement(..._))
300
300
  }, " Так, я впевнена/ий ")
301
301
  ])
302
302
  ])
@@ -305,7 +305,7 @@ function Tt(e, t, n, o, s, l) {
305
305
  }, 8, ["visible"])
306
306
  ], 64);
307
307
  }
308
- const Mt = /* @__PURE__ */ m(_t, [["render", Tt]]), St = {}, Vt = {
308
+ const Tt = /* @__PURE__ */ b(kt, [["render", St]]), Dt = {}, At = {
309
309
  class: "flex-shrink-0 mt-0.5 size-3.5",
310
310
  xmlns: "http://www.w3.org/2000/svg",
311
311
  viewBox: "0 0 24 24",
@@ -315,15 +315,15 @@ const Mt = /* @__PURE__ */ m(_t, [["render", Tt]]), St = {}, Vt = {
315
315
  "stroke-linecap": "round",
316
316
  "stroke-linejoin": "round"
317
317
  };
318
- function Dt(e, t, n, o, s, l) {
319
- return a(), i("svg", Vt, t[0] || (t[0] = [
320
- r("path", { d: "m3 16 4 4 4-4" }, null, -1),
321
- r("path", { d: "M7 20V4" }, null, -1),
322
- r("path", { d: "m21 8-4-4-4 4" }, null, -1),
323
- r("path", { d: "M17 4v16" }, null, -1)
318
+ function Ft(e, t, r, o, n, s) {
319
+ return a(), i("svg", At, t[0] || (t[0] = [
320
+ l("path", { d: "m3 16 4 4 4-4" }, null, -1),
321
+ l("path", { d: "M7 20V4" }, null, -1),
322
+ l("path", { d: "m21 8-4-4-4 4" }, null, -1),
323
+ l("path", { d: "M17 4v16" }, null, -1)
324
324
  ]));
325
325
  }
326
- const At = /* @__PURE__ */ m(St, [["render", Dt]]), Ft = {
326
+ const Vt = /* @__PURE__ */ b(Dt, [["render", Ft]]), It = {
327
327
  props: {
328
328
  columns: { type: Object, default: () => {
329
329
  } },
@@ -339,7 +339,7 @@ const At = /* @__PURE__ */ m(St, [["render", Dt]]), Ft = {
339
339
  methods: {
340
340
  async exportTable() {
341
341
  try {
342
- const e = await v.get("/api/export", {
342
+ const e = await k.get("/api/export", {
343
343
  params: {
344
344
  table: this.table,
345
345
  format: this.format,
@@ -348,11 +348,11 @@ const At = /* @__PURE__ */ m(St, [["render", Dt]]), Ft = {
348
348
  responseType: "blob"
349
349
  }), t = new Blob([e.data], {
350
350
  type: "application/octet-stream"
351
- }), n = window.URL.createObjectURL(t), o = document.createElement("a");
352
- o.href = n, o.setAttribute(
351
+ }), r = window.URL.createObjectURL(t), o = document.createElement("a");
352
+ o.href = r, o.setAttribute(
353
353
  "download",
354
354
  `${this.table.split(".")[0]}.${this.format}`
355
- ), document.body.appendChild(o), o.click(), document.body.removeChild(o), window.URL.revokeObjectURL(n), this.$notify({
355
+ ), document.body.appendChild(o), o.click(), document.body.removeChild(o), window.URL.revokeObjectURL(r), this.$notify({
356
356
  type: "success",
357
357
  title: "Експорт",
358
358
  message: "Файл успішно експортовано!"
@@ -369,65 +369,65 @@ const At = /* @__PURE__ */ m(St, [["render", Dt]]), Ft = {
369
369
  this.format = e;
370
370
  }
371
371
  }
372
- }, It = { class: "p-4" }, Et = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, jt = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, zt = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, Pt = { class: "mt-2 space-y-2" }, Bt = ["id", "onChange"], Ut = ["for"], Ht = { class: "pb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, qt = { class: "text-center" };
373
- function Lt(e, t, n, o, s, l) {
374
- const b = d("VsCheckbox");
372
+ }, Bt = { class: "p-4" }, Et = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, jt = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, zt = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, Pt = { class: "mt-2 space-y-2" }, Ut = ["id", "onChange"], Ot = ["for"], Ht = { class: "pb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, qt = { class: "text-center" };
373
+ function Lt(e, t, r, o, n, s) {
374
+ const m = u("VsCheckbox");
375
375
  return a(), i(x, null, [
376
- t[4] || (t[4] = r("div", { class: "dark:border-neutral-700" }, null, -1)),
377
- r("div", It, [
378
- r("div", Et, [
379
- t[2] || (t[2] = r("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
380
- r("div", jt, [
381
- (a(!0), i(x, null, w(n.columns, (u, g) => (a(), i("div", {
376
+ t[4] || (t[4] = l("div", { class: "dark:border-neutral-700" }, null, -1)),
377
+ l("div", Bt, [
378
+ l("div", Et, [
379
+ t[2] || (t[2] = l("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
380
+ l("div", jt, [
381
+ (a(!0), i(x, null, C(r.columns, (c, f) => (a(), i("div", {
382
382
  class: "flex items-center",
383
- key: g,
383
+ key: f,
384
384
  style: { width: "calc((100% - 10px) / 2)" }
385
385
  }, [
386
- p(b, {
386
+ p(m, {
387
387
  class: "py-0 shrink-0 border-gray-300 rounded text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",
388
- modelValue: s.cols,
389
- "onUpdate:modelValue": t[0] || (t[0] = (f) => s.cols = f),
390
- value: u == null ? void 0 : u.name,
391
- label: u == null ? void 0 : u.ua
388
+ modelValue: n.cols,
389
+ "onUpdate:modelValue": t[0] || (t[0] = (g) => n.cols = g),
390
+ value: c == null ? void 0 : c.name,
391
+ label: c == null ? void 0 : c.ua
392
392
  }, null, 8, ["modelValue", "value", "label"])
393
393
  ]))), 128))
394
394
  ])
395
395
  ]),
396
- r("div", zt, [
397
- t[3] || (t[3] = r("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть формат таблиці: ", -1)),
398
- r("div", Pt, [
399
- (a(!0), i(x, null, w(s.tableFormats, (u, g) => (a(), i("div", {
396
+ l("div", zt, [
397
+ t[3] || (t[3] = l("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть формат таблиці: ", -1)),
398
+ l("div", Pt, [
399
+ (a(!0), i(x, null, C(n.tableFormats, (c, f) => (a(), i("div", {
400
400
  class: "flex items-center",
401
- key: g
401
+ key: f
402
402
  }, [
403
- r("input", {
403
+ l("input", {
404
404
  type: "radio",
405
405
  name: "hs-pro-duecmfm",
406
406
  class: "shrink-0 border-gray-300 rounded-full text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",
407
- id: u,
408
- onChange: (f) => l.selectFormat(u)
409
- }, null, 40, Bt),
410
- r("label", {
411
- for: u,
407
+ id: c,
408
+ onChange: (g) => s.selectFormat(c)
409
+ }, null, 40, Ut),
410
+ l("label", {
411
+ for: c,
412
412
  class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
413
- }, " Формат " + $(u), 9, Ut)
413
+ }, " Формат " + $(c), 9, Ot)
414
414
  ]))), 128))
415
415
  ])
416
416
  ]),
417
- r("div", Ht, [
418
- r("div", qt, [
419
- r("button", {
417
+ l("div", Ht, [
418
+ l("div", qt, [
419
+ l("button", {
420
420
  type: "button",
421
421
  class: "p-2 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500",
422
- onClick: t[1] || (t[1] = (...u) => l.exportTable && l.exportTable(...u))
422
+ onClick: t[1] || (t[1] = (...c) => s.exportTable && s.exportTable(...c))
423
423
  }, " Завантажити таблицю ")
424
424
  ])
425
425
  ])
426
426
  ])
427
427
  ], 64);
428
428
  }
429
- const Ot = /* @__PURE__ */ m(Ft, [["render", Lt]]), Nt = {
430
- components: { IconExport: At, AdminTableExportForm: Ot },
429
+ const Nt = /* @__PURE__ */ b(It, [["render", Lt]]), Rt = {
430
+ components: { IconExport: Vt, AdminTableExportForm: Nt },
431
431
  props: { table: String, columns: Array },
432
432
  data() {
433
433
  return {
@@ -435,35 +435,35 @@ const Ot = /* @__PURE__ */ m(Ft, [["render", Lt]]), Nt = {
435
435
  };
436
436
  }
437
437
  };
438
- function Rt(e, t, n, o, s, l) {
439
- const b = d("IconExport"), u = d("AdminTableExportForm"), g = d("VsDialog");
438
+ function Gt(e, t, r, o, n, s) {
439
+ const m = u("IconExport"), c = u("AdminTableExportForm"), f = u("VsDialog");
440
440
  return a(), i(x, null, [
441
- r("button", {
442
- onClick: t[0] || (t[0] = (f) => s.isOpen = !0),
441
+ l("button", {
442
+ onClick: t[0] || (t[0] = (g) => n.isOpen = !0),
443
443
  class: "py-2 px-3 relative flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300"
444
444
  }, [
445
- p(b, {
445
+ p(m, {
446
446
  height: "16",
447
447
  width: "16"
448
448
  }),
449
- t[2] || (t[2] = k(" Експорт "))
449
+ t[2] || (t[2] = v(" Експорт "))
450
450
  ]),
451
- p(g, {
452
- visible: s.isOpen,
453
- "onUpdate:visible": t[1] || (t[1] = (f) => s.isOpen = f),
451
+ p(f, {
452
+ visible: n.isOpen,
453
+ "onUpdate:visible": t[1] || (t[1] = (g) => n.isOpen = g),
454
454
  title: "Експорт таблиці"
455
455
  }, {
456
456
  default: y(() => [
457
- p(u, {
458
- table: n.table,
459
- columns: n.columns
457
+ p(c, {
458
+ table: r.table,
459
+ columns: r.columns
460
460
  }, null, 8, ["table", "columns"])
461
461
  ]),
462
462
  _: 1
463
463
  }, 8, ["visible"])
464
464
  ], 64);
465
465
  }
466
- const Wt = /* @__PURE__ */ m(Nt, [["render", Rt]]), Gt = {}, Jt = {
466
+ const Wt = /* @__PURE__ */ b(Rt, [["render", Gt]]), Jt = {}, Kt = {
467
467
  xmlns: "http://www.w3.org/2000/svg",
468
468
  viewBox: "0 0 24 24",
469
469
  fill: "none",
@@ -473,12 +473,12 @@ const Wt = /* @__PURE__ */ m(Nt, [["render", Rt]]), Gt = {}, Jt = {
473
473
  "stroke-linejoin": "round",
474
474
  class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
475
475
  };
476
- function Kt(e, t, n, o, s, l) {
477
- return a(), i("svg", Jt, t[0] || (t[0] = [
478
- j('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path>', 9)
476
+ function Qt(e, t, r, o, n, s) {
477
+ return a(), i("svg", Kt, t[0] || (t[0] = [
478
+ V('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path>', 9)
479
479
  ]));
480
480
  }
481
- const Qt = /* @__PURE__ */ m(Gt, [["render", Kt]]), Xt = {
481
+ const Xt = /* @__PURE__ */ b(Jt, [["render", Qt]]), Yt = {
482
482
  props: { column: Object },
483
483
  emits: ["update-column"],
484
484
  data() {
@@ -495,52 +495,52 @@ const Qt = /* @__PURE__ */ m(Gt, [["render", Kt]]), Xt = {
495
495
  var e;
496
496
  ((e = this.column) == null ? void 0 : e.hidden) !== !0 && (this.value = !0);
497
497
  }
498
- }, Yt = { class: "flex w-full gap-[8px] items-centr" };
499
- function Zt(e, t, n, o, s, l) {
500
- var b, u;
501
- return a(), i("label", Yt, [
502
- E(r("input", {
503
- "onUpdate:modelValue": t[0] || (t[0] = (g) => s.value = g),
498
+ }, Zt = { class: "flex w-full gap-[8px] items-centr" };
499
+ function te(e, t, r, o, n, s) {
500
+ var m, c;
501
+ return a(), i("label", Zt, [
502
+ E(l("input", {
503
+ "onUpdate:modelValue": t[0] || (t[0] = (f) => n.value = f),
504
504
  type: "checkbox"
505
505
  }, null, 512), [
506
- [N, s.value]
506
+ [R, n.value]
507
507
  ]),
508
- k(" " + $(((b = n.column) == null ? void 0 : b.ua) || ((u = n.column) == null ? void 0 : u.title)), 1)
508
+ v(" " + $(((m = r.column) == null ? void 0 : m.ua) || ((c = r.column) == null ? void 0 : c.title)), 1)
509
509
  ]);
510
510
  }
511
- const te = /* @__PURE__ */ m(Xt, [["render", Zt]]), ee = {
512
- components: { IconColumns: Qt, AdminTableColumnsHiddenItem: te },
511
+ const ee = /* @__PURE__ */ b(Yt, [["render", te]]), re = {
512
+ components: { IconColumns: Xt, AdminTableColumnsHiddenItem: ee },
513
513
  emits: ["update-columns"],
514
514
  props: { columns: Array },
515
515
  methods: {
516
516
  updateColumn(e) {
517
- const t = this.columns.findIndex((o) => (o == null ? void 0 : o.name) === (e == null ? void 0 : e.name)), n = this.columns;
518
- n[t] = e, this.$emit("update-columns", [...n]);
517
+ const t = this.columns.findIndex((o) => (o == null ? void 0 : o.name) === (e == null ? void 0 : e.name)), r = this.columns;
518
+ r[t] = e, this.$emit("update-columns", [...r]);
519
519
  }
520
520
  }
521
- }, re = { class: "py-2 px-3 flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300" }, ne = { class: "flex flex-col gap-[3px] h-[400px] w-[300px] 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" };
522
- function se(e, t, n, o, s, l) {
523
- const b = d("IconColumns"), u = d("AdminTableColumnsHiddenItem"), g = d("VsPopover");
524
- return a(), M(g, {
521
+ }, le = { class: "py-2 px-3 flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300" }, ne = { class: "flex flex-col gap-[3px] h-[400px] w-[300px] 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" };
522
+ function se(e, t, r, o, n, s) {
523
+ const m = u("IconColumns"), c = u("AdminTableColumnsHiddenItem"), f = u("VsPopover");
524
+ return a(), w(f, {
525
525
  trigger: "click",
526
526
  placement: "bottom"
527
527
  }, {
528
528
  reference: y(() => [
529
- r("button", re, [
530
- p(b, {
529
+ l("button", le, [
530
+ p(m, {
531
531
  height: "20",
532
532
  width: "16"
533
533
  })
534
534
  ])
535
535
  ]),
536
536
  default: y(() => [
537
- r("div", null, [
538
- t[0] || (t[0] = r("h2", { class: "text-sm mb-[8px]" }, "Оберіть колонки, щоб приховати", -1)),
539
- r("ul", ne, [
540
- (a(!0), i(x, null, w(n.columns, (f, C) => (a(), i("li", { key: C }, [
541
- p(u, {
542
- column: f,
543
- onUpdateColumn: l.updateColumn
537
+ l("div", null, [
538
+ t[0] || (t[0] = l("h2", { class: "text-sm mb-[8px]" }, "Оберіть колонки, щоб приховати", -1)),
539
+ l("ul", ne, [
540
+ (a(!0), i(x, null, C(r.columns, (g, M) => (a(), i("li", { key: M }, [
541
+ p(c, {
542
+ column: g,
543
+ onUpdateColumn: s.updateColumn
544
544
  }, null, 8, ["column", "onUpdateColumn"])
545
545
  ]))), 128))
546
546
  ])
@@ -549,14 +549,21 @@ function se(e, t, n, o, s, l) {
549
549
  _: 1
550
550
  });
551
551
  }
552
- const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
552
+ const ae = /* @__PURE__ */ b(re, [["render", se]]), oe = {}, ie = { class: "vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden" };
553
+ function ce(e, t, r, o, n, s) {
554
+ return a(), i("div", ie, t[0] || (t[0] = [
555
+ V('<div><div class="p-5 min-h-[500px] flex flex-col justify-center items-center text-center"><svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg><div class="max-w-sm mx-auto mt-6"><p class="font-medium text-gray-800 dark:text-neutral-200"> Дані для відображення відсутні </p><p class="mt-2 text-sm text-gray-500 dark:text-neutral-500"> Змініть параметри пошуку або спробуйте пізніше </p></div></div></div>', 1)
556
+ ]));
557
+ }
558
+ const ue = /* @__PURE__ */ b(oe, [["render", ce]]), de = {
553
559
  props: { table: String },
554
560
  components: {
555
- IconFilter: Y,
556
- AdminTableControl: Mt,
561
+ IconFilter: Z,
562
+ AdminTableControl: Tt,
557
563
  AdminTableExport: Wt,
558
- AdminTableColumnsHidden: le,
559
- AdminTableColumn: ot
564
+ AdminTableColumnsHidden: ae,
565
+ AdminTableColumn: ot,
566
+ AdminNodata: ue
560
567
  },
561
568
  data() {
562
569
  return {
@@ -585,7 +592,15 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
585
592
  },
586
593
  columns() {
587
594
  var e, t;
588
- return (t = (e = this.tableData) == null ? void 0 : e.columns) == null ? void 0 : t.filter((n) => (n == null ? void 0 : n.hidden) !== !0);
595
+ return (t = (e = this.tableData) == null ? void 0 : e.columns) == null ? void 0 : t.filter((r) => (r == null ? void 0 : r.hidden) !== !0);
596
+ },
597
+ isForm() {
598
+ var e;
599
+ return (e = this.tableData) == null ? void 0 : e.form;
600
+ },
601
+ isNoData() {
602
+ var e, t;
603
+ return !((e = this.tableData) != null && e.rows) || !((t = this.columns) != null && t.length);
589
604
  }
590
605
  },
591
606
  watch: {
@@ -597,8 +612,8 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
597
612
  },
598
613
  $route: {
599
614
  handler(e, t) {
600
- var n, o;
601
- ((n = e == null ? void 0 : e.params) == null ? void 0 : n.catchAll) !== ((o = t == null ? void 0 : t.params) == null ? void 0 : o.catchAll) && (this.filterScheme = null, this.getFilters());
615
+ var r, o;
616
+ ((r = e == null ? void 0 : e.params) == null ? void 0 : r.catchAll) !== ((o = t == null ? void 0 : t.params) == null ? void 0 : o.catchAll) && (this.filterScheme = null, this.getFilters());
602
617
  },
603
618
  deep: !0
604
619
  }
@@ -607,7 +622,7 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
607
622
  async getTableData() {
608
623
  var e, t;
609
624
  try {
610
- const { data: n } = await v.get(`/api/template/table/${this.table}`), o = await v.get(`/api/table-data/${this.table}`, {
625
+ const { data: r } = await k.get(`/api/template/table/${this.table}`), o = await k.get(`/api/table-data/${this.table}`, {
611
626
  params: {
612
627
  page: this.page,
613
628
  search: this.searchValue || null,
@@ -618,7 +633,7 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
618
633
  });
619
634
  this.tableData = {
620
635
  ...this.tableData,
621
- ...n,
636
+ ...r,
622
637
  ...(o == null ? void 0 : o.data) || {}
623
638
  };
624
639
  } catch {
@@ -627,10 +642,10 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
627
642
  async getFilters() {
628
643
  var e;
629
644
  try {
630
- const { data: t } = await v.get(`/api/table-filter/${this.table}`);
631
- this.filterScheme = (e = t == null ? void 0 : t.list) == null ? void 0 : e.map((n) => ({
632
- ...n,
633
- label: (n == null ? void 0 : n.label) || (n == null ? void 0 : n.ua)
645
+ const { data: t } = await k.get(`/api/table-filter/${this.table}`);
646
+ this.filterScheme = (e = t == null ? void 0 : t.list) == null ? void 0 : e.map((r) => ({
647
+ ...r,
648
+ label: (r == null ? void 0 : r.label) || (r == null ? void 0 : r.ua)
634
649
  }));
635
650
  } catch {
636
651
  }
@@ -652,163 +667,167 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
652
667
  this.activeColumn = e, this.getTableData();
653
668
  }
654
669
  }
655
- }, ae = { class: "w-[calc(100vw - 320px)]" }, ie = { class: "h-[58px] bg-gray-50 flex items-center justify-between px-[30px]" }, ue = { class: "text-xl font-medium" }, ce = {
670
+ }, he = { class: "w-[calc(100vw - 320px)]" }, pe = { class: "h-[58px] bg-gray-50 flex items-center justify-between px-[30px]" }, me = { class: "text-xl font-medium" }, be = {
656
671
  style: { height: "calc(100vh - 120px)", width: "calc(100vw - 260px)" },
657
672
  class: "bg-gray-50 p-[20px] flex pt-[10px]"
658
- }, de = { class: "bg-white w-full rounded-xl border p-[20px]" }, pe = { class: "flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px]" }, he = { class: "flex gap-[6px] ml-auto" }, be = { class: "space-y-5 flex items-start w-full justify-start" }, me = {
673
+ }, fe = { class: "bg-white w-full rounded-xl border p-[20px]" }, ge = { class: "flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px]" }, xe = { class: "flex gap-[6px] ml-auto" }, ye = { class: "space-y-5 flex items-start w-full justify-start" }, _e = {
659
674
  style: { height: "calc(100vh - 310px)" },
660
675
  class: "overflow-x-auto w-full border-t [&::-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"
661
- }, ge = { class: "inline-block w-full align-middle" }, fe = { class: "divide-y divide-gray-200 min-w-full dark:divide-neutral-700 relative table-fixed" }, xe = { class: "sticky top-0 bg-white w-full relative after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, ye = { class: "border-stone-200 right-0 z-[1]" }, _e = { class: "divide-y divide-gray-200" }, ve = { class: "min-w-[200px] text-start pe-4 py-3 text-sm text-gray-600" }, ke = { class: "text-center sticky right-0 bg-white w-[60px]" }, we = { class: "p-[20px] flex justify-end w-full" }, $e = { class: "filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-[rgba(0,0,0,0.5)] [&::-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" };
662
- function Ce(e, t, n, o, s, l) {
663
- var T, V, z, P, B, U, H;
664
- const b = d("router-link"), u = d("AdminTableColumnsHidden"), g = d("AdminTableExport"), f = d("IconFilter"), C = d("AdminTableColumn"), A = d("AdminTableControl"), _ = d("VsPagination"), S = d("VsFilter");
676
+ }, ke = { class: "inline-block w-full align-middle" }, we = {
677
+ key: 0,
678
+ class: "divide-y divide-gray-200 min-w-full dark:divide-neutral-700 relative table-fixed"
679
+ }, ve = { class: "sticky top-0 bg-white w-full relative after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, Ce = { class: "border-stone-200 right-0 z-[1]" }, $e = { class: "divide-y divide-gray-200" }, Me = { class: "min-w-[200px] text-start pe-4 py-3 text-sm text-gray-600" }, Se = { class: "text-center sticky right-0 bg-white w-[80px] px-[10px]" }, Te = { class: "p-[20px] flex justify-end w-full" }, De = { class: "filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-[rgba(0,0,0,0.5)] [&::-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" };
680
+ function Ae(e, t, r, o, n, s) {
681
+ var D, j, z, P, U, O, H;
682
+ const m = u("router-link"), c = u("AdminTableColumnsHidden"), f = u("AdminTableExport"), g = u("IconFilter"), M = u("AdminTableColumn"), I = u("AdminTableControl"), _ = u("AdminNodata"), S = u("VsPagination"), T = u("VsFilter");
665
683
  return a(), i(x, null, [
666
- r("div", ae, [
667
- r("div", ie, [
668
- r("h2", ue, $((T = s.tableData) == null ? void 0 : T.title), 1),
669
- p(b, {
670
- to: `/add?table=${(z = (V = e.$route) == null ? void 0 : V.params) == null ? void 0 : z.catchAll}`,
684
+ l("div", he, [
685
+ l("div", pe, [
686
+ l("h2", me, $((D = n.tableData) == null ? void 0 : D.title), 1),
687
+ s.isForm ? (a(), w(m, {
688
+ key: 0,
689
+ to: `/add?table=${(z = (j = e.$route) == null ? void 0 : j.params) == null ? void 0 : z.catchAll}`,
671
690
  class: "py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg bg-blue-500 text-gray-800 shadow-sm hover:bg-blue-700 hover:text-white duration-300"
672
691
  }, {
673
692
  default: y(() => t[5] || (t[5] = [
674
- k(" Додати ")
693
+ v(" Додати ")
675
694
  ])),
676
695
  _: 1
677
- }, 8, ["to"])
696
+ }, 8, ["to"])) : F("", !0)
678
697
  ]),
679
- r("div", ce, [
680
- r("div", de, [
681
- r("div", pe, [
682
- E(r("input", {
683
- "onUpdate:modelValue": t[0] || (t[0] = (c) => s.searchValue = c),
698
+ l("div", be, [
699
+ l("div", fe, [
700
+ l("div", ge, [
701
+ E(l("input", {
702
+ "onUpdate:modelValue": t[0] || (t[0] = (d) => n.searchValue = d),
684
703
  class: "py-2 pl-[15px] h-[38px] w-[400px] block w-full border rounded-lg text-sm focus:border-blue-600 focus:border-[2px] outline-none",
685
704
  placeholder: "Пошук..."
686
705
  }, null, 512), [
687
- [R, s.searchValue]
706
+ [G, n.searchValue]
688
707
  ]),
689
- r("div", he, [
690
- p(u, {
691
- columns: (P = s.tableData) == null ? void 0 : P.columns,
692
- onUpdateColumns: t[1] || (t[1] = (c) => s.tableData.columns = c)
708
+ l("div", xe, [
709
+ p(c, {
710
+ columns: (P = n.tableData) == null ? void 0 : P.columns,
711
+ onUpdateColumns: t[1] || (t[1] = (d) => n.tableData.columns = d)
693
712
  }, null, 8, ["columns"]),
694
- p(g, {
695
- table: n.table,
696
- columns: (B = s.tableData) == null ? void 0 : B.columns
713
+ p(f, {
714
+ table: r.table,
715
+ columns: (U = n.tableData) == null ? void 0 : U.columns
697
716
  }, null, 8, ["table", "columns"]),
698
- r("button", {
699
- onClick: t[2] || (t[2] = (c) => s.isFilters = !s.isFilters),
717
+ l("button", {
718
+ onClick: t[2] || (t[2] = (d) => n.isFilters = !n.isFilters),
700
719
  class: "py-2 px-3 flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300"
701
720
  }, [
702
- p(f, {
721
+ p(g, {
703
722
  height: "16",
704
723
  width: "16"
705
724
  }),
706
- t[6] || (t[6] = k(" Фільтри "))
725
+ t[6] || (t[6] = v(" Фільтри "))
707
726
  ])
708
727
  ])
709
728
  ]),
710
- r("div", be, [
711
- r("div", me, [
712
- r("div", ge, [
713
- r("table", fe, [
714
- r("thead", xe, [
715
- r("tr", ye, [
716
- (a(!0), i(x, null, w(l.columns, (c) => (a(), M(C, {
717
- key: c.name,
718
- data: c,
719
- activeColumn: s.activeColumn,
720
- onChangeActive: l.changeActiveColumn
729
+ l("div", ye, [
730
+ l("div", _e, [
731
+ l("div", ke, [
732
+ s.isNoData ? (a(), w(_, { key: 1 })) : (a(), i("table", we, [
733
+ l("thead", ve, [
734
+ l("tr", Ce, [
735
+ (a(!0), i(x, null, C(s.columns, (d) => (a(), w(M, {
736
+ key: d.name,
737
+ data: d,
738
+ activeColumn: n.activeColumn,
739
+ onChangeActive: s.changeActiveColumn
721
740
  }, null, 8, ["data", "activeColumn", "onChangeActive"]))), 128)),
722
- t[7] || (t[7] = r("th", { class: "w-[60px] sticky right-0 top-0 bg-white" }, null, -1))
741
+ t[7] || (t[7] = l("th", { class: "w-[70px] sticky right-0 top-0 bg-white" }, null, -1))
723
742
  ])
724
743
  ]),
725
- r("tbody", _e, [
726
- (a(!0), i(x, null, w((U = s.tableData) == null ? void 0 : U.rows, (c, D) => {
744
+ l("tbody", $e, [
745
+ (a(!0), i(x, null, C((O = n.tableData) == null ? void 0 : O.rows, (d, A) => {
727
746
  var q;
728
- return a(), i("tr", { key: D }, [
729
- r("td", ve, [
730
- p(b, {
731
- to: `/card/${n.table}/${c == null ? void 0 : c.id}`,
747
+ return a(), i("tr", { key: A }, [
748
+ l("td", Me, [
749
+ p(m, {
750
+ to: `/card/${r.table}/${d == null ? void 0 : d.id}`,
732
751
  class: "text-sm text-green-600 decoration-2 hover:underline font-medium focus:outline-none focus:underline hover:text-green-600"
733
752
  }, {
734
753
  default: y(() => {
735
754
  var h;
736
755
  return [
737
- k($(c == null ? void 0 : c[(h = l.columns[0]) == null ? void 0 : h.name]), 1)
756
+ v($(d == null ? void 0 : d[(h = s.columns[0]) == null ? void 0 : h.name]), 1)
738
757
  ];
739
758
  }),
740
759
  _: 2
741
760
  }, 1032, ["to"])
742
761
  ]),
743
- (a(!0), i(x, null, w((q = l.columns) == null ? void 0 : q.slice(1), (h) => {
762
+ (a(!0), i(x, null, C((q = s.columns) == null ? void 0 : q.slice(1), (h) => {
744
763
  var L;
745
764
  return a(), i("td", {
746
765
  class: "min-w-[300px] w-full text-start px-[4px] py-3 text-sm text-gray-600",
747
766
  key: h.name
748
767
  }, [
749
- (a(), M(W(
768
+ (a(), w(W(
750
769
  (h == null ? void 0 : h.format) === "custom" ? h == null ? void 0 : h.component : e.$componentsConfig[`table-format-${((L = h == null ? void 0 : h.format) == null ? void 0 : L.toLowerCase()) || e.text}`]
751
770
  ), {
752
771
  name: h == null ? void 0 : h.name,
753
- data: c,
754
- value: c == null ? void 0 : c[h == null ? void 0 : h.name]
772
+ data: d,
773
+ value: d == null ? void 0 : d[h == null ? void 0 : h.name]
755
774
  }, null, 8, ["name", "data", "value"]))
756
775
  ]);
757
776
  }), 128)),
758
- r("td", ke, [
759
- p(A, {
760
- item: c,
761
- table: n.table,
762
- onUpdateTable: l.getTableData
777
+ l("td", Se, [
778
+ p(I, {
779
+ item: d,
780
+ table: r.table,
781
+ onUpdateTable: s.getTableData
763
782
  }, null, 8, ["item", "table", "onUpdateTable"])
764
783
  ])
765
784
  ]);
766
785
  }), 128))
767
786
  ])
768
- ])
787
+ ]))
769
788
  ])
770
789
  ])
771
790
  ]),
772
- r("div", we, [
773
- p(_, {
791
+ l("div", Te, [
792
+ p(S, {
774
793
  goTo: !1,
775
794
  class: "justify-end",
776
- "default-page": l.defaultPage,
777
- total: ((H = s.tableData) == null ? void 0 : H.total) || 0,
778
- pageSize: s.limit,
779
- onPageChange: l.handlePageChange,
795
+ "default-page": s.defaultPage,
796
+ total: ((H = n.tableData) == null ? void 0 : H.total) || 0,
797
+ pageSize: n.limit,
798
+ onPageChange: s.handlePageChange,
780
799
  pageSizes: [10, 16, 20],
781
- onPageSizeChange: l.changeLimit
800
+ onPageSizeChange: s.changeLimit
782
801
  }, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])
783
802
  ])
784
803
  ])
785
804
  ])
786
805
  ]),
787
- p(G, { name: "fade" }, {
806
+ p(J, { name: "fade" }, {
788
807
  default: y(() => {
789
- var c;
808
+ var d;
790
809
  return [
791
- E(r("div", {
792
- onClick: t[4] || (t[4] = (...D) => l.closeFilter && l.closeFilter(...D)),
810
+ E(l("div", {
811
+ onClick: t[4] || (t[4] = (...A) => s.closeFilter && s.closeFilter(...A)),
793
812
  style: { height: "100vh" },
794
813
  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)]"
795
814
  }, [
796
- r("div", $e, [
797
- (c = s.filterScheme) != null && c.length ? (a(), M(S, {
815
+ l("div", De, [
816
+ (d = n.filterScheme) != null && d.length ? (a(), w(T, {
798
817
  key: 0,
799
818
  ref: "filter",
800
- scheme: s.filterScheme,
819
+ scheme: n.filterScheme,
801
820
  layout: "default",
802
821
  "apply-vue-router": "",
803
822
  history: "",
804
823
  name: "filter",
805
- onFilterChange: l.filterChange,
824
+ onFilterChange: s.filterChange,
806
825
  closeFilterBtn: !0,
807
- onFilterClose: t[3] || (t[3] = (D) => s.isFilters = !1)
808
- }, null, 8, ["scheme", "onFilterChange"])) : I("", !0)
826
+ onFilterClose: t[3] || (t[3] = (A) => n.isFilters = !1)
827
+ }, null, 8, ["scheme", "onFilterChange"])) : F("", !0)
809
828
  ])
810
829
  ], 512), [
811
- [J, s.isFilters]
830
+ [K, n.isFilters]
812
831
  ])
813
832
  ];
814
833
  }),
@@ -816,8 +835,8 @@ function Ce(e, t, n, o, s, l) {
816
835
  })
817
836
  ], 64);
818
837
  }
819
- const Te = /* @__PURE__ */ m(oe, [["render", Ce]]), Me = {
820
- components: { AdminTable: Te },
838
+ const Fe = /* @__PURE__ */ b(de, [["render", Ae]]), Ve = {
839
+ components: { AdminTable: Fe },
821
840
  data() {
822
841
  return {
823
842
  table: !1,
@@ -829,7 +848,7 @@ const Te = /* @__PURE__ */ m(oe, [["render", Ce]]), Me = {
829
848
  $route: {
830
849
  async handler() {
831
850
  var e;
832
- (e = F) != null && e.value || await this.getMenu(), await this.checkPageType();
851
+ (e = B) != null && e.value || await this.getMenu(), await this.checkPageType();
833
852
  },
834
853
  deep: !0
835
854
  },
@@ -843,54 +862,54 @@ const Te = /* @__PURE__ */ m(oe, [["render", Ce]]), Me = {
843
862
  methods: {
844
863
  flattenMenu(e) {
845
864
  const t = [];
846
- return e.forEach((n) => {
847
- n.menu ? t.push(...this.flattenMenu(n.menu)) : t.push(n);
865
+ return e.forEach((r) => {
866
+ r.menu ? t.push(...this.flattenMenu(r.menu)) : t.push(r);
848
867
  }), t;
849
868
  },
850
869
  async getMenu() {
851
870
  try {
852
- const { data: e } = await v.get("/api/user-menu");
853
- F.value = e;
871
+ const { data: e } = await k.get("/api/user-menu");
872
+ B.value = e;
854
873
  } catch {
855
874
  }
856
875
  },
857
876
  async checkPageType() {
858
- const e = this.flattenMenu(F.value);
877
+ const e = this.flattenMenu(B.value);
859
878
  e != null && e.length || this.$router.replace("/404");
860
879
  const t = e == null ? void 0 : e.find((o) => {
861
- var s, l;
862
- return (o == null ? void 0 : o.path) == ((l = (s = this.$route) == null ? void 0 : s.params) == null ? void 0 : l.catchAll);
880
+ var n, s;
881
+ return (o == null ? void 0 : o.path) == ((s = (n = this.$route) == null ? void 0 : n.params) == null ? void 0 : s.catchAll);
863
882
  });
864
883
  this.title = t == null ? void 0 : t.ua, t || this.$router.replace("/404");
865
- const n = t == null ? void 0 : t.table;
866
- this.table = n || !1, !n && this.getInterface();
884
+ const r = t == null ? void 0 : t.table;
885
+ this.table = r || !1, !r && this.getInterface();
867
886
  },
868
887
  async getInterface() {
869
888
  var e, t;
870
889
  try {
871
- const { data: n } = await v.get(
890
+ const { data: r } = await k.get(
872
891
  `/api/template/interface/${((t = (e = this.$route) == null ? void 0 : e.params) == null ? void 0 : t.catchAll) || ""}`
873
892
  );
874
- this.interface = n || "";
893
+ this.interface = r || "";
875
894
  } catch {
876
895
  this.interface = "";
877
896
  }
878
897
  }
879
898
  }
880
- }, Se = ["innerHTML"];
881
- function Ve(e, t, n, o, s, l) {
882
- const b = d("AdminTable");
883
- return s.table ? (a(), M(b, {
899
+ }, Ie = ["innerHTML"];
900
+ function Be(e, t, r, o, n, s) {
901
+ const m = u("AdminTable");
902
+ return n.table ? (a(), w(m, {
884
903
  key: 0,
885
- table: s.table
904
+ table: n.table
886
905
  }, null, 8, ["table"])) : (a(), i("div", {
887
906
  key: 1,
888
907
  class: "w-full bg-gray-50",
889
908
  style: { height: "calc(100vh - 120px)" },
890
- innerHTML: s.interface
891
- }, null, 8, Se));
909
+ innerHTML: n.interface
910
+ }, null, 8, Ie));
892
911
  }
893
- const Ie = /* @__PURE__ */ m(Me, [["render", Ve]]);
912
+ const Pe = /* @__PURE__ */ b(Ve, [["render", Be]]);
894
913
  export {
895
- Ie as default
914
+ Pe as default
896
915
  };