@opengis/admin 0.3.70 → 0.3.72
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/dist/{add-page-DrW4HvNl.js → add-page-CgSm4w7s.js} +4 -4
- package/dist/{admin-interface-IFxDrzbG.js → admin-interface-CFnOwJzN.js} +12 -12
- package/dist/{admin-view-Biw3y3VC.js → admin-view-B3l6SNPa.js} +6 -6
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +101 -101
- package/dist/{card-view-DhbJ0PJ0.js → card-view-Ck7mTbgr.js} +3 -3
- package/dist/{edit-page-B3y18L5i.js → edit-page-W1bZ0BnP.js} +8 -8
- package/dist/{import-file-C9RmOGhX.js → import-file-BxGL9AWZ.js} +18010 -18085
- package/dist/{profile-page-Bn9naG_j.js → profile-page-C6ZqfM0p.js} +4 -4
- package/package.json +2 -2
- package/server/helpers/core/badge.js +2 -2
- package/server/helpers/list/descriptionList.js +7 -23
@@ -1,6 +1,6 @@
|
|
1
|
-
import { _ as n,
|
1
|
+
import { _ as n, f as m } from "./import-file-BxGL9AWZ.js";
|
2
2
|
import { u as p } from "./user-B_2kh6ic.js";
|
3
|
-
import { resolveComponent as
|
3
|
+
import { resolveComponent as f, openBlock as u, createElementBlock as d, createElementVNode as o, createBlock as h, createCommentVNode as b } from "vue";
|
4
4
|
const x = {
|
5
5
|
data() {
|
6
6
|
return {
|
@@ -50,8 +50,8 @@ const x = {
|
|
50
50
|
}
|
51
51
|
}, g = { class: "flex justify-center pt-[20px] pb-[20px] pl-[20px] h-[calc(100vh-58px)]" }, k = { class: "bg-white rounded-xl 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
52
|
function _(r, t, a, l, e, s) {
|
53
|
-
const i =
|
54
|
-
return u(),
|
53
|
+
const i = f("VsForm");
|
54
|
+
return u(), d("div", g, [
|
55
55
|
o("div", k, [
|
56
56
|
t[2] || (t[2] = o("h2", { class: "mb-[20px] text-center" }, "Профіль", -1)),
|
57
57
|
o("div", y, [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@opengis/admin",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.72",
|
4
4
|
"description": "This project Softpro Admin",
|
5
5
|
"main": "dist/admin.js",
|
6
6
|
"type": "module",
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"@opengis/fastify-auth": "1.0.80",
|
50
50
|
"@opengis/fastify-file": "1.0.66",
|
51
51
|
"@opengis/fastify-table": "^1.3.28",
|
52
|
-
"@opengis/v3-core": "^0.3.
|
52
|
+
"@opengis/v3-core": "^0.3.145",
|
53
53
|
"@opengis/v3-filter": "^0.1.3",
|
54
54
|
"@tiptap/core": "^2.8.0",
|
55
55
|
"@tiptap/extension-color": "^2.8.0",
|
@@ -3,13 +3,13 @@ import { getSelect } from "@opengis/fastify-table/utils.js";
|
|
3
3
|
|
4
4
|
|
5
5
|
export default async function badge(id, options) {
|
6
|
-
if (!id) return '-';
|
6
|
+
if (!id?.toString) return '-';
|
7
7
|
const data = options.hash?.data;
|
8
8
|
if (!data) return id;
|
9
9
|
const classifier = await getSelect(data);
|
10
10
|
if (!classifier?.arr) return id;
|
11
11
|
|
12
|
-
const item = classifier?.arr.find(el => el.id
|
12
|
+
const item = classifier?.arr.find(el => el.id?.toString?.() === id.toString());
|
13
13
|
if (!item) return id;
|
14
14
|
return `<span style='color:${item.color || '#14b8a6'};border-color:${item.color || '#14b8a6'};' class="inline-flex items-center gap-x-1.5 py-1.5 px-3 rounded-full text-xs font-medium border border-teal-500 text-teal-500">${item.text}</span>`
|
15
15
|
|
@@ -15,7 +15,7 @@ async function format(d, key, data) {
|
|
15
15
|
export default async function descriptionList(data, opt) {
|
16
16
|
const { hash } = opt;
|
17
17
|
|
18
|
-
|
18
|
+
// no data
|
19
19
|
if (hash.nodata && !data) {
|
20
20
|
const noDataText = typeof hash.nodata == 'string' ? hash.nodata : '<div class="bg-gray-200 text-center p-6 rounded-xl"><h3 class="text-lg font-semibold">Інформація відсутня</h3></div>';
|
21
21
|
return noDataText
|
@@ -23,10 +23,7 @@ export default async function descriptionList(data, opt) {
|
|
23
23
|
if (!hash.columns) return 'columns empty'
|
24
24
|
const keys = hash.columns.split(hash.divider || ',').map(el => hash.comma ? el.trim().replace(new RegExp(hash.comma || '#', 'g'), ',') : el.trim());
|
25
25
|
|
26
|
-
const
|
27
|
-
const itemsPerCol = Math.ceil(keys.length / (2 * colCount));
|
28
|
-
|
29
|
-
const columns = Array(colCount).fill().map(() => []);
|
26
|
+
const result = [];
|
30
27
|
|
31
28
|
for (let i = 0; i < keys.length; i += 2) {
|
32
29
|
const name = keys[i];
|
@@ -35,28 +32,15 @@ export default async function descriptionList(data, opt) {
|
|
35
32
|
if (!nameHBS && name.includes('{{')) continue;
|
36
33
|
|
37
34
|
const key = keys[i + 1];
|
35
|
+
|
38
36
|
const d1 = await format(data[key], key, data) || '-';
|
39
37
|
|
40
|
-
|
38
|
+
result.push(`<div class="grid grid-cols-1 gap-1 py-3 sm:grid-cols-3 sm:gap-4 even:bg-gray-50 text-[12px]">
|
41
39
|
<dt class="text-gray-900">${nameHBS || name}</dt>
|
42
40
|
<dd class="text-gray-700 sm:col-span-2">${d1}</dd>
|
43
|
-
|
44
|
-
|
45
|
-
const colIndex = Math.floor((i / 2) / itemsPerCol);
|
46
|
-
if (colIndex < colCount) {
|
47
|
-
columns[colIndex].push(itemHtml);
|
48
|
-
}
|
49
|
-
}
|
41
|
+
</div>
|
42
|
+
`);
|
50
43
|
|
51
|
-
let finalHtml = '<div class="grid grid-cols-1 gap-4 sm:grid-cols-' + colCount + '">';
|
52
|
-
|
53
|
-
for (let i = 0; i < colCount; i++) {
|
54
|
-
if (columns[i].length > 0) {
|
55
|
-
finalHtml += '<dl class="divide-y divide-gray-100 py-[5px]">' + columns[i].join('') + '</dl>';
|
56
|
-
}
|
57
44
|
}
|
58
|
-
|
59
|
-
finalHtml += '</div>';
|
60
|
-
|
61
|
-
return finalHtml;
|
45
|
+
return '<dl class=" divide-y divide-gray-100 py-[5px]">' + result.join('') + '</dl>';
|
62
46
|
}
|