@opengis/admin 0.1.66 → 0.1.68

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. package/README.md +29 -29
  2. package/config.js +4 -4
  3. package/dist/IconChevronDown-Co0qOLyQ.js +26 -0
  4. package/dist/{add-page-YonHQsF2.js → add-page-Bv-BNhYQ.js} +11 -8
  5. package/dist/{admin-interface-DSR1im5I.js → admin-interface-j3f16Iy8.js} +593 -446
  6. package/dist/{admin-view-WZhYBXYw.js → admin-view-DykzQo5I.js} +214 -223
  7. package/dist/admin.js +1 -1
  8. package/dist/admin.umd.cjs +83 -83
  9. package/dist/card-page-DtXydAxe.js +275 -0
  10. package/dist/{card-view-DYhMgpIH.js → card-view-MpG-dhK0.js} +1 -1
  11. package/dist/{edit-page-D8fMSwEp.js → edit-page-DkD5JFQv.js} +13 -12
  12. package/dist/{import-file-Do-GQQHc.js → import-file-DGI0k9si.js} +6797 -6814
  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 +81 -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 +152 -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 +7 -17
  70. package/server/routes/calendar/schema.js +22 -0
  71. package/server/routes/data/controllers/cardData.js +57 -57
  72. package/server/routes/data/controllers/cardTabData.js +49 -49
  73. package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
  74. package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
  75. package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
  76. package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
  77. package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
  78. package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
  79. package/server/routes/data/controllers/tableData.js +112 -112
  80. package/server/routes/data/controllers/tableDataId.js +27 -27
  81. package/server/routes/data/controllers/tableFilter.js +63 -63
  82. package/server/routes/data/controllers/utils/assignTokens.js +30 -30
  83. package/server/routes/data/controllers/utils/getColumns.js +8 -8
  84. package/server/routes/data/index.mjs +15 -15
  85. package/server/routes/data/schema.js +54 -7
  86. package/server/routes/menu/controllers/getMenu.js +51 -51
  87. package/server/routes/menu/index.mjs +5 -5
  88. package/server/routes/menu/schema.js +0 -0
  89. package/server/routes/notifications/controllers/readNotifications.js +30 -30
  90. package/server/routes/notifications/controllers/userNotifications.js +64 -64
  91. package/server/routes/notifications/hook/onWidgetSet.js +57 -57
  92. package/server/routes/notifications/index.mjs +15 -40
  93. package/server/routes/notifications/schema.js +11 -0
  94. package/server/routes/properties/controllers/admin.properties.get.js +29 -29
  95. package/server/routes/properties/controllers/user.properties.get.js +34 -34
  96. package/server/routes/properties/controllers/user.properties.post.js +30 -30
  97. package/server/routes/properties/funcs/getSettings.js +56 -56
  98. package/server/routes/properties/funcs/setSettings.js +44 -44
  99. package/server/routes/properties/funcs/utils/dataInsert.js +26 -26
  100. package/server/routes/properties/index.mjs +14 -26
  101. package/server/routes/properties/schema.js +11 -0
  102. package/server/routes/root.mjs +3 -3
  103. package/server/routes/templates/controllers/getTemplate.js +22 -22
  104. package/server/routes/templates/index.mjs +14 -14
  105. package/server/routes/templates/scheme.js +9 -0
  106. package/server/templates/cls/itree.recrzone_category.json +73 -73
  107. package/server/templates/cls/test.json +9 -9
  108. package/server/templates/form/admin.user_cls.data.form.json +49 -49
  109. package/server/templates/form/admin.user_group_rel.form.json +21 -21
  110. package/server/templates/form/cp_building.form.json +32 -32
  111. package/server/templates/form/form-user-pass.json +10 -10
  112. package/server/templates/form/form-user_group.json +39 -39
  113. package/server/templates/form/form-users.json +156 -156
  114. package/server/templates/form/user_group_access.form.json +22 -22
  115. package/server/templates/select/account_id.json +2 -2
  116. package/server/templates/table/gis.dataset.table.json +43 -43
  117. package/server/templates/table/management.user_group.table.json +112 -112
  118. package/server/templates/table/management.users.table.json +126 -126
  119. package/utils.js +21 -21
  120. package/dist/card-page-BH8lGOKk.js +0 -230
package/utils.js CHANGED
@@ -1,21 +1,21 @@
1
- import yamlSafe from 'js-yaml';
2
-
3
- import getSettings from './server/routes/properties/funcs/getSettings.js';
4
- import setSettings from './server/routes/properties/funcs/setSettings.js';
5
-
6
- function loadSafe (yml) {
7
- try {
8
- return yamlSafe.load(yml);
9
- } catch (err) {
10
- return { error: err.toString() };
11
- }
12
- };
13
-
14
- Object.assign(yamlSafe, { loadSafe });
15
-
16
- export default null;
17
- export {
18
- yamlSafe,
19
- getSettings,
20
- setSettings,
21
- };
1
+ import yamlSafe from 'js-yaml';
2
+
3
+ import getSettings from './server/routes/properties/funcs/getSettings.js';
4
+ import setSettings from './server/routes/properties/funcs/setSettings.js';
5
+
6
+ function loadSafe (yml) {
7
+ try {
8
+ return yamlSafe.load(yml);
9
+ } catch (err) {
10
+ return { error: err.toString() };
11
+ }
12
+ };
13
+
14
+ Object.assign(yamlSafe, { loadSafe });
15
+
16
+ export default null;
17
+ export {
18
+ yamlSafe,
19
+ getSettings,
20
+ setSettings,
21
+ };
@@ -1,230 +0,0 @@
1
- import { g as L, h as R, _ as V, u as H, a as A } from "./import-file-Do-GQQHc.js";
2
- import { computed as q, resolveComponent as $, openBlock as s, createElementBlock as a, createElementVNode as p, toDisplayString as j, createVNode as z, withCtx as B, createTextVNode as N, createBlock as m, createCommentVNode as v, normalizeClass as M, Fragment as w, renderList as D, resolveDynamicComponent as T } from "vue";
3
- const E = { class: "h-[76px] bg-white border rounded-xl flex items-center justify-between px-[15px] mb-[16px]" }, S = { class: "text-lg font-semibold md:text-xl text-stone-800 dark:text-neutral-200" }, G = { class: "flex items-center gap-[6px]" }, O = {
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(t) {
15
- const n = t, c = L(), l = R(), r = () => {
16
- c.back();
17
- }, u = q(
18
- () => {
19
- var d;
20
- return `/edit?table=${n.getRoute}&id=${(d = l == null ? void 0 : l.params) == null ? void 0 : d.id}`;
21
- }
22
- );
23
- return (d, h) => {
24
- const b = $("router-link");
25
- return s(), a("div", E, [
26
- p("div", null, [
27
- p("button", {
28
- onClick: r,
29
- class: "text-sm h-[20px] text-blue-600 font-medium hover:border-b hover:border-b-2 hover:border-b-blue-500"
30
- }, " До таблиці "),
31
- p("h2", S, j(t.title), 1)
32
- ]),
33
- p("div", G, [
34
- z(b, {
35
- to: u.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: B(() => h[0] || (h[0] = [
39
- N(" Редагувати ")
40
- ])),
41
- _: 1
42
- }, 8, ["to"])
43
- ])
44
- ]);
45
- };
46
- }
47
- }, F = {
48
- components: { AdminCardHeader: O },
49
- data() {
50
- return {
51
- objectData: null,
52
- component: ""
53
- };
54
- },
55
- computed: {
56
- getRoute() {
57
- const t = this.flattenMenu(H.value);
58
- t != null && t.length || this.$router.replace("/404");
59
- const n = t == null ? void 0 : t.find((c) => {
60
- var l, r;
61
- return (c == null ? void 0 : c.table) == ((r = (l = this.$route) == null ? void 0 : l.params) == null ? void 0 : r.table);
62
- });
63
- return n || this.$router.replace("/404"), n == null ? void 0 : n.path;
64
- },
65
- getTitle() {
66
- var t, n, c, l, r, u, d, h, b, o, i, C, e, k, _;
67
- if ((c = (n = (t = this.objectData) == null ? void 0 : t.rows) == null ? void 0 : n[0]) != null && c.name)
68
- return ((d = (u = (r = (l = this.objectData) == null ? void 0 : l.rows) == null ? void 0 : r[0]) == null ? void 0 : u.name) == null ? void 0 : d.length) < 35 ? (o = (b = (h = this.objectData) == null ? void 0 : h.rows) == null ? void 0 : b[0]) == null ? void 0 : o.name : ((k = (e = (C = (i = this.objectData) == null ? void 0 : i.rows) == null ? void 0 : C[0]) == null ? void 0 : e.name) == null ? void 0 : k.slice(0, 35)) + " ...";
69
- {
70
- const x = (_ = this.flattenMenu(H.value)) == null ? void 0 : _.find(
71
- (g) => {
72
- var f, y;
73
- return (g == null ? void 0 : g.table) === ((y = (f = this.$route) == null ? void 0 : f.params) == null ? void 0 : y.table);
74
- }
75
- );
76
- return x == null ? void 0 : x.ua;
77
- }
78
- }
79
- },
80
- async mounted() {
81
- await this.getObjectData(), await this.checkActiveComponent();
82
- },
83
- watch: {
84
- component(t) {
85
- this.$router.replace({ ...this.$route, query: { tab: t } });
86
- }
87
- },
88
- methods: {
89
- async getObjectData() {
90
- var c;
91
- const { table: t, id: n } = (c = this.$route) == null ? void 0 : c.params;
92
- (!t || !n) && this.$router.replace("/404");
93
- try {
94
- const { data: l } = await A.get(`/api/table-data/${t}/${n}`);
95
- this.objectData = l;
96
- } catch (l) {
97
- console.error(l);
98
- }
99
- },
100
- getColClass(t) {
101
- return `col-span-${t || 12}`;
102
- },
103
- getGridClass() {
104
- return "grid-cols-12";
105
- },
106
- checkActiveComponent() {
107
- var t, n, c, l, r, u, d, h, b;
108
- if ((n = (t = this.$route) == null ? void 0 : t.query) != null && n.tab)
109
- this.component = (l = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : l.tab;
110
- else {
111
- const o = (u = (r = this.objectData) == null ? void 0 : r.panels) == null ? void 0 : u.find((i) => (i == null ? void 0 : i.type) === "tabs");
112
- (d = o == null ? void 0 : o.items) != null && d.length && (this.component = ((h = o.items[0]) == null ? void 0 : h.component) || ((b = o.items[0]) == null ? void 0 : b.name));
113
- }
114
- },
115
- flattenMenu(t) {
116
- const n = [];
117
- return t.forEach((c) => {
118
- c.menu ? n.push(...this.flattenMenu(c.menu)) : n.push(c);
119
- }), n;
120
- }
121
- }
122
- }, I = {
123
- style: { width: "calc(100vw - 260px)", height: "calc(100vh - 60px)" },
124
- class: "p-4 overflow-y-auto bg-gray-50"
125
- }, P = {
126
- key: 0,
127
- class: "bg-white border rounded-xl"
128
- }, J = { class: "p-[10px] pl-[20px] text-xl" }, K = ["innerHTML"], Q = { key: 1 }, U = { class: "p-[10px] pl-[20px] text-xl" }, W = {
129
- key: 0,
130
- class: "p-[20px] border-t"
131
- }, X = {
132
- key: 1,
133
- class: "p-[20px] border-t"
134
- }, Y = ["innerHTML"], Z = { 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]" }, ee = ["onClick"], te = {
135
- key: 0,
136
- class: "bg-white border border-t-0 rounded-bl-xl rounded-br-xl"
137
- }, oe = {
138
- key: 0,
139
- class: "p-[20px] border-t"
140
- }, re = {
141
- key: 1,
142
- class: "p-[20px] border-t"
143
- }, ne = ["innerHTML"];
144
- function se(t, n, c, l, r, u) {
145
- var h, b;
146
- const d = $("AdminCardHeader");
147
- return s(), a("div", I, [
148
- ((h = r.objectData) == null ? void 0 : h.isHeader) !== !1 ? (s(), m(d, {
149
- key: 0,
150
- title: u.getTitle,
151
- "get-route": u.getRoute
152
- }, null, 8, ["title", "get-route"])) : v("", !0),
153
- p("div", {
154
- class: M(["grid gap-[20px]", u.getGridClass()])
155
- }, [
156
- (s(!0), a(w, null, D((b = r.objectData) == null ? void 0 : b.panels, (o, i) => {
157
- var C;
158
- return s(), a("div", {
159
- key: i,
160
- class: M(u.getColClass(o.col))
161
- }, [
162
- o != null && o.name ? (s(), a("div", P, [
163
- p("h2", J, j((o == null ? void 0 : o.title) || "Панель"), 1),
164
- p("div", {
165
- class: "p-[20px] border-t",
166
- innerHTML: (C = r.objectData) == null ? void 0 : C.data[o == null ? void 0 : o.name]
167
- }, null, 8, K)
168
- ])) : o.type === "container" ? (s(), a("div", Q, [
169
- (s(!0), a(w, null, D(o.items, (e, k) => {
170
- var _, x, g, f, y;
171
- return s(), a("div", {
172
- key: k,
173
- class: "border rounded-xl bg-white mb-[20px]"
174
- }, [
175
- p("h2", U, j((e == null ? void 0 : e.title) || "Панель"), 1),
176
- e != null && e.component ? (s(), a("div", W, [
177
- (s(), m(T(e.component), {
178
- geometry: (x = (_ = r.objectData) == null ? void 0 : _.rows[0]) == null ? void 0 : x.geom,
179
- zoom: 16,
180
- id: (f = (g = t.$route) == null ? void 0 : g.params) == null ? void 0 : f.id
181
- }, null, 8, ["geometry", "id"]))
182
- ])) : v("", !0),
183
- e != null && e.name ? (s(), a("div", X, [
184
- p("div", {
185
- innerHTML: (y = r.objectData) == null ? void 0 : y.data[e == null ? void 0 : e.name]
186
- }, null, 8, Y)
187
- ])) : v("", !0)
188
- ]);
189
- }), 128))
190
- ])) : v("", !0),
191
- (o == null ? void 0 : o.type) === "tabs" ? (s(), a(w, { key: 2 }, [
192
- p("nav", Z, [
193
- (s(!0), a(w, null, D(o == null ? void 0 : o.items, (e) => (s(), a("button", {
194
- key: (e == null ? void 0 : e.name) || (e == null ? void 0 : e.component),
195
- onClick: (k) => r.component = (e == null ? void 0 : e.component) || (e == null ? void 0 : e.name),
196
- class: M(["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", {
197
- " 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": r.component === (e == null ? void 0 : e.component) || r.component === (e == null ? void 0 : e.name),
198
- "": r.component !== (e == null ? void 0 : e.component) && r.component !== (e == null ? void 0 : e.name)
199
- }])
200
- }, j(e == null ? void 0 : e.title), 11, ee))), 128))
201
- ]),
202
- (s(!0), a(w, null, D(o.items, (e, k) => {
203
- var _, x, g, f, y;
204
- return s(), a(w, { key: k }, [
205
- r.component === (e == null ? void 0 : e.component) || r.component === (e == null ? void 0 : e.name) ? (s(), a("div", te, [
206
- e != null && e.component ? (s(), a("div", oe, [
207
- (s(), m(T(e.component), {
208
- geometry: (x = (_ = r.objectData) == null ? void 0 : _.rows[0]) == null ? void 0 : x.geom,
209
- zoom: 16,
210
- id: (f = (g = t.$route) == null ? void 0 : g.params) == null ? void 0 : f.id
211
- }, null, 8, ["geometry", "id"]))
212
- ])) : v("", !0),
213
- e != null && e.name ? (s(), a("div", re, [
214
- p("div", {
215
- innerHTML: (y = r.objectData) == null ? void 0 : y.data[e == null ? void 0 : e.name]
216
- }, null, 8, ne)
217
- ])) : v("", !0)
218
- ])) : v("", !0)
219
- ], 64);
220
- }), 128))
221
- ], 64)) : v("", !0)
222
- ], 2);
223
- }), 128))
224
- ], 2)
225
- ]);
226
- }
227
- const le = /* @__PURE__ */ V(F, [["render", se], ["__scopeId", "data-v-7789cf37"]]);
228
- export {
229
- le as default
230
- };