@opengis/admin 0.3.103 → 0.3.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -97
- package/config.js +4 -4
- package/dist/add-page-CxrU5Q4l.js +127 -0
- package/dist/{admin-interface-mIo1_gE2.js → admin-interface-AsvHxkp6.js} +654 -684
- package/dist/admin-view-C7QW8ebw.js +703 -0
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +82 -82
- package/dist/assets/logo.svg +41 -41
- package/dist/{card-view-BPUveYDd.js → card-view-SiUXOypt.js} +1 -1
- package/dist/edit-page-PXfumoJ-.js +145 -0
- package/dist/{import-file-Bs86FUW3.js → import-file-KkQTE8rh.js} +19705 -19959
- package/dist/{profile-page-DHRxyJA_.js → profile-page-B8ZKBocp.js} +4 -4
- 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/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 +1 -1
- 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/list/buttonHelper.js +21 -21
- package/server/helpers/list/utils/button.js +5 -5
- 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/tableDataId.js +27 -27
- 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/conditions.js +20 -20
- 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/notifications/controllers/readNotifications.js +18 -18
- package/server/routes/notifications/controllers/testEmail.js +35 -35
- package/server/routes/notifications/controllers/userNotifications.js +53 -53
- 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/properties/schema.js +10 -10
- package/server/routes/report/controllers/list.js +21 -21
- package/server/routes/report/controllers/tableData.js +107 -112
- package/server/routes/report/controllers/widgetData.js +104 -90
- package/server/routes/report/index.mjs +9 -9
- package/server/routes/report/utils/formatValue.js +179 -179
- package/server/routes/root.mjs +3 -3
- package/server/routes/templates/controllers/getTemplate.js +44 -44
- 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 +72 -72
- package/server/routes/user/controllers/user.info.js +17 -17
- package/server/routes/user/schema.js +14 -14
- package/server/routes/util/controllers/code.generator.js +89 -89
- package/server/routes/widget/controllers/widget.del.js +80 -80
- package/server/routes/widget/controllers/widget.set.js +101 -101
- package/server/routes/widget/hook/onWidgetSet.js +12 -12
- package/server/routes/widget/index.mjs +20 -20
- 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/server/utils/addNotification.js +21 -21
- package/server/utils/sendNotification.js +89 -89
- package/dist/add-page-BtME1JJf.js +0 -126
- package/dist/admin-view-URsx4MBX.js +0 -1018
- package/dist/assets/images/eye.svg +0 -4
- package/dist/assets/images/file-up.svg +0 -6
- package/dist/edit-page-DVyHgdP0.js +0 -154
@@ -1,5 +1,5 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { openBlock as
|
1
|
+
import { _ as S, g as Je, h as Ge, i as Qe, f as M, I as Xe, s as E, j as Ue, k as Q, A as X, V as Ye, l as Ze, m as et, n as tt, o as st, p as nt, q as lt, a as at, r as rt, t as ot, u as Ee } from "./import-file-KkQTE8rh.js";
|
2
|
+
import { openBlock as r, createElementBlock as i, createTextVNode as P, toDisplayString as A, createElementVNode as a, normalizeClass as w, createCommentVNode as k, resolveComponent as f, Fragment as $, createVNode as x, withCtx as D, createBlock as v, renderList as V, withModifiers as it, createStaticVNode as dt, withDirectives as U, vModelCheckbox as ut, Transition as W, vModelText as ct, renderSlot as ht, vShow as Y, Teleport as pt, getCurrentInstance as Re, ref as J, resolveDynamicComponent as G, defineComponent as bt, withKeys as ft, normalizeStyle as K } from "vue";
|
3
3
|
const gt = {
|
4
4
|
data() {
|
5
5
|
return {
|
@@ -18,25 +18,25 @@ const gt = {
|
|
18
18
|
},
|
19
19
|
computed: {
|
20
20
|
label() {
|
21
|
-
var
|
22
|
-
return ((
|
21
|
+
var t, e;
|
22
|
+
return ((t = this.data) == null ? void 0 : t.ua) || ((e = this.data) == null ? void 0 : e.label) || this.data.title || "null";
|
23
23
|
},
|
24
24
|
selectedSortParam() {
|
25
|
-
var
|
26
|
-
return (
|
25
|
+
var t, e;
|
26
|
+
return (e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.sort;
|
27
27
|
},
|
28
28
|
getVisibleIcon() {
|
29
29
|
return this.data.format !== "image" && this.data.format !== "verify";
|
30
30
|
}
|
31
31
|
},
|
32
32
|
watch: {
|
33
|
-
activeColumn(
|
34
|
-
|
33
|
+
activeColumn(t) {
|
34
|
+
t !== this.data.name && (this.currentSort = "");
|
35
35
|
}
|
36
36
|
},
|
37
37
|
methods: {
|
38
|
-
changeCurrentSort(
|
39
|
-
switch (
|
38
|
+
changeCurrentSort(t) {
|
39
|
+
switch (t) {
|
40
40
|
case "":
|
41
41
|
return "asc";
|
42
42
|
case "asc":
|
@@ -47,9 +47,9 @@ const gt = {
|
|
47
47
|
return "";
|
48
48
|
}
|
49
49
|
},
|
50
|
-
handleClickSortBtn(
|
51
|
-
this.$emit("change-active", this.data.name), this.currentSort = this.changeCurrentSort(
|
52
|
-
const
|
50
|
+
handleClickSortBtn(t) {
|
51
|
+
this.$emit("change-active", this.data.name), this.currentSort = this.changeCurrentSort(t);
|
52
|
+
const e = this.$route.query, { sort: n, ...o } = e, s = this.currentSort ? `${this.data.name}-${this.currentSort}` : "";
|
53
53
|
this.$router.replace({
|
54
54
|
query: {
|
55
55
|
...o,
|
@@ -57,8 +57,8 @@ const gt = {
|
|
57
57
|
}
|
58
58
|
});
|
59
59
|
},
|
60
|
-
isValueEqualToSelected(
|
61
|
-
return `${this.data.name}-${
|
60
|
+
isValueEqualToSelected(t) {
|
61
|
+
return `${this.data.name}-${t}` === this.selectedSortParam;
|
62
62
|
}
|
63
63
|
}
|
64
64
|
}, mt = {
|
@@ -69,19 +69,19 @@ const gt = {
|
|
69
69
|
key: 1,
|
70
70
|
class: "flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200"
|
71
71
|
};
|
72
|
-
function
|
73
|
-
return
|
74
|
-
l.getVisibleIcon ? (
|
72
|
+
function vt(t, e, n, o, s, l) {
|
73
|
+
return r(), i("th", mt, [
|
74
|
+
l.getVisibleIcon ? (r(), i("button", {
|
75
75
|
key: 0,
|
76
76
|
type: "button",
|
77
77
|
class: "flex items-center px-1 py-2 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200",
|
78
|
-
onClick:
|
78
|
+
onClick: e[0] || (e[0] = (c) => l.handleClickSortBtn(s.currentSort))
|
79
79
|
}, [
|
80
|
-
|
81
|
-
|
82
|
-
s.currentSort ? (
|
80
|
+
P(A(l.label) + " ", 1),
|
81
|
+
a("span", xt, [
|
82
|
+
s.currentSort ? (r(), i("svg", {
|
83
83
|
key: 0,
|
84
|
-
class:
|
84
|
+
class: w(["shrink-0 size-3.5", { "rotate-180": s.currentSort === "asc" }]),
|
85
85
|
xmlns: "http://www.w3.org/2000/svg",
|
86
86
|
width: "24",
|
87
87
|
height: "24",
|
@@ -91,44 +91,19 @@ function kt(e, t, n, o, s, l) {
|
|
91
91
|
"stroke-width": "2",
|
92
92
|
"stroke-linecap": "round",
|
93
93
|
"stroke-linejoin": "round"
|
94
|
-
},
|
95
|
-
|
96
|
-
|
97
|
-
]), 2)) :
|
94
|
+
}, e[1] || (e[1] = [
|
95
|
+
a("path", { d: "m5 12 7-7 7 7" }, null, -1),
|
96
|
+
a("path", { d: "M12 19V5" }, null, -1)
|
97
|
+
]), 2)) : k("", !0)
|
98
98
|
])
|
99
|
-
])) : (
|
99
|
+
])) : (r(), i("p", yt, A(l.label), 1))
|
100
100
|
], 512);
|
101
101
|
}
|
102
|
-
const
|
103
|
-
xmlns: "http://www.w3.org/2000/svg",
|
104
|
-
width: "24",
|
105
|
-
height: "24",
|
106
|
-
viewBox: "0 0 24 24",
|
107
|
-
fill: "none",
|
108
|
-
stroke: "currentColor",
|
109
|
-
"stroke-width": "2",
|
110
|
-
"stroke-linecap": "round",
|
111
|
-
"stroke-linejoin": "round",
|
112
|
-
class: "icon icon-tabler icons-tabler-outline icon-tabler-link"
|
113
|
-
};
|
114
|
-
function wt(e, t) {
|
115
|
-
return a(), i("svg", Ct, t[0] || (t[0] = [
|
116
|
-
r("path", {
|
117
|
-
stroke: "none",
|
118
|
-
d: "M0 0h24v24H0z",
|
119
|
-
fill: "none"
|
120
|
-
}, null, -1),
|
121
|
-
r("path", { d: "M9 15l6 -6" }, null, -1),
|
122
|
-
r("path", { d: "M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464" }, null, -1),
|
123
|
-
r("path", { d: "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463" }, null, -1)
|
124
|
-
]));
|
125
|
-
}
|
126
|
-
const $t = /* @__PURE__ */ C(_t, [["render", wt]]), St = {
|
102
|
+
const kt = /* @__PURE__ */ S(gt, [["render", vt]]), _t = {
|
127
103
|
components: {
|
128
104
|
IconMore: Je,
|
129
105
|
IconDelete: Ge,
|
130
|
-
IconEdit: Qe
|
131
|
-
IconLink: $t
|
106
|
+
IconEdit: Qe
|
132
107
|
},
|
133
108
|
emits: ["updateTable"],
|
134
109
|
props: {
|
@@ -149,7 +124,7 @@ const $t = /* @__PURE__ */ C(_t, [["render", wt]]), St = {
|
|
149
124
|
},
|
150
125
|
computed: {
|
151
126
|
getCustomActions() {
|
152
|
-
return this.actions.filter((
|
127
|
+
return this.actions.filter((t) => typeof t == "object");
|
153
128
|
}
|
154
129
|
},
|
155
130
|
methods: {
|
@@ -157,26 +132,26 @@ const $t = /* @__PURE__ */ C(_t, [["render", wt]]), St = {
|
|
157
132
|
this.isDeleteConfirm = !0, document.querySelector("body").click();
|
158
133
|
},
|
159
134
|
async getData() {
|
160
|
-
var
|
135
|
+
var t;
|
161
136
|
try {
|
162
|
-
const { data:
|
163
|
-
`/api/table/${this.table}/${(
|
137
|
+
const { data: e } = await M.get(
|
138
|
+
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
164
139
|
);
|
165
|
-
this.formValue =
|
166
|
-
} catch (
|
167
|
-
console.error(
|
140
|
+
this.formValue = e;
|
141
|
+
} catch (e) {
|
142
|
+
console.error(e);
|
168
143
|
}
|
169
144
|
},
|
170
145
|
doSomethingOnCancel() {
|
171
146
|
this.formVisible = !1;
|
172
147
|
},
|
173
148
|
async deleteElement() {
|
174
|
-
var
|
149
|
+
var t, e;
|
175
150
|
try {
|
176
|
-
const { data: n } = await
|
177
|
-
`/api/table/${this.table}/${(
|
151
|
+
const { data: n } = await M.get(
|
152
|
+
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
178
153
|
);
|
179
|
-
await
|
154
|
+
await M.delete(`/api/table/${n == null ? void 0 : n.token}`), await this.$notify({
|
180
155
|
title: "Успішно!",
|
181
156
|
message: "Об`єкт успішно видалeно",
|
182
157
|
type: "success"
|
@@ -184,108 +159,105 @@ const $t = /* @__PURE__ */ C(_t, [["render", wt]]), St = {
|
|
184
159
|
} catch (n) {
|
185
160
|
this.$notify({
|
186
161
|
title: "Помилка!",
|
187
|
-
message: (
|
162
|
+
message: (e = n == null ? void 0 : n.response) == null ? void 0 : e.data,
|
188
163
|
type: "error"
|
189
164
|
});
|
190
165
|
} finally {
|
191
166
|
this.isDeleteConfirm = !1;
|
192
167
|
}
|
193
168
|
},
|
194
|
-
async customButtonAction(
|
195
|
-
var
|
196
|
-
document.querySelector("body").click(),
|
197
|
-
form:
|
198
|
-
id: (
|
199
|
-
api:
|
200
|
-
title:
|
201
|
-
}), await this.$emit("update-table")) :
|
202
|
-
confirm:
|
203
|
-
api:
|
204
|
-
method:
|
169
|
+
async customButtonAction(t) {
|
170
|
+
var e, n;
|
171
|
+
document.querySelector("body").click(), t != null && t.form ? (await this.$v3plugin.$form({
|
172
|
+
form: t == null ? void 0 : t.form,
|
173
|
+
id: (e = this.item) == null ? void 0 : e.id,
|
174
|
+
api: t == null ? void 0 : t.api,
|
175
|
+
title: t == null ? void 0 : t.title
|
176
|
+
}), await this.$emit("update-table")) : (await this.$v3plugin.$api({
|
177
|
+
confirm: t == null ? void 0 : t.confirm,
|
178
|
+
api: t == null ? void 0 : t.api,
|
179
|
+
method: t == null ? void 0 : t.method,
|
205
180
|
id: (n = this.item) == null ? void 0 : n.id,
|
206
|
-
isId: (
|
207
|
-
}), await this.$emit("update-table"))
|
181
|
+
isId: (t == null ? void 0 : t.isId) || !1
|
182
|
+
}), await this.$emit("update-table"));
|
208
183
|
}
|
209
184
|
}
|
210
|
-
},
|
185
|
+
}, Ct = { class: "inline-flex" }, wt = { 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" }, $t = { class: "flex flex-col items-start" }, St = ["onClick"], Tt = { class: "text-gray-800" }, At = {
|
211
186
|
key: 1,
|
212
187
|
class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
|
213
|
-
},
|
214
|
-
function
|
215
|
-
const c =
|
216
|
-
return
|
217
|
-
|
218
|
-
|
188
|
+
}, It = { class: "flex justify-end p-[16px] pr-0 gap-x-3" };
|
189
|
+
function Dt(t, e, n, o, s, l) {
|
190
|
+
const c = f("IconMore"), g = f("IconEdit"), p = f("router-link"), b = f("IconDelete"), d = f("VsPopover"), y = f("VsConfirm");
|
191
|
+
return r(), i($, null, [
|
192
|
+
a("div", Ct, [
|
193
|
+
x(d, {
|
219
194
|
trigger: "click",
|
220
195
|
placement: "bottom-left"
|
221
196
|
}, {
|
222
|
-
reference:
|
223
|
-
|
224
|
-
|
197
|
+
reference: D(() => [
|
198
|
+
a("button", wt, [
|
199
|
+
x(c, {
|
225
200
|
height: "16",
|
226
201
|
width: "16"
|
227
202
|
})
|
228
203
|
])
|
229
204
|
]),
|
230
|
-
default:
|
231
|
-
var h, _,
|
205
|
+
default: D(() => {
|
206
|
+
var m, h, _, C, I;
|
232
207
|
return [
|
233
|
-
|
234
|
-
(
|
208
|
+
a("div", $t, [
|
209
|
+
(m = n.actions) != null && m.includes("edit") && n.isForm ? (r(), v(p, {
|
235
210
|
key: 0,
|
236
|
-
to: `/edit?table=${(
|
211
|
+
to: `/edit?table=${(_ = (h = t.$route) == null ? void 0 : h.params) == null ? void 0 : _.catchAll}&id=${(C = n.item) == null ? void 0 : C.id}`,
|
237
212
|
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"
|
238
213
|
}, {
|
239
|
-
default:
|
240
|
-
|
241
|
-
|
214
|
+
default: D(() => [
|
215
|
+
x(g, { color: "#000" }),
|
216
|
+
e[4] || (e[4] = P(" Редагувати "))
|
242
217
|
]),
|
243
218
|
_: 1
|
244
|
-
}, 8, ["to"])) :
|
245
|
-
(
|
219
|
+
}, 8, ["to"])) : k("", !0),
|
220
|
+
(r(!0), i($, null, V(l.getCustomActions, (T, F) => (r(), i("button", {
|
246
221
|
key: F,
|
247
|
-
onClick: (
|
222
|
+
onClick: (j) => l.customButtonAction(T),
|
248
223
|
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"
|
249
224
|
}, [
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
], 8, Dt))), 128)),
|
256
|
-
n.isForm ? (a(), i("div", Pt)) : v("", !0),
|
257
|
-
(D = n.actions) != null && D.includes("del") ? (a(), i("button", {
|
225
|
+
x(b, { class: "opacity-0" }),
|
226
|
+
a("span", Tt, A(T == null ? void 0 : T.label), 1)
|
227
|
+
], 8, St))), 128)),
|
228
|
+
n.isForm ? (r(), i("div", At)) : k("", !0),
|
229
|
+
(I = n.actions) != null && I.includes("del") ? (r(), i("button", {
|
258
230
|
key: 2,
|
259
|
-
onClick:
|
231
|
+
onClick: e[0] || (e[0] = it((...T) => l.openConfirm && l.openConfirm(...T), ["stop"])),
|
260
232
|
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"
|
261
233
|
}, [
|
262
|
-
|
263
|
-
|
264
|
-
])) :
|
234
|
+
x(b),
|
235
|
+
e[5] || (e[5] = a("span", { class: "text-gray-800" }, "Видалити", -1))
|
236
|
+
])) : k("", !0)
|
265
237
|
])
|
266
238
|
];
|
267
239
|
}),
|
268
240
|
_: 1
|
269
241
|
})
|
270
242
|
]),
|
271
|
-
|
243
|
+
x(y, {
|
272
244
|
visible: s.isDeleteConfirm,
|
273
|
-
"onUpdate:visible":
|
245
|
+
"onUpdate:visible": e[3] || (e[3] = (m) => s.isDeleteConfirm = m),
|
274
246
|
size: "small",
|
275
247
|
title: "Ви впевнені?"
|
276
248
|
}, {
|
277
|
-
default:
|
278
|
-
|
279
|
-
|
280
|
-
|
249
|
+
default: D(() => [
|
250
|
+
e[6] || (e[6] = a("p", { class: "mt-1 text-sm text-gray-600 dark:text-neutral-400" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
251
|
+
a("div", It, [
|
252
|
+
a("button", {
|
281
253
|
type: "button",
|
282
254
|
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",
|
283
|
-
onClick:
|
255
|
+
onClick: e[1] || (e[1] = (m) => s.isDeleteConfirm = !1)
|
284
256
|
}, " Скасувати "),
|
285
|
-
|
257
|
+
a("button", {
|
286
258
|
type: "button",
|
287
259
|
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",
|
288
|
-
onClick:
|
260
|
+
onClick: e[2] || (e[2] = (...m) => l.deleteElement && l.deleteElement(...m))
|
289
261
|
}, " Так, я впевнена(ий) ")
|
290
262
|
])
|
291
263
|
]),
|
@@ -293,7 +265,7 @@ function jt(e, t, n, o, s, l) {
|
|
293
265
|
}, 8, ["visible"])
|
294
266
|
], 64);
|
295
267
|
}
|
296
|
-
const
|
268
|
+
const Vt = /* @__PURE__ */ S(_t, [["render", Dt]]), Pt = {}, Ft = {
|
297
269
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
298
270
|
xmlns: "http://www.w3.org/2000/svg",
|
299
271
|
viewBox: "0 0 24 24",
|
@@ -303,15 +275,15 @@ const Lt = /* @__PURE__ */ C(St, [["render", jt]]), Mt = {}, zt = {
|
|
303
275
|
"stroke-linecap": "round",
|
304
276
|
"stroke-linejoin": "round"
|
305
277
|
};
|
306
|
-
function
|
307
|
-
return
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
278
|
+
function jt(t, e, n, o, s, l) {
|
279
|
+
return r(), i("svg", Ft, e[0] || (e[0] = [
|
280
|
+
a("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
281
|
+
a("path", { d: "M7 20V4" }, null, -1),
|
282
|
+
a("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
283
|
+
a("path", { d: "M17 4v16" }, null, -1)
|
312
284
|
]));
|
313
285
|
}
|
314
|
-
const
|
286
|
+
const Lt = /* @__PURE__ */ S(Pt, [["render", jt]]), Mt = {}, zt = {
|
315
287
|
xmlns: "http://www.w3.org/2000/svg",
|
316
288
|
width: "24",
|
317
289
|
height: "24",
|
@@ -323,19 +295,19 @@ const Bt = /* @__PURE__ */ C(Mt, [["render", qt]]), Ot = {}, Nt = {
|
|
323
295
|
"stroke-linejoin": "round",
|
324
296
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-rosette-discount-check"
|
325
297
|
};
|
326
|
-
function
|
327
|
-
return
|
328
|
-
|
298
|
+
function qt(t, e, n, o, s, l) {
|
299
|
+
return r(), i("svg", zt, e[0] || (e[0] = [
|
300
|
+
a("path", {
|
329
301
|
stroke: "none",
|
330
302
|
d: "M0 0h24v24H0z",
|
331
303
|
fill: "none"
|
332
304
|
}, null, -1),
|
333
|
-
|
334
|
-
|
305
|
+
a("path", { d: "M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1" }, null, -1),
|
306
|
+
a("path", { d: "M9 12l2 2l4 -4" }, null, -1)
|
335
307
|
]));
|
336
308
|
}
|
337
|
-
const
|
338
|
-
components: { IconExport:
|
309
|
+
const Bt = /* @__PURE__ */ S(Mt, [["render", qt]]), Ot = {
|
310
|
+
components: { IconExport: Lt, IconChevronDown: Xe, IconSuccess: Bt },
|
339
311
|
props: {
|
340
312
|
table: String,
|
341
313
|
columns: Array,
|
@@ -364,8 +336,8 @@ const Ut = /* @__PURE__ */ C(Ot, [["render", Et]]), Ht = {
|
|
364
336
|
};
|
365
337
|
},
|
366
338
|
watch: {
|
367
|
-
isOpen(
|
368
|
-
|
339
|
+
isOpen(t) {
|
340
|
+
t || (this.format = "", this.cols = [], this.activeAction = "", this.isSuccessTemplate = !1);
|
369
341
|
}
|
370
342
|
},
|
371
343
|
computed: {
|
@@ -375,8 +347,8 @@ const Ut = /* @__PURE__ */ C(Ot, [["render", Et]]), Ht = {
|
|
375
347
|
},
|
376
348
|
methods: {
|
377
349
|
async exportTable() {
|
378
|
-
var
|
379
|
-
if (!((
|
350
|
+
var t;
|
351
|
+
if (!((t = this.cols) != null && t.length)) {
|
380
352
|
this.$notify({
|
381
353
|
type: "error",
|
382
354
|
title: "Помилка",
|
@@ -393,7 +365,7 @@ const Ut = /* @__PURE__ */ C(Ot, [["render", Et]]), Ht = {
|
|
393
365
|
return;
|
394
366
|
}
|
395
367
|
try {
|
396
|
-
const
|
368
|
+
const e = await M.get("/api/export", {
|
397
369
|
params: {
|
398
370
|
table: this.table,
|
399
371
|
format: this.format,
|
@@ -404,7 +376,7 @@ const Ut = /* @__PURE__ */ C(Ot, [["render", Et]]), Ht = {
|
|
404
376
|
custom: this.filterCustom || null
|
405
377
|
},
|
406
378
|
responseType: "blob"
|
407
|
-
}), n = await
|
379
|
+
}), n = await e.data.text(), o = n != null && n.includes(";") ? null : JSON == null ? void 0 : JSON.parse(n), s = new Blob([e.data], {
|
408
380
|
type: "application/octet-stream"
|
409
381
|
}), l = window.URL.createObjectURL(s), c = document.createElement("a");
|
410
382
|
if (c.href = l, c.setAttribute(
|
@@ -419,149 +391,149 @@ const Ut = /* @__PURE__ */ C(Ot, [["render", Et]]), Ht = {
|
|
419
391
|
title: "Експорт",
|
420
392
|
message: "Файл успішно експортовано!"
|
421
393
|
}), this.isSuccessTemplate = !0;
|
422
|
-
} catch (
|
423
|
-
console.log(
|
394
|
+
} catch (e) {
|
395
|
+
console.log(e), this.$notify({
|
424
396
|
type: "error",
|
425
397
|
title: "Помилка",
|
426
398
|
message: "Не вдалося експортувати файл."
|
427
399
|
});
|
428
400
|
}
|
429
401
|
},
|
430
|
-
selectFormat(
|
431
|
-
this.format =
|
402
|
+
selectFormat(t) {
|
403
|
+
this.format = t;
|
432
404
|
},
|
433
405
|
choceAll() {
|
434
|
-
var
|
435
|
-
this.cols = (
|
406
|
+
var t;
|
407
|
+
this.cols = (t = this.columns) == null ? void 0 : t.map((e) => e == null ? void 0 : e.name), this.activeAction = "choceAll";
|
436
408
|
},
|
437
409
|
clearAll() {
|
438
410
|
this.cols = [], this.activeAction = "clearAll";
|
439
411
|
},
|
440
412
|
choceVisible() {
|
441
|
-
var
|
442
|
-
this.cols = (
|
413
|
+
var t, e;
|
414
|
+
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";
|
443
415
|
}
|
444
416
|
}
|
445
|
-
},
|
417
|
+
}, Nt = {
|
446
418
|
key: 0,
|
447
419
|
class: "flex flex-col items-center"
|
448
|
-
},
|
420
|
+
}, Et = {
|
449
421
|
key: 1,
|
450
422
|
class: "p-4"
|
451
|
-
},
|
423
|
+
}, Ut = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Rt = { class: "flex items-center gap-[10px] -ml-[10px] my-[10px]" }, Ht = ["onClick"], Wt = {
|
452
424
|
key: 0,
|
453
425
|
class: "block h-[8px] w-[8px] rounded-full bg-blue-500"
|
454
|
-
},
|
426
|
+
}, Kt = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, Jt = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Gt = { class: "mt-2 space-y-2" }, Qt = ["id", "onChange"], Xt = ["for"], Yt = {
|
455
427
|
key: 0,
|
456
428
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
457
|
-
},
|
429
|
+
}, Zt = {
|
458
430
|
key: 1,
|
459
431
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
460
432
|
};
|
461
|
-
function
|
462
|
-
const c =
|
463
|
-
return
|
464
|
-
|
465
|
-
onClick:
|
433
|
+
function es(t, e, n, o, s, l) {
|
434
|
+
const c = f("IconExport"), g = f("IconSuccess"), p = f("VsCheckbox"), b = f("VsDialog");
|
435
|
+
return r(), i($, null, [
|
436
|
+
a("button", {
|
437
|
+
onClick: e[0] || (e[0] = (d) => s.isOpen = !0),
|
466
438
|
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"
|
467
439
|
}, [
|
468
|
-
|
440
|
+
x(c, {
|
469
441
|
height: "16",
|
470
442
|
width: "16"
|
471
443
|
}),
|
472
|
-
|
444
|
+
e[7] || (e[7] = P(" Експорт "))
|
473
445
|
]),
|
474
|
-
|
446
|
+
x(b, {
|
475
447
|
visible: s.isOpen,
|
476
|
-
"onUpdate:visible":
|
448
|
+
"onUpdate:visible": e[6] || (e[6] = (d) => s.isOpen = d),
|
477
449
|
title: "Експорт таблиці",
|
478
450
|
size: "small",
|
479
451
|
closeClickBack: !0
|
480
452
|
}, {
|
481
|
-
footer:
|
482
|
-
s.isSuccessTemplate ? (
|
483
|
-
|
453
|
+
footer: D(() => [
|
454
|
+
s.isSuccessTemplate ? (r(), i("div", Yt, [
|
455
|
+
a("button", {
|
484
456
|
type: "button",
|
485
457
|
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",
|
486
|
-
onClick:
|
458
|
+
onClick: e[2] || (e[2] = (d) => s.isOpen = !1)
|
487
459
|
}, " Закрити "),
|
488
|
-
|
460
|
+
a("button", {
|
489
461
|
type: "button",
|
490
462
|
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",
|
491
|
-
onClick:
|
463
|
+
onClick: e[3] || (e[3] = (d) => s.isSuccessTemplate = !1)
|
492
464
|
}, " Вигрузити ще ")
|
493
|
-
])) : (
|
494
|
-
|
465
|
+
])) : (r(), i("div", Zt, [
|
466
|
+
a("button", {
|
495
467
|
type: "button",
|
496
468
|
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",
|
497
|
-
onClick:
|
469
|
+
onClick: e[4] || (e[4] = (d) => s.isOpen = !1)
|
498
470
|
}, " Скасувати "),
|
499
|
-
|
471
|
+
a("button", {
|
500
472
|
type: "button",
|
501
|
-
class:
|
502
|
-
onClick:
|
473
|
+
class: w(`inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-${l.color}-700 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-${l.color}-800 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-${l.color}-300 dark:focus:ring-${l.color}-500`),
|
474
|
+
onClick: e[5] || (e[5] = (...d) => l.exportTable && l.exportTable(...d))
|
503
475
|
}, " Завантажити таблицю ", 2)
|
504
476
|
]))
|
505
477
|
]),
|
506
|
-
default:
|
507
|
-
s.isSuccessTemplate ? (
|
508
|
-
|
478
|
+
default: D(() => [
|
479
|
+
s.isSuccessTemplate ? (r(), i("div", Nt, [
|
480
|
+
x(g, {
|
509
481
|
height: "100",
|
510
482
|
width: "100",
|
511
483
|
class: "text-green-200 mb-[20px]"
|
512
484
|
}),
|
513
|
-
|
514
|
-
])) : (
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
(
|
485
|
+
e[8] || (e[8] = a("h2", null, "Звіт сформовано і збережено", -1))
|
486
|
+
])) : (r(), i("div", Et, [
|
487
|
+
a("div", Ut, [
|
488
|
+
e[9] || (e[9] = a("h2", { class: "text-sm font-[600] text-gray-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
489
|
+
a("div", Rt, [
|
490
|
+
(r(!0), i($, null, V(s.actions, (d) => (r(), i("button", {
|
519
491
|
key: d == null ? void 0 : d.name,
|
520
492
|
onClick: d == null ? void 0 : d.function,
|
521
493
|
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"
|
522
494
|
}, [
|
523
|
-
|
524
|
-
class:
|
495
|
+
a("span", {
|
496
|
+
class: w(["h-[14px] w-[14px] border rounded-full flex items-center justify-center", { "border-blue-500": (d == null ? void 0 : d.name) === s.activeAction }])
|
525
497
|
}, [
|
526
|
-
(d == null ? void 0 : d.name) === s.activeAction ? (
|
498
|
+
(d == null ? void 0 : d.name) === s.activeAction ? (r(), i("span", Wt)) : k("", !0)
|
527
499
|
], 2),
|
528
|
-
|
529
|
-
], 8,
|
500
|
+
P(" " + A(d == null ? void 0 : d.label), 1)
|
501
|
+
], 8, Ht))), 128))
|
530
502
|
]),
|
531
|
-
|
532
|
-
(
|
503
|
+
a("div", Kt, [
|
504
|
+
(r(!0), i($, null, V(n.columns, (d, y) => (r(), i("div", {
|
533
505
|
class: "flex items-center",
|
534
|
-
key:
|
506
|
+
key: y,
|
535
507
|
style: { width: "calc((100% - 10px) / 2)" }
|
536
508
|
}, [
|
537
|
-
|
509
|
+
x(p, {
|
538
510
|
class: "[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",
|
539
511
|
modelValue: s.cols,
|
540
|
-
"onUpdate:modelValue":
|
512
|
+
"onUpdate:modelValue": e[1] || (e[1] = (m) => s.cols = m),
|
541
513
|
value: d == null ? void 0 : d.name,
|
542
514
|
label: d == null ? void 0 : d.ua
|
543
515
|
}, null, 8, ["modelValue", "value", "label"])
|
544
516
|
]))), 128))
|
545
517
|
])
|
546
518
|
]),
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
(
|
519
|
+
a("div", Jt, [
|
520
|
+
e[10] || (e[10] = a("h2", { class: "text-sm font-[600] text-gray-500" }, " Виберіть формат таблиці: ", -1)),
|
521
|
+
a("div", Gt, [
|
522
|
+
(r(!0), i($, null, V(s.tableFormats, (d, y) => (r(), i("div", {
|
551
523
|
class: "flex items-center",
|
552
|
-
key:
|
524
|
+
key: y
|
553
525
|
}, [
|
554
|
-
|
526
|
+
a("input", {
|
555
527
|
type: "radio",
|
556
528
|
name: "hs-pro-duecmfm",
|
557
529
|
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",
|
558
530
|
id: d,
|
559
|
-
onChange: (
|
560
|
-
}, null, 40,
|
561
|
-
|
531
|
+
onChange: (m) => l.selectFormat(d)
|
532
|
+
}, null, 40, Qt),
|
533
|
+
a("label", {
|
562
534
|
for: d,
|
563
535
|
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
564
|
-
}, " Формат " +
|
536
|
+
}, " Формат " + A(d), 9, Xt)
|
565
537
|
]))), 128))
|
566
538
|
])
|
567
539
|
])
|
@@ -571,7 +543,7 @@ function ls(e, t, n, o, s, l) {
|
|
571
543
|
}, 8, ["visible"])
|
572
544
|
], 64);
|
573
545
|
}
|
574
|
-
const
|
546
|
+
const ts = /* @__PURE__ */ S(Ot, [["render", es]]), ss = {}, ns = {
|
575
547
|
xmlns: "http://www.w3.org/2000/svg",
|
576
548
|
viewBox: "0 0 24 24",
|
577
549
|
fill: "none",
|
@@ -581,12 +553,12 @@ const rs = /* @__PURE__ */ C(Ht, [["render", ls]]), as = {}, os = {
|
|
581
553
|
"stroke-linejoin": "round",
|
582
554
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
583
555
|
};
|
584
|
-
function
|
585
|
-
return
|
556
|
+
function ls(t, e, n, o, s, l) {
|
557
|
+
return r(), i("svg", ns, e[0] || (e[0] = [
|
586
558
|
dt('<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)
|
587
559
|
]));
|
588
560
|
}
|
589
|
-
const
|
561
|
+
const as = /* @__PURE__ */ S(ss, [["render", ls]]), rs = {
|
590
562
|
props: { column: Object },
|
591
563
|
emits: ["update-column"],
|
592
564
|
components: {
|
@@ -598,8 +570,8 @@ const ds = /* @__PURE__ */ C(as, [["render", is]]), us = {
|
|
598
570
|
};
|
599
571
|
},
|
600
572
|
watch: {
|
601
|
-
value(
|
602
|
-
this.$emit("update-column", { ...this.column, hidden: !
|
573
|
+
value(t) {
|
574
|
+
this.$emit("update-column", { ...this.column, hidden: !t });
|
603
575
|
}
|
604
576
|
},
|
605
577
|
computed: {
|
@@ -608,27 +580,27 @@ const ds = /* @__PURE__ */ C(as, [["render", is]]), us = {
|
|
608
580
|
}
|
609
581
|
},
|
610
582
|
mounted() {
|
611
|
-
var
|
612
|
-
((
|
583
|
+
var t;
|
584
|
+
((t = this.column) == null ? void 0 : t.hidden) !== !0 && (this.value = !0);
|
613
585
|
}
|
614
|
-
},
|
615
|
-
function
|
586
|
+
}, os = { 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" }, is = { class: "flex justify-between flex-1 items-center gap-x-2.5 cursor-pointer text-[13px] text-gray-800 dark:text-neutral-300" };
|
587
|
+
function ds(t, e, n, o, s, l) {
|
616
588
|
var g, p;
|
617
|
-
const c =
|
618
|
-
return
|
619
|
-
|
620
|
-
|
621
|
-
U(
|
589
|
+
const c = f("IconCheck2");
|
590
|
+
return r(), i("div", os, [
|
591
|
+
a("label", is, [
|
592
|
+
P(A(((g = n.column) == null ? void 0 : g.ua) || ((p = n.column) == null ? void 0 : p.title)) + " ", 1),
|
593
|
+
U(a("input", {
|
622
594
|
type: "checkbox",
|
623
|
-
"onUpdate:modelValue":
|
595
|
+
"onUpdate:modelValue": e[0] || (e[0] = (b) => s.value = b),
|
624
596
|
class: "hidden"
|
625
597
|
}, null, 512), [
|
626
598
|
[ut, s.value]
|
627
599
|
]),
|
628
|
-
|
629
|
-
class:
|
600
|
+
a("span", {
|
601
|
+
class: w(["flex items-center justify-center text-white border border-gray-300 rounded shrink-0 size-4 focus:ring-blue-500", [s.value ? "bg-" + l.color + "-600 border-0" : "bg-white"]])
|
630
602
|
}, [
|
631
|
-
|
603
|
+
x(c, {
|
632
604
|
height: "12",
|
633
605
|
width: "12"
|
634
606
|
})
|
@@ -636,8 +608,8 @@ function ps(e, t, n, o, s, l) {
|
|
636
608
|
])
|
637
609
|
]);
|
638
610
|
}
|
639
|
-
const
|
640
|
-
components: { IconColumns:
|
611
|
+
const us = /* @__PURE__ */ S(rs, [["render", ds]]), cs = {
|
612
|
+
components: { IconColumns: as, AdminTableColumnsHiddenItem: us },
|
641
613
|
emits: ["update-columns"],
|
642
614
|
props: { columns: Array },
|
643
615
|
data() {
|
@@ -648,11 +620,11 @@ const bs = /* @__PURE__ */ C(us, [["render", ps]]), fs = {
|
|
648
620
|
},
|
649
621
|
computed: {
|
650
622
|
filteredColumn() {
|
651
|
-
var
|
652
|
-
return (
|
653
|
-
(
|
623
|
+
var t;
|
624
|
+
return (t = this.columns) == null ? void 0 : t.filter(
|
625
|
+
(e) => {
|
654
626
|
var n, o, s, l, c, g;
|
655
|
-
return ((s = (n =
|
627
|
+
return ((s = (n = e == null ? void 0 : e.ua) == null ? void 0 : n.toLowerCase()) == null ? void 0 : s.includes((o = this.searchValue) == null ? void 0 : o.toLowerCase())) || ((g = (l = e == null ? void 0 : e.title) == null ? void 0 : l.toLowerCase()) == null ? void 0 : g.includes((c = this.searchValue) == null ? void 0 : c.toLowerCase()));
|
656
628
|
}
|
657
629
|
);
|
658
630
|
}
|
@@ -661,52 +633,52 @@ const bs = /* @__PURE__ */ C(us, [["render", ps]]), fs = {
|
|
661
633
|
toggleVisible() {
|
662
634
|
this.visible = !this.visible, this.visible ? document.addEventListener("click", this.handleClickOutside) : document.removeEventListener("click", this.handleClickOutside);
|
663
635
|
},
|
664
|
-
handleClickOutside(
|
665
|
-
const
|
666
|
-
|
636
|
+
handleClickOutside(t) {
|
637
|
+
const e = this.$refs.wrapper;
|
638
|
+
e && !e.contains(t.target) && (this.visible = !1, document.removeEventListener("click", this.handleClickOutside));
|
667
639
|
},
|
668
|
-
updateColumn(
|
669
|
-
const
|
670
|
-
n[
|
640
|
+
updateColumn(t) {
|
641
|
+
const e = this.columns.findIndex((o) => (o == null ? void 0 : o.name) === (t == null ? void 0 : t.name)), n = this.columns;
|
642
|
+
n[e] = t, this.$emit("update-columns", [...n]);
|
671
643
|
}
|
672
644
|
},
|
673
645
|
beforeUnmount() {
|
674
646
|
document.removeEventListener("click", this.handleClickOutside);
|
675
647
|
}
|
676
|
-
},
|
648
|
+
}, hs = {
|
677
649
|
class: "relative",
|
678
650
|
ref: "wrapper"
|
679
|
-
},
|
651
|
+
}, ps = {
|
680
652
|
key: 0,
|
681
653
|
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"
|
682
|
-
},
|
654
|
+
}, bs = { class: "relative p-1 border-gray-200 border-y dark:border-neutral-800" }, fs = { 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" }, gs = {
|
683
655
|
key: 0,
|
684
656
|
class: "block px-3 mb-2 text-xs text-gray-500 dark:text-neutral-500"
|
685
|
-
},
|
657
|
+
}, ms = { class: "space-y-1" }, xs = {
|
686
658
|
key: 1,
|
687
659
|
class: "flex items-center px-3 text-[13px] py-1.5 px-3 rounded-md cursor-pointer group"
|
688
660
|
};
|
689
|
-
function
|
690
|
-
const c =
|
691
|
-
return
|
692
|
-
|
693
|
-
onClick:
|
661
|
+
function ys(t, e, n, o, s, l) {
|
662
|
+
const c = f("IconColumns"), g = f("AdminTableColumnsHiddenItem");
|
663
|
+
return r(), i("div", hs, [
|
664
|
+
a("button", {
|
665
|
+
onClick: e[0] || (e[0] = (...p) => l.toggleVisible && l.toggleVisible(...p)),
|
694
666
|
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"
|
695
667
|
}, [
|
696
|
-
|
668
|
+
x(c, {
|
697
669
|
height: "20",
|
698
670
|
width: "16"
|
699
671
|
})
|
700
672
|
]),
|
701
|
-
|
702
|
-
default:
|
703
|
-
var p,
|
673
|
+
x(W, { name: "fade" }, {
|
674
|
+
default: D(() => {
|
675
|
+
var p, b;
|
704
676
|
return [
|
705
|
-
s.visible ? (
|
706
|
-
|
707
|
-
|
708
|
-
U(
|
709
|
-
"onUpdate:modelValue":
|
677
|
+
s.visible ? (r(), i("div", ps, [
|
678
|
+
e[2] || (e[2] = a("div", { class: "flex items-center justify-between h-[48px] px-4 py-2 gap-x-2 text-sm font-medium text-gray-800" }, " Колонки ", -1)),
|
679
|
+
a("div", bs, [
|
680
|
+
U(a("input", {
|
681
|
+
"onUpdate:modelValue": e[1] || (e[1] = (d) => s.searchValue = d),
|
710
682
|
type: "text",
|
711
683
|
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",
|
712
684
|
placeholder: "Пошук",
|
@@ -715,24 +687,24 @@ function Cs(e, t, n, o, s, l) {
|
|
715
687
|
[ct, s.searchValue]
|
716
688
|
])
|
717
689
|
]),
|
718
|
-
|
719
|
-
(p = l.filteredColumn) != null && p.length ? (
|
720
|
-
|
721
|
-
(
|
722
|
-
key:
|
690
|
+
a("div", fs, [
|
691
|
+
(p = l.filteredColumn) != null && p.length ? (r(), i("span", gs, " Оберіть колонки для відображення ")) : k("", !0),
|
692
|
+
a("div", ms, [
|
693
|
+
(b = l.filteredColumn) != null && b.length ? (r(!0), i($, { key: 0 }, V(l.filteredColumn, (d, y) => (r(), v(g, {
|
694
|
+
key: y,
|
723
695
|
column: d,
|
724
696
|
onUpdateColumn: l.updateColumn
|
725
|
-
}, null, 8, ["column", "onUpdateColumn"]))), 128)) : (
|
697
|
+
}, null, 8, ["column", "onUpdateColumn"]))), 128)) : (r(), i("div", xs, " Нічого не знайдено "))
|
726
698
|
])
|
727
699
|
])
|
728
|
-
])) :
|
700
|
+
])) : k("", !0)
|
729
701
|
];
|
730
702
|
}),
|
731
703
|
_: 1
|
732
704
|
})
|
733
705
|
], 512);
|
734
706
|
}
|
735
|
-
const
|
707
|
+
const vs = /* @__PURE__ */ S(cs, [["render", ys]]), ks = {}, _s = {
|
736
708
|
xmlns: "http://www.w3.org/2000/svg",
|
737
709
|
viewBox: "0 0 24 24",
|
738
710
|
fill: "none",
|
@@ -742,18 +714,18 @@ const ws = /* @__PURE__ */ C(fs, [["render", Cs]]), $s = {}, Ss = {
|
|
742
714
|
"stroke-linejoin": "round",
|
743
715
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-minus"
|
744
716
|
};
|
745
|
-
function
|
746
|
-
return
|
747
|
-
|
717
|
+
function Cs(t, e, n, o, s, l) {
|
718
|
+
return r(), i("svg", _s, e[0] || (e[0] = [
|
719
|
+
a("path", {
|
748
720
|
stroke: "none",
|
749
721
|
d: "M0 0h24v24H0z",
|
750
722
|
fill: "none"
|
751
723
|
}, null, -1),
|
752
|
-
|
724
|
+
a("path", { d: "M5 12l14 0" }, null, -1)
|
753
725
|
]));
|
754
726
|
}
|
755
|
-
const
|
756
|
-
components: { IconPlus: Q, IconMinus:
|
727
|
+
const ws = /* @__PURE__ */ S(ks, [["render", Cs]]), $s = {
|
728
|
+
components: { IconPlus: Q, IconMinus: ws },
|
757
729
|
props: {
|
758
730
|
title: String,
|
759
731
|
defaultValue: { type: Boolean, default: () => !1 }
|
@@ -761,33 +733,33 @@ const As = /* @__PURE__ */ C($s, [["render", Ts]]), Is = {
|
|
761
733
|
data() {
|
762
734
|
return { expanded: this.defaultValue };
|
763
735
|
}
|
764
|
-
},
|
765
|
-
function
|
766
|
-
const c =
|
767
|
-
return
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
onClick:
|
736
|
+
}, Ss = { class: "hs-accordion" }, Ts = { class: "py-0.5 flex items-center gap-x-0.5 w-full" }, As = { class: "text-sm font-medium" }, Is = { class: "relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b" };
|
737
|
+
function Ds(t, e, n, o, s, l) {
|
738
|
+
const c = f("IconPlus"), g = f("IconMinus");
|
739
|
+
return r(), i("div", null, [
|
740
|
+
a("div", null, [
|
741
|
+
a("div", Ss, [
|
742
|
+
a("div", Ts, [
|
743
|
+
a("div", {
|
744
|
+
onClick: e[0] || (e[0] = (p) => s.expanded = !s.expanded),
|
773
745
|
class: "rounded-md cursor-pointer grow"
|
774
746
|
}, [
|
775
|
-
|
747
|
+
a("span", As, A(n.title), 1)
|
776
748
|
]),
|
777
|
-
|
749
|
+
a("button", {
|
778
750
|
class: "flex items-center justify-center rounded-md size-6 hover:bg-gray-100",
|
779
|
-
onClick:
|
751
|
+
onClick: e[1] || (e[1] = (p) => s.expanded = !s.expanded)
|
780
752
|
}, [
|
781
|
-
s.expanded ? (
|
753
|
+
s.expanded ? (r(), v(g, {
|
782
754
|
key: 1,
|
783
755
|
width: "14"
|
784
|
-
})) : (
|
756
|
+
})) : (r(), v(c, { key: 0 }))
|
785
757
|
])
|
786
758
|
]),
|
787
|
-
|
788
|
-
default:
|
789
|
-
U(
|
790
|
-
ht(
|
759
|
+
x(W, { name: "fade" }, {
|
760
|
+
default: D(() => [
|
761
|
+
U(a("div", Is, [
|
762
|
+
ht(t.$slots, "default", {}, void 0, !0)
|
791
763
|
], 512), [
|
792
764
|
[Y, s.expanded]
|
793
765
|
])
|
@@ -798,38 +770,38 @@ function js(e, t, n, o, s, l) {
|
|
798
770
|
])
|
799
771
|
]);
|
800
772
|
}
|
801
|
-
const
|
773
|
+
const Vs = /* @__PURE__ */ S($s, [["render", Ds], ["__scopeId", "data-v-c6318482"]]), Ps = {
|
802
774
|
components: {
|
803
775
|
AdminComponentIs: X,
|
804
|
-
AdminTree:
|
776
|
+
AdminTree: Vs,
|
805
777
|
VsNoData: Ye,
|
806
778
|
VsWidgetComments: Ze,
|
807
779
|
VsWidgetMap: et,
|
808
780
|
VsWidgetFileList: tt
|
809
781
|
},
|
810
782
|
props: { table: String, columns: Array, row: Object }
|
811
|
-
},
|
783
|
+
}, Fs = {
|
812
784
|
class: "pl-2 hs-accordion 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",
|
813
785
|
style: { height: "calc(100vh - 229px)" }
|
814
|
-
},
|
786
|
+
}, js = {
|
815
787
|
style: { height: "calc(100vh - 360px)" },
|
816
788
|
class: "pl-2"
|
817
|
-
},
|
818
|
-
function
|
819
|
-
var
|
820
|
-
const c =
|
821
|
-
return
|
822
|
-
|
823
|
-
|
789
|
+
}, Ls = { class: "flow-root mt-[10px]" }, Ms = { class: "divide-y divide-gray-100 text-[12px]" }, zs = { class: "grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4" }, qs = { class: "font-medium text-gray-900" }, Bs = { class: "text-gray-700 sm:col-span-2" };
|
790
|
+
function Os(t, e, n, o, s, l) {
|
791
|
+
var b, d, y, m;
|
792
|
+
const c = f("AdminComponentIs"), g = f("VsWidgetFileList"), p = f("VsNoData");
|
793
|
+
return r(), i("div", Fs, [
|
794
|
+
e[0] || (e[0] = a("div", { class: "pl-[10px] py-[9px]" }, [
|
795
|
+
a("h2", { class: "text-sm font-medium text-center" }, "Інформація про об'єкт")
|
824
796
|
], -1)),
|
825
|
-
|
826
|
-
(d = (
|
827
|
-
|
828
|
-
|
829
|
-
(
|
830
|
-
|
831
|
-
|
832
|
-
|
797
|
+
a("div", js, [
|
798
|
+
(d = (b = t.$route) == null ? void 0 : b.query) != null && d.card ? (r(), i($, { key: 0 }, [
|
799
|
+
a("div", Ls, [
|
800
|
+
a("dl", Ms, [
|
801
|
+
(r(!0), i($, null, V(n.columns, (h) => (r(), i("div", zs, [
|
802
|
+
a("dt", qs, A((h == null ? void 0 : h.ua) || (h == null ? void 0 : h.title)), 1),
|
803
|
+
a("dd", Bs, [
|
804
|
+
x(c, {
|
833
805
|
row: n.row,
|
834
806
|
column: h,
|
835
807
|
table: n.table
|
@@ -838,19 +810,19 @@ function Hs(e, t, n, o, s, l) {
|
|
838
810
|
]))), 256))
|
839
811
|
])
|
840
812
|
]),
|
841
|
-
(
|
842
|
-
key: (
|
843
|
-
id: (
|
813
|
+
(r(), v(g, {
|
814
|
+
key: (y = n.row) == null ? void 0 : y.id,
|
815
|
+
id: (m = n.row) == null ? void 0 : m.id,
|
844
816
|
class: "mt-10"
|
845
817
|
}, null, 8, ["id"]))
|
846
|
-
], 64)) : (
|
818
|
+
], 64)) : (r(), v(p, {
|
847
819
|
key: 1,
|
848
820
|
text: "Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"
|
849
821
|
}))
|
850
822
|
])
|
851
823
|
]);
|
852
824
|
}
|
853
|
-
const
|
825
|
+
const Ns = /* @__PURE__ */ S(Ps, [["render", Os]]), Es = {
|
854
826
|
emits: ["filterChange"],
|
855
827
|
props: {
|
856
828
|
scheme: { type: Object },
|
@@ -864,40 +836,40 @@ const Rs = /* @__PURE__ */ C(Ms, [["render", Hs]]), Ws = {
|
|
864
836
|
};
|
865
837
|
},
|
866
838
|
methods: {
|
867
|
-
closeFilter({ target:
|
868
|
-
this.isFilters &&
|
839
|
+
closeFilter({ target: t }) {
|
840
|
+
this.isFilters && t.classList.contains("filter-container") && (this.isFilters = !1);
|
869
841
|
}
|
870
842
|
}
|
871
|
-
},
|
843
|
+
}, Us = {
|
872
844
|
key: 0,
|
873
845
|
class: "px-[7px] text-[10px] py-[1px] font-[700] text-white bg-blue-500 rounded-full"
|
874
|
-
},
|
875
|
-
function
|
876
|
-
const c =
|
877
|
-
return
|
878
|
-
|
879
|
-
onClick:
|
846
|
+
}, Rs = { 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" };
|
847
|
+
function Hs(t, e, n, o, s, l) {
|
848
|
+
const c = f("IconFilter"), g = f("VsFilter");
|
849
|
+
return r(), i($, null, [
|
850
|
+
a("button", {
|
851
|
+
onClick: e[0] || (e[0] = (p) => s.isFilters = !s.isFilters),
|
880
852
|
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"
|
881
853
|
}, [
|
882
|
-
|
854
|
+
x(c, {
|
883
855
|
height: "16",
|
884
856
|
width: "16"
|
885
857
|
}),
|
886
|
-
|
887
|
-
n.onFilters ? (
|
858
|
+
e[4] || (e[4] = P(" Фільтри ")),
|
859
|
+
n.onFilters ? (r(), i("span", Us, A(n.onFilters), 1)) : k("", !0)
|
888
860
|
]),
|
889
|
-
|
890
|
-
default:
|
861
|
+
x(W, { name: "fade" }, {
|
862
|
+
default: D(() => {
|
891
863
|
var p;
|
892
864
|
return [
|
893
|
-
(
|
894
|
-
U(
|
895
|
-
onClick:
|
865
|
+
(r(), v(pt, { to: "#modal" }, [
|
866
|
+
U(a("div", {
|
867
|
+
onClick: e[3] || (e[3] = (...b) => l.closeFilter && l.closeFilter(...b)),
|
896
868
|
style: { height: "100vh" },
|
897
869
|
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)]"
|
898
870
|
}, [
|
899
|
-
|
900
|
-
(p = n.scheme) != null && p.length ? (
|
871
|
+
a("div", Rs, [
|
872
|
+
(p = n.scheme) != null && p.length ? (r(), v(g, {
|
901
873
|
key: 0,
|
902
874
|
ref: "filter",
|
903
875
|
scheme: n.scheme,
|
@@ -908,10 +880,10 @@ function Gs(e, t, n, o, s, l) {
|
|
908
880
|
name: "filter",
|
909
881
|
footer: !0,
|
910
882
|
background: !0,
|
911
|
-
onFilterChange:
|
883
|
+
onFilterChange: e[1] || (e[1] = (b) => t.$emit("filterChange", b)),
|
912
884
|
closeFilterBtn: !0,
|
913
|
-
onFilterClose:
|
914
|
-
}, null, 8, ["scheme", "token"])) :
|
885
|
+
onFilterClose: e[2] || (e[2] = (b) => s.isFilters = !1)
|
886
|
+
}, null, 8, ["scheme", "token"])) : k("", !0)
|
915
887
|
])
|
916
888
|
], 512), [
|
917
889
|
[Y, s.isFilters]
|
@@ -923,25 +895,25 @@ function Gs(e, t, n, o, s, l) {
|
|
923
895
|
})
|
924
896
|
], 64);
|
925
897
|
}
|
926
|
-
const
|
898
|
+
const Ws = /* @__PURE__ */ S(Es, [["render", Hs]]), Ks = {
|
927
899
|
props: { tabsList: { type: Array, default: () => [] }, filterState: String }
|
928
|
-
},
|
900
|
+
}, Js = {
|
929
901
|
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",
|
930
902
|
"aria-label": "Tabs",
|
931
903
|
role: "tablist",
|
932
904
|
"aria-orientation": "horizontal"
|
933
|
-
},
|
934
|
-
function
|
935
|
-
return
|
936
|
-
(
|
937
|
-
onClick: (g) =>
|
938
|
-
class:
|
905
|
+
}, Gs = ["onClick"];
|
906
|
+
function Qs(t, e, n, o, s, l) {
|
907
|
+
return r(), i("nav", Js, [
|
908
|
+
(r(!0), i($, null, V(n.tabsList, (c) => (r(), i("button", {
|
909
|
+
onClick: (g) => t.$emit("update:filterState", c == null ? void 0 : c.name),
|
910
|
+
class: w(["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", {
|
939
911
|
" 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": (c == null ? void 0 : c.name) === n.filterState
|
940
912
|
}])
|
941
|
-
},
|
913
|
+
}, A(c == null ? void 0 : c.label), 11, Gs))), 256))
|
942
914
|
]);
|
943
915
|
}
|
944
|
-
const
|
916
|
+
const Xs = /* @__PURE__ */ S(Ks, [["render", Qs]]), Ys = {}, Zs = {
|
945
917
|
xmlns: "http://www.w3.org/2000/svg",
|
946
918
|
viewBox: "0 0 24 24",
|
947
919
|
fill: "none",
|
@@ -951,55 +923,55 @@ const tn = /* @__PURE__ */ C(Xs, [["render", en]]), sn = {}, nn = {
|
|
951
923
|
"stroke-linejoin": "round",
|
952
924
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-filter"
|
953
925
|
};
|
954
|
-
function
|
955
|
-
return
|
956
|
-
|
926
|
+
function en(t, e, n, o, s, l) {
|
927
|
+
return r(), i("svg", Zs, e[0] || (e[0] = [
|
928
|
+
a("path", {
|
957
929
|
stroke: "none",
|
958
930
|
d: "M0 0h24v24H0z",
|
959
931
|
fill: "none"
|
960
932
|
}, null, -1),
|
961
|
-
|
933
|
+
a("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)
|
962
934
|
]));
|
963
935
|
}
|
964
|
-
const
|
965
|
-
components: { IconFilter2:
|
936
|
+
const tn = /* @__PURE__ */ S(Ys, [["render", en]]), sn = {
|
937
|
+
components: { IconFilter2: tn, IconCheck2: Ue },
|
966
938
|
props: { filterCustom: String, customList: Array }
|
967
|
-
},
|
968
|
-
function
|
969
|
-
const c =
|
970
|
-
return
|
939
|
+
}, nn = { 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" }, ln = { class: "flex flex-col p-[2px] gap-[2px] w-[170px]" }, an = ["onClick"], rn = { class: "text-sm text-gray-800" };
|
940
|
+
function on(t, e, n, o, s, l) {
|
941
|
+
const c = f("IconFilter2"), g = f("IconCheck2"), p = f("VsPopover");
|
942
|
+
return r(), v(p, {
|
971
943
|
ref: "popover",
|
972
944
|
placement: "bottom"
|
973
945
|
}, {
|
974
|
-
reference:
|
975
|
-
|
976
|
-
|
946
|
+
reference: D(() => [
|
947
|
+
a("button", nn, [
|
948
|
+
x(c, {
|
977
949
|
height: "20",
|
978
950
|
width: "20"
|
979
951
|
})
|
980
952
|
])
|
981
953
|
]),
|
982
|
-
default:
|
983
|
-
|
984
|
-
(
|
985
|
-
onClick: (
|
986
|
-
var
|
987
|
-
|
954
|
+
default: D(() => [
|
955
|
+
a("div", ln, [
|
956
|
+
(r(!0), i($, null, V(n.customList, (b, d) => (r(), i("button", {
|
957
|
+
onClick: (y) => {
|
958
|
+
var m;
|
959
|
+
t.$emit("update:filterCustom", b == null ? void 0 : b.name), (m = t.$refs) == null || m.popover.togglePopover();
|
988
960
|
},
|
989
961
|
key: d,
|
990
|
-
class:
|
962
|
+
class: w(["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) }])
|
991
963
|
}, [
|
992
|
-
|
993
|
-
n.filterCustom === (
|
964
|
+
a("span", rn, A(b == null ? void 0 : b.label), 1),
|
965
|
+
n.filterCustom === (b == null ? void 0 : b.name) ? (r(), v(g, {
|
994
966
|
key: 0,
|
995
967
|
class: "ml-auto size-3 shrink-0"
|
996
|
-
})) :
|
997
|
-
], 10,
|
998
|
-
|
968
|
+
})) : k("", !0)
|
969
|
+
], 10, an))), 128)),
|
970
|
+
a("button", {
|
999
971
|
class: "flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",
|
1000
|
-
onClick:
|
972
|
+
onClick: e[0] || (e[0] = (b) => {
|
1001
973
|
var d;
|
1002
|
-
|
974
|
+
t.$emit("update:filterCustom", void 0), (d = t.$refs) == null || d.popover.togglePopover();
|
1003
975
|
})
|
1004
976
|
}, " Скинути фільтри ")
|
1005
977
|
])
|
@@ -1007,91 +979,91 @@ function hn(e, t, n, o, s, l) {
|
|
1007
979
|
_: 1
|
1008
980
|
}, 512);
|
1009
981
|
}
|
1010
|
-
const
|
982
|
+
const dn = /* @__PURE__ */ S(sn, [["render", on]]), un = { class: "flex items-center gap-x-2" }, cn = {
|
1011
983
|
__name: "admin-table-custom-buttons",
|
1012
984
|
props: {
|
1013
985
|
slots: Object,
|
1014
986
|
data: Object
|
1015
987
|
},
|
1016
|
-
setup(
|
1017
|
-
var g, p,
|
1018
|
-
const { asyncTemplateSlot:
|
1019
|
-
var
|
1020
|
-
if ((
|
1021
|
-
const
|
988
|
+
setup(t) {
|
989
|
+
var g, p, b, d, y;
|
990
|
+
const { asyncTemplateSlot: e } = (y = (d = (b = (p = (g = Re()) == null ? void 0 : g.appContext) == null ? void 0 : p.app) == null ? void 0 : b.config) == null ? void 0 : d.globalProperties) == null ? void 0 : y.utils, n = J(""), o = J(""), s = t, l = () => {
|
991
|
+
var m, h, _, C, I;
|
992
|
+
if ((m = s.slots) != null && m.panelLeft || (o.value = "div"), (_ = (h = s.slots) == null ? void 0 : h.panelLeft) != null && _.includes("<")) {
|
993
|
+
const T = e("PanelLeft", (C = s.slots) == null ? void 0 : C.panelLeft, [
|
1022
994
|
"name"
|
1023
995
|
]);
|
1024
|
-
o.value =
|
996
|
+
o.value = T;
|
1025
997
|
} else
|
1026
998
|
o.value = (I = s.slots) == null ? void 0 : I.panelLeft;
|
1027
999
|
}, c = () => {
|
1028
|
-
var
|
1029
|
-
if ((
|
1030
|
-
const
|
1000
|
+
var m, h, _, C, I;
|
1001
|
+
if ((m = s.slots) != null && m.panelRight || (n.value = "div"), (_ = (h = s.slots) == null ? void 0 : h.panelRight) != null && _.includes("<")) {
|
1002
|
+
const T = e("PanelRight", (C = s.slots) == null ? void 0 : C.panelRight, [
|
1031
1003
|
"name"
|
1032
1004
|
]);
|
1033
|
-
n.value =
|
1005
|
+
n.value = T;
|
1034
1006
|
} else
|
1035
1007
|
n.value = (I = s.slots) == null ? void 0 : I.panelRight;
|
1036
1008
|
};
|
1037
|
-
return l(), c(), (
|
1038
|
-
(
|
1039
|
-
(
|
1009
|
+
return l(), c(), (m, h) => (r(), i("div", un, [
|
1010
|
+
(r(), v(G(o.value), { data: t.data }, null, 8, ["data"])),
|
1011
|
+
(r(), v(G(n.value), { data: t.data }, null, 8, ["data"]))
|
1040
1012
|
]));
|
1041
1013
|
}
|
1042
|
-
},
|
1014
|
+
}, hn = {
|
1043
1015
|
__name: "admin-custom-button-add",
|
1044
1016
|
props: {
|
1045
1017
|
slots: Object
|
1046
1018
|
},
|
1047
|
-
setup(
|
1048
|
-
var l, c, g, p,
|
1049
|
-
const { asyncTemplateSlot:
|
1019
|
+
setup(t) {
|
1020
|
+
var l, c, g, p, b;
|
1021
|
+
const { asyncTemplateSlot: e } = (b = (p = (g = (c = (l = Re()) == null ? void 0 : l.appContext) == null ? void 0 : c.app) == null ? void 0 : g.config) == null ? void 0 : p.globalProperties) == null ? void 0 : b.utils, n = J(""), o = t;
|
1050
1022
|
return (() => {
|
1051
|
-
var d,
|
1052
|
-
if ((d = o.slots) != null && d.addButton || (n.value = "div"), (
|
1053
|
-
const
|
1023
|
+
var d, y, m, h, _;
|
1024
|
+
if ((d = o.slots) != null && d.addButton || (n.value = "div"), (m = (y = o.slots) == null ? void 0 : y.addButton) != null && m.includes("<")) {
|
1025
|
+
const C = e("addButton", (h = o.slots) == null ? void 0 : h.addButton, [
|
1054
1026
|
"IconPlus"
|
1055
1027
|
]);
|
1056
|
-
n.value =
|
1028
|
+
n.value = C;
|
1057
1029
|
} else
|
1058
1030
|
n.value = (_ = o.slots) == null ? void 0 : _.addButton;
|
1059
|
-
})(), (d,
|
1031
|
+
})(), (d, y) => n.value ? (r(), v(G(n.value), {
|
1060
1032
|
key: 0,
|
1061
1033
|
IconPlus: Q
|
1062
|
-
})) :
|
1034
|
+
})) : k("", !0);
|
1063
1035
|
}
|
1064
|
-
},
|
1036
|
+
}, pn = {
|
1065
1037
|
key: 0,
|
1066
1038
|
class: "px-1 py-3 text-gray-800 font-[500]"
|
1067
|
-
},
|
1039
|
+
}, bn = {
|
1068
1040
|
key: 1,
|
1069
1041
|
class: "px-1 py-3 text-gray-800 font-[700]"
|
1070
|
-
},
|
1042
|
+
}, fn = {
|
1071
1043
|
__name: "admin-table-totals-list",
|
1072
1044
|
props: {
|
1073
1045
|
columns: { type: Array, default: () => [] },
|
1074
1046
|
agg: { type: Object, default: () => {
|
1075
1047
|
} }
|
1076
1048
|
},
|
1077
|
-
setup(
|
1078
|
-
return (
|
1079
|
-
(
|
1049
|
+
setup(t) {
|
1050
|
+
return (e, n) => (r(), i("tr", null, [
|
1051
|
+
(r(!0), i($, null, V(t.columns, (o) => {
|
1080
1052
|
var s;
|
1081
|
-
return
|
1053
|
+
return r(), i($, {
|
1082
1054
|
key: o == null ? void 0 : o.name
|
1083
1055
|
}, [
|
1084
|
-
(s =
|
1085
|
-
|
1056
|
+
(s = t.agg) != null && s[o == null ? void 0 : o.name] ? (r(), i("td", pn, [
|
1057
|
+
x(X, {
|
1086
1058
|
column: o,
|
1087
|
-
row:
|
1059
|
+
row: t.agg
|
1088
1060
|
}, null, 8, ["column", "row"])
|
1089
|
-
])) : (
|
1061
|
+
])) : (r(), i("td", bn))
|
1090
1062
|
], 64);
|
1091
1063
|
}), 128))
|
1092
1064
|
]));
|
1093
1065
|
}
|
1094
|
-
},
|
1066
|
+
}, gn = {}, mn = {
|
1095
1067
|
xmlns: "http://www.w3.org/2000/svg",
|
1096
1068
|
viewBox: "0 0 24 24",
|
1097
1069
|
fill: "none",
|
@@ -1101,18 +1073,18 @@ const pn = /* @__PURE__ */ C(an, [["render", hn]]), bn = { class: "flex items-ce
|
|
1101
1073
|
"stroke-linejoin": "round",
|
1102
1074
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
|
1103
1075
|
};
|
1104
|
-
function
|
1105
|
-
return
|
1106
|
-
|
1076
|
+
function xn(t, e, n, o, s, l) {
|
1077
|
+
return r(), i("svg", mn, e[0] || (e[0] = [
|
1078
|
+
a("path", {
|
1107
1079
|
stroke: "none",
|
1108
1080
|
d: "M0 0h24v24H0z",
|
1109
1081
|
fill: "none"
|
1110
1082
|
}, null, -1),
|
1111
|
-
|
1083
|
+
a("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
1112
1084
|
]));
|
1113
1085
|
}
|
1114
|
-
const
|
1115
|
-
components: { IconChevronDown: nt, IconCheck:
|
1086
|
+
const yn = /* @__PURE__ */ S(gn, [["render", xn]]), vn = bt({
|
1087
|
+
components: { IconChevronDown: nt, IconCheck: yn },
|
1116
1088
|
props: {
|
1117
1089
|
total: { type: Number, default: () => 0 },
|
1118
1090
|
pageSize: { type: Number, default: () => 20 },
|
@@ -1140,12 +1112,12 @@ const Cn = /* @__PURE__ */ C(kn, [["render", _n]]), wn = bt({
|
|
1140
1112
|
},
|
1141
1113
|
defaultPage: {
|
1142
1114
|
immediate: !0,
|
1143
|
-
handler(
|
1144
|
-
this.page =
|
1115
|
+
handler(t) {
|
1116
|
+
this.page = t, this.updatePages(t);
|
1145
1117
|
}
|
1146
1118
|
},
|
1147
|
-
pageSizeLocal(
|
1148
|
-
|
1119
|
+
pageSizeLocal(t, e) {
|
1120
|
+
e && (this.isDropdownOpen = !1, this.setCurrentPage(1));
|
1149
1121
|
}
|
1150
1122
|
},
|
1151
1123
|
computed: {
|
@@ -1167,18 +1139,18 @@ const Cn = /* @__PURE__ */ C(kn, [["render", _n]]), wn = bt({
|
|
1167
1139
|
}
|
1168
1140
|
this.updatePages(this.page);
|
1169
1141
|
},
|
1170
|
-
handleSetPage(
|
1171
|
-
const
|
1172
|
-
if (
|
1142
|
+
handleSetPage(t) {
|
1143
|
+
const e = t.replace(/\D/g, "");
|
1144
|
+
if (e > this.pagesCount) {
|
1173
1145
|
this.$refs.currentPage.innerText = this.page;
|
1174
1146
|
return;
|
1175
1147
|
} else
|
1176
|
-
this.$refs.currentPage.innerText =
|
1177
|
-
this.setCurrentPage(
|
1148
|
+
this.$refs.currentPage.innerText = e;
|
1149
|
+
this.setCurrentPage(e);
|
1178
1150
|
},
|
1179
|
-
updatePages(
|
1180
|
-
const
|
1181
|
-
let n = Math.max(
|
1151
|
+
updatePages(t) {
|
1152
|
+
const e = Math.floor(this.maxPages / 2);
|
1153
|
+
let n = Math.max(t - e, 1), o = n + this.maxPages - 1;
|
1182
1154
|
o > this.pagesCount && (o = this.pagesCount, n = Math.max(o - this.maxPages + 1, 1)), this.pages = Array.from(
|
1183
1155
|
{ length: o - n + 1 },
|
1184
1156
|
(s, l) => n + l
|
@@ -1190,109 +1162,109 @@ const Cn = /* @__PURE__ */ C(kn, [["render", _n]]), wn = bt({
|
|
1190
1162
|
handleClickNext() {
|
1191
1163
|
this.disableNextClick || (this.setCurrentPage(parseInt(this.page) + 1), this.updatePages(this.page), this.$emit("nextClick"));
|
1192
1164
|
},
|
1193
|
-
setCurrentPage(
|
1194
|
-
this.page =
|
1165
|
+
setCurrentPage(t) {
|
1166
|
+
this.page = t, this.$emit("pageChange", this.page, this.pageSizeLocal), this.updatePages(t);
|
1195
1167
|
},
|
1196
|
-
keydownEnter(
|
1197
|
-
|
1168
|
+
keydownEnter(t) {
|
1169
|
+
t.preventDefault(), t.target.blur();
|
1198
1170
|
}
|
1199
1171
|
}
|
1200
|
-
}),
|
1172
|
+
}), kn = { class: "flex items-center w-full" }, _n = { class: "flex items-center mx-[8px]" }, Cn = { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, wn = {
|
1201
1173
|
key: 0,
|
1202
1174
|
class: "flex items-center justify-center ml-3 gap-x-5"
|
1203
|
-
},
|
1204
|
-
function
|
1205
|
-
const c =
|
1206
|
-
return
|
1207
|
-
|
1175
|
+
}, $n = { class: "relative" }, Sn = { 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%]" }, Tn = ["onClick"];
|
1176
|
+
function An(t, e, n, o, s, l) {
|
1177
|
+
const c = f("IconChevronDown"), g = f("IconCheck");
|
1178
|
+
return r(), i("nav", kn, [
|
1179
|
+
a("button", {
|
1208
1180
|
type: "button",
|
1209
|
-
onClick:
|
1210
|
-
class:
|
1181
|
+
onClick: e[0] || (e[0] = (...p) => t.handleClickPrev && t.handleClickPrev(...p)),
|
1182
|
+
class: w(["min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100", { "opacity-50 pointer-events-none": t.disablePrevClick }])
|
1211
1183
|
}, [
|
1212
|
-
|
1184
|
+
x(c, {
|
1213
1185
|
height: "16",
|
1214
1186
|
width: "16",
|
1215
1187
|
class: "rotate-90"
|
1216
1188
|
})
|
1217
1189
|
], 2),
|
1218
|
-
|
1219
|
-
|
1190
|
+
a("div", _n, [
|
1191
|
+
a("span", {
|
1220
1192
|
ref: "currentPage",
|
1221
1193
|
contenteditable: "true",
|
1222
|
-
onKeydown:
|
1223
|
-
onBlur:
|
1194
|
+
onKeydown: e[1] || (e[1] = ft((...p) => t.keydownEnter && t.keydownEnter(...p), ["enter"])),
|
1195
|
+
onBlur: e[2] || (e[2] = (p) => t.handleSetPage(p.target.innerText)),
|
1224
1196
|
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 outline-blue-600 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:text-white"
|
1225
|
-
},
|
1226
|
-
|
1227
|
-
|
1197
|
+
}, A(t.page), 545),
|
1198
|
+
e[5] || (e[5] = a("span", { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, "з", -1)),
|
1199
|
+
a("span", Cn, A(t.pagesCount), 1)
|
1228
1200
|
]),
|
1229
|
-
|
1201
|
+
a("button", {
|
1230
1202
|
type: "button",
|
1231
|
-
onClick:
|
1232
|
-
class:
|
1203
|
+
onClick: e[3] || (e[3] = (...p) => t.handleClickNext && t.handleClickNext(...p)),
|
1204
|
+
class: w([{ "opacity-50 pointer-events-none": t.disableNextClick }, "min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"])
|
1233
1205
|
}, [
|
1234
|
-
|
1206
|
+
x(c, {
|
1235
1207
|
height: "16",
|
1236
1208
|
width: "16",
|
1237
1209
|
class: "-rotate-90"
|
1238
1210
|
})
|
1239
1211
|
], 2),
|
1240
|
-
|
1241
|
-
|
1242
|
-
U(
|
1243
|
-
(
|
1212
|
+
t.pageSizes.length ? (r(), i("div", wn, [
|
1213
|
+
a("div", $n, [
|
1214
|
+
U(a("div", Sn, [
|
1215
|
+
(r(!0), i($, null, V(t.pageSizes, (p) => (r(), i("button", {
|
1244
1216
|
type: "button",
|
1245
1217
|
class: "w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm",
|
1246
|
-
onClick: (
|
1218
|
+
onClick: (b) => t.pageSizeLocal = p
|
1247
1219
|
}, [
|
1248
|
-
|
1249
|
-
p ===
|
1220
|
+
P(A(p) + " ", 1),
|
1221
|
+
p === t.pageSizeLocal ? (r(), v(g, {
|
1250
1222
|
key: 0,
|
1251
1223
|
width: "14",
|
1252
1224
|
height: "14",
|
1253
1225
|
class: "text-blue-600"
|
1254
|
-
})) :
|
1255
|
-
], 8,
|
1226
|
+
})) : k("", !0)
|
1227
|
+
], 8, Tn))), 256))
|
1256
1228
|
], 512), [
|
1257
|
-
[Y,
|
1229
|
+
[Y, t.isDropdownOpen]
|
1258
1230
|
]),
|
1259
|
-
|
1231
|
+
t.pageSizes.length ? (r(), i("button", {
|
1260
1232
|
key: 0,
|
1261
1233
|
type: "button",
|
1262
1234
|
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",
|
1263
|
-
onClick:
|
1235
|
+
onClick: e[4] || (e[4] = (p) => t.isDropdownOpen = !t.isDropdownOpen)
|
1264
1236
|
}, [
|
1265
|
-
|
1266
|
-
|
1237
|
+
P(A(t.pageSizeLocal) + " ", 1),
|
1238
|
+
x(c, {
|
1267
1239
|
height: "16",
|
1268
1240
|
width: "16"
|
1269
1241
|
})
|
1270
|
-
])) :
|
1242
|
+
])) : k("", !0)
|
1271
1243
|
])
|
1272
|
-
])) :
|
1244
|
+
])) : k("", !0)
|
1273
1245
|
]);
|
1274
1246
|
}
|
1275
|
-
const
|
1247
|
+
const In = /* @__PURE__ */ S(vn, [["render", An]]), Dn = {
|
1276
1248
|
props: { table: String, title: String, search: String },
|
1277
1249
|
components: {
|
1278
|
-
AdminTableControl:
|
1279
|
-
AdminTableExport:
|
1250
|
+
AdminTableControl: Vt,
|
1251
|
+
AdminTableExport: ts,
|
1280
1252
|
// AdminTablePrint,
|
1281
|
-
AdminTableColumnsHidden:
|
1282
|
-
AdminTableColumn:
|
1253
|
+
AdminTableColumnsHidden: vs,
|
1254
|
+
AdminTableColumn: kt,
|
1283
1255
|
AdminNodata: lt,
|
1284
1256
|
IconPlus: Q,
|
1285
|
-
IconSearch:
|
1286
|
-
AdminTableCardInfo:
|
1287
|
-
IconOpenCard:
|
1257
|
+
IconSearch: at,
|
1258
|
+
AdminTableCardInfo: Ns,
|
1259
|
+
IconOpenCard: rt,
|
1288
1260
|
AdminComponentIs: X,
|
1289
|
-
AdminTableFilters:
|
1290
|
-
AdminTableTabs:
|
1291
|
-
AdminTableCustomFilters:
|
1292
|
-
AdminTableCustomButtons:
|
1293
|
-
AdminCustomButtonAdd:
|
1294
|
-
AdminTableTotalsList:
|
1295
|
-
AdminTablePagination:
|
1261
|
+
AdminTableFilters: Ws,
|
1262
|
+
AdminTableTabs: Xs,
|
1263
|
+
AdminTableCustomFilters: dn,
|
1264
|
+
AdminTableCustomButtons: cn,
|
1265
|
+
AdminCustomButtonAdd: hn,
|
1266
|
+
AdminTableTotalsList: fn,
|
1267
|
+
AdminTablePagination: In
|
1296
1268
|
},
|
1297
1269
|
data() {
|
1298
1270
|
return {
|
@@ -1326,83 +1298,81 @@ const Fn = /* @__PURE__ */ C(wn, [["render", Pn]]), jn = {
|
|
1326
1298
|
return `text-[${E.value.fontSize || 13}px]`;
|
1327
1299
|
},
|
1328
1300
|
defaultPage() {
|
1329
|
-
var
|
1330
|
-
return ((
|
1301
|
+
var t, e;
|
1302
|
+
return ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1;
|
1331
1303
|
},
|
1332
1304
|
columns() {
|
1333
|
-
var
|
1334
|
-
return (
|
1305
|
+
var t, e;
|
1306
|
+
return (e = (t = this.tableData) == null ? void 0 : t.columns) == null ? void 0 : e.filter((n) => (n == null ? void 0 : n.hidden) !== !0);
|
1335
1307
|
},
|
1336
1308
|
isForm() {
|
1337
|
-
var
|
1338
|
-
return ((
|
1309
|
+
var t, e, n, o, s;
|
1310
|
+
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 = (o = this.tableData) == null ? void 0 : o.actions) == null ? void 0 : s.includes("edit")));
|
1339
1311
|
},
|
1340
1312
|
isNoData() {
|
1341
|
-
var
|
1342
|
-
return !((
|
1313
|
+
var t, e;
|
1314
|
+
return !((t = this.tableData) != null && t.rows) || !((e = this.columns) != null && e.length);
|
1343
1315
|
},
|
1344
1316
|
activeCardRow() {
|
1345
|
-
var
|
1346
|
-
return ((
|
1317
|
+
var t, e;
|
1318
|
+
return ((e = (t = this.tableData) == null ? void 0 : t.rows) == null ? void 0 : e.find((n) => {
|
1347
1319
|
var o, s;
|
1348
1320
|
return (n == null ? void 0 : n.id) === ((s = (o = this.$route) == null ? void 0 : o.query) == null ? void 0 : s.card);
|
1349
1321
|
})) || {};
|
1350
1322
|
},
|
1351
1323
|
getActions() {
|
1352
|
-
var
|
1353
|
-
return (
|
1324
|
+
var t;
|
1325
|
+
return (t = this.tableData) == null ? void 0 : t.actions;
|
1354
1326
|
}
|
1355
1327
|
},
|
1356
1328
|
watch: {
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
// await this.getTableData();
|
1361
|
-
// },
|
1329
|
+
async table() {
|
1330
|
+
this.tableData = null, this.columnsWidth = {}, await this.getTableData();
|
1331
|
+
},
|
1362
1332
|
searchValue: {
|
1363
|
-
handler: ot(async function(
|
1364
|
-
var
|
1333
|
+
handler: ot(async function(t) {
|
1334
|
+
var e;
|
1365
1335
|
this.page = 1, await this.getTableData(), this.$router.push({
|
1366
1336
|
...this.$route,
|
1367
1337
|
query: {
|
1368
|
-
...(
|
1369
|
-
search:
|
1338
|
+
...(e = this.$route) == null ? void 0 : e.query,
|
1339
|
+
search: t || void 0,
|
1370
1340
|
page: 1
|
1371
1341
|
}
|
1372
1342
|
});
|
1373
1343
|
}, 500)
|
1374
1344
|
},
|
1375
1345
|
$route: {
|
1376
|
-
|
1346
|
+
handler(t, e) {
|
1377
1347
|
var n, o;
|
1378
|
-
((n =
|
1348
|
+
((n = t == null ? void 0 : t.params) == null ? void 0 : n.catchAll) !== ((o = e == null ? void 0 : e.params) == null ? void 0 : o.catchAll) && (this.visibleColumns = [], this.unmountedData(), this.getFilters());
|
1379
1349
|
},
|
1380
1350
|
deep: !0
|
1381
1351
|
},
|
1382
|
-
limit(
|
1383
|
-
var
|
1352
|
+
limit(t) {
|
1353
|
+
var e;
|
1384
1354
|
this.$router.replace({
|
1385
1355
|
...this.$route,
|
1386
|
-
query: { ...(
|
1356
|
+
query: { ...(e = this.$route) == null ? void 0 : e.query, limit: t }
|
1387
1357
|
});
|
1388
1358
|
},
|
1389
|
-
filterState(
|
1390
|
-
var
|
1391
|
-
|
1359
|
+
filterState(t) {
|
1360
|
+
var e;
|
1361
|
+
t && (this.$router.replace({
|
1392
1362
|
...this.$route,
|
1393
|
-
query: { ...(
|
1363
|
+
query: { ...(e = this.$route) == null ? void 0 : e.query, state: t }
|
1394
1364
|
}), this.getTableData());
|
1395
1365
|
},
|
1396
|
-
filterCustom(
|
1397
|
-
var
|
1366
|
+
filterCustom(t) {
|
1367
|
+
var e;
|
1398
1368
|
this.$router.replace({
|
1399
1369
|
...this.$route,
|
1400
|
-
query: { ...(
|
1370
|
+
query: { ...(e = this.$route) == null ? void 0 : e.query, custom: t }
|
1401
1371
|
}), this.getTableData();
|
1402
1372
|
},
|
1403
|
-
columns(
|
1404
|
-
var
|
1405
|
-
this.visibleColumns =
|
1373
|
+
columns(t) {
|
1374
|
+
var e, n, o, s;
|
1375
|
+
this.visibleColumns = t == null ? void 0 : t.map((l) => l == null ? void 0 : l.name), this.initialHiddenColumns === ((e = this.visibleColumns) == null ? void 0 : e.join(",")) && (this.visibleColumns = []), this.$router.replace({
|
1406
1376
|
...this.$route,
|
1407
1377
|
query: {
|
1408
1378
|
...(n = this.$route) == null ? void 0 : n.query,
|
@@ -1413,14 +1383,14 @@ const Fn = /* @__PURE__ */ C(wn, [["render", Pn]]), jn = {
|
|
1413
1383
|
},
|
1414
1384
|
methods: {
|
1415
1385
|
async checkUrlMounted() {
|
1416
|
-
var
|
1417
|
-
this.page = ((
|
1386
|
+
var t, e, n, o, s, l, c, g, p, b, d, y, m, h, _, C, I, T, F, j, z;
|
1387
|
+
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((o = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : o.limit) || 20, (l = (s = this.$route) == null ? void 0 : s.query) != null && l.filter && (this.filters = ((p = decodeURI((g = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : g.filter)) == null ? void 0 : p.replaceAll("+", " ")) || null), this.filters && (this.onFilters = ((d = (b = this.filters) == null ? void 0 : b.split("=")) == null ? void 0 : d.length) - 1), this.filterState = ((m = (y = this.$route) == null ? void 0 : y.query) == null ? void 0 : m.state) || null, this.filterCustom = ((_ = (h = this.$route) == null ? void 0 : h.query) == null ? void 0 : _.custom) || null, this.searchValue = ((I = (C = this.$route) == null ? void 0 : C.query) == null ? void 0 : I.search) || "", this.visibleColumns = ((j = (F = (T = this.$route) == null ? void 0 : T.query) == null ? void 0 : F.columns) == null ? void 0 : j.split(",")) || [], (z = this.$route) != null && z.query.card && (this.isVisibleCardInfo = !0);
|
1418
1388
|
},
|
1419
|
-
rowWidth(
|
1389
|
+
rowWidth(t) {
|
1420
1390
|
var n, o;
|
1421
|
-
const
|
1422
|
-
if (
|
1423
|
-
const s =
|
1391
|
+
const e = (o = (n = this.tableData) == null ? void 0 : n.columns) == null ? void 0 : o.find((s) => s.name === t);
|
1392
|
+
if (e) {
|
1393
|
+
const s = e == null ? void 0 : e.width;
|
1424
1394
|
return typeof s == "number" ? `${s}px` : s != null && s.includes("px") ? s : `${s}px`;
|
1425
1395
|
}
|
1426
1396
|
},
|
@@ -1428,31 +1398,31 @@ const Fn = /* @__PURE__ */ C(wn, [["render", Pn]]), jn = {
|
|
1428
1398
|
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
1399
|
},
|
1430
1400
|
async getTableData() {
|
1431
|
-
var
|
1401
|
+
var t, e, n, o, s, l, c, g, p, b, d;
|
1432
1402
|
try {
|
1433
|
-
const { data:
|
1403
|
+
const { data: y } = await M.get(`/api/template/table/${this.table}`), m = await M.get(`/api/table-data/${this.table}`, {
|
1434
1404
|
params: {
|
1435
1405
|
page: this.page,
|
1436
1406
|
search: this.searchValue || null,
|
1437
1407
|
limit: this.limit,
|
1438
1408
|
filter: this.filters || null,
|
1439
|
-
order: ((
|
1409
|
+
order: ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.sort) || null,
|
1440
1410
|
state: this.filterState || null,
|
1441
1411
|
custom: this.filterCustom || null
|
1442
1412
|
}
|
1443
1413
|
});
|
1444
1414
|
this.tableData = {
|
1445
|
-
...
|
1446
|
-
...(
|
1415
|
+
...y,
|
1416
|
+
...(m == null ? void 0 : m.data) || {}
|
1447
1417
|
}, this.initialHiddenColumns = (l = (s = (o = (n = this.tableData) == null ? void 0 : n.columns) == null ? void 0 : o.filter((h) => (h == null ? void 0 : h.hidden) !== !0)) == null ? void 0 : s.map((h) => h == null ? void 0 : h.name)) == null ? void 0 : l.join(","), (c = this.visibleColumns) != null && c.length ? (g = this.tableData) == null || g.columns.forEach((h) => {
|
1448
1418
|
var _;
|
1449
1419
|
(_ = this.visibleColumns) != null && _.includes(h == null ? void 0 : h.name) ? h.hidden = !1 : h.hidden = !0;
|
1450
|
-
}) : this.visibleColumns = (d = (
|
1420
|
+
}) : this.visibleColumns = (d = (b = (p = this.tableData) == null ? void 0 : p.columns) == null ? void 0 : b.filter((h) => (h == null ? void 0 : h.hidden) !== !0)) == null ? void 0 : d.map((h) => h == null ? void 0 : h.name), setTimeout(() => {
|
1451
1421
|
var h, _;
|
1452
|
-
(_ = (h = this.tableData) == null ? void 0 : h.columns) == null || _.forEach(({ name:
|
1453
|
-
var I,
|
1454
|
-
(
|
1455
|
-
(
|
1422
|
+
(_ = (h = this.tableData) == null ? void 0 : h.columns) == null || _.forEach(({ name: C }) => {
|
1423
|
+
var I, T, F, j, z, R;
|
1424
|
+
(T = (I = this.columnsWidth) == null ? void 0 : I[C]) != null && T.ref && (this.columnsWidth[C].width = parseInt(
|
1425
|
+
(R = (z = (j = (F = this.columnsWidth) == null ? void 0 : F[C]) == null ? void 0 : j.ref) == null ? void 0 : z.getBoundingClientRect()) == null ? void 0 : R.width
|
1456
1426
|
) + "px");
|
1457
1427
|
});
|
1458
1428
|
});
|
@@ -1460,135 +1430,135 @@ const Fn = /* @__PURE__ */ C(wn, [["render", Pn]]), jn = {
|
|
1460
1430
|
}
|
1461
1431
|
},
|
1462
1432
|
async getFilters() {
|
1463
|
-
var
|
1433
|
+
var t;
|
1464
1434
|
try {
|
1465
|
-
const { data:
|
1466
|
-
this.filterScheme = (
|
1435
|
+
const { data: e } = await M.get(`/api/table-filter/${this.table}`);
|
1436
|
+
this.filterScheme = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map((n) => ({
|
1467
1437
|
...n,
|
1468
1438
|
label: (n == null ? void 0 : n.label) || (n == null ? void 0 : n.ua)
|
1469
1439
|
}));
|
1470
1440
|
} catch {
|
1471
1441
|
}
|
1472
1442
|
},
|
1473
|
-
async handlePageChange(
|
1443
|
+
async handlePageChange(t, e) {
|
1474
1444
|
const n = this.$route.query;
|
1475
|
-
this.page =
|
1445
|
+
this.page = t, this.limit = e, await this.$router.replace({ query: { ...n, page: t, limit: e } }), await this.getTableData();
|
1476
1446
|
},
|
1477
|
-
async filterChange({ url:
|
1447
|
+
async filterChange({ url: t, state: e }) {
|
1478
1448
|
var n;
|
1479
|
-
this.filters =
|
1449
|
+
this.filters = t !== "no-url" ? t : null, this.onFilters = (n = Object.entries(e)) == null ? void 0 : n.length, this.page = 1, await this.getTableData();
|
1480
1450
|
},
|
1481
|
-
changeActiveColumn(
|
1482
|
-
this.activeColumn =
|
1451
|
+
changeActiveColumn(t) {
|
1452
|
+
this.activeColumn = t, this.getTableData();
|
1483
1453
|
},
|
1484
|
-
pushToCard(
|
1485
|
-
var
|
1486
|
-
((
|
1454
|
+
pushToCard(t) {
|
1455
|
+
var e;
|
1456
|
+
((e = this.tableData) == null ? void 0 : e.card) === !1 || this.$router.push(`/card/${this.table}/${t}`);
|
1487
1457
|
},
|
1488
|
-
pushToLinkCard(
|
1489
|
-
|
1458
|
+
pushToLinkCard(t, e) {
|
1459
|
+
t != null && t.link && this.$router.push(`/card/${t == null ? void 0 : t.link}/${e == null ? void 0 : e[t == null ? void 0 : t.name]}`);
|
1490
1460
|
},
|
1491
|
-
changeActiveCardInfo(
|
1492
|
-
var
|
1461
|
+
changeActiveCardInfo(t) {
|
1462
|
+
var e;
|
1493
1463
|
this.isVisibleCardInfo && this.$router.push({
|
1494
1464
|
...this.$route,
|
1495
|
-
query: { ...(
|
1465
|
+
query: { ...(e = this.$route) == null ? void 0 : e.query, card: t }
|
1496
1466
|
});
|
1497
1467
|
},
|
1498
1468
|
toggleCardInfo() {
|
1499
|
-
var
|
1469
|
+
var t;
|
1500
1470
|
this.isVisibleCardInfo = !this.isVisibleCardInfo, this.isVisibleCardInfo || this.$router.push({
|
1501
1471
|
...this.$route,
|
1502
|
-
query: { ...(
|
1472
|
+
query: { ...(t = this.$route) == null ? void 0 : t.query, card: void 0 }
|
1503
1473
|
});
|
1504
1474
|
},
|
1505
|
-
getCustomStyles(
|
1475
|
+
getCustomStyles(t) {
|
1506
1476
|
return [
|
1507
|
-
|
1508
|
-
|
1509
|
-
`text-${(
|
1477
|
+
t != null && t.link ? " text-blue-800 hover:underline decoration-1" : "",
|
1478
|
+
t != null && t.align ? ` text-${(t == null ? void 0 : t.align) || "left"}` : "",
|
1479
|
+
`text-${(t == null ? void 0 : t.wrap) || "wrap"}`
|
1510
1480
|
];
|
1511
1481
|
}
|
1512
1482
|
}
|
1513
|
-
},
|
1483
|
+
}, Vn = { class: "w-[calc(100vw - 320px)] bg-gray-100" }, Pn = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl" }, Fn = { class: "text-lg font-semibold text-gray-800 dark:text-neutral-200" }, jn = { class: "bg-white w-full rounded-xl p-[20px] pr-0" }, Ln = { class: "flex" }, Mn = { class: "flex gap-[6px] ml-auto" }, zn = { class: "inline-block w-full align-middle" }, qn = { 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" }, Bn = { class: "right-0" }, On = {
|
1514
1484
|
key: 0,
|
1515
1485
|
class: "w-[70px] sticky right-0 top-0"
|
1516
|
-
},
|
1517
|
-
function
|
1518
|
-
var Z, ee, te, se, ne, le,
|
1519
|
-
const c =
|
1520
|
-
return
|
1521
|
-
|
1522
|
-
|
1523
|
-
l.isForm ? (
|
1524
|
-
(ee = (Z = s.tableData) == null ? void 0 : Z.slots) != null && ee.addButton ? (
|
1486
|
+
}, Nn = { class: "divide-y divide-gray-200 z-[1] relative text-gray-600" }, En = ["onClick"], Un = ["onClick"], Rn = ["onClick"], Hn = { class: "flex items-center justify-start w-full px-1 py-2" }, Wn = { class: "w-[200px] md:inline-flex hidden" }, Kn = { class: "text-sm text-gray-600 dark:text-neutral-400" }, Jn = { class: "font-semibold text-gray-800 dark:text-neutral-200" }, Gn = { key: 0 };
|
1487
|
+
function Qn(t, e, n, o, s, l) {
|
1488
|
+
var Z, ee, te, se, ne, le, ae, re, oe, ie, de, ue, ce, he, pe, be, fe, ge, me, xe, ye, ve, ke, _e, Ce, we, $e, Se, Te, Ae, Ie, De, Ve;
|
1489
|
+
const c = f("AdminCustomButtonAdd"), g = f("IconPlus"), p = f("router-link"), b = f("AdminTableTabs"), d = f("IconSearch"), y = f("VsText"), m = f("AdminTableCustomButtons"), h = f("AdminTableCustomFilters"), _ = f("AdminTableColumnsHidden"), C = f("AdminTableExport"), I = f("AdminTableFilters"), T = f("IconOpenCard"), F = f("AdminTableColumn"), j = f("AdminComponentIs"), z = f("AdminTableControl"), R = f("AdminTableTotalsList"), He = f("AdminNodata"), We = f("AdminTablePagination"), Ke = f("AdminTableCardInfo");
|
1490
|
+
return r(), i("div", Vn, [
|
1491
|
+
a("div", Pn, [
|
1492
|
+
a("h2", Fn, A(n.title), 1),
|
1493
|
+
l.isForm ? (r(), i($, { key: 0 }, [
|
1494
|
+
(ee = (Z = s.tableData) == null ? void 0 : Z.slots) != null && ee.addButton ? (r(), v(c, {
|
1525
1495
|
key: 0,
|
1526
1496
|
slots: (te = s.tableData) == null ? void 0 : te.slots
|
1527
|
-
}, null, 8, ["slots"])) : (
|
1497
|
+
}, null, 8, ["slots"])) : (r(), v(p, {
|
1528
1498
|
key: 1,
|
1529
|
-
to: `/add?table=${(ne = (se =
|
1530
|
-
class:
|
1499
|
+
to: `/add?table=${(ne = (se = t.$route) == null ? void 0 : se.params) == null ? void 0 : ne.catchAll}`,
|
1500
|
+
class: w(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${l.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${l.color}-800 hover:text-white`)
|
1531
1501
|
}, {
|
1532
|
-
default:
|
1533
|
-
|
1502
|
+
default: D(() => [
|
1503
|
+
x(g, {
|
1534
1504
|
height: "16",
|
1535
1505
|
width: "16"
|
1536
1506
|
}),
|
1537
|
-
|
1507
|
+
e[5] || (e[5] = P(" Додати "))
|
1538
1508
|
]),
|
1539
1509
|
_: 1
|
1540
1510
|
}, 8, ["to", "class"]))
|
1541
|
-
], 64)) :
|
1511
|
+
], 64)) : k("", !0)
|
1542
1512
|
]),
|
1543
|
-
|
1513
|
+
a("div", {
|
1544
1514
|
style: K({
|
1545
|
-
height: ((le =
|
1515
|
+
height: ((le = t.$adminSettings) == null ? void 0 : le.header) === !1 ? "calc(100vh - 100px)" : "calc(100vh - 155px)"
|
1546
1516
|
}),
|
1547
1517
|
class: "bg-gray-100 p-[20px] flex pt-[10px] lg:w-[calc(100vw-260px)] w-[100vw]"
|
1548
1518
|
}, [
|
1549
|
-
|
1550
|
-
(
|
1519
|
+
a("div", jn, [
|
1520
|
+
(re = (ae = s.tableData) == null ? void 0 : ae.filterState) != null && re.length ? (r(), v(b, {
|
1551
1521
|
key: 0,
|
1552
1522
|
tabsList: (oe = s.tableData) == null ? void 0 : oe.filterState,
|
1553
1523
|
filterState: s.filterState,
|
1554
|
-
"onUpdate:filterState":
|
1555
|
-
}, null, 8, ["tabsList", "filterState"])) :
|
1556
|
-
|
1557
|
-
|
1558
|
-
class:
|
1524
|
+
"onUpdate:filterState": e[0] || (e[0] = (u) => s.filterState = u)
|
1525
|
+
}, null, 8, ["tabsList", "filterState"])) : k("", !0),
|
1526
|
+
a("div", Ln, [
|
1527
|
+
a("div", {
|
1528
|
+
class: w([s.isVisibleCardInfo ? "w-[calc(100%-360px)]" : "w-full"])
|
1559
1529
|
}, [
|
1560
|
-
|
1561
|
-
class:
|
1530
|
+
a("div", {
|
1531
|
+
class: w(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative", { "pr-[20px]": !s.isVisibleCardInfo }])
|
1562
1532
|
}, [
|
1563
|
-
|
1533
|
+
x(d, {
|
1564
1534
|
height: "14",
|
1565
1535
|
width: "14",
|
1566
1536
|
class: "absolute top-[10px] left-[14px] text-gray-500 z-[1]"
|
1567
1537
|
}),
|
1568
|
-
|
1538
|
+
x(y, {
|
1569
1539
|
modelValue: s.searchValue,
|
1570
|
-
"onUpdate:modelValue":
|
1540
|
+
"onUpdate:modelValue": e[1] || (e[1] = (u) => s.searchValue = u),
|
1571
1541
|
placeholder: n.search || "Пошук...",
|
1572
1542
|
clearable: !0,
|
1573
1543
|
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"
|
1574
1544
|
}, null, 8, ["modelValue", "placeholder"]),
|
1575
|
-
|
1576
|
-
(ie = s.tableData) != null && ie.slots ? (
|
1545
|
+
a("div", Mn, [
|
1546
|
+
(ie = s.tableData) != null && ie.slots ? (r(), v(m, {
|
1577
1547
|
key: 0,
|
1578
1548
|
data: s.tableData,
|
1579
1549
|
slots: (de = s.tableData) == null ? void 0 : de.slots
|
1580
|
-
}, null, 8, ["data", "slots"])) :
|
1581
|
-
(ce = (ue = s.tableData) == null ? void 0 : ue.filterCustom) != null && ce.length ? (
|
1550
|
+
}, null, 8, ["data", "slots"])) : k("", !0),
|
1551
|
+
(ce = (ue = s.tableData) == null ? void 0 : ue.filterCustom) != null && ce.length ? (r(), v(h, {
|
1582
1552
|
key: 1,
|
1583
1553
|
customList: (he = s.tableData) == null ? void 0 : he.filterCustom,
|
1584
1554
|
filterCustom: s.filterCustom,
|
1585
|
-
"onUpdate:filterCustom":
|
1586
|
-
}, null, 8, ["customList", "filterCustom"])) :
|
1587
|
-
|
1555
|
+
"onUpdate:filterCustom": e[2] || (e[2] = (u) => s.filterCustom = u)
|
1556
|
+
}, null, 8, ["customList", "filterCustom"])) : k("", !0),
|
1557
|
+
x(_, {
|
1588
1558
|
columns: (pe = s.tableData) == null ? void 0 : pe.columns,
|
1589
|
-
onUpdateColumns:
|
1559
|
+
onUpdateColumns: e[3] || (e[3] = (u) => s.tableData.columns = u)
|
1590
1560
|
}, null, 8, ["columns"]),
|
1591
|
-
((be = s.tableData) == null ? void 0 : be.export) !== !1 ? (
|
1561
|
+
((be = s.tableData) == null ? void 0 : be.export) !== !1 ? (r(), v(C, {
|
1592
1562
|
key: 2,
|
1593
1563
|
table: n.table,
|
1594
1564
|
columns: (fe = s.tableData) == null ? void 0 : fe.columns,
|
@@ -1596,43 +1566,43 @@ function el(e, t, n, o, s, l) {
|
|
1596
1566
|
"filter-state": s.filterState,
|
1597
1567
|
"filter-custom": s.filterCustom,
|
1598
1568
|
filters: s.filters
|
1599
|
-
}, null, 8, ["table", "columns", "page", "filter-state", "filter-custom", "filters"])) :
|
1600
|
-
(ge = s.filterScheme) != null && ge.length ? (
|
1569
|
+
}, null, 8, ["table", "columns", "page", "filter-state", "filter-custom", "filters"])) : k("", !0),
|
1570
|
+
(ge = s.filterScheme) != null && ge.length ? (r(), v(I, {
|
1601
1571
|
key: 3,
|
1602
1572
|
scheme: s.filterScheme,
|
1603
1573
|
onFilters: s.onFilters,
|
1604
1574
|
table: n.table,
|
1605
1575
|
onFilterChange: l.filterChange
|
1606
|
-
}, null, 8, ["scheme", "onFilters", "table", "onFilterChange"])) :
|
1607
|
-
|
1608
|
-
onClick:
|
1576
|
+
}, null, 8, ["scheme", "onFilters", "table", "onFilterChange"])) : k("", !0),
|
1577
|
+
a("button", {
|
1578
|
+
onClick: e[4] || (e[4] = (...u) => l.toggleCardInfo && l.toggleCardInfo(...u)),
|
1609
1579
|
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"
|
1610
1580
|
}, [
|
1611
|
-
|
1612
|
-
class:
|
1581
|
+
x(T, {
|
1582
|
+
class: w({ "rotate-180 duration-300": !s.isVisibleCardInfo })
|
1613
1583
|
}, null, 8, ["class"])
|
1614
1584
|
])
|
1615
1585
|
])
|
1616
1586
|
], 2),
|
1617
|
-
|
1618
|
-
class:
|
1587
|
+
a("div", {
|
1588
|
+
class: w(["flex items-start justify-start w-full space-y-5", { "pr-[20px]": !s.isVisibleCardInfo }])
|
1619
1589
|
}, [
|
1620
|
-
|
1590
|
+
a("div", {
|
1621
1591
|
style: K({
|
1622
|
-
height: `calc(100vh - ${((me =
|
1592
|
+
height: `calc(100vh - ${((me = t.$adminSettings) == null ? void 0 : me.header) === !1 ? (ye = (xe = s.tableData) == null ? void 0 : xe.filterState) != null && ye.length ? 330 : 270 : (ke = (ve = s.tableData) == null ? void 0 : ve.filterState) != null && ke.length ? 380 : 320}px)`
|
1623
1593
|
}),
|
1624
1594
|
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"
|
1625
1595
|
}, [
|
1626
|
-
|
1627
|
-
l.isNoData ? (
|
1596
|
+
a("div", zn, [
|
1597
|
+
l.isNoData ? (r(), v(He, { key: 1 })) : (r(), i("table", {
|
1628
1598
|
key: 0,
|
1629
|
-
class:
|
1599
|
+
class: w([l.fontSize, "relative min-w-full my-2 divide-y divide-gray-200 table-fixed w-max dark:divide-neutral-700"])
|
1630
1600
|
}, [
|
1631
|
-
|
1632
|
-
|
1633
|
-
(
|
1601
|
+
a("thead", qn, [
|
1602
|
+
a("tr", Bn, [
|
1603
|
+
(r(!0), i($, null, V(l.columns, (u) => {
|
1634
1604
|
var q, B;
|
1635
|
-
return
|
1605
|
+
return r(), v(F, {
|
1636
1606
|
key: u.name,
|
1637
1607
|
style: K({
|
1638
1608
|
width: ((B = (q = s.columnsWidth) == null ? void 0 : q[u == null ? void 0 : u.name]) == null ? void 0 : B.width) || l.rowWidth(u == null ? void 0 : u.name),
|
@@ -1641,86 +1611,86 @@ function el(e, t, n, o, s, l) {
|
|
1641
1611
|
}),
|
1642
1612
|
data: u,
|
1643
1613
|
activeColumn: s.activeColumn,
|
1644
|
-
onUpdateRef: (
|
1614
|
+
onUpdateRef: (H) => {
|
1645
1615
|
var O, N;
|
1646
|
-
(N = (O = s.columnsWidth) == null ? void 0 : O[u == null ? void 0 : u.name]) != null && N.ref || (s.columnsWidth[u.name] = { ref:
|
1616
|
+
(N = (O = s.columnsWidth) == null ? void 0 : O[u == null ? void 0 : u.name]) != null && N.ref || (s.columnsWidth[u.name] = { ref: H });
|
1647
1617
|
},
|
1648
1618
|
onChangeActive: l.changeActiveColumn
|
1649
1619
|
}, null, 8, ["style", "data", "activeColumn", "onUpdateRef", "onChangeActive"]);
|
1650
1620
|
}), 128)),
|
1651
1621
|
(Ce = (_e = l.getActions) == null ? void 0 : _e.filter(
|
1652
1622
|
(u) => u !== "add" && u !== "view"
|
1653
|
-
)) != null && Ce.length ? (
|
1623
|
+
)) != null && Ce.length ? (r(), i("th", On)) : k("", !0)
|
1654
1624
|
])
|
1655
1625
|
]),
|
1656
|
-
|
1657
|
-
(
|
1658
|
-
var B,
|
1659
|
-
return
|
1626
|
+
a("tbody", Nn, [
|
1627
|
+
(r(!0), i($, null, V((we = s.tableData) == null ? void 0 : we.rows, (u, q) => {
|
1628
|
+
var B, H, O, N, Pe, Fe, je, Le, Me, ze, qe, Be, Oe, Ne;
|
1629
|
+
return r(), i("tr", {
|
1660
1630
|
key: (u == null ? void 0 : u.id) || q,
|
1661
|
-
class:
|
1662
|
-
"bg-gray-100": ((
|
1663
|
-
"odd:bg-gray-50": ((N = (O =
|
1631
|
+
class: w({
|
1632
|
+
"bg-gray-100": ((H = (B = t.$route) == null ? void 0 : B.query) == null ? void 0 : H.card) === (u == null ? void 0 : u.id),
|
1633
|
+
"odd:bg-gray-50": ((N = (O = t.$route) == null ? void 0 : O.query) == null ? void 0 : N.card) !== (u == null ? void 0 : u.id)
|
1664
1634
|
})
|
1665
1635
|
}, [
|
1666
|
-
|
1667
|
-
class:
|
1636
|
+
a("td", {
|
1637
|
+
class: w(["px-1 py-2.5 pr-5", [
|
1668
1638
|
(Pe = l.columns[0]) != null && Pe.align ? `text-${((Fe = l.columns[0]) == null ? void 0 : Fe.align) || "left"}` : ""
|
1669
1639
|
]]),
|
1670
1640
|
onClick: (L) => l.changeActiveCardInfo(u == null ? void 0 : u.id)
|
1671
1641
|
}, [
|
1672
|
-
|
1642
|
+
a("button", {
|
1673
1643
|
onClick: (L) => {
|
1674
1644
|
l.pushToCard(u == null ? void 0 : u.id), l.pushToLinkCard(l.columns[0], u);
|
1675
1645
|
},
|
1676
|
-
class:
|
1646
|
+
class: w(["font-medium text-start", [
|
1677
1647
|
...l.getCustomStyles(l.columns[0]),
|
1678
1648
|
((je = this.tableData) == null ? void 0 : je.card) === !1 ? "" : ` text-${l.color}-800 decoration-2 focus:outline-none focus:underline hover:text-${l.color}-700 hover:underline`
|
1679
1649
|
]])
|
1680
1650
|
}, [
|
1681
|
-
|
1651
|
+
x(j, {
|
1682
1652
|
row: u,
|
1683
1653
|
column: l.columns[0],
|
1684
1654
|
table: n.table,
|
1685
1655
|
onUpdateTable: l.getTableData
|
1686
1656
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1687
|
-
], 10,
|
1688
|
-
], 10,
|
1689
|
-
(
|
1690
|
-
onClick: (
|
1657
|
+
], 10, Un)
|
1658
|
+
], 10, En),
|
1659
|
+
(r(!0), i($, null, V((Le = l.columns) == null ? void 0 : Le.slice(1), (L) => (r(), i("td", {
|
1660
|
+
onClick: (tl) => {
|
1691
1661
|
l.changeActiveCardInfo(u == null ? void 0 : u.id), l.pushToLinkCard(L, u);
|
1692
1662
|
},
|
1693
|
-
class:
|
1663
|
+
class: w(["px-1 py-2.5 pr-5", l.getCustomStyles(L)]),
|
1694
1664
|
key: L.name
|
1695
1665
|
}, [
|
1696
|
-
|
1666
|
+
x(j, {
|
1697
1667
|
row: u,
|
1698
1668
|
column: L,
|
1699
1669
|
table: n.table,
|
1700
1670
|
onUpdateTable: l.getTableData
|
1701
1671
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1702
|
-
], 10,
|
1672
|
+
], 10, Rn))), 128)),
|
1703
1673
|
(ze = (Me = l.getActions) == null ? void 0 : Me.filter(
|
1704
1674
|
(L) => L !== "add" && L !== "view"
|
1705
|
-
)) != null && ze.length ? (
|
1675
|
+
)) != null && ze.length ? (r(), i("td", {
|
1706
1676
|
key: 0,
|
1707
|
-
class:
|
1708
|
-
"bg-gray-50": ((Be = (qe =
|
1709
|
-
"bg-white": ((Ne = (Oe =
|
1677
|
+
class: w(["text-center sticky right-0 w-[80px] px-[10px]", {
|
1678
|
+
"bg-gray-50": ((Be = (qe = t.$route) == null ? void 0 : qe.query) == null ? void 0 : Be.card) === (u == null ? void 0 : u.id) || !(q % 2),
|
1679
|
+
"bg-white": ((Ne = (Oe = t.$route) == null ? void 0 : Oe.query) == null ? void 0 : Ne.card) !== (u == null ? void 0 : u.id) && q % 2
|
1710
1680
|
}])
|
1711
1681
|
}, [
|
1712
|
-
|
1682
|
+
x(z, {
|
1713
1683
|
actions: l.getActions,
|
1714
1684
|
isForm: l.isForm,
|
1715
1685
|
item: u,
|
1716
1686
|
table: n.table,
|
1717
1687
|
onUpdateTable: l.getTableData
|
1718
1688
|
}, null, 8, ["actions", "isForm", "item", "table", "onUpdateTable"])
|
1719
|
-
], 2)) :
|
1689
|
+
], 2)) : k("", !0)
|
1720
1690
|
], 2);
|
1721
1691
|
}), 128))
|
1722
1692
|
]),
|
1723
|
-
|
1693
|
+
x(R, {
|
1724
1694
|
columns: l.columns,
|
1725
1695
|
agg: ($e = s.tableData) == null ? void 0 : $e.agg
|
1726
1696
|
}, null, 8, ["columns", "agg"])
|
@@ -1728,18 +1698,18 @@ function el(e, t, n, o, s, l) {
|
|
1728
1698
|
])
|
1729
1699
|
], 4)
|
1730
1700
|
], 2),
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1701
|
+
a("div", Hn, [
|
1702
|
+
a("div", Wn, [
|
1703
|
+
a("p", Kn, [
|
1704
|
+
a("span", Jn, [
|
1705
|
+
P(" Об'єктів: " + A(Intl.NumberFormat("ua").format(
|
1736
1706
|
s.limit < ((Se = s.tableData) == null ? void 0 : Se.filtered) ? s.limit : (Te = s.tableData) == null ? void 0 : Te.filtered
|
1737
1707
|
)) + " ", 1),
|
1738
|
-
s.limit < ((Ae = s.tableData) == null ? void 0 : Ae.filtered) ? (
|
1708
|
+
s.limit < ((Ae = s.tableData) == null ? void 0 : Ae.filtered) ? (r(), i("span", Gn, " з " + A(Intl.NumberFormat("ua").format(((Ie = s.tableData) == null ? void 0 : Ie.filtered) || 0)), 1)) : k("", !0)
|
1739
1709
|
])
|
1740
1710
|
])
|
1741
1711
|
]),
|
1742
|
-
Math.ceil((De = s.tableData) == null ? void 0 : De.filtered) > 10 ? (
|
1712
|
+
Math.ceil((De = s.tableData) == null ? void 0 : De.filtered) > 10 ? (r(), v(We, {
|
1743
1713
|
key: 0,
|
1744
1714
|
class: "justify-end mr-10",
|
1745
1715
|
"default-page": parseInt(l.defaultPage),
|
@@ -1747,19 +1717,19 @@ function el(e, t, n, o, s, l) {
|
|
1747
1717
|
onPageChange: l.handlePageChange,
|
1748
1718
|
pageSize: parseInt(s.limit),
|
1749
1719
|
pageSizes: [10, 20, 50, 100]
|
1750
|
-
}, null, 8, ["default-page", "total", "onPageChange", "pageSize"])) :
|
1720
|
+
}, null, 8, ["default-page", "total", "onPageChange", "pageSize"])) : k("", !0)
|
1751
1721
|
])
|
1752
1722
|
], 2),
|
1753
|
-
|
1754
|
-
default:
|
1723
|
+
x(W, { name: "slide-fade" }, {
|
1724
|
+
default: D(() => {
|
1755
1725
|
var u;
|
1756
1726
|
return [
|
1757
|
-
s.isVisibleCardInfo ? (
|
1727
|
+
s.isVisibleCardInfo ? (r(), v(Ke, {
|
1758
1728
|
key: 0,
|
1759
1729
|
table: n.table,
|
1760
1730
|
columns: (u = s.tableData) == null ? void 0 : u.columns,
|
1761
1731
|
row: l.activeCardRow
|
1762
|
-
}, null, 8, ["table", "columns", "row"])) :
|
1732
|
+
}, null, 8, ["table", "columns", "row"])) : k("", !0)
|
1763
1733
|
];
|
1764
1734
|
}),
|
1765
1735
|
_: 1
|
@@ -1769,8 +1739,8 @@ function el(e, t, n, o, s, l) {
|
|
1769
1739
|
], 4)
|
1770
1740
|
]);
|
1771
1741
|
}
|
1772
|
-
const
|
1773
|
-
components: { AdminTable:
|
1742
|
+
const Xn = /* @__PURE__ */ S(Dn, [["render", Qn], ["__scopeId", "data-v-7f8054cc"]]), Yn = {
|
1743
|
+
components: { AdminTable: Xn },
|
1774
1744
|
data() {
|
1775
1745
|
return {
|
1776
1746
|
table: !1,
|
@@ -1781,43 +1751,43 @@ const tl = /* @__PURE__ */ C(jn, [["render", el], ["__scopeId", "data-v-8574d37a
|
|
1781
1751
|
watch: {
|
1782
1752
|
$route: {
|
1783
1753
|
async handler() {
|
1784
|
-
var
|
1785
|
-
(
|
1754
|
+
var t;
|
1755
|
+
(t = Ee) != null && t.value || await this.getMenu(), await this.checkPageType();
|
1786
1756
|
},
|
1787
1757
|
deep: !0
|
1788
1758
|
},
|
1789
|
-
title(
|
1790
|
-
var
|
1791
|
-
|
1759
|
+
title(t) {
|
1760
|
+
var e;
|
1761
|
+
t && (document.title = (((e = E.value) == null ? void 0 : e.titlePrefix) || "") + t);
|
1792
1762
|
}
|
1793
1763
|
},
|
1794
1764
|
async mounted() {
|
1795
1765
|
await this.checkPageType();
|
1796
1766
|
},
|
1797
1767
|
methods: {
|
1798
|
-
flattenMenu(
|
1799
|
-
const
|
1800
|
-
return
|
1801
|
-
n.menu ?
|
1802
|
-
}),
|
1768
|
+
flattenMenu(t) {
|
1769
|
+
const e = [];
|
1770
|
+
return t.forEach((n) => {
|
1771
|
+
n.menu ? e.push(...this.flattenMenu(n.menu)) : e.push(n);
|
1772
|
+
}), e;
|
1803
1773
|
},
|
1804
1774
|
async checkPageType() {
|
1805
1775
|
var o, s;
|
1806
|
-
const
|
1807
|
-
|
1808
|
-
const
|
1776
|
+
const t = this.flattenMenu(Ee.value);
|
1777
|
+
t != null && t.length || this.$router.replace("/404");
|
1778
|
+
const e = t == null ? void 0 : t.find((l) => {
|
1809
1779
|
var c, g;
|
1810
1780
|
return (l == null ? void 0 : l.path) == ((g = (c = this.$route) == null ? void 0 : c.params) == null ? void 0 : g.catchAll);
|
1811
1781
|
});
|
1812
|
-
this.title =
|
1813
|
-
const n =
|
1814
|
-
this.table = n || !1, this.search = (
|
1782
|
+
this.title = e == null ? void 0 : e.ua, e || this.$router.replace("/404"), e != null && e.component && this.$router.replace((s = (o = this.$route) == null ? void 0 : o.params) == null ? void 0 : s.catchAll);
|
1783
|
+
const n = e == null ? void 0 : e.table;
|
1784
|
+
this.table = n || !1, this.search = (e == null ? void 0 : e.search) || "", !n && this.getInterface();
|
1815
1785
|
},
|
1816
1786
|
async getInterface() {
|
1817
|
-
var
|
1787
|
+
var t, e;
|
1818
1788
|
try {
|
1819
|
-
const { data: n } = await
|
1820
|
-
`/api/template/interface/${((
|
1789
|
+
const { data: n } = await M.get(
|
1790
|
+
`/api/template/interface/${((e = (t = this.$route) == null ? void 0 : t.params) == null ? void 0 : e.catchAll) || ""}`
|
1821
1791
|
);
|
1822
1792
|
this.interface = n || "";
|
1823
1793
|
} catch {
|
@@ -1825,22 +1795,22 @@ const tl = /* @__PURE__ */ C(jn, [["render", el], ["__scopeId", "data-v-8574d37a
|
|
1825
1795
|
}
|
1826
1796
|
}
|
1827
1797
|
}
|
1828
|
-
},
|
1829
|
-
function
|
1830
|
-
const c =
|
1831
|
-
return s.table ? (
|
1798
|
+
}, Zn = ["innerHTML"];
|
1799
|
+
function el(t, e, n, o, s, l) {
|
1800
|
+
const c = f("AdminTable");
|
1801
|
+
return s.table ? (r(), v(c, {
|
1832
1802
|
key: 0,
|
1833
1803
|
table: s.table,
|
1834
|
-
title:
|
1804
|
+
title: t.title,
|
1835
1805
|
search: s.search
|
1836
|
-
}, null, 8, ["table", "title", "search"])) : (
|
1806
|
+
}, null, 8, ["table", "title", "search"])) : (r(), i("div", {
|
1837
1807
|
key: 1,
|
1838
1808
|
class: "w-full bg-gray-50",
|
1839
1809
|
style: { height: "calc(100vh - 120px)" },
|
1840
1810
|
innerHTML: s.interface
|
1841
|
-
}, null, 8,
|
1811
|
+
}, null, 8, Zn));
|
1842
1812
|
}
|
1843
|
-
const
|
1813
|
+
const ll = /* @__PURE__ */ S(Yn, [["render", el]]);
|
1844
1814
|
export {
|
1845
|
-
|
1815
|
+
ll as default
|
1846
1816
|
};
|