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