@opengis/widgets 0.0.15 → 0.0.16
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/index.js +831 -809
- package/dist/index.umd.cjs +26 -26
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/widgets/card/CardItem.vue.d.ts.map +1 -1
- package/dist/widgets/map/MapWidget.vue.d.ts +6 -1
- package/dist/widgets/map/MapWidget.vue.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { h as
|
|
1
|
+
import { h as ne, defineComponent as j, mergeModels as ee, useModel as ce, ref as $, createElementBlock as a, openBlock as s, createElementVNode as t, createVNode as M, unref as C, withDirectives as P, vModelText as xe, createCommentVNode as k, createTextVNode as E, onMounted as ue, onUnmounted as ke, resolveComponent as te, normalizeClass as D, createBlock as z, toDisplayString as _, Fragment as I, renderList as H, normalizeStyle as Q, resolveDynamicComponent as N, withModifiers as R, computed as S, renderSlot as q, vModelRadio as se, vModelCheckbox as he, getCurrentInstance as Ve, createStaticVNode as Ae, mergeProps as X, vShow as ze, Teleport as He, TransitionGroup as Ee, withCtx as Fe } 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 fe = (r) => r.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Se = (r) => r.replace(
|
|
9
9
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
10
|
-
(
|
|
11
|
-
),
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
},
|
|
10
|
+
(i, o, e) => e ? e.toUpperCase() : o.toLowerCase()
|
|
11
|
+
), Oe = (r) => {
|
|
12
|
+
const i = Se(r);
|
|
13
|
+
return i.charAt(0).toUpperCase() + i.slice(1);
|
|
14
|
+
}, Be = (...r) => r.filter((i, o, e) => !!i && i.trim() !== "" && e.indexOf(i) === o).join(" ").trim();
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
|
-
var
|
|
21
|
+
var Y = {
|
|
22
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23
23
|
width: 24,
|
|
24
24
|
height: 24,
|
|
@@ -35,21 +35,21 @@ var J = {
|
|
|
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 Ne = ({ size: r, strokeWidth: i = 2, absoluteStrokeWidth: o, color: e, iconNode: n, name: b, class: l, ...v }, { slots: u }) => ne(
|
|
39
39
|
"svg",
|
|
40
40
|
{
|
|
41
|
-
...
|
|
42
|
-
width:
|
|
43
|
-
height:
|
|
44
|
-
stroke: e ||
|
|
45
|
-
"stroke-width": o ? Number(
|
|
46
|
-
class:
|
|
41
|
+
...Y,
|
|
42
|
+
width: r || Y.width,
|
|
43
|
+
height: r || Y.height,
|
|
44
|
+
stroke: e || Y.stroke,
|
|
45
|
+
"stroke-width": o ? Number(i) * 24 / Number(r) : i,
|
|
46
|
+
class: Be(
|
|
47
47
|
"lucide",
|
|
48
|
-
...
|
|
48
|
+
...b ? [`lucide-${fe(Oe(b))}-icon`, `lucide-${fe(b)}`] : ["lucide-icon"]
|
|
49
49
|
),
|
|
50
|
-
...
|
|
50
|
+
...v
|
|
51
51
|
},
|
|
52
|
-
[...n.map((p) =>
|
|
52
|
+
[...n.map((p) => ne(...p)), ...u.default ? [u.default()] : []]
|
|
53
53
|
);
|
|
54
54
|
/**
|
|
55
55
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
@@ -57,12 +57,12 @@ const Se = ({ size: a, strokeWidth: l = 2, absoluteStrokeWidth: o, 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 V = (
|
|
61
|
-
|
|
60
|
+
const V = (r, i) => (o, { slots: e }) => ne(
|
|
61
|
+
Ne,
|
|
62
62
|
{
|
|
63
63
|
...o,
|
|
64
|
-
iconNode:
|
|
65
|
-
name:
|
|
64
|
+
iconNode: i,
|
|
65
|
+
name: r
|
|
66
66
|
},
|
|
67
67
|
e
|
|
68
68
|
);
|
|
@@ -72,7 +72,7 @@ const V = (a, l) => (o, { slots: e }) => te(
|
|
|
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 Pe = V("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 Ne = V("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 Ue = V("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 Oe = V("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 Re = V("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 Be = V("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 _e = V("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 ve = V("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 We = V("ellipsis", [
|
|
118
118
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
119
119
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
120
120
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
@@ -138,7 +138,7 @@ const G = V("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 qe = V("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 Re = V("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 Ge = V("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 Ue = V("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 Ke = V("heart", [
|
|
165
165
|
[
|
|
166
166
|
"path",
|
|
167
167
|
{
|
|
@@ -176,7 +176,7 @@ const We = V("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 Ze = V("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 qe = V("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 ye = V("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 me = V("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 Je = V("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 Ge = V("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 we = V("plus", [
|
|
216
216
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
217
217
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
218
218
|
]);
|
|
@@ -222,7 +222,7 @@ const be = V("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 Xe = V("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 Ke = V("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 $e = V("send", [
|
|
236
236
|
[
|
|
237
237
|
"path",
|
|
238
238
|
{
|
|
@@ -248,7 +248,7 @@ const xe = V("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 Qe = V("sheet", [
|
|
252
252
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
253
253
|
["line", { x1: "3", x2: "21", y1: "9", y2: "9", key: "1vqk6q" }],
|
|
254
254
|
["line", { x1: "3", x2: "21", y1: "15", y2: "15", key: "o2sbyz" }],
|
|
@@ -261,7 +261,7 @@ const Ze = V("sheet", [
|
|
|
261
261
|
* This source code is licensed under the ISC license.
|
|
262
262
|
* See the LICENSE file in the root directory of this source tree.
|
|
263
263
|
*/
|
|
264
|
-
const
|
|
264
|
+
const Ye = V("square-pen", [
|
|
265
265
|
["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" }],
|
|
266
266
|
[
|
|
267
267
|
"path",
|
|
@@ -277,7 +277,7 @@ const Je = V("square-pen", [
|
|
|
277
277
|
* This source code is licensed under the ISC license.
|
|
278
278
|
* See the LICENSE file in the root directory of this source tree.
|
|
279
279
|
*/
|
|
280
|
-
const
|
|
280
|
+
const pe = V("trash-2", [
|
|
281
281
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
282
282
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
283
283
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
@@ -290,7 +290,7 @@ const de = V("trash-2", [
|
|
|
290
290
|
* This source code is licensed under the ISC license.
|
|
291
291
|
* See the LICENSE file in the root directory of this source tree.
|
|
292
292
|
*/
|
|
293
|
-
const
|
|
293
|
+
const et = V("user-check", [
|
|
294
294
|
["path", { d: "m16 11 2 2 4-4", key: "9rsbq5" }],
|
|
295
295
|
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
296
296
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
|
|
@@ -301,7 +301,7 @@ const Xe = V("user-check", [
|
|
|
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 me = V("user", [
|
|
305
305
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
306
306
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
307
307
|
]);
|
|
@@ -311,7 +311,7 @@ const ce = V("user", [
|
|
|
311
311
|
* This source code is licensed under the ISC license.
|
|
312
312
|
* See the LICENSE file in the root directory of this source tree.
|
|
313
313
|
*/
|
|
314
|
-
const
|
|
314
|
+
const tt = V("video", [
|
|
315
315
|
[
|
|
316
316
|
"path",
|
|
317
317
|
{
|
|
@@ -327,234 +327,234 @@ const Qe = V("video", [
|
|
|
327
327
|
* This source code is licensed under the ISC license.
|
|
328
328
|
* See the LICENSE file in the root directory of this source tree.
|
|
329
329
|
*/
|
|
330
|
-
const
|
|
330
|
+
const ge = V("x", [
|
|
331
331
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
332
332
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
333
|
-
]),
|
|
333
|
+
]), st = { class: "border-t pt-3 mt-4" }, ot = { class: "flex gap-2" }, nt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, it = { class: "flex-1 space-y-2" }, lt = { class: "flex justify-between items-center" }, at = { class: "flex gap-2" }, rt = ["disabled"], Ce = /* @__PURE__ */ j({
|
|
334
334
|
__name: "CommentInputZone",
|
|
335
335
|
props: {
|
|
336
336
|
isReply: { type: Boolean, required: !1, default: !1 },
|
|
337
337
|
isReplyModifiers: {}
|
|
338
338
|
},
|
|
339
|
-
emits: /* @__PURE__ */
|
|
340
|
-
setup(
|
|
341
|
-
const o =
|
|
339
|
+
emits: /* @__PURE__ */ ee(["sendComment"], ["update:isReply"]),
|
|
340
|
+
setup(r, { emit: i }) {
|
|
341
|
+
const o = ce(r, "isReply"), e = $(""), n = i, b = () => {
|
|
342
342
|
e.value.trim() && (n("sendComment", e.value), e.value = "");
|
|
343
|
-
},
|
|
344
|
-
(
|
|
343
|
+
}, l = (v) => {
|
|
344
|
+
(v.ctrlKey || v.metaKey) && v.key === "Enter" && (v.preventDefault(), b());
|
|
345
345
|
};
|
|
346
|
-
return (
|
|
347
|
-
t("div",
|
|
348
|
-
t("span",
|
|
349
|
-
M(
|
|
346
|
+
return (v, u) => (s(), a("div", st, [
|
|
347
|
+
t("div", ot, [
|
|
348
|
+
t("span", nt, [
|
|
349
|
+
M(C(me), { class: "h-3 w-3 text-gray-500" })
|
|
350
350
|
]),
|
|
351
|
-
t("div",
|
|
352
|
-
|
|
353
|
-
"onUpdate:modelValue":
|
|
354
|
-
onKeydown:
|
|
351
|
+
t("div", it, [
|
|
352
|
+
P(t("textarea", {
|
|
353
|
+
"onUpdate:modelValue": u[0] || (u[0] = (p) => e.value = p),
|
|
354
|
+
onKeydown: l,
|
|
355
355
|
placeholder: "Add a comment...",
|
|
356
356
|
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"
|
|
357
357
|
}, null, 544), [
|
|
358
|
-
[
|
|
358
|
+
[xe, e.value]
|
|
359
359
|
]),
|
|
360
|
-
t("div",
|
|
361
|
-
|
|
362
|
-
t("div",
|
|
363
|
-
o.value ? (s(),
|
|
360
|
+
t("div", lt, [
|
|
361
|
+
u[4] || (u[4] = t("span", { class: "text-xs text-gray-500 hidden sm:inline" }, "Cmd+Enter to send", -1)),
|
|
362
|
+
t("div", at, [
|
|
363
|
+
o.value ? (s(), a("button", {
|
|
364
364
|
key: 0,
|
|
365
365
|
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",
|
|
366
|
-
onClick:
|
|
366
|
+
onClick: u[1] || (u[1] = (p) => o.value = !1)
|
|
367
367
|
}, [
|
|
368
|
-
M(
|
|
369
|
-
|
|
370
|
-
])) :
|
|
368
|
+
M(C(ge), { class: "h-3 w-3" }),
|
|
369
|
+
u[2] || (u[2] = E(" Cancel ", -1))
|
|
370
|
+
])) : k("", !0),
|
|
371
371
|
t("button", {
|
|
372
372
|
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",
|
|
373
373
|
disabled: !e.value.trim(),
|
|
374
|
-
onClick:
|
|
374
|
+
onClick: b
|
|
375
375
|
}, [
|
|
376
|
-
M(
|
|
377
|
-
|
|
378
|
-
], 8,
|
|
376
|
+
M(C($e), { class: "h-3 w-3 mr-1" }),
|
|
377
|
+
u[3] || (u[3] = E(" Send ", -1))
|
|
378
|
+
], 8, rt)
|
|
379
379
|
])
|
|
380
380
|
])
|
|
381
381
|
])
|
|
382
382
|
])
|
|
383
383
|
]));
|
|
384
384
|
}
|
|
385
|
-
}),
|
|
385
|
+
}), dt = { 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" }, ct = /* @__PURE__ */ j({
|
|
386
386
|
__name: "CommentDetails",
|
|
387
387
|
props: {
|
|
388
388
|
showMoreOptions: { type: Boolean, required: !0, default: !1 },
|
|
389
389
|
showMoreOptionsModifiers: {}
|
|
390
390
|
},
|
|
391
|
-
emits: /* @__PURE__ */
|
|
392
|
-
setup(
|
|
393
|
-
const o =
|
|
394
|
-
e.value && n.value && !n.value.contains(p.target) && !
|
|
395
|
-
}, y = () => {
|
|
396
|
-
e.value = !1, o("edit");
|
|
391
|
+
emits: /* @__PURE__ */ ee(["edit", "delete"], ["update:showMoreOptions"]),
|
|
392
|
+
setup(r, { emit: i }) {
|
|
393
|
+
const o = i, e = ce(r, "showMoreOptions"), n = $(), b = $(!0), l = async (p) => {
|
|
394
|
+
e.value && n.value && !n.value.contains(p.target) && !b.value && (e.value = !1), b.value = !1;
|
|
397
395
|
}, v = () => {
|
|
396
|
+
e.value = !1, o("edit");
|
|
397
|
+
}, u = () => {
|
|
398
398
|
e.value = !1, o("delete");
|
|
399
399
|
};
|
|
400
|
-
return
|
|
401
|
-
document.addEventListener("click",
|
|
402
|
-
}),
|
|
403
|
-
document.removeEventListener("click",
|
|
404
|
-
}), (p,
|
|
400
|
+
return ue(() => {
|
|
401
|
+
document.addEventListener("click", l);
|
|
402
|
+
}), ke(() => {
|
|
403
|
+
document.removeEventListener("click", l);
|
|
404
|
+
}), (p, d) => (s(), a("div", {
|
|
405
405
|
class: "absolute bg-white left-0 top-full transform min-w-max z-50",
|
|
406
406
|
ref_key: "moreOptionsRef",
|
|
407
407
|
ref: n
|
|
408
408
|
}, [
|
|
409
|
-
t("div",
|
|
409
|
+
t("div", dt, [
|
|
410
410
|
t("div", {
|
|
411
411
|
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",
|
|
412
|
-
onClick:
|
|
412
|
+
onClick: v
|
|
413
413
|
}, [
|
|
414
|
-
M(
|
|
415
|
-
|
|
414
|
+
M(C(Ye), { class: "h-3 w-3 mr-2" }),
|
|
415
|
+
d[0] || (d[0] = E(" Edit ", -1))
|
|
416
416
|
]),
|
|
417
417
|
t("div", {
|
|
418
418
|
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",
|
|
419
|
-
onClick:
|
|
419
|
+
onClick: u
|
|
420
420
|
}, [
|
|
421
|
-
M(
|
|
422
|
-
|
|
421
|
+
M(C(pe), { class: "h-3 w-3 mr-2" }),
|
|
422
|
+
d[1] || (d[1] = E(" Delete ", -1))
|
|
423
423
|
])
|
|
424
424
|
])
|
|
425
425
|
], 512));
|
|
426
426
|
}
|
|
427
|
-
}),
|
|
427
|
+
}), ut = { class: "space-y-2" }, pt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, mt = { class: "flex-1 min-w-0 space-y-1 relative" }, gt = { class: "flex items-center gap-2" }, ht = { class: "font-medium text-xs" }, ft = { class: "text-xs text-gray-500" }, yt = {
|
|
428
428
|
key: 0,
|
|
429
429
|
class: "text-xs text-gray-700 leading-relaxed"
|
|
430
|
-
},
|
|
430
|
+
}, vt = { class: "flex justify-between text-xs" }, bt = { class: "flex items-center gap-2" }, xt = {
|
|
431
431
|
key: 0,
|
|
432
432
|
class: "flex gap-2"
|
|
433
|
-
},
|
|
433
|
+
}, kt = ["disabled"], _t = {
|
|
434
434
|
key: 0,
|
|
435
435
|
class: "ml-8 space-y-1 border-l-2 border-gray-100 pl-3"
|
|
436
|
-
},
|
|
436
|
+
}, wt = /* @__PURE__ */ j({
|
|
437
437
|
__name: "CommentItem",
|
|
438
438
|
props: {
|
|
439
439
|
comment: {},
|
|
440
440
|
isInside: { type: Boolean }
|
|
441
441
|
},
|
|
442
442
|
emits: ["like", "reply", "edit", "delete"],
|
|
443
|
-
setup(
|
|
444
|
-
const o =
|
|
445
|
-
const
|
|
446
|
-
(
|
|
443
|
+
setup(r, { emit: i }) {
|
|
444
|
+
const o = i, e = r, n = $(e.comment.text), b = $("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"), l = $("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"), v = $(!1), u = $(!1), p = $(!1), d = $(!1), y = (x) => {
|
|
445
|
+
const h = /* @__PURE__ */ new Date(), w = Math.floor(
|
|
446
|
+
(h.getTime() - x.getTime()) / (1e3 * 60 * 60)
|
|
447
447
|
);
|
|
448
|
-
return
|
|
449
|
-
(
|
|
450
|
-
)}m` :
|
|
448
|
+
return w < 1 ? `${Math.floor(
|
|
449
|
+
(h.getTime() - x.getTime()) / 6e4
|
|
450
|
+
)}m` : w < 24 ? `${w}h` : `${Math.floor(w / 24)}d`;
|
|
451
451
|
}, m = () => {
|
|
452
|
-
|
|
453
|
-
},
|
|
452
|
+
d.value = !d.value, d.value ? o("like", e.comment.id, "add") : o("like", e.comment.id, "delete");
|
|
453
|
+
}, T = () => {
|
|
454
454
|
o("edit", e.comment.id, n.value), p.value = !1;
|
|
455
|
-
}, O = (
|
|
456
|
-
o("like",
|
|
457
|
-
},
|
|
458
|
-
o("edit",
|
|
455
|
+
}, O = (x, h) => {
|
|
456
|
+
o("like", x, h);
|
|
457
|
+
}, B = (x, h) => {
|
|
458
|
+
o("edit", x, h);
|
|
459
459
|
};
|
|
460
|
-
return (
|
|
461
|
-
const
|
|
462
|
-
return s(),
|
|
460
|
+
return (x, h) => {
|
|
461
|
+
const w = te("CommentItem", !0);
|
|
462
|
+
return s(), a("div", ut, [
|
|
463
463
|
t("div", {
|
|
464
464
|
class: D(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative", p.value ? "bg-gray-50" : ""])
|
|
465
465
|
}, [
|
|
466
|
-
t("span",
|
|
467
|
-
M(
|
|
466
|
+
t("span", pt, [
|
|
467
|
+
M(C(me), { class: "h-3 w-3 text-gray-500" })
|
|
468
468
|
]),
|
|
469
|
-
t("div",
|
|
470
|
-
t("div",
|
|
471
|
-
t("span",
|
|
472
|
-
t("span",
|
|
469
|
+
t("div", mt, [
|
|
470
|
+
t("div", gt, [
|
|
471
|
+
t("span", ht, _(x.comment?.author), 1),
|
|
472
|
+
t("span", ft, _(y(x.comment?.createdAt)), 1)
|
|
473
473
|
]),
|
|
474
|
-
p.value ?
|
|
474
|
+
p.value ? P((s(), a("textarea", {
|
|
475
475
|
key: 1,
|
|
476
|
-
"onUpdate:modelValue":
|
|
477
|
-
class: D(p.value ?
|
|
476
|
+
"onUpdate:modelValue": h[0] || (h[0] = (c) => n.value = c),
|
|
477
|
+
class: D(p.value ? l.value : b.value)
|
|
478
478
|
}, null, 2)), [
|
|
479
|
-
[
|
|
480
|
-
]) : (s(),
|
|
481
|
-
t("div",
|
|
482
|
-
t("div",
|
|
479
|
+
[xe, n.value]
|
|
480
|
+
]) : (s(), a("p", yt, _(x.comment?.text), 1)),
|
|
481
|
+
t("div", vt, [
|
|
482
|
+
t("div", bt, [
|
|
483
483
|
t("button", {
|
|
484
|
-
class: D(["flex items-center gap-1",
|
|
485
|
-
onClick:
|
|
484
|
+
class: D(["flex items-center gap-1", d.value ? "text-blue-600" : "text-gray-500 hover:text-blue-600 transition-colors"]),
|
|
485
|
+
onClick: h[1] || (h[1] = (c) => m())
|
|
486
486
|
}, [
|
|
487
|
-
M(
|
|
488
|
-
class: D(["h-3 w-3",
|
|
487
|
+
M(C(Ke), {
|
|
488
|
+
class: D(["h-3 w-3", d.value ? "fill-blue-600" : ""])
|
|
489
489
|
}, null, 8, ["class"]),
|
|
490
|
-
|
|
490
|
+
E(" " + _(x.comment?.likes), 1)
|
|
491
491
|
], 2),
|
|
492
|
-
|
|
492
|
+
x.isInside ? k("", !0) : (s(), a("button", {
|
|
493
493
|
key: 0,
|
|
494
494
|
class: "text-gray-500 hover:text-blue-600 transition-colors",
|
|
495
|
-
onClick:
|
|
495
|
+
onClick: h[2] || (h[2] = (c) => u.value = !0)
|
|
496
496
|
}, [
|
|
497
|
-
M(
|
|
497
|
+
M(C(Xe), { class: "h-3 w-3" })
|
|
498
498
|
])),
|
|
499
499
|
t("button", {
|
|
500
500
|
class: "text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",
|
|
501
501
|
type: "button",
|
|
502
|
-
onClick:
|
|
502
|
+
onClick: h[3] || (h[3] = (c) => v.value = !0)
|
|
503
503
|
}, [
|
|
504
|
-
M(
|
|
504
|
+
M(C(We), { class: "h-3 w-3" })
|
|
505
505
|
])
|
|
506
506
|
]),
|
|
507
|
-
p.value ? (s(),
|
|
507
|
+
p.value ? (s(), a("div", xt, [
|
|
508
508
|
t("button", {
|
|
509
509
|
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",
|
|
510
|
-
onClick:
|
|
510
|
+
onClick: h[4] || (h[4] = (c) => p.value = !1)
|
|
511
511
|
}, [
|
|
512
|
-
M(
|
|
513
|
-
|
|
512
|
+
M(C(ge), { class: "h-3 w-3" }),
|
|
513
|
+
h[11] || (h[11] = E(" Cancel ", -1))
|
|
514
514
|
]),
|
|
515
515
|
t("button", {
|
|
516
516
|
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",
|
|
517
517
|
disabled: !n.value.trim(),
|
|
518
|
-
onClick:
|
|
518
|
+
onClick: h[5] || (h[5] = (c) => T())
|
|
519
519
|
}, [
|
|
520
|
-
M(
|
|
521
|
-
|
|
522
|
-
], 8,
|
|
523
|
-
])) :
|
|
520
|
+
M(C($e), { class: "h-3 w-3 mr-1" }),
|
|
521
|
+
h[12] || (h[12] = E(" Send ", -1))
|
|
522
|
+
], 8, kt)
|
|
523
|
+
])) : k("", !0)
|
|
524
524
|
])
|
|
525
525
|
]),
|
|
526
|
-
|
|
526
|
+
v.value ? (s(), z(ct, {
|
|
527
527
|
key: 0,
|
|
528
|
-
showMoreOptions:
|
|
529
|
-
"onUpdate:showMoreOptions":
|
|
530
|
-
onEdit:
|
|
531
|
-
onDelete:
|
|
532
|
-
comment:
|
|
533
|
-
}, null, 8, ["showMoreOptions", "comment"])) :
|
|
528
|
+
showMoreOptions: v.value,
|
|
529
|
+
"onUpdate:showMoreOptions": h[6] || (h[6] = (c) => v.value = c),
|
|
530
|
+
onEdit: h[7] || (h[7] = (c) => p.value = !0),
|
|
531
|
+
onDelete: h[8] || (h[8] = (c) => x.$emit("delete", x.comment?.id)),
|
|
532
|
+
comment: x.comment
|
|
533
|
+
}, null, 8, ["showMoreOptions", "comment"])) : k("", !0)
|
|
534
534
|
], 2),
|
|
535
|
-
|
|
536
|
-
(s(!0),
|
|
537
|
-
key:
|
|
538
|
-
comment:
|
|
535
|
+
x.isInside ? k("", !0) : (s(), a("div", _t, [
|
|
536
|
+
(s(!0), a(I, null, H(x.comment?.replies, (c) => (s(), z(w, {
|
|
537
|
+
key: c.id,
|
|
538
|
+
comment: c,
|
|
539
539
|
isInside: !0,
|
|
540
|
-
onDelete: (
|
|
540
|
+
onDelete: (f) => x.$emit("delete", c.id),
|
|
541
541
|
onLike: O,
|
|
542
|
-
onEdit:
|
|
542
|
+
onEdit: B
|
|
543
543
|
}, null, 8, ["comment", "onDelete"]))), 128)),
|
|
544
|
-
|
|
544
|
+
u.value && !x.isInside ? (s(), z(Ce, {
|
|
545
545
|
key: 0,
|
|
546
|
-
onSendComment:
|
|
547
|
-
isReply:
|
|
548
|
-
"onUpdate:isReply":
|
|
549
|
-
}, null, 8, ["isReply"])) :
|
|
546
|
+
onSendComment: h[9] || (h[9] = (c) => x.$emit("reply", x.comment?.id, c)),
|
|
547
|
+
isReply: u.value,
|
|
548
|
+
"onUpdate:isReply": h[10] || (h[10] = (c) => u.value = c)
|
|
549
|
+
}, null, 8, ["isReply"])) : k("", !0)
|
|
550
550
|
]))
|
|
551
551
|
]);
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
|
-
}),
|
|
554
|
+
}), $t = ["id"], Ct = {
|
|
555
555
|
key: 0,
|
|
556
556
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
557
|
-
},
|
|
557
|
+
}, ie = /* @__PURE__ */ j({
|
|
558
558
|
__name: "CommentsWidget",
|
|
559
559
|
props: {
|
|
560
560
|
title: {},
|
|
@@ -570,43 +570,43 @@ const ue = V("x", [
|
|
|
570
570
|
style: {}
|
|
571
571
|
},
|
|
572
572
|
emits: ["add", "reply", "like", "delete", "edit"],
|
|
573
|
-
setup(
|
|
574
|
-
const o =
|
|
573
|
+
setup(r, { emit: i }) {
|
|
574
|
+
const o = r, e = i, n = (p) => {
|
|
575
575
|
o?.onAddComment?.(p), e("add", p);
|
|
576
|
-
},
|
|
577
|
-
o?.onLike?.(p,
|
|
578
|
-
},
|
|
579
|
-
o.onReply?.(p,
|
|
580
|
-
},
|
|
581
|
-
o.onEdit?.(p,
|
|
582
|
-
},
|
|
576
|
+
}, b = (p, d) => {
|
|
577
|
+
o?.onLike?.(p, d), e("like", p, d);
|
|
578
|
+
}, l = (p, d) => {
|
|
579
|
+
o.onReply?.(p, d), e("reply", p, d);
|
|
580
|
+
}, v = (p, d) => {
|
|
581
|
+
o.onEdit?.(p, d), e("edit", p, d);
|
|
582
|
+
}, u = (p) => {
|
|
583
583
|
o.onDelete?.(p), e("delete", p);
|
|
584
584
|
};
|
|
585
|
-
return (p,
|
|
585
|
+
return (p, d) => (s(), a("div", {
|
|
586
586
|
class: D(["mx-auto font-sans", p.className]),
|
|
587
587
|
id: p.id,
|
|
588
|
-
style:
|
|
588
|
+
style: Q(p.style)
|
|
589
589
|
}, [
|
|
590
|
-
p.title ? (s(),
|
|
590
|
+
p.title ? (s(), a("h3", Ct, _(p.title), 1)) : k("", !0),
|
|
591
591
|
t("div", {
|
|
592
592
|
class: D([p.maxHeight ? "overflow-y-auto" : "", "space-y-3"]),
|
|
593
|
-
style:
|
|
593
|
+
style: Q({ maxHeight: p.maxHeight + "px" })
|
|
594
594
|
}, [
|
|
595
|
-
(s(!0),
|
|
596
|
-
key:
|
|
597
|
-
comment:
|
|
598
|
-
onReply:
|
|
599
|
-
onLike:
|
|
600
|
-
onDelete:
|
|
601
|
-
onEdit:
|
|
595
|
+
(s(!0), a(I, null, H(p.comments, (y) => (s(), z(wt, {
|
|
596
|
+
key: y.id,
|
|
597
|
+
comment: y,
|
|
598
|
+
onReply: l,
|
|
599
|
+
onLike: b,
|
|
600
|
+
onDelete: d[0] || (d[0] = (m) => u(m)),
|
|
601
|
+
onEdit: v
|
|
602
602
|
}, null, 8, ["comment"]))), 128))
|
|
603
603
|
], 6),
|
|
604
|
-
M(
|
|
605
|
-
onSendComment:
|
|
604
|
+
M(Ce, {
|
|
605
|
+
onSendComment: d[1] || (d[1] = (y) => n(y))
|
|
606
606
|
})
|
|
607
|
-
], 14,
|
|
607
|
+
], 14, $t));
|
|
608
608
|
}
|
|
609
|
-
}),
|
|
609
|
+
}), ve = /* @__PURE__ */ new Map([
|
|
610
610
|
["file", {
|
|
611
611
|
name: "File",
|
|
612
612
|
color: "bg-green-100 text-green-700 border-green-200",
|
|
@@ -615,34 +615,34 @@ const ue = V("x", [
|
|
|
615
615
|
["post", {
|
|
616
616
|
name: "Post",
|
|
617
617
|
color: "bg-blue-100 text-blue-700 border-blue-200",
|
|
618
|
-
icon:
|
|
618
|
+
icon: Qe
|
|
619
619
|
}],
|
|
620
620
|
["user", {
|
|
621
621
|
name: "User",
|
|
622
622
|
color: "bg-purple-100 text-purple-700 border-purple-200",
|
|
623
|
-
icon:
|
|
623
|
+
icon: et
|
|
624
624
|
}],
|
|
625
625
|
["custom", {
|
|
626
626
|
name: "Custom",
|
|
627
627
|
color: "bg-gray-100 text-gray-700 border-gray-200",
|
|
628
|
-
icon:
|
|
628
|
+
icon: Ze
|
|
629
629
|
}]
|
|
630
|
-
]),
|
|
630
|
+
]), Mt = { class: "mx-auto font-sans" }, Lt = {
|
|
631
631
|
key: 0,
|
|
632
632
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
633
|
-
},
|
|
633
|
+
}, Tt = { class: "relative" }, Dt = { class: "space-y-3" }, It = { class: "flex-1 min-w-0 pb-2" }, jt = { class: "flex items-center gap-1.5 mb-1 mt-0.5" }, Vt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, At = { class: "font-medium text-xs" }, zt = { class: "text-xs text-gray-500" }, Ht = { class: "space-y-1" }, Et = { class: "text-xs text-gray-700" }, Ft = { class: "capitalize mr-1" }, St = {
|
|
634
634
|
key: 0,
|
|
635
635
|
class: "inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"
|
|
636
|
-
},
|
|
636
|
+
}, Ot = {
|
|
637
637
|
key: 0,
|
|
638
638
|
class: "flex items-center gap-1 text-xs"
|
|
639
|
-
},
|
|
639
|
+
}, Bt = {
|
|
640
640
|
key: 0,
|
|
641
641
|
class: "bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"
|
|
642
|
-
},
|
|
642
|
+
}, Nt = {
|
|
643
643
|
key: 2,
|
|
644
644
|
class: "bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"
|
|
645
|
-
},
|
|
645
|
+
}, le = /* @__PURE__ */ j({
|
|
646
646
|
__name: "HistoryWidget",
|
|
647
647
|
props: {
|
|
648
648
|
data: {},
|
|
@@ -652,57 +652,57 @@ const ue = V("x", [
|
|
|
652
652
|
className: {},
|
|
653
653
|
style: {}
|
|
654
654
|
},
|
|
655
|
-
setup(
|
|
656
|
-
const
|
|
657
|
-
o.value.length === 0 &&
|
|
655
|
+
setup(r) {
|
|
656
|
+
const i = r, o = $(Array.isArray(i.data) ? i.data : []);
|
|
657
|
+
o.value.length === 0 && i.id && e();
|
|
658
658
|
async function e() {
|
|
659
|
-
const n = await fetch(`/api/widget/history/${
|
|
659
|
+
const n = await fetch(`/api/widget/history/${i.id}`);
|
|
660
660
|
if (!n.ok)
|
|
661
661
|
return { data: [] };
|
|
662
|
-
const
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
}), o.value =
|
|
662
|
+
const b = await n.json();
|
|
663
|
+
b.rows.forEach((l) => {
|
|
664
|
+
l.timestamp = new Date(l.cdate), l.id = l.entity_id, l.entityType = l.entity_type, l.entityId = l.entity_id, l.action = l.change_type, l.userId = l.change_user_id, l.userName = l.username, l.timestamp = new Date(l.cdate), l.description = l.username, l.status = l.username;
|
|
665
|
+
}), o.value = b.rows;
|
|
666
666
|
}
|
|
667
|
-
return (n,
|
|
668
|
-
n.title ? (s(),
|
|
667
|
+
return (n, b) => (s(), a("div", Mt, [
|
|
668
|
+
n.title ? (s(), a("h3", Lt, _(n.title), 1)) : k("", !0),
|
|
669
669
|
t("div", {
|
|
670
670
|
class: D(n.maxHeight ? "overflow-y-auto" : ""),
|
|
671
|
-
style:
|
|
671
|
+
style: Q({ maxHeight: n.maxHeight + "px" })
|
|
672
672
|
}, [
|
|
673
|
-
t("div",
|
|
674
|
-
|
|
675
|
-
t("div",
|
|
676
|
-
(s(!0),
|
|
673
|
+
t("div", Tt, [
|
|
674
|
+
b[0] || (b[0] = t("div", { class: "absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200" }, null, -1)),
|
|
675
|
+
t("div", Dt, [
|
|
676
|
+
(s(!0), a(I, null, H(o.value, (l) => (s(), a("div", {
|
|
677
677
|
class: "relative flex items-start gap-2",
|
|
678
|
-
key:
|
|
678
|
+
key: l?.id
|
|
679
679
|
}, [
|
|
680
680
|
t("div", {
|
|
681
|
-
class: D(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${
|
|
681
|
+
class: D(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${C(ve).get(l?.entityType)?.color}`)
|
|
682
682
|
}, [
|
|
683
|
-
(s(),
|
|
683
|
+
(s(), z(N(C(ve).get(l?.entityType)?.icon), { class: "h-3 w-3" }))
|
|
684
684
|
], 2),
|
|
685
|
-
t("div",
|
|
686
|
-
t("div",
|
|
687
|
-
t("span",
|
|
688
|
-
M(
|
|
685
|
+
t("div", It, [
|
|
686
|
+
t("div", jt, [
|
|
687
|
+
t("span", Vt, [
|
|
688
|
+
M(C(me), { class: "h-3 w-3 text-gray-500" })
|
|
689
689
|
]),
|
|
690
|
-
t("span",
|
|
691
|
-
t("span",
|
|
690
|
+
t("span", At, _(l?.userName), 1),
|
|
691
|
+
t("span", zt, _(l?.timestamp.toLocaleTimeString("ua-UA", { hour: "2-digit", minute: "2-digit" })), 1)
|
|
692
692
|
]),
|
|
693
|
-
t("div",
|
|
694
|
-
t("div",
|
|
695
|
-
t("span",
|
|
696
|
-
|
|
693
|
+
t("div", Ht, [
|
|
694
|
+
t("div", Et, [
|
|
695
|
+
t("span", Ft, _(l?.action), 1),
|
|
696
|
+
l?.entityId ? (s(), a("span", St, _(l?.entityId), 1)) : k("", !0)
|
|
697
697
|
]),
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
698
|
+
l?.changes?.[l?.entityId] ? (s(), a("div", Ot, [
|
|
699
|
+
l?.changes?.[l?.entityId]?.old ? (s(), a("span", Bt, _(l?.changes?.[l?.entityId]?.old), 1)) : k("", !0),
|
|
700
|
+
l?.changes?.[l?.entityId]?.old && l?.changes?.[l?.entityId]?.new ? (s(), z(C(Ue), {
|
|
701
701
|
key: 1,
|
|
702
702
|
class: "h-2 w-2 text-gray-400"
|
|
703
|
-
})) :
|
|
704
|
-
|
|
705
|
-
])) :
|
|
703
|
+
})) : k("", !0),
|
|
704
|
+
l?.changes?.[l?.entityId]?.new ? (s(), a("span", Nt, _(l?.changes?.[l?.entityId]?.new), 1)) : k("", !0)
|
|
705
|
+
])) : k("", !0)
|
|
706
706
|
])
|
|
707
707
|
])
|
|
708
708
|
]))), 128))
|
|
@@ -711,55 +711,55 @@ const ue = V("x", [
|
|
|
711
711
|
], 6)
|
|
712
712
|
]));
|
|
713
713
|
}
|
|
714
|
-
}),
|
|
714
|
+
}), Pt = {
|
|
715
715
|
key: 0,
|
|
716
716
|
class: "text-xl font-semibold"
|
|
717
|
-
},
|
|
717
|
+
}, Ut = { class: "flex gap-1" }, Rt = { 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" }, Wt = /* @__PURE__ */ j({
|
|
718
718
|
__name: "FileHeader",
|
|
719
|
-
props: /* @__PURE__ */
|
|
719
|
+
props: /* @__PURE__ */ ee({
|
|
720
720
|
title: {}
|
|
721
721
|
}, {
|
|
722
722
|
modelValue: {},
|
|
723
723
|
modelModifiers: {}
|
|
724
724
|
}),
|
|
725
|
-
emits: /* @__PURE__ */
|
|
726
|
-
setup(
|
|
727
|
-
const
|
|
725
|
+
emits: /* @__PURE__ */ ee(["onAddFile"], ["update:modelValue"]),
|
|
726
|
+
setup(r) {
|
|
727
|
+
const i = ce(r, "modelValue"), o = {
|
|
728
728
|
active: "bg-blue-100 text-black hover:bg-blue-100",
|
|
729
729
|
inactive: "bg-white text-black hover:bg-blue-100"
|
|
730
730
|
};
|
|
731
|
-
return (e, n) => (s(),
|
|
731
|
+
return (e, n) => (s(), a("div", {
|
|
732
732
|
class: D(["flex flex-col sm:flex-row gap-3 mb-4", e.title ? "justify-between sm:items-center" : "justify-end sm:items-center"])
|
|
733
733
|
}, [
|
|
734
|
-
e.title ? (s(),
|
|
735
|
-
t("div",
|
|
734
|
+
e.title ? (s(), a("h3", Pt, _(e.title), 1)) : k("", !0),
|
|
735
|
+
t("div", Ut, [
|
|
736
736
|
t("button", {
|
|
737
|
-
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",
|
|
738
|
-
onClick: n[0] || (n[0] = (
|
|
737
|
+
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" ? o.active : o.inactive]),
|
|
738
|
+
onClick: n[0] || (n[0] = (b) => i.value = "list")
|
|
739
739
|
}, [
|
|
740
|
-
M(
|
|
740
|
+
M(C(Je), { class: "h-4 w-4" })
|
|
741
741
|
], 2),
|
|
742
742
|
t("button", {
|
|
743
|
-
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",
|
|
744
|
-
onClick: n[1] || (n[1] = (
|
|
743
|
+
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" ? o.active : o.inactive]),
|
|
744
|
+
onClick: n[1] || (n[1] = (b) => i.value = "grid")
|
|
745
745
|
}, [
|
|
746
|
-
M(
|
|
746
|
+
M(C(Ge), { class: "h-4 w-4" })
|
|
747
747
|
], 2),
|
|
748
748
|
t("label", null, [
|
|
749
749
|
t("input", {
|
|
750
750
|
type: "file",
|
|
751
751
|
class: "hidden",
|
|
752
|
-
onChange: n[2] || (n[2] = (
|
|
752
|
+
onChange: n[2] || (n[2] = (b) => e.$emit("onAddFile", b))
|
|
753
753
|
}, null, 32),
|
|
754
|
-
t("div",
|
|
755
|
-
M(
|
|
756
|
-
n[3] || (n[3] =
|
|
754
|
+
t("div", Rt, [
|
|
755
|
+
M(C(we), { class: "h-4 w-4" }),
|
|
756
|
+
n[3] || (n[3] = E(" Додати файл ", -1))
|
|
757
757
|
])
|
|
758
758
|
])
|
|
759
759
|
])
|
|
760
760
|
], 2));
|
|
761
761
|
}
|
|
762
|
-
}),
|
|
762
|
+
}), oe = {
|
|
763
763
|
pdf: {
|
|
764
764
|
color: "bg-red-100 text-red-700 border-red-200",
|
|
765
765
|
icon: G,
|
|
@@ -767,12 +767,12 @@ const ue = V("x", [
|
|
|
767
767
|
},
|
|
768
768
|
sketch: {
|
|
769
769
|
color: "bg-gray-100 text-gray-700 border-gray-200",
|
|
770
|
-
icon:
|
|
770
|
+
icon: qe,
|
|
771
771
|
label: "SKETCH"
|
|
772
772
|
},
|
|
773
773
|
mp4: {
|
|
774
774
|
color: "bg-purple-100 text-purple-700 border-purple-200",
|
|
775
|
-
icon:
|
|
775
|
+
icon: tt,
|
|
776
776
|
label: "VIDEO"
|
|
777
777
|
},
|
|
778
778
|
docx: {
|
|
@@ -782,17 +782,17 @@ const ue = V("x", [
|
|
|
782
782
|
},
|
|
783
783
|
zip: {
|
|
784
784
|
color: "bg-orange-100 text-orange-700 border-orange-200",
|
|
785
|
-
icon:
|
|
785
|
+
icon: Pe,
|
|
786
786
|
label: "ARCHIVE"
|
|
787
787
|
},
|
|
788
788
|
png: {
|
|
789
789
|
color: "bg-green-100 text-green-700 border-green-200",
|
|
790
|
-
icon:
|
|
790
|
+
icon: ye,
|
|
791
791
|
label: "IMAGE"
|
|
792
792
|
},
|
|
793
793
|
jpg: {
|
|
794
794
|
color: "bg-green-100 text-green-700 border-green-200",
|
|
795
|
-
icon:
|
|
795
|
+
icon: ye,
|
|
796
796
|
label: "IMAGE"
|
|
797
797
|
},
|
|
798
798
|
xlsx: {
|
|
@@ -806,114 +806,114 @@ const ue = V("x", [
|
|
|
806
806
|
label: "PPT"
|
|
807
807
|
}
|
|
808
808
|
};
|
|
809
|
-
function
|
|
809
|
+
function Me(r, i = "en") {
|
|
810
810
|
const o = {
|
|
811
811
|
month: "short",
|
|
812
812
|
day: "numeric"
|
|
813
813
|
};
|
|
814
|
-
return new Intl.DateTimeFormat(
|
|
814
|
+
return new Intl.DateTimeFormat(i, o).format(r);
|
|
815
815
|
}
|
|
816
|
-
function
|
|
817
|
-
if (
|
|
818
|
-
const
|
|
819
|
-
return `${parseFloat((
|
|
816
|
+
function Le(r) {
|
|
817
|
+
if (r === 0) return "0 B";
|
|
818
|
+
const i = 1024, o = ["B", "KB", "MB", "GB", "TB"], e = Math.floor(Math.log(r) / Math.log(i));
|
|
819
|
+
return `${parseFloat((r / Math.pow(i, e)).toFixed(1))} ${o[e]}`;
|
|
820
820
|
}
|
|
821
|
-
const
|
|
821
|
+
const qt = { class: "space-y-0.5" }, Gt = ["onClick"], Kt = ["onClick"], Zt = { class: "flex items-center gap-2" }, Jt = { class: "font-medium text-xs truncate hover:text-blue-600 cursor-pointer" }, Xt = { 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" }, Yt = { class: "flex items-center gap-1" }, es = ["onClick"], ts = ["onClick"], Te = /* @__PURE__ */ j({
|
|
822
822
|
__name: "FileList",
|
|
823
823
|
props: {
|
|
824
824
|
files: {}
|
|
825
825
|
},
|
|
826
826
|
emits: ["delete", "download", "openLightbox"],
|
|
827
|
-
setup(
|
|
828
|
-
return (
|
|
829
|
-
(s(!0),
|
|
827
|
+
setup(r) {
|
|
828
|
+
return (i, o) => (s(), a("div", qt, [
|
|
829
|
+
(s(!0), a(I, null, H(i.files, (e) => (s(), a("div", {
|
|
830
830
|
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
831
|
key: e.id,
|
|
832
|
-
onClick:
|
|
832
|
+
onClick: R((n) => i.$emit("openLightbox", e), ["stop"])
|
|
833
833
|
}, [
|
|
834
834
|
t("div", {
|
|
835
|
-
class: D(["p-1 rounded",
|
|
835
|
+
class: D(["p-1 rounded", C(oe)[e?.ext]?.color || "bg-blue-100 text-blue-700 border-blue-200"])
|
|
836
836
|
}, [
|
|
837
|
-
(s(),
|
|
837
|
+
(s(), z(N(C(oe)[e?.ext]?.icon || C(oe).pdf.icon), { class: "h-3 w-3" }))
|
|
838
838
|
], 2),
|
|
839
839
|
t("div", {
|
|
840
840
|
class: "flex-1 min-w-0",
|
|
841
|
-
onClick: (n) =>
|
|
841
|
+
onClick: (n) => i.$emit("openLightbox", e)
|
|
842
842
|
}, [
|
|
843
|
-
t("div",
|
|
844
|
-
t("span",
|
|
843
|
+
t("div", Zt, [
|
|
844
|
+
t("span", Jt, _(e?.uploaded_name || e?.name), 1)
|
|
845
845
|
])
|
|
846
|
-
], 8,
|
|
847
|
-
t("div",
|
|
848
|
-
t("div",
|
|
849
|
-
t("div",
|
|
846
|
+
], 8, Kt),
|
|
847
|
+
t("div", Xt, _(C(Le)(e.size)), 1),
|
|
848
|
+
t("div", Qt, _(C(Me)(e.createdAt)), 1),
|
|
849
|
+
t("div", Yt, [
|
|
850
850
|
t("button", {
|
|
851
|
-
onClick:
|
|
851
|
+
onClick: R((n) => i.$emit("download", e), ["stop"]),
|
|
852
852
|
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
853
|
}, [
|
|
854
|
-
M(
|
|
855
|
-
], 8,
|
|
854
|
+
M(C(_e), { class: "h-3 w-3" })
|
|
855
|
+
], 8, es),
|
|
856
856
|
t("button", {
|
|
857
857
|
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:
|
|
858
|
+
onClick: R((n) => i.$emit("delete", n, e?.file_id), ["stop"])
|
|
859
859
|
}, [
|
|
860
|
-
M(
|
|
861
|
-
], 8,
|
|
860
|
+
M(C(pe), { class: "h-3 w-3" })
|
|
861
|
+
], 8, ts)
|
|
862
862
|
])
|
|
863
|
-
], 8,
|
|
863
|
+
], 8, Gt))), 128))
|
|
864
864
|
]));
|
|
865
865
|
}
|
|
866
|
-
}),
|
|
866
|
+
}), ss = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3" }, os = ["onClick"], ns = { class: "space-y-2" }, is = { class: "flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden" }, ls = ["src"], as = { class: "space-y-1" }, rs = ["title"], ds = { class: "text-xs text-gray-500 text-left" }, cs = { class: "absolute top-2 right-1 flex items-center gap-1" }, us = ["onClick"], ps = ["onClick"], ms = /* @__PURE__ */ j({
|
|
867
867
|
__name: "FileGrid",
|
|
868
868
|
props: {
|
|
869
869
|
files: {}
|
|
870
870
|
},
|
|
871
871
|
emits: ["delete", "download", "openLightbox"],
|
|
872
|
-
setup(
|
|
873
|
-
return (
|
|
874
|
-
(s(!0),
|
|
872
|
+
setup(r) {
|
|
873
|
+
return (i, o) => (s(), a("div", ss, [
|
|
874
|
+
(s(!0), a(I, null, H(i.files, (e) => (s(), a("div", {
|
|
875
875
|
key: e.id,
|
|
876
|
-
onClick:
|
|
876
|
+
onClick: R((n) => i.$emit("openLightbox", e), ["stop"]),
|
|
877
877
|
class: "group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"
|
|
878
878
|
}, [
|
|
879
|
-
t("div",
|
|
880
|
-
t("div",
|
|
881
|
-
e.ext === "png" || e.ext === "jpg" || e.ext === "jpeg" || e.ext === "gif" || e.ext === "svg" || e.ext === "webp" ? (s(),
|
|
879
|
+
t("div", ns, [
|
|
880
|
+
t("div", is, [
|
|
881
|
+
e.ext === "png" || e.ext === "jpg" || e.ext === "jpeg" || e.ext === "gif" || e.ext === "svg" || e.ext === "webp" ? (s(), a("img", {
|
|
882
882
|
key: 0,
|
|
883
883
|
src: `/file/resize?filepath=${e?.file_path}&w=500`,
|
|
884
884
|
alt: "file",
|
|
885
885
|
class: "w-full h-full object-cover"
|
|
886
|
-
}, null, 8,
|
|
886
|
+
}, null, 8, ls)) : (s(), z(C(G), {
|
|
887
887
|
key: 1,
|
|
888
888
|
class: "h-10 w-10 text-gray-500"
|
|
889
889
|
}))
|
|
890
890
|
]),
|
|
891
|
-
t("div",
|
|
891
|
+
t("div", as, [
|
|
892
892
|
t("h3", {
|
|
893
893
|
class: "font-medium text-xs leading-tight text-left",
|
|
894
894
|
title: e.uploaded_name || e.name
|
|
895
|
-
},
|
|
896
|
-
t("p",
|
|
895
|
+
}, _(e.uploaded_name || e.name), 9, rs),
|
|
896
|
+
t("p", ds, _(C(Me)(e.createdAt)) + ", " + _(C(Le)(e.size)), 1)
|
|
897
897
|
])
|
|
898
898
|
]),
|
|
899
|
-
t("div",
|
|
899
|
+
t("div", cs, [
|
|
900
900
|
t("button", {
|
|
901
|
-
onClick:
|
|
901
|
+
onClick: R((n) => i.$emit("download", e), ["stop"]),
|
|
902
902
|
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
903
|
}, [
|
|
904
|
-
M(
|
|
905
|
-
], 8,
|
|
904
|
+
M(C(_e), { class: "h-3 w-3" })
|
|
905
|
+
], 8, us),
|
|
906
906
|
t("button", {
|
|
907
907
|
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:
|
|
908
|
+
onClick: R((n) => i.$emit("delete", n, e?.file_id), ["stop"])
|
|
909
909
|
}, [
|
|
910
|
-
M(
|
|
911
|
-
], 8,
|
|
910
|
+
M(C(pe), { class: "h-3 w-3" })
|
|
911
|
+
], 8, ps)
|
|
912
912
|
])
|
|
913
|
-
], 8,
|
|
913
|
+
], 8, os))), 128))
|
|
914
914
|
]));
|
|
915
915
|
}
|
|
916
|
-
}),
|
|
916
|
+
}), gs = { class: "mx-auto font-sans" }, hs = { key: 1 }, be = /* @__PURE__ */ j({
|
|
917
917
|
__name: "FilesWidget",
|
|
918
918
|
props: {
|
|
919
919
|
title: {},
|
|
@@ -927,128 +927,128 @@ const Rt = { class: "space-y-0.5" }, Ut = ["onClick"], Wt = ["onClick"], qt = {
|
|
|
927
927
|
onDelete: {}
|
|
928
928
|
},
|
|
929
929
|
emits: ["delete", "add", "openLightbox"],
|
|
930
|
-
setup(
|
|
931
|
-
const o =
|
|
932
|
-
|
|
933
|
-
const p = (
|
|
934
|
-
n.value =
|
|
935
|
-
},
|
|
930
|
+
setup(r, { emit: i }) {
|
|
931
|
+
const o = r, e = $(!1), n = $(null), b = $(!1), l = $(0), v = $(o.files ?? []), u = i;
|
|
932
|
+
v.value.length === 0 && h();
|
|
933
|
+
const p = (f, g) => {
|
|
934
|
+
n.value = g, e.value = !0;
|
|
935
|
+
}, d = () => {
|
|
936
936
|
n.value && (O(n.value), n.value = null, e.value = !1);
|
|
937
|
-
},
|
|
938
|
-
const
|
|
939
|
-
|
|
940
|
-
},
|
|
941
|
-
o.onAddFile ? o.onAddFile(
|
|
942
|
-
}, O = (
|
|
943
|
-
o.onDelete ? o.onDelete(
|
|
944
|
-
},
|
|
945
|
-
const
|
|
946
|
-
|
|
947
|
-
},
|
|
948
|
-
async function
|
|
937
|
+
}, y = S(() => Array.isArray(v.value) ? v.value.map((f) => f?.file_path) : []), m = (f) => {
|
|
938
|
+
const g = y.value.findIndex((F) => F === f.file_path);
|
|
939
|
+
g !== -1 && (b.value = !0, l.value = g);
|
|
940
|
+
}, T = (f) => {
|
|
941
|
+
o.onAddFile ? o.onAddFile(f) : w(f), u("add", f);
|
|
942
|
+
}, O = (f) => {
|
|
943
|
+
o.onDelete ? o.onDelete(f) : c(f), u("delete", f);
|
|
944
|
+
}, B = (f) => {
|
|
945
|
+
const g = document.createElement("a");
|
|
946
|
+
g.setAttribute("download", f?.uploaded_name || f?.name), g.href = f?.file_path || f?.path, g.click();
|
|
947
|
+
}, x = $("list");
|
|
948
|
+
async function h() {
|
|
949
949
|
if (!o.id)
|
|
950
950
|
return;
|
|
951
|
-
const
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
}),
|
|
951
|
+
const f = await fetch(`/api/widget/file/${o.id}`).then((g) => g.json());
|
|
952
|
+
f.rows.forEach((g) => {
|
|
953
|
+
g.timestamp = new Date(g.cdate), g.id = g.entity_id, g.entityType = g.entity_type, g.entityId = g.entity_id, g.entityType = g.entity_type, g.action = g.change_type, g.userId = g.change_user_id, g.userName = g.username, g.timestamp = new Date(g.cdate), g.description = g.username, g.status = g.username;
|
|
954
|
+
}), v.value = f.rows;
|
|
955
955
|
}
|
|
956
|
-
const
|
|
957
|
-
if (!(!
|
|
956
|
+
const w = async (f) => {
|
|
957
|
+
if (!(!f.target || !f.target.files || f.target.files.length === 0))
|
|
958
958
|
try {
|
|
959
959
|
await Promise.all(
|
|
960
|
-
Array.from(
|
|
961
|
-
const
|
|
962
|
-
|
|
963
|
-
const
|
|
960
|
+
Array.from(f.target.files).map(async (g) => {
|
|
961
|
+
const F = new FormData();
|
|
962
|
+
F.append("file", g);
|
|
963
|
+
const U = `/api/widget/file/${o.id}`, A = await fetch(U, {
|
|
964
964
|
method: "POST",
|
|
965
|
-
body:
|
|
965
|
+
body: F
|
|
966
966
|
});
|
|
967
|
-
if (!
|
|
968
|
-
throw new Error(`HTTP error! status: ${
|
|
969
|
-
return
|
|
967
|
+
if (!A.ok)
|
|
968
|
+
throw new Error(`HTTP error! status: ${A.status}`);
|
|
969
|
+
return g;
|
|
970
970
|
})
|
|
971
|
-
), await
|
|
972
|
-
} catch (
|
|
973
|
-
console.error("Помилка при завантаженні файлів:",
|
|
971
|
+
), await h();
|
|
972
|
+
} catch (g) {
|
|
973
|
+
console.error("Помилка при завантаженні файлів:", g);
|
|
974
974
|
}
|
|
975
|
-
},
|
|
975
|
+
}, c = async (f) => {
|
|
976
976
|
try {
|
|
977
977
|
await fetch(
|
|
978
|
-
`/api/widget/file/${o.id}/${
|
|
978
|
+
`/api/widget/file/${o.id}/${f}`,
|
|
979
979
|
{
|
|
980
980
|
method: "DELETE"
|
|
981
981
|
}
|
|
982
|
-
), await
|
|
983
|
-
} catch (
|
|
984
|
-
console.error(
|
|
982
|
+
), await h();
|
|
983
|
+
} catch (g) {
|
|
984
|
+
console.error(g);
|
|
985
985
|
}
|
|
986
986
|
};
|
|
987
|
-
return (
|
|
988
|
-
const
|
|
989
|
-
return s(),
|
|
990
|
-
t("div",
|
|
991
|
-
M(
|
|
992
|
-
modelValue:
|
|
993
|
-
"onUpdate:modelValue":
|
|
987
|
+
return (f, g) => {
|
|
988
|
+
const F = te("MessageBox"), U = te("Lightbox");
|
|
989
|
+
return s(), a(I, null, [
|
|
990
|
+
t("div", gs, [
|
|
991
|
+
M(Wt, {
|
|
992
|
+
modelValue: x.value,
|
|
993
|
+
"onUpdate:modelValue": g[0] || (g[0] = (A) => x.value = A),
|
|
994
994
|
title: o.title,
|
|
995
|
-
onOnAddFile:
|
|
995
|
+
onOnAddFile: g[1] || (g[1] = (A) => T(A))
|
|
996
996
|
}, null, 8, ["modelValue", "title"]),
|
|
997
|
-
|
|
997
|
+
v.value.length > 0 ? (s(), a("div", {
|
|
998
998
|
key: 0,
|
|
999
|
-
class: D(
|
|
1000
|
-
style:
|
|
999
|
+
class: D(f.maxHeight ? "overflow-y-auto" : ""),
|
|
1000
|
+
style: Q({ maxHeight: f.maxHeight + "px" })
|
|
1001
1001
|
}, [
|
|
1002
|
-
|
|
1002
|
+
x.value === "list" ? (s(), z(Te, {
|
|
1003
1003
|
key: 0,
|
|
1004
1004
|
onDelete: p,
|
|
1005
|
-
onDownload:
|
|
1006
|
-
onOpenLightbox:
|
|
1007
|
-
files:
|
|
1008
|
-
}, null, 8, ["files"])) :
|
|
1009
|
-
|
|
1005
|
+
onDownload: B,
|
|
1006
|
+
onOpenLightbox: g[2] || (g[2] = (A) => m(A)),
|
|
1007
|
+
files: v.value
|
|
1008
|
+
}, null, 8, ["files"])) : k("", !0),
|
|
1009
|
+
x.value === "grid" ? (s(), z(ms, {
|
|
1010
1010
|
key: 1,
|
|
1011
1011
|
onDelete: p,
|
|
1012
|
-
onDownload:
|
|
1013
|
-
onOpenLightbox:
|
|
1014
|
-
files:
|
|
1015
|
-
}, null, 8, ["files"])) :
|
|
1016
|
-
], 6)) : (s(),
|
|
1012
|
+
onDownload: B,
|
|
1013
|
+
onOpenLightbox: g[3] || (g[3] = (A) => m(A)),
|
|
1014
|
+
files: v.value
|
|
1015
|
+
}, null, 8, ["files"])) : k("", !0)
|
|
1016
|
+
], 6)) : (s(), a("div", hs, g[6] || (g[6] = [
|
|
1017
1017
|
t("div", { class: "flex items-center justify-center h-full" }, [
|
|
1018
1018
|
t("p", { class: "text-gray-500 leading-[3]" }, "Файлів не знайдено")
|
|
1019
1019
|
], -1)
|
|
1020
|
-
])
|
|
1020
|
+
])))
|
|
1021
1021
|
]),
|
|
1022
|
-
M(
|
|
1022
|
+
M(F, {
|
|
1023
1023
|
modelValue: e.value,
|
|
1024
|
-
"onUpdate:modelValue":
|
|
1025
|
-
onConfirm:
|
|
1024
|
+
"onUpdate:modelValue": g[4] || (g[4] = (A) => e.value = A),
|
|
1025
|
+
onConfirm: d,
|
|
1026
1026
|
title: "Ви впевнені?",
|
|
1027
1027
|
message: "Ви впевнені, що хочете видалити цей файл?",
|
|
1028
1028
|
confirmButtonText: "Так, я впевнена/ий",
|
|
1029
1029
|
cancelButtonText: "Скасувати"
|
|
1030
1030
|
}, null, 8, ["modelValue"]),
|
|
1031
|
-
M(
|
|
1032
|
-
modelValue:
|
|
1033
|
-
"onUpdate:modelValue":
|
|
1034
|
-
images:
|
|
1035
|
-
"start-index":
|
|
1031
|
+
M(U, {
|
|
1032
|
+
modelValue: b.value,
|
|
1033
|
+
"onUpdate:modelValue": g[5] || (g[5] = (A) => b.value = A),
|
|
1034
|
+
images: y.value,
|
|
1035
|
+
"start-index": l.value
|
|
1036
1036
|
}, null, 8, ["modelValue", "images", "start-index"])
|
|
1037
1037
|
], 64);
|
|
1038
1038
|
};
|
|
1039
1039
|
}
|
|
1040
|
-
}),
|
|
1040
|
+
}), fs = {
|
|
1041
1041
|
key: 0,
|
|
1042
1042
|
class: "image-wrapper h-full max-h-[400px]",
|
|
1043
1043
|
id: "lightbox-gallery"
|
|
1044
|
-
},
|
|
1044
|
+
}, ys = ["onClick"], vs = {
|
|
1045
1045
|
key: 0,
|
|
1046
1046
|
rel: "noreferrer",
|
|
1047
1047
|
class: "relative block h-full w-full"
|
|
1048
|
-
},
|
|
1048
|
+
}, bs = ["src"], xs = {
|
|
1049
1049
|
key: 0,
|
|
1050
1050
|
class: "thumb-cover"
|
|
1051
|
-
},
|
|
1051
|
+
}, ks = /* @__PURE__ */ j({
|
|
1052
1052
|
__name: "GalleryContent",
|
|
1053
1053
|
props: {
|
|
1054
1054
|
title: {},
|
|
@@ -1062,26 +1062,26 @@ const Rt = { class: "space-y-0.5" }, Ut = ["onClick"], Wt = ["onClick"], qt = {
|
|
|
1062
1062
|
style: {}
|
|
1063
1063
|
},
|
|
1064
1064
|
emits: ["delete"],
|
|
1065
|
-
setup(
|
|
1066
|
-
const o =
|
|
1067
|
-
() => Array.isArray(
|
|
1068
|
-
),
|
|
1069
|
-
const p =
|
|
1070
|
-
(
|
|
1065
|
+
setup(r, { emit: i }) {
|
|
1066
|
+
const o = i, e = $(!1), n = $(0), b = r, l = S(
|
|
1067
|
+
() => Array.isArray(b.items) ? b.items.map((u) => u?.file_path) : []
|
|
1068
|
+
), v = (u) => {
|
|
1069
|
+
const p = l.value.findIndex(
|
|
1070
|
+
(d) => d === u.file_path
|
|
1071
1071
|
);
|
|
1072
1072
|
p !== -1 && (e.value = !0, n.value = p);
|
|
1073
1073
|
};
|
|
1074
|
-
return (
|
|
1075
|
-
const
|
|
1076
|
-
return
|
|
1077
|
-
(s(!0),
|
|
1074
|
+
return (u, p) => {
|
|
1075
|
+
const d = te("Lightbox");
|
|
1076
|
+
return u.items?.length >= 1 ? (s(), a("div", fs, [
|
|
1077
|
+
(s(!0), a(I, null, H(u.items, (y, m) => (s(), a("div", {
|
|
1078
1078
|
class: D(["h-full w-full image" + m, "cursor-pointer bg-teal-500 rounded-[3px]"]),
|
|
1079
1079
|
key: m,
|
|
1080
|
-
onClick:
|
|
1080
|
+
onClick: R((T) => v(y), ["stop"])
|
|
1081
1081
|
}, [
|
|
1082
|
-
m < 5 ? (s(),
|
|
1082
|
+
m < 5 ? (s(), a("div", vs, [
|
|
1083
1083
|
t("img", {
|
|
1084
|
-
src: `/file/resize?filepath=${
|
|
1084
|
+
src: `/file/resize?filepath=${y?.file_path}&w=500`,
|
|
1085
1085
|
alt: "alt",
|
|
1086
1086
|
height: "auto",
|
|
1087
1087
|
width: "100%",
|
|
@@ -1089,59 +1089,59 @@ const Rt = { class: "space-y-0.5" }, Ut = ["onClick"], Wt = ["onClick"], qt = {
|
|
|
1089
1089
|
"object-cover h-full w-full bg-gray-200 rounded-[3px]",
|
|
1090
1090
|
m === 0 ? "max-h-[411px]" : "max-h-[calc((411px-3px)/2)]"
|
|
1091
1091
|
])
|
|
1092
|
-
}, null, 10,
|
|
1093
|
-
m === 4 &&
|
|
1094
|
-
])) :
|
|
1095
|
-
], 10,
|
|
1096
|
-
(s(!0),
|
|
1097
|
-
key: "empty-" +
|
|
1098
|
-
class: D(["h-full w-full image" + (
|
|
1092
|
+
}, null, 10, bs),
|
|
1093
|
+
m === 4 && u.items?.length > 5 ? (s(), a("div", xs, " +" + _(u.items?.length - 5), 1)) : k("", !0)
|
|
1094
|
+
])) : k("", !0)
|
|
1095
|
+
], 10, ys))), 128)),
|
|
1096
|
+
(s(!0), a(I, null, H(Math.max(0, 5 - u.items.length), (y) => (s(), a("div", {
|
|
1097
|
+
key: "empty-" + y,
|
|
1098
|
+
class: D(["h-full w-full image" + (u.items.length + y - 1), "bg-gray-300 rounded-[3px]"])
|
|
1099
1099
|
}, null, 2))), 128)),
|
|
1100
|
-
M(
|
|
1100
|
+
M(d, {
|
|
1101
1101
|
modelValue: e.value,
|
|
1102
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
1103
|
-
images:
|
|
1102
|
+
"onUpdate:modelValue": p[0] || (p[0] = (y) => e.value = y),
|
|
1103
|
+
images: l.value,
|
|
1104
1104
|
"start-index": n.value,
|
|
1105
1105
|
delete: "true",
|
|
1106
1106
|
download: "true",
|
|
1107
|
-
onDelete: p[1] || (p[1] = (
|
|
1107
|
+
onDelete: p[1] || (p[1] = (y) => o("delete", y))
|
|
1108
1108
|
}, null, 8, ["modelValue", "images", "start-index"])
|
|
1109
|
-
])) :
|
|
1109
|
+
])) : k("", !0);
|
|
1110
1110
|
};
|
|
1111
1111
|
}
|
|
1112
|
-
}),
|
|
1112
|
+
}), _s = {
|
|
1113
1113
|
key: 0,
|
|
1114
1114
|
class: "text-xl font-semibold"
|
|
1115
|
-
},
|
|
1115
|
+
}, ws = { class: "flex gap-1" }, $s = { 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" }, Cs = /* @__PURE__ */ j({
|
|
1116
1116
|
__name: "widgetHeader",
|
|
1117
1117
|
props: {
|
|
1118
1118
|
title: {}
|
|
1119
1119
|
},
|
|
1120
1120
|
emits: ["onAddImage"],
|
|
1121
|
-
setup(
|
|
1122
|
-
return (
|
|
1123
|
-
class: D(["flex flex-col sm:flex-row gap-3 mb-4",
|
|
1121
|
+
setup(r) {
|
|
1122
|
+
return (i, o) => (s(), a("div", {
|
|
1123
|
+
class: D(["flex flex-col sm:flex-row gap-3 mb-4", i.title ? "justify-between sm:items-center" : "justify-end sm:items-center"])
|
|
1124
1124
|
}, [
|
|
1125
|
-
|
|
1126
|
-
t("div",
|
|
1125
|
+
i.title ? (s(), a("h3", _s, _(i.title), 1)) : k("", !0),
|
|
1126
|
+
t("div", ws, [
|
|
1127
1127
|
t("label", null, [
|
|
1128
1128
|
t("input", {
|
|
1129
1129
|
type: "file",
|
|
1130
1130
|
class: "hidden",
|
|
1131
|
-
onChange: o[0] || (o[0] = (e) =>
|
|
1131
|
+
onChange: o[0] || (o[0] = (e) => i.$emit("onAddImage", e))
|
|
1132
1132
|
}, null, 32),
|
|
1133
|
-
t("div",
|
|
1134
|
-
M(
|
|
1135
|
-
o[1] || (o[1] =
|
|
1133
|
+
t("div", $s, [
|
|
1134
|
+
M(C(we), { class: "h-4 w-4" }),
|
|
1135
|
+
o[1] || (o[1] = E(" Додати зображення ", -1))
|
|
1136
1136
|
])
|
|
1137
1137
|
])
|
|
1138
1138
|
])
|
|
1139
1139
|
], 2));
|
|
1140
1140
|
}
|
|
1141
|
-
}),
|
|
1141
|
+
}), Ms = {
|
|
1142
1142
|
class: "w-full mx-auto font-sans",
|
|
1143
1143
|
ref: "containerRef"
|
|
1144
|
-
},
|
|
1144
|
+
}, Ls = { key: 1 }, ae = /* @__PURE__ */ j({
|
|
1145
1145
|
__name: "GalleryWidget",
|
|
1146
1146
|
props: {
|
|
1147
1147
|
title: {},
|
|
@@ -1155,96 +1155,96 @@ const Rt = { class: "space-y-0.5" }, Ut = ["onClick"], Wt = ["onClick"], qt = {
|
|
|
1155
1155
|
style: {}
|
|
1156
1156
|
},
|
|
1157
1157
|
emits: ["delete", "add", "openLightbox"],
|
|
1158
|
-
setup(
|
|
1159
|
-
const o =
|
|
1160
|
-
e.value.length === 0 &&
|
|
1161
|
-
const
|
|
1162
|
-
o.onAddImage ? o.onAddImage(
|
|
1163
|
-
},
|
|
1164
|
-
const
|
|
1165
|
-
(m) => m.file_path ===
|
|
1158
|
+
setup(r, { emit: i }) {
|
|
1159
|
+
const o = r, e = $(o.items ?? []), n = i;
|
|
1160
|
+
e.value.length === 0 && u();
|
|
1161
|
+
const b = (d) => {
|
|
1162
|
+
o.onAddImage ? o.onAddImage(d) : v(d), n("add", d);
|
|
1163
|
+
}, l = (d) => {
|
|
1164
|
+
const y = e.value.find(
|
|
1165
|
+
(m) => m.file_path === d
|
|
1166
1166
|
)?.file_id;
|
|
1167
|
-
|
|
1168
|
-
},
|
|
1169
|
-
if (!(!
|
|
1167
|
+
y && (o.onDelete ? o.onDelete(y) : p(y));
|
|
1168
|
+
}, v = async (d) => {
|
|
1169
|
+
if (!(!d.target || !d.target.files || d.target.files.length === 0))
|
|
1170
1170
|
try {
|
|
1171
1171
|
await Promise.all(
|
|
1172
|
-
Array.from(
|
|
1172
|
+
Array.from(d.target.files).map(async (y) => {
|
|
1173
1173
|
const m = new FormData();
|
|
1174
|
-
m.append("file",
|
|
1175
|
-
const
|
|
1174
|
+
m.append("file", y);
|
|
1175
|
+
const T = `/api/widget/file/${o.id}`, O = await fetch(T, {
|
|
1176
1176
|
method: "POST",
|
|
1177
1177
|
body: m
|
|
1178
1178
|
});
|
|
1179
1179
|
if (!O.ok)
|
|
1180
1180
|
throw new Error(`HTTP error! status: ${O.status}`);
|
|
1181
|
-
return
|
|
1181
|
+
return y;
|
|
1182
1182
|
})
|
|
1183
|
-
), await
|
|
1184
|
-
} catch (
|
|
1185
|
-
console.error("Помилка при завантаженні файлів:",
|
|
1183
|
+
), await u();
|
|
1184
|
+
} catch (y) {
|
|
1185
|
+
console.error("Помилка при завантаженні файлів:", y);
|
|
1186
1186
|
}
|
|
1187
1187
|
};
|
|
1188
|
-
async function
|
|
1188
|
+
async function u() {
|
|
1189
1189
|
if (!o.id)
|
|
1190
1190
|
return;
|
|
1191
|
-
const
|
|
1192
|
-
(
|
|
1191
|
+
const d = await fetch(`/api/widget/file/${o.id}`).then(
|
|
1192
|
+
(y) => y.json()
|
|
1193
1193
|
);
|
|
1194
|
-
e.value =
|
|
1194
|
+
e.value = d.rows;
|
|
1195
1195
|
}
|
|
1196
|
-
const p = async (
|
|
1196
|
+
const p = async (d) => {
|
|
1197
1197
|
try {
|
|
1198
|
-
await fetch(`/api/widget/file/${o.id}/${
|
|
1198
|
+
await fetch(`/api/widget/file/${o.id}/${d}`, {
|
|
1199
1199
|
method: "DELETE"
|
|
1200
|
-
}), await
|
|
1201
|
-
} catch (
|
|
1202
|
-
console.error(
|
|
1200
|
+
}), await u();
|
|
1201
|
+
} catch (y) {
|
|
1202
|
+
console.error(y);
|
|
1203
1203
|
}
|
|
1204
1204
|
};
|
|
1205
|
-
return (
|
|
1206
|
-
M(
|
|
1207
|
-
title:
|
|
1208
|
-
onOnAddImage:
|
|
1205
|
+
return (d, y) => (s(), a("div", Ms, [
|
|
1206
|
+
M(Cs, {
|
|
1207
|
+
title: d.title,
|
|
1208
|
+
onOnAddImage: y[0] || (y[0] = (m) => b(m))
|
|
1209
1209
|
}, null, 8, ["title"]),
|
|
1210
|
-
e.value.length > 0 ? (s(),
|
|
1210
|
+
e.value.length > 0 ? (s(), z(ks, {
|
|
1211
1211
|
key: 0,
|
|
1212
1212
|
items: e.value,
|
|
1213
|
-
onDelete:
|
|
1214
|
-
}, null, 8, ["items"])) : (s(),
|
|
1213
|
+
onDelete: y[1] || (y[1] = (m) => l(m))
|
|
1214
|
+
}, null, 8, ["items"])) : (s(), a("div", Ls, y[2] || (y[2] = [
|
|
1215
1215
|
t("div", { class: "flex items-center justify-center h-full" }, [
|
|
1216
1216
|
t("p", { class: "text-gray-500 leading-[3]" }, "Зображень не знайдено")
|
|
1217
1217
|
], -1)
|
|
1218
|
-
])
|
|
1218
|
+
])))
|
|
1219
1219
|
], 512));
|
|
1220
1220
|
}
|
|
1221
|
-
}),
|
|
1221
|
+
}), Ts = { class: "text-value" }, Ds = { class: "text-sm text-gray-900" }, Is = /* @__PURE__ */ j({
|
|
1222
1222
|
__name: "TextValue",
|
|
1223
1223
|
props: {
|
|
1224
1224
|
item: {}
|
|
1225
1225
|
},
|
|
1226
|
-
setup(
|
|
1227
|
-
const
|
|
1228
|
-
const e =
|
|
1226
|
+
setup(r) {
|
|
1227
|
+
const i = r, o = S(() => {
|
|
1228
|
+
const e = i.item.value;
|
|
1229
1229
|
return typeof e == "boolean" ? e ? "Так" : "Ні" : e == null ? "—" : String(e);
|
|
1230
1230
|
});
|
|
1231
|
-
return (e, n) => (s(),
|
|
1232
|
-
t("span",
|
|
1231
|
+
return (e, n) => (s(), a("div", Ts, [
|
|
1232
|
+
t("span", Ds, _(o.value), 1)
|
|
1233
1233
|
]));
|
|
1234
1234
|
}
|
|
1235
|
-
}), W = (
|
|
1236
|
-
const o =
|
|
1237
|
-
for (const [e, n] of
|
|
1235
|
+
}), W = (r, i) => {
|
|
1236
|
+
const o = r.__vccOpts || r;
|
|
1237
|
+
for (const [e, n] of i)
|
|
1238
1238
|
o[e] = n;
|
|
1239
1239
|
return o;
|
|
1240
|
-
},
|
|
1240
|
+
}, js = /* @__PURE__ */ W(Is, [["__scopeId", "data-v-c14550b7"]]), Vs = { class: "link-value" }, As = ["href"], zs = /* @__PURE__ */ j({
|
|
1241
1241
|
__name: "LinkValue",
|
|
1242
1242
|
props: {
|
|
1243
1243
|
item: {}
|
|
1244
1244
|
},
|
|
1245
|
-
setup(
|
|
1246
|
-
const
|
|
1247
|
-
const e = String(
|
|
1245
|
+
setup(r) {
|
|
1246
|
+
const i = r, o = S(() => {
|
|
1247
|
+
const e = String(i.item.value);
|
|
1248
1248
|
try {
|
|
1249
1249
|
const n = new URL(e);
|
|
1250
1250
|
return n.hostname + n.pathname;
|
|
@@ -1252,26 +1252,26 @@ const Rt = { class: "space-y-0.5" }, Ut = ["onClick"], Wt = ["onClick"], qt = {
|
|
|
1252
1252
|
return e;
|
|
1253
1253
|
}
|
|
1254
1254
|
});
|
|
1255
|
-
return (e, n) => (s(),
|
|
1255
|
+
return (e, n) => (s(), a("div", Vs, [
|
|
1256
1256
|
t("a", {
|
|
1257
1257
|
href: String(e.item.value),
|
|
1258
1258
|
target: "_blank",
|
|
1259
1259
|
rel: "noopener noreferrer",
|
|
1260
1260
|
class: "text-blue-600 hover:text-blue-800 underline text-sm"
|
|
1261
1261
|
}, [
|
|
1262
|
-
|
|
1262
|
+
E(_(o.value) + " ", 1),
|
|
1263
1263
|
n[0] || (n[0] = t("i", { class: "fas fa-external-link-alt ml-1 text-xs" }, null, -1))
|
|
1264
|
-
], 8,
|
|
1264
|
+
], 8, As)
|
|
1265
1265
|
]));
|
|
1266
1266
|
}
|
|
1267
|
-
}),
|
|
1267
|
+
}), Hs = /* @__PURE__ */ W(zs, [["__scopeId", "data-v-e6eb07a6"]]), Es = { class: "date-value" }, Fs = { class: "text-sm text-gray-900" }, Ss = /* @__PURE__ */ j({
|
|
1268
1268
|
__name: "DateValue",
|
|
1269
1269
|
props: {
|
|
1270
1270
|
item: {}
|
|
1271
1271
|
},
|
|
1272
|
-
setup(
|
|
1273
|
-
const
|
|
1274
|
-
const e =
|
|
1272
|
+
setup(r) {
|
|
1273
|
+
const i = r, o = S(() => {
|
|
1274
|
+
const e = i.item.value;
|
|
1275
1275
|
if (e instanceof Date)
|
|
1276
1276
|
return e.toLocaleDateString("uk-UA", {
|
|
1277
1277
|
year: "numeric",
|
|
@@ -1293,21 +1293,21 @@ const Rt = { class: "space-y-0.5" }, Ut = ["onClick"], Wt = ["onClick"], qt = {
|
|
|
1293
1293
|
}
|
|
1294
1294
|
return String(e);
|
|
1295
1295
|
});
|
|
1296
|
-
return (e, n) => (s(),
|
|
1297
|
-
t("span",
|
|
1296
|
+
return (e, n) => (s(), a("div", Es, [
|
|
1297
|
+
t("span", Fs, _(o.value), 1)
|
|
1298
1298
|
]));
|
|
1299
1299
|
}
|
|
1300
|
-
}),
|
|
1300
|
+
}), Os = /* @__PURE__ */ W(Ss, [["__scopeId", "data-v-b9600618"]]), Bs = { class: "status-value" }, Ns = {
|
|
1301
1301
|
key: 0,
|
|
1302
1302
|
class: "mr-1"
|
|
1303
|
-
},
|
|
1303
|
+
}, Ps = /* @__PURE__ */ j({
|
|
1304
1304
|
__name: "StatusValue",
|
|
1305
1305
|
props: {
|
|
1306
1306
|
item: {}
|
|
1307
1307
|
},
|
|
1308
|
-
setup(
|
|
1309
|
-
const
|
|
1310
|
-
switch (String(
|
|
1308
|
+
setup(r) {
|
|
1309
|
+
const i = r, o = S(() => {
|
|
1310
|
+
switch (String(i.item.value).toLowerCase()) {
|
|
1311
1311
|
case "active":
|
|
1312
1312
|
case "активний":
|
|
1313
1313
|
case "успішно":
|
|
@@ -1329,8 +1329,8 @@ const Rt = { class: "space-y-0.5" }, Ut = ["onClick"], Wt = ["onClick"], qt = {
|
|
|
1329
1329
|
default:
|
|
1330
1330
|
return "bg-blue-100 text-blue-800";
|
|
1331
1331
|
}
|
|
1332
|
-
}), e =
|
|
1333
|
-
switch (String(
|
|
1332
|
+
}), e = S(() => {
|
|
1333
|
+
switch (String(i.item.value).toLowerCase()) {
|
|
1334
1334
|
case "active":
|
|
1335
1335
|
case "активний":
|
|
1336
1336
|
case "успішно":
|
|
@@ -1353,50 +1353,50 @@ const Rt = { class: "space-y-0.5" }, Ut = ["onClick"], Wt = ["onClick"], qt = {
|
|
|
1353
1353
|
return "fas fa-info-circle";
|
|
1354
1354
|
}
|
|
1355
1355
|
});
|
|
1356
|
-
return (n,
|
|
1356
|
+
return (n, b) => (s(), a("div", Bs, [
|
|
1357
1357
|
t("span", {
|
|
1358
1358
|
class: D(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium", o.value])
|
|
1359
1359
|
}, [
|
|
1360
|
-
e.value ? (s(),
|
|
1360
|
+
e.value ? (s(), a("span", Ns, [
|
|
1361
1361
|
t("i", {
|
|
1362
1362
|
class: D(e.value)
|
|
1363
1363
|
}, null, 2)
|
|
1364
|
-
])) :
|
|
1365
|
-
|
|
1364
|
+
])) : k("", !0),
|
|
1365
|
+
E(" " + _(String(n.item.value)), 1)
|
|
1366
1366
|
], 2)
|
|
1367
1367
|
]));
|
|
1368
1368
|
}
|
|
1369
|
-
}),
|
|
1369
|
+
}), Us = /* @__PURE__ */ W(Ps, [["__scopeId", "data-v-c72e0b01"]]), Rs = { class: "custom-value" }, Ws = { class: "text-sm text-gray-900" }, qs = /* @__PURE__ */ j({
|
|
1370
1370
|
__name: "CustomValue",
|
|
1371
1371
|
props: {
|
|
1372
1372
|
item: {}
|
|
1373
1373
|
},
|
|
1374
|
-
setup(
|
|
1375
|
-
return (
|
|
1376
|
-
q(
|
|
1377
|
-
item:
|
|
1378
|
-
value:
|
|
1374
|
+
setup(r) {
|
|
1375
|
+
return (i, o) => (s(), a("div", Rs, [
|
|
1376
|
+
q(i.$slots, "default", {
|
|
1377
|
+
item: i.item,
|
|
1378
|
+
value: i.item.value
|
|
1379
1379
|
}, () => [
|
|
1380
|
-
t("span",
|
|
1380
|
+
t("span", Ws, _(String(i.item.value)), 1)
|
|
1381
1381
|
], !0)
|
|
1382
1382
|
]));
|
|
1383
1383
|
}
|
|
1384
|
-
}),
|
|
1384
|
+
}), Gs = /* @__PURE__ */ W(qs, [["__scopeId", "data-v-11a73810"]]), Ks = ["id"], Zs = {
|
|
1385
1385
|
key: 0,
|
|
1386
1386
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
1387
|
-
},
|
|
1387
|
+
}, Js = {
|
|
1388
1388
|
key: 1,
|
|
1389
1389
|
class: "overflow-x-auto"
|
|
1390
|
-
},
|
|
1390
|
+
}, Xs = { class: "min-w-full divide-y divide-gray-200" }, Qs = { class: "bg-white divide-y divide-gray-200" }, Ys = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, eo = { class: "flex items-center gap-2" }, to = ["title"], so = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, oo = {
|
|
1391
1391
|
key: 2,
|
|
1392
1392
|
class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"
|
|
1393
|
-
},
|
|
1393
|
+
}, no = { class: "flex items-start gap-3" }, io = {
|
|
1394
1394
|
key: 0,
|
|
1395
1395
|
class: "flex-shrink-0"
|
|
1396
|
-
},
|
|
1396
|
+
}, lo = { class: "flex-1 min-w-0" }, ao = { class: "flex items-center gap-2 mb-2" }, ro = { class: "text-sm font-medium text-gray-900" }, co = ["title"], uo = {
|
|
1397
1397
|
key: 3,
|
|
1398
1398
|
class: "overflow-x-auto"
|
|
1399
|
-
},
|
|
1399
|
+
}, po = { class: "min-w-full divide-y divide-gray-200" }, mo = { class: "bg-white divide-y divide-gray-200" }, go = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, ho = { class: "flex items-center gap-2" }, fo = ["title"], yo = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, vo = /* @__PURE__ */ j({
|
|
1400
1400
|
__name: "DescriptionListWidget",
|
|
1401
1401
|
props: {
|
|
1402
1402
|
title: {},
|
|
@@ -1406,113 +1406,113 @@ const Rt = { class: "space-y-0.5" }, Ut = ["onClick"], Wt = ["onClick"], qt = {
|
|
|
1406
1406
|
className: {},
|
|
1407
1407
|
style: {}
|
|
1408
1408
|
},
|
|
1409
|
-
setup(
|
|
1410
|
-
const
|
|
1409
|
+
setup(r) {
|
|
1410
|
+
const i = (o) => {
|
|
1411
1411
|
switch (o.type) {
|
|
1412
1412
|
case "link":
|
|
1413
|
-
return
|
|
1413
|
+
return Hs;
|
|
1414
1414
|
case "date":
|
|
1415
|
-
return Es;
|
|
1416
|
-
case "status":
|
|
1417
1415
|
return Os;
|
|
1418
|
-
case "
|
|
1416
|
+
case "status":
|
|
1419
1417
|
return Us;
|
|
1418
|
+
case "custom":
|
|
1419
|
+
return Gs;
|
|
1420
1420
|
default:
|
|
1421
|
-
return
|
|
1421
|
+
return js;
|
|
1422
1422
|
}
|
|
1423
1423
|
};
|
|
1424
|
-
return (o, e) => (s(),
|
|
1424
|
+
return (o, e) => (s(), a("div", {
|
|
1425
1425
|
class: D(["description-list-widget", o.className]),
|
|
1426
1426
|
id: o.id,
|
|
1427
|
-
style:
|
|
1427
|
+
style: Q(o.style)
|
|
1428
1428
|
}, [
|
|
1429
|
-
o.title ? (s(),
|
|
1430
|
-
o.view === "table" ? (s(),
|
|
1431
|
-
t("table",
|
|
1432
|
-
t("tbody",
|
|
1433
|
-
(s(!0),
|
|
1429
|
+
o.title ? (s(), a("h3", Zs, _(o.title), 1)) : k("", !0),
|
|
1430
|
+
o.view === "table" ? (s(), a("div", Js, [
|
|
1431
|
+
t("table", Xs, [
|
|
1432
|
+
t("tbody", Qs, [
|
|
1433
|
+
(s(!0), a(I, null, H(o.items, (n) => (s(), a("tr", {
|
|
1434
1434
|
key: n.id || n.label
|
|
1435
1435
|
}, [
|
|
1436
|
-
t("td",
|
|
1437
|
-
t("div",
|
|
1438
|
-
n.icon ? (s(),
|
|
1436
|
+
t("td", Ys, [
|
|
1437
|
+
t("div", eo, [
|
|
1438
|
+
n.icon ? (s(), a("i", {
|
|
1439
1439
|
key: 0,
|
|
1440
1440
|
class: D([n.icon, "text-gray-500"])
|
|
1441
|
-
}, null, 2)) :
|
|
1442
|
-
|
|
1443
|
-
n.tooltip ? (s(),
|
|
1441
|
+
}, null, 2)) : k("", !0),
|
|
1442
|
+
E(" " + _(n.label) + " ", 1),
|
|
1443
|
+
n.tooltip ? (s(), a("span", {
|
|
1444
1444
|
key: 1,
|
|
1445
1445
|
class: "text-gray-400 cursor-help",
|
|
1446
1446
|
title: n.tooltip
|
|
1447
|
-
},
|
|
1447
|
+
}, e[0] || (e[0] = [
|
|
1448
1448
|
t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
|
|
1449
|
-
])
|
|
1449
|
+
]), 8, to)) : k("", !0)
|
|
1450
1450
|
])
|
|
1451
1451
|
]),
|
|
1452
|
-
t("td",
|
|
1453
|
-
(s(),
|
|
1452
|
+
t("td", so, [
|
|
1453
|
+
(s(), z(N(i(n)), { item: n }, null, 8, ["item"]))
|
|
1454
1454
|
])
|
|
1455
1455
|
]))), 128))
|
|
1456
1456
|
])
|
|
1457
1457
|
])
|
|
1458
|
-
])) : o.view === "grid" ? (s(),
|
|
1459
|
-
(s(!0),
|
|
1458
|
+
])) : o.view === "grid" ? (s(), a("div", oo, [
|
|
1459
|
+
(s(!0), a(I, null, H(o.items, (n) => (s(), a("div", {
|
|
1460
1460
|
key: n.id || n.label,
|
|
1461
1461
|
class: "description-item-card bg-white border border-gray-200 rounded-lg p-4"
|
|
1462
1462
|
}, [
|
|
1463
|
-
t("div",
|
|
1464
|
-
n.icon ? (s(),
|
|
1463
|
+
t("div", no, [
|
|
1464
|
+
n.icon ? (s(), a("div", io, [
|
|
1465
1465
|
t("i", {
|
|
1466
1466
|
class: D([n.icon, "text-gray-500 text-lg"])
|
|
1467
1467
|
}, null, 2)
|
|
1468
|
-
])) :
|
|
1469
|
-
t("div",
|
|
1470
|
-
t("div",
|
|
1471
|
-
t("h4",
|
|
1472
|
-
n.tooltip ? (s(),
|
|
1468
|
+
])) : k("", !0),
|
|
1469
|
+
t("div", lo, [
|
|
1470
|
+
t("div", ao, [
|
|
1471
|
+
t("h4", ro, _(n.label), 1),
|
|
1472
|
+
n.tooltip ? (s(), a("span", {
|
|
1473
1473
|
key: 0,
|
|
1474
1474
|
class: "text-gray-400 cursor-help",
|
|
1475
1475
|
title: n.tooltip
|
|
1476
|
-
},
|
|
1476
|
+
}, e[1] || (e[1] = [
|
|
1477
1477
|
t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
|
|
1478
|
-
])
|
|
1478
|
+
]), 8, co)) : k("", !0)
|
|
1479
1479
|
]),
|
|
1480
|
-
(s(),
|
|
1480
|
+
(s(), z(N(i(n)), { item: n }, null, 8, ["item"]))
|
|
1481
1481
|
])
|
|
1482
1482
|
])
|
|
1483
1483
|
]))), 128))
|
|
1484
|
-
])) : (s(),
|
|
1485
|
-
t("table",
|
|
1486
|
-
t("tbody",
|
|
1487
|
-
(s(!0),
|
|
1484
|
+
])) : (s(), a("div", uo, [
|
|
1485
|
+
t("table", po, [
|
|
1486
|
+
t("tbody", mo, [
|
|
1487
|
+
(s(!0), a(I, null, H(o.items, (n) => (s(), a("tr", {
|
|
1488
1488
|
key: n.id || n.label
|
|
1489
1489
|
}, [
|
|
1490
|
-
t("td",
|
|
1491
|
-
t("div",
|
|
1492
|
-
n.icon ? (s(),
|
|
1490
|
+
t("td", go, [
|
|
1491
|
+
t("div", ho, [
|
|
1492
|
+
n.icon ? (s(), a("i", {
|
|
1493
1493
|
key: 0,
|
|
1494
1494
|
class: D([n.icon, "text-gray-500"])
|
|
1495
|
-
}, null, 2)) :
|
|
1496
|
-
|
|
1497
|
-
n.tooltip ? (s(),
|
|
1495
|
+
}, null, 2)) : k("", !0),
|
|
1496
|
+
E(" " + _(n.label) + " ", 1),
|
|
1497
|
+
n.tooltip ? (s(), a("span", {
|
|
1498
1498
|
key: 1,
|
|
1499
1499
|
class: "text-gray-400 cursor-help",
|
|
1500
1500
|
title: n.tooltip
|
|
1501
|
-
},
|
|
1501
|
+
}, e[2] || (e[2] = [
|
|
1502
1502
|
t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
|
|
1503
|
-
])
|
|
1503
|
+
]), 8, fo)) : k("", !0)
|
|
1504
1504
|
])
|
|
1505
1505
|
]),
|
|
1506
|
-
t("td",
|
|
1507
|
-
(s(),
|
|
1506
|
+
t("td", yo, [
|
|
1507
|
+
(s(), z(N(i(n)), { item: n }, null, 8, ["item"]))
|
|
1508
1508
|
])
|
|
1509
1509
|
]))), 128))
|
|
1510
1510
|
])
|
|
1511
1511
|
])
|
|
1512
1512
|
]))
|
|
1513
|
-
], 14,
|
|
1513
|
+
], 14, Ks));
|
|
1514
1514
|
}
|
|
1515
|
-
}),
|
|
1515
|
+
}), De = /* @__PURE__ */ W(vo, [["__scopeId", "data-v-36d43e50"]]), bo = {
|
|
1516
1516
|
draw: {
|
|
1517
1517
|
toolbar: {
|
|
1518
1518
|
actions: {
|
|
@@ -1620,35 +1620,35 @@ const Rt = { class: "space-y-0.5" }, Ut = ["onClick"], Wt = ["onClick"], qt = {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
}
|
|
1622
1622
|
};
|
|
1623
|
-
function
|
|
1624
|
-
return
|
|
1623
|
+
function xo(r) {
|
|
1624
|
+
return r ? r.type === "FeatureCollection" || r.type === "Feature" ? r : r.geom ? {
|
|
1625
1625
|
type: "Feature",
|
|
1626
1626
|
geometry: {
|
|
1627
|
-
type:
|
|
1628
|
-
coordinates:
|
|
1627
|
+
type: r.geom.type,
|
|
1628
|
+
coordinates: r.geom.coordinates
|
|
1629
1629
|
},
|
|
1630
1630
|
properties: {}
|
|
1631
|
-
} :
|
|
1631
|
+
} : r.type && r.coordinates ? {
|
|
1632
1632
|
type: "Feature",
|
|
1633
|
-
geometry:
|
|
1633
|
+
geometry: r,
|
|
1634
1634
|
properties: {}
|
|
1635
1635
|
} : null : null;
|
|
1636
1636
|
}
|
|
1637
|
-
const
|
|
1637
|
+
const ko = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, _o = {
|
|
1638
1638
|
key: 1,
|
|
1639
1639
|
class: "bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"
|
|
1640
|
-
},
|
|
1640
|
+
}, wo = { class: "flex items-center justify-between p-2 border-b" }, $o = { class: "p-2 border-b" }, Co = { class: "flex items-center" }, Mo = { class: "flex items-center" }, Lo = { class: "flex items-center" }, To = { class: "p-2" }, Do = { class: "flex items-center" }, Io = { class: "flex items-center" }, jo = ["onUpdate:modelValue", "onChange"], Vo = { class: "ml-2" }, re = /* @__PURE__ */ j({
|
|
1641
1641
|
__name: "MapWidget",
|
|
1642
1642
|
props: {
|
|
1643
|
+
pattern: {},
|
|
1643
1644
|
geom: {},
|
|
1644
1645
|
id: {},
|
|
1645
|
-
|
|
1646
|
-
style: {}
|
|
1646
|
+
tms: {}
|
|
1647
1647
|
},
|
|
1648
|
-
setup(
|
|
1649
|
-
const
|
|
1648
|
+
setup(r) {
|
|
1649
|
+
const i = r, o = $(null);
|
|
1650
1650
|
let e, n;
|
|
1651
|
-
const
|
|
1651
|
+
const b = {
|
|
1652
1652
|
topo100: {
|
|
1653
1653
|
url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"
|
|
1654
1654
|
},
|
|
@@ -1658,69 +1658,76 @@ const vo = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, bo = {
|
|
|
1658
1658
|
osmb: {
|
|
1659
1659
|
url: "https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"
|
|
1660
1660
|
}
|
|
1661
|
-
},
|
|
1662
|
-
let
|
|
1663
|
-
const
|
|
1664
|
-
function
|
|
1665
|
-
return
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
const
|
|
1673
|
-
|
|
1674
|
-
|
|
1661
|
+
}, l = $("topo100");
|
|
1662
|
+
let v;
|
|
1663
|
+
const u = $(!0), p = $(!1), d = $(y());
|
|
1664
|
+
function y() {
|
|
1665
|
+
return i.tms ? (Array.isArray(i.tms) ? i.tms : i.tms?.split(",")).map((c, f) => ({ url: i.pattern ? i.pattern.replace("{{id}}", c) : c, name: "Шар " + f, visible: !0, i: f })) : [];
|
|
1666
|
+
}
|
|
1667
|
+
function m() {
|
|
1668
|
+
return new Promise((w, c) => {
|
|
1669
|
+
if (window.L && window.L.Draw) return w(0);
|
|
1670
|
+
const f = (F) => {
|
|
1671
|
+
if (Array.from(document.styleSheets).some((K) => K?.href?.includes(F))) return;
|
|
1672
|
+
const A = document.createElement("link");
|
|
1673
|
+
A.rel = "stylesheet", A.href = F, document.head.appendChild(A);
|
|
1674
|
+
}, g = (F) => new Promise((U, A) => {
|
|
1675
|
+
const K = Array.from(document.scripts).find((J) => J.src === F);
|
|
1676
|
+
if (K) {
|
|
1677
|
+
K.addEventListener("load", () => U()), K.addEventListener("error", (J) => A(J));
|
|
1675
1678
|
return;
|
|
1676
1679
|
}
|
|
1677
|
-
const
|
|
1678
|
-
|
|
1680
|
+
const Z = document.createElement("script");
|
|
1681
|
+
Z.src = F, Z.async = !0, Z.onload = () => U(), Z.onerror = (J) => A(J), document.body.appendChild(Z);
|
|
1679
1682
|
});
|
|
1680
|
-
|
|
1683
|
+
f("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), f("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), g("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => g("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => w(0)).catch(c);
|
|
1681
1684
|
});
|
|
1682
1685
|
}
|
|
1683
|
-
|
|
1684
|
-
await
|
|
1685
|
-
const
|
|
1686
|
-
if (
|
|
1686
|
+
ue(async () => {
|
|
1687
|
+
await m(), L.drawLocal = bo, e = L.map(o.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(e), v = L.tileLayer(b.topo100.url, { maxZoom: 19 }).addTo(e), l.value = "topo100", n = new L.FeatureGroup().addTo(e), d.value.length && h(0);
|
|
1688
|
+
const w = xo(i.geom);
|
|
1689
|
+
if (w) {
|
|
1687
1690
|
const c = [];
|
|
1688
|
-
L.geoJSON(
|
|
1691
|
+
L.geoJSON(w).eachLayer((f) => c.push(f)), c.length && n.addLayer(c[0]), n.toGeoJSON(), T();
|
|
1689
1692
|
}
|
|
1690
1693
|
});
|
|
1691
|
-
function
|
|
1694
|
+
function T(w = 30) {
|
|
1692
1695
|
const c = n.getLayers();
|
|
1693
1696
|
if (!c.length) return;
|
|
1694
|
-
const
|
|
1695
|
-
|
|
1697
|
+
const g = L.featureGroup(c).getBounds();
|
|
1698
|
+
g && g.isValid() && e.fitBounds(g, { padding: [w, w] });
|
|
1696
1699
|
}
|
|
1697
|
-
function
|
|
1698
|
-
|
|
1699
|
-
const c =
|
|
1700
|
-
|
|
1700
|
+
function O(w) {
|
|
1701
|
+
v && v.removeFrom(e);
|
|
1702
|
+
const c = b[w];
|
|
1703
|
+
v = L.tileLayer(c.url, c.options || {}).addTo(e), l.value = w;
|
|
1701
1704
|
}
|
|
1702
|
-
function
|
|
1703
|
-
|
|
1705
|
+
function B() {
|
|
1706
|
+
O(l.value);
|
|
1704
1707
|
}
|
|
1705
|
-
function
|
|
1706
|
-
n && (
|
|
1708
|
+
function x() {
|
|
1709
|
+
n && (u.value ? n.addTo(e) : n.removeFrom(e));
|
|
1707
1710
|
}
|
|
1708
|
-
|
|
1711
|
+
function h(w) {
|
|
1712
|
+
const c = d.value[w];
|
|
1713
|
+
c.layer || (c.layer = L.tileLayer(c.url, { maxZoom: 19 })), c.visible ? c.layer.addTo(e) : c.layer.removeFrom(e);
|
|
1714
|
+
}
|
|
1715
|
+
return (w, c) => (s(), a("div", ko, [
|
|
1709
1716
|
t("div", {
|
|
1710
1717
|
ref_key: "mapContainer",
|
|
1711
1718
|
ref: o,
|
|
1712
1719
|
class: "w-full h-full min-h-[300px]"
|
|
1713
1720
|
}, null, 512),
|
|
1714
|
-
p.value ?
|
|
1721
|
+
p.value ? k("", !0) : (s(), a("div", {
|
|
1715
1722
|
key: 0,
|
|
1716
|
-
onClick: c[0] || (c[0] = (
|
|
1723
|
+
onClick: c[0] || (c[0] = (f) => p.value = !0),
|
|
1717
1724
|
class: "z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer"
|
|
1718
1725
|
}, " Шари ")),
|
|
1719
|
-
p.value ? (s(),
|
|
1720
|
-
t("div",
|
|
1726
|
+
p.value ? (s(), a("div", _o, [
|
|
1727
|
+
t("div", wo, [
|
|
1721
1728
|
c[7] || (c[7] = t("div", null, "Шари", -1)),
|
|
1722
|
-
(s(),
|
|
1723
|
-
onClick: c[1] || (c[1] = (
|
|
1729
|
+
(s(), a("svg", {
|
|
1730
|
+
onClick: c[1] || (c[1] = (f) => p.value = !1),
|
|
1724
1731
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1725
1732
|
viewBox: "0 0 24 24",
|
|
1726
1733
|
fill: "none",
|
|
@@ -1729,7 +1736,7 @@ const vo = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, bo = {
|
|
|
1729
1736
|
"stroke-linecap": "round",
|
|
1730
1737
|
"stroke-linejoin": "round",
|
|
1731
1738
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"
|
|
1732
|
-
},
|
|
1739
|
+
}, c[6] || (c[6] = [
|
|
1733
1740
|
t("path", {
|
|
1734
1741
|
stroke: "none",
|
|
1735
1742
|
d: "M0 0h24v24H0z",
|
|
@@ -1737,71 +1744,81 @@ const vo = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, bo = {
|
|
|
1737
1744
|
}, null, -1),
|
|
1738
1745
|
t("path", { d: "M18 6l-12 12" }, null, -1),
|
|
1739
1746
|
t("path", { d: "M6 6l12 12" }, null, -1)
|
|
1740
|
-
])
|
|
1747
|
+
])))
|
|
1741
1748
|
]),
|
|
1742
|
-
t("div",
|
|
1749
|
+
t("div", $o, [
|
|
1743
1750
|
t("div", null, [
|
|
1744
|
-
t("label",
|
|
1745
|
-
|
|
1751
|
+
t("label", Co, [
|
|
1752
|
+
P(t("input", {
|
|
1746
1753
|
type: "radio",
|
|
1747
1754
|
name: "base-layer",
|
|
1748
1755
|
value: "topo100",
|
|
1749
|
-
"onUpdate:modelValue": c[2] || (c[2] = (
|
|
1750
|
-
onChange:
|
|
1756
|
+
"onUpdate:modelValue": c[2] || (c[2] = (f) => l.value = f),
|
|
1757
|
+
onChange: B
|
|
1751
1758
|
}, null, 544), [
|
|
1752
|
-
[
|
|
1759
|
+
[se, l.value]
|
|
1753
1760
|
]),
|
|
1754
1761
|
c[8] || (c[8] = t("span", { class: "ml-2" }, "Карта України", -1))
|
|
1755
1762
|
])
|
|
1756
1763
|
]),
|
|
1757
1764
|
t("div", null, [
|
|
1758
|
-
t("label",
|
|
1759
|
-
|
|
1765
|
+
t("label", Mo, [
|
|
1766
|
+
P(t("input", {
|
|
1760
1767
|
type: "radio",
|
|
1761
1768
|
name: "base-layer",
|
|
1762
1769
|
value: "orto10",
|
|
1763
|
-
"onUpdate:modelValue": c[3] || (c[3] = (
|
|
1764
|
-
onChange:
|
|
1770
|
+
"onUpdate:modelValue": c[3] || (c[3] = (f) => l.value = f),
|
|
1771
|
+
onChange: B
|
|
1765
1772
|
}, null, 544), [
|
|
1766
|
-
[
|
|
1773
|
+
[se, l.value]
|
|
1767
1774
|
]),
|
|
1768
1775
|
c[9] || (c[9] = t("span", { class: "ml-2" }, "Ortophoto 1:10К", -1))
|
|
1769
1776
|
])
|
|
1770
1777
|
]),
|
|
1771
1778
|
t("div", null, [
|
|
1772
|
-
t("label",
|
|
1773
|
-
|
|
1779
|
+
t("label", Lo, [
|
|
1780
|
+
P(t("input", {
|
|
1774
1781
|
type: "radio",
|
|
1775
1782
|
name: "base-layer",
|
|
1776
1783
|
value: "osmb",
|
|
1777
|
-
"onUpdate:modelValue": c[4] || (c[4] = (
|
|
1778
|
-
onChange:
|
|
1784
|
+
"onUpdate:modelValue": c[4] || (c[4] = (f) => l.value = f),
|
|
1785
|
+
onChange: B
|
|
1779
1786
|
}, null, 544), [
|
|
1780
|
-
[
|
|
1787
|
+
[se, l.value]
|
|
1781
1788
|
]),
|
|
1782
1789
|
c[10] || (c[10] = t("span", { class: "ml-2" }, "Open Street Map", -1))
|
|
1783
1790
|
])
|
|
1784
1791
|
])
|
|
1785
1792
|
]),
|
|
1786
|
-
t("div",
|
|
1787
|
-
t("label",
|
|
1788
|
-
|
|
1793
|
+
t("div", To, [
|
|
1794
|
+
t("label", Do, [
|
|
1795
|
+
P(t("input", {
|
|
1789
1796
|
type: "checkbox",
|
|
1790
|
-
"onUpdate:modelValue": c[5] || (c[5] = (
|
|
1791
|
-
onChange:
|
|
1797
|
+
"onUpdate:modelValue": c[5] || (c[5] = (f) => u.value = f),
|
|
1798
|
+
onChange: x
|
|
1792
1799
|
}, null, 544), [
|
|
1793
|
-
[
|
|
1800
|
+
[he, u.value]
|
|
1794
1801
|
]),
|
|
1795
|
-
c[11] || (c[11] = t("span", { class: "ml-2" }, "
|
|
1796
|
-
])
|
|
1802
|
+
c[11] || (c[11] = t("span", { class: "ml-2" }, " Геометрія/Межі ", -1))
|
|
1803
|
+
]),
|
|
1804
|
+
i.tms ? (s(!0), a(I, { key: 0 }, H(d.value, (f) => (s(), a("label", Io, [
|
|
1805
|
+
P(t("input", {
|
|
1806
|
+
type: "checkbox",
|
|
1807
|
+
"onUpdate:modelValue": (g) => f.visible = g,
|
|
1808
|
+
onChange: (g) => h(f.i)
|
|
1809
|
+
}, null, 40, jo), [
|
|
1810
|
+
[he, f.visible]
|
|
1811
|
+
]),
|
|
1812
|
+
t("span", Vo, _(f.name), 1)
|
|
1813
|
+
]))), 256)) : k("", !0)
|
|
1797
1814
|
])
|
|
1798
|
-
])) :
|
|
1815
|
+
])) : k("", !0)
|
|
1799
1816
|
]));
|
|
1800
1817
|
}
|
|
1801
|
-
}),
|
|
1818
|
+
}), Ao = { class: "flex justify-between items-center mb-[15px]" }, zo = { class: "font-semibold text-[16px]" }, Ho = { class: "overflow-x-auto" }, Eo = { class: "min-w-full relative divide-y-2 divide-gray-200 bg-white min-w-full overflow-auto divide-y-2 divide-gray-200 bg-white text-[12px] text-gray-600" }, Fo = { class: "text-left font-medium text-gray-700" }, So = { class: "py-2 min-w-[200px]" }, Oo = {
|
|
1802
1819
|
key: 0,
|
|
1803
1820
|
class: "py-2 min-w-[200px]"
|
|
1804
|
-
},
|
|
1821
|
+
}, Bo = { class: "divide-y divide-gray-200" }, No = { class: "bg-white odd:bg-gray-50" }, Po = { class: "py-2 pr-5" }, Uo = ["href"], Ro = { class: "py-2 pr-5 gap-2 inline-flex" }, Wo = ["onClick"], qo = ["onClick"], Go = /* @__PURE__ */ j({
|
|
1805
1822
|
__name: "TableWidget",
|
|
1806
1823
|
props: {
|
|
1807
1824
|
name: {},
|
|
@@ -1815,77 +1832,78 @@ const vo = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, bo = {
|
|
|
1815
1832
|
type: {},
|
|
1816
1833
|
token: {},
|
|
1817
1834
|
count: {},
|
|
1835
|
+
props: {},
|
|
1818
1836
|
items: {}
|
|
1819
1837
|
},
|
|
1820
|
-
setup(
|
|
1821
|
-
const
|
|
1822
|
-
async function
|
|
1823
|
-
const
|
|
1824
|
-
o.value =
|
|
1838
|
+
setup(r) {
|
|
1839
|
+
const i = Ve(), o = $([]), e = $([]), n = r, b = $([]), l = $(""), v = $("");
|
|
1840
|
+
async function u() {
|
|
1841
|
+
const x = await fetch("/api/data/" + n.token).then((h) => h.json());
|
|
1842
|
+
o.value = x.rows, e.value = x.columns, b.value = x.actions, l.value = x.form, v.value = x.addToken;
|
|
1825
1843
|
}
|
|
1826
|
-
const { $notify: p = console.log, $confirm:
|
|
1827
|
-
async function m(
|
|
1828
|
-
await
|
|
1844
|
+
const { $notify: p = console.log, $confirm: d, $form: y } = i?.appContext?.config?.globalProperties || {};
|
|
1845
|
+
async function m(x) {
|
|
1846
|
+
await y({ token: x.token }), u();
|
|
1829
1847
|
}
|
|
1830
|
-
function
|
|
1831
|
-
|
|
1848
|
+
function T() {
|
|
1849
|
+
y({ token: v.value });
|
|
1832
1850
|
}
|
|
1833
|
-
function O(
|
|
1834
|
-
|
|
1851
|
+
function O(x) {
|
|
1852
|
+
d({
|
|
1835
1853
|
title: "Підтвердіть дію",
|
|
1836
1854
|
type: "error",
|
|
1837
1855
|
message: "Ви впевненні що бажаєте видалити даний рядок?",
|
|
1838
1856
|
onConfirm: async () => {
|
|
1839
|
-
const
|
|
1840
|
-
if (!
|
|
1841
|
-
const { error:
|
|
1842
|
-
p({ title: "Помилка", type: "warning", message:
|
|
1857
|
+
const h = await fetch(`/api/table/${x.token}`, { method: "DELETE" });
|
|
1858
|
+
if (!h.ok) {
|
|
1859
|
+
const { error: w, code: c } = await h.json();
|
|
1860
|
+
p({ title: "Помилка", type: "warning", message: w });
|
|
1843
1861
|
return;
|
|
1844
1862
|
}
|
|
1845
|
-
p({ title: "Видаленно", message: "Успішно видалено" }), await
|
|
1863
|
+
p({ title: "Видаленно", message: "Успішно видалено" }), await u();
|
|
1846
1864
|
}
|
|
1847
1865
|
});
|
|
1848
1866
|
}
|
|
1849
|
-
|
|
1850
|
-
await
|
|
1867
|
+
ue(async () => {
|
|
1868
|
+
await u();
|
|
1851
1869
|
});
|
|
1852
|
-
function
|
|
1853
|
-
return
|
|
1870
|
+
function B(x, h) {
|
|
1871
|
+
return h.format?.toLowerCase() === "text" ? x[h.name] : x[h.name + "_data"] ?? x[h.name + "_text"] ?? "-";
|
|
1854
1872
|
}
|
|
1855
|
-
return (
|
|
1856
|
-
t("div",
|
|
1857
|
-
t("div",
|
|
1858
|
-
|
|
1873
|
+
return (x, h) => (s(), a("div", null, [
|
|
1874
|
+
t("div", Ao, [
|
|
1875
|
+
t("div", zo, _(x.title), 1),
|
|
1876
|
+
b.value.includes("add") && v.value ? (s(), a("button", {
|
|
1859
1877
|
key: 0,
|
|
1860
|
-
onClick:
|
|
1878
|
+
onClick: T,
|
|
1861
1879
|
class: "px-2 py-1 inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border border-transparent hover:text-white ring-offset-white bg-blue-100 text-blue-500 hover:bg-blue-500 focus:ring-blue-500"
|
|
1862
|
-
}, "Додати")) :
|
|
1880
|
+
}, "Додати")) : k("", !0)
|
|
1863
1881
|
]),
|
|
1864
|
-
t("div",
|
|
1865
|
-
t("table",
|
|
1866
|
-
t("thead",
|
|
1882
|
+
t("div", Ho, [
|
|
1883
|
+
t("table", Eo, [
|
|
1884
|
+
t("thead", Fo, [
|
|
1867
1885
|
t("tr", null, [
|
|
1868
|
-
(s(!0),
|
|
1869
|
-
|
|
1886
|
+
(s(!0), a(I, null, H(e.value, (w) => (s(), a("th", So, _(w.ua), 1))), 256)),
|
|
1887
|
+
b.value.includes("edit") ? (s(), a("th", Oo, " Дії ")) : k("", !0)
|
|
1870
1888
|
])
|
|
1871
1889
|
]),
|
|
1872
|
-
t("tbody",
|
|
1873
|
-
(s(!0),
|
|
1874
|
-
(s(!0),
|
|
1875
|
-
|
|
1890
|
+
t("tbody", Bo, [
|
|
1891
|
+
(s(!0), a(I, null, H(o.value, (w) => (s(), a("tr", No, [
|
|
1892
|
+
(s(!0), a(I, null, H(e.value, (c) => (s(), a("td", Po, [
|
|
1893
|
+
c.link ? (s(), a("a", {
|
|
1876
1894
|
key: 0,
|
|
1877
|
-
href:
|
|
1895
|
+
href: c.link.replace("{{id}}", w.id),
|
|
1878
1896
|
class: "font-medium cursor-pointer text-start text-wrap text-cyan-800 decoration-2 focus:outline-none focus:underline hover:text-cyan-700 hover:underline"
|
|
1879
|
-
},
|
|
1880
|
-
|
|
1897
|
+
}, _(B(w, c)), 9, Uo)) : (s(), a(I, { key: 1 }, [
|
|
1898
|
+
E(_(B(w, c)), 1)
|
|
1881
1899
|
], 64))
|
|
1882
1900
|
]))), 256)),
|
|
1883
|
-
t("td",
|
|
1884
|
-
|
|
1901
|
+
t("td", Ro, [
|
|
1902
|
+
w.token ? (s(), a("button", {
|
|
1885
1903
|
key: 0,
|
|
1886
|
-
onClick: (
|
|
1904
|
+
onClick: (c) => m(w),
|
|
1887
1905
|
class: "inline-flex items-center justify-center bg-white border rounded-md size-7 gap-x-2 hover:bg-gray-100"
|
|
1888
|
-
}, [
|
|
1906
|
+
}, h[0] || (h[0] = [
|
|
1889
1907
|
t("svg", {
|
|
1890
1908
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1891
1909
|
width: "12px",
|
|
@@ -1914,14 +1932,14 @@ const vo = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, bo = {
|
|
|
1914
1932
|
"stroke-width": "2"
|
|
1915
1933
|
})
|
|
1916
1934
|
], -1)
|
|
1917
|
-
])
|
|
1918
|
-
|
|
1935
|
+
]), 8, Wo)) : k("", !0),
|
|
1936
|
+
w.token ? (s(), a("button", {
|
|
1919
1937
|
key: 1,
|
|
1920
|
-
onClick: (
|
|
1938
|
+
onClick: (c) => O(w),
|
|
1921
1939
|
class: "inline-flex items-center justify-center bg-white border rounded-md size-7 gap-x-2 hover:bg-gray-100"
|
|
1922
|
-
}, [
|
|
1923
|
-
|
|
1924
|
-
])
|
|
1940
|
+
}, h[1] || (h[1] = [
|
|
1941
|
+
Ae('<svg class="flex-shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="12px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line></svg>', 1)
|
|
1942
|
+
]), 8, qo)) : k("", !0)
|
|
1925
1943
|
])
|
|
1926
1944
|
]))), 256))
|
|
1927
1945
|
])
|
|
@@ -1929,21 +1947,21 @@ const vo = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, bo = {
|
|
|
1929
1947
|
])
|
|
1930
1948
|
]));
|
|
1931
1949
|
}
|
|
1932
|
-
}),
|
|
1933
|
-
"vs-widget-map":
|
|
1934
|
-
"vs-widget-comments":
|
|
1935
|
-
"vs-widget-history":
|
|
1936
|
-
"vs-widget-gallery":
|
|
1937
|
-
"vs-widget-file":
|
|
1938
|
-
"vs-widget-list":
|
|
1939
|
-
"vs-widget-table":
|
|
1940
|
-
},
|
|
1950
|
+
}), Ie = {
|
|
1951
|
+
"vs-widget-map": re,
|
|
1952
|
+
"vs-widget-comments": ie,
|
|
1953
|
+
"vs-widget-history": le,
|
|
1954
|
+
"vs-widget-gallery": ae,
|
|
1955
|
+
"vs-widget-file": Te,
|
|
1956
|
+
"vs-widget-list": De,
|
|
1957
|
+
"vs-widget-table": Go
|
|
1958
|
+
}, Ko = {
|
|
1941
1959
|
key: 0,
|
|
1942
1960
|
class: "mb-4 pb-2 border-b border-gray-200"
|
|
1943
|
-
},
|
|
1961
|
+
}, Zo = { class: "text-lg font-semibold text-gray-900" }, Jo = ["innerHTML"], Xo = {
|
|
1944
1962
|
key: 0,
|
|
1945
1963
|
class: "mb-4 pb-2 border-b border-gray-200"
|
|
1946
|
-
},
|
|
1964
|
+
}, Qo = { class: "text-lg font-semibold text-gray-900" }, Yo = ["innerHTML"], je = /* @__PURE__ */ j({
|
|
1947
1965
|
__name: "CardItem",
|
|
1948
1966
|
props: {
|
|
1949
1967
|
items: {},
|
|
@@ -1960,57 +1978,61 @@ const vo = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, bo = {
|
|
|
1960
1978
|
className: {},
|
|
1961
1979
|
style: {}
|
|
1962
1980
|
},
|
|
1963
|
-
setup(
|
|
1964
|
-
const
|
|
1965
|
-
[`lg:col-span-${
|
|
1981
|
+
setup(r) {
|
|
1982
|
+
const i = r, o = S(() => i.col ? {
|
|
1983
|
+
[`lg:col-span-${i.col}`]: !0
|
|
1966
1984
|
} : {});
|
|
1967
|
-
function e(
|
|
1968
|
-
return
|
|
1985
|
+
function e(l) {
|
|
1986
|
+
return Ie[l] || l;
|
|
1969
1987
|
}
|
|
1970
|
-
const n =
|
|
1971
|
-
|
|
1972
|
-
|
|
1988
|
+
const n = function(l = {}) {
|
|
1989
|
+
return l.props && Object.entries(l.props).forEach(([v, u]) => {
|
|
1990
|
+
l[v] = i.data[u];
|
|
1991
|
+
}), l;
|
|
1992
|
+
}, b = S(() => {
|
|
1993
|
+
const l = {};
|
|
1994
|
+
return l.col && (l.col = l.col), l;
|
|
1973
1995
|
});
|
|
1974
|
-
return (
|
|
1996
|
+
return (l, v) => (s(), a("div", {
|
|
1975
1997
|
class: D(["w-full bg-gray-50 rounded-lg p-4 col-span-12", o.value])
|
|
1976
1998
|
}, [
|
|
1977
|
-
|
|
1978
|
-
t("h3",
|
|
1979
|
-
])) :
|
|
1980
|
-
|
|
1999
|
+
l.title ? (s(), a("div", Ko, [
|
|
2000
|
+
t("h3", Zo, _(l.title), 1)
|
|
2001
|
+
])) : k("", !0),
|
|
2002
|
+
l.html ? (s(), a("div", {
|
|
1981
2003
|
key: 1,
|
|
1982
|
-
innerHTML:
|
|
2004
|
+
innerHTML: l.html,
|
|
1983
2005
|
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"
|
|
1984
|
-
}, null, 8,
|
|
2006
|
+
}, null, 8, Jo)) : l.type?.includes("tabs") ? (s(), z(de, {
|
|
1985
2007
|
key: 2,
|
|
1986
2008
|
view: "tab",
|
|
1987
|
-
panels:
|
|
1988
|
-
data:
|
|
1989
|
-
}, null, 8, ["panels", "data"])) : (s(!0),
|
|
1990
|
-
|
|
1991
|
-
t("h3",
|
|
1992
|
-
])) :
|
|
1993
|
-
|
|
2009
|
+
panels: l.items,
|
|
2010
|
+
data: l.data
|
|
2011
|
+
}, null, 8, ["panels", "data"])) : (s(!0), a(I, { key: 3 }, H(l.items, (u) => (s(), a(I, null, [
|
|
2012
|
+
u.title || u.label ? (s(), a("div", Xo, [
|
|
2013
|
+
t("h3", Qo, _(u.title || u.label), 1)
|
|
2014
|
+
])) : k("", !0),
|
|
2015
|
+
u.html ? (s(), a("div", {
|
|
1994
2016
|
key: 1,
|
|
1995
|
-
innerHTML:
|
|
2017
|
+
innerHTML: u.html,
|
|
1996
2018
|
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"
|
|
1997
|
-
}, null, 8,
|
|
2019
|
+
}, null, 8, Yo)) : u.component ? (s(), z(N(e(u.component)), X({
|
|
1998
2020
|
key: 2,
|
|
1999
2021
|
ref_for: !0
|
|
2000
|
-
}, { ...
|
|
2022
|
+
}, { geom: l.data.geom, id: l.data.id, ...b.value, ...n(u), data: l.data }, { class: "w-full" }), null, 16)) : q(l.$slots, "default", { key: 3 })
|
|
2001
2023
|
], 64))), 256))
|
|
2002
2024
|
], 2));
|
|
2003
2025
|
}
|
|
2004
|
-
}),
|
|
2026
|
+
}), en = { class: "md:flex gap-[20px]" }, tn = {
|
|
2005
2027
|
key: 0,
|
|
2006
2028
|
class: "col-span-4"
|
|
2007
|
-
},
|
|
2029
|
+
}, sn = ["innerHTML"], on = {
|
|
2008
2030
|
key: 1,
|
|
2009
2031
|
class: "overflow-hidden w-full"
|
|
2010
|
-
},
|
|
2032
|
+
}, nn = { class: "flex border-b border-gray-200 bg-gray-50" }, ln = ["onClick"], an = { class: "p-1" }, rn = ["innerHTML"], dn = {
|
|
2011
2033
|
key: 2,
|
|
2012
2034
|
class: "p-1 w-full"
|
|
2013
|
-
},
|
|
2035
|
+
}, cn = { class: "grid grid-cols-12 gap-4" }, de = /* @__PURE__ */ j({
|
|
2014
2036
|
__name: "Card",
|
|
2015
2037
|
props: {
|
|
2016
2038
|
panels: { default: () => [] },
|
|
@@ -2023,106 +2045,106 @@ const vo = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, bo = {
|
|
|
2023
2045
|
className: {},
|
|
2024
2046
|
style: {}
|
|
2025
2047
|
},
|
|
2026
|
-
setup(
|
|
2027
|
-
const
|
|
2028
|
-
function n(
|
|
2029
|
-
return
|
|
2048
|
+
setup(r) {
|
|
2049
|
+
const i = r, o = $(0), e = $([]);
|
|
2050
|
+
function n(d) {
|
|
2051
|
+
return Ie[d] || d;
|
|
2030
2052
|
}
|
|
2031
|
-
function
|
|
2032
|
-
return e.value =
|
|
2053
|
+
function b(d) {
|
|
2054
|
+
return e.value = d.filter((y) => y.type === "pin"), d.filter((y) => y.type !== "pin");
|
|
2033
2055
|
}
|
|
2034
|
-
const
|
|
2035
|
-
[`view-${
|
|
2036
|
-
})), p = (
|
|
2037
|
-
const
|
|
2038
|
-
return
|
|
2056
|
+
const l = S(() => i.panels && i.panels.length > 0 ? i.normalizeTabs ? b(i.panels) : i.panels : i.data && Array.isArray(i.data) ? i.data.filter((y) => y.type === "tabs")[0]?.items || [] : []), v = S(() => i.panels && i.panels.length > 0 ? i.normalizeTabs ? b(i.panels) : i.panels : i.data && Array.isArray(i.data) ? i.data : []), u = S(() => ({
|
|
2057
|
+
[`view-${i.view}`]: !0
|
|
2058
|
+
})), p = (d) => {
|
|
2059
|
+
const y = { ...d };
|
|
2060
|
+
return i.data && (y.data = i.data), y;
|
|
2039
2061
|
};
|
|
2040
|
-
return (
|
|
2041
|
-
class: D(
|
|
2062
|
+
return (d, y) => (s(), a("div", {
|
|
2063
|
+
class: D(d.classWrapper || u.value)
|
|
2042
2064
|
}, [
|
|
2043
|
-
t("div",
|
|
2044
|
-
e.value.length !== 0 ? (s(),
|
|
2045
|
-
(s(!0),
|
|
2046
|
-
key: m.name ||
|
|
2065
|
+
t("div", en, [
|
|
2066
|
+
e.value.length !== 0 ? (s(), a("div", tn, [
|
|
2067
|
+
(s(!0), a(I, null, H(e.value[0].items, (m, T) => (s(), a("div", {
|
|
2068
|
+
key: m.name || T,
|
|
2047
2069
|
class: "w-full bg-gray-50 rounded-lg p-4 col-span-12 w-full m-1 mb-3"
|
|
2048
2070
|
}, [
|
|
2049
|
-
m.html ? (s(),
|
|
2071
|
+
m.html ? (s(), a("div", {
|
|
2050
2072
|
key: 0,
|
|
2051
2073
|
innerHTML: m.html,
|
|
2052
2074
|
class: "text-gray-900 leading-relaxed"
|
|
2053
|
-
}, null, 8,
|
|
2075
|
+
}, null, 8, sn)) : m.component ? (s(), z(N(n(m.component)), X({
|
|
2054
2076
|
key: 1,
|
|
2055
2077
|
ref_for: !0
|
|
2056
2078
|
}, m.component === "Card" ? m : p(m), {
|
|
2057
|
-
id:
|
|
2079
|
+
id: d.data.id,
|
|
2058
2080
|
class: "w-full h-full"
|
|
2059
|
-
}), null, 16, ["id"])) :
|
|
2081
|
+
}), null, 16, ["id"])) : k("", !0)
|
|
2060
2082
|
]))), 128))
|
|
2061
|
-
])) :
|
|
2062
|
-
|
|
2063
|
-
t("div",
|
|
2064
|
-
(s(!0),
|
|
2065
|
-
key: m.name ||
|
|
2066
|
-
onClick: (O) => o.value =
|
|
2083
|
+
])) : k("", !0),
|
|
2084
|
+
d.view === "tab" ? (s(), a("div", on, [
|
|
2085
|
+
t("div", nn, [
|
|
2086
|
+
(s(!0), a(I, null, H(l.value, (m, T) => (s(), a("button", {
|
|
2087
|
+
key: m.name || T,
|
|
2088
|
+
onClick: (O) => o.value = T,
|
|
2067
2089
|
class: D([
|
|
2068
2090
|
"px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",
|
|
2069
|
-
{ "text-blue-600 bg-white border-b-2 border-blue-600": o.value ===
|
|
2091
|
+
{ "text-blue-600 bg-white border-b-2 border-blue-600": o.value === T }
|
|
2070
2092
|
])
|
|
2071
|
-
},
|
|
2093
|
+
}, _(m.title || m.label || m.name || `Tab ${T + 1}`), 11, ln))), 128))
|
|
2072
2094
|
]),
|
|
2073
|
-
t("div",
|
|
2074
|
-
(s(!0),
|
|
2075
|
-
key: m.name ||
|
|
2095
|
+
t("div", an, [
|
|
2096
|
+
(s(!0), a(I, null, H(l.value, (m, T) => P((s(), a("div", {
|
|
2097
|
+
key: m.name || T,
|
|
2076
2098
|
class: D([
|
|
2077
|
-
|
|
2099
|
+
d.classPanel || "w-full border-gray-100 py-2",
|
|
2078
2100
|
`col-span-${m.col || 12}`
|
|
2079
2101
|
])
|
|
2080
2102
|
}, [
|
|
2081
|
-
m.html ? (s(),
|
|
2103
|
+
m.html ? (s(), a("div", {
|
|
2082
2104
|
key: 0,
|
|
2083
2105
|
innerHTML: m.html,
|
|
2084
2106
|
class: "text-gray-900 leading-relaxed"
|
|
2085
|
-
}, null, 8,
|
|
2107
|
+
}, null, 8, rn)) : d.$slots[`tab-${T}`] ? q(d.$slots, `tab-${T}`, {
|
|
2086
2108
|
key: 1,
|
|
2087
2109
|
item: m,
|
|
2088
|
-
data:
|
|
2089
|
-
}) : m.component || m.name ? (s(),
|
|
2110
|
+
data: d.data
|
|
2111
|
+
}) : m.component || m.name ? (s(), z(N(n(m.component || m.name)), X({
|
|
2090
2112
|
key: 2,
|
|
2091
2113
|
ref_for: !0
|
|
2092
2114
|
}, m.component === "Card" ? m : p(m), {
|
|
2093
|
-
id:
|
|
2115
|
+
id: d.data.id,
|
|
2094
2116
|
class: "w-full h-full"
|
|
2095
|
-
}), null, 16, ["id"])) : q(
|
|
2117
|
+
}), null, 16, ["id"])) : q(d.$slots, m.slot || `tab-${T}`, {
|
|
2096
2118
|
key: 3,
|
|
2097
2119
|
item: m,
|
|
2098
|
-
data:
|
|
2120
|
+
data: d.data
|
|
2099
2121
|
})
|
|
2100
2122
|
], 2)), [
|
|
2101
|
-
[
|
|
2123
|
+
[ze, o.value === T]
|
|
2102
2124
|
])), 128))
|
|
2103
2125
|
])
|
|
2104
|
-
])) : (s(),
|
|
2105
|
-
t("div",
|
|
2106
|
-
(s(!0),
|
|
2107
|
-
key: m.name ||
|
|
2126
|
+
])) : (s(), a("div", dn, [
|
|
2127
|
+
t("div", cn, [
|
|
2128
|
+
(s(!0), a(I, null, H(v.value, (m, T) => (s(), a(I, {
|
|
2129
|
+
key: m.name || T
|
|
2108
2130
|
}, [
|
|
2109
|
-
|
|
2131
|
+
d.$slots[`panel-${T}`] ? q(d.$slots, `panel-${T}`, {
|
|
2110
2132
|
key: 0,
|
|
2111
2133
|
item: m,
|
|
2112
|
-
data:
|
|
2113
|
-
}) : m.items || m.html ? (s(),
|
|
2134
|
+
data: d.data
|
|
2135
|
+
}) : m.items || m.html ? (s(), z(N(je), X({
|
|
2114
2136
|
key: 1,
|
|
2115
2137
|
ref_for: !0
|
|
2116
2138
|
}, p(m), {
|
|
2117
2139
|
items: m.items,
|
|
2118
2140
|
class: "w-full h-full"
|
|
2119
|
-
}), null, 16, ["items"])) : m.component ? (s(),
|
|
2141
|
+
}), null, 16, ["items"])) : m.component ? (s(), z(N(n(m.component)), X({
|
|
2120
2142
|
key: 2,
|
|
2121
2143
|
ref_for: !0
|
|
2122
|
-
}, p(m), { class: "w-full h-full" }), null, 16)) : q(
|
|
2144
|
+
}, p(m), { class: "w-full h-full" }), null, 16)) : q(d.$slots, m.slot || `panel-${T}`, {
|
|
2123
2145
|
key: 3,
|
|
2124
2146
|
item: m,
|
|
2125
|
-
data:
|
|
2147
|
+
data: d.data
|
|
2126
2148
|
})
|
|
2127
2149
|
], 64))), 128))
|
|
2128
2150
|
])
|
|
@@ -2130,78 +2152,78 @@ const vo = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, bo = {
|
|
|
2130
2152
|
])
|
|
2131
2153
|
], 2));
|
|
2132
2154
|
}
|
|
2133
|
-
}),
|
|
2155
|
+
}), un = ["onClick"], pn = /* @__PURE__ */ j({
|
|
2134
2156
|
__name: "CopyNotification",
|
|
2135
|
-
setup(
|
|
2157
|
+
setup(r, { expose: i }) {
|
|
2136
2158
|
const o = $([]);
|
|
2137
2159
|
let e = 1;
|
|
2138
2160
|
const n = () => {
|
|
2139
2161
|
if (o.value.length >= 10) {
|
|
2140
|
-
const
|
|
2141
|
-
clearTimeout(
|
|
2162
|
+
const v = o.value[0];
|
|
2163
|
+
clearTimeout(v.timer), o.value.shift();
|
|
2142
2164
|
}
|
|
2143
|
-
const
|
|
2165
|
+
const l = {
|
|
2144
2166
|
id: e++,
|
|
2145
2167
|
timer: setTimeout(() => {
|
|
2146
|
-
|
|
2168
|
+
b(l.id);
|
|
2147
2169
|
}, 1500)
|
|
2148
2170
|
};
|
|
2149
|
-
o.value.push(
|
|
2150
|
-
},
|
|
2151
|
-
const
|
|
2152
|
-
if (
|
|
2153
|
-
const
|
|
2154
|
-
clearTimeout(
|
|
2171
|
+
o.value.push(l);
|
|
2172
|
+
}, b = (l) => {
|
|
2173
|
+
const v = o.value.findIndex((u) => u.id === l);
|
|
2174
|
+
if (v !== -1) {
|
|
2175
|
+
const u = o.value[v];
|
|
2176
|
+
clearTimeout(u.timer), o.value.splice(v, 1);
|
|
2155
2177
|
}
|
|
2156
2178
|
};
|
|
2157
|
-
return
|
|
2179
|
+
return i({
|
|
2158
2180
|
addNotification: n
|
|
2159
|
-
}),
|
|
2160
|
-
o.value.forEach((
|
|
2161
|
-
clearTimeout(
|
|
2181
|
+
}), ke(() => {
|
|
2182
|
+
o.value.forEach((l) => {
|
|
2183
|
+
clearTimeout(l.timer);
|
|
2162
2184
|
});
|
|
2163
|
-
}), (
|
|
2164
|
-
M(
|
|
2185
|
+
}), (l, v) => (s(), z(He, { to: "body" }, [
|
|
2186
|
+
M(Ee, {
|
|
2165
2187
|
name: "notification",
|
|
2166
2188
|
tag: "div",
|
|
2167
2189
|
class: "fixed top-4 right-4 z-50 space-y-2"
|
|
2168
2190
|
}, {
|
|
2169
|
-
default:
|
|
2170
|
-
(s(!0),
|
|
2171
|
-
key:
|
|
2191
|
+
default: Fe(() => [
|
|
2192
|
+
(s(!0), a(I, null, H(o.value, (u) => (s(), a("div", {
|
|
2193
|
+
key: u.id,
|
|
2172
2194
|
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"
|
|
2173
2195
|
}, [
|
|
2174
|
-
M(
|
|
2175
|
-
|
|
2196
|
+
M(C(Re), { class: "h-5 w-5 text-green-100 flex-shrink-0" }),
|
|
2197
|
+
v[0] || (v[0] = t("div", { class: "flex-1" }, [
|
|
2176
2198
|
t("p", { class: "font-medium text-sm" }, "Ссылка скопирована!"),
|
|
2177
2199
|
t("p", { class: "text-xs text-green-100 opacity-90" }, "Файл добавлен в буфер обмена")
|
|
2178
2200
|
], -1)),
|
|
2179
2201
|
t("button", {
|
|
2180
|
-
onClick: (p) =>
|
|
2202
|
+
onClick: (p) => b(u.id),
|
|
2181
2203
|
class: "text-green-100 hover:text-white transition-colors flex-shrink-0"
|
|
2182
2204
|
}, [
|
|
2183
|
-
M(
|
|
2184
|
-
], 8,
|
|
2205
|
+
M(C(ge), { class: "h-4 w-4" })
|
|
2206
|
+
], 8, un)
|
|
2185
2207
|
]))), 128))
|
|
2186
2208
|
]),
|
|
2187
2209
|
_: 1
|
|
2188
2210
|
})
|
|
2189
2211
|
]));
|
|
2190
2212
|
}
|
|
2191
|
-
}),
|
|
2192
|
-
|
|
2193
|
-
|
|
2213
|
+
}), mn = /* @__PURE__ */ W(pn, [["__scopeId", "data-v-55903525"]]);
|
|
2214
|
+
de.install = function(r) {
|
|
2215
|
+
r.component("vs-widget-file", be), r.component("vs-widget-comments", ie), r.component("vs-widget-history", le), r.component("vs-widget-gallery", ae), r.component("vs-widget-map", re), r.component("CommentsWidget", ie), r.component("HistoryWidget", le), r.component("GalleryWidget", ae), r.component("FilesWidget", be), r.component("MapWidget", re), r.component("Card", de), r.component("CardItem", je), r.component("DescriptionListWidget", De), r.component("CopyNotification", mn);
|
|
2194
2216
|
};
|
|
2195
2217
|
export {
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2218
|
+
de as Card,
|
|
2219
|
+
je as CardItem,
|
|
2220
|
+
ie as CommentsWidget,
|
|
2221
|
+
mn as CopyNotification,
|
|
2222
|
+
De as DescriptionListWidget,
|
|
2223
|
+
be as FilesWidget,
|
|
2224
|
+
ae as GalleryWidget,
|
|
2225
|
+
le as HistoryWidget,
|
|
2226
|
+
re as MapWidget,
|
|
2227
|
+
Go as TableWidget,
|
|
2228
|
+
de as default
|
|
2207
2229
|
};
|