@opengis/admin 0.1.57 → 0.1.58
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/dist/{add-page-ChIfqEIA.js → add-page-d6TCPawD.js} +1 -1
- package/dist/{admin-interface-DjKoGiLz.js → admin-interface-w6YuIWM3.js} +6 -6
- package/dist/{admin-view-CoSA8JYC.js → admin-view-3Sz3UF_y.js} +32 -44
- package/dist/admin.js +2 -2
- package/dist/admin.umd.cjs +47 -47
- package/dist/card-page-BsQts5XS.js +230 -0
- package/dist/{card-view-g2LiFVJC.js → card-view-UYkkl_Pu.js} +1 -1
- package/dist/{edit-page-CnDwsZCs.js → edit-page-CtKHElG1.js} +1 -1
- package/dist/{import-file-BRMqCIEX.js → import-file-CsCQ5xvs.js} +2420 -2412
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/server/routes/data/controllers/utils/getColumns.js +1 -1
- package/dist/card-page-mrDH9Sn9.js +0 -200
package/dist/style.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.vs-popover>div{text-align:start}.map-popup__vertical[data-v-14698eb6]{overflow:auto;max-height:300px}.map-popup__vertical[data-v-14698eb6]::-webkit-scrollbar{width:6px;height:6px;background-color:#f5f5f5}.map-popup__vertical[data-v-14698eb6]::-webkit-scrollbar-thumb{border-radius:5px;background-color:#dedede}.map-popup__vertical[data-v-14698eb6]::-webkit-scrollbar-track{background-color:#f5f5f5}.map__popup-body[data-v-14698eb6]{table-layout:fixed;width:100%}.map__popup-body-item[data-v-14698eb6]:not(:last-child){border-bottom:1px solid #eeeeee}.map__popup-body-item td[data-v-14698eb6]{width:50%;word-wrap:break-word;text-align:start}.map__popup-body-item td[data-v-14698eb6]:first-child{font-weight:600}.popup-image[data-v-180f4367]{max-width:100%;max-height:220px;margin-bottom:10px;-o-object-fit:contain;object-fit:contain}.maplibregl-ctrl-bottom-right,.maplibregl-popup-close-button{display:none}.widget-file .vs-button{background-color:#2563eb;color:#fff;font-size:.875rem;line-height:1.25rem;font-weight:600}.ui-dialog__modal div.flex.justify-between.items-center.py-3.px-4.border-b{border-bottom-width:0px;--tw-text-opacity: 1;color:#1f2937;font-weight:500;font-size:1.125rem;line-height:1.75rem;padding-bottom:0rem}.ui-dialog__modal .ui-dialog__content .p-4{padding-top:0rem}.widget-images__item-desc span:first-child:after{content:"";width:2px;height:2px;border-radius:50%;display:flex;align-items:center;background:#676a6c;margin:0 5px}.disabled{cursor:not-allowed!important}.item__text-content,.item{transition:all .5s cubic-bezier(.4,0,.2,1)}.item:hover .item__text-content{opacity:.8}.vs-widget-images .vs-button{background-color:#2563eb;color:#fff;font-size:.875rem;line-height:1.25rem;font-weight:600}.ProseMirror-focused{outline:none}.editor-toolbar{background-color:#f9fafb}.editor-content{min-height:160px}button{transition:background-color .2s ease;outline:none}button:focus{outline:none}.editor-content ul{margin-left:20px}.editor-content ul>li{list-style:disc}.editor-content ol{list-style-type:decimal;margin-left:20px}.editor-content pre{background-color:#e7e7e7;border-radius:4px;padding:0 2px}.mention-popup{background-color:#fafafa;padding:10px;border-radius:10px;box-shadow:0 4px 6px #0000001a;max-width:200px;overflow-y:auto;width:auto}.mention{padding:2px 4px;border-radius:8px;background-color:#e7e7e7}.mention-option{padding:5px 10px;cursor:pointer;transition:background-color .2s;border-radius:8px}.mention-option:hover{background-color:#f0f0f0}.border-top:not(:first-child){--tw-border-opacity: 1;border-color:#e5e7eb;border-top-width:1px}.widget-comment-form .vs-button{padding:.625rem 1rem;font-size:.75rem;line-height:1rem;font-weight:500}.widget-comment-form .vs-button:focus{border:transparent;--tw-ring-opacity: 1;--tw-ring-color: rgb(191 219 254);--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}li[data-v-293d7735]{cursor:move}.grid[data-v-
|
1
|
+
.vs-popover>div{text-align:start}.map-popup__vertical[data-v-14698eb6]{overflow:auto;max-height:300px}.map-popup__vertical[data-v-14698eb6]::-webkit-scrollbar{width:6px;height:6px;background-color:#f5f5f5}.map-popup__vertical[data-v-14698eb6]::-webkit-scrollbar-thumb{border-radius:5px;background-color:#dedede}.map-popup__vertical[data-v-14698eb6]::-webkit-scrollbar-track{background-color:#f5f5f5}.map__popup-body[data-v-14698eb6]{table-layout:fixed;width:100%}.map__popup-body-item[data-v-14698eb6]:not(:last-child){border-bottom:1px solid #eeeeee}.map__popup-body-item td[data-v-14698eb6]{width:50%;word-wrap:break-word;text-align:start}.map__popup-body-item td[data-v-14698eb6]:first-child{font-weight:600}.popup-image[data-v-180f4367]{max-width:100%;max-height:220px;margin-bottom:10px;-o-object-fit:contain;object-fit:contain}.maplibregl-ctrl-bottom-right,.maplibregl-popup-close-button{display:none}.widget-file .vs-button{background-color:#2563eb;color:#fff;font-size:.875rem;line-height:1.25rem;font-weight:600}.ui-dialog__modal div.flex.justify-between.items-center.py-3.px-4.border-b{border-bottom-width:0px;--tw-text-opacity: 1;color:#1f2937;font-weight:500;font-size:1.125rem;line-height:1.75rem;padding-bottom:0rem}.ui-dialog__modal .ui-dialog__content .p-4{padding-top:0rem}.widget-images__item-desc span:first-child:after{content:"";width:2px;height:2px;border-radius:50%;display:flex;align-items:center;background:#676a6c;margin:0 5px}.disabled{cursor:not-allowed!important}.item__text-content,.item{transition:all .5s cubic-bezier(.4,0,.2,1)}.item:hover .item__text-content{opacity:.8}.vs-widget-images .vs-button{background-color:#2563eb;color:#fff;font-size:.875rem;line-height:1.25rem;font-weight:600}.ProseMirror-focused{outline:none}.editor-toolbar{background-color:#f9fafb}.editor-content{min-height:160px}button{transition:background-color .2s ease;outline:none}button:focus{outline:none}.editor-content ul{margin-left:20px}.editor-content ul>li{list-style:disc}.editor-content ol{list-style-type:decimal;margin-left:20px}.editor-content pre{background-color:#e7e7e7;border-radius:4px;padding:0 2px}.mention-popup{background-color:#fafafa;padding:10px;border-radius:10px;box-shadow:0 4px 6px #0000001a;max-width:200px;overflow-y:auto;width:auto}.mention{padding:2px 4px;border-radius:8px;background-color:#e7e7e7}.mention-option{padding:5px 10px;cursor:pointer;transition:background-color .2s;border-radius:8px}.mention-option:hover{background-color:#f0f0f0}.border-top:not(:first-child){--tw-border-opacity: 1;border-color:#e5e7eb;border-top-width:1px}.widget-comment-form .vs-button{padding:.625rem 1rem;font-size:.75rem;line-height:1rem;font-weight:500}.widget-comment-form .vs-button:focus{border:transparent;--tw-ring-opacity: 1;--tw-ring-color: rgb(191 219 254);--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}li[data-v-293d7735]{cursor:move}.grid[data-v-7789cf37]{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:1rem}.admin-wrapper[data-v-59305fb1]{display:flex;height:100vh;align-items:start}.vs-popover__content>div{padding:.25rem}.hs-accordion-heading[data-v-f5ecdb9a]{display:flex;align-items:center}.hs-accordion-toggle[data-v-f5ecdb9a]{cursor:pointer}.hs-accordion-content[data-v-f5ecdb9a]{padding-left:1.5rem}.table-info-card .editor-container{width:330px}.slide-fade-enter-active[data-v-f40661d7],.slide-fade-leave-active[data-v-f40661d7]{transition:all .3s linear}.slide-fade-enter-from[data-v-f40661d7],.slide-fade-leave-to[data-v-f40661d7]{transform:translate(20px);opacity:0}
|
package/package.json
CHANGED
@@ -5,7 +5,7 @@ export default async function getColumns({
|
|
5
5
|
}) {
|
6
6
|
const columnList = dbColumns.map((el) => el.name || el).join(',');
|
7
7
|
if (mode === 'table') {
|
8
|
-
const cols = columns.filter((el) => el?.name !== 'geom').map((el) => el?.name || el).join(',');
|
8
|
+
const cols = columns.filter((el) => columnList.includes(el?.name) && el?.name !== 'geom').map((el) => el?.name || el).join(',');
|
9
9
|
return { cols, columnList };
|
10
10
|
}
|
11
11
|
// card / edit form
|
@@ -1,200 +0,0 @@
|
|
1
|
-
import { _ as V, u as $, a as z } from "./import-file-BRMqCIEX.js";
|
2
|
-
import { resolveComponent as N, openBlock as n, createElementBlock as c, createElementVNode as d, toDisplayString as C, createVNode as m, withCtx as q, createTextVNode as B, normalizeClass as T, Fragment as k, renderList as M, createBlock as L, resolveDynamicComponent as H, createCommentVNode as v } from "vue";
|
3
|
-
const E = {
|
4
|
-
data() {
|
5
|
-
return {
|
6
|
-
objectData: null,
|
7
|
-
component: ""
|
8
|
-
};
|
9
|
-
},
|
10
|
-
computed: {
|
11
|
-
getRoute() {
|
12
|
-
const t = this.flattenMenu($.value);
|
13
|
-
t != null && t.length || this.$router.replace("/404");
|
14
|
-
const r = t == null ? void 0 : t.find((a) => {
|
15
|
-
var l, s;
|
16
|
-
return (a == null ? void 0 : a.table) == ((s = (l = this.$route) == null ? void 0 : l.params) == null ? void 0 : s.table);
|
17
|
-
});
|
18
|
-
return r || this.$router.replace("/404"), r == null ? void 0 : r.path;
|
19
|
-
},
|
20
|
-
getTitle() {
|
21
|
-
var t, r, a, l, s, h, i, x, g, u, o, j, w, e, y;
|
22
|
-
if ((a = (r = (t = this.objectData) == null ? void 0 : t.rows) == null ? void 0 : r[0]) != null && a.name)
|
23
|
-
return ((i = (h = (s = (l = this.objectData) == null ? void 0 : l.rows) == null ? void 0 : s[0]) == null ? void 0 : h.name) == null ? void 0 : i.length) < 35 ? (u = (g = (x = this.objectData) == null ? void 0 : x.rows) == null ? void 0 : g[0]) == null ? void 0 : u.name : ((e = (w = (j = (o = this.objectData) == null ? void 0 : o.rows) == null ? void 0 : j[0]) == null ? void 0 : w.name) == null ? void 0 : e.slice(0, 35)) + " ...";
|
24
|
-
{
|
25
|
-
const b = (y = this.flattenMenu($.value)) == null ? void 0 : y.find(
|
26
|
-
(p) => {
|
27
|
-
var f, _;
|
28
|
-
return (p == null ? void 0 : p.table) === ((_ = (f = this.$route) == null ? void 0 : f.params) == null ? void 0 : _.table);
|
29
|
-
}
|
30
|
-
);
|
31
|
-
return b == null ? void 0 : b.ua;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
},
|
35
|
-
async mounted() {
|
36
|
-
await this.getObjectData(), await this.checkActiveComponent();
|
37
|
-
},
|
38
|
-
watch: {
|
39
|
-
component(t) {
|
40
|
-
this.$router.replace({ ...this.$route, query: { tab: t } });
|
41
|
-
}
|
42
|
-
},
|
43
|
-
methods: {
|
44
|
-
async getObjectData() {
|
45
|
-
var a;
|
46
|
-
const { table: t, id: r } = (a = this.$route) == null ? void 0 : a.params;
|
47
|
-
(!t || !r) && this.$router.replace("/404");
|
48
|
-
try {
|
49
|
-
const { data: l } = await z.get(`/api/table-data/${t}/${r}`);
|
50
|
-
this.objectData = l;
|
51
|
-
} catch (l) {
|
52
|
-
console.error(l);
|
53
|
-
}
|
54
|
-
},
|
55
|
-
getColClass(t) {
|
56
|
-
return `col-span-${t || 12}`;
|
57
|
-
},
|
58
|
-
getGridClass() {
|
59
|
-
return "grid-cols-12";
|
60
|
-
},
|
61
|
-
checkActiveComponent() {
|
62
|
-
var t, r, a, l, s, h, i, x, g;
|
63
|
-
if ((r = (t = this.$route) == null ? void 0 : t.query) != null && r.tab)
|
64
|
-
this.component = (l = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : l.tab;
|
65
|
-
else {
|
66
|
-
const u = (h = (s = this.objectData) == null ? void 0 : s.panels) == null ? void 0 : h.find((o) => (o == null ? void 0 : o.type) === "tabs");
|
67
|
-
(i = u == null ? void 0 : u.items) != null && i.length && (this.component = ((x = u.items[0]) == null ? void 0 : x.component) || ((g = u.items[0]) == null ? void 0 : g.name));
|
68
|
-
}
|
69
|
-
},
|
70
|
-
flattenMenu(t) {
|
71
|
-
const r = [];
|
72
|
-
return t.forEach((a) => {
|
73
|
-
a.menu ? r.push(...this.flattenMenu(a.menu)) : r.push(a);
|
74
|
-
}), r;
|
75
|
-
}
|
76
|
-
}
|
77
|
-
}, A = {
|
78
|
-
style: { width: "calc(100vw - 260px)", height: "calc(100vh - 60px)" },
|
79
|
-
class: "p-4 overflow-y-auto bg-gray-50"
|
80
|
-
}, G = { class: "h-[76px] bg-gray-50 flex items-center justify-between pl-[15px]" }, O = { class: "" }, R = { class: "text-lg font-semibold md:text-xl text-stone-800 dark:text-neutral-200" }, F = { class: "flex items-center gap-[6px]" }, I = {
|
81
|
-
key: 0,
|
82
|
-
class: "bg-white border rounded-xl"
|
83
|
-
}, P = { class: "p-[10px] pl-[20px] text-xl" }, S = ["innerHTML"], J = { key: 1 }, K = { class: "p-[10px] pl-[20px] text-xl" }, Q = {
|
84
|
-
key: 0,
|
85
|
-
class: "p-[20px] border-t"
|
86
|
-
}, U = {
|
87
|
-
key: 1,
|
88
|
-
class: "p-[20px] border-t"
|
89
|
-
}, W = ["innerHTML"], X = { 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]" }, Y = ["onClick"], Z = {
|
90
|
-
key: 0,
|
91
|
-
class: "bg-white border border-t-0 rounded-bl-xl rounded-br-xl"
|
92
|
-
}, ee = {
|
93
|
-
key: 0,
|
94
|
-
class: "p-[20px] border-t"
|
95
|
-
}, te = {
|
96
|
-
key: 1,
|
97
|
-
class: "p-[20px] border-t"
|
98
|
-
}, oe = ["innerHTML"];
|
99
|
-
function re(t, r, a, l, s, h) {
|
100
|
-
var x, g, u;
|
101
|
-
const i = N("router-link");
|
102
|
-
return n(), c("div", A, [
|
103
|
-
d("div", G, [
|
104
|
-
d("div", O, [
|
105
|
-
d("button", {
|
106
|
-
onClick: r[0] || (r[0] = (o) => t.$router.back()),
|
107
|
-
class: "text-sm h-[20px] text-blue-600 font-medium hover:border-b hover:border-b-2 hover:border-b-blue-500"
|
108
|
-
}, " До таблиці "),
|
109
|
-
d("h2", R, C(h.getTitle), 1)
|
110
|
-
]),
|
111
|
-
d("div", F, [
|
112
|
-
m(i, {
|
113
|
-
to: `/edit?table=${h.getRoute}&id=${(g = (x = t.$route) == null ? void 0 : x.params) == null ? void 0 : g.id}`,
|
114
|
-
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"
|
115
|
-
}, {
|
116
|
-
default: q(() => r[1] || (r[1] = [
|
117
|
-
B(" Редагувати ")
|
118
|
-
])),
|
119
|
-
_: 1
|
120
|
-
}, 8, ["to"])
|
121
|
-
])
|
122
|
-
]),
|
123
|
-
d("div", {
|
124
|
-
class: T(["grid gap-[20px]", h.getGridClass()])
|
125
|
-
}, [
|
126
|
-
(n(!0), c(k, null, M((u = s.objectData) == null ? void 0 : u.panels, (o, j) => {
|
127
|
-
var w;
|
128
|
-
return n(), c("div", {
|
129
|
-
key: j,
|
130
|
-
class: T(h.getColClass(o.col))
|
131
|
-
}, [
|
132
|
-
o != null && o.name ? (n(), c("div", I, [
|
133
|
-
d("h2", P, C((o == null ? void 0 : o.title) || "Панель"), 1),
|
134
|
-
d("div", {
|
135
|
-
class: "p-[20px] border-t",
|
136
|
-
innerHTML: (w = s.objectData) == null ? void 0 : w.data[o == null ? void 0 : o.name]
|
137
|
-
}, null, 8, S)
|
138
|
-
])) : o.type === "container" ? (n(), c("div", J, [
|
139
|
-
(n(!0), c(k, null, M(o.items, (e, y) => {
|
140
|
-
var b, p, f, _, D;
|
141
|
-
return n(), c("div", {
|
142
|
-
key: y,
|
143
|
-
class: "border rounded-xl bg-white mb-[20px]"
|
144
|
-
}, [
|
145
|
-
d("h2", K, C((e == null ? void 0 : e.title) || "Панель"), 1),
|
146
|
-
e != null && e.component ? (n(), c("div", Q, [
|
147
|
-
(n(), L(H(e.component), {
|
148
|
-
geometry: (p = (b = s.objectData) == null ? void 0 : b.rows[0]) == null ? void 0 : p.geom,
|
149
|
-
zoom: 16,
|
150
|
-
id: (_ = (f = t.$route) == null ? void 0 : f.params) == null ? void 0 : _.id
|
151
|
-
}, null, 8, ["geometry", "id"]))
|
152
|
-
])) : v("", !0),
|
153
|
-
e != null && e.name ? (n(), c("div", U, [
|
154
|
-
d("div", {
|
155
|
-
innerHTML: (D = s.objectData) == null ? void 0 : D.data[e == null ? void 0 : e.name]
|
156
|
-
}, null, 8, W)
|
157
|
-
])) : v("", !0)
|
158
|
-
]);
|
159
|
-
}), 128))
|
160
|
-
])) : v("", !0),
|
161
|
-
(o == null ? void 0 : o.type) === "tabs" ? (n(), c(k, { key: 2 }, [
|
162
|
-
d("nav", X, [
|
163
|
-
(n(!0), c(k, null, M(o == null ? void 0 : o.items, (e) => (n(), c("button", {
|
164
|
-
key: (e == null ? void 0 : e.name) || (e == null ? void 0 : e.component),
|
165
|
-
onClick: (y) => s.component = (e == null ? void 0 : e.component) || (e == null ? void 0 : e.name),
|
166
|
-
class: T(["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", {
|
167
|
-
" 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": s.component === (e == null ? void 0 : e.component) || s.component === (e == null ? void 0 : e.name),
|
168
|
-
"": s.component !== (e == null ? void 0 : e.component) && s.component !== (e == null ? void 0 : e.name)
|
169
|
-
}])
|
170
|
-
}, C(e == null ? void 0 : e.title), 11, Y))), 128))
|
171
|
-
]),
|
172
|
-
(n(!0), c(k, null, M(o.items, (e, y) => {
|
173
|
-
var b, p, f, _, D;
|
174
|
-
return n(), c(k, { key: y }, [
|
175
|
-
s.component === (e == null ? void 0 : e.component) || s.component === (e == null ? void 0 : e.name) ? (n(), c("div", Z, [
|
176
|
-
e != null && e.component ? (n(), c("div", ee, [
|
177
|
-
(n(), L(H(e.component), {
|
178
|
-
geometry: (p = (b = s.objectData) == null ? void 0 : b.rows[0]) == null ? void 0 : p.geom,
|
179
|
-
zoom: 16,
|
180
|
-
id: (_ = (f = t.$route) == null ? void 0 : f.params) == null ? void 0 : _.id
|
181
|
-
}, null, 8, ["geometry", "id"]))
|
182
|
-
])) : v("", !0),
|
183
|
-
e != null && e.name ? (n(), c("div", te, [
|
184
|
-
d("div", {
|
185
|
-
innerHTML: (D = s.objectData) == null ? void 0 : D.data[e == null ? void 0 : e.name]
|
186
|
-
}, null, 8, oe)
|
187
|
-
])) : v("", !0)
|
188
|
-
])) : v("", !0)
|
189
|
-
], 64);
|
190
|
-
}), 128))
|
191
|
-
], 64)) : v("", !0)
|
192
|
-
], 2);
|
193
|
-
}), 128))
|
194
|
-
], 2)
|
195
|
-
]);
|
196
|
-
}
|
197
|
-
const ae = /* @__PURE__ */ V(E, [["render", re], ["__scopeId", "data-v-e9d5b2dd"]]);
|
198
|
-
export {
|
199
|
-
ae as default
|
200
|
-
};
|