@opengis/admin 0.2.130 → 0.2.132
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +97 -97
- package/config.js +4 -4
- package/dist/add-page-DQ70Si9f.js +104 -0
- package/dist/{admin-interface-DZ_JAuHP.js → admin-interface-CgXFerXl.js} +348 -323
- package/dist/{admin-view-CHq_9aht.js → admin-view-t-gzhVnl.js} +231 -291
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +81 -81
- package/dist/assets/logo.svg +41 -41
- package/dist/{card-view-DHcY64lQ.js → card-view-Dtf6Ap9G.js} +1 -1
- package/dist/edit-page-BWRXfML4.js +125 -0
- package/dist/{import-file-BWQ2bV93.js → import-file-CztGvKRc.js} +25619 -26786
- package/dist/style.css +1 -1
- package/module/settings/card/admin.accounts.table/index.yml +7 -7
- package/module/settings/card/admin.accounts.table/rules.hbs +18 -18
- package/module/settings/card/admin.accounts.table/users.hbs +13 -13
- package/module/settings/card/admin.routes.table/groups.hbs +11 -11
- package/module/settings/card/admin.routes.table/users.hbs +16 -16
- package/module/settings/cls/core.actions.json +17 -17
- package/module/settings/cls/core.scope.json +13 -13
- package/module/settings/cls/properties.site_status.json +13 -13
- package/module/settings/cls/properties.widget_status.json +13 -13
- package/module/settings/cls/users.user_type.json +13 -13
- package/module/settings/cls/yes_no.json +11 -11
- package/module/settings/form/admin.accounts.form.json +13 -13
- package/module/settings/form/admin.properties.form.json +15 -15
- package/module/settings/form/admin.roles.form.json +21 -21
- package/module/settings/form/admin.user_properties.form.json +15 -15
- package/module/settings/form/admin.user_roles_card.form.json +13 -13
- package/module/settings/interface/admin.properties.json +4 -4
- package/module/settings/interface/admin.roles.json +4 -4
- package/module/settings/interface/admin.routes.json +4 -4
- package/module/settings/interface/admin.users.json +4 -4
- package/module/settings/select/core.routes.sql +1 -1
- package/module/settings/select/core.user_mentioned.sql +1 -1
- package/module/settings/select/core.user_uid.sql +1 -1
- package/module/settings/table/admin.properties.table.json +39 -39
- package/module/settings/table/admin.user_properties.table.json +34 -34
- package/package.json +5 -5
- package/plugin.js +29 -29
- package/server/helpers/core/badge.js +16 -16
- package/server/helpers/core/buttonHelper.js +21 -21
- package/server/helpers/core/coalesce.js +7 -7
- package/server/helpers/core/select.js +48 -48
- package/server/helpers/core/token.js +18 -18
- package/server/helpers/index.js +36 -35
- package/server/helpers/list/buttonHelper.js +21 -21
- package/server/helpers/temp/contentList.js +58 -58
- package/server/helpers/temp/ifCond.js +101 -101
- package/server/helpers/utils/button.js +5 -5
- package/server/helpers/utils/mdToHTML.js +17 -17
- package/server/plugins/access/index.mjs +6 -6
- package/server/plugins/adminHook.js +81 -81
- package/server/plugins/cron.js +10 -10
- package/server/plugins/docs.js +28 -28
- package/server/routes/access/controllers/access.group.js +29 -29
- package/server/routes/access/controllers/access.group.post.js +54 -54
- package/server/routes/access/index.mjs +11 -11
- package/server/routes/access/schema.mjs +67 -67
- package/server/routes/calendar/controllers/calendar.data.js +125 -125
- package/server/routes/calendar/index.mjs +7 -7
- package/server/routes/calendar/schema.js +21 -21
- package/server/routes/data/controllers/cardTabData.js +49 -49
- package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
- package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
- package/server/routes/data/controllers/tableData.js +31 -31
- package/server/routes/data/controllers/tableDataId.js +27 -27
- package/server/routes/data/controllers/tableFilter.js +108 -108
- package/server/routes/data/controllers/tokenInfo.js +9 -9
- package/server/routes/data/controllers/utils/assignTokens.js +30 -30
- package/server/routes/data/controllers/utils/getColumns.js +8 -8
- package/server/routes/data/index.mjs +20 -20
- package/server/routes/data/schema.js +54 -54
- package/server/routes/menu/controllers/getMenu.js +11 -3
- package/server/routes/menu/controllers/interfaces.js +19 -0
- package/server/routes/menu/index.mjs +7 -5
- package/server/routes/notifications/controllers/readNotifications.js +27 -27
- package/server/routes/notifications/controllers/testEmail.js +35 -35
- package/server/routes/notifications/controllers/userNotifications.js +53 -53
- package/server/routes/notifications/funcs/addNotification.js +21 -21
- package/server/routes/notifications/funcs/sendNotification.js +92 -92
- package/server/routes/notifications/hook/onWidgetSet.js +56 -56
- package/server/routes/notifications/index.mjs +26 -26
- package/server/routes/notifications/schema.js +16 -16
- package/server/routes/print/controllers/cardPrint.js +134 -134
- package/server/routes/print/controllers/printTemplate.js +4 -3
- package/server/routes/print/controllers/printTemplatePreview.js +15 -9
- package/server/routes/properties/funcs/getSettings.js +56 -56
- package/server/routes/properties/schema.js +10 -10
- package/server/routes/properties/utils/refreshData.js +4 -4
- package/server/routes/report/controllers/data.js +76 -76
- package/server/routes/report/controllers/list.js +18 -18
- package/server/routes/report/index.mjs +7 -7
- package/server/routes/report/utils/formatValue.js +179 -179
- package/server/routes/root.mjs +3 -3
- package/server/routes/templates/controllers/getTemplate.js +49 -49
- package/server/routes/templates/index.mjs +16 -16
- package/server/routes/templates/schema.js +8 -8
- package/server/routes/user/controllers/user.cls.id.js +14 -14
- package/server/routes/user/controllers/user.cls.js +71 -71
- package/server/routes/user/controllers/user.info.js +17 -17
- package/server/routes/user/schema.js +14 -14
- package/server/routes/widget/controllers/widget.del.js +47 -47
- package/server/routes/widget/controllers/widget.set.js +84 -84
- package/server/routes/widget/hook/onWidgetSet.js +12 -12
- package/server/routes/widget/index.mjs +16 -16
- package/server/routes/widget/schema.js +12 -12
- package/server/templates/cls/itree.recrzone_category.json +73 -73
- package/server/templates/cls/test.json +9 -9
- package/server/templates/form/admin.user_cls.data.form.json +49 -49
- package/server/templates/form/admin.user_group_rel.form.json +21 -21
- package/server/templates/form/form-user-pass.json +10 -10
- package/server/templates/form/form-user_group.json +39 -39
- package/server/templates/form/form-users.json +156 -156
- package/server/templates/form/user_group_access.form.json +22 -22
- package/server/templates/select/account_id.json +2 -2
- package/server/templates/table/gis.dataset.table.json +43 -43
- package/server/templates/table/management.user_group.table.json +112 -112
- package/server/templates/table/management.users.table.json +126 -126
- package/utils.js +29 -29
- package/dist/add-page-B9j1X71R.js +0 -119
- package/dist/edit-page-DPeBqCDl.js +0 -138
- package/dist/profile-page-vqy75jEB.js +0 -78
- package/dist/user-B_2kh6ic.js +0 -5
- package/module/settings/setting/test.json +0 -6
@@ -1,6 +1,6 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { openBlock as r, createElementBlock as i, createTextVNode as P, toDisplayString as
|
3
|
-
const
|
1
|
+
import { _ as w, f as Be, g as Oe, h as Ne, e as j, I as Ue, i as De, j as N, A as U, V as Ee, k as He, l as Re, m as We, n as Je, o as Ge, a as Ke, p as Qe, u as Ie, s as Xe } from "./import-file-CztGvKRc.js";
|
2
|
+
import { openBlock as r, createElementBlock as i, createTextVNode as P, toDisplayString as T, createElementVNode as l, normalizeClass as I, createCommentVNode as v, resolveComponent as p, Fragment as A, createVNode as x, withCtx as S, createBlock as k, renderList as D, withModifiers as Ye, createStaticVNode as Ze, withDirectives as M, vModelCheckbox as et, Transition as z, vModelText as tt, renderSlot as st, vShow as E, Teleport as nt, getCurrentInstance as Pe, ref as B, resolveDynamicComponent as O, defineComponent as lt, normalizeStyle as Ve } from "vue";
|
3
|
+
const rt = {
|
4
4
|
data() {
|
5
5
|
return {
|
6
6
|
currentSort: ""
|
@@ -46,10 +46,10 @@ const ot = {
|
|
46
46
|
},
|
47
47
|
handleClickSortBtn(t) {
|
48
48
|
this.$emit("change-active", this.data.name), this.currentSort = this.changeCurrentSort(t);
|
49
|
-
const e = this.$route.query, { sort: n, ...
|
49
|
+
const e = this.$route.query, { sort: n, ...a } = e, s = this.currentSort ? `${this.data.name}-${this.currentSort}` : "";
|
50
50
|
this.$router.replace({
|
51
51
|
query: {
|
52
|
-
...
|
52
|
+
...a,
|
53
53
|
...s && { sort: s }
|
54
54
|
}
|
55
55
|
});
|
@@ -58,23 +58,23 @@ const ot = {
|
|
58
58
|
return `${this.data.name}-${t}` === this.selectedSortParam;
|
59
59
|
}
|
60
60
|
}
|
61
|
-
},
|
61
|
+
}, ot = {
|
62
62
|
scope: "col",
|
63
63
|
class: "pe-2 py-1 text-start"
|
64
|
-
},
|
64
|
+
}, at = { class: "w-[24px]" }, it = {
|
65
65
|
key: 1,
|
66
66
|
class: "flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200"
|
67
67
|
};
|
68
|
-
function
|
69
|
-
return r(), i("th",
|
70
|
-
|
68
|
+
function dt(t, e, n, a, s, o) {
|
69
|
+
return r(), i("th", ot, [
|
70
|
+
o.getVisibleIcon ? (r(), i("button", {
|
71
71
|
key: 0,
|
72
72
|
type: "button",
|
73
73
|
class: "flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200",
|
74
|
-
onClick: e[0] || (e[0] = (u) =>
|
74
|
+
onClick: e[0] || (e[0] = (u) => o.handleClickSortBtn(s.currentSort))
|
75
75
|
}, [
|
76
|
-
P(
|
77
|
-
l("span",
|
76
|
+
P(T(o.label) + " ", 1),
|
77
|
+
l("span", at, [
|
78
78
|
s.currentSort ? (r(), i("svg", {
|
79
79
|
key: 0,
|
80
80
|
class: I(["shrink-0 size-3.5", { "rotate-180": s.currentSort === "asc" }]),
|
@@ -92,10 +92,10 @@ function ct(t, e, n, o, s, a) {
|
|
92
92
|
l("path", { d: "M12 19V5" }, null, -1)
|
93
93
|
]), 2)) : v("", !0)
|
94
94
|
])
|
95
|
-
])) : (r(), i("p",
|
95
|
+
])) : (r(), i("p", it, T(o.label), 1))
|
96
96
|
]);
|
97
97
|
}
|
98
|
-
const
|
98
|
+
const ut = /* @__PURE__ */ w(rt, [["render", dt]]), ct = {
|
99
99
|
components: {
|
100
100
|
IconMore: Be,
|
101
101
|
IconDelete: Oe,
|
@@ -178,20 +178,20 @@ const pt = /* @__PURE__ */ A(ot, [["render", ct]]), ht = {
|
|
178
178
|
});
|
179
179
|
}
|
180
180
|
}
|
181
|
-
},
|
181
|
+
}, pt = { class: "inline-flex" }, ht = { 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" }, bt = { class: "flex flex-col items-start" }, ft = ["onClick"], gt = { class: "text-gray-800" }, mt = {
|
182
182
|
key: 1,
|
183
183
|
class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
|
184
|
-
},
|
185
|
-
function
|
184
|
+
}, xt = { class: "flex justify-end p-[16px] pr-0 gap-x-3" };
|
185
|
+
function yt(t, e, n, a, s, o) {
|
186
186
|
const u = p("IconMore"), f = p("IconEdit"), h = p("router-link"), b = p("IconDelete"), d = p("VsPopover"), _ = p("VsConfirm");
|
187
|
-
return r(), i(
|
188
|
-
l("div",
|
187
|
+
return r(), i(A, null, [
|
188
|
+
l("div", pt, [
|
189
189
|
x(d, {
|
190
190
|
trigger: "click",
|
191
191
|
placement: "bottom-left"
|
192
192
|
}, {
|
193
193
|
reference: S(() => [
|
194
|
-
l("button",
|
194
|
+
l("button", ht, [
|
195
195
|
x(u, {
|
196
196
|
height: "16",
|
197
197
|
width: "16"
|
@@ -199,9 +199,9 @@ function vt(t, e, n, o, s, a) {
|
|
199
199
|
])
|
200
200
|
]),
|
201
201
|
default: S(() => {
|
202
|
-
var m, g, C, y,
|
202
|
+
var m, g, C, y, $;
|
203
203
|
return [
|
204
|
-
l("div",
|
204
|
+
l("div", bt, [
|
205
205
|
(m = n.actions) != null && m.includes("edit") && n.isForm ? (r(), k(h, {
|
206
206
|
key: 0,
|
207
207
|
to: `/edit?table=${(C = (g = t.$route) == null ? void 0 : g.params) == null ? void 0 : C.catchAll}&id=${(y = n.item) == null ? void 0 : y.id}`,
|
@@ -213,18 +213,18 @@ function vt(t, e, n, o, s, a) {
|
|
213
213
|
]),
|
214
214
|
_: 1
|
215
215
|
}, 8, ["to"])) : v("", !0),
|
216
|
-
(r(!0), i(
|
216
|
+
(r(!0), i(A, null, D(o.getCustomActions, (V, L) => (r(), i("button", {
|
217
217
|
key: L,
|
218
|
-
onClick: (q) =>
|
218
|
+
onClick: (q) => o.customButtonAction(V),
|
219
219
|
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"
|
220
220
|
}, [
|
221
221
|
x(b, { class: "opacity-0" }),
|
222
|
-
l("span",
|
223
|
-
], 8,
|
224
|
-
n.isForm ? (r(), i("div",
|
225
|
-
(
|
222
|
+
l("span", gt, T(V == null ? void 0 : V.label), 1)
|
223
|
+
], 8, ft))), 128)),
|
224
|
+
n.isForm ? (r(), i("div", mt)) : v("", !0),
|
225
|
+
($ = n.actions) != null && $.includes("del") ? (r(), i("button", {
|
226
226
|
key: 2,
|
227
|
-
onClick: e[0] || (e[0] =
|
227
|
+
onClick: e[0] || (e[0] = Ye((...V) => o.openConfirm && o.openConfirm(...V), ["stop"])),
|
228
228
|
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"
|
229
229
|
}, [
|
230
230
|
x(b),
|
@@ -244,7 +244,7 @@ function vt(t, e, n, o, s, a) {
|
|
244
244
|
}, {
|
245
245
|
default: S(() => [
|
246
246
|
e[6] || (e[6] = l("p", { class: "mt-1 text-sm text-gray-600 dark:text-neutral-400" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
247
|
-
l("div",
|
247
|
+
l("div", xt, [
|
248
248
|
l("button", {
|
249
249
|
type: "button",
|
250
250
|
class: "inline-flex items-center px-3 py-2 text-xs font-medium duration-300 border rounded-lg shadow-sm hover:bg-gray-100 gap-x-2 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",
|
@@ -253,7 +253,7 @@ function vt(t, e, n, o, s, a) {
|
|
253
253
|
l("button", {
|
254
254
|
type: "button",
|
255
255
|
class: "inline-flex items-center px-3 py-2 text-xs font-medium text-white duration-300 bg-red-500 rounded-lg gap-x-2 hover:bg-red-700 disabled:opacity-50 disabled:pointer-events-none",
|
256
|
-
onClick: e[2] || (e[2] = (...m) =>
|
256
|
+
onClick: e[2] || (e[2] = (...m) => o.deleteElement && o.deleteElement(...m))
|
257
257
|
}, " Так, я впевнена(ий) ")
|
258
258
|
])
|
259
259
|
]),
|
@@ -261,7 +261,7 @@ function vt(t, e, n, o, s, a) {
|
|
261
261
|
}, 8, ["visible"])
|
262
262
|
], 64);
|
263
263
|
}
|
264
|
-
const
|
264
|
+
const kt = /* @__PURE__ */ w(ct, [["render", yt]]), vt = {}, _t = {
|
265
265
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
266
266
|
xmlns: "http://www.w3.org/2000/svg",
|
267
267
|
viewBox: "0 0 24 24",
|
@@ -271,15 +271,15 @@ const _t = /* @__PURE__ */ A(ht, [["render", vt]]), Ct = {}, wt = {
|
|
271
271
|
"stroke-linecap": "round",
|
272
272
|
"stroke-linejoin": "round"
|
273
273
|
};
|
274
|
-
function
|
275
|
-
return r(), i("svg",
|
274
|
+
function Ct(t, e, n, a, s, o) {
|
275
|
+
return r(), i("svg", _t, e[0] || (e[0] = [
|
276
276
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
277
277
|
l("path", { d: "M7 20V4" }, null, -1),
|
278
278
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
279
279
|
l("path", { d: "M17 4v16" }, null, -1)
|
280
280
|
]));
|
281
281
|
}
|
282
|
-
const
|
282
|
+
const wt = /* @__PURE__ */ w(vt, [["render", Ct]]), $t = {}, Tt = {
|
283
283
|
xmlns: "http://www.w3.org/2000/svg",
|
284
284
|
width: "24",
|
285
285
|
height: "24",
|
@@ -291,8 +291,8 @@ const Tt = /* @__PURE__ */ A(Ct, [["render", $t]]), At = {}, St = {
|
|
291
291
|
"stroke-linejoin": "round",
|
292
292
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-rosette-discount-check"
|
293
293
|
};
|
294
|
-
function
|
295
|
-
return r(), i("svg",
|
294
|
+
function At(t, e, n, a, s, o) {
|
295
|
+
return r(), i("svg", Tt, e[0] || (e[0] = [
|
296
296
|
l("path", {
|
297
297
|
stroke: "none",
|
298
298
|
d: "M0 0h24v24H0z",
|
@@ -302,8 +302,8 @@ function It(t, e, n, o, s, a) {
|
|
302
302
|
l("path", { d: "M9 12l2 2l4 -4" }, null, -1)
|
303
303
|
]));
|
304
304
|
}
|
305
|
-
const
|
306
|
-
components: { IconExport:
|
305
|
+
const St = /* @__PURE__ */ w($t, [["render", At]]), It = {
|
306
|
+
components: { IconExport: wt, IconChevronDown: Ue, IconSuccess: St },
|
307
307
|
props: {
|
308
308
|
table: String,
|
309
309
|
columns: Array,
|
@@ -367,17 +367,17 @@ const Vt = /* @__PURE__ */ A(At, [["render", It]]), Dt = {
|
|
367
367
|
custom: this.filterCustom || null
|
368
368
|
},
|
369
369
|
responseType: "blob"
|
370
|
-
}), n = await e.data.text(),
|
370
|
+
}), n = await e.data.text(), a = n != null && n.includes(";") ? null : JSON == null ? void 0 : JSON.parse(n), s = new Blob([e.data], {
|
371
371
|
type: "application/octet-stream"
|
372
|
-
}),
|
373
|
-
if (u.href =
|
372
|
+
}), o = window.URL.createObjectURL(s), u = document.createElement("a");
|
373
|
+
if (u.href = o, u.setAttribute(
|
374
374
|
"download",
|
375
375
|
`${this.table.split(".")[0]}.${this.format}`
|
376
|
-
), document.body.appendChild(u), typeof
|
376
|
+
), document.body.appendChild(u), typeof a == "string") {
|
377
377
|
this.exportTable();
|
378
378
|
return;
|
379
379
|
}
|
380
|
-
u.click(), document.body.removeChild(u), window.URL.revokeObjectURL(
|
380
|
+
u.click(), document.body.removeChild(u), window.URL.revokeObjectURL(o), this.$notify({
|
381
381
|
type: "success",
|
382
382
|
title: "Експорт",
|
383
383
|
message: "Файл успішно експортовано!"
|
@@ -405,25 +405,25 @@ const Vt = /* @__PURE__ */ A(At, [["render", It]]), Dt = {
|
|
405
405
|
this.cols = (e = (t = this.columns) == null ? void 0 : t.filter((n) => (n == null ? void 0 : n.hidden) !== !0)) == null ? void 0 : e.map((n) => n == null ? void 0 : n.name), this.activeAction = "choceVisible";
|
406
406
|
}
|
407
407
|
}
|
408
|
-
},
|
408
|
+
}, Vt = {
|
409
409
|
key: 0,
|
410
410
|
class: "flex flex-col items-center"
|
411
|
-
},
|
411
|
+
}, Dt = {
|
412
412
|
key: 1,
|
413
413
|
class: "p-4"
|
414
|
-
},
|
414
|
+
}, Pt = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Ft = { class: "flex items-center gap-[10px] -ml-[10px] my-[10px]" }, jt = ["onClick"], Lt = {
|
415
415
|
key: 0,
|
416
416
|
class: "block h-[8px] w-[8px] rounded-full bg-blue-500"
|
417
|
-
},
|
417
|
+
}, Mt = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, zt = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, qt = { class: "mt-2 space-y-2" }, Bt = ["id", "onChange"], Ot = ["for"], Nt = {
|
418
418
|
key: 0,
|
419
419
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
420
|
-
},
|
420
|
+
}, Ut = {
|
421
421
|
key: 1,
|
422
422
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
423
423
|
};
|
424
|
-
function
|
424
|
+
function Et(t, e, n, a, s, o) {
|
425
425
|
const u = p("IconExport"), f = p("IconSuccess"), h = p("VsCheckbox"), b = p("VsDialog");
|
426
|
-
return r(), i(
|
426
|
+
return r(), i(A, null, [
|
427
427
|
l("button", {
|
428
428
|
onClick: e[0] || (e[0] = (d) => s.isOpen = !0),
|
429
429
|
class: "py-2 max-h-[34px] px-2.5 md:inline-flex hidden 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"
|
@@ -442,7 +442,7 @@ function Rt(t, e, n, o, s, a) {
|
|
442
442
|
closeClickBack: !0
|
443
443
|
}, {
|
444
444
|
footer: S(() => [
|
445
|
-
s.isSuccessTemplate ? (r(), i("div",
|
445
|
+
s.isSuccessTemplate ? (r(), i("div", Nt, [
|
446
446
|
l("button", {
|
447
447
|
type: "button",
|
448
448
|
class: "inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-nowrap text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
@@ -453,7 +453,7 @@ function Rt(t, e, n, o, s, a) {
|
|
453
453
|
class: "inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-blue-600 border border-blue-600 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500",
|
454
454
|
onClick: e[3] || (e[3] = (d) => s.isSuccessTemplate = !1)
|
455
455
|
}, " Вигрузити ще ")
|
456
|
-
])) : (r(), i("div",
|
456
|
+
])) : (r(), i("div", Ut, [
|
457
457
|
l("button", {
|
458
458
|
type: "button",
|
459
459
|
class: "inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-nowrap text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
@@ -462,23 +462,23 @@ function Rt(t, e, n, o, s, a) {
|
|
462
462
|
l("button", {
|
463
463
|
type: "button",
|
464
464
|
class: "inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-blue-600 border border-blue-600 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500",
|
465
|
-
onClick: e[5] || (e[5] = (...d) =>
|
465
|
+
onClick: e[5] || (e[5] = (...d) => o.exportTable && o.exportTable(...d))
|
466
466
|
}, " Завантажити таблицю ")
|
467
467
|
]))
|
468
468
|
]),
|
469
469
|
default: S(() => [
|
470
|
-
s.isSuccessTemplate ? (r(), i("div",
|
470
|
+
s.isSuccessTemplate ? (r(), i("div", Vt, [
|
471
471
|
x(f, {
|
472
472
|
height: "100",
|
473
473
|
width: "100",
|
474
474
|
class: "text-green-200 mb-[20px]"
|
475
475
|
}),
|
476
476
|
e[8] || (e[8] = l("h2", null, "Звіт сформовано і збережено", -1))
|
477
|
-
])) : (r(), i("div",
|
478
|
-
l("div",
|
477
|
+
])) : (r(), i("div", Dt, [
|
478
|
+
l("div", Pt, [
|
479
479
|
e[9] || (e[9] = l("h2", { class: "text-sm font-[600] text-gray-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
480
|
-
l("div",
|
481
|
-
(r(!0), i(
|
480
|
+
l("div", Ft, [
|
481
|
+
(r(!0), i(A, null, D(s.actions, (d) => (r(), i("button", {
|
482
482
|
key: d == null ? void 0 : d.name,
|
483
483
|
onClick: d == null ? void 0 : d.function,
|
484
484
|
class: "inline-flex items-center gap-[8px] justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border-gray-200 text-nowrap text-start"
|
@@ -486,13 +486,13 @@ function Rt(t, e, n, o, s, a) {
|
|
486
486
|
l("span", {
|
487
487
|
class: I(["h-[14px] w-[14px] border rounded-full flex items-center justify-center", { "border-blue-500": (d == null ? void 0 : d.name) === s.activeAction }])
|
488
488
|
}, [
|
489
|
-
(d == null ? void 0 : d.name) === s.activeAction ? (r(), i("span",
|
489
|
+
(d == null ? void 0 : d.name) === s.activeAction ? (r(), i("span", Lt)) : v("", !0)
|
490
490
|
], 2),
|
491
|
-
P(" " +
|
492
|
-
], 8,
|
491
|
+
P(" " + T(d == null ? void 0 : d.label), 1)
|
492
|
+
], 8, jt))), 128))
|
493
493
|
]),
|
494
|
-
l("div",
|
495
|
-
(r(!0), i(
|
494
|
+
l("div", Mt, [
|
495
|
+
(r(!0), i(A, null, D(n.columns, (d, _) => (r(), i("div", {
|
496
496
|
class: "flex items-center",
|
497
497
|
key: _,
|
498
498
|
style: { width: "calc((100% - 10px) / 2)" }
|
@@ -507,10 +507,10 @@ function Rt(t, e, n, o, s, a) {
|
|
507
507
|
]))), 128))
|
508
508
|
])
|
509
509
|
]),
|
510
|
-
l("div",
|
510
|
+
l("div", zt, [
|
511
511
|
e[10] || (e[10] = l("h2", { class: "text-sm font-[600] text-gray-500" }, "Виберіть формат таблиці:", -1)),
|
512
|
-
l("div",
|
513
|
-
(r(!0), i(
|
512
|
+
l("div", qt, [
|
513
|
+
(r(!0), i(A, null, D(s.tableFormats, (d, _) => (r(), i("div", {
|
514
514
|
class: "flex items-center",
|
515
515
|
key: _
|
516
516
|
}, [
|
@@ -519,12 +519,12 @@ function Rt(t, e, n, o, s, a) {
|
|
519
519
|
name: "hs-pro-duecmfm",
|
520
520
|
class: "text-blue-600 border-gray-300 rounded-full shrink-0 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",
|
521
521
|
id: d,
|
522
|
-
onChange: (m) =>
|
523
|
-
}, null, 40,
|
522
|
+
onChange: (m) => o.selectFormat(d)
|
523
|
+
}, null, 40, Bt),
|
524
524
|
l("label", {
|
525
525
|
for: d,
|
526
526
|
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
527
|
-
}, " Формат " +
|
527
|
+
}, " Формат " + T(d), 9, Ot)
|
528
528
|
]))), 128))
|
529
529
|
])
|
530
530
|
])
|
@@ -534,7 +534,7 @@ function Rt(t, e, n, o, s, a) {
|
|
534
534
|
}, 8, ["visible"])
|
535
535
|
], 64);
|
536
536
|
}
|
537
|
-
const
|
537
|
+
const Ht = /* @__PURE__ */ w(It, [["render", Et]]), Rt = {}, Wt = {
|
538
538
|
xmlns: "http://www.w3.org/2000/svg",
|
539
539
|
viewBox: "0 0 24 24",
|
540
540
|
fill: "none",
|
@@ -544,12 +544,12 @@ const Wt = /* @__PURE__ */ A(Dt, [["render", Rt]]), Jt = {}, Gt = {
|
|
544
544
|
"stroke-linejoin": "round",
|
545
545
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
546
546
|
};
|
547
|
-
function
|
548
|
-
return r(), i("svg",
|
549
|
-
|
547
|
+
function Jt(t, e, n, a, s, o) {
|
548
|
+
return r(), i("svg", Wt, e[0] || (e[0] = [
|
549
|
+
Ze('<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)
|
550
550
|
]));
|
551
551
|
}
|
552
|
-
const
|
552
|
+
const Gt = /* @__PURE__ */ w(Rt, [["render", Jt]]), Kt = {
|
553
553
|
props: { column: Object },
|
554
554
|
emits: ["update-column"],
|
555
555
|
components: {
|
@@ -569,19 +569,19 @@ const Qt = /* @__PURE__ */ A(Jt, [["render", Kt]]), Xt = {
|
|
569
569
|
var t;
|
570
570
|
((t = this.column) == null ? void 0 : t.hidden) !== !0 && (this.value = !0);
|
571
571
|
}
|
572
|
-
},
|
573
|
-
function
|
572
|
+
}, Qt = { class: "flex justify-between items-center py-1.5 px-3 cursor-pointer rounded-lg hover:bg-gray-100 has-[:disabled]:opacity-50 has-[:disabled]:pointer-events-none dark:hover:bg-neutral-800" }, Xt = { class: "flex justify-between flex-1 items-center gap-x-2.5 cursor-pointer text-[13px] text-gray-800 dark:text-neutral-300" };
|
573
|
+
function Yt(t, e, n, a, s, o) {
|
574
574
|
var f, h;
|
575
575
|
const u = p("IconCheck2");
|
576
|
-
return r(), i("div",
|
577
|
-
l("label",
|
578
|
-
P(
|
576
|
+
return r(), i("div", Qt, [
|
577
|
+
l("label", Xt, [
|
578
|
+
P(T(((f = n.column) == null ? void 0 : f.ua) || ((h = n.column) == null ? void 0 : h.title)) + " ", 1),
|
579
579
|
M(l("input", {
|
580
580
|
type: "checkbox",
|
581
581
|
"onUpdate:modelValue": e[0] || (e[0] = (b) => s.value = b),
|
582
582
|
class: "hidden"
|
583
583
|
}, null, 512), [
|
584
|
-
[
|
584
|
+
[et, s.value]
|
585
585
|
]),
|
586
586
|
l("span", {
|
587
587
|
class: I(["flex items-center justify-center text-white border border-gray-300 rounded shrink-0 size-4 focus:ring-blue-500", [s.value ? "bg-blue-600 border-0" : "bg-white"]])
|
@@ -594,8 +594,8 @@ function es(t, e, n, o, s, a) {
|
|
594
594
|
])
|
595
595
|
]);
|
596
596
|
}
|
597
|
-
const
|
598
|
-
components: { IconColumns:
|
597
|
+
const Zt = /* @__PURE__ */ w(Kt, [["render", Yt]]), es = {
|
598
|
+
components: { IconColumns: Gt, AdminTableColumnsHiddenItem: Zt },
|
599
599
|
emits: ["update-columns"],
|
600
600
|
props: { columns: Array },
|
601
601
|
data() {
|
@@ -609,8 +609,8 @@ const ts = /* @__PURE__ */ A(Xt, [["render", es]]), ss = {
|
|
609
609
|
var t;
|
610
610
|
return (t = this.columns) == null ? void 0 : t.filter(
|
611
611
|
(e) => {
|
612
|
-
var n,
|
613
|
-
return ((s = (n = e == null ? void 0 : e.ua) == null ? void 0 : n.toLowerCase()) == null ? void 0 : s.includes((
|
612
|
+
var n, a, s, o, u, f;
|
613
|
+
return ((s = (n = e == null ? void 0 : e.ua) == null ? void 0 : n.toLowerCase()) == null ? void 0 : s.includes((a = this.searchValue) == null ? void 0 : a.toLowerCase())) || ((f = (o = e == null ? void 0 : e.title) == null ? void 0 : o.toLowerCase()) == null ? void 0 : f.includes((u = this.searchValue) == null ? void 0 : u.toLowerCase()));
|
614
614
|
}
|
615
615
|
);
|
616
616
|
}
|
@@ -624,31 +624,31 @@ const ts = /* @__PURE__ */ A(Xt, [["render", es]]), ss = {
|
|
624
624
|
e && !e.contains(t.target) && (this.visible = !1, document.removeEventListener("click", this.handleClickOutside));
|
625
625
|
},
|
626
626
|
updateColumn(t) {
|
627
|
-
const e = this.columns.findIndex((
|
627
|
+
const e = this.columns.findIndex((a) => (a == null ? void 0 : a.name) === (t == null ? void 0 : t.name)), n = this.columns;
|
628
628
|
n[e] = t, this.$emit("update-columns", [...n]);
|
629
629
|
}
|
630
630
|
},
|
631
631
|
beforeUnmount() {
|
632
632
|
document.removeEventListener("click", this.handleClickOutside);
|
633
633
|
}
|
634
|
-
},
|
634
|
+
}, ts = {
|
635
635
|
class: "relative",
|
636
636
|
ref: "wrapper"
|
637
|
-
},
|
637
|
+
}, ss = {
|
638
638
|
key: 0,
|
639
639
|
class: "absolute left-[50%] top-[110%] translate-x-[-50%] z-10 w-64 transition-[opacity,margin] duration bg-white rounded-xl shadow-lg dark:bg-neutral-900"
|
640
|
-
},
|
640
|
+
}, ns = { class: "relative p-1 border-gray-200 border-y dark:border-neutral-800" }, ls = { class: "p-1 pt-3 max-h-80 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-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" }, rs = {
|
641
641
|
key: 0,
|
642
642
|
class: "block px-3 mb-2 text-xs text-gray-500 dark:text-neutral-500"
|
643
|
-
},
|
643
|
+
}, os = { class: "space-y-1" }, as = {
|
644
644
|
key: 1,
|
645
645
|
class: "flex items-center px-3 text-[13px] py-1.5 px-3 rounded-md cursor-pointer group"
|
646
646
|
};
|
647
|
-
function
|
647
|
+
function is(t, e, n, a, s, o) {
|
648
648
|
const u = p("IconColumns"), f = p("AdminTableColumnsHiddenItem");
|
649
|
-
return r(), i("div",
|
649
|
+
return r(), i("div", ts, [
|
650
650
|
l("button", {
|
651
|
-
onClick: e[0] || (e[0] = (...h) =>
|
651
|
+
onClick: e[0] || (e[0] = (...h) => o.toggleVisible && o.toggleVisible(...h)),
|
652
652
|
class: "py-2 max-h-[34px] px-2.5 md:inline-flex hidden 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"
|
653
653
|
}, [
|
654
654
|
x(u, {
|
@@ -660,27 +660,27 @@ function us(t, e, n, o, s, a) {
|
|
660
660
|
default: S(() => {
|
661
661
|
var h, b;
|
662
662
|
return [
|
663
|
-
s.visible ? (r(), i("div",
|
663
|
+
s.visible ? (r(), i("div", ss, [
|
664
664
|
e[2] || (e[2] = l("div", { class: "flex items-center justify-between h-[48px] px-4 py-2 gap-x-2 text-sm font-medium text-gray-800" }, " Колонки ", -1)),
|
665
|
-
l("div",
|
665
|
+
l("div", ns, [
|
666
666
|
M(l("input", {
|
667
667
|
"onUpdate:modelValue": e[1] || (e[1] = (d) => s.searchValue = d),
|
668
668
|
type: "text",
|
669
669
|
class: "py-1.5 px-3 block w-full border-transparent rounded-lg sm:text-sm text-base placeholder:text-gray-500 hover:bg-gray-100 focus:outline-none focus:border-transparent focus:ring-0 focus:bg-gray-100 disabled:opacity-100 disabled:pointer-events-none dark:bg-transparent dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:ring-neutral-600 dark:focus:bg-neutral-800",
|
670
|
-
placeholder: "
|
670
|
+
placeholder: "Search",
|
671
671
|
autofocus: ""
|
672
672
|
}, null, 512), [
|
673
|
-
[
|
673
|
+
[tt, s.searchValue]
|
674
674
|
])
|
675
675
|
]),
|
676
|
-
l("div",
|
677
|
-
(h =
|
678
|
-
l("div",
|
679
|
-
(b =
|
676
|
+
l("div", ls, [
|
677
|
+
(h = o.filteredColumn) != null && h.length ? (r(), i("span", rs, " Оберіть колонки для відображення ")) : v("", !0),
|
678
|
+
l("div", os, [
|
679
|
+
(b = o.filteredColumn) != null && b.length ? (r(!0), i(A, { key: 0 }, D(o.filteredColumn, (d, _) => (r(), k(f, {
|
680
680
|
key: _,
|
681
681
|
column: d,
|
682
|
-
onUpdateColumn:
|
683
|
-
}, null, 8, ["column", "onUpdateColumn"]))), 128)) : (r(), i("div",
|
682
|
+
onUpdateColumn: o.updateColumn
|
683
|
+
}, null, 8, ["column", "onUpdateColumn"]))), 128)) : (r(), i("div", as, " Нічого не знайдено "))
|
684
684
|
])
|
685
685
|
])
|
686
686
|
])) : v("", !0)
|
@@ -690,7 +690,7 @@ function us(t, e, n, o, s, a) {
|
|
690
690
|
})
|
691
691
|
], 512);
|
692
692
|
}
|
693
|
-
const
|
693
|
+
const ds = /* @__PURE__ */ w(es, [["render", is]]), us = {}, cs = {
|
694
694
|
xmlns: "http://www.w3.org/2000/svg",
|
695
695
|
viewBox: "0 0 24 24",
|
696
696
|
fill: "none",
|
@@ -700,8 +700,8 @@ const cs = /* @__PURE__ */ A(ss, [["render", us]]), ps = {}, hs = {
|
|
700
700
|
"stroke-linejoin": "round",
|
701
701
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-minus"
|
702
702
|
};
|
703
|
-
function
|
704
|
-
return r(), i("svg",
|
703
|
+
function ps(t, e, n, a, s, o) {
|
704
|
+
return r(), i("svg", cs, e[0] || (e[0] = [
|
705
705
|
l("path", {
|
706
706
|
stroke: "none",
|
707
707
|
d: "M0 0h24v24H0z",
|
@@ -710,8 +710,8 @@ function bs(t, e, n, o, s, a) {
|
|
710
710
|
l("path", { d: "M5 12l14 0" }, null, -1)
|
711
711
|
]));
|
712
712
|
}
|
713
|
-
const
|
714
|
-
components: { IconPlus: N, IconMinus:
|
713
|
+
const hs = /* @__PURE__ */ w(us, [["render", ps]]), bs = {
|
714
|
+
components: { IconPlus: N, IconMinus: hs },
|
715
715
|
props: {
|
716
716
|
title: String,
|
717
717
|
defaultValue: { type: Boolean, default: () => !1 }
|
@@ -719,18 +719,18 @@ const fs = /* @__PURE__ */ A(ps, [["render", bs]]), gs = {
|
|
719
719
|
data() {
|
720
720
|
return { expanded: this.defaultValue };
|
721
721
|
}
|
722
|
-
},
|
723
|
-
function
|
722
|
+
}, fs = { class: "hs-accordion" }, gs = { class: "py-0.5 flex items-center gap-x-0.5 w-full" }, ms = { class: "text-sm font-medium" }, xs = { class: "relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b" };
|
723
|
+
function ys(t, e, n, a, s, o) {
|
724
724
|
const u = p("IconPlus"), f = p("IconMinus");
|
725
725
|
return r(), i("div", null, [
|
726
726
|
l("div", null, [
|
727
|
-
l("div",
|
728
|
-
l("div",
|
727
|
+
l("div", fs, [
|
728
|
+
l("div", gs, [
|
729
729
|
l("div", {
|
730
730
|
onClick: e[0] || (e[0] = (h) => s.expanded = !s.expanded),
|
731
731
|
class: "rounded-md cursor-pointer grow"
|
732
732
|
}, [
|
733
|
-
l("span",
|
733
|
+
l("span", ms, T(n.title), 1)
|
734
734
|
]),
|
735
735
|
l("button", {
|
736
736
|
class: "flex items-center justify-center rounded-md size-6 hover:bg-gray-100",
|
@@ -744,8 +744,8 @@ function vs(t, e, n, o, s, a) {
|
|
744
744
|
]),
|
745
745
|
x(z, { name: "fade" }, {
|
746
746
|
default: S(() => [
|
747
|
-
M(l("div",
|
748
|
-
|
747
|
+
M(l("div", xs, [
|
748
|
+
st(t.$slots, "default", {}, void 0, !0)
|
749
749
|
], 512), [
|
750
750
|
[E, s.expanded]
|
751
751
|
])
|
@@ -756,32 +756,32 @@ function vs(t, e, n, o, s, a) {
|
|
756
756
|
])
|
757
757
|
]);
|
758
758
|
}
|
759
|
-
const
|
759
|
+
const ks = /* @__PURE__ */ w(bs, [["render", ys], ["__scopeId", "data-v-c6318482"]]), vs = {
|
760
760
|
components: {
|
761
761
|
AdminComponentIs: U,
|
762
|
-
AdminTree:
|
762
|
+
AdminTree: ks,
|
763
763
|
VsNoData: Ee,
|
764
764
|
VsWidgetComments: He,
|
765
765
|
VsWidgetMap: Re,
|
766
766
|
VsWidgetFileList: We
|
767
767
|
},
|
768
768
|
props: { table: String, columns: Array, row: Object }
|
769
|
-
},
|
769
|
+
}, _s = {
|
770
770
|
class: "hs-accordion border-gray-100 w-[360px] shrink-0 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",
|
771
771
|
style: { height: "calc(100vh - 310px)" }
|
772
|
-
},
|
772
|
+
}, Cs = {
|
773
773
|
class: "border-l",
|
774
774
|
style: { height: "calc(100vh - 360px)" }
|
775
|
-
},
|
776
|
-
function
|
775
|
+
}, ws = { class: "flow-root mt-[10px]" }, $s = { class: "-my-3 text-sm divide-y divide-gray-100" }, Ts = { class: "flex py-3 sm:grid-cols-3 sm:gap-4" }, As = { class: "font-medium text-black w-[50%]" }, Ss = { class: "text-gray-700 sm:col-span-2 w-[50%]" }, Is = { class: "table-info-card" }, Vs = { class: "table-info-card" };
|
776
|
+
function Ds(t, e, n, a, s, o) {
|
777
777
|
var m, g, C;
|
778
778
|
const u = p("AdminComponentIs"), f = p("AdminTree"), h = p("VsWidgetMap"), b = p("VsNoData"), d = p("VsWidgetComments"), _ = p("VsWidgetFileList");
|
779
|
-
return r(), i("div",
|
779
|
+
return r(), i("div", _s, [
|
780
780
|
e[0] || (e[0] = l("div", { class: "p-[10px] pl-[18px] pb-[18px] border-b" }, [
|
781
781
|
l("h2", { class: "text-sm font-medium" }, "Інформація про об'єкт")
|
782
782
|
], -1)),
|
783
|
-
l("div",
|
784
|
-
(g = (m = t.$route) == null ? void 0 : m.query) != null && g.card ? (r(), i(
|
783
|
+
l("div", Cs, [
|
784
|
+
(g = (m = t.$route) == null ? void 0 : m.query) != null && g.card ? (r(), i(A, { key: 0 }, [
|
785
785
|
n.row ? (r(), k(f, {
|
786
786
|
key: 0,
|
787
787
|
defaultValue: !0,
|
@@ -789,11 +789,11 @@ function Fs(t, e, n, o, s, a) {
|
|
789
789
|
class: "border-b p-[10px] py-[16px]"
|
790
790
|
}, {
|
791
791
|
default: S(() => [
|
792
|
-
l("div",
|
793
|
-
l("dl",
|
794
|
-
(r(!0), i(
|
795
|
-
l("dt",
|
796
|
-
l("dd",
|
792
|
+
l("div", ws, [
|
793
|
+
l("dl", $s, [
|
794
|
+
(r(!0), i(A, null, D(n.columns, (y) => (r(), i("div", Ts, [
|
795
|
+
l("dt", As, T((y == null ? void 0 : y.ua) || (y == null ? void 0 : y.title)), 1),
|
796
|
+
l("dd", Ss, [
|
797
797
|
x(u, {
|
798
798
|
row: n.row,
|
799
799
|
column: y,
|
@@ -812,11 +812,11 @@ function Fs(t, e, n, o, s, a) {
|
|
812
812
|
class: "border-b p-[10px] py-[16px]"
|
813
813
|
}, {
|
814
814
|
default: S(() => {
|
815
|
-
var y,
|
815
|
+
var y, $;
|
816
816
|
return [
|
817
817
|
(y = n.row) != null && y.geom ? (r(), k(h, {
|
818
818
|
key: 0,
|
819
|
-
geometry: (
|
819
|
+
geometry: ($ = n.row) == null ? void 0 : $.geom,
|
820
820
|
zoom: 14
|
821
821
|
}, null, 8, ["geometry"])) : (r(), k(b, {
|
822
822
|
key: 1,
|
@@ -835,7 +835,7 @@ function Fs(t, e, n, o, s, a) {
|
|
835
835
|
default: S(() => {
|
836
836
|
var y;
|
837
837
|
return [
|
838
|
-
l("div",
|
838
|
+
l("div", Is, [
|
839
839
|
x(d, {
|
840
840
|
id: (y = n.row) == null ? void 0 : y.id
|
841
841
|
}, null, 8, ["id"])
|
@@ -849,12 +849,12 @@ function Fs(t, e, n, o, s, a) {
|
|
849
849
|
class: "border-b p-[10px] py-[16px]"
|
850
850
|
}, {
|
851
851
|
default: S(() => {
|
852
|
-
var y,
|
852
|
+
var y, $;
|
853
853
|
return [
|
854
|
-
l("div",
|
854
|
+
l("div", Vs, [
|
855
855
|
(r(), k(_, {
|
856
856
|
key: (y = n.row) == null ? void 0 : y.id,
|
857
|
-
id: (
|
857
|
+
id: ($ = n.row) == null ? void 0 : $.id
|
858
858
|
}, null, 8, ["id"]))
|
859
859
|
])
|
860
860
|
];
|
@@ -868,7 +868,7 @@ function Fs(t, e, n, o, s, a) {
|
|
868
868
|
])
|
869
869
|
]);
|
870
870
|
}
|
871
|
-
const
|
871
|
+
const Ps = /* @__PURE__ */ w(vs, [["render", Ds]]), Fs = {
|
872
872
|
emits: ["filterChange"],
|
873
873
|
props: {
|
874
874
|
scheme: { type: Object },
|
@@ -886,13 +886,13 @@ const js = /* @__PURE__ */ A(Cs, [["render", Fs]]), Ls = {
|
|
886
886
|
this.isFilters && t.classList.contains("filter-container") && (this.isFilters = !1);
|
887
887
|
}
|
888
888
|
}
|
889
|
-
},
|
889
|
+
}, js = {
|
890
890
|
key: 0,
|
891
891
|
class: "px-[7px] text-[10px] py-[1px] font-[700] text-white bg-blue-500 rounded-full"
|
892
|
-
},
|
893
|
-
function
|
892
|
+
}, Ls = { class: "filter-content h-screen bg-white w-[400px] overflow-x-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" };
|
893
|
+
function Ms(t, e, n, a, s, o) {
|
894
894
|
const u = p("IconFilter"), f = p("VsFilter");
|
895
|
-
return r(), i(
|
895
|
+
return r(), i(A, null, [
|
896
896
|
l("button", {
|
897
897
|
onClick: e[0] || (e[0] = (h) => s.isFilters = !s.isFilters),
|
898
898
|
class: "py-2 px-2.5 max-h-[34px] 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"
|
@@ -902,19 +902,19 @@ function qs(t, e, n, o, s, a) {
|
|
902
902
|
width: "16"
|
903
903
|
}),
|
904
904
|
e[4] || (e[4] = P(" Фільтри ")),
|
905
|
-
n.onFilters ? (r(), i("span",
|
905
|
+
n.onFilters ? (r(), i("span", js, T(n.onFilters), 1)) : v("", !0)
|
906
906
|
]),
|
907
907
|
x(z, { name: "fade" }, {
|
908
908
|
default: S(() => {
|
909
909
|
var h;
|
910
910
|
return [
|
911
|
-
(r(), k(
|
911
|
+
(r(), k(nt, { to: "#modal" }, [
|
912
912
|
M(l("div", {
|
913
|
-
onClick: e[3] || (e[3] = (...b) =>
|
913
|
+
onClick: e[3] || (e[3] = (...b) => o.closeFilter && o.closeFilter(...b)),
|
914
914
|
style: { height: "100vh" },
|
915
915
|
class: "fixed filter-container top-0 flex justify-end items-center z-[12] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.2)]"
|
916
916
|
}, [
|
917
|
-
l("div",
|
917
|
+
l("div", Ls, [
|
918
918
|
(h = n.scheme) != null && h.length ? (r(), k(f, {
|
919
919
|
key: 0,
|
920
920
|
ref: "filter",
|
@@ -941,25 +941,25 @@ function qs(t, e, n, o, s, a) {
|
|
941
941
|
})
|
942
942
|
], 64);
|
943
943
|
}
|
944
|
-
const
|
944
|
+
const zs = /* @__PURE__ */ w(Fs, [["render", Ms]]), qs = {
|
945
945
|
props: { tabsList: { type: Array, default: () => [] }, filterState: String }
|
946
|
-
},
|
946
|
+
}, Bs = {
|
947
947
|
class: "relative flex space-x-1 mb-[20px] after:absolute after:w-[99%] after:bottom-0 after:inset-x-0 after:border-b-2 after:border-gray-200 dark:after:border-neutral-700",
|
948
948
|
"aria-label": "Tabs",
|
949
949
|
role: "tablist",
|
950
950
|
"aria-orientation": "horizontal"
|
951
|
-
},
|
952
|
-
function
|
953
|
-
return r(), i("nav",
|
954
|
-
(r(!0), i(
|
951
|
+
}, Os = ["onClick"];
|
952
|
+
function Ns(t, e, n, a, s, o) {
|
953
|
+
return r(), i("nav", Bs, [
|
954
|
+
(r(!0), i(A, null, D(n.tabsList, (u) => (r(), i("button", {
|
955
955
|
onClick: (f) => t.$emit("update:filterState", u == null ? void 0 : u.name),
|
956
956
|
class: I(["hs-tab-active:after:bg-gray-800 hs-tab-active:text-gray-800 px-2.5 py-1.5 mb-2 relative inline-flex justify-center items-center gap-x-2 hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 after:absolute after:-bottom-2 after:inset-x-0 after:z-10 after:h-0.5 after:pointer-events-none dark:hs-tab-active:text-neutral-200 dark:hs-tab-active:after:bg-neutral-400 dark:text-neutral-500 dark:hover:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 active", {
|
957
957
|
" font-semibold after:absolute after:bottom-[-8px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800": (u == null ? void 0 : u.name) === n.filterState
|
958
958
|
}])
|
959
|
-
},
|
959
|
+
}, T(u == null ? void 0 : u.label), 11, Os))), 256))
|
960
960
|
]);
|
961
961
|
}
|
962
|
-
const
|
962
|
+
const Us = /* @__PURE__ */ w(qs, [["render", Ns]]), Es = {}, Hs = {
|
963
963
|
xmlns: "http://www.w3.org/2000/svg",
|
964
964
|
viewBox: "0 0 24 24",
|
965
965
|
fill: "none",
|
@@ -969,8 +969,8 @@ const Hs = /* @__PURE__ */ A(Os, [["render", Es]]), Rs = {}, Ws = {
|
|
969
969
|
"stroke-linejoin": "round",
|
970
970
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-filter"
|
971
971
|
};
|
972
|
-
function
|
973
|
-
return r(), i("svg",
|
972
|
+
function Rs(t, e, n, a, s, o) {
|
973
|
+
return r(), i("svg", Hs, e[0] || (e[0] = [
|
974
974
|
l("path", {
|
975
975
|
stroke: "none",
|
976
976
|
d: "M0 0h24v24H0z",
|
@@ -979,18 +979,18 @@ function Js(t, e, n, o, s, a) {
|
|
979
979
|
l("path", { d: "M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" }, null, -1)
|
980
980
|
]));
|
981
981
|
}
|
982
|
-
const
|
983
|
-
components: { IconFilter2:
|
982
|
+
const Ws = /* @__PURE__ */ w(Es, [["render", Rs]]), Js = {
|
983
|
+
components: { IconFilter2: Ws, IconCheck2: De },
|
984
984
|
props: { filterCustom: String, customList: Array }
|
985
|
-
},
|
986
|
-
function
|
985
|
+
}, Gs = { class: "py-2 max-h-[34px] 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" }, Ks = { class: "flex flex-col p-[2px] gap-[2px] w-[170px]" }, Qs = ["onClick"], Xs = { class: "text-sm text-gray-800" };
|
986
|
+
function Ys(t, e, n, a, s, o) {
|
987
987
|
const u = p("IconFilter2"), f = p("IconCheck2"), h = p("VsPopover");
|
988
988
|
return r(), k(h, {
|
989
989
|
ref: "popover",
|
990
990
|
placement: "bottom"
|
991
991
|
}, {
|
992
992
|
reference: S(() => [
|
993
|
-
l("button",
|
993
|
+
l("button", Gs, [
|
994
994
|
x(u, {
|
995
995
|
height: "20",
|
996
996
|
width: "20"
|
@@ -998,8 +998,8 @@ function en(t, e, n, o, s, a) {
|
|
998
998
|
])
|
999
999
|
]),
|
1000
1000
|
default: S(() => [
|
1001
|
-
l("div",
|
1002
|
-
(r(!0), i(
|
1001
|
+
l("div", Ks, [
|
1002
|
+
(r(!0), i(A, null, D(n.customList, (b, d) => (r(), i("button", {
|
1003
1003
|
onClick: (_) => {
|
1004
1004
|
var m;
|
1005
1005
|
t.$emit("update:filterCustom", b == null ? void 0 : b.name), (m = t.$refs) == null || m.popover.togglePopover();
|
@@ -1007,12 +1007,12 @@ function en(t, e, n, o, s, a) {
|
|
1007
1007
|
key: d,
|
1008
1008
|
class: I(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100", { "bg-gray-100": n.filterCustom === (b == null ? void 0 : b.name) }])
|
1009
1009
|
}, [
|
1010
|
-
l("span",
|
1010
|
+
l("span", Xs, T(b == null ? void 0 : b.label), 1),
|
1011
1011
|
n.filterCustom === (b == null ? void 0 : b.name) ? (r(), k(f, {
|
1012
1012
|
key: 0,
|
1013
1013
|
class: "ml-auto size-3 shrink-0"
|
1014
1014
|
})) : v("", !0)
|
1015
|
-
], 10,
|
1015
|
+
], 10, Qs))), 128)),
|
1016
1016
|
l("button", {
|
1017
1017
|
class: "flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",
|
1018
1018
|
onClick: e[0] || (e[0] = (b) => {
|
@@ -1025,63 +1025,70 @@ function en(t, e, n, o, s, a) {
|
|
1025
1025
|
_: 1
|
1026
1026
|
}, 512);
|
1027
1027
|
}
|
1028
|
-
const
|
1028
|
+
const Zs = /* @__PURE__ */ w(Js, [["render", Ys]]), en = { class: "flex items-center gap-x-2" }, tn = {
|
1029
1029
|
__name: "admin-table-custom-buttons",
|
1030
1030
|
props: {
|
1031
1031
|
slots: Object
|
1032
1032
|
},
|
1033
1033
|
setup(t) {
|
1034
1034
|
var f, h, b, d, _;
|
1035
|
-
const { asyncTemplateSlot: e } = (_ = (d = (b = (h = (f = Pe()) == null ? void 0 : f.appContext) == null ? void 0 : h.app) == null ? void 0 : b.config) == null ? void 0 : d.globalProperties) == null ? void 0 : _.utils, n = B(""),
|
1036
|
-
var m, g, C, y,
|
1037
|
-
if ((m = s.slots) != null && m.panelLeft || (
|
1035
|
+
const { asyncTemplateSlot: e } = (_ = (d = (b = (h = (f = Pe()) == null ? void 0 : f.appContext) == null ? void 0 : h.app) == null ? void 0 : b.config) == null ? void 0 : d.globalProperties) == null ? void 0 : _.utils, n = B(""), a = B(""), s = t, o = () => {
|
1036
|
+
var m, g, C, y, $;
|
1037
|
+
if ((m = s.slots) != null && m.panelLeft || (a.value = "div"), (C = (g = s.slots) == null ? void 0 : g.panelLeft) != null && C.includes("<")) {
|
1038
1038
|
const V = e("PanelLeft", (y = s.slots) == null ? void 0 : y.panelLeft, [
|
1039
1039
|
"name"
|
1040
1040
|
]);
|
1041
|
-
|
1041
|
+
a.value = V;
|
1042
1042
|
} else
|
1043
|
-
|
1043
|
+
a.value = ($ = s.slots) == null ? void 0 : $.panelLeft;
|
1044
1044
|
}, u = () => {
|
1045
|
-
var m, g, C, y,
|
1045
|
+
var m, g, C, y, $;
|
1046
1046
|
if ((m = s.slots) != null && m.panelRight || (n.value = "div"), (C = (g = s.slots) == null ? void 0 : g.panelRight) != null && C.includes("<")) {
|
1047
1047
|
const V = e("PanelRight", (y = s.slots) == null ? void 0 : y.panelRight, [
|
1048
1048
|
"name"
|
1049
1049
|
]);
|
1050
1050
|
n.value = V;
|
1051
1051
|
} else
|
1052
|
-
n.value = (
|
1052
|
+
n.value = ($ = s.slots) == null ? void 0 : $.panelRight;
|
1053
1053
|
};
|
1054
|
-
return
|
1055
|
-
(r(), k(O(
|
1054
|
+
return o(), u(), (m, g) => (r(), i("div", en, [
|
1055
|
+
(r(), k(O(a.value))),
|
1056
1056
|
(r(), k(O(n.value)))
|
1057
1057
|
]));
|
1058
1058
|
}
|
1059
|
-
},
|
1059
|
+
}, sn = (t, e = 300) => {
|
1060
|
+
let n;
|
1061
|
+
return function(...a) {
|
1062
|
+
clearTimeout(n), n = setTimeout(() => {
|
1063
|
+
t.apply(this, a);
|
1064
|
+
}, e);
|
1065
|
+
};
|
1066
|
+
}, nn = {
|
1060
1067
|
__name: "admin-custom-button-add",
|
1061
1068
|
props: {
|
1062
1069
|
slots: Object
|
1063
1070
|
},
|
1064
1071
|
setup(t) {
|
1065
|
-
var
|
1066
|
-
const { asyncTemplateSlot: e } = (b = (h = (f = (u = (
|
1072
|
+
var o, u, f, h, b;
|
1073
|
+
const { asyncTemplateSlot: e } = (b = (h = (f = (u = (o = Pe()) == null ? void 0 : o.appContext) == null ? void 0 : u.app) == null ? void 0 : f.config) == null ? void 0 : h.globalProperties) == null ? void 0 : b.utils, n = B(""), a = t;
|
1067
1074
|
return (() => {
|
1068
1075
|
var d, _, m, g, C;
|
1069
|
-
if ((d =
|
1070
|
-
const y = e("addButton", (g =
|
1076
|
+
if ((d = a.slots) != null && d.addButton || (n.value = "div"), (m = (_ = a.slots) == null ? void 0 : _.addButton) != null && m.includes("<")) {
|
1077
|
+
const y = e("addButton", (g = a.slots) == null ? void 0 : g.addButton, [
|
1071
1078
|
"IconPlus"
|
1072
1079
|
]);
|
1073
1080
|
n.value = y;
|
1074
1081
|
} else
|
1075
|
-
n.value = (C =
|
1082
|
+
n.value = (C = a.slots) == null ? void 0 : C.addButton;
|
1076
1083
|
})(), (d, _) => n.value ? (r(), k(O(n.value), {
|
1077
1084
|
key: 0,
|
1078
1085
|
IconPlus: N
|
1079
1086
|
})) : v("", !0);
|
1080
1087
|
}
|
1081
|
-
},
|
1088
|
+
}, ln = {
|
1082
1089
|
key: 0,
|
1083
1090
|
class: "px-1 py-3 text-gray-800 font-[500]"
|
1084
|
-
},
|
1091
|
+
}, rn = {
|
1085
1092
|
key: 1,
|
1086
1093
|
class: "px-1 py-3 text-gray-800 font-[700]"
|
1087
1094
|
}, on = {
|
@@ -1093,22 +1100,42 @@ const tn = /* @__PURE__ */ A(Ks, [["render", en]]), sn = { class: "flex items-ce
|
|
1093
1100
|
},
|
1094
1101
|
setup(t) {
|
1095
1102
|
return (e, n) => (r(), i("tr", null, [
|
1096
|
-
(r(!0), i(
|
1103
|
+
(r(!0), i(A, null, D(t.columns, (a) => {
|
1097
1104
|
var s;
|
1098
|
-
return r(), i(
|
1099
|
-
key:
|
1105
|
+
return r(), i(A, {
|
1106
|
+
key: a == null ? void 0 : a.name
|
1100
1107
|
}, [
|
1101
|
-
(s = t.agg) != null && s[
|
1108
|
+
(s = t.agg) != null && s[a == null ? void 0 : a.name] ? (r(), i("td", ln, [
|
1102
1109
|
x(U, {
|
1103
|
-
column:
|
1110
|
+
column: a,
|
1104
1111
|
row: t.agg
|
1105
1112
|
}, null, 8, ["column", "row"])
|
1106
|
-
])) : (r(), i("td",
|
1113
|
+
])) : (r(), i("td", rn))
|
1107
1114
|
], 64);
|
1108
1115
|
}), 128))
|
1109
1116
|
]));
|
1110
1117
|
}
|
1111
|
-
},
|
1118
|
+
}, an = {}, dn = {
|
1119
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1120
|
+
viewBox: "0 0 24 24",
|
1121
|
+
fill: "none",
|
1122
|
+
stroke: "currentColor",
|
1123
|
+
"stroke-width": "2",
|
1124
|
+
"stroke-linecap": "round",
|
1125
|
+
"stroke-linejoin": "round",
|
1126
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
|
1127
|
+
};
|
1128
|
+
function un(t, e, n, a, s, o) {
|
1129
|
+
return r(), i("svg", dn, e[0] || (e[0] = [
|
1130
|
+
l("path", {
|
1131
|
+
stroke: "none",
|
1132
|
+
d: "M0 0h24v24H0z",
|
1133
|
+
fill: "none"
|
1134
|
+
}, null, -1),
|
1135
|
+
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
1136
|
+
]));
|
1137
|
+
}
|
1138
|
+
const cn = /* @__PURE__ */ w(an, [["render", un]]), pn = {}, hn = {
|
1112
1139
|
xmlns: "http://www.w3.org/2000/svg",
|
1113
1140
|
viewBox: "0 0 24 24",
|
1114
1141
|
fill: "none",
|
@@ -1118,8 +1145,8 @@ const tn = /* @__PURE__ */ A(Ks, [["render", en]]), sn = { class: "flex items-ce
|
|
1118
1145
|
"stroke-linejoin": "round",
|
1119
1146
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
|
1120
1147
|
};
|
1121
|
-
function
|
1122
|
-
return r(), i("svg",
|
1148
|
+
function bn(t, e, n, a, s, o) {
|
1149
|
+
return r(), i("svg", hn, e[0] || (e[0] = [
|
1123
1150
|
l("path", {
|
1124
1151
|
stroke: "none",
|
1125
1152
|
d: "M0 0h24v24H0z",
|
@@ -1128,8 +1155,8 @@ function cn(t, e, n, o, s, a) {
|
|
1128
1155
|
l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
1129
1156
|
]));
|
1130
1157
|
}
|
1131
|
-
const
|
1132
|
-
components: { IconChevronDown:
|
1158
|
+
const fn = /* @__PURE__ */ w(pn, [["render", bn]]), gn = lt({
|
1159
|
+
components: { IconChevronDown: cn, IconCheck: fn },
|
1133
1160
|
props: {
|
1134
1161
|
total: { type: Number, default: () => 0 },
|
1135
1162
|
pageSize: { type: Number, default: () => 20 },
|
@@ -1195,10 +1222,10 @@ const pn = /* @__PURE__ */ A(dn, [["render", cn]]), hn = at({
|
|
1195
1222
|
},
|
1196
1223
|
updatePages(t) {
|
1197
1224
|
const e = Math.floor(this.maxPages / 2);
|
1198
|
-
let n = Math.max(t - e, 1),
|
1199
|
-
|
1200
|
-
{ length:
|
1201
|
-
(s,
|
1225
|
+
let n = Math.max(t - e, 1), a = n + this.maxPages - 1;
|
1226
|
+
a > this.pagesCount && (a = this.pagesCount, n = Math.max(a - this.maxPages + 1, 1)), this.pages = Array.from(
|
1227
|
+
{ length: a - n + 1 },
|
1228
|
+
(s, o) => n + o
|
1202
1229
|
);
|
1203
1230
|
},
|
1204
1231
|
handleClickPrev() {
|
@@ -1208,16 +1235,16 @@ const pn = /* @__PURE__ */ A(dn, [["render", cn]]), hn = at({
|
|
1208
1235
|
this.disableNextClick || (this.setCurrentPage(parseInt(this.page) + 1), this.updatePages(this.page), this.$emit("nextClick"));
|
1209
1236
|
},
|
1210
1237
|
setCurrentPage(t) {
|
1211
|
-
this.page = t, this.$emit("pageChange", this.page, this.pageSizeLocal), this.updatePages(t);
|
1238
|
+
t < 1 || t > this.pagesCount || this.page === t || (this.page = t, this.$emit("pageChange", this.page, this.pageSizeLocal), this.updatePages(t));
|
1212
1239
|
}
|
1213
1240
|
}
|
1214
|
-
}),
|
1241
|
+
}), mn = { class: "flex items-center w-full" }, xn = { class: "flex items-center mx-[8px]" }, yn = { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, kn = {
|
1215
1242
|
key: 0,
|
1216
1243
|
class: "flex items-center justify-center ml-3 gap-x-5"
|
1217
|
-
},
|
1218
|
-
function
|
1244
|
+
}, vn = { class: "relative" }, _n = { class: "z-50 bg-white shadow-md rounded-lg p-1 space-y-0.5 dark:bg-neutral-800 dark:border dark:border-neutral-700 dark:divide-neutral-700 absolute bottom-[100%]" }, Cn = ["onClick"];
|
1245
|
+
function wn(t, e, n, a, s, o) {
|
1219
1246
|
const u = p("IconChevronDown"), f = p("IconCheck");
|
1220
|
-
return r(), i("nav",
|
1247
|
+
return r(), i("nav", mn, [
|
1221
1248
|
l("button", {
|
1222
1249
|
type: "button",
|
1223
1250
|
onClick: e[0] || (e[0] = (...h) => t.handleClickPrev && t.handleClickPrev(...h)),
|
@@ -1229,15 +1256,15 @@ function vn(t, e, n, o, s, a) {
|
|
1229
1256
|
class: "rotate-90"
|
1230
1257
|
})
|
1231
1258
|
], 2),
|
1232
|
-
l("div",
|
1259
|
+
l("div", xn, [
|
1233
1260
|
l("span", {
|
1234
1261
|
ref: "currentPage",
|
1235
1262
|
contenteditable: "true",
|
1236
1263
|
onBlur: e[1] || (e[1] = (h) => t.handleSetPage(h.target.innerText)),
|
1237
1264
|
class: "min-h-[38px] max-h-[38px] overflow-hidden min-w-[38px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:text-white"
|
1238
|
-
},
|
1265
|
+
}, T(t.page), 545),
|
1239
1266
|
e[4] || (e[4] = l("span", { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, "з", -1)),
|
1240
|
-
l("span",
|
1267
|
+
l("span", yn, T(t.pagesCount), 1)
|
1241
1268
|
]),
|
1242
1269
|
l("button", {
|
1243
1270
|
type: "button",
|
@@ -1250,22 +1277,22 @@ function vn(t, e, n, o, s, a) {
|
|
1250
1277
|
class: "-rotate-90"
|
1251
1278
|
})
|
1252
1279
|
], 2),
|
1253
|
-
t.pageSizes.length ? (r(), i("div",
|
1254
|
-
l("div",
|
1255
|
-
M(l("div",
|
1256
|
-
(r(!0), i(
|
1280
|
+
t.pageSizes.length ? (r(), i("div", kn, [
|
1281
|
+
l("div", vn, [
|
1282
|
+
M(l("div", _n, [
|
1283
|
+
(r(!0), i(A, null, D(t.pageSizes, (h) => (r(), i("button", {
|
1257
1284
|
type: "button",
|
1258
1285
|
class: "w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm",
|
1259
1286
|
onClick: (b) => t.pageSizeLocal = h
|
1260
1287
|
}, [
|
1261
|
-
P(
|
1288
|
+
P(T(h) + " ", 1),
|
1262
1289
|
h === t.pageSizeLocal ? (r(), k(f, {
|
1263
1290
|
key: 0,
|
1264
1291
|
width: "14",
|
1265
1292
|
height: "14",
|
1266
1293
|
class: "text-blue-600"
|
1267
1294
|
})) : v("", !0)
|
1268
|
-
], 8,
|
1295
|
+
], 8, Cn))), 256))
|
1269
1296
|
], 512), [
|
1270
1297
|
[E, t.isDropdownOpen]
|
1271
1298
|
]),
|
@@ -1275,7 +1302,7 @@ function vn(t, e, n, o, s, a) {
|
|
1275
1302
|
class: "text-sm h-[32px] min-w-8 py-3 px-3.5 inline-flex items-center gap-x-1 rounded-lg border border-gray-200 text-gray-800 shadow-sm hover:bg-gray-50 focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
1276
1303
|
onClick: e[3] || (e[3] = (h) => t.isDropdownOpen = !t.isDropdownOpen)
|
1277
1304
|
}, [
|
1278
|
-
P(
|
1305
|
+
P(T(t.pageSizeLocal) + " ", 1),
|
1279
1306
|
x(u, {
|
1280
1307
|
height: "16",
|
1281
1308
|
width: "16"
|
@@ -1285,27 +1312,26 @@ function vn(t, e, n, o, s, a) {
|
|
1285
1312
|
])) : v("", !0)
|
1286
1313
|
]);
|
1287
1314
|
}
|
1288
|
-
const
|
1289
|
-
props: { table: String, title: String
|
1315
|
+
const $n = /* @__PURE__ */ w(gn, [["render", wn]]), Tn = {
|
1316
|
+
props: { table: String, title: String },
|
1290
1317
|
components: {
|
1291
|
-
AdminTableControl:
|
1292
|
-
AdminTableExport:
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
AdminNodata: Ke,
|
1318
|
+
AdminTableControl: kt,
|
1319
|
+
AdminTableExport: Ht,
|
1320
|
+
AdminTableColumnsHidden: ds,
|
1321
|
+
AdminTableColumn: ut,
|
1322
|
+
AdminNodata: Ge,
|
1297
1323
|
IconPlus: N,
|
1298
|
-
IconSearch:
|
1299
|
-
AdminTableCardInfo:
|
1300
|
-
IconOpenCard:
|
1324
|
+
IconSearch: Ke,
|
1325
|
+
AdminTableCardInfo: Ps,
|
1326
|
+
IconOpenCard: Qe,
|
1301
1327
|
AdminComponentIs: U,
|
1302
|
-
AdminTableFilters:
|
1303
|
-
AdminTableTabs:
|
1304
|
-
AdminTableCustomFilters:
|
1305
|
-
AdminTableCustomButtons:
|
1306
|
-
AdminCustomButtonAdd:
|
1328
|
+
AdminTableFilters: zs,
|
1329
|
+
AdminTableTabs: Us,
|
1330
|
+
AdminTableCustomFilters: Zs,
|
1331
|
+
AdminTableCustomButtons: tn,
|
1332
|
+
AdminCustomButtonAdd: nn,
|
1307
1333
|
AdminTableTotalsList: on,
|
1308
|
-
AdminTablePagination:
|
1334
|
+
AdminTablePagination: $n
|
1309
1335
|
},
|
1310
1336
|
data() {
|
1311
1337
|
return {
|
@@ -1340,8 +1366,8 @@ const _n = /* @__PURE__ */ A(hn, [["render", vn]]), Cn = {
|
|
1340
1366
|
return (e = (t = this.tableData) == null ? void 0 : t.columns) == null ? void 0 : e.filter((n) => (n == null ? void 0 : n.hidden) !== !0);
|
1341
1367
|
},
|
1342
1368
|
isForm() {
|
1343
|
-
var t, e, n,
|
1344
|
-
return ((t = this.tableData) == null ? void 0 : t.form) && (((n = (e = this.tableData) == null ? void 0 : e.actions) == null ? void 0 : n.includes("add")) || ((s = (
|
1369
|
+
var t, e, n, a, s;
|
1370
|
+
return ((t = this.tableData) == null ? void 0 : t.form) && (((n = (e = this.tableData) == null ? void 0 : e.actions) == null ? void 0 : n.includes("add")) || ((s = (a = this.tableData) == null ? void 0 : a.actions) == null ? void 0 : s.includes("edit")));
|
1345
1371
|
},
|
1346
1372
|
isNoData() {
|
1347
1373
|
var t, e;
|
@@ -1350,8 +1376,8 @@ const _n = /* @__PURE__ */ A(hn, [["render", vn]]), Cn = {
|
|
1350
1376
|
activeCardRow() {
|
1351
1377
|
var t, e;
|
1352
1378
|
return ((e = (t = this.tableData) == null ? void 0 : t.rows) == null ? void 0 : e.find((n) => {
|
1353
|
-
var
|
1354
|
-
return (n == null ? void 0 : n.id) === ((s = (
|
1379
|
+
var a, s;
|
1380
|
+
return (n == null ? void 0 : n.id) === ((s = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : s.card);
|
1355
1381
|
})) || {};
|
1356
1382
|
},
|
1357
1383
|
getActions() {
|
@@ -1364,7 +1390,7 @@ const _n = /* @__PURE__ */ A(hn, [["render", vn]]), Cn = {
|
|
1364
1390
|
this.tableData = null, await this.getTableData();
|
1365
1391
|
},
|
1366
1392
|
searchValue: {
|
1367
|
-
handler:
|
1393
|
+
handler: sn(async function(t) {
|
1368
1394
|
var e;
|
1369
1395
|
await this.getTableData(), this.$router.push({
|
1370
1396
|
...this.$route,
|
@@ -1374,8 +1400,8 @@ const _n = /* @__PURE__ */ A(hn, [["render", vn]]), Cn = {
|
|
1374
1400
|
},
|
1375
1401
|
$route: {
|
1376
1402
|
handler(t, e) {
|
1377
|
-
var n,
|
1378
|
-
((n = t == null ? void 0 : t.params) == null ? void 0 : n.catchAll) !== ((
|
1403
|
+
var n, a;
|
1404
|
+
((n = t == null ? void 0 : t.params) == null ? void 0 : n.catchAll) !== ((a = e == null ? void 0 : e.params) == null ? void 0 : a.catchAll) && (this.visibleColumns = [], this.unmountedData(), this.getFilters());
|
1379
1405
|
},
|
1380
1406
|
deep: !0
|
1381
1407
|
},
|
@@ -1401,24 +1427,24 @@ const _n = /* @__PURE__ */ A(hn, [["render", vn]]), Cn = {
|
|
1401
1427
|
}), this.getTableData();
|
1402
1428
|
},
|
1403
1429
|
columns(t) {
|
1404
|
-
var e, n,
|
1405
|
-
this.visibleColumns = t == null ? void 0 : t.map((
|
1430
|
+
var e, n, a, s;
|
1431
|
+
this.visibleColumns = t == null ? void 0 : t.map((o) => o == null ? void 0 : o.name), this.initialHiddenColumns === ((e = this.visibleColumns) == null ? void 0 : e.join(",")) && (this.visibleColumns = []), this.$router.replace({
|
1406
1432
|
...this.$route,
|
1407
1433
|
query: {
|
1408
1434
|
...(n = this.$route) == null ? void 0 : n.query,
|
1409
|
-
columns: (
|
1435
|
+
columns: (a = this.visibleColumns) != null && a.length ? (s = this.visibleColumns) == null ? void 0 : s.join(",") : void 0
|
1410
1436
|
}
|
1411
1437
|
});
|
1412
1438
|
}
|
1413
1439
|
},
|
1414
1440
|
methods: {
|
1415
1441
|
async checkUrlMounted() {
|
1416
|
-
var t, e, n,
|
1417
|
-
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((
|
1442
|
+
var t, e, n, a, s, o, u, f, h, b, d, _, m, g, C, y, $, V, L;
|
1443
|
+
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((a = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : a.limit) || 20, this.filters = ((u = decodeURI((o = (s = this.$route) == null ? void 0 : s.query) == null ? void 0 : o.filter)) == null ? void 0 : u.replaceAll("+", " ")) || null, this.filters && (this.onFilters = ((h = (f = this.filters) == null ? void 0 : f.split("=")) == null ? void 0 : h.length) - 1), this.filterState = ((d = (b = this.$route) == null ? void 0 : b.query) == null ? void 0 : d.filterState) || null, this.filterCustom = ((m = (_ = this.$route) == null ? void 0 : _.query) == null ? void 0 : m.custom) || null, this.searchValue = ((C = (g = this.$route) == null ? void 0 : g.query) == null ? void 0 : C.search) || "", this.visibleColumns = ((V = ($ = (y = this.$route) == null ? void 0 : y.query) == null ? void 0 : $.columns) == null ? void 0 : V.split(",")) || [], (L = this.$route) != null && L.query.card && (this.isVisibleCardInfo = !0);
|
1418
1444
|
},
|
1419
1445
|
rowWidth(t) {
|
1420
|
-
var n,
|
1421
|
-
const e = (
|
1446
|
+
var n, a;
|
1447
|
+
const e = (a = (n = this.tableData) == null ? void 0 : n.columns) == null ? void 0 : a.find((s) => s.name === t);
|
1422
1448
|
if (e) {
|
1423
1449
|
const s = e == null ? void 0 : e.width;
|
1424
1450
|
return typeof s == "number" ? `${s}px` : s != null && s.includes("px") ? s : `${s}px`;
|
@@ -1428,7 +1454,7 @@ const _n = /* @__PURE__ */ A(hn, [["render", vn]]), Cn = {
|
|
1428
1454
|
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 = "";
|
1429
1455
|
},
|
1430
1456
|
async getTableData() {
|
1431
|
-
var t, e, n,
|
1457
|
+
var t, e, n, a, s, o, u, f, h, b, d;
|
1432
1458
|
try {
|
1433
1459
|
const { data: _ } = await j.get(`/api/template/table/${this.table}`), m = await j.get(`/api/table-data/${this.table}`, {
|
1434
1460
|
params: {
|
@@ -1444,7 +1470,7 @@ const _n = /* @__PURE__ */ A(hn, [["render", vn]]), Cn = {
|
|
1444
1470
|
this.tableData = {
|
1445
1471
|
..._,
|
1446
1472
|
...(m == null ? void 0 : m.data) || {}
|
1447
|
-
}, this.initialHiddenColumns = (
|
1473
|
+
}, this.initialHiddenColumns = (o = (s = (a = (n = this.tableData) == null ? void 0 : n.columns) == null ? void 0 : a.filter((g) => (g == null ? void 0 : g.hidden) !== !0)) == null ? void 0 : s.map((g) => g == null ? void 0 : g.name)) == null ? void 0 : o.join(","), (u = this.visibleColumns) != null && u.length ? (f = this.tableData) == null || f.columns.forEach((g) => {
|
1448
1474
|
var C;
|
1449
1475
|
(C = this.visibleColumns) != null && C.includes(g == null ? void 0 : g.name) ? g.hidden = !1 : g.hidden = !0;
|
1450
1476
|
}) : this.visibleColumns = (d = (b = (h = this.tableData) == null ? void 0 : h.columns) == null ? void 0 : b.filter((g) => (g == null ? void 0 : g.hidden) !== !0)) == null ? void 0 : d.map((g) => g == null ? void 0 : g.name);
|
@@ -1464,7 +1490,7 @@ const _n = /* @__PURE__ */ A(hn, [["render", vn]]), Cn = {
|
|
1464
1490
|
},
|
1465
1491
|
async handlePageChange(t, e) {
|
1466
1492
|
const n = this.$route.query;
|
1467
|
-
this.page = t,
|
1493
|
+
this.page = t, await this.$router.replace({ query: { ...n, page: t, limit: e } }), await this.getTableData();
|
1468
1494
|
},
|
1469
1495
|
async filterChange({ url: t, state: e }) {
|
1470
1496
|
var n;
|
@@ -1502,26 +1528,26 @@ const _n = /* @__PURE__ */ A(hn, [["render", vn]]), Cn = {
|
|
1502
1528
|
];
|
1503
1529
|
}
|
1504
1530
|
}
|
1505
|
-
},
|
1531
|
+
}, An = { class: "w-[calc(100vw - 320px)] bg-gray-50" }, Sn = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, In = { class: "text-lg font-semibold text-gray-800 dark:text-neutral-200" }, Vn = {
|
1506
1532
|
style: { height: "calc(100vh - 155px)" },
|
1507
1533
|
class: "bg-gray-50 p-[20px] flex pt-[10px] lg:w-[calc(100vw-260px)] w-[100vw]"
|
1508
|
-
},
|
1534
|
+
}, Dn = { class: "bg-white w-full rounded-xl border p-[20px] pr-0" }, Pn = { class: "flex" }, Fn = { class: "flex gap-[6px] ml-auto" }, jn = { class: "inline-block w-full align-middle" }, Ln = {
|
1509
1535
|
key: 0,
|
1510
1536
|
class: "relative min-w-full text-[13px] divide-y divide-gray-200 table-fixed w-max dark:divide-neutral-700"
|
1511
|
-
},
|
1537
|
+
}, Mn = { class: "sticky top-[-1px] z-[2] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, zn = { class: "right-0" }, qn = {
|
1512
1538
|
key: 0,
|
1513
1539
|
class: "w-[70px] sticky right-0 top-0"
|
1514
|
-
},
|
1540
|
+
}, Bn = { class: "divide-y divide-gray-200 z-[1] relative" }, On = ["onClick"], Nn = ["onClick"], Un = { class: "p-[10px] flex justify-start items-center w-full" }, En = { class: "w-[200px] md:inline-flex hidden" }, Hn = { class: "text-sm text-gray-600 dark:text-neutral-400" }, Rn = { class: "font-semibold text-gray-800 dark:text-neutral-200" }, Wn = { key: 0 }, Jn = {
|
1515
1541
|
key: 0,
|
1516
1542
|
class: "font-semibold text-gray-800 dark:text-neutral-200"
|
1517
1543
|
};
|
1518
|
-
function
|
1519
|
-
var H, R, W, J, G, K, Q, X, Y, Z, ee, te, se, ne, le, re,
|
1520
|
-
const u = p("AdminCustomButtonAdd"), f = p("IconPlus"), h = p("router-link"), b = p("AdminTableTabs"), d = p("IconSearch"), _ = p("VsText"), m = p("AdminTableCustomButtons"), g = p("AdminTableCustomFilters"), C = p("AdminTableColumnsHidden"), y = p("AdminTableExport"),
|
1521
|
-
return r(), i("div",
|
1522
|
-
l("div",
|
1523
|
-
l("h2",
|
1524
|
-
|
1544
|
+
function Gn(t, e, n, a, s, o) {
|
1545
|
+
var H, R, W, J, G, K, Q, X, Y, Z, ee, te, se, ne, le, re, oe, ae, ie, de, ue, ce, pe, he, be, fe, ge;
|
1546
|
+
const u = p("AdminCustomButtonAdd"), f = p("IconPlus"), h = p("router-link"), b = p("AdminTableTabs"), d = p("IconSearch"), _ = p("VsText"), m = p("AdminTableCustomButtons"), g = p("AdminTableCustomFilters"), C = p("AdminTableColumnsHidden"), y = p("AdminTableExport"), $ = p("AdminTableFilters"), V = p("IconOpenCard"), L = p("AdminTableColumn"), q = p("AdminComponentIs"), Fe = p("AdminTableControl"), je = p("AdminTableTotalsList"), Le = p("AdminNodata"), Me = p("AdminTablePagination"), ze = p("AdminTableCardInfo");
|
1547
|
+
return r(), i("div", An, [
|
1548
|
+
l("div", Sn, [
|
1549
|
+
l("h2", In, T(n.title), 1),
|
1550
|
+
o.isForm ? (r(), i(A, { key: 0 }, [
|
1525
1551
|
(R = (H = s.tableData) == null ? void 0 : H.slots) != null && R.addButton ? (r(), k(u, {
|
1526
1552
|
key: 0,
|
1527
1553
|
slots: (W = s.tableData) == null ? void 0 : W.slots
|
@@ -1541,15 +1567,15 @@ function Rn(t, e, n, o, s, a) {
|
|
1541
1567
|
}, 8, ["to"]))
|
1542
1568
|
], 64)) : v("", !0)
|
1543
1569
|
]),
|
1544
|
-
l("div",
|
1545
|
-
l("div",
|
1570
|
+
l("div", Vn, [
|
1571
|
+
l("div", Dn, [
|
1546
1572
|
(Q = (K = s.tableData) == null ? void 0 : K.filterState) != null && Q.length ? (r(), k(b, {
|
1547
1573
|
key: 0,
|
1548
1574
|
tabsList: (X = s.tableData) == null ? void 0 : X.filterState,
|
1549
1575
|
filterState: s.filterState,
|
1550
1576
|
"onUpdate:filterState": e[0] || (e[0] = (c) => s.filterState = c)
|
1551
1577
|
}, null, 8, ["tabsList", "filterState"])) : v("", !0),
|
1552
|
-
l("div",
|
1578
|
+
l("div", Pn, [
|
1553
1579
|
l("div", {
|
1554
1580
|
class: I([s.isVisibleCardInfo ? "w-[calc(100%-360px)]" : "w-full"])
|
1555
1581
|
}, [
|
@@ -1564,11 +1590,11 @@ function Rn(t, e, n, o, s, a) {
|
|
1564
1590
|
x(_, {
|
1565
1591
|
modelValue: s.searchValue,
|
1566
1592
|
"onUpdate:modelValue": e[1] || (e[1] = (c) => s.searchValue = c),
|
1567
|
-
placeholder:
|
1593
|
+
placeholder: "Пошук...",
|
1568
1594
|
clearable: !0,
|
1569
1595
|
class: "[&>input]:py-[7px] [&>input]:max-h-[36px] [&>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"
|
1570
|
-
}, null, 8, ["modelValue"
|
1571
|
-
l("div",
|
1596
|
+
}, null, 8, ["modelValue"]),
|
1597
|
+
l("div", Fn, [
|
1572
1598
|
(Y = s.tableData) != null && Y.slots ? (r(), k(m, {
|
1573
1599
|
key: 0,
|
1574
1600
|
slots: (Z = s.tableData) == null ? void 0 : Z.slots
|
@@ -1592,15 +1618,15 @@ function Rn(t, e, n, o, s, a) {
|
|
1592
1618
|
"filter-custom": s.filterCustom,
|
1593
1619
|
filters: s.filters
|
1594
1620
|
}, null, 8, ["table", "columns", "page", "filter-state", "filter-custom", "filters"])) : v("", !0),
|
1595
|
-
(
|
1621
|
+
(oe = s.filterScheme) != null && oe.length ? (r(), k($, {
|
1596
1622
|
key: 3,
|
1597
1623
|
scheme: s.filterScheme,
|
1598
1624
|
onFilters: s.onFilters,
|
1599
1625
|
table: n.table,
|
1600
|
-
onFilterChange:
|
1626
|
+
onFilterChange: o.filterChange
|
1601
1627
|
}, null, 8, ["scheme", "onFilters", "table", "onFilterChange"])) : v("", !0),
|
1602
1628
|
l("button", {
|
1603
|
-
onClick: e[4] || (e[4] = (...c) =>
|
1629
|
+
onClick: e[4] || (e[4] = (...c) => o.toggleCardInfo && o.toggleCardInfo(...c)),
|
1604
1630
|
class: "py-2 px-2.5 max-h-[34px] md:inline-flex hidden 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"
|
1605
1631
|
}, [
|
1606
1632
|
x(V, {
|
@@ -1614,32 +1640,32 @@ function Rn(t, e, n, o, s, a) {
|
|
1614
1640
|
}, [
|
1615
1641
|
l("div", {
|
1616
1642
|
style: Ve({
|
1617
|
-
height: (ie = (
|
1643
|
+
height: (ie = (ae = s.tableData) == null ? void 0 : ae.filterState) != null && ie.length ? "calc(100vh - 370px)" : "calc(100vh - 330px)"
|
1618
1644
|
}),
|
1619
1645
|
class: "overflow-x-auto w-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
|
1620
1646
|
}, [
|
1621
|
-
l("div",
|
1622
|
-
|
1623
|
-
l("thead",
|
1624
|
-
l("tr",
|
1625
|
-
(r(!0), i(
|
1647
|
+
l("div", jn, [
|
1648
|
+
o.isNoData ? (r(), k(Le, { key: 1 })) : (r(), i("table", Ln, [
|
1649
|
+
l("thead", Mn, [
|
1650
|
+
l("tr", zn, [
|
1651
|
+
(r(!0), i(A, null, D(o.columns, (c) => (r(), k(L, {
|
1626
1652
|
key: c.name,
|
1627
1653
|
style: Ve({
|
1628
|
-
width:
|
1654
|
+
width: o.rowWidth(c == null ? void 0 : c.name),
|
1629
1655
|
textAlign: c == null ? void 0 : c.align,
|
1630
1656
|
wordBreak: c == null ? void 0 : c.wrap
|
1631
1657
|
}),
|
1632
1658
|
data: c,
|
1633
1659
|
activeColumn: s.activeColumn,
|
1634
|
-
onChangeActive:
|
1660
|
+
onChangeActive: o.changeActiveColumn
|
1635
1661
|
}, null, 8, ["style", "data", "activeColumn", "onChangeActive"]))), 128)),
|
1636
|
-
(ue = (de =
|
1662
|
+
(ue = (de = o.getActions) == null ? void 0 : de.filter(
|
1637
1663
|
(c) => c !== "add" && c !== "view"
|
1638
|
-
)) != null && ue.length ? (r(), i("th",
|
1664
|
+
)) != null && ue.length ? (r(), i("th", qn)) : v("", !0)
|
1639
1665
|
])
|
1640
1666
|
]),
|
1641
|
-
l("tbody",
|
1642
|
-
(r(!0), i(
|
1667
|
+
l("tbody", Bn, [
|
1668
|
+
(r(!0), i(A, null, D((ce = s.tableData) == null ? void 0 : ce.rows, (c, qe) => {
|
1643
1669
|
var me, xe, ye, ke, ve, _e, Ce, we, $e, Te, Ae, Se;
|
1644
1670
|
return r(), i("tr", {
|
1645
1671
|
key: (c == null ? void 0 : c.id) || qe,
|
@@ -1649,41 +1675,41 @@ function Rn(t, e, n, o, s, a) {
|
|
1649
1675
|
}, [
|
1650
1676
|
l("td", {
|
1651
1677
|
class: I(["px-1 py-3 text-gray-600 pe-4", [
|
1652
|
-
(ye =
|
1678
|
+
(ye = o.columns[0]) != null && ye.align ? `text-${((ke = o.columns[0]) == null ? void 0 : ke.align) || "left"}` : ""
|
1653
1679
|
]])
|
1654
1680
|
}, [
|
1655
1681
|
l("button", {
|
1656
1682
|
onClick: (F) => {
|
1657
|
-
|
1683
|
+
o.pushToCard(c == null ? void 0 : c.id), o.pushToLinkCard(o.columns[0], c);
|
1658
1684
|
},
|
1659
|
-
class: I(["font-medium
|
1660
|
-
...
|
1685
|
+
class: I(["font-medium", [
|
1686
|
+
...o.getCustomStyles(o.columns[0]),
|
1661
1687
|
((ve = this.tableData) == null ? void 0 : ve.card) === !1 ? "" : " text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"
|
1662
1688
|
]])
|
1663
1689
|
}, [
|
1664
1690
|
x(q, {
|
1665
1691
|
row: c,
|
1666
|
-
column:
|
1692
|
+
column: o.columns[0],
|
1667
1693
|
table: n.table,
|
1668
|
-
onUpdateTable:
|
1694
|
+
onUpdateTable: o.getTableData
|
1669
1695
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1670
|
-
], 10,
|
1696
|
+
], 10, On)
|
1671
1697
|
], 2),
|
1672
|
-
(r(!0), i(
|
1673
|
-
onClick: (
|
1674
|
-
|
1698
|
+
(r(!0), i(A, null, D((_e = o.columns) == null ? void 0 : _e.slice(1), (F) => (r(), i("td", {
|
1699
|
+
onClick: (Zn) => {
|
1700
|
+
o.changeActiveCardInfo(c == null ? void 0 : c.id), o.pushToLinkCard(F, c);
|
1675
1701
|
},
|
1676
|
-
class: I(["px-1 py-3 text-gray-600 pe-3",
|
1702
|
+
class: I(["px-1 py-3 text-gray-600 pe-3", o.getCustomStyles(F)]),
|
1677
1703
|
key: F.name
|
1678
1704
|
}, [
|
1679
1705
|
x(q, {
|
1680
1706
|
row: c,
|
1681
1707
|
column: F,
|
1682
1708
|
table: n.table,
|
1683
|
-
onUpdateTable:
|
1709
|
+
onUpdateTable: o.getTableData
|
1684
1710
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1685
|
-
], 10,
|
1686
|
-
(we = (Ce =
|
1711
|
+
], 10, Nn))), 128)),
|
1712
|
+
(we = (Ce = o.getActions) == null ? void 0 : Ce.filter(
|
1687
1713
|
(F) => F !== "add" && F !== "view"
|
1688
1714
|
)) != null && we.length ? (r(), i("td", {
|
1689
1715
|
key: 0,
|
@@ -1693,40 +1719,40 @@ function Rn(t, e, n, o, s, a) {
|
|
1693
1719
|
}])
|
1694
1720
|
}, [
|
1695
1721
|
x(Fe, {
|
1696
|
-
actions:
|
1697
|
-
isForm:
|
1722
|
+
actions: o.getActions,
|
1723
|
+
isForm: o.isForm,
|
1698
1724
|
item: c,
|
1699
1725
|
table: n.table,
|
1700
|
-
onUpdateTable:
|
1726
|
+
onUpdateTable: o.getTableData
|
1701
1727
|
}, null, 8, ["actions", "isForm", "item", "table", "onUpdateTable"])
|
1702
1728
|
], 2)) : v("", !0)
|
1703
1729
|
], 2);
|
1704
1730
|
}), 128))
|
1705
1731
|
]),
|
1706
1732
|
x(je, {
|
1707
|
-
columns:
|
1733
|
+
columns: o.columns,
|
1708
1734
|
agg: (pe = s.tableData) == null ? void 0 : pe.agg
|
1709
1735
|
}, null, 8, ["columns", "agg"])
|
1710
1736
|
]))
|
1711
1737
|
])
|
1712
1738
|
], 4)
|
1713
1739
|
], 2),
|
1714
|
-
l("div",
|
1715
|
-
l("div",
|
1716
|
-
l("p",
|
1717
|
-
l("span",
|
1718
|
-
P(
|
1719
|
-
s.filters || s.searchValue ? (r(), i("span",
|
1740
|
+
l("div", Un, [
|
1741
|
+
l("div", En, [
|
1742
|
+
l("p", Hn, [
|
1743
|
+
l("span", Rn, [
|
1744
|
+
P(T(s.filters || s.searchValue ? "Відображено" : "Об'єктів") + " " + T(((he = s.tableData) == null ? void 0 : he.count) || "0 ") + " ", 1),
|
1745
|
+
s.filters || s.searchValue ? (r(), i("span", Wn, " з")) : v("", !0)
|
1720
1746
|
]),
|
1721
|
-
s.filters || s.searchValue ? (r(), i("span",
|
1747
|
+
s.filters || s.searchValue ? (r(), i("span", Jn, T(" " + ((be = s.tableData) == null ? void 0 : be.filtered) || 0), 1)) : v("", !0)
|
1722
1748
|
])
|
1723
1749
|
]),
|
1724
1750
|
Math.ceil(((fe = s.tableData) == null ? void 0 : fe.filtered) / s.limit) > 1 ? (r(), k(Me, {
|
1725
1751
|
key: 0,
|
1726
1752
|
class: "justify-end",
|
1727
|
-
"default-page": parseInt(
|
1753
|
+
"default-page": parseInt(o.defaultPage),
|
1728
1754
|
total: ((ge = s.tableData) == null ? void 0 : ge.filtered) || 0,
|
1729
|
-
onPageChange:
|
1755
|
+
onPageChange: o.handlePageChange,
|
1730
1756
|
pageSize: parseInt(s.limit),
|
1731
1757
|
pageSizes: [10, 20, 50, 100]
|
1732
1758
|
}, null, 8, ["default-page", "total", "onPageChange", "pageSize"])) : v("", !0)
|
@@ -1740,7 +1766,7 @@ function Rn(t, e, n, o, s, a) {
|
|
1740
1766
|
key: 0,
|
1741
1767
|
table: n.table,
|
1742
1768
|
columns: (c = s.tableData) == null ? void 0 : c.columns,
|
1743
|
-
row:
|
1769
|
+
row: o.activeCardRow
|
1744
1770
|
}, null, 8, ["table", "columns", "row"])) : v("", !0)
|
1745
1771
|
];
|
1746
1772
|
}),
|
@@ -1751,13 +1777,13 @@ function Rn(t, e, n, o, s, a) {
|
|
1751
1777
|
])
|
1752
1778
|
]);
|
1753
1779
|
}
|
1754
|
-
const
|
1755
|
-
components: { AdminTable:
|
1780
|
+
const Kn = /* @__PURE__ */ w(Tn, [["render", Gn], ["__scopeId", "data-v-5afc3bf5"]]), Qn = {
|
1781
|
+
components: { AdminTable: Kn },
|
1756
1782
|
data() {
|
1757
1783
|
return {
|
1758
1784
|
table: !1,
|
1759
1785
|
interface: "",
|
1760
|
-
|
1786
|
+
title: ""
|
1761
1787
|
};
|
1762
1788
|
},
|
1763
1789
|
watch: {
|
@@ -1770,7 +1796,7 @@ const Wn = /* @__PURE__ */ A(Cn, [["render", Rn], ["__scopeId", "data-v-27cc637b
|
|
1770
1796
|
},
|
1771
1797
|
title(t) {
|
1772
1798
|
var e;
|
1773
|
-
t && (document.title = (((e =
|
1799
|
+
t && (document.title = (((e = Xe.value) == null ? void 0 : e.titlePrefix) || "") + t);
|
1774
1800
|
}
|
1775
1801
|
},
|
1776
1802
|
async mounted() {
|
@@ -1784,16 +1810,16 @@ const Wn = /* @__PURE__ */ A(Cn, [["render", Rn], ["__scopeId", "data-v-27cc637b
|
|
1784
1810
|
}), e;
|
1785
1811
|
},
|
1786
1812
|
async checkPageType() {
|
1787
|
-
var
|
1813
|
+
var a, s;
|
1788
1814
|
const t = this.flattenMenu(Ie.value);
|
1789
1815
|
t != null && t.length || this.$router.replace("/404");
|
1790
|
-
const e = t == null ? void 0 : t.find((
|
1816
|
+
const e = t == null ? void 0 : t.find((o) => {
|
1791
1817
|
var u, f;
|
1792
|
-
return (
|
1818
|
+
return (o == null ? void 0 : o.path) == ((f = (u = this.$route) == null ? void 0 : u.params) == null ? void 0 : f.catchAll);
|
1793
1819
|
});
|
1794
|
-
this.title = e == null ? void 0 : e.ua, e || this.$router.replace("/404"), e != null && e.component && this.$router.replace((s = (
|
1820
|
+
this.title = e == null ? void 0 : e.ua, e || this.$router.replace("/404"), e != null && e.component && this.$router.replace((s = (a = this.$route) == null ? void 0 : a.params) == null ? void 0 : s.catchAll);
|
1795
1821
|
const n = e == null ? void 0 : e.table;
|
1796
|
-
this.table = n || !1,
|
1822
|
+
this.table = n || !1, !n && this.getInterface();
|
1797
1823
|
},
|
1798
1824
|
async getInterface() {
|
1799
1825
|
var t, e;
|
@@ -1807,22 +1833,21 @@ const Wn = /* @__PURE__ */ A(Cn, [["render", Rn], ["__scopeId", "data-v-27cc637b
|
|
1807
1833
|
}
|
1808
1834
|
}
|
1809
1835
|
}
|
1810
|
-
},
|
1811
|
-
function
|
1836
|
+
}, Xn = ["innerHTML"];
|
1837
|
+
function Yn(t, e, n, a, s, o) {
|
1812
1838
|
const u = p("AdminTable");
|
1813
1839
|
return s.table ? (r(), k(u, {
|
1814
1840
|
key: 0,
|
1815
1841
|
table: s.table,
|
1816
|
-
title:
|
1817
|
-
|
1818
|
-
}, null, 8, ["table", "title", "search"])) : (r(), i("div", {
|
1842
|
+
title: s.title
|
1843
|
+
}, null, 8, ["table", "title"])) : (r(), i("div", {
|
1819
1844
|
key: 1,
|
1820
1845
|
class: "w-full bg-gray-50",
|
1821
1846
|
style: { height: "calc(100vh - 120px)" },
|
1822
1847
|
innerHTML: s.interface
|
1823
|
-
}, null, 8,
|
1848
|
+
}, null, 8, Xn));
|
1824
1849
|
}
|
1825
|
-
const
|
1850
|
+
const sl = /* @__PURE__ */ w(Qn, [["render", Yn]]);
|
1826
1851
|
export {
|
1827
|
-
|
1852
|
+
sl as default
|
1828
1853
|
};
|