@opengis/gis 0.2.116 → 0.2.118
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-FxpK90rl.js +51 -0
- package/dist/EntityCreatePage-Da8XgBKU.js +141 -0
- package/dist/EntityEditPage-QktKEAxz.js +167 -0
- package/dist/EntityTablePage-ii-Wz0YZ.js +286 -0
- package/dist/ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-Bl5ZwNQX.js +70 -0
- package/dist/FileEdit-C7tteUeG.js +37 -0
- package/dist/HeaderActions.vue_vue_type_script_setup_true_lang-CKEep8BL.js +796 -0
- package/dist/MapSettings-CjJ7WWkn.js +672 -0
- package/dist/MapSettingsTabs.vue_vue_type_script_setup_true_lang-CKCK3NqY.js +29 -0
- package/dist/MonacoEditor.vue_vue_type_script_setup_true_lang-Bs7gz6Lt.js +408 -0
- package/dist/RastersTablePage-DpKkFOyo.js +359 -0
- package/dist/TableFormHeader.vue_vue_type_script_setup_true_lang-Mci_tseM.js +47 -0
- package/dist/cartocss-C_O8qG3h.js +892 -0
- package/dist/import-utils-BbZ1gVp-.js +123 -0
- package/dist/index-4aSsUBB8.js +10020 -0
- package/dist/index.css +1 -1
- package/dist/index.js +16 -17634
- package/dist/index.umd.cjs +41 -244
- package/dist/raster-Du8ZMtjf.js +664 -0
- package/dist/register-B2gF-GzA.js +780 -0
- package/dist/service-BnPCDVwm.js +2573 -0
- package/dist/vs-datatable-QKks38xL.js +800 -0
- package/module/gis/form/feedback.answer.form.json +11 -0
- package/module/gis/form/gis.cartocss.form.json +8 -0
- package/module/gis/form/gis.metadata_new.form.json +196 -0
- package/module/gis/form/gis.ogc_service.form.json +8 -2
- package/module/gis/select/layer_list_text.sql +7 -0
- package/module/gis/select/pg.column_name.geometry.sql +13 -0
- package/module/gis/table/gis.metadata_new.table.json +138 -0
- package/module/gis/table/site.gis.registers.table.json +1 -1
- package/package.json +3 -4
- package/server/routes/gis/cartocss/get.cartocss.js +1 -1
- package/server/routes/mapnik/controllers/clearTiles.js +8 -4
- package/server/routes/mapnik/controllers/createXmlMulti.js +1 -1
- package/server/routes/mapnik/controllers/fileSearch.js +6 -2
- package/server/routes/mapnik/controllers/fileStat.js +4 -3
- package/server/routes/mapnik/controllers/mapnikLogger.js +1 -1
- package/server/routes/mapnik/controllers/mapnikStat.js +1 -1
- package/server/routes/mapnik/controllers/rasterInfo.js +5 -2
- package/server/routes/mapnik/controllers/readDir.js +5 -2
- package/server/routes/mapnik/controllers/rtile.js +16 -3
- package/server/routes/mapnik/index.js +0 -1
|
@@ -0,0 +1,892 @@
|
|
|
1
|
+
import { openBlock as _, createElementBlock as S, createElementVNode as a, defineComponent as R, computed as C, createTextVNode as ve, createVNode as $, mergeModels as Me, defineAsyncComponent as ee, useModel as je, ref as x, withCtx as O, toDisplayString as N, unref as J, watch as A, onUnmounted as Le, createCommentVNode as q, onBeforeUnmount as he, onMounted as qe, withDirectives as Ae, vModelText as Ne, createBlock as I, normalizeClass as fe, normalizeStyle as Ee, Fragment as me, renderList as Ie, resolveDynamicComponent as Ue } from "vue";
|
|
2
|
+
import { useRouter as Te, useRoute as De } from "vue-router";
|
|
3
|
+
import { notify as B } from "@opengis/core";
|
|
4
|
+
import { _ as Oe, f as ge, n as Re, o as Fe, p as Be, M as Pe, i as Qe, j as pe, m as He } from "./index-4aSsUBB8.js";
|
|
5
|
+
import { S as Ye, C as Je } from "./CardIcon-FxpK90rl.js";
|
|
6
|
+
import { _ as We, a as Xe, b as Ge, c as Ze } from "./HeaderActions.vue_vue_type_script_setup_true_lang-CKEep8BL.js";
|
|
7
|
+
import { _ as xe } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-Bs7gz6Lt.js";
|
|
8
|
+
import { V as Ke } from "./vs-datatable-QKks38xL.js";
|
|
9
|
+
import { _ as et } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-Bl5ZwNQX.js";
|
|
10
|
+
const tt = {}, ot = {
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
+
width: "24",
|
|
13
|
+
height: "24",
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
fill: "none",
|
|
16
|
+
stroke: "currentColor",
|
|
17
|
+
"stroke-width": "2",
|
|
18
|
+
"stroke-linecap": "round",
|
|
19
|
+
"stroke-linejoin": "round",
|
|
20
|
+
class: "lucide lucide-table"
|
|
21
|
+
};
|
|
22
|
+
function at(j, r) {
|
|
23
|
+
return _(), S("svg", ot, [...r[0] || (r[0] = [
|
|
24
|
+
a("path", { d: "M12 3v18" }, null, -1),
|
|
25
|
+
a("rect", {
|
|
26
|
+
width: "18",
|
|
27
|
+
height: "18",
|
|
28
|
+
x: "3",
|
|
29
|
+
y: "3",
|
|
30
|
+
rx: "2"
|
|
31
|
+
}, null, -1),
|
|
32
|
+
a("path", { d: "M3 9h18" }, null, -1),
|
|
33
|
+
a("path", { d: "M3 15h18" }, null, -1)
|
|
34
|
+
])]);
|
|
35
|
+
}
|
|
36
|
+
const nt = /* @__PURE__ */ Oe(tt, [["render", at]]), st = { class: "flex flex-col h-full" }, rt = { class: "flex justify-end mb-3 gap-2" }, lt = /* @__PURE__ */ R({
|
|
37
|
+
__name: "cartocss-css-tab",
|
|
38
|
+
props: {
|
|
39
|
+
modelValue: {}
|
|
40
|
+
},
|
|
41
|
+
emits: ["update:modelValue", "save"],
|
|
42
|
+
setup(j, { emit: r }) {
|
|
43
|
+
const c = j, V = r, w = C({
|
|
44
|
+
get: () => c.modelValue,
|
|
45
|
+
set: (g) => V("update:modelValue", g)
|
|
46
|
+
});
|
|
47
|
+
return (g, u) => (_(), S("div", st, [
|
|
48
|
+
a("div", rt, [
|
|
49
|
+
a("button", {
|
|
50
|
+
type: "button",
|
|
51
|
+
class: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium bg-gradient-to-r from-sky-400 to-blue-400 hover:from-sky-500 hover:to-blue-500 text-white shadow-sm px-4 py-2 h-9 text-xs transition-all duration-300",
|
|
52
|
+
onClick: u[0] || (u[0] = (d) => g.$emit("save"))
|
|
53
|
+
}, [...u[2] || (u[2] = [
|
|
54
|
+
a("svg", {
|
|
55
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
56
|
+
width: "24",
|
|
57
|
+
height: "24",
|
|
58
|
+
viewBox: "0 0 24 24",
|
|
59
|
+
fill: "none",
|
|
60
|
+
stroke: "currentColor",
|
|
61
|
+
"stroke-width": "2",
|
|
62
|
+
"stroke-linecap": "round",
|
|
63
|
+
"stroke-linejoin": "round",
|
|
64
|
+
class: "h-3.5 w-3.5"
|
|
65
|
+
}, [
|
|
66
|
+
a("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a 2 2 0 0 1-2-2V5a 2 2 0 0 1 2-2z" }),
|
|
67
|
+
a("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a 1 1 0 0 0-1 1v7" }),
|
|
68
|
+
a("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
|
|
69
|
+
], -1),
|
|
70
|
+
ve(" Зберегти ", -1)
|
|
71
|
+
])])
|
|
72
|
+
]),
|
|
73
|
+
$(xe, {
|
|
74
|
+
modelValue: w.value,
|
|
75
|
+
"onUpdate:modelValue": u[1] || (u[1] = (d) => w.value = d),
|
|
76
|
+
language: "cartocss",
|
|
77
|
+
class: "flex-1 rounded-lg overflow-hidden"
|
|
78
|
+
}, null, 8, ["modelValue"])
|
|
79
|
+
]));
|
|
80
|
+
}
|
|
81
|
+
}), ut = { class: "flex flex-col flex-1 min-h-0" }, it = { class: "flex justify-between mb-3 gap-2" }, ct = { class: "text-left" }, dt = { class: "font-medium text-gray-900" }, ft = { class: "text-xs text-gray-500" }, mt = { class: "flex justify-center gap-2" }, pt = ["checked", "onChange"], yt = { class: "text-sm font-medium text-gray-900" }, vt = /* @__PURE__ */ R({
|
|
82
|
+
__name: "cartocss-data-tab",
|
|
83
|
+
props: {
|
|
84
|
+
modelValue: { default: [] },
|
|
85
|
+
modelModifiers: {}
|
|
86
|
+
},
|
|
87
|
+
emits: /* @__PURE__ */ Me(["save"], ["update:modelValue"]),
|
|
88
|
+
setup(j, { emit: r }) {
|
|
89
|
+
const c = [
|
|
90
|
+
{ key: "table", label: "Таблиця", slot: "datasetCell" },
|
|
91
|
+
{
|
|
92
|
+
key: "active",
|
|
93
|
+
label: "Активний",
|
|
94
|
+
slot: "activeCell",
|
|
95
|
+
width: "140px"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
key: "zoom",
|
|
99
|
+
label: "Min Зум",
|
|
100
|
+
slot: "zoomCell",
|
|
101
|
+
width: "140px"
|
|
102
|
+
}
|
|
103
|
+
], V = ee(
|
|
104
|
+
() => import("@opengis/core").then((b) => b.VsModal)
|
|
105
|
+
), w = ee(() => import("@opengis/form")), g = je(j, "modelValue"), u = r, d = x(!1), s = x({
|
|
106
|
+
table: "",
|
|
107
|
+
query: "",
|
|
108
|
+
srid: "",
|
|
109
|
+
key: "",
|
|
110
|
+
columns: "",
|
|
111
|
+
minzoom: "",
|
|
112
|
+
maxzoom: "",
|
|
113
|
+
proj4text: "",
|
|
114
|
+
active: !0
|
|
115
|
+
}), m = {
|
|
116
|
+
table: { type: "text", label: "Таблиця", validators: ["required"] },
|
|
117
|
+
key: { type: "text", label: "Ключ", validators: ["required"] },
|
|
118
|
+
query: { type: "text", label: "Query" },
|
|
119
|
+
columns: { type: "text", label: "Колонки" },
|
|
120
|
+
srid: { type: "number", label: "SRID" },
|
|
121
|
+
proj4text: { type: "text", label: "PROJ4" },
|
|
122
|
+
active: { type: "switcher", label: "Активна" },
|
|
123
|
+
minzoom: { type: "number", label: "Min Зум", col: 6 },
|
|
124
|
+
maxzoom: { type: "number", label: "Max Зум", col: 6 }
|
|
125
|
+
};
|
|
126
|
+
function n() {
|
|
127
|
+
s.value = {
|
|
128
|
+
table: "",
|
|
129
|
+
query: "",
|
|
130
|
+
srid: "",
|
|
131
|
+
key: "",
|
|
132
|
+
columns: "",
|
|
133
|
+
minzoom: "",
|
|
134
|
+
maxzoom: "",
|
|
135
|
+
proj4text: "",
|
|
136
|
+
active: !0
|
|
137
|
+
}, d.value = !0;
|
|
138
|
+
}
|
|
139
|
+
function k() {
|
|
140
|
+
d.value = !1;
|
|
141
|
+
}
|
|
142
|
+
function L() {
|
|
143
|
+
var f, p;
|
|
144
|
+
const b = (f = s.value.table) == null ? void 0 : f.trim(), h = (p = s.value.key) == null ? void 0 : p.trim();
|
|
145
|
+
if (!b || !h) {
|
|
146
|
+
B({
|
|
147
|
+
type: "warning",
|
|
148
|
+
title: "Перевірка",
|
|
149
|
+
message: "Вкажіть таблицю та підпис"
|
|
150
|
+
});
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
g.value = [
|
|
154
|
+
...Array.isArray(g.value) ? g.value : [],
|
|
155
|
+
{ ...s.value, table: b, key: h }
|
|
156
|
+
], d.value = !1;
|
|
157
|
+
}
|
|
158
|
+
function v(b, h) {
|
|
159
|
+
var p;
|
|
160
|
+
const f = ((p = h == null ? void 0 : h.target) == null ? void 0 : p.checked) ?? !1;
|
|
161
|
+
b.active = f, g.value = Array.isArray(g.value) ? [...g.value] : [];
|
|
162
|
+
}
|
|
163
|
+
return (b, h) => (_(), S("div", ut, [
|
|
164
|
+
a("div", it, [
|
|
165
|
+
a("button", {
|
|
166
|
+
type: "button",
|
|
167
|
+
class: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium bg-gradient-to-r from-gray-500 to-gray-400 text-white h-9 px-4 py-2 hover:from-gray-600 hover:to-gray-500",
|
|
168
|
+
onClick: n
|
|
169
|
+
}, " Додати таблицю "),
|
|
170
|
+
a("button", {
|
|
171
|
+
type: "button",
|
|
172
|
+
class: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium bg-gradient-to-r from-sky-400 to-blue-400 hover:from-sky-500 hover:to-blue-500 text-white shadow-sm px-4 py-2 h-9 text-xs transition-all duration-300",
|
|
173
|
+
onClick: h[0] || (h[0] = (f) => u("save"))
|
|
174
|
+
}, " Зберегти ")
|
|
175
|
+
]),
|
|
176
|
+
$(Ke, {
|
|
177
|
+
modelValue: g.value,
|
|
178
|
+
"onUpdate:modelValue": h[1] || (h[1] = (f) => g.value = f),
|
|
179
|
+
"columns-scheme": c,
|
|
180
|
+
"form-scheme": m,
|
|
181
|
+
"add-button": !1,
|
|
182
|
+
"main-col-width": "260px"
|
|
183
|
+
}, {
|
|
184
|
+
datasetCell: O(({ row: f }) => [
|
|
185
|
+
a("div", ct, [
|
|
186
|
+
a("div", dt, N(f.table), 1),
|
|
187
|
+
a("div", ft, N(f.key), 1)
|
|
188
|
+
])
|
|
189
|
+
]),
|
|
190
|
+
activeCell: O(({ row: f }) => [
|
|
191
|
+
a("label", mt, [
|
|
192
|
+
a("input", {
|
|
193
|
+
type: "checkbox",
|
|
194
|
+
class: "h-4 w-4 text-sky-500 border-gray-300 rounded focus:ring-sky-300",
|
|
195
|
+
checked: f.active,
|
|
196
|
+
onChange: (p) => v(f, p)
|
|
197
|
+
}, null, 40, pt)
|
|
198
|
+
])
|
|
199
|
+
]),
|
|
200
|
+
zoomCell: O(({ row: f }) => [
|
|
201
|
+
a("div", yt, N(f.zoom), 1)
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
}, 8, ["modelValue"]),
|
|
205
|
+
$(J(V), {
|
|
206
|
+
teleport: "#modal",
|
|
207
|
+
visible: d.value,
|
|
208
|
+
"onUpdate:visible": h[3] || (h[3] = (f) => d.value = f),
|
|
209
|
+
title: "Нова таблиця CartoCSS"
|
|
210
|
+
}, {
|
|
211
|
+
footer: O(() => [
|
|
212
|
+
a("div", { class: "flex justify-end gap-2 p-4 border-т" }, [
|
|
213
|
+
a("button", {
|
|
214
|
+
type: "button",
|
|
215
|
+
class: "px-4 py-2 rounded bg-gray-100 text-gray-700",
|
|
216
|
+
onClick: k
|
|
217
|
+
}, " Скасувати "),
|
|
218
|
+
a("button", {
|
|
219
|
+
type: "button",
|
|
220
|
+
class: "px-4 py-2 rounded bg-blue-600 text-white",
|
|
221
|
+
onClick: L
|
|
222
|
+
}, " Додати ")
|
|
223
|
+
])
|
|
224
|
+
]),
|
|
225
|
+
default: O(() => [
|
|
226
|
+
$(J(w), {
|
|
227
|
+
values: s.value,
|
|
228
|
+
"onUpdate:values": h[2] || (h[2] = (f) => s.value = f),
|
|
229
|
+
schema: m
|
|
230
|
+
}, null, 8, ["values"])
|
|
231
|
+
]),
|
|
232
|
+
_: 1
|
|
233
|
+
}, 8, ["visible"])
|
|
234
|
+
]));
|
|
235
|
+
}
|
|
236
|
+
}), ht = { class: "flex flex-col flex-1 min-h-0 gap-4" }, gt = { class: "h-[calc(100vh-230px)] rounded-md border border-gray-200 bg-white" }, xt = /* @__PURE__ */ R({
|
|
237
|
+
__name: "cartocss-card-tab",
|
|
238
|
+
props: {
|
|
239
|
+
card: {},
|
|
240
|
+
table: {}
|
|
241
|
+
},
|
|
242
|
+
emits: ["save"],
|
|
243
|
+
setup(j, { emit: r }) {
|
|
244
|
+
const c = j, V = r, w = x(c.table), g = x(c.card), u = ee(() => import("@opengis/form").then((s) => s.VsInputText));
|
|
245
|
+
function d() {
|
|
246
|
+
V("save", {
|
|
247
|
+
card_html: g.value,
|
|
248
|
+
card_table: w.value
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
return (s, m) => (_(), S("div", ht, [
|
|
252
|
+
a("div", { class: "flex items-center justify-end gap-3" }, [
|
|
253
|
+
a("button", {
|
|
254
|
+
type: "button",
|
|
255
|
+
class: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium bg-gradient-to-r from-sky-400 to-blue-400 hover:from-sky-500 hover:to-blue-500 text-white shadow-sm px-4 py-2 h-9 text-xs transition-all duration-300",
|
|
256
|
+
onClick: d
|
|
257
|
+
}, [...m[2] || (m[2] = [
|
|
258
|
+
a("svg", {
|
|
259
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
260
|
+
width: "24",
|
|
261
|
+
height: "24",
|
|
262
|
+
viewBox: "0 0 24 24",
|
|
263
|
+
fill: "none",
|
|
264
|
+
stroke: "currentColor",
|
|
265
|
+
"stroke-width": "2",
|
|
266
|
+
"stroke-linecap": "round",
|
|
267
|
+
"stroke-linejoin": "round",
|
|
268
|
+
class: "h-3.5 w-3.5"
|
|
269
|
+
}, [
|
|
270
|
+
a("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a 2 2 0 0 1-2-2V5a 2 2 0 0 1 2-2z" }),
|
|
271
|
+
a("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a 1 1 0 0 0-1 1v7" }),
|
|
272
|
+
a("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
|
|
273
|
+
], -1),
|
|
274
|
+
ve(" Зберегти картку ", -1)
|
|
275
|
+
])])
|
|
276
|
+
]),
|
|
277
|
+
a("div", null, [
|
|
278
|
+
$(J(u), {
|
|
279
|
+
modelValue: w.value,
|
|
280
|
+
"onUpdate:modelValue": m[0] || (m[0] = (n) => w.value = n)
|
|
281
|
+
}, null, 8, ["modelValue"])
|
|
282
|
+
]),
|
|
283
|
+
a("div", gt, [
|
|
284
|
+
$(xe, {
|
|
285
|
+
modelValue: g.value,
|
|
286
|
+
"onUpdate:modelValue": m[1] || (m[1] = (n) => g.value = n),
|
|
287
|
+
language: "html",
|
|
288
|
+
theme: "vs-light",
|
|
289
|
+
class: "h-full w-full rounded-md"
|
|
290
|
+
}, null, 8, ["modelValue"])
|
|
291
|
+
])
|
|
292
|
+
]));
|
|
293
|
+
}
|
|
294
|
+
}), bt = /* @__PURE__ */ R({
|
|
295
|
+
__name: "CartocssLayerLoader",
|
|
296
|
+
props: {
|
|
297
|
+
layerId: { type: String, required: !0 },
|
|
298
|
+
tileUrl: { type: String, default: "" },
|
|
299
|
+
title: { type: String, default: "" },
|
|
300
|
+
active: { type: Boolean, default: !1 },
|
|
301
|
+
owner: { type: String, default: "" },
|
|
302
|
+
opacity: { type: Number, default: 1 }
|
|
303
|
+
},
|
|
304
|
+
setup(j) {
|
|
305
|
+
const r = j, c = ge(), {
|
|
306
|
+
activateTemporaryLayer: V,
|
|
307
|
+
deactivateTemporaryLayer: w,
|
|
308
|
+
setTemporaryLayerOpacity: g
|
|
309
|
+
} = Re(c.map), u = C(() => {
|
|
310
|
+
var k;
|
|
311
|
+
const n = `${(k = r == null ? void 0 : r.tileUrl) == null ? void 0 : k.trim()}`;
|
|
312
|
+
return n ? typeof window > "u" || typeof location > "u" || /^https?:\/\//i.test(n) ? n : n.startsWith("//") ? `${window.location.protocol}${n}` : n.startsWith("/") ? `${location.origin}${n}` : `${location.origin}/${n}` : "";
|
|
313
|
+
});
|
|
314
|
+
let d = "", s = "";
|
|
315
|
+
function m() {
|
|
316
|
+
const n = r.active && !!u.value;
|
|
317
|
+
d && (!n || d !== r.layerId) && (w(d, s || void 0), d = "", s = ""), n && (V(
|
|
318
|
+
{
|
|
319
|
+
id: r.layerId,
|
|
320
|
+
title: r.title || r.layerId,
|
|
321
|
+
url: u.value,
|
|
322
|
+
opacity: r.opacity
|
|
323
|
+
},
|
|
324
|
+
{},
|
|
325
|
+
r.owner
|
|
326
|
+
), d = r.layerId, s = r.owner || "");
|
|
327
|
+
}
|
|
328
|
+
return A(
|
|
329
|
+
() => [r.layerId, u.value, r.active, r.owner],
|
|
330
|
+
m,
|
|
331
|
+
{ immediate: !0 }
|
|
332
|
+
), A(
|
|
333
|
+
() => r.opacity,
|
|
334
|
+
(n) => {
|
|
335
|
+
!d || !r.active || g(d, n, s || void 0);
|
|
336
|
+
},
|
|
337
|
+
{ immediate: !0 }
|
|
338
|
+
), Le(() => {
|
|
339
|
+
d && (w(d, s || void 0), d = "", s = "");
|
|
340
|
+
}), (n, k) => q("", !0);
|
|
341
|
+
}
|
|
342
|
+
}), _t = /* @__PURE__ */ R({
|
|
343
|
+
__name: "CartocssMapClickListener",
|
|
344
|
+
props: {
|
|
345
|
+
cartocssId: {},
|
|
346
|
+
infoEnabled: { type: [Boolean, null] }
|
|
347
|
+
},
|
|
348
|
+
setup(j) {
|
|
349
|
+
const r = j, c = C(() => r.cartocssId ?? null), V = C(() => !!r.infoEnabled), { map: w, ready: g } = ge(), u = (v) => {
|
|
350
|
+
!v || typeof window > "u" || window.dispatchEvent(
|
|
351
|
+
new CustomEvent(Be, { detail: v })
|
|
352
|
+
);
|
|
353
|
+
}, d = async (v) => {
|
|
354
|
+
const b = await fetch(`/api/map-format?${v.toString()}`);
|
|
355
|
+
if (!b.ok)
|
|
356
|
+
throw new Error(`API returned ${b.status}`);
|
|
357
|
+
return b.json();
|
|
358
|
+
};
|
|
359
|
+
let s = null, m = null;
|
|
360
|
+
const n = (v) => {
|
|
361
|
+
if (!v) return null;
|
|
362
|
+
if (typeof v == "string")
|
|
363
|
+
try {
|
|
364
|
+
return JSON.parse(v);
|
|
365
|
+
} catch {
|
|
366
|
+
return null;
|
|
367
|
+
}
|
|
368
|
+
return v;
|
|
369
|
+
}, k = async (v, b) => {
|
|
370
|
+
var f;
|
|
371
|
+
const h = new URLSearchParams({
|
|
372
|
+
layer: c.value ?? "",
|
|
373
|
+
id: String(v)
|
|
374
|
+
});
|
|
375
|
+
try {
|
|
376
|
+
const p = await d(h), E = typeof p.html == "string" ? p.html : null, U = n(
|
|
377
|
+
((f = p == null ? void 0 : p.data) == null ? void 0 : f.geom) ?? (p == null ? void 0 : p.geom) ?? null
|
|
378
|
+
);
|
|
379
|
+
(E || U) && u({
|
|
380
|
+
html: E,
|
|
381
|
+
geometry: U ?? b
|
|
382
|
+
});
|
|
383
|
+
} catch (p) {
|
|
384
|
+
console.warn("CartoCSS map-format (id) error", p);
|
|
385
|
+
}
|
|
386
|
+
}, L = async (v) => {
|
|
387
|
+
var p, E, U, P;
|
|
388
|
+
if (!c.value) return;
|
|
389
|
+
if (!V.value) {
|
|
390
|
+
B({
|
|
391
|
+
type: "error",
|
|
392
|
+
title: "CartoCSS",
|
|
393
|
+
message: "Картка не налаштована"
|
|
394
|
+
});
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
const b = (p = v == null ? void 0 : v.lngLat) == null ? void 0 : p.lng, h = (E = v == null ? void 0 : v.lngLat) == null ? void 0 : E.lat;
|
|
398
|
+
if (typeof b != "number" || typeof h != "number") return;
|
|
399
|
+
const f = new URLSearchParams({
|
|
400
|
+
layer: c.value,
|
|
401
|
+
lat: h.toFixed(6),
|
|
402
|
+
lng: b.toFixed(6)
|
|
403
|
+
});
|
|
404
|
+
try {
|
|
405
|
+
const y = await d(f), T = n(
|
|
406
|
+
((U = y == null ? void 0 : y.data) == null ? void 0 : U.geom) ?? (y == null ? void 0 : y.geom) ?? null
|
|
407
|
+
), D = ((P = y == null ? void 0 : y.data) == null ? void 0 : P.id) ?? (y == null ? void 0 : y.id);
|
|
408
|
+
if (D != null) {
|
|
409
|
+
await k(D, T);
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
Fe({ html: y == null ? void 0 : y.html }) && u({
|
|
413
|
+
html: y == null ? void 0 : y.html,
|
|
414
|
+
geometry: T
|
|
415
|
+
});
|
|
416
|
+
} catch (y) {
|
|
417
|
+
console.warn("CartoCSS map-format error", y);
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
return g().then(() => {
|
|
421
|
+
m = w.value, m && (m.on("click", L), s = () => m == null ? void 0 : m.off("click", L));
|
|
422
|
+
}), he(() => {
|
|
423
|
+
s == null || s(), s = null, m = null;
|
|
424
|
+
}), () => {
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
}), wt = { class: "flex h-full bg-gradient-to-br from-slate-50 to-white" }, kt = { class: "flex-1 relative overflow-hidden" }, Ct = { class: "absolute top-0 left-0 w-full z-20" }, St = { class: "px-4 sm:px-6 py-4 border-b border-gray-200 bg-white shadow-sm" }, $t = { class: "flex items-start justify-between gap-4" }, Vt = { class: "flex-1 min-w-0" }, zt = { class: "flex items-center text-sm text-gray-500 mb-3" }, Mt = { class: "text-gray-900 font-medium truncate max-w-xs" }, jt = { class: "flex items-center justify-between gap-4" }, Lt = { class: "flex-1 min-w-0" }, qt = { class: "flex items-center gap-3 mb-1" }, At = { class: "text-base font-semibold text-gray-900 truncate" }, Nt = {
|
|
428
|
+
key: 0,
|
|
429
|
+
class: "px-2 py-0.5 bg-green-50 border border-green-200 rounded flex-shrink-0"
|
|
430
|
+
}, Et = { class: "text-xs font-medium text-green-700" }, It = ["title"], Ut = { class: "w-full h-full bg-gradient-to-br from-sky-50 via-white to-blue-50 flex items-center justify-center relative pt-[115px]" }, Tt = { class: "relative w-full h-full" }, Dt = { class: "absolute top-[5.5rem] left-4 z-30 flex flex-col items-start gap-2" }, Ot = { class: "rounded-2xl bg-white/90 px-3 py-2 text-xs font-medium text-slate-600 shadow-sm backdrop-blur" }, Rt = { class: "flex items-center gap-2" }, Ft = { class: "rounded-2xl bg-white/90 px-3 py-2 text-xs font-medium text-slate-600 shadow-sm backdrop-blur" }, Bt = { class: "inline-flex items-center gap-2 text-[11px] text-slate-600" }, Pt = ["checked"], Qt = { class: "absolute top-4 left-4 z-20" }, Ht = { class: "absolute top-[6.5rem] right-2 space-y-1 z-20" }, Yt = { class: "flex-1 flex flex-col h-full" }, Jt = {
|
|
431
|
+
key: 0,
|
|
432
|
+
class: "px-3 pt-3 pb-2 border-b border-gray-100"
|
|
433
|
+
}, Wt = ["aria-selected", "onClick"], Xt = { class: "leading-none" }, Gt = { class: "flex flex-col flex-1 overflow-y-hidden p-3" }, Zt = {
|
|
434
|
+
key: 0,
|
|
435
|
+
class: "flex-1 flex items-center justify-center text-sm text-gray-500"
|
|
436
|
+
}, Kt = "cartocss-demo-001", eo = "OpenGIS", ye = 2, Y = 5, co = /* @__PURE__ */ R({
|
|
437
|
+
__name: "cartocss",
|
|
438
|
+
setup(j) {
|
|
439
|
+
const r = Te(), c = De(), V = x(null), w = [
|
|
440
|
+
{ key: "css", label: "CSS", icon: Ye },
|
|
441
|
+
{ key: "data", label: "Дані", icon: nt },
|
|
442
|
+
{ key: "metadata", label: "Метадані", icon: Ze },
|
|
443
|
+
{ key: "card", label: "Картка", icon: Je }
|
|
444
|
+
], g = w.map((e) => e.key), u = x(
|
|
445
|
+
g.includes(c.query.tab) ? c.query.tab : "css"
|
|
446
|
+
), d = x(!0), s = x(null), m = C(() => {
|
|
447
|
+
var e;
|
|
448
|
+
return (e = s.value) != null && e.source_path ? w.filter((o) => o.key === "card" || o.key === "metadata") : w;
|
|
449
|
+
}), n = C(
|
|
450
|
+
() => c.params.id || Kt
|
|
451
|
+
), k = x({
|
|
452
|
+
id: n.value,
|
|
453
|
+
name: "",
|
|
454
|
+
description: ""
|
|
455
|
+
});
|
|
456
|
+
let L = null;
|
|
457
|
+
const v = x(!1);
|
|
458
|
+
function b(e) {
|
|
459
|
+
if (Array.isArray(e)) return b(e[0]);
|
|
460
|
+
if (typeof e != "string" && typeof e != "number") return null;
|
|
461
|
+
const o = typeof e == "number" ? e : Number(e.trim());
|
|
462
|
+
return Number.isFinite(o) ? o : null;
|
|
463
|
+
}
|
|
464
|
+
function h(e, o) {
|
|
465
|
+
return e.toFixed(o);
|
|
466
|
+
}
|
|
467
|
+
function f(e, o, t) {
|
|
468
|
+
const l = 0.5 * 10 ** -t;
|
|
469
|
+
return Math.abs(e - o) > l;
|
|
470
|
+
}
|
|
471
|
+
function p() {
|
|
472
|
+
var e;
|
|
473
|
+
return (e = V.value) == null ? void 0 : e.ctx;
|
|
474
|
+
}
|
|
475
|
+
function E() {
|
|
476
|
+
var F, ie, ce, de;
|
|
477
|
+
const e = (ie = (F = p()) == null ? void 0 : F.map) == null ? void 0 : ie.value;
|
|
478
|
+
if (!e) return;
|
|
479
|
+
const o = b(c.query.z), t = b(c.query.x), l = b(c.query.y);
|
|
480
|
+
if (o == null || t == null || l == null) return;
|
|
481
|
+
const i = (ce = e.getCenter) == null ? void 0 : ce.call(e), z = (de = e.getZoom) == null ? void 0 : de.call(e);
|
|
482
|
+
(!i || f(i.lng, t, Y) || f(i.lat, l, Y) || f(z ?? 0, o, ye)) && (v.value = !0, e.jumpTo({ center: [t, l], zoom: o }), v.value = !1);
|
|
483
|
+
}
|
|
484
|
+
function U() {
|
|
485
|
+
var i, z, M, F;
|
|
486
|
+
if (v.value) return;
|
|
487
|
+
const e = (z = (i = p()) == null ? void 0 : i.map) == null ? void 0 : z.value;
|
|
488
|
+
if (!e) return;
|
|
489
|
+
const o = (M = e.getCenter) == null ? void 0 : M.call(e), t = (F = e.getZoom) == null ? void 0 : F.call(e);
|
|
490
|
+
if (!o || t == null) return;
|
|
491
|
+
const l = {
|
|
492
|
+
...c.query,
|
|
493
|
+
z: h(t, ye),
|
|
494
|
+
x: h(o.lng, Y),
|
|
495
|
+
y: h(o.lat, Y)
|
|
496
|
+
};
|
|
497
|
+
c.query.z === l.z && c.query.x === l.x && c.query.y === l.y || r.replace({ query: l });
|
|
498
|
+
}
|
|
499
|
+
function P(e) {
|
|
500
|
+
typeof document > "u" || (document.title = e ? `${e} — CartoCSS` : eo);
|
|
501
|
+
}
|
|
502
|
+
const y = x("");
|
|
503
|
+
x("");
|
|
504
|
+
const T = x([]), D = x(!1), te = x(!1), W = x(""), X = x(0), Q = x(!1), H = x(1), G = x(!0), be = C(() => `cartocss-layer-${n.value}`), _e = C(() => `${Math.round(H.value * 100)}%`), we = C(() => `cartocss-extent-${n.value}`), oe = C(() => {
|
|
505
|
+
var i;
|
|
506
|
+
const e = (i = W.value) == null ? void 0 : i.trim();
|
|
507
|
+
if (!e) return "";
|
|
508
|
+
const o = e.includes("?") ? "&" : "?", t = `${e}${o}nottl=1`, l = X.value;
|
|
509
|
+
return l ? `${e}${o}ts=${l}&nocache=1` : t;
|
|
510
|
+
});
|
|
511
|
+
C(() => {
|
|
512
|
+
const e = s.value;
|
|
513
|
+
return e ? e.cartocss_key || e.source_path || n.value || "" : n.value || "";
|
|
514
|
+
});
|
|
515
|
+
const ae = x(""), ne = x(""), se = C(() => {
|
|
516
|
+
var z;
|
|
517
|
+
const e = (z = s.value) == null ? void 0 : z.bounds;
|
|
518
|
+
if (!Array.isArray(e) || e.length < 4) return null;
|
|
519
|
+
const [o, t, l, i] = e;
|
|
520
|
+
return [o, t, l, i].some(
|
|
521
|
+
(M) => typeof M != "number" || Number.isNaN(M)
|
|
522
|
+
) ? null : [(o + l) / 2, (t + i) / 2];
|
|
523
|
+
}), ke = C(() => {
|
|
524
|
+
var z;
|
|
525
|
+
const e = (z = s.value) == null ? void 0 : z.bounds;
|
|
526
|
+
if (!Array.isArray(e) || e.length < 4) return null;
|
|
527
|
+
const [o, t, l, i] = e;
|
|
528
|
+
return [o, t, l, i].some(
|
|
529
|
+
(M) => typeof M != "number" || Number.isNaN(M)
|
|
530
|
+
) ? null : [o, t, l, i];
|
|
531
|
+
}), Z = C(() => {
|
|
532
|
+
const e = s.value;
|
|
533
|
+
return e ? [
|
|
534
|
+
e.description,
|
|
535
|
+
e.group_id ? `Група: ${e.group_id}` : null,
|
|
536
|
+
e.source_path ? `Шлях: ${e.source_path}` : null,
|
|
537
|
+
e.is_public === !0 ? "Публічний" : "Не публічний",
|
|
538
|
+
e.enabled === !0 ? "Активний" : "Неактивний"
|
|
539
|
+
].filter(Boolean).join(", ") : "";
|
|
540
|
+
}), re = C(() => {
|
|
541
|
+
var o;
|
|
542
|
+
const e = (o = s.value) == null ? void 0 : o.group_id;
|
|
543
|
+
return e ? String(e).toUpperCase() : "";
|
|
544
|
+
});
|
|
545
|
+
A(
|
|
546
|
+
n,
|
|
547
|
+
(e) => {
|
|
548
|
+
e && K(e);
|
|
549
|
+
},
|
|
550
|
+
{ immediate: !0 }
|
|
551
|
+
), A(
|
|
552
|
+
() => {
|
|
553
|
+
var e;
|
|
554
|
+
return (e = k.value) == null ? void 0 : e.name;
|
|
555
|
+
},
|
|
556
|
+
(e) => P(e),
|
|
557
|
+
{ immediate: !0 }
|
|
558
|
+
);
|
|
559
|
+
async function Ce() {
|
|
560
|
+
var l;
|
|
561
|
+
const e = p();
|
|
562
|
+
if (!(e != null && e.ready)) return;
|
|
563
|
+
await e.ready(), E();
|
|
564
|
+
const o = (l = e.map) == null ? void 0 : l.value;
|
|
565
|
+
if (!o) return;
|
|
566
|
+
const t = () => U();
|
|
567
|
+
o.on("moveend", t), o.on("zoomend", t), L = () => {
|
|
568
|
+
o.off("moveend", t), o.off("zoomend", t);
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
A(
|
|
572
|
+
() => [c.query.z, c.query.x, c.query.y],
|
|
573
|
+
() => {
|
|
574
|
+
E();
|
|
575
|
+
}
|
|
576
|
+
), qe(() => {
|
|
577
|
+
Ce();
|
|
578
|
+
}), he(() => {
|
|
579
|
+
L == null || L(), L = null;
|
|
580
|
+
}), A(
|
|
581
|
+
() => c.query.tab,
|
|
582
|
+
(e) => {
|
|
583
|
+
e && m.value.some((o) => o.key === e) && u.value !== e && (u.value = e);
|
|
584
|
+
}
|
|
585
|
+
), A(
|
|
586
|
+
m,
|
|
587
|
+
(e) => {
|
|
588
|
+
e.length && !e.some((o) => o.key === u.value) && (u.value = e[0].key);
|
|
589
|
+
},
|
|
590
|
+
{ immediate: !0 }
|
|
591
|
+
), A(u, (e) => {
|
|
592
|
+
c.query.tab !== e && m.value.some((o) => o.key === e) && r.replace({ query: { ...c.query, tab: e } });
|
|
593
|
+
}), A(
|
|
594
|
+
() => s.value,
|
|
595
|
+
(e) => {
|
|
596
|
+
const o = e == null ? void 0 : e.card_html;
|
|
597
|
+
ae.value = o, ne.value = e == null ? void 0 : e.card_table;
|
|
598
|
+
},
|
|
599
|
+
{ immediate: !0 }
|
|
600
|
+
);
|
|
601
|
+
function le() {
|
|
602
|
+
n.value && K(n.value, { bustCache: !0 });
|
|
603
|
+
}
|
|
604
|
+
async function Se(e, o) {
|
|
605
|
+
if (n.value) {
|
|
606
|
+
te.value = !0;
|
|
607
|
+
try {
|
|
608
|
+
const t = await fetch(`/api/gis-css/${n.value}`, {
|
|
609
|
+
method: "POST",
|
|
610
|
+
headers: { "Content-Type": "application/json" },
|
|
611
|
+
body: JSON.stringify(e)
|
|
612
|
+
});
|
|
613
|
+
if (!t.ok) throw new Error(`Failed to save cartocss: ${t.status}`);
|
|
614
|
+
B({ type: "success", title: "Збережено", message: o }), await K(n.value, { bustCache: !0 });
|
|
615
|
+
} catch (t) {
|
|
616
|
+
console.error("Failed to save CartoCSS", t), B({ type: "error", title: "Помилка", message: "Не вдалося зберегти CartoCSS" });
|
|
617
|
+
} finally {
|
|
618
|
+
te.value = !1;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
function $e(e) {
|
|
623
|
+
if (!e) return null;
|
|
624
|
+
if (typeof e == "string")
|
|
625
|
+
try {
|
|
626
|
+
return JSON.parse(e);
|
|
627
|
+
} catch (o) {
|
|
628
|
+
return console.warn("Failed to parse CartoCSS config", o), null;
|
|
629
|
+
}
|
|
630
|
+
return typeof e == "object" ? e : null;
|
|
631
|
+
}
|
|
632
|
+
function Ve(e) {
|
|
633
|
+
const o = Array.isArray(e) ? e : e == null ? void 0 : e.datasets;
|
|
634
|
+
return Array.isArray(o) ? o.map((t, l) => ({
|
|
635
|
+
table: (t == null ? void 0 : t.table) || (t == null ? void 0 : t.id) || `dataset_${l + 1}`,
|
|
636
|
+
query: (t == null ? void 0 : t.query) || "",
|
|
637
|
+
srid: (t == null ? void 0 : t.srid) || "",
|
|
638
|
+
key: (t == null ? void 0 : t.key) || (t == null ? void 0 : t.label) || "Без підпису",
|
|
639
|
+
active: typeof (t == null ? void 0 : t.active) == "boolean" ? t.active : !0,
|
|
640
|
+
minzoom: typeof (t == null ? void 0 : t.zoom) > "u" ? "" : String(t.zoom),
|
|
641
|
+
maxzoom: typeof (t == null ? void 0 : t.maxzoom) > "u" ? "" : String(t.maxzoom),
|
|
642
|
+
columns: (t == null ? void 0 : t.columns) || "",
|
|
643
|
+
proj4text: (t == null ? void 0 : t.proj4text) || ""
|
|
644
|
+
})) : [];
|
|
645
|
+
}
|
|
646
|
+
async function K(e, o) {
|
|
647
|
+
D.value = !0;
|
|
648
|
+
try {
|
|
649
|
+
const t = await fetch(`/api/gis-css/${e}`);
|
|
650
|
+
if (!t.ok) throw new Error(`Failed to load cartocss: ${t.status}`);
|
|
651
|
+
const l = await t.json(), i = (l == null ? void 0 : l.message) || l || {};
|
|
652
|
+
s.value = i, k.value = {
|
|
653
|
+
id: i.cartocss_key || e,
|
|
654
|
+
name: i.name || k.value.name,
|
|
655
|
+
description: i.description || k.value.description
|
|
656
|
+
}, y.value = typeof i.style == "string" ? i.style : "";
|
|
657
|
+
const z = $e(i.config ?? []);
|
|
658
|
+
T.value = Ve(z);
|
|
659
|
+
const M = typeof i.url == "string" ? i.url : "";
|
|
660
|
+
W.value = M, Q.value = !!(M && i.enabled !== !1), X.value = o != null && o.bustCache ? Date.now() : 0;
|
|
661
|
+
} catch (t) {
|
|
662
|
+
console.error("Failed to fetch CartoCSS", t), Q.value = !1, W.value = "", X.value = 0, s.value = null;
|
|
663
|
+
} finally {
|
|
664
|
+
D.value = !1;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
async function ue() {
|
|
668
|
+
await Se(
|
|
669
|
+
{
|
|
670
|
+
style: y.value || "",
|
|
671
|
+
config: T.value
|
|
672
|
+
},
|
|
673
|
+
"CartoCSS оновлено"
|
|
674
|
+
);
|
|
675
|
+
}
|
|
676
|
+
async function ze(e) {
|
|
677
|
+
const o = await fetch(`/api/gis-css/${n.value}`, {
|
|
678
|
+
method: "POST",
|
|
679
|
+
headers: { "Content-Type": "application/json" },
|
|
680
|
+
body: JSON.stringify(e)
|
|
681
|
+
});
|
|
682
|
+
if (!o.ok) throw new Error(`Failed to save cartocss: ${o.status}`);
|
|
683
|
+
B({ type: "success", title: "Збережено", message: "Картка CartoCSS оновлена" });
|
|
684
|
+
}
|
|
685
|
+
return (e, o) => (_(), S("div", wt, [
|
|
686
|
+
a("div", kt, [
|
|
687
|
+
a("div", Ct, [
|
|
688
|
+
a("div", St, [
|
|
689
|
+
a("div", $t, [
|
|
690
|
+
a("div", Vt, [
|
|
691
|
+
a("div", zt, [
|
|
692
|
+
a("button", {
|
|
693
|
+
type: "button",
|
|
694
|
+
class: "hover:text-gray-700 cursor-pointer transition-colors",
|
|
695
|
+
onClick: o[0] || (o[0] = (t) => J(r).push("/gis.cartocss"))
|
|
696
|
+
}, " CartoCSS "),
|
|
697
|
+
o[6] || (o[6] = a("svg", {
|
|
698
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
699
|
+
width: "24",
|
|
700
|
+
height: "24",
|
|
701
|
+
viewBox: "0 0 24 24",
|
|
702
|
+
fill: "none",
|
|
703
|
+
stroke: "currentColor",
|
|
704
|
+
"stroke-width": "2",
|
|
705
|
+
"stroke-linecap": "round",
|
|
706
|
+
"stroke-linejoin": "round",
|
|
707
|
+
class: "lucide lucide-chevron-right w-4 h-4 mx-1"
|
|
708
|
+
}, [
|
|
709
|
+
a("path", { d: "m9 18 6-6-6-6" })
|
|
710
|
+
], -1)),
|
|
711
|
+
a("span", Mt, N(k.value.name || "CartoCSS"), 1)
|
|
712
|
+
]),
|
|
713
|
+
a("div", jt, [
|
|
714
|
+
a("div", Lt, [
|
|
715
|
+
a("div", qt, [
|
|
716
|
+
a("h1", At, N(k.value.name || "CartoCSS"), 1),
|
|
717
|
+
re.value ? (_(), S("div", Nt, [
|
|
718
|
+
a("span", Et, N(re.value), 1)
|
|
719
|
+
])) : q("", !0)
|
|
720
|
+
]),
|
|
721
|
+
Z.value ? (_(), S("p", {
|
|
722
|
+
key: 0,
|
|
723
|
+
class: "text-xs text-gray-500 truncate",
|
|
724
|
+
title: Z.value
|
|
725
|
+
}, N(Z.value), 9, It)) : q("", !0)
|
|
726
|
+
])
|
|
727
|
+
])
|
|
728
|
+
]),
|
|
729
|
+
$(We, {
|
|
730
|
+
class: "flex-shrink-0",
|
|
731
|
+
"entity-id": n.value,
|
|
732
|
+
"entity-info": k.value,
|
|
733
|
+
"form-endpoint": (t) => `/api/form/gis.cartocss.table/${t}`,
|
|
734
|
+
"save-endpoint": (t) => `/api/gis-css/${t}`,
|
|
735
|
+
"entity-label": "CartoCSS",
|
|
736
|
+
"save-method": "post",
|
|
737
|
+
onSaved: le
|
|
738
|
+
}, null, 8, ["entity-id", "entity-info", "form-endpoint", "save-endpoint"])
|
|
739
|
+
])
|
|
740
|
+
])
|
|
741
|
+
]),
|
|
742
|
+
a("div", Ut, [
|
|
743
|
+
a("div", Tt, [
|
|
744
|
+
$(Pe, {
|
|
745
|
+
ref_key: "mapViewRef",
|
|
746
|
+
ref: V
|
|
747
|
+
}, {
|
|
748
|
+
default: O(() => {
|
|
749
|
+
var t, l;
|
|
750
|
+
return [
|
|
751
|
+
a("div", Dt, [
|
|
752
|
+
a("div", Ot, [
|
|
753
|
+
a("div", Rt, [
|
|
754
|
+
o[7] || (o[7] = a("span", null, "Прозорість:", -1)),
|
|
755
|
+
Ae(a("input", {
|
|
756
|
+
"onUpdate:modelValue": o[1] || (o[1] = (i) => H.value = i),
|
|
757
|
+
type: "range",
|
|
758
|
+
min: "0",
|
|
759
|
+
max: "1",
|
|
760
|
+
step: "0.01",
|
|
761
|
+
class: "h-1 w-28 cursor-pointer appearance-none rounded-full bg-slate-300 focus:outline-none",
|
|
762
|
+
style: { "accent-color": "#3b82f6" }
|
|
763
|
+
}, null, 512), [
|
|
764
|
+
[
|
|
765
|
+
Ne,
|
|
766
|
+
H.value,
|
|
767
|
+
void 0,
|
|
768
|
+
{ number: !0 }
|
|
769
|
+
]
|
|
770
|
+
]),
|
|
771
|
+
a("span", null, N(_e.value), 1)
|
|
772
|
+
])
|
|
773
|
+
]),
|
|
774
|
+
a("div", Ft, [
|
|
775
|
+
a("label", Bt, [
|
|
776
|
+
a("input", {
|
|
777
|
+
type: "checkbox",
|
|
778
|
+
class: "h-3.5 w-3.5 rounded border-slate-300 text-blue-600 focus:ring-blue-200",
|
|
779
|
+
checked: G.value,
|
|
780
|
+
onChange: o[2] || (o[2] = (i) => G.value = i.target.checked)
|
|
781
|
+
}, null, 40, Pt),
|
|
782
|
+
o[8] || (o[8] = a("span", null, "Межі css", -1))
|
|
783
|
+
])
|
|
784
|
+
])
|
|
785
|
+
]),
|
|
786
|
+
a("div", Qt, [
|
|
787
|
+
$(Qe)
|
|
788
|
+
]),
|
|
789
|
+
a("div", Ht, [
|
|
790
|
+
$(pe),
|
|
791
|
+
se.value ? (_(), I(pe, {
|
|
792
|
+
key: 0,
|
|
793
|
+
targetCenter: se.value,
|
|
794
|
+
targetLabel: "Центр даних",
|
|
795
|
+
targetAriaLabel: "Перейти до центру даних"
|
|
796
|
+
}, null, 8, ["targetCenter"])) : q("", !0)
|
|
797
|
+
]),
|
|
798
|
+
oe.value ? (_(), I(bt, {
|
|
799
|
+
key: 0,
|
|
800
|
+
"layer-id": be.value,
|
|
801
|
+
"tile-url": oe.value,
|
|
802
|
+
active: Q.value,
|
|
803
|
+
opacity: H.value,
|
|
804
|
+
title: k.value.name,
|
|
805
|
+
owner: n.value
|
|
806
|
+
}, null, 8, ["layer-id", "tile-url", "active", "opacity", "title", "owner"])) : q("", !0),
|
|
807
|
+
$(et, {
|
|
808
|
+
extent: G.value ? ke.value : null,
|
|
809
|
+
"layer-id": we.value
|
|
810
|
+
}, null, 8, ["extent", "layer-id"]),
|
|
811
|
+
$(_t, {
|
|
812
|
+
"cartocss-id": n.value,
|
|
813
|
+
bounds: ((t = s.value) == null ? void 0 : t.bounds) ?? null,
|
|
814
|
+
active: Q.value,
|
|
815
|
+
"info-enabled": (l = s.value) == null ? void 0 : l.info
|
|
816
|
+
}, null, 8, ["cartocss-id", "bounds", "active", "info-enabled"]),
|
|
817
|
+
$(He, { "map-id": n.value }, null, 8, ["map-id"])
|
|
818
|
+
];
|
|
819
|
+
}),
|
|
820
|
+
_: 1
|
|
821
|
+
}, 512)
|
|
822
|
+
])
|
|
823
|
+
]),
|
|
824
|
+
s.value ? (_(), I(Xe, {
|
|
825
|
+
key: 0,
|
|
826
|
+
open: d.value,
|
|
827
|
+
onToggle: o[3] || (o[3] = (t) => d.value = !d.value)
|
|
828
|
+
}, null, 8, ["open"])) : q("", !0)
|
|
829
|
+
]),
|
|
830
|
+
s.value ? (_(), S("div", {
|
|
831
|
+
key: 0,
|
|
832
|
+
class: fe(["bg-white border-l border-gray-100 flex flex-col overflow-hidden shadow-lg flex-shrink-0 transition-[width] duration-100 ease-in-out", d.value ? "w-[650px]" : "w-0"])
|
|
833
|
+
}, [
|
|
834
|
+
a("div", Yt, [
|
|
835
|
+
m.value.length > 1 ? (_(), S("div", Jt, [
|
|
836
|
+
a("div", {
|
|
837
|
+
class: "items-center justify-center text-muted-foreground grid w-full h-12 p-1 bg-gray-50 rounded-xl shadow-sm",
|
|
838
|
+
style: Ee({ gridTemplateColumns: `repeat(${m.value.length}, minmax(0, 1fr))` })
|
|
839
|
+
}, [
|
|
840
|
+
(_(!0), S(me, null, Ie(m.value, (t) => (_(), S("button", {
|
|
841
|
+
key: t.key,
|
|
842
|
+
type: "button",
|
|
843
|
+
role: "tab",
|
|
844
|
+
"aria-selected": u.value === t.key,
|
|
845
|
+
class: fe([
|
|
846
|
+
"whitespace-nowrap flex flex-col items-center justify-center gap-0.5 py-1 px-1 text-[9px] font-medium transition-all duration-300 hover:bg-white/70 rounded-lg group",
|
|
847
|
+
u.value === t.key ? "bg-white shadow-sm text-gray-700" : ""
|
|
848
|
+
]),
|
|
849
|
+
onClick: (l) => u.value = t.key
|
|
850
|
+
}, [
|
|
851
|
+
(_(), I(Ue(t.icon), { class: "h-3.5 w-3.5 mb-0.5" })),
|
|
852
|
+
a("span", Xt, N(t.label), 1)
|
|
853
|
+
], 10, Wt))), 128))
|
|
854
|
+
], 4)
|
|
855
|
+
])) : q("", !0),
|
|
856
|
+
a("div", Gt, [
|
|
857
|
+
D.value ? (_(), S("div", Zt, " Завантаження стилю… ")) : (_(), S(me, { key: 1 }, [
|
|
858
|
+
u.value === "css" ? (_(), I(lt, {
|
|
859
|
+
key: 0,
|
|
860
|
+
modelValue: y.value,
|
|
861
|
+
"onUpdate:modelValue": o[4] || (o[4] = (t) => y.value = t),
|
|
862
|
+
class: "flex-1 min-h-0",
|
|
863
|
+
onSave: ue
|
|
864
|
+
}, null, 8, ["modelValue"])) : u.value === "data" ? (_(), I(vt, {
|
|
865
|
+
key: 1,
|
|
866
|
+
modelValue: T.value,
|
|
867
|
+
"onUpdate:modelValue": o[5] || (o[5] = (t) => T.value = t),
|
|
868
|
+
class: "flex-1 min-h-0 flex flex-col",
|
|
869
|
+
onSave: ue
|
|
870
|
+
}, null, 8, ["modelValue"])) : u.value === "card" ? (_(), I(xt, {
|
|
871
|
+
key: 2,
|
|
872
|
+
card: ae.value,
|
|
873
|
+
table: ne.value,
|
|
874
|
+
class: "flex-1 min-h-0",
|
|
875
|
+
onSave: ze
|
|
876
|
+
}, null, 8, ["card", "table"])) : u.value === "metadata" ? (_(), I(Ge, {
|
|
877
|
+
key: 3,
|
|
878
|
+
data: s.value,
|
|
879
|
+
"entity-id": n.value,
|
|
880
|
+
"entity-type": "css",
|
|
881
|
+
onSaved: le
|
|
882
|
+
}, null, 8, ["data", "entity-id"])) : q("", !0)
|
|
883
|
+
], 64))
|
|
884
|
+
])
|
|
885
|
+
])
|
|
886
|
+
], 2)) : q("", !0)
|
|
887
|
+
]));
|
|
888
|
+
}
|
|
889
|
+
});
|
|
890
|
+
export {
|
|
891
|
+
co as default
|
|
892
|
+
};
|