@opengis/gis 0.2.128 → 0.2.130
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/{CardIcon-DgpYeKbG.js → CardIcon-BeZkp0PF.js} +1 -1
- package/dist/{EntityTablePage-DNdVavT4.js → EntityTablePage-A1oEJgB4.js} +1 -1
- package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-DQnIBCpE.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-Wr8oJ-ni.js} +24 -22
- package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-Cg2y4sIa.js → HeaderActions.vue_vue_type_script_setup_true_lang-6BnXldBs.js} +345 -321
- package/dist/{MapSettings-CHF3VpUu.js → MapSettings-EmXkXJ90.js} +12 -12
- package/dist/{RastersTablePage-Ci3P3r4c.js → RastersTablePage-Cgecxbky.js} +1 -1
- package/dist/cartocss-C29B9mz3.js +1024 -0
- package/dist/{import-utils-ElncWVJV.js → import-utils-CFjQD50e.js} +1 -1
- package/dist/{index-UGx54M0Q.js → index-1vaLWtnh.js} +377 -386
- package/dist/index.css +1 -1
- package/dist/index.js +4 -4
- package/dist/index.umd.cjs +41 -41
- package/dist/raster-DFuH49fc.js +792 -0
- package/dist/{register-BfNUPbey.js → register-COO0Y_MS.js} +3 -3
- package/dist/{service-DsykdHry.js → service-DagZaIev.js} +911 -879
- package/dist/{vs-datatable-D6g7tjZo.js → vs-datatable-BaMRTZVi.js} +1 -1
- package/package.json +2 -2
- package/server/routes/gis/cartocss/get.cartocss.js +11 -2
- package/server/routes/gis/registers/add.registry.js +3 -4
- package/server/routes/gis/registers/funcs/columns.js +2 -4
- package/server/routes/mapnik/controllers/pretile.js +6 -7
- package/server/routes/mapnik/controllers/rasterInfo.js +5 -1
- package/server/routes/mapnik/functions/cartoBounds.js +6 -2
- package/dist/cartocss-BsaIlSRb.js +0 -894
- package/dist/raster-BDWEafwx.js +0 -663
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
import { _ as Le } from "./index-
|
|
3
|
-
import { Settings as
|
|
4
|
-
import { notify as
|
|
5
|
-
const $e = {},
|
|
1
|
+
import { openBlock as c, createElementBlock as v, createElementVNode as n, defineComponent as ee, normalizeClass as oe, createVNode as U, createBlock as re, unref as M, defineAsyncComponent as K, ref as y, watch as de, computed as b, createTextVNode as pe, Fragment as se, renderList as be, toDisplayString as V, createCommentVNode as q, withCtx as Z, nextTick as ke, onMounted as Ve, onUnmounted as ze, withModifiers as Ce, Teleport as Ee, normalizeStyle as Me } from "vue";
|
|
2
|
+
import { _ as Le } from "./index-1vaLWtnh.js";
|
|
3
|
+
import { Settings as Se, BrushCleaning as ye, SquareCode as fe, Pencil as Te } from "lucide-vue-next";
|
|
4
|
+
import { notify as H } from "@opengis/core";
|
|
5
|
+
const $e = {}, Ie = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: "24",
|
|
8
8
|
height: "24",
|
|
@@ -14,15 +14,15 @@ const $e = {}, Ue = {
|
|
|
14
14
|
"stroke-linejoin": "round",
|
|
15
15
|
class: "inline-block shrink-0"
|
|
16
16
|
};
|
|
17
|
-
function
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
function Ue(l, z) {
|
|
18
|
+
return c(), v("svg", Ie, [...z[0] || (z[0] = [
|
|
19
|
+
n("path", { d: "M8 3 4 7l4 4" }, null, -1),
|
|
20
|
+
n("path", { d: "M4 7h16" }, null, -1),
|
|
21
|
+
n("path", { d: "m16 21 4-4-4-4" }, null, -1),
|
|
22
|
+
n("path", { d: "M20 17H4" }, null, -1)
|
|
23
23
|
])]);
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const Be = /* @__PURE__ */ Le($e, [["render", Ue]]), Ne = ["aria-label"], bt = /* @__PURE__ */ ee({
|
|
26
26
|
__name: "PanelToggleButton",
|
|
27
27
|
props: {
|
|
28
28
|
open: { type: Boolean },
|
|
@@ -30,30 +30,30 @@ const je = /* @__PURE__ */ Le($e, [["render", Ie]]), Ae = ["aria-label"], bt = /
|
|
|
30
30
|
},
|
|
31
31
|
emits: ["toggle"],
|
|
32
32
|
setup(l) {
|
|
33
|
-
return (
|
|
33
|
+
return (z, m) => (c(), v("button", {
|
|
34
34
|
type: "button",
|
|
35
|
-
onClick:
|
|
36
|
-
class:
|
|
35
|
+
onClick: m[0] || (m[0] = (j) => z.$emit("toggle")),
|
|
36
|
+
class: oe([
|
|
37
37
|
"absolute right-0 w-5 h-9 shrink-0 rounded-l-lg inline-flex items-center justify-center",
|
|
38
38
|
"text-gray-600 hover:bg-gray-100 hover:text-gray-800 transition border border-gray-100 shadow-md bg-white z-[21]",
|
|
39
39
|
l.topClass
|
|
40
40
|
]),
|
|
41
41
|
"aria-label": l.open ? "Закрити панель" : "Відкрити панель"
|
|
42
42
|
}, [
|
|
43
|
-
|
|
44
|
-
], 10,
|
|
43
|
+
U(Be, { class: "h-3 w-3" })
|
|
44
|
+
], 10, Ne));
|
|
45
45
|
}
|
|
46
|
-
}),
|
|
46
|
+
}), yt = /* @__PURE__ */ ee({
|
|
47
47
|
__name: "SettingsIcon",
|
|
48
48
|
setup(l) {
|
|
49
|
-
return (
|
|
49
|
+
return (z, m) => (c(), re(M(Se), {
|
|
50
50
|
size: 16,
|
|
51
51
|
class: "lucide lucide-settings"
|
|
52
52
|
}));
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
|
-
function
|
|
56
|
-
const
|
|
55
|
+
function je(l) {
|
|
56
|
+
const m = (e) => typeof e != "number" || Number.isNaN(e) ? "" : Number(e.toFixed(5)).toFixed(5), j = [
|
|
57
57
|
{
|
|
58
58
|
name: "description",
|
|
59
59
|
type: "textarea",
|
|
@@ -88,10 +88,10 @@ function Fe(l) {
|
|
|
88
88
|
col: 6,
|
|
89
89
|
data: "yes_no"
|
|
90
90
|
}
|
|
91
|
-
],
|
|
92
|
-
const
|
|
93
|
-
return l.normalizeValue(
|
|
94
|
-
},
|
|
91
|
+
], p = (e, h) => {
|
|
92
|
+
const x = Array.isArray(e == null ? void 0 : e.config) ? e.config[0] : null;
|
|
93
|
+
return l.normalizeValue(x == null ? void 0 : x[h]);
|
|
94
|
+
}, R = (e) => !Array.isArray(e == null ? void 0 : e.bounds) || e.bounds.length < 4 ? "" : e.bounds.map((h) => m(h)).filter(Boolean).join(", "), d = (e) => !Array.isArray(e == null ? void 0 : e.extent) || e.extent.length < 4 ? "" : e.extent.map((h) => m(h)).filter(Boolean).join(", "), F = (e) => !Array.isArray(e == null ? void 0 : e.bands) || !e.bands.length ? "" : e.bands.join(", "), w = (e) => typeof e != "boolean" ? "" : e ? "Так" : "Ні", L = [
|
|
95
95
|
{ label: "Група", value: (e) => l.normalizeValue((e == null ? void 0 : e.group_name) ?? l.resolvedGroupName ?? (e == null ? void 0 : e.group_id)) },
|
|
96
96
|
{ label: "Статус", value: (e) => l.normalizeValue(l.statusLabel(e)) },
|
|
97
97
|
{ label: "Видимість", value: (e) => l.normalizeValue(l.visibilityLabel(e)) },
|
|
@@ -118,10 +118,10 @@ function Fe(l) {
|
|
|
118
118
|
];
|
|
119
119
|
return {
|
|
120
120
|
service: {
|
|
121
|
-
general:
|
|
121
|
+
general: L,
|
|
122
122
|
meta: S,
|
|
123
123
|
edit: [
|
|
124
|
-
...
|
|
124
|
+
...j,
|
|
125
125
|
{ name: "service_key", type: "text", label: "Ключ сервісу", col: 6 },
|
|
126
126
|
{ name: "producer", type: "text", label: "Виробник", col: 6 },
|
|
127
127
|
{ name: "category", type: "text", label: "Категорія", col: 6 },
|
|
@@ -134,10 +134,10 @@ function Fe(l) {
|
|
|
134
134
|
]
|
|
135
135
|
},
|
|
136
136
|
dataset: {
|
|
137
|
-
general:
|
|
137
|
+
general: L,
|
|
138
138
|
meta: S,
|
|
139
139
|
edit: [
|
|
140
|
-
...
|
|
140
|
+
...j,
|
|
141
141
|
{ name: "service_key", type: "text", label: "Ключ сервісу", col: 6 },
|
|
142
142
|
{ name: "producer", type: "text", label: "Виробник", col: 6 },
|
|
143
143
|
{ name: "category", type: "text", label: "Категорія", col: 6 },
|
|
@@ -156,17 +156,16 @@ function Fe(l) {
|
|
|
156
156
|
{ label: "Формат", value: (e) => l.normalizeValue(e == null ? void 0 : e.extension) },
|
|
157
157
|
{ label: "SRID", value: (e) => l.normalizeValue(e == null ? void 0 : e.srid) },
|
|
158
158
|
{ label: "Файл джерела", value: (e) => l.normalizeValue(e == null ? void 0 : e.source_path) },
|
|
159
|
-
{ label: "Кеш", value: (e) =>
|
|
160
|
-
{ label: "XML", value: (e) =>
|
|
159
|
+
{ label: "Кеш", value: (e) => w(e == null ? void 0 : e.cache) },
|
|
160
|
+
{ label: "XML", value: (e) => w(e == null ? void 0 : e.xml) }
|
|
161
161
|
],
|
|
162
162
|
meta: [
|
|
163
|
-
{ label: "
|
|
164
|
-
{ label: "Extent", value: (e) => y(e) },
|
|
163
|
+
{ label: "Bounds", value: (e) => d(e) },
|
|
165
164
|
{ label: "Розмір", value: (e) => l.normalizeValue(e == null ? void 0 : e.total_size) },
|
|
166
165
|
{ label: "Ширина", value: (e) => l.normalizeValue(e == null ? void 0 : e.width) },
|
|
167
166
|
{ label: "Висота", value: (e) => l.normalizeValue(e == null ? void 0 : e.height) },
|
|
168
167
|
{ label: "Кількість каналів", value: (e) => l.normalizeValue(e == null ? void 0 : e.bands_count) },
|
|
169
|
-
{ label: "Канали", value: (e) =>
|
|
168
|
+
{ label: "Канали", value: (e) => F(e) },
|
|
170
169
|
{ label: "Роздільна здатність", value: (e) => l.normalizeValue(e == null ? void 0 : e.resolution) },
|
|
171
170
|
{ label: "Глибина кольору", value: (e) => l.normalizeValue(e == null ? void 0 : e.color_depth) },
|
|
172
171
|
{ label: "Стиснення", value: (e) => l.normalizeValue(e == null ? void 0 : e.compression) },
|
|
@@ -208,19 +207,14 @@ function Fe(l) {
|
|
|
208
207
|
{ label: "Статус", value: (e) => l.normalizeValue(l.statusLabel(e)) },
|
|
209
208
|
{ label: "Видимість", value: (e) => l.normalizeValue(l.visibilityLabel(e)) },
|
|
210
209
|
{ label: "Ключ CartoCSS", value: (e) => l.normalizeValue(e == null ? void 0 : e.cartocss_key) },
|
|
211
|
-
{ label: "Таблиця джерела", value: (e) =>
|
|
212
|
-
{ label: "Ключ набору", value: (e) =>
|
|
213
|
-
{ label: "Авто-картка", value: (e) =>
|
|
214
|
-
{ label: "Інфо по кліку", value: (e) =>
|
|
215
|
-
{ label: "Статичний", value: (e) =>
|
|
210
|
+
{ label: "Таблиця джерела", value: (e) => p(e, "table") || l.normalizeValue(e == null ? void 0 : e.source_path) },
|
|
211
|
+
{ label: "Ключ набору", value: (e) => p(e, "key") },
|
|
212
|
+
{ label: "Авто-картка", value: (e) => w(e == null ? void 0 : e.card_auto) },
|
|
213
|
+
{ label: "Інфо по кліку", value: (e) => w(e == null ? void 0 : e.info) },
|
|
214
|
+
{ label: "Статичний", value: (e) => w(e == null ? void 0 : e.is_static) }
|
|
216
215
|
],
|
|
217
216
|
meta: [
|
|
218
|
-
{ label: "
|
|
219
|
-
{ label: "Bounds", value: (e) => B(e) },
|
|
220
|
-
{ label: "SRID", value: (e) => u(e, "srid") },
|
|
221
|
-
{ label: "Таблиця картки", value: (e) => l.normalizeValue(e == null ? void 0 : e.card_table) },
|
|
222
|
-
{ label: "Min zoom", value: (e) => u(e, "minzoom") },
|
|
223
|
-
{ label: "Max zoom", value: (e) => u(e, "maxzoom") }
|
|
217
|
+
{ label: "Bounds", value: (e) => R(e) }
|
|
224
218
|
],
|
|
225
219
|
edit: [
|
|
226
220
|
{
|
|
@@ -261,69 +255,66 @@ function Fe(l) {
|
|
|
261
255
|
}
|
|
262
256
|
};
|
|
263
257
|
}
|
|
264
|
-
const
|
|
258
|
+
const Fe = { class: "flex-1 overflow-y-auto p-4" }, Ae = { class: "space-y-4" }, Re = { class: "border border-gray-200 rounded-lg p-4" }, De = {
|
|
265
259
|
key: 0,
|
|
266
260
|
class: "grid grid-cols-2 gap-2"
|
|
267
|
-
},
|
|
261
|
+
}, Oe = { class: "text-xs text-gray-500 mb-1" }, He = { class: "text-sm font-semibold text-gray-900" }, Pe = {
|
|
268
262
|
key: 1,
|
|
269
263
|
class: "text-sm text-gray-700 leading-relaxed"
|
|
270
|
-
}, Ge = { class: "border border-gray-200 rounded-lg p-4" }, qe = { class: "text-sm text-gray-700 leading-relaxed" }, Qe = { class: "border border-gray-200 rounded-lg p-4" }, Xe = {
|
|
271
|
-
key: 0,
|
|
272
|
-
class: "grid grid-cols-2 gap-2"
|
|
273
|
-
}, We = { class: "text-xs text-gray-500 mb-1" }, Je = { class: "text-sm font-semibold text-gray-900" }, Ye = {
|
|
264
|
+
}, Ge = { class: "border border-gray-200 rounded-lg p-4" }, qe = { class: "text-sm text-gray-700 leading-relaxed" }, Qe = { class: "border border-gray-200 rounded-lg p-4" }, Xe = { class: "flex items-center justify-between mb-3" }, We = { class: "text-xs text-gray-500 mb-1" }, Je = { class: "text-sm font-semibold text-gray-900" }, Ye = {
|
|
274
265
|
key: 1,
|
|
275
266
|
class: "text-sm text-gray-700 leading-relaxed"
|
|
276
|
-
}, Ke = { class: "flex justify-end gap-2 px-4 py-3 border-t border-gray-100 w-full" }, Ze = ["disabled"], et = ["disabled"],
|
|
267
|
+
}, Ke = { class: "flex justify-end gap-2 px-4 py-3 border-t border-gray-100 w-full" }, Ze = ["disabled"], et = ["disabled"], I = "-", ft = /* @__PURE__ */ ee({
|
|
277
268
|
__name: "MetaDataTab",
|
|
278
269
|
props: {
|
|
279
270
|
data: {},
|
|
280
271
|
entityId: {},
|
|
281
272
|
entityType: {}
|
|
282
273
|
},
|
|
283
|
-
emits: ["saved"],
|
|
284
|
-
setup(l, { emit:
|
|
285
|
-
const
|
|
286
|
-
async function
|
|
274
|
+
emits: ["saved", "editCssBounds"],
|
|
275
|
+
setup(l, { emit: z }) {
|
|
276
|
+
const m = K(() => import("@opengis/core").then((t) => t.VsModal)), j = K(() => import("@opengis/form")), p = l, R = z, d = y(null);
|
|
277
|
+
async function F(t) {
|
|
287
278
|
var a;
|
|
288
279
|
try {
|
|
289
|
-
const
|
|
290
|
-
if (!
|
|
291
|
-
const
|
|
292
|
-
return (
|
|
280
|
+
const o = await fetch("/api/suggest/gis.group_list");
|
|
281
|
+
if (!o.ok) return null;
|
|
282
|
+
const E = (a = (await o.json()).data) == null ? void 0 : a.find((O) => String(O.id) === String(t));
|
|
283
|
+
return (E == null ? void 0 : E.text) ?? null;
|
|
293
284
|
} catch {
|
|
294
285
|
return null;
|
|
295
286
|
}
|
|
296
287
|
}
|
|
297
|
-
|
|
298
|
-
() =>
|
|
288
|
+
de(
|
|
289
|
+
() => p.data,
|
|
299
290
|
async (t) => {
|
|
300
|
-
if (
|
|
301
|
-
const a = await
|
|
302
|
-
|
|
291
|
+
if (d.value = null, (t == null ? void 0 : t.group_id) != null) {
|
|
292
|
+
const a = await F(String(t.group_id));
|
|
293
|
+
d.value = a;
|
|
303
294
|
}
|
|
304
295
|
},
|
|
305
296
|
{ immediate: !0 }
|
|
306
297
|
);
|
|
307
|
-
function
|
|
308
|
-
if (!t || typeof t != "string") return
|
|
298
|
+
function w(t) {
|
|
299
|
+
if (!t || typeof t != "string") return I;
|
|
309
300
|
try {
|
|
310
301
|
const a = new Date(t);
|
|
311
|
-
return Number.isNaN(a.getTime()) ?
|
|
302
|
+
return Number.isNaN(a.getTime()) ? I : a.toLocaleDateString("uk-UA", {
|
|
312
303
|
day: "numeric",
|
|
313
304
|
month: "long",
|
|
314
305
|
year: "numeric"
|
|
315
306
|
});
|
|
316
307
|
} catch {
|
|
317
|
-
return
|
|
308
|
+
return I;
|
|
318
309
|
}
|
|
319
310
|
}
|
|
320
|
-
function
|
|
321
|
-
return typeof (t == null ? void 0 : t.is_active) == "boolean" ? t.is_active ? "Активний" : "Неактивний" : typeof (t == null ? void 0 : t.enabled) == "boolean" ? t.enabled ? "Активний" : "Неактивний" :
|
|
311
|
+
function L(t) {
|
|
312
|
+
return typeof (t == null ? void 0 : t.is_active) == "boolean" ? t.is_active ? "Активний" : "Неактивний" : typeof (t == null ? void 0 : t.enabled) == "boolean" ? t.enabled ? "Активний" : "Неактивний" : I;
|
|
322
313
|
}
|
|
323
|
-
function
|
|
324
|
-
return typeof (t == null ? void 0 : t.is_public) != "boolean" ?
|
|
314
|
+
function S(t) {
|
|
315
|
+
return typeof (t == null ? void 0 : t.is_public) != "boolean" ? I : t.is_public ? "Публічний" : "Приватний";
|
|
325
316
|
}
|
|
326
|
-
function
|
|
317
|
+
function e(t) {
|
|
327
318
|
if (t == null) return "";
|
|
328
319
|
if (Array.isArray(t)) return t.filter(Boolean).join(", ");
|
|
329
320
|
if (typeof t == "boolean") return t ? "Так" : "Ні";
|
|
@@ -331,29 +322,29 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
|
|
|
331
322
|
const a = String(t).trim();
|
|
332
323
|
return a === "" ? "" : a;
|
|
333
324
|
}
|
|
334
|
-
function
|
|
335
|
-
return a.map((
|
|
325
|
+
function h(t, a) {
|
|
326
|
+
return a.map((o) => ({ label: o.label, value: o.value(t) })).filter((o) => o.value && o.value !== I);
|
|
336
327
|
}
|
|
337
|
-
const
|
|
328
|
+
const x = b(() => h(p.data, N().general)), B = b(() => {
|
|
338
329
|
var a;
|
|
339
|
-
const t = (a =
|
|
340
|
-
return t != null && t !== "" ? t :
|
|
341
|
-
}),
|
|
342
|
-
function
|
|
343
|
-
const t =
|
|
344
|
-
resolvedGroupName:
|
|
345
|
-
normalizeValue:
|
|
346
|
-
statusLabel:
|
|
347
|
-
visibilityLabel:
|
|
348
|
-
formatDate:
|
|
330
|
+
const t = (a = p.data) == null ? void 0 : a.description;
|
|
331
|
+
return t != null && t !== "" ? t : I;
|
|
332
|
+
}), T = b(() => h(p.data, N().meta)), A = b(() => T.value.length === 1 ? "grid-cols-1" : "grid-cols-2"), P = b(() => p.entityType === "css" || p.entityType === "raster"), k = y(!1), C = y({}), f = y(null), _ = y(!1);
|
|
333
|
+
function N() {
|
|
334
|
+
const t = je({
|
|
335
|
+
resolvedGroupName: d.value,
|
|
336
|
+
normalizeValue: e,
|
|
337
|
+
statusLabel: L,
|
|
338
|
+
visibilityLabel: S,
|
|
339
|
+
formatDate: w
|
|
349
340
|
});
|
|
350
|
-
return t[
|
|
341
|
+
return t[p.entityType || "service"] || t.service;
|
|
351
342
|
}
|
|
352
|
-
const
|
|
353
|
-
function
|
|
354
|
-
const t =
|
|
355
|
-
|
|
356
|
-
switch (
|
|
343
|
+
const Q = b(() => N().edit);
|
|
344
|
+
function te() {
|
|
345
|
+
const t = p.data, a = {};
|
|
346
|
+
N().edit.forEach((o) => {
|
|
347
|
+
switch (o.name) {
|
|
357
348
|
case "group_id":
|
|
358
349
|
a.group_id = (t == null ? void 0 : t.group_id) != null ? String(t.group_id) : "";
|
|
359
350
|
break;
|
|
@@ -382,61 +373,67 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
|
|
|
382
373
|
a.card_auto = (t == null ? void 0 : t.card_auto) ?? !1;
|
|
383
374
|
break;
|
|
384
375
|
default:
|
|
385
|
-
a[
|
|
376
|
+
a[o.name] = (t == null ? void 0 : t[o.name]) ?? "";
|
|
386
377
|
break;
|
|
387
378
|
}
|
|
388
|
-
|
|
379
|
+
}), C.value = a, f.value = null, k.value = !0;
|
|
389
380
|
}
|
|
390
|
-
|
|
381
|
+
function X() {
|
|
382
|
+
R("editCssBounds");
|
|
383
|
+
}
|
|
384
|
+
function W(t) {
|
|
385
|
+
return p.entityType === "raster" && t === "Bounds";
|
|
386
|
+
}
|
|
387
|
+
async function J() {
|
|
391
388
|
var t, a;
|
|
392
|
-
if (!(!
|
|
393
|
-
if (
|
|
394
|
-
const
|
|
395
|
-
if (
|
|
396
|
-
|
|
389
|
+
if (!(!p.entityId || !p.entityType)) {
|
|
390
|
+
if (f.value) {
|
|
391
|
+
const o = (a = (t = f.value).validate) == null ? void 0 : a.call(t);
|
|
392
|
+
if (o) {
|
|
393
|
+
H({
|
|
397
394
|
type: "warning",
|
|
398
395
|
title: "Валідація",
|
|
399
|
-
message: Object.entries(
|
|
396
|
+
message: Object.entries(o).map(([D, E]) => `${D}: ${E}`).join(`
|
|
400
397
|
`)
|
|
401
398
|
});
|
|
402
399
|
return;
|
|
403
400
|
}
|
|
404
401
|
}
|
|
405
|
-
|
|
402
|
+
_.value = !0;
|
|
406
403
|
try {
|
|
407
|
-
const
|
|
408
|
-
Object.entries(
|
|
409
|
-
),
|
|
410
|
-
url: `/api/gis-css/${encodeURIComponent(
|
|
404
|
+
const o = new Set(Q.value.map(($) => $.name)), D = Object.fromEntries(
|
|
405
|
+
Object.entries(C.value).filter(([$]) => o.has($))
|
|
406
|
+
), E = p.entityType === "css" ? {
|
|
407
|
+
url: `/api/gis-css/${encodeURIComponent(p.entityId)}`,
|
|
411
408
|
method: "POST"
|
|
412
409
|
} : {
|
|
413
|
-
url: `/api/gis-metadata/${encodeURIComponent(
|
|
410
|
+
url: `/api/gis-metadata/${encodeURIComponent(p.entityType)}/${encodeURIComponent(p.entityId)}`,
|
|
414
411
|
method: "POST"
|
|
415
|
-
},
|
|
416
|
-
method:
|
|
412
|
+
}, O = await fetch(E.url, {
|
|
413
|
+
method: E.method,
|
|
417
414
|
headers: { "Content-Type": "application/json" },
|
|
418
|
-
body: JSON.stringify(
|
|
415
|
+
body: JSON.stringify(D)
|
|
419
416
|
});
|
|
420
|
-
if (!
|
|
421
|
-
|
|
422
|
-
} catch (
|
|
423
|
-
console.error("Failed to save metadata",
|
|
417
|
+
if (!O.ok) throw new Error(`Failed to save metadata: ${O.status}`);
|
|
418
|
+
H({ type: "success", title: "Збережено", message: "Метадані оновлено" }), k.value = !1, R("saved");
|
|
419
|
+
} catch (o) {
|
|
420
|
+
console.error("Failed to save metadata", o), H({ type: "error", title: "Помилка", message: "Не вдалося зберегти метадані" });
|
|
424
421
|
} finally {
|
|
425
|
-
|
|
422
|
+
_.value = !1;
|
|
426
423
|
}
|
|
427
424
|
}
|
|
428
425
|
}
|
|
429
|
-
return (t, a) => (
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
a[5] || (a[5] =
|
|
434
|
-
|
|
426
|
+
return (t, a) => (c(), v("div", Fe, [
|
|
427
|
+
n("div", Ae, [
|
|
428
|
+
n("div", Re, [
|
|
429
|
+
n("div", { class: "flex items-center justify-between mb-3" }, [
|
|
430
|
+
a[5] || (a[5] = n("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider" }, " Загальна інформація ", -1)),
|
|
431
|
+
n("button", {
|
|
435
432
|
type: "button",
|
|
436
|
-
onClick:
|
|
433
|
+
onClick: te,
|
|
437
434
|
class: "inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs font-medium transition-colors bg-sky-50 text-sky-600 hover:bg-sky-100"
|
|
438
435
|
}, [...a[4] || (a[4] = [
|
|
439
|
-
|
|
436
|
+
n("svg", {
|
|
440
437
|
xmlns: "http://www.w3.org/2000/svg",
|
|
441
438
|
class: "h-3.5 w-3.5",
|
|
442
439
|
fill: "none",
|
|
@@ -444,72 +441,99 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
|
|
|
444
441
|
stroke: "currentColor",
|
|
445
442
|
"stroke-width": "2"
|
|
446
443
|
}, [
|
|
447
|
-
|
|
444
|
+
n("path", {
|
|
448
445
|
"stroke-linecap": "round",
|
|
449
446
|
"stroke-linejoin": "round",
|
|
450
447
|
d: "M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"
|
|
451
448
|
})
|
|
452
449
|
], -1),
|
|
453
|
-
|
|
450
|
+
pe(" Редагувати ", -1)
|
|
454
451
|
])])
|
|
455
452
|
]),
|
|
456
|
-
|
|
457
|
-
(
|
|
458
|
-
key:
|
|
453
|
+
x.value.length ? (c(), v("div", De, [
|
|
454
|
+
(c(!0), v(se, null, be(x.value, (o) => (c(), v("div", {
|
|
455
|
+
key: o.label,
|
|
459
456
|
class: "bg-gray-50 rounded-md p-2 border border-gray-100"
|
|
460
457
|
}, [
|
|
461
|
-
|
|
462
|
-
|
|
458
|
+
n("p", Oe, V(o.label), 1),
|
|
459
|
+
n("p", He, V(o.value), 1)
|
|
463
460
|
]))), 128))
|
|
464
|
-
])) : (
|
|
461
|
+
])) : (c(), v("p", Pe, V(I)))
|
|
465
462
|
]),
|
|
466
|
-
|
|
467
|
-
a[6] || (a[6] =
|
|
468
|
-
|
|
463
|
+
n("div", Ge, [
|
|
464
|
+
a[6] || (a[6] = n("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3" }, " Повний опис ", -1)),
|
|
465
|
+
n("p", qe, V(B.value), 1)
|
|
469
466
|
]),
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
key:
|
|
475
|
-
|
|
467
|
+
n("div", Qe, [
|
|
468
|
+
n("div", Xe, [
|
|
469
|
+
a[8] || (a[8] = n("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider" }, " Метадані ", -1)),
|
|
470
|
+
P.value ? (c(), v("button", {
|
|
471
|
+
key: 0,
|
|
472
|
+
type: "button",
|
|
473
|
+
class: "inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs font-medium transition-colors bg-sky-50 text-sky-600 hover:bg-sky-100",
|
|
474
|
+
onClick: X
|
|
475
|
+
}, [...a[7] || (a[7] = [
|
|
476
|
+
n("svg", {
|
|
477
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
478
|
+
class: "h-3.5 w-3.5",
|
|
479
|
+
fill: "none",
|
|
480
|
+
viewBox: "0 0 24 24",
|
|
481
|
+
stroke: "currentColor",
|
|
482
|
+
"stroke-width": "2"
|
|
483
|
+
}, [
|
|
484
|
+
n("path", {
|
|
485
|
+
"stroke-linecap": "round",
|
|
486
|
+
"stroke-linejoin": "round",
|
|
487
|
+
d: "M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"
|
|
488
|
+
})
|
|
489
|
+
], -1),
|
|
490
|
+
pe(" Редагувати ", -1)
|
|
491
|
+
])])) : q("", !0)
|
|
492
|
+
]),
|
|
493
|
+
T.value.length ? (c(), v("div", {
|
|
494
|
+
key: 0,
|
|
495
|
+
class: oe([A.value, "grid gap-2"])
|
|
496
|
+
}, [
|
|
497
|
+
(c(!0), v(se, null, be(T.value, (o) => (c(), v("div", {
|
|
498
|
+
key: o.label,
|
|
499
|
+
class: oe(["bg-gray-50 rounded-md p-2 border border-gray-100", { "col-span-2": W(o.label) }])
|
|
476
500
|
}, [
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
]))), 128))
|
|
480
|
-
])) : (
|
|
501
|
+
n("p", We, V(o.label), 1),
|
|
502
|
+
n("p", Je, V(o.value), 1)
|
|
503
|
+
], 2))), 128))
|
|
504
|
+
], 2)) : (c(), v("p", Ye, V(I)))
|
|
481
505
|
])
|
|
482
506
|
]),
|
|
483
|
-
|
|
507
|
+
U(M(m), {
|
|
484
508
|
teleport: "#modal",
|
|
485
|
-
visible:
|
|
486
|
-
"onUpdate:visible": a[3] || (a[3] = (
|
|
509
|
+
visible: k.value,
|
|
510
|
+
"onUpdate:visible": a[3] || (a[3] = (o) => k.value = o),
|
|
487
511
|
title: "Редагування метаданих",
|
|
488
512
|
size: "lg"
|
|
489
513
|
}, {
|
|
490
|
-
footer:
|
|
491
|
-
|
|
492
|
-
|
|
514
|
+
footer: Z(() => [
|
|
515
|
+
n("div", Ke, [
|
|
516
|
+
n("button", {
|
|
493
517
|
type: "button",
|
|
494
518
|
class: "px-4 py-2 rounded bg-gray-100 text-gray-700 text-sm",
|
|
495
|
-
disabled:
|
|
496
|
-
onClick: a[2] || (a[2] = (
|
|
519
|
+
disabled: _.value,
|
|
520
|
+
onClick: a[2] || (a[2] = (o) => k.value = !1)
|
|
497
521
|
}, " Скасувати ", 8, Ze),
|
|
498
|
-
|
|
522
|
+
n("button", {
|
|
499
523
|
type: "button",
|
|
500
524
|
class: "px-4 py-2 rounded bg-blue-600 text-white text-sm",
|
|
501
|
-
disabled:
|
|
502
|
-
onClick:
|
|
503
|
-
},
|
|
525
|
+
disabled: _.value,
|
|
526
|
+
onClick: J
|
|
527
|
+
}, V(_.value ? "Збереження…" : "Зберегти"), 9, et)
|
|
504
528
|
])
|
|
505
529
|
]),
|
|
506
|
-
default:
|
|
507
|
-
|
|
508
|
-
values:
|
|
509
|
-
"onUpdate:values": a[0] || (a[0] = (
|
|
510
|
-
form:
|
|
511
|
-
"onUpdate:form": a[1] || (a[1] = (
|
|
512
|
-
schema:
|
|
530
|
+
default: Z(() => [
|
|
531
|
+
U(M(j), {
|
|
532
|
+
values: C.value,
|
|
533
|
+
"onUpdate:values": a[0] || (a[0] = (o) => C.value = o),
|
|
534
|
+
form: f.value,
|
|
535
|
+
"onUpdate:form": a[1] || (a[1] = (o) => f.value = o),
|
|
536
|
+
schema: Q.value
|
|
513
537
|
}, null, 8, ["values", "form", "schema"])
|
|
514
538
|
]),
|
|
515
539
|
_: 1
|
|
@@ -522,7 +546,7 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
|
|
|
522
546
|
}, ot = {
|
|
523
547
|
key: 1,
|
|
524
548
|
class: "py-6 px-4 text-sm text-red-600"
|
|
525
|
-
}, rt = { class: "flex justify-end gap-2 px-4 py-3 border-t border-gray-100 w-full" }, st = ["disabled"], it = ["disabled"], ut = 192,
|
|
549
|
+
}, rt = { class: "flex justify-end gap-2 px-4 py-3 border-t border-gray-100 w-full" }, st = ["disabled"], it = ["disabled"], ut = 192, ge = 8, G = 8, gt = /* @__PURE__ */ ee({
|
|
526
550
|
__name: "HeaderActions",
|
|
527
551
|
props: {
|
|
528
552
|
entityId: {},
|
|
@@ -537,113 +561,113 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
|
|
|
537
561
|
clearTilesHandler: {}
|
|
538
562
|
},
|
|
539
563
|
emits: ["saved"],
|
|
540
|
-
setup(l, { emit:
|
|
541
|
-
const
|
|
542
|
-
() => import("@opengis/core").then((
|
|
543
|
-
),
|
|
564
|
+
setup(l, { emit: z }) {
|
|
565
|
+
const m = l, j = z, p = K(
|
|
566
|
+
() => import("@opengis/core").then((r) => r.VsModal)
|
|
567
|
+
), R = K(() => import("@opengis/form")), d = y(!1), F = y(null), w = y(null), L = y(null), S = y(null), e = b(() => S.value ? {
|
|
544
568
|
position: "fixed",
|
|
545
|
-
top: `${
|
|
546
|
-
left: `${
|
|
569
|
+
top: `${S.value.top}px`,
|
|
570
|
+
left: `${S.value.left}px`
|
|
547
571
|
} : {});
|
|
548
|
-
|
|
549
|
-
|
|
572
|
+
de(d, (r) => {
|
|
573
|
+
r && ke(le);
|
|
550
574
|
});
|
|
551
|
-
const
|
|
552
|
-
var
|
|
553
|
-
return (
|
|
554
|
-
}),
|
|
555
|
-
if (
|
|
556
|
-
if (
|
|
557
|
-
return (
|
|
558
|
-
}),
|
|
559
|
-
if (
|
|
560
|
-
if (
|
|
561
|
-
return (
|
|
562
|
-
}),
|
|
563
|
-
() =>
|
|
564
|
-
),
|
|
565
|
-
() =>
|
|
566
|
-
),
|
|
567
|
-
() =>
|
|
568
|
-
),
|
|
569
|
-
() =>
|
|
570
|
-
),
|
|
571
|
-
var
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
574
|
-
const
|
|
575
|
-
return
|
|
576
|
-
}),
|
|
577
|
-
function
|
|
578
|
-
|
|
575
|
+
const h = y(!1), x = y(null), B = y({}), T = y(null), A = y(""), P = y(!1), k = y(!1), C = y(null), f = b(() => m.entityId || ""), _ = (r, s) => r ? typeof r == "function" ? r(s) : typeof r != "string" ? "" : r.includes(":id") ? s ? r.replace(":id", encodeURIComponent(s)) : "" : r : "", N = b(() => {
|
|
576
|
+
var r;
|
|
577
|
+
return (r = m.table) == null ? void 0 : r.trim();
|
|
578
|
+
}), Q = b(() => {
|
|
579
|
+
if (m.formEndpoint) return m.formEndpoint;
|
|
580
|
+
if (N.value)
|
|
581
|
+
return (r) => `/api/form/${N.value}/${r}`;
|
|
582
|
+
}), te = b(() => {
|
|
583
|
+
if (m.saveEndpoint) return m.saveEndpoint;
|
|
584
|
+
if (N.value)
|
|
585
|
+
return (r) => `/api/table/${r}`;
|
|
586
|
+
}), X = b(
|
|
587
|
+
() => _(Q.value, f.value)
|
|
588
|
+
), W = b(() => m.saveEndpoint ? _(m.saveEndpoint, f.value) : C.value ? `/api/table/${encodeURIComponent(C.value)}` : _(te.value, f.value)), J = b(
|
|
589
|
+
() => _("/api/gis-clear-rtile/:id", f.value)
|
|
590
|
+
), t = b(
|
|
591
|
+
() => _("/api/gis-xml/:id", f.value)
|
|
592
|
+
), a = b(
|
|
593
|
+
() => _("/api/gis-pretile/:id?zoom=10&max=12", f.value)
|
|
594
|
+
), o = b(() => {
|
|
595
|
+
var u, g, i;
|
|
596
|
+
const r = (g = (u = m.entityInfo) == null ? void 0 : u.name) == null ? void 0 : g.trim();
|
|
597
|
+
if (r) return `Редагування ${r}`;
|
|
598
|
+
const s = (i = m.entityLabel) == null ? void 0 : i.trim();
|
|
599
|
+
return s ? `Редагування ${s}` : "Редагування";
|
|
600
|
+
}), D = b(() => m.editButtonText || "Редагувати"), E = b(() => (m.saveMethod || "POST").toUpperCase());
|
|
601
|
+
function O() {
|
|
602
|
+
d.value || le(), d.value = !d.value;
|
|
579
603
|
}
|
|
580
|
-
function
|
|
581
|
-
|
|
604
|
+
function $() {
|
|
605
|
+
d.value = !1;
|
|
582
606
|
}
|
|
583
|
-
async function
|
|
584
|
-
const
|
|
585
|
-
!
|
|
607
|
+
async function he() {
|
|
608
|
+
const r = m.clearTilesHandler;
|
|
609
|
+
!r || !f.value || ($(), await r(f.value));
|
|
586
610
|
}
|
|
587
|
-
function
|
|
588
|
-
var
|
|
589
|
-
if (typeof window > "u" || !
|
|
590
|
-
const
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
),
|
|
594
|
-
let
|
|
595
|
-
if (
|
|
596
|
-
const
|
|
597
|
-
|
|
611
|
+
function le() {
|
|
612
|
+
var ve;
|
|
613
|
+
if (typeof window > "u" || !w.value) return;
|
|
614
|
+
const r = w.value.getBoundingClientRect(), s = window.innerWidth, u = window.innerHeight, g = r.left, i = Math.max(
|
|
615
|
+
s - ut - G,
|
|
616
|
+
G
|
|
617
|
+
), ae = Math.min(Math.max(g, G), i), ne = ((ve = L.value) == null ? void 0 : ve.offsetHeight) ?? 0, ce = r.bottom + ge;
|
|
618
|
+
let me = ce;
|
|
619
|
+
if (ne && ce + ne > u - G) {
|
|
620
|
+
const xe = r.top - ge - ne;
|
|
621
|
+
me = Math.max(xe, G);
|
|
598
622
|
}
|
|
599
|
-
|
|
623
|
+
S.value = { top: me, left: ae };
|
|
600
624
|
}
|
|
601
|
-
function
|
|
602
|
-
var
|
|
603
|
-
if (!
|
|
604
|
-
const
|
|
605
|
-
|
|
625
|
+
function ie(r) {
|
|
626
|
+
var u, g;
|
|
627
|
+
if (!F.value && !L.value) return;
|
|
628
|
+
const s = r.target;
|
|
629
|
+
s && ((u = F.value) != null && u.contains(s) || (g = L.value) != null && g.contains(s)) || (d.value = !1);
|
|
606
630
|
}
|
|
607
|
-
function
|
|
608
|
-
|
|
631
|
+
function Y() {
|
|
632
|
+
d.value && le();
|
|
609
633
|
}
|
|
610
|
-
|
|
611
|
-
window.addEventListener("click",
|
|
612
|
-
}),
|
|
613
|
-
window.removeEventListener("click",
|
|
634
|
+
Ve(() => {
|
|
635
|
+
window.addEventListener("click", ie), window.addEventListener("resize", Y), window.addEventListener("scroll", Y, !0);
|
|
636
|
+
}), ze(() => {
|
|
637
|
+
window.removeEventListener("click", ie), window.removeEventListener("resize", Y), window.removeEventListener("scroll", Y, !0);
|
|
614
638
|
});
|
|
615
|
-
async function
|
|
616
|
-
var
|
|
617
|
-
if (!(!
|
|
618
|
-
|
|
639
|
+
async function _e() {
|
|
640
|
+
var r, s, u;
|
|
641
|
+
if (!(!f.value || !X.value)) {
|
|
642
|
+
$(), h.value = !0, P.value = !0, A.value = "", x.value = null, B.value = {}, C.value = null;
|
|
619
643
|
try {
|
|
620
|
-
const
|
|
621
|
-
if (!
|
|
622
|
-
throw new Error(`Failed to load form: ${
|
|
623
|
-
const i = await
|
|
624
|
-
|
|
625
|
-
const
|
|
626
|
-
|
|
627
|
-
} catch (
|
|
628
|
-
console.error("Failed to load edit form",
|
|
644
|
+
const g = await fetch(X.value);
|
|
645
|
+
if (!g.ok)
|
|
646
|
+
throw new Error(`Failed to load form: ${g.status}`);
|
|
647
|
+
const i = await g.json();
|
|
648
|
+
B.value = (i == null ? void 0 : i.data) || {}, x.value = (i == null ? void 0 : i.schema) || null;
|
|
649
|
+
const ae = typeof (i == null ? void 0 : i.token) == "string" && i.token || typeof ((r = i == null ? void 0 : i.tokens) == null ? void 0 : r.edit) == "string" && i.tokens.edit || typeof ((s = i == null ? void 0 : i.tokens) == null ? void 0 : s.edit_token) == "string" && i.tokens.edit_token || typeof ((u = i == null ? void 0 : i.data) == null ? void 0 : u.token) == "string" && i.data.token || null;
|
|
650
|
+
C.value = ae, T.value = null;
|
|
651
|
+
} catch (g) {
|
|
652
|
+
console.error("Failed to load edit form", g), A.value = "Не вдалося завантажити форму редагування";
|
|
629
653
|
} finally {
|
|
630
|
-
|
|
654
|
+
P.value = !1;
|
|
631
655
|
}
|
|
632
656
|
}
|
|
633
657
|
}
|
|
634
|
-
function
|
|
635
|
-
|
|
658
|
+
function ue() {
|
|
659
|
+
h.value = !1, x.value = null, A.value = "", C.value = null;
|
|
636
660
|
}
|
|
637
|
-
async function
|
|
638
|
-
var
|
|
639
|
-
if (!(!
|
|
640
|
-
if (
|
|
641
|
-
const
|
|
642
|
-
if (
|
|
643
|
-
|
|
661
|
+
async function we() {
|
|
662
|
+
var r, s;
|
|
663
|
+
if (!(!f.value || !W.value)) {
|
|
664
|
+
if (T.value) {
|
|
665
|
+
const u = (s = (r = T.value).validate) == null ? void 0 : s.call(r);
|
|
666
|
+
if (u) {
|
|
667
|
+
H({
|
|
644
668
|
type: "warning",
|
|
645
669
|
title: "Validation",
|
|
646
|
-
message: Object.entries(
|
|
670
|
+
message: Object.entries(u).map(([g, i]) => `${g}: ${i}`).join(`
|
|
647
671
|
`)
|
|
648
672
|
});
|
|
649
673
|
return;
|
|
@@ -651,19 +675,19 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
|
|
|
651
675
|
}
|
|
652
676
|
k.value = !0;
|
|
653
677
|
try {
|
|
654
|
-
const
|
|
655
|
-
method:
|
|
678
|
+
const u = await fetch(W.value, {
|
|
679
|
+
method: E.value,
|
|
656
680
|
headers: { "Content-Type": "application/json" },
|
|
657
|
-
body: JSON.stringify(
|
|
681
|
+
body: JSON.stringify(B.value)
|
|
658
682
|
});
|
|
659
|
-
if (!
|
|
660
|
-
|
|
683
|
+
if (!u.ok) throw new Error(`Failed to save: ${u.status}`);
|
|
684
|
+
H({
|
|
661
685
|
type: "success",
|
|
662
686
|
title: "Збережено",
|
|
663
687
|
message: "Зміни збережено"
|
|
664
|
-
}),
|
|
665
|
-
} catch (
|
|
666
|
-
console.error("Failed to save edit form",
|
|
688
|
+
}), j("saved", B.value), ue();
|
|
689
|
+
} catch (u) {
|
|
690
|
+
console.error("Failed to save edit form", u), H({
|
|
667
691
|
type: "error",
|
|
668
692
|
title: "Помилка",
|
|
669
693
|
message: "Не вдалося зберегти зміни"
|
|
@@ -673,27 +697,27 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
|
|
|
673
697
|
}
|
|
674
698
|
}
|
|
675
699
|
}
|
|
676
|
-
return (
|
|
700
|
+
return (r, s) => (c(), v("div", {
|
|
677
701
|
ref_key: "root",
|
|
678
|
-
ref:
|
|
702
|
+
ref: F,
|
|
679
703
|
class: "relative flex items-center"
|
|
680
704
|
}, [
|
|
681
|
-
|
|
705
|
+
n("button", {
|
|
682
706
|
ref_key: "triggerButton",
|
|
683
|
-
ref:
|
|
707
|
+
ref: w,
|
|
684
708
|
type: "button",
|
|
685
|
-
onClick: Ce(
|
|
709
|
+
onClick: Ce(O, ["stop"]),
|
|
686
710
|
class: "flex items-center justify-center w-9 h-9 hover:rounded-md hover:border hover:border-gray-200 bg-white text-gray-600 hover:bg-gray-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-500",
|
|
687
711
|
"aria-label": "Дії"
|
|
688
|
-
}, [...
|
|
689
|
-
|
|
712
|
+
}, [...s[3] || (s[3] = [
|
|
713
|
+
n("svg", {
|
|
690
714
|
xmlns: "http://www.w3.org/2000/svg",
|
|
691
715
|
class: "h-5 w-5",
|
|
692
716
|
fill: "none",
|
|
693
717
|
viewBox: "0 0 24 24",
|
|
694
718
|
stroke: "currentColor"
|
|
695
719
|
}, [
|
|
696
|
-
|
|
720
|
+
n("path", {
|
|
697
721
|
"stroke-linecap": "round",
|
|
698
722
|
"stroke-linejoin": "round",
|
|
699
723
|
"stroke-width": "2",
|
|
@@ -701,113 +725,113 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
|
|
|
701
725
|
})
|
|
702
726
|
], -1)
|
|
703
727
|
])], 512),
|
|
704
|
-
(
|
|
705
|
-
|
|
728
|
+
(c(), re(Ee, { to: "body" }, [
|
|
729
|
+
d.value ? (c(), v("div", {
|
|
706
730
|
key: 0,
|
|
707
731
|
ref_key: "menuContainer",
|
|
708
|
-
ref:
|
|
709
|
-
style: Me(
|
|
732
|
+
ref: L,
|
|
733
|
+
style: Me(e.value),
|
|
710
734
|
class: "absolute top-0 left-0 mt-2 w-48 rounded-xl border border-gray-200 bg-white shadow-lg text-sm z-[1000]"
|
|
711
735
|
}, [
|
|
712
|
-
|
|
713
|
-
l.clearTilesHandler ? (
|
|
736
|
+
J.value || l.clearTilesHandler ? (c(), v(se, { key: 0 }, [
|
|
737
|
+
l.clearTilesHandler ? (c(), v("button", {
|
|
714
738
|
key: 0,
|
|
715
739
|
type: "button",
|
|
716
740
|
class: "flex items-center gap-2 w-full px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
|
|
717
|
-
onClick:
|
|
741
|
+
onClick: he
|
|
718
742
|
}, [
|
|
719
|
-
|
|
743
|
+
U(M(ye), {
|
|
720
744
|
size: 16,
|
|
721
745
|
class: "lucide lucide-brush-cleaning text-gray-500"
|
|
722
746
|
}),
|
|
723
|
-
|
|
724
|
-
])) : (
|
|
747
|
+
s[4] || (s[4] = n("span", null, "Очистити тайли", -1))
|
|
748
|
+
])) : (c(), v("a", {
|
|
725
749
|
key: 1,
|
|
726
|
-
href:
|
|
750
|
+
href: J.value,
|
|
727
751
|
target: "_blank",
|
|
728
752
|
rel: "noreferrer",
|
|
729
753
|
class: "flex items-center gap-2 px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
|
|
730
|
-
onClick:
|
|
754
|
+
onClick: $
|
|
731
755
|
}, [
|
|
732
|
-
|
|
756
|
+
U(M(ye), {
|
|
733
757
|
size: 16,
|
|
734
758
|
class: "lucide lucide-brush-cleaning text-gray-500"
|
|
735
759
|
}),
|
|
736
|
-
|
|
760
|
+
s[5] || (s[5] = n("span", null, "Очистити тайли", -1))
|
|
737
761
|
], 8, tt))
|
|
738
|
-
], 64)) :
|
|
739
|
-
l.showXmlItem ? (
|
|
762
|
+
], 64)) : q("", !0),
|
|
763
|
+
l.showXmlItem ? (c(), v("a", {
|
|
740
764
|
key: 1,
|
|
741
|
-
href:
|
|
765
|
+
href: t.value,
|
|
742
766
|
target: "_blank",
|
|
743
767
|
rel: "noreferrer",
|
|
744
768
|
class: "flex items-center gap-2 px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
|
|
745
|
-
onClick:
|
|
769
|
+
onClick: $
|
|
746
770
|
}, [
|
|
747
|
-
|
|
771
|
+
U(M(fe), {
|
|
748
772
|
size: 16,
|
|
749
773
|
class: "lucide lucide-square-code text-gray-500"
|
|
750
774
|
}),
|
|
751
|
-
|
|
752
|
-
], 8, lt)) :
|
|
753
|
-
l.showXmlItem ? (
|
|
775
|
+
s[6] || (s[6] = n("span", null, "Створити XML", -1))
|
|
776
|
+
], 8, lt)) : q("", !0),
|
|
777
|
+
l.showXmlItem ? (c(), v("a", {
|
|
754
778
|
key: 2,
|
|
755
|
-
href:
|
|
779
|
+
href: a.value,
|
|
756
780
|
target: "_blank",
|
|
757
781
|
rel: "noreferrer",
|
|
758
782
|
class: "flex items-center gap-2 px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
|
|
759
|
-
onClick:
|
|
783
|
+
onClick: $
|
|
760
784
|
}, [
|
|
761
|
-
|
|
785
|
+
U(M(fe), {
|
|
762
786
|
size: 16,
|
|
763
787
|
class: "lucide lucide-square-code text-gray-500"
|
|
764
788
|
}),
|
|
765
|
-
|
|
766
|
-
], 8, at)) :
|
|
767
|
-
|
|
789
|
+
s[7] || (s[7] = n("span", null, "Pretile", -1))
|
|
790
|
+
], 8, at)) : q("", !0),
|
|
791
|
+
n("button", {
|
|
768
792
|
type: "button",
|
|
769
793
|
class: "flex items-center gap-2 w-full px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-b-xl",
|
|
770
|
-
onClick:
|
|
794
|
+
onClick: _e
|
|
771
795
|
}, [
|
|
772
|
-
|
|
796
|
+
U(M(Te), {
|
|
773
797
|
size: 16,
|
|
774
798
|
class: "lucide lucide-pencil text-gray-500"
|
|
775
799
|
}),
|
|
776
|
-
|
|
800
|
+
n("span", null, V(D.value), 1)
|
|
777
801
|
])
|
|
778
|
-
], 4)) :
|
|
802
|
+
], 4)) : q("", !0)
|
|
779
803
|
])),
|
|
780
|
-
|
|
804
|
+
U(M(p), {
|
|
781
805
|
teleport: "#modal",
|
|
782
|
-
visible:
|
|
783
|
-
"onUpdate:visible":
|
|
784
|
-
title:
|
|
806
|
+
visible: h.value,
|
|
807
|
+
"onUpdate:visible": s[2] || (s[2] = (u) => h.value = u),
|
|
808
|
+
title: o.value,
|
|
785
809
|
size: "lg"
|
|
786
810
|
}, {
|
|
787
|
-
footer:
|
|
788
|
-
|
|
789
|
-
|
|
811
|
+
footer: Z(() => [
|
|
812
|
+
n("div", rt, [
|
|
813
|
+
n("button", {
|
|
790
814
|
type: "button",
|
|
791
815
|
class: "px-4 py-2 rounded bg-gray-100 text-gray-700",
|
|
792
|
-
onClick:
|
|
816
|
+
onClick: ue,
|
|
793
817
|
disabled: k.value
|
|
794
818
|
}, " Скасувати ", 8, st),
|
|
795
|
-
|
|
819
|
+
n("button", {
|
|
796
820
|
type: "button",
|
|
797
821
|
class: "px-4 py-2 rounded bg-blue-600 text-white",
|
|
798
|
-
onClick:
|
|
822
|
+
onClick: we,
|
|
799
823
|
disabled: k.value
|
|
800
|
-
},
|
|
824
|
+
}, V(k.value ? "Зберігається…" : "Зберегти"), 9, it)
|
|
801
825
|
])
|
|
802
826
|
]),
|
|
803
|
-
default:
|
|
804
|
-
|
|
827
|
+
default: Z(() => [
|
|
828
|
+
P.value ? (c(), v("div", nt, " Завантаження форми редагування… ")) : A.value ? (c(), v("div", ot, V(A.value), 1)) : (c(), re(M(R), {
|
|
805
829
|
key: 2,
|
|
806
|
-
values:
|
|
807
|
-
"onUpdate:values":
|
|
808
|
-
form:
|
|
809
|
-
"onUpdate:form":
|
|
810
|
-
schema:
|
|
830
|
+
values: B.value,
|
|
831
|
+
"onUpdate:values": s[0] || (s[0] = (u) => B.value = u),
|
|
832
|
+
form: T.value,
|
|
833
|
+
"onUpdate:form": s[1] || (s[1] = (u) => T.value = u),
|
|
834
|
+
schema: x.value
|
|
811
835
|
}, null, 8, ["values", "form", "schema"]))
|
|
812
836
|
]),
|
|
813
837
|
_: 1
|
|
@@ -818,6 +842,6 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
|
|
|
818
842
|
export {
|
|
819
843
|
gt as _,
|
|
820
844
|
bt as a,
|
|
821
|
-
|
|
822
|
-
|
|
845
|
+
ft as b,
|
|
846
|
+
yt as c
|
|
823
847
|
};
|