@opengis/surveyor 0.0.16 → 0.0.17
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/CHANGELOG.md +5 -0
- package/README.md +16 -0
- package/dist/chunks/{AppealDetailField-DNRGpnyD.js → AppealDetailField-ByK9ZqR4.js} +2 -2
- package/dist/chunks/{AppealStatusBadge-7KruOSVI.js → AppealStatusBadge-DzMn4RVy.js} +10 -10
- package/dist/chunks/{ApplicationGeometryExportModal-DJbnKPm6.js → ApplicationGeometryExportModal-Cu6QmJjm.js} +159 -159
- package/dist/chunks/{MapLayerMenu-AUeTqgEp.js → MapLayerMenu-B0TEoCJm.js} +3 -3
- package/dist/chunks/{RegistryForm-BlK1lExt.js → RegistryForm-Dpis_ncj.js} +2 -2
- package/dist/chunks/{RegistryFormModal-BmBsUOF3.js → RegistryFormModal-CH4DbTvC.js} +2 -2
- package/dist/chunks/{RegistryToolbar-DXOEcD84.js → RegistryToolbar-DisEejvi.js} +3 -3
- package/dist/chunks/{TablePagination-CUtnDQQ_.js → TablePagination-thQkE5iA.js} +5 -5
- package/dist/chunks/{card-B113dNzv.js → card-BCMJyzgE.js} +27 -27
- package/dist/chunks/{card-COmcUdms.js → card-BiKSZfYj.js} +1 -1
- package/dist/chunks/{card-_YyJbLNI.js → card-Cs8_8A8i.js} +8 -8
- package/dist/chunks/{card-DEJs9IIP.js → card-DVuqR0rL.js} +8 -8
- package/dist/chunks/{card-Deae73xd.js → card-n83dNORm.js} +18 -18
- package/dist/chunks/{card-VnUCFC7v.js → card-u5I--_Gb.js} +13 -13
- package/dist/chunks/{certificates-DHf1zGQs.js → certificates-CDunSANR.js} +12 -12
- package/dist/chunks/{create-BVPqfJOb.js → create-DQPxIZMW.js} +1 -1
- package/dist/chunks/{forgot-DoG6vXhq.js → forgot-DfsFu-yY.js} +6 -6
- package/dist/chunks/{login-BWGylcSU.js → login-Dl0nTWs9.js} +6 -6
- package/dist/chunks/{map-BZi4eVl3.js → map-BoHEgBCw.js} +54 -54
- package/dist/chunks/{map-layers-CKZK50de.js → map-layers-CRE8lZzH.js} +8 -8
- package/dist/chunks/{organizations-DYGfYfHS.js → organizations-D6aazMAe.js} +14 -14
- package/dist/chunks/{registration-3GLgq-ae.js → registration-BSz1iLbO.js} +6 -6
- package/dist/chunks/{requests-v1jHarHb.js → requests-B9Ejt4av.js} +11 -11
- package/dist/chunks/{reset-CP9LsLkC.js → reset-D5G0x5Zi.js} +6 -6
- package/dist/chunks/{users-frk3gmmd.js → users-DMe6JYI0.js} +10 -10
- package/dist/index.css +1 -2
- package/dist/index.js +19 -19
- package/package.json +80 -83
|
@@ -4,12 +4,12 @@ import { a as n, c as r, i, n as a, r as o, t as s, u as c } from "./appealMapLa
|
|
|
4
4
|
import { t as l } from "./application_status-BhNGiY2I.js";
|
|
5
5
|
import { a as u, d, i as f, l as p, r as m, s as h, t as g, u as _ } from "./mapLayersApi-CBLcbADa.js";
|
|
6
6
|
import { i as v, n as y, t as b } from "./geometry-DyhIVRcw.js";
|
|
7
|
-
import { t as ee } from "./MapLayerMenu-
|
|
7
|
+
import { t as ee } from "./MapLayerMenu-B0TEoCJm.js";
|
|
8
8
|
import { Fragment as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createVNode as D, defineComponent as O, mergeModels as k, nextTick as te, normalizeClass as A, normalizeStyle as j, onBeforeUnmount as M, onMounted as ne, onUnmounted as re, openBlock as N, ref as P, renderList as F, shallowRef as ie, toDisplayString as I, useModel as L, vModelText as ae, watch as R, withCtx as z, withDirectives as B, withModifiers as V } from "vue";
|
|
9
9
|
import { ChevronDown as H, Crosshair as oe, History as U, MapPin as se, MapPinned as ce, MessageSquare as W, Send as G, ZoomIn as le, ZoomOut as ue } from "lucide-vue-next";
|
|
10
10
|
import { VsInputRichtext as K } from "@opengis/form";
|
|
11
11
|
//#region shared/map/components/AppealDetailMap.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
12
|
+
var de = "appeal-map-popup-style", q = /*@__PURE__*/ O({
|
|
13
13
|
__name: "AppealDetailMap",
|
|
14
14
|
props: {
|
|
15
15
|
geom: {
|
|
@@ -79,8 +79,8 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
79
79
|
};
|
|
80
80
|
M.value = [r, ...t], F.value = M.value.filter((e) => e.defaultVisible).map((e) => e.id);
|
|
81
81
|
}
|
|
82
|
-
let B = null, V, H = null, U = null, W = !1, G = S(() => v(l.geom)), K = S(() => G.value ? y(G.value) : null),
|
|
83
|
-
function
|
|
82
|
+
let B = null, V, H = null, U = null, W = !1, G = S(() => v(l.geom)), K = S(() => G.value ? y(G.value) : null), q = S(() => K.value ? b(K.value) : null), fe = S(() => l.variant === "panel" ? "relative min-h-[320px] w-full flex-1" : ["relative w-full transition-all duration-300", l.expanded ? "h-[520px]" : "h-[340px]"]);
|
|
83
|
+
function pe() {
|
|
84
84
|
return {
|
|
85
85
|
type: "FeatureCollection",
|
|
86
86
|
features: G.value ? [{
|
|
@@ -90,14 +90,14 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
90
90
|
}] : []
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function J(e) {
|
|
94
94
|
K.value && e.fitBounds(K.value, {
|
|
95
95
|
...E,
|
|
96
96
|
duration: 500
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
let n =
|
|
99
|
+
function Y(e, t) {
|
|
100
|
+
let n = pe(), r = e.getSource(x);
|
|
101
101
|
r?.setData ? r.setData(n) : (e.addSource(x, {
|
|
102
102
|
type: "geojson",
|
|
103
103
|
data: n
|
|
@@ -117,9 +117,9 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
117
117
|
"line-color": "#2563eb",
|
|
118
118
|
"line-width": 3
|
|
119
119
|
}
|
|
120
|
-
})),
|
|
120
|
+
})), _e(e, t), ve(e, t);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function me(e, t) {
|
|
123
123
|
let n = e.trim(), r = n.match(/^(.+?)\s*\(([^)]+)\)\s*,?\s*(.*)$/);
|
|
124
124
|
if (r) {
|
|
125
125
|
let e = r[1].trim(), t = r[2].trim();
|
|
@@ -147,31 +147,31 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
147
147
|
subtitle: t?.trim() || ""
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function he() {
|
|
151
151
|
let e = l.address?.trim(), t = l.location?.trim(), n = !!(e && e !== "—"), r = !!(t && t !== "—");
|
|
152
|
-
return !n && !r ? null : n ?
|
|
152
|
+
return !n && !r ? null : n ? me(e, r ? t : void 0) : {
|
|
153
153
|
title: t,
|
|
154
154
|
subtitle: ""
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function ge() {
|
|
158
158
|
let e = document.createElement("div");
|
|
159
159
|
return e.className = "appeal-map-pin", e.innerHTML = "\n <svg width=\"28\" height=\"36\" viewBox=\"0 0 28 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M14 0C6.268 0 0 6.268 0 14c0 10.5 14 22 14 22s14-11.5 14-22C28 6.268 21.732 0 14 0z\" fill=\"#2563EB\"/>\n <circle cx=\"14\" cy=\"14\" r=\"5.5\" fill=\"white\"/>\n </svg>\n ", e;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
U?.remove(), U = null,
|
|
163
|
-
element:
|
|
161
|
+
function _e(e, t) {
|
|
162
|
+
U?.remove(), U = null, q.value && (U = new t.Marker({
|
|
163
|
+
element: ge(),
|
|
164
164
|
anchor: "bottom"
|
|
165
|
-
}).setLngLat(
|
|
165
|
+
}).setLngLat(q.value).addTo(e));
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
let e = document.getElementById(
|
|
169
|
-
e.id =
|
|
167
|
+
function X() {
|
|
168
|
+
let e = document.getElementById(de) ?? document.createElement("style");
|
|
169
|
+
e.id = de, e.textContent = "\n.appeal-map-popup .maplibregl-popup-content {\n min-width: 0;\n padding: 8px 8px 8px 10px !important;\n margin: 0;\n border: 1px solid #e2e8f0 !important;\n border-radius: 14px !important;\n background: #fff !important;\n box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06) !important;\n}\n.appeal-map-popup .maplibregl-popup-tip {\n width: 0 !important;\n height: 0 !important;\n border: 8px solid transparent !important;\n}\n.appeal-map-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {\n border-top-color: #fff !important;\n border-bottom-width: 0 !important;\n}\n.appeal-map-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip {\n border-bottom-color: #fff !important;\n border-top-width: 0 !important;\n}\n.appeal-map-popup-body {\n position: relative;\n display: block;\n max-width: 260px;\n margin: 0 !important;\n padding: 2px 28px 2px 2px !important;\n text-align: left;\n}\n.appeal-map-popup-text {\n min-width: 0;\n margin: 0 !important;\n padding: 2px 0 !important;\n}\n.appeal-map-popup-title {\n margin: 0 !important;\n padding: 0 !important;\n font-size: 13px !important;\n font-weight: 600 !important;\n line-height: 1.35 !important;\n color: #0f172a !important;\n}\n.appeal-map-popup-subtitle {\n margin: 2px 0 0 !important;\n padding: 0 !important;\n font-size: 12px !important;\n font-weight: 400 !important;\n line-height: 1.35 !important;\n color: #64748b !important;\n}\n.appeal-map-popup-close,\n.appeal-map-popup-close:focus,\n.appeal-map-popup-close:focus-visible,\n.appeal-map-popup-close:active {\n position: absolute !important;\n top: -6px !important;\n right: -6px !important;\n display: flex !important;\n align-items: center;\n justify-content: center;\n width: 20px !important;\n height: 20px !important;\n padding: 0 !important;\n margin: 0 !important;\n border: 0 !important;\n border-radius: 6px !important;\n background: transparent !important;\n color: #94a3b8 !important;\n opacity: 1 !important;\n outline: none !important;\n outline-offset: 0 !important;\n box-shadow: none !important;\n appearance: none !important;\n -webkit-appearance: none !important;\n cursor: pointer !important;\n}\n.appeal-map-popup-close::-moz-focus-inner {\n border: 0 !important;\n padding: 0 !important;\n}\n.appeal-map-popup-close svg {\n display: block;\n width: 12px !important;\n height: 12px !important;\n}\n.appeal-map-popup-close:hover {\n background: #f1f5f9 !important;\n color: #334155 !important;\n}\n", e.parentNode || document.head.appendChild(e);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
|
|
173
|
-
let n =
|
|
174
|
-
if (!
|
|
171
|
+
function ve(e, t) {
|
|
172
|
+
X(), H?.remove(), H = null;
|
|
173
|
+
let n = he();
|
|
174
|
+
if (!q.value || !n) return;
|
|
175
175
|
let { title: r, subtitle: i } = n, a = document.createElement("div");
|
|
176
176
|
a.className = "appeal-map-popup-body";
|
|
177
177
|
let o = document.createElement("div");
|
|
@@ -191,22 +191,22 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
191
191
|
maxWidth: "280px",
|
|
192
192
|
className: "appeal-map-popup",
|
|
193
193
|
anchor: "bottom"
|
|
194
|
-
}).setLngLat(
|
|
194
|
+
}).setLngLat(q.value).setDOMContent(a).addTo(e);
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function Z(e) {
|
|
197
197
|
u(e, I(N.value), f(e, M.value, [C]));
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Q(e) {
|
|
200
200
|
h(e, M.value, F.value, C);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function ye(e) {
|
|
203
203
|
N.value !== e && (N.value = e);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function be(e) {
|
|
206
206
|
let t = F.value;
|
|
207
207
|
F.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function xe() {
|
|
210
210
|
let e = B, t = O.value, n = D.value;
|
|
211
211
|
if (!e || !t || !n || k.value || n.clientWidth === 0 || n.clientHeight === 0) return;
|
|
212
212
|
let r = new e.Map({
|
|
@@ -223,26 +223,26 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
223
223
|
locale: _
|
|
224
224
|
});
|
|
225
225
|
r.on("load", () => {
|
|
226
|
-
r.resize(),
|
|
226
|
+
r.resize(), Y(r, e), Q(r), A.value = !1;
|
|
227
227
|
}), r.on("error", (e) => {
|
|
228
228
|
console.warn("[AppealDetailMap]", e?.error ?? e);
|
|
229
229
|
}), k.value = r;
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Se() {
|
|
232
232
|
k.value?.zoomIn({ duration: 250 });
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Ce() {
|
|
235
235
|
k.value?.zoomOut({ duration: 250 });
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function we() {
|
|
238
238
|
let e = k.value;
|
|
239
|
-
e &&
|
|
239
|
+
e && J(e);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function Te() {
|
|
242
242
|
let e = k.value, t = B;
|
|
243
243
|
if (!e || !t) return;
|
|
244
244
|
let n = () => {
|
|
245
|
-
|
|
245
|
+
Y(e, t), J(e);
|
|
246
246
|
};
|
|
247
247
|
e.isStyleLoaded() ? n() : e.once("load", n);
|
|
248
248
|
}
|
|
@@ -250,10 +250,10 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
250
250
|
G.value,
|
|
251
251
|
l.address,
|
|
252
252
|
l.location
|
|
253
|
-
],
|
|
253
|
+
], Te), R(N, () => {
|
|
254
254
|
let e = k.value;
|
|
255
255
|
if (!e) return;
|
|
256
|
-
let t = () =>
|
|
256
|
+
let t = () => Z(e);
|
|
257
257
|
e.isStyleLoaded() ? t() : e.once("load", t);
|
|
258
258
|
}), R(F, () => {
|
|
259
259
|
let e = k.value;
|
|
@@ -267,12 +267,12 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
269
|
!W && D.value && (V = new ResizeObserver(() => {
|
|
270
|
-
k.value ? k.value.resize() :
|
|
270
|
+
k.value ? k.value.resize() : xe();
|
|
271
271
|
}), V.observe(D.value));
|
|
272
272
|
}), re(() => {
|
|
273
273
|
W = !0, V?.disconnect(), H?.remove(), H = null, U?.remove(), U = null, k.value?.remove(), k.value = null;
|
|
274
274
|
});
|
|
275
|
-
let
|
|
275
|
+
let $ = {
|
|
276
276
|
props: l,
|
|
277
277
|
POLYGON_SOURCE_ID: x,
|
|
278
278
|
POLYGON_FILL_ID: C,
|
|
@@ -324,27 +324,27 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
324
324
|
},
|
|
325
325
|
geometry: G,
|
|
326
326
|
bounds: K,
|
|
327
|
-
center:
|
|
328
|
-
mapAreaClass:
|
|
329
|
-
buildGeoJson:
|
|
330
|
-
fitToGeometry:
|
|
331
|
-
ensureLayers:
|
|
332
|
-
splitAddressLabel:
|
|
333
|
-
resolvePopupText:
|
|
334
|
-
createPinElement:
|
|
335
|
-
showAddressMarker:
|
|
336
|
-
POPUP_STYLE_ID:
|
|
337
|
-
ensurePopupStyles:
|
|
338
|
-
showAddressPopup:
|
|
339
|
-
remountBasemap:
|
|
340
|
-
remountOverlays:
|
|
341
|
-
selectBase:
|
|
342
|
-
toggleOverlay:
|
|
343
|
-
initMap:
|
|
344
|
-
zoomIn:
|
|
345
|
-
zoomOut:
|
|
346
|
-
resetView:
|
|
347
|
-
refreshLayers:
|
|
327
|
+
center: q,
|
|
328
|
+
mapAreaClass: fe,
|
|
329
|
+
buildGeoJson: pe,
|
|
330
|
+
fitToGeometry: J,
|
|
331
|
+
ensureLayers: Y,
|
|
332
|
+
splitAddressLabel: me,
|
|
333
|
+
resolvePopupText: he,
|
|
334
|
+
createPinElement: ge,
|
|
335
|
+
showAddressMarker: _e,
|
|
336
|
+
POPUP_STYLE_ID: de,
|
|
337
|
+
ensurePopupStyles: X,
|
|
338
|
+
showAddressPopup: ve,
|
|
339
|
+
remountBasemap: Z,
|
|
340
|
+
remountOverlays: Q,
|
|
341
|
+
selectBase: ye,
|
|
342
|
+
toggleOverlay: be,
|
|
343
|
+
initMap: xe,
|
|
344
|
+
zoomIn: Se,
|
|
345
|
+
zoomOut: Ce,
|
|
346
|
+
resetView: we,
|
|
347
|
+
refreshLayers: Te,
|
|
348
348
|
get Crosshair() {
|
|
349
349
|
return oe;
|
|
350
350
|
},
|
|
@@ -362,31 +362,31 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
362
362
|
},
|
|
363
363
|
MapLayerMenu: ee
|
|
364
364
|
};
|
|
365
|
-
return Object.defineProperty(
|
|
365
|
+
return Object.defineProperty($, "__isScriptSetup", {
|
|
366
366
|
enumerable: !1,
|
|
367
367
|
value: !0
|
|
368
|
-
}),
|
|
368
|
+
}), $;
|
|
369
369
|
}
|
|
370
|
-
}),
|
|
370
|
+
}), fe = {
|
|
371
371
|
key: 0,
|
|
372
372
|
class: "flex shrink-0 items-center justify-between border-b border-slate-100 px-5 py-3.5"
|
|
373
|
-
},
|
|
373
|
+
}, pe = { class: "flex items-center gap-2.5" }, J = {
|
|
374
374
|
ref: "containerRef",
|
|
375
375
|
class: "absolute inset-0 h-full w-full"
|
|
376
|
-
},
|
|
376
|
+
}, Y = {
|
|
377
377
|
key: 0,
|
|
378
378
|
class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/90 px-4 text-center text-sm text-red-600"
|
|
379
|
-
},
|
|
379
|
+
}, me = {
|
|
380
380
|
key: 1,
|
|
381
381
|
class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/80 text-sm text-slate-500"
|
|
382
|
-
},
|
|
382
|
+
}, he = { class: "absolute right-3 top-3 z-10 flex flex-col gap-1.5" }, ge = {
|
|
383
383
|
key: 1,
|
|
384
384
|
class: "flex shrink-0 items-center gap-2 border-t border-slate-100 px-5 py-2.5 text-xs text-slate-400"
|
|
385
|
-
},
|
|
386
|
-
function
|
|
387
|
-
return N(), T("div", { class: A(n.variant === "panel" ? "flex h-full flex-col rounded-xl border border-slate-200 bg-white shadow-
|
|
388
|
-
n.variant === "panel" ? (N(), T("header",
|
|
389
|
-
class: "h-[18px] w-[18px] text-
|
|
385
|
+
}, _e = { class: "break-words" };
|
|
386
|
+
function X(e, t, n, r, i, a) {
|
|
387
|
+
return N(), T("div", { class: A(n.variant === "panel" ? "flex h-full flex-col rounded-xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : void 0) }, [
|
|
388
|
+
n.variant === "panel" ? (N(), T("header", fe, [E("div", pe, [D(r.MapPinned, {
|
|
389
|
+
class: "h-[18px] w-[18px] text-[#1f5ae0]",
|
|
390
390
|
"stroke-width": 2,
|
|
391
391
|
"aria-hidden": "true"
|
|
392
392
|
}), t[0] ||= E("h2", { class: "text-[15px] font-semibold text-slate-800" }, "Інтерактивна карта", -1)]), t[1] ||= E("span", { class: "rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-500" }, " Межі заявки ", -1)])) : w("", !0),
|
|
@@ -394,8 +394,8 @@ function Z(e, t, n, r, i, a) {
|
|
|
394
394
|
ref: "mapAreaRef",
|
|
395
395
|
class: A(r.mapAreaClass)
|
|
396
396
|
}, [
|
|
397
|
-
E("div",
|
|
398
|
-
r.mapLoadError ? (N(), T("p",
|
|
397
|
+
E("div", J, null, 512),
|
|
398
|
+
r.mapLoadError ? (N(), T("p", Y, I(r.mapLoadError), 1)) : r.mapLoading ? (N(), T("p", me, " Завантаження карти… ")) : w("", !0),
|
|
399
399
|
D(r.MapLayerMenu, {
|
|
400
400
|
"base-id": r.activeBaseId,
|
|
401
401
|
"active-overlay-ids": r.activeOverlayIds,
|
|
@@ -409,12 +409,12 @@ function Z(e, t, n, r, i, a) {
|
|
|
409
409
|
"base-layers",
|
|
410
410
|
"overlays"
|
|
411
411
|
]),
|
|
412
|
-
E("div",
|
|
412
|
+
E("div", he, [
|
|
413
413
|
E("button", {
|
|
414
414
|
type: "button",
|
|
415
415
|
title: "Збільшити",
|
|
416
416
|
"aria-label": "Збільшити",
|
|
417
|
-
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-
|
|
417
|
+
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-colors hover:bg-[#eef6ff] hover:text-[#1f5ae0]",
|
|
418
418
|
onClick: r.zoomIn
|
|
419
419
|
}, [D(r.ZoomIn, {
|
|
420
420
|
class: "h-4 w-4",
|
|
@@ -425,7 +425,7 @@ function Z(e, t, n, r, i, a) {
|
|
|
425
425
|
type: "button",
|
|
426
426
|
title: "Зменшити",
|
|
427
427
|
"aria-label": "Зменшити",
|
|
428
|
-
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-
|
|
428
|
+
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-colors hover:bg-[#eef6ff] hover:text-[#1f5ae0]",
|
|
429
429
|
onClick: r.zoomOut
|
|
430
430
|
}, [D(r.ZoomOut, {
|
|
431
431
|
class: "h-4 w-4",
|
|
@@ -436,7 +436,7 @@ function Z(e, t, n, r, i, a) {
|
|
|
436
436
|
type: "button",
|
|
437
437
|
title: "Відновити масштаб",
|
|
438
438
|
"aria-label": "Відновити масштаб",
|
|
439
|
-
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-
|
|
439
|
+
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-colors hover:bg-[#eef6ff] hover:text-[#1f5ae0]",
|
|
440
440
|
onClick: r.resetView
|
|
441
441
|
}, [D(r.Crosshair, {
|
|
442
442
|
class: "h-4 w-4",
|
|
@@ -445,7 +445,7 @@ function Z(e, t, n, r, i, a) {
|
|
|
445
445
|
})])
|
|
446
446
|
])
|
|
447
447
|
], 2),
|
|
448
|
-
n.variant === "panel" ? (N(), T("footer",
|
|
448
|
+
n.variant === "panel" ? (N(), T("footer", ge, [
|
|
449
449
|
D(r.MapPin, {
|
|
450
450
|
class: "h-3 w-3 shrink-0",
|
|
451
451
|
"stroke-width": 2,
|
|
@@ -453,21 +453,21 @@ function Z(e, t, n, r, i, a) {
|
|
|
453
453
|
}),
|
|
454
454
|
E("span", null, "Площа ділянки: " + I(n.area ?? "—") + " га", 1),
|
|
455
455
|
t[2] ||= E("span", { class: "text-slate-300" }, "·", -1),
|
|
456
|
-
E("span",
|
|
456
|
+
E("span", _e, I(n.location), 1)
|
|
457
457
|
])) : w("", !0)
|
|
458
458
|
], 2);
|
|
459
459
|
}
|
|
460
|
-
var
|
|
461
|
-
["render",
|
|
460
|
+
var ve = /*#__PURE__*/ e(q, [
|
|
461
|
+
["render", X],
|
|
462
462
|
["__scopeId", "data-v-ded53fc4"],
|
|
463
463
|
["__file", "C:/softpro/surveyor/shared/map/components/AppealDetailMap.vue"]
|
|
464
464
|
]);
|
|
465
465
|
//#endregion
|
|
466
466
|
//#region shared/comments/applicationNotesApi.ts
|
|
467
|
-
function
|
|
467
|
+
function Z(e, t, n) {
|
|
468
468
|
return `/api/resource/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${n}`;
|
|
469
469
|
}
|
|
470
|
-
async function
|
|
470
|
+
async function Q(e) {
|
|
471
471
|
let t = await e.text();
|
|
472
472
|
try {
|
|
473
473
|
let n = JSON.parse(t);
|
|
@@ -476,39 +476,39 @@ async function $(e) {
|
|
|
476
476
|
return t || `HTTP ${e.status}`;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
async function
|
|
480
|
-
let n = "".replace(/\/$/, ""), r = await fetch(`${n}${
|
|
481
|
-
if (!r.ok) throw Error(await
|
|
479
|
+
async function ye(e, t) {
|
|
480
|
+
let n = "".replace(/\/$/, ""), r = await fetch(`${n}${Z(e, t, "comments")}`, { credentials: "include" });
|
|
481
|
+
if (!r.ok) throw Error(await Q(r));
|
|
482
482
|
return [...(await r.json()).rows ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")));
|
|
483
483
|
}
|
|
484
|
-
async function
|
|
484
|
+
async function be(e, t, n) {
|
|
485
485
|
let r = n.trim();
|
|
486
486
|
if (!r) throw Error("Введіть текст коментаря");
|
|
487
|
-
let i = "".replace(/\/$/, ""), a = await fetch(`${i}${
|
|
487
|
+
let i = "".replace(/\/$/, ""), a = await fetch(`${i}${Z(e, t, "notes")}`, {
|
|
488
488
|
method: "POST",
|
|
489
489
|
credentials: "include",
|
|
490
490
|
headers: { "Content-Type": "application/json" },
|
|
491
491
|
body: JSON.stringify({ body: r })
|
|
492
492
|
});
|
|
493
|
-
if (!a.ok) throw Error(await
|
|
493
|
+
if (!a.ok) throw Error(await Q(a));
|
|
494
494
|
return a.json();
|
|
495
495
|
}
|
|
496
496
|
//#endregion
|
|
497
497
|
//#region shared/comments/noteDisplay.ts
|
|
498
|
-
function
|
|
498
|
+
function xe(e) {
|
|
499
499
|
return e.split(/\s+/).map((e) => e[0]).filter(Boolean).join("").slice(0, 2).toUpperCase();
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function Se(e) {
|
|
502
502
|
if (!e) return "";
|
|
503
503
|
let t = e.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})/);
|
|
504
504
|
if (t) return `${t[3]}.${t[2]}.${t[1]} ${t[4]}:${t[5]}`;
|
|
505
505
|
let n = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
506
506
|
return n ? `${n[3]}.${n[2]}.${n[1]}` : e;
|
|
507
507
|
}
|
|
508
|
-
var
|
|
508
|
+
var Ce = {
|
|
509
509
|
name: "Невідомий користувач",
|
|
510
510
|
initials: "НК"
|
|
511
|
-
},
|
|
511
|
+
}, we = /* @__PURE__ */ new Set(/* @__PURE__ */ "A.B.BLOCKQUOTE.BR.CODE.DEL.EM.H1.H2.H3.H4.H5.H6.HR.I.IMG.LI.MARK.OL.P.PRE.S.SPAN.STRONG.SUB.SUP.TABLE.TBODY.TD.TH.THEAD.TR.U.UL".split(".")), Te = /* @__PURE__ */ new Set([
|
|
512
512
|
"SCRIPT",
|
|
513
513
|
"STYLE",
|
|
514
514
|
"IFRAME",
|
|
@@ -517,7 +517,7 @@ var Se = {
|
|
|
517
517
|
"LINK",
|
|
518
518
|
"META"
|
|
519
519
|
]);
|
|
520
|
-
function
|
|
520
|
+
function $(e) {
|
|
521
521
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
522
522
|
}
|
|
523
523
|
function Ee(e, t) {
|
|
@@ -546,11 +546,11 @@ function ke(e) {
|
|
|
546
546
|
continue;
|
|
547
547
|
}
|
|
548
548
|
let e = t;
|
|
549
|
-
if (
|
|
549
|
+
if (Te.has(e.tagName)) {
|
|
550
550
|
e.remove();
|
|
551
551
|
continue;
|
|
552
552
|
}
|
|
553
|
-
if (ke(e), !
|
|
553
|
+
if (ke(e), !we.has(e.tagName)) {
|
|
554
554
|
e.replaceWith(...e.childNodes);
|
|
555
555
|
continue;
|
|
556
556
|
}
|
|
@@ -562,7 +562,7 @@ function Ae(e) {
|
|
|
562
562
|
}
|
|
563
563
|
function je(e) {
|
|
564
564
|
let t = e ?? "";
|
|
565
|
-
if (!/<\/?[a-z][\s\S]*?>/i.test(t)) return
|
|
565
|
+
if (!/<\/?[a-z][\s\S]*?>/i.test(t)) return $(t).replace(/\n/g, "<br>");
|
|
566
566
|
let n = new DOMParser().parseFromString(t, "text/html");
|
|
567
567
|
return ke(n.body), n.body.innerHTML;
|
|
568
568
|
}
|
|
@@ -571,7 +571,7 @@ function Me(e) {
|
|
|
571
571
|
return t ? {
|
|
572
572
|
name: "Користувач",
|
|
573
573
|
initials: t.slice(0, 2).toUpperCase()
|
|
574
|
-
} :
|
|
574
|
+
} : Ce;
|
|
575
575
|
}
|
|
576
576
|
//#endregion
|
|
577
577
|
//#region shared/comments/ApplicationCommentsSection.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -616,7 +616,7 @@ var Ne = /*@__PURE__*/ O({
|
|
|
616
616
|
"link",
|
|
617
617
|
"clear_formatting",
|
|
618
618
|
"help"
|
|
619
|
-
], r = e, i = P([]), a = P({}), o = P(!0), s = P(""), c = P(""), l = P(!1), u = P(""), d = S(() => r.variant === "admin"), f = S(() => Ae(c.value) && !l.value), p = S(() => d.value ? "rounded-2xl border border-slate-200 bg-white shadow-
|
|
619
|
+
], r = e, i = P([]), a = P({}), o = P(!0), s = P(""), c = P(""), l = P(!1), u = P(""), d = S(() => r.variant === "admin"), f = S(() => Ae(c.value) && !l.value), p = S(() => d.value ? "rounded-2xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), m = S(() => d.value ? "flex items-center gap-2.5 border-b border-slate-100 px-5 py-3.5" : "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3"), h = S(() => d.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), g = S(() => (d.value, "flex flex-col gap-4 p-5"));
|
|
620
620
|
function _(e) {
|
|
621
621
|
return a.value[e.note_id] ?? r.resolveAuthor?.(e) ?? Me(e);
|
|
622
622
|
}
|
|
@@ -624,7 +624,7 @@ var Ne = /*@__PURE__*/ O({
|
|
|
624
624
|
if (r.applicationId) {
|
|
625
625
|
o.value = !0, s.value = "";
|
|
626
626
|
try {
|
|
627
|
-
i.value = await
|
|
627
|
+
i.value = await ye(r.resource, r.applicationId), a.value = {};
|
|
628
628
|
} catch (e) {
|
|
629
629
|
i.value = [], s.value = e instanceof Error ? e.message : "Не вдалося завантажити коментарі";
|
|
630
630
|
} finally {
|
|
@@ -637,7 +637,7 @@ var Ne = /*@__PURE__*/ O({
|
|
|
637
637
|
if (Ae(e) && !l.value && r.applicationId) {
|
|
638
638
|
l.value = !0, u.value = "";
|
|
639
639
|
try {
|
|
640
|
-
let t = await
|
|
640
|
+
let t = await be(r.resource, r.applicationId, e);
|
|
641
641
|
a.value = {
|
|
642
642
|
...a.value,
|
|
643
643
|
[t.note_id]: r.currentAuthor
|
|
@@ -681,7 +681,7 @@ var Ne = /*@__PURE__*/ O({
|
|
|
681
681
|
return G;
|
|
682
682
|
},
|
|
683
683
|
get formatNoteDateTime() {
|
|
684
|
-
return
|
|
684
|
+
return Se;
|
|
685
685
|
},
|
|
686
686
|
get noteBodyHtml() {
|
|
687
687
|
return je;
|
|
@@ -700,20 +700,20 @@ var Ne = /*@__PURE__*/ O({
|
|
|
700
700
|
class: "flex flex-col gap-4"
|
|
701
701
|
}, Ie = { class: "min-w-0 flex-1" }, Le = { class: "flex flex-wrap items-baseline justify-between gap-x-2" }, Re = { class: "text-[14px] font-semibold text-slate-800" }, ze = { class: "text-xs text-slate-400" }, Be = {
|
|
702
702
|
key: 0,
|
|
703
|
-
class: "mb-1.5 text-xs font-medium text-
|
|
703
|
+
class: "mb-1.5 text-xs font-medium text-[#1f5ae0]"
|
|
704
704
|
}, Ve = ["innerHTML"], He = {
|
|
705
705
|
key: 1,
|
|
706
706
|
class: "rounded-xl bg-gray-50 px-4 py-3"
|
|
707
707
|
}, Ue = { class: "mb-1 flex items-center justify-between gap-2" }, We = { class: "text-xs font-semibold text-gray-800" }, Ge = { class: "text-xs text-gray-400" }, Ke = {
|
|
708
708
|
key: 0,
|
|
709
709
|
class: "mb-1 text-xs font-medium text-[#2663EB]"
|
|
710
|
-
}, qe = ["innerHTML"], Je = { class: "min-w-0 flex-1" }, Ye = { class: "mt-2 flex justify-end" },
|
|
710
|
+
}, qe = ["innerHTML"], Je = { class: "min-w-0 flex-1" }, Ye = { class: "!h-full overflow-hidden" }, Xe = { class: "mt-2 flex justify-end" }, Ze = ["disabled", "aria-label"], Qe = { key: 0 }, $e = {
|
|
711
711
|
key: 2,
|
|
712
712
|
class: "text-xs text-red-600"
|
|
713
713
|
};
|
|
714
|
-
function
|
|
714
|
+
function et(e, t, n, r, i, a) {
|
|
715
715
|
return N(), T("section", { class: A(r.sectionClass) }, [E("header", { class: A(r.headerClass) }, [D(r.MessageSquare, {
|
|
716
|
-
class: A(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-
|
|
716
|
+
class: A(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-[#1f5ae0]" : "h-3.5 w-3.5 text-gray-400"]),
|
|
717
717
|
"stroke-width": 2,
|
|
718
718
|
"aria-hidden": "true"
|
|
719
719
|
}, null, 8, ["class"]), E("h2", { class: A(r.titleClass) }, "Коментарі", 2)], 2), E("div", { class: A(r.bodyClass) }, [r.loading ? (N(), T("p", {
|
|
@@ -726,7 +726,7 @@ function $e(e, t, n, r, i, a) {
|
|
|
726
726
|
}, " Коментарів ще немає ", 2)) : (N(), T("ul", Fe, [(N(!0), T(x, null, F(r.notes, (e) => (N(), T("li", {
|
|
727
727
|
key: e.note_id,
|
|
728
728
|
class: "flex gap-3"
|
|
729
|
-
}, [E("div", { class: A(["flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-[13px] font-semibold", r.isAdmin ? "bg-
|
|
729
|
+
}, [E("div", { class: A(["flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-[13px] font-semibold", r.isAdmin ? "bg-[#d9eaff] text-[#1a46b8]" : "bg-[#2663EB] text-white text-xs"]) }, I(r.authorFor(e).initials), 3), E("div", Ie, [r.isAdmin ? (N(), T(x, { key: 0 }, [
|
|
730
730
|
E("div", Le, [E("span", Re, I(r.authorFor(e).name), 1), E("time", ze, I(r.formatNoteDateTime(e.created_at)), 1)]),
|
|
731
731
|
r.authorFor(e).role ? (N(), T("p", Be, I(r.authorFor(e).role), 1)) : w("", !0),
|
|
732
732
|
E("div", {
|
|
@@ -741,7 +741,7 @@ function $e(e, t, n, r, i, a) {
|
|
|
741
741
|
innerHTML: r.noteBodyHtml(e.body)
|
|
742
742
|
}, null, 8, qe)
|
|
743
743
|
]))])]))), 128))])),
|
|
744
|
-
E("div", { class: A(["flex items-start gap-3 border-t pt-4", r.isAdmin ? "border-slate-100" : "border-gray-100"]) }, [E("div", { class: A(["mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold", r.isAdmin ? "bg-
|
|
744
|
+
E("div", { class: A(["flex items-start gap-3 border-t pt-4", r.isAdmin ? "border-slate-100" : "border-gray-100"]) }, [E("div", { class: A(["mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold", r.isAdmin ? "bg-[#d9eaff] text-[#1a46b8]" : "bg-[#2663EB] text-white"]) }, I(n.currentAuthor.initials), 3), E("div", Je, [E("div", Ye, [D(r.VsInputRichtext, {
|
|
745
745
|
modelValue: r.draft,
|
|
746
746
|
"onUpdate:modelValue": t[0] ||= (e) => r.draft = e,
|
|
747
747
|
disabled: r.sending,
|
|
@@ -755,24 +755,24 @@ function $e(e, t, n, r, i, a) {
|
|
|
755
755
|
"disabled",
|
|
756
756
|
"placeholder",
|
|
757
757
|
"richtext-props"
|
|
758
|
-
]), E("div",
|
|
758
|
+
])]), E("div", Xe, [E("button", {
|
|
759
759
|
type: "button",
|
|
760
760
|
disabled: !r.canSend,
|
|
761
761
|
onClick: r.submit,
|
|
762
762
|
"aria-label": r.isAdmin ? void 0 : "Надіслати",
|
|
763
|
-
class: A(r.isAdmin ? "inline-flex items-center gap-1.5 rounded-lg bg-
|
|
763
|
+
class: A(r.isAdmin ? "inline-flex items-center gap-1.5 rounded-lg bg-[#1f5ae0] px-4 py-2.5 text-sm font-medium text-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-all hover:bg-[#1a46b8] disabled:cursor-not-allowed disabled:opacity-40" : "rounded-lg bg-[#2663EB] p-1.5 text-white transition-all hover:bg-[#1d52cc] active:scale-95 disabled:cursor-not-allowed disabled:opacity-40")
|
|
764
764
|
}, [D(r.Send, {
|
|
765
765
|
class: "h-3.5 w-3.5",
|
|
766
766
|
"stroke-width": 2
|
|
767
|
-
}), r.isAdmin ? (N(), T("span",
|
|
768
|
-
r.sendError ? (N(), T("p",
|
|
767
|
+
}), r.isAdmin ? (N(), T("span", Qe, I(r.sending ? "Надсилання…" : "Надіслати"), 1)) : w("", !0)], 10, Ze)])])], 2),
|
|
768
|
+
r.sendError ? (N(), T("p", $e, I(r.sendError), 1)) : w("", !0)
|
|
769
769
|
], 64))], 2)], 2);
|
|
770
770
|
}
|
|
771
|
-
var
|
|
772
|
-
["render",
|
|
771
|
+
var tt = /*#__PURE__*/ e(Ne, [
|
|
772
|
+
["render", et],
|
|
773
773
|
["__scopeId", "data-v-0f2a55e0"],
|
|
774
774
|
["__file", "C:/softpro/surveyor/shared/comments/ApplicationCommentsSection.vue"]
|
|
775
|
-
]),
|
|
775
|
+
]), nt = /*@__PURE__*/ O({
|
|
776
776
|
__name: "ApplicationHistorySection",
|
|
777
777
|
props: {
|
|
778
778
|
items: {
|
|
@@ -788,7 +788,7 @@ var et = /*#__PURE__*/ e(Ne, [
|
|
|
788
788
|
},
|
|
789
789
|
setup(e, { expose: t }) {
|
|
790
790
|
t();
|
|
791
|
-
let n = e, r = P(!0), i = S(() => n.variant === "admin"), a = S(() => [...n.items ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")))), o = S(() => i.value ? "rounded-xl border border-slate-200 bg-white shadow-
|
|
791
|
+
let n = e, r = P(!0), i = S(() => n.variant === "admin"), a = S(() => [...n.items ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")))), o = S(() => i.value ? "rounded-xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), s = S(() => i.value ? "flex items-center gap-2.5 border-b border-slate-100 px-5 py-3.5" : "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3"), c = S(() => i.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), u = S(() => i.value ? "px-5 py-4" : "p-5");
|
|
792
792
|
function d(e, t) {
|
|
793
793
|
return t?.text?.trim() || (e ? l.items.find((t) => t.code === e)?.name ?? e : "");
|
|
794
794
|
}
|
|
@@ -827,27 +827,27 @@ var et = /*#__PURE__*/ e(Ne, [
|
|
|
827
827
|
value: !0
|
|
828
828
|
}), m;
|
|
829
829
|
}
|
|
830
|
-
}),
|
|
830
|
+
}), rt = {
|
|
831
831
|
key: 0,
|
|
832
832
|
class: "relative list-none"
|
|
833
|
-
},
|
|
834
|
-
function
|
|
833
|
+
}, it = { class: "relative z-10 mt-1 shrink-0" }, at = { class: "min-w-0 flex-1" }, ot = { class: "flex flex-wrap items-baseline justify-between gap-x-2 gap-y-1" };
|
|
834
|
+
function st(e, t, n, r, i, a) {
|
|
835
835
|
return N(), T("section", { class: A(r.sectionClass) }, [E("header", { class: A(r.headerClass) }, [D(r.History, {
|
|
836
|
-
class: A(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-
|
|
836
|
+
class: A(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-[#1f5ae0]" : "h-3.5 w-3.5 text-gray-400"]),
|
|
837
837
|
"stroke-width": 2,
|
|
838
838
|
"aria-hidden": "true"
|
|
839
839
|
}, null, 8, ["class"]), E("h2", { class: A(r.titleClass) }, "Історія", 2)], 2), E("div", { class: A(r.bodyClass) }, [E("button", {
|
|
840
840
|
type: "button",
|
|
841
|
-
class: A(["mb-3 flex w-full items-center justify-between text-xs font-medium transition-colors", r.isAdmin ? "text-slate-500 hover:text-
|
|
841
|
+
class: A(["mb-3 flex w-full items-center justify-between text-xs font-medium transition-colors", r.isAdmin ? "text-slate-500 hover:text-[#1f5ae0]" : "text-gray-500 hover:text-[#2663EB]"]),
|
|
842
842
|
onClick: t[0] ||= (e) => r.open = !r.open
|
|
843
843
|
}, [E("span", null, I(r.open ? "Згорнути" : `Розгорнути (${r.events.length} подій)`), 1), D(r.ChevronDown, {
|
|
844
844
|
class: A(["h-4 w-4 transition-transform", r.open ? "" : "rotate-180"]),
|
|
845
845
|
"aria-hidden": "true"
|
|
846
|
-
}, null, 8, ["class"])], 2), r.open && r.events.length ? (N(), T("ol",
|
|
846
|
+
}, null, 8, ["class"])], 2), r.open && r.events.length ? (N(), T("ol", rt, [t[1] ||= E("div", { class: "absolute bottom-2 left-[7px] top-2 w-px bg-slate-200" }, null, -1), (N(!0), T(x, null, F(r.events, (e, t) => (N(), T("li", {
|
|
847
847
|
key: e.history_id,
|
|
848
848
|
class: "relative flex gap-4 pb-6 last:pb-0"
|
|
849
|
-
}, [E("div",
|
|
850
|
-
E("div",
|
|
849
|
+
}, [E("div", it, [E("span", { class: A(["block h-[15px] w-[15px] rounded-full border-2 border-white", t === r.events.length - 1 ? "bg-[#3479f6]" : "bg-slate-300"]) }, null, 2)]), E("div", at, [
|
|
850
|
+
E("div", ot, [E("p", { class: A(["text-[14px] font-semibold", r.isAdmin ? "text-slate-800" : "text-gray-900"]) }, I(r.historyTitle(e)), 3), E("time", { class: A(["text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, I(r.formatDateTime(e.created_at) || "—"), 3)]),
|
|
851
851
|
e.reason ? (N(), T("p", {
|
|
852
852
|
key: 0,
|
|
853
853
|
class: A(["mt-1 text-[13px] leading-relaxed", r.isAdmin ? "text-slate-600" : "text-gray-600"])
|
|
@@ -858,10 +858,10 @@ function ot(e, t, n, r, i, a) {
|
|
|
858
858
|
class: A(["text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
|
|
859
859
|
}, " Історія відсутня. ", 2))], 2)], 2);
|
|
860
860
|
}
|
|
861
|
-
var
|
|
861
|
+
var ct = /*#__PURE__*/ e(nt, [["render", st], ["__file", "C:/softpro/surveyor/shared/history/ApplicationHistorySection.vue"]]);
|
|
862
862
|
//#endregion
|
|
863
863
|
//#region shared/export/downloadAttachmentFilename.ts
|
|
864
|
-
function
|
|
864
|
+
function lt(e, t) {
|
|
865
865
|
let n = e.match(/filename\*?=(?:UTF-8''|")?([^";]+)/i)?.[1]?.replace(/"/g, "") ?? t;
|
|
866
866
|
try {
|
|
867
867
|
return decodeURIComponent(n);
|
|
@@ -871,7 +871,7 @@ function ct(e, t) {
|
|
|
871
871
|
}
|
|
872
872
|
//#endregion
|
|
873
873
|
//#region shared/export/CrsSuggestionSelect.vue?vue&type=script&setup=true&lang.ts
|
|
874
|
-
var
|
|
874
|
+
var ut = /*@__PURE__*/ O({
|
|
875
875
|
__name: "CrsSuggestionSelect",
|
|
876
876
|
props: {
|
|
877
877
|
modelValue: {
|
|
@@ -925,7 +925,7 @@ var lt = /*@__PURE__*/ O({
|
|
|
925
925
|
left: `${d.value.left}px`,
|
|
926
926
|
width: `${d.value.width}px`,
|
|
927
927
|
top: `${d.value.bottom + 4}px`
|
|
928
|
-
} : { visibility: "hidden" }), m = S(() => i.variant === "cabinet" ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-
|
|
928
|
+
} : { visibility: "hidden" }), m = S(() => i.variant === "cabinet" ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-[#8ec1ff] bg-white text-slate-900 ring-2 ring-[#d9eaff]"), h = S(() => i.variant === "cabinet" ? "border-gray-200 bg-white text-gray-900 hover:border-gray-300" : "border-slate-200 bg-white text-slate-900 hover:border-slate-300"), g = S(() => i.variant === "cabinet" ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "bg-[#eef6ff] font-medium text-[#1a46b8]");
|
|
929
929
|
function _() {
|
|
930
930
|
d.value = c.value?.getBoundingClientRect() ?? null;
|
|
931
931
|
}
|
|
@@ -986,18 +986,18 @@ var lt = /*@__PURE__*/ O({
|
|
|
986
986
|
value: !0
|
|
987
987
|
}), w;
|
|
988
988
|
}
|
|
989
|
-
}),
|
|
989
|
+
}), dt = {
|
|
990
990
|
ref: "rootRef",
|
|
991
991
|
class: "relative"
|
|
992
|
-
},
|
|
992
|
+
}, ft = ["disabled"], pt = { class: "border-b border-slate-100 p-2" }, mt = { class: "max-h-48 overflow-y-auto" }, ht = {
|
|
993
993
|
key: 0,
|
|
994
994
|
class: "px-3 py-3 text-center text-xs text-slate-400"
|
|
995
|
-
},
|
|
995
|
+
}, gt = {
|
|
996
996
|
key: 1,
|
|
997
997
|
class: "px-3 py-3 text-center text-xs text-slate-400"
|
|
998
|
-
},
|
|
999
|
-
function
|
|
1000
|
-
return N(), T("div", null, [E("label", { class: A(["mb-1 block text-xs font-medium", n.variant === "cabinet" ? "text-gray-700" : "text-slate-500"]) }, I(n.label), 3), E("div",
|
|
998
|
+
}, _t = ["onClick"];
|
|
999
|
+
function vt(e, t, n, r, i, a) {
|
|
1000
|
+
return N(), T("div", null, [E("label", { class: A(["mb-1 block text-xs font-medium", n.variant === "cabinet" ? "text-gray-700" : "text-slate-500"]) }, I(n.label), 3), E("div", dt, [E("button", {
|
|
1001
1001
|
type: "button",
|
|
1002
1002
|
disabled: n.disabled,
|
|
1003
1003
|
class: A(["flex w-full items-center justify-between rounded-lg border px-3 py-2 text-left text-sm shadow-sm transition-all disabled:cursor-not-allowed disabled:bg-slate-50 disabled:text-slate-400", n.disabled ? "border-slate-200" : r.open ? r.triggerOpenClass : r.triggerIdleClass]),
|
|
@@ -1009,36 +1009,36 @@ function _t(e, t, n, r, i, a) {
|
|
|
1009
1009
|
stroke: "currentColor",
|
|
1010
1010
|
"stroke-width": "2",
|
|
1011
1011
|
"aria-hidden": "true"
|
|
1012
|
-
}, [...t[2] ||= [E("path", { d: "m6 9 6 6 6-6" }, null, -1)]], 2))], 10,
|
|
1012
|
+
}, [...t[2] ||= [E("path", { d: "m6 9 6 6 6-6" }, null, -1)]], 2))], 10, ft), D(r.SurveyorTeleport, null, {
|
|
1013
1013
|
default: z(() => [r.open ? (N(), T("div", {
|
|
1014
1014
|
key: 0,
|
|
1015
1015
|
ref: "panelRef",
|
|
1016
1016
|
class: "fixed z-[100] overflow-hidden rounded-lg border border-slate-200 bg-white shadow-lg",
|
|
1017
1017
|
style: j(r.dropdownStyle),
|
|
1018
1018
|
onMousedown: t[1] ||= V(() => {}, ["stop"])
|
|
1019
|
-
}, [E("div",
|
|
1019
|
+
}, [E("div", pt, [B(E("input", {
|
|
1020
1020
|
ref: "inputRef",
|
|
1021
1021
|
"onUpdate:modelValue": t[0] ||= (e) => r.query = e,
|
|
1022
1022
|
type: "text",
|
|
1023
1023
|
placeholder: "Пошук…",
|
|
1024
|
-
class: "w-full rounded-md border border-slate-200 px-3 py-1.5 text-xs outline-none focus:border-
|
|
1025
|
-
}, null, 512), [[ae, r.query]])]), E("div",
|
|
1024
|
+
class: "w-full rounded-md border border-slate-200 px-3 py-1.5 text-xs outline-none focus:border-[#8ec1ff] focus:ring-2 focus:ring-[#d9eaff]"
|
|
1025
|
+
}, null, 512), [[ae, r.query]])]), E("div", mt, [n.loading && r.filtered.length === 0 ? (N(), T("p", ht, " Завантаження… ")) : r.filtered.length === 0 ? (N(), T("p", gt, " Нічого не знайдено ")) : w("", !0), (N(!0), T(x, null, F(r.filtered, (e) => (N(), T("button", {
|
|
1026
1026
|
key: e.id,
|
|
1027
1027
|
type: "button",
|
|
1028
1028
|
class: A(["w-full px-3 py-2 text-left text-sm transition-colors hover:bg-slate-50", n.modelValue === e.id ? r.selectedOptionClass : "text-slate-700"]),
|
|
1029
1029
|
onClick: (t) => r.select(e)
|
|
1030
|
-
}, I(e.text), 11,
|
|
1030
|
+
}, I(e.text), 11, _t))), 128))])], 36)) : w("", !0)]),
|
|
1031
1031
|
_: 1
|
|
1032
1032
|
})], 512)]);
|
|
1033
1033
|
}
|
|
1034
|
-
var
|
|
1034
|
+
var yt = /*#__PURE__*/ e(ut, [["render", vt], ["__file", "C:/softpro/surveyor/shared/export/CrsSuggestionSelect.vue"]]);
|
|
1035
1035
|
//#endregion
|
|
1036
1036
|
//#region shared/export/crsUtils.ts
|
|
1037
|
-
function
|
|
1037
|
+
function bt(e) {
|
|
1038
1038
|
let t = e.trim(), n = t.match(/^EPSG:(\d+)$/i);
|
|
1039
1039
|
return n ? n[1] : t;
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function xt(e) {
|
|
1042
1042
|
let t = e.trim();
|
|
1043
1043
|
if (/^EPSG:/i.test(t)) {
|
|
1044
1044
|
let e = t.match(/^EPSG:(\d+)$/i);
|
|
@@ -1048,7 +1048,7 @@ function bt(e) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
//#endregion
|
|
1050
1050
|
//#region shared/export/loadCrsSuggest.ts
|
|
1051
|
-
function
|
|
1051
|
+
function St(e, t = (e, t) => e || `HTTP ${t}`) {
|
|
1052
1052
|
let n = 0;
|
|
1053
1053
|
function r() {
|
|
1054
1054
|
n += 1;
|
|
@@ -1074,8 +1074,8 @@ function xt(e, t = (e, t) => e || `HTTP ${t}`) {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
//#endregion
|
|
1076
1076
|
//#region shared/export/downloadApplicationGeometry.ts
|
|
1077
|
-
async function
|
|
1078
|
-
let r = new URLSearchParams({ srid:
|
|
1077
|
+
async function Ct(e, t, n) {
|
|
1078
|
+
let r = new URLSearchParams({ srid: bt(n) }), i = await fetch(e(`/api/surveyor/applications/${encodeURIComponent(t)}/export/geometry?${r}`), { credentials: "include" });
|
|
1079
1079
|
if (!i.ok) {
|
|
1080
1080
|
let e = await i.text(), t = e || `HTTP ${i.status}`;
|
|
1081
1081
|
try {
|
|
@@ -1084,12 +1084,12 @@ async function St(e, t, n) {
|
|
|
1084
1084
|
} catch {}
|
|
1085
1085
|
throw Error(t);
|
|
1086
1086
|
}
|
|
1087
|
-
let a = await i.blob(), o =
|
|
1087
|
+
let a = await i.blob(), o = lt(i.headers.get("Content-Disposition") ?? "", `boundary_${t}.geojson`), s = URL.createObjectURL(a), c = document.createElement("a");
|
|
1088
1088
|
c.href = s, c.download = o, c.click(), URL.revokeObjectURL(s);
|
|
1089
1089
|
}
|
|
1090
1090
|
//#endregion
|
|
1091
1091
|
//#region shared/export/ApplicationGeometryExportModal.vue?vue&type=script&setup=true&lang.ts
|
|
1092
|
-
var
|
|
1092
|
+
var wt = /*@__PURE__*/ O({
|
|
1093
1093
|
__name: "ApplicationGeometryExportModal",
|
|
1094
1094
|
props: /*@__PURE__*/ k({
|
|
1095
1095
|
applicationId: {
|
|
@@ -1119,7 +1119,7 @@ var Ct = /*@__PURE__*/ O({
|
|
|
1119
1119
|
emits: ["update:modelValue"],
|
|
1120
1120
|
setup(e, { expose: n }) {
|
|
1121
1121
|
n();
|
|
1122
|
-
let r = e, i = L(e, "modelValue"), a = P(""), o = P(""), s = P(!1), c = P(""), l = P(!1), u = P([]), d =
|
|
1122
|
+
let r = e, i = L(e, "modelValue"), a = P(""), o = P(""), s = P(!1), c = P(""), l = P(!1), u = P([]), d = St((e) => r.buildUrl(e), (e, t) => (r.errorMessage ?? ((e, t) => e || `HTTP ${t}`))(e, t));
|
|
1123
1123
|
function f() {
|
|
1124
1124
|
d.invalidateInFlight(), a.value = "", o.value = "", u.value = [], c.value = "", s.value = !1;
|
|
1125
1125
|
}
|
|
@@ -1148,7 +1148,7 @@ var Ct = /*@__PURE__*/ O({
|
|
|
1148
1148
|
}
|
|
1149
1149
|
s.value = !0;
|
|
1150
1150
|
try {
|
|
1151
|
-
await
|
|
1151
|
+
await Ct(r.buildUrl, r.applicationId, e), i.value = !1;
|
|
1152
1152
|
} catch (e) {
|
|
1153
1153
|
c.value = e instanceof Error ? e.message : "Не вдалося експортувати межі заявки";
|
|
1154
1154
|
} finally {
|
|
@@ -1175,15 +1175,15 @@ var Ct = /*@__PURE__*/ O({
|
|
|
1175
1175
|
shellClass: r.variant === "cabinet" ? "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4 backdrop-blur-sm" : "fixed inset-0 z-50 flex items-center justify-center bg-slate-900/40 p-4",
|
|
1176
1176
|
panelClass: r.variant === "cabinet" ? "w-full max-w-md overflow-hidden rounded-2xl bg-white shadow-2xl" : "flex max-h-[90vh] w-full max-w-md flex-col overflow-hidden rounded-2xl bg-white shadow-xl",
|
|
1177
1177
|
SurveyorTeleport: t,
|
|
1178
|
-
CrsSuggestionSelect:
|
|
1178
|
+
CrsSuggestionSelect: yt
|
|
1179
1179
|
};
|
|
1180
1180
|
return Object.defineProperty(g, "__isScriptSetup", {
|
|
1181
1181
|
enumerable: !1,
|
|
1182
1182
|
value: !0
|
|
1183
1183
|
}), g;
|
|
1184
1184
|
}
|
|
1185
|
-
}),
|
|
1186
|
-
function
|
|
1185
|
+
}), Tt = ["disabled"], Et = ["disabled"];
|
|
1186
|
+
function Dt(e, t, n, r, i, a) {
|
|
1187
1187
|
return N(), C(r.SurveyorTeleport, null, {
|
|
1188
1188
|
default: z(() => [r.open ? (N(), T("div", {
|
|
1189
1189
|
key: 0,
|
|
@@ -1230,16 +1230,16 @@ function Et(e, t, n, r, i, a) {
|
|
|
1230
1230
|
class: A(["px-4 py-2 text-sm text-slate-600 transition-colors hover:bg-slate-100", n.variant === "cabinet" ? "rounded-xl bg-gray-100 py-2.5 font-medium text-gray-600 hover:bg-gray-200" : "rounded-lg"]),
|
|
1231
1231
|
disabled: r.busy,
|
|
1232
1232
|
onClick: r.cancel
|
|
1233
|
-
}, " Скасувати ", 10,
|
|
1233
|
+
}, " Скасувати ", 10, Tt), E("button", {
|
|
1234
1234
|
type: "button",
|
|
1235
|
-
class: A(["px-4 py-2 text-sm font-semibold text-white disabled:opacity-50", n.variant === "cabinet" ? "rounded-xl bg-[#2663EB] py-2.5 font-medium hover:bg-[#1d52cc] disabled:cursor-not-allowed disabled:opacity-40" : "rounded-lg bg-
|
|
1235
|
+
class: A(["px-4 py-2 text-sm font-semibold text-white disabled:opacity-50", n.variant === "cabinet" ? "rounded-xl bg-[#2663EB] py-2.5 font-medium hover:bg-[#1d52cc] disabled:cursor-not-allowed disabled:opacity-40" : "rounded-lg bg-[#1f5ae0] hover:bg-[#1a46b8]"]),
|
|
1236
1236
|
disabled: r.busy || r.optionsLoading || !r.srid,
|
|
1237
1237
|
onClick: r.submit
|
|
1238
|
-
}, I(r.busy ? "Експорт…" : "Експортувати"), 11,
|
|
1238
|
+
}, I(r.busy ? "Експорт…" : "Експортувати"), 11, Et)], 2)
|
|
1239
1239
|
], 2)], 34)) : w("", !0)]),
|
|
1240
1240
|
_: 1
|
|
1241
1241
|
});
|
|
1242
1242
|
}
|
|
1243
|
-
var
|
|
1243
|
+
var Ot = /*#__PURE__*/ e(wt, [["render", Dt], ["__file", "C:/softpro/surveyor/shared/export/ApplicationGeometryExportModal.vue"]]);
|
|
1244
1244
|
//#endregion
|
|
1245
|
-
export {
|
|
1245
|
+
export { lt as a, xe as c, yt as i, Ce as l, St as n, ct as o, xt as r, tt as s, Ot as t, ve as u };
|