@opengis/admin 0.2.130 → 0.2.132

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. package/README.md +97 -97
  2. package/config.js +4 -4
  3. package/dist/add-page-DQ70Si9f.js +104 -0
  4. package/dist/{admin-interface-DZ_JAuHP.js → admin-interface-CgXFerXl.js} +348 -323
  5. package/dist/{admin-view-CHq_9aht.js → admin-view-t-gzhVnl.js} +231 -291
  6. package/dist/admin.js +1 -1
  7. package/dist/admin.umd.cjs +81 -81
  8. package/dist/assets/logo.svg +41 -41
  9. package/dist/{card-view-DHcY64lQ.js → card-view-Dtf6Ap9G.js} +1 -1
  10. package/dist/edit-page-BWRXfML4.js +125 -0
  11. package/dist/{import-file-BWQ2bV93.js → import-file-CztGvKRc.js} +25619 -26786
  12. package/dist/style.css +1 -1
  13. package/module/settings/card/admin.accounts.table/index.yml +7 -7
  14. package/module/settings/card/admin.accounts.table/rules.hbs +18 -18
  15. package/module/settings/card/admin.accounts.table/users.hbs +13 -13
  16. package/module/settings/card/admin.routes.table/groups.hbs +11 -11
  17. package/module/settings/card/admin.routes.table/users.hbs +16 -16
  18. package/module/settings/cls/core.actions.json +17 -17
  19. package/module/settings/cls/core.scope.json +13 -13
  20. package/module/settings/cls/properties.site_status.json +13 -13
  21. package/module/settings/cls/properties.widget_status.json +13 -13
  22. package/module/settings/cls/users.user_type.json +13 -13
  23. package/module/settings/cls/yes_no.json +11 -11
  24. package/module/settings/form/admin.accounts.form.json +13 -13
  25. package/module/settings/form/admin.properties.form.json +15 -15
  26. package/module/settings/form/admin.roles.form.json +21 -21
  27. package/module/settings/form/admin.user_properties.form.json +15 -15
  28. package/module/settings/form/admin.user_roles_card.form.json +13 -13
  29. package/module/settings/interface/admin.properties.json +4 -4
  30. package/module/settings/interface/admin.roles.json +4 -4
  31. package/module/settings/interface/admin.routes.json +4 -4
  32. package/module/settings/interface/admin.users.json +4 -4
  33. package/module/settings/select/core.routes.sql +1 -1
  34. package/module/settings/select/core.user_mentioned.sql +1 -1
  35. package/module/settings/select/core.user_uid.sql +1 -1
  36. package/module/settings/table/admin.properties.table.json +39 -39
  37. package/module/settings/table/admin.user_properties.table.json +34 -34
  38. package/package.json +5 -5
  39. package/plugin.js +29 -29
  40. package/server/helpers/core/badge.js +16 -16
  41. package/server/helpers/core/buttonHelper.js +21 -21
  42. package/server/helpers/core/coalesce.js +7 -7
  43. package/server/helpers/core/select.js +48 -48
  44. package/server/helpers/core/token.js +18 -18
  45. package/server/helpers/index.js +36 -35
  46. package/server/helpers/list/buttonHelper.js +21 -21
  47. package/server/helpers/temp/contentList.js +58 -58
  48. package/server/helpers/temp/ifCond.js +101 -101
  49. package/server/helpers/utils/button.js +5 -5
  50. package/server/helpers/utils/mdToHTML.js +17 -17
  51. package/server/plugins/access/index.mjs +6 -6
  52. package/server/plugins/adminHook.js +81 -81
  53. package/server/plugins/cron.js +10 -10
  54. package/server/plugins/docs.js +28 -28
  55. package/server/routes/access/controllers/access.group.js +29 -29
  56. package/server/routes/access/controllers/access.group.post.js +54 -54
  57. package/server/routes/access/index.mjs +11 -11
  58. package/server/routes/access/schema.mjs +67 -67
  59. package/server/routes/calendar/controllers/calendar.data.js +125 -125
  60. package/server/routes/calendar/index.mjs +7 -7
  61. package/server/routes/calendar/schema.js +21 -21
  62. package/server/routes/data/controllers/cardTabData.js +49 -49
  63. package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
  64. package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
  65. package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
  66. package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
  67. package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
  68. package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
  69. package/server/routes/data/controllers/tableData.js +31 -31
  70. package/server/routes/data/controllers/tableDataId.js +27 -27
  71. package/server/routes/data/controllers/tableFilter.js +108 -108
  72. package/server/routes/data/controllers/tokenInfo.js +9 -9
  73. package/server/routes/data/controllers/utils/assignTokens.js +30 -30
  74. package/server/routes/data/controllers/utils/getColumns.js +8 -8
  75. package/server/routes/data/index.mjs +20 -20
  76. package/server/routes/data/schema.js +54 -54
  77. package/server/routes/menu/controllers/getMenu.js +11 -3
  78. package/server/routes/menu/controllers/interfaces.js +19 -0
  79. package/server/routes/menu/index.mjs +7 -5
  80. package/server/routes/notifications/controllers/readNotifications.js +27 -27
  81. package/server/routes/notifications/controllers/testEmail.js +35 -35
  82. package/server/routes/notifications/controllers/userNotifications.js +53 -53
  83. package/server/routes/notifications/funcs/addNotification.js +21 -21
  84. package/server/routes/notifications/funcs/sendNotification.js +92 -92
  85. package/server/routes/notifications/hook/onWidgetSet.js +56 -56
  86. package/server/routes/notifications/index.mjs +26 -26
  87. package/server/routes/notifications/schema.js +16 -16
  88. package/server/routes/print/controllers/cardPrint.js +134 -134
  89. package/server/routes/print/controllers/printTemplate.js +4 -3
  90. package/server/routes/print/controllers/printTemplatePreview.js +15 -9
  91. package/server/routes/properties/funcs/getSettings.js +56 -56
  92. package/server/routes/properties/schema.js +10 -10
  93. package/server/routes/properties/utils/refreshData.js +4 -4
  94. package/server/routes/report/controllers/data.js +76 -76
  95. package/server/routes/report/controllers/list.js +18 -18
  96. package/server/routes/report/index.mjs +7 -7
  97. package/server/routes/report/utils/formatValue.js +179 -179
  98. package/server/routes/root.mjs +3 -3
  99. package/server/routes/templates/controllers/getTemplate.js +49 -49
  100. package/server/routes/templates/index.mjs +16 -16
  101. package/server/routes/templates/schema.js +8 -8
  102. package/server/routes/user/controllers/user.cls.id.js +14 -14
  103. package/server/routes/user/controllers/user.cls.js +71 -71
  104. package/server/routes/user/controllers/user.info.js +17 -17
  105. package/server/routes/user/schema.js +14 -14
  106. package/server/routes/widget/controllers/widget.del.js +47 -47
  107. package/server/routes/widget/controllers/widget.set.js +84 -84
  108. package/server/routes/widget/hook/onWidgetSet.js +12 -12
  109. package/server/routes/widget/index.mjs +16 -16
  110. package/server/routes/widget/schema.js +12 -12
  111. package/server/templates/cls/itree.recrzone_category.json +73 -73
  112. package/server/templates/cls/test.json +9 -9
  113. package/server/templates/form/admin.user_cls.data.form.json +49 -49
  114. package/server/templates/form/admin.user_group_rel.form.json +21 -21
  115. package/server/templates/form/form-user-pass.json +10 -10
  116. package/server/templates/form/form-user_group.json +39 -39
  117. package/server/templates/form/form-users.json +156 -156
  118. package/server/templates/form/user_group_access.form.json +22 -22
  119. package/server/templates/select/account_id.json +2 -2
  120. package/server/templates/table/gis.dataset.table.json +43 -43
  121. package/server/templates/table/management.user_group.table.json +112 -112
  122. package/server/templates/table/management.users.table.json +126 -126
  123. package/utils.js +29 -29
  124. package/dist/add-page-B9j1X71R.js +0 -119
  125. package/dist/edit-page-DPeBqCDl.js +0 -138
  126. package/dist/profile-page-vqy75jEB.js +0 -78
  127. package/dist/user-B_2kh6ic.js +0 -5
  128. package/module/settings/setting/test.json +0 -6
@@ -1,138 +0,0 @@
1
- import { _ as g, u as f, e as m } from "./import-file-BWQ2bV93.js";
2
- import { resolveComponent as y, openBlock as h, createElementBlock as x, createElementVNode as c, createBlock as w, normalizeStyle as k, createCommentVNode as v } from "vue";
3
- const $ = {
4
- data() {
5
- return {
6
- formValues: {},
7
- scheme: null,
8
- table: "",
9
- token: "",
10
- style: null
11
- };
12
- },
13
- mounted() {
14
- this.getFormScheme();
15
- },
16
- methods: {
17
- flattenMenu(e) {
18
- const t = [];
19
- return e.forEach((r) => {
20
- r.menu ? t.push(...this.flattenMenu(r.menu)) : t.push(r);
21
- }), t;
22
- },
23
- async getFormScheme() {
24
- var i, o;
25
- const e = this.flattenMenu(f.value);
26
- e != null && e.length || this.$router.replace("/404");
27
- const t = e == null ? void 0 : e.find((a) => {
28
- var n, s;
29
- return (a == null ? void 0 : a.path) == ((s = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : s.table);
30
- });
31
- t || this.$router.replace("/404");
32
- const r = t == null ? void 0 : t.table;
33
- this.table = r;
34
- try {
35
- const {
36
- data: { form: a }
37
- } = await m.get(`/api/template/table/${r}`), { data: n } = await m.get(
38
- `/api/table/${this.table}/${(o = (i = this.$route) == null ? void 0 : i.query) == null ? void 0 : o.id}`
39
- );
40
- this.token = (n == null ? void 0 : n.token) || "", this.formValues = n || {};
41
- const { data: s } = await m.get(`/api/template/form/${a}`);
42
- this.scheme = (s == null ? void 0 : s.schema) || s, this.style = (s == null ? void 0 : s.style) || null;
43
- } catch {
44
- }
45
- },
46
- async onlyEditObject() {
47
- var t, r, i, o, a, n, s, l, u;
48
- const e = this.$refs.form;
49
- try {
50
- await e.doValidation(), await m.put(`/api/table/${this.token}`, this.formValues), await this.$notify({
51
- title: "Успішно!",
52
- message: "Об'єкт успішно створено",
53
- type: "success"
54
- });
55
- } catch (b) {
56
- const d = ((t = b == null ? void 0 : b.response) == null ? void 0 : t.data) || "";
57
- let p = ((a = (o = (i = (r = Object.entries(e == null ? void 0 : e.formErrors)) == null ? void 0 : r[0]) == null ? void 0 : i[1]) == null ? void 0 : o[0]) == null ? void 0 : a.message) === "Це поле обов'язкове" ? "Заповніть обов'язкові поля" : (u = (l = (s = (n = Object.entries(e == null ? void 0 : e.formErrors)) == null ? void 0 : n[0]) == null ? void 0 : s[1]) == null ? void 0 : l[0]) == null ? void 0 : u.message;
58
- this.$notify({
59
- title: "Помилка!",
60
- message: d || p || "Сталася помилка валідаціі",
61
- type: "error"
62
- });
63
- }
64
- },
65
- getGroupedErrorNotification(e, t) {
66
- if (!e || !t) return "";
67
- const r = {};
68
- return Object.entries(e).forEach(([o, a]) => {
69
- var s;
70
- const n = ((s = t[o]) == null ? void 0 : s.ua) || o;
71
- a.forEach((l) => {
72
- const u = l.message;
73
- r[u] || (r[u] = []), r[u].push(`"${n}"`);
74
- });
75
- }), Object.entries(r).map(([o, a]) => `<b>${o}:</b> ${a.join(", ")}`).join("<br>") || "Сталася помилка валідації";
76
- },
77
- async editObjectAndRedirect() {
78
- const e = this.$refs.form;
79
- try {
80
- await e.doValidation(), await m.put(`/api/table/${this.token}`, this.formValues), await this.$router.back(), await this.$notify({
81
- title: "Успішно!",
82
- message: "Об'єкт успішно створено",
83
- type: "success"
84
- });
85
- } catch {
86
- const r = this.getGroupedErrorNotification(
87
- e == null ? void 0 : e.formErrors,
88
- e == null ? void 0 : e.scheme
89
- );
90
- this.$notify({
91
- title: "Помилка!",
92
- message: r,
93
- type: "error"
94
- });
95
- }
96
- }
97
- }
98
- }, V = { class: "bg-gray-50 lg:w-[calc(100vw-260px)] w-[100vw]" }, _ = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, j = { class: "flex items-center gap-[6px]" }, E = {
99
- style: { height: "calc(100vh - 155px)" },
100
- class: "bg-gray-50 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw]"
101
- }, O = { 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" };
102
- function M(e, t, r, i, o, a) {
103
- var s;
104
- const n = y("VsForm");
105
- return h(), x("div", V, [
106
- c("div", _, [
107
- t[3] || (t[3] = c("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
108
- c("div", j, [
109
- c("button", {
110
- onClick: t[0] || (t[0] = (l) => e.$router.back()),
111
- 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"
112
- }, " Скасувати "),
113
- c("button", {
114
- onClick: t[1] || (t[1] = (...l) => a.editObjectAndRedirect && a.editObjectAndRedirect(...l)),
115
- 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"
116
- }, " Зберегти ")
117
- ])
118
- ]),
119
- c("div", E, [
120
- c("div", O, [
121
- o.scheme ? (h(), w(n, {
122
- key: 0,
123
- ref: "form",
124
- scheme: o.scheme,
125
- columns: (s = o.style) == null ? void 0 : s.columns,
126
- style: k(o.style),
127
- modelValue: o.formValues,
128
- "onUpdate:modelValue": t[2] || (t[2] = (l) => o.formValues = l),
129
- class: "p-0 mt-[20px]"
130
- }, null, 8, ["scheme", "columns", "style", "modelValue"])) : v("", !0)
131
- ])
132
- ])
133
- ]);
134
- }
135
- const N = /* @__PURE__ */ g($, [["render", M]]);
136
- export {
137
- N as default
138
- };
@@ -1,78 +0,0 @@
1
- import { _ as n, e as m } from "./import-file-BWQ2bV93.js";
2
- import { u as p } from "./user-B_2kh6ic.js";
3
- import { resolveComponent as d, openBlock as u, createElementBlock as f, createElementVNode as o, createBlock as h, createCommentVNode as b } from "vue";
4
- const x = {
5
- data() {
6
- return {
7
- formScheme: null,
8
- formValues: {}
9
- };
10
- },
11
- mounted() {
12
- this.getFormScheme();
13
- },
14
- computed: {
15
- userData() {
16
- return p.value;
17
- }
18
- },
19
- methods: {
20
- async updateUser() {
21
- var r;
22
- try {
23
- await m.put(`/user/${(r = this.userData.user) == null ? void 0 : r.uid}`, this.formValues), await this.$notify({
24
- title: "Успішно!",
25
- message: "Дані успішно оновлені",
26
- type: "success"
27
- });
28
- } catch {
29
- this.$notify({
30
- title: "Помилка!",
31
- message: "Сталася помилка",
32
- type: "error"
33
- });
34
- }
35
- },
36
- async getFormScheme() {
37
- var r, t, a, l;
38
- try {
39
- const { data: e } = await m.get(
40
- "/api/template/form/admin.profile.form"
41
- );
42
- console.log(this.userData);
43
- for (const s in e == null ? void 0 : e.schema)
44
- (t = (r = this.userData) == null ? void 0 : r.user) != null && t[s] && (this.formValues[s] = (l = (a = this.userData) == null ? void 0 : a.user) == null ? void 0 : l[s]);
45
- this.formScheme = e.schema;
46
- } catch (e) {
47
- console.error(e);
48
- }
49
- }
50
- }
51
- }, g = { class: "flex justify-center pt-[20px] pb-[20px] pl-[20px] h-[calc(100vh-58px)]" }, k = { class: "bg-white rounded-xl border p-[20px]" }, y = { class: "flex-1 overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-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" }, w = { class: "flex" };
52
- function _(r, t, a, l, e, s) {
53
- const i = d("VsForm");
54
- return u(), f("div", g, [
55
- o("div", k, [
56
- t[2] || (t[2] = o("h2", { class: "mb-[20px] text-center" }, "Профіль", -1)),
57
- o("div", y, [
58
- e.formScheme ? (u(), h(i, {
59
- key: 0,
60
- scheme: e.formScheme,
61
- modelValue: e.formValues,
62
- "onUpdate:modelValue": t[0] || (t[0] = (c) => e.formValues = c),
63
- class: "pb-0"
64
- }, null, 8, ["scheme", "modelValue"])) : b("", !0),
65
- o("div", w, [
66
- o("button", {
67
- onClick: t[1] || (t[1] = (...c) => s.updateUser && s.updateUser(...c)),
68
- class: "ml-auto text-[18px] bg-blue-500 text-white px-[8px] py-[4px] rounded hover:bg-blue-700 duration-300"
69
- }, " Зберегти ")
70
- ])
71
- ])
72
- ])
73
- ]);
74
- }
75
- const D = /* @__PURE__ */ n(x, [["render", _]]);
76
- export {
77
- D as default
78
- };
@@ -1,5 +0,0 @@
1
- import { ref as r } from "vue";
2
- const e = r(null);
3
- export {
4
- e as u
5
- };
@@ -1,6 +0,0 @@
1
- {
2
- "admin.title": {
3
- "type": "Text",
4
- "ua": "Назва"
5
- }
6
- }