@opengis/admin 0.4.38 → 0.4.40

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.
@@ -1,4 +1,4 @@
1
- import { _ as d, f as m, u as f, s as g } from "./import-file-DxhzJKP_.js";
1
+ import { _ as d, f as m, u as f, s as g } from "./import-file-Co2iKD-h.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(t) {
24
- const e = [];
25
- return t.forEach((a) => {
26
- a.menu ? e.push(...this.flattenMenu(a.menu)) : e.push(a);
27
- }), e;
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, o;
31
- const t = this.flattenMenu(f.value);
32
- t != null && t.length || this.$router.replace("/404");
33
- const e = t == null ? void 0 : t.find((s) => {
34
- var r, n;
35
- return (s == null ? void 0 : s.path) == ((n = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : n.table);
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
- e || this.$router.replace("/404");
38
- const a = e == null ? void 0 : e.table;
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: r } = await m.get(
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 = (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) || "";
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(t, e) {
49
- if (!t || !e) return "";
48
+ getGroupedErrorNotification(o, t) {
49
+ if (!o || !t) return "";
50
50
  const a = {};
51
- return Object.entries(t).forEach(([o, s]) => {
51
+ return Object.entries(o).forEach(([r, s]) => {
52
52
  var n;
53
- const r = ((n = e[o]) == null ? void 0 : n.ua) || o;
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(`"${r}"`);
56
+ a[u] || (a[u] = []), a[u].push(`"${e}"`);
57
57
  });
58
- }), Object.entries(a).map(([o, s]) => `<b>${o}:</b> ${s.join(", ")}`).join("<br>") || "Сталася помилка валідації";
58
+ }), Object.entries(a).map(([r, s]) => `<b>${r}:</b> ${s.join(", ")}`).join("<br>") || "Сталася помилка валідації";
59
59
  },
60
60
  async createObject() {
61
- var e, a, l;
62
- const t = (a = (e = this.$refs.form) == null ? void 0 : e.$refs) == null ? void 0 : a.form;
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 t.doValidation(), await m.post(
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 (o) {
73
- const s = this.getGroupedErrorNotification(
74
- t == null ? void 0 : t.formErrors,
75
- t == null ? void 0 : t.scheme
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 = o == null ? void 0 : o.response) == null ? void 0 : l.data) || s,
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(t, e, a, l, o, s) {
86
+ function E(o, t, a, l, r, s) {
87
87
  var n;
88
- const r = b("VsFormWithNavigation");
88
+ const e = b("VsFormWithNavigation");
89
89
  return h(), x("div", k, [
90
90
  i("div", V, [
91
- e[3] || (e[3] = i("h2", { class: "text-xl font-medium" }, "Створити", -1)),
91
+ t[3] || (t[3] = i("h2", { class: "text-xl font-medium" }, "Створити", -1)),
92
92
  i("div", _, [
93
93
  i("button", {
94
- onClick: e[0] || (e[0] = (c) => t.$router.back()),
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: e[1] || (e[1] = (...c) => s.createObject && s.createObject(...c)),
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 = t.$adminSettings) == null ? void 0 : n.header) === !1 ? "calc(100vh - 91px)" : "calc(100vh - 150px)"
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
- o.scheme ? (h(), w(r, {
110
+ r.scheme ? (h(), w(e, {
111
111
  key: 0,
112
112
  ref: "form",
113
- scheme: o.scheme,
114
- style: p(o.style),
115
- modelValue: o.formValues,
116
- "onUpdate:modelValue": e[2] || (e[2] = (c) => o.formValues = c),
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-DxhzJKP_.js";
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-Co2iKD-h.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-DxhzJKP_.js";
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-Co2iKD-h.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
@@ -1,4 +1,4 @@
1
- import { w as f } from "./import-file-DxhzJKP_.js";
1
+ import { w as f } from "./import-file-Co2iKD-h.js";
2
2
  export {
3
3
  f as default
4
4
  };