@opengis/admin 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IconSearch-BFXUWqxN.js +26 -0
- package/dist/{add-page-vX4ne6CO.js → add-page-QXFDP0nU.js} +2 -2
- package/dist/{admin-interface-CLoG7ut3.js → admin-interface-1RkLvsRa.js} +220 -207
- package/dist/{admin-view-_gUXThTm.js → admin-view-CPrnjZDu.js} +81 -97
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +25 -25
- package/dist/{card-page-B98zZW37.js → card-page-BX2dmCcY.js} +1 -1
- package/dist/{card-view-UPTWBqwM.js → card-view-CnB3fm_K.js} +1 -1
- package/dist/{edit-page-D5iMrlzA.js → edit-page-BolMZCpj.js} +1 -1
- package/dist/{import-file-B37H73ct.js → import-file-Cmff8ZAR.js} +804 -810
- package/module/settings/card/admin.roles.table/access.hbs +5 -3
- package/module/settings/card/admin.roles.table/index.yml +1 -1
- package/module/settings/card/admin.roles.table/users.hbs +4 -7
- package/module/settings/card/admin.routes.table/users.hbs +10 -4
- package/module/settings/table/admin.routes.table.json +8 -6
- package/package.json +2 -2
- package/server/routes/data/controllers/tableFilter.js +2 -1
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as m, a as w } from "./import-file-Cmff8ZAR.js";
|
|
2
2
|
import { u as E } from "./userMenu-CT1xO2Pt.js";
|
|
3
|
-
import { openBlock as
|
|
4
|
-
|
|
3
|
+
import { openBlock as o, createElementBlock as i, createStaticVNode as M, createTextVNode as $, toDisplayString as S, createCommentVNode as v, createElementVNode as l, Fragment as x, resolveComponent as u, createVNode as h, withCtx as y, createBlock as _, withModifiers as Q, renderList as C, withDirectives as Z, vModelCheckbox as X, resolveDynamicComponent as W, Transition as Y, vShow as ee } from "vue";
|
|
4
|
+
import { I as te } from "./IconSearch-BFXUWqxN.js";
|
|
5
|
+
const re = {}, le = {
|
|
6
|
+
class: "h21yx vs0hq",
|
|
5
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: "24",
|
|
9
|
+
height: "24",
|
|
6
10
|
viewBox: "0 0 24 24",
|
|
7
11
|
fill: "none",
|
|
8
12
|
stroke: "currentColor",
|
|
9
13
|
"stroke-width": "2",
|
|
10
14
|
"stroke-linecap": "round",
|
|
11
|
-
"stroke-linejoin": "round"
|
|
12
|
-
class: "icon icon-tabler icons-tabler-outline icon-tabler-adjustments-horizontal"
|
|
15
|
+
"stroke-linejoin": "round"
|
|
13
16
|
};
|
|
14
|
-
function
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
+
function ne(t, e, r, a, n, s) {
|
|
18
|
+
return o(), i("svg", le, e[0] || (e[0] = [
|
|
19
|
+
M('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>', 9)
|
|
17
20
|
]));
|
|
18
21
|
}
|
|
19
|
-
const
|
|
22
|
+
const se = /* @__PURE__ */ m(re, [["render", ne]]), oe = {
|
|
20
23
|
data() {
|
|
21
24
|
return {
|
|
22
25
|
currentSort: ""
|
|
@@ -62,10 +65,10 @@ const le = /* @__PURE__ */ b(ee, [["render", re]]), ne = {
|
|
|
62
65
|
},
|
|
63
66
|
handleClickSortBtn(t) {
|
|
64
67
|
this.$emit("change-active", this.data.name), this.currentSort = this.changeCurrentSort(t);
|
|
65
|
-
const e = this.$route.query, { sort: r, ...
|
|
68
|
+
const e = this.$route.query, { sort: r, ...a } = e, n = this.currentSort ? `${this.data.name}-${this.currentSort}` : "";
|
|
66
69
|
this.$router.replace({
|
|
67
70
|
query: {
|
|
68
|
-
...
|
|
71
|
+
...a,
|
|
69
72
|
...n && { sort: n }
|
|
70
73
|
}
|
|
71
74
|
});
|
|
@@ -74,10 +77,10 @@ const le = /* @__PURE__ */ b(ee, [["render", re]]), ne = {
|
|
|
74
77
|
return `${this.data.name}-${t}` === this.selectedSortParam;
|
|
75
78
|
}
|
|
76
79
|
}
|
|
77
|
-
},
|
|
80
|
+
}, ae = {
|
|
78
81
|
scope: "col",
|
|
79
82
|
class: "min-w-[200px] max-w-[300px] text-start"
|
|
80
|
-
},
|
|
83
|
+
}, ie = {
|
|
81
84
|
class: "flex-shrink-0 size-3.5",
|
|
82
85
|
xmlns: "http://www.w3.org/2000/svg",
|
|
83
86
|
width: "24",
|
|
@@ -88,33 +91,33 @@ const le = /* @__PURE__ */ b(ee, [["render", re]]), ne = {
|
|
|
88
91
|
"stroke-width": "2",
|
|
89
92
|
"stroke-linecap": "round",
|
|
90
93
|
"stroke-linejoin": "round"
|
|
91
|
-
},
|
|
94
|
+
}, ue = {
|
|
92
95
|
key: 0,
|
|
93
96
|
d: "m7 15 5 5 5-5"
|
|
94
|
-
},
|
|
97
|
+
}, ce = {
|
|
95
98
|
key: 1,
|
|
96
99
|
d: "m7 9 5-5 5 5"
|
|
97
|
-
},
|
|
100
|
+
}, de = {
|
|
98
101
|
key: 1,
|
|
99
102
|
class: "text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500"
|
|
100
103
|
};
|
|
101
|
-
function
|
|
102
|
-
return
|
|
103
|
-
s.getVisibleIcon ? (
|
|
104
|
+
function he(t, e, r, a, n, s) {
|
|
105
|
+
return o(), i("th", ae, [
|
|
106
|
+
s.getVisibleIcon ? (o(), i("button", {
|
|
104
107
|
key: 0,
|
|
105
108
|
type: "button",
|
|
106
109
|
class: "text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",
|
|
107
|
-
onClick: e[0] || (e[0] = (
|
|
110
|
+
onClick: e[0] || (e[0] = (b) => s.handleClickSortBtn(n.currentSort))
|
|
108
111
|
}, [
|
|
109
|
-
$(
|
|
110
|
-
(
|
|
111
|
-
n.currentSort === "asc" || n.currentSort === "" ? (
|
|
112
|
-
n.currentSort === "desc" || n.currentSort === "" ? (
|
|
112
|
+
$(S(s.label) + " ", 1),
|
|
113
|
+
(o(), i("svg", ie, [
|
|
114
|
+
n.currentSort === "asc" || n.currentSort === "" ? (o(), i("path", ue)) : v("", !0),
|
|
115
|
+
n.currentSort === "desc" || n.currentSort === "" ? (o(), i("path", ce)) : v("", !0)
|
|
113
116
|
]))
|
|
114
|
-
])) : (
|
|
117
|
+
])) : (o(), i("p", de, S(s.label), 1))
|
|
115
118
|
]);
|
|
116
119
|
}
|
|
117
|
-
const
|
|
120
|
+
const pe = /* @__PURE__ */ m(oe, [["render", he]]), me = {}, be = {
|
|
118
121
|
xmlns: "http://www.w3.org/2000/svg",
|
|
119
122
|
viewBox: "0 0 24 24",
|
|
120
123
|
fill: "none",
|
|
@@ -124,8 +127,8 @@ const de = /* @__PURE__ */ b(ne, [["render", ce]]), he = {}, pe = {
|
|
|
124
127
|
"stroke-linejoin": "round",
|
|
125
128
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-dots-vertical"
|
|
126
129
|
};
|
|
127
|
-
function
|
|
128
|
-
return
|
|
130
|
+
function fe(t, e, r, a, n, s) {
|
|
131
|
+
return o(), i("svg", be, e[0] || (e[0] = [
|
|
129
132
|
l("path", {
|
|
130
133
|
stroke: "none",
|
|
131
134
|
d: "M0 0h24v24H0z",
|
|
@@ -136,7 +139,7 @@ function be(t, e, r, o, n, s) {
|
|
|
136
139
|
l("path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
|
|
137
140
|
]));
|
|
138
141
|
}
|
|
139
|
-
const
|
|
142
|
+
const ge = /* @__PURE__ */ m(me, [["render", fe]]), xe = {}, ye = {
|
|
140
143
|
class: "flex-shrink-0 size-3.5",
|
|
141
144
|
xmlns: "http://www.w3.org/2000/svg",
|
|
142
145
|
viewBox: "0 0 24 24",
|
|
@@ -146,21 +149,21 @@ const me = /* @__PURE__ */ b(he, [["render", be]]), fe = {}, ge = {
|
|
|
146
149
|
"stroke-linecap": "round",
|
|
147
150
|
"stroke-linejoin": "round"
|
|
148
151
|
};
|
|
149
|
-
function
|
|
150
|
-
return
|
|
151
|
-
|
|
152
|
+
function ke(t, e, r, a, n, s) {
|
|
153
|
+
return o(), i("svg", ye, e[0] || (e[0] = [
|
|
154
|
+
M('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>', 5)
|
|
152
155
|
]));
|
|
153
156
|
}
|
|
154
|
-
const
|
|
157
|
+
const _e = /* @__PURE__ */ m(xe, [["render", ke]]), we = {
|
|
155
158
|
props: {
|
|
156
159
|
height: { type: String, default: "16" },
|
|
157
160
|
width: { type: String, default: "12" },
|
|
158
161
|
color: { type: String, default: "black" }
|
|
159
162
|
}
|
|
160
|
-
},
|
|
161
|
-
function
|
|
162
|
-
return
|
|
163
|
-
(
|
|
163
|
+
}, ve = { style: { display: "none" } }, Ce = ["height", "width", "fill"];
|
|
164
|
+
function $e(t, e, r, a, n, s) {
|
|
165
|
+
return o(), i(x, null, [
|
|
166
|
+
(o(), i("svg", ve, e[0] || (e[0] = [
|
|
164
167
|
l("symbol", {
|
|
165
168
|
id: "icon-pencil",
|
|
166
169
|
viewBox: "0 0 32 32"
|
|
@@ -168,20 +171,20 @@ function ve(t, e, r, o, n, s) {
|
|
|
168
171
|
l("path", { d: "M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z" })
|
|
169
172
|
], -1)
|
|
170
173
|
]))),
|
|
171
|
-
(
|
|
174
|
+
(o(), i("svg", {
|
|
172
175
|
height: r.height,
|
|
173
176
|
width: r.width,
|
|
174
177
|
fill: r.color
|
|
175
178
|
}, e[1] || (e[1] = [
|
|
176
179
|
l("use", { "xlink:href": "#icon-pencil" }, null, -1)
|
|
177
|
-
]), 8,
|
|
180
|
+
]), 8, Ce))
|
|
178
181
|
], 64);
|
|
179
182
|
}
|
|
180
|
-
const
|
|
183
|
+
const Se = /* @__PURE__ */ m(we, [["render", $e]]), Fe = {
|
|
181
184
|
components: {
|
|
182
|
-
IconMore:
|
|
183
|
-
IconDelete:
|
|
184
|
-
IconEdit:
|
|
185
|
+
IconMore: ge,
|
|
186
|
+
IconDelete: _e,
|
|
187
|
+
IconEdit: Se
|
|
185
188
|
},
|
|
186
189
|
emits: ["updateTable"],
|
|
187
190
|
props: { item: Object, table: String, isForm: null },
|
|
@@ -229,44 +232,44 @@ const Ce = /* @__PURE__ */ b(ke, [["render", ve]]), $e = {
|
|
|
229
232
|
}
|
|
230
233
|
}
|
|
231
234
|
}
|
|
232
|
-
},
|
|
235
|
+
}, Te = { class: "hs-dropdown [--placement:bottom-right] inline-flex" }, Ve = { class: "gap-x-2 p-[4px] rounded-lg shadow-sm hover:border-transparent border focus:outline-none text-black hover:bg-gray-50" }, Ae = { class: "flex flex-col items-start" }, De = {
|
|
233
236
|
key: 1,
|
|
234
237
|
class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
|
|
235
|
-
},
|
|
236
|
-
function
|
|
237
|
-
const
|
|
238
|
-
return
|
|
239
|
-
l("div",
|
|
240
|
-
h(
|
|
238
|
+
}, Me = { class: "p-4" }, Ie = { class: "mt-4 flex justify-end gap-x-3" };
|
|
239
|
+
function Be(t, e, r, a, n, s) {
|
|
240
|
+
const b = u("IconMore"), c = u("IconEdit"), f = u("router-link"), g = u("IconDelete"), F = u("VsPopover"), I = u("VsDialog");
|
|
241
|
+
return o(), i(x, null, [
|
|
242
|
+
l("div", Te, [
|
|
243
|
+
h(F, {
|
|
241
244
|
trigger: "click",
|
|
242
245
|
placement: "bottom-left"
|
|
243
246
|
}, {
|
|
244
247
|
reference: y(() => [
|
|
245
|
-
l("button",
|
|
246
|
-
h(
|
|
248
|
+
l("button", Ve, [
|
|
249
|
+
h(b, {
|
|
247
250
|
height: "16",
|
|
248
251
|
width: "16"
|
|
249
252
|
})
|
|
250
253
|
])
|
|
251
254
|
]),
|
|
252
255
|
default: y(() => {
|
|
253
|
-
var k,
|
|
256
|
+
var k, V, A;
|
|
254
257
|
return [
|
|
255
|
-
l("div",
|
|
256
|
-
r.isForm ? (
|
|
258
|
+
l("div", Ae, [
|
|
259
|
+
r.isForm ? (o(), _(f, {
|
|
257
260
|
key: 0,
|
|
258
|
-
to: `/edit?table=${(
|
|
261
|
+
to: `/edit?table=${(V = (k = t.$route) == null ? void 0 : k.params) == null ? void 0 : V.catchAll}&id=${(A = r.item) == null ? void 0 : A.id}`,
|
|
259
262
|
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"
|
|
260
263
|
}, {
|
|
261
264
|
default: y(() => [
|
|
262
|
-
h(
|
|
265
|
+
h(c, { color: "#000" }),
|
|
263
266
|
e[4] || (e[4] = $(" Редагувати "))
|
|
264
267
|
]),
|
|
265
268
|
_: 1
|
|
266
269
|
}, 8, ["to"])) : v("", !0),
|
|
267
|
-
r.isForm ? (
|
|
270
|
+
r.isForm ? (o(), i("div", De)) : v("", !0),
|
|
268
271
|
l("button", {
|
|
269
|
-
onClick: e[0] || (e[0] =
|
|
272
|
+
onClick: e[0] || (e[0] = Q((...B) => s.openConfirm && s.openConfirm(...B), ["stop"])),
|
|
270
273
|
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"
|
|
271
274
|
}, [
|
|
272
275
|
h(g),
|
|
@@ -284,9 +287,9 @@ function De(t, e, r, o, n, s) {
|
|
|
284
287
|
title: "Ви впевнені?"
|
|
285
288
|
}, {
|
|
286
289
|
default: y(() => [
|
|
287
|
-
l("div",
|
|
290
|
+
l("div", Me, [
|
|
288
291
|
e[6] || (e[6] = l("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
|
289
|
-
l("div",
|
|
292
|
+
l("div", Ie, [
|
|
290
293
|
l("button", {
|
|
291
294
|
type: "button",
|
|
292
295
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
|
@@ -304,7 +307,7 @@ function De(t, e, r, o, n, s) {
|
|
|
304
307
|
}, 8, ["visible"])
|
|
305
308
|
], 64);
|
|
306
309
|
}
|
|
307
|
-
const
|
|
310
|
+
const Ee = /* @__PURE__ */ m(Fe, [["render", Be]]), je = {}, Pe = {
|
|
308
311
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
|
309
312
|
xmlns: "http://www.w3.org/2000/svg",
|
|
310
313
|
viewBox: "0 0 24 24",
|
|
@@ -314,15 +317,15 @@ const Ie = /* @__PURE__ */ b($e, [["render", De]]), Be = {}, Ee = {
|
|
|
314
317
|
"stroke-linecap": "round",
|
|
315
318
|
"stroke-linejoin": "round"
|
|
316
319
|
};
|
|
317
|
-
function
|
|
318
|
-
return
|
|
320
|
+
function ze(t, e, r, a, n, s) {
|
|
321
|
+
return o(), i("svg", Pe, e[0] || (e[0] = [
|
|
319
322
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
320
323
|
l("path", { d: "M7 20V4" }, null, -1),
|
|
321
324
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
|
322
325
|
l("path", { d: "M17 4v16" }, null, -1)
|
|
323
326
|
]));
|
|
324
327
|
}
|
|
325
|
-
const
|
|
328
|
+
const Le = /* @__PURE__ */ m(je, [["render", ze]]), Ue = {
|
|
326
329
|
props: {
|
|
327
330
|
columns: { type: Object, default: () => {
|
|
328
331
|
} },
|
|
@@ -347,11 +350,11 @@ const Pe = /* @__PURE__ */ b(Be, [["render", je]]), ze = {
|
|
|
347
350
|
responseType: "blob"
|
|
348
351
|
}), e = new Blob([t.data], {
|
|
349
352
|
type: "application/octet-stream"
|
|
350
|
-
}), r = window.URL.createObjectURL(e),
|
|
351
|
-
|
|
353
|
+
}), r = window.URL.createObjectURL(e), a = document.createElement("a");
|
|
354
|
+
a.href = r, a.setAttribute(
|
|
352
355
|
"download",
|
|
353
356
|
`${this.table.split(".")[0]}.${this.format}`
|
|
354
|
-
), document.body.appendChild(
|
|
357
|
+
), document.body.appendChild(a), a.click(), document.body.removeChild(a), window.URL.revokeObjectURL(r), this.$notify({
|
|
355
358
|
type: "success",
|
|
356
359
|
title: "Експорт",
|
|
357
360
|
message: "Файл успішно експортовано!"
|
|
@@ -368,34 +371,34 @@ const Pe = /* @__PURE__ */ b(Be, [["render", je]]), ze = {
|
|
|
368
371
|
this.format = t;
|
|
369
372
|
}
|
|
370
373
|
}
|
|
371
|
-
},
|
|
372
|
-
function
|
|
373
|
-
const
|
|
374
|
-
return
|
|
374
|
+
}, qe = { class: "p-4" }, Oe = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, He = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, Ne = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, Re = { class: "mt-2 space-y-2" }, Ge = ["id", "onChange"], We = ["for"], Ze = { class: "pb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, Je = { class: "text-center" };
|
|
375
|
+
function Ke(t, e, r, a, n, s) {
|
|
376
|
+
const b = u("VsCheckbox");
|
|
377
|
+
return o(), i(x, null, [
|
|
375
378
|
e[4] || (e[4] = l("div", { class: "dark:border-neutral-700" }, null, -1)),
|
|
376
|
-
l("div",
|
|
377
|
-
l("div",
|
|
379
|
+
l("div", qe, [
|
|
380
|
+
l("div", Oe, [
|
|
378
381
|
e[2] || (e[2] = l("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
|
379
|
-
l("div",
|
|
380
|
-
(
|
|
382
|
+
l("div", He, [
|
|
383
|
+
(o(!0), i(x, null, C(r.columns, (c, f) => (o(), i("div", {
|
|
381
384
|
class: "flex items-center",
|
|
382
385
|
key: f,
|
|
383
386
|
style: { width: "calc((100% - 10px) / 2)" }
|
|
384
387
|
}, [
|
|
385
|
-
h(
|
|
388
|
+
h(b, {
|
|
386
389
|
class: "py-0 shrink-0 border-gray-300 rounded text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",
|
|
387
390
|
modelValue: n.cols,
|
|
388
391
|
"onUpdate:modelValue": e[0] || (e[0] = (g) => n.cols = g),
|
|
389
|
-
value:
|
|
390
|
-
label:
|
|
392
|
+
value: c == null ? void 0 : c.name,
|
|
393
|
+
label: c == null ? void 0 : c.ua
|
|
391
394
|
}, null, 8, ["modelValue", "value", "label"])
|
|
392
395
|
]))), 128))
|
|
393
396
|
])
|
|
394
397
|
]),
|
|
395
|
-
l("div",
|
|
398
|
+
l("div", Ne, [
|
|
396
399
|
e[3] || (e[3] = l("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть формат таблиці: ", -1)),
|
|
397
|
-
l("div",
|
|
398
|
-
(
|
|
400
|
+
l("div", Re, [
|
|
401
|
+
(o(!0), i(x, null, C(n.tableFormats, (c, f) => (o(), i("div", {
|
|
399
402
|
class: "flex items-center",
|
|
400
403
|
key: f
|
|
401
404
|
}, [
|
|
@@ -403,30 +406,30 @@ function Ze(t, e, r, o, n, s) {
|
|
|
403
406
|
type: "radio",
|
|
404
407
|
name: "hs-pro-duecmfm",
|
|
405
408
|
class: "shrink-0 border-gray-300 rounded-full text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",
|
|
406
|
-
id:
|
|
407
|
-
onChange: (g) => s.selectFormat(
|
|
408
|
-
}, null, 40,
|
|
409
|
+
id: c,
|
|
410
|
+
onChange: (g) => s.selectFormat(c)
|
|
411
|
+
}, null, 40, Ge),
|
|
409
412
|
l("label", {
|
|
410
|
-
for:
|
|
413
|
+
for: c,
|
|
411
414
|
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
|
412
|
-
}, " Формат " +
|
|
415
|
+
}, " Формат " + S(c), 9, We)
|
|
413
416
|
]))), 128))
|
|
414
417
|
])
|
|
415
418
|
]),
|
|
416
|
-
l("div",
|
|
417
|
-
l("div",
|
|
419
|
+
l("div", Ze, [
|
|
420
|
+
l("div", Je, [
|
|
418
421
|
l("button", {
|
|
419
422
|
type: "button",
|
|
420
423
|
class: "p-2 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500",
|
|
421
|
-
onClick: e[1] || (e[1] = (...
|
|
424
|
+
onClick: e[1] || (e[1] = (...c) => s.exportTable && s.exportTable(...c))
|
|
422
425
|
}, " Завантажити таблицю ")
|
|
423
426
|
])
|
|
424
427
|
])
|
|
425
428
|
])
|
|
426
429
|
], 64);
|
|
427
430
|
}
|
|
428
|
-
const
|
|
429
|
-
components: { IconExport:
|
|
431
|
+
const Qe = /* @__PURE__ */ m(Ue, [["render", Ke]]), Xe = {
|
|
432
|
+
components: { IconExport: Le, AdminTableExportForm: Qe },
|
|
430
433
|
props: { table: String, columns: Array },
|
|
431
434
|
data() {
|
|
432
435
|
return {
|
|
@@ -434,14 +437,14 @@ const Je = /* @__PURE__ */ b(ze, [["render", Ze]]), Ke = {
|
|
|
434
437
|
};
|
|
435
438
|
}
|
|
436
439
|
};
|
|
437
|
-
function
|
|
438
|
-
const
|
|
439
|
-
return
|
|
440
|
+
function Ye(t, e, r, a, n, s) {
|
|
441
|
+
const b = u("IconExport"), c = u("AdminTableExportForm"), f = u("VsDialog");
|
|
442
|
+
return o(), i(x, null, [
|
|
440
443
|
l("button", {
|
|
441
444
|
onClick: e[0] || (e[0] = (g) => n.isOpen = !0),
|
|
442
445
|
class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"
|
|
443
446
|
}, [
|
|
444
|
-
h(
|
|
447
|
+
h(b, {
|
|
445
448
|
height: "16",
|
|
446
449
|
width: "16"
|
|
447
450
|
}),
|
|
@@ -467,7 +470,7 @@ function Qe(t, e, r, o, n, s) {
|
|
|
467
470
|
title: "Експорт таблиці"
|
|
468
471
|
}, {
|
|
469
472
|
default: y(() => [
|
|
470
|
-
h(
|
|
473
|
+
h(c, {
|
|
471
474
|
table: r.table,
|
|
472
475
|
columns: r.columns
|
|
473
476
|
}, null, 8, ["table", "columns"])
|
|
@@ -476,7 +479,7 @@ function Qe(t, e, r, o, n, s) {
|
|
|
476
479
|
}, 8, ["visible"])
|
|
477
480
|
], 64);
|
|
478
481
|
}
|
|
479
|
-
const
|
|
482
|
+
const et = /* @__PURE__ */ m(Xe, [["render", Ye]]), tt = {}, rt = {
|
|
480
483
|
xmlns: "http://www.w3.org/2000/svg",
|
|
481
484
|
viewBox: "0 0 24 24",
|
|
482
485
|
fill: "none",
|
|
@@ -486,12 +489,12 @@ const Xe = /* @__PURE__ */ b(Ke, [["render", Qe]]), Ye = {}, et = {
|
|
|
486
489
|
"stroke-linejoin": "round",
|
|
487
490
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
|
488
491
|
};
|
|
489
|
-
function
|
|
490
|
-
return
|
|
491
|
-
|
|
492
|
+
function lt(t, e, r, a, n, s) {
|
|
493
|
+
return o(), i("svg", rt, e[0] || (e[0] = [
|
|
494
|
+
M('<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)
|
|
492
495
|
]));
|
|
493
496
|
}
|
|
494
|
-
const
|
|
497
|
+
const nt = /* @__PURE__ */ m(tt, [["render", lt]]), st = {
|
|
495
498
|
props: { column: Object },
|
|
496
499
|
emits: ["update-column"],
|
|
497
500
|
data() {
|
|
@@ -508,39 +511,39 @@ const rt = /* @__PURE__ */ b(Ye, [["render", tt]]), lt = {
|
|
|
508
511
|
var t;
|
|
509
512
|
((t = this.column) == null ? void 0 : t.hidden) !== !0 && (this.value = !0);
|
|
510
513
|
}
|
|
511
|
-
},
|
|
512
|
-
function
|
|
513
|
-
var
|
|
514
|
-
return
|
|
514
|
+
}, ot = { class: "flex w-full gap-[8px] items-centr" };
|
|
515
|
+
function at(t, e, r, a, n, s) {
|
|
516
|
+
var b, c;
|
|
517
|
+
return o(), i("label", ot, [
|
|
515
518
|
Z(l("input", {
|
|
516
519
|
"onUpdate:modelValue": e[0] || (e[0] = (f) => n.value = f),
|
|
517
520
|
type: "checkbox"
|
|
518
521
|
}, null, 512), [
|
|
519
|
-
[
|
|
522
|
+
[X, n.value]
|
|
520
523
|
]),
|
|
521
|
-
$(" " +
|
|
524
|
+
$(" " + S(((b = r.column) == null ? void 0 : b.ua) || ((c = r.column) == null ? void 0 : c.title)), 1)
|
|
522
525
|
]);
|
|
523
526
|
}
|
|
524
|
-
const
|
|
525
|
-
components: { IconColumns:
|
|
527
|
+
const it = /* @__PURE__ */ m(st, [["render", at]]), ut = {
|
|
528
|
+
components: { IconColumns: nt, AdminTableColumnsHiddenItem: it },
|
|
526
529
|
emits: ["update-columns"],
|
|
527
530
|
props: { columns: Array },
|
|
528
531
|
methods: {
|
|
529
532
|
updateColumn(t) {
|
|
530
|
-
const e = this.columns.findIndex((
|
|
533
|
+
const e = this.columns.findIndex((a) => (a == null ? void 0 : a.name) === (t == null ? void 0 : t.name)), r = this.columns;
|
|
531
534
|
r[e] = t, this.$emit("update-columns", [...r]);
|
|
532
535
|
}
|
|
533
536
|
}
|
|
534
|
-
},
|
|
535
|
-
function
|
|
536
|
-
const
|
|
537
|
-
return
|
|
537
|
+
}, ct = { class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, dt = { class: "flex flex-col gap-[3px] h-[400px] w-[300px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
|
|
538
|
+
function ht(t, e, r, a, n, s) {
|
|
539
|
+
const b = u("IconColumns"), c = u("AdminTableColumnsHiddenItem"), f = u("VsPopover");
|
|
540
|
+
return o(), _(f, {
|
|
538
541
|
trigger: "click",
|
|
539
542
|
placement: "bottom"
|
|
540
543
|
}, {
|
|
541
544
|
reference: y(() => [
|
|
542
|
-
l("button",
|
|
543
|
-
h(
|
|
545
|
+
l("button", ct, [
|
|
546
|
+
h(b, {
|
|
544
547
|
height: "20",
|
|
545
548
|
width: "16"
|
|
546
549
|
})
|
|
@@ -549,9 +552,9 @@ function ct(t, e, r, o, n, s) {
|
|
|
549
552
|
default: y(() => [
|
|
550
553
|
l("div", null, [
|
|
551
554
|
e[0] || (e[0] = l("h2", { class: "text-sm mb-[8px]" }, "Оберіть колонки, щоб приховати", -1)),
|
|
552
|
-
l("ul",
|
|
553
|
-
(
|
|
554
|
-
h(
|
|
555
|
+
l("ul", dt, [
|
|
556
|
+
(o(!0), i(x, null, C(r.columns, (g, F) => (o(), i("li", { key: F }, [
|
|
557
|
+
h(c, {
|
|
555
558
|
column: g,
|
|
556
559
|
onUpdateColumn: s.updateColumn
|
|
557
560
|
}, null, 8, ["column", "onUpdateColumn"])
|
|
@@ -562,14 +565,14 @@ function ct(t, e, r, o, n, s) {
|
|
|
562
565
|
_: 1
|
|
563
566
|
});
|
|
564
567
|
}
|
|
565
|
-
const
|
|
568
|
+
const pt = /* @__PURE__ */ m(ut, [["render", ht]]), mt = {}, bt = {
|
|
566
569
|
class: "hidden sm:block shrink-0 size-3",
|
|
567
570
|
xmlns: "http://www.w3.org/2000/svg",
|
|
568
571
|
fill: "currentColor",
|
|
569
572
|
viewBox: "0 0 16 16"
|
|
570
573
|
};
|
|
571
|
-
function
|
|
572
|
-
return
|
|
574
|
+
function ft(t, e, r, a, n, s) {
|
|
575
|
+
return o(), i("svg", bt, e[0] || (e[0] = [
|
|
573
576
|
l("path", {
|
|
574
577
|
"fill-rule": "evenodd",
|
|
575
578
|
"clip-rule": "evenodd",
|
|
@@ -577,22 +580,23 @@ function bt(t, e, r, o, n, s) {
|
|
|
577
580
|
}, null, -1)
|
|
578
581
|
]));
|
|
579
582
|
}
|
|
580
|
-
const
|
|
581
|
-
function
|
|
582
|
-
return
|
|
583
|
-
|
|
583
|
+
const gt = /* @__PURE__ */ m(mt, [["render", ft]]), xt = {}, yt = { class: "vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden" };
|
|
584
|
+
function kt(t, e, r, a, n, s) {
|
|
585
|
+
return o(), i("div", yt, e[0] || (e[0] = [
|
|
586
|
+
M('<div><div class="p-5 min-h-[500px] flex flex-col justify-center items-center text-center"><svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg><div class="max-w-sm mx-auto mt-6"><p class="font-medium text-gray-800 dark:text-neutral-200"> Дані для відображення відсутні </p><p class="mt-2 text-sm text-gray-500 dark:text-neutral-500"> Змініть параметри пошуку або спробуйте пізніше </p></div></div></div>', 1)
|
|
584
587
|
]));
|
|
585
588
|
}
|
|
586
|
-
const
|
|
589
|
+
const _t = /* @__PURE__ */ m(xt, [["render", kt]]), wt = {
|
|
587
590
|
props: { table: String, title: String },
|
|
588
591
|
components: {
|
|
589
|
-
IconFilter:
|
|
590
|
-
AdminTableControl:
|
|
591
|
-
AdminTableExport:
|
|
592
|
-
AdminTableColumnsHidden:
|
|
593
|
-
AdminTableColumn:
|
|
594
|
-
AdminNodata:
|
|
595
|
-
IconPlus:
|
|
592
|
+
IconFilter: se,
|
|
593
|
+
AdminTableControl: Ee,
|
|
594
|
+
AdminTableExport: et,
|
|
595
|
+
AdminTableColumnsHidden: pt,
|
|
596
|
+
AdminTableColumn: pe,
|
|
597
|
+
AdminNodata: _t,
|
|
598
|
+
IconPlus: gt,
|
|
599
|
+
IconSearch: te
|
|
596
600
|
},
|
|
597
601
|
data() {
|
|
598
602
|
return {
|
|
@@ -608,8 +612,8 @@ const yt = /* @__PURE__ */ b(ft, [["render", xt]]), kt = {
|
|
|
608
612
|
};
|
|
609
613
|
},
|
|
610
614
|
mounted() {
|
|
611
|
-
var t, e;
|
|
612
|
-
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.getTableData(), this.getFilters();
|
|
615
|
+
var t, e, r, a;
|
|
616
|
+
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((a = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : a.limit) || 20, this.getTableData(), this.getFilters();
|
|
613
617
|
},
|
|
614
618
|
computed: {
|
|
615
619
|
defaultPage() {
|
|
@@ -642,17 +646,21 @@ const yt = /* @__PURE__ */ b(ft, [["render", xt]]), kt = {
|
|
|
642
646
|
},
|
|
643
647
|
$route: {
|
|
644
648
|
handler(t, e) {
|
|
645
|
-
var r,
|
|
646
|
-
((r = t == null ? void 0 : t.params) == null ? void 0 : r.catchAll) !== ((
|
|
649
|
+
var r, a;
|
|
650
|
+
((r = t == null ? void 0 : t.params) == null ? void 0 : r.catchAll) !== ((a = e == null ? void 0 : e.params) == null ? void 0 : a.catchAll) && (this.filterScheme = null, this.getFilters());
|
|
647
651
|
},
|
|
648
652
|
deep: !0
|
|
653
|
+
},
|
|
654
|
+
limit(t) {
|
|
655
|
+
var e;
|
|
656
|
+
this.$router.push({ query: { ...(e = this.$route) == null ? void 0 : e.query, limit: t } });
|
|
649
657
|
}
|
|
650
658
|
},
|
|
651
659
|
methods: {
|
|
652
660
|
async getTableData() {
|
|
653
661
|
var t, e;
|
|
654
662
|
try {
|
|
655
|
-
const { data: r } = await w.get(`/api/template/table/${this.table}`),
|
|
663
|
+
const { data: r } = await w.get(`/api/template/table/${this.table}`), a = await w.get(`/api/table-data/${this.table}`, {
|
|
656
664
|
params: {
|
|
657
665
|
page: this.page,
|
|
658
666
|
search: this.searchValue || null,
|
|
@@ -663,7 +671,7 @@ const yt = /* @__PURE__ */ b(ft, [["render", xt]]), kt = {
|
|
|
663
671
|
});
|
|
664
672
|
this.tableData = {
|
|
665
673
|
...r,
|
|
666
|
-
...(
|
|
674
|
+
...(a == null ? void 0 : a.data) || {}
|
|
667
675
|
};
|
|
668
676
|
} catch {
|
|
669
677
|
}
|
|
@@ -697,33 +705,33 @@ const yt = /* @__PURE__ */ b(ft, [["render", xt]]), kt = {
|
|
|
697
705
|
this.activeColumn = t, this.getTableData();
|
|
698
706
|
}
|
|
699
707
|
}
|
|
700
|
-
},
|
|
708
|
+
}, vt = { class: "w-[calc(100vw - 320px)]" }, Ct = { class: "h-[76px] bg-gray-50 flex items-center justify-between px-[30px]" }, $t = { class: "text-xl font-medium h-[20px]" }, St = {
|
|
701
709
|
style: { height: "calc(100vh - 140px)", width: "calc(100vw - 260px)" },
|
|
702
710
|
class: "bg-gray-50 p-[20px] flex pt-[10px]"
|
|
703
|
-
},
|
|
711
|
+
}, Ft = { class: "bg-white w-full rounded-xl border p-[20px]" }, Tt = { class: "flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative" }, Vt = { class: "flex gap-[6px] ml-auto" }, At = {
|
|
704
712
|
key: 0,
|
|
705
713
|
class: "font-medium text-[10px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full dark:bg-neutral-500"
|
|
706
|
-
},
|
|
714
|
+
}, Dt = { class: "space-y-5 flex items-start w-full justify-start" }, Mt = {
|
|
707
715
|
style: { height: "calc(100vh - 310px)" },
|
|
708
716
|
class: "overflow-x-auto w-full border-t [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
|
|
709
|
-
},
|
|
717
|
+
}, It = { class: "inline-block w-full align-middle" }, Bt = {
|
|
710
718
|
key: 0,
|
|
711
719
|
class: "divide-y divide-gray-200 min-w-full dark:divide-neutral-700 relative table-fixed"
|
|
712
|
-
},
|
|
713
|
-
function
|
|
714
|
-
var j, P, z, L, U,
|
|
715
|
-
const
|
|
716
|
-
return
|
|
717
|
-
l("div",
|
|
718
|
-
l("div",
|
|
719
|
-
l("h2",
|
|
720
|
-
s.isForm ? (
|
|
720
|
+
}, Et = { class: "sticky top-0 bg-white w-full relative after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, jt = { class: "border-stone-200 right-0 z-[1]" }, Pt = { class: "divide-y divide-gray-200" }, zt = { class: "min-w-[200px] text-start pe-4 py-3 text-sm text-gray-600" }, Lt = { class: "text-center sticky right-0 bg-white w-[80px] px-[10px]" }, Ut = { class: "p-[20px] flex justify-end w-full" }, qt = { class: "filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-white [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
|
|
721
|
+
function Ot(t, e, r, a, n, s) {
|
|
722
|
+
var j, P, z, L, U, q;
|
|
723
|
+
const b = u("IconPlus"), c = u("router-link"), f = u("IconSearch"), g = u("VsText"), F = u("AdminTableColumnsHidden"), I = u("AdminTableExport"), k = u("IconFilter"), V = u("AdminTableColumn"), A = u("AdminTableControl"), B = u("AdminNodata"), J = u("VsPagination"), K = u("VsFilter");
|
|
724
|
+
return o(), i(x, null, [
|
|
725
|
+
l("div", vt, [
|
|
726
|
+
l("div", Ct, [
|
|
727
|
+
l("h2", $t, S(r.title), 1),
|
|
728
|
+
s.isForm ? (o(), _(c, {
|
|
721
729
|
key: 0,
|
|
722
730
|
to: `/add?table=${(P = (j = t.$route) == null ? void 0 : j.params) == null ? void 0 : P.catchAll}`,
|
|
723
731
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"
|
|
724
732
|
}, {
|
|
725
733
|
default: y(() => [
|
|
726
|
-
h(
|
|
734
|
+
h(b, {
|
|
727
735
|
height: "16",
|
|
728
736
|
width: "16"
|
|
729
737
|
}),
|
|
@@ -732,22 +740,27 @@ function Ut(t, e, r, o, n, s) {
|
|
|
732
740
|
_: 1
|
|
733
741
|
}, 8, ["to"])) : v("", !0)
|
|
734
742
|
]),
|
|
735
|
-
l("div",
|
|
736
|
-
l("div",
|
|
737
|
-
l("div",
|
|
743
|
+
l("div", St, [
|
|
744
|
+
l("div", Ft, [
|
|
745
|
+
l("div", Tt, [
|
|
738
746
|
h(f, {
|
|
747
|
+
height: "14",
|
|
748
|
+
width: "14",
|
|
749
|
+
class: "absolute top-[10px] left-[14px] text-gray-500 z-[1]"
|
|
750
|
+
}),
|
|
751
|
+
h(g, {
|
|
739
752
|
modelValue: n.searchValue,
|
|
740
753
|
"onUpdate:modelValue": e[0] || (e[0] = (d) => n.searchValue = d),
|
|
741
754
|
placeholder: "Пошук...",
|
|
742
755
|
clearable: !0,
|
|
743
756
|
class: "[&>input]:py-[7px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600"
|
|
744
757
|
}, null, 8, ["modelValue"]),
|
|
745
|
-
l("div",
|
|
746
|
-
h(
|
|
758
|
+
l("div", Vt, [
|
|
759
|
+
h(F, {
|
|
747
760
|
columns: (z = n.tableData) == null ? void 0 : z.columns,
|
|
748
761
|
onUpdateColumns: e[1] || (e[1] = (d) => n.tableData.columns = d)
|
|
749
762
|
}, null, 8, ["columns"]),
|
|
750
|
-
h(
|
|
763
|
+
h(I, {
|
|
751
764
|
table: r.table,
|
|
752
765
|
columns: (L = n.tableData) == null ? void 0 : L.columns
|
|
753
766
|
}, null, 8, ["table", "columns"]),
|
|
@@ -755,22 +768,22 @@ function Ut(t, e, r, o, n, s) {
|
|
|
755
768
|
onClick: e[2] || (e[2] = (d) => n.isFilters = !n.isFilters),
|
|
756
769
|
class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"
|
|
757
770
|
}, [
|
|
758
|
-
h(
|
|
771
|
+
h(k, {
|
|
759
772
|
height: "16",
|
|
760
773
|
width: "16"
|
|
761
774
|
}),
|
|
762
775
|
e[6] || (e[6] = $(" Фільтри ")),
|
|
763
|
-
n.onFilters ? (
|
|
776
|
+
n.onFilters ? (o(), i("span", At, S(n.onFilters), 1)) : v("", !0)
|
|
764
777
|
])
|
|
765
778
|
])
|
|
766
779
|
]),
|
|
767
|
-
l("div",
|
|
768
|
-
l("div",
|
|
769
|
-
l("div",
|
|
770
|
-
s.isNoData ? (
|
|
771
|
-
l("thead",
|
|
772
|
-
l("tr",
|
|
773
|
-
(
|
|
780
|
+
l("div", Dt, [
|
|
781
|
+
l("div", Mt, [
|
|
782
|
+
l("div", It, [
|
|
783
|
+
s.isNoData ? (o(), _(B, { key: 1 })) : (o(), i("table", Bt, [
|
|
784
|
+
l("thead", Et, [
|
|
785
|
+
l("tr", jt, [
|
|
786
|
+
(o(!0), i(x, null, C(s.columns, (d) => (o(), _(V, {
|
|
774
787
|
key: d.name,
|
|
775
788
|
data: d,
|
|
776
789
|
activeColumn: n.activeColumn,
|
|
@@ -779,20 +792,20 @@ function Ut(t, e, r, o, n, s) {
|
|
|
779
792
|
e[7] || (e[7] = l("th", { class: "w-[70px] sticky right-0 top-0 bg-white" }, null, -1))
|
|
780
793
|
])
|
|
781
794
|
]),
|
|
782
|
-
l("tbody",
|
|
783
|
-
(
|
|
784
|
-
var
|
|
785
|
-
return
|
|
786
|
-
l("td",
|
|
787
|
-
h(
|
|
795
|
+
l("tbody", Pt, [
|
|
796
|
+
(o(!0), i(x, null, C((U = n.tableData) == null ? void 0 : U.rows, (d, D) => {
|
|
797
|
+
var O;
|
|
798
|
+
return o(), i("tr", { key: D }, [
|
|
799
|
+
l("td", zt, [
|
|
800
|
+
h(c, {
|
|
788
801
|
to: `/card/${r.table}/${d == null ? void 0 : d.id}`,
|
|
789
802
|
class: "text-sm text-blue-600 decoration-2 hover:underline font-medium focus:outline-none focus:underline hover:text-blue-600"
|
|
790
803
|
}, {
|
|
791
804
|
default: y(() => {
|
|
792
|
-
var p,
|
|
805
|
+
var p, T, H, N, R, G;
|
|
793
806
|
return [
|
|
794
|
-
(
|
|
795
|
-
((p = s.columns[0]) == null ? void 0 : p.format) === "custom" ? (
|
|
807
|
+
(o(), _(W(
|
|
808
|
+
((p = s.columns[0]) == null ? void 0 : p.format) === "custom" ? (T = s.columns[0]) == null ? void 0 : T.component : t.$componentsConfig[`table-format-${((N = (H = s.columns[0]) == null ? void 0 : H.format) == null ? void 0 : N.toLowerCase()) || "text"}`]
|
|
796
809
|
), {
|
|
797
810
|
name: (R = s.columns[0]) == null ? void 0 : R.name,
|
|
798
811
|
data: d,
|
|
@@ -803,14 +816,14 @@ function Ut(t, e, r, o, n, s) {
|
|
|
803
816
|
_: 2
|
|
804
817
|
}, 1032, ["to"])
|
|
805
818
|
]),
|
|
806
|
-
(
|
|
807
|
-
var
|
|
808
|
-
return
|
|
819
|
+
(o(!0), i(x, null, C((O = s.columns) == null ? void 0 : O.slice(1), (p) => {
|
|
820
|
+
var T;
|
|
821
|
+
return o(), i("td", {
|
|
809
822
|
class: "min-w-[300px] w-full text-start px-[4px] py-3 text-sm text-gray-600",
|
|
810
823
|
key: p.name
|
|
811
824
|
}, [
|
|
812
|
-
(
|
|
813
|
-
(p == null ? void 0 : p.format) === "custom" ? p == null ? void 0 : p.component : t.$componentsConfig[`table-format-${((
|
|
825
|
+
(o(), _(W(
|
|
826
|
+
(p == null ? void 0 : p.format) === "custom" ? p == null ? void 0 : p.component : t.$componentsConfig[`table-format-${((T = p == null ? void 0 : p.format) == null ? void 0 : T.toLowerCase()) || "text"}`]
|
|
814
827
|
), {
|
|
815
828
|
name: p == null ? void 0 : p.name,
|
|
816
829
|
data: d,
|
|
@@ -818,8 +831,8 @@ function Ut(t, e, r, o, n, s) {
|
|
|
818
831
|
}, null, 8, ["name", "data", "value"]))
|
|
819
832
|
]);
|
|
820
833
|
}), 128)),
|
|
821
|
-
l("td",
|
|
822
|
-
h(
|
|
834
|
+
l("td", Lt, [
|
|
835
|
+
h(A, {
|
|
823
836
|
isForm: s.isForm,
|
|
824
837
|
item: d,
|
|
825
838
|
table: r.table,
|
|
@@ -833,12 +846,12 @@ function Ut(t, e, r, o, n, s) {
|
|
|
833
846
|
])
|
|
834
847
|
])
|
|
835
848
|
]),
|
|
836
|
-
l("div",
|
|
837
|
-
h(
|
|
849
|
+
l("div", Ut, [
|
|
850
|
+
h(J, {
|
|
838
851
|
goTo: !1,
|
|
839
852
|
class: "justify-end",
|
|
840
853
|
"default-page": s.defaultPage,
|
|
841
|
-
total: ((
|
|
854
|
+
total: ((q = n.tableData) == null ? void 0 : q.total) || 0,
|
|
842
855
|
pageSize: n.limit,
|
|
843
856
|
onPageChange: s.handlePageChange,
|
|
844
857
|
pageSizes: [10, 16, 20],
|
|
@@ -848,17 +861,17 @@ function Ut(t, e, r, o, n, s) {
|
|
|
848
861
|
])
|
|
849
862
|
])
|
|
850
863
|
]),
|
|
851
|
-
h(
|
|
864
|
+
h(Y, { name: "fade" }, {
|
|
852
865
|
default: y(() => {
|
|
853
866
|
var d;
|
|
854
867
|
return [
|
|
855
868
|
Z(l("div", {
|
|
856
|
-
onClick: e[4] || (e[4] = (...
|
|
869
|
+
onClick: e[4] || (e[4] = (...D) => s.closeFilter && s.closeFilter(...D)),
|
|
857
870
|
style: { height: "100vh" },
|
|
858
871
|
class: "fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.5)]"
|
|
859
872
|
}, [
|
|
860
|
-
l("div",
|
|
861
|
-
(d = n.filterScheme) != null && d.length ? (
|
|
873
|
+
l("div", qt, [
|
|
874
|
+
(d = n.filterScheme) != null && d.length ? (o(), _(K, {
|
|
862
875
|
key: 0,
|
|
863
876
|
ref: "filter",
|
|
864
877
|
scheme: n.filterScheme,
|
|
@@ -868,11 +881,11 @@ function Ut(t, e, r, o, n, s) {
|
|
|
868
881
|
name: "filter",
|
|
869
882
|
onFilterChange: s.filterChange,
|
|
870
883
|
closeFilterBtn: !0,
|
|
871
|
-
onFilterClose: e[3] || (e[3] = (
|
|
884
|
+
onFilterClose: e[3] || (e[3] = (D) => n.isFilters = !1)
|
|
872
885
|
}, null, 8, ["scheme", "onFilterChange"])) : v("", !0)
|
|
873
886
|
])
|
|
874
887
|
], 512), [
|
|
875
|
-
[
|
|
888
|
+
[ee, n.isFilters]
|
|
876
889
|
])
|
|
877
890
|
];
|
|
878
891
|
}),
|
|
@@ -880,8 +893,8 @@ function Ut(t, e, r, o, n, s) {
|
|
|
880
893
|
})
|
|
881
894
|
], 64);
|
|
882
895
|
}
|
|
883
|
-
const
|
|
884
|
-
components: { AdminTable:
|
|
896
|
+
const Ht = /* @__PURE__ */ m(wt, [["render", Ot]]), Nt = {
|
|
897
|
+
components: { AdminTable: Ht },
|
|
885
898
|
data() {
|
|
886
899
|
return {
|
|
887
900
|
table: !1,
|
|
@@ -921,9 +934,9 @@ const Ot = /* @__PURE__ */ b(kt, [["render", Ut]]), Ht = {
|
|
|
921
934
|
async checkPageType() {
|
|
922
935
|
const t = this.flattenMenu(E.value);
|
|
923
936
|
t != null && t.length || this.$router.replace("/404");
|
|
924
|
-
const e = t == null ? void 0 : t.find((
|
|
937
|
+
const e = t == null ? void 0 : t.find((a) => {
|
|
925
938
|
var n, s;
|
|
926
|
-
return (
|
|
939
|
+
return (a == null ? void 0 : a.path) == ((s = (n = this.$route) == null ? void 0 : n.params) == null ? void 0 : s.catchAll);
|
|
927
940
|
});
|
|
928
941
|
this.title = e == null ? void 0 : e.ua, e || this.$router.replace("/404");
|
|
929
942
|
const r = e == null ? void 0 : e.table;
|
|
@@ -941,21 +954,21 @@ const Ot = /* @__PURE__ */ b(kt, [["render", Ut]]), Ht = {
|
|
|
941
954
|
}
|
|
942
955
|
}
|
|
943
956
|
}
|
|
944
|
-
},
|
|
945
|
-
function
|
|
946
|
-
const
|
|
947
|
-
return n.table ? (
|
|
957
|
+
}, Rt = ["innerHTML"];
|
|
958
|
+
function Gt(t, e, r, a, n, s) {
|
|
959
|
+
const b = u("AdminTable");
|
|
960
|
+
return n.table ? (o(), _(b, {
|
|
948
961
|
key: 0,
|
|
949
962
|
table: n.table,
|
|
950
963
|
title: n.title
|
|
951
|
-
}, null, 8, ["table", "title"])) : (
|
|
964
|
+
}, null, 8, ["table", "title"])) : (o(), i("div", {
|
|
952
965
|
key: 1,
|
|
953
966
|
class: "w-full bg-gray-50",
|
|
954
967
|
style: { height: "calc(100vh - 120px)" },
|
|
955
968
|
innerHTML: n.interface
|
|
956
|
-
}, null, 8,
|
|
969
|
+
}, null, 8, Rt));
|
|
957
970
|
}
|
|
958
|
-
const
|
|
971
|
+
const Qt = /* @__PURE__ */ m(Nt, [["render", Gt]]);
|
|
959
972
|
export {
|
|
960
|
-
|
|
973
|
+
Qt as default
|
|
961
974
|
};
|