@opengis/admin 0.3.103 → 0.3.104
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.
- package/README.md +97 -97
- package/config.js +4 -4
- package/dist/add-page-CxrU5Q4l.js +127 -0
- package/dist/{admin-interface-mIo1_gE2.js → admin-interface-AsvHxkp6.js} +654 -684
- package/dist/admin-view-C7QW8ebw.js +703 -0
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +82 -82
- package/dist/assets/logo.svg +41 -41
- package/dist/{card-view-BPUveYDd.js → card-view-SiUXOypt.js} +1 -1
- package/dist/edit-page-PXfumoJ-.js +145 -0
- package/dist/{import-file-Bs86FUW3.js → import-file-KkQTE8rh.js} +19705 -19959
- package/dist/{profile-page-DHRxyJA_.js → profile-page-B8ZKBocp.js} +4 -4
- package/dist/style.css +1 -1
- package/module/settings/card/admin.accounts.table/index.yml +7 -7
- package/module/settings/card/admin.accounts.table/rules.hbs +18 -18
- package/module/settings/card/admin.accounts.table/users.hbs +13 -13
- package/module/settings/card/admin.routes.table/groups.hbs +11 -11
- package/module/settings/card/admin.routes.table/users.hbs +16 -16
- package/module/settings/cls/core.actions.json +17 -17
- package/module/settings/cls/core.scope.json +13 -13
- package/module/settings/cls/properties.site_status.json +13 -13
- package/module/settings/cls/properties.widget_status.json +13 -13
- package/module/settings/cls/yes_no.json +11 -11
- package/module/settings/form/admin.accounts.form.json +13 -13
- package/module/settings/form/admin.properties.form.json +15 -15
- package/module/settings/form/admin.roles.form.json +21 -21
- package/module/settings/form/admin.user_properties.form.json +15 -15
- package/module/settings/form/admin.user_roles_card.form.json +13 -13
- package/module/settings/interface/admin.properties.json +4 -4
- package/module/settings/interface/admin.roles.json +4 -4
- package/module/settings/interface/admin.routes.json +4 -4
- package/module/settings/interface/admin.users.json +4 -4
- package/module/settings/select/core.routes.sql +1 -1
- package/module/settings/select/core.user_mentioned.sql +1 -1
- package/module/settings/select/core.user_uid.sql +1 -1
- package/module/settings/table/admin.properties.table.json +39 -39
- package/module/settings/table/admin.user_properties.table.json +34 -34
- package/package.json +1 -1
- package/server/helpers/core/coalesce.js +7 -7
- package/server/helpers/core/select.js +48 -48
- package/server/helpers/core/token.js +18 -18
- package/server/helpers/list/buttonHelper.js +21 -21
- package/server/helpers/list/utils/button.js +5 -5
- package/server/helpers/temp/contentList.js +58 -58
- package/server/helpers/temp/ifCond.js +101 -101
- package/server/helpers/utils/button.js +5 -5
- package/server/helpers/utils/mdToHTML.js +17 -17
- package/server/plugins/access/index.mjs +6 -6
- package/server/plugins/adminHook.js +81 -81
- package/server/plugins/cron.js +10 -10
- package/server/plugins/docs.js +28 -28
- package/server/routes/access/controllers/access.group.js +29 -29
- package/server/routes/access/controllers/access.group.post.js +54 -54
- package/server/routes/access/index.mjs +11 -11
- package/server/routes/access/schema.mjs +67 -67
- package/server/routes/calendar/controllers/calendar.data.js +125 -125
- package/server/routes/calendar/index.mjs +7 -7
- package/server/routes/calendar/schema.js +21 -21
- package/server/routes/data/controllers/cardTabData.js +49 -49
- package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
- package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
- package/server/routes/data/controllers/tableDataId.js +27 -27
- package/server/routes/data/controllers/tokenInfo.js +9 -9
- package/server/routes/data/controllers/utils/assignTokens.js +30 -30
- package/server/routes/data/controllers/utils/conditions.js +20 -20
- package/server/routes/data/controllers/utils/getColumns.js +8 -8
- package/server/routes/data/index.mjs +20 -20
- package/server/routes/data/schema.js +54 -54
- package/server/routes/notifications/controllers/readNotifications.js +18 -18
- package/server/routes/notifications/controllers/testEmail.js +35 -35
- package/server/routes/notifications/controllers/userNotifications.js +53 -53
- package/server/routes/notifications/hook/onWidgetSet.js +56 -56
- package/server/routes/notifications/index.mjs +26 -26
- package/server/routes/notifications/schema.js +16 -16
- package/server/routes/properties/schema.js +10 -10
- package/server/routes/report/controllers/list.js +21 -21
- package/server/routes/report/controllers/tableData.js +107 -112
- package/server/routes/report/controllers/widgetData.js +104 -90
- package/server/routes/report/index.mjs +9 -9
- package/server/routes/report/utils/formatValue.js +179 -179
- package/server/routes/root.mjs +3 -3
- package/server/routes/templates/controllers/getTemplate.js +44 -44
- package/server/routes/templates/schema.js +8 -8
- package/server/routes/user/controllers/user.cls.id.js +14 -14
- package/server/routes/user/controllers/user.cls.js +72 -72
- package/server/routes/user/controllers/user.info.js +17 -17
- package/server/routes/user/schema.js +14 -14
- package/server/routes/util/controllers/code.generator.js +89 -89
- package/server/routes/widget/controllers/widget.del.js +80 -80
- package/server/routes/widget/controllers/widget.set.js +101 -101
- package/server/routes/widget/hook/onWidgetSet.js +12 -12
- package/server/routes/widget/index.mjs +20 -20
- package/server/routes/widget/schema.js +12 -12
- package/server/templates/cls/itree.recrzone_category.json +73 -73
- package/server/templates/cls/test.json +9 -9
- package/server/templates/form/admin.user_cls.data.form.json +49 -49
- package/server/templates/form/admin.user_group_rel.form.json +21 -21
- package/server/templates/form/form-user-pass.json +10 -10
- package/server/templates/form/form-user_group.json +39 -39
- package/server/templates/form/form-users.json +156 -156
- package/server/templates/form/user_group_access.form.json +22 -22
- package/server/templates/select/account_id.json +2 -2
- package/server/templates/table/gis.dataset.table.json +43 -43
- package/server/templates/table/management.user_group.table.json +112 -112
- package/server/templates/table/management.users.table.json +126 -126
- package/server/utils/addNotification.js +21 -21
- package/server/utils/sendNotification.js +89 -89
- package/dist/add-page-BtME1JJf.js +0 -126
- package/dist/admin-view-URsx4MBX.js +0 -1018
- package/dist/assets/images/eye.svg +0 -4
- package/dist/assets/images/file-up.svg +0 -6
- package/dist/edit-page-DVyHgdP0.js +0 -154
@@ -1,4 +0,0 @@
|
|
1
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M1.3335 8C1.3335 8 3.3335 3.33333 8.00016 3.33333C12.6668 3.33333 14.6668 8 14.6668 8C14.6668 8 12.6668 12.6667 8.00016 12.6667C3.3335 12.6667 1.3335 8 1.3335 8Z" stroke="#6B7280" stroke-linecap="round" stroke-linejoin="round"/>
|
3
|
-
<path d="M8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z" stroke="#6B7280" stroke-linecap="round" stroke-linejoin="round"/>
|
4
|
-
</svg>
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M8.45837 1.16666H3.50004C3.19062 1.16666 2.89388 1.28957 2.67508 1.50837C2.45629 1.72716 2.33337 2.0239 2.33337 2.33332V11.6667C2.33337 11.9761 2.45629 12.2728 2.67508 12.4916C2.89388 12.7104 3.19062 12.8333 3.50004 12.8333H10.5C10.8095 12.8333 11.1062 12.7104 11.325 12.4916C11.5438 12.2728 11.6667 11.9761 11.6667 11.6667V4.37499L8.45837 1.16666Z" stroke="#2563EB" stroke-linecap="round" stroke-linejoin="round"/>
|
3
|
-
<path d="M8.16663 1.16666V4.66666H11.6666" stroke="#2563EB" stroke-linecap="round" stroke-linejoin="round"/>
|
4
|
-
<path d="M7 7V10.5" stroke="#2563EB" stroke-linecap="round" stroke-linejoin="round"/>
|
5
|
-
<path d="M8.75 8.75L7 7L5.25 8.75" stroke="#2563EB" stroke-linecap="round" stroke-linejoin="round"/>
|
6
|
-
</svg>
|
@@ -1,154 +0,0 @@
|
|
1
|
-
import { _ as $, s as k, u as V, g as d } from "./import-file-Bs86FUW3.js";
|
2
|
-
import { resolveComponent as j, openBlock as p, createElementBlock as g, createElementVNode as m, normalizeClass as b, createCommentVNode as x, normalizeStyle as y, createBlock as E } from "vue";
|
3
|
-
const O = {
|
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
|
-
computed: {
|
17
|
-
color() {
|
18
|
-
return k.value.buttonColor || "blue";
|
19
|
-
}
|
20
|
-
},
|
21
|
-
methods: {
|
22
|
-
flattenMenu(t) {
|
23
|
-
const e = [];
|
24
|
-
return t.forEach((n) => {
|
25
|
-
n.menu ? e.push(...this.flattenMenu(n.menu)) : e.push(n);
|
26
|
-
}), e;
|
27
|
-
},
|
28
|
-
async getFormScheme() {
|
29
|
-
var i, r;
|
30
|
-
const t = this.flattenMenu(V.value);
|
31
|
-
t != null && t.length || this.$router.replace("/404");
|
32
|
-
const e = t == null ? void 0 : t.find((s) => {
|
33
|
-
var a, o;
|
34
|
-
return (s == null ? void 0 : s.path) == ((o = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : o.table);
|
35
|
-
});
|
36
|
-
e || this.$router.replace("/404");
|
37
|
-
const n = e == null ? void 0 : e.table;
|
38
|
-
this.table = n;
|
39
|
-
try {
|
40
|
-
const {
|
41
|
-
data: { form: s }
|
42
|
-
} = await d.get(`/api/template/table/${n}`), { data: a } = await d.get(
|
43
|
-
`/api/table/${this.table}/${(r = (i = this.$route) == null ? void 0 : i.query) == null ? void 0 : r.id}`
|
44
|
-
);
|
45
|
-
this.token = (a == null ? void 0 : a.token) || "", this.formValues = a || {};
|
46
|
-
const { data: o } = await d.get(`/api/template/form/${s}`);
|
47
|
-
this.scheme = (o == null ? void 0 : o.schema) || o, this.style = (o == null ? void 0 : o.style) || null;
|
48
|
-
} catch {
|
49
|
-
}
|
50
|
-
},
|
51
|
-
async onlyEditObject() {
|
52
|
-
var e, n, i, r, s, a, o, u, l, c, f;
|
53
|
-
const t = (n = (e = this.$refs.form) == null ? void 0 : e.$refs) == null ? void 0 : n.form;
|
54
|
-
try {
|
55
|
-
await t.doValidation(), await d.put(`/api/table/${this.token}`, this.formValues), await this.$notify({
|
56
|
-
title: "Успішно!",
|
57
|
-
message: "Об'єкт успішно створено",
|
58
|
-
type: "success"
|
59
|
-
});
|
60
|
-
} catch (h) {
|
61
|
-
const w = ((i = h == null ? void 0 : h.response) == null ? void 0 : i.data) || "";
|
62
|
-
let v = ((o = (a = (s = (r = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : r[0]) == null ? void 0 : s[1]) == null ? void 0 : a[0]) == null ? void 0 : o.message) === "Це поле обов'язкове" ? "Заповніть обов'язкові поля" : (f = (c = (l = (u = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : u[0]) == null ? void 0 : l[1]) == null ? void 0 : c[0]) == null ? void 0 : f.message;
|
63
|
-
this.$notify({
|
64
|
-
title: "Помилка!",
|
65
|
-
message: w || v || "Сталася помилка валідаціі",
|
66
|
-
type: "error"
|
67
|
-
});
|
68
|
-
}
|
69
|
-
},
|
70
|
-
getGroupedErrorNotification(t, e) {
|
71
|
-
if (!t || !e) return "";
|
72
|
-
const n = {};
|
73
|
-
return Object.entries(t).forEach(([r, s]) => {
|
74
|
-
var o;
|
75
|
-
const a = ((o = e[r]) == null ? void 0 : o.ua) || r;
|
76
|
-
s.forEach((u) => {
|
77
|
-
const l = u.message;
|
78
|
-
n[l] || (n[l] = []), n[l].push(`"${a}"`);
|
79
|
-
});
|
80
|
-
}), Object.entries(n).map(([r, s]) => `<b>${r}:</b> ${s.join(", ")}`).join("<br>") || "Сталася помилка валідації";
|
81
|
-
},
|
82
|
-
async editObjectAndRedirect(t = !0) {
|
83
|
-
var n, i;
|
84
|
-
const e = (i = (n = this.$refs.form) == null ? void 0 : n.$refs) == null ? void 0 : i.form;
|
85
|
-
try {
|
86
|
-
t && await e.doValidation(), await d.put(
|
87
|
-
`/api/table/${this.token}${t ? "" : "?draft=1"}`,
|
88
|
-
this.formValues
|
89
|
-
), await this.$router.back(), await this.$notify({
|
90
|
-
title: "Успішно!",
|
91
|
-
message: "Об'єкт успішно створено",
|
92
|
-
type: "success"
|
93
|
-
});
|
94
|
-
} catch {
|
95
|
-
const s = this.getGroupedErrorNotification(
|
96
|
-
e == null ? void 0 : e.formErrors,
|
97
|
-
e == null ? void 0 : e.scheme
|
98
|
-
);
|
99
|
-
this.$notify({
|
100
|
-
title: "Помилка!",
|
101
|
-
message: s,
|
102
|
-
type: "error"
|
103
|
-
});
|
104
|
-
}
|
105
|
-
}
|
106
|
-
}
|
107
|
-
}, C = { class: "bg-gray-100 lg:w-[calc(100vw-260px)] w-[100vw]" }, M = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl" }, _ = { class: "flex items-center gap-[6px]" }, N = { class: "bg-white w-full rounded-xl" };
|
108
|
-
function A(t, e, n, i, r, s) {
|
109
|
-
var o, u, l;
|
110
|
-
const a = j("VsFormWithNavigation");
|
111
|
-
return p(), g("div", C, [
|
112
|
-
m("div", M, [
|
113
|
-
e[4] || (e[4] = m("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
|
114
|
-
m("div", _, [
|
115
|
-
m("button", {
|
116
|
-
onClick: e[0] || (e[0] = (c) => t.$router.back()),
|
117
|
-
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"
|
118
|
-
}, " Скасувати "),
|
119
|
-
(o = r.style) != null && o.draft ? (p(), g("button", {
|
120
|
-
key: 0,
|
121
|
-
onClick: e[1] || (e[1] = (c) => s.editObjectAndRedirect(!1)),
|
122
|
-
class: b(`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`)
|
123
|
-
}, " Зберегти DRAFT ", 2)) : x("", !0),
|
124
|
-
m("button", {
|
125
|
-
onClick: e[2] || (e[2] = (...c) => s.editObjectAndRedirect && s.editObjectAndRedirect(...c)),
|
126
|
-
class: b(`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`)
|
127
|
-
}, " Зберегти ", 2)
|
128
|
-
])
|
129
|
-
]),
|
130
|
-
m("div", {
|
131
|
-
style: y({
|
132
|
-
height: ((u = t.$adminSettings) == null ? void 0 : u.header) === !1 ? "calc(100vh - 91px)" : "calc(100vh - 150px)"
|
133
|
-
}),
|
134
|
-
class: "bg-gray-100 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw] overflow-hidden"
|
135
|
-
}, [
|
136
|
-
m("div", N, [
|
137
|
-
r.scheme ? (p(), E(a, {
|
138
|
-
key: 0,
|
139
|
-
ref: "form",
|
140
|
-
scheme: r.scheme,
|
141
|
-
columns: (l = r.style) == null ? void 0 : l.columns,
|
142
|
-
style: y(r.style),
|
143
|
-
modelValue: r.formValues,
|
144
|
-
"onUpdate:modelValue": e[3] || (e[3] = (c) => r.formValues = c),
|
145
|
-
class: "p-[20px] h-full"
|
146
|
-
}, null, 8, ["scheme", "columns", "style", "modelValue"])) : x("", !0)
|
147
|
-
])
|
148
|
-
], 4)
|
149
|
-
]);
|
150
|
-
}
|
151
|
-
const B = /* @__PURE__ */ $(O, [["render", A]]);
|
152
|
-
export {
|
153
|
-
B as default
|
154
|
-
};
|