@opengis/admin 0.1.71 → 0.1.73
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{IconChevronDown-C5bX-n6U.js → IconChevronDown-Bo0VyMHX.js} +1 -1
- package/dist/{add-page-8jUr_Av6.js → add-page-CyIBxGV_.js} +1 -1
- package/dist/{admin-interface-Cmyvtr-X.js → admin-interface-Dwr6luwW.js} +44 -44
- package/dist/{admin-view-B0lU5eIG.js → admin-view-CFzoulzN.js} +2 -2
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +97 -97
- package/dist/{card-page-DMlxnOVF.js → card-page-GyqV7foK.js} +99 -96
- package/dist/{card-view-F0hQEiNz.js → card-view-DLrRTkKE.js} +1 -1
- package/dist/{edit-page-BJSs9RJU.js → edit-page-DUBOxKSi.js} +1 -1
- package/dist/{import-file-DsHdUJ7C.js → import-file-BvAgSmhY.js} +3863 -3898
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/plugin.js +2 -78
- package/server/plugins/adminHook.js +0 -72
- package/server/plugins/hook.js +99 -37
- package/server/routes/menu/controllers/getMenu.js +10 -6
@@ -1,5 +1,5 @@
|
|
1
|
-
import { g as V, h as z, _ as A, u as L, a as q } from "./import-file-
|
2
|
-
import { computed as B, resolveComponent as R, openBlock as r, createElementBlock as s, createElementVNode as
|
1
|
+
import { g as V, h as z, _ as A, u as L, a as q } from "./import-file-BvAgSmhY.js";
|
2
|
+
import { computed as B, resolveComponent as R, openBlock as r, createElementBlock as s, createElementVNode as d, toDisplayString as M, createVNode as N, withCtx as E, createTextVNode as S, createBlock as H, createCommentVNode as l, normalizeClass as C, Fragment as w, renderList as D, resolveDynamicComponent as T } from "vue";
|
3
3
|
const G = { class: "h-[76px] bg-white border rounded-xl flex items-center justify-between px-[20px] mb-[16px]" }, O = { class: "text-lg font-semibold md:text-xl text-stone-800 dark:text-neutral-200" }, F = { class: "flex items-center gap-[6px]" }, I = {
|
4
4
|
__name: "admin-card-header",
|
5
5
|
props: {
|
@@ -12,27 +12,27 @@ const G = { class: "h-[76px] bg-white border rounded-xl flex items-center justif
|
|
12
12
|
}
|
13
13
|
},
|
14
14
|
setup(n) {
|
15
|
-
const c = n, a = V(),
|
15
|
+
const c = n, a = V(), u = z(), t = () => {
|
16
16
|
a.back();
|
17
|
-
},
|
17
|
+
}, h = B(
|
18
18
|
() => {
|
19
19
|
var x;
|
20
|
-
return `/edit?table=${c.getRoute}&id=${(x =
|
20
|
+
return `/edit?table=${c.getRoute}&id=${(x = u == null ? void 0 : u.params) == null ? void 0 : x.id}`;
|
21
21
|
}
|
22
22
|
);
|
23
23
|
return (x, g) => {
|
24
24
|
const v = R("router-link");
|
25
25
|
return r(), s("div", G, [
|
26
|
-
|
27
|
-
|
26
|
+
d("div", null, [
|
27
|
+
d("button", {
|
28
28
|
onClick: t,
|
29
29
|
class: "text-sm h-[20px] text-blue-600 font-medium hover:border-b-2 hover:border-b-blue-500"
|
30
30
|
}, " До таблиці "),
|
31
|
-
|
31
|
+
d("h2", O, M(n.title), 1)
|
32
32
|
]),
|
33
|
-
|
33
|
+
d("div", F, [
|
34
34
|
N(v, {
|
35
|
-
to:
|
35
|
+
to: h.value,
|
36
36
|
class: "inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"
|
37
37
|
}, {
|
38
38
|
default: E(() => g[0] || (g[0] = [
|
@@ -57,20 +57,20 @@ const G = { class: "h-[76px] bg-white border rounded-xl flex items-center justif
|
|
57
57
|
const n = this.flattenMenu(L.value);
|
58
58
|
n != null && n.length || this.$router.replace("/404");
|
59
59
|
const c = n == null ? void 0 : n.find((a) => {
|
60
|
-
var
|
61
|
-
return (a == null ? void 0 : a.table) == ((t = (
|
60
|
+
var u, t;
|
61
|
+
return (a == null ? void 0 : a.table) == ((t = (u = this.$route) == null ? void 0 : u.params) == null ? void 0 : t.table);
|
62
62
|
});
|
63
63
|
return c || this.$router.replace("/404"), c == null ? void 0 : c.path;
|
64
64
|
},
|
65
65
|
getTitle() {
|
66
|
-
var n, c, a,
|
66
|
+
var n, c, a, u, t, h, x, g, v, e, i, j, o, k, f;
|
67
67
|
if ((a = (c = (n = this.objectData) == null ? void 0 : n.rows) == null ? void 0 : c[0]) != null && a.name)
|
68
|
-
return ((x = (
|
68
|
+
return ((x = (h = (t = (u = this.objectData) == null ? void 0 : u.rows) == null ? void 0 : t[0]) == null ? void 0 : h.name) == null ? void 0 : x.length) < 35 ? (e = (v = (g = this.objectData) == null ? void 0 : g.rows) == null ? void 0 : v[0]) == null ? void 0 : e.name : ((k = (o = (j = (i = this.objectData) == null ? void 0 : i.rows) == null ? void 0 : j[0]) == null ? void 0 : o.name) == null ? void 0 : k.slice(0, 35)) + " ...";
|
69
69
|
{
|
70
|
-
const p = (
|
71
|
-
(
|
72
|
-
var
|
73
|
-
return (
|
70
|
+
const p = (f = this.flattenMenu(L.value)) == null ? void 0 : f.find(
|
71
|
+
(b) => {
|
72
|
+
var _, y;
|
73
|
+
return (b == null ? void 0 : b.table) === ((y = (_ = this.$route) == null ? void 0 : _.params) == null ? void 0 : y.table);
|
74
74
|
}
|
75
75
|
);
|
76
76
|
return p == null ? void 0 : p.ua;
|
@@ -91,10 +91,10 @@ const G = { class: "h-[76px] bg-white border rounded-xl flex items-center justif
|
|
91
91
|
const { table: n, id: c } = (a = this.$route) == null ? void 0 : a.params;
|
92
92
|
(!n || !c) && this.$router.replace("/404");
|
93
93
|
try {
|
94
|
-
const { data:
|
95
|
-
this.objectData =
|
96
|
-
} catch (
|
97
|
-
console.error(
|
94
|
+
const { data: u } = await q.get(`/api/table-data/${n}/${c}`);
|
95
|
+
this.objectData = u;
|
96
|
+
} catch (u) {
|
97
|
+
console.error(u);
|
98
98
|
}
|
99
99
|
},
|
100
100
|
getColClass(n) {
|
@@ -104,11 +104,11 @@ const G = { class: "h-[76px] bg-white border rounded-xl flex items-center justif
|
|
104
104
|
return "grid-cols-12";
|
105
105
|
},
|
106
106
|
checkActiveComponent() {
|
107
|
-
var n, c, a,
|
107
|
+
var n, c, a, u, t, h, x, g, v;
|
108
108
|
if ((c = (n = this.$route) == null ? void 0 : n.query) != null && c.tab)
|
109
|
-
this.component = (
|
109
|
+
this.component = (u = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : u.tab;
|
110
110
|
else {
|
111
|
-
const e = (
|
111
|
+
const e = (h = (t = this.objectData) == null ? void 0 : t.panels) == null ? void 0 : h.find((i) => (i == null ? void 0 : i.type) === "tabs");
|
112
112
|
(x = e == null ? void 0 : e.items) != null && x.length && (this.component = ((g = e.items[0]) == null ? void 0 : g.component) || ((v = e.items[0]) == null ? void 0 : v.name));
|
113
113
|
}
|
114
114
|
},
|
@@ -125,151 +125,154 @@ const G = { class: "h-[76px] bg-white border rounded-xl flex items-center justif
|
|
125
125
|
}, J = {
|
126
126
|
key: 0,
|
127
127
|
class: "bg-white border rounded-xl"
|
128
|
-
}, K = { class: "p-[10px] pl-[20px] text-md font-[500]" }, Q = ["innerHTML"], U = { key: 1 }, W = {
|
128
|
+
}, K = { class: "p-[10px] pl-[20px] text-md font-[500]" }, Q = ["innerHTML"], U = { key: 1 }, W = {
|
129
129
|
key: 0,
|
130
|
+
class: "p-[10px] pl-[20px] text-md font-[500]"
|
131
|
+
}, X = {
|
132
|
+
key: 2,
|
130
133
|
class: "p-[20px] border-t"
|
131
|
-
}, Y = {
|
132
|
-
key: 1,
|
133
|
-
class: "p-[20px] border-t"
|
134
|
-
}, Z = ["innerHTML"], m = { class: "flex space-x-1 w-full bg-white border border-b-0 rounded-tr-xl rounded-tl-xl h-[60px] items-center pl-[20px]" }, oo = ["onClick"], eo = {
|
134
|
+
}, Y = ["innerHTML"], Z = { class: "flex space-x-1 w-full bg-white border border-b-0 rounded-tr-xl rounded-tl-xl h-[60px] items-center pl-[20px]" }, m = ["onClick"], oo = {
|
135
135
|
key: 0,
|
136
136
|
class: "bg-white border border-t-0 rounded-bl-xl rounded-br-xl"
|
137
|
-
},
|
137
|
+
}, eo = {
|
138
138
|
key: 0,
|
139
139
|
class: "p-[20px] border-t"
|
140
|
-
},
|
140
|
+
}, to = {
|
141
141
|
key: 1,
|
142
142
|
class: "p-[20px] border-t"
|
143
|
-
},
|
143
|
+
}, ro = ["innerHTML"], no = {
|
144
144
|
key: 3,
|
145
145
|
class: "flex"
|
146
|
-
},
|
146
|
+
}, so = { class: "flex flex-col space-y-2 w-[200px] border rounded-xl mr-4 h-auto items-start pl-[10px] bg-white py-[20px]" }, co = ["onClick"], ao = { class: "flex-grow" }, uo = {
|
147
147
|
key: 0,
|
148
148
|
class: "h-full bg-white border rounded-xl"
|
149
|
-
},
|
149
|
+
}, lo = {
|
150
150
|
key: 0,
|
151
151
|
class: "p-[20px]"
|
152
152
|
}, ho = {
|
153
153
|
key: 1,
|
154
154
|
class: "p-[20px] border-t"
|
155
|
-
},
|
156
|
-
function
|
155
|
+
}, po = ["innerHTML"];
|
156
|
+
function bo(n, c, a, u, t, h) {
|
157
157
|
var g, v;
|
158
158
|
const x = R("AdminCardHeader");
|
159
159
|
return r(), s("div", $, [
|
160
160
|
((g = t.objectData) == null ? void 0 : g.isHeader) !== !1 ? (r(), H(x, {
|
161
161
|
key: 0,
|
162
|
-
title:
|
163
|
-
"get-route":
|
164
|
-
}, null, 8, ["title", "get-route"])) :
|
165
|
-
|
166
|
-
class:
|
162
|
+
title: h.getTitle,
|
163
|
+
"get-route": h.getRoute
|
164
|
+
}, null, 8, ["title", "get-route"])) : l("", !0),
|
165
|
+
d("div", {
|
166
|
+
class: C(["grid gap-[20px]", h.getGridClass()])
|
167
167
|
}, [
|
168
|
-
(r(!0), s(w, null,
|
169
|
-
var
|
168
|
+
(r(!0), s(w, null, D((v = t.objectData) == null ? void 0 : v.panels, (e, i) => {
|
169
|
+
var j;
|
170
170
|
return r(), s("div", {
|
171
171
|
key: i,
|
172
|
-
class:
|
172
|
+
class: C(h.getColClass(e.col))
|
173
173
|
}, [
|
174
174
|
e != null && e.name ? (r(), s("div", J, [
|
175
|
-
|
176
|
-
|
175
|
+
d("h2", K, M((e == null ? void 0 : e.title) || "Панель"), 1),
|
176
|
+
d("div", {
|
177
177
|
class: "p-[20px] border-t",
|
178
|
-
innerHTML: (
|
178
|
+
innerHTML: (j = t.objectData) == null ? void 0 : j.data[e == null ? void 0 : e.name]
|
179
179
|
}, null, 8, Q)
|
180
180
|
])) : e.type === "container" ? (r(), s("div", U, [
|
181
|
-
(r(!0), s(w, null,
|
182
|
-
var
|
181
|
+
(r(!0), s(w, null, D(e.items, (o, k) => {
|
182
|
+
var f, p, b, _, y;
|
183
183
|
return r(), s("div", {
|
184
184
|
key: k,
|
185
|
-
class:
|
185
|
+
class: C([{ "mb-[20px]": e.items.length > 1 }, "bg-white border rounded-xl"])
|
186
186
|
}, [
|
187
|
-
|
188
|
-
o != null && o.component ? (r(), s("div",
|
187
|
+
e != null && e.title ? (r(), s("h2", W, M((o == null ? void 0 : o.title) || "Панель"), 1)) : l("", !0),
|
188
|
+
o != null && o.component ? (r(), s("div", {
|
189
|
+
key: 1,
|
190
|
+
class: C(["p-[20px]", { "border-t": e == null ? void 0 : e.title }])
|
191
|
+
}, [
|
189
192
|
(r(), H(T(o.component), {
|
190
|
-
geometry: (p = (
|
193
|
+
geometry: (p = (f = t.objectData) == null ? void 0 : f.rows[0]) == null ? void 0 : p.geom,
|
191
194
|
zoom: 16,
|
192
|
-
id: (
|
195
|
+
id: (_ = (b = n.$route) == null ? void 0 : b.params) == null ? void 0 : _.id
|
193
196
|
}, null, 8, ["geometry", "id"]))
|
194
|
-
])) :
|
195
|
-
o != null && o.name ? (r(), s("div",
|
196
|
-
|
197
|
+
], 2)) : l("", !0),
|
198
|
+
o != null && o.name ? (r(), s("div", X, [
|
199
|
+
d("div", {
|
197
200
|
innerHTML: (y = t.objectData) == null ? void 0 : y.data[o == null ? void 0 : o.name]
|
198
|
-
}, null, 8,
|
199
|
-
])) :
|
201
|
+
}, null, 8, Y)
|
202
|
+
])) : l("", !0)
|
200
203
|
], 2);
|
201
204
|
}), 128))
|
202
|
-
])) :
|
205
|
+
])) : l("", !0),
|
203
206
|
(e == null ? void 0 : e.type) === "tabs" ? (r(), s(w, { key: 2 }, [
|
204
|
-
|
205
|
-
(r(!0), s(w, null,
|
207
|
+
d("nav", Z, [
|
208
|
+
(r(!0), s(w, null, D(e == null ? void 0 : e.items, (o) => (r(), s("button", {
|
206
209
|
key: (o == null ? void 0 : o.name) || (o == null ? void 0 : o.component),
|
207
210
|
onClick: (k) => t.component = (o == null ? void 0 : o.component) || (o == null ? void 0 : o.name),
|
208
|
-
class:
|
211
|
+
class: C(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none", {
|
209
212
|
" font-semibold after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800": t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name),
|
210
213
|
"": t.component !== (o == null ? void 0 : o.component) && t.component !== (o == null ? void 0 : o.name)
|
211
214
|
}])
|
212
|
-
}, M(o == null ? void 0 : o.title), 11,
|
215
|
+
}, M(o == null ? void 0 : o.title), 11, m))), 128))
|
213
216
|
]),
|
214
|
-
(r(!0), s(w, null,
|
215
|
-
var
|
217
|
+
(r(!0), s(w, null, D(e.items, (o, k) => {
|
218
|
+
var f, p, b, _, y;
|
216
219
|
return r(), s(w, { key: k }, [
|
217
|
-
t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name) ? (r(), s("div",
|
218
|
-
o != null && o.component ? (r(), s("div",
|
220
|
+
t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name) ? (r(), s("div", oo, [
|
221
|
+
o != null && o.component ? (r(), s("div", eo, [
|
219
222
|
(r(), H(T(o.component), {
|
220
|
-
geometry: (p = (
|
223
|
+
geometry: (p = (f = t.objectData) == null ? void 0 : f.rows[0]) == null ? void 0 : p.geom,
|
221
224
|
zoom: 16,
|
222
|
-
id: (
|
225
|
+
id: (_ = (b = n.$route) == null ? void 0 : b.params) == null ? void 0 : _.id
|
223
226
|
}, null, 8, ["geometry", "id"]))
|
224
|
-
])) :
|
225
|
-
o != null && o.name ? (r(), s("div",
|
226
|
-
|
227
|
+
])) : l("", !0),
|
228
|
+
o != null && o.name ? (r(), s("div", to, [
|
229
|
+
d("div", {
|
227
230
|
innerHTML: (y = t.objectData) == null ? void 0 : y.data[o == null ? void 0 : o.name]
|
228
|
-
}, null, 8,
|
229
|
-
])) :
|
230
|
-
])) :
|
231
|
+
}, null, 8, ro)
|
232
|
+
])) : l("", !0)
|
233
|
+
])) : l("", !0)
|
231
234
|
], 64);
|
232
235
|
}), 128))
|
233
|
-
], 64)) :
|
234
|
-
(e == null ? void 0 : e.type) === "vertical_tabs" ? (r(), s("div",
|
235
|
-
|
236
|
-
(r(!0), s(w, null,
|
236
|
+
], 64)) : l("", !0),
|
237
|
+
(e == null ? void 0 : e.type) === "vertical_tabs" ? (r(), s("div", no, [
|
238
|
+
d("nav", so, [
|
239
|
+
(r(!0), s(w, null, D(e == null ? void 0 : e.items, (o) => (r(), s("button", {
|
237
240
|
key: (o == null ? void 0 : o.name) || (o == null ? void 0 : o.component),
|
238
241
|
onClick: (k) => t.component = (o == null ? void 0 : o.component) || (o == null ? void 0 : o.name),
|
239
|
-
class:
|
242
|
+
class: C(["relative inline-flex items-center w-full py-1 text-sm border-transparent pe-4 gap-x-2 border-e-2 whitespace-nowrap hover:text-blue-600 focus:outline-none focus:text-blue-600", {
|
240
243
|
"font-semibold after:absolute after:top-[0] after:right-[-1px] after:h-full text-blue-600 after:w-[2px] after:bg-blue-600 ": t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name),
|
241
244
|
"text-gray-500": t.component !== (o == null ? void 0 : o.component) && t.component !== (o == null ? void 0 : o.name)
|
242
245
|
}])
|
243
|
-
}, M(o == null ? void 0 : o.title), 11,
|
246
|
+
}, M(o == null ? void 0 : o.title), 11, co))), 128))
|
244
247
|
]),
|
245
|
-
|
246
|
-
(r(!0), s(w, null,
|
247
|
-
var
|
248
|
+
d("div", ao, [
|
249
|
+
(r(!0), s(w, null, D(e.items, (o, k) => {
|
250
|
+
var f, p, b, _, y;
|
248
251
|
return r(), s(w, { key: k }, [
|
249
252
|
t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name) ? (r(), s("div", uo, [
|
250
|
-
o != null && o.component ? (r(), s("div",
|
253
|
+
o != null && o.component ? (r(), s("div", lo, [
|
251
254
|
(r(), H(T(o.component), {
|
252
|
-
geometry: (p = (
|
255
|
+
geometry: (p = (f = t.objectData) == null ? void 0 : f.rows[0]) == null ? void 0 : p.geom,
|
253
256
|
zoom: 16,
|
254
|
-
id: (
|
257
|
+
id: (_ = (b = n.$route) == null ? void 0 : b.params) == null ? void 0 : _.id
|
255
258
|
}, null, 8, ["geometry", "id"]))
|
256
|
-
])) :
|
259
|
+
])) : l("", !0),
|
257
260
|
o != null && o.name ? (r(), s("div", ho, [
|
258
|
-
|
261
|
+
d("div", {
|
259
262
|
innerHTML: (y = t.objectData) == null ? void 0 : y.data[o == null ? void 0 : o.name]
|
260
|
-
}, null, 8,
|
261
|
-
])) :
|
262
|
-
])) :
|
263
|
+
}, null, 8, po)
|
264
|
+
])) : l("", !0)
|
265
|
+
])) : l("", !0)
|
263
266
|
], 64);
|
264
267
|
}), 128))
|
265
268
|
])
|
266
|
-
])) :
|
269
|
+
])) : l("", !0)
|
267
270
|
], 2);
|
268
271
|
}), 128))
|
269
272
|
], 2)
|
270
273
|
]);
|
271
274
|
}
|
272
|
-
const fo = /* @__PURE__ */ A(P, [["render",
|
275
|
+
const fo = /* @__PURE__ */ A(P, [["render", bo], ["__scopeId", "data-v-f25e4f87"]]);
|
273
276
|
export {
|
274
277
|
fo as default
|
275
278
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as d, u as m, a as n } from "./import-file-
|
1
|
+
import { _ as d, u as m, a as n } from "./import-file-BvAgSmhY.js";
|
2
2
|
import { resolveComponent as b, openBlock as u, createElementBlock as h, createElementVNode as a, createBlock as f, createCommentVNode as p } from "vue";
|
3
3
|
const g = {
|
4
4
|
data() {
|