@opengis/admin 0.2.44 → 0.2.46
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-CWDoV9kc.js → add-page-CcNhrDGH.js} +38 -36
- package/dist/{admin-interface-KnUgFCOB.js → admin-interface-C8C0aWgF.js} +1 -1
- package/dist/{admin-view-DJz2GCsB.js → admin-view-DpINSe0A.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +2 -2
- package/dist/{card-view-CCxJ3jfb.js → card-view-D1HjQpVr.js} +1 -1
- package/dist/edit-page--kj1FQ6l.js +125 -0
- package/dist/{import-file-CjSMt4zv.js → import-file-CUlcFEmy.js} +7 -7
- package/package.json +2 -2
- package/server/routes/data/index.mjs +7 -6
- package/server/routes/templates/index.mjs +1 -1
- package/dist/edit-page-CSEzk0Pj.js +0 -121
@@ -1,13 +1,14 @@
|
|
1
|
-
import { _ as g, u as f, d as u } from "./import-file-
|
2
|
-
import { resolveComponent as x, openBlock as
|
3
|
-
const
|
1
|
+
import { _ as g, u as f, d as u } from "./import-file-CUlcFEmy.js";
|
2
|
+
import { resolveComponent as x, openBlock as h, createElementBlock as w, createElementVNode as n, createBlock as y, normalizeStyle as k, createCommentVNode as v } from "vue";
|
3
|
+
const V = {
|
4
4
|
data() {
|
5
5
|
return {
|
6
6
|
formValues: {},
|
7
7
|
scheme: null,
|
8
8
|
table: "",
|
9
9
|
token: "",
|
10
|
-
api: ""
|
10
|
+
api: "",
|
11
|
+
style: null
|
11
12
|
};
|
12
13
|
},
|
13
14
|
mounted() {
|
@@ -16,31 +17,31 @@ const v = {
|
|
16
17
|
methods: {
|
17
18
|
flattenMenu(t) {
|
18
19
|
const e = [];
|
19
|
-
return t.forEach((
|
20
|
-
|
20
|
+
return t.forEach((a) => {
|
21
|
+
a.menu ? e.push(...this.flattenMenu(a.menu)) : e.push(a);
|
21
22
|
}), e;
|
22
23
|
},
|
23
24
|
async getFormScheme() {
|
24
|
-
var i,
|
25
|
+
var i, o;
|
25
26
|
const t = this.flattenMenu(f.value);
|
26
27
|
t != null && t.length || this.$router.replace("/404");
|
27
|
-
const e = t == null ? void 0 : t.find((
|
28
|
-
var
|
29
|
-
return (
|
28
|
+
const e = t == null ? void 0 : t.find((s) => {
|
29
|
+
var r, l;
|
30
|
+
return (s == null ? void 0 : s.path) == ((l = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : l.table);
|
30
31
|
});
|
31
32
|
e || this.$router.replace("/404");
|
32
|
-
const
|
33
|
-
this.table =
|
33
|
+
const a = e == null ? void 0 : e.table;
|
34
|
+
this.table = a;
|
34
35
|
try {
|
35
|
-
const
|
36
|
-
`/api/template/form/${(i =
|
36
|
+
const s = await u.get(`/api/table-data/${a}`), { data: r } = await u.get(
|
37
|
+
`/api/template/form/${(i = s == null ? void 0 : s.data) == null ? void 0 : i.form}`
|
37
38
|
);
|
38
|
-
this.scheme = (
|
39
|
+
this.scheme = (r == null ? void 0 : r.schema) || r, this.style = (r == null ? void 0 : r.style) || null, this.api = (r == null ? void 0 : r.api) || "", this.token = (o = s == null ? void 0 : s.data) == null ? void 0 : o.addToken;
|
39
40
|
} catch {
|
40
41
|
}
|
41
42
|
},
|
42
43
|
async createObject() {
|
43
|
-
var e,
|
44
|
+
var e, a, i, o, s, r, l, m, b;
|
44
45
|
const t = this.$refs.form;
|
45
46
|
try {
|
46
47
|
await t.doValidation(), await u.post(
|
@@ -52,51 +53,52 @@ const v = {
|
|
52
53
|
type: "success"
|
53
54
|
});
|
54
55
|
} catch (c) {
|
55
|
-
const
|
56
|
-
let
|
56
|
+
const p = ((e = c == null ? void 0 : c.response) == null ? void 0 : e.data) || "";
|
57
|
+
let d = ((s = (o = (i = (a = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : a[0]) == null ? void 0 : i[1]) == null ? void 0 : o[0]) == null ? void 0 : s.message) === "Це поле обов'язкове" ? "Заповніть обов'язкові поля" : (b = (m = (l = (r = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : r[0]) == null ? void 0 : l[1]) == null ? void 0 : m[0]) == null ? void 0 : b.message;
|
57
58
|
this.$notify({
|
58
59
|
title: "Помилка!",
|
59
|
-
message:
|
60
|
+
message: p || d || "Сталася помилка валідаціі",
|
60
61
|
type: "error"
|
61
62
|
});
|
62
63
|
}
|
63
64
|
}
|
64
65
|
}
|
65
|
-
},
|
66
|
+
}, _ = { class: "bg-gray-50 lg:w-[calc(100vw-260px)] w-[100vw]" }, $ = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, j = { class: "flex items-center gap-[6px]" }, E = {
|
66
67
|
style: { height: "calc(100vh - 165px)" },
|
67
68
|
class: "bg-gray-50 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw]"
|
68
|
-
},
|
69
|
-
function
|
70
|
-
const
|
71
|
-
return
|
72
|
-
n("div",
|
69
|
+
}, O = { class: "bg-white w-full rounded-xl border p-[20px] 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" };
|
70
|
+
function C(t, e, a, i, o, s) {
|
71
|
+
const r = x("VsForm");
|
72
|
+
return h(), w("div", _, [
|
73
|
+
n("div", $, [
|
73
74
|
e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Створити", -1)),
|
74
|
-
n("div",
|
75
|
+
n("div", j, [
|
75
76
|
n("button", {
|
76
77
|
onClick: e[0] || (e[0] = (l) => t.$router.back()),
|
77
78
|
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"
|
78
79
|
}, " Скасувати "),
|
79
80
|
n("button", {
|
80
|
-
onClick: e[1] || (e[1] = (...l) =>
|
81
|
+
onClick: e[1] || (e[1] = (...l) => s.createObject && s.createObject(...l)),
|
81
82
|
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"
|
82
83
|
}, " Зберегти ")
|
83
84
|
])
|
84
85
|
]),
|
85
|
-
n("div",
|
86
|
-
n("div",
|
87
|
-
|
86
|
+
n("div", E, [
|
87
|
+
n("div", O, [
|
88
|
+
o.scheme ? (h(), y(r, {
|
88
89
|
key: 0,
|
89
90
|
ref: "form",
|
90
|
-
scheme:
|
91
|
-
|
92
|
-
|
91
|
+
scheme: o.scheme,
|
92
|
+
style: k(o.style),
|
93
|
+
modelValue: o.formValues,
|
94
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => o.formValues = l),
|
93
95
|
class: "p-0 mt-[20px]"
|
94
|
-
}, null, 8, ["scheme", "modelValue"])) :
|
96
|
+
}, null, 8, ["scheme", "style", "modelValue"])) : v("", !0)
|
95
97
|
])
|
96
98
|
])
|
97
99
|
]);
|
98
100
|
}
|
99
|
-
const
|
101
|
+
const B = /* @__PURE__ */ g(V, [["render", C]]);
|
100
102
|
export {
|
101
|
-
|
103
|
+
B as default
|
102
104
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as C, e as qe, f as Pe, g as Be, d as F, I as Le, V as ze, h as Oe, i as Ue, j as Ne, A as Ee, a as He, u as Ce, s as Re } from "./import-file-
|
1
|
+
import { _ as C, e as qe, f as Pe, g as Be, d as F, I as Le, V as ze, h as Oe, i as Ue, j as Ne, A as Ee, a as He, u as Ce, s as Re } from "./import-file-CUlcFEmy.js";
|
2
2
|
import { openBlock as o, createElementBlock as c, createTextVNode as j, toDisplayString as I, createCommentVNode as w, resolveComponent as p, Fragment as T, createElementVNode as l, createVNode as y, withCtx as $, createBlock as _, renderList as D, withModifiers as We, normalizeClass as V, createStaticVNode as Ae, withDirectives as z, vModelCheckbox as Je, resolveDynamicComponent as q, Transition as O, renderSlot as Ze, vShow as Te, getCurrentInstance as Ie, ref as L, normalizeStyle as $e } from "vue";
|
3
3
|
const Ge = {
|
4
4
|
data() {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as v, I as R, a as q, u as Z, s as T, b as G, c as J, d as S } from "./import-file-
|
1
|
+
import { _ as v, I as R, a as q, u as Z, s as T, b as G, c as J, d as S } from "./import-file-CUlcFEmy.js";
|
2
2
|
import { openBlock as l, createElementBlock as a, createElementVNode as n, createStaticVNode as B, resolveComponent as p, normalizeClass as L, createTextVNode as U, toDisplayString as A, createVNode as c, Transition as K, withCtx as Q, withDirectives as P, Fragment as E, renderList as F, vShow as W, createCommentVNode as D, withModifiers as X, createBlock as Y, resolveDynamicComponent as e1 } from "vue";
|
3
3
|
const t1 = {}, o1 = {
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
package/dist/admin.js
CHANGED