@opengis/widgets 0.0.12 → 0.0.13
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 +3 -0
- package/dist/components.d.ts.map +1 -0
- package/dist/index.d.ts +1 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +910 -821
- package/dist/index.umd.cjs +27 -27
- package/dist/types/index.d.ts +8 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/widgets/card/Card.vue.d.ts +5 -0
- package/dist/widgets/card/Card.vue.d.ts.map +1 -1
- package/dist/widgets/files/FilesWidget.vue.d.ts +5 -2
- package/dist/widgets/files/FilesWidget.vue.d.ts.map +1 -1
- package/dist/widgets/history/HistoryWidget.vue.d.ts +1 -1
- package/dist/widgets/history/HistoryWidget.vue.d.ts.map +1 -1
- package/dist/widgets/map/MapWidget.vue.d.ts +2 -4
- package/dist/widgets/map/MapWidget.vue.d.ts.map +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { h as Y, defineComponent as
|
|
1
|
+
import { h as Y, defineComponent as I, mergeModels as J, useModel as le, ref as M, createElementBlock as r, openBlock as a, createElementVNode as e, createVNode as w, unref as _, withDirectives as U, vModelText as ye, createCommentVNode as $, createTextVNode as H, onMounted as re, onUnmounted as de, resolveComponent as ee, normalizeClass as D, createBlock as j, toDisplayString as k, Fragment as A, renderList as S, normalizeStyle as R, resolveDynamicComponent as N, withModifiers as K, computed as O, Teleport as be, TransitionGroup as Me, withCtx as Le, nextTick as De, renderSlot as G, vModelRadio as Q, vModelCheckbox as Te, mergeProps as te, vShow as Ie } 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 me = (l) => l.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ze = (l) => l.replace(
|
|
9
9
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
10
|
-
(i, n,
|
|
10
|
+
(i, n, t) => t ? t.toUpperCase() : n.toLowerCase()
|
|
11
11
|
), je = (l) => {
|
|
12
|
-
const i =
|
|
12
|
+
const i = ze(l);
|
|
13
13
|
return i.charAt(0).toUpperCase() + i.slice(1);
|
|
14
|
-
},
|
|
14
|
+
}, Ve = (...l) => l.filter((i, n, t) => !!i && i.trim() !== "" && t.indexOf(i) === n).join(" ").trim();
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
17
17
|
*
|
|
@@ -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 Fe = ({ size: l, strokeWidth: i = 2, absoluteStrokeWidth: n, color: t, iconNode: s, name: f, class: o, ...m }, { slots: v }) => Y(
|
|
39
39
|
"svg",
|
|
40
40
|
{
|
|
41
41
|
...Z,
|
|
42
42
|
width: l || Z.width,
|
|
43
43
|
height: l || Z.height,
|
|
44
|
-
stroke:
|
|
44
|
+
stroke: t || Z.stroke,
|
|
45
45
|
"stroke-width": n ? Number(i) * 24 / Number(l) : i,
|
|
46
|
-
class:
|
|
46
|
+
class: Ve(
|
|
47
47
|
"lucide",
|
|
48
|
-
...f ? [`lucide-${
|
|
48
|
+
...f ? [`lucide-${me(je(f))}-icon`, `lucide-${me(f)}`] : ["lucide-icon"]
|
|
49
49
|
),
|
|
50
|
-
...
|
|
50
|
+
...m
|
|
51
51
|
},
|
|
52
|
-
[...s.map((
|
|
52
|
+
[...s.map((g) => Y(...g)), ...v.default ? [v.default()] : []]
|
|
53
53
|
);
|
|
54
54
|
/**
|
|
55
55
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
@@ -57,14 +57,14 @@ const Ve = ({ size: l, strokeWidth: i = 2, absoluteStrokeWidth: n, color: e, 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
|
|
61
|
-
|
|
60
|
+
const T = (l, i) => (n, { slots: t }) => Y(
|
|
61
|
+
Fe,
|
|
62
62
|
{
|
|
63
63
|
...n,
|
|
64
64
|
iconNode: i,
|
|
65
65
|
name: l
|
|
66
66
|
},
|
|
67
|
-
|
|
67
|
+
t
|
|
68
68
|
);
|
|
69
69
|
/**
|
|
70
70
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
@@ -72,7 +72,7 @@ const $ = (l, i) => (n, { slots: e }) => 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 He = 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 ze = $("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 Ae = 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 Fe = $("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 Se = 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 Ae = $("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 ce = 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 ie = $("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 Ee = 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" }]
|
|
@@ -125,7 +125,7 @@ const He = $("ellipsis", [
|
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
127
|
*/
|
|
128
|
-
const
|
|
128
|
+
const q = T("file-text", [
|
|
129
129
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
130
130
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
131
131
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
@@ -138,7 +138,7 @@ const W = $("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 Oe = 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 Se = $("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 Be = 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 Ee = $("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 Ne = T("heart", [
|
|
165
165
|
[
|
|
166
166
|
"path",
|
|
167
167
|
{
|
|
@@ -176,7 +176,7 @@ const Oe = $("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 Re = 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 Be = $("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 ge = 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 de = $("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 Ue = 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 Re = $("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 Pe = 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 Ne = $("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 We = 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
|
]);
|
|
@@ -232,7 +232,7 @@ const Ue = $("reply", [
|
|
|
232
232
|
* This source code is licensed under the ISC license.
|
|
233
233
|
* See the LICENSE file in the root directory of this source tree.
|
|
234
234
|
*/
|
|
235
|
-
const
|
|
235
|
+
const xe = T("send", [
|
|
236
236
|
[
|
|
237
237
|
"path",
|
|
238
238
|
{
|
|
@@ -248,7 +248,7 @@ const be = $("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 Ge = 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 We = $("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 qe = 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 Ge = $("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 Ke = 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 qe = $("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 ue = 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 le = $("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 Ze = 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 Pe = $("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 pe = 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 ae = $("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 Je = T("video", [
|
|
326
326
|
[
|
|
327
327
|
"path",
|
|
328
328
|
{
|
|
@@ -338,10 +338,10 @@ const Ke = $("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 X =
|
|
341
|
+
const X = T("x", [
|
|
342
342
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
343
343
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
344
|
-
]),
|
|
344
|
+
]), Xe = { class: "border-t pt-3 mt-4" }, Qe = { class: "flex gap-2" }, Ye = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, et = { class: "flex-1 space-y-2" }, tt = { class: "flex justify-between items-center" }, st = { class: "flex gap-2" }, ot = ["disabled"], ke = /* @__PURE__ */ I({
|
|
345
345
|
__name: "CommentInputZone",
|
|
346
346
|
props: {
|
|
347
347
|
isReply: { type: Boolean, required: !1, default: !1 },
|
|
@@ -349,51 +349,51 @@ const X = $("x", [
|
|
|
349
349
|
},
|
|
350
350
|
emits: /* @__PURE__ */ J(["sendComment"], ["update:isReply"]),
|
|
351
351
|
setup(l, { emit: i }) {
|
|
352
|
-
const n =
|
|
353
|
-
|
|
354
|
-
},
|
|
355
|
-
(
|
|
352
|
+
const n = le(l, "isReply"), t = M(""), s = i, f = () => {
|
|
353
|
+
t.value.trim() && (s("sendComment", t.value), t.value = "");
|
|
354
|
+
}, o = (m) => {
|
|
355
|
+
(m.ctrlKey || m.metaKey) && m.key === "Enter" && (m.preventDefault(), f());
|
|
356
356
|
};
|
|
357
|
-
return (
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
357
|
+
return (m, v) => (a(), r("div", Xe, [
|
|
358
|
+
e("div", Qe, [
|
|
359
|
+
e("span", Ye, [
|
|
360
|
+
w(_(pe), { class: "h-3 w-3 text-gray-500" })
|
|
361
361
|
]),
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
"onUpdate:modelValue":
|
|
365
|
-
onKeydown:
|
|
362
|
+
e("div", et, [
|
|
363
|
+
U(e("textarea", {
|
|
364
|
+
"onUpdate:modelValue": v[0] || (v[0] = (g) => t.value = g),
|
|
365
|
+
onKeydown: o,
|
|
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
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
n.value ? (
|
|
371
|
+
e("div", tt, [
|
|
372
|
+
v[4] || (v[4] = e("span", { class: "text-xs text-gray-500 hidden sm:inline" }, "Cmd+Enter to send", -1)),
|
|
373
|
+
e("div", st, [
|
|
374
|
+
n.value ? (a(), r("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:
|
|
377
|
+
onClick: v[1] || (v[1] = (g) => n.value = !1)
|
|
378
378
|
}, [
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
])) :
|
|
382
|
-
|
|
379
|
+
w(_(X), { class: "h-3 w-3" }),
|
|
380
|
+
v[2] || (v[2] = H(" Cancel ", -1))
|
|
381
|
+
])) : $("", !0),
|
|
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
|
-
disabled: !
|
|
384
|
+
disabled: !t.value.trim(),
|
|
385
385
|
onClick: f
|
|
386
386
|
}, [
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
], 8,
|
|
387
|
+
w(_(xe), { class: "h-3 w-3 mr-1" }),
|
|
388
|
+
v[3] || (v[3] = H(" Send ", -1))
|
|
389
|
+
], 8, ot)
|
|
390
390
|
])
|
|
391
391
|
])
|
|
392
392
|
])
|
|
393
393
|
])
|
|
394
394
|
]));
|
|
395
395
|
}
|
|
396
|
-
}),
|
|
396
|
+
}), nt = { 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" }, it = /* @__PURE__ */ I({
|
|
397
397
|
__name: "CommentDetails",
|
|
398
398
|
props: {
|
|
399
399
|
showMoreOptions: { type: Boolean, required: !0, default: !1 },
|
|
@@ -401,50 +401,50 @@ const X = $("x", [
|
|
|
401
401
|
},
|
|
402
402
|
emits: /* @__PURE__ */ J(["edit", "delete"], ["update:showMoreOptions"]),
|
|
403
403
|
setup(l, { emit: i }) {
|
|
404
|
-
const n = i,
|
|
405
|
-
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
},
|
|
409
|
-
|
|
404
|
+
const n = i, t = le(l, "showMoreOptions"), s = M(), f = M(!0), o = async (g) => {
|
|
405
|
+
t.value && s.value && !s.value.contains(g.target) && !f.value && (t.value = !1), f.value = !1;
|
|
406
|
+
}, m = () => {
|
|
407
|
+
t.value = !1, n("edit");
|
|
408
|
+
}, v = () => {
|
|
409
|
+
t.value = !1, n("delete");
|
|
410
410
|
};
|
|
411
|
-
return
|
|
412
|
-
document.addEventListener("click",
|
|
413
|
-
}),
|
|
414
|
-
document.removeEventListener("click",
|
|
415
|
-
}), (
|
|
411
|
+
return re(() => {
|
|
412
|
+
document.addEventListener("click", o);
|
|
413
|
+
}), de(() => {
|
|
414
|
+
document.removeEventListener("click", o);
|
|
415
|
+
}), (g, d) => (a(), r("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
|
-
|
|
421
|
-
|
|
420
|
+
e("div", nt, [
|
|
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: m
|
|
424
424
|
}, [
|
|
425
|
-
|
|
426
|
-
|
|
425
|
+
w(_(Ke), { class: "h-3 w-3 mr-2" }),
|
|
426
|
+
d[0] || (d[0] = H(" 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
|
-
onClick:
|
|
430
|
+
onClick: v
|
|
431
431
|
}, [
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
w(_(ue), { class: "h-3 w-3 mr-2" }),
|
|
433
|
+
d[1] || (d[1] = H(" Delete ", -1))
|
|
434
434
|
])
|
|
435
435
|
])
|
|
436
436
|
], 512));
|
|
437
437
|
}
|
|
438
|
-
}),
|
|
438
|
+
}), at = { class: "space-y-2" }, lt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, rt = { class: "flex-1 min-w-0 space-y-1 relative" }, dt = { class: "flex items-center gap-2" }, ct = { class: "font-medium text-xs" }, ut = { class: "text-xs text-gray-500" }, pt = {
|
|
439
439
|
key: 0,
|
|
440
440
|
class: "text-xs text-gray-700 leading-relaxed"
|
|
441
|
-
},
|
|
441
|
+
}, mt = { class: "flex justify-between text-xs" }, gt = { class: "flex items-center gap-2" }, ht = {
|
|
442
442
|
key: 0,
|
|
443
443
|
class: "flex gap-2"
|
|
444
|
-
},
|
|
444
|
+
}, ft = ["disabled"], vt = {
|
|
445
445
|
key: 0,
|
|
446
446
|
class: "ml-8 space-y-1 border-l-2 border-gray-100 pl-3"
|
|
447
|
-
},
|
|
447
|
+
}, yt = /* @__PURE__ */ I({
|
|
448
448
|
__name: "CommentItem",
|
|
449
449
|
props: {
|
|
450
450
|
comment: {},
|
|
@@ -452,120 +452,120 @@ const X = $("x", [
|
|
|
452
452
|
},
|
|
453
453
|
emits: ["like", "reply", "edit", "delete"],
|
|
454
454
|
setup(l, { emit: i }) {
|
|
455
|
-
const n = i,
|
|
456
|
-
const
|
|
457
|
-
(
|
|
455
|
+
const n = i, t = l, s = M(t.comment.text), f = M("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"), o = M("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"), m = M(!1), v = M(!1), g = M(!1), d = M(!1), y = (c) => {
|
|
456
|
+
const h = /* @__PURE__ */ new Date(), F = Math.floor(
|
|
457
|
+
(h.getTime() - c.getTime()) / (1e3 * 60 * 60)
|
|
458
458
|
);
|
|
459
|
-
return
|
|
460
|
-
(
|
|
461
|
-
)}m` :
|
|
462
|
-
},
|
|
463
|
-
|
|
464
|
-
},
|
|
465
|
-
n("edit",
|
|
466
|
-
},
|
|
467
|
-
n("like",
|
|
468
|
-
},
|
|
469
|
-
n("edit",
|
|
459
|
+
return F < 1 ? `${Math.floor(
|
|
460
|
+
(h.getTime() - c.getTime()) / 6e4
|
|
461
|
+
)}m` : F < 24 ? `${F}h` : `${Math.floor(F / 24)}d`;
|
|
462
|
+
}, p = () => {
|
|
463
|
+
d.value = !d.value, d.value ? n("like", t.comment.id, "add") : n("like", t.comment.id, "delete");
|
|
464
|
+
}, b = () => {
|
|
465
|
+
n("edit", t.comment.id, s.value), g.value = !1;
|
|
466
|
+
}, W = (c, h) => {
|
|
467
|
+
n("like", c, h);
|
|
468
|
+
}, V = (c, h) => {
|
|
469
|
+
n("edit", c, h);
|
|
470
470
|
};
|
|
471
|
-
return (
|
|
472
|
-
const
|
|
473
|
-
return
|
|
474
|
-
|
|
475
|
-
class:
|
|
471
|
+
return (c, h) => {
|
|
472
|
+
const F = ee("CommentItem", !0);
|
|
473
|
+
return a(), r("div", at, [
|
|
474
|
+
e("div", {
|
|
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
|
-
|
|
478
|
-
|
|
477
|
+
e("span", lt, [
|
|
478
|
+
w(_(pe), { class: "h-3 w-3 text-gray-500" })
|
|
479
479
|
]),
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
480
|
+
e("div", rt, [
|
|
481
|
+
e("div", dt, [
|
|
482
|
+
e("span", ct, k(c.comment?.author), 1),
|
|
483
|
+
e("span", ut, k(y(c.comment?.createdAt)), 1)
|
|
484
484
|
]),
|
|
485
|
-
|
|
485
|
+
g.value ? U((a(), r("textarea", {
|
|
486
486
|
key: 1,
|
|
487
|
-
"onUpdate:modelValue":
|
|
488
|
-
class:
|
|
487
|
+
"onUpdate:modelValue": h[0] || (h[0] = (C) => s.value = C),
|
|
488
|
+
class: D(g.value ? o.value : f.value)
|
|
489
489
|
}, null, 2)), [
|
|
490
|
-
[
|
|
491
|
-
]) : (
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
class:
|
|
496
|
-
onClick:
|
|
490
|
+
[ye, s.value]
|
|
491
|
+
]) : (a(), r("p", pt, k(c.comment?.text), 1)),
|
|
492
|
+
e("div", mt, [
|
|
493
|
+
e("div", gt, [
|
|
494
|
+
e("button", {
|
|
495
|
+
class: D(["flex items-center gap-1", d.value ? "text-blue-600" : "text-gray-500 hover:text-blue-600 transition-colors"]),
|
|
496
|
+
onClick: h[1] || (h[1] = (C) => p())
|
|
497
497
|
}, [
|
|
498
|
-
|
|
499
|
-
class:
|
|
498
|
+
w(_(Ne), {
|
|
499
|
+
class: D(["h-3 w-3", d.value ? "fill-blue-600" : ""])
|
|
500
500
|
}, null, 8, ["class"]),
|
|
501
|
-
|
|
501
|
+
H(" " + k(c.comment?.likes), 1)
|
|
502
502
|
], 2),
|
|
503
|
-
|
|
503
|
+
c.isInside ? $("", !0) : (a(), r("button", {
|
|
504
504
|
key: 0,
|
|
505
505
|
class: "text-gray-500 hover:text-blue-600 transition-colors",
|
|
506
|
-
onClick:
|
|
506
|
+
onClick: h[2] || (h[2] = (C) => v.value = !0)
|
|
507
507
|
}, [
|
|
508
|
-
|
|
508
|
+
w(_(We), { 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: h[3] || (h[3] = (C) => m.value = !0)
|
|
514
514
|
}, [
|
|
515
|
-
|
|
515
|
+
w(_(Ee), { class: "h-3 w-3" })
|
|
516
516
|
])
|
|
517
517
|
]),
|
|
518
|
-
|
|
519
|
-
|
|
518
|
+
g.value ? (a(), r("div", ht, [
|
|
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: h[4] || (h[4] = (C) => g.value = !1)
|
|
522
522
|
}, [
|
|
523
|
-
|
|
524
|
-
|
|
523
|
+
w(_(X), { class: "h-3 w-3" }),
|
|
524
|
+
h[11] || (h[11] = H(" 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: h[5] || (h[5] = (C) => b())
|
|
530
530
|
}, [
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
], 8,
|
|
534
|
-
])) :
|
|
531
|
+
w(_(xe), { class: "h-3 w-3 mr-1" }),
|
|
532
|
+
h[12] || (h[12] = H(" Send ", -1))
|
|
533
|
+
], 8, ft)
|
|
534
|
+
])) : $("", !0)
|
|
535
535
|
])
|
|
536
536
|
]),
|
|
537
|
-
|
|
537
|
+
m.value ? (a(), j(it, {
|
|
538
538
|
key: 0,
|
|
539
|
-
showMoreOptions:
|
|
540
|
-
"onUpdate:showMoreOptions":
|
|
541
|
-
onEdit:
|
|
542
|
-
onDelete:
|
|
543
|
-
comment:
|
|
544
|
-
}, null, 8, ["showMoreOptions", "comment"])) :
|
|
539
|
+
showMoreOptions: m.value,
|
|
540
|
+
"onUpdate:showMoreOptions": h[6] || (h[6] = (C) => m.value = C),
|
|
541
|
+
onEdit: h[7] || (h[7] = (C) => g.value = !0),
|
|
542
|
+
onDelete: h[8] || (h[8] = (C) => c.$emit("delete", c.comment?.id)),
|
|
543
|
+
comment: c.comment
|
|
544
|
+
}, null, 8, ["showMoreOptions", "comment"])) : $("", !0)
|
|
545
545
|
], 2),
|
|
546
|
-
|
|
547
|
-
(
|
|
548
|
-
key:
|
|
549
|
-
comment:
|
|
546
|
+
c.isInside ? $("", !0) : (a(), r("div", vt, [
|
|
547
|
+
(a(!0), r(A, null, S(c.comment?.replies, (C) => (a(), j(F, {
|
|
548
|
+
key: C.id,
|
|
549
|
+
comment: C,
|
|
550
550
|
isInside: !0,
|
|
551
|
-
onDelete: (
|
|
552
|
-
onLike:
|
|
553
|
-
onEdit:
|
|
551
|
+
onDelete: (x) => c.$emit("delete", C.id),
|
|
552
|
+
onLike: W,
|
|
553
|
+
onEdit: V
|
|
554
554
|
}, null, 8, ["comment", "onDelete"]))), 128)),
|
|
555
|
-
|
|
555
|
+
v.value && !c.isInside ? (a(), j(ke, {
|
|
556
556
|
key: 0,
|
|
557
|
-
onSendComment:
|
|
558
|
-
isReply:
|
|
559
|
-
"onUpdate:isReply":
|
|
560
|
-
}, null, 8, ["isReply"])) :
|
|
557
|
+
onSendComment: h[9] || (h[9] = (C) => c.$emit("reply", c.comment?.id, C)),
|
|
558
|
+
isReply: v.value,
|
|
559
|
+
"onUpdate:isReply": h[10] || (h[10] = (C) => v.value = C)
|
|
560
|
+
}, null, 8, ["isReply"])) : $("", !0)
|
|
561
561
|
]))
|
|
562
562
|
]);
|
|
563
563
|
};
|
|
564
564
|
}
|
|
565
|
-
}),
|
|
565
|
+
}), bt = ["id"], xt = {
|
|
566
566
|
key: 0,
|
|
567
567
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
568
|
-
},
|
|
568
|
+
}, se = /* @__PURE__ */ I({
|
|
569
569
|
__name: "CommentsWidget",
|
|
570
570
|
props: {
|
|
571
571
|
title: {},
|
|
@@ -582,78 +582,78 @@ const X = $("x", [
|
|
|
582
582
|
},
|
|
583
583
|
emits: ["add", "reply", "like", "delete", "edit"],
|
|
584
584
|
setup(l, { emit: i }) {
|
|
585
|
-
const n = l,
|
|
586
|
-
n?.onAddComment?.(
|
|
587
|
-
}, f = (
|
|
588
|
-
n?.onLike?.(
|
|
589
|
-
},
|
|
590
|
-
n.onReply?.(
|
|
591
|
-
},
|
|
592
|
-
n.onEdit?.(
|
|
593
|
-
},
|
|
594
|
-
n.onDelete?.(
|
|
585
|
+
const n = l, t = i, s = (g) => {
|
|
586
|
+
n?.onAddComment?.(g), t("add", g);
|
|
587
|
+
}, f = (g, d) => {
|
|
588
|
+
n?.onLike?.(g, d), t("like", g, d);
|
|
589
|
+
}, o = (g, d) => {
|
|
590
|
+
n.onReply?.(g, d), t("reply", g, d);
|
|
591
|
+
}, m = (g, d) => {
|
|
592
|
+
n.onEdit?.(g, d), t("edit", g, d);
|
|
593
|
+
}, v = (g) => {
|
|
594
|
+
n.onDelete?.(g), t("delete", g);
|
|
595
595
|
};
|
|
596
|
-
return (
|
|
597
|
-
class:
|
|
598
|
-
id:
|
|
599
|
-
style:
|
|
596
|
+
return (g, d) => (a(), r("div", {
|
|
597
|
+
class: D(["mx-auto font-sans", g.className]),
|
|
598
|
+
id: g.id,
|
|
599
|
+
style: R(g.style)
|
|
600
600
|
}, [
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
class:
|
|
604
|
-
style:
|
|
601
|
+
g.title ? (a(), r("h3", xt, k(g.title), 1)) : $("", !0),
|
|
602
|
+
e("div", {
|
|
603
|
+
class: D([g.maxHeight ? "overflow-y-auto" : "", "space-y-3"]),
|
|
604
|
+
style: R({ maxHeight: g.maxHeight + "px" })
|
|
605
605
|
}, [
|
|
606
|
-
(
|
|
607
|
-
key:
|
|
608
|
-
comment:
|
|
609
|
-
onReply:
|
|
606
|
+
(a(!0), r(A, null, S(g.comments, (y) => (a(), j(yt, {
|
|
607
|
+
key: y.id,
|
|
608
|
+
comment: y,
|
|
609
|
+
onReply: o,
|
|
610
610
|
onLike: f,
|
|
611
|
-
onDelete:
|
|
612
|
-
onEdit:
|
|
611
|
+
onDelete: d[0] || (d[0] = (p) => v(p)),
|
|
612
|
+
onEdit: m
|
|
613
613
|
}, null, 8, ["comment"]))), 128))
|
|
614
614
|
], 6),
|
|
615
|
-
|
|
616
|
-
onSendComment:
|
|
615
|
+
w(ke, {
|
|
616
|
+
onSendComment: d[1] || (d[1] = (y) => s(y))
|
|
617
617
|
})
|
|
618
|
-
], 14,
|
|
618
|
+
], 14, bt));
|
|
619
619
|
}
|
|
620
|
-
}),
|
|
620
|
+
}), he = /* @__PURE__ */ new Map([
|
|
621
621
|
["file", {
|
|
622
622
|
name: "File",
|
|
623
623
|
color: "bg-green-100 text-green-700 border-green-200",
|
|
624
|
-
icon:
|
|
624
|
+
icon: q
|
|
625
625
|
}],
|
|
626
626
|
["post", {
|
|
627
627
|
name: "Post",
|
|
628
628
|
color: "bg-blue-100 text-blue-700 border-blue-200",
|
|
629
|
-
icon:
|
|
629
|
+
icon: qe
|
|
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: Ze
|
|
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: Re
|
|
640
640
|
}]
|
|
641
|
-
]),
|
|
641
|
+
]), kt = { class: "mx-auto font-sans" }, _t = {
|
|
642
642
|
key: 0,
|
|
643
643
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
644
|
-
},
|
|
644
|
+
}, wt = { class: "relative" }, $t = { class: "space-y-3" }, Ct = { class: "flex-1 min-w-0 pb-2" }, Mt = { class: "flex items-center gap-1.5 mb-1 mt-0.5" }, Lt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Dt = { class: "font-medium text-xs" }, Tt = { class: "text-xs text-gray-500" }, It = { class: "space-y-1" }, zt = { class: "text-xs text-gray-700" }, jt = { class: "capitalize mr-1" }, Vt = {
|
|
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
|
+
}, Ft = {
|
|
648
648
|
key: 0,
|
|
649
649
|
class: "flex items-center gap-1 text-xs"
|
|
650
|
-
},
|
|
650
|
+
}, Ht = {
|
|
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
|
+
}, At = {
|
|
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
|
+
}, oe = /* @__PURE__ */ I({
|
|
657
657
|
__name: "HistoryWidget",
|
|
658
658
|
props: {
|
|
659
659
|
data: {},
|
|
@@ -664,45 +664,56 @@ const X = $("x", [
|
|
|
664
664
|
style: {}
|
|
665
665
|
},
|
|
666
666
|
setup(l) {
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
667
|
+
const i = l, n = M(i.data ?? []);
|
|
668
|
+
n.value.length === 0 && i.id && t(), console.log(i);
|
|
669
|
+
async function t() {
|
|
670
|
+
const s = await fetch(`/api/widget/history/${i.id}`);
|
|
671
|
+
if (!s.ok)
|
|
672
|
+
return { data: [] };
|
|
673
|
+
const f = await s.json();
|
|
674
|
+
f.rows.forEach((o) => {
|
|
675
|
+
o.timestamp = new Date(o.cdate), o.id = o.entity_id, o.entityType = o.entity_type, o.entityId = o.entity_id, o.action = o.change_type, o.userId = o.change_user_id, o.userName = o.username, o.timestamp = new Date(o.cdate), o.description = o.username, o.status = o.username;
|
|
676
|
+
}), n.value = f.rows;
|
|
677
|
+
}
|
|
678
|
+
return (s, f) => (a(), r("div", kt, [
|
|
679
|
+
s.title ? (a(), r("h3", _t, k(s.title), 1)) : $("", !0),
|
|
680
|
+
e("div", {
|
|
681
|
+
class: D(s.maxHeight ? "overflow-y-auto" : ""),
|
|
682
|
+
style: R({ maxHeight: s.maxHeight + "px" })
|
|
672
683
|
}, [
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
(
|
|
684
|
+
e("div", wt, [
|
|
685
|
+
f[0] || (f[0] = e("div", { class: "absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200" }, null, -1)),
|
|
686
|
+
e("div", $t, [
|
|
687
|
+
(a(!0), r(A, null, S(n.value, (o) => (a(), r("div", {
|
|
677
688
|
class: "relative flex items-start gap-2",
|
|
678
|
-
key:
|
|
689
|
+
key: o?.id
|
|
679
690
|
}, [
|
|
680
|
-
|
|
681
|
-
class:
|
|
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 ${_(he).get(o?.entityType)?.color}`)
|
|
682
693
|
}, [
|
|
683
|
-
(
|
|
694
|
+
(a(), j(N(_(he).get(o?.entityType)?.icon), { class: "h-3 w-3" }))
|
|
684
695
|
], 2),
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
696
|
+
e("div", Ct, [
|
|
697
|
+
e("div", Mt, [
|
|
698
|
+
e("span", Lt, [
|
|
699
|
+
w(_(pe), { class: "h-3 w-3 text-gray-500" })
|
|
689
700
|
]),
|
|
690
|
-
|
|
691
|
-
|
|
701
|
+
e("span", Dt, k(o?.userName), 1),
|
|
702
|
+
e("span", Tt, k(o?.timestamp.toLocaleTimeString("ua-UA", { hour: "2-digit", minute: "2-digit" })), 1)
|
|
692
703
|
]),
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
704
|
+
e("div", It, [
|
|
705
|
+
e("div", zt, [
|
|
706
|
+
e("span", jt, k(o?.action), 1),
|
|
707
|
+
o?.entityId ? (a(), r("span", Vt, k(o?.entityId), 1)) : $("", !0)
|
|
697
708
|
]),
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
709
|
+
o?.changes?.[o?.entityId] ? (a(), r("div", Ft, [
|
|
710
|
+
o?.changes?.[o?.entityId]?.old ? (a(), r("span", Ht, k(o?.changes?.[o?.entityId]?.old), 1)) : $("", !0),
|
|
711
|
+
o?.changes?.[o?.entityId]?.old && o?.changes?.[o?.entityId]?.new ? (a(), j(_(Ae), {
|
|
701
712
|
key: 1,
|
|
702
713
|
class: "h-2 w-2 text-gray-400"
|
|
703
|
-
})) :
|
|
704
|
-
|
|
705
|
-
])) :
|
|
714
|
+
})) : $("", !0),
|
|
715
|
+
o?.changes?.[o?.entityId]?.new ? (a(), r("span", At, k(o?.changes?.[o?.entityId]?.new), 1)) : $("", !0)
|
|
716
|
+
])) : $("", !0)
|
|
706
717
|
])
|
|
707
718
|
])
|
|
708
719
|
]))), 128))
|
|
@@ -711,10 +722,10 @@ const X = $("x", [
|
|
|
711
722
|
], 6)
|
|
712
723
|
]));
|
|
713
724
|
}
|
|
714
|
-
}),
|
|
725
|
+
}), St = {
|
|
715
726
|
key: 0,
|
|
716
727
|
class: "text-xl font-semibold"
|
|
717
|
-
},
|
|
728
|
+
}, Et = { class: "flex gap-1" }, Ot = { 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" }, Bt = /* @__PURE__ */ I({
|
|
718
729
|
__name: "FileHeader",
|
|
719
730
|
props: /* @__PURE__ */ J({
|
|
720
731
|
title: {}
|
|
@@ -724,89 +735,89 @@ const X = $("x", [
|
|
|
724
735
|
}),
|
|
725
736
|
emits: /* @__PURE__ */ J(["onAddFile"], ["update:modelValue"]),
|
|
726
737
|
setup(l) {
|
|
727
|
-
const i =
|
|
738
|
+
const i = le(l, "modelValue"), n = {
|
|
728
739
|
active: "bg-blue-100 text-black hover:bg-blue-100",
|
|
729
740
|
inactive: "bg-white text-black hover:bg-blue-100"
|
|
730
741
|
};
|
|
731
|
-
return (
|
|
732
|
-
class:
|
|
742
|
+
return (t, s) => (a(), r("div", {
|
|
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"])
|
|
733
744
|
}, [
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
class:
|
|
745
|
+
t.title ? (a(), r("h3", St, k(t.title), 1)) : $("", !0),
|
|
746
|
+
e("div", Et, [
|
|
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", i.value === "list" ? n.active : n.inactive]),
|
|
738
749
|
onClick: s[0] || (s[0] = (f) => i.value = "list")
|
|
739
750
|
}, [
|
|
740
|
-
|
|
751
|
+
w(_(Ue), { class: "h-4 w-4" })
|
|
741
752
|
], 2),
|
|
742
|
-
|
|
743
|
-
class:
|
|
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", i.value === "grid" ? n.active : n.inactive]),
|
|
744
755
|
onClick: s[1] || (s[1] = (f) => i.value = "grid")
|
|
745
756
|
}, [
|
|
746
|
-
|
|
757
|
+
w(_(Be), { class: "h-4 w-4" })
|
|
747
758
|
], 2),
|
|
748
|
-
|
|
749
|
-
|
|
759
|
+
e("label", null, [
|
|
760
|
+
e("input", {
|
|
750
761
|
type: "file",
|
|
751
762
|
class: "hidden",
|
|
752
|
-
onChange: s[2] || (s[2] = (f) =>
|
|
763
|
+
onChange: s[2] || (s[2] = (f) => t.$emit("onAddFile", f))
|
|
753
764
|
}, null, 32),
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
s[3] || (s[3] =
|
|
765
|
+
e("div", Ot, [
|
|
766
|
+
w(_(Pe), { class: "h-4 w-4" }),
|
|
767
|
+
s[3] || (s[3] = H(" Додати файл ", -1))
|
|
757
768
|
])
|
|
758
769
|
])
|
|
759
770
|
])
|
|
760
771
|
], 2));
|
|
761
772
|
}
|
|
762
|
-
}),
|
|
773
|
+
}), fe = {
|
|
763
774
|
pdf: {
|
|
764
775
|
color: "bg-red-100 text-red-700 border-red-200",
|
|
765
|
-
icon:
|
|
776
|
+
icon: q,
|
|
766
777
|
label: "PDF"
|
|
767
778
|
},
|
|
768
779
|
sketch: {
|
|
769
780
|
color: "bg-gray-100 text-gray-700 border-gray-200",
|
|
770
|
-
icon:
|
|
781
|
+
icon: Oe,
|
|
771
782
|
label: "SKETCH"
|
|
772
783
|
},
|
|
773
784
|
mp4: {
|
|
774
785
|
color: "bg-purple-100 text-purple-700 border-purple-200",
|
|
775
|
-
icon:
|
|
786
|
+
icon: Je,
|
|
776
787
|
label: "VIDEO"
|
|
777
788
|
},
|
|
778
789
|
docx: {
|
|
779
790
|
color: "bg-blue-100 text-blue-700 border-blue-200",
|
|
780
|
-
icon:
|
|
791
|
+
icon: q,
|
|
781
792
|
label: "DOC"
|
|
782
793
|
},
|
|
783
794
|
zip: {
|
|
784
795
|
color: "bg-orange-100 text-orange-700 border-orange-200",
|
|
785
|
-
icon:
|
|
796
|
+
icon: He,
|
|
786
797
|
label: "ARCHIVE"
|
|
787
798
|
},
|
|
788
799
|
png: {
|
|
789
800
|
color: "bg-green-100 text-green-700 border-green-200",
|
|
790
|
-
icon:
|
|
801
|
+
icon: ge,
|
|
791
802
|
label: "IMAGE"
|
|
792
803
|
},
|
|
793
804
|
jpg: {
|
|
794
805
|
color: "bg-green-100 text-green-700 border-green-200",
|
|
795
|
-
icon:
|
|
806
|
+
icon: ge,
|
|
796
807
|
label: "IMAGE"
|
|
797
808
|
},
|
|
798
809
|
xlsx: {
|
|
799
810
|
color: "bg-emerald-100 text-emerald-700 border-emerald-200",
|
|
800
|
-
icon:
|
|
811
|
+
icon: q,
|
|
801
812
|
label: "EXCEL"
|
|
802
813
|
},
|
|
803
814
|
pptx: {
|
|
804
815
|
color: "bg-amber-100 text-amber-700 border-amber-200",
|
|
805
|
-
icon:
|
|
816
|
+
icon: q,
|
|
806
817
|
label: "PPT"
|
|
807
818
|
}
|
|
808
819
|
};
|
|
809
|
-
function
|
|
820
|
+
function _e(l, i = "en") {
|
|
810
821
|
const n = {
|
|
811
822
|
month: "short",
|
|
812
823
|
day: "numeric"
|
|
@@ -815,325 +826,370 @@ function ke(l, i = "en") {
|
|
|
815
826
|
}
|
|
816
827
|
function we(l) {
|
|
817
828
|
if (l === 0) return "0 B";
|
|
818
|
-
const i = 1024, n = ["B", "KB", "MB", "GB", "TB"],
|
|
819
|
-
return `${parseFloat((l / Math.pow(i,
|
|
829
|
+
const i = 1024, n = ["B", "KB", "MB", "GB", "TB"], t = Math.floor(Math.log(l) / Math.log(i));
|
|
830
|
+
return `${parseFloat((l / Math.pow(i, t)).toFixed(1))} ${n[t]}`;
|
|
820
831
|
}
|
|
821
|
-
const
|
|
832
|
+
const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = { class: "flex items-center gap-2" }, Wt = { class: "font-medium text-xs truncate hover:text-blue-600 cursor-pointer" }, Gt = { class: "hidden sm:block text-xs text-gray-500 w-16 text-right" }, qt = { class: "hidden md:block text-xs text-gray-500 w-12 text-right" }, Kt = { class: "flex items-center gap-1" }, Zt = ["onClick"], Jt = ["onClick"], Xt = /* @__PURE__ */ I({
|
|
822
833
|
__name: "FileList",
|
|
823
834
|
props: {
|
|
824
835
|
files: {}
|
|
825
836
|
},
|
|
826
837
|
emits: ["delete", "download", "openLightbox"],
|
|
827
838
|
setup(l) {
|
|
828
|
-
return (i, n) => (
|
|
829
|
-
(
|
|
839
|
+
return (i, n) => (a(), r("div", Nt, [
|
|
840
|
+
(a(!0), r(A, null, S(i.files, (t) => (a(), r("div", {
|
|
830
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",
|
|
831
|
-
key:
|
|
832
|
-
onClick:
|
|
842
|
+
key: t.id,
|
|
843
|
+
onClick: K((s) => i.$emit("openLightbox", t), ["stop"])
|
|
833
844
|
}, [
|
|
834
|
-
|
|
835
|
-
class:
|
|
845
|
+
e("div", {
|
|
846
|
+
class: D(["p-1 rounded", _(fe)[t?.ext]?.color])
|
|
836
847
|
}, [
|
|
837
|
-
(
|
|
848
|
+
(a(), j(N(_(fe)[t?.ext]?.icon), { class: "h-3 w-3" }))
|
|
838
849
|
], 2),
|
|
839
|
-
|
|
850
|
+
e("div", {
|
|
840
851
|
class: "flex-1 min-w-0",
|
|
841
|
-
onClick: (s) => i.$emit("openLightbox",
|
|
852
|
+
onClick: (s) => i.$emit("openLightbox", t)
|
|
842
853
|
}, [
|
|
843
|
-
|
|
844
|
-
|
|
854
|
+
e("div", Pt, [
|
|
855
|
+
e("span", Wt, k(t?.uploaded_name || t?.name), 1)
|
|
845
856
|
])
|
|
846
|
-
], 8,
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
onClick:
|
|
857
|
+
], 8, Ut),
|
|
858
|
+
e("div", Gt, k(_(we)(t.size)), 1),
|
|
859
|
+
e("div", qt, k(_(_e)(t.createdAt)), 1),
|
|
860
|
+
e("div", Kt, [
|
|
861
|
+
e("button", {
|
|
862
|
+
onClick: K((s) => i.$emit("download", t), ["stop"]),
|
|
852
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"
|
|
853
864
|
}, [
|
|
854
|
-
|
|
855
|
-
], 8,
|
|
856
|
-
|
|
865
|
+
w(_(ce), { class: "h-3 w-3" })
|
|
866
|
+
], 8, Zt),
|
|
867
|
+
e("button", {
|
|
857
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",
|
|
858
|
-
onClick:
|
|
869
|
+
onClick: K((s) => i.$emit("delete", s, t?.file_id), ["stop"])
|
|
859
870
|
}, [
|
|
860
|
-
|
|
861
|
-
], 8,
|
|
871
|
+
w(_(ue), { class: "h-3 w-3" })
|
|
872
|
+
], 8, Jt)
|
|
862
873
|
])
|
|
863
|
-
], 8,
|
|
874
|
+
], 8, Rt))), 128))
|
|
864
875
|
]));
|
|
865
876
|
}
|
|
866
|
-
}),
|
|
877
|
+
}), Qt = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3" }, Yt = ["onClick"], es = { class: "space-y-2" }, ts = { class: "flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden" }, ss = ["src"], os = { class: "space-y-1" }, ns = ["title"], is = { class: "text-xs text-gray-500 text-left" }, as = { class: "absolute top-2 right-1 flex items-center gap-1" }, ls = ["onClick"], rs = ["onClick"], ds = /* @__PURE__ */ I({
|
|
867
878
|
__name: "FileGrid",
|
|
868
879
|
props: {
|
|
869
880
|
files: {}
|
|
870
881
|
},
|
|
871
882
|
emits: ["delete", "download", "openLightbox"],
|
|
872
883
|
setup(l) {
|
|
873
|
-
return (i, n) => (
|
|
874
|
-
(
|
|
875
|
-
key:
|
|
876
|
-
onClick:
|
|
884
|
+
return (i, n) => (a(), r("div", Qt, [
|
|
885
|
+
(a(!0), r(A, null, S(i.files, (t) => (a(), r("div", {
|
|
886
|
+
key: t.id,
|
|
887
|
+
onClick: K((s) => i.$emit("openLightbox", t), ["stop"]),
|
|
877
888
|
class: "group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"
|
|
878
889
|
}, [
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
890
|
+
e("div", es, [
|
|
891
|
+
e("div", ts, [
|
|
892
|
+
t.ext === "png" || t.ext === "jpg" || t.ext === "jpeg" || t.ext === "gif" || t.ext === "svg" || t.ext === "webp" ? (a(), r("img", {
|
|
882
893
|
key: 0,
|
|
883
|
-
src: `/file/resize?filepath=${
|
|
894
|
+
src: `/file/resize?filepath=${t?.file_path}&w=500`,
|
|
884
895
|
alt: "file",
|
|
885
896
|
class: "w-full h-full object-cover"
|
|
886
|
-
}, null, 8,
|
|
897
|
+
}, null, 8, ss)) : (a(), j(_(q), {
|
|
887
898
|
key: 1,
|
|
888
899
|
class: "h-10 w-10 text-gray-500"
|
|
889
900
|
}))
|
|
890
901
|
]),
|
|
891
|
-
|
|
892
|
-
|
|
902
|
+
e("div", os, [
|
|
903
|
+
e("h3", {
|
|
893
904
|
class: "font-medium text-xs leading-tight text-left",
|
|
894
|
-
title:
|
|
895
|
-
},
|
|
896
|
-
|
|
905
|
+
title: t.uploaded_name || t.name
|
|
906
|
+
}, k(t.uploaded_name || t.name), 9, ns),
|
|
907
|
+
e("p", is, k(_(_e)(t.createdAt)) + ", " + k(_(we)(t.size)), 1)
|
|
897
908
|
])
|
|
898
909
|
]),
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
onClick:
|
|
910
|
+
e("div", as, [
|
|
911
|
+
e("button", {
|
|
912
|
+
onClick: K((s) => i.$emit("download", t), ["stop"]),
|
|
902
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"
|
|
903
914
|
}, [
|
|
904
|
-
|
|
905
|
-
], 8,
|
|
906
|
-
|
|
915
|
+
w(_(ce), { class: "h-3 w-3" })
|
|
916
|
+
], 8, ls),
|
|
917
|
+
e("a", {
|
|
907
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",
|
|
908
|
-
onClick:
|
|
919
|
+
onClick: K((s) => i.$emit("delete", s, t?.file_id), ["stop"])
|
|
909
920
|
}, [
|
|
910
|
-
|
|
911
|
-
], 8,
|
|
921
|
+
w(_(ue), { class: "h-3 w-3" })
|
|
922
|
+
], 8, rs)
|
|
912
923
|
])
|
|
913
|
-
], 8,
|
|
924
|
+
], 8, Yt))), 128))
|
|
914
925
|
]));
|
|
915
926
|
}
|
|
916
|
-
}),
|
|
927
|
+
}), cs = { class: "mx-auto font-sans" }, us = { key: 1 }, ne = /* @__PURE__ */ I({
|
|
917
928
|
__name: "FilesWidget",
|
|
918
929
|
props: {
|
|
919
930
|
title: {},
|
|
920
931
|
view: {},
|
|
921
|
-
files: {},
|
|
932
|
+
files: { default: () => [] },
|
|
922
933
|
maxHeight: {},
|
|
923
|
-
onAddFile: {
|
|
934
|
+
onAddFile: {},
|
|
935
|
+
id: {},
|
|
936
|
+
className: {},
|
|
937
|
+
style: {},
|
|
938
|
+
onDelete: {}
|
|
924
939
|
},
|
|
925
940
|
emits: ["delete", "add", "openLightbox"],
|
|
926
941
|
setup(l, { emit: i }) {
|
|
927
|
-
const n = l,
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
s.value
|
|
931
|
-
},
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
},
|
|
937
|
-
|
|
938
|
-
},
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
942
|
+
const n = l, t = M(!1), s = M(null), f = M(!1), o = M(0), m = M(n.files ?? []), v = i;
|
|
943
|
+
m.value.length === 0 && h();
|
|
944
|
+
const g = (x, u) => {
|
|
945
|
+
s.value = u, t.value = !0;
|
|
946
|
+
}, d = () => {
|
|
947
|
+
s.value && (W(s.value), s.value = null, t.value = !1);
|
|
948
|
+
}, y = O(() => Array.isArray(m.value) ? m.value.map((x) => x?.file_path) : []), p = (x) => {
|
|
949
|
+
const u = y.value.findIndex((E) => E === x.file_path);
|
|
950
|
+
u !== -1 && (f.value = !0, o.value = u);
|
|
951
|
+
}, b = (x) => {
|
|
952
|
+
n.onAddFile ? n.onAddFile(x) : F(x), v("add", x);
|
|
953
|
+
}, W = (x) => {
|
|
954
|
+
n.onDelete ? n.onDelete(x) : C(x), v("delete", x);
|
|
955
|
+
}, V = (x) => {
|
|
956
|
+
const u = document.createElement("a");
|
|
957
|
+
u.setAttribute("download", x?.uploaded_name || x?.name), u.href = x?.file_path || x?.path, u.click();
|
|
958
|
+
}, c = M("list");
|
|
959
|
+
async function h() {
|
|
960
|
+
if (!n.id)
|
|
961
|
+
return;
|
|
962
|
+
const x = await fetch(`/api/widget/file/${n.id}`).then((u) => u.json());
|
|
963
|
+
x.rows.forEach((u) => {
|
|
964
|
+
u.timestamp = new Date(u.cdate), u.id = u.entity_id, u.entityType = u.entity_type, u.entityId = u.entity_id, u.entityType = u.entity_type, u.action = u.change_type, u.userId = u.change_user_id, u.userName = u.username, u.timestamp = new Date(u.cdate), u.description = u.username, u.status = u.username;
|
|
965
|
+
}), m.value = x.rows;
|
|
966
|
+
}
|
|
967
|
+
const F = async (x) => {
|
|
968
|
+
if (!(!x.target || !x.target.files || x.target.files.length === 0))
|
|
969
|
+
try {
|
|
970
|
+
await Promise.all(
|
|
971
|
+
Array.from(x.target.files).map(async (u) => {
|
|
972
|
+
const E = new FormData();
|
|
973
|
+
E.append("file", u);
|
|
974
|
+
const B = `/api/widget/file/${n.id}`, z = await fetch(B, {
|
|
975
|
+
method: "POST",
|
|
976
|
+
body: E
|
|
977
|
+
});
|
|
978
|
+
if (!z.ok)
|
|
979
|
+
throw new Error(`HTTP error! status: ${z.status}`);
|
|
980
|
+
return u;
|
|
981
|
+
})
|
|
982
|
+
), await h();
|
|
983
|
+
} catch (u) {
|
|
984
|
+
console.error("Помилка при завантаженні файлів:", u);
|
|
985
|
+
}
|
|
986
|
+
}, C = async (x) => {
|
|
987
|
+
try {
|
|
988
|
+
await fetch(
|
|
989
|
+
`/api/widget/file/${n.id}/${x}`,
|
|
990
|
+
{
|
|
991
|
+
method: "DELETE"
|
|
992
|
+
}
|
|
993
|
+
), await h();
|
|
994
|
+
} catch (u) {
|
|
995
|
+
console.error(u);
|
|
996
|
+
}
|
|
997
|
+
};
|
|
998
|
+
return (x, u) => {
|
|
999
|
+
const E = ee("MessageBox"), B = ee("Lightbox");
|
|
1000
|
+
return a(), r(A, null, [
|
|
1001
|
+
e("div", cs, [
|
|
1002
|
+
w(Bt, {
|
|
1003
|
+
modelValue: c.value,
|
|
1004
|
+
"onUpdate:modelValue": u[0] || (u[0] = (z) => c.value = z),
|
|
949
1005
|
title: n.title,
|
|
950
|
-
onOnAddFile:
|
|
1006
|
+
onOnAddFile: u[1] || (u[1] = (z) => b(z))
|
|
951
1007
|
}, null, 8, ["modelValue", "title"]),
|
|
952
|
-
|
|
1008
|
+
m.value.length > 0 ? (a(), r("div", {
|
|
953
1009
|
key: 0,
|
|
954
|
-
class:
|
|
955
|
-
style:
|
|
1010
|
+
class: D(x.maxHeight ? "overflow-y-auto" : ""),
|
|
1011
|
+
style: R({ maxHeight: x.maxHeight + "px" })
|
|
956
1012
|
}, [
|
|
957
|
-
|
|
1013
|
+
c.value === "list" ? (a(), j(Xt, {
|
|
958
1014
|
key: 0,
|
|
959
|
-
onDelete:
|
|
960
|
-
onDownload:
|
|
961
|
-
onOpenLightbox:
|
|
962
|
-
files:
|
|
963
|
-
}, null, 8, ["files"])) :
|
|
964
|
-
|
|
1015
|
+
onDelete: g,
|
|
1016
|
+
onDownload: V,
|
|
1017
|
+
onOpenLightbox: u[2] || (u[2] = (z) => p(z)),
|
|
1018
|
+
files: m.value
|
|
1019
|
+
}, null, 8, ["files"])) : $("", !0),
|
|
1020
|
+
c.value === "grid" ? (a(), j(ds, {
|
|
965
1021
|
key: 1,
|
|
966
|
-
onDelete:
|
|
967
|
-
onDownload:
|
|
968
|
-
onOpenLightbox:
|
|
969
|
-
files:
|
|
970
|
-
}, null, 8, ["files"])) :
|
|
971
|
-
], 6)) : (
|
|
972
|
-
|
|
973
|
-
|
|
1022
|
+
onDelete: g,
|
|
1023
|
+
onDownload: V,
|
|
1024
|
+
onOpenLightbox: u[3] || (u[3] = (z) => p(z)),
|
|
1025
|
+
files: m.value
|
|
1026
|
+
}, null, 8, ["files"])) : $("", !0)
|
|
1027
|
+
], 6)) : (a(), r("div", us, u[6] || (u[6] = [
|
|
1028
|
+
e("div", { class: "flex items-center justify-center h-full" }, [
|
|
1029
|
+
e("p", { class: "text-gray-500 leading-[3]" }, "Файлів не знайдено")
|
|
974
1030
|
], -1)
|
|
975
1031
|
])))
|
|
976
1032
|
]),
|
|
977
|
-
|
|
978
|
-
modelValue:
|
|
979
|
-
"onUpdate:modelValue":
|
|
980
|
-
onConfirm:
|
|
1033
|
+
w(E, {
|
|
1034
|
+
modelValue: t.value,
|
|
1035
|
+
"onUpdate:modelValue": u[4] || (u[4] = (z) => t.value = z),
|
|
1036
|
+
onConfirm: d,
|
|
981
1037
|
title: "Ви впевнені?",
|
|
982
1038
|
message: "Ви впевнені, що хочете видалити цей файл?",
|
|
983
1039
|
confirmButtonText: "Так, я впевнена/ий",
|
|
984
1040
|
cancelButtonText: "Скасувати"
|
|
985
1041
|
}, null, 8, ["modelValue"]),
|
|
986
|
-
|
|
1042
|
+
w(B, {
|
|
987
1043
|
modelValue: f.value,
|
|
988
|
-
"onUpdate:modelValue":
|
|
989
|
-
images:
|
|
990
|
-
"start-index":
|
|
1044
|
+
"onUpdate:modelValue": u[5] || (u[5] = (z) => f.value = z),
|
|
1045
|
+
images: y.value,
|
|
1046
|
+
"start-index": o.value
|
|
991
1047
|
}, null, 8, ["modelValue", "images", "start-index"])
|
|
992
1048
|
], 64);
|
|
993
1049
|
};
|
|
994
1050
|
}
|
|
995
|
-
}),
|
|
1051
|
+
}), ps = ["onClick"], ms = /* @__PURE__ */ I({
|
|
996
1052
|
__name: "CopyNotification",
|
|
997
1053
|
setup(l, { expose: i }) {
|
|
998
|
-
const n =
|
|
999
|
-
let
|
|
1054
|
+
const n = M([]);
|
|
1055
|
+
let t = 1;
|
|
1000
1056
|
const s = () => {
|
|
1001
1057
|
if (n.value.length >= 10) {
|
|
1002
|
-
const
|
|
1003
|
-
clearTimeout(
|
|
1058
|
+
const m = n.value[0];
|
|
1059
|
+
clearTimeout(m.timer), n.value.shift();
|
|
1004
1060
|
}
|
|
1005
|
-
const
|
|
1006
|
-
id:
|
|
1061
|
+
const o = {
|
|
1062
|
+
id: t++,
|
|
1007
1063
|
timer: setTimeout(() => {
|
|
1008
|
-
f(
|
|
1064
|
+
f(o.id);
|
|
1009
1065
|
}, 1500)
|
|
1010
1066
|
};
|
|
1011
|
-
n.value.push(
|
|
1012
|
-
}, f = (
|
|
1013
|
-
const
|
|
1014
|
-
if (
|
|
1015
|
-
const
|
|
1016
|
-
clearTimeout(
|
|
1067
|
+
n.value.push(o);
|
|
1068
|
+
}, f = (o) => {
|
|
1069
|
+
const m = n.value.findIndex((v) => v.id === o);
|
|
1070
|
+
if (m !== -1) {
|
|
1071
|
+
const v = n.value[m];
|
|
1072
|
+
clearTimeout(v.timer), n.value.splice(m, 1);
|
|
1017
1073
|
}
|
|
1018
1074
|
};
|
|
1019
1075
|
return i({
|
|
1020
1076
|
addNotification: s
|
|
1021
|
-
}),
|
|
1022
|
-
n.value.forEach((
|
|
1023
|
-
clearTimeout(
|
|
1077
|
+
}), de(() => {
|
|
1078
|
+
n.value.forEach((o) => {
|
|
1079
|
+
clearTimeout(o.timer);
|
|
1024
1080
|
});
|
|
1025
|
-
}), (
|
|
1026
|
-
|
|
1081
|
+
}), (o, m) => (a(), j(be, { to: "body" }, [
|
|
1082
|
+
w(Me, {
|
|
1027
1083
|
name: "notification",
|
|
1028
1084
|
tag: "div",
|
|
1029
1085
|
class: "fixed top-4 right-4 z-50 space-y-2"
|
|
1030
1086
|
}, {
|
|
1031
|
-
default:
|
|
1032
|
-
(
|
|
1033
|
-
key:
|
|
1087
|
+
default: Le(() => [
|
|
1088
|
+
(a(!0), r(A, null, S(n.value, (v) => (a(), r("div", {
|
|
1089
|
+
key: v.id,
|
|
1034
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"
|
|
1035
1091
|
}, [
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1092
|
+
w(_(Se), { class: "h-5 w-5 text-green-100 flex-shrink-0" }),
|
|
1093
|
+
m[0] || (m[0] = e("div", { class: "flex-1" }, [
|
|
1094
|
+
e("p", { class: "font-medium text-sm" }, "Ссылка скопирована!"),
|
|
1095
|
+
e("p", { class: "text-xs text-green-100 opacity-90" }, "Файл добавлен в буфер обмена")
|
|
1040
1096
|
], -1)),
|
|
1041
|
-
|
|
1042
|
-
onClick: (
|
|
1097
|
+
e("button", {
|
|
1098
|
+
onClick: (g) => f(v.id),
|
|
1043
1099
|
class: "text-green-100 hover:text-white transition-colors flex-shrink-0"
|
|
1044
1100
|
}, [
|
|
1045
|
-
|
|
1046
|
-
], 8,
|
|
1101
|
+
w(_(X), { class: "h-4 w-4" })
|
|
1102
|
+
], 8, ps)
|
|
1047
1103
|
]))), 128))
|
|
1048
1104
|
]),
|
|
1049
1105
|
_: 1
|
|
1050
1106
|
})
|
|
1051
1107
|
]));
|
|
1052
1108
|
}
|
|
1053
|
-
}),
|
|
1109
|
+
}), P = (l, i) => {
|
|
1054
1110
|
const n = l.__vccOpts || l;
|
|
1055
|
-
for (const [
|
|
1056
|
-
n[
|
|
1111
|
+
for (const [t, s] of i)
|
|
1112
|
+
n[t] = s;
|
|
1057
1113
|
return n;
|
|
1058
|
-
},
|
|
1114
|
+
}, $e = /* @__PURE__ */ P(ms, [["__scopeId", "data-v-55903525"]]), gs = { class: "fixed inset-0 z-50 bg-black/80" }, hs = { 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" }, fs = { class: "flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2" }, vs = { class: "flex items-center justify-between" }, ys = { class: "flex items-center gap-2" }, bs = { class: "tracking-tight text-base font-medium" }, xs = { class: "p-4 pt-0" }, ks = { class: "flex flex-col items-center" }, _s = ["src", "alt"], ws = { class: "mt-3 flex items-center gap-4 text-sm text-gray-600" }, $s = { class: "mt-3 flex gap-2" }, Cs = /* @__PURE__ */ I({
|
|
1059
1115
|
__name: "GalleryModal",
|
|
1060
1116
|
props: {
|
|
1061
1117
|
item: {}
|
|
1062
1118
|
},
|
|
1063
1119
|
emits: ["close"],
|
|
1064
1120
|
setup(l) {
|
|
1065
|
-
const i =
|
|
1121
|
+
const i = M(), n = (o) => new Date(o).toLocaleDateString("uk-UA", {
|
|
1066
1122
|
day: "2-digit",
|
|
1067
1123
|
month: "2-digit",
|
|
1068
1124
|
year: "numeric"
|
|
1069
|
-
}),
|
|
1070
|
-
navigator.clipboard.writeText(
|
|
1071
|
-
}, f = async (
|
|
1125
|
+
}), t = (o) => o >= 1024 * 1024 * 1024 ? (o / (1024 * 1024 * 1024)).toFixed(2) + " GB" : o >= 1024 * 1024 ? (o / (1024 * 1024)).toFixed(2) + " MB" : o >= 1024 ? (o / 1024).toFixed(2) + " KB" : o + " B", s = (o) => {
|
|
1126
|
+
navigator.clipboard.writeText(o), i.value?.addNotification();
|
|
1127
|
+
}, f = async (o, m) => {
|
|
1072
1128
|
try {
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1075
|
-
} catch (
|
|
1076
|
-
console.error("Download failed:",
|
|
1129
|
+
const g = await (await fetch(o)).blob(), d = window.URL.createObjectURL(g), y = document.createElement("a");
|
|
1130
|
+
y.href = d, y.download = m, document.body.appendChild(y), y.click(), window.URL.revokeObjectURL(d), document.body.removeChild(y);
|
|
1131
|
+
} catch (v) {
|
|
1132
|
+
console.error("Download failed:", v), alert("Download failed. Please try opening the image in a new tab.");
|
|
1077
1133
|
}
|
|
1078
1134
|
};
|
|
1079
|
-
return (
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1135
|
+
return (o, m) => (a(), r("div", gs, [
|
|
1136
|
+
e("div", hs, [
|
|
1137
|
+
e("div", fs, [
|
|
1138
|
+
e("div", vs, [
|
|
1139
|
+
e("div", ys, [
|
|
1140
|
+
e("h2", bs, k(o.item.name), 1)
|
|
1085
1141
|
])
|
|
1086
1142
|
])
|
|
1087
1143
|
]),
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
src:
|
|
1092
|
-
alt:
|
|
1144
|
+
e("div", xs, [
|
|
1145
|
+
e("div", ks, [
|
|
1146
|
+
e("img", {
|
|
1147
|
+
src: o.item.path,
|
|
1148
|
+
alt: o.item.name,
|
|
1093
1149
|
class: "max-w-full max-h-[60vh] object-contain rounded border"
|
|
1094
|
-
}, null, 8,
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1150
|
+
}, null, 8, _s),
|
|
1151
|
+
e("div", ws, [
|
|
1152
|
+
e("span", null, "Size: " + k(t(o.item.size)), 1),
|
|
1153
|
+
m[3] || (m[3] = e("span", null, "•", -1)),
|
|
1154
|
+
e("span", null, "Date: " + k(n(o.item.createdAt)), 1)
|
|
1099
1155
|
]),
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
onClick:
|
|
1156
|
+
e("div", $s, [
|
|
1157
|
+
e("button", {
|
|
1158
|
+
onClick: m[0] || (m[0] = (v) => f(o.item.path, o.item.name)),
|
|
1103
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"
|
|
1104
1160
|
}, [
|
|
1105
|
-
|
|
1106
|
-
|
|
1161
|
+
w(_(ce), { class: "h-3 w-3 mr-1" }),
|
|
1162
|
+
m[4] || (m[4] = H(" Download ", -1))
|
|
1107
1163
|
]),
|
|
1108
|
-
|
|
1109
|
-
onClick:
|
|
1164
|
+
e("button", {
|
|
1165
|
+
onClick: m[1] || (m[1] = (v) => s(o.item.path)),
|
|
1110
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"
|
|
1111
1167
|
}, [
|
|
1112
|
-
|
|
1113
|
-
|
|
1168
|
+
w(_(Ge), { class: "h-3 w-3 mr-1" }),
|
|
1169
|
+
m[5] || (m[5] = H(" Share ", -1))
|
|
1114
1170
|
])
|
|
1115
1171
|
])
|
|
1116
1172
|
])
|
|
1117
1173
|
]),
|
|
1118
|
-
|
|
1174
|
+
e("button", {
|
|
1119
1175
|
type: "button",
|
|
1120
|
-
onClick:
|
|
1176
|
+
onClick: m[2] || (m[2] = (v) => o.$emit("close")),
|
|
1121
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"
|
|
1122
1178
|
}, [
|
|
1123
|
-
|
|
1124
|
-
|
|
1179
|
+
w(_(X), { class: "h-4 w-4" }),
|
|
1180
|
+
m[6] || (m[6] = e("span", { class: "sr-only" }, "Close", -1))
|
|
1125
1181
|
])
|
|
1126
1182
|
]),
|
|
1127
|
-
|
|
1183
|
+
w($e, {
|
|
1128
1184
|
ref_key: "copyNotificationRef",
|
|
1129
1185
|
ref: i
|
|
1130
1186
|
}, null, 512)
|
|
1131
1187
|
]));
|
|
1132
1188
|
}
|
|
1133
|
-
}),
|
|
1189
|
+
}), Ms = {
|
|
1134
1190
|
key: 0,
|
|
1135
1191
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
1136
|
-
},
|
|
1192
|
+
}, Ls = ["onClick"], Ds = ["src", "alt"], ie = /* @__PURE__ */ I({
|
|
1137
1193
|
__name: "GalleryWidget",
|
|
1138
1194
|
props: {
|
|
1139
1195
|
title: {},
|
|
@@ -1145,262 +1201,127 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
|
|
|
1145
1201
|
style: {}
|
|
1146
1202
|
},
|
|
1147
1203
|
setup(l) {
|
|
1148
|
-
const i = l, n =
|
|
1149
|
-
let
|
|
1150
|
-
const
|
|
1151
|
-
const
|
|
1152
|
-
return f.value >= 1440 ?
|
|
1153
|
-
}),
|
|
1204
|
+
const i = l, n = M(!1), t = M(null), s = M(), f = M(0);
|
|
1205
|
+
let o = null;
|
|
1206
|
+
const m = O(() => {
|
|
1207
|
+
const d = i.columns || 4;
|
|
1208
|
+
return f.value >= 1440 ? d : f.value >= 1024 ? Math.max(1, d - 1) : f.value >= 768 ? Math.max(1, d - 2) : f.value >= 640 ? Math.max(1, d - 3) : 1;
|
|
1209
|
+
}), v = () => {
|
|
1154
1210
|
s.value && (f.value = s.value.offsetWidth);
|
|
1155
1211
|
};
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
s.value && (
|
|
1159
|
-
for (const
|
|
1160
|
-
|
|
1161
|
-
}),
|
|
1212
|
+
re(() => {
|
|
1213
|
+
De(() => {
|
|
1214
|
+
s.value && (o = new ResizeObserver((d) => {
|
|
1215
|
+
for (const y of d)
|
|
1216
|
+
y.target === s.value && (f.value = y.contentRect.width);
|
|
1217
|
+
}), o.observe(s.value), v());
|
|
1162
1218
|
});
|
|
1163
|
-
}),
|
|
1164
|
-
|
|
1219
|
+
}), de(() => {
|
|
1220
|
+
o && o.disconnect();
|
|
1165
1221
|
});
|
|
1166
|
-
const
|
|
1167
|
-
|
|
1222
|
+
const g = (d) => {
|
|
1223
|
+
t.value = d, n.value = !0;
|
|
1168
1224
|
};
|
|
1169
|
-
return (
|
|
1225
|
+
return (d, y) => (a(), r("div", {
|
|
1170
1226
|
class: "w-full mx-auto font-sans",
|
|
1171
1227
|
ref_key: "containerRef",
|
|
1172
1228
|
ref: s
|
|
1173
1229
|
}, [
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
class:
|
|
1177
|
-
style:
|
|
1230
|
+
d.title ? (a(), r("h3", Ms, k(d.title), 1)) : $("", !0),
|
|
1231
|
+
e("div", {
|
|
1232
|
+
class: D(d.maxHeight ? "overflow-y-auto" : ""),
|
|
1233
|
+
style: R({ maxHeight: d.maxHeight + "px" })
|
|
1178
1234
|
}, [
|
|
1179
|
-
|
|
1180
|
-
style:
|
|
1235
|
+
e("div", {
|
|
1236
|
+
style: R({ columns: m.value + " auto", gap: "12px" }),
|
|
1181
1237
|
class: "space-y-3"
|
|
1182
1238
|
}, [
|
|
1183
|
-
(
|
|
1184
|
-
key:
|
|
1185
|
-
onClick: (
|
|
1239
|
+
(a(!0), r(A, null, S(d.items, (p) => (a(), r("div", {
|
|
1240
|
+
key: p.id,
|
|
1241
|
+
onClick: (b) => g(p),
|
|
1186
1242
|
class: "group relative break-inside-avoid bg-gray-200 rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-all mb-3"
|
|
1187
1243
|
}, [
|
|
1188
|
-
|
|
1189
|
-
src:
|
|
1190
|
-
alt:
|
|
1244
|
+
e("img", {
|
|
1245
|
+
src: p.path,
|
|
1246
|
+
alt: p.name,
|
|
1191
1247
|
class: "w-full h-auto min-h-40 rounded-md object-contain"
|
|
1192
|
-
}, null, 8,
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1248
|
+
}, null, 8, Ds),
|
|
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
|
+
e("h3", { class: "text-white font-medium text-base leading-tight mb-1" }, "Mountain Landscape"),
|
|
1251
|
+
e("p", { class: "text-white/90 text-sm" }, "2.4 MB")
|
|
1196
1252
|
], -1)),
|
|
1197
|
-
|
|
1198
|
-
], 8,
|
|
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, Ls))), 128))
|
|
1199
1255
|
], 4)
|
|
1200
1256
|
], 6),
|
|
1201
|
-
(
|
|
1202
|
-
n.value &&
|
|
1257
|
+
(a(), j(be, { to: "body" }, [
|
|
1258
|
+
n.value && t.value ? (a(), j(Cs, {
|
|
1203
1259
|
key: 0,
|
|
1204
|
-
item:
|
|
1205
|
-
onClose:
|
|
1206
|
-
}, null, 8, ["item"])) :
|
|
1260
|
+
item: t.value,
|
|
1261
|
+
onClose: y[0] || (y[0] = (p) => n.value = !1)
|
|
1262
|
+
}, null, 8, ["item"])) : $("", !0)
|
|
1207
1263
|
]))
|
|
1208
1264
|
], 512));
|
|
1209
1265
|
}
|
|
1210
|
-
}),
|
|
1211
|
-
key: 0,
|
|
1212
|
-
class: "overflow-hidden"
|
|
1213
|
-
}, Ds = { class: "flex border-b border-gray-200 bg-gray-50" }, Ts = ["onClick"], js = { class: "p-4" }, Is = ["innerHTML"], Vs = {
|
|
1214
|
-
key: 1,
|
|
1215
|
-
class: "p-4"
|
|
1216
|
-
}, zs = { class: "grid grid-cols-12 gap-4" }, Fs = {
|
|
1217
|
-
key: 0,
|
|
1218
|
-
class: "mb-4 pb-2 border-b border-gray-200"
|
|
1219
|
-
}, As = { class: "text-lg font-semibold text-gray-900" }, Hs = ["innerHTML"], Ss = /* @__PURE__ */ C({
|
|
1220
|
-
__name: "Card",
|
|
1221
|
-
props: {
|
|
1222
|
-
panels: { default: () => [] },
|
|
1223
|
-
data: { default: () => ({}) },
|
|
1224
|
-
view: { default: "plain" },
|
|
1225
|
-
id: {},
|
|
1226
|
-
className: {},
|
|
1227
|
-
style: {}
|
|
1228
|
-
},
|
|
1229
|
-
setup(l) {
|
|
1230
|
-
const i = l, n = w(0), e = A(() => i.panels && i.panels.length > 0 ? i.panels : i.data && Array.isArray(i.data) ? i.data.filter((m) => m.type === "tabs")[0]?.items || [] : []), s = A(() => i.panels && i.panels.length > 0 ? i.panels : i.data && Array.isArray(i.data) ? i.data : []), f = A(() => ({
|
|
1231
|
-
[`view-${i.view}`]: !0
|
|
1232
|
-
})), p = (u) => {
|
|
1233
|
-
const m = {};
|
|
1234
|
-
return u.count && (m.count = u.count), u.col && (m.col = u.col), i.data && u.name && Object.assign(m, i.data[u.name]), m;
|
|
1235
|
-
}, g = (u) => u.width ? {
|
|
1236
|
-
gridColumn: `span ${u.width}`
|
|
1237
|
-
} : {};
|
|
1238
|
-
return (u, m) => (o(), a("div", {
|
|
1239
|
-
class: _(["bg-white rounded-lg shadow-sm border border-gray-200", f.value])
|
|
1240
|
-
}, [
|
|
1241
|
-
u.view === "tab" ? (o(), a("div", Ls, [
|
|
1242
|
-
t("div", Ds, [
|
|
1243
|
-
(o(!0), a(z, null, F(e.value, (r, h) => (o(), a("button", {
|
|
1244
|
-
key: r.name || h,
|
|
1245
|
-
onClick: (I) => n.value = h,
|
|
1246
|
-
class: _([
|
|
1247
|
-
"px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",
|
|
1248
|
-
{ "text-blue-600 bg-white border-b-2 border-blue-600": n.value === h }
|
|
1249
|
-
])
|
|
1250
|
-
}, v(r.title || r.label || r.name || `Tab ${h + 1}`), 11, Ts))), 128))
|
|
1251
|
-
]),
|
|
1252
|
-
t("div", js, [
|
|
1253
|
-
(o(!0), a(z, null, F(e.value, (r, h) => O((o(), a("div", {
|
|
1254
|
-
key: r.name || h,
|
|
1255
|
-
class: _([
|
|
1256
|
-
"min-h-[400px] w-full",
|
|
1257
|
-
`col-span-${r.col || 12}`
|
|
1258
|
-
])
|
|
1259
|
-
}, [
|
|
1260
|
-
r.html ? (o(), a("div", {
|
|
1261
|
-
key: 0,
|
|
1262
|
-
innerHTML: r.html,
|
|
1263
|
-
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"
|
|
1264
|
-
}, null, 8, Is)) : u.$slots[`tab-${h}`] ? U(u.$slots, `tab-${h}`, {
|
|
1265
|
-
key: 1,
|
|
1266
|
-
item: r,
|
|
1267
|
-
data: u.data
|
|
1268
|
-
}) : r.component ? (o(), D(S(r.component), te({
|
|
1269
|
-
key: 2,
|
|
1270
|
-
ref_for: !0
|
|
1271
|
-
}, p(r), { class: "w-full h-full" }), null, 16)) : U(u.$slots, r.slot || `tab-${h}`, {
|
|
1272
|
-
key: 3,
|
|
1273
|
-
item: r,
|
|
1274
|
-
data: u.data
|
|
1275
|
-
})
|
|
1276
|
-
], 2)), [
|
|
1277
|
-
[Le, n.value === h]
|
|
1278
|
-
])), 128))
|
|
1279
|
-
])
|
|
1280
|
-
])) : (o(), a("div", Vs, [
|
|
1281
|
-
t("div", zs, [
|
|
1282
|
-
(o(!0), a(z, null, F(s.value, (r, h) => (o(), a("div", {
|
|
1283
|
-
key: r.name || h,
|
|
1284
|
-
class: _([
|
|
1285
|
-
"bg-gray-50 rounded-lg p-4 min-h-[300px]",
|
|
1286
|
-
`col-span-${r.col || 12}`
|
|
1287
|
-
]),
|
|
1288
|
-
style: E(g(r))
|
|
1289
|
-
}, [
|
|
1290
|
-
r.title || r.label ? (o(), a("div", Fs, [
|
|
1291
|
-
t("h3", As, v(r.title || r.label), 1)
|
|
1292
|
-
])) : x("", !0),
|
|
1293
|
-
r.html ? (o(), a("div", {
|
|
1294
|
-
key: 1,
|
|
1295
|
-
innerHTML: r.html,
|
|
1296
|
-
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"
|
|
1297
|
-
}, null, 8, Hs)) : u.$slots[`panel-${h}`] ? U(u.$slots, `panel-${h}`, {
|
|
1298
|
-
key: 2,
|
|
1299
|
-
item: r,
|
|
1300
|
-
data: u.data
|
|
1301
|
-
}) : r.component ? (o(), D(S(r.component), te({
|
|
1302
|
-
key: 3,
|
|
1303
|
-
ref_for: !0
|
|
1304
|
-
}, p(r), { class: "w-full h-full" }), null, 16)) : U(u.$slots, r.slot || `panel-${h}`, {
|
|
1305
|
-
key: 4,
|
|
1306
|
-
item: r,
|
|
1307
|
-
data: u.data
|
|
1308
|
-
})
|
|
1309
|
-
], 6))), 128))
|
|
1310
|
-
])
|
|
1311
|
-
]))
|
|
1312
|
-
], 2));
|
|
1313
|
-
}
|
|
1314
|
-
}), Es = ["innerHTML"], Os = /* @__PURE__ */ C({
|
|
1315
|
-
__name: "CardItem",
|
|
1316
|
-
props: {
|
|
1317
|
-
name: {},
|
|
1318
|
-
label: {},
|
|
1319
|
-
component: {},
|
|
1320
|
-
slot: {},
|
|
1321
|
-
col: { default: 12 },
|
|
1322
|
-
html: {},
|
|
1323
|
-
title: {},
|
|
1324
|
-
id: {},
|
|
1325
|
-
className: {},
|
|
1326
|
-
style: {}
|
|
1327
|
-
},
|
|
1328
|
-
setup(l) {
|
|
1329
|
-
const i = l, n = A(() => ({
|
|
1330
|
-
[`col-span-${i.col}`]: !0
|
|
1331
|
-
})), e = A(() => {
|
|
1332
|
-
const s = {};
|
|
1333
|
-
return s.col && (s.col = s.col), s;
|
|
1334
|
-
});
|
|
1335
|
-
return (s, f) => (o(), a("div", {
|
|
1336
|
-
class: _(["w-full", n.value])
|
|
1337
|
-
}, [
|
|
1338
|
-
s.html ? (o(), a("div", {
|
|
1339
|
-
key: 0,
|
|
1340
|
-
innerHTML: s.html,
|
|
1341
|
-
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"
|
|
1342
|
-
}, null, 8, Es)) : s.component ? (o(), D(S(s.component), te({ key: 1 }, e.value, { class: "w-full" }), null, 16)) : U(s.$slots, "default", { key: 2 })
|
|
1343
|
-
], 2));
|
|
1344
|
-
}
|
|
1345
|
-
}), Bs = { class: "text-value" }, Rs = { class: "text-sm text-gray-900" }, Ns = /* @__PURE__ */ C({
|
|
1266
|
+
}), Ts = { class: "text-value" }, Is = { class: "text-sm text-gray-900" }, zs = /* @__PURE__ */ I({
|
|
1346
1267
|
__name: "TextValue",
|
|
1347
1268
|
props: {
|
|
1348
1269
|
item: {}
|
|
1349
1270
|
},
|
|
1350
1271
|
setup(l) {
|
|
1351
|
-
const i = l, n =
|
|
1352
|
-
const
|
|
1353
|
-
return typeof
|
|
1272
|
+
const i = l, n = O(() => {
|
|
1273
|
+
const t = i.item.value;
|
|
1274
|
+
return typeof t == "boolean" ? t ? "Так" : "Ні" : t == null ? "—" : String(t);
|
|
1354
1275
|
});
|
|
1355
|
-
return (
|
|
1356
|
-
|
|
1276
|
+
return (t, s) => (a(), r("div", Ts, [
|
|
1277
|
+
e("span", Is, k(n.value), 1)
|
|
1357
1278
|
]));
|
|
1358
1279
|
}
|
|
1359
|
-
}),
|
|
1280
|
+
}), js = /* @__PURE__ */ P(zs, [["__scopeId", "data-v-c14550b7"]]), Vs = { class: "link-value" }, Fs = ["href"], Hs = /* @__PURE__ */ I({
|
|
1360
1281
|
__name: "LinkValue",
|
|
1361
1282
|
props: {
|
|
1362
1283
|
item: {}
|
|
1363
1284
|
},
|
|
1364
1285
|
setup(l) {
|
|
1365
|
-
const i = l, n =
|
|
1366
|
-
const
|
|
1286
|
+
const i = l, n = O(() => {
|
|
1287
|
+
const t = String(i.item.value);
|
|
1367
1288
|
try {
|
|
1368
|
-
const s = new URL(
|
|
1289
|
+
const s = new URL(t);
|
|
1369
1290
|
return s.hostname + s.pathname;
|
|
1370
1291
|
} catch {
|
|
1371
|
-
return
|
|
1292
|
+
return t;
|
|
1372
1293
|
}
|
|
1373
1294
|
});
|
|
1374
|
-
return (
|
|
1375
|
-
|
|
1376
|
-
href: String(
|
|
1295
|
+
return (t, s) => (a(), r("div", Vs, [
|
|
1296
|
+
e("a", {
|
|
1297
|
+
href: String(t.item.value),
|
|
1377
1298
|
target: "_blank",
|
|
1378
1299
|
rel: "noopener noreferrer",
|
|
1379
1300
|
class: "text-blue-600 hover:text-blue-800 underline text-sm"
|
|
1380
1301
|
}, [
|
|
1381
|
-
|
|
1382
|
-
s[0] || (s[0] =
|
|
1383
|
-
], 8,
|
|
1302
|
+
H(k(n.value) + " ", 1),
|
|
1303
|
+
s[0] || (s[0] = e("i", { class: "fas fa-external-link-alt ml-1 text-xs" }, null, -1))
|
|
1304
|
+
], 8, Fs)
|
|
1384
1305
|
]));
|
|
1385
1306
|
}
|
|
1386
|
-
}),
|
|
1307
|
+
}), As = /* @__PURE__ */ P(Hs, [["__scopeId", "data-v-e6eb07a6"]]), Ss = { class: "date-value" }, Es = { class: "text-sm text-gray-900" }, Os = /* @__PURE__ */ I({
|
|
1387
1308
|
__name: "DateValue",
|
|
1388
1309
|
props: {
|
|
1389
1310
|
item: {}
|
|
1390
1311
|
},
|
|
1391
1312
|
setup(l) {
|
|
1392
|
-
const i = l, n =
|
|
1393
|
-
const
|
|
1394
|
-
if (
|
|
1395
|
-
return
|
|
1313
|
+
const i = l, n = O(() => {
|
|
1314
|
+
const t = i.item.value;
|
|
1315
|
+
if (t instanceof Date)
|
|
1316
|
+
return t.toLocaleDateString("uk-UA", {
|
|
1396
1317
|
year: "numeric",
|
|
1397
1318
|
month: "long",
|
|
1398
1319
|
day: "numeric",
|
|
1399
1320
|
hour: "2-digit",
|
|
1400
1321
|
minute: "2-digit"
|
|
1401
1322
|
});
|
|
1402
|
-
if (typeof
|
|
1403
|
-
const s = new Date(
|
|
1323
|
+
if (typeof t == "string") {
|
|
1324
|
+
const s = new Date(t);
|
|
1404
1325
|
if (!isNaN(s.getTime()))
|
|
1405
1326
|
return s.toLocaleDateString("uk-UA", {
|
|
1406
1327
|
year: "numeric",
|
|
@@ -1410,22 +1331,22 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
|
|
|
1410
1331
|
minute: "2-digit"
|
|
1411
1332
|
});
|
|
1412
1333
|
}
|
|
1413
|
-
return String(
|
|
1334
|
+
return String(t);
|
|
1414
1335
|
});
|
|
1415
|
-
return (
|
|
1416
|
-
|
|
1336
|
+
return (t, s) => (a(), r("div", Ss, [
|
|
1337
|
+
e("span", Es, k(n.value), 1)
|
|
1417
1338
|
]));
|
|
1418
1339
|
}
|
|
1419
|
-
}),
|
|
1340
|
+
}), Bs = /* @__PURE__ */ P(Os, [["__scopeId", "data-v-b9600618"]]), Ns = { class: "status-value" }, Rs = {
|
|
1420
1341
|
key: 0,
|
|
1421
1342
|
class: "mr-1"
|
|
1422
|
-
},
|
|
1343
|
+
}, Us = /* @__PURE__ */ I({
|
|
1423
1344
|
__name: "StatusValue",
|
|
1424
1345
|
props: {
|
|
1425
1346
|
item: {}
|
|
1426
1347
|
},
|
|
1427
1348
|
setup(l) {
|
|
1428
|
-
const i = l, n =
|
|
1349
|
+
const i = l, n = O(() => {
|
|
1429
1350
|
switch (String(i.item.value).toLowerCase()) {
|
|
1430
1351
|
case "active":
|
|
1431
1352
|
case "активний":
|
|
@@ -1448,7 +1369,7 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
|
|
|
1448
1369
|
default:
|
|
1449
1370
|
return "bg-blue-100 text-blue-800";
|
|
1450
1371
|
}
|
|
1451
|
-
}),
|
|
1372
|
+
}), t = O(() => {
|
|
1452
1373
|
switch (String(i.item.value).toLowerCase()) {
|
|
1453
1374
|
case "active":
|
|
1454
1375
|
case "активний":
|
|
@@ -1472,50 +1393,50 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
|
|
|
1472
1393
|
return "fas fa-info-circle";
|
|
1473
1394
|
}
|
|
1474
1395
|
});
|
|
1475
|
-
return (s, f) => (
|
|
1476
|
-
|
|
1477
|
-
class:
|
|
1396
|
+
return (s, f) => (a(), r("div", Ns, [
|
|
1397
|
+
e("span", {
|
|
1398
|
+
class: D(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium", n.value])
|
|
1478
1399
|
}, [
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
class:
|
|
1400
|
+
t.value ? (a(), r("span", Rs, [
|
|
1401
|
+
e("i", {
|
|
1402
|
+
class: D(t.value)
|
|
1482
1403
|
}, null, 2)
|
|
1483
|
-
])) :
|
|
1484
|
-
|
|
1404
|
+
])) : $("", !0),
|
|
1405
|
+
H(" " + k(String(s.item.value)), 1)
|
|
1485
1406
|
], 2)
|
|
1486
1407
|
]));
|
|
1487
1408
|
}
|
|
1488
|
-
}),
|
|
1409
|
+
}), Ps = /* @__PURE__ */ P(Us, [["__scopeId", "data-v-c72e0b01"]]), Ws = { class: "custom-value" }, Gs = { class: "text-sm text-gray-900" }, qs = /* @__PURE__ */ I({
|
|
1489
1410
|
__name: "CustomValue",
|
|
1490
1411
|
props: {
|
|
1491
1412
|
item: {}
|
|
1492
1413
|
},
|
|
1493
1414
|
setup(l) {
|
|
1494
|
-
return (i, n) => (
|
|
1495
|
-
|
|
1415
|
+
return (i, n) => (a(), r("div", Ws, [
|
|
1416
|
+
G(i.$slots, "default", {
|
|
1496
1417
|
item: i.item,
|
|
1497
1418
|
value: i.item.value
|
|
1498
1419
|
}, () => [
|
|
1499
|
-
|
|
1420
|
+
e("span", Gs, k(String(i.item.value)), 1)
|
|
1500
1421
|
], !0)
|
|
1501
1422
|
]));
|
|
1502
1423
|
}
|
|
1503
|
-
}),
|
|
1424
|
+
}), Ks = /* @__PURE__ */ P(qs, [["__scopeId", "data-v-11a73810"]]), Zs = ["id"], Js = {
|
|
1504
1425
|
key: 0,
|
|
1505
1426
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
1506
|
-
},
|
|
1427
|
+
}, Xs = {
|
|
1507
1428
|
key: 1,
|
|
1508
1429
|
class: "overflow-x-auto"
|
|
1509
|
-
},
|
|
1430
|
+
}, Qs = { class: "min-w-full divide-y divide-gray-200" }, Ys = { class: "bg-white divide-y divide-gray-200" }, eo = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, to = { class: "flex items-center gap-2" }, so = ["title"], oo = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, no = {
|
|
1510
1431
|
key: 2,
|
|
1511
1432
|
class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"
|
|
1512
|
-
},
|
|
1433
|
+
}, io = { class: "flex items-start gap-3" }, ao = {
|
|
1513
1434
|
key: 0,
|
|
1514
1435
|
class: "flex-shrink-0"
|
|
1515
|
-
},
|
|
1436
|
+
}, lo = { class: "flex-1 min-w-0" }, ro = { class: "flex items-center gap-2 mb-2" }, co = { class: "text-sm font-medium text-gray-900" }, uo = ["title"], po = {
|
|
1516
1437
|
key: 3,
|
|
1517
1438
|
class: "overflow-x-auto"
|
|
1518
|
-
},
|
|
1439
|
+
}, mo = { class: "min-w-full divide-y divide-gray-200" }, go = { class: "bg-white divide-y divide-gray-200" }, ho = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, fo = { class: "flex items-center gap-2" }, vo = ["title"], yo = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, bo = /* @__PURE__ */ I({
|
|
1519
1440
|
__name: "DescriptionListWidget",
|
|
1520
1441
|
props: {
|
|
1521
1442
|
title: {},
|
|
@@ -1529,109 +1450,109 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
|
|
|
1529
1450
|
const i = (n) => {
|
|
1530
1451
|
switch (n.type) {
|
|
1531
1452
|
case "link":
|
|
1532
|
-
return
|
|
1453
|
+
return As;
|
|
1533
1454
|
case "date":
|
|
1534
|
-
return
|
|
1455
|
+
return Bs;
|
|
1535
1456
|
case "status":
|
|
1536
|
-
return
|
|
1457
|
+
return Ps;
|
|
1537
1458
|
case "custom":
|
|
1538
|
-
return
|
|
1459
|
+
return Ks;
|
|
1539
1460
|
default:
|
|
1540
|
-
return
|
|
1461
|
+
return js;
|
|
1541
1462
|
}
|
|
1542
1463
|
};
|
|
1543
|
-
return (n,
|
|
1544
|
-
class:
|
|
1464
|
+
return (n, t) => (a(), r("div", {
|
|
1465
|
+
class: D(["description-list-widget", n.className]),
|
|
1545
1466
|
id: n.id,
|
|
1546
|
-
style:
|
|
1467
|
+
style: R(n.style)
|
|
1547
1468
|
}, [
|
|
1548
|
-
n.title ? (
|
|
1549
|
-
n.view === "table" ? (
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
(
|
|
1469
|
+
n.title ? (a(), r("h3", Js, k(n.title), 1)) : $("", !0),
|
|
1470
|
+
n.view === "table" ? (a(), r("div", Xs, [
|
|
1471
|
+
e("table", Qs, [
|
|
1472
|
+
e("tbody", Ys, [
|
|
1473
|
+
(a(!0), r(A, null, S(n.items, (s) => (a(), r("tr", {
|
|
1553
1474
|
key: s.id || s.label
|
|
1554
1475
|
}, [
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
s.icon ? (
|
|
1476
|
+
e("td", eo, [
|
|
1477
|
+
e("div", to, [
|
|
1478
|
+
s.icon ? (a(), r("i", {
|
|
1558
1479
|
key: 0,
|
|
1559
|
-
class:
|
|
1560
|
-
}, null, 2)) :
|
|
1561
|
-
|
|
1562
|
-
s.tooltip ? (
|
|
1480
|
+
class: D([s.icon, "text-gray-500"])
|
|
1481
|
+
}, null, 2)) : $("", !0),
|
|
1482
|
+
H(" " + k(s.label) + " ", 1),
|
|
1483
|
+
s.tooltip ? (a(), r("span", {
|
|
1563
1484
|
key: 1,
|
|
1564
1485
|
class: "text-gray-400 cursor-help",
|
|
1565
1486
|
title: s.tooltip
|
|
1566
|
-
},
|
|
1567
|
-
|
|
1568
|
-
]), 8,
|
|
1487
|
+
}, t[0] || (t[0] = [
|
|
1488
|
+
e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
|
|
1489
|
+
]), 8, so)) : $("", !0)
|
|
1569
1490
|
])
|
|
1570
1491
|
]),
|
|
1571
|
-
|
|
1572
|
-
(
|
|
1492
|
+
e("td", oo, [
|
|
1493
|
+
(a(), j(N(i(s)), { item: s }, null, 8, ["item"]))
|
|
1573
1494
|
])
|
|
1574
1495
|
]))), 128))
|
|
1575
1496
|
])
|
|
1576
1497
|
])
|
|
1577
|
-
])) : n.view === "grid" ? (
|
|
1578
|
-
(
|
|
1498
|
+
])) : n.view === "grid" ? (a(), r("div", no, [
|
|
1499
|
+
(a(!0), r(A, null, S(n.items, (s) => (a(), r("div", {
|
|
1579
1500
|
key: s.id || s.label,
|
|
1580
1501
|
class: "description-item-card bg-white border border-gray-200 rounded-lg p-4"
|
|
1581
1502
|
}, [
|
|
1582
|
-
|
|
1583
|
-
s.icon ? (
|
|
1584
|
-
|
|
1585
|
-
class:
|
|
1503
|
+
e("div", io, [
|
|
1504
|
+
s.icon ? (a(), r("div", ao, [
|
|
1505
|
+
e("i", {
|
|
1506
|
+
class: D([s.icon, "text-gray-500 text-lg"])
|
|
1586
1507
|
}, null, 2)
|
|
1587
|
-
])) :
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
s.tooltip ? (
|
|
1508
|
+
])) : $("", !0),
|
|
1509
|
+
e("div", lo, [
|
|
1510
|
+
e("div", ro, [
|
|
1511
|
+
e("h4", co, k(s.label), 1),
|
|
1512
|
+
s.tooltip ? (a(), r("span", {
|
|
1592
1513
|
key: 0,
|
|
1593
1514
|
class: "text-gray-400 cursor-help",
|
|
1594
1515
|
title: s.tooltip
|
|
1595
|
-
},
|
|
1596
|
-
|
|
1597
|
-
]), 8,
|
|
1516
|
+
}, t[1] || (t[1] = [
|
|
1517
|
+
e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
|
|
1518
|
+
]), 8, uo)) : $("", !0)
|
|
1598
1519
|
]),
|
|
1599
|
-
(
|
|
1520
|
+
(a(), j(N(i(s)), { item: s }, null, 8, ["item"]))
|
|
1600
1521
|
])
|
|
1601
1522
|
])
|
|
1602
1523
|
]))), 128))
|
|
1603
|
-
])) : (
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
(
|
|
1524
|
+
])) : (a(), r("div", po, [
|
|
1525
|
+
e("table", mo, [
|
|
1526
|
+
e("tbody", go, [
|
|
1527
|
+
(a(!0), r(A, null, S(n.items, (s) => (a(), r("tr", {
|
|
1607
1528
|
key: s.id || s.label
|
|
1608
1529
|
}, [
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
s.icon ? (
|
|
1530
|
+
e("td", ho, [
|
|
1531
|
+
e("div", fo, [
|
|
1532
|
+
s.icon ? (a(), r("i", {
|
|
1612
1533
|
key: 0,
|
|
1613
|
-
class:
|
|
1614
|
-
}, null, 2)) :
|
|
1615
|
-
|
|
1616
|
-
s.tooltip ? (
|
|
1534
|
+
class: D([s.icon, "text-gray-500"])
|
|
1535
|
+
}, null, 2)) : $("", !0),
|
|
1536
|
+
H(" " + k(s.label) + " ", 1),
|
|
1537
|
+
s.tooltip ? (a(), r("span", {
|
|
1617
1538
|
key: 1,
|
|
1618
1539
|
class: "text-gray-400 cursor-help",
|
|
1619
1540
|
title: s.tooltip
|
|
1620
|
-
},
|
|
1621
|
-
|
|
1622
|
-
]), 8,
|
|
1541
|
+
}, t[2] || (t[2] = [
|
|
1542
|
+
e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
|
|
1543
|
+
]), 8, vo)) : $("", !0)
|
|
1623
1544
|
])
|
|
1624
1545
|
]),
|
|
1625
|
-
|
|
1626
|
-
(
|
|
1546
|
+
e("td", yo, [
|
|
1547
|
+
(a(), j(N(i(s)), { item: s }, null, 8, ["item"]))
|
|
1627
1548
|
])
|
|
1628
1549
|
]))), 128))
|
|
1629
1550
|
])
|
|
1630
1551
|
])
|
|
1631
1552
|
]))
|
|
1632
|
-
], 14,
|
|
1553
|
+
], 14, Zs));
|
|
1633
1554
|
}
|
|
1634
|
-
}),
|
|
1555
|
+
}), Ce = /* @__PURE__ */ P(bo, [["__scopeId", "data-v-36d43e50"]]), xo = {
|
|
1635
1556
|
draw: {
|
|
1636
1557
|
toolbar: {
|
|
1637
1558
|
actions: {
|
|
@@ -1739,7 +1660,7 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
|
|
|
1739
1660
|
}
|
|
1740
1661
|
}
|
|
1741
1662
|
};
|
|
1742
|
-
function
|
|
1663
|
+
function ko(l) {
|
|
1743
1664
|
return l ? l.type === "FeatureCollection" || l.type === "Feature" ? l : l.geom ? {
|
|
1744
1665
|
type: "Feature",
|
|
1745
1666
|
geometry: {
|
|
@@ -1753,17 +1674,20 @@ function zo(l) {
|
|
|
1753
1674
|
properties: {}
|
|
1754
1675
|
} : null : null;
|
|
1755
1676
|
}
|
|
1756
|
-
const
|
|
1677
|
+
const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
|
|
1757
1678
|
key: 1,
|
|
1758
1679
|
class: "bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"
|
|
1759
|
-
},
|
|
1680
|
+
}, $o = { class: "flex items-center justify-between p-2 border-b" }, Co = { class: "p-2 border-b" }, Mo = { class: "flex items-center" }, Lo = { class: "flex items-center" }, Do = { class: "flex items-center" }, To = { class: "p-2" }, Io = { class: "flex items-center" }, ae = /* @__PURE__ */ I({
|
|
1760
1681
|
__name: "MapWidget",
|
|
1761
1682
|
props: {
|
|
1762
|
-
|
|
1683
|
+
geom: {},
|
|
1684
|
+
id: {},
|
|
1685
|
+
className: {},
|
|
1686
|
+
style: {}
|
|
1763
1687
|
},
|
|
1764
1688
|
setup(l) {
|
|
1765
|
-
const i = l, n =
|
|
1766
|
-
let
|
|
1689
|
+
const i = l, n = M(null);
|
|
1690
|
+
let t, s;
|
|
1767
1691
|
const f = {
|
|
1768
1692
|
topo100: {
|
|
1769
1693
|
url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"
|
|
@@ -1774,69 +1698,69 @@ const Fo = { class: "relative" }, Ao = {
|
|
|
1774
1698
|
osmb: {
|
|
1775
1699
|
url: "https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"
|
|
1776
1700
|
}
|
|
1777
|
-
},
|
|
1778
|
-
let
|
|
1779
|
-
const
|
|
1780
|
-
function
|
|
1781
|
-
return new Promise((
|
|
1782
|
-
if (window.L && window.L.Draw) return
|
|
1783
|
-
const
|
|
1784
|
-
if (Array.from(document.styleSheets).some((
|
|
1785
|
-
const
|
|
1786
|
-
|
|
1787
|
-
},
|
|
1788
|
-
const
|
|
1789
|
-
if (
|
|
1790
|
-
|
|
1701
|
+
}, o = M("topo100");
|
|
1702
|
+
let m;
|
|
1703
|
+
const v = M(!0), g = M(!1);
|
|
1704
|
+
function d() {
|
|
1705
|
+
return new Promise((V, c) => {
|
|
1706
|
+
if (window.L && window.L.Draw) return V(0);
|
|
1707
|
+
const h = (C) => {
|
|
1708
|
+
if (Array.from(document.styleSheets).some((E) => E?.href?.includes(C))) return;
|
|
1709
|
+
const u = document.createElement("link");
|
|
1710
|
+
u.rel = "stylesheet", u.href = C, document.head.appendChild(u);
|
|
1711
|
+
}, F = (C) => new Promise((x, u) => {
|
|
1712
|
+
const E = Array.from(document.scripts).find((z) => z.src === C);
|
|
1713
|
+
if (E) {
|
|
1714
|
+
E.addEventListener("load", () => x()), E.addEventListener("error", (z) => u(z));
|
|
1791
1715
|
return;
|
|
1792
1716
|
}
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1717
|
+
const B = document.createElement("script");
|
|
1718
|
+
B.src = C, B.async = !0, B.onload = () => x(), B.onerror = (z) => u(z), document.body.appendChild(B);
|
|
1795
1719
|
});
|
|
1796
|
-
|
|
1720
|
+
h("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), h("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), F("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => F("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => V(0)).catch(c);
|
|
1797
1721
|
});
|
|
1798
1722
|
}
|
|
1799
|
-
|
|
1800
|
-
await
|
|
1801
|
-
const
|
|
1802
|
-
if (
|
|
1803
|
-
const
|
|
1804
|
-
L.geoJSON(
|
|
1723
|
+
re(async () => {
|
|
1724
|
+
await d(), L.drawLocal = xo, t = L.map(n.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(t), m = L.tileLayer(f.topo100.url, { maxZoom: 19 }).addTo(t), o.value = "topo100", s = new L.FeatureGroup().addTo(t);
|
|
1725
|
+
const V = ko(i.geom);
|
|
1726
|
+
if (V) {
|
|
1727
|
+
const c = [];
|
|
1728
|
+
L.geoJSON(V).eachLayer((h) => c.push(h)), c.length && s.addLayer(c[0]), s.toGeoJSON(), y();
|
|
1805
1729
|
}
|
|
1806
1730
|
});
|
|
1807
|
-
function
|
|
1808
|
-
const
|
|
1809
|
-
if (!
|
|
1810
|
-
const
|
|
1811
|
-
|
|
1731
|
+
function y(V = 30) {
|
|
1732
|
+
const c = s.getLayers();
|
|
1733
|
+
if (!c.length) return;
|
|
1734
|
+
const F = L.featureGroup(c).getBounds();
|
|
1735
|
+
F && F.isValid() && t.fitBounds(F, { padding: [V, V] });
|
|
1812
1736
|
}
|
|
1813
|
-
function
|
|
1814
|
-
|
|
1815
|
-
const
|
|
1816
|
-
|
|
1737
|
+
function p(V) {
|
|
1738
|
+
m && m.removeFrom(t);
|
|
1739
|
+
const c = f[V];
|
|
1740
|
+
m = L.tileLayer(c.url, c.options || {}).addTo(t), o.value = V;
|
|
1817
1741
|
}
|
|
1818
|
-
function
|
|
1819
|
-
|
|
1742
|
+
function b() {
|
|
1743
|
+
p(o.value);
|
|
1820
1744
|
}
|
|
1821
|
-
function
|
|
1822
|
-
s && (
|
|
1745
|
+
function W() {
|
|
1746
|
+
s && (v.value ? s.addTo(t) : s.removeFrom(t));
|
|
1823
1747
|
}
|
|
1824
|
-
return (
|
|
1825
|
-
|
|
1748
|
+
return (V, c) => (a(), r("div", _o, [
|
|
1749
|
+
e("div", {
|
|
1826
1750
|
ref_key: "mapContainer",
|
|
1827
1751
|
ref: n,
|
|
1828
|
-
class: "w-full h-
|
|
1752
|
+
class: "w-full h-full"
|
|
1829
1753
|
}, null, 512),
|
|
1830
|
-
|
|
1754
|
+
g.value ? $("", !0) : (a(), r("div", {
|
|
1831
1755
|
key: 0,
|
|
1832
|
-
onClick:
|
|
1756
|
+
onClick: c[0] || (c[0] = (h) => g.value = !0),
|
|
1833
1757
|
class: "z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer"
|
|
1834
1758
|
}, " Шари ")),
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
(
|
|
1839
|
-
onClick:
|
|
1759
|
+
g.value ? (a(), r("div", wo, [
|
|
1760
|
+
e("div", $o, [
|
|
1761
|
+
c[7] || (c[7] = e("div", null, "Шари", -1)),
|
|
1762
|
+
(a(), r("svg", {
|
|
1763
|
+
onClick: c[1] || (c[1] = (h) => g.value = !1),
|
|
1840
1764
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1841
1765
|
viewBox: "0 0 24 24",
|
|
1842
1766
|
fill: "none",
|
|
@@ -1845,89 +1769,254 @@ const Fo = { class: "relative" }, Ao = {
|
|
|
1845
1769
|
"stroke-linecap": "round",
|
|
1846
1770
|
"stroke-linejoin": "round",
|
|
1847
1771
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"
|
|
1848
|
-
},
|
|
1849
|
-
|
|
1772
|
+
}, c[6] || (c[6] = [
|
|
1773
|
+
e("path", {
|
|
1850
1774
|
stroke: "none",
|
|
1851
1775
|
d: "M0 0h24v24H0z",
|
|
1852
1776
|
fill: "none"
|
|
1853
1777
|
}, null, -1),
|
|
1854
|
-
|
|
1855
|
-
|
|
1778
|
+
e("path", { d: "M18 6l-12 12" }, null, -1),
|
|
1779
|
+
e("path", { d: "M6 6l12 12" }, null, -1)
|
|
1856
1780
|
])))
|
|
1857
1781
|
]),
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1782
|
+
e("div", Co, [
|
|
1783
|
+
e("div", null, [
|
|
1784
|
+
e("label", Mo, [
|
|
1785
|
+
U(e("input", {
|
|
1862
1786
|
type: "radio",
|
|
1863
1787
|
name: "base-layer",
|
|
1864
1788
|
value: "topo100",
|
|
1865
|
-
"onUpdate:modelValue":
|
|
1866
|
-
onChange:
|
|
1789
|
+
"onUpdate:modelValue": c[2] || (c[2] = (h) => o.value = h),
|
|
1790
|
+
onChange: b
|
|
1867
1791
|
}, null, 544), [
|
|
1868
|
-
[Q,
|
|
1792
|
+
[Q, o.value]
|
|
1869
1793
|
]),
|
|
1870
|
-
|
|
1794
|
+
c[8] || (c[8] = e("span", { class: "ml-2" }, "Карта України", -1))
|
|
1871
1795
|
])
|
|
1872
1796
|
]),
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1797
|
+
e("div", null, [
|
|
1798
|
+
e("label", Lo, [
|
|
1799
|
+
U(e("input", {
|
|
1876
1800
|
type: "radio",
|
|
1877
1801
|
name: "base-layer",
|
|
1878
1802
|
value: "orto10",
|
|
1879
|
-
"onUpdate:modelValue":
|
|
1880
|
-
onChange:
|
|
1803
|
+
"onUpdate:modelValue": c[3] || (c[3] = (h) => o.value = h),
|
|
1804
|
+
onChange: b
|
|
1881
1805
|
}, null, 544), [
|
|
1882
|
-
[Q,
|
|
1806
|
+
[Q, o.value]
|
|
1883
1807
|
]),
|
|
1884
|
-
|
|
1808
|
+
c[9] || (c[9] = e("span", { class: "ml-2" }, "Ortophoto 1:10К", -1))
|
|
1885
1809
|
])
|
|
1886
1810
|
]),
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1811
|
+
e("div", null, [
|
|
1812
|
+
e("label", Do, [
|
|
1813
|
+
U(e("input", {
|
|
1890
1814
|
type: "radio",
|
|
1891
1815
|
name: "base-layer",
|
|
1892
1816
|
value: "osmb",
|
|
1893
|
-
"onUpdate:modelValue":
|
|
1894
|
-
onChange:
|
|
1817
|
+
"onUpdate:modelValue": c[4] || (c[4] = (h) => o.value = h),
|
|
1818
|
+
onChange: b
|
|
1895
1819
|
}, null, 544), [
|
|
1896
|
-
[Q,
|
|
1820
|
+
[Q, o.value]
|
|
1897
1821
|
]),
|
|
1898
|
-
|
|
1822
|
+
c[10] || (c[10] = e("span", { class: "ml-2" }, "Open Street Map", -1))
|
|
1899
1823
|
])
|
|
1900
1824
|
])
|
|
1901
1825
|
]),
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1826
|
+
e("div", To, [
|
|
1827
|
+
e("label", Io, [
|
|
1828
|
+
U(e("input", {
|
|
1905
1829
|
type: "checkbox",
|
|
1906
|
-
"onUpdate:modelValue":
|
|
1907
|
-
onChange:
|
|
1830
|
+
"onUpdate:modelValue": c[5] || (c[5] = (h) => v.value = h),
|
|
1831
|
+
onChange: W
|
|
1908
1832
|
}, null, 544), [
|
|
1909
|
-
[
|
|
1833
|
+
[Te, v.value]
|
|
1910
1834
|
]),
|
|
1911
|
-
|
|
1835
|
+
c[11] || (c[11] = e("span", { class: "ml-2" }, " Показати геометрію ", -1))
|
|
1912
1836
|
])
|
|
1913
1837
|
])
|
|
1914
|
-
])) :
|
|
1838
|
+
])) : $("", !0)
|
|
1915
1839
|
]));
|
|
1916
1840
|
}
|
|
1917
|
-
}),
|
|
1918
|
-
|
|
1919
|
-
|
|
1841
|
+
}), zo = {
|
|
1842
|
+
"vs-widget-map": ae,
|
|
1843
|
+
"vs-widget-comments": se,
|
|
1844
|
+
"vs-widget-history": oe,
|
|
1845
|
+
"vs-widget-gallery": ie,
|
|
1846
|
+
"vs-widget-file": ne,
|
|
1847
|
+
"vs-widget-list": Ce
|
|
1848
|
+
}, jo = {
|
|
1849
|
+
key: 0,
|
|
1850
|
+
class: "overflow-hidden"
|
|
1851
|
+
}, Vo = { class: "flex border-b border-gray-200 bg-gray-50" }, Fo = ["onClick"], Ho = { class: "p-1" }, Ao = ["innerHTML"], So = {
|
|
1852
|
+
key: 1,
|
|
1853
|
+
class: "p-1"
|
|
1854
|
+
}, Eo = { class: "grid grid-cols-12 gap-4" }, Oo = {
|
|
1855
|
+
key: 0,
|
|
1856
|
+
class: "mb-4 pb-2 border-b border-gray-200"
|
|
1857
|
+
}, Bo = { class: "text-lg font-semibold text-gray-900" }, No = ["innerHTML"], ve = /* @__PURE__ */ I({
|
|
1858
|
+
__name: "Card",
|
|
1859
|
+
props: {
|
|
1860
|
+
panels: { default: () => [] },
|
|
1861
|
+
data: { default: () => ({}) },
|
|
1862
|
+
view: { default: "plain" },
|
|
1863
|
+
classWrapper: { default: "" },
|
|
1864
|
+
classPanel: {},
|
|
1865
|
+
normalizeTabs: { type: Boolean, default: !1 },
|
|
1866
|
+
id: {},
|
|
1867
|
+
className: {},
|
|
1868
|
+
style: {}
|
|
1869
|
+
},
|
|
1870
|
+
setup(l) {
|
|
1871
|
+
const i = l, n = M(0);
|
|
1872
|
+
function t(d) {
|
|
1873
|
+
return zo[d] || d;
|
|
1874
|
+
}
|
|
1875
|
+
function s(d) {
|
|
1876
|
+
const y = [];
|
|
1877
|
+
for (const p of d) {
|
|
1878
|
+
if (!p?.items) {
|
|
1879
|
+
y.push(p);
|
|
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;
|
|
1891
|
+
}
|
|
1892
|
+
const f = O(() => i.panels && i.panels.length > 0 ? i.normalizeTabs ? s(i.panels) : i.panels : i.data && Array.isArray(i.data) ? i.data.filter((y) => y.type === "tabs")[0]?.items || [] : []), o = O(() => i.panels && i.panels.length > 0 ? i.normalizeTabs ? s(i.panels) : i.panels : i.data && Array.isArray(i.data) ? i.data : []), m = O(() => ({
|
|
1893
|
+
[`view-${i.view}`]: !0
|
|
1894
|
+
})), v = (d) => {
|
|
1895
|
+
const y = i.data ? { ...i.data } : {};
|
|
1896
|
+
return d.count && (y.count = d.count), d.col && (y.col = d.col), y;
|
|
1897
|
+
}, g = (d) => d.width ? {
|
|
1898
|
+
gridColumn: `span ${d.width}`
|
|
1899
|
+
} : {};
|
|
1900
|
+
return (d, y) => (a(), r("div", {
|
|
1901
|
+
class: D(m.value + d.classWrapper)
|
|
1902
|
+
}, [
|
|
1903
|
+
d.view === "tab" ? (a(), r("div", jo, [
|
|
1904
|
+
e("div", Vo, [
|
|
1905
|
+
(a(!0), r(A, null, S(f.value, (p, b) => (a(), r("button", {
|
|
1906
|
+
key: p.name || b,
|
|
1907
|
+
onClick: (W) => n.value = b,
|
|
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
|
+
])
|
|
1921
|
+
}, [
|
|
1922
|
+
p.html ? (a(), r("div", {
|
|
1923
|
+
key: 0,
|
|
1924
|
+
innerHTML: p.html,
|
|
1925
|
+
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"
|
|
1926
|
+
}, null, 8, Ao)) : d.$slots[`tab-${b}`] ? G(d.$slots, `tab-${b}`, {
|
|
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", {
|
|
1956
|
+
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
|
+
ref_for: !0
|
|
1966
|
+
}, p.component === "Card" ? p : v(p), { class: "w-full h-full" }), null, 16)) : G(d.$slots, p.slot || `panel-${b}`, {
|
|
1967
|
+
key: 4,
|
|
1968
|
+
item: p,
|
|
1969
|
+
data: d.data
|
|
1970
|
+
})
|
|
1971
|
+
], 6))), 128))
|
|
1972
|
+
])
|
|
1973
|
+
]))
|
|
1974
|
+
], 2));
|
|
1975
|
+
}
|
|
1976
|
+
}), Ro = ["innerHTML"], Uo = /* @__PURE__ */ I({
|
|
1977
|
+
__name: "CardItem",
|
|
1978
|
+
props: {
|
|
1979
|
+
name: {},
|
|
1980
|
+
label: {},
|
|
1981
|
+
component: {},
|
|
1982
|
+
slot: {},
|
|
1983
|
+
col: { default: 12 },
|
|
1984
|
+
html: {},
|
|
1985
|
+
title: {},
|
|
1986
|
+
id: {},
|
|
1987
|
+
className: {},
|
|
1988
|
+
style: {}
|
|
1989
|
+
},
|
|
1990
|
+
setup(l) {
|
|
1991
|
+
const i = l, n = O(() => ({
|
|
1992
|
+
[`col-span-${i.col}`]: !0
|
|
1993
|
+
})), t = O(() => {
|
|
1994
|
+
const s = {};
|
|
1995
|
+
return s.col && (s.col = s.col), s;
|
|
1996
|
+
});
|
|
1997
|
+
return (s, f) => (a(), r("div", {
|
|
1998
|
+
class: D(["w-full", n.value])
|
|
1999
|
+
}, [
|
|
2000
|
+
s.html ? (a(), r("div", {
|
|
2001
|
+
key: 0,
|
|
2002
|
+
innerHTML: s.html,
|
|
2003
|
+
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"
|
|
2004
|
+
}, null, 8, Ro)) : s.component ? (a(), j(N(s.component), te({ key: 1 }, t.value, { class: "w-full" }), null, 16)) : G(s.$slots, "default", { key: 2 })
|
|
2005
|
+
], 2));
|
|
1920
2006
|
}
|
|
2007
|
+
});
|
|
2008
|
+
ve.install = function(l) {
|
|
2009
|
+
l.component("vs-widget-file", ne), l.component("vs-widget-comments", se), l.component("vs-widget-history", oe), l.component("vs-widget-gallery", ie), l.component("vs-widget-map", ae), l.component("CommentsWidget", se), l.component("HistoryWidget", oe), l.component("GalleryWidget", ie), l.component("FilesWidget", ne), l.component("MapWidget", ae), l.component("Card", ve), l.component("CardItem", Uo), l.component("DescriptionListWidget", Ce), l.component("CopyNotification", $e);
|
|
1921
2010
|
};
|
|
1922
2011
|
export {
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
2012
|
+
ve as Card,
|
|
2013
|
+
Uo as CardItem,
|
|
2014
|
+
se as CommentsWidget,
|
|
2015
|
+
$e as CopyNotification,
|
|
2016
|
+
Ce as DescriptionListWidget,
|
|
2017
|
+
ne as FilesWidget,
|
|
2018
|
+
ie as GalleryWidget,
|
|
2019
|
+
oe as HistoryWidget,
|
|
2020
|
+
ae as MapWidget,
|
|
2021
|
+
ve as default
|
|
1933
2022
|
};
|