@opengis/admin 0.1.24 → 0.1.26
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-C8Y-Yjr2.js → IconSearch-Dzh7isDo.js} +1 -1
- package/dist/{add-page-BspLXytu.js → add-page-Bqo89ZhV.js} +1 -1
- package/dist/{admin-interface-81GXyCpn.js → admin-interface-_aBJ2Q5B.js} +285 -288
- package/dist/{admin-view-DaFjKeQf.js → admin-view-oqNsQ8Yh.js} +3 -3
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +53 -53
- package/dist/{card-page-utYuShXw.js → card-page-DtL44Dyl.js} +3 -3
- package/dist/{card-view-CboNdj7O.js → card-view-CJXpyOcM.js} +1 -1
- package/dist/{edit-page-CZXJ8D5x.js → edit-page-Rw4844su.js} +1 -1
- package/dist/{import-file-Ce09Q27V.js → import-file-De3lGFop.js} +8615 -8250
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/server/helpers/controllers/mls.js +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as m, a as C } from "./import-file-De3lGFop.js";
|
|
2
2
|
import { u as B } from "./userMenu-CT1xO2Pt.js";
|
|
3
|
-
import { openBlock as o, createElementBlock as i, createStaticVNode as A, createTextVNode as
|
|
4
|
-
import { I as
|
|
5
|
-
const
|
|
3
|
+
import { openBlock as o, createElementBlock as i, createStaticVNode as A, createTextVNode as T, toDisplayString as V, createCommentVNode as v, createElementVNode as l, Fragment as x, resolveComponent as d, createVNode as h, withCtx as y, createBlock as g, withModifiers as te, renderList as S, withDirectives as X, vModelCheckbox as re, normalizeStyle as j, normalizeClass as le, resolveDynamicComponent as Q, Transition as ne, vShow as se } from "vue";
|
|
4
|
+
import { I as oe } from "./IconSearch-Dzh7isDo.js";
|
|
5
|
+
const ae = {}, ie = {
|
|
6
6
|
class: "h21yx vs0hq",
|
|
7
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8
8
|
width: "24",
|
|
@@ -14,12 +14,12 @@ const oe = {}, ae = {
|
|
|
14
14
|
"stroke-linecap": "round",
|
|
15
15
|
"stroke-linejoin": "round"
|
|
16
16
|
};
|
|
17
|
-
function
|
|
18
|
-
return o(), i("svg",
|
|
17
|
+
function de(t, e, r, a, n, s) {
|
|
18
|
+
return o(), i("svg", ie, e[0] || (e[0] = [
|
|
19
19
|
A('<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)
|
|
20
20
|
]));
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const ce = /* @__PURE__ */ m(ae, [["render", de]]), ue = {
|
|
23
23
|
data() {
|
|
24
24
|
return {
|
|
25
25
|
currentSort: ""
|
|
@@ -77,10 +77,10 @@ const ue = /* @__PURE__ */ b(oe, [["render", ie]]), ce = {
|
|
|
77
77
|
return `${this.data.name}-${t}` === this.selectedSortParam;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
},
|
|
80
|
+
}, he = {
|
|
81
81
|
scope: "col",
|
|
82
82
|
class: "min-w-[200px] max-w-[300px] text-start"
|
|
83
|
-
},
|
|
83
|
+
}, pe = {
|
|
84
84
|
class: "flex-shrink-0 size-3.5",
|
|
85
85
|
xmlns: "http://www.w3.org/2000/svg",
|
|
86
86
|
width: "24",
|
|
@@ -91,33 +91,33 @@ const ue = /* @__PURE__ */ b(oe, [["render", ie]]), ce = {
|
|
|
91
91
|
"stroke-width": "2",
|
|
92
92
|
"stroke-linecap": "round",
|
|
93
93
|
"stroke-linejoin": "round"
|
|
94
|
-
},
|
|
94
|
+
}, me = {
|
|
95
95
|
key: 0,
|
|
96
96
|
d: "m7 15 5 5 5-5"
|
|
97
97
|
}, be = {
|
|
98
98
|
key: 1,
|
|
99
99
|
d: "m7 9 5-5 5 5"
|
|
100
|
-
},
|
|
100
|
+
}, fe = {
|
|
101
101
|
key: 1,
|
|
102
102
|
class: "text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500"
|
|
103
103
|
};
|
|
104
|
-
function
|
|
105
|
-
return o(), i("th",
|
|
104
|
+
function ge(t, e, r, a, n, s) {
|
|
105
|
+
return o(), i("th", he, [
|
|
106
106
|
s.getVisibleIcon ? (o(), i("button", {
|
|
107
107
|
key: 0,
|
|
108
108
|
type: "button",
|
|
109
109
|
class: "text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",
|
|
110
|
-
onClick: e[0] || (e[0] = (
|
|
110
|
+
onClick: e[0] || (e[0] = (b) => s.handleClickSortBtn(n.currentSort))
|
|
111
111
|
}, [
|
|
112
|
-
|
|
113
|
-
(o(), i("svg",
|
|
114
|
-
n.currentSort === "asc" || n.currentSort === "" ? (o(), i("path",
|
|
115
|
-
n.currentSort === "desc" || n.currentSort === "" ? (o(), i("path", be)) :
|
|
112
|
+
T(V(s.label) + " ", 1),
|
|
113
|
+
(o(), i("svg", pe, [
|
|
114
|
+
n.currentSort === "asc" || n.currentSort === "" ? (o(), i("path", me)) : v("", !0),
|
|
115
|
+
n.currentSort === "desc" || n.currentSort === "" ? (o(), i("path", be)) : v("", !0)
|
|
116
116
|
]))
|
|
117
|
-
])) : (o(), i("p",
|
|
117
|
+
])) : (o(), i("p", fe, V(s.label), 1))
|
|
118
118
|
]);
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const xe = /* @__PURE__ */ m(ue, [["render", ge]]), ye = {}, ke = {
|
|
121
121
|
xmlns: "http://www.w3.org/2000/svg",
|
|
122
122
|
viewBox: "0 0 24 24",
|
|
123
123
|
fill: "none",
|
|
@@ -127,8 +127,8 @@ const ge = /* @__PURE__ */ b(ce, [["render", fe]]), xe = {}, ye = {
|
|
|
127
127
|
"stroke-linejoin": "round",
|
|
128
128
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-dots-vertical"
|
|
129
129
|
};
|
|
130
|
-
function
|
|
131
|
-
return o(), i("svg",
|
|
130
|
+
function we(t, e, r, a, n, s) {
|
|
131
|
+
return o(), i("svg", ke, e[0] || (e[0] = [
|
|
132
132
|
l("path", {
|
|
133
133
|
stroke: "none",
|
|
134
134
|
d: "M0 0h24v24H0z",
|
|
@@ -139,7 +139,7 @@ function ke(t, e, r, a, n, s) {
|
|
|
139
139
|
l("path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
|
|
140
140
|
]));
|
|
141
141
|
}
|
|
142
|
-
const _e = /* @__PURE__ */
|
|
142
|
+
const _e = /* @__PURE__ */ m(ye, [["render", we]]), ve = {}, Ce = {
|
|
143
143
|
class: "flex-shrink-0 size-3.5",
|
|
144
144
|
xmlns: "http://www.w3.org/2000/svg",
|
|
145
145
|
viewBox: "0 0 24 24",
|
|
@@ -149,21 +149,21 @@ const _e = /* @__PURE__ */ b(xe, [["render", ke]]), we = {}, ve = {
|
|
|
149
149
|
"stroke-linecap": "round",
|
|
150
150
|
"stroke-linejoin": "round"
|
|
151
151
|
};
|
|
152
|
-
function
|
|
153
|
-
return o(), i("svg",
|
|
152
|
+
function $e(t, e, r, a, n, s) {
|
|
153
|
+
return o(), i("svg", Ce, e[0] || (e[0] = [
|
|
154
154
|
A('<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)
|
|
155
155
|
]));
|
|
156
156
|
}
|
|
157
|
-
const
|
|
157
|
+
const Se = /* @__PURE__ */ m(ve, [["render", $e]]), Te = {
|
|
158
158
|
props: {
|
|
159
159
|
height: { type: String, default: "16" },
|
|
160
160
|
width: { type: String, default: "12" },
|
|
161
161
|
color: { type: String, default: "black" }
|
|
162
162
|
}
|
|
163
|
-
},
|
|
164
|
-
function
|
|
163
|
+
}, Ve = { style: { display: "none" } }, Fe = ["height", "width", "fill"];
|
|
164
|
+
function De(t, e, r, a, n, s) {
|
|
165
165
|
return o(), i(x, null, [
|
|
166
|
-
(o(), i("svg",
|
|
166
|
+
(o(), i("svg", Ve, e[0] || (e[0] = [
|
|
167
167
|
l("symbol", {
|
|
168
168
|
id: "icon-pencil",
|
|
169
169
|
viewBox: "0 0 32 32"
|
|
@@ -177,14 +177,14 @@ function Ve(t, e, r, a, n, s) {
|
|
|
177
177
|
fill: r.color
|
|
178
178
|
}, e[1] || (e[1] = [
|
|
179
179
|
l("use", { "xlink:href": "#icon-pencil" }, null, -1)
|
|
180
|
-
]), 8,
|
|
180
|
+
]), 8, Fe))
|
|
181
181
|
], 64);
|
|
182
182
|
}
|
|
183
|
-
const
|
|
183
|
+
const Me = /* @__PURE__ */ m(Te, [["render", De]]), Ae = {
|
|
184
184
|
components: {
|
|
185
185
|
IconMore: _e,
|
|
186
|
-
IconDelete:
|
|
187
|
-
IconEdit:
|
|
186
|
+
IconDelete: Se,
|
|
187
|
+
IconEdit: Me
|
|
188
188
|
},
|
|
189
189
|
emits: ["updateTable"],
|
|
190
190
|
props: { item: Object, table: String, isForm: null },
|
|
@@ -204,7 +204,7 @@ const De = /* @__PURE__ */ b(Se, [["render", Ve]]), Ae = {
|
|
|
204
204
|
async getData() {
|
|
205
205
|
var t;
|
|
206
206
|
try {
|
|
207
|
-
const { data: e } = await
|
|
207
|
+
const { data: e } = await C.get(
|
|
208
208
|
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
|
209
209
|
);
|
|
210
210
|
this.formValue = e;
|
|
@@ -218,7 +218,7 @@ const De = /* @__PURE__ */ b(Se, [["render", Ve]]), Ae = {
|
|
|
218
218
|
async deleteElement() {
|
|
219
219
|
var t;
|
|
220
220
|
try {
|
|
221
|
-
|
|
221
|
+
C.delete(`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`), this.$notify({
|
|
222
222
|
title: "Успішно!",
|
|
223
223
|
message: "Об`єкт успішно видалeно",
|
|
224
224
|
type: "success"
|
|
@@ -232,47 +232,47 @@ const De = /* @__PURE__ */ b(Se, [["render", Ve]]), Ae = {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
},
|
|
235
|
+
}, Ie = { class: "hs-dropdown [--placement:bottom-right] inline-flex" }, Be = { class: "gap-x-2 p-[4px] rounded-lg shadow-sm hover:border-transparent border focus:outline-none text-black hover:bg-gray-50" }, je = { class: "flex flex-col items-start" }, ze = {
|
|
236
236
|
key: 1,
|
|
237
237
|
class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
|
|
238
|
-
},
|
|
239
|
-
function
|
|
240
|
-
const
|
|
238
|
+
}, Pe = { class: "p-4" }, Ee = { class: "mt-4 flex justify-end gap-x-3" };
|
|
239
|
+
function Le(t, e, r, a, n, s) {
|
|
240
|
+
const b = d("IconMore"), f = d("IconEdit"), k = d("router-link"), u = d("IconDelete"), w = d("VsPopover"), $ = d("VsDialog");
|
|
241
241
|
return o(), i(x, null, [
|
|
242
|
-
l("div",
|
|
243
|
-
h(
|
|
242
|
+
l("div", Ie, [
|
|
243
|
+
h(w, {
|
|
244
244
|
trigger: "click",
|
|
245
245
|
placement: "bottom-left"
|
|
246
246
|
}, {
|
|
247
|
-
reference:
|
|
248
|
-
l("button",
|
|
249
|
-
h(
|
|
247
|
+
reference: y(() => [
|
|
248
|
+
l("button", Be, [
|
|
249
|
+
h(b, {
|
|
250
250
|
height: "16",
|
|
251
251
|
width: "16"
|
|
252
252
|
})
|
|
253
253
|
])
|
|
254
254
|
]),
|
|
255
|
-
default:
|
|
256
|
-
var
|
|
255
|
+
default: y(() => {
|
|
256
|
+
var _, F, D;
|
|
257
257
|
return [
|
|
258
|
-
l("div",
|
|
259
|
-
r.isForm ? (o(),
|
|
258
|
+
l("div", je, [
|
|
259
|
+
r.isForm ? (o(), g(k, {
|
|
260
260
|
key: 0,
|
|
261
|
-
to: `/edit?table=${(
|
|
261
|
+
to: `/edit?table=${(F = (_ = t.$route) == null ? void 0 : _.params) == null ? void 0 : F.catchAll}&id=${(D = r.item) == null ? void 0 : D.id}`,
|
|
262
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"
|
|
263
263
|
}, {
|
|
264
|
-
default:
|
|
265
|
-
h(
|
|
266
|
-
e[4] || (e[4] =
|
|
264
|
+
default: y(() => [
|
|
265
|
+
h(f, { color: "#000" }),
|
|
266
|
+
e[4] || (e[4] = T(" Редагувати "))
|
|
267
267
|
]),
|
|
268
268
|
_: 1
|
|
269
|
-
}, 8, ["to"])) :
|
|
270
|
-
r.isForm ? (o(), i("div",
|
|
269
|
+
}, 8, ["to"])) : v("", !0),
|
|
270
|
+
r.isForm ? (o(), i("div", ze)) : v("", !0),
|
|
271
271
|
l("button", {
|
|
272
|
-
onClick: e[0] || (e[0] =
|
|
272
|
+
onClick: e[0] || (e[0] = te((...I) => s.openConfirm && s.openConfirm(...I), ["stop"])),
|
|
273
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"
|
|
274
274
|
}, [
|
|
275
|
-
h(
|
|
275
|
+
h(u),
|
|
276
276
|
e[5] || (e[5] = l("span", { class: "text-gray-800" }, "Видалити", -1))
|
|
277
277
|
])
|
|
278
278
|
])
|
|
@@ -281,24 +281,24 @@ function ze(t, e, r, a, n, s) {
|
|
|
281
281
|
_: 1
|
|
282
282
|
})
|
|
283
283
|
]),
|
|
284
|
-
h(
|
|
284
|
+
h($, {
|
|
285
285
|
visible: n.isDeleteConfirm,
|
|
286
|
-
"onUpdate:visible": e[3] || (e[3] = (
|
|
286
|
+
"onUpdate:visible": e[3] || (e[3] = (_) => n.isDeleteConfirm = _),
|
|
287
287
|
title: "Ви впевнені?"
|
|
288
288
|
}, {
|
|
289
|
-
default:
|
|
290
|
-
l("div",
|
|
289
|
+
default: y(() => [
|
|
290
|
+
l("div", Pe, [
|
|
291
291
|
e[6] || (e[6] = l("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
|
292
|
-
l("div",
|
|
292
|
+
l("div", Ee, [
|
|
293
293
|
l("button", {
|
|
294
294
|
type: "button",
|
|
295
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",
|
|
296
|
-
onClick: e[1] || (e[1] = (
|
|
296
|
+
onClick: e[1] || (e[1] = (_) => n.isDeleteConfirm = !1)
|
|
297
297
|
}, " Скасувати "),
|
|
298
298
|
l("button", {
|
|
299
299
|
type: "button",
|
|
300
300
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",
|
|
301
|
-
onClick: e[2] || (e[2] = (...
|
|
301
|
+
onClick: e[2] || (e[2] = (..._) => s.deleteElement && s.deleteElement(..._))
|
|
302
302
|
}, " Так, я впевнена/ий ")
|
|
303
303
|
])
|
|
304
304
|
])
|
|
@@ -307,7 +307,7 @@ function ze(t, e, r, a, n, s) {
|
|
|
307
307
|
}, 8, ["visible"])
|
|
308
308
|
], 64);
|
|
309
309
|
}
|
|
310
|
-
const
|
|
310
|
+
const Ue = /* @__PURE__ */ m(Ae, [["render", Le]]), qe = {}, Oe = {
|
|
311
311
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
|
312
312
|
xmlns: "http://www.w3.org/2000/svg",
|
|
313
313
|
viewBox: "0 0 24 24",
|
|
@@ -317,22 +317,20 @@ const Le = /* @__PURE__ */ b(Ae, [["render", ze]]), Ue = {}, qe = {
|
|
|
317
317
|
"stroke-linecap": "round",
|
|
318
318
|
"stroke-linejoin": "round"
|
|
319
319
|
};
|
|
320
|
-
function
|
|
321
|
-
return o(), i("svg",
|
|
320
|
+
function We(t, e, r, a, n, s) {
|
|
321
|
+
return o(), i("svg", Oe, e[0] || (e[0] = [
|
|
322
322
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
323
323
|
l("path", { d: "M7 20V4" }, null, -1),
|
|
324
324
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
|
325
325
|
l("path", { d: "M17 4v16" }, null, -1)
|
|
326
326
|
]));
|
|
327
327
|
}
|
|
328
|
-
const He = /* @__PURE__ */
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
} },
|
|
332
|
-
table: { type: String, default: () => "" }
|
|
333
|
-
},
|
|
328
|
+
const He = /* @__PURE__ */ m(qe, [["render", We]]), Ne = {
|
|
329
|
+
components: { IconExport: He },
|
|
330
|
+
props: { table: String, columns: Array },
|
|
334
331
|
data() {
|
|
335
332
|
return {
|
|
333
|
+
isOpen: !1,
|
|
336
334
|
tableFormats: ["json", "csv", "xlsx"],
|
|
337
335
|
format: "",
|
|
338
336
|
cols: []
|
|
@@ -341,7 +339,7 @@ const He = /* @__PURE__ */ b(Ue, [["render", Oe]]), Ne = {
|
|
|
341
339
|
methods: {
|
|
342
340
|
async exportTable() {
|
|
343
341
|
try {
|
|
344
|
-
const t = await
|
|
342
|
+
const t = await C.get("/api/export", {
|
|
345
343
|
params: {
|
|
346
344
|
table: this.table,
|
|
347
345
|
format: this.format,
|
|
@@ -371,85 +369,20 @@ const He = /* @__PURE__ */ b(Ue, [["render", Oe]]), Ne = {
|
|
|
371
369
|
this.format = t;
|
|
372
370
|
}
|
|
373
371
|
}
|
|
374
|
-
}, Re = { class: "p-4" }, Ge = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" },
|
|
372
|
+
}, Re = { class: "p-4" }, Ge = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, Ze = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, Je = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, Ke = { class: "mt-2 space-y-2" }, Qe = ["id", "onChange"], Xe = ["for"], Ye = { class: "flex w-full justify-end p-[20px] gap-[6px] border-t" };
|
|
375
373
|
function et(t, e, r, a, n, s) {
|
|
376
|
-
const
|
|
377
|
-
return o(), i(x, null, [
|
|
378
|
-
e[4] || (e[4] = l("div", { class: "dark:border-neutral-700" }, null, -1)),
|
|
379
|
-
l("div", Re, [
|
|
380
|
-
l("div", Ge, [
|
|
381
|
-
e[2] || (e[2] = l("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
|
382
|
-
l("div", We, [
|
|
383
|
-
(o(!0), i(x, null, C(r.columns, (c, f) => (o(), i("div", {
|
|
384
|
-
class: "flex items-center",
|
|
385
|
-
key: f,
|
|
386
|
-
style: { width: "calc((100% - 10px) / 2)" }
|
|
387
|
-
}, [
|
|
388
|
-
h(m, {
|
|
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",
|
|
390
|
-
modelValue: n.cols,
|
|
391
|
-
"onUpdate:modelValue": e[0] || (e[0] = (g) => n.cols = g),
|
|
392
|
-
value: c == null ? void 0 : c.name,
|
|
393
|
-
label: c == null ? void 0 : c.ua
|
|
394
|
-
}, null, 8, ["modelValue", "value", "label"])
|
|
395
|
-
]))), 128))
|
|
396
|
-
])
|
|
397
|
-
]),
|
|
398
|
-
l("div", Ze, [
|
|
399
|
-
e[3] || (e[3] = l("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть формат таблиці: ", -1)),
|
|
400
|
-
l("div", Je, [
|
|
401
|
-
(o(!0), i(x, null, C(n.tableFormats, (c, f) => (o(), i("div", {
|
|
402
|
-
class: "flex items-center",
|
|
403
|
-
key: f
|
|
404
|
-
}, [
|
|
405
|
-
l("input", {
|
|
406
|
-
type: "radio",
|
|
407
|
-
name: "hs-pro-duecmfm",
|
|
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",
|
|
409
|
-
id: c,
|
|
410
|
-
onChange: (g) => s.selectFormat(c)
|
|
411
|
-
}, null, 40, Ke),
|
|
412
|
-
l("label", {
|
|
413
|
-
for: c,
|
|
414
|
-
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
|
415
|
-
}, " Формат " + S(c), 9, Qe)
|
|
416
|
-
]))), 128))
|
|
417
|
-
])
|
|
418
|
-
]),
|
|
419
|
-
l("div", Xe, [
|
|
420
|
-
l("div", Ye, [
|
|
421
|
-
l("button", {
|
|
422
|
-
type: "button",
|
|
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",
|
|
424
|
-
onClick: e[1] || (e[1] = (...c) => s.exportTable && s.exportTable(...c))
|
|
425
|
-
}, " Завантажити таблицю ")
|
|
426
|
-
])
|
|
427
|
-
])
|
|
428
|
-
])
|
|
429
|
-
], 64);
|
|
430
|
-
}
|
|
431
|
-
const tt = /* @__PURE__ */ b(Ne, [["render", et]]), rt = {
|
|
432
|
-
components: { IconExport: He, AdminTableExportForm: tt },
|
|
433
|
-
props: { table: String, columns: Array },
|
|
434
|
-
data() {
|
|
435
|
-
return {
|
|
436
|
-
isOpen: !1
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
|
-
};
|
|
440
|
-
function lt(t, e, r, a, n, s) {
|
|
441
|
-
const m = u("IconExport"), c = u("AdminTableExportForm"), f = u("VsDialog");
|
|
374
|
+
const b = d("IconExport"), f = d("VsCheckbox"), k = d("VsDialog");
|
|
442
375
|
return o(), i(x, null, [
|
|
443
376
|
l("button", {
|
|
444
|
-
onClick: e[0] || (e[0] = (
|
|
377
|
+
onClick: e[0] || (e[0] = (u) => n.isOpen = !0),
|
|
445
378
|
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"
|
|
446
379
|
}, [
|
|
447
|
-
h(
|
|
380
|
+
h(b, {
|
|
448
381
|
height: "16",
|
|
449
382
|
width: "16"
|
|
450
383
|
}),
|
|
451
|
-
e[
|
|
452
|
-
e[
|
|
384
|
+
e[4] || (e[4] = T(" Експорт ")),
|
|
385
|
+
e[5] || (e[5] = l("svg", {
|
|
453
386
|
class: "shrink-0 size-3.5",
|
|
454
387
|
xmlns: "http://www.w3.org/2000/svg",
|
|
455
388
|
width: "24",
|
|
@@ -464,22 +397,75 @@ function lt(t, e, r, a, n, s) {
|
|
|
464
397
|
l("path", { d: "m6 9 6 6 6-6" })
|
|
465
398
|
], -1))
|
|
466
399
|
]),
|
|
467
|
-
h(
|
|
400
|
+
h(k, {
|
|
468
401
|
visible: n.isOpen,
|
|
469
|
-
"onUpdate:visible": e[
|
|
470
|
-
title: "Експорт таблиці"
|
|
402
|
+
"onUpdate:visible": e[3] || (e[3] = (u) => n.isOpen = u),
|
|
403
|
+
title: "Експорт таблиці",
|
|
404
|
+
size: "small"
|
|
471
405
|
}, {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
406
|
+
footer: y(() => [
|
|
407
|
+
l("div", Ye, [
|
|
408
|
+
e[8] || (e[8] = l("button", {
|
|
409
|
+
type: "button",
|
|
410
|
+
class: "py-2 px-3 text-nowrap inline-flex justify-center items-center text-start bg-white border border-gray-200 text-gray-800 text-sm font-medium rounded-lg shadow-sm align-middle 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",
|
|
411
|
+
"data-hs-overlay": "#hs-pro-decm"
|
|
412
|
+
}, " Скасувати ", -1)),
|
|
413
|
+
l("button", {
|
|
414
|
+
type: "button",
|
|
415
|
+
class: "py-2 px-3 text-nowrap inline-flex justify-center items-center gap-x-2 text-start bg-blue-600 border border-blue-600 text-white text-sm font-medium rounded-lg shadow-sm align-middle 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",
|
|
416
|
+
onClick: e[2] || (e[2] = (...u) => s.exportTable && s.exportTable(...u))
|
|
417
|
+
}, " Завантажити таблицю ")
|
|
418
|
+
])
|
|
419
|
+
]),
|
|
420
|
+
default: y(() => [
|
|
421
|
+
e[9] || (e[9] = l("div", { class: "dark:border-neutral-700" }, null, -1)),
|
|
422
|
+
l("div", Re, [
|
|
423
|
+
l("div", Ge, [
|
|
424
|
+
e[6] || (e[6] = l("h2", { class: "text-sm text-gray-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
|
425
|
+
l("div", Ze, [
|
|
426
|
+
(o(!0), i(x, null, S(r.columns, (u, w) => (o(), i("div", {
|
|
427
|
+
class: "flex items-center",
|
|
428
|
+
key: w,
|
|
429
|
+
style: { width: "calc((100% - 10px) / 2)" }
|
|
430
|
+
}, [
|
|
431
|
+
h(f, {
|
|
432
|
+
class: "[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",
|
|
433
|
+
modelValue: n.cols,
|
|
434
|
+
"onUpdate:modelValue": e[1] || (e[1] = ($) => n.cols = $),
|
|
435
|
+
value: u == null ? void 0 : u.name,
|
|
436
|
+
label: u == null ? void 0 : u.ua
|
|
437
|
+
}, null, 8, ["modelValue", "value", "label"])
|
|
438
|
+
]))), 128))
|
|
439
|
+
])
|
|
440
|
+
]),
|
|
441
|
+
l("div", Je, [
|
|
442
|
+
e[7] || (e[7] = l("h2", { class: "text-sm text-gray-500" }, "Виберіть формат таблиці:", -1)),
|
|
443
|
+
l("div", Ke, [
|
|
444
|
+
(o(!0), i(x, null, S(n.tableFormats, (u, w) => (o(), i("div", {
|
|
445
|
+
class: "flex items-center",
|
|
446
|
+
key: w
|
|
447
|
+
}, [
|
|
448
|
+
l("input", {
|
|
449
|
+
type: "radio",
|
|
450
|
+
name: "hs-pro-duecmfm",
|
|
451
|
+
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",
|
|
452
|
+
id: u,
|
|
453
|
+
onChange: ($) => s.selectFormat(u)
|
|
454
|
+
}, null, 40, Qe),
|
|
455
|
+
l("label", {
|
|
456
|
+
for: u,
|
|
457
|
+
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
|
458
|
+
}, " Формат " + V(u), 9, Xe)
|
|
459
|
+
]))), 128))
|
|
460
|
+
])
|
|
461
|
+
])
|
|
462
|
+
])
|
|
477
463
|
]),
|
|
478
464
|
_: 1
|
|
479
465
|
}, 8, ["visible"])
|
|
480
466
|
], 64);
|
|
481
467
|
}
|
|
482
|
-
const
|
|
468
|
+
const tt = /* @__PURE__ */ m(Ne, [["render", et]]), rt = {}, lt = {
|
|
483
469
|
xmlns: "http://www.w3.org/2000/svg",
|
|
484
470
|
viewBox: "0 0 24 24",
|
|
485
471
|
fill: "none",
|
|
@@ -489,12 +475,12 @@ const nt = /* @__PURE__ */ b(rt, [["render", lt]]), st = {}, ot = {
|
|
|
489
475
|
"stroke-linejoin": "round",
|
|
490
476
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
|
491
477
|
};
|
|
492
|
-
function
|
|
493
|
-
return o(), i("svg",
|
|
478
|
+
function nt(t, e, r, a, n, s) {
|
|
479
|
+
return o(), i("svg", lt, e[0] || (e[0] = [
|
|
494
480
|
A('<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)
|
|
495
481
|
]));
|
|
496
482
|
}
|
|
497
|
-
const
|
|
483
|
+
const st = /* @__PURE__ */ m(rt, [["render", nt]]), ot = {
|
|
498
484
|
props: { column: Object },
|
|
499
485
|
emits: ["update-column"],
|
|
500
486
|
data() {
|
|
@@ -511,21 +497,21 @@ const it = /* @__PURE__ */ b(st, [["render", at]]), ut = {
|
|
|
511
497
|
var t;
|
|
512
498
|
((t = this.column) == null ? void 0 : t.hidden) !== !0 && (this.value = !0);
|
|
513
499
|
}
|
|
514
|
-
},
|
|
515
|
-
function
|
|
516
|
-
var
|
|
517
|
-
return o(), i("label",
|
|
518
|
-
|
|
519
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
500
|
+
}, at = { class: "flex w-full gap-[8px] items-centr" };
|
|
501
|
+
function it(t, e, r, a, n, s) {
|
|
502
|
+
var b, f;
|
|
503
|
+
return o(), i("label", at, [
|
|
504
|
+
X(l("input", {
|
|
505
|
+
"onUpdate:modelValue": e[0] || (e[0] = (k) => n.value = k),
|
|
520
506
|
type: "checkbox"
|
|
521
507
|
}, null, 512), [
|
|
522
|
-
[
|
|
508
|
+
[re, n.value]
|
|
523
509
|
]),
|
|
524
|
-
|
|
510
|
+
T(" " + V(((b = r.column) == null ? void 0 : b.ua) || ((f = r.column) == null ? void 0 : f.title)), 1)
|
|
525
511
|
]);
|
|
526
512
|
}
|
|
527
|
-
const
|
|
528
|
-
components: { IconColumns:
|
|
513
|
+
const dt = /* @__PURE__ */ m(ot, [["render", it]]), ct = {
|
|
514
|
+
components: { IconColumns: st, AdminTableColumnsHiddenItem: dt },
|
|
529
515
|
emits: ["update-columns"],
|
|
530
516
|
props: { columns: Array },
|
|
531
517
|
methods: {
|
|
@@ -534,28 +520,28 @@ const ht = /* @__PURE__ */ b(ut, [["render", dt]]), pt = {
|
|
|
534
520
|
r[e] = t, this.$emit("update-columns", [...r]);
|
|
535
521
|
}
|
|
536
522
|
}
|
|
537
|
-
},
|
|
538
|
-
function
|
|
539
|
-
const
|
|
540
|
-
return o(),
|
|
523
|
+
}, ut = { 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" }, ht = { class: "py-[10px] px-[10px] w-[260px]" }, pt = { class: "flex flex-col gap-[3px] max-h-[400px] w-full overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
|
|
524
|
+
function mt(t, e, r, a, n, s) {
|
|
525
|
+
const b = d("IconColumns"), f = d("AdminTableColumnsHiddenItem"), k = d("VsPopover");
|
|
526
|
+
return o(), g(k, {
|
|
541
527
|
trigger: "click",
|
|
542
528
|
placement: "bottom"
|
|
543
529
|
}, {
|
|
544
|
-
reference:
|
|
545
|
-
l("button",
|
|
546
|
-
h(
|
|
530
|
+
reference: y(() => [
|
|
531
|
+
l("button", ut, [
|
|
532
|
+
h(b, {
|
|
547
533
|
height: "20",
|
|
548
534
|
width: "16"
|
|
549
535
|
})
|
|
550
536
|
])
|
|
551
537
|
]),
|
|
552
|
-
default:
|
|
553
|
-
l("div",
|
|
538
|
+
default: y(() => [
|
|
539
|
+
l("div", ht, [
|
|
554
540
|
e[0] || (e[0] = l("h2", { class: "text-sm mb-[8px]" }, "Оберіть колонки, щоб приховати", -1)),
|
|
555
|
-
l("ul",
|
|
556
|
-
(o(!0), i(x, null,
|
|
557
|
-
h(
|
|
558
|
-
column:
|
|
541
|
+
l("ul", pt, [
|
|
542
|
+
(o(!0), i(x, null, S(r.columns, (u, w) => (o(), i("li", { key: w }, [
|
|
543
|
+
h(f, {
|
|
544
|
+
column: u,
|
|
559
545
|
onUpdateColumn: s.updateColumn
|
|
560
546
|
}, null, 8, ["column", "onUpdateColumn"])
|
|
561
547
|
]))), 128))
|
|
@@ -565,14 +551,14 @@ function ft(t, e, r, a, n, s) {
|
|
|
565
551
|
_: 1
|
|
566
552
|
});
|
|
567
553
|
}
|
|
568
|
-
const
|
|
554
|
+
const bt = /* @__PURE__ */ m(ct, [["render", mt]]), ft = {}, gt = {
|
|
569
555
|
class: "hidden sm:block shrink-0 size-3",
|
|
570
556
|
xmlns: "http://www.w3.org/2000/svg",
|
|
571
557
|
fill: "currentColor",
|
|
572
558
|
viewBox: "0 0 16 16"
|
|
573
559
|
};
|
|
574
|
-
function
|
|
575
|
-
return o(), i("svg",
|
|
560
|
+
function xt(t, e, r, a, n, s) {
|
|
561
|
+
return o(), i("svg", gt, e[0] || (e[0] = [
|
|
576
562
|
l("path", {
|
|
577
563
|
"fill-rule": "evenodd",
|
|
578
564
|
"clip-rule": "evenodd",
|
|
@@ -580,23 +566,23 @@ function kt(t, e, r, a, n, s) {
|
|
|
580
566
|
}, null, -1)
|
|
581
567
|
]));
|
|
582
568
|
}
|
|
583
|
-
const
|
|
584
|
-
function
|
|
585
|
-
return o(), i("div",
|
|
569
|
+
const yt = /* @__PURE__ */ m(ft, [["render", xt]]), kt = {}, wt = { class: "vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden" };
|
|
570
|
+
function _t(t, e, r, a, n, s) {
|
|
571
|
+
return o(), i("div", wt, e[0] || (e[0] = [
|
|
586
572
|
A('<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)
|
|
587
573
|
]));
|
|
588
574
|
}
|
|
589
|
-
const
|
|
575
|
+
const vt = /* @__PURE__ */ m(kt, [["render", _t]]), Ct = {
|
|
590
576
|
props: { table: String, title: String },
|
|
591
577
|
components: {
|
|
592
|
-
IconFilter:
|
|
593
|
-
AdminTableControl:
|
|
594
|
-
AdminTableExport:
|
|
595
|
-
AdminTableColumnsHidden:
|
|
596
|
-
AdminTableColumn:
|
|
597
|
-
AdminNodata:
|
|
598
|
-
IconPlus:
|
|
599
|
-
IconSearch:
|
|
578
|
+
IconFilter: ce,
|
|
579
|
+
AdminTableControl: Ue,
|
|
580
|
+
AdminTableExport: tt,
|
|
581
|
+
AdminTableColumnsHidden: bt,
|
|
582
|
+
AdminTableColumn: xe,
|
|
583
|
+
AdminNodata: vt,
|
|
584
|
+
IconPlus: yt,
|
|
585
|
+
IconSearch: oe
|
|
600
586
|
},
|
|
601
587
|
data() {
|
|
602
588
|
return {
|
|
@@ -635,6 +621,10 @@ const $t = /* @__PURE__ */ b(wt, [["render", Ct]]), St = {
|
|
|
635
621
|
isNoData() {
|
|
636
622
|
var t, e;
|
|
637
623
|
return !((t = this.tableData) != null && t.rows) || !((e = this.columns) != null && e.length);
|
|
624
|
+
},
|
|
625
|
+
rowWidth() {
|
|
626
|
+
var t;
|
|
627
|
+
return ((t = this.tableData) == null ? void 0 : t.width) || "80px";
|
|
638
628
|
}
|
|
639
629
|
},
|
|
640
630
|
watch: {
|
|
@@ -660,7 +650,7 @@ const $t = /* @__PURE__ */ b(wt, [["render", Ct]]), St = {
|
|
|
660
650
|
async getTableData() {
|
|
661
651
|
var t, e;
|
|
662
652
|
try {
|
|
663
|
-
const { data: r } = await
|
|
653
|
+
const { data: r } = await C.get(`/api/template/table/${this.table}`), a = await C.get(`/api/table-data/${this.table}`, {
|
|
664
654
|
params: {
|
|
665
655
|
page: this.page,
|
|
666
656
|
search: this.searchValue || null,
|
|
@@ -679,7 +669,7 @@ const $t = /* @__PURE__ */ b(wt, [["render", Ct]]), St = {
|
|
|
679
669
|
async getFilters() {
|
|
680
670
|
var t;
|
|
681
671
|
try {
|
|
682
|
-
const { data: e } = await
|
|
672
|
+
const { data: e } = await C.get(`/api/table-filter/${this.table}`);
|
|
683
673
|
this.filterScheme = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map((r) => ({
|
|
684
674
|
...r,
|
|
685
675
|
label: (r == null ? void 0 : r.label) || (r == null ? void 0 : r.ua)
|
|
@@ -709,132 +699,139 @@ const $t = /* @__PURE__ */ b(wt, [["render", Ct]]), St = {
|
|
|
709
699
|
((e = this.tableData) == null ? void 0 : e.card) === !1 || this.$router.push(`/card/${this.table}/${t}`);
|
|
710
700
|
}
|
|
711
701
|
}
|
|
712
|
-
},
|
|
702
|
+
}, $t = { class: "w-[calc(100vw - 320px)]" }, St = { class: "h-[76px] bg-gray-50 flex items-center justify-between px-[30px]" }, Tt = { class: "text-xl font-medium h-[20px]" }, Vt = {
|
|
713
703
|
style: { height: "calc(100vh - 140px)", width: "calc(100vw - 260px)" },
|
|
714
704
|
class: "bg-gray-50 p-[20px] flex pt-[10px]"
|
|
715
|
-
},
|
|
705
|
+
}, Ft = { class: "bg-white w-full rounded-xl border p-[20px]" }, Dt = { class: "flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative" }, Mt = { class: "flex gap-[6px] ml-auto" }, At = {
|
|
716
706
|
key: 0,
|
|
717
707
|
class: "font-medium text-[10px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full dark:bg-neutral-500"
|
|
718
|
-
},
|
|
708
|
+
}, It = { class: "space-y-5 flex items-start w-full justify-start" }, Bt = {
|
|
719
709
|
style: { height: "calc(100vh - 310px)" },
|
|
720
710
|
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"
|
|
721
|
-
},
|
|
711
|
+
}, jt = { class: "inline-block w-full align-middle" }, zt = {
|
|
722
712
|
key: 0,
|
|
723
713
|
class: "divide-y divide-gray-200 min-w-full dark:divide-neutral-700 relative table-fixed"
|
|
724
|
-
},
|
|
714
|
+
}, Pt = { 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" }, Et = { class: "divide-y divide-gray-200" }, Lt = ["onClick"], Ut = { class: "text-center sticky right-0 bg-white w-[80px] px-[10px]" }, qt = { class: "p-[20px] flex justify-end w-full" }, Ot = { 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" };
|
|
725
715
|
function Wt(t, e, r, a, n, s) {
|
|
726
|
-
var
|
|
727
|
-
const
|
|
716
|
+
var z, P, E, L, U, q;
|
|
717
|
+
const b = d("IconPlus"), f = d("router-link"), k = d("IconSearch"), u = d("VsText"), w = d("AdminTableColumnsHidden"), $ = d("AdminTableExport"), _ = d("IconFilter"), F = d("AdminTableColumn"), D = d("AdminTableControl"), I = d("AdminNodata"), Y = d("VsPagination"), ee = d("VsFilter");
|
|
728
718
|
return o(), i(x, null, [
|
|
729
|
-
l("div",
|
|
730
|
-
l("div",
|
|
731
|
-
l("h2",
|
|
732
|
-
s.isForm ? (o(),
|
|
719
|
+
l("div", $t, [
|
|
720
|
+
l("div", St, [
|
|
721
|
+
l("h2", Tt, V(r.title), 1),
|
|
722
|
+
s.isForm ? (o(), g(f, {
|
|
733
723
|
key: 0,
|
|
734
|
-
to: `/add?table=${(
|
|
724
|
+
to: `/add?table=${(P = (z = t.$route) == null ? void 0 : z.params) == null ? void 0 : P.catchAll}`,
|
|
735
725
|
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"
|
|
736
726
|
}, {
|
|
737
|
-
default:
|
|
738
|
-
h(
|
|
727
|
+
default: y(() => [
|
|
728
|
+
h(b, {
|
|
739
729
|
height: "16",
|
|
740
730
|
width: "16"
|
|
741
731
|
}),
|
|
742
|
-
e[5] || (e[5] =
|
|
732
|
+
e[5] || (e[5] = T(" Додати "))
|
|
743
733
|
]),
|
|
744
734
|
_: 1
|
|
745
|
-
}, 8, ["to"])) :
|
|
735
|
+
}, 8, ["to"])) : v("", !0)
|
|
746
736
|
]),
|
|
747
|
-
l("div",
|
|
748
|
-
l("div",
|
|
749
|
-
l("div",
|
|
750
|
-
h(
|
|
737
|
+
l("div", Vt, [
|
|
738
|
+
l("div", Ft, [
|
|
739
|
+
l("div", Dt, [
|
|
740
|
+
h(k, {
|
|
751
741
|
height: "14",
|
|
752
742
|
width: "14",
|
|
753
743
|
class: "absolute top-[10px] left-[14px] text-gray-500 z-[1]"
|
|
754
744
|
}),
|
|
755
|
-
h(
|
|
745
|
+
h(u, {
|
|
756
746
|
modelValue: n.searchValue,
|
|
757
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
747
|
+
"onUpdate:modelValue": e[0] || (e[0] = (c) => n.searchValue = c),
|
|
758
748
|
placeholder: "Пошук...",
|
|
759
749
|
clearable: !0,
|
|
760
750
|
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"
|
|
761
751
|
}, null, 8, ["modelValue"]),
|
|
762
|
-
l("div",
|
|
763
|
-
h(
|
|
764
|
-
columns: (
|
|
765
|
-
onUpdateColumns: e[1] || (e[1] = (
|
|
752
|
+
l("div", Mt, [
|
|
753
|
+
h(w, {
|
|
754
|
+
columns: (E = n.tableData) == null ? void 0 : E.columns,
|
|
755
|
+
onUpdateColumns: e[1] || (e[1] = (c) => n.tableData.columns = c)
|
|
766
756
|
}, null, 8, ["columns"]),
|
|
767
|
-
h(
|
|
757
|
+
h($, {
|
|
768
758
|
table: r.table,
|
|
769
|
-
columns: (
|
|
759
|
+
columns: (L = n.tableData) == null ? void 0 : L.columns
|
|
770
760
|
}, null, 8, ["table", "columns"]),
|
|
771
761
|
l("button", {
|
|
772
|
-
onClick: e[2] || (e[2] = (
|
|
762
|
+
onClick: e[2] || (e[2] = (c) => n.isFilters = !n.isFilters),
|
|
773
763
|
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"
|
|
774
764
|
}, [
|
|
775
|
-
h(
|
|
765
|
+
h(_, {
|
|
776
766
|
height: "16",
|
|
777
767
|
width: "16"
|
|
778
768
|
}),
|
|
779
|
-
e[6] || (e[6] =
|
|
780
|
-
n.onFilters ? (o(), i("span",
|
|
769
|
+
e[6] || (e[6] = T(" Фільтри ")),
|
|
770
|
+
n.onFilters ? (o(), i("span", At, V(n.onFilters), 1)) : v("", !0)
|
|
781
771
|
])
|
|
782
772
|
])
|
|
783
773
|
]),
|
|
784
|
-
l("div",
|
|
785
|
-
l("div",
|
|
786
|
-
l("div",
|
|
787
|
-
s.isNoData ? (o(),
|
|
788
|
-
l("thead",
|
|
789
|
-
l("tr",
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
774
|
+
l("div", It, [
|
|
775
|
+
l("div", Bt, [
|
|
776
|
+
l("div", jt, [
|
|
777
|
+
s.isNoData ? (o(), g(I, { key: 1 })) : (o(), i("table", zt, [
|
|
778
|
+
l("thead", Pt, [
|
|
779
|
+
l("tr", {
|
|
780
|
+
class: "border-stone-200 right-0 z-[1]",
|
|
781
|
+
style: j({ minWidth: s.rowWidth, maxWidth: s.rowWidth })
|
|
782
|
+
}, [
|
|
783
|
+
(o(!0), i(x, null, S(s.columns, (c) => (o(), g(F, {
|
|
784
|
+
key: c.name,
|
|
785
|
+
data: c,
|
|
793
786
|
activeColumn: n.activeColumn,
|
|
794
787
|
onChangeActive: s.changeActiveColumn
|
|
795
788
|
}, null, 8, ["data", "activeColumn", "onChangeActive"]))), 128)),
|
|
796
789
|
e[7] || (e[7] = l("th", { class: "w-[70px] sticky right-0 top-0 bg-white" }, null, -1))
|
|
797
|
-
])
|
|
790
|
+
], 4)
|
|
798
791
|
]),
|
|
799
|
-
l("tbody",
|
|
800
|
-
(o(!0), i(x, null,
|
|
801
|
-
var
|
|
802
|
-
return o(), i("tr", { key:
|
|
803
|
-
l("td",
|
|
792
|
+
l("tbody", Et, [
|
|
793
|
+
(o(!0), i(x, null, S((U = n.tableData) == null ? void 0 : U.rows, (c, M) => {
|
|
794
|
+
var O, W, H, N, R, G, Z, J;
|
|
795
|
+
return o(), i("tr", { key: M }, [
|
|
796
|
+
l("td", {
|
|
797
|
+
class: "text-start pe-4 py-3 text-sm text-gray-600",
|
|
798
|
+
style: j({ minWidth: s.rowWidth, maxWidth: s.rowWidth })
|
|
799
|
+
}, [
|
|
804
800
|
l("button", {
|
|
805
|
-
onClick: () => s.pushToCard(
|
|
806
|
-
class:
|
|
807
|
-
((
|
|
801
|
+
onClick: () => s.pushToCard(c == null ? void 0 : c.id),
|
|
802
|
+
class: le(["text-sm font-medium", [
|
|
803
|
+
((O = n.tableData) == null ? void 0 : O.card) === !1 ? "" : "text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"
|
|
808
804
|
]])
|
|
809
805
|
}, [
|
|
810
|
-
(o(),
|
|
811
|
-
((
|
|
806
|
+
(o(), g(Q(
|
|
807
|
+
((W = s.columns[0]) == null ? void 0 : W.format) === "custom" ? (H = s.columns[0]) == null ? void 0 : H.component : t.$componentsConfig[`table-format-${((R = (N = s.columns[0]) == null ? void 0 : N.format) == null ? void 0 : R.toLowerCase()) || "text"}`]
|
|
812
808
|
), {
|
|
813
809
|
name: (G = s.columns[0]) == null ? void 0 : G.name,
|
|
814
|
-
data:
|
|
815
|
-
value:
|
|
810
|
+
data: c,
|
|
811
|
+
value: c == null ? void 0 : c[(Z = s.columns[0]) == null ? void 0 : Z.name]
|
|
816
812
|
}, null, 8, ["name", "data", "value"]))
|
|
817
|
-
], 10,
|
|
818
|
-
]),
|
|
819
|
-
(o(!0), i(x, null,
|
|
820
|
-
var
|
|
813
|
+
], 10, Lt)
|
|
814
|
+
], 4),
|
|
815
|
+
(o(!0), i(x, null, S((J = s.columns) == null ? void 0 : J.slice(1), (p) => {
|
|
816
|
+
var K;
|
|
821
817
|
return o(), i("td", {
|
|
822
|
-
class: "
|
|
818
|
+
class: "text-start px-[4px] py-3 text-sm text-gray-600",
|
|
819
|
+
style: j({ minWidth: s.rowWidth, maxWidth: s.rowWidth }),
|
|
823
820
|
key: p.name
|
|
824
821
|
}, [
|
|
825
|
-
(o(),
|
|
826
|
-
(p == null ? void 0 : p.format) === "custom" ? p == null ? void 0 : p.component : t.$componentsConfig[`table-format-${((
|
|
822
|
+
(o(), g(Q(
|
|
823
|
+
(p == null ? void 0 : p.format) === "custom" ? p == null ? void 0 : p.component : t.$componentsConfig[`table-format-${((K = p == null ? void 0 : p.format) == null ? void 0 : K.toLowerCase()) || "text"}`]
|
|
827
824
|
), {
|
|
828
825
|
name: p == null ? void 0 : p.name,
|
|
829
|
-
data:
|
|
830
|
-
value:
|
|
826
|
+
data: c,
|
|
827
|
+
value: c == null ? void 0 : c[p == null ? void 0 : p.name]
|
|
831
828
|
}, null, 8, ["name", "data", "value"]))
|
|
832
|
-
]);
|
|
829
|
+
], 4);
|
|
833
830
|
}), 128)),
|
|
834
|
-
l("td",
|
|
835
|
-
h(
|
|
831
|
+
l("td", Ut, [
|
|
832
|
+
h(D, {
|
|
836
833
|
isForm: s.isForm,
|
|
837
|
-
item:
|
|
834
|
+
item: c,
|
|
838
835
|
table: r.table,
|
|
839
836
|
onUpdateTable: s.getTableData
|
|
840
837
|
}, null, 8, ["isForm", "item", "table", "onUpdateTable"])
|
|
@@ -846,33 +843,33 @@ function Wt(t, e, r, a, n, s) {
|
|
|
846
843
|
])
|
|
847
844
|
])
|
|
848
845
|
]),
|
|
849
|
-
l("div",
|
|
850
|
-
n.limit ? (o(),
|
|
846
|
+
l("div", qt, [
|
|
847
|
+
n.limit ? (o(), g(Y, {
|
|
851
848
|
key: 0,
|
|
852
849
|
goTo: !1,
|
|
853
850
|
class: "justify-end",
|
|
854
851
|
"default-page": s.defaultPage,
|
|
855
|
-
total: ((
|
|
852
|
+
total: ((q = n.tableData) == null ? void 0 : q.total) || 0,
|
|
856
853
|
pageSize: n.limit,
|
|
857
854
|
onPageChange: s.handlePageChange,
|
|
858
855
|
pageSizes: [10, 16, 20],
|
|
859
856
|
onPageSizeChange: s.changeLimit
|
|
860
|
-
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])) :
|
|
857
|
+
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])) : v("", !0)
|
|
861
858
|
])
|
|
862
859
|
])
|
|
863
860
|
])
|
|
864
861
|
]),
|
|
865
|
-
h(
|
|
866
|
-
default:
|
|
867
|
-
var
|
|
862
|
+
h(ne, { name: "fade" }, {
|
|
863
|
+
default: y(() => {
|
|
864
|
+
var c;
|
|
868
865
|
return [
|
|
869
|
-
|
|
870
|
-
onClick: e[4] || (e[4] = (...
|
|
866
|
+
X(l("div", {
|
|
867
|
+
onClick: e[4] || (e[4] = (...M) => s.closeFilter && s.closeFilter(...M)),
|
|
871
868
|
style: { height: "100vh" },
|
|
872
869
|
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)]"
|
|
873
870
|
}, [
|
|
874
|
-
l("div",
|
|
875
|
-
(
|
|
871
|
+
l("div", Ot, [
|
|
872
|
+
(c = n.filterScheme) != null && c.length ? (o(), g(ee, {
|
|
876
873
|
key: 0,
|
|
877
874
|
ref: "filter",
|
|
878
875
|
scheme: n.filterScheme,
|
|
@@ -882,11 +879,11 @@ function Wt(t, e, r, a, n, s) {
|
|
|
882
879
|
name: "filter",
|
|
883
880
|
onFilterChange: s.filterChange,
|
|
884
881
|
closeFilterBtn: !0,
|
|
885
|
-
onFilterClose: e[3] || (e[3] = (
|
|
886
|
-
}, null, 8, ["scheme", "onFilterChange"])) :
|
|
882
|
+
onFilterClose: e[3] || (e[3] = (M) => n.isFilters = !1)
|
|
883
|
+
}, null, 8, ["scheme", "onFilterChange"])) : v("", !0)
|
|
887
884
|
])
|
|
888
885
|
], 512), [
|
|
889
|
-
[
|
|
886
|
+
[se, n.isFilters]
|
|
890
887
|
])
|
|
891
888
|
];
|
|
892
889
|
}),
|
|
@@ -894,8 +891,8 @@ function Wt(t, e, r, a, n, s) {
|
|
|
894
891
|
})
|
|
895
892
|
], 64);
|
|
896
893
|
}
|
|
897
|
-
const
|
|
898
|
-
components: { AdminTable:
|
|
894
|
+
const Ht = /* @__PURE__ */ m(Ct, [["render", Wt]]), Nt = {
|
|
895
|
+
components: { AdminTable: Ht },
|
|
899
896
|
data() {
|
|
900
897
|
return {
|
|
901
898
|
table: !1,
|
|
@@ -927,7 +924,7 @@ const Zt = /* @__PURE__ */ b(St, [["render", Wt]]), Jt = {
|
|
|
927
924
|
},
|
|
928
925
|
async getMenu() {
|
|
929
926
|
try {
|
|
930
|
-
const { data: t } = await
|
|
927
|
+
const { data: t } = await C.get("/api/user-menu");
|
|
931
928
|
B.value = t;
|
|
932
929
|
} catch {
|
|
933
930
|
}
|
|
@@ -946,7 +943,7 @@ const Zt = /* @__PURE__ */ b(St, [["render", Wt]]), Jt = {
|
|
|
946
943
|
async getInterface() {
|
|
947
944
|
var t, e;
|
|
948
945
|
try {
|
|
949
|
-
const { data: r } = await
|
|
946
|
+
const { data: r } = await C.get(
|
|
950
947
|
`/api/template/interface/${((e = (t = this.$route) == null ? void 0 : t.params) == null ? void 0 : e.catchAll) || ""}`
|
|
951
948
|
);
|
|
952
949
|
this.interface = r || "";
|
|
@@ -955,10 +952,10 @@ const Zt = /* @__PURE__ */ b(St, [["render", Wt]]), Jt = {
|
|
|
955
952
|
}
|
|
956
953
|
}
|
|
957
954
|
}
|
|
958
|
-
},
|
|
959
|
-
function
|
|
960
|
-
const
|
|
961
|
-
return n.table ? (o(),
|
|
955
|
+
}, Rt = ["innerHTML"];
|
|
956
|
+
function Gt(t, e, r, a, n, s) {
|
|
957
|
+
const b = d("AdminTable");
|
|
958
|
+
return n.table ? (o(), g(b, {
|
|
962
959
|
key: 0,
|
|
963
960
|
table: n.table,
|
|
964
961
|
title: n.title
|
|
@@ -967,9 +964,9 @@ function Qt(t, e, r, a, n, s) {
|
|
|
967
964
|
class: "w-full bg-gray-50",
|
|
968
965
|
style: { height: "calc(100vh - 120px)" },
|
|
969
966
|
innerHTML: n.interface
|
|
970
|
-
}, null, 8,
|
|
967
|
+
}, null, 8, Rt));
|
|
971
968
|
}
|
|
972
|
-
const
|
|
969
|
+
const Xt = /* @__PURE__ */ m(Nt, [["render", Gt]]);
|
|
973
970
|
export {
|
|
974
|
-
|
|
971
|
+
Xt as default
|
|
975
972
|
};
|