@opengis/admin 0.1.2 → 0.1.4

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.
Files changed (48) hide show
  1. package/dist/add-page-D6D_vCdT.js +94 -0
  2. package/dist/{admin-interface-vPkHXzQK.js → admin-interface-BpAoXL6Y.js} +236 -208
  3. package/dist/{admin-view-BYF4ITZY.js → admin-view-Ctnb3YHc.js} +10 -10
  4. package/dist/admin.js +1 -1
  5. package/dist/admin.umd.cjs +618 -25
  6. package/dist/card-page-CDUWky8v.js +133 -0
  7. package/dist/{card-view-CjZRvfqy.js → card-view-BdtKFM_Q.js} +1 -1
  8. package/dist/edit-page-Bl7TSfk5.js +104 -0
  9. package/dist/import-file-bAV0TNST.js +29762 -0
  10. package/dist/style.css +1 -1
  11. package/package.json +18 -5
  12. package/plugin.js +1 -1
  13. package/server/plugins/vite.js +13 -8
  14. package/server/routes/data/controllers/cardData.js +1 -1
  15. package/server/routes/data/controllers/funcs/getFilterSQL/index.js +82 -0
  16. package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +142 -0
  17. package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -0
  18. package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +67 -0
  19. package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -0
  20. package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -0
  21. package/server/routes/data/controllers/tableData.js +12 -31
  22. package/server/routes/data/controllers/tableFilter.js +1 -1
  23. package/server/routes/data/controllers/utils/assignTokens.js +31 -0
  24. package/server/routes/data/index.mjs +1 -1
  25. package/server/routes/templates/controllers/getTemplate.js +2 -4
  26. package/server/templates/cls/itree.recrzone_category.json +74 -0
  27. package/dist/add-page-C-msiPrU.js +0 -64
  28. package/dist/card-page-HOwuHNjV.js +0 -49
  29. package/dist/edit-page-7yrRusn4.js +0 -58
  30. package/dist/form-TrZSpRSC.js +0 -38
  31. package/dist/import-file-DPHo57R5.js +0 -3726
  32. package/server/routes/data/controllers/metaFormat/getSelectVal.js +0 -19
  33. package/server/routes/data/controllers/metaFormat/index.js +0 -29
  34. package/server/routes/templates/funcs/addTempateFolder.js +0 -47
  35. package/server/routes/templates/funcs/getTemplate.js +0 -70
  36. package/server/routes/templates/funcs/getTemplatePath.js +0 -39
  37. package/server/routes/templates/funcs/loadTemplate.js +0 -1
  38. package/server/routes/templates/funcs/loadTemplateDir.js +0 -1
  39. package/server/routes/templates/funcs/loadTemplatePath.js +0 -1
  40. package/server/templates/interface/management.user_group.html +0 -1
  41. package/server/templates/interface/management.user_group.json +0 -10
  42. package/server/templates/interface/management.users.html +0 -1
  43. package/server/templates/interface/management.users.json +0 -10
  44. package/server/templates/map/dgm_level_line.xml +0 -52
  45. package/server/templates/pt/admin-menu-pt.html +0 -108
  46. package/server/templates/pt/management.user_group.table.pt.html +0 -127
  47. package/server/templates/pt/management.users.table.pt.html +0 -130
  48. package/server/templates/pt/table-standard-pt.html +0 -202
@@ -0,0 +1,133 @@
1
+ import { u as T } from "./userMenu-CT1xO2Pt.js";
2
+ import { _ as H, a as N } from "./import-file-bAV0TNST.js";
3
+ import { resolveComponent as B, openBlock as a, createElementBlock as c, createElementVNode as n, toDisplayString as i, createVNode as E, withCtx as z, createTextVNode as G, normalizeClass as D, Fragment as j, renderList as $, createBlock as O, resolveDynamicComponent as R, createCommentVNode as p } from "vue";
4
+ const F = {
5
+ data() {
6
+ return {
7
+ objectData: null
8
+ };
9
+ },
10
+ computed: {
11
+ getRoute() {
12
+ const e = this.flattenMenu(T.value);
13
+ e != null && e.length || this.$router.replace("/404");
14
+ const t = e == null ? void 0 : e.find((r) => {
15
+ var d, l;
16
+ return (r == null ? void 0 : r.table) == ((l = (d = this.$route) == null ? void 0 : d.params) == null ? void 0 : l.table);
17
+ });
18
+ return t || this.$router.replace("/404"), t == null ? void 0 : t.path;
19
+ }
20
+ },
21
+ mounted() {
22
+ this.getObjectData();
23
+ },
24
+ methods: {
25
+ async getObjectData() {
26
+ var r;
27
+ const { table: e, id: t } = (r = this.$route) == null ? void 0 : r.params;
28
+ (!e || !t) && this.$router.replace("/404");
29
+ try {
30
+ const { data: d } = await N.get(`/api/table-data/${e}/${t}`);
31
+ this.objectData = d;
32
+ } catch (d) {
33
+ console.error(d);
34
+ }
35
+ },
36
+ getColClass(e) {
37
+ return `col-span-${e || 12}`;
38
+ },
39
+ getGridClass() {
40
+ return "grid-cols-12";
41
+ },
42
+ flattenMenu(e) {
43
+ const t = [];
44
+ return e.forEach((r) => {
45
+ r.menu ? t.push(...this.flattenMenu(r.menu)) : t.push(r);
46
+ }), t;
47
+ }
48
+ }
49
+ }, I = {
50
+ style: { width: "calc(100vw - 260px)", height: "100vh" },
51
+ class: "bg-gray-50 overflow-y-auto"
52
+ }, P = { class: "h-[58px] bg-gray-50 flex items-center justify-between px-[30px]" }, S = { class: "flex items-center gap-[4px]" }, q = { class: "text-xl font-medium text-gray-600" }, A = { class: "flex items-center gap-[6px]" }, J = {
53
+ key: 0,
54
+ class: "border rounded-xl bg-white"
55
+ }, K = { class: "p-[10px] pl-[20px] text-xl" }, Q = ["innerHTML"], U = { key: 1 }, W = { class: "p-[10px] pl-[20px] text-xl" }, X = {
56
+ key: 0,
57
+ class: "p-[20px] border-t"
58
+ }, Y = {
59
+ key: 1,
60
+ class: "p-[20px] border-t"
61
+ }, Z = ["innerHTML"];
62
+ function tt(e, t, r, d, l, u) {
63
+ var h, x, g, b, _, f;
64
+ const M = B("router-link");
65
+ return a(), c("div", I, [
66
+ n("div", P, [
67
+ n("div", S, [
68
+ n("button", {
69
+ onClick: t[0] || (t[0] = (o) => e.$router.back()),
70
+ class: "text-xl font-medium text-gray-600 hover:text-black"
71
+ }, " До таблиці "),
72
+ t[1] || (t[1] = n("span", null, "/", -1)),
73
+ n("h2", q, i(((g = (x = (h = l.objectData) == null ? void 0 : h.rows) == null ? void 0 : x[0]) == null ? void 0 : g.name) || "Сторінка об'єкта"), 1)
74
+ ]),
75
+ n("div", A, [
76
+ E(M, {
77
+ to: `/edit?table=${u.getRoute}&id=${(_ = (b = e.$route) == null ? void 0 : b.params) == null ? void 0 : _.id}`,
78
+ class: "py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg border-none bg-blue-500 text-gray-800 shadow-sm focus:border-none focus:outline-none hover:bg-blue-700 hover:text-white duration-300"
79
+ }, {
80
+ default: z(() => t[2] || (t[2] = [
81
+ G(" Редагувати ")
82
+ ])),
83
+ _: 1
84
+ }, 8, ["to"])
85
+ ])
86
+ ]),
87
+ n("div", {
88
+ class: D(["grid gap-[20px]", u.getGridClass()])
89
+ }, [
90
+ (a(!0), c(j, null, $((f = l.objectData) == null ? void 0 : f.panels, (o, V) => {
91
+ var m;
92
+ return a(), c("div", {
93
+ key: V,
94
+ class: D([u.getColClass(o.col), "p-4"])
95
+ }, [
96
+ o != null && o.name ? (a(), c("div", J, [
97
+ n("h2", K, i((o == null ? void 0 : o.title) || "Панель"), 1),
98
+ n("div", {
99
+ class: "p-[20px] border-t",
100
+ innerHTML: (m = l.objectData) == null ? void 0 : m.data[o == null ? void 0 : o.name]
101
+ }, null, 8, Q)
102
+ ])) : o.type === "container" ? (a(), c("div", U, [
103
+ (a(!0), c(j, null, $(o.items, (s, L) => {
104
+ var v, y, k, w, C;
105
+ return a(), c("div", {
106
+ key: L,
107
+ class: "border rounded-xl bg-white mb-[20px]"
108
+ }, [
109
+ n("h2", W, i((s == null ? void 0 : s.title) || "Панель"), 1),
110
+ s != null && s.component ? (a(), c("div", X, [
111
+ (a(), O(R(s.component), {
112
+ geometry: (y = (v = l.objectData) == null ? void 0 : v.rows[0]) == null ? void 0 : y.geom,
113
+ zoom: 16,
114
+ id: (w = (k = e.$route) == null ? void 0 : k.params) == null ? void 0 : w.id
115
+ }, null, 8, ["geometry", "id"]))
116
+ ])) : p("", !0),
117
+ s != null && s.name ? (a(), c("div", Y, [
118
+ n("div", {
119
+ innerHTML: (C = l.objectData) == null ? void 0 : C.data[s == null ? void 0 : s.name]
120
+ }, null, 8, Z)
121
+ ])) : p("", !0)
122
+ ]);
123
+ }), 128))
124
+ ])) : p("", !0)
125
+ ], 2);
126
+ }), 128))
127
+ ], 2)
128
+ ]);
129
+ }
130
+ const rt = /* @__PURE__ */ H(F, [["render", tt], ["__scopeId", "data-v-86a4c28d"]]);
131
+ export {
132
+ rt as default
133
+ };
@@ -1,5 +1,5 @@
1
1
  import { resolveComponent as e, openBlock as r, createBlock as t } from "vue";
2
- import { _ as c } from "./import-file-DPHo57R5.js";
2
+ import { _ as c } from "./import-file-bAV0TNST.js";
3
3
  const n = {};
4
4
  function s(_, p, a, i, f, m) {
5
5
  const o = e("router-view");
@@ -0,0 +1,104 @@
1
+ import { u as m } from "./userMenu-CT1xO2Pt.js";
2
+ import { _ as h, a as c } from "./import-file-bAV0TNST.js";
3
+ import { resolveComponent as d, openBlock as u, createElementBlock as b, createElementVNode as n, createBlock as f, createCommentVNode as p } from "vue";
4
+ const g = {
5
+ data() {
6
+ return {
7
+ formValues: {},
8
+ scheme: null,
9
+ table: ""
10
+ };
11
+ },
12
+ mounted() {
13
+ this.getFormScheme();
14
+ },
15
+ methods: {
16
+ flattenMenu(t) {
17
+ const e = [];
18
+ return t.forEach((o) => {
19
+ o.menu ? e.push(...this.flattenMenu(o.menu)) : e.push(o);
20
+ }), e;
21
+ },
22
+ async getFormScheme() {
23
+ var i, s;
24
+ const t = this.flattenMenu(m.value);
25
+ t != null && t.length || this.$router.replace("/404");
26
+ const e = t == null ? void 0 : t.find((a) => {
27
+ var l, r;
28
+ return (a == null ? void 0 : a.path) == ((r = (l = this.$route) == null ? void 0 : l.query) == null ? void 0 : r.table);
29
+ });
30
+ e || this.$router.replace("/404");
31
+ const o = e == null ? void 0 : e.table;
32
+ this.table = o;
33
+ try {
34
+ const {
35
+ data: { form: a }
36
+ } = await c.get(`/api/template/table/${o}`), {
37
+ data: { rows: l }
38
+ } = await c.get(
39
+ `/api/table-data/${this.table}/${(s = (i = this.$route) == null ? void 0 : i.query) == null ? void 0 : s.id}`
40
+ );
41
+ this.formValues = l == null ? void 0 : l[0];
42
+ const { data: r } = await c.get(`/api/template/form/${a}`);
43
+ this.scheme = (r == null ? void 0 : r.schema) || r;
44
+ } catch {
45
+ }
46
+ },
47
+ async editObject() {
48
+ var t, e, o, i;
49
+ try {
50
+ await this.$refs.form.doValidation(), await c.put(
51
+ `/api/table/${this.table}/${(e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.id}`,
52
+ this.formValues
53
+ ), await this.$router.replace(`/${(i = (o = this.$route) == null ? void 0 : o.query) == null ? void 0 : i.table}`), await this.$notify({
54
+ title: "Успішно!",
55
+ message: "Об'єкт успішно створено",
56
+ type: "success"
57
+ });
58
+ } catch {
59
+ this.$notify({
60
+ title: "Помилка!",
61
+ message: "Сталася помилка",
62
+ type: "error"
63
+ });
64
+ }
65
+ }
66
+ }
67
+ }, x = { style: { width: "calc(100vw - 260px)" } }, w = { class: "h-[58px] bg-gray-50 flex items-center justify-between px-[30px]" }, y = { class: "flex items-center gap-[6px]" }, k = {
68
+ style: { height: "calc(100vh - 60px)", width: "calc(100vw - 260px)" },
69
+ class: "bg-gray-50 p-[20px] flex"
70
+ }, $ = { 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" };
71
+ function v(t, e, o, i, s, a) {
72
+ const l = d("VsForm");
73
+ return u(), b("div", x, [
74
+ n("div", w, [
75
+ e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
76
+ n("div", y, [
77
+ n("button", {
78
+ onClick: e[0] || (e[0] = (r) => t.$router.back()),
79
+ class: "py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"
80
+ }, " Скасувати "),
81
+ n("button", {
82
+ onClick: e[1] || (e[1] = (...r) => a.editObject && a.editObject(...r)),
83
+ class: "py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg border-none bg-blue-500 text-gray-800 shadow-sm focus:border-none focus:outline-none hover:bg-blue-700 hover:text-white duration-300"
84
+ }, " Зберегти ")
85
+ ])
86
+ ]),
87
+ n("div", k, [
88
+ n("div", $, [
89
+ s.scheme ? (u(), f(l, {
90
+ key: 0,
91
+ ref: "form",
92
+ scheme: s.scheme,
93
+ modelValue: s.formValues,
94
+ "onUpdate:modelValue": e[2] || (e[2] = (r) => s.formValues = r),
95
+ class: "p-0 mt-[20px]"
96
+ }, null, 8, ["scheme", "modelValue"])) : p("", !0)
97
+ ])
98
+ ])
99
+ ]);
100
+ }
101
+ const q = /* @__PURE__ */ h(g, [["render", v]]);
102
+ export {
103
+ q as default
104
+ };