@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,94 @@
1
+ import { u as m } from "./userMenu-CT1xO2Pt.js";
2
+ import { _ as b, a as c } from "./import-file-bAV0TNST.js";
3
+ import { resolveComponent as h, openBlock as i, createElementBlock as d, createElementVNode as a, 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
+ const t = this.flattenMenu(m.value);
24
+ t != null && t.length || this.$router.replace("/404");
25
+ const e = t == null ? void 0 : t.find((s) => {
26
+ var r, l;
27
+ return (s == null ? void 0 : s.path) == ((l = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : l.table);
28
+ });
29
+ e || this.$router.replace("/404");
30
+ const o = e == null ? void 0 : e.table;
31
+ this.table = o;
32
+ try {
33
+ const {
34
+ data: { form: s }
35
+ } = await c.get(`/api/template/table/${o}`), { data: r } = await c.get(`/api/template/form/${s}`);
36
+ this.scheme = (r == null ? void 0 : r.schema) || r;
37
+ } catch {
38
+ }
39
+ },
40
+ async createObject() {
41
+ var t, e;
42
+ try {
43
+ await this.$refs.form.doValidation(), await c.post(`/api/table/${this.table}`, this.formValues), await this.$router.replace(`/${(e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.table}`), await this.$notify({
44
+ title: "Успішно!",
45
+ message: "Об'єкт успішно створено",
46
+ type: "success"
47
+ });
48
+ } catch {
49
+ this.$notify({
50
+ title: "Помилка!",
51
+ message: "Сталася помилка",
52
+ type: "error"
53
+ });
54
+ }
55
+ }
56
+ }
57
+ }, 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 = {
58
+ style: { height: "calc(100vh - 60px)", width: "calc(100vw - 260px)" },
59
+ class: "bg-gray-50 p-[20px] flex"
60
+ }, v = { 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" };
61
+ function V(t, e, o, s, r, l) {
62
+ const u = h("VsForm");
63
+ return i(), d("div", x, [
64
+ a("div", w, [
65
+ e[3] || (e[3] = a("h2", { class: "text-xl font-medium" }, "Створити", -1)),
66
+ a("div", y, [
67
+ a("button", {
68
+ onClick: e[0] || (e[0] = (n) => t.$router.back()),
69
+ 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"
70
+ }, " Скасувати "),
71
+ a("button", {
72
+ onClick: e[1] || (e[1] = (...n) => l.createObject && l.createObject(...n)),
73
+ 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"
74
+ }, " Зберегти ")
75
+ ])
76
+ ]),
77
+ a("div", k, [
78
+ a("div", v, [
79
+ r.scheme ? (i(), f(u, {
80
+ key: 0,
81
+ ref: "form",
82
+ scheme: r.scheme,
83
+ modelValue: r.formValues,
84
+ "onUpdate:modelValue": e[2] || (e[2] = (n) => r.formValues = n),
85
+ class: "p-0 mt-[20px]"
86
+ }, null, 8, ["scheme", "modelValue"])) : p("", !0)
87
+ ])
88
+ ])
89
+ ]);
90
+ }
91
+ const C = /* @__PURE__ */ b(g, [["render", V]]);
92
+ export {
93
+ C as default
94
+ };