@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.
Files changed (42) hide show
  1. package/dist/CardIcon-FxpK90rl.js +51 -0
  2. package/dist/EntityCreatePage-Da8XgBKU.js +141 -0
  3. package/dist/EntityEditPage-QktKEAxz.js +167 -0
  4. package/dist/EntityTablePage-ii-Wz0YZ.js +286 -0
  5. package/dist/ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-Bl5ZwNQX.js +70 -0
  6. package/dist/FileEdit-C7tteUeG.js +37 -0
  7. package/dist/HeaderActions.vue_vue_type_script_setup_true_lang-CKEep8BL.js +796 -0
  8. package/dist/MapSettings-CjJ7WWkn.js +672 -0
  9. package/dist/MapSettingsTabs.vue_vue_type_script_setup_true_lang-CKCK3NqY.js +29 -0
  10. package/dist/MonacoEditor.vue_vue_type_script_setup_true_lang-Bs7gz6Lt.js +408 -0
  11. package/dist/RastersTablePage-DpKkFOyo.js +359 -0
  12. package/dist/TableFormHeader.vue_vue_type_script_setup_true_lang-Mci_tseM.js +47 -0
  13. package/dist/cartocss-C_O8qG3h.js +892 -0
  14. package/dist/import-utils-BbZ1gVp-.js +123 -0
  15. package/dist/index-4aSsUBB8.js +10020 -0
  16. package/dist/index.css +1 -1
  17. package/dist/index.js +16 -17634
  18. package/dist/index.umd.cjs +41 -244
  19. package/dist/raster-Du8ZMtjf.js +664 -0
  20. package/dist/register-B2gF-GzA.js +780 -0
  21. package/dist/service-BnPCDVwm.js +2573 -0
  22. package/dist/vs-datatable-QKks38xL.js +800 -0
  23. package/module/gis/form/feedback.answer.form.json +11 -0
  24. package/module/gis/form/gis.cartocss.form.json +8 -0
  25. package/module/gis/form/gis.metadata_new.form.json +196 -0
  26. package/module/gis/form/gis.ogc_service.form.json +8 -2
  27. package/module/gis/select/layer_list_text.sql +7 -0
  28. package/module/gis/select/pg.column_name.geometry.sql +13 -0
  29. package/module/gis/table/gis.metadata_new.table.json +138 -0
  30. package/module/gis/table/site.gis.registers.table.json +1 -1
  31. package/package.json +3 -4
  32. package/server/routes/gis/cartocss/get.cartocss.js +1 -1
  33. package/server/routes/mapnik/controllers/clearTiles.js +8 -4
  34. package/server/routes/mapnik/controllers/createXmlMulti.js +1 -1
  35. package/server/routes/mapnik/controllers/fileSearch.js +6 -2
  36. package/server/routes/mapnik/controllers/fileStat.js +4 -3
  37. package/server/routes/mapnik/controllers/mapnikLogger.js +1 -1
  38. package/server/routes/mapnik/controllers/mapnikStat.js +1 -1
  39. package/server/routes/mapnik/controllers/rasterInfo.js +5 -2
  40. package/server/routes/mapnik/controllers/readDir.js +5 -2
  41. package/server/routes/mapnik/controllers/rtile.js +16 -3
  42. package/server/routes/mapnik/index.js +0 -1
@@ -0,0 +1,800 @@
1
+ import { defineComponent as F, mergeModels as O, defineAsyncComponent as I, useModel as R, ref as y, watch as K, openBlock as o, createElementBlock as s, createElementVNode as e, createVNode as $, unref as x, withCtx as S, createStaticVNode as V, useSlots as P, computed as H, Fragment as b, createTextVNode as U, createCommentVNode as N, renderList as A, normalizeStyle as Q, toDisplayString as M, normalizeClass as z, withModifiers as X, createBlock as Y, resolveDynamicComponent as ee, withDirectives as te, renderSlot as ne } from "vue";
2
+ import { notify as E } from "@opengis/core";
3
+ import { Edit as le, Trash as oe } from "lucide-vue-next";
4
+ import { _ as u } from "./index-4aSsUBB8.js";
5
+ const se = { class: "flex items-center justify-center col-span-3 gap-2" }, re = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, ie = /* @__PURE__ */ F({
6
+ __name: "vs-datatable-controls",
7
+ props: /* @__PURE__ */ O({
8
+ index: {},
9
+ data: {},
10
+ scheme: {}
11
+ }, {
12
+ columns: {
13
+ type: Array,
14
+ default: () => []
15
+ },
16
+ columnsModifiers: {}
17
+ }),
18
+ emits: ["update:columns"],
19
+ setup(n) {
20
+ const t = I(() => import("@opengis/form")), L = I(() => import("@opengis/core").then((h) => h.VsModal)), C = n, j = R(n, "columns"), c = y(!1), m = y({}), p = y({ ...C.data || {} });
21
+ K(
22
+ () => C.data,
23
+ (h) => {
24
+ p.value = { ...h || {} };
25
+ },
26
+ { deep: !0 }
27
+ );
28
+ const _ = () => j.value = j.value.filter((h, d) => d !== C.index), w = async () => {
29
+ const h = m.value.validate();
30
+ if (h) {
31
+ E({ type: "warning", title: "Validation", message: Object.entries(h).map(([d, g]) => `${d}: ${g}`).join(`
32
+ `) });
33
+ return;
34
+ }
35
+ j.value[C.index] = p.value, c.value = !1;
36
+ };
37
+ return (h, d) => (o(), s("div", se, [
38
+ e("button", {
39
+ onClick: d[0] || (d[0] = (g) => {
40
+ c.value = !0;
41
+ }),
42
+ class: "inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground h-8 w-8 rounded-full hover:bg-gray-100"
43
+ }, [
44
+ $(x(le), { class: "w-4 h-4" })
45
+ ]),
46
+ e("button", {
47
+ onClick: _,
48
+ class: "inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 h-8 w-8 rounded-full hover:bg-red-100 text-red-600 hover:text-red-700"
49
+ }, [
50
+ $(x(oe), { class: "w-4 h-4" })
51
+ ]),
52
+ $(x(L), {
53
+ teleport: "#modal",
54
+ size: "lg",
55
+ visible: c.value,
56
+ "onUpdate:visible": d[4] || (d[4] = (g) => c.value = g),
57
+ title: "Редагувати поле"
58
+ }, {
59
+ footer: S(() => [
60
+ e("div", re, [
61
+ e("button", {
62
+ type: "button",
63
+ class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border border-gray-200 rounded-lg hover:bg-gray-100 duration-300",
64
+ onClick: d[3] || (d[3] = (g) => c.value = !1)
65
+ }, " Скасувати "),
66
+ e("button", {
67
+ class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",
68
+ onClick: w
69
+ }, " Зберегти ")
70
+ ])
71
+ ]),
72
+ default: S(() => [
73
+ $(x(t), {
74
+ values: p.value,
75
+ "onUpdate:values": d[1] || (d[1] = (g) => p.value = g),
76
+ schema: n.scheme,
77
+ form: m.value,
78
+ "onUpdate:form": d[2] || (d[2] = (g) => m.value = g)
79
+ }, null, 8, ["values", "schema", "form"])
80
+ ]),
81
+ _: 1
82
+ }, 8, ["visible"])
83
+ ]));
84
+ }
85
+ }), ae = {
86
+ mounted(n) {
87
+ setTimeout(() => {
88
+ n.scrollWidth > n.clientWidth ? n.setAttribute("title", n.textContent) : n.removeAttribute("title");
89
+ });
90
+ },
91
+ updated(n) {
92
+ setTimeout(() => {
93
+ n.scrollWidth > n.clientWidth ? n.setAttribute("title", n.textContent) : n.removeAttribute("title");
94
+ });
95
+ }
96
+ }, ue = {
97
+ array: "purple",
98
+ boolean: "red",
99
+ date: "red",
100
+ datetime: "purple",
101
+ number: "green",
102
+ text: "blue",
103
+ file: "yellow",
104
+ select: "yellow",
105
+ slug: "green",
106
+ image: "blue",
107
+ badge: "orange",
108
+ title: "blue",
109
+ features: "green",
110
+ status: "red",
111
+ tags: "yellow",
112
+ category: "purple",
113
+ check: "green",
114
+ range: "orange",
115
+ autocomplete: "yellow",
116
+ other: "gray",
117
+ "yes/no": "green"
118
+ }, ce = (n) => ue[n == null ? void 0 : n.toLowerCase()] || "gray", de = [
119
+ "array",
120
+ "boolean",
121
+ "date",
122
+ "datetime",
123
+ "number",
124
+ "text",
125
+ "file",
126
+ "select",
127
+ "slug",
128
+ "image",
129
+ "badge",
130
+ "title",
131
+ "features",
132
+ "status",
133
+ "tags",
134
+ "category",
135
+ "check",
136
+ "range",
137
+ "autocomplete"
138
+ ], he = (n) => {
139
+ var t;
140
+ return de.includes((t = n || "") == null ? void 0 : t.toLowerCase());
141
+ }, ge = {}, xe = {
142
+ xmlns: "http://www.w3.org/2000/svg",
143
+ width: "24",
144
+ height: "24",
145
+ viewBox: "0 0 24 24",
146
+ fill: "none",
147
+ stroke: "currentColor",
148
+ "stroke-width": "2",
149
+ "stroke-linecap": "round",
150
+ "stroke-linejoin": "round",
151
+ class: "w-4 h-4 text-gray-700 lucide lucide-type",
152
+ __v0_r: "0,5361,5384"
153
+ };
154
+ function ve(n, t) {
155
+ return o(), s("svg", xe, [...t[0] || (t[0] = [
156
+ e("polyline", { points: "4 7 4 4 20 4 20 7" }, null, -1),
157
+ e("line", {
158
+ x1: "9",
159
+ x2: "15",
160
+ y1: "20",
161
+ y2: "20"
162
+ }, null, -1),
163
+ e("line", {
164
+ x1: "12",
165
+ x2: "12",
166
+ y1: "4",
167
+ y2: "20"
168
+ }, null, -1)
169
+ ])]);
170
+ }
171
+ const ye = /* @__PURE__ */ u(ge, [["render", ve]]), fe = {}, me = {
172
+ xmlns: "http://www.w3.org/2000/svg",
173
+ width: "24",
174
+ height: "24",
175
+ viewBox: "0 0 24 24",
176
+ fill: "none",
177
+ stroke: "currentColor",
178
+ "stroke-width": "2",
179
+ "stroke-linecap": "round",
180
+ "stroke-linejoin": "round",
181
+ class: "w-4 h-4 text-gray-700 lucide lucide-hash",
182
+ __v0_r: "0,5361,5384"
183
+ };
184
+ function pe(n, t) {
185
+ return o(), s("svg", me, [...t[0] || (t[0] = [
186
+ e("line", {
187
+ x1: "4",
188
+ x2: "20",
189
+ y1: "9",
190
+ y2: "9"
191
+ }, null, -1),
192
+ e("line", {
193
+ x1: "4",
194
+ x2: "20",
195
+ y1: "15",
196
+ y2: "15"
197
+ }, null, -1),
198
+ e("line", {
199
+ x1: "10",
200
+ x2: "8",
201
+ y1: "3",
202
+ y2: "21"
203
+ }, null, -1),
204
+ e("line", {
205
+ x1: "16",
206
+ x2: "14",
207
+ y1: "3",
208
+ y2: "21"
209
+ }, null, -1)
210
+ ])]);
211
+ }
212
+ const _e = /* @__PURE__ */ u(fe, [["render", pe]]), we = {}, ke = {
213
+ xmlns: "http://www.w3.org/2000/svg",
214
+ width: "24",
215
+ height: "24",
216
+ viewBox: "0 0 24 24",
217
+ fill: "none",
218
+ stroke: "currentColor",
219
+ "stroke-width": "2",
220
+ "stroke-linecap": "round",
221
+ "stroke-linejoin": "round",
222
+ class: "w-4 h-4 text-gray-700 lucide lucide-calendar",
223
+ __v0_r: "0,5361,5384"
224
+ };
225
+ function be(n, t) {
226
+ return o(), s("svg", ke, [...t[0] || (t[0] = [
227
+ e("path", { d: "M8 2v4" }, null, -1),
228
+ e("path", { d: "M16 2v4" }, null, -1),
229
+ e("rect", {
230
+ width: "18",
231
+ height: "18",
232
+ x: "3",
233
+ y: "4",
234
+ rx: "2"
235
+ }, null, -1),
236
+ e("path", { d: "M3 10h18" }, null, -1)
237
+ ])]);
238
+ }
239
+ const $e = /* @__PURE__ */ u(we, [["render", be]]), Ce = {}, je = {
240
+ xmlns: "http://www.w3.org/2000/svg",
241
+ width: "24",
242
+ height: "24",
243
+ viewBox: "0 0 24 24",
244
+ fill: "none",
245
+ stroke: "currentColor",
246
+ "stroke-width": "2",
247
+ "stroke-linecap": "round",
248
+ "stroke-linejoin": "round",
249
+ class: "w-4 h-4 text-gray-700 lucide lucide-calendar",
250
+ __v0_r: "0,5361,5384"
251
+ };
252
+ function Me(n, t) {
253
+ return o(), s("svg", je, [...t[0] || (t[0] = [
254
+ e("path", { d: "M8 2v4" }, null, -1),
255
+ e("path", { d: "M16 2v4" }, null, -1),
256
+ e("rect", {
257
+ width: "18",
258
+ height: "18",
259
+ x: "3",
260
+ y: "4",
261
+ rx: "2"
262
+ }, null, -1),
263
+ e("path", { d: "M3 10h18" }, null, -1)
264
+ ])]);
265
+ }
266
+ const Ve = /* @__PURE__ */ u(Ce, [["render", Me]]), Be = {}, De = {
267
+ xmlns: "http://www.w3.org/2000/svg",
268
+ width: "24",
269
+ height: "24",
270
+ viewBox: "0 0 24 24",
271
+ fill: "none",
272
+ stroke: "currentColor",
273
+ "stroke-width": "2",
274
+ "stroke-linecap": "round",
275
+ "stroke-linejoin": "round",
276
+ class: "w-4 h-4 text-gray-700 lucide lucide-code",
277
+ __v0_r: "0,5361,5384"
278
+ };
279
+ function Ae(n, t) {
280
+ return o(), s("svg", De, [...t[0] || (t[0] = [
281
+ e("polyline", { points: "16 18 22 12 16 6" }, null, -1),
282
+ e("polyline", { points: "8 6 2 12 8 18" }, null, -1)
283
+ ])]);
284
+ }
285
+ const Ie = /* @__PURE__ */ u(Be, [["render", Ae]]), Se = {}, Le = {
286
+ xmlns: "http://www.w3.org/2000/svg",
287
+ width: "24",
288
+ height: "24",
289
+ viewBox: "0 0 24 24",
290
+ fill: "none",
291
+ stroke: "currentColor",
292
+ "stroke-width": "2",
293
+ "stroke-linecap": "round",
294
+ "stroke-linejoin": "round",
295
+ class: "w-4 h-4 text-gray-700 lucide lucide-toggle-left",
296
+ __v0_r: "0,5361,5384"
297
+ };
298
+ function ze(n, t) {
299
+ return o(), s("svg", Le, [...t[0] || (t[0] = [
300
+ e("rect", {
301
+ width: "20",
302
+ height: "12",
303
+ x: "2",
304
+ y: "6",
305
+ rx: "6",
306
+ ry: "6"
307
+ }, null, -1),
308
+ e("circle", {
309
+ cx: "8",
310
+ cy: "12",
311
+ r: "2"
312
+ }, null, -1)
313
+ ])]);
314
+ }
315
+ const Te = /* @__PURE__ */ u(Se, [["render", ze]]), He = {}, Ue = {
316
+ xmlns: "http://www.w3.org/2000/svg",
317
+ width: "24",
318
+ height: "24",
319
+ viewBox: "0 0 24 24",
320
+ fill: "none",
321
+ stroke: "currentColor",
322
+ "stroke-width": "2",
323
+ "stroke-linecap": "round",
324
+ "stroke-linejoin": "round",
325
+ class: "w-4 h-4 text-gray-700 lucide lucide-file-text",
326
+ __v0_r: "0,5361,5384"
327
+ };
328
+ function Ne(n, t) {
329
+ return o(), s("svg", Ue, [...t[0] || (t[0] = [
330
+ V('<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path><path d="M10 9H8"></path><path d="M16 13H8"></path><path d="M16 17H8"></path>', 5)
331
+ ])]);
332
+ }
333
+ const We = /* @__PURE__ */ u(He, [["render", Ne]]), Fe = {}, Oe = {
334
+ xmlns: "http://www.w3.org/2000/svg",
335
+ width: "24",
336
+ height: "24",
337
+ viewBox: "0 0 24 24",
338
+ fill: "none",
339
+ stroke: "currentColor",
340
+ "stroke-width": "2",
341
+ "stroke-linecap": "round",
342
+ "stroke-linejoin": "round",
343
+ class: "w-4 h-4 text-gray-700 lucide lucide-image",
344
+ __v0_r: "0,5361,5384"
345
+ };
346
+ function Re(n, t) {
347
+ return o(), s("svg", Oe, [...t[0] || (t[0] = [
348
+ e("rect", {
349
+ width: "18",
350
+ height: "18",
351
+ x: "3",
352
+ y: "3",
353
+ rx: "2",
354
+ ry: "2"
355
+ }, null, -1),
356
+ e("circle", {
357
+ cx: "9",
358
+ cy: "9",
359
+ r: "2"
360
+ }, null, -1),
361
+ e("path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }, null, -1)
362
+ ])]);
363
+ }
364
+ const Ee = /* @__PURE__ */ u(Fe, [["render", Re]]), Ze = {}, qe = {
365
+ xmlns: "http://www.w3.org/2000/svg",
366
+ width: "24",
367
+ height: "24",
368
+ viewBox: "0 0 24 24",
369
+ fill: "none",
370
+ stroke: "currentColor",
371
+ "stroke-width": "2",
372
+ "stroke-linecap": "round",
373
+ "stroke-linejoin": "round",
374
+ class: "w-4 h-4 text-gray-700 lucide lucide-list",
375
+ __v0_r: "0,5361,5384"
376
+ };
377
+ function Ge(n, t) {
378
+ return o(), s("svg", qe, [...t[0] || (t[0] = [
379
+ V('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>', 6)
380
+ ])]);
381
+ }
382
+ const Je = /* @__PURE__ */ u(Ze, [["render", Ge]]), Ke = {}, Pe = {
383
+ xmlns: "http://www.w3.org/2000/svg",
384
+ width: "24",
385
+ height: "24",
386
+ viewBox: "0 0 24 24",
387
+ fill: "none",
388
+ stroke: "currentColor",
389
+ "stroke-width": "2",
390
+ "stroke-linecap": "round",
391
+ "stroke-linejoin": "round",
392
+ class: "w-4 h-4 text-gray-700 lucide lucide-list",
393
+ __v0_r: "0,5361,5384"
394
+ };
395
+ function Qe(n, t) {
396
+ return o(), s("svg", Pe, [...t[0] || (t[0] = [
397
+ V('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>', 6)
398
+ ])]);
399
+ }
400
+ const Xe = /* @__PURE__ */ u(Ke, [["render", Qe]]), Ye = {}, et = {
401
+ xmlns: "http://www.w3.org/2000/svg",
402
+ width: "24",
403
+ height: "24",
404
+ viewBox: "0 0 24 24",
405
+ fill: "none",
406
+ stroke: "currentColor",
407
+ "stroke-width": "2",
408
+ "stroke-linecap": "round",
409
+ "stroke-linejoin": "round",
410
+ class: "w-4 h-4 text-gray-700 lucide lucide-link2",
411
+ __v0_r: "0,5361,5384"
412
+ };
413
+ function tt(n, t) {
414
+ return o(), s("svg", et, [...t[0] || (t[0] = [
415
+ e("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }, null, -1),
416
+ e("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }, null, -1),
417
+ e("line", {
418
+ x1: "8",
419
+ x2: "16",
420
+ y1: "12",
421
+ y2: "12"
422
+ }, null, -1)
423
+ ])]);
424
+ }
425
+ const nt = /* @__PURE__ */ u(Ye, [["render", tt]]), lt = {}, ot = {
426
+ xmlns: "http://www.w3.org/2000/svg",
427
+ width: "24",
428
+ height: "24",
429
+ viewBox: "0 0 24 24",
430
+ fill: "none",
431
+ stroke: "currentColor",
432
+ "stroke-width": "2",
433
+ "stroke-linecap": "round",
434
+ "stroke-linejoin": "round",
435
+ class: "w-4 h-4 text-gray-700 lucide lucide-list",
436
+ __v0_r: "0,5361,5384"
437
+ };
438
+ function st(n, t) {
439
+ return o(), s("svg", ot, [...t[0] || (t[0] = [
440
+ V('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>', 6)
441
+ ])]);
442
+ }
443
+ const rt = /* @__PURE__ */ u(lt, [["render", st]]), it = {}, at = {
444
+ xmlns: "http://www.w3.org/2000/svg",
445
+ width: "24",
446
+ height: "24",
447
+ viewBox: "0 0 24 24",
448
+ fill: "none",
449
+ stroke: "currentColor",
450
+ "stroke-width": "2",
451
+ "stroke-linecap": "round",
452
+ "stroke-linejoin": "round",
453
+ class: "w-4 h-4 text-gray-700 lucide lucide-link2",
454
+ __v0_r: "0,5361,5384"
455
+ };
456
+ function ut(n, t) {
457
+ return o(), s("svg", at, [...t[0] || (t[0] = [
458
+ e("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }, null, -1),
459
+ e("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }, null, -1),
460
+ e("line", {
461
+ x1: "8",
462
+ x2: "16",
463
+ y1: "12",
464
+ y2: "12"
465
+ }, null, -1)
466
+ ])]);
467
+ }
468
+ const ct = /* @__PURE__ */ u(it, [["render", ut]]), dt = {}, ht = {
469
+ xmlns: "http://www.w3.org/2000/svg",
470
+ width: "24",
471
+ height: "24",
472
+ viewBox: "0 0 24 24",
473
+ fill: "none",
474
+ stroke: "currentColor",
475
+ "stroke-width": "2",
476
+ "stroke-linecap": "round",
477
+ "stroke-linejoin": "round",
478
+ class: "w-4 h-4 text-gray-700 lucide lucide-list",
479
+ __v0_r: "0,5361,5384"
480
+ };
481
+ function gt(n, t) {
482
+ return o(), s("svg", ht, [...t[0] || (t[0] = [
483
+ V('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>', 6)
484
+ ])]);
485
+ }
486
+ const xt = /* @__PURE__ */ u(dt, [["render", gt]]), vt = {}, yt = {
487
+ xmlns: "http://www.w3.org/2000/svg",
488
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
489
+ height: "800px",
490
+ width: "800px",
491
+ version: "1.1",
492
+ id: "_x32_",
493
+ viewBox: "0 0 512 512",
494
+ "xml:space": "preserve"
495
+ };
496
+ function ft(n, t) {
497
+ return o(), s("svg", yt, [...t[0] || (t[0] = [
498
+ e("g", null, [
499
+ e("path", {
500
+ class: "st0",
501
+ d: "M511.989,292.396c0.021-16.486-6.344-33.136-18.945-45.703L273.605,27.242 C262.3,15.936,247.175,9.22,231.184,8.407L66.821,0.032l1.184,0.066C66.974,0.044,65.866,0,64.67,0 C47.58,0,31.105,6.783,18.944,18.955C6.783,31.106-0.001,47.58,0.011,64.67c0,1.076,0.034,2.172,0.078,3.27l8.297,163.254 c0.835,15.981,7.54,31.106,18.857,42.421l219.451,219.451c12.578,12.589,29.217,18.955,45.703,18.934 c16.496,0.021,33.124-6.356,45.703-18.934l154.956-154.945l-11.92-11.92l11.932,11.909 C505.645,325.521,512.011,308.881,511.989,292.396z M314.26,469.216c-6.08,6.08-13.895,9.044-21.864,9.067 c-7.969-0.023-15.783-2.986-21.864-9.067L51.082,249.765c-5.4-5.4-8.616-12.633-9.023-20.305L33.762,66.238l-0.034-1.569 c0-8.188,3.238-16.048,9.055-21.875c5.839-5.839,13.697-9.077,21.886-9.077l1.502,0.044l163.288,8.319 c7.683,0.396,14.904,3.6,20.305,9.012l219.45,219.45c6.059,6.069,9.033,13.884,9.056,21.853 c-0.023,7.968-2.986,15.794-9.067,21.886h0.011L314.26,469.216z"
502
+ }),
503
+ e("path", {
504
+ class: "st0",
505
+ d: "M105.632,105.642c-15.366,15.378-15.366,40.27,0,55.636c15.366,15.366,40.259,15.366,55.625,0 c15.366-15.366,15.366-40.259,0-55.636C145.891,90.276,120.998,90.276,105.632,105.642z"
506
+ })
507
+ ], -1)
508
+ ])]);
509
+ }
510
+ const mt = /* @__PURE__ */ u(vt, [["render", ft]]), pt = {}, _t = {
511
+ xmlns: "http://www.w3.org/2000/svg",
512
+ width: "800px",
513
+ height: "800px",
514
+ viewBox: "0 0 24 24",
515
+ fill: "none"
516
+ };
517
+ function wt(n, t) {
518
+ return o(), s("svg", _t, [...t[0] || (t[0] = [
519
+ e("path", {
520
+ d: "M3 12C3 4.5885 4.5885 3 12 3C19.4115 3 21 4.5885 21 12C21 19.4115 19.4115 21 12 21C4.5885 21 3 19.4115 3 12Z",
521
+ stroke: "#323232",
522
+ "stroke-width": "2"
523
+ }, null, -1),
524
+ e("path", {
525
+ d: "M9 12L10.6828 13.6828V13.6828C10.858 13.858 11.142 13.858 11.3172 13.6828V13.6828L15 10",
526
+ stroke: "#323232",
527
+ "stroke-width": "2",
528
+ "stroke-linecap": "round",
529
+ "stroke-linejoin": "round"
530
+ }, null, -1)
531
+ ])]);
532
+ }
533
+ const kt = /* @__PURE__ */ u(pt, [["render", wt]]), W = {
534
+ IconText: ye,
535
+ IconNumber: _e,
536
+ IconDate: $e,
537
+ IconDatetime: Ve,
538
+ IconRichtext: Ie,
539
+ IconBoolean: Te,
540
+ IconFile: We,
541
+ IconImage: Ee,
542
+ IconArray: Je,
543
+ IconSelect: Xe,
544
+ IconSlug: nt,
545
+ IconDatalist: rt,
546
+ IconReference: ct,
547
+ IconReferenceList: xt,
548
+ IconBadge: mt,
549
+ IconCheck: kt
550
+ }, bt = {
551
+ key: 0,
552
+ class: "flex items-center justify-between mb-6"
553
+ }, $t = { class: "flex justify-end w-full" }, Ct = { class: "overflow-hidden bg-white border border-gray-200 shadow-sm rounded-xl flex flex-col flex-1 min-h-0" }, jt = { class: "table-scroll-wrapper flex-1 overflow-y-auto min-h-0" }, Mt = { class: "table-fixed w-full text-[13px]" }, Vt = { class: "bg-gray-50 border-b border-gray-200" }, Bt = { key: 0 }, Dt = ["onDragstart", "onDragover", "onDrop"], At = {
554
+ key: 0,
555
+ class: "flex w-fit items-center gap-2 text-left"
556
+ }, It = { class: "flex-1 min-w-0" }, St = { class: "font-medium text-gray-900 truncate" }, Lt = { class: "text-xs text-gray-500" }, zt = {
557
+ key: 1,
558
+ class: "flex items-center justify-center"
559
+ }, Tt = {
560
+ key: 0,
561
+ class: "inline-flex items-center px-2 py-1 h-fit text-[13px] font-medium rounded-md ring-1 ring-inset ring-gray-500/10 bg-gray-100"
562
+ }, Ht = {
563
+ key: 1,
564
+ class: "text-gray-500 text-sm"
565
+ }, Ut = { key: 3 }, Nt = { class: "px-6 py-4" }, Wt = { key: 1 }, Ft = ["colspan"], Ot = /* @__PURE__ */ F({
566
+ __name: "vs-datatable",
567
+ props: /* @__PURE__ */ O({
568
+ columnsScheme: {},
569
+ formScheme: {},
570
+ addButton: { type: Boolean, default: !0 },
571
+ mainColWidth: { default: "" }
572
+ }, {
573
+ modelValue: {},
574
+ modelModifiers: {}
575
+ }),
576
+ emits: ["update:modelValue"],
577
+ setup(n, { expose: t }) {
578
+ function L(i) {
579
+ return i.charAt(0).toUpperCase() + i.slice(1);
580
+ }
581
+ const C = I(() => import("@opengis/core").then((i) => i.VsModal)), j = I(() => import("@opengis/form")), c = R(n, "modelValue"), m = n, p = y({}), _ = y(!1), w = y({}), h = y(null), d = P(), g = (i) => !!(i && d[i]);
582
+ t({
583
+ openCreateDialog: () => {
584
+ _.value = !0;
585
+ }
586
+ });
587
+ const v = H({
588
+ get() {
589
+ return Array.isArray(c.value) ? c.value : c.value && Array.isArray(c.value.columns) ? c.value.columns : [];
590
+ },
591
+ set(i) {
592
+ Array.isArray(c.value) ? c.value = i : c.value && Array.isArray(c.value.columns) && (c.value.columns = i);
593
+ }
594
+ }), B = H(() => {
595
+ const i = m.columnsScheme.map((r) => r.key);
596
+ return i.includes("name") && i.includes("label") || i.includes("id") && i.includes("label") ? [
597
+ {
598
+ key: "main",
599
+ label: "Назва",
600
+ type: "main",
601
+ width: "100%"
602
+ },
603
+ ...m.columnsScheme.filter(
604
+ (r) => !["name", "id", "label"].includes(r.key)
605
+ )
606
+ ] : m.columnsScheme;
607
+ });
608
+ function T() {
609
+ _.value = !1, w.value = {}, h.value = null;
610
+ }
611
+ async function Z() {
612
+ const i = p.value.validate();
613
+ if (i) {
614
+ E({
615
+ type: "warning",
616
+ title: "Validation",
617
+ message: Object.entries(i).map(([r, l]) => `${r}: ${l}`).join(`
618
+ `)
619
+ });
620
+ return;
621
+ }
622
+ if (h.value === null)
623
+ v.value = [...v.value, { ...w.value }];
624
+ else {
625
+ const r = [...v.value];
626
+ r[h.value] = { ...w.value }, v.value = r;
627
+ }
628
+ T();
629
+ }
630
+ const k = y(null), D = y(null), q = (i) => {
631
+ k.value = i;
632
+ }, G = (i) => {
633
+ D.value = i;
634
+ }, J = (i) => {
635
+ if (k.value === null || k.value === i) {
636
+ k.value = null, D.value = null;
637
+ return;
638
+ }
639
+ const r = [...v.value], [l] = r.splice(k.value, 1);
640
+ r.splice(i, 0, l), v.value = r, k.value = null, D.value = null;
641
+ };
642
+ return (i, r) => (o(), s(b, null, [
643
+ n.addButton ? (o(), s("div", bt, [
644
+ e("div", $t, [
645
+ e("button", {
646
+ onClick: r[0] || (r[0] = (l) => _.value = !0),
647
+ class: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&_svg]:shrink-0 bg-primary hover:bg-primary/90 h-10 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-700 hover:to-blue-600 text-white"
648
+ }, [...r[4] || (r[4] = [
649
+ e("svg", {
650
+ xmlns: "http://www.w3.org/2000/svg",
651
+ class: "w-4 h-4 mr-2",
652
+ fill: "none",
653
+ viewBox: "0 0 24 24",
654
+ stroke: "currentColor"
655
+ }, [
656
+ e("path", {
657
+ "stroke-linecap": "round",
658
+ "stroke-linejoin": "round",
659
+ "stroke-width": "2",
660
+ d: "M12 4v16m8-8H4"
661
+ })
662
+ ], -1),
663
+ U(" Додати поле ", -1)
664
+ ])])
665
+ ])
666
+ ])) : N("", !0),
667
+ e("div", Ct, [
668
+ e("div", jt, [
669
+ e("table", Mt, [
670
+ e("colgroup", null, [
671
+ (o(!0), s(b, null, A(B.value, (l) => (o(), s("col", {
672
+ key: l.key,
673
+ style: Q(
674
+ l.type === "main" ? `width: ${n.mainColWidth}` : l.width ? `width: ${l.width}` : "auto"
675
+ )
676
+ }, null, 4))), 128)),
677
+ r[5] || (r[5] = e("col", null, null, -1))
678
+ ]),
679
+ e("thead", null, [
680
+ e("tr", Vt, [
681
+ (o(!0), s(b, null, A(B.value, (l) => (o(), s("th", {
682
+ key: l.key,
683
+ class: "px-6 py-4"
684
+ }, M(l.label), 1))), 128)),
685
+ r[6] || (r[6] = e("th", { class: "px-6 py-4" }, "Дії", -1))
686
+ ])
687
+ ]),
688
+ v.value.length ? (o(), s("tbody", Bt, [
689
+ (o(!0), s(b, null, A(v.value, (l, f) => (o(), s("tr", {
690
+ key: l.id || l.name || f,
691
+ class: z(["transition-colors hover:bg-gray-50/50 cursor-move", {
692
+ "opacity-50": k.value === f,
693
+ "border-t-2 border-b-2 border-blue-500 bg-blue-50": D.value === f
694
+ }]),
695
+ draggable: "true",
696
+ onDragstart: (a) => q(f),
697
+ onDragover: X((a) => G(f), ["prevent"]),
698
+ onDrop: (a) => J(f)
699
+ }, [
700
+ (o(!0), s(b, null, A(B.value, (a) => (o(), s("td", {
701
+ key: a.key,
702
+ class: "px-6 py-4 align-middle text-center"
703
+ }, [
704
+ a.type === "main" ? (o(), s("div", At, [
705
+ r[7] || (r[7] = e("span", { class: "drag-handle cursor-move mr-2 text-gray-400" }, "☰", -1)),
706
+ x(he)(
707
+ l.format === "yes/no" ? "check" : l.format || l.type
708
+ ) ? (o(), s("div", {
709
+ key: 0,
710
+ class: z(["flex items-center justify-center p-1 rounded", `bg-${x(ce)(
711
+ l.format === "yes/no" ? "check" : l.format || l.type
712
+ )}-100`])
713
+ }, [
714
+ (o(), Y(ee(
715
+ l.format === "yes/no" ? "icon-check" : x(W)["Icon" + L(l.format || l.type)] || x(W).IconText
716
+ ), { class: "w-4 h-4" }))
717
+ ], 2)) : N("", !0),
718
+ e("div", It, [
719
+ te((o(), s("p", St, [
720
+ U(M(l.name || l.id), 1)
721
+ ])), [
722
+ [x(ae)]
723
+ ]),
724
+ e("p", Lt, M(l.ua || l.label || l.name || l.id), 1)
725
+ ])
726
+ ])) : (o(), s(b, { key: 1 }, [
727
+ a.slot && g(a.slot) ? ne(i.$slots, a.slot, {
728
+ key: 0,
729
+ row: l,
730
+ column: a,
731
+ value: l[a.key],
732
+ rowIndex: f
733
+ }, void 0, !0) : a.type === "color" ? (o(), s("div", zt, [
734
+ e("div", {
735
+ class: z(["w-4 h-4 rounded-full align-middle", `bg-[${l[a.key]}]`])
736
+ }, null, 2)
737
+ ])) : ["format", "type", "meta"].includes(a.key) ? (o(), s(b, { key: 2 }, [
738
+ l[a.key] ? (o(), s("span", Tt, M(l[a.key]), 1)) : (o(), s("span", Ht, "Не вказано"))
739
+ ], 64)) : (o(), s("span", Ut, M(l[a.key]), 1))
740
+ ], 64))
741
+ ]))), 128)),
742
+ e("td", Nt, [
743
+ $(ie, {
744
+ columns: v.value,
745
+ "onUpdate:columns": r[1] || (r[1] = (a) => v.value = a),
746
+ data: l,
747
+ index: f,
748
+ scheme: n.formScheme
749
+ }, null, 8, ["columns", "data", "index", "scheme"])
750
+ ])
751
+ ], 42, Dt))), 128))
752
+ ])) : (o(), s("tr", Wt, [
753
+ e("td", {
754
+ colspan: B.value.length + 1,
755
+ class: "text-gray-500 text-center py-4"
756
+ }, " Поля не знайдені ", 8, Ft)
757
+ ]))
758
+ ])
759
+ ])
760
+ ]),
761
+ $(x(C), {
762
+ teleport: "#modal",
763
+ title: "Створити поле",
764
+ size: "lg",
765
+ visible: _.value,
766
+ "onUpdate:visible": r[3] || (r[3] = (l) => _.value = l)
767
+ }, {
768
+ footer: S(() => [
769
+ e("div", { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, [
770
+ e("button", {
771
+ type: "button",
772
+ onClick: T,
773
+ class: "px-4 py-2 rounded bg-gray-100 text-gray-700"
774
+ }, " Скасувати "),
775
+ e("button", {
776
+ type: "button",
777
+ onClick: Z,
778
+ class: "px-4 py-2 rounded bg-blue-600 text-white"
779
+ }, " Зберегти1 ")
780
+ ])
781
+ ]),
782
+ default: S(() => [
783
+ $(x(j), {
784
+ ref_key: "form",
785
+ ref: p,
786
+ modelValue: w.value,
787
+ "onUpdate:modelValue": r[2] || (r[2] = (l) => w.value = l),
788
+ schema: n.formScheme
789
+ }, null, 8, ["modelValue", "schema"])
790
+ ]),
791
+ _: 1
792
+ }, 8, ["visible"])
793
+ ], 64));
794
+ }
795
+ }), Gt = /* @__PURE__ */ u(Ot, [["__scopeId", "data-v-25566600"]]);
796
+ export {
797
+ Gt as V,
798
+ ce as g,
799
+ he as i
800
+ };