@opengis/widgets 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.d.ts.map +1 -1
- package/dist/index.js +841 -783
- package/dist/index.umd.cjs +22 -22
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/widgets/card/Card.vue.d.ts +8 -8
- package/dist/widgets/card/Card.vue.d.ts.map +1 -1
- package/dist/widgets/card/CardItem.vue.d.ts +13 -9
- package/dist/widgets/card/CardItem.vue.d.ts.map +1 -1
- package/dist/widgets/map/MapWidget.vue.d.ts.map +1 -1
- package/dist/widgets/table/table.vue.d.ts +4 -0
- package/dist/widgets/table/table.vue.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { h as
|
|
1
|
+
import { h as te, defineComponent as j, mergeModels as X, useModel as de, ref as w, createElementBlock as a, openBlock as o, createElementVNode as e, createVNode as $, unref as k, withDirectives as R, vModelText as ye, createCommentVNode as _, createTextVNode as S, onMounted as Q, onUnmounted as ce, resolveComponent as se, normalizeClass as D, createBlock as I, toDisplayString as b, Fragment as V, renderList as A, normalizeStyle as U, resolveDynamicComponent as B, withModifiers as K, computed as O, Teleport as be, TransitionGroup as De, withCtx as Te, nextTick as Ie, renderSlot as G, vModelRadio as ee, vModelCheckbox as je, mergeProps as Z, vShow as ze } from "vue";
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
8
|
+
const ge = (r) => r.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ve = (r) => r.replace(
|
|
9
9
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
10
|
-
(
|
|
11
|
-
),
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
},
|
|
10
|
+
(l, i, t) => t ? t.toUpperCase() : i.toLowerCase()
|
|
11
|
+
), Fe = (r) => {
|
|
12
|
+
const l = Ve(r);
|
|
13
|
+
return l.charAt(0).toUpperCase() + l.slice(1);
|
|
14
|
+
}, He = (...r) => r.filter((l, i, t) => !!l && l.trim() !== "" && t.indexOf(l) === i).join(" ").trim();
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
|
-
var
|
|
21
|
+
var J = {
|
|
22
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23
23
|
width: 24,
|
|
24
24
|
height: 24,
|
|
@@ -35,21 +35,21 @@ var Z = {
|
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
37
|
*/
|
|
38
|
-
const
|
|
38
|
+
const Ae = ({ size: r, strokeWidth: l = 2, absoluteStrokeWidth: i, color: t, iconNode: s, name: c, class: n, ...u }, { slots: v }) => te(
|
|
39
39
|
"svg",
|
|
40
40
|
{
|
|
41
|
-
...
|
|
42
|
-
width:
|
|
43
|
-
height:
|
|
44
|
-
stroke: t ||
|
|
45
|
-
"stroke-width":
|
|
46
|
-
class:
|
|
41
|
+
...J,
|
|
42
|
+
width: r || J.width,
|
|
43
|
+
height: r || J.height,
|
|
44
|
+
stroke: t || J.stroke,
|
|
45
|
+
"stroke-width": i ? Number(l) * 24 / Number(r) : l,
|
|
46
|
+
class: He(
|
|
47
47
|
"lucide",
|
|
48
|
-
...
|
|
48
|
+
...c ? [`lucide-${ge(Fe(c))}-icon`, `lucide-${ge(c)}`] : ["lucide-icon"]
|
|
49
49
|
),
|
|
50
|
-
...
|
|
50
|
+
...u
|
|
51
51
|
},
|
|
52
|
-
[...s.map((g) =>
|
|
52
|
+
[...s.map((g) => te(...g)), ...v.default ? [v.default()] : []]
|
|
53
53
|
);
|
|
54
54
|
/**
|
|
55
55
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
@@ -57,12 +57,12 @@ const Fe = ({ size: l, strokeWidth: i = 2, absoluteStrokeWidth: n, color: t, ico
|
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
59
|
*/
|
|
60
|
-
const T = (
|
|
61
|
-
|
|
60
|
+
const T = (r, l) => (i, { slots: t }) => te(
|
|
61
|
+
Ae,
|
|
62
62
|
{
|
|
63
|
-
...
|
|
64
|
-
iconNode:
|
|
65
|
-
name:
|
|
63
|
+
...i,
|
|
64
|
+
iconNode: l,
|
|
65
|
+
name: r
|
|
66
66
|
},
|
|
67
67
|
t
|
|
68
68
|
);
|
|
@@ -72,7 +72,7 @@ const T = (l, i) => (n, { slots: t }) => Y(
|
|
|
72
72
|
* This source code is licensed under the ISC license.
|
|
73
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
74
|
*/
|
|
75
|
-
const
|
|
75
|
+
const Se = T("archive", [
|
|
76
76
|
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
|
|
77
77
|
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
|
|
78
78
|
["path", { d: "M10 12h4", key: "a56b0p" }]
|
|
@@ -83,7 +83,7 @@ const He = T("archive", [
|
|
|
83
83
|
* This source code is licensed under the ISC license.
|
|
84
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
85
|
*/
|
|
86
|
-
const
|
|
86
|
+
const Ee = T("arrow-right", [
|
|
87
87
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
88
88
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
89
89
|
]);
|
|
@@ -93,7 +93,7 @@ const Ae = T("arrow-right", [
|
|
|
93
93
|
* This source code is licensed under the ISC license.
|
|
94
94
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
95
|
*/
|
|
96
|
-
const
|
|
96
|
+
const Oe = T("circle-check-big", [
|
|
97
97
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
98
98
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
99
99
|
]);
|
|
@@ -103,7 +103,7 @@ const Se = T("circle-check-big", [
|
|
|
103
103
|
* This source code is licensed under the ISC license.
|
|
104
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
105
|
*/
|
|
106
|
-
const
|
|
106
|
+
const ue = T("download", [
|
|
107
107
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
108
108
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
109
109
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
@@ -114,7 +114,7 @@ const ce = T("download", [
|
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
116
|
*/
|
|
117
|
-
const
|
|
117
|
+
const Be = T("ellipsis", [
|
|
118
118
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
119
119
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
120
120
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
@@ -138,7 +138,7 @@ const q = T("file-text", [
|
|
|
138
138
|
* This source code is licensed under the ISC license.
|
|
139
139
|
* See the LICENSE file in the root directory of this source tree.
|
|
140
140
|
*/
|
|
141
|
-
const
|
|
141
|
+
const Ne = T("file", [
|
|
142
142
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
143
143
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
|
|
144
144
|
]);
|
|
@@ -148,7 +148,7 @@ const Oe = T("file", [
|
|
|
148
148
|
* This source code is licensed under the ISC license.
|
|
149
149
|
* See the LICENSE file in the root directory of this source tree.
|
|
150
150
|
*/
|
|
151
|
-
const
|
|
151
|
+
const Re = T("grid-3x3", [
|
|
152
152
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
153
153
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
154
154
|
["path", { d: "M3 15h18", key: "5xshup" }],
|
|
@@ -161,7 +161,7 @@ const Be = T("grid-3x3", [
|
|
|
161
161
|
* This source code is licensed under the ISC license.
|
|
162
162
|
* See the LICENSE file in the root directory of this source tree.
|
|
163
163
|
*/
|
|
164
|
-
const
|
|
164
|
+
const Ue = T("heart", [
|
|
165
165
|
[
|
|
166
166
|
"path",
|
|
167
167
|
{
|
|
@@ -176,7 +176,7 @@ const Ne = T("heart", [
|
|
|
176
176
|
* This source code is licensed under the ISC license.
|
|
177
177
|
* See the LICENSE file in the root directory of this source tree.
|
|
178
178
|
*/
|
|
179
|
-
const
|
|
179
|
+
const We = T("history", [
|
|
180
180
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
181
181
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }],
|
|
182
182
|
["path", { d: "M12 7v5l4 2", key: "1fdv2h" }]
|
|
@@ -187,7 +187,7 @@ const Re = T("history", [
|
|
|
187
187
|
* This source code is licensed under the ISC license.
|
|
188
188
|
* See the LICENSE file in the root directory of this source tree.
|
|
189
189
|
*/
|
|
190
|
-
const
|
|
190
|
+
const he = T("image", [
|
|
191
191
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
192
192
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
193
193
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
@@ -198,7 +198,7 @@ const ge = T("image", [
|
|
|
198
198
|
* This source code is licensed under the ISC license.
|
|
199
199
|
* See the LICENSE file in the root directory of this source tree.
|
|
200
200
|
*/
|
|
201
|
-
const
|
|
201
|
+
const Pe = T("list", [
|
|
202
202
|
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
|
203
203
|
["path", { d: "M3 18h.01", key: "1tta3j" }],
|
|
204
204
|
["path", { d: "M3 6h.01", key: "1rqtza" }],
|
|
@@ -212,7 +212,7 @@ const Ue = T("list", [
|
|
|
212
212
|
* This source code is licensed under the ISC license.
|
|
213
213
|
* See the LICENSE file in the root directory of this source tree.
|
|
214
214
|
*/
|
|
215
|
-
const
|
|
215
|
+
const Ge = T("plus", [
|
|
216
216
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
217
217
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
218
218
|
]);
|
|
@@ -222,7 +222,7 @@ const Pe = T("plus", [
|
|
|
222
222
|
* This source code is licensed under the ISC license.
|
|
223
223
|
* See the LICENSE file in the root directory of this source tree.
|
|
224
224
|
*/
|
|
225
|
-
const
|
|
225
|
+
const qe = T("reply", [
|
|
226
226
|
["path", { d: "M20 18v-2a4 4 0 0 0-4-4H4", key: "5vmcpk" }],
|
|
227
227
|
["path", { d: "m9 17-5-5 5-5", key: "nvlc11" }]
|
|
228
228
|
]);
|
|
@@ -248,7 +248,7 @@ const xe = T("send", [
|
|
|
248
248
|
* This source code is licensed under the ISC license.
|
|
249
249
|
* See the LICENSE file in the root directory of this source tree.
|
|
250
250
|
*/
|
|
251
|
-
const
|
|
251
|
+
const Ke = T("share", [
|
|
252
252
|
["path", { d: "M12 2v13", key: "1km8f5" }],
|
|
253
253
|
["path", { d: "m16 6-4-4-4 4", key: "13yo43" }],
|
|
254
254
|
["path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8", key: "1b2hhj" }]
|
|
@@ -259,7 +259,7 @@ const Ge = T("share", [
|
|
|
259
259
|
* This source code is licensed under the ISC license.
|
|
260
260
|
* See the LICENSE file in the root directory of this source tree.
|
|
261
261
|
*/
|
|
262
|
-
const
|
|
262
|
+
const Ze = T("sheet", [
|
|
263
263
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
264
264
|
["line", { x1: "3", x2: "21", y1: "9", y2: "9", key: "1vqk6q" }],
|
|
265
265
|
["line", { x1: "3", x2: "21", y1: "15", y2: "15", key: "o2sbyz" }],
|
|
@@ -272,7 +272,7 @@ const qe = T("sheet", [
|
|
|
272
272
|
* This source code is licensed under the ISC license.
|
|
273
273
|
* See the LICENSE file in the root directory of this source tree.
|
|
274
274
|
*/
|
|
275
|
-
const
|
|
275
|
+
const Je = T("square-pen", [
|
|
276
276
|
["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
|
|
277
277
|
[
|
|
278
278
|
"path",
|
|
@@ -288,7 +288,7 @@ const Ke = T("square-pen", [
|
|
|
288
288
|
* This source code is licensed under the ISC license.
|
|
289
289
|
* See the LICENSE file in the root directory of this source tree.
|
|
290
290
|
*/
|
|
291
|
-
const
|
|
291
|
+
const pe = T("trash-2", [
|
|
292
292
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
293
293
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
294
294
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
@@ -301,7 +301,7 @@ const ue = T("trash-2", [
|
|
|
301
301
|
* This source code is licensed under the ISC license.
|
|
302
302
|
* See the LICENSE file in the root directory of this source tree.
|
|
303
303
|
*/
|
|
304
|
-
const
|
|
304
|
+
const Xe = T("user-check", [
|
|
305
305
|
["path", { d: "m16 11 2 2 4-4", key: "9rsbq5" }],
|
|
306
306
|
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
307
307
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
|
|
@@ -312,7 +312,7 @@ const Ze = T("user-check", [
|
|
|
312
312
|
* This source code is licensed under the ISC license.
|
|
313
313
|
* See the LICENSE file in the root directory of this source tree.
|
|
314
314
|
*/
|
|
315
|
-
const
|
|
315
|
+
const me = T("user", [
|
|
316
316
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
317
317
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
318
318
|
]);
|
|
@@ -322,7 +322,7 @@ const pe = T("user", [
|
|
|
322
322
|
* This source code is licensed under the ISC license.
|
|
323
323
|
* See the LICENSE file in the root directory of this source tree.
|
|
324
324
|
*/
|
|
325
|
-
const
|
|
325
|
+
const Qe = T("video", [
|
|
326
326
|
[
|
|
327
327
|
"path",
|
|
328
328
|
{
|
|
@@ -338,234 +338,234 @@ const Je = T("video", [
|
|
|
338
338
|
* This source code is licensed under the ISC license.
|
|
339
339
|
* See the LICENSE file in the root directory of this source tree.
|
|
340
340
|
*/
|
|
341
|
-
const
|
|
341
|
+
const Y = T("x", [
|
|
342
342
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
343
343
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
344
|
-
]),
|
|
344
|
+
]), Ye = { class: "border-t pt-3 mt-4" }, et = { class: "flex gap-2" }, tt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, st = { class: "flex-1 space-y-2" }, ot = { class: "flex justify-between items-center" }, nt = { class: "flex gap-2" }, it = ["disabled"], ke = /* @__PURE__ */ j({
|
|
345
345
|
__name: "CommentInputZone",
|
|
346
346
|
props: {
|
|
347
347
|
isReply: { type: Boolean, required: !1, default: !1 },
|
|
348
348
|
isReplyModifiers: {}
|
|
349
349
|
},
|
|
350
|
-
emits: /* @__PURE__ */
|
|
351
|
-
setup(
|
|
352
|
-
const
|
|
350
|
+
emits: /* @__PURE__ */ X(["sendComment"], ["update:isReply"]),
|
|
351
|
+
setup(r, { emit: l }) {
|
|
352
|
+
const i = de(r, "isReply"), t = w(""), s = l, c = () => {
|
|
353
353
|
t.value.trim() && (s("sendComment", t.value), t.value = "");
|
|
354
|
-
},
|
|
355
|
-
(
|
|
354
|
+
}, n = (u) => {
|
|
355
|
+
(u.ctrlKey || u.metaKey) && u.key === "Enter" && (u.preventDefault(), c());
|
|
356
356
|
};
|
|
357
|
-
return (
|
|
358
|
-
e("div",
|
|
359
|
-
e("span",
|
|
360
|
-
|
|
357
|
+
return (u, v) => (o(), a("div", Ye, [
|
|
358
|
+
e("div", et, [
|
|
359
|
+
e("span", tt, [
|
|
360
|
+
$(k(me), { class: "h-3 w-3 text-gray-500" })
|
|
361
361
|
]),
|
|
362
|
-
e("div",
|
|
363
|
-
|
|
362
|
+
e("div", st, [
|
|
363
|
+
R(e("textarea", {
|
|
364
364
|
"onUpdate:modelValue": v[0] || (v[0] = (g) => t.value = g),
|
|
365
|
-
onKeydown:
|
|
365
|
+
onKeydown: n,
|
|
366
366
|
placeholder: "Add a comment...",
|
|
367
367
|
class: "w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"
|
|
368
368
|
}, null, 544), [
|
|
369
369
|
[ye, t.value]
|
|
370
370
|
]),
|
|
371
|
-
e("div",
|
|
371
|
+
e("div", ot, [
|
|
372
372
|
v[4] || (v[4] = e("span", { class: "text-xs text-gray-500 hidden sm:inline" }, "Cmd+Enter to send", -1)),
|
|
373
|
-
e("div",
|
|
374
|
-
|
|
373
|
+
e("div", nt, [
|
|
374
|
+
i.value ? (o(), a("button", {
|
|
375
375
|
key: 0,
|
|
376
376
|
class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
|
|
377
|
-
onClick: v[1] || (v[1] = (g) =>
|
|
377
|
+
onClick: v[1] || (v[1] = (g) => i.value = !1)
|
|
378
378
|
}, [
|
|
379
|
-
|
|
380
|
-
v[2] || (v[2] =
|
|
381
|
-
])) :
|
|
379
|
+
$(k(Y), { class: "h-3 w-3" }),
|
|
380
|
+
v[2] || (v[2] = S(" Cancel ", -1))
|
|
381
|
+
])) : _("", !0),
|
|
382
382
|
e("button", {
|
|
383
383
|
class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
|
|
384
384
|
disabled: !t.value.trim(),
|
|
385
|
-
onClick:
|
|
385
|
+
onClick: c
|
|
386
386
|
}, [
|
|
387
|
-
|
|
388
|
-
v[3] || (v[3] =
|
|
389
|
-
], 8,
|
|
387
|
+
$(k(xe), { class: "h-3 w-3 mr-1" }),
|
|
388
|
+
v[3] || (v[3] = S(" Send ", -1))
|
|
389
|
+
], 8, it)
|
|
390
390
|
])
|
|
391
391
|
])
|
|
392
392
|
])
|
|
393
393
|
])
|
|
394
394
|
]));
|
|
395
395
|
}
|
|
396
|
-
}),
|
|
396
|
+
}), lt = { class: "z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto" }, at = /* @__PURE__ */ j({
|
|
397
397
|
__name: "CommentDetails",
|
|
398
398
|
props: {
|
|
399
399
|
showMoreOptions: { type: Boolean, required: !0, default: !1 },
|
|
400
400
|
showMoreOptionsModifiers: {}
|
|
401
401
|
},
|
|
402
|
-
emits: /* @__PURE__ */
|
|
403
|
-
setup(
|
|
404
|
-
const
|
|
405
|
-
t.value && s.value && !s.value.contains(g.target) && !
|
|
406
|
-
},
|
|
407
|
-
t.value = !1,
|
|
402
|
+
emits: /* @__PURE__ */ X(["edit", "delete"], ["update:showMoreOptions"]),
|
|
403
|
+
setup(r, { emit: l }) {
|
|
404
|
+
const i = l, t = de(r, "showMoreOptions"), s = w(), c = w(!0), n = async (g) => {
|
|
405
|
+
t.value && s.value && !s.value.contains(g.target) && !c.value && (t.value = !1), c.value = !1;
|
|
406
|
+
}, u = () => {
|
|
407
|
+
t.value = !1, i("edit");
|
|
408
408
|
}, v = () => {
|
|
409
|
-
t.value = !1,
|
|
409
|
+
t.value = !1, i("delete");
|
|
410
410
|
};
|
|
411
|
-
return
|
|
412
|
-
document.addEventListener("click",
|
|
413
|
-
}),
|
|
414
|
-
document.removeEventListener("click",
|
|
415
|
-
}), (g, d) => (
|
|
411
|
+
return Q(() => {
|
|
412
|
+
document.addEventListener("click", n);
|
|
413
|
+
}), ce(() => {
|
|
414
|
+
document.removeEventListener("click", n);
|
|
415
|
+
}), (g, d) => (o(), a("div", {
|
|
416
416
|
class: "absolute bg-white left-0 top-full transform min-w-max z-50",
|
|
417
417
|
ref_key: "moreOptionsRef",
|
|
418
418
|
ref: s
|
|
419
419
|
}, [
|
|
420
|
-
e("div",
|
|
420
|
+
e("div", lt, [
|
|
421
421
|
e("div", {
|
|
422
422
|
class: "relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",
|
|
423
|
-
onClick:
|
|
423
|
+
onClick: u
|
|
424
424
|
}, [
|
|
425
|
-
|
|
426
|
-
d[0] || (d[0] =
|
|
425
|
+
$(k(Je), { class: "h-3 w-3 mr-2" }),
|
|
426
|
+
d[0] || (d[0] = S(" Edit ", -1))
|
|
427
427
|
]),
|
|
428
428
|
e("div", {
|
|
429
429
|
class: "relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",
|
|
430
430
|
onClick: v
|
|
431
431
|
}, [
|
|
432
|
-
|
|
433
|
-
d[1] || (d[1] =
|
|
432
|
+
$(k(pe), { class: "h-3 w-3 mr-2" }),
|
|
433
|
+
d[1] || (d[1] = S(" Delete ", -1))
|
|
434
434
|
])
|
|
435
435
|
])
|
|
436
436
|
], 512));
|
|
437
437
|
}
|
|
438
|
-
}),
|
|
438
|
+
}), rt = { class: "space-y-2" }, dt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, ct = { class: "flex-1 min-w-0 space-y-1 relative" }, ut = { class: "flex items-center gap-2" }, pt = { class: "font-medium text-xs" }, mt = { class: "text-xs text-gray-500" }, gt = {
|
|
439
439
|
key: 0,
|
|
440
440
|
class: "text-xs text-gray-700 leading-relaxed"
|
|
441
|
-
},
|
|
441
|
+
}, ht = { class: "flex justify-between text-xs" }, ft = { class: "flex items-center gap-2" }, vt = {
|
|
442
442
|
key: 0,
|
|
443
443
|
class: "flex gap-2"
|
|
444
|
-
},
|
|
444
|
+
}, yt = ["disabled"], bt = {
|
|
445
445
|
key: 0,
|
|
446
446
|
class: "ml-8 space-y-1 border-l-2 border-gray-100 pl-3"
|
|
447
|
-
},
|
|
447
|
+
}, xt = /* @__PURE__ */ j({
|
|
448
448
|
__name: "CommentItem",
|
|
449
449
|
props: {
|
|
450
450
|
comment: {},
|
|
451
451
|
isInside: { type: Boolean }
|
|
452
452
|
},
|
|
453
453
|
emits: ["like", "reply", "edit", "delete"],
|
|
454
|
-
setup(
|
|
455
|
-
const
|
|
456
|
-
const
|
|
457
|
-
(
|
|
454
|
+
setup(r, { emit: l }) {
|
|
455
|
+
const i = l, t = r, s = w(t.comment.text), c = w("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"), n = w("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"), u = w(!1), v = w(!1), g = w(!1), d = w(!1), y = (p) => {
|
|
456
|
+
const f = /* @__PURE__ */ new Date(), H = Math.floor(
|
|
457
|
+
(f.getTime() - p.getTime()) / (1e3 * 60 * 60)
|
|
458
458
|
);
|
|
459
|
-
return
|
|
460
|
-
(
|
|
461
|
-
)}m` :
|
|
462
|
-
},
|
|
463
|
-
d.value = !d.value, d.value ?
|
|
464
|
-
},
|
|
465
|
-
|
|
466
|
-
},
|
|
467
|
-
|
|
468
|
-
},
|
|
469
|
-
|
|
459
|
+
return H < 1 ? `${Math.floor(
|
|
460
|
+
(f.getTime() - p.getTime()) / 6e4
|
|
461
|
+
)}m` : H < 24 ? `${H}h` : `${Math.floor(H / 24)}d`;
|
|
462
|
+
}, h = () => {
|
|
463
|
+
d.value = !d.value, d.value ? i("like", t.comment.id, "add") : i("like", t.comment.id, "delete");
|
|
464
|
+
}, M = () => {
|
|
465
|
+
i("edit", t.comment.id, s.value), g.value = !1;
|
|
466
|
+
}, P = (p, f) => {
|
|
467
|
+
i("like", p, f);
|
|
468
|
+
}, F = (p, f) => {
|
|
469
|
+
i("edit", p, f);
|
|
470
470
|
};
|
|
471
|
-
return (
|
|
472
|
-
const
|
|
473
|
-
return
|
|
471
|
+
return (p, f) => {
|
|
472
|
+
const H = se("CommentItem", !0);
|
|
473
|
+
return o(), a("div", rt, [
|
|
474
474
|
e("div", {
|
|
475
475
|
class: D(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative", g.value ? "bg-gray-50" : ""])
|
|
476
476
|
}, [
|
|
477
|
-
e("span",
|
|
478
|
-
|
|
477
|
+
e("span", dt, [
|
|
478
|
+
$(k(me), { class: "h-3 w-3 text-gray-500" })
|
|
479
479
|
]),
|
|
480
|
-
e("div",
|
|
481
|
-
e("div",
|
|
482
|
-
e("span",
|
|
483
|
-
e("span",
|
|
480
|
+
e("div", ct, [
|
|
481
|
+
e("div", ut, [
|
|
482
|
+
e("span", pt, b(p.comment?.author), 1),
|
|
483
|
+
e("span", mt, b(y(p.comment?.createdAt)), 1)
|
|
484
484
|
]),
|
|
485
|
-
g.value ?
|
|
485
|
+
g.value ? R((o(), a("textarea", {
|
|
486
486
|
key: 1,
|
|
487
|
-
"onUpdate:modelValue":
|
|
488
|
-
class: D(g.value ?
|
|
487
|
+
"onUpdate:modelValue": f[0] || (f[0] = (C) => s.value = C),
|
|
488
|
+
class: D(g.value ? n.value : c.value)
|
|
489
489
|
}, null, 2)), [
|
|
490
490
|
[ye, s.value]
|
|
491
|
-
]) : (
|
|
492
|
-
e("div",
|
|
493
|
-
e("div",
|
|
491
|
+
]) : (o(), a("p", gt, b(p.comment?.text), 1)),
|
|
492
|
+
e("div", ht, [
|
|
493
|
+
e("div", ft, [
|
|
494
494
|
e("button", {
|
|
495
495
|
class: D(["flex items-center gap-1", d.value ? "text-blue-600" : "text-gray-500 hover:text-blue-600 transition-colors"]),
|
|
496
|
-
onClick:
|
|
496
|
+
onClick: f[1] || (f[1] = (C) => h())
|
|
497
497
|
}, [
|
|
498
|
-
|
|
498
|
+
$(k(Ue), {
|
|
499
499
|
class: D(["h-3 w-3", d.value ? "fill-blue-600" : ""])
|
|
500
500
|
}, null, 8, ["class"]),
|
|
501
|
-
|
|
501
|
+
S(" " + b(p.comment?.likes), 1)
|
|
502
502
|
], 2),
|
|
503
|
-
|
|
503
|
+
p.isInside ? _("", !0) : (o(), a("button", {
|
|
504
504
|
key: 0,
|
|
505
505
|
class: "text-gray-500 hover:text-blue-600 transition-colors",
|
|
506
|
-
onClick:
|
|
506
|
+
onClick: f[2] || (f[2] = (C) => v.value = !0)
|
|
507
507
|
}, [
|
|
508
|
-
|
|
508
|
+
$(k(qe), { class: "h-3 w-3" })
|
|
509
509
|
])),
|
|
510
510
|
e("button", {
|
|
511
511
|
class: "text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",
|
|
512
512
|
type: "button",
|
|
513
|
-
onClick:
|
|
513
|
+
onClick: f[3] || (f[3] = (C) => u.value = !0)
|
|
514
514
|
}, [
|
|
515
|
-
|
|
515
|
+
$(k(Be), { class: "h-3 w-3" })
|
|
516
516
|
])
|
|
517
517
|
]),
|
|
518
|
-
g.value ? (
|
|
518
|
+
g.value ? (o(), a("div", vt, [
|
|
519
519
|
e("button", {
|
|
520
520
|
class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
|
|
521
|
-
onClick:
|
|
521
|
+
onClick: f[4] || (f[4] = (C) => g.value = !1)
|
|
522
522
|
}, [
|
|
523
|
-
|
|
524
|
-
|
|
523
|
+
$(k(Y), { class: "h-3 w-3" }),
|
|
524
|
+
f[11] || (f[11] = S(" Cancel ", -1))
|
|
525
525
|
]),
|
|
526
526
|
e("button", {
|
|
527
527
|
class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
|
|
528
528
|
disabled: !s.value.trim(),
|
|
529
|
-
onClick:
|
|
529
|
+
onClick: f[5] || (f[5] = (C) => M())
|
|
530
530
|
}, [
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
], 8,
|
|
534
|
-
])) :
|
|
531
|
+
$(k(xe), { class: "h-3 w-3 mr-1" }),
|
|
532
|
+
f[12] || (f[12] = S(" Send ", -1))
|
|
533
|
+
], 8, yt)
|
|
534
|
+
])) : _("", !0)
|
|
535
535
|
])
|
|
536
536
|
]),
|
|
537
|
-
|
|
537
|
+
u.value ? (o(), I(at, {
|
|
538
538
|
key: 0,
|
|
539
|
-
showMoreOptions:
|
|
540
|
-
"onUpdate:showMoreOptions":
|
|
541
|
-
onEdit:
|
|
542
|
-
onDelete:
|
|
543
|
-
comment:
|
|
544
|
-
}, null, 8, ["showMoreOptions", "comment"])) :
|
|
539
|
+
showMoreOptions: u.value,
|
|
540
|
+
"onUpdate:showMoreOptions": f[6] || (f[6] = (C) => u.value = C),
|
|
541
|
+
onEdit: f[7] || (f[7] = (C) => g.value = !0),
|
|
542
|
+
onDelete: f[8] || (f[8] = (C) => p.$emit("delete", p.comment?.id)),
|
|
543
|
+
comment: p.comment
|
|
544
|
+
}, null, 8, ["showMoreOptions", "comment"])) : _("", !0)
|
|
545
545
|
], 2),
|
|
546
|
-
|
|
547
|
-
(
|
|
546
|
+
p.isInside ? _("", !0) : (o(), a("div", bt, [
|
|
547
|
+
(o(!0), a(V, null, A(p.comment?.replies, (C) => (o(), I(H, {
|
|
548
548
|
key: C.id,
|
|
549
549
|
comment: C,
|
|
550
550
|
isInside: !0,
|
|
551
|
-
onDelete: (x) =>
|
|
552
|
-
onLike:
|
|
553
|
-
onEdit:
|
|
551
|
+
onDelete: (x) => p.$emit("delete", C.id),
|
|
552
|
+
onLike: P,
|
|
553
|
+
onEdit: F
|
|
554
554
|
}, null, 8, ["comment", "onDelete"]))), 128)),
|
|
555
|
-
v.value && !
|
|
555
|
+
v.value && !p.isInside ? (o(), I(ke, {
|
|
556
556
|
key: 0,
|
|
557
|
-
onSendComment:
|
|
557
|
+
onSendComment: f[9] || (f[9] = (C) => p.$emit("reply", p.comment?.id, C)),
|
|
558
558
|
isReply: v.value,
|
|
559
|
-
"onUpdate:isReply":
|
|
560
|
-
}, null, 8, ["isReply"])) :
|
|
559
|
+
"onUpdate:isReply": f[10] || (f[10] = (C) => v.value = C)
|
|
560
|
+
}, null, 8, ["isReply"])) : _("", !0)
|
|
561
561
|
]))
|
|
562
562
|
]);
|
|
563
563
|
};
|
|
564
564
|
}
|
|
565
|
-
}),
|
|
565
|
+
}), kt = ["id"], _t = {
|
|
566
566
|
key: 0,
|
|
567
567
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
568
|
-
},
|
|
568
|
+
}, oe = /* @__PURE__ */ j({
|
|
569
569
|
__name: "CommentsWidget",
|
|
570
570
|
props: {
|
|
571
571
|
title: {},
|
|
@@ -581,43 +581,43 @@ const X = T("x", [
|
|
|
581
581
|
style: {}
|
|
582
582
|
},
|
|
583
583
|
emits: ["add", "reply", "like", "delete", "edit"],
|
|
584
|
-
setup(
|
|
585
|
-
const
|
|
586
|
-
|
|
587
|
-
},
|
|
588
|
-
|
|
589
|
-
},
|
|
590
|
-
|
|
591
|
-
},
|
|
592
|
-
|
|
584
|
+
setup(r, { emit: l }) {
|
|
585
|
+
const i = r, t = l, s = (g) => {
|
|
586
|
+
i?.onAddComment?.(g), t("add", g);
|
|
587
|
+
}, c = (g, d) => {
|
|
588
|
+
i?.onLike?.(g, d), t("like", g, d);
|
|
589
|
+
}, n = (g, d) => {
|
|
590
|
+
i.onReply?.(g, d), t("reply", g, d);
|
|
591
|
+
}, u = (g, d) => {
|
|
592
|
+
i.onEdit?.(g, d), t("edit", g, d);
|
|
593
593
|
}, v = (g) => {
|
|
594
|
-
|
|
594
|
+
i.onDelete?.(g), t("delete", g);
|
|
595
595
|
};
|
|
596
|
-
return (g, d) => (
|
|
596
|
+
return (g, d) => (o(), a("div", {
|
|
597
597
|
class: D(["mx-auto font-sans", g.className]),
|
|
598
598
|
id: g.id,
|
|
599
|
-
style:
|
|
599
|
+
style: U(g.style)
|
|
600
600
|
}, [
|
|
601
|
-
g.title ? (
|
|
601
|
+
g.title ? (o(), a("h3", _t, b(g.title), 1)) : _("", !0),
|
|
602
602
|
e("div", {
|
|
603
603
|
class: D([g.maxHeight ? "overflow-y-auto" : "", "space-y-3"]),
|
|
604
|
-
style:
|
|
604
|
+
style: U({ maxHeight: g.maxHeight + "px" })
|
|
605
605
|
}, [
|
|
606
|
-
(
|
|
606
|
+
(o(!0), a(V, null, A(g.comments, (y) => (o(), I(xt, {
|
|
607
607
|
key: y.id,
|
|
608
608
|
comment: y,
|
|
609
|
-
onReply:
|
|
610
|
-
onLike:
|
|
611
|
-
onDelete: d[0] || (d[0] = (
|
|
612
|
-
onEdit:
|
|
609
|
+
onReply: n,
|
|
610
|
+
onLike: c,
|
|
611
|
+
onDelete: d[0] || (d[0] = (h) => v(h)),
|
|
612
|
+
onEdit: u
|
|
613
613
|
}, null, 8, ["comment"]))), 128))
|
|
614
614
|
], 6),
|
|
615
|
-
|
|
615
|
+
$(ke, {
|
|
616
616
|
onSendComment: d[1] || (d[1] = (y) => s(y))
|
|
617
617
|
})
|
|
618
|
-
], 14,
|
|
618
|
+
], 14, kt));
|
|
619
619
|
}
|
|
620
|
-
}),
|
|
620
|
+
}), fe = /* @__PURE__ */ new Map([
|
|
621
621
|
["file", {
|
|
622
622
|
name: "File",
|
|
623
623
|
color: "bg-green-100 text-green-700 border-green-200",
|
|
@@ -626,34 +626,34 @@ const X = T("x", [
|
|
|
626
626
|
["post", {
|
|
627
627
|
name: "Post",
|
|
628
628
|
color: "bg-blue-100 text-blue-700 border-blue-200",
|
|
629
|
-
icon:
|
|
629
|
+
icon: Ze
|
|
630
630
|
}],
|
|
631
631
|
["user", {
|
|
632
632
|
name: "User",
|
|
633
633
|
color: "bg-purple-100 text-purple-700 border-purple-200",
|
|
634
|
-
icon:
|
|
634
|
+
icon: Xe
|
|
635
635
|
}],
|
|
636
636
|
["custom", {
|
|
637
637
|
name: "Custom",
|
|
638
638
|
color: "bg-gray-100 text-gray-700 border-gray-200",
|
|
639
|
-
icon:
|
|
639
|
+
icon: We
|
|
640
640
|
}]
|
|
641
|
-
]),
|
|
641
|
+
]), wt = { class: "mx-auto font-sans" }, $t = {
|
|
642
642
|
key: 0,
|
|
643
643
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
644
|
-
},
|
|
644
|
+
}, Ct = { class: "relative" }, Mt = { class: "space-y-3" }, Lt = { class: "flex-1 min-w-0 pb-2" }, Dt = { class: "flex items-center gap-1.5 mb-1 mt-0.5" }, Tt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, It = { class: "font-medium text-xs" }, jt = { class: "text-xs text-gray-500" }, zt = { class: "space-y-1" }, Vt = { class: "text-xs text-gray-700" }, Ft = { class: "capitalize mr-1" }, Ht = {
|
|
645
645
|
key: 0,
|
|
646
646
|
class: "inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"
|
|
647
|
-
},
|
|
647
|
+
}, At = {
|
|
648
648
|
key: 0,
|
|
649
649
|
class: "flex items-center gap-1 text-xs"
|
|
650
|
-
},
|
|
650
|
+
}, St = {
|
|
651
651
|
key: 0,
|
|
652
652
|
class: "bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"
|
|
653
|
-
},
|
|
653
|
+
}, Et = {
|
|
654
654
|
key: 2,
|
|
655
655
|
class: "bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"
|
|
656
|
-
},
|
|
656
|
+
}, ne = /* @__PURE__ */ j({
|
|
657
657
|
__name: "HistoryWidget",
|
|
658
658
|
props: {
|
|
659
659
|
data: {},
|
|
@@ -663,57 +663,57 @@ const X = T("x", [
|
|
|
663
663
|
className: {},
|
|
664
664
|
style: {}
|
|
665
665
|
},
|
|
666
|
-
setup(
|
|
667
|
-
const
|
|
668
|
-
|
|
666
|
+
setup(r) {
|
|
667
|
+
const l = r, i = w(Array.isArray(l.data) ? l.data : []);
|
|
668
|
+
i.value.length === 0 && l.id && t();
|
|
669
669
|
async function t() {
|
|
670
|
-
const s = await fetch(`/api/widget/history/${
|
|
670
|
+
const s = await fetch(`/api/widget/history/${l.id}`);
|
|
671
671
|
if (!s.ok)
|
|
672
672
|
return { data: [] };
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
}),
|
|
673
|
+
const c = await s.json();
|
|
674
|
+
c.rows.forEach((n) => {
|
|
675
|
+
n.timestamp = new Date(n.cdate), n.id = n.entity_id, n.entityType = n.entity_type, n.entityId = n.entity_id, n.action = n.change_type, n.userId = n.change_user_id, n.userName = n.username, n.timestamp = new Date(n.cdate), n.description = n.username, n.status = n.username;
|
|
676
|
+
}), i.value = c.rows;
|
|
677
677
|
}
|
|
678
|
-
return (s,
|
|
679
|
-
s.title ? (
|
|
678
|
+
return (s, c) => (o(), a("div", wt, [
|
|
679
|
+
s.title ? (o(), a("h3", $t, b(s.title), 1)) : _("", !0),
|
|
680
680
|
e("div", {
|
|
681
681
|
class: D(s.maxHeight ? "overflow-y-auto" : ""),
|
|
682
|
-
style:
|
|
682
|
+
style: U({ maxHeight: s.maxHeight + "px" })
|
|
683
683
|
}, [
|
|
684
|
-
e("div",
|
|
685
|
-
|
|
686
|
-
e("div",
|
|
687
|
-
(
|
|
684
|
+
e("div", Ct, [
|
|
685
|
+
c[0] || (c[0] = e("div", { class: "absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200" }, null, -1)),
|
|
686
|
+
e("div", Mt, [
|
|
687
|
+
(o(!0), a(V, null, A(i.value, (n) => (o(), a("div", {
|
|
688
688
|
class: "relative flex items-start gap-2",
|
|
689
|
-
key:
|
|
689
|
+
key: n?.id
|
|
690
690
|
}, [
|
|
691
691
|
e("div", {
|
|
692
|
-
class: D(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${
|
|
692
|
+
class: D(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${k(fe).get(n?.entityType)?.color}`)
|
|
693
693
|
}, [
|
|
694
|
-
(
|
|
694
|
+
(o(), I(B(k(fe).get(n?.entityType)?.icon), { class: "h-3 w-3" }))
|
|
695
695
|
], 2),
|
|
696
|
-
e("div",
|
|
697
|
-
e("div",
|
|
698
|
-
e("span",
|
|
699
|
-
|
|
696
|
+
e("div", Lt, [
|
|
697
|
+
e("div", Dt, [
|
|
698
|
+
e("span", Tt, [
|
|
699
|
+
$(k(me), { class: "h-3 w-3 text-gray-500" })
|
|
700
700
|
]),
|
|
701
|
-
e("span",
|
|
702
|
-
e("span",
|
|
701
|
+
e("span", It, b(n?.userName), 1),
|
|
702
|
+
e("span", jt, b(n?.timestamp.toLocaleTimeString("ua-UA", { hour: "2-digit", minute: "2-digit" })), 1)
|
|
703
703
|
]),
|
|
704
|
-
e("div",
|
|
705
|
-
e("div",
|
|
706
|
-
e("span",
|
|
707
|
-
|
|
704
|
+
e("div", zt, [
|
|
705
|
+
e("div", Vt, [
|
|
706
|
+
e("span", Ft, b(n?.action), 1),
|
|
707
|
+
n?.entityId ? (o(), a("span", Ht, b(n?.entityId), 1)) : _("", !0)
|
|
708
708
|
]),
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
709
|
+
n?.changes?.[n?.entityId] ? (o(), a("div", At, [
|
|
710
|
+
n?.changes?.[n?.entityId]?.old ? (o(), a("span", St, b(n?.changes?.[n?.entityId]?.old), 1)) : _("", !0),
|
|
711
|
+
n?.changes?.[n?.entityId]?.old && n?.changes?.[n?.entityId]?.new ? (o(), I(k(Ee), {
|
|
712
712
|
key: 1,
|
|
713
713
|
class: "h-2 w-2 text-gray-400"
|
|
714
|
-
})) :
|
|
715
|
-
|
|
716
|
-
])) :
|
|
714
|
+
})) : _("", !0),
|
|
715
|
+
n?.changes?.[n?.entityId]?.new ? (o(), a("span", Et, b(n?.changes?.[n?.entityId]?.new), 1)) : _("", !0)
|
|
716
|
+
])) : _("", !0)
|
|
717
717
|
])
|
|
718
718
|
])
|
|
719
719
|
]))), 128))
|
|
@@ -722,55 +722,55 @@ const X = T("x", [
|
|
|
722
722
|
], 6)
|
|
723
723
|
]));
|
|
724
724
|
}
|
|
725
|
-
}),
|
|
725
|
+
}), Ot = {
|
|
726
726
|
key: 0,
|
|
727
727
|
class: "text-xl font-semibold"
|
|
728
|
-
},
|
|
728
|
+
}, Bt = { class: "flex gap-1" }, Nt = { class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer" }, Rt = /* @__PURE__ */ j({
|
|
729
729
|
__name: "FileHeader",
|
|
730
|
-
props: /* @__PURE__ */
|
|
730
|
+
props: /* @__PURE__ */ X({
|
|
731
731
|
title: {}
|
|
732
732
|
}, {
|
|
733
733
|
modelValue: {},
|
|
734
734
|
modelModifiers: {}
|
|
735
735
|
}),
|
|
736
|
-
emits: /* @__PURE__ */
|
|
737
|
-
setup(
|
|
738
|
-
const
|
|
736
|
+
emits: /* @__PURE__ */ X(["onAddFile"], ["update:modelValue"]),
|
|
737
|
+
setup(r) {
|
|
738
|
+
const l = de(r, "modelValue"), i = {
|
|
739
739
|
active: "bg-blue-100 text-black hover:bg-blue-100",
|
|
740
740
|
inactive: "bg-white text-black hover:bg-blue-100"
|
|
741
741
|
};
|
|
742
|
-
return (t, s) => (
|
|
742
|
+
return (t, s) => (o(), a("div", {
|
|
743
743
|
class: D(["flex flex-col sm:flex-row gap-3 mb-4", t.title ? "justify-between sm:items-center" : "justify-end sm:items-center"])
|
|
744
744
|
}, [
|
|
745
|
-
t.title ? (
|
|
746
|
-
e("div",
|
|
745
|
+
t.title ? (o(), a("h3", Ot, b(t.title), 1)) : _("", !0),
|
|
746
|
+
e("div", Bt, [
|
|
747
747
|
e("button", {
|
|
748
|
-
class: D(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",
|
|
749
|
-
onClick: s[0] || (s[0] = (
|
|
748
|
+
class: D(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", l.value === "list" ? i.active : i.inactive]),
|
|
749
|
+
onClick: s[0] || (s[0] = (c) => l.value = "list")
|
|
750
750
|
}, [
|
|
751
|
-
|
|
751
|
+
$(k(Pe), { class: "h-4 w-4" })
|
|
752
752
|
], 2),
|
|
753
753
|
e("button", {
|
|
754
|
-
class: D(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",
|
|
755
|
-
onClick: s[1] || (s[1] = (
|
|
754
|
+
class: D(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", l.value === "grid" ? i.active : i.inactive]),
|
|
755
|
+
onClick: s[1] || (s[1] = (c) => l.value = "grid")
|
|
756
756
|
}, [
|
|
757
|
-
|
|
757
|
+
$(k(Re), { class: "h-4 w-4" })
|
|
758
758
|
], 2),
|
|
759
759
|
e("label", null, [
|
|
760
760
|
e("input", {
|
|
761
761
|
type: "file",
|
|
762
762
|
class: "hidden",
|
|
763
|
-
onChange: s[2] || (s[2] = (
|
|
763
|
+
onChange: s[2] || (s[2] = (c) => t.$emit("onAddFile", c))
|
|
764
764
|
}, null, 32),
|
|
765
|
-
e("div",
|
|
766
|
-
|
|
767
|
-
s[3] || (s[3] =
|
|
765
|
+
e("div", Nt, [
|
|
766
|
+
$(k(Ge), { class: "h-4 w-4" }),
|
|
767
|
+
s[3] || (s[3] = S(" Додати файл ", -1))
|
|
768
768
|
])
|
|
769
769
|
])
|
|
770
770
|
])
|
|
771
771
|
], 2));
|
|
772
772
|
}
|
|
773
|
-
}),
|
|
773
|
+
}), ve = {
|
|
774
774
|
pdf: {
|
|
775
775
|
color: "bg-red-100 text-red-700 border-red-200",
|
|
776
776
|
icon: q,
|
|
@@ -778,12 +778,12 @@ const X = T("x", [
|
|
|
778
778
|
},
|
|
779
779
|
sketch: {
|
|
780
780
|
color: "bg-gray-100 text-gray-700 border-gray-200",
|
|
781
|
-
icon:
|
|
781
|
+
icon: Ne,
|
|
782
782
|
label: "SKETCH"
|
|
783
783
|
},
|
|
784
784
|
mp4: {
|
|
785
785
|
color: "bg-purple-100 text-purple-700 border-purple-200",
|
|
786
|
-
icon:
|
|
786
|
+
icon: Qe,
|
|
787
787
|
label: "VIDEO"
|
|
788
788
|
},
|
|
789
789
|
docx: {
|
|
@@ -793,17 +793,17 @@ const X = T("x", [
|
|
|
793
793
|
},
|
|
794
794
|
zip: {
|
|
795
795
|
color: "bg-orange-100 text-orange-700 border-orange-200",
|
|
796
|
-
icon:
|
|
796
|
+
icon: Se,
|
|
797
797
|
label: "ARCHIVE"
|
|
798
798
|
},
|
|
799
799
|
png: {
|
|
800
800
|
color: "bg-green-100 text-green-700 border-green-200",
|
|
801
|
-
icon:
|
|
801
|
+
icon: he,
|
|
802
802
|
label: "IMAGE"
|
|
803
803
|
},
|
|
804
804
|
jpg: {
|
|
805
805
|
color: "bg-green-100 text-green-700 border-green-200",
|
|
806
|
-
icon:
|
|
806
|
+
icon: he,
|
|
807
807
|
label: "IMAGE"
|
|
808
808
|
},
|
|
809
809
|
xlsx: {
|
|
@@ -817,114 +817,114 @@ const X = T("x", [
|
|
|
817
817
|
label: "PPT"
|
|
818
818
|
}
|
|
819
819
|
};
|
|
820
|
-
function _e(
|
|
821
|
-
const
|
|
820
|
+
function _e(r, l = "en") {
|
|
821
|
+
const i = {
|
|
822
822
|
month: "short",
|
|
823
823
|
day: "numeric"
|
|
824
824
|
};
|
|
825
|
-
return new Intl.DateTimeFormat(
|
|
825
|
+
return new Intl.DateTimeFormat(l, i).format(r);
|
|
826
826
|
}
|
|
827
|
-
function we(
|
|
828
|
-
if (
|
|
829
|
-
const
|
|
830
|
-
return `${parseFloat((
|
|
827
|
+
function we(r) {
|
|
828
|
+
if (r === 0) return "0 B";
|
|
829
|
+
const l = 1024, i = ["B", "KB", "MB", "GB", "TB"], t = Math.floor(Math.log(r) / Math.log(l));
|
|
830
|
+
return `${parseFloat((r / Math.pow(l, t)).toFixed(1))} ${i[t]}`;
|
|
831
831
|
}
|
|
832
|
-
const
|
|
832
|
+
const Ut = { class: "space-y-0.5" }, Wt = ["onClick"], Pt = ["onClick"], Gt = { class: "flex items-center gap-2" }, qt = { class: "font-medium text-xs truncate hover:text-blue-600 cursor-pointer" }, Kt = { class: "hidden sm:block text-xs text-gray-500 w-16 text-right" }, Zt = { class: "hidden md:block text-xs text-gray-500 w-12 text-right" }, Jt = { class: "flex items-center gap-1" }, Xt = ["onClick"], Qt = ["onClick"], Yt = /* @__PURE__ */ j({
|
|
833
833
|
__name: "FileList",
|
|
834
834
|
props: {
|
|
835
835
|
files: {}
|
|
836
836
|
},
|
|
837
837
|
emits: ["delete", "download", "openLightbox"],
|
|
838
|
-
setup(
|
|
839
|
-
return (
|
|
840
|
-
(
|
|
838
|
+
setup(r) {
|
|
839
|
+
return (l, i) => (o(), a("div", Ut, [
|
|
840
|
+
(o(!0), a(V, null, A(l.files, (t) => (o(), a("div", {
|
|
841
841
|
class: "flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",
|
|
842
842
|
key: t.id,
|
|
843
|
-
onClick: K((s) =>
|
|
843
|
+
onClick: K((s) => l.$emit("openLightbox", t), ["stop"])
|
|
844
844
|
}, [
|
|
845
845
|
e("div", {
|
|
846
|
-
class: D(["p-1 rounded",
|
|
846
|
+
class: D(["p-1 rounded", k(ve)[t?.ext]?.color])
|
|
847
847
|
}, [
|
|
848
|
-
(
|
|
848
|
+
(o(), I(B(k(ve)[t?.ext]?.icon), { class: "h-3 w-3" }))
|
|
849
849
|
], 2),
|
|
850
850
|
e("div", {
|
|
851
851
|
class: "flex-1 min-w-0",
|
|
852
|
-
onClick: (s) =>
|
|
852
|
+
onClick: (s) => l.$emit("openLightbox", t)
|
|
853
853
|
}, [
|
|
854
|
-
e("div",
|
|
855
|
-
e("span",
|
|
854
|
+
e("div", Gt, [
|
|
855
|
+
e("span", qt, b(t?.uploaded_name || t?.name), 1)
|
|
856
856
|
])
|
|
857
|
-
], 8,
|
|
858
|
-
e("div",
|
|
859
|
-
e("div",
|
|
860
|
-
e("div",
|
|
857
|
+
], 8, Pt),
|
|
858
|
+
e("div", Kt, b(k(we)(t.size)), 1),
|
|
859
|
+
e("div", Zt, b(k(_e)(t.createdAt)), 1),
|
|
860
|
+
e("div", Jt, [
|
|
861
861
|
e("button", {
|
|
862
|
-
onClick: K((s) =>
|
|
862
|
+
onClick: K((s) => l.$emit("download", t), ["stop"]),
|
|
863
863
|
class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"
|
|
864
864
|
}, [
|
|
865
|
-
|
|
866
|
-
], 8,
|
|
865
|
+
$(k(ue), { class: "h-3 w-3" })
|
|
866
|
+
], 8, Xt),
|
|
867
867
|
e("button", {
|
|
868
868
|
class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",
|
|
869
|
-
onClick: K((s) =>
|
|
869
|
+
onClick: K((s) => l.$emit("delete", s, t?.file_id), ["stop"])
|
|
870
870
|
}, [
|
|
871
|
-
|
|
872
|
-
], 8,
|
|
871
|
+
$(k(pe), { class: "h-3 w-3" })
|
|
872
|
+
], 8, Qt)
|
|
873
873
|
])
|
|
874
|
-
], 8,
|
|
874
|
+
], 8, Wt))), 128))
|
|
875
875
|
]));
|
|
876
876
|
}
|
|
877
|
-
}),
|
|
877
|
+
}), es = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3" }, ts = ["onClick"], ss = { class: "space-y-2" }, os = { class: "flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden" }, ns = ["src"], is = { class: "space-y-1" }, ls = ["title"], as = { class: "text-xs text-gray-500 text-left" }, rs = { class: "absolute top-2 right-1 flex items-center gap-1" }, ds = ["onClick"], cs = ["onClick"], us = /* @__PURE__ */ j({
|
|
878
878
|
__name: "FileGrid",
|
|
879
879
|
props: {
|
|
880
880
|
files: {}
|
|
881
881
|
},
|
|
882
882
|
emits: ["delete", "download", "openLightbox"],
|
|
883
|
-
setup(
|
|
884
|
-
return (
|
|
885
|
-
(
|
|
883
|
+
setup(r) {
|
|
884
|
+
return (l, i) => (o(), a("div", es, [
|
|
885
|
+
(o(!0), a(V, null, A(l.files, (t) => (o(), a("div", {
|
|
886
886
|
key: t.id,
|
|
887
|
-
onClick: K((s) =>
|
|
887
|
+
onClick: K((s) => l.$emit("openLightbox", t), ["stop"]),
|
|
888
888
|
class: "group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"
|
|
889
889
|
}, [
|
|
890
|
-
e("div",
|
|
891
|
-
e("div",
|
|
892
|
-
t.ext === "png" || t.ext === "jpg" || t.ext === "jpeg" || t.ext === "gif" || t.ext === "svg" || t.ext === "webp" ? (
|
|
890
|
+
e("div", ss, [
|
|
891
|
+
e("div", os, [
|
|
892
|
+
t.ext === "png" || t.ext === "jpg" || t.ext === "jpeg" || t.ext === "gif" || t.ext === "svg" || t.ext === "webp" ? (o(), a("img", {
|
|
893
893
|
key: 0,
|
|
894
894
|
src: `/file/resize?filepath=${t?.file_path}&w=500`,
|
|
895
895
|
alt: "file",
|
|
896
896
|
class: "w-full h-full object-cover"
|
|
897
|
-
}, null, 8,
|
|
897
|
+
}, null, 8, ns)) : (o(), I(k(q), {
|
|
898
898
|
key: 1,
|
|
899
899
|
class: "h-10 w-10 text-gray-500"
|
|
900
900
|
}))
|
|
901
901
|
]),
|
|
902
|
-
e("div",
|
|
902
|
+
e("div", is, [
|
|
903
903
|
e("h3", {
|
|
904
904
|
class: "font-medium text-xs leading-tight text-left",
|
|
905
905
|
title: t.uploaded_name || t.name
|
|
906
|
-
},
|
|
907
|
-
e("p",
|
|
906
|
+
}, b(t.uploaded_name || t.name), 9, ls),
|
|
907
|
+
e("p", as, b(k(_e)(t.createdAt)) + ", " + b(k(we)(t.size)), 1)
|
|
908
908
|
])
|
|
909
909
|
]),
|
|
910
|
-
e("div",
|
|
910
|
+
e("div", rs, [
|
|
911
911
|
e("button", {
|
|
912
|
-
onClick: K((s) =>
|
|
912
|
+
onClick: K((s) => l.$emit("download", t), ["stop"]),
|
|
913
913
|
class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"
|
|
914
914
|
}, [
|
|
915
|
-
|
|
916
|
-
], 8,
|
|
915
|
+
$(k(ue), { class: "h-3 w-3" })
|
|
916
|
+
], 8, ds),
|
|
917
917
|
e("a", {
|
|
918
918
|
class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",
|
|
919
|
-
onClick: K((s) =>
|
|
919
|
+
onClick: K((s) => l.$emit("delete", s, t?.file_id), ["stop"])
|
|
920
920
|
}, [
|
|
921
|
-
|
|
922
|
-
], 8,
|
|
921
|
+
$(k(pe), { class: "h-3 w-3" })
|
|
922
|
+
], 8, cs)
|
|
923
923
|
])
|
|
924
|
-
], 8,
|
|
924
|
+
], 8, ts))), 128))
|
|
925
925
|
]));
|
|
926
926
|
}
|
|
927
|
-
}),
|
|
927
|
+
}), ps = { class: "mx-auto font-sans" }, ms = { key: 1 }, ie = /* @__PURE__ */ j({
|
|
928
928
|
__name: "FilesWidget",
|
|
929
929
|
props: {
|
|
930
930
|
title: {},
|
|
@@ -938,258 +938,258 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
|
|
|
938
938
|
onDelete: {}
|
|
939
939
|
},
|
|
940
940
|
emits: ["delete", "add", "openLightbox"],
|
|
941
|
-
setup(
|
|
942
|
-
const
|
|
943
|
-
|
|
944
|
-
const g = (x,
|
|
945
|
-
s.value =
|
|
941
|
+
setup(r, { emit: l }) {
|
|
942
|
+
const i = r, t = w(!1), s = w(null), c = w(!1), n = w(0), u = w(i.files ?? []), v = l;
|
|
943
|
+
u.value.length === 0 && f();
|
|
944
|
+
const g = (x, m) => {
|
|
945
|
+
s.value = m, t.value = !0;
|
|
946
946
|
}, d = () => {
|
|
947
|
-
s.value && (
|
|
948
|
-
}, y = O(() => Array.isArray(
|
|
949
|
-
const
|
|
950
|
-
|
|
951
|
-
},
|
|
952
|
-
|
|
953
|
-
},
|
|
954
|
-
|
|
955
|
-
},
|
|
956
|
-
const
|
|
957
|
-
|
|
958
|
-
},
|
|
959
|
-
async function
|
|
960
|
-
if (!
|
|
947
|
+
s.value && (P(s.value), s.value = null, t.value = !1);
|
|
948
|
+
}, y = O(() => Array.isArray(u.value) ? u.value.map((x) => x?.file_path) : []), h = (x) => {
|
|
949
|
+
const m = y.value.findIndex((E) => E === x.file_path);
|
|
950
|
+
m !== -1 && (c.value = !0, n.value = m);
|
|
951
|
+
}, M = (x) => {
|
|
952
|
+
i.onAddFile ? i.onAddFile(x) : H(x), v("add", x);
|
|
953
|
+
}, P = (x) => {
|
|
954
|
+
i.onDelete ? i.onDelete(x) : C(x), v("delete", x);
|
|
955
|
+
}, F = (x) => {
|
|
956
|
+
const m = document.createElement("a");
|
|
957
|
+
m.setAttribute("download", x?.uploaded_name || x?.name), m.href = x?.file_path || x?.path, m.click();
|
|
958
|
+
}, p = w("list");
|
|
959
|
+
async function f() {
|
|
960
|
+
if (!i.id)
|
|
961
961
|
return;
|
|
962
|
-
const x = await fetch(`/api/widget/file/${
|
|
963
|
-
x.rows.forEach((
|
|
964
|
-
|
|
965
|
-
}),
|
|
962
|
+
const x = await fetch(`/api/widget/file/${i.id}`).then((m) => m.json());
|
|
963
|
+
x.rows.forEach((m) => {
|
|
964
|
+
m.timestamp = new Date(m.cdate), m.id = m.entity_id, m.entityType = m.entity_type, m.entityId = m.entity_id, m.entityType = m.entity_type, m.action = m.change_type, m.userId = m.change_user_id, m.userName = m.username, m.timestamp = new Date(m.cdate), m.description = m.username, m.status = m.username;
|
|
965
|
+
}), u.value = x.rows;
|
|
966
966
|
}
|
|
967
|
-
const
|
|
967
|
+
const H = async (x) => {
|
|
968
968
|
if (!(!x.target || !x.target.files || x.target.files.length === 0))
|
|
969
969
|
try {
|
|
970
970
|
await Promise.all(
|
|
971
|
-
Array.from(x.target.files).map(async (
|
|
971
|
+
Array.from(x.target.files).map(async (m) => {
|
|
972
972
|
const E = new FormData();
|
|
973
|
-
E.append("file",
|
|
974
|
-
const
|
|
973
|
+
E.append("file", m);
|
|
974
|
+
const N = `/api/widget/file/${i.id}`, z = await fetch(N, {
|
|
975
975
|
method: "POST",
|
|
976
976
|
body: E
|
|
977
977
|
});
|
|
978
978
|
if (!z.ok)
|
|
979
979
|
throw new Error(`HTTP error! status: ${z.status}`);
|
|
980
|
-
return
|
|
980
|
+
return m;
|
|
981
981
|
})
|
|
982
|
-
), await
|
|
983
|
-
} catch (
|
|
984
|
-
console.error("Помилка при завантаженні файлів:",
|
|
982
|
+
), await f();
|
|
983
|
+
} catch (m) {
|
|
984
|
+
console.error("Помилка при завантаженні файлів:", m);
|
|
985
985
|
}
|
|
986
986
|
}, C = async (x) => {
|
|
987
987
|
try {
|
|
988
988
|
await fetch(
|
|
989
|
-
`/api/widget/file/${
|
|
989
|
+
`/api/widget/file/${i.id}/${x}`,
|
|
990
990
|
{
|
|
991
991
|
method: "DELETE"
|
|
992
992
|
}
|
|
993
|
-
), await
|
|
994
|
-
} catch (
|
|
995
|
-
console.error(
|
|
993
|
+
), await f();
|
|
994
|
+
} catch (m) {
|
|
995
|
+
console.error(m);
|
|
996
996
|
}
|
|
997
997
|
};
|
|
998
|
-
return (x,
|
|
999
|
-
const E =
|
|
1000
|
-
return
|
|
1001
|
-
e("div",
|
|
1002
|
-
|
|
1003
|
-
modelValue:
|
|
1004
|
-
"onUpdate:modelValue":
|
|
1005
|
-
title:
|
|
1006
|
-
onOnAddFile:
|
|
998
|
+
return (x, m) => {
|
|
999
|
+
const E = se("MessageBox"), N = se("Lightbox");
|
|
1000
|
+
return o(), a(V, null, [
|
|
1001
|
+
e("div", ps, [
|
|
1002
|
+
$(Rt, {
|
|
1003
|
+
modelValue: p.value,
|
|
1004
|
+
"onUpdate:modelValue": m[0] || (m[0] = (z) => p.value = z),
|
|
1005
|
+
title: i.title,
|
|
1006
|
+
onOnAddFile: m[1] || (m[1] = (z) => M(z))
|
|
1007
1007
|
}, null, 8, ["modelValue", "title"]),
|
|
1008
|
-
|
|
1008
|
+
u.value.length > 0 ? (o(), a("div", {
|
|
1009
1009
|
key: 0,
|
|
1010
1010
|
class: D(x.maxHeight ? "overflow-y-auto" : ""),
|
|
1011
|
-
style:
|
|
1011
|
+
style: U({ maxHeight: x.maxHeight + "px" })
|
|
1012
1012
|
}, [
|
|
1013
|
-
|
|
1013
|
+
p.value === "list" ? (o(), I(Yt, {
|
|
1014
1014
|
key: 0,
|
|
1015
1015
|
onDelete: g,
|
|
1016
|
-
onDownload:
|
|
1017
|
-
onOpenLightbox:
|
|
1018
|
-
files:
|
|
1019
|
-
}, null, 8, ["files"])) :
|
|
1020
|
-
|
|
1016
|
+
onDownload: F,
|
|
1017
|
+
onOpenLightbox: m[2] || (m[2] = (z) => h(z)),
|
|
1018
|
+
files: u.value
|
|
1019
|
+
}, null, 8, ["files"])) : _("", !0),
|
|
1020
|
+
p.value === "grid" ? (o(), I(us, {
|
|
1021
1021
|
key: 1,
|
|
1022
1022
|
onDelete: g,
|
|
1023
|
-
onDownload:
|
|
1024
|
-
onOpenLightbox:
|
|
1025
|
-
files:
|
|
1026
|
-
}, null, 8, ["files"])) :
|
|
1027
|
-
], 6)) : (
|
|
1023
|
+
onDownload: F,
|
|
1024
|
+
onOpenLightbox: m[3] || (m[3] = (z) => h(z)),
|
|
1025
|
+
files: u.value
|
|
1026
|
+
}, null, 8, ["files"])) : _("", !0)
|
|
1027
|
+
], 6)) : (o(), a("div", ms, m[6] || (m[6] = [
|
|
1028
1028
|
e("div", { class: "flex items-center justify-center h-full" }, [
|
|
1029
1029
|
e("p", { class: "text-gray-500 leading-[3]" }, "Файлів не знайдено")
|
|
1030
1030
|
], -1)
|
|
1031
1031
|
])))
|
|
1032
1032
|
]),
|
|
1033
|
-
|
|
1033
|
+
$(E, {
|
|
1034
1034
|
modelValue: t.value,
|
|
1035
|
-
"onUpdate:modelValue":
|
|
1035
|
+
"onUpdate:modelValue": m[4] || (m[4] = (z) => t.value = z),
|
|
1036
1036
|
onConfirm: d,
|
|
1037
1037
|
title: "Ви впевнені?",
|
|
1038
1038
|
message: "Ви впевнені, що хочете видалити цей файл?",
|
|
1039
1039
|
confirmButtonText: "Так, я впевнена/ий",
|
|
1040
1040
|
cancelButtonText: "Скасувати"
|
|
1041
1041
|
}, null, 8, ["modelValue"]),
|
|
1042
|
-
|
|
1043
|
-
modelValue:
|
|
1044
|
-
"onUpdate:modelValue":
|
|
1042
|
+
$(N, {
|
|
1043
|
+
modelValue: c.value,
|
|
1044
|
+
"onUpdate:modelValue": m[5] || (m[5] = (z) => c.value = z),
|
|
1045
1045
|
images: y.value,
|
|
1046
|
-
"start-index":
|
|
1046
|
+
"start-index": n.value
|
|
1047
1047
|
}, null, 8, ["modelValue", "images", "start-index"])
|
|
1048
1048
|
], 64);
|
|
1049
1049
|
};
|
|
1050
1050
|
}
|
|
1051
|
-
}),
|
|
1051
|
+
}), gs = ["onClick"], hs = /* @__PURE__ */ j({
|
|
1052
1052
|
__name: "CopyNotification",
|
|
1053
|
-
setup(
|
|
1054
|
-
const
|
|
1053
|
+
setup(r, { expose: l }) {
|
|
1054
|
+
const i = w([]);
|
|
1055
1055
|
let t = 1;
|
|
1056
1056
|
const s = () => {
|
|
1057
|
-
if (
|
|
1058
|
-
const
|
|
1059
|
-
clearTimeout(
|
|
1057
|
+
if (i.value.length >= 10) {
|
|
1058
|
+
const u = i.value[0];
|
|
1059
|
+
clearTimeout(u.timer), i.value.shift();
|
|
1060
1060
|
}
|
|
1061
|
-
const
|
|
1061
|
+
const n = {
|
|
1062
1062
|
id: t++,
|
|
1063
1063
|
timer: setTimeout(() => {
|
|
1064
|
-
|
|
1064
|
+
c(n.id);
|
|
1065
1065
|
}, 1500)
|
|
1066
1066
|
};
|
|
1067
|
-
|
|
1068
|
-
},
|
|
1069
|
-
const
|
|
1070
|
-
if (
|
|
1071
|
-
const v =
|
|
1072
|
-
clearTimeout(v.timer),
|
|
1067
|
+
i.value.push(n);
|
|
1068
|
+
}, c = (n) => {
|
|
1069
|
+
const u = i.value.findIndex((v) => v.id === n);
|
|
1070
|
+
if (u !== -1) {
|
|
1071
|
+
const v = i.value[u];
|
|
1072
|
+
clearTimeout(v.timer), i.value.splice(u, 1);
|
|
1073
1073
|
}
|
|
1074
1074
|
};
|
|
1075
|
-
return
|
|
1075
|
+
return l({
|
|
1076
1076
|
addNotification: s
|
|
1077
|
-
}),
|
|
1078
|
-
|
|
1079
|
-
clearTimeout(
|
|
1077
|
+
}), ce(() => {
|
|
1078
|
+
i.value.forEach((n) => {
|
|
1079
|
+
clearTimeout(n.timer);
|
|
1080
1080
|
});
|
|
1081
|
-
}), (
|
|
1082
|
-
|
|
1081
|
+
}), (n, u) => (o(), I(be, { to: "body" }, [
|
|
1082
|
+
$(De, {
|
|
1083
1083
|
name: "notification",
|
|
1084
1084
|
tag: "div",
|
|
1085
1085
|
class: "fixed top-4 right-4 z-50 space-y-2"
|
|
1086
1086
|
}, {
|
|
1087
|
-
default:
|
|
1088
|
-
(
|
|
1087
|
+
default: Te(() => [
|
|
1088
|
+
(o(!0), a(V, null, A(i.value, (v) => (o(), a("div", {
|
|
1089
1089
|
key: v.id,
|
|
1090
1090
|
class: "bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"
|
|
1091
1091
|
}, [
|
|
1092
|
-
|
|
1093
|
-
|
|
1092
|
+
$(k(Oe), { class: "h-5 w-5 text-green-100 flex-shrink-0" }),
|
|
1093
|
+
u[0] || (u[0] = e("div", { class: "flex-1" }, [
|
|
1094
1094
|
e("p", { class: "font-medium text-sm" }, "Ссылка скопирована!"),
|
|
1095
1095
|
e("p", { class: "text-xs text-green-100 opacity-90" }, "Файл добавлен в буфер обмена")
|
|
1096
1096
|
], -1)),
|
|
1097
1097
|
e("button", {
|
|
1098
|
-
onClick: (g) =>
|
|
1098
|
+
onClick: (g) => c(v.id),
|
|
1099
1099
|
class: "text-green-100 hover:text-white transition-colors flex-shrink-0"
|
|
1100
1100
|
}, [
|
|
1101
|
-
|
|
1102
|
-
], 8,
|
|
1101
|
+
$(k(Y), { class: "h-4 w-4" })
|
|
1102
|
+
], 8, gs)
|
|
1103
1103
|
]))), 128))
|
|
1104
1104
|
]),
|
|
1105
1105
|
_: 1
|
|
1106
1106
|
})
|
|
1107
1107
|
]));
|
|
1108
1108
|
}
|
|
1109
|
-
}),
|
|
1110
|
-
const
|
|
1111
|
-
for (const [t, s] of
|
|
1112
|
-
|
|
1113
|
-
return
|
|
1114
|
-
}, $e = /* @__PURE__ */
|
|
1109
|
+
}), W = (r, l) => {
|
|
1110
|
+
const i = r.__vccOpts || r;
|
|
1111
|
+
for (const [t, s] of l)
|
|
1112
|
+
i[t] = s;
|
|
1113
|
+
return i;
|
|
1114
|
+
}, $e = /* @__PURE__ */ W(hs, [["__scopeId", "data-v-55903525"]]), fs = { class: "fixed inset-0 z-50 bg-black/80" }, vs = { class: "fixed bg-white left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 sm:rounded-lg max-w-4xl max-h-[90vh] p-0" }, ys = { class: "flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2" }, bs = { class: "flex items-center justify-between" }, xs = { class: "flex items-center gap-2" }, ks = { class: "tracking-tight text-base font-medium" }, _s = { class: "p-4 pt-0" }, ws = { class: "flex flex-col items-center" }, $s = ["src", "alt"], Cs = { class: "mt-3 flex items-center gap-4 text-sm text-gray-600" }, Ms = { class: "mt-3 flex gap-2" }, Ls = /* @__PURE__ */ j({
|
|
1115
1115
|
__name: "GalleryModal",
|
|
1116
1116
|
props: {
|
|
1117
1117
|
item: {}
|
|
1118
1118
|
},
|
|
1119
1119
|
emits: ["close"],
|
|
1120
|
-
setup(
|
|
1121
|
-
const
|
|
1120
|
+
setup(r) {
|
|
1121
|
+
const l = w(), i = (n) => new Date(n).toLocaleDateString("uk-UA", {
|
|
1122
1122
|
day: "2-digit",
|
|
1123
1123
|
month: "2-digit",
|
|
1124
1124
|
year: "numeric"
|
|
1125
|
-
}), t = (
|
|
1126
|
-
navigator.clipboard.writeText(
|
|
1127
|
-
},
|
|
1125
|
+
}), t = (n) => n >= 1024 * 1024 * 1024 ? (n / (1024 * 1024 * 1024)).toFixed(2) + " GB" : n >= 1024 * 1024 ? (n / (1024 * 1024)).toFixed(2) + " MB" : n >= 1024 ? (n / 1024).toFixed(2) + " KB" : n + " B", s = (n) => {
|
|
1126
|
+
navigator.clipboard.writeText(n), l.value?.addNotification();
|
|
1127
|
+
}, c = async (n, u) => {
|
|
1128
1128
|
try {
|
|
1129
|
-
const g = await (await fetch(
|
|
1130
|
-
y.href = d, y.download =
|
|
1129
|
+
const g = await (await fetch(n)).blob(), d = window.URL.createObjectURL(g), y = document.createElement("a");
|
|
1130
|
+
y.href = d, y.download = u, document.body.appendChild(y), y.click(), window.URL.revokeObjectURL(d), document.body.removeChild(y);
|
|
1131
1131
|
} catch (v) {
|
|
1132
1132
|
console.error("Download failed:", v), alert("Download failed. Please try opening the image in a new tab.");
|
|
1133
1133
|
}
|
|
1134
1134
|
};
|
|
1135
|
-
return (
|
|
1136
|
-
e("div",
|
|
1137
|
-
e("div",
|
|
1138
|
-
e("div",
|
|
1139
|
-
e("div",
|
|
1140
|
-
e("h2",
|
|
1135
|
+
return (n, u) => (o(), a("div", fs, [
|
|
1136
|
+
e("div", vs, [
|
|
1137
|
+
e("div", ys, [
|
|
1138
|
+
e("div", bs, [
|
|
1139
|
+
e("div", xs, [
|
|
1140
|
+
e("h2", ks, b(n.item.name), 1)
|
|
1141
1141
|
])
|
|
1142
1142
|
])
|
|
1143
1143
|
]),
|
|
1144
|
-
e("div",
|
|
1145
|
-
e("div",
|
|
1144
|
+
e("div", _s, [
|
|
1145
|
+
e("div", ws, [
|
|
1146
1146
|
e("img", {
|
|
1147
|
-
src:
|
|
1148
|
-
alt:
|
|
1147
|
+
src: n.item.path,
|
|
1148
|
+
alt: n.item.name,
|
|
1149
1149
|
class: "max-w-full max-h-[60vh] object-contain rounded border"
|
|
1150
|
-
}, null, 8,
|
|
1151
|
-
e("div",
|
|
1152
|
-
e("span", null, "Size: " +
|
|
1153
|
-
|
|
1154
|
-
e("span", null, "Date: " +
|
|
1150
|
+
}, null, 8, $s),
|
|
1151
|
+
e("div", Cs, [
|
|
1152
|
+
e("span", null, "Size: " + b(t(n.item.size)), 1),
|
|
1153
|
+
u[3] || (u[3] = e("span", null, "•", -1)),
|
|
1154
|
+
e("span", null, "Date: " + b(i(n.item.createdAt)), 1)
|
|
1155
1155
|
]),
|
|
1156
|
-
e("div",
|
|
1156
|
+
e("div", Ms, [
|
|
1157
1157
|
e("button", {
|
|
1158
|
-
onClick:
|
|
1158
|
+
onClick: u[0] || (u[0] = (v) => c(n.item.path, n.item.name)),
|
|
1159
1159
|
class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"
|
|
1160
1160
|
}, [
|
|
1161
|
-
|
|
1162
|
-
|
|
1161
|
+
$(k(ue), { class: "h-3 w-3 mr-1" }),
|
|
1162
|
+
u[4] || (u[4] = S(" Download ", -1))
|
|
1163
1163
|
]),
|
|
1164
1164
|
e("button", {
|
|
1165
|
-
onClick:
|
|
1165
|
+
onClick: u[1] || (u[1] = (v) => s(n.item.path)),
|
|
1166
1166
|
class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"
|
|
1167
1167
|
}, [
|
|
1168
|
-
|
|
1169
|
-
|
|
1168
|
+
$(k(Ke), { class: "h-3 w-3 mr-1" }),
|
|
1169
|
+
u[5] || (u[5] = S(" Share ", -1))
|
|
1170
1170
|
])
|
|
1171
1171
|
])
|
|
1172
1172
|
])
|
|
1173
1173
|
]),
|
|
1174
1174
|
e("button", {
|
|
1175
1175
|
type: "button",
|
|
1176
|
-
onClick:
|
|
1176
|
+
onClick: u[2] || (u[2] = (v) => n.$emit("close")),
|
|
1177
1177
|
class: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
|
|
1178
1178
|
}, [
|
|
1179
|
-
|
|
1180
|
-
|
|
1179
|
+
$(k(Y), { class: "h-4 w-4" }),
|
|
1180
|
+
u[6] || (u[6] = e("span", { class: "sr-only" }, "Close", -1))
|
|
1181
1181
|
])
|
|
1182
1182
|
]),
|
|
1183
|
-
|
|
1183
|
+
$($e, {
|
|
1184
1184
|
ref_key: "copyNotificationRef",
|
|
1185
|
-
ref:
|
|
1185
|
+
ref: l
|
|
1186
1186
|
}, null, 512)
|
|
1187
1187
|
]));
|
|
1188
1188
|
}
|
|
1189
|
-
}),
|
|
1189
|
+
}), Ds = {
|
|
1190
1190
|
key: 0,
|
|
1191
1191
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
1192
|
-
},
|
|
1192
|
+
}, Ts = ["onClick"], Is = ["src", "alt"], le = /* @__PURE__ */ j({
|
|
1193
1193
|
__name: "GalleryWidget",
|
|
1194
1194
|
props: {
|
|
1195
1195
|
title: {},
|
|
@@ -1200,91 +1200,91 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
|
|
|
1200
1200
|
className: {},
|
|
1201
1201
|
style: {}
|
|
1202
1202
|
},
|
|
1203
|
-
setup(
|
|
1204
|
-
const
|
|
1205
|
-
let
|
|
1206
|
-
const
|
|
1207
|
-
const d =
|
|
1208
|
-
return
|
|
1203
|
+
setup(r) {
|
|
1204
|
+
const l = r, i = w(!1), t = w(null), s = w(), c = w(0);
|
|
1205
|
+
let n = null;
|
|
1206
|
+
const u = O(() => {
|
|
1207
|
+
const d = l.columns || 4;
|
|
1208
|
+
return c.value >= 1440 ? d : c.value >= 1024 ? Math.max(1, d - 1) : c.value >= 768 ? Math.max(1, d - 2) : c.value >= 640 ? Math.max(1, d - 3) : 1;
|
|
1209
1209
|
}), v = () => {
|
|
1210
|
-
s.value && (
|
|
1210
|
+
s.value && (c.value = s.value.offsetWidth);
|
|
1211
1211
|
};
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
s.value && (
|
|
1212
|
+
Q(() => {
|
|
1213
|
+
Ie(() => {
|
|
1214
|
+
s.value && (n = new ResizeObserver((d) => {
|
|
1215
1215
|
for (const y of d)
|
|
1216
|
-
y.target === s.value && (
|
|
1217
|
-
}),
|
|
1216
|
+
y.target === s.value && (c.value = y.contentRect.width);
|
|
1217
|
+
}), n.observe(s.value), v());
|
|
1218
1218
|
});
|
|
1219
|
-
}),
|
|
1220
|
-
|
|
1219
|
+
}), ce(() => {
|
|
1220
|
+
n && n.disconnect();
|
|
1221
1221
|
});
|
|
1222
1222
|
const g = (d) => {
|
|
1223
|
-
t.value = d,
|
|
1223
|
+
t.value = d, i.value = !0;
|
|
1224
1224
|
};
|
|
1225
|
-
return (d, y) => (
|
|
1225
|
+
return (d, y) => (o(), a("div", {
|
|
1226
1226
|
class: "w-full mx-auto font-sans",
|
|
1227
1227
|
ref_key: "containerRef",
|
|
1228
1228
|
ref: s
|
|
1229
1229
|
}, [
|
|
1230
|
-
d.title ? (
|
|
1230
|
+
d.title ? (o(), a("h3", Ds, b(d.title), 1)) : _("", !0),
|
|
1231
1231
|
e("div", {
|
|
1232
1232
|
class: D(d.maxHeight ? "overflow-y-auto" : ""),
|
|
1233
|
-
style:
|
|
1233
|
+
style: U({ maxHeight: d.maxHeight + "px" })
|
|
1234
1234
|
}, [
|
|
1235
1235
|
e("div", {
|
|
1236
|
-
style:
|
|
1236
|
+
style: U({ columns: u.value + " auto", gap: "12px" }),
|
|
1237
1237
|
class: "space-y-3"
|
|
1238
1238
|
}, [
|
|
1239
|
-
(
|
|
1240
|
-
key:
|
|
1241
|
-
onClick: (
|
|
1239
|
+
(o(!0), a(V, null, A(d.items, (h) => (o(), a("div", {
|
|
1240
|
+
key: h.id,
|
|
1241
|
+
onClick: (M) => g(h),
|
|
1242
1242
|
class: "group relative break-inside-avoid bg-gray-200 rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-all mb-3"
|
|
1243
1243
|
}, [
|
|
1244
1244
|
e("img", {
|
|
1245
|
-
src:
|
|
1246
|
-
alt:
|
|
1245
|
+
src: h.path,
|
|
1246
|
+
alt: h.name,
|
|
1247
1247
|
class: "w-full h-auto min-h-40 rounded-md object-contain"
|
|
1248
|
-
}, null, 8,
|
|
1248
|
+
}, null, 8, Is),
|
|
1249
1249
|
y[1] || (y[1] = e("div", { class: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-12" }, [
|
|
1250
1250
|
e("h3", { class: "text-white font-medium text-base leading-tight mb-1" }, "Mountain Landscape"),
|
|
1251
1251
|
e("p", { class: "text-white/90 text-sm" }, "2.4 MB")
|
|
1252
1252
|
], -1)),
|
|
1253
1253
|
y[2] || (y[2] = e("div", { class: "absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-200" }, null, -1))
|
|
1254
|
-
], 8,
|
|
1254
|
+
], 8, Ts))), 128))
|
|
1255
1255
|
], 4)
|
|
1256
1256
|
], 6),
|
|
1257
|
-
(
|
|
1258
|
-
|
|
1257
|
+
(o(), I(be, { to: "body" }, [
|
|
1258
|
+
i.value && t.value ? (o(), I(Ls, {
|
|
1259
1259
|
key: 0,
|
|
1260
1260
|
item: t.value,
|
|
1261
|
-
onClose: y[0] || (y[0] = (
|
|
1262
|
-
}, null, 8, ["item"])) :
|
|
1261
|
+
onClose: y[0] || (y[0] = (h) => i.value = !1)
|
|
1262
|
+
}, null, 8, ["item"])) : _("", !0)
|
|
1263
1263
|
]))
|
|
1264
1264
|
], 512));
|
|
1265
1265
|
}
|
|
1266
|
-
}),
|
|
1266
|
+
}), js = { class: "text-value" }, zs = { class: "text-sm text-gray-900" }, Vs = /* @__PURE__ */ j({
|
|
1267
1267
|
__name: "TextValue",
|
|
1268
1268
|
props: {
|
|
1269
1269
|
item: {}
|
|
1270
1270
|
},
|
|
1271
|
-
setup(
|
|
1272
|
-
const
|
|
1273
|
-
const t =
|
|
1271
|
+
setup(r) {
|
|
1272
|
+
const l = r, i = O(() => {
|
|
1273
|
+
const t = l.item.value;
|
|
1274
1274
|
return typeof t == "boolean" ? t ? "Так" : "Ні" : t == null ? "—" : String(t);
|
|
1275
1275
|
});
|
|
1276
|
-
return (t, s) => (
|
|
1277
|
-
e("span",
|
|
1276
|
+
return (t, s) => (o(), a("div", js, [
|
|
1277
|
+
e("span", zs, b(i.value), 1)
|
|
1278
1278
|
]));
|
|
1279
1279
|
}
|
|
1280
|
-
}),
|
|
1280
|
+
}), Fs = /* @__PURE__ */ W(Vs, [["__scopeId", "data-v-c14550b7"]]), Hs = { class: "link-value" }, As = ["href"], Ss = /* @__PURE__ */ j({
|
|
1281
1281
|
__name: "LinkValue",
|
|
1282
1282
|
props: {
|
|
1283
1283
|
item: {}
|
|
1284
1284
|
},
|
|
1285
|
-
setup(
|
|
1286
|
-
const
|
|
1287
|
-
const t = String(
|
|
1285
|
+
setup(r) {
|
|
1286
|
+
const l = r, i = O(() => {
|
|
1287
|
+
const t = String(l.item.value);
|
|
1288
1288
|
try {
|
|
1289
1289
|
const s = new URL(t);
|
|
1290
1290
|
return s.hostname + s.pathname;
|
|
@@ -1292,26 +1292,26 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
|
|
|
1292
1292
|
return t;
|
|
1293
1293
|
}
|
|
1294
1294
|
});
|
|
1295
|
-
return (t, s) => (
|
|
1295
|
+
return (t, s) => (o(), a("div", Hs, [
|
|
1296
1296
|
e("a", {
|
|
1297
1297
|
href: String(t.item.value),
|
|
1298
1298
|
target: "_blank",
|
|
1299
1299
|
rel: "noopener noreferrer",
|
|
1300
1300
|
class: "text-blue-600 hover:text-blue-800 underline text-sm"
|
|
1301
1301
|
}, [
|
|
1302
|
-
|
|
1302
|
+
S(b(i.value) + " ", 1),
|
|
1303
1303
|
s[0] || (s[0] = e("i", { class: "fas fa-external-link-alt ml-1 text-xs" }, null, -1))
|
|
1304
|
-
], 8,
|
|
1304
|
+
], 8, As)
|
|
1305
1305
|
]));
|
|
1306
1306
|
}
|
|
1307
|
-
}),
|
|
1307
|
+
}), Es = /* @__PURE__ */ W(Ss, [["__scopeId", "data-v-e6eb07a6"]]), Os = { class: "date-value" }, Bs = { class: "text-sm text-gray-900" }, Ns = /* @__PURE__ */ j({
|
|
1308
1308
|
__name: "DateValue",
|
|
1309
1309
|
props: {
|
|
1310
1310
|
item: {}
|
|
1311
1311
|
},
|
|
1312
|
-
setup(
|
|
1313
|
-
const
|
|
1314
|
-
const t =
|
|
1312
|
+
setup(r) {
|
|
1313
|
+
const l = r, i = O(() => {
|
|
1314
|
+
const t = l.item.value;
|
|
1315
1315
|
if (t instanceof Date)
|
|
1316
1316
|
return t.toLocaleDateString("uk-UA", {
|
|
1317
1317
|
year: "numeric",
|
|
@@ -1333,21 +1333,21 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
return String(t);
|
|
1335
1335
|
});
|
|
1336
|
-
return (t, s) => (
|
|
1337
|
-
e("span",
|
|
1336
|
+
return (t, s) => (o(), a("div", Os, [
|
|
1337
|
+
e("span", Bs, b(i.value), 1)
|
|
1338
1338
|
]));
|
|
1339
1339
|
}
|
|
1340
|
-
}),
|
|
1340
|
+
}), Rs = /* @__PURE__ */ W(Ns, [["__scopeId", "data-v-b9600618"]]), Us = { class: "status-value" }, Ws = {
|
|
1341
1341
|
key: 0,
|
|
1342
1342
|
class: "mr-1"
|
|
1343
|
-
},
|
|
1343
|
+
}, Ps = /* @__PURE__ */ j({
|
|
1344
1344
|
__name: "StatusValue",
|
|
1345
1345
|
props: {
|
|
1346
1346
|
item: {}
|
|
1347
1347
|
},
|
|
1348
|
-
setup(
|
|
1349
|
-
const
|
|
1350
|
-
switch (String(
|
|
1348
|
+
setup(r) {
|
|
1349
|
+
const l = r, i = O(() => {
|
|
1350
|
+
switch (String(l.item.value).toLowerCase()) {
|
|
1351
1351
|
case "active":
|
|
1352
1352
|
case "активний":
|
|
1353
1353
|
case "успішно":
|
|
@@ -1370,7 +1370,7 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
|
|
|
1370
1370
|
return "bg-blue-100 text-blue-800";
|
|
1371
1371
|
}
|
|
1372
1372
|
}), t = O(() => {
|
|
1373
|
-
switch (String(
|
|
1373
|
+
switch (String(l.item.value).toLowerCase()) {
|
|
1374
1374
|
case "active":
|
|
1375
1375
|
case "активний":
|
|
1376
1376
|
case "успішно":
|
|
@@ -1393,50 +1393,50 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
|
|
|
1393
1393
|
return "fas fa-info-circle";
|
|
1394
1394
|
}
|
|
1395
1395
|
});
|
|
1396
|
-
return (s,
|
|
1396
|
+
return (s, c) => (o(), a("div", Us, [
|
|
1397
1397
|
e("span", {
|
|
1398
|
-
class: D(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",
|
|
1398
|
+
class: D(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium", i.value])
|
|
1399
1399
|
}, [
|
|
1400
|
-
t.value ? (
|
|
1400
|
+
t.value ? (o(), a("span", Ws, [
|
|
1401
1401
|
e("i", {
|
|
1402
1402
|
class: D(t.value)
|
|
1403
1403
|
}, null, 2)
|
|
1404
|
-
])) :
|
|
1405
|
-
|
|
1404
|
+
])) : _("", !0),
|
|
1405
|
+
S(" " + b(String(s.item.value)), 1)
|
|
1406
1406
|
], 2)
|
|
1407
1407
|
]));
|
|
1408
1408
|
}
|
|
1409
|
-
}),
|
|
1409
|
+
}), Gs = /* @__PURE__ */ W(Ps, [["__scopeId", "data-v-c72e0b01"]]), qs = { class: "custom-value" }, Ks = { class: "text-sm text-gray-900" }, Zs = /* @__PURE__ */ j({
|
|
1410
1410
|
__name: "CustomValue",
|
|
1411
1411
|
props: {
|
|
1412
1412
|
item: {}
|
|
1413
1413
|
},
|
|
1414
|
-
setup(
|
|
1415
|
-
return (
|
|
1416
|
-
G(
|
|
1417
|
-
item:
|
|
1418
|
-
value:
|
|
1414
|
+
setup(r) {
|
|
1415
|
+
return (l, i) => (o(), a("div", qs, [
|
|
1416
|
+
G(l.$slots, "default", {
|
|
1417
|
+
item: l.item,
|
|
1418
|
+
value: l.item.value
|
|
1419
1419
|
}, () => [
|
|
1420
|
-
e("span",
|
|
1420
|
+
e("span", Ks, b(String(l.item.value)), 1)
|
|
1421
1421
|
], !0)
|
|
1422
1422
|
]));
|
|
1423
1423
|
}
|
|
1424
|
-
}),
|
|
1424
|
+
}), Js = /* @__PURE__ */ W(Zs, [["__scopeId", "data-v-11a73810"]]), Xs = ["id"], Qs = {
|
|
1425
1425
|
key: 0,
|
|
1426
1426
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
1427
|
-
},
|
|
1427
|
+
}, Ys = {
|
|
1428
1428
|
key: 1,
|
|
1429
1429
|
class: "overflow-x-auto"
|
|
1430
|
-
},
|
|
1430
|
+
}, eo = { class: "min-w-full divide-y divide-gray-200" }, to = { class: "bg-white divide-y divide-gray-200" }, so = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, oo = { class: "flex items-center gap-2" }, no = ["title"], io = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, lo = {
|
|
1431
1431
|
key: 2,
|
|
1432
1432
|
class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"
|
|
1433
|
-
},
|
|
1433
|
+
}, ao = { class: "flex items-start gap-3" }, ro = {
|
|
1434
1434
|
key: 0,
|
|
1435
1435
|
class: "flex-shrink-0"
|
|
1436
|
-
},
|
|
1436
|
+
}, co = { class: "flex-1 min-w-0" }, uo = { class: "flex items-center gap-2 mb-2" }, po = { class: "text-sm font-medium text-gray-900" }, mo = ["title"], go = {
|
|
1437
1437
|
key: 3,
|
|
1438
1438
|
class: "overflow-x-auto"
|
|
1439
|
-
},
|
|
1439
|
+
}, ho = { class: "min-w-full divide-y divide-gray-200" }, fo = { class: "bg-white divide-y divide-gray-200" }, vo = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, yo = { class: "flex items-center gap-2" }, bo = ["title"], xo = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, ko = /* @__PURE__ */ j({
|
|
1440
1440
|
__name: "DescriptionListWidget",
|
|
1441
1441
|
props: {
|
|
1442
1442
|
title: {},
|
|
@@ -1446,113 +1446,113 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
|
|
|
1446
1446
|
className: {},
|
|
1447
1447
|
style: {}
|
|
1448
1448
|
},
|
|
1449
|
-
setup(
|
|
1450
|
-
const
|
|
1451
|
-
switch (
|
|
1449
|
+
setup(r) {
|
|
1450
|
+
const l = (i) => {
|
|
1451
|
+
switch (i.type) {
|
|
1452
1452
|
case "link":
|
|
1453
|
-
return
|
|
1453
|
+
return Es;
|
|
1454
1454
|
case "date":
|
|
1455
|
-
return
|
|
1455
|
+
return Rs;
|
|
1456
1456
|
case "status":
|
|
1457
|
-
return
|
|
1457
|
+
return Gs;
|
|
1458
1458
|
case "custom":
|
|
1459
|
-
return
|
|
1459
|
+
return Js;
|
|
1460
1460
|
default:
|
|
1461
|
-
return
|
|
1461
|
+
return Fs;
|
|
1462
1462
|
}
|
|
1463
1463
|
};
|
|
1464
|
-
return (
|
|
1465
|
-
class: D(["description-list-widget",
|
|
1466
|
-
id:
|
|
1467
|
-
style:
|
|
1464
|
+
return (i, t) => (o(), a("div", {
|
|
1465
|
+
class: D(["description-list-widget", i.className]),
|
|
1466
|
+
id: i.id,
|
|
1467
|
+
style: U(i.style)
|
|
1468
1468
|
}, [
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
e("table",
|
|
1472
|
-
e("tbody",
|
|
1473
|
-
(
|
|
1469
|
+
i.title ? (o(), a("h3", Qs, b(i.title), 1)) : _("", !0),
|
|
1470
|
+
i.view === "table" ? (o(), a("div", Ys, [
|
|
1471
|
+
e("table", eo, [
|
|
1472
|
+
e("tbody", to, [
|
|
1473
|
+
(o(!0), a(V, null, A(i.items, (s) => (o(), a("tr", {
|
|
1474
1474
|
key: s.id || s.label
|
|
1475
1475
|
}, [
|
|
1476
|
-
e("td",
|
|
1477
|
-
e("div",
|
|
1478
|
-
s.icon ? (
|
|
1476
|
+
e("td", so, [
|
|
1477
|
+
e("div", oo, [
|
|
1478
|
+
s.icon ? (o(), a("i", {
|
|
1479
1479
|
key: 0,
|
|
1480
1480
|
class: D([s.icon, "text-gray-500"])
|
|
1481
|
-
}, null, 2)) :
|
|
1482
|
-
|
|
1483
|
-
s.tooltip ? (
|
|
1481
|
+
}, null, 2)) : _("", !0),
|
|
1482
|
+
S(" " + b(s.label) + " ", 1),
|
|
1483
|
+
s.tooltip ? (o(), a("span", {
|
|
1484
1484
|
key: 1,
|
|
1485
1485
|
class: "text-gray-400 cursor-help",
|
|
1486
1486
|
title: s.tooltip
|
|
1487
1487
|
}, t[0] || (t[0] = [
|
|
1488
1488
|
e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
|
|
1489
|
-
]), 8,
|
|
1489
|
+
]), 8, no)) : _("", !0)
|
|
1490
1490
|
])
|
|
1491
1491
|
]),
|
|
1492
|
-
e("td",
|
|
1493
|
-
(
|
|
1492
|
+
e("td", io, [
|
|
1493
|
+
(o(), I(B(l(s)), { item: s }, null, 8, ["item"]))
|
|
1494
1494
|
])
|
|
1495
1495
|
]))), 128))
|
|
1496
1496
|
])
|
|
1497
1497
|
])
|
|
1498
|
-
])) :
|
|
1499
|
-
(
|
|
1498
|
+
])) : i.view === "grid" ? (o(), a("div", lo, [
|
|
1499
|
+
(o(!0), a(V, null, A(i.items, (s) => (o(), a("div", {
|
|
1500
1500
|
key: s.id || s.label,
|
|
1501
1501
|
class: "description-item-card bg-white border border-gray-200 rounded-lg p-4"
|
|
1502
1502
|
}, [
|
|
1503
|
-
e("div",
|
|
1504
|
-
s.icon ? (
|
|
1503
|
+
e("div", ao, [
|
|
1504
|
+
s.icon ? (o(), a("div", ro, [
|
|
1505
1505
|
e("i", {
|
|
1506
1506
|
class: D([s.icon, "text-gray-500 text-lg"])
|
|
1507
1507
|
}, null, 2)
|
|
1508
|
-
])) :
|
|
1509
|
-
e("div",
|
|
1510
|
-
e("div",
|
|
1511
|
-
e("h4",
|
|
1512
|
-
s.tooltip ? (
|
|
1508
|
+
])) : _("", !0),
|
|
1509
|
+
e("div", co, [
|
|
1510
|
+
e("div", uo, [
|
|
1511
|
+
e("h4", po, b(s.label), 1),
|
|
1512
|
+
s.tooltip ? (o(), a("span", {
|
|
1513
1513
|
key: 0,
|
|
1514
1514
|
class: "text-gray-400 cursor-help",
|
|
1515
1515
|
title: s.tooltip
|
|
1516
1516
|
}, t[1] || (t[1] = [
|
|
1517
1517
|
e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
|
|
1518
|
-
]), 8,
|
|
1518
|
+
]), 8, mo)) : _("", !0)
|
|
1519
1519
|
]),
|
|
1520
|
-
(
|
|
1520
|
+
(o(), I(B(l(s)), { item: s }, null, 8, ["item"]))
|
|
1521
1521
|
])
|
|
1522
1522
|
])
|
|
1523
1523
|
]))), 128))
|
|
1524
|
-
])) : (
|
|
1525
|
-
e("table",
|
|
1526
|
-
e("tbody",
|
|
1527
|
-
(
|
|
1524
|
+
])) : (o(), a("div", go, [
|
|
1525
|
+
e("table", ho, [
|
|
1526
|
+
e("tbody", fo, [
|
|
1527
|
+
(o(!0), a(V, null, A(i.items, (s) => (o(), a("tr", {
|
|
1528
1528
|
key: s.id || s.label
|
|
1529
1529
|
}, [
|
|
1530
|
-
e("td",
|
|
1531
|
-
e("div",
|
|
1532
|
-
s.icon ? (
|
|
1530
|
+
e("td", vo, [
|
|
1531
|
+
e("div", yo, [
|
|
1532
|
+
s.icon ? (o(), a("i", {
|
|
1533
1533
|
key: 0,
|
|
1534
1534
|
class: D([s.icon, "text-gray-500"])
|
|
1535
|
-
}, null, 2)) :
|
|
1536
|
-
|
|
1537
|
-
s.tooltip ? (
|
|
1535
|
+
}, null, 2)) : _("", !0),
|
|
1536
|
+
S(" " + b(s.label) + " ", 1),
|
|
1537
|
+
s.tooltip ? (o(), a("span", {
|
|
1538
1538
|
key: 1,
|
|
1539
1539
|
class: "text-gray-400 cursor-help",
|
|
1540
1540
|
title: s.tooltip
|
|
1541
1541
|
}, t[2] || (t[2] = [
|
|
1542
1542
|
e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
|
|
1543
|
-
]), 8,
|
|
1543
|
+
]), 8, bo)) : _("", !0)
|
|
1544
1544
|
])
|
|
1545
1545
|
]),
|
|
1546
|
-
e("td",
|
|
1547
|
-
(
|
|
1546
|
+
e("td", xo, [
|
|
1547
|
+
(o(), I(B(l(s)), { item: s }, null, 8, ["item"]))
|
|
1548
1548
|
])
|
|
1549
1549
|
]))), 128))
|
|
1550
1550
|
])
|
|
1551
1551
|
])
|
|
1552
1552
|
]))
|
|
1553
|
-
], 14,
|
|
1553
|
+
], 14, Xs));
|
|
1554
1554
|
}
|
|
1555
|
-
}), Ce = /* @__PURE__ */
|
|
1555
|
+
}), Ce = /* @__PURE__ */ W(ko, [["__scopeId", "data-v-36d43e50"]]), _o = {
|
|
1556
1556
|
draw: {
|
|
1557
1557
|
toolbar: {
|
|
1558
1558
|
actions: {
|
|
@@ -1660,24 +1660,24 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
|
|
|
1660
1660
|
}
|
|
1661
1661
|
}
|
|
1662
1662
|
};
|
|
1663
|
-
function
|
|
1664
|
-
return
|
|
1663
|
+
function wo(r) {
|
|
1664
|
+
return r ? r.type === "FeatureCollection" || r.type === "Feature" ? r : r.geom ? {
|
|
1665
1665
|
type: "Feature",
|
|
1666
1666
|
geometry: {
|
|
1667
|
-
type:
|
|
1668
|
-
coordinates:
|
|
1667
|
+
type: r.geom.type,
|
|
1668
|
+
coordinates: r.geom.coordinates
|
|
1669
1669
|
},
|
|
1670
1670
|
properties: {}
|
|
1671
|
-
} :
|
|
1671
|
+
} : r.type && r.coordinates ? {
|
|
1672
1672
|
type: "Feature",
|
|
1673
|
-
geometry:
|
|
1673
|
+
geometry: r,
|
|
1674
1674
|
properties: {}
|
|
1675
1675
|
} : null : null;
|
|
1676
1676
|
}
|
|
1677
|
-
const
|
|
1677
|
+
const $o = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, Co = {
|
|
1678
1678
|
key: 1,
|
|
1679
1679
|
class: "bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"
|
|
1680
|
-
},
|
|
1680
|
+
}, Mo = { class: "flex items-center justify-between p-2 border-b" }, Lo = { class: "p-2 border-b" }, Do = { class: "flex items-center" }, To = { class: "flex items-center" }, Io = { class: "flex items-center" }, jo = { class: "p-2" }, zo = { class: "flex items-center" }, ae = /* @__PURE__ */ j({
|
|
1681
1681
|
__name: "MapWidget",
|
|
1682
1682
|
props: {
|
|
1683
1683
|
geom: {},
|
|
@@ -1685,10 +1685,10 @@ const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
|
|
|
1685
1685
|
className: {},
|
|
1686
1686
|
style: {}
|
|
1687
1687
|
},
|
|
1688
|
-
setup(
|
|
1689
|
-
const
|
|
1688
|
+
setup(r) {
|
|
1689
|
+
const l = r, i = w(null);
|
|
1690
1690
|
let t, s;
|
|
1691
|
-
const
|
|
1691
|
+
const c = {
|
|
1692
1692
|
topo100: {
|
|
1693
1693
|
url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"
|
|
1694
1694
|
},
|
|
@@ -1698,69 +1698,69 @@ const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
|
|
|
1698
1698
|
osmb: {
|
|
1699
1699
|
url: "https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"
|
|
1700
1700
|
}
|
|
1701
|
-
},
|
|
1702
|
-
let
|
|
1703
|
-
const v =
|
|
1701
|
+
}, n = w("topo100");
|
|
1702
|
+
let u;
|
|
1703
|
+
const v = w(!0), g = w(!1);
|
|
1704
1704
|
function d() {
|
|
1705
|
-
return new Promise((
|
|
1706
|
-
if (window.L && window.L.Draw) return
|
|
1707
|
-
const
|
|
1705
|
+
return new Promise((F, p) => {
|
|
1706
|
+
if (window.L && window.L.Draw) return F(0);
|
|
1707
|
+
const f = (C) => {
|
|
1708
1708
|
if (Array.from(document.styleSheets).some((E) => E?.href?.includes(C))) return;
|
|
1709
|
-
const
|
|
1710
|
-
|
|
1711
|
-
},
|
|
1709
|
+
const m = document.createElement("link");
|
|
1710
|
+
m.rel = "stylesheet", m.href = C, document.head.appendChild(m);
|
|
1711
|
+
}, H = (C) => new Promise((x, m) => {
|
|
1712
1712
|
const E = Array.from(document.scripts).find((z) => z.src === C);
|
|
1713
1713
|
if (E) {
|
|
1714
|
-
E.addEventListener("load", () => x()), E.addEventListener("error", (z) =>
|
|
1714
|
+
E.addEventListener("load", () => x()), E.addEventListener("error", (z) => m(z));
|
|
1715
1715
|
return;
|
|
1716
1716
|
}
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1717
|
+
const N = document.createElement("script");
|
|
1718
|
+
N.src = C, N.async = !0, N.onload = () => x(), N.onerror = (z) => m(z), document.body.appendChild(N);
|
|
1719
1719
|
});
|
|
1720
|
-
|
|
1720
|
+
f("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), f("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), H("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => H("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => F(0)).catch(p);
|
|
1721
1721
|
});
|
|
1722
1722
|
}
|
|
1723
|
-
|
|
1724
|
-
await d(), L.drawLocal =
|
|
1725
|
-
const
|
|
1726
|
-
if (
|
|
1727
|
-
const
|
|
1728
|
-
L.geoJSON(
|
|
1723
|
+
Q(async () => {
|
|
1724
|
+
await d(), L.drawLocal = _o, t = L.map(i.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(t), u = L.tileLayer(c.topo100.url, { maxZoom: 19 }).addTo(t), n.value = "topo100", s = new L.FeatureGroup().addTo(t);
|
|
1725
|
+
const F = wo(l.geom);
|
|
1726
|
+
if (F) {
|
|
1727
|
+
const p = [];
|
|
1728
|
+
L.geoJSON(F).eachLayer((f) => p.push(f)), p.length && s.addLayer(p[0]), s.toGeoJSON(), y();
|
|
1729
1729
|
}
|
|
1730
1730
|
});
|
|
1731
|
-
function y(
|
|
1732
|
-
const
|
|
1733
|
-
if (!
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1731
|
+
function y(F = 30) {
|
|
1732
|
+
const p = s.getLayers();
|
|
1733
|
+
if (!p.length) return;
|
|
1734
|
+
const H = L.featureGroup(p).getBounds();
|
|
1735
|
+
H && H.isValid() && t.fitBounds(H, { padding: [F, F] });
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1738
|
-
|
|
1739
|
-
const
|
|
1740
|
-
|
|
1737
|
+
function h(F) {
|
|
1738
|
+
u && u.removeFrom(t);
|
|
1739
|
+
const p = c[F];
|
|
1740
|
+
u = L.tileLayer(p.url, p.options || {}).addTo(t), n.value = F;
|
|
1741
1741
|
}
|
|
1742
|
-
function
|
|
1743
|
-
|
|
1742
|
+
function M() {
|
|
1743
|
+
h(n.value);
|
|
1744
1744
|
}
|
|
1745
|
-
function
|
|
1745
|
+
function P() {
|
|
1746
1746
|
s && (v.value ? s.addTo(t) : s.removeFrom(t));
|
|
1747
1747
|
}
|
|
1748
|
-
return (
|
|
1748
|
+
return (F, p) => (o(), a("div", $o, [
|
|
1749
1749
|
e("div", {
|
|
1750
1750
|
ref_key: "mapContainer",
|
|
1751
|
-
ref:
|
|
1752
|
-
class: "w-full h-full"
|
|
1751
|
+
ref: i,
|
|
1752
|
+
class: "w-full h-full min-h-[300px]"
|
|
1753
1753
|
}, null, 512),
|
|
1754
|
-
g.value ?
|
|
1754
|
+
g.value ? _("", !0) : (o(), a("div", {
|
|
1755
1755
|
key: 0,
|
|
1756
|
-
onClick:
|
|
1756
|
+
onClick: p[0] || (p[0] = (f) => g.value = !0),
|
|
1757
1757
|
class: "z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer"
|
|
1758
1758
|
}, " Шари ")),
|
|
1759
|
-
g.value ? (
|
|
1760
|
-
e("div",
|
|
1761
|
-
|
|
1762
|
-
(
|
|
1763
|
-
onClick:
|
|
1759
|
+
g.value ? (o(), a("div", Co, [
|
|
1760
|
+
e("div", Mo, [
|
|
1761
|
+
p[7] || (p[7] = e("div", null, "Шари", -1)),
|
|
1762
|
+
(o(), a("svg", {
|
|
1763
|
+
onClick: p[1] || (p[1] = (f) => g.value = !1),
|
|
1764
1764
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1765
1765
|
viewBox: "0 0 24 24",
|
|
1766
1766
|
fill: "none",
|
|
@@ -1769,7 +1769,7 @@ const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
|
|
|
1769
1769
|
"stroke-linecap": "round",
|
|
1770
1770
|
"stroke-linejoin": "round",
|
|
1771
1771
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"
|
|
1772
|
-
},
|
|
1772
|
+
}, p[6] || (p[6] = [
|
|
1773
1773
|
e("path", {
|
|
1774
1774
|
stroke: "none",
|
|
1775
1775
|
d: "M0 0h24v24H0z",
|
|
@@ -1779,82 +1779,170 @@ const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
|
|
|
1779
1779
|
e("path", { d: "M6 6l12 12" }, null, -1)
|
|
1780
1780
|
])))
|
|
1781
1781
|
]),
|
|
1782
|
-
e("div",
|
|
1782
|
+
e("div", Lo, [
|
|
1783
1783
|
e("div", null, [
|
|
1784
|
-
e("label",
|
|
1785
|
-
|
|
1784
|
+
e("label", Do, [
|
|
1785
|
+
R(e("input", {
|
|
1786
1786
|
type: "radio",
|
|
1787
1787
|
name: "base-layer",
|
|
1788
1788
|
value: "topo100",
|
|
1789
|
-
"onUpdate:modelValue":
|
|
1790
|
-
onChange:
|
|
1789
|
+
"onUpdate:modelValue": p[2] || (p[2] = (f) => n.value = f),
|
|
1790
|
+
onChange: M
|
|
1791
1791
|
}, null, 544), [
|
|
1792
|
-
[
|
|
1792
|
+
[ee, n.value]
|
|
1793
1793
|
]),
|
|
1794
|
-
|
|
1794
|
+
p[8] || (p[8] = e("span", { class: "ml-2" }, "Карта України", -1))
|
|
1795
1795
|
])
|
|
1796
1796
|
]),
|
|
1797
1797
|
e("div", null, [
|
|
1798
|
-
e("label",
|
|
1799
|
-
|
|
1798
|
+
e("label", To, [
|
|
1799
|
+
R(e("input", {
|
|
1800
1800
|
type: "radio",
|
|
1801
1801
|
name: "base-layer",
|
|
1802
1802
|
value: "orto10",
|
|
1803
|
-
"onUpdate:modelValue":
|
|
1804
|
-
onChange:
|
|
1803
|
+
"onUpdate:modelValue": p[3] || (p[3] = (f) => n.value = f),
|
|
1804
|
+
onChange: M
|
|
1805
1805
|
}, null, 544), [
|
|
1806
|
-
[
|
|
1806
|
+
[ee, n.value]
|
|
1807
1807
|
]),
|
|
1808
|
-
|
|
1808
|
+
p[9] || (p[9] = e("span", { class: "ml-2" }, "Ortophoto 1:10К", -1))
|
|
1809
1809
|
])
|
|
1810
1810
|
]),
|
|
1811
1811
|
e("div", null, [
|
|
1812
|
-
e("label",
|
|
1813
|
-
|
|
1812
|
+
e("label", Io, [
|
|
1813
|
+
R(e("input", {
|
|
1814
1814
|
type: "radio",
|
|
1815
1815
|
name: "base-layer",
|
|
1816
1816
|
value: "osmb",
|
|
1817
|
-
"onUpdate:modelValue":
|
|
1818
|
-
onChange:
|
|
1817
|
+
"onUpdate:modelValue": p[4] || (p[4] = (f) => n.value = f),
|
|
1818
|
+
onChange: M
|
|
1819
1819
|
}, null, 544), [
|
|
1820
|
-
[
|
|
1820
|
+
[ee, n.value]
|
|
1821
1821
|
]),
|
|
1822
|
-
|
|
1822
|
+
p[10] || (p[10] = e("span", { class: "ml-2" }, "Open Street Map", -1))
|
|
1823
1823
|
])
|
|
1824
1824
|
])
|
|
1825
1825
|
]),
|
|
1826
|
-
e("div",
|
|
1827
|
-
e("label",
|
|
1828
|
-
|
|
1826
|
+
e("div", jo, [
|
|
1827
|
+
e("label", zo, [
|
|
1828
|
+
R(e("input", {
|
|
1829
1829
|
type: "checkbox",
|
|
1830
|
-
"onUpdate:modelValue":
|
|
1831
|
-
onChange:
|
|
1830
|
+
"onUpdate:modelValue": p[5] || (p[5] = (f) => v.value = f),
|
|
1831
|
+
onChange: P
|
|
1832
1832
|
}, null, 544), [
|
|
1833
|
-
[
|
|
1833
|
+
[je, v.value]
|
|
1834
1834
|
]),
|
|
1835
|
-
|
|
1835
|
+
p[11] || (p[11] = e("span", { class: "ml-2" }, " Показати геометрію ", -1))
|
|
1836
1836
|
])
|
|
1837
1837
|
])
|
|
1838
|
-
])) :
|
|
1838
|
+
])) : _("", !0)
|
|
1839
1839
|
]));
|
|
1840
1840
|
}
|
|
1841
|
-
}),
|
|
1841
|
+
}), Vo = /* @__PURE__ */ j({
|
|
1842
|
+
__name: "table",
|
|
1843
|
+
props: {
|
|
1844
|
+
name: {},
|
|
1845
|
+
label: {},
|
|
1846
|
+
component: {},
|
|
1847
|
+
slot: {},
|
|
1848
|
+
col: {},
|
|
1849
|
+
width: {},
|
|
1850
|
+
html: {},
|
|
1851
|
+
title: {},
|
|
1852
|
+
type: {},
|
|
1853
|
+
token: {},
|
|
1854
|
+
count: {},
|
|
1855
|
+
items: {}
|
|
1856
|
+
},
|
|
1857
|
+
setup(r) {
|
|
1858
|
+
const l = w([]), i = w([]), t = r;
|
|
1859
|
+
return Q(async () => {
|
|
1860
|
+
const s = await fetch("/api/data/" + t.token).then((c) => c.json());
|
|
1861
|
+
l.value = s.rows, i.value = s.columns;
|
|
1862
|
+
}), (s, c) => b(t) + " " + b(i.value) + " " + b(l.value);
|
|
1863
|
+
}
|
|
1864
|
+
}), Me = {
|
|
1842
1865
|
"vs-widget-map": ae,
|
|
1843
|
-
"vs-widget-comments":
|
|
1844
|
-
"vs-widget-history":
|
|
1845
|
-
"vs-widget-gallery":
|
|
1846
|
-
"vs-widget-file":
|
|
1847
|
-
"vs-widget-list": Ce
|
|
1848
|
-
|
|
1866
|
+
"vs-widget-comments": oe,
|
|
1867
|
+
"vs-widget-history": ne,
|
|
1868
|
+
"vs-widget-gallery": le,
|
|
1869
|
+
"vs-widget-file": ie,
|
|
1870
|
+
"vs-widget-list": Ce,
|
|
1871
|
+
"vs-widget-table": Vo
|
|
1872
|
+
}, Fo = {
|
|
1849
1873
|
key: 0,
|
|
1850
|
-
class: "
|
|
1851
|
-
},
|
|
1852
|
-
key: 1,
|
|
1853
|
-
class: "p-1"
|
|
1854
|
-
}, Eo = { class: "grid grid-cols-12 gap-4" }, Oo = {
|
|
1874
|
+
class: "mb-4 pb-2 border-b border-gray-200"
|
|
1875
|
+
}, Ho = { class: "text-lg font-semibold text-gray-900" }, Ao = ["innerHTML"], So = {
|
|
1855
1876
|
key: 0,
|
|
1856
1877
|
class: "mb-4 pb-2 border-b border-gray-200"
|
|
1857
|
-
},
|
|
1878
|
+
}, Eo = { class: "text-lg font-semibold text-gray-900" }, Oo = ["innerHTML"], Le = /* @__PURE__ */ j({
|
|
1879
|
+
__name: "CardItem",
|
|
1880
|
+
props: {
|
|
1881
|
+
items: {},
|
|
1882
|
+
type: {},
|
|
1883
|
+
col: {},
|
|
1884
|
+
data: {},
|
|
1885
|
+
html: {},
|
|
1886
|
+
title: {},
|
|
1887
|
+
name: {},
|
|
1888
|
+
label: {},
|
|
1889
|
+
component: {},
|
|
1890
|
+
slot: {},
|
|
1891
|
+
id: {},
|
|
1892
|
+
className: {},
|
|
1893
|
+
style: {}
|
|
1894
|
+
},
|
|
1895
|
+
setup(r) {
|
|
1896
|
+
const l = r, i = O(() => l.col ? {
|
|
1897
|
+
[`lg:col-span-${l.col}`]: !0
|
|
1898
|
+
} : {});
|
|
1899
|
+
function t(c) {
|
|
1900
|
+
return Me[c] || c;
|
|
1901
|
+
}
|
|
1902
|
+
const s = O(() => {
|
|
1903
|
+
const c = {};
|
|
1904
|
+
return c.col && (c.col = c.col), c;
|
|
1905
|
+
});
|
|
1906
|
+
return (c, n) => (o(), a("div", {
|
|
1907
|
+
class: D(["w-full bg-gray-50 rounded-lg p-4 col-span-12", i.value])
|
|
1908
|
+
}, [
|
|
1909
|
+
c.title ? (o(), a("div", Fo, [
|
|
1910
|
+
e("h3", Ho, b(c.title), 1)
|
|
1911
|
+
])) : _("", !0),
|
|
1912
|
+
c.html ? (o(), a("div", {
|
|
1913
|
+
key: 1,
|
|
1914
|
+
innerHTML: c.html,
|
|
1915
|
+
class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
|
|
1916
|
+
}, null, 8, Ao)) : c.type?.includes("tabs") ? (o(), I(re, {
|
|
1917
|
+
key: 2,
|
|
1918
|
+
view: "tab",
|
|
1919
|
+
panels: c.items,
|
|
1920
|
+
data: c.data
|
|
1921
|
+
}, null, 8, ["panels", "data"])) : (o(!0), a(V, { key: 3 }, A(c.items, (u) => (o(), a(V, null, [
|
|
1922
|
+
u.title || u.label ? (o(), a("div", So, [
|
|
1923
|
+
e("h3", Eo, b(u.title || u.label), 1)
|
|
1924
|
+
])) : _("", !0),
|
|
1925
|
+
u.html ? (o(), a("div", {
|
|
1926
|
+
key: 1,
|
|
1927
|
+
innerHTML: u.html,
|
|
1928
|
+
class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
|
|
1929
|
+
}, null, 8, Oo)) : u.component ? (o(), I(B(t(u.component)), Z({
|
|
1930
|
+
key: 2,
|
|
1931
|
+
ref_for: !0
|
|
1932
|
+
}, { ...s.value, ...c.data }, { class: "w-full" }), null, 16)) : G(c.$slots, "default", { key: 3 })
|
|
1933
|
+
], 64))), 256))
|
|
1934
|
+
], 2));
|
|
1935
|
+
}
|
|
1936
|
+
}), Bo = { class: "md:flex gap-[20px]" }, No = {
|
|
1937
|
+
key: 0,
|
|
1938
|
+
class: "col-span-4"
|
|
1939
|
+
}, Ro = ["innerHTML"], Uo = {
|
|
1940
|
+
key: 1,
|
|
1941
|
+
class: "overflow-hidden w-full"
|
|
1942
|
+
}, Wo = { class: "flex border-b border-gray-200 bg-gray-50" }, Po = ["onClick"], Go = { class: "p-1" }, qo = ["innerHTML"], Ko = {
|
|
1943
|
+
key: 2,
|
|
1944
|
+
class: "p-1 w-full"
|
|
1945
|
+
}, Zo = { class: "grid grid-cols-12 gap-4" }, re = /* @__PURE__ */ j({
|
|
1858
1946
|
__name: "Card",
|
|
1859
1947
|
props: {
|
|
1860
1948
|
panels: { default: () => [] },
|
|
@@ -1862,161 +1950,131 @@ const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
|
|
|
1862
1950
|
view: { default: "plain" },
|
|
1863
1951
|
classWrapper: { default: "" },
|
|
1864
1952
|
classPanel: {},
|
|
1865
|
-
normalizeTabs: { type: Boolean, default: !
|
|
1953
|
+
normalizeTabs: { type: Boolean, default: !0 },
|
|
1866
1954
|
id: {},
|
|
1867
1955
|
className: {},
|
|
1868
1956
|
style: {}
|
|
1869
1957
|
},
|
|
1870
|
-
setup(
|
|
1871
|
-
const
|
|
1872
|
-
function t(d) {
|
|
1873
|
-
return zo[d] || d;
|
|
1874
|
-
}
|
|
1958
|
+
setup(r) {
|
|
1959
|
+
const l = r, i = w(0), t = w([]);
|
|
1875
1960
|
function s(d) {
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
continue;
|
|
1881
|
-
}
|
|
1882
|
-
if (p.items.length === 1) {
|
|
1883
|
-
let b = p.items[0];
|
|
1884
|
-
delete p.items, b = { ...p, ...b }, y.push(b);
|
|
1885
|
-
} else {
|
|
1886
|
-
const b = p;
|
|
1887
|
-
b.component = "Card", p.type && (b.view = p.type.includes("tab") ? "tab" : "plain"), b.panels = p.items, b.data = i.data, b.normalizeTabs = !1, y.push(b);
|
|
1888
|
-
}
|
|
1889
|
-
}
|
|
1890
|
-
return y;
|
|
1961
|
+
return Me[d] || d;
|
|
1962
|
+
}
|
|
1963
|
+
function c(d) {
|
|
1964
|
+
return t.value = d.filter((y) => y.type === "pin"), d.filter((y) => y.type !== "pin");
|
|
1891
1965
|
}
|
|
1892
|
-
const
|
|
1893
|
-
[`view-${
|
|
1894
|
-
})),
|
|
1895
|
-
const y =
|
|
1896
|
-
return d.count && (y.count = d.count), d.col && (y.col = d.col), y;
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
return (d, y) => (a(), r("div", {
|
|
1901
|
-
class: D(m.value + d.classWrapper)
|
|
1966
|
+
const n = O(() => l.panels && l.panels.length > 0 ? l.normalizeTabs ? c(l.panels) : l.panels : l.data && Array.isArray(l.data) ? l.data.filter((y) => y.type === "tabs")[0]?.items || [] : []), u = O(() => l.panels && l.panels.length > 0 ? l.normalizeTabs ? c(l.panels) : l.panels : l.data && Array.isArray(l.data) ? l.data : []), v = O(() => ({
|
|
1967
|
+
[`view-${l.view}`]: !0
|
|
1968
|
+
})), g = (d) => {
|
|
1969
|
+
const y = {};
|
|
1970
|
+
return d.count && (y.count = d.count), d.col && (y.col = d.col), d.html && (y.html = d.html), d.title && (y.title = d.title), d.type && (y.type = d.type), d.token && (y.token = d.token), l.data && (y.data = l.data), y;
|
|
1971
|
+
};
|
|
1972
|
+
return (d, y) => (o(), a("div", {
|
|
1973
|
+
class: D(d.classWrapper || v.value)
|
|
1902
1974
|
}, [
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
(
|
|
1906
|
-
key:
|
|
1907
|
-
|
|
1908
|
-
class: D([
|
|
1909
|
-
"px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",
|
|
1910
|
-
{ "text-blue-600 bg-white border-b-2 border-blue-600": n.value === b }
|
|
1911
|
-
])
|
|
1912
|
-
}, k(p.title || p.label || p.name || `Tab ${b + 1}`), 11, Fo))), 128))
|
|
1913
|
-
]),
|
|
1914
|
-
e("div", Ho, [
|
|
1915
|
-
(a(!0), r(A, null, S(f.value, (p, b) => U((a(), r("div", {
|
|
1916
|
-
key: p.name || b,
|
|
1917
|
-
class: D([
|
|
1918
|
-
d.classPanel || "w-full border-gray-100",
|
|
1919
|
-
`col-span-${p.col || 12}`
|
|
1920
|
-
])
|
|
1975
|
+
e("div", Bo, [
|
|
1976
|
+
t.value.length !== 0 ? (o(), a("div", No, [
|
|
1977
|
+
(o(!0), a(V, null, A(t.value[0].items, (h, M) => (o(), a("div", {
|
|
1978
|
+
key: h.name || M,
|
|
1979
|
+
class: "w-full bg-gray-50 rounded-lg p-4 col-span-12 w-full m-1 mb-3"
|
|
1921
1980
|
}, [
|
|
1922
|
-
|
|
1981
|
+
h.html ? (o(), a("div", {
|
|
1923
1982
|
key: 0,
|
|
1924
|
-
innerHTML:
|
|
1925
|
-
class: "text-gray-900 leading-relaxed
|
|
1926
|
-
}, null, 8,
|
|
1927
|
-
key: 1,
|
|
1928
|
-
item: p,
|
|
1929
|
-
data: d.data
|
|
1930
|
-
}) : p.component ? (a(), j(N(p.component), te({
|
|
1931
|
-
key: 2,
|
|
1932
|
-
ref_for: !0
|
|
1933
|
-
}, p.component === "Card" ? p : v(p), { class: "w-full h-full" }), null, 16)) : G(d.$slots, p.slot || `tab-${b}`, {
|
|
1934
|
-
key: 3,
|
|
1935
|
-
item: p,
|
|
1936
|
-
data: d.data
|
|
1937
|
-
})
|
|
1938
|
-
], 2)), [
|
|
1939
|
-
[Ie, n.value === b]
|
|
1940
|
-
])), 128))
|
|
1941
|
-
])
|
|
1942
|
-
])) : (a(), r("div", So, [
|
|
1943
|
-
e("div", Eo, [
|
|
1944
|
-
(a(!0), r(A, null, S(o.value, (p, b) => (a(), r("div", {
|
|
1945
|
-
key: p.name || b,
|
|
1946
|
-
class: D([
|
|
1947
|
-
d.classPanel || "bg-gray-50 rounded-lg p-4 border-gray-100",
|
|
1948
|
-
`col-span-${p.col || 12}`
|
|
1949
|
-
]),
|
|
1950
|
-
style: R(g(p))
|
|
1951
|
-
}, [
|
|
1952
|
-
p.title || p.label ? (a(), r("div", Oo, [
|
|
1953
|
-
e("h3", Bo, k(p.title || p.label), 1)
|
|
1954
|
-
])) : $("", !0),
|
|
1955
|
-
p.html ? (a(), r("div", {
|
|
1983
|
+
innerHTML: h.html,
|
|
1984
|
+
class: "text-gray-900 leading-relaxed"
|
|
1985
|
+
}, null, 8, Ro)) : h.component ? (o(), I(B(s(h.component)), Z({
|
|
1956
1986
|
key: 1,
|
|
1957
|
-
innerHTML: p.html,
|
|
1958
|
-
class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
|
|
1959
|
-
}, null, 8, No)) : d.$slots[`panel-${b}`] ? G(d.$slots, `panel-${b}`, {
|
|
1960
|
-
key: 2,
|
|
1961
|
-
item: p,
|
|
1962
|
-
data: d.data
|
|
1963
|
-
}) : p.component ? (a(), j(N(t(p.component)), te({
|
|
1964
|
-
key: 3,
|
|
1965
1987
|
ref_for: !0
|
|
1966
|
-
},
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
1988
|
+
}, h.component === "Card" ? h : g(h), {
|
|
1989
|
+
id: d.data.id,
|
|
1990
|
+
class: "w-full h-full"
|
|
1991
|
+
}), null, 16, ["id"])) : _("", !0)
|
|
1992
|
+
]))), 128))
|
|
1993
|
+
])) : _("", !0),
|
|
1994
|
+
d.view === "tab" ? (o(), a("div", Uo, [
|
|
1995
|
+
e("div", Wo, [
|
|
1996
|
+
(o(!0), a(V, null, A(n.value, (h, M) => (o(), a("button", {
|
|
1997
|
+
key: h.name || M,
|
|
1998
|
+
onClick: (P) => i.value = M,
|
|
1999
|
+
class: D([
|
|
2000
|
+
"px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",
|
|
2001
|
+
{ "text-blue-600 bg-white border-b-2 border-blue-600": i.value === M }
|
|
2002
|
+
])
|
|
2003
|
+
}, b(h.title || h.label || h.name || `Tab ${M + 1}`), 11, Po))), 128))
|
|
2004
|
+
]),
|
|
2005
|
+
e("div", Go, [
|
|
2006
|
+
(o(!0), a(V, null, A(n.value, (h, M) => R((o(), a("div", {
|
|
2007
|
+
key: h.name || M,
|
|
2008
|
+
class: D([
|
|
2009
|
+
d.classPanel || "w-full border-gray-100 py-2",
|
|
2010
|
+
`col-span-${h.col || 12}`
|
|
2011
|
+
])
|
|
2012
|
+
}, [
|
|
2013
|
+
h.html ? (o(), a("div", {
|
|
2014
|
+
key: 0,
|
|
2015
|
+
innerHTML: h.html,
|
|
2016
|
+
class: "text-gray-900 leading-relaxed"
|
|
2017
|
+
}, null, 8, qo)) : d.$slots[`tab-${M}`] ? G(d.$slots, `tab-${M}`, {
|
|
2018
|
+
key: 1,
|
|
2019
|
+
item: h,
|
|
2020
|
+
data: d.data
|
|
2021
|
+
}) : h.component || h.name ? (o(), I(B(s(h.component || h.name)), Z({
|
|
2022
|
+
key: 2,
|
|
2023
|
+
ref_for: !0
|
|
2024
|
+
}, h.component === "Card" ? h : g(h), {
|
|
2025
|
+
id: d.data.id,
|
|
2026
|
+
class: "w-full h-full"
|
|
2027
|
+
}), null, 16, ["id"])) : G(d.$slots, h.slot || `tab-${M}`, {
|
|
2028
|
+
key: 3,
|
|
2029
|
+
item: h,
|
|
2030
|
+
data: d.data
|
|
2031
|
+
})
|
|
2032
|
+
], 2)), [
|
|
2033
|
+
[ze, i.value === M]
|
|
2034
|
+
])), 128))
|
|
2035
|
+
])
|
|
2036
|
+
])) : (o(), a("div", Ko, [
|
|
2037
|
+
e("div", Zo, [
|
|
2038
|
+
(o(!0), a(V, null, A(u.value, (h, M) => (o(), a(V, {
|
|
2039
|
+
key: h.name || M
|
|
2040
|
+
}, [
|
|
2041
|
+
d.$slots[`panel-${M}`] ? G(d.$slots, `panel-${M}`, {
|
|
2042
|
+
key: 0,
|
|
2043
|
+
item: h,
|
|
2044
|
+
data: d.data
|
|
2045
|
+
}) : h.items || h.html ? (o(), I(B(Le), Z({
|
|
2046
|
+
key: 1,
|
|
2047
|
+
ref_for: !0
|
|
2048
|
+
}, g(h), {
|
|
2049
|
+
items: h.items,
|
|
2050
|
+
class: "w-full h-full"
|
|
2051
|
+
}), null, 16, ["items"])) : h.component ? (o(), I(B(s(h.component)), Z({
|
|
2052
|
+
key: 2,
|
|
2053
|
+
ref_for: !0
|
|
2054
|
+
}, g(h), { class: "w-full h-full" }), null, 16)) : G(d.$slots, h.slot || `panel-${M}`, {
|
|
2055
|
+
key: 3,
|
|
2056
|
+
item: h,
|
|
2057
|
+
data: d.data
|
|
2058
|
+
})
|
|
2059
|
+
], 64))), 128))
|
|
2060
|
+
])
|
|
2061
|
+
]))
|
|
2062
|
+
])
|
|
2005
2063
|
], 2));
|
|
2006
2064
|
}
|
|
2007
2065
|
});
|
|
2008
|
-
|
|
2009
|
-
|
|
2066
|
+
re.install = function(r) {
|
|
2067
|
+
r.component("vs-widget-file", ie), r.component("vs-widget-comments", oe), r.component("vs-widget-history", ne), r.component("vs-widget-gallery", le), r.component("vs-widget-map", ae), r.component("CommentsWidget", oe), r.component("HistoryWidget", ne), r.component("GalleryWidget", le), r.component("FilesWidget", ie), r.component("MapWidget", ae), r.component("Card", re), r.component("CardItem", Le), r.component("DescriptionListWidget", Ce), r.component("CopyNotification", $e);
|
|
2010
2068
|
};
|
|
2011
2069
|
export {
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2070
|
+
re as Card,
|
|
2071
|
+
Le as CardItem,
|
|
2072
|
+
oe as CommentsWidget,
|
|
2015
2073
|
$e as CopyNotification,
|
|
2016
2074
|
Ce as DescriptionListWidget,
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2075
|
+
ie as FilesWidget,
|
|
2076
|
+
le as GalleryWidget,
|
|
2077
|
+
ne as HistoryWidget,
|
|
2020
2078
|
ae as MapWidget,
|
|
2021
|
-
|
|
2079
|
+
re as default
|
|
2022
2080
|
};
|