@opengis/admin 0.1.55 → 0.1.57
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{add-page-CWG_sjY-.js → add-page-ChIfqEIA.js} +1 -1
- package/dist/{admin-interface-AsFloazv.js → admin-interface-DjKoGiLz.js} +227 -230
- package/dist/{admin-view-QbbIb27N.js → admin-view-CoSA8JYC.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +2 -2
- package/dist/{card-page-DCoKtnma.js → card-page-mrDH9Sn9.js} +1 -1
- package/dist/{card-view-B-tInKRH.js → card-view-g2LiFVJC.js} +1 -1
- package/dist/{edit-page-BBYenvB9.js → edit-page-CnDwsZCs.js} +1 -1
- package/dist/{import-file-YqGiZOb_.js → import-file-BRMqCIEX.js} +14 -14
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/plugin.js +2 -2
- package/server/plugins/hook.js +3 -4
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as V, u as $, a as z } from "./import-file-
|
1
|
+
import { _ as V, u as $, a as z } from "./import-file-BRMqCIEX.js";
|
2
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
3
|
const E = {
|
4
4
|
data() {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as m, u as b, a as i } from "./import-file-
|
1
|
+
import { _ as m, u as b, a as i } from "./import-file-BRMqCIEX.js";
|
2
2
|
import { resolveComponent as d, openBlock as u, createElementBlock as h, createElementVNode as n, createBlock as p, createCommentVNode as f } from "vue";
|
3
3
|
const g = {
|
4
4
|
data() {
|
@@ -3577,17 +3577,17 @@ function LI(t, e) {
|
|
3577
3577
|
return [i, n, r];
|
3578
3578
|
}
|
3579
3579
|
const FI = [
|
3580
|
-
{ name: "edit", path: "/edit", component: () => import("./edit-page-
|
3581
|
-
{ name: "add", path: "/add", component: () => import("./add-page-
|
3580
|
+
{ name: "edit", path: "/edit", component: () => import("./edit-page-CnDwsZCs.js") },
|
3581
|
+
{ name: "add", path: "/add", component: () => import("./add-page-ChIfqEIA.js") },
|
3582
3582
|
{
|
3583
3583
|
name: "card-view",
|
3584
3584
|
path: "/card",
|
3585
|
-
component: () => import("./card-view-
|
3585
|
+
component: () => import("./card-view-g2LiFVJC.js"),
|
3586
3586
|
children: [{
|
3587
3587
|
name: "table",
|
3588
3588
|
path: ":table",
|
3589
|
-
component: () => import("./card-view-
|
3590
|
-
children: [{ name: "card", path: ":id", component: () => import("./card-page-
|
3589
|
+
component: () => import("./card-view-g2LiFVJC.js"),
|
3590
|
+
children: [{ name: "card", path: ":id", component: () => import("./card-page-mrDH9Sn9.js") }]
|
3591
3591
|
}]
|
3592
3592
|
}
|
3593
3593
|
], BI = {}, NI = { class: "bg-gray-200 w-full px-16 md:px-0 h-screen flex items-center justify-center" }, $I = { class: "bg-white border border-gray-200 flex flex-col items-center justify-center px-4 md:px-8 lg:px-24 py-8 rounded-lg shadow-2xl" };
|
@@ -3635,14 +3635,14 @@ const jI = /* @__PURE__ */ Rt(BI, [["render", VI]]), UI = (t) => {
|
|
3635
3635
|
{
|
3636
3636
|
path: "/",
|
3637
3637
|
name: "home",
|
3638
|
-
component: () => import("./admin-view-
|
3638
|
+
component: () => import("./admin-view-CoSA8JYC.js"),
|
3639
3639
|
children: [
|
3640
3640
|
...e,
|
3641
3641
|
...t,
|
3642
3642
|
// { path: '/', redirect: '/home' },
|
3643
3643
|
{
|
3644
3644
|
path: "/:catchAll(.*)",
|
3645
|
-
component: () => import("./admin-interface-
|
3645
|
+
component: () => import("./admin-interface-DjKoGiLz.js")
|
3646
3646
|
}
|
3647
3647
|
]
|
3648
3648
|
}
|
@@ -3728,7 +3728,7 @@ function KI(t, e, i, n, r, l) {
|
|
3728
3728
|
return Ie(), Fe("div", YI, [
|
3729
3729
|
l.getData ? (Ie(), Fe("div", {
|
3730
3730
|
key: 0,
|
3731
|
-
class: "
|
3731
|
+
class: "py-1 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium bg-green-100 text-green-800 rounded-full",
|
3732
3732
|
style: gc({
|
3733
3733
|
backgroundColor: l.getBGColor((u = l.getData) == null ? void 0 : u.color),
|
3734
3734
|
color: (a = l.getData) == null ? void 0 : a.color
|
@@ -46969,7 +46969,7 @@ const EM = /* @__PURE__ */ Rt(nH, [["render", oH]]), aH = {
|
|
46969
46969
|
this.$emit("update-item", { ...this.item, text: t });
|
46970
46970
|
},
|
46971
46971
|
id(t) {
|
46972
|
-
this.$emit("update-item", { ...this.item,
|
46972
|
+
this.$emit("update-item", { ...this.item }, t);
|
46973
46973
|
}
|
46974
46974
|
}
|
46975
46975
|
}, lH = { class: "relative flex items-center p-3 bg-white border border-gray-200 group gap-x-3 rounded-xl" }, cH = { class: "flex flex-col" }, uH = { class: "flex gap-[30px]" }, hH = { class: "block text-sm font-semibold text-gray-800 text-start z-[10] cursor-pointer" }, dH = { class: "block text-sm font-semibold text-gray-400 text-start z-[10] cursor-pointer" }, pH = { class: "block text-xs text-gray-500 truncate dark:text-neutral-500" };
|
@@ -47035,10 +47035,10 @@ const mH = /* @__PURE__ */ Rt(aH, [["render", fH]]), gH = {
|
|
47035
47035
|
dragEnd() {
|
47036
47036
|
this.draggedItemIndex = null;
|
47037
47037
|
},
|
47038
|
-
updateItem(t) {
|
47039
|
-
var
|
47040
|
-
const
|
47041
|
-
this.list[
|
47038
|
+
updateItem(t, e) {
|
47039
|
+
var n;
|
47040
|
+
const i = (n = this.list) == null ? void 0 : n.findIndex((r) => (r == null ? void 0 : r.id) === (t == null ? void 0 : t.id));
|
47041
|
+
this.list[i] = t, e && (this.list[i].id = e), this.$emit("update-list", this.list);
|
47042
47042
|
}
|
47043
47043
|
}
|
47044
47044
|
}, yH = {
|
@@ -47063,7 +47063,7 @@ function vH(t, e, i, n, r, l) {
|
|
47063
47063
|
], 40, _H))), 128))
|
47064
47064
|
]);
|
47065
47065
|
}
|
47066
|
-
const xH = /* @__PURE__ */ Rt(gH, [["render", vH], ["__scopeId", "data-v-
|
47066
|
+
const xH = /* @__PURE__ */ Rt(gH, [["render", vH], ["__scopeId", "data-v-293d7735"]]), bH = {
|
47067
47067
|
components: {
|
47068
47068
|
VsNoData: iH,
|
47069
47069
|
VsChoceColor: EM,
|
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-
|
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-e9d5b2dd]{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:1rem}.admin-wrapper[data-v-776e8b33]{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{min-width:200px;width:270px}.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
package/plugin.js
CHANGED
@@ -16,14 +16,14 @@ async function plugin(fastify, opts = config) {
|
|
16
16
|
|
17
17
|
addHook('afterTemplate', async ({ req, data = {} }) => {
|
18
18
|
const { uid } = req.session.passport?.user || {};
|
19
|
-
if (!uid || !data
|
19
|
+
if (!uid || !data || req.params?.type !== 'form' || !req.params?.name) return null;
|
20
20
|
const { pg, params = {} } = req;
|
21
21
|
const { rows: properties = [] } = await pg.query(`select name, title, format, data from admin.custom_column
|
22
22
|
where entity=$1 and uid=$2`, [params.name?.replace('.form', '.table'), uid]);
|
23
23
|
await Promise.all(properties.map(async (el) => {
|
24
24
|
const clsData = el.data ? await getTemplate(['cls', 'select'], el.data) : undefined;
|
25
25
|
const type = clsData ? 'Select' : ({ date: 'DatePicker' }[el.format] || 'Text');
|
26
|
-
Object.assign(data
|
26
|
+
Object.assign(data?.schema || data || {}, { [el.name]: { type, ua: el.title, data: el.data, options: type === 'Select' && Array.isArray(clsData) && clsData?.length ? clsData : undefined, extra: 1 } });
|
27
27
|
}));
|
28
28
|
});
|
29
29
|
|
package/server/plugins/hook.js
CHANGED
@@ -15,15 +15,14 @@ async function plugin(fastify) {
|
|
15
15
|
|
16
16
|
addHook('afterTemplate', async ({ req, data = {} }) => {
|
17
17
|
const { uid } = req.session.passport?.user || {};
|
18
|
-
if (!uid || !data
|
18
|
+
if (!uid || !data || req.params?.type !== 'form' || !req.params?.name) return null;
|
19
19
|
const { pg, params = {} } = req;
|
20
20
|
const { rows: properties = [] } = await pg.query(`select name, title, format, data from admin.custom_column
|
21
|
-
|
21
|
+
where entity=$1 and uid=$2`, [params.name?.replace('.form', '.table'), uid]);
|
22
22
|
await Promise.all(properties.map(async (el) => {
|
23
23
|
const clsData = el.data ? await getTemplate(['cls', 'select'], el.data) : undefined;
|
24
24
|
const type = clsData ? 'Select' : ({ date: 'DatePicker' }[el.format] || 'Text');
|
25
|
-
|
26
|
-
Object.assign(data.schema || {}, { [el.name]: { type, ua: el.title, data: el.data, options: type === 'Check' ? clsData : undefined, extra: 1 } });
|
25
|
+
Object.assign(data?.schema || data || {}, { [el.name]: { type, ua: el.title, data: el.data, options: type === 'Select' && Array.isArray(clsData) && clsData?.length ? clsData : undefined, extra: 1 } });
|
27
26
|
}));
|
28
27
|
});
|
29
28
|
|