@opengis/admin 0.1.18 → 0.1.19
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/{add-page-CUlt8lxo.js → add-page-DU60zL6t.js} +9 -9
- package/dist/admin-interface-gm773DzD.js +919 -0
- package/dist/{admin-view-XOPkNJ7Q.js → admin-view-CfY_rVQ4.js} +113 -146
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +41 -41
- package/dist/card-page-ZWU3SEtH.js +194 -0
- package/dist/{card-view-CNzIVhiE.js → card-view-CwZPYXyJ.js} +1 -1
- package/dist/{edit-page-tYDkGn_6.js → edit-page-C6mgpZBS.js} +21 -21
- package/dist/{import-file-BdX0j7UB.js → import-file-C5Tvx4dB.js} +7936 -8006
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/dist/admin-interface-DyDvpW7d.js +0 -961
- package/dist/card-page-Bq1aDTDR.js +0 -202
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { u as $ } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
-
import { _ as V, a as z } from "./import-file-BdX0j7UB.js";
|
|
3
|
-
import { resolveComponent as N, openBlock as n, createElementBlock as c, createElementVNode as u, toDisplayString as j, createVNode as q, withCtx as B, createTextVNode as E, normalizeClass as T, Fragment as k, renderList as M, createBlock as L, resolveDynamicComponent as H, createCommentVNode as v } from "vue";
|
|
4
|
-
const A = {
|
|
5
|
-
data() {
|
|
6
|
-
return {
|
|
7
|
-
objectData: null,
|
|
8
|
-
component: ""
|
|
9
|
-
};
|
|
10
|
-
},
|
|
11
|
-
computed: {
|
|
12
|
-
getRoute() {
|
|
13
|
-
const t = this.flattenMenu($.value);
|
|
14
|
-
t != null && t.length || this.$router.replace("/404");
|
|
15
|
-
const r = t == null ? void 0 : t.find((a) => {
|
|
16
|
-
var l, s;
|
|
17
|
-
return (a == null ? void 0 : a.table) == ((s = (l = this.$route) == null ? void 0 : l.params) == null ? void 0 : s.table);
|
|
18
|
-
});
|
|
19
|
-
return r || this.$router.replace("/404"), r == null ? void 0 : r.path;
|
|
20
|
-
},
|
|
21
|
-
getTitle() {
|
|
22
|
-
var t, r, a, l, s, h, i, b, g, d, o, C, w, e, y;
|
|
23
|
-
if ((a = (r = (t = this.objectData) == null ? void 0 : t.rows) == null ? void 0 : r[0]) != null && a.name)
|
|
24
|
-
return ((i = (h = (s = (l = this.objectData) == null ? void 0 : l.rows) == null ? void 0 : s[0]) == null ? void 0 : h.name) == null ? void 0 : i.length) < 35 ? (d = (g = (b = this.objectData) == null ? void 0 : b.rows) == null ? void 0 : g[0]) == null ? void 0 : d.name : ((e = (w = (C = (o = this.objectData) == null ? void 0 : o.rows) == null ? void 0 : C[0]) == null ? void 0 : w.name) == null ? void 0 : e.slice(0, 35)) + " ...";
|
|
25
|
-
{
|
|
26
|
-
const p = (y = this.flattenMenu($.value)) == null ? void 0 : y.find(
|
|
27
|
-
(x) => {
|
|
28
|
-
var f, _;
|
|
29
|
-
return (x == null ? void 0 : x.table) === ((_ = (f = this.$route) == null ? void 0 : f.params) == null ? void 0 : _.table);
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
return p == null ? void 0 : p.ua;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
async mounted() {
|
|
37
|
-
await this.getObjectData(), await this.checkActiveComponent();
|
|
38
|
-
},
|
|
39
|
-
watch: {
|
|
40
|
-
component(t) {
|
|
41
|
-
this.$router.replace({ ...this.$route, query: { tab: t } });
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
methods: {
|
|
45
|
-
async getObjectData() {
|
|
46
|
-
var a;
|
|
47
|
-
const { table: t, id: r } = (a = this.$route) == null ? void 0 : a.params;
|
|
48
|
-
(!t || !r) && this.$router.replace("/404");
|
|
49
|
-
try {
|
|
50
|
-
const { data: l } = await z.get(`/api/table-data/${t}/${r}`);
|
|
51
|
-
this.objectData = l;
|
|
52
|
-
} catch (l) {
|
|
53
|
-
console.error(l);
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
getColClass(t) {
|
|
57
|
-
return `col-span-${t || 12}`;
|
|
58
|
-
},
|
|
59
|
-
getGridClass() {
|
|
60
|
-
return "grid-cols-12";
|
|
61
|
-
},
|
|
62
|
-
checkActiveComponent() {
|
|
63
|
-
var t, r, a, l, s, h, i, b, g;
|
|
64
|
-
if ((r = (t = this.$route) == null ? void 0 : t.query) != null && r.tab)
|
|
65
|
-
this.component = (l = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : l.tab;
|
|
66
|
-
else {
|
|
67
|
-
const d = (h = (s = this.objectData) == null ? void 0 : s.panels) == null ? void 0 : h.find((o) => (o == null ? void 0 : o.type) === "tabs");
|
|
68
|
-
(i = d == null ? void 0 : d.items) != null && i.length && (this.component = ((b = d.items[0]) == null ? void 0 : b.component) || ((g = d.items[0]) == null ? void 0 : g.name));
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
flattenMenu(t) {
|
|
72
|
-
const r = [];
|
|
73
|
-
return t.forEach((a) => {
|
|
74
|
-
a.menu ? r.push(...this.flattenMenu(a.menu)) : r.push(a);
|
|
75
|
-
}), r;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}, G = {
|
|
79
|
-
style: { width: "calc(100vw - 260px)", height: "calc(100vh - 60px)" },
|
|
80
|
-
class: "bg-gray-50 overflow-y-auto"
|
|
81
|
-
}, O = { class: "h-[76px] bg-gray-50 flex items-center justify-between px-[30px]" }, R = { class: "" }, m = { class: "text-lg md:text-xl font-semibold text-stone-800 dark:text-neutral-200" }, F = { class: "flex items-center gap-[6px]" }, I = {
|
|
82
|
-
key: 0,
|
|
83
|
-
class: "border rounded-xl bg-white"
|
|
84
|
-
}, P = { class: "p-[10px] pl-[20px] text-xl" }, S = ["innerHTML"], J = { key: 1 }, K = { class: "p-[10px] pl-[20px] text-xl" }, Q = {
|
|
85
|
-
key: 0,
|
|
86
|
-
class: "p-[20px] border-t"
|
|
87
|
-
}, U = {
|
|
88
|
-
key: 1,
|
|
89
|
-
class: "p-[20px] border-t"
|
|
90
|
-
}, W = ["innerHTML"], X = { class: "flex space-x-1 w-[1200px] bg-white border rounded-xl h-[60px] items-center pl-[20px]" }, Y = ["onClick"], Z = {
|
|
91
|
-
key: 0,
|
|
92
|
-
class: "border rounded-xl bg-white mt-[20px]"
|
|
93
|
-
}, ee = { class: "p-[10px] pl-[20px] text-xl" }, te = {
|
|
94
|
-
key: 0,
|
|
95
|
-
class: "p-[20px] border-t"
|
|
96
|
-
}, oe = {
|
|
97
|
-
key: 1,
|
|
98
|
-
class: "p-[20px] border-t"
|
|
99
|
-
}, re = ["innerHTML"];
|
|
100
|
-
function se(t, r, a, l, s, h) {
|
|
101
|
-
var b, g, d;
|
|
102
|
-
const i = N("router-link");
|
|
103
|
-
return n(), c("div", G, [
|
|
104
|
-
u("div", O, [
|
|
105
|
-
u("div", R, [
|
|
106
|
-
u("button", {
|
|
107
|
-
onClick: r[0] || (r[0] = (o) => t.$router.back()),
|
|
108
|
-
class: "text-sm text-blue-600 decoration-2 hover:underline font-medium focus:outline-none focus:underline dark:text-green-400 dark:hover:text-green-500"
|
|
109
|
-
}, " До таблиці "),
|
|
110
|
-
u("h2", m, j(h.getTitle), 1)
|
|
111
|
-
]),
|
|
112
|
-
u("div", F, [
|
|
113
|
-
q(i, {
|
|
114
|
-
to: `/edit?table=${h.getRoute}&id=${(g = (b = t.$route) == null ? void 0 : b.params) == null ? void 0 : g.id}`,
|
|
115
|
-
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"
|
|
116
|
-
}, {
|
|
117
|
-
default: B(() => r[1] || (r[1] = [
|
|
118
|
-
E(" Редагувати ")
|
|
119
|
-
])),
|
|
120
|
-
_: 1
|
|
121
|
-
}, 8, ["to"])
|
|
122
|
-
])
|
|
123
|
-
]),
|
|
124
|
-
u("div", {
|
|
125
|
-
class: T(["grid gap-[20px]", h.getGridClass()])
|
|
126
|
-
}, [
|
|
127
|
-
(n(!0), c(k, null, M((d = s.objectData) == null ? void 0 : d.panels, (o, C) => {
|
|
128
|
-
var w;
|
|
129
|
-
return n(), c("div", {
|
|
130
|
-
key: C,
|
|
131
|
-
class: T([h.getColClass(o.col), "p-4"])
|
|
132
|
-
}, [
|
|
133
|
-
o != null && o.name ? (n(), c("div", I, [
|
|
134
|
-
u("h2", P, j((o == null ? void 0 : o.title) || "Панель"), 1),
|
|
135
|
-
u("div", {
|
|
136
|
-
class: "p-[20px] border-t",
|
|
137
|
-
innerHTML: (w = s.objectData) == null ? void 0 : w.data[o == null ? void 0 : o.name]
|
|
138
|
-
}, null, 8, S)
|
|
139
|
-
])) : o.type === "container" ? (n(), c("div", J, [
|
|
140
|
-
(n(!0), c(k, null, M(o.items, (e, y) => {
|
|
141
|
-
var p, x, f, _, D;
|
|
142
|
-
return n(), c("div", {
|
|
143
|
-
key: y,
|
|
144
|
-
class: "border rounded-xl bg-white mb-[20px]"
|
|
145
|
-
}, [
|
|
146
|
-
u("h2", K, j((e == null ? void 0 : e.title) || "Панель"), 1),
|
|
147
|
-
e != null && e.component ? (n(), c("div", Q, [
|
|
148
|
-
(n(), L(H(e.component), {
|
|
149
|
-
geometry: (x = (p = s.objectData) == null ? void 0 : p.rows[0]) == null ? void 0 : x.geom,
|
|
150
|
-
zoom: 16,
|
|
151
|
-
id: (_ = (f = t.$route) == null ? void 0 : f.params) == null ? void 0 : _.id
|
|
152
|
-
}, null, 8, ["geometry", "id"]))
|
|
153
|
-
])) : v("", !0),
|
|
154
|
-
e != null && e.name ? (n(), c("div", U, [
|
|
155
|
-
u("div", {
|
|
156
|
-
innerHTML: (D = s.objectData) == null ? void 0 : D.data[e == null ? void 0 : e.name]
|
|
157
|
-
}, null, 8, W)
|
|
158
|
-
])) : v("", !0)
|
|
159
|
-
]);
|
|
160
|
-
}), 128))
|
|
161
|
-
])) : v("", !0),
|
|
162
|
-
(o == null ? void 0 : o.type) === "tabs" ? (n(), c(k, { key: 2 }, [
|
|
163
|
-
u("nav", X, [
|
|
164
|
-
(n(!0), c(k, null, M(o == null ? void 0 : o.items, (e) => (n(), c("button", {
|
|
165
|
-
key: (e == null ? void 0 : e.name) || (e == null ? void 0 : e.component),
|
|
166
|
-
onClick: (y) => s.component = (e == null ? void 0 : e.component) || (e == null ? void 0 : e.name),
|
|
167
|
-
class: T(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none", {
|
|
168
|
-
"bg-gray-100 text-gray-800 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": s.component === (e == null ? void 0 : e.component) || s.component === (e == null ? void 0 : e.name),
|
|
169
|
-
"hover:bg-gray-100": s.component !== (e == null ? void 0 : e.component) && s.component !== (e == null ? void 0 : e.name)
|
|
170
|
-
}])
|
|
171
|
-
}, j(e == null ? void 0 : e.title), 11, Y))), 128))
|
|
172
|
-
]),
|
|
173
|
-
(n(!0), c(k, null, M(o.items, (e, y) => {
|
|
174
|
-
var p, x, f, _, D;
|
|
175
|
-
return n(), c(k, { key: y }, [
|
|
176
|
-
s.component === (e == null ? void 0 : e.component) || s.component === (e == null ? void 0 : e.name) ? (n(), c("div", Z, [
|
|
177
|
-
u("h2", ee, j((e == null ? void 0 : e.title) || "Панель"), 1),
|
|
178
|
-
e != null && e.component ? (n(), c("div", te, [
|
|
179
|
-
(n(), L(H(e.component), {
|
|
180
|
-
geometry: (x = (p = s.objectData) == null ? void 0 : p.rows[0]) == null ? void 0 : x.geom,
|
|
181
|
-
zoom: 16,
|
|
182
|
-
id: (_ = (f = t.$route) == null ? void 0 : f.params) == null ? void 0 : _.id
|
|
183
|
-
}, null, 8, ["geometry", "id"]))
|
|
184
|
-
])) : v("", !0),
|
|
185
|
-
e != null && e.name ? (n(), c("div", oe, [
|
|
186
|
-
u("div", {
|
|
187
|
-
innerHTML: (D = s.objectData) == null ? void 0 : D.data[e == null ? void 0 : e.name]
|
|
188
|
-
}, null, 8, re)
|
|
189
|
-
])) : v("", !0)
|
|
190
|
-
])) : v("", !0)
|
|
191
|
-
], 64);
|
|
192
|
-
}), 128))
|
|
193
|
-
], 64)) : v("", !0)
|
|
194
|
-
], 2);
|
|
195
|
-
}), 128))
|
|
196
|
-
], 2)
|
|
197
|
-
]);
|
|
198
|
-
}
|
|
199
|
-
const le = /* @__PURE__ */ V(A, [["render", se], ["__scopeId", "data-v-6289ec55"]]);
|
|
200
|
-
export {
|
|
201
|
-
le as default
|
|
202
|
-
};
|