@opengis/admin 0.4.38 → 0.4.39
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-N0vInKWp.js → add-page-CR6fy7am.js} +41 -41
- package/dist/{admin-interface-Djf6FADS.js → admin-interface-CkE_Ldlf.js} +1 -1
- package/dist/{admin-view-CADr047o.js → admin-view-DoipOYc5.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +30 -30
- package/dist/{card-view-CvtbWLOk.js → card-view-D9MG40r8.js} +1 -1
- package/dist/{edit-page-WH_P3Wte.js → edit-page-KgtxNGI7.js} +1 -1
- package/dist/{import-file-DxhzJKP_.js → import-file-BdeywHTv.js} +7 -7
- package/dist/{profile-page-BEjpnhpW.js → profile-page-D4Vs23oW.js} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as d, f as m, u as f, s as g } from "./import-file-
|
|
1
|
+
import { _ as d, f as m, u as f, s as g } from "./import-file-BdeywHTv.js";
|
|
2
2
|
import { resolveComponent as b, createElementBlock as x, openBlock as h, createElementVNode as i, normalizeClass as y, normalizeStyle as p, createBlock as w, createCommentVNode as v } from "vue";
|
|
3
3
|
const $ = {
|
|
4
4
|
data() {
|
|
@@ -20,48 +20,48 @@ const $ = {
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
methods: {
|
|
23
|
-
flattenMenu(
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
a.menu ?
|
|
27
|
-
}),
|
|
23
|
+
flattenMenu(o) {
|
|
24
|
+
const t = [];
|
|
25
|
+
return o.forEach((a) => {
|
|
26
|
+
a.menu ? t.push(...this.flattenMenu(a.menu)) : t.push(a);
|
|
27
|
+
}), t;
|
|
28
28
|
},
|
|
29
29
|
async getFormScheme() {
|
|
30
|
-
var l,
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
var
|
|
35
|
-
return (s == null ? void 0 : s.path) == ((n = (
|
|
30
|
+
var l, r;
|
|
31
|
+
const o = this.flattenMenu(f.value);
|
|
32
|
+
o != null && o.length || this.$router.replace("/404");
|
|
33
|
+
const t = o == null ? void 0 : o.find((s) => {
|
|
34
|
+
var e, n;
|
|
35
|
+
return (s == null ? void 0 : s.path) == ((n = (e = this.$route) == null ? void 0 : e.query) == null ? void 0 : n.table);
|
|
36
36
|
});
|
|
37
|
-
|
|
38
|
-
const a =
|
|
37
|
+
t || this.$router.replace("/404");
|
|
38
|
+
const a = t == null ? void 0 : t.table;
|
|
39
39
|
this.table = a;
|
|
40
40
|
try {
|
|
41
|
-
const s = await m.get(`/api/table-data/${a}`), { data:
|
|
41
|
+
const s = await m.get(`/api/table-data/${a}`), { data: e } = await m.get(
|
|
42
42
|
`/api/template/form/${(l = s == null ? void 0 : s.data) == null ? void 0 : l.form}`
|
|
43
43
|
);
|
|
44
|
-
this.scheme = (
|
|
44
|
+
this.scheme = (e == null ? void 0 : e.schema) || e, this.style = (e == null ? void 0 : e.style) || null, this.api = (e == null ? void 0 : e.api) || "", this.token = ((r = s == null ? void 0 : s.data) == null ? void 0 : r.addToken) || "";
|
|
45
45
|
} catch {
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
getGroupedErrorNotification(
|
|
49
|
-
if (!
|
|
48
|
+
getGroupedErrorNotification(o, t) {
|
|
49
|
+
if (!o || !t) return "";
|
|
50
50
|
const a = {};
|
|
51
|
-
return Object.entries(
|
|
51
|
+
return Object.entries(o).forEach(([r, s]) => {
|
|
52
52
|
var n;
|
|
53
|
-
const
|
|
53
|
+
const e = ((n = t[r]) == null ? void 0 : n.ua) || r;
|
|
54
54
|
s.forEach((c) => {
|
|
55
55
|
const u = c.message;
|
|
56
|
-
a[u] || (a[u] = []), a[u].push(`"${
|
|
56
|
+
a[u] || (a[u] = []), a[u].push(`"${e}"`);
|
|
57
57
|
});
|
|
58
|
-
}), Object.entries(a).map(([
|
|
58
|
+
}), Object.entries(a).map(([r, s]) => `<b>${r}:</b> ${s.join(", ")}`).join("<br>") || "Сталася помилка валідації";
|
|
59
59
|
},
|
|
60
60
|
async createObject() {
|
|
61
|
-
var
|
|
62
|
-
const
|
|
61
|
+
var t, a, l, r, s;
|
|
62
|
+
const o = (a = (t = this.$refs.form) == null ? void 0 : t.$refs) == null ? void 0 : a.form;
|
|
63
63
|
try {
|
|
64
|
-
await
|
|
64
|
+
await o.doValidation(), await m.post(
|
|
65
65
|
this.api || `/api/table/${this.token}`,
|
|
66
66
|
this.formValues
|
|
67
67
|
), await this.$router.back(), await this.$notify({
|
|
@@ -69,51 +69,51 @@ const $ = {
|
|
|
69
69
|
message: "Об'єкт успішно створено",
|
|
70
70
|
type: "success"
|
|
71
71
|
});
|
|
72
|
-
} catch (
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
} catch (e) {
|
|
73
|
+
const n = this.getGroupedErrorNotification(
|
|
74
|
+
o == null ? void 0 : o.formErrors,
|
|
75
|
+
o == null ? void 0 : o.scheme
|
|
76
76
|
);
|
|
77
77
|
this.$notify({
|
|
78
78
|
title: "Помилка!",
|
|
79
|
-
message: ((l =
|
|
79
|
+
message: ((r = (l = e == null ? void 0 : e.response) == null ? void 0 : l.data) == null ? void 0 : r.error) || ((s = e == null ? void 0 : e.response) == null ? void 0 : s.data) || n,
|
|
80
80
|
type: "error"
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}, k = { class: "bg-gray-100 lg:w-[calc(100vw-260px)] w-[100vw]" }, V = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl" }, _ = { class: "flex items-center gap-[6px]" }, j = { class: "bg-white w-full rounded-xl" };
|
|
86
|
-
function E(
|
|
86
|
+
function E(o, t, a, l, r, s) {
|
|
87
87
|
var n;
|
|
88
|
-
const
|
|
88
|
+
const e = b("VsFormWithNavigation");
|
|
89
89
|
return h(), x("div", k, [
|
|
90
90
|
i("div", V, [
|
|
91
|
-
|
|
91
|
+
t[3] || (t[3] = i("h2", { class: "text-xl font-medium" }, "Створити", -1)),
|
|
92
92
|
i("div", _, [
|
|
93
93
|
i("button", {
|
|
94
|
-
onClick:
|
|
94
|
+
onClick: t[0] || (t[0] = (c) => o.$router.back()),
|
|
95
95
|
class: "flex items-center px-3 py-2 text-sm font-medium text-gray-800 duration-300 bg-white border border-gray-100 rounded-lg shadow gap-x-2 focus:outline-none hover:bg-gray-50 hover:border-gray-100"
|
|
96
96
|
}, " Скасувати "),
|
|
97
97
|
i("button", {
|
|
98
|
-
onClick:
|
|
98
|
+
onClick: t[1] || (t[1] = (...c) => s.createObject && s.createObject(...c)),
|
|
99
99
|
class: y(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${s.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${s.color}-800 hover:text-white`)
|
|
100
100
|
}, " Зберегти ", 2)
|
|
101
101
|
])
|
|
102
102
|
]),
|
|
103
103
|
i("div", {
|
|
104
104
|
style: p({
|
|
105
|
-
height: ((n =
|
|
105
|
+
height: ((n = o.$adminSettings) == null ? void 0 : n.header) === !1 ? "calc(100vh - 91px)" : "calc(100vh - 150px)"
|
|
106
106
|
}),
|
|
107
107
|
class: "bg-gray-100 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw] overflow-hidden"
|
|
108
108
|
}, [
|
|
109
109
|
i("div", j, [
|
|
110
|
-
|
|
110
|
+
r.scheme ? (h(), w(e, {
|
|
111
111
|
key: 0,
|
|
112
112
|
ref: "form",
|
|
113
|
-
scheme:
|
|
114
|
-
style: p(
|
|
115
|
-
modelValue:
|
|
116
|
-
"onUpdate:modelValue":
|
|
113
|
+
scheme: r.scheme,
|
|
114
|
+
style: p(r.style),
|
|
115
|
+
modelValue: r.formValues,
|
|
116
|
+
"onUpdate:modelValue": t[2] || (t[2] = (c) => r.formValues = c),
|
|
117
117
|
class: "h-full p-[20px]"
|
|
118
118
|
}, null, 8, ["scheme", "style", "modelValue"])) : v("", !0)
|
|
119
119
|
])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as T, h as Je, i as Ke, j as Ge, f as L, I as Qe, s as R, k as K, V as Xe, l as Ye, m as Ze, n as et, A as G, o as tt, p as st, b as nt, q as at, r as lt, a as rt, t as ot, v as it, u as Ee } from "./import-file-
|
|
1
|
+
import { _ as T, h as Je, i as Ke, j as Ge, f as L, I as Qe, s as R, k as K, V as Xe, l as Ye, m as Ze, n as et, A as G, o as tt, p as st, b as nt, q as at, r as lt, a as rt, t as ot, v as it, u as Ee } from "./import-file-BdeywHTv.js";
|
|
2
2
|
import { createElementBlock as d, openBlock as r, createTextVNode as z, createElementVNode as a, toDisplayString as A, createCommentVNode as k, normalizeClass as w, resolveComponent as p, Fragment as $, createVNode as x, withCtx as P, createBlock as y, renderList as V, withModifiers as dt, Transition as Q, withDirectives as X, renderSlot as ut, vShow as Y, Teleport as ct, getCurrentInstance as Ue, ref as H, resolveDynamicComponent as J, defineComponent as ht, withKeys as pt, normalizeStyle as W } from "vue";
|
|
3
3
|
const bt = {
|
|
4
4
|
data() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as u, openBlock as n, createElementVNode as o, createStaticVNode as Q, resolveComponent as p, createCommentVNode as w, createVNode as h, normalizeClass as f, createTextVNode as V, toDisplayString as B, Transition as q, withCtx as _, withDirectives as W, Fragment as U, renderList as P, vShow as J, createBlock as T, resolveDynamicComponent as F, ref as le, onMounted as ae, computed as oe, withModifiers as ne } from "vue";
|
|
2
|
-
import { _ as y, I as K, s as g, a as X, u as A, b as se, c as Y, d as ue, e as ie, f as de, g as ce } from "./import-file-
|
|
2
|
+
import { _ as y, I as K, s as g, a as X, u as A, b as se, c as Y, d as ue, e as ie, f as de, g as ce } from "./import-file-BdeywHTv.js";
|
|
3
3
|
import "./user-DCzCj0wb.js";
|
|
4
4
|
const he = {}, ge = {
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
package/dist/admin.js
CHANGED