@opengis/admin 0.1.66 → 0.1.67

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. package/README.md +29 -29
  2. package/config.js +4 -4
  3. package/dist/IconChevronDown-DN0s3TF_.js +26 -0
  4. package/dist/{add-page-YonHQsF2.js → add-page-Cm4aSGoA.js} +1 -1
  5. package/dist/{admin-interface-DSR1im5I.js → admin-interface-DUuz9KgB.js} +533 -405
  6. package/dist/{admin-view-WZhYBXYw.js → admin-view-MSa57inW.js} +128 -147
  7. package/dist/admin.js +1 -1
  8. package/dist/admin.umd.cjs +86 -86
  9. package/dist/card-page-B1zuuqAR.js +275 -0
  10. package/dist/{card-view-DYhMgpIH.js → card-view-Bzt2AvI2.js} +1 -1
  11. package/dist/{edit-page-D8fMSwEp.js → edit-page-DoY4S7v6.js} +1 -1
  12. package/dist/{import-file-Do-GQQHc.js → import-file-B80Ws8by.js} +6797 -6812
  13. package/dist/style.css +1 -1
  14. package/module/settings/card/admin.roles.table/access.hbs +27 -27
  15. package/module/settings/card/admin.roles.table/general_info.hbs +16 -16
  16. package/module/settings/card/admin.roles.table/index.yml +14 -14
  17. package/module/settings/card/admin.roles.table/users.hbs +27 -27
  18. package/module/settings/card/admin.routes.table/general_info.hbs +40 -40
  19. package/module/settings/card/admin.routes.table/index.yml +8 -8
  20. package/module/settings/card/admin.routes.table/users.hbs +33 -33
  21. package/module/settings/card/admin.users.table/general_info.hbs +25 -25
  22. package/module/settings/card/admin.users.table/index.yml +12 -12
  23. package/module/settings/card/admin.users.table/logs.hbs +30 -30
  24. package/module/settings/card/admin.users.table/user_roles.hbs +24 -24
  25. package/module/settings/cls/core.actions.json +13 -13
  26. package/module/settings/cls/core.scope.json +13 -13
  27. package/module/settings/cls/properties.site_status.json +13 -13
  28. package/module/settings/cls/properties.widget_status.json +13 -13
  29. package/module/settings/cls/users.user_type.json +13 -13
  30. package/module/settings/form/admin.access.form.json +36 -36
  31. package/module/settings/form/admin.custom_column.form.json +71 -71
  32. package/module/settings/form/admin.properties.form.json +15 -15
  33. package/module/settings/form/admin.roles.form.json +19 -19
  34. package/module/settings/form/admin.routes.form.json +25 -25
  35. package/module/settings/form/admin.user_properties.form.json +15 -15
  36. package/module/settings/form/admin.user_roles.form.json +21 -21
  37. package/module/settings/form/admin.users.form.json +150 -150
  38. package/module/settings/form/user.user_roles.form.json +13 -13
  39. package/module/settings/interface/admin.properties.json +4 -4
  40. package/module/settings/interface/admin.roles.json +4 -4
  41. package/module/settings/interface/admin.routes.json +4 -4
  42. package/module/settings/interface/admin.users.json +4 -4
  43. package/module/settings/menu.json +50 -50
  44. package/module/settings/select/core.roles.json +2 -2
  45. package/module/settings/select/core.routes.sql +1 -1
  46. package/module/settings/select/core.user_uid.sql +1 -1
  47. package/module/settings/table/admin.access.table.json +77 -77
  48. package/module/settings/table/admin.custom_column.table.json +94 -94
  49. package/module/settings/table/admin.properties.table.json +33 -33
  50. package/module/settings/table/admin.roles.table.json +58 -58
  51. package/module/settings/table/admin.routes.table.json +67 -67
  52. package/module/settings/table/admin.user_properties.table.json +28 -28
  53. package/module/settings/table/admin.user_roles.table.json +66 -66
  54. package/module/settings/table/admin.users.table.json +119 -119
  55. package/package.json +82 -80
  56. package/plugin.js +100 -100
  57. package/server/helpers/controllers/badge.js +11 -11
  58. package/server/helpers/controllers/hb.js +2 -2
  59. package/server/helpers/controllers/map.js +2 -2
  60. package/server/helpers/controllers/mls.js +2 -2
  61. package/server/helpers/controllers/vue.js +2 -2
  62. package/server/helpers/index.mjs +13 -13
  63. package/server/plugins/adminHook.js +165 -165
  64. package/server/plugins/cron.js +10 -10
  65. package/server/plugins/docs.js +28 -28
  66. package/server/plugins/hook.js +185 -185
  67. package/server/plugins/vite.js +74 -69
  68. package/server/routes/calendar/controllers/calendar.data.js +88 -88
  69. package/server/routes/calendar/index.mjs +17 -17
  70. package/server/routes/data/controllers/cardData.js +57 -57
  71. package/server/routes/data/controllers/cardTabData.js +49 -49
  72. package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
  73. package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
  74. package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
  75. package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
  76. package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
  77. package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
  78. package/server/routes/data/controllers/tableData.js +112 -112
  79. package/server/routes/data/controllers/tableDataId.js +27 -27
  80. package/server/routes/data/controllers/tableFilter.js +63 -63
  81. package/server/routes/data/controllers/utils/assignTokens.js +30 -30
  82. package/server/routes/data/controllers/utils/getColumns.js +8 -8
  83. package/server/routes/data/index.mjs +15 -15
  84. package/server/routes/data/schema.js +7 -7
  85. package/server/routes/menu/controllers/getMenu.js +51 -51
  86. package/server/routes/menu/index.mjs +5 -5
  87. package/server/routes/notifications/controllers/readNotifications.js +30 -30
  88. package/server/routes/notifications/controllers/userNotifications.js +64 -64
  89. package/server/routes/notifications/hook/onWidgetSet.js +57 -57
  90. package/server/routes/notifications/index.mjs +40 -40
  91. package/server/routes/properties/controllers/admin.properties.get.js +29 -29
  92. package/server/routes/properties/controllers/user.properties.get.js +34 -34
  93. package/server/routes/properties/controllers/user.properties.post.js +30 -30
  94. package/server/routes/properties/funcs/getSettings.js +56 -56
  95. package/server/routes/properties/funcs/setSettings.js +44 -44
  96. package/server/routes/properties/funcs/utils/dataInsert.js +26 -26
  97. package/server/routes/properties/index.mjs +26 -26
  98. package/server/routes/root.mjs +3 -3
  99. package/server/routes/templates/controllers/getTemplate.js +22 -22
  100. package/server/routes/templates/index.mjs +14 -14
  101. package/server/templates/cls/itree.recrzone_category.json +73 -73
  102. package/server/templates/cls/test.json +9 -9
  103. package/server/templates/form/admin.user_cls.data.form.json +49 -49
  104. package/server/templates/form/admin.user_group_rel.form.json +21 -21
  105. package/server/templates/form/cp_building.form.json +32 -32
  106. package/server/templates/form/form-user-pass.json +10 -10
  107. package/server/templates/form/form-user_group.json +39 -39
  108. package/server/templates/form/form-users.json +156 -156
  109. package/server/templates/form/user_group_access.form.json +22 -22
  110. package/server/templates/select/account_id.json +2 -2
  111. package/server/templates/table/gis.dataset.table.json +43 -43
  112. package/server/templates/table/management.user_group.table.json +112 -112
  113. package/server/templates/table/management.users.table.json +126 -126
  114. package/utils.js +21 -21
  115. package/dist/card-page-BH8lGOKk.js +0 -230
@@ -0,0 +1,275 @@
1
+ import { g as V, h as z, _ as A, u as L, a as q } from "./import-file-B80Ws8by.js";
2
+ import { computed as B, resolveComponent as R, openBlock as r, createElementBlock as s, createElementVNode as u, toDisplayString as j, createVNode as N, withCtx as E, createTextVNode as S, createBlock as M, createCommentVNode as b, normalizeClass as H, Fragment as w, renderList as C, resolveDynamicComponent as T } from "vue";
3
+ const G = { class: "h-[76px] bg-white border rounded-xl flex items-center justify-between px-[20px] mb-[16px]" }, O = { class: "text-lg font-semibold md:text-xl text-stone-800 dark:text-neutral-200" }, F = { class: "flex items-center gap-[6px]" }, I = {
4
+ __name: "admin-card-header",
5
+ props: {
6
+ title: {
7
+ type: String
8
+ },
9
+ getRoute: {
10
+ type: String,
11
+ required: !0
12
+ }
13
+ },
14
+ setup(n) {
15
+ const c = n, a = V(), l = z(), t = () => {
16
+ a.back();
17
+ }, d = B(
18
+ () => {
19
+ var x;
20
+ return `/edit?table=${c.getRoute}&id=${(x = l == null ? void 0 : l.params) == null ? void 0 : x.id}`;
21
+ }
22
+ );
23
+ return (x, g) => {
24
+ const v = R("router-link");
25
+ return r(), s("div", G, [
26
+ u("div", null, [
27
+ u("button", {
28
+ onClick: t,
29
+ class: "text-sm h-[20px] text-blue-600 font-medium hover:border-b-2 hover:border-b-blue-500"
30
+ }, " До таблиці "),
31
+ u("h2", O, j(n.title), 1)
32
+ ]),
33
+ u("div", F, [
34
+ N(v, {
35
+ to: d.value,
36
+ 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"
37
+ }, {
38
+ default: E(() => g[0] || (g[0] = [
39
+ S(" Редагувати ")
40
+ ])),
41
+ _: 1
42
+ }, 8, ["to"])
43
+ ])
44
+ ]);
45
+ };
46
+ }
47
+ }, P = {
48
+ components: { AdminCardHeader: I },
49
+ data() {
50
+ return {
51
+ objectData: null,
52
+ component: ""
53
+ };
54
+ },
55
+ computed: {
56
+ getRoute() {
57
+ const n = this.flattenMenu(L.value);
58
+ n != null && n.length || this.$router.replace("/404");
59
+ const c = n == null ? void 0 : n.find((a) => {
60
+ var l, t;
61
+ return (a == null ? void 0 : a.table) == ((t = (l = this.$route) == null ? void 0 : l.params) == null ? void 0 : t.table);
62
+ });
63
+ return c || this.$router.replace("/404"), c == null ? void 0 : c.path;
64
+ },
65
+ getTitle() {
66
+ var n, c, a, l, t, d, x, g, v, e, i, D, o, k, _;
67
+ if ((a = (c = (n = this.objectData) == null ? void 0 : n.rows) == null ? void 0 : c[0]) != null && a.name)
68
+ return ((x = (d = (t = (l = this.objectData) == null ? void 0 : l.rows) == null ? void 0 : t[0]) == null ? void 0 : d.name) == null ? void 0 : x.length) < 35 ? (e = (v = (g = this.objectData) == null ? void 0 : g.rows) == null ? void 0 : v[0]) == null ? void 0 : e.name : ((k = (o = (D = (i = this.objectData) == null ? void 0 : i.rows) == null ? void 0 : D[0]) == null ? void 0 : o.name) == null ? void 0 : k.slice(0, 35)) + " ...";
69
+ {
70
+ const p = (_ = this.flattenMenu(L.value)) == null ? void 0 : _.find(
71
+ (h) => {
72
+ var f, y;
73
+ return (h == null ? void 0 : h.table) === ((y = (f = this.$route) == null ? void 0 : f.params) == null ? void 0 : y.table);
74
+ }
75
+ );
76
+ return p == null ? void 0 : p.ua;
77
+ }
78
+ }
79
+ },
80
+ async mounted() {
81
+ await this.getObjectData(), await this.checkActiveComponent();
82
+ },
83
+ watch: {
84
+ component(n) {
85
+ this.$router.replace({ ...this.$route, query: { tab: n } });
86
+ }
87
+ },
88
+ methods: {
89
+ async getObjectData() {
90
+ var a;
91
+ const { table: n, id: c } = (a = this.$route) == null ? void 0 : a.params;
92
+ (!n || !c) && this.$router.replace("/404");
93
+ try {
94
+ const { data: l } = await q.get(`/api/table-data/${n}/${c}`);
95
+ this.objectData = l;
96
+ } catch (l) {
97
+ console.error(l);
98
+ }
99
+ },
100
+ getColClass(n) {
101
+ return `col-span-${n || 12}`;
102
+ },
103
+ getGridClass() {
104
+ return "grid-cols-12";
105
+ },
106
+ checkActiveComponent() {
107
+ var n, c, a, l, t, d, x, g, v;
108
+ if ((c = (n = this.$route) == null ? void 0 : n.query) != null && c.tab)
109
+ this.component = (l = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : l.tab;
110
+ else {
111
+ const e = (d = (t = this.objectData) == null ? void 0 : t.panels) == null ? void 0 : d.find((i) => (i == null ? void 0 : i.type) === "tabs");
112
+ (x = e == null ? void 0 : e.items) != null && x.length && (this.component = ((g = e.items[0]) == null ? void 0 : g.component) || ((v = e.items[0]) == null ? void 0 : v.name));
113
+ }
114
+ },
115
+ flattenMenu(n) {
116
+ const c = [];
117
+ return n.forEach((a) => {
118
+ a.menu ? c.push(...this.flattenMenu(a.menu)) : c.push(a);
119
+ }), c;
120
+ }
121
+ }
122
+ }, $ = {
123
+ style: { width: "calc(100vw - 260px)", height: "calc(100vh - 60px)" },
124
+ class: "p-4 overflow-y-auto bg-gray-50"
125
+ }, J = {
126
+ key: 0,
127
+ class: "bg-white border rounded-xl"
128
+ }, K = { class: "p-[10px] pl-[20px] text-xl" }, Q = ["innerHTML"], U = { key: 1 }, W = { class: "p-[10px] pl-[20px] text-xl" }, X = {
129
+ key: 0,
130
+ class: "p-[20px] border-t"
131
+ }, Y = {
132
+ key: 1,
133
+ class: "p-[20px] border-t"
134
+ }, Z = ["innerHTML"], m = { class: "flex space-x-1 w-full bg-white border border-b-0 rounded-tr-xl rounded-tl-xl h-[60px] items-center pl-[20px]" }, oo = ["onClick"], eo = {
135
+ key: 0,
136
+ class: "bg-white border border-t-0 rounded-bl-xl rounded-br-xl"
137
+ }, to = {
138
+ key: 0,
139
+ class: "p-[20px] border-t"
140
+ }, ro = {
141
+ key: 1,
142
+ class: "p-[20px] border-t"
143
+ }, no = ["innerHTML"], so = {
144
+ key: 3,
145
+ class: "flex"
146
+ }, co = { class: "flex flex-col space-y-2 w-[200px] border rounded-xl mr-4 h-auto items-start pl-[10px] bg-white py-[20px]" }, ao = ["onClick"], lo = { class: "flex-grow" }, uo = {
147
+ key: 0,
148
+ class: "h-full bg-white border rounded-xl"
149
+ }, po = {
150
+ key: 0,
151
+ class: "p-[20px]"
152
+ }, ho = {
153
+ key: 1,
154
+ class: "p-[20px] border-t"
155
+ }, bo = ["innerHTML"];
156
+ function xo(n, c, a, l, t, d) {
157
+ var g, v;
158
+ const x = R("AdminCardHeader");
159
+ return r(), s("div", $, [
160
+ ((g = t.objectData) == null ? void 0 : g.isHeader) !== !1 ? (r(), M(x, {
161
+ key: 0,
162
+ title: d.getTitle,
163
+ "get-route": d.getRoute
164
+ }, null, 8, ["title", "get-route"])) : b("", !0),
165
+ u("div", {
166
+ class: H(["grid gap-[20px]", d.getGridClass()])
167
+ }, [
168
+ (r(!0), s(w, null, C((v = t.objectData) == null ? void 0 : v.panels, (e, i) => {
169
+ var D;
170
+ return r(), s("div", {
171
+ key: i,
172
+ class: H(d.getColClass(e.col))
173
+ }, [
174
+ e != null && e.name ? (r(), s("div", J, [
175
+ u("h2", K, j((e == null ? void 0 : e.title) || "Панель"), 1),
176
+ u("div", {
177
+ class: "p-[20px] border-t",
178
+ innerHTML: (D = t.objectData) == null ? void 0 : D.data[e == null ? void 0 : e.name]
179
+ }, null, 8, Q)
180
+ ])) : e.type === "container" ? (r(), s("div", U, [
181
+ (r(!0), s(w, null, C(e.items, (o, k) => {
182
+ var _, p, h, f, y;
183
+ return r(), s("div", {
184
+ key: k,
185
+ class: "border rounded-xl bg-white mb-[20px]"
186
+ }, [
187
+ u("h2", W, j((o == null ? void 0 : o.title) || "Панель"), 1),
188
+ o != null && o.component ? (r(), s("div", X, [
189
+ (r(), M(T(o.component), {
190
+ geometry: (p = (_ = t.objectData) == null ? void 0 : _.rows[0]) == null ? void 0 : p.geom,
191
+ zoom: 16,
192
+ id: (f = (h = n.$route) == null ? void 0 : h.params) == null ? void 0 : f.id
193
+ }, null, 8, ["geometry", "id"]))
194
+ ])) : b("", !0),
195
+ o != null && o.name ? (r(), s("div", Y, [
196
+ u("div", {
197
+ innerHTML: (y = t.objectData) == null ? void 0 : y.data[o == null ? void 0 : o.name]
198
+ }, null, 8, Z)
199
+ ])) : b("", !0)
200
+ ]);
201
+ }), 128))
202
+ ])) : b("", !0),
203
+ (e == null ? void 0 : e.type) === "tabs" ? (r(), s(w, { key: 2 }, [
204
+ u("nav", m, [
205
+ (r(!0), s(w, null, C(e == null ? void 0 : e.items, (o) => (r(), s("button", {
206
+ key: (o == null ? void 0 : o.name) || (o == null ? void 0 : o.component),
207
+ onClick: (k) => t.component = (o == null ? void 0 : o.component) || (o == null ? void 0 : o.name),
208
+ class: H(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none", {
209
+ " font-semibold after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800": t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name),
210
+ "": t.component !== (o == null ? void 0 : o.component) && t.component !== (o == null ? void 0 : o.name)
211
+ }])
212
+ }, j(o == null ? void 0 : o.title), 11, oo))), 128))
213
+ ]),
214
+ (r(!0), s(w, null, C(e.items, (o, k) => {
215
+ var _, p, h, f, y;
216
+ return r(), s(w, { key: k }, [
217
+ t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name) ? (r(), s("div", eo, [
218
+ o != null && o.component ? (r(), s("div", to, [
219
+ (r(), M(T(o.component), {
220
+ geometry: (p = (_ = t.objectData) == null ? void 0 : _.rows[0]) == null ? void 0 : p.geom,
221
+ zoom: 16,
222
+ id: (f = (h = n.$route) == null ? void 0 : h.params) == null ? void 0 : f.id
223
+ }, null, 8, ["geometry", "id"]))
224
+ ])) : b("", !0),
225
+ o != null && o.name ? (r(), s("div", ro, [
226
+ u("div", {
227
+ innerHTML: (y = t.objectData) == null ? void 0 : y.data[o == null ? void 0 : o.name]
228
+ }, null, 8, no)
229
+ ])) : b("", !0)
230
+ ])) : b("", !0)
231
+ ], 64);
232
+ }), 128))
233
+ ], 64)) : b("", !0),
234
+ (e == null ? void 0 : e.type) === "vertical_tabs" ? (r(), s("div", so, [
235
+ u("nav", co, [
236
+ (r(!0), s(w, null, C(e == null ? void 0 : e.items, (o) => (r(), s("button", {
237
+ key: (o == null ? void 0 : o.name) || (o == null ? void 0 : o.component),
238
+ onClick: (k) => t.component = (o == null ? void 0 : o.component) || (o == null ? void 0 : o.name),
239
+ class: H(["relative inline-flex items-center w-full py-1 text-sm border-transparent pe-4 gap-x-2 border-e-2 whitespace-nowrap hover:text-blue-600 focus:outline-none focus:text-blue-600", {
240
+ "font-semibold after:absolute after:top-[0] after:right-[-1px] after:h-full text-blue-600 after:w-[2px] after:bg-blue-600 ": t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name),
241
+ "text-gray-500": t.component !== (o == null ? void 0 : o.component) && t.component !== (o == null ? void 0 : o.name)
242
+ }])
243
+ }, j(o == null ? void 0 : o.title), 11, ao))), 128))
244
+ ]),
245
+ u("div", lo, [
246
+ (r(!0), s(w, null, C(e.items, (o, k) => {
247
+ var _, p, h, f, y;
248
+ return r(), s(w, { key: k }, [
249
+ t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name) ? (r(), s("div", uo, [
250
+ o != null && o.component ? (r(), s("div", po, [
251
+ (r(), M(T(o.component), {
252
+ geometry: (p = (_ = t.objectData) == null ? void 0 : _.rows[0]) == null ? void 0 : p.geom,
253
+ zoom: 16,
254
+ id: (f = (h = n.$route) == null ? void 0 : h.params) == null ? void 0 : f.id
255
+ }, null, 8, ["geometry", "id"]))
256
+ ])) : b("", !0),
257
+ o != null && o.name ? (r(), s("div", ho, [
258
+ u("div", {
259
+ innerHTML: (y = t.objectData) == null ? void 0 : y.data[o == null ? void 0 : o.name]
260
+ }, null, 8, bo)
261
+ ])) : b("", !0)
262
+ ])) : b("", !0)
263
+ ], 64);
264
+ }), 128))
265
+ ])
266
+ ])) : b("", !0)
267
+ ], 2);
268
+ }), 128))
269
+ ], 2)
270
+ ]);
271
+ }
272
+ const fo = /* @__PURE__ */ A(P, [["render", xo], ["__scopeId", "data-v-f2a27685"]]);
273
+ export {
274
+ fo as default
275
+ };
@@ -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-Do-GQQHc.js";
2
+ import { _ as c } from "./import-file-B80Ws8by.js";
3
3
  const n = {};
4
4
  function s(_, p, a, i, f, m) {
5
5
  const o = e("router-view");
@@ -1,4 +1,4 @@
1
- import { _ as b, u as h, a as c } from "./import-file-Do-GQQHc.js";
1
+ import { _ as b, u as h, a as c } from "./import-file-B80Ws8by.js";
2
2
  import { resolveComponent as d, openBlock as m, createElementBlock as p, createElementVNode as l, createBlock as f, createCommentVNode as g } from "vue";
3
3
  const x = {
4
4
  data() {