@opengis/gis 0.2.153 → 0.2.154

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 (199) hide show
  1. package/README.md +181 -181
  2. package/dist/{CardIcon-DMyL1fVA.js → CardIcon--lAtW-9w.js} +1 -1
  3. package/dist/{EntityTablePage-CSyu-TkX.js → EntityTablePage-C4xpTFhX.js} +2 -2
  4. package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-SGAab2Pe.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-ChIqnIJk.js} +1 -1
  5. package/dist/HeaderActions.vue_vue_type_script_setup_true_lang-ZusIbDWr.js +1099 -0
  6. package/dist/{MapSettings-BIiqsVxg.js → MapSettings-DW8jEvOa.js} +2 -2
  7. package/dist/{RastersTablePage-UFG6aeEW.js → RastersTablePage-BiLlnxUp.js} +2 -2
  8. package/dist/{cartocss-BBmneYRX.js → cartocss-CLomvOS2.js} +5 -5
  9. package/dist/{import-utils-CJ5QxhA1.js → import-utils-kb-uej6A.js} +1 -1
  10. package/dist/{index-CgU4688s.js → index-BlZ7asai.js} +35 -35
  11. package/dist/index.css +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/index.umd.cjs +20 -20
  14. package/dist/{raster-8Z926EKI.js → raster-DwJbTo-Q.js} +3 -3
  15. package/dist/{register-nIBgohof.js → register-O9oHRhKY.js} +3 -3
  16. package/dist/{service-dZoaCuTN.js → service-Bej37Mtm.js} +6 -6
  17. package/dist/{vs-datatable-BrRW57vx.js → vs-datatable-ChBQO9dx.js} +2 -2
  18. package/module/cls.json +6 -6
  19. package/module/gis/card/gis.metadata.table/index.yml +22 -22
  20. package/module/gis/card/gis.metadata.table/main_info.hbs +20 -20
  21. package/module/gis/card/gis.metadata.table/metadata_info.hbs +27 -27
  22. package/module/gis/card/gis.metadata.table/other.hbs +25 -25
  23. package/module/gis/card/gis.rasters.table/index.yml +11 -11
  24. package/module/gis/card/gis.rasters.table/main_info.hbs +27 -27
  25. package/module/gis/card/gis.registers.table/cls.hbs +36 -36
  26. package/module/gis/card/gis.registers.table/columns.hbs +89 -89
  27. package/module/gis/card/gis.registers.table/filters.hbs +80 -80
  28. package/module/gis/card/gis.registers.table/index.yml +23 -23
  29. package/module/gis/card/gis.registers.table/main_info.hbs +35 -35
  30. package/module/gis/card/gis.registers.table/source.hbs +45 -45
  31. package/module/gis/card/gis.services.table/attributes.hbs +91 -91
  32. package/module/gis/card/gis.services.table/filters.hbs +83 -83
  33. package/module/gis/card/gis.services.table/index.yml +25 -25
  34. package/module/gis/card/gis.services.table/main_info.hbs +27 -27
  35. package/module/gis/card/gis.services.table/source.hbs +25 -25
  36. package/module/gis/cls/bool.yes_no.json +12 -12
  37. package/module/gis/cls/encoding.json +14 -14
  38. package/module/gis/cls/geom_type.json +14 -14
  39. package/module/gis/cls/gis.column_type.json +34 -34
  40. package/module/gis/cls/gis.column_view_type.json +26 -26
  41. package/module/gis/cls/gis.filter_type.json +22 -22
  42. package/module/gis/cls/language.json +10 -10
  43. package/module/gis/cls/meta.service_type.json +42 -42
  44. package/module/gis/cls/ogc.service.json +21 -21
  45. package/module/gis/cls/service_type.json +42 -42
  46. package/module/gis/cls/source_type.json +10 -10
  47. package/module/gis/cls/standarts.json +6 -6
  48. package/module/gis/cls/topic_category.json +106 -106
  49. package/module/gis/cls/update_frequency.json +29 -29
  50. package/module/gis/cls/view.json +21 -21
  51. package/module/gis/form/feedback.answer.form.json +10 -10
  52. package/module/gis/form/gis.cartocss.form.json +64 -64
  53. package/module/gis/form/gis.group_list.form.json +17 -17
  54. package/module/gis/form/gis.maps.form.json +61 -61
  55. package/module/gis/form/gis.metadata.form.json +240 -240
  56. package/module/gis/form/gis.metadata_new.form.json +195 -195
  57. package/module/gis/form/gis.ogc_service.form.json +51 -51
  58. package/module/gis/form/gis.rasters.form.json +76 -76
  59. package/module/gis/form/gis.registers.form.json +124 -124
  60. package/module/gis/form/gis.registers_column.form.json +84 -84
  61. package/module/gis/form/gis.registers_filter.form.json +65 -65
  62. package/module/gis/form/gis.services.form.json +111 -111
  63. package/module/gis/form/gis.services_attributes.form.json +75 -75
  64. package/module/gis/form/gis.services_filter.form.json +65 -65
  65. package/module/gis/menu.json +43 -43
  66. package/module/gis/select/admin.cls.name.sql +9 -9
  67. package/module/gis/select/layer_list.sql +7 -7
  68. package/module/gis/select/layer_list_text.sql +7 -7
  69. package/module/gis/select/pg.column_name.geometry.sql +12 -12
  70. package/module/gis/select/pg.columns.parent.sql +6 -6
  71. package/module/gis/select/pg.table_name.sql +17 -17
  72. package/module/gis/select/service_id.sql +1 -1
  73. package/module/gis/table/gis.cartocss.table.json +74 -74
  74. package/module/gis/table/gis.group_list.table.json +58 -58
  75. package/module/gis/table/gis.maps.table.json +110 -110
  76. package/module/gis/table/gis.metadata.table.json +70 -70
  77. package/module/gis/table/gis.metadata_new.table.json +137 -137
  78. package/module/gis/table/gis.ogc_service.table.json +100 -100
  79. package/module/gis/table/gis.rasters.table.json +113 -113
  80. package/module/gis/table/gis.registers.table.json +143 -143
  81. package/module/gis/table/gis.services.table.json +120 -120
  82. package/module/gis/table/site.gis.registers.table.json +88 -88
  83. package/module/gis/table/site.gis.services.table.json +106 -106
  84. package/module/gis/templates/ISO19136_2017_gml_template.xml +330 -330
  85. package/module/gis/tokens.yml +5 -5
  86. package/module/permissions/form/permissions.users.form.json +151 -151
  87. package/module/permissions/table/gis.permissions.table.json +97 -97
  88. package/module/test/cls/bp_build_type.json +37 -37
  89. package/module/test/cls/doc_status.json +31 -31
  90. package/module/test/cls/ts.temp_status.json +18 -18
  91. package/module/test/cls/ts.temp_structure.ts_class.json +49 -49
  92. package/module/test/cls/ts.temp_type.json +9 -9
  93. package/module/test/layer/bp.json +59 -59
  94. package/module/test/layer/bp1.yml +33 -33
  95. package/module/test/layer/individual.yml +53 -53
  96. package/module/test/layer/ts.linking_passport.yml +55 -55
  97. package/module/test/layer/ts.temp_structure.yml +50 -50
  98. package/module/test/map/addr.yml +21 -21
  99. package/module/test/map/bp_myo.json +43 -43
  100. package/module/test/map/bpf.json +43 -43
  101. package/module/test/map/main.json +37 -37
  102. package/module/test/map/mbd.json +92 -92
  103. package/module/test/map/ts.json +53 -53
  104. package/module/test/select/address_id.json +2 -2
  105. package/module/test/select/address_id.sql +7 -7
  106. package/module/test/select/core.user_uid.sql +1 -1
  107. package/module/test/table/data_address.street.table.json +69 -69
  108. package/module/test/table/data_bp_myo.bp.table.json +122 -122
  109. package/package.json +6 -6
  110. package/plugin.js +55 -55
  111. package/server/migrations/array_intersect.sql +13 -13
  112. package/server/migrations/cartocss.sql +27 -27
  113. package/server/migrations/group_list.sql +74 -74
  114. package/server/migrations/maps.sql +30 -30
  115. package/server/migrations/metadata.sql +415 -415
  116. package/server/migrations/ogc.sql +106 -106
  117. package/server/migrations/rasters.sql +265 -265
  118. package/server/migrations/services.sql +247 -247
  119. package/server/migrations/services_users_rel.sql +22 -22
  120. package/server/migrations/widgets.sql +20 -20
  121. package/server/plugins/crons.js +21 -21
  122. package/server/plugins/mapnik/funcs/checkRasterFile.js +109 -109
  123. package/server/plugins/mapnik/funcs/mapnik.js +151 -151
  124. package/server/plugins/mapnik/funcs/rootFolder.mjs +8 -8
  125. package/server/plugins/mapnik/map.proto +305 -305
  126. package/server/plugins/vite.js +74 -74
  127. package/server/routes/gis/cartocss/add.cartocss.js +42 -42
  128. package/server/routes/gis/cartocss/get.cartocss.js +59 -59
  129. package/server/routes/gis/checkXML.js +117 -117
  130. package/server/routes/gis/dashboard.js +29 -29
  131. package/server/routes/gis/index.mjs +89 -87
  132. package/server/routes/gis/metadata/editMetadata.js +34 -34
  133. package/server/routes/gis/metadata/metadataXML.js +13 -13
  134. package/server/routes/gis/ogc/map.info.point.js +124 -124
  135. package/server/routes/gis/registers/add.registry.js +35 -35
  136. package/server/routes/gis/registers/del.registry.js +14 -14
  137. package/server/routes/gis/registers/funcs/classifiers.js +100 -100
  138. package/server/routes/gis/registers/funcs/columns.js +3 -3
  139. package/server/routes/gis/registers/funcs/content.type.js +9 -9
  140. package/server/routes/gis/registers/funcs/get.info.js +89 -89
  141. package/server/routes/gis/registers/funcs/handleRegistryRequest.js +146 -146
  142. package/server/routes/gis/registers/gis.export.js +153 -153
  143. package/server/routes/gis/registers/gis.registry.js +64 -64
  144. package/server/routes/gis/registers/gis.registry.list.js +59 -59
  145. package/server/routes/gis/registers/insert.columns.js +107 -107
  146. package/server/routes/gis/registers/insert.filters.js +110 -110
  147. package/server/routes/gis/registers/map.registry.js +79 -79
  148. package/server/routes/gis/services/add.service.js +64 -64
  149. package/server/routes/gis/services/del.service.js +12 -12
  150. package/server/routes/gis/services/get.layer.geom.js +27 -27
  151. package/server/routes/gis/services/get.service.users.js +74 -0
  152. package/server/routes/gis/services/get.services.col.js +33 -33
  153. package/server/routes/gis/services/get.services.js +84 -84
  154. package/server/routes/gis/services/legend.auto.js +77 -77
  155. package/server/routes/map/controllers/clearTiles.js +34 -34
  156. package/server/routes/map/controllers/geojson.js +187 -187
  157. package/server/routes/map/controllers/jsonData.js +205 -205
  158. package/server/routes/map/controllers/layerList.js +102 -102
  159. package/server/routes/map/controllers/map.js +123 -123
  160. package/server/routes/map/controllers/mapCatalog.js +72 -72
  161. package/server/routes/map/controllers/mapCatalogAttribute.js +55 -55
  162. package/server/routes/map/controllers/mapFeatures.js +128 -128
  163. package/server/routes/map/controllers/mapFormat.js +234 -234
  164. package/server/routes/map/controllers/mapTiles.js +152 -152
  165. package/server/routes/map/controllers/maps.js +15 -15
  166. package/server/routes/map/controllers/marker_icon.js +43 -43
  167. package/server/routes/map/controllers/vtile.js +172 -172
  168. package/server/routes/map/index.mjs +169 -169
  169. package/server/routes/map/maps/add.map.js +43 -43
  170. package/server/routes/map/maps/del.map.js +18 -18
  171. package/server/routes/map/maps/get.map.js +118 -118
  172. package/server/routes/map/vtile1.js +179 -179
  173. package/server/routes/map/widgets/add.widget.js +38 -38
  174. package/server/routes/map/widgets/del.widget.js +22 -22
  175. package/server/routes/map/widgets/get.widget.js +40 -40
  176. package/server/routes/mapnik/controllers/clearTiles.js +106 -106
  177. package/server/routes/mapnik/controllers/createXml.js +67 -67
  178. package/server/routes/mapnik/controllers/createXmlMulti.js +76 -76
  179. package/server/routes/mapnik/controllers/fileSearch.js +38 -38
  180. package/server/routes/mapnik/controllers/fileStat.js +28 -28
  181. package/server/routes/mapnik/controllers/mapnikLogger.js +29 -29
  182. package/server/routes/mapnik/controllers/mapnikStat.js +19 -19
  183. package/server/routes/mapnik/controllers/pretile.js +144 -144
  184. package/server/routes/mapnik/controllers/rasterInfo.js +57 -57
  185. package/server/routes/mapnik/controllers/readDir.js +22 -22
  186. package/server/routes/mapnik/controllers/rtile.js +166 -166
  187. package/server/routes/mapnik/controllers/uploadRaster.js +157 -157
  188. package/server/routes/mapnik/functions/cartoBounds.js +32 -32
  189. package/server/routes/mapnik/functions/convertBoundToTile.js +27 -27
  190. package/server/routes/mapnik/functions/uploadXML.js +113 -113
  191. package/server/routes/mapnik/index.js +40 -40
  192. package/server/routes/permissions/controllers/catalog.permissions.edit.js +22 -22
  193. package/server/routes/permissions/controllers/catalog.permissions.js +7 -7
  194. package/server/routes/permissions/controllers/gis.catalog.js +80 -80
  195. package/server/routes/permissions/controllers/utils/get.permissions.js +59 -59
  196. package/server/routes/permissions/index.mjs +18 -18
  197. package/server/routes/root.mjs +3 -3
  198. package/utils.js +13 -13
  199. package/dist/HeaderActions.vue_vue_type_script_setup_true_lang-BaxPBqzx.js +0 -847
@@ -1,847 +0,0 @@
1
- import { openBlock as c, createElementBlock as v, createElementVNode as n, defineComponent as ee, normalizeClass as oe, createVNode as U, createBlock as re, unref as M, defineAsyncComponent as K, ref as y, watch as de, computed as b, createTextVNode as pe, Fragment as se, renderList as be, toDisplayString as V, createCommentVNode as q, withCtx as Z, nextTick as ke, onMounted as Ve, onUnmounted as ze, withModifiers as Ce, Teleport as Ee, normalizeStyle as Me } from "vue";
2
- import { _ as Le } from "./index-CgU4688s.js";
3
- import { Settings as Se, BrushCleaning as ye, SquareCode as fe, Pencil as Te } from "lucide-vue-next";
4
- import { notify as H } from "@opengis/core";
5
- const $e = {}, Ie = {
6
- xmlns: "http://www.w3.org/2000/svg",
7
- width: "24",
8
- height: "24",
9
- viewBox: "0 0 24 24",
10
- fill: "none",
11
- stroke: "currentColor",
12
- "stroke-width": "2",
13
- "stroke-linecap": "round",
14
- "stroke-linejoin": "round",
15
- class: "inline-block shrink-0"
16
- };
17
- function Ue(l, z) {
18
- return c(), v("svg", Ie, [...z[0] || (z[0] = [
19
- n("path", { d: "M8 3 4 7l4 4" }, null, -1),
20
- n("path", { d: "M4 7h16" }, null, -1),
21
- n("path", { d: "m16 21 4-4-4-4" }, null, -1),
22
- n("path", { d: "M20 17H4" }, null, -1)
23
- ])]);
24
- }
25
- const Be = /* @__PURE__ */ Le($e, [["render", Ue]]), Ne = ["aria-label"], bt = /* @__PURE__ */ ee({
26
- __name: "PanelToggleButton",
27
- props: {
28
- open: { type: Boolean },
29
- topClass: { default: "top-5" }
30
- },
31
- emits: ["toggle"],
32
- setup(l) {
33
- return (z, m) => (c(), v("button", {
34
- type: "button",
35
- onClick: m[0] || (m[0] = (j) => z.$emit("toggle")),
36
- class: oe([
37
- "absolute right-0 w-5 h-9 shrink-0 rounded-l-lg inline-flex items-center justify-center",
38
- "text-gray-600 hover:bg-gray-100 hover:text-gray-800 transition border border-gray-100 shadow-md bg-white z-[21]",
39
- l.topClass
40
- ]),
41
- "aria-label": l.open ? "Закрити панель" : "Відкрити панель"
42
- }, [
43
- U(Be, { class: "h-3 w-3" })
44
- ], 10, Ne));
45
- }
46
- }), yt = /* @__PURE__ */ ee({
47
- __name: "SettingsIcon",
48
- setup(l) {
49
- return (z, m) => (c(), re(M(Se), {
50
- size: 16,
51
- class: "lucide lucide-settings"
52
- }));
53
- }
54
- });
55
- function je(l) {
56
- const m = (e) => typeof e != "number" || Number.isNaN(e) ? "" : Number(e.toFixed(5)).toFixed(5), j = [
57
- {
58
- name: "description",
59
- type: "textarea",
60
- label: "Опис",
61
- col: 12
62
- },
63
- {
64
- name: "group_id",
65
- type: "Autocomplete",
66
- label: "Група",
67
- data: "gis.group_list",
68
- col: 6
69
- },
70
- {
71
- name: "keywords",
72
- type: "Tags",
73
- label: "Ключові слова",
74
- placeholder: "Введіть тег та натисніть Enter",
75
- col: 12
76
- },
77
- {
78
- name: "is_public",
79
- type: "switcher",
80
- label: "Публічність",
81
- col: 6,
82
- data: "yes_no"
83
- },
84
- {
85
- name: "is_active",
86
- type: "switcher",
87
- label: "Активність",
88
- col: 6,
89
- data: "yes_no"
90
- }
91
- ], p = (e, h) => {
92
- const x = Array.isArray(e == null ? void 0 : e.config) ? e.config[0] : null;
93
- return l.normalizeValue(x == null ? void 0 : x[h]);
94
- }, R = (e) => !Array.isArray(e == null ? void 0 : e.bounds) || e.bounds.length < 4 ? "" : e.bounds.map((h) => m(h)).filter(Boolean).join(", "), d = (e) => !Array.isArray(e == null ? void 0 : e.extent) || e.extent.length < 4 ? "" : e.extent.map((h) => m(h)).filter(Boolean).join(", "), F = (e) => !Array.isArray(e == null ? void 0 : e.bands) || !e.bands.length ? "" : e.bands.join(", "), w = (e) => typeof e != "boolean" ? "" : e ? "Так" : "Ні", L = [
95
- { label: "Група", value: (e) => l.normalizeValue((e == null ? void 0 : e.group_name) ?? l.resolvedGroupName ?? (e == null ? void 0 : e.group_id)) },
96
- { label: "Статус", value: (e) => l.normalizeValue(l.statusLabel(e)) },
97
- { label: "Видимість", value: (e) => l.normalizeValue(l.visibilityLabel(e)) },
98
- { label: "Тип сервісу", value: (e) => l.normalizeValue(e == null ? void 0 : e.service_type) },
99
- { label: "Тип джерела", value: (e) => l.normalizeValue(e == null ? void 0 : e.source_type) },
100
- { label: "Шлях до джерела", value: (e) => l.normalizeValue(e == null ? void 0 : e.source_path) },
101
- { label: "Тип геометрії", value: (e) => l.normalizeValue(e == null ? void 0 : e.geom_type) },
102
- { label: "Геометрична колонка", value: (e) => l.normalizeValue(e == null ? void 0 : e.geometry_column) },
103
- { label: "SRID", value: (e) => l.normalizeValue(e == null ? void 0 : e.srid) },
104
- { label: "Кількість обʼєктів", value: (e) => l.normalizeValue(e == null ? void 0 : e.count) },
105
- { label: "Створено", value: (e) => e != null && e.created_at ? l.formatDate(e.created_at) : "" },
106
- { label: "Оновлено", value: (e) => e != null && e.updated_at ? l.formatDate(e.updated_at) : "" }
107
- ], S = [
108
- { label: "Ключ сервісу", value: (e) => l.normalizeValue(e == null ? void 0 : e.service_key) },
109
- { label: "Виробник", value: (e) => l.normalizeValue((e == null ? void 0 : e.holder) ?? (e == null ? void 0 : e.producer)) },
110
- { label: "Категорія", value: (e) => l.normalizeValue(e == null ? void 0 : e.category) },
111
- { label: "Ліцензія", value: (e) => l.normalizeValue(e == null ? void 0 : e.license) },
112
- { label: "Рік", value: (e) => l.normalizeValue(e == null ? void 0 : e.year) },
113
- { label: "Ключові слова", value: (e) => l.normalizeValue(e == null ? void 0 : e.keywords) },
114
- { label: "URL сервісу", value: (e) => l.normalizeValue(e == null ? void 0 : e.service_url) },
115
- { label: "Metadata URL", value: (e) => l.normalizeValue(e == null ? void 0 : e.metadata_url) },
116
- { label: "Thumbnail URL", value: (e) => l.normalizeValue(e == null ? void 0 : e.thumbnail_url) },
117
- { label: "SQL / Query", value: (e) => l.normalizeValue(e == null ? void 0 : e.query) }
118
- ];
119
- return {
120
- service: {
121
- general: L,
122
- meta: S,
123
- edit: [
124
- ...j,
125
- { name: "service_key", type: "text", label: "Ключ сервісу", col: 6 },
126
- { name: "producer", type: "text", label: "Виробник", col: 6 },
127
- { name: "category", type: "text", label: "Категорія", col: 6 },
128
- { name: "license", type: "text", label: "Ліцензія", col: 6 },
129
- { name: "year", type: "number", label: "Рік", col: 6 },
130
- { name: "service_url", type: "text", label: "URL сервісу", col: 12 },
131
- { name: "metadata_url", type: "text", label: "Metadata URL", col: 12 },
132
- { name: "thumbnail_url", type: "text", label: "Thumbnail URL", col: 12 },
133
- { name: "query", type: "textarea", label: "SQL / Query", col: 12 }
134
- ]
135
- },
136
- dataset: {
137
- general: L,
138
- meta: S,
139
- edit: [
140
- ...j,
141
- { name: "service_key", type: "text", label: "Ключ сервісу", col: 6 },
142
- { name: "producer", type: "text", label: "Виробник", col: 6 },
143
- { name: "category", type: "text", label: "Категорія", col: 6 },
144
- { name: "license", type: "text", label: "Ліцензія", col: 6 },
145
- { name: "year", type: "number", label: "Рік", col: 6 },
146
- { name: "service_url", type: "text", label: "URL сервісу", col: 12 },
147
- { name: "metadata_url", type: "text", label: "Metadata URL", col: 12 },
148
- { name: "thumbnail_url", type: "text", label: "Thumbnail URL", col: 12 },
149
- { name: "query", type: "textarea", label: "SQL / Query", col: 12 }
150
- ]
151
- },
152
- raster: {
153
- general: [
154
- { label: "Статус", value: (e) => l.normalizeValue(l.statusLabel(e)) },
155
- { label: "Видимість", value: (e) => l.normalizeValue(l.visibilityLabel(e)) },
156
- { label: "Формат", value: (e) => l.normalizeValue(e == null ? void 0 : e.extension) },
157
- { label: "SRID", value: (e) => l.normalizeValue(e == null ? void 0 : e.srid) },
158
- { label: "Файл джерела", value: (e) => l.normalizeValue(e == null ? void 0 : e.source_path) },
159
- { label: "Кеш", value: (e) => w(e == null ? void 0 : e.cache) },
160
- { label: "XML", value: (e) => w(e == null ? void 0 : e.xml) }
161
- ],
162
- meta: [
163
- { label: "Bounds", value: (e) => d(e) },
164
- { label: "Розмір", value: (e) => l.normalizeValue(e == null ? void 0 : e.total_size) },
165
- { label: "Ширина", value: (e) => l.normalizeValue(e == null ? void 0 : e.width) },
166
- { label: "Висота", value: (e) => l.normalizeValue(e == null ? void 0 : e.height) },
167
- { label: "Кількість каналів", value: (e) => l.normalizeValue(e == null ? void 0 : e.bands_count) },
168
- { label: "Канали", value: (e) => F(e) },
169
- { label: "Роздільна здатність", value: (e) => l.normalizeValue(e == null ? void 0 : e.resolution) },
170
- { label: "Глибина кольору", value: (e) => l.normalizeValue(e == null ? void 0 : e.color_depth) },
171
- { label: "Стиснення", value: (e) => l.normalizeValue(e == null ? void 0 : e.compression) },
172
- { label: "Proj4", value: (e) => l.normalizeValue(e == null ? void 0 : e.proj4) }
173
- ],
174
- edit: [
175
- {
176
- name: "description",
177
- type: "textarea",
178
- label: "Опис",
179
- col: 12
180
- },
181
- {
182
- name: "group_id",
183
- type: "Autocomplete",
184
- label: "Група",
185
- data: "gis.group_list",
186
- col: 6
187
- },
188
- {
189
- name: "is_public",
190
- type: "switcher",
191
- label: "Публічність",
192
- col: 6,
193
- data: "yes_no"
194
- },
195
- {
196
- name: "is_active",
197
- type: "switcher",
198
- label: "Активність",
199
- col: 6,
200
- data: "yes_no"
201
- }
202
- ]
203
- },
204
- css: {
205
- general: [
206
- { label: "Група", value: (e) => l.normalizeValue((e == null ? void 0 : e.group_name) ?? l.resolvedGroupName ?? (e == null ? void 0 : e.group_id)) },
207
- { label: "Статус", value: (e) => l.normalizeValue(l.statusLabel(e)) },
208
- { label: "Видимість", value: (e) => l.normalizeValue(l.visibilityLabel(e)) },
209
- { label: "Ключ CartoCSS", value: (e) => l.normalizeValue(e == null ? void 0 : e.cartocss_key) },
210
- { label: "Таблиця джерела", value: (e) => p(e, "table") || l.normalizeValue(e == null ? void 0 : e.source_path) },
211
- { label: "Ключ набору", value: (e) => p(e, "key") },
212
- { label: "Авто-картка", value: (e) => w(e == null ? void 0 : e.card_auto) },
213
- { label: "Інфо по кліку", value: (e) => w(e == null ? void 0 : e.info) },
214
- { label: "Статичний", value: (e) => w(e == null ? void 0 : e.is_static) }
215
- ],
216
- meta: [
217
- { label: "Bounds", value: (e) => R(e) }
218
- ],
219
- edit: [
220
- {
221
- name: "description",
222
- type: "textarea",
223
- label: "Опис",
224
- col: 12
225
- },
226
- {
227
- name: "group_id",
228
- type: "Autocomplete",
229
- label: "Група",
230
- data: "gis.group_list",
231
- col: 6
232
- },
233
- {
234
- name: "is_public",
235
- type: "switcher",
236
- label: "Публічність",
237
- col: 6,
238
- data: "yes_no"
239
- },
240
- {
241
- name: "enabled",
242
- type: "switcher",
243
- label: "Активність",
244
- col: 6,
245
- data: "yes_no"
246
- },
247
- {
248
- name: "is_static",
249
- type: "switcher",
250
- label: "Статичний",
251
- col: 6,
252
- data: "yes_no"
253
- }
254
- ]
255
- }
256
- };
257
- }
258
- const Fe = { class: "flex-1 overflow-y-auto p-4" }, Ae = { class: "space-y-4" }, Re = { class: "border border-gray-200 rounded-lg p-4" }, De = {
259
- key: 0,
260
- class: "grid grid-cols-2 gap-2"
261
- }, Oe = { class: "text-xs text-gray-500 mb-1" }, He = { class: "text-sm font-semibold text-gray-900" }, Pe = {
262
- key: 1,
263
- class: "text-sm text-gray-700 leading-relaxed"
264
- }, Ge = { class: "border border-gray-200 rounded-lg p-4" }, qe = { class: "text-sm text-gray-700 leading-relaxed" }, Qe = { class: "border border-gray-200 rounded-lg p-4" }, Xe = { class: "flex items-center justify-between mb-3" }, We = { class: "text-xs text-gray-500 mb-1" }, Je = { class: "text-sm font-semibold text-gray-900" }, Ye = {
265
- key: 1,
266
- class: "text-sm text-gray-700 leading-relaxed"
267
- }, Ke = { class: "flex justify-end gap-2 px-4 py-3 border-t border-gray-100 w-full" }, Ze = ["disabled"], et = ["disabled"], I = "-", ft = /* @__PURE__ */ ee({
268
- __name: "MetaDataTab",
269
- props: {
270
- data: {},
271
- entityId: {},
272
- entityType: {}
273
- },
274
- emits: ["saved", "editCssBounds"],
275
- setup(l, { emit: z }) {
276
- const m = K(() => import("@opengis/core").then((t) => t.VsModal)), j = K(() => import("@opengis/form")), p = l, R = z, d = y(null);
277
- async function F(t) {
278
- var a;
279
- try {
280
- const o = await fetch("/api/suggest/gis.group_list");
281
- if (!o.ok) return null;
282
- const E = (a = (await o.json()).data) == null ? void 0 : a.find((O) => String(O.id) === String(t));
283
- return (E == null ? void 0 : E.text) ?? null;
284
- } catch {
285
- return null;
286
- }
287
- }
288
- de(
289
- () => p.data,
290
- async (t) => {
291
- if (d.value = null, (t == null ? void 0 : t.group_id) != null) {
292
- const a = await F(String(t.group_id));
293
- d.value = a;
294
- }
295
- },
296
- { immediate: !0 }
297
- );
298
- function w(t) {
299
- if (!t || typeof t != "string") return I;
300
- try {
301
- const a = new Date(t);
302
- return Number.isNaN(a.getTime()) ? I : a.toLocaleDateString("uk-UA", {
303
- day: "numeric",
304
- month: "long",
305
- year: "numeric"
306
- });
307
- } catch {
308
- return I;
309
- }
310
- }
311
- function L(t) {
312
- return typeof (t == null ? void 0 : t.is_active) == "boolean" ? t.is_active ? "Активний" : "Неактивний" : typeof (t == null ? void 0 : t.enabled) == "boolean" ? t.enabled ? "Активний" : "Неактивний" : I;
313
- }
314
- function S(t) {
315
- return typeof (t == null ? void 0 : t.is_public) != "boolean" ? I : t.is_public ? "Публічний" : "Приватний";
316
- }
317
- function e(t) {
318
- if (t == null) return "";
319
- if (Array.isArray(t)) return t.filter(Boolean).join(", ");
320
- if (typeof t == "boolean") return t ? "Так" : "Ні";
321
- if (typeof t == "object") return "";
322
- const a = String(t).trim();
323
- return a === "" ? "" : a;
324
- }
325
- function h(t, a) {
326
- return a.map((o) => ({ label: o.label, value: o.value(t) })).filter((o) => o.value && o.value !== I);
327
- }
328
- const x = b(() => h(p.data, N().general)), B = b(() => {
329
- var a;
330
- const t = (a = p.data) == null ? void 0 : a.description;
331
- return t != null && t !== "" ? t : I;
332
- }), T = b(() => h(p.data, N().meta)), A = b(() => T.value.length === 1 ? "grid-cols-1" : "grid-cols-2"), P = b(() => p.entityType === "css" || p.entityType === "raster"), k = y(!1), C = y({}), f = y(null), _ = y(!1);
333
- function N() {
334
- const t = je({
335
- resolvedGroupName: d.value,
336
- normalizeValue: e,
337
- statusLabel: L,
338
- visibilityLabel: S,
339
- formatDate: w
340
- });
341
- return t[p.entityType || "service"] || t.service;
342
- }
343
- const Q = b(() => N().edit);
344
- function te() {
345
- const t = p.data, a = {};
346
- N().edit.forEach((o) => {
347
- switch (o.name) {
348
- case "group_id":
349
- a.group_id = (t == null ? void 0 : t.group_id) != null ? String(t.group_id) : "";
350
- break;
351
- case "producer":
352
- a.producer = (t == null ? void 0 : t.holder) ?? (t == null ? void 0 : t.producer) ?? "";
353
- break;
354
- case "keywords":
355
- a.keywords = Array.isArray(t == null ? void 0 : t.keywords) ? [...t.keywords] : [];
356
- break;
357
- case "is_public":
358
- a.is_public = (t == null ? void 0 : t.is_public) ?? !1;
359
- break;
360
- case "is_active":
361
- a.is_active = typeof (t == null ? void 0 : t.is_active) == "boolean" ? t.is_active : (t == null ? void 0 : t.enabled) ?? !1;
362
- break;
363
- case "enabled":
364
- a.enabled = (t == null ? void 0 : t.enabled) ?? (t == null ? void 0 : t.is_active) ?? !1;
365
- break;
366
- case "info":
367
- a.info = (t == null ? void 0 : t.info) ?? !1;
368
- break;
369
- case "is_static":
370
- a.is_static = (t == null ? void 0 : t.is_static) ?? !1;
371
- break;
372
- case "card_auto":
373
- a.card_auto = (t == null ? void 0 : t.card_auto) ?? !1;
374
- break;
375
- default:
376
- a[o.name] = (t == null ? void 0 : t[o.name]) ?? "";
377
- break;
378
- }
379
- }), C.value = a, f.value = null, k.value = !0;
380
- }
381
- function X() {
382
- R("editCssBounds");
383
- }
384
- function W(t) {
385
- return p.entityType === "raster" && t === "Bounds";
386
- }
387
- async function J() {
388
- var t, a;
389
- if (!(!p.entityId || !p.entityType)) {
390
- if (f.value) {
391
- const o = (a = (t = f.value).validate) == null ? void 0 : a.call(t);
392
- if (o) {
393
- H({
394
- type: "warning",
395
- title: "Валідація",
396
- message: Object.entries(o).map(([D, E]) => `${D}: ${E}`).join(`
397
- `)
398
- });
399
- return;
400
- }
401
- }
402
- _.value = !0;
403
- try {
404
- const o = new Set(Q.value.map(($) => $.name)), D = Object.fromEntries(
405
- Object.entries(C.value).filter(([$]) => o.has($))
406
- ), E = p.entityType === "css" ? {
407
- url: `/api/gis-css/${encodeURIComponent(p.entityId)}`,
408
- method: "POST"
409
- } : {
410
- url: `/api/gis-metadata/${encodeURIComponent(p.entityType)}/${encodeURIComponent(p.entityId)}`,
411
- method: "POST"
412
- }, O = await fetch(E.url, {
413
- method: E.method,
414
- headers: { "Content-Type": "application/json" },
415
- body: JSON.stringify(D)
416
- });
417
- if (!O.ok) throw new Error(`Failed to save metadata: ${O.status}`);
418
- H({ type: "success", title: "Збережено", message: "Метадані оновлено" }), k.value = !1, R("saved");
419
- } catch (o) {
420
- console.error("Failed to save metadata", o), H({ type: "error", title: "Помилка", message: "Не вдалося зберегти метадані" });
421
- } finally {
422
- _.value = !1;
423
- }
424
- }
425
- }
426
- return (t, a) => (c(), v("div", Fe, [
427
- n("div", Ae, [
428
- n("div", Re, [
429
- n("div", { class: "flex items-center justify-between mb-3" }, [
430
- a[5] || (a[5] = n("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider" }, " Загальна інформація ", -1)),
431
- n("button", {
432
- type: "button",
433
- onClick: te,
434
- class: "inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs font-medium transition-colors bg-sky-50 text-sky-600 hover:bg-sky-100"
435
- }, [...a[4] || (a[4] = [
436
- n("svg", {
437
- xmlns: "http://www.w3.org/2000/svg",
438
- class: "h-3.5 w-3.5",
439
- fill: "none",
440
- viewBox: "0 0 24 24",
441
- stroke: "currentColor",
442
- "stroke-width": "2"
443
- }, [
444
- n("path", {
445
- "stroke-linecap": "round",
446
- "stroke-linejoin": "round",
447
- d: "M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"
448
- })
449
- ], -1),
450
- pe(" Редагувати ", -1)
451
- ])])
452
- ]),
453
- x.value.length ? (c(), v("div", De, [
454
- (c(!0), v(se, null, be(x.value, (o) => (c(), v("div", {
455
- key: o.label,
456
- class: "bg-gray-50 rounded-md p-2 border border-gray-100"
457
- }, [
458
- n("p", Oe, V(o.label), 1),
459
- n("p", He, V(o.value), 1)
460
- ]))), 128))
461
- ])) : (c(), v("p", Pe, V(I)))
462
- ]),
463
- n("div", Ge, [
464
- a[6] || (a[6] = n("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3" }, " Повний опис ", -1)),
465
- n("p", qe, V(B.value), 1)
466
- ]),
467
- n("div", Qe, [
468
- n("div", Xe, [
469
- a[8] || (a[8] = n("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider" }, " Метадані ", -1)),
470
- P.value ? (c(), v("button", {
471
- key: 0,
472
- type: "button",
473
- class: "inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs font-medium transition-colors bg-sky-50 text-sky-600 hover:bg-sky-100",
474
- onClick: X
475
- }, [...a[7] || (a[7] = [
476
- n("svg", {
477
- xmlns: "http://www.w3.org/2000/svg",
478
- class: "h-3.5 w-3.5",
479
- fill: "none",
480
- viewBox: "0 0 24 24",
481
- stroke: "currentColor",
482
- "stroke-width": "2"
483
- }, [
484
- n("path", {
485
- "stroke-linecap": "round",
486
- "stroke-linejoin": "round",
487
- d: "M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"
488
- })
489
- ], -1),
490
- pe(" Редагувати ", -1)
491
- ])])) : q("", !0)
492
- ]),
493
- T.value.length ? (c(), v("div", {
494
- key: 0,
495
- class: oe([A.value, "grid gap-2"])
496
- }, [
497
- (c(!0), v(se, null, be(T.value, (o) => (c(), v("div", {
498
- key: o.label,
499
- class: oe(["bg-gray-50 rounded-md p-2 border border-gray-100", { "col-span-2": W(o.label) }])
500
- }, [
501
- n("p", We, V(o.label), 1),
502
- n("p", Je, V(o.value), 1)
503
- ], 2))), 128))
504
- ], 2)) : (c(), v("p", Ye, V(I)))
505
- ])
506
- ]),
507
- U(M(m), {
508
- teleport: "#modal",
509
- visible: k.value,
510
- "onUpdate:visible": a[3] || (a[3] = (o) => k.value = o),
511
- title: "Редагування метаданих",
512
- size: "lg"
513
- }, {
514
- footer: Z(() => [
515
- n("div", Ke, [
516
- n("button", {
517
- type: "button",
518
- class: "px-4 py-2 rounded bg-gray-100 text-gray-700 text-sm",
519
- disabled: _.value,
520
- onClick: a[2] || (a[2] = (o) => k.value = !1)
521
- }, " Скасувати ", 8, Ze),
522
- n("button", {
523
- type: "button",
524
- class: "px-4 py-2 rounded bg-blue-600 text-white text-sm",
525
- disabled: _.value,
526
- onClick: J
527
- }, V(_.value ? "Збереження…" : "Зберегти"), 9, et)
528
- ])
529
- ]),
530
- default: Z(() => [
531
- U(M(j), {
532
- values: C.value,
533
- "onUpdate:values": a[0] || (a[0] = (o) => C.value = o),
534
- form: f.value,
535
- "onUpdate:form": a[1] || (a[1] = (o) => f.value = o),
536
- schema: Q.value
537
- }, null, 8, ["values", "form", "schema"])
538
- ]),
539
- _: 1
540
- }, 8, ["visible"])
541
- ]));
542
- }
543
- }), tt = ["href"], lt = ["href"], at = ["href"], nt = {
544
- key: 0,
545
- class: "py-6 px-4 text-sm text-gray-500"
546
- }, ot = {
547
- key: 1,
548
- class: "py-6 px-4 text-sm text-red-600"
549
- }, rt = { class: "flex justify-end gap-2 px-4 py-3 border-t border-gray-100 w-full" }, st = ["disabled"], it = ["disabled"], ut = 192, ge = 8, G = 8, gt = /* @__PURE__ */ ee({
550
- __name: "HeaderActions",
551
- props: {
552
- entityId: {},
553
- entityInfo: {},
554
- table: {},
555
- formEndpoint: {},
556
- saveEndpoint: {},
557
- entityLabel: {},
558
- editButtonText: {},
559
- saveMethod: {},
560
- showXmlItem: { type: Boolean, default: !0 },
561
- clearTilesHandler: {}
562
- },
563
- emits: ["saved"],
564
- setup(l, { emit: z }) {
565
- const m = l, j = z, p = K(
566
- () => import("@opengis/core").then((r) => r.VsModal)
567
- ), R = K(() => import("@opengis/form")), d = y(!1), F = y(null), w = y(null), L = y(null), S = y(null), e = b(() => S.value ? {
568
- position: "fixed",
569
- top: `${S.value.top}px`,
570
- left: `${S.value.left}px`
571
- } : {});
572
- de(d, (r) => {
573
- r && ke(le);
574
- });
575
- const h = y(!1), x = y(null), B = y({}), T = y(null), A = y(""), P = y(!1), k = y(!1), C = y(null), f = b(() => m.entityId || ""), _ = (r, s) => r ? typeof r == "function" ? r(s) : typeof r != "string" ? "" : r.includes(":id") ? s ? r.replace(":id", encodeURIComponent(s)) : "" : r : "", N = b(() => {
576
- var r;
577
- return (r = m.table) == null ? void 0 : r.trim();
578
- }), Q = b(() => {
579
- if (m.formEndpoint) return m.formEndpoint;
580
- if (N.value)
581
- return (r) => `/api/form/${N.value}/${r}`;
582
- }), te = b(() => {
583
- if (m.saveEndpoint) return m.saveEndpoint;
584
- if (N.value)
585
- return (r) => `/api/table/${r}`;
586
- }), X = b(
587
- () => _(Q.value, f.value)
588
- ), W = b(() => m.saveEndpoint ? _(m.saveEndpoint, f.value) : C.value ? `/api/table/${encodeURIComponent(C.value)}` : _(te.value, f.value)), J = b(
589
- () => _("/api/gis-clear-rtile/:id", f.value)
590
- ), t = b(
591
- () => _("/api/gis-xml/:id", f.value)
592
- ), a = b(
593
- () => _("/api/gis-pretile/:id?zoom=10&max=12", f.value)
594
- ), o = b(() => {
595
- var u, g, i;
596
- const r = (g = (u = m.entityInfo) == null ? void 0 : u.name) == null ? void 0 : g.trim();
597
- if (r) return `Редагування ${r}`;
598
- const s = (i = m.entityLabel) == null ? void 0 : i.trim();
599
- return s ? `Редагування ${s}` : "Редагування";
600
- }), D = b(() => m.editButtonText || "Редагувати"), E = b(() => (m.saveMethod || "POST").toUpperCase());
601
- function O() {
602
- d.value || le(), d.value = !d.value;
603
- }
604
- function $() {
605
- d.value = !1;
606
- }
607
- async function he() {
608
- const r = m.clearTilesHandler;
609
- !r || !f.value || ($(), await r(f.value));
610
- }
611
- function le() {
612
- var ve;
613
- if (typeof window > "u" || !w.value) return;
614
- const r = w.value.getBoundingClientRect(), s = window.innerWidth, u = window.innerHeight, g = r.left, i = Math.max(
615
- s - ut - G,
616
- G
617
- ), ae = Math.min(Math.max(g, G), i), ne = ((ve = L.value) == null ? void 0 : ve.offsetHeight) ?? 0, ce = r.bottom + ge;
618
- let me = ce;
619
- if (ne && ce + ne > u - G) {
620
- const xe = r.top - ge - ne;
621
- me = Math.max(xe, G);
622
- }
623
- S.value = { top: me, left: ae };
624
- }
625
- function ie(r) {
626
- var u, g;
627
- if (!F.value && !L.value) return;
628
- const s = r.target;
629
- s && ((u = F.value) != null && u.contains(s) || (g = L.value) != null && g.contains(s)) || (d.value = !1);
630
- }
631
- function Y() {
632
- d.value && le();
633
- }
634
- Ve(() => {
635
- window.addEventListener("click", ie), window.addEventListener("resize", Y), window.addEventListener("scroll", Y, !0);
636
- }), ze(() => {
637
- window.removeEventListener("click", ie), window.removeEventListener("resize", Y), window.removeEventListener("scroll", Y, !0);
638
- });
639
- async function _e() {
640
- var r, s, u;
641
- if (!(!f.value || !X.value)) {
642
- $(), h.value = !0, P.value = !0, A.value = "", x.value = null, B.value = {}, C.value = null;
643
- try {
644
- const g = await fetch(X.value);
645
- if (!g.ok)
646
- throw new Error(`Failed to load form: ${g.status}`);
647
- const i = await g.json();
648
- B.value = (i == null ? void 0 : i.data) || {}, x.value = (i == null ? void 0 : i.schema) || null;
649
- const ae = typeof (i == null ? void 0 : i.token) == "string" && i.token || typeof ((r = i == null ? void 0 : i.tokens) == null ? void 0 : r.edit) == "string" && i.tokens.edit || typeof ((s = i == null ? void 0 : i.tokens) == null ? void 0 : s.edit_token) == "string" && i.tokens.edit_token || typeof ((u = i == null ? void 0 : i.data) == null ? void 0 : u.token) == "string" && i.data.token || null;
650
- C.value = ae, T.value = null;
651
- } catch (g) {
652
- console.error("Failed to load edit form", g), A.value = "Не вдалося завантажити форму редагування";
653
- } finally {
654
- P.value = !1;
655
- }
656
- }
657
- }
658
- function ue() {
659
- h.value = !1, x.value = null, A.value = "", C.value = null;
660
- }
661
- async function we() {
662
- var r, s;
663
- if (!(!f.value || !W.value)) {
664
- if (T.value) {
665
- const u = (s = (r = T.value).validate) == null ? void 0 : s.call(r);
666
- if (u) {
667
- H({
668
- type: "warning",
669
- title: "Validation",
670
- message: Object.entries(u).map(([g, i]) => `${g}: ${i}`).join(`
671
- `)
672
- });
673
- return;
674
- }
675
- }
676
- k.value = !0;
677
- try {
678
- const u = await fetch(W.value, {
679
- method: E.value,
680
- headers: { "Content-Type": "application/json" },
681
- body: JSON.stringify(B.value)
682
- });
683
- if (!u.ok) throw new Error(`Failed to save: ${u.status}`);
684
- H({
685
- type: "success",
686
- title: "Збережено",
687
- message: "Зміни збережено"
688
- }), j("saved", B.value), ue();
689
- } catch (u) {
690
- console.error("Failed to save edit form", u), H({
691
- type: "error",
692
- title: "Помилка",
693
- message: "Не вдалося зберегти зміни"
694
- });
695
- } finally {
696
- k.value = !1;
697
- }
698
- }
699
- }
700
- return (r, s) => (c(), v("div", {
701
- ref_key: "root",
702
- ref: F,
703
- class: "relative flex items-center"
704
- }, [
705
- n("button", {
706
- ref_key: "triggerButton",
707
- ref: w,
708
- type: "button",
709
- onClick: Ce(O, ["stop"]),
710
- class: "flex items-center justify-center w-9 h-9 hover:rounded-md hover:border hover:border-gray-200 bg-white text-gray-600 hover:bg-gray-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-500",
711
- "aria-label": "Дії"
712
- }, [...s[3] || (s[3] = [
713
- n("svg", {
714
- xmlns: "http://www.w3.org/2000/svg",
715
- class: "h-5 w-5",
716
- fill: "none",
717
- viewBox: "0 0 24 24",
718
- stroke: "currentColor"
719
- }, [
720
- n("path", {
721
- "stroke-linecap": "round",
722
- "stroke-linejoin": "round",
723
- "stroke-width": "2",
724
- d: "M12 5.5v.01M12 12v.01M12 18.5v.01"
725
- })
726
- ], -1)
727
- ])], 512),
728
- (c(), re(Ee, { to: "body" }, [
729
- d.value ? (c(), v("div", {
730
- key: 0,
731
- ref_key: "menuContainer",
732
- ref: L,
733
- style: Me(e.value),
734
- class: "absolute top-0 left-0 mt-2 w-48 rounded-xl border border-gray-200 bg-white shadow-lg text-sm z-[1000]"
735
- }, [
736
- J.value || l.clearTilesHandler ? (c(), v(se, { key: 0 }, [
737
- l.clearTilesHandler ? (c(), v("button", {
738
- key: 0,
739
- type: "button",
740
- class: "flex items-center gap-2 w-full px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
741
- onClick: he
742
- }, [
743
- U(M(ye), {
744
- size: 16,
745
- class: "lucide lucide-brush-cleaning text-gray-500"
746
- }),
747
- s[4] || (s[4] = n("span", null, "Очистити тайли", -1))
748
- ])) : (c(), v("a", {
749
- key: 1,
750
- href: J.value,
751
- target: "_blank",
752
- rel: "noreferrer",
753
- class: "flex items-center gap-2 px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
754
- onClick: $
755
- }, [
756
- U(M(ye), {
757
- size: 16,
758
- class: "lucide lucide-brush-cleaning text-gray-500"
759
- }),
760
- s[5] || (s[5] = n("span", null, "Очистити тайли", -1))
761
- ], 8, tt))
762
- ], 64)) : q("", !0),
763
- l.showXmlItem ? (c(), v("a", {
764
- key: 1,
765
- href: t.value,
766
- target: "_blank",
767
- rel: "noreferrer",
768
- class: "flex items-center gap-2 px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
769
- onClick: $
770
- }, [
771
- U(M(fe), {
772
- size: 16,
773
- class: "lucide lucide-square-code text-gray-500"
774
- }),
775
- s[6] || (s[6] = n("span", null, "Створити XML", -1))
776
- ], 8, lt)) : q("", !0),
777
- l.showXmlItem ? (c(), v("a", {
778
- key: 2,
779
- href: a.value,
780
- target: "_blank",
781
- rel: "noreferrer",
782
- class: "flex items-center gap-2 px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
783
- onClick: $
784
- }, [
785
- U(M(fe), {
786
- size: 16,
787
- class: "lucide lucide-square-code text-gray-500"
788
- }),
789
- s[7] || (s[7] = n("span", null, "Pretile", -1))
790
- ], 8, at)) : q("", !0),
791
- n("button", {
792
- type: "button",
793
- class: "flex items-center gap-2 w-full px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-b-xl",
794
- onClick: _e
795
- }, [
796
- U(M(Te), {
797
- size: 16,
798
- class: "lucide lucide-pencil text-gray-500"
799
- }),
800
- n("span", null, V(D.value), 1)
801
- ])
802
- ], 4)) : q("", !0)
803
- ])),
804
- U(M(p), {
805
- teleport: "#modal",
806
- visible: h.value,
807
- "onUpdate:visible": s[2] || (s[2] = (u) => h.value = u),
808
- title: o.value,
809
- size: "lg"
810
- }, {
811
- footer: Z(() => [
812
- n("div", rt, [
813
- n("button", {
814
- type: "button",
815
- class: "px-4 py-2 rounded bg-gray-100 text-gray-700",
816
- onClick: ue,
817
- disabled: k.value
818
- }, " Скасувати ", 8, st),
819
- n("button", {
820
- type: "button",
821
- class: "px-4 py-2 rounded bg-blue-600 text-white",
822
- onClick: we,
823
- disabled: k.value
824
- }, V(k.value ? "Зберігається…" : "Зберегти"), 9, it)
825
- ])
826
- ]),
827
- default: Z(() => [
828
- P.value ? (c(), v("div", nt, " Завантаження форми редагування… ")) : A.value ? (c(), v("div", ot, V(A.value), 1)) : (c(), re(M(R), {
829
- key: 2,
830
- values: B.value,
831
- "onUpdate:values": s[0] || (s[0] = (u) => B.value = u),
832
- form: T.value,
833
- "onUpdate:form": s[1] || (s[1] = (u) => T.value = u),
834
- schema: x.value
835
- }, null, 8, ["values", "form", "schema"]))
836
- ]),
837
- _: 1
838
- }, 8, ["visible", "title"])
839
- ], 512));
840
- }
841
- });
842
- export {
843
- gt as _,
844
- bt as a,
845
- ft as b,
846
- yt as c
847
- };