@opengis/partsmap 0.1.8 → 0.1.9
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 +1297 -1257
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as G, ref as V, computed as Y, watch as D, openBlock as f, createBlock as K, resolveDynamicComponent as me, mergeProps as re, withCtx as he, renderSlot as ue, createElementBlock as x, createElementVNode as l, toDisplayString as I, createCommentVNode as $, unref as e, useSlots as je, normalizeClass as P, createVNode as q, createTextVNode as J, Fragment as U, renderList as le, toRaw as Ce, onMounted as we, onBeforeUnmount as Ve, Teleport as Ze, withDirectives as W, normalizeStyle as Re, vShow as ie, cloneVNode as dt, nextTick as Me, vModelText as ce, isRef as pt, withModifiers as Je, createStaticVNode as Xe, getCurrentInstance as et, resolveDirective as ft, vModelCheckbox as vt } from "vue";
|
|
2
|
+
const mt = { class: "flex items-center justify-between w-full text-sm" }, ht = { class: "flex items-center cursor-pointer w-full" }, gt = {
|
|
3
3
|
key: 0,
|
|
4
4
|
width: "16",
|
|
5
5
|
height: "auto",
|
|
6
6
|
src: "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="
|
|
7
|
-
},
|
|
7
|
+
}, yt = ["value"], bt = { class: "w-[calc(100%-18px)] flex flex-row items-center justify-between pl-[10px]" }, xt = { class: "flex flex-row items-center font-normal text-gray-800 gap-x-1" }, wt = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-xs text-gray-500 dark:text-neutral-500 pr-1"
|
|
10
|
-
},
|
|
10
|
+
}, De = /* @__PURE__ */ G({
|
|
11
11
|
__name: "list-item",
|
|
12
12
|
props: {
|
|
13
13
|
layout: {},
|
|
@@ -25,39 +25,39 @@ const ft = { class: "flex items-center justify-between w-full text-sm" }, vt = {
|
|
|
25
25
|
function u() {
|
|
26
26
|
t("itemClick", o.value);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
return n({ el:
|
|
28
|
+
const c = V(null);
|
|
29
|
+
return n({ el: c }), (g, h) => (f(), x("div", {
|
|
30
30
|
class: "flex items-center w-full rounded-lg group hover:bg-gray-100",
|
|
31
31
|
ref_key: "el",
|
|
32
|
-
ref:
|
|
32
|
+
ref: c
|
|
33
33
|
}, [
|
|
34
|
-
l("div",
|
|
35
|
-
l("div",
|
|
34
|
+
l("div", mt, [
|
|
35
|
+
l("div", ht, [
|
|
36
36
|
l("label", {
|
|
37
37
|
for: "radio-9740",
|
|
38
|
-
class:
|
|
38
|
+
class: P([
|
|
39
39
|
["inline", "popover"].includes(g.layout) ? "text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center" : "flex flex-row items-center w-full px-2 py-2 text-sm text-gray-500 cursor-pointer",
|
|
40
40
|
{ "bg-blue-100": g.highlighted }
|
|
41
41
|
]),
|
|
42
|
-
onClick:
|
|
42
|
+
onClick: Je(u, ["stop", "prevent"])
|
|
43
43
|
}, [
|
|
44
44
|
l("div", {
|
|
45
|
-
class:
|
|
45
|
+
class: P(["w-[18px] h-[18px] border flex items-center justify-center", [
|
|
46
46
|
g.type == "checkbox" ? "rounded-[4px]" : "rounded-full",
|
|
47
47
|
g.color ? `bg-[${g.color}] border-[#ffffff]` : g.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
|
|
48
48
|
]])
|
|
49
49
|
}, [
|
|
50
|
-
g.isSelected ? (
|
|
50
|
+
g.isSelected ? (f(), x("img", gt)) : $("", !0)
|
|
51
51
|
], 2),
|
|
52
52
|
l("input", {
|
|
53
53
|
type: "checkbox",
|
|
54
54
|
class: "hidden",
|
|
55
55
|
id: "radio-9740",
|
|
56
56
|
value: g.value
|
|
57
|
-
}, null, 8,
|
|
58
|
-
l("div",
|
|
59
|
-
l("span",
|
|
60
|
-
g.count ? (
|
|
57
|
+
}, null, 8, yt),
|
|
58
|
+
l("div", bt, [
|
|
59
|
+
l("span", xt, I(g.label ?? "Відсутні данні"), 1),
|
|
60
|
+
g.count ? (f(), x("div", wt, " (" + I(g.count) + ") ", 1)) : $("", !0)
|
|
61
61
|
])
|
|
62
62
|
], 2)
|
|
63
63
|
])
|
|
@@ -65,7 +65,7 @@ const ft = { class: "flex items-center justify-between w-full text-sm" }, vt = {
|
|
|
65
65
|
], 512));
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
-
function
|
|
68
|
+
function tt(s, n) {
|
|
69
69
|
const {
|
|
70
70
|
options: r = [],
|
|
71
71
|
limit: o = 20
|
|
@@ -73,67 +73,67 @@ function qe(s, n) {
|
|
|
73
73
|
function t(i) {
|
|
74
74
|
return Array.isArray(i) ? i[0] : i;
|
|
75
75
|
}
|
|
76
|
-
const u = V(t(s.modelValue)),
|
|
77
|
-
function
|
|
78
|
-
const k = i.find(Boolean) ?? {}, z = ["id", "value", "code", "key"].find((
|
|
79
|
-
return { autoValueKey: z, autoLabelKey:
|
|
76
|
+
const u = V(t(s.modelValue)), c = V(""), g = V(!1), h = V([]), w = V("id"), m = V("text"), d = V(!1), y = V(s.layout !== "popover" && r.length > o);
|
|
77
|
+
function C(i) {
|
|
78
|
+
const k = i.find(Boolean) ?? {}, z = ["id", "value", "code", "key"].find((A) => A in k) ?? "id", j = ["text", "label", "name", "title"].find((A) => A in k) ?? "text";
|
|
79
|
+
return { autoValueKey: z, autoLabelKey: j };
|
|
80
80
|
}
|
|
81
81
|
if (r.length > 0) {
|
|
82
|
-
const i =
|
|
82
|
+
const i = C(r);
|
|
83
83
|
w.value = i.autoValueKey, m.value = i.autoLabelKey;
|
|
84
84
|
}
|
|
85
|
-
const v =
|
|
85
|
+
const v = Y(() => {
|
|
86
86
|
const i = h.value;
|
|
87
|
-
return s.layout === "popover" ||
|
|
87
|
+
return s.layout === "popover" || d.value ? i : i.slice(0, o);
|
|
88
88
|
});
|
|
89
|
-
|
|
89
|
+
D(() => s.modelValue, (i) => {
|
|
90
90
|
u.value = t(i);
|
|
91
91
|
}, { immediate: !0 }), h.value = [...r].sort((i, k) => s.sort === "count" ? k.count && i.count ? k.count - i.count : 0 : s.sort === "name" ? String(i[m.value] ?? "").localeCompare(String(k[m.value] ?? "")) : 0);
|
|
92
|
-
function
|
|
92
|
+
function p(i) {
|
|
93
93
|
return u.value === i[w.value];
|
|
94
94
|
}
|
|
95
95
|
function a(i) {
|
|
96
96
|
u.value = i[w.value], n("update:modelValue", u.value), n("change", { name: s.name, value: u.value });
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function _() {
|
|
99
99
|
u.value = void 0, n("update:modelValue", u.value), n("clear", s.name);
|
|
100
100
|
}
|
|
101
101
|
function b() {
|
|
102
|
-
|
|
102
|
+
d.value = !d.value;
|
|
103
103
|
}
|
|
104
104
|
return {
|
|
105
105
|
innerValue: u,
|
|
106
|
-
searchTerm:
|
|
106
|
+
searchTerm: c,
|
|
107
107
|
filteredOptions: v,
|
|
108
|
-
isSelected:
|
|
108
|
+
isSelected: p,
|
|
109
109
|
selectItem: a,
|
|
110
|
-
clear:
|
|
110
|
+
clear: _,
|
|
111
111
|
toggleShowAll: b,
|
|
112
112
|
isReqProc: g,
|
|
113
|
-
showAll:
|
|
113
|
+
showAll: d,
|
|
114
114
|
isEnableShowAll: y,
|
|
115
115
|
labelKey: m,
|
|
116
116
|
valueKey: w,
|
|
117
117
|
allOptions: h
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const de = (s, n) => {
|
|
121
121
|
const r = s.__vccOpts || s;
|
|
122
122
|
for (const [o, t] of n)
|
|
123
123
|
r[o] = t;
|
|
124
124
|
return r;
|
|
125
|
-
},
|
|
125
|
+
}, kt = {}, _t = {
|
|
126
126
|
class: "w-48 mx-auto",
|
|
127
127
|
viewBox: "0 0 178 90",
|
|
128
128
|
fill: "none",
|
|
129
129
|
xmlns: "http://www.w3.org/2000/svg"
|
|
130
130
|
};
|
|
131
|
-
function
|
|
132
|
-
return
|
|
133
|
-
|
|
131
|
+
function Ct(s, n) {
|
|
132
|
+
return f(), x("svg", _t, n[0] || (n[0] = [
|
|
133
|
+
Xe('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
|
|
134
134
|
]));
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const Fe = /* @__PURE__ */ de(kt, [["render", Ct]]), Vt = {}, $t = {
|
|
137
137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
138
138
|
width: "24",
|
|
139
139
|
height: "24",
|
|
@@ -145,8 +145,8 @@ const $e = /* @__PURE__ */ ie(xt, [["render", kt]]), _t = {}, Ct = {
|
|
|
145
145
|
"stroke-linejoin": "round",
|
|
146
146
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate"
|
|
147
147
|
};
|
|
148
|
-
function
|
|
149
|
-
return
|
|
148
|
+
function St(s, n) {
|
|
149
|
+
return f(), x("svg", $t, n[0] || (n[0] = [
|
|
150
150
|
l("path", {
|
|
151
151
|
stroke: "none",
|
|
152
152
|
d: "M0 0h24v24H0z",
|
|
@@ -155,7 +155,7 @@ function Vt(s, n) {
|
|
|
155
155
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
156
156
|
]));
|
|
157
157
|
}
|
|
158
|
-
const
|
|
158
|
+
const Be = /* @__PURE__ */ de(Vt, [["render", St]]), Mt = {}, Bt = {
|
|
159
159
|
xmlns: "http://www.w3.org/2000/svg",
|
|
160
160
|
width: "24",
|
|
161
161
|
height: "24",
|
|
@@ -167,8 +167,8 @@ const xe = /* @__PURE__ */ ie(_t, [["render", Vt]]), $t = {}, St = {
|
|
|
167
167
|
"stroke-linejoin": "round",
|
|
168
168
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate-[180deg]"
|
|
169
169
|
};
|
|
170
|
-
function
|
|
171
|
-
return
|
|
170
|
+
function zt(s, n) {
|
|
171
|
+
return f(), x("svg", Bt, n[0] || (n[0] = [
|
|
172
172
|
l("path", {
|
|
173
173
|
stroke: "none",
|
|
174
174
|
d: "M0 0h24v24H0z",
|
|
@@ -177,16 +177,16 @@ function Mt(s, n) {
|
|
|
177
177
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
178
178
|
]));
|
|
179
179
|
}
|
|
180
|
-
const
|
|
180
|
+
const Le = /* @__PURE__ */ de(Mt, [["render", zt]]), At = {
|
|
181
181
|
key: 0,
|
|
182
182
|
class: "w-full"
|
|
183
|
-
},
|
|
183
|
+
}, jt = { class: "flex flex-col items-center justify-center p-5 text-center" }, Rt = {
|
|
184
184
|
key: 0,
|
|
185
185
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
186
|
-
},
|
|
186
|
+
}, Dt = {
|
|
187
187
|
key: 1,
|
|
188
188
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
189
|
-
},
|
|
189
|
+
}, Ft = /* @__PURE__ */ G({
|
|
190
190
|
__name: "radio",
|
|
191
191
|
props: {
|
|
192
192
|
id: {},
|
|
@@ -214,44 +214,44 @@ const Se = /* @__PURE__ */ ie($t, [["render", Mt]]), Bt = {
|
|
|
214
214
|
emits: ["update:modelValue", "change", "clear"],
|
|
215
215
|
setup(s, { expose: n, emit: r }) {
|
|
216
216
|
const o = s, t = V(null), u = r, {
|
|
217
|
-
innerValue:
|
|
217
|
+
innerValue: c,
|
|
218
218
|
filteredOptions: g,
|
|
219
219
|
isSelected: h,
|
|
220
220
|
selectItem: w,
|
|
221
221
|
clear: m,
|
|
222
|
-
toggleShowAll:
|
|
222
|
+
toggleShowAll: d,
|
|
223
223
|
isReqProc: y,
|
|
224
|
-
showAll:
|
|
224
|
+
showAll: C,
|
|
225
225
|
isEnableShowAll: v,
|
|
226
|
-
labelKey:
|
|
226
|
+
labelKey: p,
|
|
227
227
|
valueKey: a,
|
|
228
|
-
allOptions:
|
|
229
|
-
} =
|
|
228
|
+
allOptions: _
|
|
229
|
+
} = tt({
|
|
230
230
|
...o,
|
|
231
231
|
modelValue: o.modelValue ?? o.default ?? ""
|
|
232
232
|
}, u);
|
|
233
233
|
return n({
|
|
234
234
|
clear: m,
|
|
235
235
|
inputTextRef: t
|
|
236
|
-
}),
|
|
236
|
+
}), D(
|
|
237
237
|
() => o.modelValue,
|
|
238
238
|
(b) => {
|
|
239
|
-
b === void 0 && (
|
|
239
|
+
b === void 0 && (c.value = void 0);
|
|
240
240
|
}
|
|
241
|
-
), (b, i) => (
|
|
242
|
-
class:
|
|
241
|
+
), (b, i) => (f(), x("div", {
|
|
242
|
+
class: P([b.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
|
|
243
243
|
}, [
|
|
244
244
|
l("div", {
|
|
245
|
-
class:
|
|
245
|
+
class: P([
|
|
246
246
|
b.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
|
247
247
|
b.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
|
248
248
|
])
|
|
249
249
|
}, [
|
|
250
|
-
(
|
|
250
|
+
(f(!0), x(U, null, le(e(g), (k) => (f(), K(De, {
|
|
251
251
|
layout: b.layout,
|
|
252
252
|
key: k[e(a)],
|
|
253
253
|
count: k.count,
|
|
254
|
-
label: k[e(
|
|
254
|
+
label: k[e(p)],
|
|
255
255
|
color: k.color,
|
|
256
256
|
type: "radio",
|
|
257
257
|
value: k[e(a)],
|
|
@@ -259,61 +259,61 @@ const Se = /* @__PURE__ */ ie($t, [["render", Mt]]), Bt = {
|
|
|
259
259
|
onItemClick: (z) => e(w)(k)
|
|
260
260
|
}, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 128))
|
|
261
261
|
], 2),
|
|
262
|
-
b.type === "select" && e(g).length === 0 && !e(y) ? (
|
|
263
|
-
l("div",
|
|
264
|
-
|
|
262
|
+
b.type === "select" && e(g).length === 0 && !e(y) ? (f(), x("div", At, [
|
|
263
|
+
l("div", jt, [
|
|
264
|
+
q(Fe),
|
|
265
265
|
i[4] || (i[4] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
266
266
|
l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
|
|
267
267
|
l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
268
268
|
], -1))
|
|
269
269
|
])
|
|
270
270
|
])) : $("", !0),
|
|
271
|
-
b.layout !== "popover" && b.type !== "select" ? (
|
|
272
|
-
!e(
|
|
271
|
+
b.layout !== "popover" && b.type !== "select" ? (f(), x(U, { key: 1 }, [
|
|
272
|
+
!e(C) && e(v) ? (f(), x("div", {
|
|
273
273
|
key: 0,
|
|
274
274
|
onClick: i[0] || (i[0] = //@ts-ignore
|
|
275
|
-
(...k) => e(
|
|
275
|
+
(...k) => e(d) && e(d)(...k)),
|
|
276
276
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
277
277
|
}, [
|
|
278
|
-
i[5] || (i[5] =
|
|
279
|
-
|
|
278
|
+
i[5] || (i[5] = J(" Показати більше ", -1)),
|
|
279
|
+
q(Be)
|
|
280
280
|
])) : $("", !0),
|
|
281
|
-
e(
|
|
281
|
+
e(C) ? (f(), x("div", {
|
|
282
282
|
key: 1,
|
|
283
283
|
onClick: i[1] || (i[1] = //@ts-ignore
|
|
284
|
-
(...k) => e(
|
|
284
|
+
(...k) => e(d) && e(d)(...k)),
|
|
285
285
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
286
286
|
}, [
|
|
287
|
-
i[6] || (i[6] =
|
|
288
|
-
|
|
287
|
+
i[6] || (i[6] = J(" Показати менше ", -1)),
|
|
288
|
+
q(Le)
|
|
289
289
|
])) : $("", !0)
|
|
290
290
|
], 64)) : $("", !0),
|
|
291
|
-
b.cleanable ? (
|
|
292
|
-
b.layout === "inline" ? (
|
|
293
|
-
|
|
294
|
-
|
|
291
|
+
b.cleanable ? (f(), x(U, { key: 2 }, [
|
|
292
|
+
b.layout === "inline" ? (f(), x("div", Rt, [
|
|
293
|
+
J(I(e(c) || e(c) === null ? 1 : 0) + " з " + I(e(_).length) + " обрано ", 1),
|
|
294
|
+
W(l("button", {
|
|
295
295
|
class: "text-gray-600 hover:text-gray-800",
|
|
296
296
|
onClick: i[2] || (i[2] = //@ts-ignore
|
|
297
297
|
(...k) => e(m) && e(m)(...k))
|
|
298
298
|
}, " Очистити ", 512), [
|
|
299
|
-
[
|
|
299
|
+
[ie, e(c) !== "" && e(c) !== void 0]
|
|
300
300
|
])
|
|
301
301
|
])) : $("", !0),
|
|
302
|
-
b.layout === "popover" ? (
|
|
303
|
-
l("span", null,
|
|
304
|
-
|
|
302
|
+
b.layout === "popover" ? (f(), x("div", Dt, [
|
|
303
|
+
l("span", null, I(e(c) || e(c) === null ? 1 : 0) + " з " + I(e(_).length) + " обрано", 1),
|
|
304
|
+
W(l("button", {
|
|
305
305
|
class: "text-gray-600 hover:text-gray-800",
|
|
306
306
|
onClick: i[3] || (i[3] = //@ts-ignore
|
|
307
307
|
(...k) => e(m) && e(m)(...k))
|
|
308
308
|
}, " Очистити ", 512), [
|
|
309
|
-
[
|
|
309
|
+
[ie, e(c) !== "" && e(c) !== void 0]
|
|
310
310
|
])
|
|
311
311
|
])) : $("", !0)
|
|
312
312
|
], 64)) : $("", !0)
|
|
313
313
|
], 2));
|
|
314
314
|
}
|
|
315
315
|
});
|
|
316
|
-
function
|
|
316
|
+
function lt(s, n) {
|
|
317
317
|
const {
|
|
318
318
|
options: r = [],
|
|
319
319
|
limit: o = 20
|
|
@@ -321,61 +321,61 @@ function Ge(s, n) {
|
|
|
321
321
|
function t(i) {
|
|
322
322
|
return Array.isArray(i) ? i : i ? [i] : [];
|
|
323
323
|
}
|
|
324
|
-
const u = V(t(s.modelValue)),
|
|
325
|
-
function
|
|
326
|
-
const k = i.find(Boolean) ?? {}, z = ["id", "value", "code", "key"].find((
|
|
327
|
-
return { autoValueKey: z, autoLabelKey:
|
|
324
|
+
const u = V(t(s.modelValue)), c = V(""), g = V(!1), h = V([]), w = V("id"), m = V("text"), d = V(!1), y = V(s.layout !== "popover" && r.length > o);
|
|
325
|
+
function C(i) {
|
|
326
|
+
const k = i.find(Boolean) ?? {}, z = ["id", "value", "code", "key"].find((A) => A in k) ?? "id", j = ["text", "label", "name", "title"].find((A) => A in k) ?? "text";
|
|
327
|
+
return { autoValueKey: z, autoLabelKey: j };
|
|
328
328
|
}
|
|
329
329
|
if (r.length > 0) {
|
|
330
|
-
const i =
|
|
330
|
+
const i = C(r);
|
|
331
331
|
w.value = i.autoValueKey, m.value = i.autoLabelKey;
|
|
332
332
|
}
|
|
333
|
-
const v =
|
|
333
|
+
const v = Y(() => {
|
|
334
334
|
const i = h.value;
|
|
335
|
-
return s.layout === "popover" ||
|
|
335
|
+
return s.layout === "popover" || d.value ? i : i.slice(0, o);
|
|
336
336
|
});
|
|
337
|
-
|
|
337
|
+
D(() => s.modelValue, (i) => {
|
|
338
338
|
u.value = t(i);
|
|
339
339
|
}, { immediate: !0 }), h.value = [...r].sort((i, k) => s.sort === "count" ? k.count && i.count ? k.count - i.count : 0 : s.sort === "name" ? String(i[m.value]).localeCompare(String(k[m.value])) : 0);
|
|
340
|
-
function
|
|
340
|
+
function p(i) {
|
|
341
341
|
return u.value && u.value.includes(i[w.value]);
|
|
342
342
|
}
|
|
343
343
|
function a(i) {
|
|
344
344
|
const k = u.value.includes(i[w.value]);
|
|
345
345
|
u.value = k ? u.value.filter((z) => z !== i[w.value]) : [...u.value, i[w.value]], n("update:modelValue", u.value), n("change", { name: s.name, value: u.value });
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function _() {
|
|
348
348
|
u.value = [], n("update:modelValue", u.value), n("clear", s.name);
|
|
349
349
|
}
|
|
350
350
|
function b() {
|
|
351
|
-
|
|
351
|
+
d.value = !d.value;
|
|
352
352
|
}
|
|
353
353
|
return {
|
|
354
354
|
innerValue: u,
|
|
355
|
-
searchTerm:
|
|
355
|
+
searchTerm: c,
|
|
356
356
|
filteredOptions: v,
|
|
357
|
-
isSelected:
|
|
357
|
+
isSelected: p,
|
|
358
358
|
selectItem: a,
|
|
359
|
-
clear:
|
|
359
|
+
clear: _,
|
|
360
360
|
toggleShowAll: b,
|
|
361
361
|
isReqProc: g,
|
|
362
|
-
showAll:
|
|
362
|
+
showAll: d,
|
|
363
363
|
isEnableShowAll: y,
|
|
364
364
|
labelKey: m,
|
|
365
365
|
valueKey: w,
|
|
366
366
|
allOptions: h
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
|
-
const
|
|
369
|
+
const Lt = {
|
|
370
370
|
key: 0,
|
|
371
371
|
class: "w-full"
|
|
372
|
-
},
|
|
372
|
+
}, Kt = { class: "flex flex-col items-center justify-center p-5 text-center" }, Pt = {
|
|
373
373
|
key: 0,
|
|
374
374
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
375
|
-
},
|
|
375
|
+
}, Ut = {
|
|
376
376
|
key: 1,
|
|
377
377
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
378
|
-
},
|
|
378
|
+
}, Ne = /* @__PURE__ */ G({
|
|
379
379
|
__name: "checkbox",
|
|
380
380
|
props: {
|
|
381
381
|
id: {},
|
|
@@ -404,102 +404,102 @@ const Dt = {
|
|
|
404
404
|
setup(s, { expose: n, emit: r }) {
|
|
405
405
|
const o = s, t = r, {
|
|
406
406
|
innerValue: u,
|
|
407
|
-
filteredOptions:
|
|
407
|
+
filteredOptions: c,
|
|
408
408
|
isSelected: g,
|
|
409
409
|
selectItem: h,
|
|
410
410
|
clear: w,
|
|
411
411
|
toggleShowAll: m,
|
|
412
|
-
isReqProc:
|
|
412
|
+
isReqProc: d,
|
|
413
413
|
showAll: y,
|
|
414
|
-
isEnableShowAll:
|
|
414
|
+
isEnableShowAll: C,
|
|
415
415
|
labelKey: v,
|
|
416
|
-
valueKey:
|
|
416
|
+
valueKey: p,
|
|
417
417
|
allOptions: a
|
|
418
|
-
} =
|
|
418
|
+
} = lt({
|
|
419
419
|
...o,
|
|
420
420
|
modelValue: o.modelValue
|
|
421
421
|
}, t);
|
|
422
|
-
return
|
|
422
|
+
return D(
|
|
423
423
|
() => o.modelValue,
|
|
424
|
-
(
|
|
425
|
-
|
|
424
|
+
(_) => {
|
|
425
|
+
_ === void 0 && (u.value = []);
|
|
426
426
|
}
|
|
427
427
|
), n({
|
|
428
428
|
clear: w
|
|
429
|
-
}), (
|
|
430
|
-
class:
|
|
429
|
+
}), (_, b) => (f(), x("div", {
|
|
430
|
+
class: P([_.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
|
|
431
431
|
}, [
|
|
432
432
|
l("div", {
|
|
433
|
-
class:
|
|
434
|
-
|
|
435
|
-
|
|
433
|
+
class: P([
|
|
434
|
+
_.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
|
435
|
+
_.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
|
436
436
|
])
|
|
437
437
|
}, [
|
|
438
|
-
(
|
|
439
|
-
layout:
|
|
438
|
+
(f(!0), x(U, null, le(e(c), (i) => (f(), K(De, {
|
|
439
|
+
layout: _.layout,
|
|
440
440
|
count: i.count,
|
|
441
441
|
label: i[e(v)],
|
|
442
442
|
color: i.color,
|
|
443
443
|
type: "checkbox",
|
|
444
|
-
value: i[e(
|
|
444
|
+
value: i[e(p)],
|
|
445
445
|
"is-selected": e(g)(i),
|
|
446
446
|
onItemClick: (k) => e(h)(i)
|
|
447
447
|
}, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 256))
|
|
448
448
|
], 2),
|
|
449
|
-
|
|
450
|
-
l("div",
|
|
451
|
-
|
|
449
|
+
_.type === "select" && e(c).length === 0 && !e(d) ? (f(), x("div", Lt, [
|
|
450
|
+
l("div", Kt, [
|
|
451
|
+
q(Fe),
|
|
452
452
|
b[4] || (b[4] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
453
453
|
l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
|
|
454
454
|
l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
455
455
|
], -1))
|
|
456
456
|
])
|
|
457
457
|
])) : $("", !0),
|
|
458
|
-
|
|
459
|
-
!e(y) && e(
|
|
458
|
+
_.layout !== "popover" && _.type !== "select" ? (f(), x(U, { key: 1 }, [
|
|
459
|
+
!e(y) && e(C) ? (f(), x("div", {
|
|
460
460
|
key: 0,
|
|
461
461
|
onClick: b[0] || (b[0] = //@ts-ignore
|
|
462
462
|
(...i) => e(m) && e(m)(...i)),
|
|
463
463
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
464
464
|
}, [
|
|
465
|
-
b[5] || (b[5] =
|
|
466
|
-
|
|
465
|
+
b[5] || (b[5] = J(" Показати більше ", -1)),
|
|
466
|
+
q(Be)
|
|
467
467
|
])) : $("", !0),
|
|
468
|
-
e(y) ? (
|
|
468
|
+
e(y) ? (f(), x("div", {
|
|
469
469
|
key: 1,
|
|
470
470
|
onClick: b[1] || (b[1] = //@ts-ignore
|
|
471
471
|
(...i) => e(m) && e(m)(...i)),
|
|
472
472
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
473
473
|
}, [
|
|
474
|
-
b[6] || (b[6] =
|
|
475
|
-
|
|
474
|
+
b[6] || (b[6] = J(" Показати менше ", -1)),
|
|
475
|
+
q(Le)
|
|
476
476
|
])) : $("", !0)
|
|
477
477
|
], 64)) : $("", !0),
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
478
|
+
_.cleanable ? (f(), x(U, { key: 2 }, [
|
|
479
|
+
_.layout === "inline" ? (f(), x("div", Pt, [
|
|
480
|
+
J(I(e(u).length) + " з " + I(e(a).length) + " обрано ", 1),
|
|
481
|
+
W(l("button", {
|
|
482
482
|
class: "text-gray-600 hover:text-gray-800",
|
|
483
483
|
onClick: b[2] || (b[2] = //@ts-ignore
|
|
484
484
|
(...i) => e(w) && e(w)(...i))
|
|
485
485
|
}, " Очистити ", 512), [
|
|
486
|
-
[
|
|
486
|
+
[ie, e(u).length !== 0]
|
|
487
487
|
])
|
|
488
488
|
])) : $("", !0),
|
|
489
|
-
|
|
490
|
-
l("span", null,
|
|
491
|
-
|
|
489
|
+
_.layout === "popover" ? (f(), x("div", Ut, [
|
|
490
|
+
l("span", null, I(e(u).length) + " з " + I(e(a).length) + " обрано", 1),
|
|
491
|
+
W(l("button", {
|
|
492
492
|
class: "text-gray-600 hover:text-gray-800",
|
|
493
493
|
onClick: b[3] || (b[3] = //@ts-ignore
|
|
494
494
|
(...i) => e(w) && e(w)(...i))
|
|
495
495
|
}, " Очистити ", 512), [
|
|
496
|
-
[
|
|
496
|
+
[ie, e(u).length !== 0]
|
|
497
497
|
])
|
|
498
498
|
])) : $("", !0)
|
|
499
499
|
], 64)) : $("", !0)
|
|
500
500
|
], 2));
|
|
501
501
|
}
|
|
502
|
-
}),
|
|
502
|
+
}), It = {}, Ot = {
|
|
503
503
|
xmlns: "http://www.w3.org/2000/svg",
|
|
504
504
|
width: "15px",
|
|
505
505
|
height: "15px",
|
|
@@ -511,8 +511,8 @@ const Dt = {
|
|
|
511
511
|
"stroke-linejoin": "round",
|
|
512
512
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
|
|
513
513
|
};
|
|
514
|
-
function
|
|
515
|
-
return
|
|
514
|
+
function Tt(s, n) {
|
|
515
|
+
return f(), x("svg", Ot, n[0] || (n[0] = [
|
|
516
516
|
l("path", {
|
|
517
517
|
stroke: "none",
|
|
518
518
|
d: "M0 0h24v24H0z",
|
|
@@ -522,7 +522,7 @@ function Ut(s, n) {
|
|
|
522
522
|
l("path", { d: "M21 21l-6 -6" }, null, -1)
|
|
523
523
|
]));
|
|
524
524
|
}
|
|
525
|
-
const
|
|
525
|
+
const at = /* @__PURE__ */ de(It, [["render", Tt]]), Ht = {}, Et = {
|
|
526
526
|
xmlns: "http://www.w3.org/2000/svg",
|
|
527
527
|
viewBox: "0 0 24 24",
|
|
528
528
|
fill: "none",
|
|
@@ -534,8 +534,8 @@ const Qe = /* @__PURE__ */ ie(Pt, [["render", Ut]]), Ot = {}, Tt = {
|
|
|
534
534
|
width: "15px",
|
|
535
535
|
height: "15px"
|
|
536
536
|
};
|
|
537
|
-
function
|
|
538
|
-
return
|
|
537
|
+
function Nt(s, n) {
|
|
538
|
+
return f(), x("svg", Et, n[0] || (n[0] = [
|
|
539
539
|
l("path", {
|
|
540
540
|
stroke: "none",
|
|
541
541
|
d: "M0 0h24v24H0z",
|
|
@@ -545,13 +545,13 @@ function Ht(s, n) {
|
|
|
545
545
|
l("path", { d: "M6 6l12 12" }, null, -1)
|
|
546
546
|
]));
|
|
547
547
|
}
|
|
548
|
-
const
|
|
549
|
-
class
|
|
548
|
+
const ot = /* @__PURE__ */ de(Ht, [["render", Nt]]);
|
|
549
|
+
class ze {
|
|
550
550
|
static getWidthClass(n) {
|
|
551
551
|
return typeof n == "number" ? `max-w-[${n}px]` : typeof n == "string" ? n.endsWith("%") || n.endsWith("px") ? `max-w-[${n}]` : `max-w-${n}` : "w-full";
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
const
|
|
554
|
+
const Wt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, Yt = ["placeholder"], qt = /* @__PURE__ */ G({
|
|
555
555
|
__name: "text-input",
|
|
556
556
|
props: {
|
|
557
557
|
id: {},
|
|
@@ -579,71 +579,71 @@ const Et = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
579
579
|
emits: ["update:modelValue", "change", "clear"],
|
|
580
580
|
setup(s, { emit: n }) {
|
|
581
581
|
const r = s, o = V((r.placeHolder || r.label || r.name || "search").toString()), t = n, u = V(r.modelValue ?? "");
|
|
582
|
-
|
|
582
|
+
D(
|
|
583
583
|
() => r.modelValue,
|
|
584
584
|
(h) => {
|
|
585
585
|
h !== u.value && (u.value = h ?? "");
|
|
586
586
|
}
|
|
587
587
|
);
|
|
588
|
-
function
|
|
588
|
+
function c() {
|
|
589
589
|
t("update:modelValue", u.value), t("change", { name: r.name, value: u.value });
|
|
590
590
|
}
|
|
591
591
|
function g() {
|
|
592
592
|
u.value = "", t("update:modelValue", ""), t("clear", r.name), t("change", { name: r.name, value: null });
|
|
593
593
|
}
|
|
594
|
-
return (h, w) => (
|
|
595
|
-
class:
|
|
594
|
+
return (h, w) => (f(), x("div", {
|
|
595
|
+
class: P([
|
|
596
596
|
"vs-form-text relative bg-white rounded-lg [&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",
|
|
597
|
-
h.layout === "inline" ? e(
|
|
597
|
+
h.layout === "inline" ? e(ze).getWidthClass(h.width) : "mb-2" + (h.layout === "popover" ? " m-2" : "")
|
|
598
598
|
])
|
|
599
599
|
}, [
|
|
600
|
-
l("div",
|
|
601
|
-
|
|
600
|
+
l("div", Wt, [
|
|
601
|
+
q(at)
|
|
602
602
|
]),
|
|
603
|
-
u.value !== "" ? (
|
|
603
|
+
u.value !== "" ? (f(), x("div", {
|
|
604
604
|
key: 0,
|
|
605
605
|
onClick: g,
|
|
606
606
|
class: "absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"
|
|
607
607
|
}, [
|
|
608
|
-
|
|
608
|
+
q(ot)
|
|
609
609
|
])) : $("", !0),
|
|
610
|
-
|
|
610
|
+
W(l("input", {
|
|
611
611
|
type: "text",
|
|
612
612
|
"onUpdate:modelValue": w[0] || (w[0] = (m) => u.value = m),
|
|
613
|
-
onInput:
|
|
613
|
+
onInput: c,
|
|
614
614
|
placeholder: o.value,
|
|
615
615
|
class: "!pr-7 !pl-8 bg-white h-[38px] min-w-[100px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
|
|
616
|
-
}, null, 40,
|
|
617
|
-
[
|
|
616
|
+
}, null, 40, Yt), [
|
|
617
|
+
[ce, u.value]
|
|
618
618
|
])
|
|
619
619
|
], 2));
|
|
620
620
|
}
|
|
621
621
|
});
|
|
622
|
-
function
|
|
623
|
-
return
|
|
622
|
+
function nt(s = { color: "blue" }) {
|
|
623
|
+
return Y(() => {
|
|
624
624
|
const n = `w-full px-3 py-2 border-solid border border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${s.color}-500 focus:border-transparent`;
|
|
625
625
|
return (s == null ? void 0 : s.size) === "sm" ? `${n}h-[32px]` : `${n}h-[38px]`;
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function Qt() {
|
|
629
629
|
return "rounded-md font-medium border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 px-4 py-2 w-full bg-transparent border text-black text-sm h-[38px]";
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Gt() {
|
|
632
632
|
return "font-medium border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 border h-7 rounded-md text-xs px-2 py-1 hover:bg-gray-100";
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function rt(s) {
|
|
635
635
|
return s === "ghost" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent text-gray-600 hover:bg-blue-100 hover:text-gray-800 focus:outline-hidden focus:bg-gray-100 focus:text-gray-800 disabled:opacity-50 disabled:pointer-events-none dark:text-gray-500 dark:hover:bg-blue-800/30 dark:hover:text-blue-400 dark:focus:bg-blue-800/30 dark:focus:text-blue-400" : s === "soft" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 hover:bg-gray-200 focus:outline-hidden focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:text-blue-400 dark:hover:bg-blue-900 dark:focus:bg-blue-900" : "relative border-solid border-gray-200 focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-input hover:bg-gray-100 border px-4 py-2 gap-2 bg-transparent h-[38px]";
|
|
636
636
|
}
|
|
637
|
-
const
|
|
637
|
+
const Zt = {
|
|
638
638
|
key: 0,
|
|
639
639
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
640
|
-
},
|
|
640
|
+
}, Jt = ["placeholder", "disabled"], Xt = {
|
|
641
641
|
key: 0,
|
|
642
642
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
643
|
-
},
|
|
643
|
+
}, el = {
|
|
644
644
|
key: 0,
|
|
645
645
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
646
|
-
},
|
|
646
|
+
}, tl = ["placeholder", "disabled"], ll = ["disabled"], al = /* @__PURE__ */ G({
|
|
647
647
|
__name: "range-input",
|
|
648
648
|
props: {
|
|
649
649
|
id: {},
|
|
@@ -670,84 +670,84 @@ const Gt = {
|
|
|
670
670
|
},
|
|
671
671
|
emits: ["update:modelValue", "change", "clear"],
|
|
672
672
|
setup(s, { expose: n, emit: r }) {
|
|
673
|
-
const o =
|
|
673
|
+
const o = nt(), t = Qt(), u = s, c = V(
|
|
674
674
|
u.modelValue ?? u.default ?? []
|
|
675
|
-
), g = r, h =
|
|
676
|
-
get: () => u.modelValue ??
|
|
677
|
-
set: (
|
|
678
|
-
u.modelValue !== void 0 ? g("update:modelValue",
|
|
675
|
+
), g = r, h = Y({
|
|
676
|
+
get: () => u.modelValue ?? c.value,
|
|
677
|
+
set: (d) => {
|
|
678
|
+
u.modelValue !== void 0 ? g("update:modelValue", d) : c.value = d;
|
|
679
679
|
}
|
|
680
680
|
});
|
|
681
681
|
function w() {
|
|
682
|
-
g("change", { name: u.name, value: h.value ||
|
|
682
|
+
g("change", { name: u.name, value: h.value || c.value });
|
|
683
683
|
}
|
|
684
684
|
function m() {
|
|
685
|
-
|
|
685
|
+
c.value = [], h.value = c.value, g("clear", u.name);
|
|
686
686
|
}
|
|
687
|
-
return
|
|
688
|
-
|
|
687
|
+
return D(() => u.modelValue, (d) => {
|
|
688
|
+
d !== void 0 && u.layout !== "popover" ? (c.value = d, g("update:modelValue", d)) : c.value = [];
|
|
689
689
|
}), n({
|
|
690
690
|
clear: m,
|
|
691
691
|
currentValue: h
|
|
692
|
-
}), (
|
|
693
|
-
var
|
|
694
|
-
return
|
|
692
|
+
}), (d, y) => {
|
|
693
|
+
var C, v;
|
|
694
|
+
return f(), x(U, null, [
|
|
695
695
|
l("div", null, [
|
|
696
696
|
l("div", {
|
|
697
|
-
class:
|
|
697
|
+
class: P(d.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
|
|
698
698
|
}, [
|
|
699
699
|
l("div", null, [
|
|
700
|
-
|
|
701
|
-
|
|
700
|
+
d.layout !== "vertical" ? (f(), x("label", Zt, "Від")) : $("", !0),
|
|
701
|
+
W(l("input", {
|
|
702
702
|
type: "number",
|
|
703
|
-
class:
|
|
704
|
-
placeholder: ((
|
|
703
|
+
class: P(e(o)),
|
|
704
|
+
placeholder: ((C = d.placeHolder) == null ? void 0 : C[0]) ?? "min",
|
|
705
705
|
step: "1",
|
|
706
706
|
style: { outline: "none" },
|
|
707
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
708
|
-
disabled:
|
|
709
|
-
}, null, 10,
|
|
710
|
-
[
|
|
707
|
+
"onUpdate:modelValue": y[0] || (y[0] = (p) => h.value[0] = p),
|
|
708
|
+
disabled: d.disabled
|
|
709
|
+
}, null, 10, Jt), [
|
|
710
|
+
[ce, h.value[0]]
|
|
711
711
|
])
|
|
712
712
|
]),
|
|
713
|
-
|
|
713
|
+
d.layout === "vertical" ? (f(), x("label", Xt, " - ")) : $("", !0),
|
|
714
714
|
l("div", null, [
|
|
715
|
-
|
|
716
|
-
|
|
715
|
+
d.layout !== "vertical" ? (f(), x("label", el, "До")) : $("", !0),
|
|
716
|
+
W(l("input", {
|
|
717
717
|
type: "number",
|
|
718
|
-
class:
|
|
719
|
-
placeholder: ((v =
|
|
718
|
+
class: P(e(o)),
|
|
719
|
+
placeholder: ((v = d.placeHolder) == null ? void 0 : v[1]) ?? "max",
|
|
720
720
|
min: "0",
|
|
721
721
|
max: "1000000000000000",
|
|
722
722
|
step: "1",
|
|
723
723
|
style: { outline: "none" },
|
|
724
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
|
725
|
-
disabled:
|
|
726
|
-
}, null, 10,
|
|
727
|
-
[
|
|
724
|
+
"onUpdate:modelValue": y[1] || (y[1] = (p) => h.value[1] = p),
|
|
725
|
+
disabled: d.disabled
|
|
726
|
+
}, null, 10, tl), [
|
|
727
|
+
[ce, h.value[1]]
|
|
728
728
|
])
|
|
729
729
|
]),
|
|
730
|
-
["popover", "inline", "vertical"].includes(
|
|
730
|
+
["popover", "inline", "vertical"].includes(d.layout) ? (f(), x("button", {
|
|
731
731
|
key: 1,
|
|
732
732
|
onClick: w,
|
|
733
|
-
class:
|
|
734
|
-
},
|
|
735
|
-
["popover", "inline"].includes(
|
|
733
|
+
class: P(e(t) + (d.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
|
|
734
|
+
}, I(d.layout === "vertical" ? "Ok" : "Застосувати"), 3)) : $("", !0),
|
|
735
|
+
["popover", "inline"].includes(d.layout) ? (f(), x("button", {
|
|
736
736
|
key: 2,
|
|
737
737
|
disabled: !(h.value[0] || h.value[1]),
|
|
738
738
|
onClick: m,
|
|
739
|
-
class:
|
|
740
|
-
}, "Очистити", 10,
|
|
739
|
+
class: P(e(t) + " hover:bg-gray-100")
|
|
740
|
+
}, "Очистити", 10, ll)) : $("", !0)
|
|
741
741
|
], 2)
|
|
742
742
|
]),
|
|
743
|
-
(
|
|
743
|
+
(d.cleanable && c.value.length, $("", !0))
|
|
744
744
|
], 64);
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
|
-
}),
|
|
747
|
+
}), ol = ["disabled", "title"], nl = {
|
|
748
748
|
key: 0,
|
|
749
749
|
class: "absolute top-0 end-0 inline-flex min-h-[10px] min-w-[10px] z-10 items-center py-0.5 rounded-full text-xs font-medium transform -translate-y-1/2 translate-x-1/2 bg-blue-600 text-white px-1"
|
|
750
|
-
},
|
|
750
|
+
}, rl = { class: "w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, il = { class: "w-[360px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 before:w-full p-2" }, Ke = /* @__PURE__ */ G({
|
|
751
751
|
__name: "popover-field",
|
|
752
752
|
props: {
|
|
753
753
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -759,86 +759,86 @@ const Gt = {
|
|
|
759
759
|
layout: {}
|
|
760
760
|
},
|
|
761
761
|
setup(s, { expose: n }) {
|
|
762
|
-
const r = s, o =
|
|
762
|
+
const r = s, o = Y(() => rt(r.mode)), t = V(!1), u = V({ top: 0, left: 0 }), c = V(null), g = V(null), h = V(null);
|
|
763
763
|
function w() {
|
|
764
|
-
const a = g.value,
|
|
765
|
-
if (!a || !
|
|
766
|
-
const b = a.getBoundingClientRect(), i =
|
|
767
|
-
let { left:
|
|
768
|
-
|
|
764
|
+
const a = g.value, _ = h.value;
|
|
765
|
+
if (!a || !_) return;
|
|
766
|
+
const b = a.getBoundingClientRect(), i = _.offsetWidth, k = window.innerWidth, z = b.bottom + 8;
|
|
767
|
+
let { left: j } = b;
|
|
768
|
+
j + i > k && (j = Math.max(k - i - 10, 10)), u.value = { top: z, left: j };
|
|
769
769
|
}
|
|
770
770
|
function m() {
|
|
771
|
-
t.value = !t.value, t.value &&
|
|
772
|
-
var a,
|
|
773
|
-
w(), (a = r.fieldRef) != null && a.inputTextRef && ((
|
|
771
|
+
t.value = !t.value, t.value && Me(() => {
|
|
772
|
+
var a, _;
|
|
773
|
+
w(), (a = r.fieldRef) != null && a.inputTextRef && ((_ = r.fieldRef) == null || _.inputTextRef.focus());
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
|
-
function
|
|
777
|
-
var
|
|
778
|
-
!((
|
|
776
|
+
function d(a) {
|
|
777
|
+
var _, b;
|
|
778
|
+
!((_ = c.value) != null && _.contains(a.target)) && !((b = h.value) != null && b.contains(a.target)) && (t.value = !1);
|
|
779
779
|
}
|
|
780
780
|
function y(a) {
|
|
781
781
|
a.key === "Escape" && (t.value = !1);
|
|
782
782
|
}
|
|
783
|
-
const
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}),
|
|
787
|
-
document.addEventListener("click",
|
|
788
|
-
}),
|
|
789
|
-
document.removeEventListener("click",
|
|
783
|
+
const C = V(!1);
|
|
784
|
+
we(() => {
|
|
785
|
+
C.value = !0;
|
|
786
|
+
}), we(() => {
|
|
787
|
+
document.addEventListener("click", d, !0), document.addEventListener("keydown", y), window.addEventListener("scroll", w, !0);
|
|
788
|
+
}), Ve(() => {
|
|
789
|
+
document.removeEventListener("click", d, !0), document.removeEventListener("keydown", y), window.removeEventListener("scroll", w, !0);
|
|
790
790
|
});
|
|
791
791
|
function v() {
|
|
792
792
|
t.value = !1;
|
|
793
793
|
}
|
|
794
794
|
n({ close: v });
|
|
795
|
-
const
|
|
796
|
-
var
|
|
797
|
-
const a = (
|
|
795
|
+
const p = Y(() => {
|
|
796
|
+
var _;
|
|
797
|
+
const a = (_ = r.fieldRef) == null ? void 0 : _.selectedLabels;
|
|
798
798
|
return a ? Array.isArray(a) ? a.length > 0 ? a.join(", ") : r.label ?? "" : String(a) : r.label ?? "";
|
|
799
799
|
});
|
|
800
|
-
return (a,
|
|
800
|
+
return (a, _) => (f(), x("div", null, [
|
|
801
801
|
l("button", {
|
|
802
802
|
onClick: m,
|
|
803
803
|
disabled: a.disabled,
|
|
804
804
|
ref_key: "triggerRef",
|
|
805
805
|
ref: g,
|
|
806
806
|
title: a.label,
|
|
807
|
-
class:
|
|
807
|
+
class: P(o.value + " " + (a.width ? e(ze).getWidthClass(a.width) : "w-full"))
|
|
808
808
|
}, [
|
|
809
809
|
l("span", {
|
|
810
|
-
class:
|
|
811
|
-
},
|
|
812
|
-
|
|
813
|
-
(Array.isArray(a.currentValue) ? a.currentValue === null || a.currentValue.length > 0 : a.currentValue === null || a.currentValue) && a.layout === "inline" ? (
|
|
814
|
-
], 10,
|
|
815
|
-
|
|
810
|
+
class: P(["truncate text-ellipsis block", a.width ? e(ze).getWidthClass(a.width - 50) : "w-full"])
|
|
811
|
+
}, I(p.value), 3),
|
|
812
|
+
q(Be, { class: "h-4 w-4" }),
|
|
813
|
+
(Array.isArray(a.currentValue) ? a.currentValue === null || a.currentValue.length > 0 : a.currentValue === null || a.currentValue) && a.layout === "inline" ? (f(), x("span", nl)) : $("", !0)
|
|
814
|
+
], 10, ol),
|
|
815
|
+
C.value ? (f(), K(Ze, {
|
|
816
816
|
key: 0,
|
|
817
817
|
to: "body"
|
|
818
818
|
}, [
|
|
819
|
-
|
|
819
|
+
W(l("div", {
|
|
820
820
|
ref_key: "popperRef",
|
|
821
821
|
ref: h,
|
|
822
822
|
class: "vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",
|
|
823
|
-
style:
|
|
823
|
+
style: Re({ top: `${u.value.top}px`, left: `${u.value.left}px` }),
|
|
824
824
|
"data-inside-popover": ""
|
|
825
825
|
}, [
|
|
826
|
-
l("div",
|
|
827
|
-
l("div",
|
|
828
|
-
|
|
826
|
+
l("div", rl, [
|
|
827
|
+
l("div", il, [
|
|
828
|
+
ue(a.$slots, "default")
|
|
829
829
|
])
|
|
830
830
|
])
|
|
831
831
|
], 4), [
|
|
832
|
-
[
|
|
832
|
+
[ie, t.value]
|
|
833
833
|
])
|
|
834
834
|
])) : $("", !0)
|
|
835
835
|
]));
|
|
836
836
|
}
|
|
837
837
|
});
|
|
838
|
-
function
|
|
838
|
+
function sl(s) {
|
|
839
839
|
return String(s).charAt(0).toUpperCase() + String(s).slice(1);
|
|
840
840
|
}
|
|
841
|
-
class
|
|
841
|
+
class ae {
|
|
842
842
|
static format(n) {
|
|
843
843
|
const r = n.getFullYear(), o = (n.getMonth() + 1).toString().padStart(2, "0"), t = n.getDate().toString().padStart(2, "0");
|
|
844
844
|
return `${r}-${o}-${t}`;
|
|
@@ -852,22 +852,22 @@ class Z {
|
|
|
852
852
|
const w = new Date(n), m = new Date(r);
|
|
853
853
|
return w.setDate(w.getDate() + o * 7), m.setDate(m.getDate() + o * 7), [this.format(w), this.format(m)];
|
|
854
854
|
}
|
|
855
|
-
const t = /* @__PURE__ */ new Date(), u = t.getDay(),
|
|
856
|
-
g.setDate(t.getDate() -
|
|
855
|
+
const t = /* @__PURE__ */ new Date(), u = t.getDay(), c = u === 0 ? 13 : u - 1 + 7, g = new Date(t);
|
|
856
|
+
g.setDate(t.getDate() - c + o * 7);
|
|
857
857
|
const h = new Date(g);
|
|
858
858
|
return h.setDate(g.getDate() + 6), [this.format(g), this.format(h)];
|
|
859
859
|
}
|
|
860
860
|
static getMonthRange(n, r, o = 0) {
|
|
861
861
|
let t;
|
|
862
862
|
n ? t = new Date(n) : t = /* @__PURE__ */ new Date(), t = new Date(t.getFullYear(), t.getMonth() + o, 1);
|
|
863
|
-
const u = t,
|
|
864
|
-
return [this.format(u), this.format(
|
|
863
|
+
const u = t, c = new Date(t.getFullYear(), t.getMonth() + 1, 0);
|
|
864
|
+
return [this.format(u), this.format(c)];
|
|
865
865
|
}
|
|
866
866
|
static getQuarterRange(n, r, o = 0) {
|
|
867
867
|
const t = n || r, u = t ? new Date(t) : /* @__PURE__ */ new Date();
|
|
868
|
-
let
|
|
869
|
-
|
|
870
|
-
const g = (
|
|
868
|
+
let c = Math.floor(u.getMonth() / 3);
|
|
869
|
+
c += o;
|
|
870
|
+
const g = (c % 4 + 4) % 4 * 3, h = u.getFullYear() + Math.floor(c / 4), w = new Date(h, g, 1), m = new Date(h, g + 3, 0);
|
|
871
871
|
return [this.format(w), this.format(m)];
|
|
872
872
|
}
|
|
873
873
|
static getYear(n, r = 0) {
|
|
@@ -886,86 +886,86 @@ class Z {
|
|
|
886
886
|
return o.setDate(r.getDate() - n), [this.format(o), this.format(r)];
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function it(s, n) {
|
|
890
890
|
const {
|
|
891
891
|
popoverRef: r
|
|
892
892
|
} = s, o = V(""), t = V(
|
|
893
893
|
s.modelValue ?? s.default ?? []
|
|
894
894
|
), u = V(0);
|
|
895
|
-
function
|
|
896
|
-
const
|
|
897
|
-
return t.value = [...
|
|
895
|
+
function c() {
|
|
896
|
+
const p = ae.getRangeFromDaysBefore(u.value);
|
|
897
|
+
return t.value = [...p], n("change", { name: s.name, value: t.value }), n("update:modelValue", t.value), p;
|
|
898
898
|
}
|
|
899
|
-
function g(
|
|
900
|
-
var
|
|
901
|
-
o.value =
|
|
899
|
+
function g(p) {
|
|
900
|
+
var _;
|
|
901
|
+
o.value = p, (_ = r.value) == null || _.close();
|
|
902
902
|
const a = [];
|
|
903
903
|
switch (o.value) {
|
|
904
904
|
case "today":
|
|
905
|
-
a.push(
|
|
905
|
+
a.push(ae.getShiftedDay()), a.push(ae.getShiftedDay());
|
|
906
906
|
break;
|
|
907
907
|
case "week":
|
|
908
|
-
a.push(...
|
|
908
|
+
a.push(...ae.getLastWeekRange());
|
|
909
909
|
break;
|
|
910
910
|
case "month":
|
|
911
|
-
a.push(...
|
|
911
|
+
a.push(...ae.getMonthRange());
|
|
912
912
|
break;
|
|
913
913
|
case "quarter":
|
|
914
|
-
a.push(...
|
|
914
|
+
a.push(...ae.getQuarterRange());
|
|
915
915
|
break;
|
|
916
916
|
case "year":
|
|
917
|
-
a.push(...
|
|
917
|
+
a.push(...ae.getYearRange());
|
|
918
918
|
break;
|
|
919
919
|
case "last_7_days":
|
|
920
|
-
u.value = 7,
|
|
920
|
+
u.value = 7, c();
|
|
921
921
|
break;
|
|
922
922
|
case "range":
|
|
923
|
-
u.value = 7, a.push(...
|
|
923
|
+
u.value = 7, a.push(...c());
|
|
924
924
|
break;
|
|
925
925
|
}
|
|
926
926
|
t.value = [...a], n("change", { name: s.name, value: t.value }), n("update:modelValue", t.value);
|
|
927
927
|
}
|
|
928
928
|
function h() {
|
|
929
|
-
const
|
|
929
|
+
const p = [];
|
|
930
930
|
switch (o.value) {
|
|
931
931
|
case "today":
|
|
932
|
-
|
|
932
|
+
p.push(ae.getShiftedDay(t.value[0], 1));
|
|
933
933
|
break;
|
|
934
934
|
case "week":
|
|
935
|
-
|
|
935
|
+
p.push(...ae.getLastWeekRange(t.value[0], t.value[1], 1));
|
|
936
936
|
break;
|
|
937
937
|
case "month":
|
|
938
|
-
|
|
938
|
+
p.push(...ae.getMonthRange(t.value[0], t.value[1], 1));
|
|
939
939
|
break;
|
|
940
940
|
case "quarter":
|
|
941
|
-
|
|
941
|
+
p.push(...ae.getQuarterRange(t.value[0], t.value[1], 1));
|
|
942
942
|
break;
|
|
943
943
|
case "year":
|
|
944
|
-
|
|
944
|
+
p.push(...ae.getYearRange(t.value[0], 1));
|
|
945
945
|
break;
|
|
946
946
|
}
|
|
947
|
-
t.value = [...
|
|
947
|
+
t.value = [...p], n("change", { name: s.name, value: t.value }), n("update:modelValue", t.value);
|
|
948
948
|
}
|
|
949
949
|
function w() {
|
|
950
|
-
const
|
|
950
|
+
const p = [];
|
|
951
951
|
switch (o.value) {
|
|
952
952
|
case "today":
|
|
953
|
-
|
|
953
|
+
p.push(ae.getShiftedDay(t.value[0], -1));
|
|
954
954
|
break;
|
|
955
955
|
case "week":
|
|
956
|
-
|
|
956
|
+
p.push(...ae.getLastWeekRange(t.value[0], t.value[1], -1));
|
|
957
957
|
break;
|
|
958
958
|
case "month":
|
|
959
|
-
|
|
959
|
+
p.push(...ae.getMonthRange(t.value[0], t.value[1], -1));
|
|
960
960
|
break;
|
|
961
961
|
case "quarter":
|
|
962
|
-
|
|
962
|
+
p.push(...ae.getQuarterRange(t.value[0], t.value[1], -1));
|
|
963
963
|
break;
|
|
964
964
|
case "year":
|
|
965
|
-
|
|
965
|
+
p.push(...ae.getYearRange(t.value[0], -1));
|
|
966
966
|
break;
|
|
967
967
|
}
|
|
968
|
-
t.value = [...
|
|
968
|
+
t.value = [...p], n("change", { name: s.name, value: t.value }), n("update:modelValue", t.value);
|
|
969
969
|
}
|
|
970
970
|
const m = [
|
|
971
971
|
"Січень",
|
|
@@ -981,29 +981,29 @@ function et(s, n) {
|
|
|
981
981
|
"Листопад",
|
|
982
982
|
"Грудень"
|
|
983
983
|
];
|
|
984
|
-
function
|
|
985
|
-
const [a,
|
|
986
|
-
return `${b}.${
|
|
984
|
+
function d(p) {
|
|
985
|
+
const [a, _, b] = p.split("-");
|
|
986
|
+
return `${b}.${_}.${a}`;
|
|
987
987
|
}
|
|
988
|
-
function y(
|
|
988
|
+
function y(p) {
|
|
989
989
|
const { value: a } = t;
|
|
990
|
-
switch (
|
|
990
|
+
switch (p) {
|
|
991
991
|
case "today":
|
|
992
|
-
return
|
|
992
|
+
return d(a[0]);
|
|
993
993
|
case "range":
|
|
994
994
|
return "Період";
|
|
995
995
|
case "week":
|
|
996
|
-
return a[0] && a[1] ? `${
|
|
996
|
+
return a[0] && a[1] ? `${d(a[0])} – ${d(a[1])}` : "";
|
|
997
997
|
case "quarter":
|
|
998
998
|
if (a[0]) {
|
|
999
|
-
const
|
|
999
|
+
const _ = new Date(a[0]), b = _.getFullYear(), i = _.getMonth();
|
|
1000
1000
|
return `${Math.floor(i / 3) + 1} квартал ${b}`;
|
|
1001
1001
|
}
|
|
1002
1002
|
return "";
|
|
1003
1003
|
case "month":
|
|
1004
1004
|
if (a[0]) {
|
|
1005
|
-
const [
|
|
1006
|
-
return `${m[parseInt(b, 10) - 1]} ${
|
|
1005
|
+
const [_, b] = a[0].split("-");
|
|
1006
|
+
return `${m[parseInt(b, 10) - 1]} ${_}`;
|
|
1007
1007
|
}
|
|
1008
1008
|
return "";
|
|
1009
1009
|
case "year":
|
|
@@ -1014,7 +1014,7 @@ function et(s, n) {
|
|
|
1014
1014
|
return s.label ?? "";
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
const
|
|
1017
|
+
const C = Y(() => o.value ? y(o.value) : s.label ?? "");
|
|
1018
1018
|
function v() {
|
|
1019
1019
|
o.value = "", t.value = [], n("update:modelValue", []), n("clear", s.name);
|
|
1020
1020
|
}
|
|
@@ -1022,33 +1022,33 @@ function et(s, n) {
|
|
|
1022
1022
|
activeMode: o,
|
|
1023
1023
|
innerValue: t,
|
|
1024
1024
|
daysBefore: u,
|
|
1025
|
-
onDaysBeforeChange:
|
|
1025
|
+
onDaysBeforeChange: c,
|
|
1026
1026
|
onSelectChange: g,
|
|
1027
1027
|
nextClick: h,
|
|
1028
1028
|
prevClick: w,
|
|
1029
1029
|
ukMonths: m,
|
|
1030
|
-
formatDisplayDate:
|
|
1030
|
+
formatDisplayDate: d,
|
|
1031
1031
|
getModeLabel: y,
|
|
1032
|
-
currentLabel:
|
|
1032
|
+
currentLabel: C,
|
|
1033
1033
|
clear: v
|
|
1034
1034
|
};
|
|
1035
1035
|
}
|
|
1036
|
-
const
|
|
1036
|
+
const ul = {
|
|
1037
1037
|
key: 0,
|
|
1038
1038
|
class: "relative flex w-full h-auto gap-2 filter-date m-2 flex-wrap"
|
|
1039
|
-
},
|
|
1039
|
+
}, cl = {
|
|
1040
1040
|
key: 0,
|
|
1041
1041
|
class: "flex gap-1 !w-[75%] rounded-lg"
|
|
1042
|
-
},
|
|
1042
|
+
}, dl = ["max", "disabled"], pl = ["min", "disabled"], fl = {
|
|
1043
1043
|
key: 0,
|
|
1044
1044
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1045
|
-
},
|
|
1045
|
+
}, vl = ["max", "disabled"], ml = {
|
|
1046
1046
|
key: 0,
|
|
1047
1047
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1048
|
-
},
|
|
1048
|
+
}, hl = {
|
|
1049
1049
|
key: 0,
|
|
1050
1050
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1051
|
-
},
|
|
1051
|
+
}, gl = ["min", "disabled"], yl = { class: "flex gap-1 pt-2" }, bl = ["onClick"], xl = /* @__PURE__ */ G({
|
|
1052
1052
|
__name: "date-input",
|
|
1053
1053
|
props: {
|
|
1054
1054
|
id: {},
|
|
@@ -1075,230 +1075,230 @@ const il = {
|
|
|
1075
1075
|
},
|
|
1076
1076
|
emits: ["update:modelValue", "change", "clear"],
|
|
1077
1077
|
setup(s, { expose: n, emit: r }) {
|
|
1078
|
-
const o = s, t =
|
|
1078
|
+
const o = s, t = nt(), u = Gt(), c = r, g = V(null), {
|
|
1079
1079
|
activeMode: h,
|
|
1080
1080
|
innerValue: w,
|
|
1081
1081
|
onSelectChange: m,
|
|
1082
|
-
nextClick:
|
|
1082
|
+
nextClick: d,
|
|
1083
1083
|
prevClick: y,
|
|
1084
|
-
clear:
|
|
1085
|
-
} =
|
|
1084
|
+
clear: C
|
|
1085
|
+
} = it({
|
|
1086
1086
|
...o,
|
|
1087
1087
|
popoverRef: g
|
|
1088
|
-
},
|
|
1089
|
-
return
|
|
1090
|
-
v !== void 0 ? (w.value = v,
|
|
1088
|
+
}, c);
|
|
1089
|
+
return D(() => o.modelValue, (v) => {
|
|
1090
|
+
v !== void 0 ? (w.value = v, c("update:modelValue", v)) : (h.value = "", w.value = []);
|
|
1091
1091
|
}), n({
|
|
1092
|
-
clear:
|
|
1092
|
+
clear: C,
|
|
1093
1093
|
popoverRef: g
|
|
1094
|
-
}), (v,
|
|
1095
|
-
v.layout === "inline" ? (
|
|
1096
|
-
e(h) !== "" && e(h) === "range" ? (
|
|
1097
|
-
|
|
1094
|
+
}), (v, p) => (f(), x(U, null, [
|
|
1095
|
+
v.layout === "inline" ? (f(), x("div", ul, [
|
|
1096
|
+
e(h) !== "" && e(h) === "range" ? (f(), x("div", cl, [
|
|
1097
|
+
W(l("input", {
|
|
1098
1098
|
type: "date",
|
|
1099
1099
|
max: e(w)[1],
|
|
1100
1100
|
locale: "uk-UA",
|
|
1101
|
-
"onUpdate:modelValue":
|
|
1101
|
+
"onUpdate:modelValue": p[0] || (p[0] = (a) => e(w)[0] = a),
|
|
1102
1102
|
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",
|
|
1103
1103
|
disabled: v.disabled
|
|
1104
|
-
}, null, 8,
|
|
1105
|
-
[
|
|
1104
|
+
}, null, 8, dl), [
|
|
1105
|
+
[ce, e(w)[0]]
|
|
1106
1106
|
]),
|
|
1107
|
-
|
|
1107
|
+
W(l("input", {
|
|
1108
1108
|
type: "date",
|
|
1109
1109
|
min: e(w)[0],
|
|
1110
1110
|
locale: "uk-UA",
|
|
1111
|
-
"onUpdate:modelValue":
|
|
1111
|
+
"onUpdate:modelValue": p[1] || (p[1] = (a) => e(w)[1] = a),
|
|
1112
1112
|
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",
|
|
1113
1113
|
disabled: v.disabled
|
|
1114
|
-
}, null, 8,
|
|
1115
|
-
[
|
|
1114
|
+
}, null, 8, pl), [
|
|
1115
|
+
[ce, e(w)[1]]
|
|
1116
1116
|
])
|
|
1117
1117
|
])) : $("", !0)
|
|
1118
1118
|
])) : $("", !0),
|
|
1119
1119
|
l("div", {
|
|
1120
|
-
class:
|
|
1120
|
+
class: P(v.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
|
|
1121
1121
|
}, [
|
|
1122
1122
|
l("div", {
|
|
1123
|
-
class:
|
|
1123
|
+
class: P(v.layout !== "popover" ? "w-[48%]" : "")
|
|
1124
1124
|
}, [
|
|
1125
|
-
v.layout === "popover" ? (
|
|
1126
|
-
|
|
1125
|
+
v.layout === "popover" ? (f(), x("label", fl, "Від")) : $("", !0),
|
|
1126
|
+
W(l("input", {
|
|
1127
1127
|
type: "date",
|
|
1128
1128
|
max: e(w)[1],
|
|
1129
1129
|
locale: "uk-UA",
|
|
1130
|
-
"onUpdate:modelValue":
|
|
1131
|
-
class:
|
|
1130
|
+
"onUpdate:modelValue": p[2] || (p[2] = (a) => e(w)[0] = a),
|
|
1131
|
+
class: P(e(t)),
|
|
1132
1132
|
disabled: v.disabled
|
|
1133
|
-
}, null, 10,
|
|
1134
|
-
[
|
|
1133
|
+
}, null, 10, vl), [
|
|
1134
|
+
[ce, e(w)[0]]
|
|
1135
1135
|
])
|
|
1136
1136
|
], 2),
|
|
1137
|
-
v.layout !== "popover" ? (
|
|
1137
|
+
v.layout !== "popover" ? (f(), x("label", ml, " - ")) : $("", !0),
|
|
1138
1138
|
l("div", {
|
|
1139
|
-
class:
|
|
1139
|
+
class: P(v.layout !== "popover" ? "w-[48%]" : "")
|
|
1140
1140
|
}, [
|
|
1141
|
-
v.layout === "popover" ? (
|
|
1142
|
-
|
|
1141
|
+
v.layout === "popover" ? (f(), x("label", hl, "До")) : $("", !0),
|
|
1142
|
+
W(l("input", {
|
|
1143
1143
|
type: "date",
|
|
1144
1144
|
min: e(w)[0],
|
|
1145
1145
|
locale: "uk-UA",
|
|
1146
|
-
"onUpdate:modelValue":
|
|
1147
|
-
class:
|
|
1146
|
+
"onUpdate:modelValue": p[3] || (p[3] = (a) => e(w)[1] = a),
|
|
1147
|
+
class: P(e(t)),
|
|
1148
1148
|
disabled: v.disabled
|
|
1149
|
-
}, null, 10,
|
|
1150
|
-
[
|
|
1149
|
+
}, null, 10, gl), [
|
|
1150
|
+
[ce, e(w)[1]]
|
|
1151
1151
|
])
|
|
1152
1152
|
], 2)
|
|
1153
1153
|
], 2),
|
|
1154
|
-
l("div",
|
|
1155
|
-
(
|
|
1154
|
+
l("div", yl, [
|
|
1155
|
+
(f(), x(U, null, le(["today", "week", "month", "quarter", "year"], (a) => l("button", {
|
|
1156
1156
|
key: a,
|
|
1157
|
-
class:
|
|
1158
|
-
onClick: (
|
|
1159
|
-
},
|
|
1157
|
+
class: P(e(u) + (e(h) === a ? " bg-blue-100" : "")),
|
|
1158
|
+
onClick: (_) => e(m)(a)
|
|
1159
|
+
}, I(e(sl)(a)), 11, bl)), 64)),
|
|
1160
1160
|
l("button", {
|
|
1161
|
-
class:
|
|
1162
|
-
onClick:
|
|
1161
|
+
class: P(e(u)),
|
|
1162
|
+
onClick: p[4] || (p[4] = //@ts-ignore
|
|
1163
1163
|
(...a) => e(y) && e(y)(...a))
|
|
1164
1164
|
}, " <", 2),
|
|
1165
1165
|
l("button", {
|
|
1166
|
-
class:
|
|
1167
|
-
onClick:
|
|
1168
|
-
(...a) => e(
|
|
1166
|
+
class: P(e(u)),
|
|
1167
|
+
onClick: p[5] || (p[5] = //@ts-ignore
|
|
1168
|
+
(...a) => e(d) && e(d)(...a))
|
|
1169
1169
|
}, " >", 2)
|
|
1170
1170
|
]),
|
|
1171
1171
|
(v.cleanable, $("", !0))
|
|
1172
1172
|
], 64));
|
|
1173
1173
|
}
|
|
1174
1174
|
});
|
|
1175
|
-
function
|
|
1175
|
+
function wl(s, n) {
|
|
1176
1176
|
const {
|
|
1177
1177
|
api: r,
|
|
1178
1178
|
options: o = [],
|
|
1179
1179
|
limit: t = 20,
|
|
1180
1180
|
dataKey: u = "data"
|
|
1181
|
-
} = s,
|
|
1182
|
-
function g(
|
|
1183
|
-
return
|
|
1181
|
+
} = s, c = s.multi;
|
|
1182
|
+
function g(M) {
|
|
1183
|
+
return c ? Array.isArray(M) ? M : M ? [M] : [] : Array.isArray(M) ? M[0] : M;
|
|
1184
1184
|
}
|
|
1185
|
-
const h = V(g(s.modelValue)), w = V(""), m = V(!1),
|
|
1186
|
-
function b(
|
|
1187
|
-
const
|
|
1188
|
-
return { autoValueKey:
|
|
1185
|
+
const h = V(g(s.modelValue)), w = V(""), m = V(!1), d = V([]), y = V("id"), C = V("text"), v = V(!1), p = V(s.layout !== "popover" && o.length > t), a = V([]), _ = V(0);
|
|
1186
|
+
function b(M) {
|
|
1187
|
+
const T = M.find(Boolean) ?? {}, Z = ["id", "value", "code", "key"].find((S) => S in T) ?? "id", se = ["text", "label", "name", "title"].find((S) => S in T) ?? "text";
|
|
1188
|
+
return { autoValueKey: Z, autoLabelKey: se };
|
|
1189
1189
|
}
|
|
1190
1190
|
if (o.length > 0) {
|
|
1191
|
-
const
|
|
1192
|
-
y.value =
|
|
1191
|
+
const M = b(o);
|
|
1192
|
+
y.value = M.autoValueKey, C.value = M.autoLabelKey;
|
|
1193
1193
|
}
|
|
1194
|
-
const i =
|
|
1195
|
-
if (r) return
|
|
1196
|
-
const
|
|
1197
|
-
if (s.layout === "popover") return
|
|
1194
|
+
const i = Y(() => {
|
|
1195
|
+
if (r) return d.value;
|
|
1196
|
+
const M = d.value;
|
|
1197
|
+
if (s.layout === "popover") return M;
|
|
1198
1198
|
if (!w.value)
|
|
1199
|
-
return v.value ?
|
|
1200
|
-
const
|
|
1201
|
-
return
|
|
1199
|
+
return v.value ? M : M.slice(0, t);
|
|
1200
|
+
const T = w.value.toLowerCase();
|
|
1201
|
+
return M.filter((Z) => Z[C.value].toLowerCase().includes(T));
|
|
1202
1202
|
});
|
|
1203
1203
|
let k = null;
|
|
1204
|
-
async function z(
|
|
1204
|
+
async function z(M) {
|
|
1205
1205
|
if (r) {
|
|
1206
1206
|
m.value = !0;
|
|
1207
1207
|
try {
|
|
1208
|
-
const
|
|
1209
|
-
|
|
1210
|
-
const
|
|
1211
|
-
if (!
|
|
1212
|
-
throw new Error(`HTTP error! status: ${
|
|
1213
|
-
const
|
|
1214
|
-
if (
|
|
1215
|
-
const
|
|
1216
|
-
y.value =
|
|
1208
|
+
const T = new URL(r, window.location.origin);
|
|
1209
|
+
T.searchParams.set("json", "1"), T.searchParams.set("key", M), T.searchParams.set("limit", t.toString());
|
|
1210
|
+
const Z = await fetch(T.toString());
|
|
1211
|
+
if (!Z.ok)
|
|
1212
|
+
throw new Error(`HTTP error! status: ${Z.status}`);
|
|
1213
|
+
const se = await Z.json();
|
|
1214
|
+
if (d.value = se[u], d.value.length > 0) {
|
|
1215
|
+
const S = b(d.value);
|
|
1216
|
+
y.value = S.autoValueKey, C.value = S.autoLabelKey;
|
|
1217
1217
|
}
|
|
1218
|
-
|
|
1219
|
-
} catch (
|
|
1220
|
-
console.error("Failed to fetch remote options:",
|
|
1218
|
+
_.value = se.total;
|
|
1219
|
+
} catch (T) {
|
|
1220
|
+
console.error("Failed to fetch remote options:", T);
|
|
1221
1221
|
} finally {
|
|
1222
1222
|
m.value = !1;
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
1225
1225
|
}
|
|
1226
|
-
|
|
1226
|
+
D(w, (M) => {
|
|
1227
1227
|
r && (k && clearTimeout(k), k = setTimeout(() => {
|
|
1228
|
-
z(
|
|
1228
|
+
z(M);
|
|
1229
1229
|
}, 200));
|
|
1230
|
-
}),
|
|
1231
|
-
h.value = g(
|
|
1232
|
-
}, { immediate: !0 }), r ? z("") :
|
|
1233
|
-
function
|
|
1234
|
-
return
|
|
1235
|
-
}
|
|
1236
|
-
function
|
|
1237
|
-
if (
|
|
1238
|
-
const
|
|
1239
|
-
h.value =
|
|
1230
|
+
}), D(() => s.modelValue, (M) => {
|
|
1231
|
+
h.value = g(M);
|
|
1232
|
+
}, { immediate: !0 }), r ? z("") : d.value = o;
|
|
1233
|
+
function j(M) {
|
|
1234
|
+
return c && Array.isArray(h.value) ? h.value.includes(M[y.value]) : h.value && h.value === M[y.value];
|
|
1235
|
+
}
|
|
1236
|
+
function A(M) {
|
|
1237
|
+
if (c && !Array.isArray(h.value) && (h.value = []), c && Array.isArray(h.value)) {
|
|
1238
|
+
const T = h.value.includes(M[y.value]);
|
|
1239
|
+
h.value = T ? h.value.filter((Z) => Z !== M[y.value]) : [...h.value, M[y.value]], a.value = T ? a.value.filter((Z) => Z !== M[C.value]) : [...a.value, M[C.value]];
|
|
1240
1240
|
} else
|
|
1241
|
-
h.value =
|
|
1241
|
+
h.value = M[y.value], a.value = M[C.value];
|
|
1242
1242
|
n("update:modelValue", h.value), n("change", { name: s.name, value: h.value });
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1245
|
-
|
|
1244
|
+
function O() {
|
|
1245
|
+
c ? (h.value = [], a.value = []) : (h.value = void 0, a.value = []), n("update:modelValue", h.value), n("clear", s.name);
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function L() {
|
|
1248
1248
|
k && clearTimeout(k), w.value = "", v.value = !1;
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function pe() {
|
|
1251
1251
|
v.value = !v.value;
|
|
1252
1252
|
}
|
|
1253
|
-
|
|
1253
|
+
Ve(() => {
|
|
1254
1254
|
k && clearTimeout(k);
|
|
1255
1255
|
});
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1258
|
-
|
|
1256
|
+
const oe = V(-1);
|
|
1257
|
+
D(i, () => {
|
|
1258
|
+
oe.value = i.value.length > 0 ? 0 : -1;
|
|
1259
1259
|
});
|
|
1260
|
-
function M
|
|
1261
|
-
const
|
|
1262
|
-
if (
|
|
1263
|
-
|
|
1264
|
-
else if (
|
|
1265
|
-
|
|
1266
|
-
else if (
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1260
|
+
function N(M) {
|
|
1261
|
+
const T = i.value.length;
|
|
1262
|
+
if (M.key === "ArrowDown")
|
|
1263
|
+
M.preventDefault(), oe.value = (oe.value + 1) % T;
|
|
1264
|
+
else if (M.key === "ArrowUp")
|
|
1265
|
+
M.preventDefault(), oe.value = (oe.value - 1 + T) % T;
|
|
1266
|
+
else if (M.key === "Enter" && (M.preventDefault(), oe.value >= 0 && oe.value < i.value.length)) {
|
|
1267
|
+
const Z = i.value[oe.value];
|
|
1268
|
+
A(Z);
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
1271
|
return {
|
|
1272
1272
|
innerValue: h,
|
|
1273
1273
|
searchTerm: w,
|
|
1274
1274
|
filteredOptions: i,
|
|
1275
|
-
isSelected:
|
|
1276
|
-
selectItem:
|
|
1277
|
-
clear:
|
|
1278
|
-
resetSearch:
|
|
1279
|
-
toggleShowAll:
|
|
1275
|
+
isSelected: j,
|
|
1276
|
+
selectItem: A,
|
|
1277
|
+
clear: O,
|
|
1278
|
+
resetSearch: L,
|
|
1279
|
+
toggleShowAll: pe,
|
|
1280
1280
|
isReqProc: m,
|
|
1281
1281
|
showAll: v,
|
|
1282
|
-
isEnableShowAll:
|
|
1283
|
-
labelKey:
|
|
1282
|
+
isEnableShowAll: p,
|
|
1283
|
+
labelKey: C,
|
|
1284
1284
|
valueKey: y,
|
|
1285
|
-
allOptions:
|
|
1286
|
-
highlightedIndex:
|
|
1287
|
-
onKeyDown:
|
|
1285
|
+
allOptions: d,
|
|
1286
|
+
highlightedIndex: oe,
|
|
1287
|
+
onKeyDown: N,
|
|
1288
1288
|
selectedLabels: a,
|
|
1289
|
-
totalCount:
|
|
1289
|
+
totalCount: _
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
1292
|
-
const
|
|
1292
|
+
const kl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center" }, _l = {
|
|
1293
1293
|
key: 0,
|
|
1294
1294
|
class: "w-full"
|
|
1295
|
-
},
|
|
1295
|
+
}, Cl = { class: "flex flex-col items-center justify-center p-5 text-center" }, Vl = {
|
|
1296
1296
|
key: 0,
|
|
1297
1297
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
1298
|
-
},
|
|
1298
|
+
}, $l = {
|
|
1299
1299
|
key: 1,
|
|
1300
1300
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
1301
|
-
},
|
|
1301
|
+
}, Sl = /* @__PURE__ */ G({
|
|
1302
1302
|
__name: "select",
|
|
1303
1303
|
props: {
|
|
1304
1304
|
id: {},
|
|
@@ -1326,153 +1326,153 @@ const xl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1326
1326
|
emits: ["update:modelValue", "change", "clear"],
|
|
1327
1327
|
setup(s, { expose: n, emit: r }) {
|
|
1328
1328
|
const o = s, t = r, u = V(null), {
|
|
1329
|
-
innerValue:
|
|
1329
|
+
innerValue: c,
|
|
1330
1330
|
filteredOptions: g,
|
|
1331
1331
|
isSelected: h,
|
|
1332
1332
|
selectItem: w,
|
|
1333
1333
|
clear: m,
|
|
1334
|
-
resetSearch:
|
|
1334
|
+
resetSearch: d,
|
|
1335
1335
|
toggleShowAll: y,
|
|
1336
|
-
isReqProc:
|
|
1336
|
+
isReqProc: C,
|
|
1337
1337
|
showAll: v,
|
|
1338
|
-
isEnableShowAll:
|
|
1338
|
+
isEnableShowAll: p,
|
|
1339
1339
|
searchTerm: a,
|
|
1340
|
-
labelKey:
|
|
1340
|
+
labelKey: _,
|
|
1341
1341
|
valueKey: b,
|
|
1342
1342
|
highlightedIndex: i,
|
|
1343
1343
|
onKeyDown: k,
|
|
1344
1344
|
selectedLabels: z,
|
|
1345
|
-
totalCount:
|
|
1346
|
-
} =
|
|
1345
|
+
totalCount: j
|
|
1346
|
+
} = wl({
|
|
1347
1347
|
...o,
|
|
1348
1348
|
modelValue: o.modelValue
|
|
1349
1349
|
}, t);
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
}),
|
|
1350
|
+
we(() => {
|
|
1351
|
+
d();
|
|
1352
|
+
}), D(
|
|
1353
1353
|
() => o.modelValue,
|
|
1354
|
-
(
|
|
1355
|
-
|
|
1354
|
+
(O) => {
|
|
1355
|
+
O === void 0 && (o.multi ? c.value = [] : c.value = void 0);
|
|
1356
1356
|
}
|
|
1357
1357
|
);
|
|
1358
|
-
const
|
|
1359
|
-
return
|
|
1360
|
-
var
|
|
1361
|
-
|
|
1358
|
+
const A = V([]);
|
|
1359
|
+
return D(i, (O) => {
|
|
1360
|
+
var L;
|
|
1361
|
+
O >= 0 && A.value[O] && ((L = A.value[O]) == null || L.scrollIntoView({
|
|
1362
1362
|
block: "nearest",
|
|
1363
1363
|
behavior: "smooth"
|
|
1364
1364
|
}));
|
|
1365
|
-
}),
|
|
1366
|
-
|
|
1365
|
+
}), D(g, () => {
|
|
1366
|
+
A.value = [];
|
|
1367
1367
|
}), n({
|
|
1368
1368
|
clear: m,
|
|
1369
1369
|
inputTextRef: u,
|
|
1370
1370
|
selectedLabels: z
|
|
1371
|
-
}), (
|
|
1372
|
-
var
|
|
1373
|
-
return
|
|
1374
|
-
class:
|
|
1371
|
+
}), (O, L) => {
|
|
1372
|
+
var pe, oe;
|
|
1373
|
+
return f(), x("div", {
|
|
1374
|
+
class: P([O.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
|
|
1375
1375
|
}, [
|
|
1376
|
-
l("div",
|
|
1377
|
-
|
|
1378
|
-
"onUpdate:modelValue":
|
|
1379
|
-
onKeydown:
|
|
1380
|
-
(...
|
|
1376
|
+
l("div", kl, [
|
|
1377
|
+
W(l("input", {
|
|
1378
|
+
"onUpdate:modelValue": L[0] || (L[0] = (N) => pt(a) ? a.value = N : null),
|
|
1379
|
+
onKeydown: L[1] || (L[1] = //@ts-ignore
|
|
1380
|
+
(...N) => e(k) && e(k)(...N)),
|
|
1381
1381
|
class: "w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",
|
|
1382
1382
|
placeholder: "Пошук",
|
|
1383
1383
|
type: "text",
|
|
1384
1384
|
ref_key: "inputTextRef",
|
|
1385
1385
|
ref: u
|
|
1386
1386
|
}, null, 544), [
|
|
1387
|
-
[
|
|
1387
|
+
[ce, e(a)]
|
|
1388
1388
|
]),
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
onClick:
|
|
1389
|
+
q(at, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
|
|
1390
|
+
q(ot, {
|
|
1391
|
+
onClick: L[2] || (L[2] = (N) => a.value = ""),
|
|
1392
1392
|
class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
|
|
1393
1393
|
})
|
|
1394
1394
|
]),
|
|
1395
1395
|
l("div", {
|
|
1396
|
-
class:
|
|
1397
|
-
|
|
1398
|
-
|
|
1396
|
+
class: P([
|
|
1397
|
+
O.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
|
1398
|
+
O.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
|
1399
1399
|
])
|
|
1400
1400
|
}, [
|
|
1401
|
-
(
|
|
1402
|
-
layout:
|
|
1403
|
-
count:
|
|
1404
|
-
label:
|
|
1405
|
-
color:
|
|
1406
|
-
type:
|
|
1407
|
-
value:
|
|
1408
|
-
"is-selected": e(h)(
|
|
1409
|
-
highlighted:
|
|
1410
|
-
onItemClick: (
|
|
1401
|
+
(f(!0), x(U, null, le(e(g), (N, M) => (f(), K(De, {
|
|
1402
|
+
layout: O.layout,
|
|
1403
|
+
count: N.count,
|
|
1404
|
+
label: N[e(_)],
|
|
1405
|
+
color: N.color,
|
|
1406
|
+
type: O.multi ? "checkbox" : "radio",
|
|
1407
|
+
value: N[e(b)],
|
|
1408
|
+
"is-selected": e(h)(N),
|
|
1409
|
+
highlighted: M === e(i),
|
|
1410
|
+
onItemClick: (T) => e(w)(N),
|
|
1411
1411
|
ref_for: !0,
|
|
1412
|
-
ref: (
|
|
1412
|
+
ref: (T) => A.value[M] = T == null ? void 0 : T.el
|
|
1413
1413
|
}, null, 8, ["layout", "count", "label", "color", "type", "value", "is-selected", "highlighted", "onItemClick"]))), 256))
|
|
1414
1414
|
], 2),
|
|
1415
|
-
|
|
1416
|
-
l("div",
|
|
1417
|
-
|
|
1418
|
-
|
|
1415
|
+
O.type === "select" && e(g).length === 0 && !e(C) ? (f(), x("div", _l, [
|
|
1416
|
+
l("div", Cl, [
|
|
1417
|
+
q(Fe),
|
|
1418
|
+
L[7] || (L[7] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
1419
1419
|
l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
|
|
1420
1420
|
l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
1421
1421
|
], -1))
|
|
1422
1422
|
])
|
|
1423
1423
|
])) : $("", !0),
|
|
1424
|
-
|
|
1425
|
-
!e(v) && e(
|
|
1424
|
+
O.layout !== "popover" && O.type !== "select" ? (f(), x(U, { key: 1 }, [
|
|
1425
|
+
!e(v) && e(p) ? (f(), x("div", {
|
|
1426
1426
|
key: 0,
|
|
1427
|
-
onClick:
|
|
1428
|
-
(...
|
|
1427
|
+
onClick: L[3] || (L[3] = //@ts-ignore
|
|
1428
|
+
(...N) => e(y) && e(y)(...N)),
|
|
1429
1429
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
1430
1430
|
}, [
|
|
1431
|
-
|
|
1432
|
-
|
|
1431
|
+
L[8] || (L[8] = J(" Показати більше ", -1)),
|
|
1432
|
+
q(Be)
|
|
1433
1433
|
])) : $("", !0),
|
|
1434
|
-
e(v) ? (
|
|
1434
|
+
e(v) ? (f(), x("div", {
|
|
1435
1435
|
key: 1,
|
|
1436
|
-
onClick:
|
|
1437
|
-
(...
|
|
1436
|
+
onClick: L[4] || (L[4] = //@ts-ignore
|
|
1437
|
+
(...N) => e(y) && e(y)(...N)),
|
|
1438
1438
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
1439
1439
|
}, [
|
|
1440
|
-
|
|
1441
|
-
|
|
1440
|
+
L[9] || (L[9] = J(" Показати менше ", -1)),
|
|
1441
|
+
q(Le)
|
|
1442
1442
|
])) : $("", !0)
|
|
1443
1443
|
], 64)) : $("", !0),
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1444
|
+
O.cleanable ? (f(), x(U, { key: 2 }, [
|
|
1445
|
+
O.layout === "inline" ? (f(), x("div", Vl, [
|
|
1446
|
+
J(I(O.multi && Array.isArray(e(c)) ? (pe = e(c)) == null ? void 0 : pe.length : e(c) !== void 0 && (e(c) || e(c) === null) ? 1 : 0) + " з " + I(e(j)) + " обрано ", 1),
|
|
1447
|
+
W(l("button", {
|
|
1448
1448
|
class: "text-gray-600 hover:text-gray-800",
|
|
1449
|
-
onClick:
|
|
1450
|
-
(...
|
|
1449
|
+
onClick: L[5] || (L[5] = //@ts-ignore
|
|
1450
|
+
(...N) => e(m) && e(m)(...N))
|
|
1451
1451
|
}, " Очистити ", 512), [
|
|
1452
|
-
[
|
|
1452
|
+
[ie, e(c) !== "" && e(c) !== void 0 || e(c)]
|
|
1453
1453
|
])
|
|
1454
1454
|
])) : $("", !0),
|
|
1455
|
-
|
|
1456
|
-
l("span", null, O
|
|
1457
|
-
|
|
1455
|
+
O.layout === "popover" ? (f(), x("div", $l, [
|
|
1456
|
+
l("span", null, I(O.multi && Array.isArray(e(c)) ? (oe = e(c)) == null ? void 0 : oe.length : e(c) !== void 0 && (e(c) || e(c) === null) ? 1 : 0) + " з " + I(e(j)) + " обрано", 1),
|
|
1457
|
+
W(l("button", {
|
|
1458
1458
|
class: "text-gray-600 hover:text-gray-800",
|
|
1459
|
-
onClick:
|
|
1460
|
-
(...
|
|
1459
|
+
onClick: L[6] || (L[6] = //@ts-ignore
|
|
1460
|
+
(...N) => e(m) && e(m)(...N))
|
|
1461
1461
|
}, " Очистити ", 512), [
|
|
1462
|
-
[
|
|
1462
|
+
[ie, e(c) !== "" && e(c) !== void 0 || e(c)]
|
|
1463
1463
|
])
|
|
1464
1464
|
])) : $("", !0)
|
|
1465
1465
|
], 64)) : $("", !0)
|
|
1466
1466
|
], 2);
|
|
1467
1467
|
};
|
|
1468
1468
|
}
|
|
1469
|
-
}),
|
|
1469
|
+
}), Ml = ["for", "onClick"], Bl = ["id", "name", "value"], zl = { class: "block" }, Al = {
|
|
1470
1470
|
key: 0,
|
|
1471
1471
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
1472
|
-
},
|
|
1472
|
+
}, jl = {
|
|
1473
1473
|
key: 1,
|
|
1474
1474
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
1475
|
-
},
|
|
1475
|
+
}, Rl = /* @__PURE__ */ G({
|
|
1476
1476
|
__name: "tag-field",
|
|
1477
1477
|
props: {
|
|
1478
1478
|
id: {},
|
|
@@ -1501,37 +1501,37 @@ const xl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1501
1501
|
setup(s, { expose: n, emit: r }) {
|
|
1502
1502
|
const o = s, t = r, {
|
|
1503
1503
|
innerValue: u,
|
|
1504
|
-
isSelected:
|
|
1504
|
+
isSelected: c,
|
|
1505
1505
|
selectItem: g,
|
|
1506
1506
|
clear: h,
|
|
1507
1507
|
labelKey: w,
|
|
1508
1508
|
valueKey: m,
|
|
1509
|
-
allOptions:
|
|
1510
|
-
} = o.multi ?
|
|
1509
|
+
allOptions: d
|
|
1510
|
+
} = o.multi ? lt({
|
|
1511
1511
|
...o,
|
|
1512
1512
|
modelValue: o.modelValue ?? o.default ?? []
|
|
1513
|
-
}, t) :
|
|
1513
|
+
}, t) : tt({
|
|
1514
1514
|
...o,
|
|
1515
1515
|
modelValue: o.modelValue !== void 0 ? o.modelValue : o.default ?? ""
|
|
1516
1516
|
}, t);
|
|
1517
1517
|
return n({
|
|
1518
1518
|
clear: h
|
|
1519
|
-
}),
|
|
1519
|
+
}), D(
|
|
1520
1520
|
() => o.modelValue,
|
|
1521
1521
|
(y) => {
|
|
1522
1522
|
y === void 0 && (o.multi ? u.value = [] : u.value = void 0);
|
|
1523
1523
|
}
|
|
1524
|
-
), (y,
|
|
1525
|
-
var v,
|
|
1526
|
-
return
|
|
1524
|
+
), (y, C) => {
|
|
1525
|
+
var v, p;
|
|
1526
|
+
return f(), x(U, null, [
|
|
1527
1527
|
l("div", {
|
|
1528
|
-
class:
|
|
1528
|
+
class: P(["grid grid-cols-3 gap-2 mx-[1px]", y.layout === "popover" ? "m-1" : "mb-1"])
|
|
1529
1529
|
}, [
|
|
1530
|
-
(
|
|
1530
|
+
(f(!0), x(U, null, le(e(d), (a) => (f(), x("label", {
|
|
1531
1531
|
key: `item-${a[e(m)]}`,
|
|
1532
1532
|
for: `item-${a[e(m)]}`,
|
|
1533
|
-
onClick:
|
|
1534
|
-
class:
|
|
1533
|
+
onClick: Je((_) => e(g)(a), ["stop", "prevent"]),
|
|
1534
|
+
class: P([e(c)(a) ? "ring-2 ring-indigo-600" : "", "p-2.5 group relative flex justify-center items-center gap-x-12 text-center text-xs bg-white text-gray-800 border border-gray-200 cursor-pointer rounded-lg dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200 peer-checked:text-indigo-600 dark:has-checked:text-indigo-500 peer-checked:border-indigo-600 dark:has-checked:border-indigo-500 peer-checked:ring peer-checked:shadow focus:ring dark:has-checked:ring-indigo-500 has-disabled:pointer-events-none has-disabled:text-gray-200 dark:has-disabled:text-neutral-700 has-disabled:after:absolute has-disabled:after:inset-0 has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-gray-200)_calc(50%-1px),var(--color-gray-200)_50%,transparent_50%)] dark:has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-neutral-700)_calc(50%-1px),var(--color-neutral-700)_50%,transparent_50%)]"])
|
|
1535
1535
|
}, [
|
|
1536
1536
|
l("input", {
|
|
1537
1537
|
type: "checkbox",
|
|
@@ -1539,36 +1539,36 @@ const xl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1539
1539
|
class: "hidden w4poy border-gray-200 g41z1 g22e3 axcnw dark:text-indigo-500 dark:border-neutral-700 dark:focus:ring-neutral-900",
|
|
1540
1540
|
name: `item-${a[e(m)]}`,
|
|
1541
1541
|
value: a[e(m)]
|
|
1542
|
-
}, null, 8,
|
|
1543
|
-
l("span",
|
|
1544
|
-
], 10,
|
|
1542
|
+
}, null, 8, Bl),
|
|
1543
|
+
l("span", zl, I(a[e(w)]), 1)
|
|
1544
|
+
], 10, Ml))), 128))
|
|
1545
1545
|
], 2),
|
|
1546
|
-
y.cleanable ? (
|
|
1547
|
-
y.layout === "inline" ? (
|
|
1548
|
-
|
|
1549
|
-
|
|
1546
|
+
y.cleanable ? (f(), x(U, { key: 0 }, [
|
|
1547
|
+
y.layout === "inline" ? (f(), x("div", Al, [
|
|
1548
|
+
J(I(y.multi && Array.isArray(e(u)) ? (v = e(u)) == null ? void 0 : v.length : e(u) !== void 0 && (e(u) || e(u) === null) ? 1 : 0) + " з " + I(e(d).length) + " обрано ", 1),
|
|
1549
|
+
W(l("button", {
|
|
1550
1550
|
class: "text-gray-600 hover:text-gray-800",
|
|
1551
|
-
onClick:
|
|
1551
|
+
onClick: C[0] || (C[0] = //@ts-ignore
|
|
1552
1552
|
(...a) => e(h) && e(h)(...a))
|
|
1553
1553
|
}, " Очистити ", 512), [
|
|
1554
|
-
[
|
|
1554
|
+
[ie, e(u) !== "" && e(u) !== void 0 || e(u)]
|
|
1555
1555
|
])
|
|
1556
1556
|
])) : $("", !0),
|
|
1557
|
-
y.layout === "popover" ? (
|
|
1558
|
-
l("span", null,
|
|
1559
|
-
|
|
1557
|
+
y.layout === "popover" ? (f(), x("div", jl, [
|
|
1558
|
+
l("span", null, I(y.multi && Array.isArray(e(u)) ? (p = e(u)) == null ? void 0 : p.length : e(u) !== void 0 && (e(u) || e(u) === null) ? 1 : 0) + " з " + I(e(d).length) + " обрано", 1),
|
|
1559
|
+
W(l("button", {
|
|
1560
1560
|
class: "text-gray-600 hover:text-gray-800",
|
|
1561
|
-
onClick:
|
|
1561
|
+
onClick: C[1] || (C[1] = //@ts-ignore
|
|
1562
1562
|
(...a) => e(h) && e(h)(...a))
|
|
1563
1563
|
}, " Очистити ", 512), [
|
|
1564
|
-
[
|
|
1564
|
+
[ie, e(u) !== void 0 && e(u) !== "" || e(u)]
|
|
1565
1565
|
])
|
|
1566
1566
|
])) : $("", !0)
|
|
1567
1567
|
], 64)) : $("", !0)
|
|
1568
1568
|
], 64);
|
|
1569
1569
|
};
|
|
1570
1570
|
}
|
|
1571
|
-
}),
|
|
1571
|
+
}), Dl = {}, Fl = {
|
|
1572
1572
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1573
1573
|
width: "24",
|
|
1574
1574
|
height: "24",
|
|
@@ -1580,12 +1580,12 @@ const xl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1580
1580
|
"stroke-linejoin": "round",
|
|
1581
1581
|
class: "text-blue-600 w-[16px] h-[16px]"
|
|
1582
1582
|
};
|
|
1583
|
-
function
|
|
1584
|
-
return
|
|
1583
|
+
function Ll(s, n) {
|
|
1584
|
+
return f(), x("svg", Fl, n[0] || (n[0] = [
|
|
1585
1585
|
l("path", { d: "M20 6 9 17l-5-5" }, null, -1)
|
|
1586
1586
|
]));
|
|
1587
1587
|
}
|
|
1588
|
-
const
|
|
1588
|
+
const xe = /* @__PURE__ */ de(Dl, [["render", Ll]]), Kl = {}, Pl = {
|
|
1589
1589
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1590
1590
|
width: "15px",
|
|
1591
1591
|
height: "24",
|
|
@@ -1597,8 +1597,8 @@ const fe = /* @__PURE__ */ ie(jl, [["render", Dl]]), Fl = {}, Ll = {
|
|
|
1597
1597
|
"stroke-linejoin": "round",
|
|
1598
1598
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[90deg]"
|
|
1599
1599
|
};
|
|
1600
|
-
function
|
|
1601
|
-
return
|
|
1600
|
+
function Ul(s, n) {
|
|
1601
|
+
return f(), x("svg", Pl, n[0] || (n[0] = [
|
|
1602
1602
|
l("path", {
|
|
1603
1603
|
stroke: "none",
|
|
1604
1604
|
d: "M0 0h24v24H0z",
|
|
@@ -1607,7 +1607,7 @@ function Kl(s, n) {
|
|
|
1607
1607
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
1608
1608
|
]));
|
|
1609
1609
|
}
|
|
1610
|
-
const
|
|
1610
|
+
const Il = /* @__PURE__ */ de(Kl, [["render", Ul]]), Ol = {}, Tl = {
|
|
1611
1611
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1612
1612
|
width: "15px",
|
|
1613
1613
|
height: "24",
|
|
@@ -1619,8 +1619,8 @@ const Pl = /* @__PURE__ */ ie(Fl, [["render", Kl]]), Il = {}, Ul = {
|
|
|
1619
1619
|
"stroke-linejoin": "round",
|
|
1620
1620
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[270deg]"
|
|
1621
1621
|
};
|
|
1622
|
-
function
|
|
1623
|
-
return
|
|
1622
|
+
function Hl(s, n) {
|
|
1623
|
+
return f(), x("svg", Tl, n[0] || (n[0] = [
|
|
1624
1624
|
l("path", {
|
|
1625
1625
|
stroke: "none",
|
|
1626
1626
|
d: "M0 0h24v24H0z",
|
|
@@ -1629,10 +1629,10 @@ function Ol(s, n) {
|
|
|
1629
1629
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
1630
1630
|
]));
|
|
1631
1631
|
}
|
|
1632
|
-
const
|
|
1632
|
+
const El = /* @__PURE__ */ de(Ol, [["render", Hl]]), Nl = { class: "flex" }, Wl = { class: "mb-1" }, Yl = { class: "mb-1" }, ql = { class: "inline-flex rounded-lg shrink-0 pl-1" }, Ql = { class: "inline-flex rounded-lg shrink-0 pl-1" }, Gl = {
|
|
1633
1633
|
key: 1,
|
|
1634
1634
|
class: "flex gap-1 !w-[75%] rounded-lg"
|
|
1635
|
-
},
|
|
1635
|
+
}, Zl = ["max", "disabled"], Jl = ["min", "disabled"], Xl = /* @__PURE__ */ G({
|
|
1636
1636
|
__name: "date-input-inline",
|
|
1637
1637
|
props: {
|
|
1638
1638
|
id: {},
|
|
@@ -1660,42 +1660,42 @@ const Tl = /* @__PURE__ */ ie(Il, [["render", Ol]]), Hl = { class: "flex" }, El
|
|
|
1660
1660
|
emits: ["update:modelValue", "change", "clear"],
|
|
1661
1661
|
setup(s, { expose: n, emit: r }) {
|
|
1662
1662
|
const o = s, t = r, u = V(null), {
|
|
1663
|
-
activeMode:
|
|
1663
|
+
activeMode: c,
|
|
1664
1664
|
innerValue: g,
|
|
1665
1665
|
onSelectChange: h,
|
|
1666
1666
|
nextClick: w,
|
|
1667
1667
|
prevClick: m,
|
|
1668
|
-
currentLabel:
|
|
1668
|
+
currentLabel: d,
|
|
1669
1669
|
clear: y
|
|
1670
|
-
} =
|
|
1670
|
+
} = it({
|
|
1671
1671
|
...o,
|
|
1672
1672
|
popoverRef: u
|
|
1673
1673
|
}, t);
|
|
1674
|
-
return
|
|
1675
|
-
|
|
1674
|
+
return D(() => o.modelValue, (C) => {
|
|
1675
|
+
C !== void 0 ? (g.value = C, t("update:modelValue", C)) : (c.value = "", g.value = []);
|
|
1676
1676
|
}), n({
|
|
1677
1677
|
clear: y,
|
|
1678
1678
|
popoverRef: u
|
|
1679
|
-
}), (
|
|
1680
|
-
l("div",
|
|
1681
|
-
|
|
1679
|
+
}), (C, v) => (f(), x(U, null, [
|
|
1680
|
+
l("div", Nl, [
|
|
1681
|
+
q(Ke, {
|
|
1682
1682
|
ref_key: "popoverRef",
|
|
1683
1683
|
ref: u,
|
|
1684
|
-
label: e(
|
|
1684
|
+
label: e(d),
|
|
1685
1685
|
"current-value": e(g),
|
|
1686
|
-
mode:
|
|
1686
|
+
mode: C.mode,
|
|
1687
1687
|
onClear: e(y),
|
|
1688
|
-
layout:
|
|
1688
|
+
layout: C.layout
|
|
1689
1689
|
}, {
|
|
1690
|
-
default:
|
|
1690
|
+
default: he(() => [
|
|
1691
1691
|
l("div", null, [
|
|
1692
1692
|
l("button", {
|
|
1693
1693
|
type: "button",
|
|
1694
|
-
onClick: v[0] || (v[0] = (
|
|
1694
|
+
onClick: v[0] || (v[0] = (p) => e(h)("range")),
|
|
1695
1695
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1696
1696
|
}, [
|
|
1697
|
-
v[12] || (v[12] =
|
|
1698
|
-
e(
|
|
1697
|
+
v[12] || (v[12] = J(" Період ", -1)),
|
|
1698
|
+
e(c) === "range" ? (f(), K(xe, { key: 0 })) : $("", !0)
|
|
1699
1699
|
])
|
|
1700
1700
|
]),
|
|
1701
1701
|
v[19] || (v[19] = l("div", null, [
|
|
@@ -1704,129 +1704,129 @@ const Tl = /* @__PURE__ */ ie(Il, [["render", Ol]]), Hl = { class: "flex" }, El
|
|
|
1704
1704
|
l("div", null, [
|
|
1705
1705
|
l("button", {
|
|
1706
1706
|
type: "button",
|
|
1707
|
-
onClick: v[1] || (v[1] = (
|
|
1707
|
+
onClick: v[1] || (v[1] = (p) => e(h)("today")),
|
|
1708
1708
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1709
1709
|
}, [
|
|
1710
|
-
v[13] || (v[13] =
|
|
1711
|
-
e(
|
|
1710
|
+
v[13] || (v[13] = J(" Сьогодні ", -1)),
|
|
1711
|
+
e(c) === "today" ? (f(), K(xe, { key: 0 })) : $("", !0)
|
|
1712
1712
|
])
|
|
1713
1713
|
]),
|
|
1714
1714
|
l("div", null, [
|
|
1715
1715
|
l("button", {
|
|
1716
1716
|
type: "button",
|
|
1717
|
-
onClick: v[2] || (v[2] = (
|
|
1717
|
+
onClick: v[2] || (v[2] = (p) => e(h)("week")),
|
|
1718
1718
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1719
1719
|
}, [
|
|
1720
|
-
v[14] || (v[14] =
|
|
1721
|
-
e(
|
|
1720
|
+
v[14] || (v[14] = J(" Тиждень ", -1)),
|
|
1721
|
+
e(c) === "week" ? (f(), K(xe, { key: 0 })) : $("", !0)
|
|
1722
1722
|
])
|
|
1723
1723
|
]),
|
|
1724
1724
|
l("div", null, [
|
|
1725
1725
|
l("button", {
|
|
1726
1726
|
type: "button",
|
|
1727
|
-
onClick: v[3] || (v[3] = (
|
|
1727
|
+
onClick: v[3] || (v[3] = (p) => e(h)("month")),
|
|
1728
1728
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1729
1729
|
}, [
|
|
1730
|
-
v[15] || (v[15] =
|
|
1731
|
-
e(
|
|
1730
|
+
v[15] || (v[15] = J(" Місяць ", -1)),
|
|
1731
|
+
e(c) === "month" ? (f(), K(xe, { key: 0 })) : $("", !0)
|
|
1732
1732
|
])
|
|
1733
1733
|
]),
|
|
1734
1734
|
l("div", null, [
|
|
1735
1735
|
l("button", {
|
|
1736
1736
|
type: "button",
|
|
1737
|
-
onClick: v[4] || (v[4] = (
|
|
1737
|
+
onClick: v[4] || (v[4] = (p) => e(h)("quarter")),
|
|
1738
1738
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1739
1739
|
}, [
|
|
1740
|
-
v[16] || (v[16] =
|
|
1741
|
-
e(
|
|
1740
|
+
v[16] || (v[16] = J(" Квартал ", -1)),
|
|
1741
|
+
e(c) === "quarter" ? (f(), K(xe, { key: 0 })) : $("", !0)
|
|
1742
1742
|
])
|
|
1743
1743
|
]),
|
|
1744
|
-
l("div",
|
|
1744
|
+
l("div", Wl, [
|
|
1745
1745
|
l("button", {
|
|
1746
1746
|
type: "button",
|
|
1747
|
-
onClick: v[5] || (v[5] = (
|
|
1747
|
+
onClick: v[5] || (v[5] = (p) => e(h)("year")),
|
|
1748
1748
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1749
1749
|
}, [
|
|
1750
|
-
v[17] || (v[17] =
|
|
1751
|
-
e(
|
|
1750
|
+
v[17] || (v[17] = J(" Рік ", -1)),
|
|
1751
|
+
e(c) === "year" ? (f(), K(xe, { key: 0 })) : $("", !0)
|
|
1752
1752
|
])
|
|
1753
1753
|
]),
|
|
1754
|
-
l("div",
|
|
1754
|
+
l("div", Yl, [
|
|
1755
1755
|
l("button", {
|
|
1756
1756
|
type: "button",
|
|
1757
|
-
onClick: v[6] || (v[6] = (
|
|
1757
|
+
onClick: v[6] || (v[6] = (p) => e(y)()),
|
|
1758
1758
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1759
1759
|
}, [
|
|
1760
|
-
v[18] || (v[18] =
|
|
1761
|
-
e(g)[0] ? $("", !0) : (
|
|
1760
|
+
v[18] || (v[18] = J(" Весь час ", -1)),
|
|
1761
|
+
e(g)[0] ? $("", !0) : (f(), K(xe, { key: 0 }))
|
|
1762
1762
|
])
|
|
1763
1763
|
])
|
|
1764
1764
|
]),
|
|
1765
1765
|
_: 1,
|
|
1766
1766
|
__: [19]
|
|
1767
1767
|
}, 8, ["label", "current-value", "mode", "onClear", "layout"]),
|
|
1768
|
-
e(
|
|
1769
|
-
l("div",
|
|
1768
|
+
e(c) !== "" && e(c) !== "range" && e(c) !== "last_7_days" ? (f(), x(U, { key: 0 }, [
|
|
1769
|
+
l("div", ql, [
|
|
1770
1770
|
l("button", {
|
|
1771
1771
|
type: "button",
|
|
1772
1772
|
title: "Попередній період",
|
|
1773
1773
|
class: "inline-flex h-[38px] items-center px-2 text-sm text-gray-800 bg-gray-100 gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",
|
|
1774
1774
|
onClick: v[7] || (v[7] = //@ts-ignore
|
|
1775
|
-
(...
|
|
1775
|
+
(...p) => e(m) && e(m)(...p))
|
|
1776
1776
|
}, [
|
|
1777
|
-
|
|
1777
|
+
q(Il)
|
|
1778
1778
|
])
|
|
1779
1779
|
]),
|
|
1780
|
-
l("div",
|
|
1780
|
+
l("div", Ql, [
|
|
1781
1781
|
l("button", {
|
|
1782
1782
|
type: "button",
|
|
1783
1783
|
title: "Наступний період",
|
|
1784
1784
|
class: "inline-flex h-[38px] items-center px-2 text-sm text-gray-800 gap-x-2 bg-gray-100 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",
|
|
1785
1785
|
onClick: v[8] || (v[8] = //@ts-ignore
|
|
1786
|
-
(...
|
|
1786
|
+
(...p) => e(w) && e(w)(...p))
|
|
1787
1787
|
}, [
|
|
1788
|
-
|
|
1788
|
+
q(El)
|
|
1789
1789
|
])
|
|
1790
1790
|
])
|
|
1791
1791
|
], 64)) : $("", !0),
|
|
1792
|
-
e(
|
|
1793
|
-
|
|
1792
|
+
e(c) !== "" && e(c) === "range" ? (f(), x("div", Gl, [
|
|
1793
|
+
W(l("input", {
|
|
1794
1794
|
type: "date",
|
|
1795
1795
|
max: e(g)[1],
|
|
1796
1796
|
locale: "uk-UA",
|
|
1797
|
-
"onUpdate:modelValue": v[9] || (v[9] = (
|
|
1797
|
+
"onUpdate:modelValue": v[9] || (v[9] = (p) => e(g)[0] = p),
|
|
1798
1798
|
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",
|
|
1799
|
-
disabled:
|
|
1800
|
-
}, null, 8,
|
|
1801
|
-
[
|
|
1799
|
+
disabled: C.disabled
|
|
1800
|
+
}, null, 8, Zl), [
|
|
1801
|
+
[ce, e(g)[0]]
|
|
1802
1802
|
]),
|
|
1803
|
-
|
|
1803
|
+
W(l("input", {
|
|
1804
1804
|
type: "date",
|
|
1805
1805
|
min: e(g)[0],
|
|
1806
1806
|
locale: "uk-UA",
|
|
1807
|
-
"onUpdate:modelValue": v[10] || (v[10] = (
|
|
1807
|
+
"onUpdate:modelValue": v[10] || (v[10] = (p) => e(g)[1] = p),
|
|
1808
1808
|
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",
|
|
1809
|
-
disabled:
|
|
1810
|
-
}, null, 8,
|
|
1811
|
-
[
|
|
1809
|
+
disabled: C.disabled
|
|
1810
|
+
}, null, 8, Jl), [
|
|
1811
|
+
[ce, e(g)[1]]
|
|
1812
1812
|
])
|
|
1813
1813
|
])) : $("", !0)
|
|
1814
1814
|
]),
|
|
1815
|
-
(
|
|
1815
|
+
(C.cleanable, $("", !0))
|
|
1816
1816
|
], 64));
|
|
1817
1817
|
}
|
|
1818
|
-
}),
|
|
1819
|
-
radio:
|
|
1820
|
-
checkbox:
|
|
1821
|
-
check:
|
|
1822
|
-
text:
|
|
1823
|
-
range:
|
|
1824
|
-
date:
|
|
1825
|
-
select:
|
|
1826
|
-
tag:
|
|
1827
|
-
"date:inline":
|
|
1818
|
+
}), We = {
|
|
1819
|
+
radio: Ft,
|
|
1820
|
+
checkbox: Ne,
|
|
1821
|
+
check: Ne,
|
|
1822
|
+
text: qt,
|
|
1823
|
+
range: al,
|
|
1824
|
+
date: xl,
|
|
1825
|
+
select: Sl,
|
|
1826
|
+
tag: Rl,
|
|
1827
|
+
"date:inline": Xl
|
|
1828
1828
|
};
|
|
1829
|
-
function
|
|
1829
|
+
function Pe(s, n) {
|
|
1830
1830
|
let r;
|
|
1831
1831
|
switch (s.toLowerCase()) {
|
|
1832
1832
|
case "autocomplete":
|
|
@@ -1839,11 +1839,11 @@ function Be(s, n) {
|
|
|
1839
1839
|
r = s == null ? void 0 : s.toString().toLowerCase();
|
|
1840
1840
|
}
|
|
1841
1841
|
return r === "date" && n && n === "inline" && (r = "date:inline"), {
|
|
1842
|
-
component:
|
|
1842
|
+
component: We[r] || We.text,
|
|
1843
1843
|
type: r
|
|
1844
1844
|
};
|
|
1845
1845
|
}
|
|
1846
|
-
const
|
|
1846
|
+
const ea = {}, ta = {
|
|
1847
1847
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1848
1848
|
width: "15px",
|
|
1849
1849
|
height: "24",
|
|
@@ -1855,8 +1855,8 @@ const Jl = {}, Xl = {
|
|
|
1855
1855
|
"stroke-linejoin": "round",
|
|
1856
1856
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-reload absolute inline mr-1 text-gray-800 transition-all cursor-pointer active:rotate-90 right-1 top-1 hover:text-blue-500"
|
|
1857
1857
|
};
|
|
1858
|
-
function
|
|
1859
|
-
return
|
|
1858
|
+
function la(s, n) {
|
|
1859
|
+
return f(), x("svg", ta, n[0] || (n[0] = [
|
|
1860
1860
|
l("path", {
|
|
1861
1861
|
stroke: "none",
|
|
1862
1862
|
d: "M0 0h24v24H0z",
|
|
@@ -1866,7 +1866,7 @@ function ea(s, n) {
|
|
|
1866
1866
|
l("path", { d: "M20 4v5h-5" }, null, -1)
|
|
1867
1867
|
]));
|
|
1868
1868
|
}
|
|
1869
|
-
const
|
|
1869
|
+
const aa = /* @__PURE__ */ de(ea, [["render", la]]), oa = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, na = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, ra = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, ia = { class: "flex items-center" }, sa = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, ua = { class: "filter-layout__body" }, ca = /* @__PURE__ */ G({
|
|
1870
1870
|
__name: "vertical-layout",
|
|
1871
1871
|
props: {
|
|
1872
1872
|
id: {},
|
|
@@ -1893,70 +1893,70 @@ const ta = /* @__PURE__ */ ie(Jl, [["render", ea]]), la = { style: { display: "i
|
|
|
1893
1893
|
},
|
|
1894
1894
|
emits: ["update:modelValue", "change", "clear"],
|
|
1895
1895
|
setup(s, { expose: n, emit: r }) {
|
|
1896
|
-
const o = s, t = r, u = V(),
|
|
1896
|
+
const o = s, t = r, u = V(), c = Pe(o.type, o.layout), g = Y({
|
|
1897
1897
|
get: () => o.modelValue,
|
|
1898
|
-
set: (
|
|
1898
|
+
set: (d) => t("update:modelValue", d)
|
|
1899
1899
|
});
|
|
1900
|
-
function h(
|
|
1901
|
-
t("clear",
|
|
1900
|
+
function h(d) {
|
|
1901
|
+
t("clear", d);
|
|
1902
1902
|
}
|
|
1903
|
-
function w(
|
|
1904
|
-
t("change", { name:
|
|
1903
|
+
function w(d, y) {
|
|
1904
|
+
t("change", { name: d, value: y }), o.modelValue !== void 0 && t("update:modelValue", y);
|
|
1905
1905
|
}
|
|
1906
1906
|
function m() {
|
|
1907
1907
|
u.value && u.value.clear(), t("clear", o.name);
|
|
1908
1908
|
}
|
|
1909
|
-
return
|
|
1909
|
+
return D(
|
|
1910
1910
|
() => o.default,
|
|
1911
|
-
(
|
|
1912
|
-
g.value =
|
|
1911
|
+
(d) => {
|
|
1912
|
+
g.value = d;
|
|
1913
1913
|
}
|
|
1914
|
-
),
|
|
1914
|
+
), D(
|
|
1915
1915
|
() => o.modelValue,
|
|
1916
|
-
(
|
|
1917
|
-
g.value =
|
|
1916
|
+
(d) => {
|
|
1917
|
+
g.value = d;
|
|
1918
1918
|
}
|
|
1919
1919
|
), n({
|
|
1920
1920
|
filterRef: u
|
|
1921
|
-
}), (
|
|
1922
|
-
var
|
|
1923
|
-
return
|
|
1924
|
-
l("div",
|
|
1925
|
-
l("div",
|
|
1926
|
-
l("div",
|
|
1927
|
-
l("span",
|
|
1921
|
+
}), (d, y) => {
|
|
1922
|
+
var C, v, p;
|
|
1923
|
+
return f(), x("div", oa, [
|
|
1924
|
+
l("div", na, [
|
|
1925
|
+
l("div", ra, [
|
|
1926
|
+
l("div", ia, [
|
|
1927
|
+
l("span", sa, I(d.label), 1)
|
|
1928
1928
|
]),
|
|
1929
|
-
typeof g.value == "string" && g.value.trim() !== "" || Array.isArray(g.value) && g.value.length > 0 && g.value.some((a) => a !== void 0) || g.value === null ? (
|
|
1929
|
+
typeof g.value == "string" && g.value.trim() !== "" || Array.isArray(g.value) && g.value.length > 0 && g.value.some((a) => a !== void 0) || g.value === null ? (f(), K(aa, {
|
|
1930
1930
|
key: 0,
|
|
1931
1931
|
onClick: m
|
|
1932
1932
|
})) : $("", !0)
|
|
1933
1933
|
]),
|
|
1934
|
-
l("div",
|
|
1935
|
-
((
|
|
1936
|
-
type: (
|
|
1934
|
+
l("div", ua, [
|
|
1935
|
+
((C = e(c)) == null ? void 0 : C.type) !== "select" ? (f(), K(me((v = e(c)) == null ? void 0 : v.component), re({ key: 0 }, o, {
|
|
1936
|
+
type: (p = e(c)) == null ? void 0 : p.type,
|
|
1937
1937
|
onChange: y[0] || (y[0] = (a) => w(a.name, a.value)),
|
|
1938
1938
|
onClear: y[1] || (y[1] = (a) => h(a)),
|
|
1939
1939
|
ref_key: "filterRef",
|
|
1940
1940
|
ref: u
|
|
1941
|
-
}), null, 16, ["type"])) : (
|
|
1941
|
+
}), null, 16, ["type"])) : (f(), K(Ke, {
|
|
1942
1942
|
key: 1,
|
|
1943
1943
|
"current-value": g.value,
|
|
1944
|
-
label:
|
|
1945
|
-
mode:
|
|
1944
|
+
label: d.label,
|
|
1945
|
+
mode: d.mode,
|
|
1946
1946
|
onClear: m,
|
|
1947
1947
|
fieldRef: u.value,
|
|
1948
1948
|
width: void 0,
|
|
1949
|
-
disabled:
|
|
1949
|
+
disabled: d.disabled,
|
|
1950
1950
|
layout: "vertical"
|
|
1951
1951
|
}, {
|
|
1952
|
-
default:
|
|
1953
|
-
var a,
|
|
1952
|
+
default: he(() => {
|
|
1953
|
+
var a, _;
|
|
1954
1954
|
return [
|
|
1955
|
-
(
|
|
1955
|
+
(f(), K(me((a = e(c)) == null ? void 0 : a.component), re({
|
|
1956
1956
|
ref_key: "filterRef",
|
|
1957
1957
|
ref: u
|
|
1958
1958
|
}, o, {
|
|
1959
|
-
type: (
|
|
1959
|
+
type: (_ = e(c)) == null ? void 0 : _.type,
|
|
1960
1960
|
onChange: y[2] || (y[2] = (b) => w(b.name, b.value)),
|
|
1961
1961
|
onClear: y[3] || (y[3] = (b) => h(b))
|
|
1962
1962
|
}), null, 16, ["type"]))
|
|
@@ -1969,7 +1969,7 @@ const ta = /* @__PURE__ */ ie(Jl, [["render", ea]]), la = { style: { display: "i
|
|
|
1969
1969
|
]);
|
|
1970
1970
|
};
|
|
1971
1971
|
}
|
|
1972
|
-
}),
|
|
1972
|
+
}), Ye = /* @__PURE__ */ G({
|
|
1973
1973
|
__name: "inline-layout",
|
|
1974
1974
|
props: {
|
|
1975
1975
|
id: {},
|
|
@@ -1996,38 +1996,38 @@ const ta = /* @__PURE__ */ ie(Jl, [["render", ea]]), la = { style: { display: "i
|
|
|
1996
1996
|
},
|
|
1997
1997
|
emits: ["update:modelValue", "change", "clear"],
|
|
1998
1998
|
setup(s, { expose: n, emit: r }) {
|
|
1999
|
-
const o = s, t = r, u = V(),
|
|
1999
|
+
const o = s, t = r, u = V(), c = Pe(o.type, o.layout), g = Y({
|
|
2000
2000
|
get: () => o.modelValue,
|
|
2001
2001
|
set: (m) => t("update:modelValue", m)
|
|
2002
2002
|
});
|
|
2003
2003
|
function h(m = o.name) {
|
|
2004
2004
|
t("clear", m);
|
|
2005
2005
|
}
|
|
2006
|
-
function w(m,
|
|
2007
|
-
t("change", { name: m, value:
|
|
2006
|
+
function w(m, d) {
|
|
2007
|
+
t("change", { name: m, value: d }), o.modelValue !== void 0 && t("update:modelValue", d);
|
|
2008
2008
|
}
|
|
2009
|
-
return
|
|
2009
|
+
return D(
|
|
2010
2010
|
() => o.default,
|
|
2011
2011
|
(m) => {
|
|
2012
2012
|
g.value = m;
|
|
2013
2013
|
}
|
|
2014
|
-
),
|
|
2014
|
+
), D(
|
|
2015
2015
|
() => o.modelValue,
|
|
2016
2016
|
(m) => {
|
|
2017
2017
|
g.value = m;
|
|
2018
2018
|
}
|
|
2019
2019
|
), n({
|
|
2020
2020
|
filterRef: u
|
|
2021
|
-
}), (m,
|
|
2022
|
-
var y,
|
|
2023
|
-
return ["text", "date"].includes(m.type.toLocaleLowerCase()) ? (
|
|
2024
|
-
type: (
|
|
2025
|
-
onChange:
|
|
2026
|
-
onClear:
|
|
2021
|
+
}), (m, d) => {
|
|
2022
|
+
var y, C;
|
|
2023
|
+
return ["text", "date"].includes(m.type.toLocaleLowerCase()) ? (f(), K(me((y = e(c)) == null ? void 0 : y.component), re({ key: 0 }, o, {
|
|
2024
|
+
type: (C = e(c)) == null ? void 0 : C.type,
|
|
2025
|
+
onChange: d[0] || (d[0] = (v) => w(v.name, v.value)),
|
|
2026
|
+
onClear: d[1] || (d[1] = (v) => h(v)),
|
|
2027
2027
|
disabled: m.disabled,
|
|
2028
2028
|
modelValue: g.value,
|
|
2029
|
-
"onUpdate:modelValue":
|
|
2030
|
-
}), null, 16, ["type", "disabled", "modelValue"])) : (
|
|
2029
|
+
"onUpdate:modelValue": d[2] || (d[2] = (v) => g.value = v)
|
|
2030
|
+
}), null, 16, ["type", "disabled", "modelValue"])) : (f(), K(Ke, {
|
|
2031
2031
|
key: 1,
|
|
2032
2032
|
"current-value": g.value,
|
|
2033
2033
|
label: m.label,
|
|
@@ -2038,18 +2038,18 @@ const ta = /* @__PURE__ */ ie(Jl, [["render", ea]]), la = { style: { display: "i
|
|
|
2038
2038
|
disabled: m.disabled,
|
|
2039
2039
|
layout: "inline"
|
|
2040
2040
|
}, {
|
|
2041
|
-
default:
|
|
2042
|
-
var v,
|
|
2041
|
+
default: he(() => {
|
|
2042
|
+
var v, p;
|
|
2043
2043
|
return [
|
|
2044
|
-
(
|
|
2044
|
+
(f(), K(me((v = e(c)) == null ? void 0 : v.component), re({
|
|
2045
2045
|
ref_key: "filterRef",
|
|
2046
2046
|
ref: u
|
|
2047
2047
|
}, o, {
|
|
2048
2048
|
modelValue: g.value,
|
|
2049
|
-
"onUpdate:modelValue":
|
|
2050
|
-
type: (
|
|
2051
|
-
onChange:
|
|
2052
|
-
onClear:
|
|
2049
|
+
"onUpdate:modelValue": d[3] || (d[3] = (a) => g.value = a),
|
|
2050
|
+
type: (p = e(c)) == null ? void 0 : p.type,
|
|
2051
|
+
onChange: d[4] || (d[4] = (a) => w(a.name, a.value)),
|
|
2052
|
+
onClear: d[5] || (d[5] = (a) => h(a))
|
|
2053
2053
|
}), null, 16, ["modelValue", "type"]))
|
|
2054
2054
|
];
|
|
2055
2055
|
}),
|
|
@@ -2057,7 +2057,7 @@ const ta = /* @__PURE__ */ ie(Jl, [["render", ea]]), la = { style: { display: "i
|
|
|
2057
2057
|
}, 8, ["current-value", "label", "mode", "fieldRef", "width", "disabled"]));
|
|
2058
2058
|
};
|
|
2059
2059
|
}
|
|
2060
|
-
}),
|
|
2060
|
+
}), da = /* @__PURE__ */ G({
|
|
2061
2061
|
__name: "popover-layout",
|
|
2062
2062
|
props: {
|
|
2063
2063
|
id: {},
|
|
@@ -2084,47 +2084,47 @@ const ta = /* @__PURE__ */ ie(Jl, [["render", ea]]), la = { style: { display: "i
|
|
|
2084
2084
|
},
|
|
2085
2085
|
emits: ["update:modelValue", "change", "clear"],
|
|
2086
2086
|
setup(s, { expose: n, emit: r }) {
|
|
2087
|
-
const o = s, t = r, u = V(),
|
|
2087
|
+
const o = s, t = r, u = V(), c = V(Pe(o.type, o.layout)), g = Y({
|
|
2088
2088
|
get: () => o.modelValue,
|
|
2089
2089
|
set: (m) => t("update:modelValue", m)
|
|
2090
2090
|
});
|
|
2091
2091
|
function h(m) {
|
|
2092
2092
|
t("clear", m);
|
|
2093
2093
|
}
|
|
2094
|
-
function w(m,
|
|
2095
|
-
t("change", { name: m, value:
|
|
2094
|
+
function w(m, d) {
|
|
2095
|
+
t("change", { name: m, value: d }), o.modelValue !== void 0 && t("update:modelValue", d);
|
|
2096
2096
|
}
|
|
2097
|
-
return
|
|
2097
|
+
return D(
|
|
2098
2098
|
() => o.default,
|
|
2099
2099
|
(m) => {
|
|
2100
2100
|
g.value = m;
|
|
2101
2101
|
}
|
|
2102
|
-
),
|
|
2102
|
+
), D(
|
|
2103
2103
|
() => o.modelValue,
|
|
2104
2104
|
(m) => {
|
|
2105
2105
|
g.value = m;
|
|
2106
2106
|
}
|
|
2107
|
-
),
|
|
2107
|
+
), D(
|
|
2108
2108
|
() => o,
|
|
2109
2109
|
(m) => {
|
|
2110
2110
|
g.value = m;
|
|
2111
2111
|
}
|
|
2112
2112
|
), n({
|
|
2113
2113
|
filterRef: u
|
|
2114
|
-
}), (m,
|
|
2115
|
-
var y,
|
|
2116
|
-
return
|
|
2117
|
-
type: (
|
|
2114
|
+
}), (m, d) => {
|
|
2115
|
+
var y, C;
|
|
2116
|
+
return f(), K(me((y = c.value) == null ? void 0 : y.component), re(o, {
|
|
2117
|
+
type: (C = c.value) == null ? void 0 : C.type,
|
|
2118
2118
|
modelValue: g.value,
|
|
2119
|
-
"onUpdate:modelValue":
|
|
2120
|
-
onChange:
|
|
2121
|
-
onClear:
|
|
2119
|
+
"onUpdate:modelValue": d[0] || (d[0] = (v) => g.value = v),
|
|
2120
|
+
onChange: d[1] || (d[1] = (v) => w(v.name, v.value)),
|
|
2121
|
+
onClear: d[2] || (d[2] = (v) => h(v)),
|
|
2122
2122
|
ref_key: "filterRef",
|
|
2123
2123
|
ref: u
|
|
2124
2124
|
}), null, 16, ["type", "modelValue"]);
|
|
2125
2125
|
};
|
|
2126
2126
|
}
|
|
2127
|
-
}),
|
|
2127
|
+
}), ge = /* @__PURE__ */ G({
|
|
2128
2128
|
__name: "filter-field",
|
|
2129
2129
|
props: {
|
|
2130
2130
|
id: {},
|
|
@@ -2151,25 +2151,25 @@ const ta = /* @__PURE__ */ ie(Jl, [["render", ea]]), la = { style: { display: "i
|
|
|
2151
2151
|
},
|
|
2152
2152
|
emits: ["update:modelValue", "change", "clear"],
|
|
2153
2153
|
setup(s, { expose: n, emit: r }) {
|
|
2154
|
-
const o = s, t = r, u = V(),
|
|
2154
|
+
const o = s, t = r, u = V(), c = Y({
|
|
2155
2155
|
get: () => o.modelValue,
|
|
2156
2156
|
set: (m) => t("update:modelValue", m)
|
|
2157
2157
|
});
|
|
2158
2158
|
function g(m) {
|
|
2159
2159
|
t("clear", m);
|
|
2160
2160
|
}
|
|
2161
|
-
function h(m,
|
|
2162
|
-
t("change", { name: m, value:
|
|
2161
|
+
function h(m, d) {
|
|
2162
|
+
t("change", { name: m, value: d }), o.modelValue !== void 0 && t("update:modelValue", d);
|
|
2163
2163
|
}
|
|
2164
|
-
|
|
2164
|
+
D(
|
|
2165
2165
|
() => o.default,
|
|
2166
2166
|
(m) => {
|
|
2167
|
-
|
|
2167
|
+
c.value = m;
|
|
2168
2168
|
}
|
|
2169
|
-
),
|
|
2169
|
+
), D(
|
|
2170
2170
|
() => o.modelValue,
|
|
2171
2171
|
(m) => {
|
|
2172
|
-
|
|
2172
|
+
c.value = m;
|
|
2173
2173
|
}
|
|
2174
2174
|
), n({
|
|
2175
2175
|
filterRef: u
|
|
@@ -2177,60 +2177,60 @@ const ta = /* @__PURE__ */ ie(Jl, [["render", ea]]), la = { style: { display: "i
|
|
|
2177
2177
|
function w() {
|
|
2178
2178
|
switch (o.layout) {
|
|
2179
2179
|
case "inline":
|
|
2180
|
-
return
|
|
2180
|
+
return Ye;
|
|
2181
2181
|
case "vertical":
|
|
2182
|
-
return
|
|
2182
|
+
return ca;
|
|
2183
2183
|
case "popover":
|
|
2184
|
-
return
|
|
2184
|
+
return da;
|
|
2185
2185
|
default:
|
|
2186
|
-
return
|
|
2186
|
+
return Ye;
|
|
2187
2187
|
}
|
|
2188
2188
|
}
|
|
2189
|
-
return (m,
|
|
2190
|
-
onChange:
|
|
2191
|
-
onClear:
|
|
2192
|
-
modelValue:
|
|
2193
|
-
"onUpdate:modelValue":
|
|
2189
|
+
return (m, d) => (f(), K(me(w()), re(o, {
|
|
2190
|
+
onChange: d[0] || (d[0] = (y) => h(y.name, y.value)),
|
|
2191
|
+
onClear: d[1] || (d[1] = (y) => g(y)),
|
|
2192
|
+
modelValue: c.value,
|
|
2193
|
+
"onUpdate:modelValue": d[2] || (d[2] = (y) => c.value = y)
|
|
2194
2194
|
}), null, 16, ["modelValue"]));
|
|
2195
2195
|
}
|
|
2196
2196
|
});
|
|
2197
|
-
function
|
|
2197
|
+
function Ue(s, n) {
|
|
2198
2198
|
const {
|
|
2199
2199
|
slots: r
|
|
2200
|
-
} = s, o = V(s.value ?? {}), t =
|
|
2200
|
+
} = s, o = V(s.value ?? {}), t = Y(() => {
|
|
2201
2201
|
var b;
|
|
2202
|
-
return (
|
|
2202
|
+
return (Ce((b = r == null ? void 0 : r.default) == null ? void 0 : b.call(r)) ?? []).flatMap((i) => Array.isArray(i.children) ? i.children : [i]);
|
|
2203
2203
|
});
|
|
2204
2204
|
function u(b) {
|
|
2205
2205
|
delete o.value[b], n("clear", {
|
|
2206
|
-
data:
|
|
2206
|
+
data: Ce(o.value),
|
|
2207
2207
|
name: b
|
|
2208
2208
|
});
|
|
2209
2209
|
}
|
|
2210
|
-
function
|
|
2210
|
+
function c(b, i) {
|
|
2211
2211
|
i === void 0 ? u(b) : o.value = {
|
|
2212
2212
|
...o.value,
|
|
2213
2213
|
[b]: i
|
|
2214
2214
|
}, n("change", {
|
|
2215
|
-
data:
|
|
2215
|
+
data: Ce(o.value),
|
|
2216
2216
|
name: b,
|
|
2217
2217
|
value: i
|
|
2218
2218
|
});
|
|
2219
2219
|
}
|
|
2220
|
-
const g =
|
|
2220
|
+
const g = Y(() => t.value.map((b) => {
|
|
2221
2221
|
var k;
|
|
2222
2222
|
const i = (k = b.props) == null ? void 0 : k.name;
|
|
2223
|
-
return
|
|
2223
|
+
return dt(b, {
|
|
2224
2224
|
...b.props,
|
|
2225
2225
|
layout: s.view,
|
|
2226
2226
|
showClean: !0,
|
|
2227
2227
|
modelValue: o[i],
|
|
2228
2228
|
"onUpdate:modelValue": (z) => {
|
|
2229
|
-
|
|
2229
|
+
c(i, z);
|
|
2230
2230
|
},
|
|
2231
2231
|
onClear: () => u(i)
|
|
2232
2232
|
});
|
|
2233
|
-
})), h =
|
|
2233
|
+
})), h = Y(
|
|
2234
2234
|
() => new Map(
|
|
2235
2235
|
g.value.map((b) => {
|
|
2236
2236
|
var k;
|
|
@@ -2241,25 +2241,25 @@ function Ae(s, n) {
|
|
|
2241
2241
|
);
|
|
2242
2242
|
function w(b = !1) {
|
|
2243
2243
|
o.value = {}, b || n("clearAll", {
|
|
2244
|
-
data:
|
|
2244
|
+
data: Ce(o.value),
|
|
2245
2245
|
name: "ALL"
|
|
2246
2246
|
});
|
|
2247
2247
|
}
|
|
2248
|
-
const m = V(""),
|
|
2248
|
+
const m = V(""), d = Y(() => {
|
|
2249
2249
|
var b;
|
|
2250
2250
|
return (b = s.schema) != null && b.value ? Object.entries(o.value).filter(([i, k]) => s.schema && !(i in s.schema.value) ? !1 : Array.isArray(k) ? k.some((z) => z !== "" && z !== void 0) : k !== "" && k !== void 0).length : 0;
|
|
2251
2251
|
}), y = V();
|
|
2252
|
-
|
|
2252
|
+
D(m, async () => {
|
|
2253
2253
|
var b, i;
|
|
2254
|
-
await
|
|
2254
|
+
await Me(), (i = (b = y == null ? void 0 : y.value) == null ? void 0 : b.filterRef) != null && i.inputTextRef && y.value.filterRef.inputTextRef.focus();
|
|
2255
2255
|
});
|
|
2256
|
-
const
|
|
2256
|
+
const C = Y(() => {
|
|
2257
2257
|
var b, i;
|
|
2258
2258
|
return (b = s.schema) != null && b.value ? Object.fromEntries(Object.entries((i = s.schema) == null ? void 0 : i.value).slice(0, s.limit)) : {};
|
|
2259
|
-
}), v =
|
|
2259
|
+
}), v = Y(() => {
|
|
2260
2260
|
var b, i, k;
|
|
2261
2261
|
return (b = s.schema) != null && b.value ? s.view !== "inline" ? (i = s.schema) == null ? void 0 : i.value : Object.fromEntries(Object.entries((k = s.schema) == null ? void 0 : k.value).slice(s.limit)) : {};
|
|
2262
|
-
}),
|
|
2262
|
+
}), p = Y(() => {
|
|
2263
2263
|
var i;
|
|
2264
2264
|
if (g.value.length === 0) return [];
|
|
2265
2265
|
let b = 0;
|
|
@@ -2268,8 +2268,8 @@ function Ae(s, n) {
|
|
|
2268
2268
|
k < s.limit ? b = s.limit - k : b = 0;
|
|
2269
2269
|
}
|
|
2270
2270
|
return g.value.slice(0, b);
|
|
2271
|
-
}), a =
|
|
2272
|
-
function
|
|
2271
|
+
}), a = Y(() => g.value.length === 0 ? [] : s.view !== "inline" ? g.value : g.value.slice(p.value.length));
|
|
2272
|
+
function _() {
|
|
2273
2273
|
if (v.value) {
|
|
2274
2274
|
const [b] = Object.keys(v.value);
|
|
2275
2275
|
m.value = b;
|
|
@@ -2277,81 +2277,81 @@ function Ae(s, n) {
|
|
|
2277
2277
|
}
|
|
2278
2278
|
return {
|
|
2279
2279
|
activeFilter: o,
|
|
2280
|
-
activeFilterCount:
|
|
2281
|
-
onFilterChange:
|
|
2280
|
+
activeFilterCount: d,
|
|
2281
|
+
onFilterChange: c,
|
|
2282
2282
|
clearFilter: u,
|
|
2283
2283
|
clearAllFilters: w,
|
|
2284
|
-
limitedSchema:
|
|
2284
|
+
limitedSchema: C,
|
|
2285
2285
|
popoverSchema: v,
|
|
2286
2286
|
filtersSlot: g,
|
|
2287
|
-
limitedFiltersSlot:
|
|
2287
|
+
limitedFiltersSlot: p,
|
|
2288
2288
|
popoverFiltersSlot: a,
|
|
2289
2289
|
vnodeMap: h,
|
|
2290
|
-
onPopoverOpen:
|
|
2290
|
+
onPopoverOpen: _,
|
|
2291
2291
|
selectedFilter: m,
|
|
2292
2292
|
filterRef: y
|
|
2293
2293
|
};
|
|
2294
2294
|
}
|
|
2295
|
-
const
|
|
2295
|
+
const pa = /* @__PURE__ */ G({
|
|
2296
2296
|
__name: "popover",
|
|
2297
2297
|
emits: ["open", "close"],
|
|
2298
2298
|
setup(s, { emit: n }) {
|
|
2299
|
-
const r = V(!1), o = V(null), t = V(null), u = V(null),
|
|
2299
|
+
const r = V(!1), o = V(null), t = V(null), u = V(null), c = V({ top: "0px", left: "0px", position: "absolute" });
|
|
2300
2300
|
function g() {
|
|
2301
2301
|
r.value = !r.value;
|
|
2302
2302
|
}
|
|
2303
2303
|
function h() {
|
|
2304
|
-
const y = u.value,
|
|
2305
|
-
if (!y || !
|
|
2306
|
-
const v = y.getBoundingClientRect(),
|
|
2307
|
-
let
|
|
2308
|
-
|
|
2304
|
+
const y = u.value, C = o.value;
|
|
2305
|
+
if (!y || !C) return;
|
|
2306
|
+
const v = y.getBoundingClientRect(), p = C.offsetWidth, a = window.innerWidth - v.left;
|
|
2307
|
+
let _ = v.left + window.scrollX;
|
|
2308
|
+
p > a && (_ = window.innerWidth - p - 8, _ < 8 && (_ = 8)), c.value = {
|
|
2309
2309
|
position: "absolute",
|
|
2310
2310
|
top: `${v.bottom + window.scrollY + 8}px`,
|
|
2311
|
-
left: `${
|
|
2311
|
+
left: `${_}px`
|
|
2312
2312
|
};
|
|
2313
2313
|
}
|
|
2314
2314
|
function w(y) {
|
|
2315
|
-
var v,
|
|
2316
|
-
const
|
|
2317
|
-
!((v = u.value) != null && v.contains(y.target)) && !((
|
|
2315
|
+
var v, p;
|
|
2316
|
+
const C = y.target;
|
|
2317
|
+
!((v = u.value) != null && v.contains(y.target)) && !((p = o.value) != null && p.contains(y.target)) && !C.closest("[data-inside-popover]") && (r.value = !1);
|
|
2318
2318
|
}
|
|
2319
2319
|
const m = V(!1);
|
|
2320
|
-
|
|
2320
|
+
we(() => {
|
|
2321
2321
|
m.value = !0;
|
|
2322
|
-
}),
|
|
2323
|
-
var y,
|
|
2324
|
-
u.value = ((y = t.value) == null ? void 0 : y.querySelector("[data-popover-trigger]")) || null, (
|
|
2325
|
-
}),
|
|
2322
|
+
}), we(() => {
|
|
2323
|
+
var y, C;
|
|
2324
|
+
u.value = ((y = t.value) == null ? void 0 : y.querySelector("[data-popover-trigger]")) || null, (C = u.value) == null || C.addEventListener("click", g), document.addEventListener("click", w), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0);
|
|
2325
|
+
}), Ve(() => {
|
|
2326
2326
|
var y;
|
|
2327
2327
|
(y = u.value) == null || y.removeEventListener("click", g), document.removeEventListener("click", w), window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
|
|
2328
2328
|
});
|
|
2329
|
-
const
|
|
2330
|
-
return
|
|
2331
|
-
y ? (
|
|
2332
|
-
}), (y,
|
|
2329
|
+
const d = n;
|
|
2330
|
+
return D(r, async (y) => {
|
|
2331
|
+
y ? (d("open"), await Me(), h()) : d("close");
|
|
2332
|
+
}), (y, C) => (f(), x("div", {
|
|
2333
2333
|
ref_key: "wrapperRef",
|
|
2334
2334
|
ref: t
|
|
2335
2335
|
}, [
|
|
2336
|
-
|
|
2337
|
-
m.value ? (
|
|
2336
|
+
ue(y.$slots, "trigger"),
|
|
2337
|
+
m.value ? (f(), K(Ze, {
|
|
2338
2338
|
key: 0,
|
|
2339
2339
|
to: "body"
|
|
2340
2340
|
}, [
|
|
2341
|
-
|
|
2341
|
+
W(l("div", {
|
|
2342
2342
|
ref_key: "popoverRef",
|
|
2343
2343
|
ref: o,
|
|
2344
2344
|
class: "absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",
|
|
2345
|
-
style:
|
|
2345
|
+
style: Re(c.value)
|
|
2346
2346
|
}, [
|
|
2347
|
-
|
|
2347
|
+
ue(y.$slots, "default")
|
|
2348
2348
|
], 4), [
|
|
2349
|
-
[
|
|
2349
|
+
[ie, r.value]
|
|
2350
2350
|
])
|
|
2351
2351
|
])) : $("", !0)
|
|
2352
2352
|
], 512));
|
|
2353
2353
|
}
|
|
2354
|
-
}),
|
|
2354
|
+
}), fa = {}, va = {
|
|
2355
2355
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2356
2356
|
width: "24",
|
|
2357
2357
|
height: "24",
|
|
@@ -2363,27 +2363,27 @@ const ca = /* @__PURE__ */ q({
|
|
|
2363
2363
|
"stroke-linejoin": "round",
|
|
2364
2364
|
class: "lucide lucide-filter h-4 w-4"
|
|
2365
2365
|
};
|
|
2366
|
-
function
|
|
2367
|
-
return
|
|
2366
|
+
function ma(s, n) {
|
|
2367
|
+
return f(), x("svg", va, n[0] || (n[0] = [
|
|
2368
2368
|
l("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
|
|
2369
2369
|
]));
|
|
2370
2370
|
}
|
|
2371
|
-
const
|
|
2371
|
+
const ha = /* @__PURE__ */ de(fa, [["render", ma]]), ga = {
|
|
2372
2372
|
key: 0,
|
|
2373
2373
|
class: "inline-flex rounded-sm items-center border font-semibold border-transparent hover:bg-secondary/80 bg-blue-500 text-white text-xs px-1.5"
|
|
2374
|
-
},
|
|
2374
|
+
}, ya = { class: "flex" }, ba = { class: "w-64 border-r border-gray-200" }, xa = { class: "p-2" }, wa = ["onClick"], ka = { class: "flex items-center gap-2" }, _a = { class: "text-sm font-medium" }, Ca = {
|
|
2375
2375
|
key: 0,
|
|
2376
2376
|
class: "inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 text-blue-700 text-xs p-2"
|
|
2377
|
-
},
|
|
2377
|
+
}, Va = ["onClick"], $a = { class: "flex items-center gap-2" }, Sa = { class: "text-sm font-medium" }, Ma = {
|
|
2378
2378
|
key: 0,
|
|
2379
2379
|
class: "inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 text-blue-700 text-xs p-2"
|
|
2380
|
-
},
|
|
2380
|
+
}, Ba = {
|
|
2381
2381
|
key: 0,
|
|
2382
2382
|
class: "p-2 border-t"
|
|
2383
|
-
},
|
|
2383
|
+
}, za = { class: "flex-1 min-h-[300px] overflow-y-auto" }, Aa = {
|
|
2384
2384
|
key: 0,
|
|
2385
2385
|
class: "flex items-center justify-center h-full text-gray-500"
|
|
2386
|
-
},
|
|
2386
|
+
}, st = /* @__PURE__ */ G({
|
|
2387
2387
|
__name: "popover-filter-layout",
|
|
2388
2388
|
props: {
|
|
2389
2389
|
schema: {},
|
|
@@ -2395,93 +2395,93 @@ const va = /* @__PURE__ */ ie(da, [["render", fa]]), ma = {
|
|
|
2395
2395
|
},
|
|
2396
2396
|
emits: ["change", "clear", "clearAll"],
|
|
2397
2397
|
setup(s, { expose: n, emit: r }) {
|
|
2398
|
-
const o = s, t =
|
|
2398
|
+
const o = s, t = rt(o.mode), u = je(), c = r, g = V({}), {
|
|
2399
2399
|
activeFilter: h,
|
|
2400
2400
|
activeFilterCount: w,
|
|
2401
2401
|
onFilterChange: m,
|
|
2402
|
-
clearFilter:
|
|
2402
|
+
clearFilter: d,
|
|
2403
2403
|
clearAllFilters: y,
|
|
2404
|
-
popoverSchema:
|
|
2404
|
+
popoverSchema: C,
|
|
2405
2405
|
popoverFiltersSlot: v,
|
|
2406
|
-
onPopoverOpen:
|
|
2406
|
+
onPopoverOpen: p,
|
|
2407
2407
|
selectedFilter: a,
|
|
2408
|
-
filterRef:
|
|
2409
|
-
} =
|
|
2408
|
+
filterRef: _
|
|
2409
|
+
} = Ue({
|
|
2410
2410
|
...o,
|
|
2411
2411
|
schema: g,
|
|
2412
2412
|
slots: u
|
|
2413
|
-
},
|
|
2414
|
-
return
|
|
2413
|
+
}, c);
|
|
2414
|
+
return D(
|
|
2415
2415
|
() => o.schema,
|
|
2416
2416
|
(b) => {
|
|
2417
2417
|
g.value = b;
|
|
2418
2418
|
},
|
|
2419
2419
|
{ deep: !0, immediate: !0 }
|
|
2420
2420
|
), n({
|
|
2421
|
-
clearFilter:
|
|
2421
|
+
clearFilter: d,
|
|
2422
2422
|
clearAllFilters: y
|
|
2423
|
-
}), (b, i) => (
|
|
2424
|
-
onOpen: e(
|
|
2423
|
+
}), (b, i) => (f(), K(pa, {
|
|
2424
|
+
onOpen: e(p),
|
|
2425
2425
|
onClose: i[5] || (i[5] = (k) => a.value = "")
|
|
2426
2426
|
}, {
|
|
2427
|
-
trigger:
|
|
2427
|
+
trigger: he(() => [
|
|
2428
2428
|
l("button", {
|
|
2429
2429
|
"data-popover-trigger": "",
|
|
2430
2430
|
"aria-haspopup": "dialog",
|
|
2431
2431
|
"aria-expanded": "false",
|
|
2432
|
-
class:
|
|
2432
|
+
class: P(
|
|
2433
2433
|
e(t) + (e(w) > 0 ? "bg-blue-50 border-blue-200 text-blue-700 hover:bg-blue-100" : "text-gray-800 hover:bg-gray-200 focus:bg-gray-200")
|
|
2434
2434
|
),
|
|
2435
2435
|
type: "button"
|
|
2436
2436
|
}, [
|
|
2437
|
-
|
|
2438
|
-
i[6] || (i[6] =
|
|
2439
|
-
e(w) > 0 ? (
|
|
2437
|
+
q(ha),
|
|
2438
|
+
i[6] || (i[6] = J(" Фільтр ", -1)),
|
|
2439
|
+
e(w) > 0 ? (f(), x("div", ga, I(e(w)), 1)) : $("", !0)
|
|
2440
2440
|
], 2)
|
|
2441
2441
|
]),
|
|
2442
|
-
default:
|
|
2443
|
-
l("div",
|
|
2444
|
-
l("div",
|
|
2442
|
+
default: he(() => [
|
|
2443
|
+
l("div", ya, [
|
|
2444
|
+
l("div", ba, [
|
|
2445
2445
|
i[7] || (i[7] = l("div", { class: "p-4 border-b" }, [
|
|
2446
2446
|
l("p", { class: "text-sm text-gray-600" }, "Select a field to start creating a filter.")
|
|
2447
2447
|
], -1)),
|
|
2448
|
-
l("div",
|
|
2449
|
-
b.schema ? (
|
|
2450
|
-
var
|
|
2451
|
-
return
|
|
2448
|
+
l("div", xa, [
|
|
2449
|
+
b.schema ? (f(!0), x(U, { key: 0 }, le(Object.entries(e(C)), ([k, z]) => {
|
|
2450
|
+
var j;
|
|
2451
|
+
return f(), x("button", {
|
|
2452
2452
|
key: k,
|
|
2453
2453
|
onClick: () => {
|
|
2454
2454
|
a.value = k;
|
|
2455
2455
|
},
|
|
2456
|
-
class:
|
|
2456
|
+
class: P([
|
|
2457
2457
|
"w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
|
|
2458
2458
|
e(a) === k ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
|
|
2459
2459
|
])
|
|
2460
2460
|
}, [
|
|
2461
|
-
l("div",
|
|
2462
|
-
l("span",
|
|
2461
|
+
l("div", ka, [
|
|
2462
|
+
l("span", _a, I(z.label), 1)
|
|
2463
2463
|
]),
|
|
2464
|
-
(Array.isArray(e(h)[k]) ? ((
|
|
2465
|
-
], 10,
|
|
2464
|
+
(Array.isArray(e(h)[k]) ? ((j = e(h)[k]) == null ? void 0 : j.length) > 0 : e(h)[k] || e(h)[k] === null) ? (f(), x("div", Ca)) : $("", !0)
|
|
2465
|
+
], 10, wa);
|
|
2466
2466
|
}), 128)) : $("", !0),
|
|
2467
|
-
(
|
|
2468
|
-
var
|
|
2469
|
-
return
|
|
2467
|
+
(f(!0), x(U, null, le(e(v), (k, z) => {
|
|
2468
|
+
var j;
|
|
2469
|
+
return f(), x("button", {
|
|
2470
2470
|
key: "slot-" + z,
|
|
2471
|
-
onClick: (
|
|
2472
|
-
class:
|
|
2471
|
+
onClick: (A) => a.value = k.props.name,
|
|
2472
|
+
class: P([
|
|
2473
2473
|
"w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
|
|
2474
2474
|
e(a) === k.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
|
|
2475
2475
|
])
|
|
2476
2476
|
}, [
|
|
2477
|
-
l("div",
|
|
2478
|
-
l("span",
|
|
2477
|
+
l("div", $a, [
|
|
2478
|
+
l("span", Sa, I(k.props.label), 1)
|
|
2479
2479
|
]),
|
|
2480
|
-
((
|
|
2481
|
-
], 10,
|
|
2480
|
+
((j = e(h)[k.props.name]) == null ? void 0 : j.length) > 0 ? (f(), x("div", Ma)) : $("", !0)
|
|
2481
|
+
], 10, Va);
|
|
2482
2482
|
}), 128))
|
|
2483
2483
|
]),
|
|
2484
|
-
e(w) > 0 ? (
|
|
2484
|
+
e(w) > 0 ? (f(), x("div", Ba, [
|
|
2485
2485
|
l("button", {
|
|
2486
2486
|
class: "w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors",
|
|
2487
2487
|
onClick: i[0] || (i[0] = (k) => e(y)()),
|
|
@@ -2489,45 +2489,45 @@ const va = /* @__PURE__ */ ie(da, [["render", fa]]), ma = {
|
|
|
2489
2489
|
}, " Очистити всі ")
|
|
2490
2490
|
])) : $("", !0)
|
|
2491
2491
|
]),
|
|
2492
|
-
l("div",
|
|
2493
|
-
e(a) === "" ? (
|
|
2492
|
+
l("div", za, [
|
|
2493
|
+
e(a) === "" ? (f(), x("div", Aa, i[8] || (i[8] = [
|
|
2494
2494
|
l("p", { class: "text-sm" }, "Select a field to start creating a filter.", -1)
|
|
2495
2495
|
]))) : $("", !0),
|
|
2496
|
-
e(a) ? (
|
|
2497
|
-
e(
|
|
2498
|
-
e(a) === k ? (
|
|
2496
|
+
e(a) ? (f(), x(U, { key: 1 }, [
|
|
2497
|
+
e(C) ? (f(!0), x(U, { key: 0 }, le(Object.entries(e(C)), ([k, z]) => (f(), x(U, null, [
|
|
2498
|
+
e(a) === k ? (f(), K(ge, re({
|
|
2499
2499
|
name: k,
|
|
2500
2500
|
key: k,
|
|
2501
2501
|
layout: "popover",
|
|
2502
2502
|
ref_for: !0,
|
|
2503
2503
|
ref_key: "filterRef",
|
|
2504
|
-
ref:
|
|
2504
|
+
ref: _
|
|
2505
2505
|
}, { ref_for: !0 }, z, {
|
|
2506
|
-
onChange: i[1] || (i[1] = (
|
|
2507
|
-
onClear: i[2] || (i[2] = (
|
|
2508
|
-
e(
|
|
2506
|
+
onChange: i[1] || (i[1] = (j) => e(m)(j.name, j.value)),
|
|
2507
|
+
onClear: i[2] || (i[2] = (j) => {
|
|
2508
|
+
e(d)(j), e(m)(j, void 0);
|
|
2509
2509
|
}),
|
|
2510
2510
|
modelValue: e(h)[k],
|
|
2511
|
-
"onUpdate:modelValue": (
|
|
2511
|
+
"onUpdate:modelValue": (j) => e(h)[k] = j,
|
|
2512
2512
|
cleanable: !0
|
|
2513
2513
|
}), null, 16, ["name", "modelValue", "onUpdate:modelValue"])) : $("", !0)
|
|
2514
2514
|
], 64))), 256)) : $("", !0),
|
|
2515
|
-
(
|
|
2515
|
+
(f(!0), x(U, null, le(e(v), (k, z) => (f(), x(U, {
|
|
2516
2516
|
key: "slot-" + z
|
|
2517
2517
|
}, [
|
|
2518
|
-
e(a) === k.props.name ? (
|
|
2518
|
+
e(a) === k.props.name ? (f(), K(ge, re({
|
|
2519
2519
|
key: 0,
|
|
2520
2520
|
layout: "popover"
|
|
2521
2521
|
}, { ref_for: !0 }, k.props, {
|
|
2522
2522
|
ref_for: !0,
|
|
2523
2523
|
ref_key: "filterRef",
|
|
2524
|
-
ref:
|
|
2525
|
-
onChange: i[3] || (i[3] = (
|
|
2526
|
-
onClear: i[4] || (i[4] = (
|
|
2527
|
-
e(
|
|
2524
|
+
ref: _,
|
|
2525
|
+
onChange: i[3] || (i[3] = (j) => e(m)(j.name, j.value)),
|
|
2526
|
+
onClear: i[4] || (i[4] = (j) => {
|
|
2527
|
+
e(d)(j), e(m)(j, void 0);
|
|
2528
2528
|
}),
|
|
2529
2529
|
modelValue: e(h)[k.props.name],
|
|
2530
|
-
"onUpdate:modelValue": (
|
|
2530
|
+
"onUpdate:modelValue": (j) => e(h)[k.props.name] = j,
|
|
2531
2531
|
cleanable: !0
|
|
2532
2532
|
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : $("", !0)
|
|
2533
2533
|
], 64))), 128))
|
|
@@ -2538,7 +2538,7 @@ const va = /* @__PURE__ */ ie(da, [["render", fa]]), ma = {
|
|
|
2538
2538
|
_: 1
|
|
2539
2539
|
}, 8, ["onOpen"]));
|
|
2540
2540
|
}
|
|
2541
|
-
}),
|
|
2541
|
+
}), ja = { class: "flex gap-1 items-center flex-wrap" }, qe = /* @__PURE__ */ G({
|
|
2542
2542
|
__name: "inline-filter-layout",
|
|
2543
2543
|
props: {
|
|
2544
2544
|
schema: {},
|
|
@@ -2550,92 +2550,92 @@ const va = /* @__PURE__ */ ie(da, [["render", fa]]), ma = {
|
|
|
2550
2550
|
},
|
|
2551
2551
|
emits: ["change", "clear", "clearAll"],
|
|
2552
2552
|
setup(s, { expose: n, emit: r }) {
|
|
2553
|
-
const o = s, t = r, u =
|
|
2553
|
+
const o = s, t = r, u = je(), c = V({}), {
|
|
2554
2554
|
activeFilter: g,
|
|
2555
2555
|
activeFilterCount: h,
|
|
2556
2556
|
onFilterChange: w,
|
|
2557
2557
|
clearFilter: m,
|
|
2558
|
-
clearAllFilters:
|
|
2558
|
+
clearAllFilters: d,
|
|
2559
2559
|
limitedSchema: y,
|
|
2560
|
-
popoverSchema:
|
|
2560
|
+
popoverSchema: C,
|
|
2561
2561
|
filtersSlot: v,
|
|
2562
|
-
limitedFiltersSlot:
|
|
2562
|
+
limitedFiltersSlot: p,
|
|
2563
2563
|
popoverFiltersSlot: a
|
|
2564
|
-
} =
|
|
2564
|
+
} = Ue(
|
|
2565
2565
|
{
|
|
2566
2566
|
...o,
|
|
2567
|
-
schema:
|
|
2567
|
+
schema: c,
|
|
2568
2568
|
slots: u
|
|
2569
2569
|
},
|
|
2570
2570
|
t
|
|
2571
|
-
),
|
|
2571
|
+
), _ = V();
|
|
2572
2572
|
function b() {
|
|
2573
|
-
|
|
2573
|
+
_.value && _.value.clearAllFilters(!0), d();
|
|
2574
2574
|
}
|
|
2575
|
-
return
|
|
2575
|
+
return D(
|
|
2576
2576
|
() => o.schema,
|
|
2577
2577
|
(i) => {
|
|
2578
|
-
|
|
2578
|
+
c.value = i;
|
|
2579
2579
|
},
|
|
2580
2580
|
{ deep: !0, immediate: !0 }
|
|
2581
2581
|
), n({
|
|
2582
2582
|
clearFilter: m,
|
|
2583
|
-
clearAllFilters:
|
|
2584
|
-
}), (i, k) => (
|
|
2585
|
-
i.schema ? (
|
|
2583
|
+
clearAllFilters: d
|
|
2584
|
+
}), (i, k) => (f(), x("div", ja, [
|
|
2585
|
+
i.schema ? (f(!0), x(U, { key: 0 }, le(Object.entries(e(y)), ([z, j]) => (f(), K(ge, re({
|
|
2586
2586
|
key: z,
|
|
2587
2587
|
name: z,
|
|
2588
2588
|
mode: i.mode
|
|
2589
|
-
}, { ref_for: !0 },
|
|
2590
|
-
onChange: k[0] || (k[0] = (
|
|
2589
|
+
}, { ref_for: !0 }, j, {
|
|
2590
|
+
onChange: k[0] || (k[0] = (A) => e(w)(A.name, A.value)),
|
|
2591
2591
|
onClear: e(m),
|
|
2592
2592
|
layout: "inline",
|
|
2593
2593
|
cleanable: !0,
|
|
2594
2594
|
modelValue: e(g)[z],
|
|
2595
|
-
"onUpdate:modelValue": (
|
|
2595
|
+
"onUpdate:modelValue": (A) => e(g)[z] = A
|
|
2596
2596
|
}), null, 16, ["name", "mode", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : $("", !0),
|
|
2597
|
-
(
|
|
2598
|
-
key: "slot-" +
|
|
2597
|
+
(f(!0), x(U, null, le(e(p), (z, j) => (f(), K(ge, re({
|
|
2598
|
+
key: "slot-" + j,
|
|
2599
2599
|
layout: "inline"
|
|
2600
2600
|
}, { ref_for: !0 }, z.props, {
|
|
2601
|
-
onChange: k[1] || (k[1] = (
|
|
2602
|
-
onClear: k[2] || (k[2] = (
|
|
2603
|
-
e(m)(
|
|
2601
|
+
onChange: k[1] || (k[1] = (A) => e(w)(A.name, A.value)),
|
|
2602
|
+
onClear: k[2] || (k[2] = (A) => {
|
|
2603
|
+
e(m)(A), e(w)(A, void 0);
|
|
2604
2604
|
}),
|
|
2605
2605
|
cleanable: !0,
|
|
2606
2606
|
modelValue: e(g)[z.props.name],
|
|
2607
|
-
"onUpdate:modelValue": (
|
|
2607
|
+
"onUpdate:modelValue": (A) => e(g)[z.props.name] = A
|
|
2608
2608
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128)),
|
|
2609
|
-
Object.entries(e(
|
|
2610
|
-
schema: e(
|
|
2609
|
+
Object.entries(e(C)).length > 0 || e(a).length > 0 ? (f(), K(st, re({ key: 1 }, o, {
|
|
2610
|
+
schema: e(C),
|
|
2611
2611
|
limit: 0,
|
|
2612
2612
|
onChange: k[3] || (k[3] = (z) => e(w)(z.name, z.value)),
|
|
2613
|
-
onClearAll: k[4] || (k[4] = (z) => e(
|
|
2613
|
+
onClearAll: k[4] || (k[4] = (z) => e(d)()),
|
|
2614
2614
|
onClear: k[5] || (k[5] = (z) => e(m)(z.name)),
|
|
2615
2615
|
mode: i.mode,
|
|
2616
2616
|
ref_key: "popoverRef",
|
|
2617
|
-
ref:
|
|
2617
|
+
ref: _,
|
|
2618
2618
|
cleanable: !0
|
|
2619
2619
|
}), {
|
|
2620
|
-
default:
|
|
2621
|
-
(
|
|
2622
|
-
key: "slot-" +
|
|
2620
|
+
default: he(() => [
|
|
2621
|
+
(f(!0), x(U, null, le(e(v), (z, j) => (f(), K(me(z), re({
|
|
2622
|
+
key: "slot-" + j,
|
|
2623
2623
|
layout: "popover"
|
|
2624
2624
|
}, { ref_for: !0 }, z.props, { cleanable: !0 }), null, 16))), 128))
|
|
2625
2625
|
]),
|
|
2626
2626
|
_: 1
|
|
2627
2627
|
}, 16, ["schema", "mode"])) : $("", !0),
|
|
2628
|
-
e(h) > 0 ? (
|
|
2628
|
+
e(h) > 0 ? (f(), x("button", {
|
|
2629
2629
|
key: 2,
|
|
2630
2630
|
onClick: b,
|
|
2631
2631
|
class: "relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 border border-transparent text-gray-800 hover:bg-gray-200 focus:bg-gray-200"
|
|
2632
2632
|
}, " Очистити ")) : $("", !0)
|
|
2633
2633
|
]));
|
|
2634
2634
|
}
|
|
2635
|
-
}),
|
|
2635
|
+
}), Ra = {
|
|
2636
2636
|
key: 0,
|
|
2637
2637
|
class: "p-2 overflow-y-auto overflow-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-800 max-h-[calc(100%-142px)] h-full bg-gray-100"
|
|
2638
|
-
},
|
|
2638
|
+
}, Da = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, Fa = /* @__PURE__ */ G({
|
|
2639
2639
|
__name: "vertical-filter-layout",
|
|
2640
2640
|
props: {
|
|
2641
2641
|
schema: {},
|
|
@@ -2647,59 +2647,59 @@ const va = /* @__PURE__ */ ie(da, [["render", fa]]), ma = {
|
|
|
2647
2647
|
},
|
|
2648
2648
|
emits: ["change", "clear", "clearAll"],
|
|
2649
2649
|
setup(s, { expose: n, emit: r }) {
|
|
2650
|
-
const o = s, t = r, u =
|
|
2651
|
-
activeFilter:
|
|
2650
|
+
const o = s, t = r, u = je(), {
|
|
2651
|
+
activeFilter: c,
|
|
2652
2652
|
activeFilterCount: g,
|
|
2653
2653
|
onFilterChange: h,
|
|
2654
2654
|
clearFilter: w,
|
|
2655
2655
|
clearAllFilters: m,
|
|
2656
|
-
filtersSlot:
|
|
2657
|
-
} =
|
|
2656
|
+
filtersSlot: d
|
|
2657
|
+
} = Ue({
|
|
2658
2658
|
...o,
|
|
2659
2659
|
slots: u
|
|
2660
2660
|
}, t);
|
|
2661
2661
|
return n({
|
|
2662
2662
|
clearFilter: w,
|
|
2663
2663
|
clearAllFilters: m
|
|
2664
|
-
}), (y,
|
|
2665
|
-
l("div",
|
|
2666
|
-
e(g) > 0 ? (
|
|
2664
|
+
}), (y, C) => y.view === "vertical" ? (f(), x("div", Ra, [
|
|
2665
|
+
l("div", Da, [
|
|
2666
|
+
e(g) > 0 ? (f(), x("button", {
|
|
2667
2667
|
key: 0,
|
|
2668
|
-
onClick:
|
|
2668
|
+
onClick: C[0] || (C[0] = (v) => e(m)()),
|
|
2669
2669
|
"data-popover-trigger": "",
|
|
2670
2670
|
"aria-haspopup": "dialog",
|
|
2671
2671
|
"aria-expanded": "false",
|
|
2672
2672
|
class: "w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200",
|
|
2673
2673
|
type: "button"
|
|
2674
2674
|
}, " Очистити ")) : $("", !0),
|
|
2675
|
-
y.schema ? (
|
|
2675
|
+
y.schema ? (f(!0), x(U, { key: 1 }, le(Object.entries(y.schema), ([v, p]) => (f(), K(ge, re({
|
|
2676
2676
|
name: v,
|
|
2677
2677
|
layout: "vertical"
|
|
2678
|
-
}, { ref_for: !0 },
|
|
2679
|
-
onChange:
|
|
2680
|
-
onClear:
|
|
2678
|
+
}, { ref_for: !0 }, p, {
|
|
2679
|
+
onChange: C[1] || (C[1] = (a) => e(h)(a.name, a.value)),
|
|
2680
|
+
onClear: C[2] || (C[2] = (a) => {
|
|
2681
2681
|
e(w)(a), e(h)(a, void 0);
|
|
2682
2682
|
}),
|
|
2683
|
-
modelValue: e(
|
|
2684
|
-
"onUpdate:modelValue": (a) => e(
|
|
2683
|
+
modelValue: e(c)[v],
|
|
2684
|
+
"onUpdate:modelValue": (a) => e(c)[v] = a,
|
|
2685
2685
|
showClean: !0
|
|
2686
2686
|
}), null, 16, ["name", "modelValue", "onUpdate:modelValue"]))), 256)) : $("", !0),
|
|
2687
|
-
(
|
|
2688
|
-
key: "slot-" +
|
|
2687
|
+
(f(!0), x(U, null, le(e(d), (v, p) => (f(), K(ge, re({
|
|
2688
|
+
key: "slot-" + p,
|
|
2689
2689
|
layout: "vertical"
|
|
2690
2690
|
}, { ref_for: !0 }, v.props, {
|
|
2691
|
-
onChange:
|
|
2692
|
-
onClear:
|
|
2691
|
+
onChange: C[3] || (C[3] = (a) => e(h)(a.name, a.value)),
|
|
2692
|
+
onClear: C[4] || (C[4] = (a) => {
|
|
2693
2693
|
e(w)(a), e(h)(a, void 0);
|
|
2694
2694
|
}),
|
|
2695
|
-
modelValue: e(
|
|
2696
|
-
"onUpdate:modelValue": (a) => e(
|
|
2695
|
+
modelValue: e(c)[v.props.name],
|
|
2696
|
+
"onUpdate:modelValue": (a) => e(c)[v.props.name] = a,
|
|
2697
2697
|
showClean: !0
|
|
2698
2698
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
2699
2699
|
])
|
|
2700
2700
|
])) : $("", !0);
|
|
2701
2701
|
}
|
|
2702
|
-
}),
|
|
2702
|
+
}), Ae = /* @__PURE__ */ G({
|
|
2703
2703
|
__name: "filter",
|
|
2704
2704
|
props: {
|
|
2705
2705
|
schema: {},
|
|
@@ -2711,35 +2711,35 @@ const va = /* @__PURE__ */ ie(da, [["render", fa]]), ma = {
|
|
|
2711
2711
|
},
|
|
2712
2712
|
emits: ["change", "clear", "clearAll"],
|
|
2713
2713
|
setup(s, { expose: n, emit: r }) {
|
|
2714
|
-
const o = s, t = V(o.value ?? {}), u = r,
|
|
2715
|
-
function g(
|
|
2716
|
-
if (Array.isArray(
|
|
2717
|
-
return
|
|
2718
|
-
if (
|
|
2719
|
-
const a =
|
|
2714
|
+
const o = s, t = V(o.value ?? {}), u = r, c = V();
|
|
2715
|
+
function g(p) {
|
|
2716
|
+
if (Array.isArray(p))
|
|
2717
|
+
return p.map((a) => g(a));
|
|
2718
|
+
if (p !== null && typeof p == "object") {
|
|
2719
|
+
const a = Ce(p), _ = {};
|
|
2720
2720
|
for (const b in a)
|
|
2721
|
-
|
|
2722
|
-
return
|
|
2721
|
+
_[b] = g(a[b]);
|
|
2722
|
+
return _;
|
|
2723
2723
|
}
|
|
2724
|
-
return
|
|
2724
|
+
return p;
|
|
2725
2725
|
}
|
|
2726
|
-
function h(
|
|
2726
|
+
function h(p, a) {
|
|
2727
2727
|
a !== void 0 ? t.value = {
|
|
2728
2728
|
...t.value,
|
|
2729
|
-
[
|
|
2730
|
-
} : delete t.value[
|
|
2729
|
+
[p]: a
|
|
2730
|
+
} : delete t.value[p], u("change", {
|
|
2731
2731
|
data: g(t.value),
|
|
2732
|
-
name:
|
|
2732
|
+
name: p,
|
|
2733
2733
|
value: g(a)
|
|
2734
2734
|
});
|
|
2735
2735
|
}
|
|
2736
|
-
function w(
|
|
2737
|
-
delete t.value[
|
|
2736
|
+
function w(p) {
|
|
2737
|
+
delete t.value[p], u("clear", {
|
|
2738
2738
|
data: g(t.value),
|
|
2739
|
-
name:
|
|
2739
|
+
name: p
|
|
2740
2740
|
}), u("change", {
|
|
2741
2741
|
data: g(t.value),
|
|
2742
|
-
name:
|
|
2742
|
+
name: p,
|
|
2743
2743
|
value: null
|
|
2744
2744
|
});
|
|
2745
2745
|
}
|
|
@@ -2753,68 +2753,68 @@ const va = /* @__PURE__ */ ie(da, [["render", fa]]), ma = {
|
|
|
2753
2753
|
value: null
|
|
2754
2754
|
});
|
|
2755
2755
|
}
|
|
2756
|
-
const
|
|
2756
|
+
const d = V({});
|
|
2757
2757
|
function y() {
|
|
2758
2758
|
switch (o.view) {
|
|
2759
2759
|
case "inline":
|
|
2760
|
-
return
|
|
2760
|
+
return qe;
|
|
2761
2761
|
case "vertical":
|
|
2762
|
-
return
|
|
2762
|
+
return Fa;
|
|
2763
2763
|
case "popover":
|
|
2764
|
-
return
|
|
2764
|
+
return st;
|
|
2765
2765
|
default:
|
|
2766
|
-
return
|
|
2766
|
+
return qe;
|
|
2767
2767
|
}
|
|
2768
2768
|
}
|
|
2769
|
-
|
|
2769
|
+
D(
|
|
2770
2770
|
() => o.schema,
|
|
2771
|
-
(
|
|
2772
|
-
if (!
|
|
2773
|
-
|
|
2771
|
+
(p) => {
|
|
2772
|
+
if (!p) {
|
|
2773
|
+
d.value = {};
|
|
2774
2774
|
return;
|
|
2775
2775
|
}
|
|
2776
|
-
if (Array.isArray(
|
|
2777
|
-
|
|
2776
|
+
if (Array.isArray(p) && !p.length) {
|
|
2777
|
+
d.value = {};
|
|
2778
2778
|
return;
|
|
2779
2779
|
}
|
|
2780
|
-
Array.isArray(
|
|
2781
|
-
Object.assign(
|
|
2782
|
-
}),
|
|
2780
|
+
Array.isArray(p) ? d.value = p.filter((a) => a.type).reduce((a, _) => (Object.assign(_, { name: _.id || _.name, type: _.type.toLowerCase() }), a[_.name] = _, _.data && !_.api && !_.options && Object.assign(_, { api: `/api/suggest/${_.data}` }), a), {}) : (Object.entries(p).forEach(([a, _]) => {
|
|
2781
|
+
Object.assign(_, { name: a || _.name || _.id, type: _.type.toLowerCase() });
|
|
2782
|
+
}), d.value = { ...p });
|
|
2783
2783
|
},
|
|
2784
2784
|
{ immediate: !0, deep: !0 }
|
|
2785
2785
|
);
|
|
2786
|
-
function
|
|
2787
|
-
|
|
2786
|
+
function C(p) {
|
|
2787
|
+
c.value.clearFilter(p), w(p);
|
|
2788
2788
|
}
|
|
2789
2789
|
function v() {
|
|
2790
|
-
|
|
2790
|
+
c.value.clearAllFilters(), m();
|
|
2791
2791
|
}
|
|
2792
2792
|
return n({
|
|
2793
2793
|
clearAllFilters: v,
|
|
2794
|
-
clearFilter:
|
|
2795
|
-
}), (
|
|
2796
|
-
schema:
|
|
2797
|
-
onChange: a[0] || (a[0] = (
|
|
2798
|
-
onClear: a[1] || (a[1] = (
|
|
2794
|
+
clearFilter: C
|
|
2795
|
+
}), (p, a) => (f(), K(me(y()), re(o, {
|
|
2796
|
+
schema: d.value,
|
|
2797
|
+
onChange: a[0] || (a[0] = (_) => h(_.name, _.value)),
|
|
2798
|
+
onClear: a[1] || (a[1] = (_) => w(_.name)),
|
|
2799
2799
|
onClearAll: m,
|
|
2800
2800
|
ref_key: "filterRef",
|
|
2801
|
-
ref:
|
|
2801
|
+
ref: c
|
|
2802
2802
|
}), {
|
|
2803
|
-
default:
|
|
2804
|
-
|
|
2803
|
+
default: he(() => [
|
|
2804
|
+
ue(p.$slots, "default")
|
|
2805
2805
|
]),
|
|
2806
2806
|
_: 3
|
|
2807
2807
|
}, 16, ["schema"]));
|
|
2808
2808
|
}
|
|
2809
2809
|
});
|
|
2810
|
-
|
|
2811
|
-
s.component("Filter",
|
|
2810
|
+
Ae.install = function(s) {
|
|
2811
|
+
s.component("Filter", Ae), s.component("FilterField", ge);
|
|
2812
2812
|
};
|
|
2813
|
-
function
|
|
2814
|
-
const { page: n, id: r, filter: o } = s,
|
|
2815
|
-
n ?
|
|
2813
|
+
function La(s) {
|
|
2814
|
+
const { page: n, id: r, filter: o, filterByView: t } = s, u = new URL(window.location.href), c = new URLSearchParams(window.location.search);
|
|
2815
|
+
n ? c.set("page", n.toString()) : c.delete("page"), r ? c.set("id", r.toString()) : c.delete("id"), o ? c.set("filter", o) : c.delete("filter"), typeof t == "boolean" ? c.set("bbox", t ? "1" : "0") : c.delete("bbox"), u.search = decodeURI(c.toString()), window.history.pushState({}, "", u);
|
|
2816
2816
|
}
|
|
2817
|
-
const
|
|
2817
|
+
const Ka = { class: "flex items-center justify-between w-full gap-x-1" }, Pa = { class: "flex items-center" }, Ua = ["disabled"], Ia = /* @__PURE__ */ l("svg", {
|
|
2818
2818
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2819
2819
|
viewBox: "0 0 24 24",
|
|
2820
2820
|
fill: "none",
|
|
@@ -2832,16 +2832,16 @@ const Fa = { class: "flex items-center justify-between w-full gap-x-1" }, La = {
|
|
|
2832
2832
|
fill: "none"
|
|
2833
2833
|
}),
|
|
2834
2834
|
/* @__PURE__ */ l("path", { d: "M6 9l6 6l6 -6" })
|
|
2835
|
-
], -1),
|
|
2835
|
+
], -1), Oa = /* @__PURE__ */ l("span", {
|
|
2836
2836
|
"aria-hidden": "true",
|
|
2837
2837
|
class: "sr-only"
|
|
2838
|
-
}, "Previous", -1),
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
],
|
|
2838
|
+
}, "Previous", -1), Ta = [
|
|
2839
|
+
Ia,
|
|
2840
|
+
Oa
|
|
2841
|
+
], Ha = { class: "flex items-center gap-x-1" }, Ea = ["onClick"], Na = ["disabled"], Wa = /* @__PURE__ */ l("span", {
|
|
2842
2842
|
"aria-hidden": "true",
|
|
2843
2843
|
class: "sr-only"
|
|
2844
|
-
}, "Next", -1),
|
|
2844
|
+
}, "Next", -1), Ya = /* @__PURE__ */ l("svg", {
|
|
2845
2845
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2846
2846
|
viewBox: "0 0 24 24",
|
|
2847
2847
|
fill: "none",
|
|
@@ -2859,15 +2859,15 @@ const Fa = { class: "flex items-center justify-between w-full gap-x-1" }, La = {
|
|
|
2859
2859
|
fill: "none"
|
|
2860
2860
|
}),
|
|
2861
2861
|
/* @__PURE__ */ l("path", { d: "M6 9l6 6l6 -6" })
|
|
2862
|
-
], -1),
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
],
|
|
2862
|
+
], -1), qa = [
|
|
2863
|
+
Wa,
|
|
2864
|
+
Ya
|
|
2865
|
+
], Qa = { class: "flex justify-center items-center gap-x-5 ml-3" }, Ga = { class: "relative" }, Za = {
|
|
2866
2866
|
class: "hs-dropdown-menu z-50 bg-white shadow-md rounded-lg p-1 space-y-0.5 dark:bg-neutral-800 dark:border dark:border-neutral-700 right-0 dark:divide-neutral-700 absolute bottom-[100%]",
|
|
2867
2867
|
role: "menu",
|
|
2868
2868
|
"aria-orientation": "vertical",
|
|
2869
2869
|
"aria-labelledby": "dropdown-button"
|
|
2870
|
-
},
|
|
2870
|
+
}, Ja = ["onClick"], Xa = {
|
|
2871
2871
|
key: 0,
|
|
2872
2872
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2873
2873
|
viewBox: "0 0 24 24",
|
|
@@ -2879,14 +2879,14 @@ const Fa = { class: "flex items-center justify-between w-full gap-x-1" }, La = {
|
|
|
2879
2879
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check text-blue-600",
|
|
2880
2880
|
width: "14",
|
|
2881
2881
|
height: "14"
|
|
2882
|
-
},
|
|
2882
|
+
}, eo = /* @__PURE__ */ l("path", {
|
|
2883
2883
|
stroke: "none",
|
|
2884
2884
|
d: "M0 0h24v24H0z",
|
|
2885
2885
|
fill: "none"
|
|
2886
|
-
}, null, -1),
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
],
|
|
2886
|
+
}, null, -1), to = /* @__PURE__ */ l("path", { d: "M5 12l5 5l10 -10" }, null, -1), lo = [
|
|
2887
|
+
eo,
|
|
2888
|
+
to
|
|
2889
|
+
], ao = /* @__PURE__ */ l("svg", {
|
|
2890
2890
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2891
2891
|
viewBox: "0 0 24 24",
|
|
2892
2892
|
fill: "none",
|
|
@@ -2904,7 +2904,7 @@ const Fa = { class: "flex items-center justify-between w-full gap-x-1" }, La = {
|
|
|
2904
2904
|
fill: "none"
|
|
2905
2905
|
}),
|
|
2906
2906
|
/* @__PURE__ */ l("path", { d: "M6 9l6 6l6 -6" })
|
|
2907
|
-
], -1),
|
|
2907
|
+
], -1), oo = /* @__PURE__ */ G({
|
|
2908
2908
|
__name: "pagination",
|
|
2909
2909
|
props: {
|
|
2910
2910
|
total: {},
|
|
@@ -2913,45 +2913,45 @@ const Fa = { class: "flex items-center justify-between w-full gap-x-1" }, La = {
|
|
|
2913
2913
|
},
|
|
2914
2914
|
emits: ["update:currentPage", "update:pageSize", "pageChange", "pageSizeChange"],
|
|
2915
2915
|
setup(s, { emit: n }) {
|
|
2916
|
-
const r = s, o = n, t = V(r.currentPage), u = V(r.pageSize),
|
|
2917
|
-
|
|
2918
|
-
u.value =
|
|
2916
|
+
const r = s, o = n, t = V(r.currentPage), u = V(r.pageSize), c = V(!1);
|
|
2917
|
+
D(() => r.pageSize, (C) => {
|
|
2918
|
+
u.value = C;
|
|
2919
2919
|
});
|
|
2920
|
-
const g =
|
|
2920
|
+
const g = Y(() => Math.ceil(r.total / r.pageSize)), h = Y(() => {
|
|
2921
2921
|
const v = Math.floor(3.5);
|
|
2922
|
-
let
|
|
2923
|
-
|
|
2924
|
-
const
|
|
2925
|
-
for (let b =
|
|
2926
|
-
|
|
2927
|
-
return
|
|
2922
|
+
let p = t.value - v, a = t.value + v;
|
|
2923
|
+
p < 1 && (a += 1 - p, p = 1), a > g.value && (p -= a - g.value, a = g.value), p = Math.max(1, p);
|
|
2924
|
+
const _ = [];
|
|
2925
|
+
for (let b = p; b <= a; b += 1)
|
|
2926
|
+
_.push(b);
|
|
2927
|
+
return _;
|
|
2928
2928
|
}), w = () => {
|
|
2929
|
-
t.value > 1 &&
|
|
2929
|
+
t.value > 1 && d(t.value - 1);
|
|
2930
2930
|
}, m = () => {
|
|
2931
|
-
t.value < g.value &&
|
|
2932
|
-
},
|
|
2933
|
-
t.value =
|
|
2934
|
-
}, y = (
|
|
2935
|
-
u.value =
|
|
2931
|
+
t.value < g.value && d(t.value + 1);
|
|
2932
|
+
}, d = (C) => {
|
|
2933
|
+
t.value = C, o("update:currentPage", C), o("pageChange", C);
|
|
2934
|
+
}, y = (C = u.value) => {
|
|
2935
|
+
u.value = C, c.value = !1, o("update:pageSize", u.value), o("update:currentPage", 1), o("pageSizeChange", u.value);
|
|
2936
2936
|
};
|
|
2937
|
-
return
|
|
2938
|
-
t.value =
|
|
2939
|
-
}), (
|
|
2940
|
-
l("div",
|
|
2937
|
+
return D(() => r.currentPage, (C) => {
|
|
2938
|
+
t.value = C;
|
|
2939
|
+
}), (C, v) => (f(), x("nav", Ka, [
|
|
2940
|
+
l("div", Pa, [
|
|
2941
2941
|
l("button", {
|
|
2942
2942
|
type: "button",
|
|
2943
2943
|
"aria-label": "Previous",
|
|
2944
2944
|
onClick: w,
|
|
2945
2945
|
disabled: t.value === 1,
|
|
2946
2946
|
class: "border-white last:rounded-e-lg text-base h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 border text-sm rounded-lg bg-white text-gray-800 hover:shadow-sm hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50 dark:bg-neutral-700 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-800 py-2"
|
|
2947
|
-
},
|
|
2948
|
-
l("div",
|
|
2949
|
-
(
|
|
2947
|
+
}, Ta, 8, Ua),
|
|
2948
|
+
l("div", Ha, [
|
|
2949
|
+
(f(!0), x(U, null, le(h.value, (p) => (f(), x("button", {
|
|
2950
2950
|
type: "button",
|
|
2951
|
-
key:
|
|
2952
|
-
onClick: (a) =>
|
|
2953
|
-
class:
|
|
2954
|
-
},
|
|
2951
|
+
key: p,
|
|
2952
|
+
onClick: (a) => d(p),
|
|
2953
|
+
class: P(t.value === p ? "flex justify-center items-center rounded-lg text-sm dark:text-neutral-300 py-2 px-3 focus:outline-none disabled:opacity-50 disabled:pointer-events-none bg-[#e5e7eb] dark:bg-[#242424] border border-gray-200 text-base h-[38px] min-w-[38px]" : "flex justify-center items-center rounded-lg text-sm dark:text-neutral-400 hover:bg-gray-100 py-2 px-3 focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 text-base h-[38px] min-w-[38px]")
|
|
2954
|
+
}, I(p), 11, Ea))), 128))
|
|
2955
2955
|
]),
|
|
2956
2956
|
l("button", {
|
|
2957
2957
|
type: "button",
|
|
@@ -2959,22 +2959,22 @@ const Fa = { class: "flex items-center justify-between w-full gap-x-1" }, La = {
|
|
|
2959
2959
|
onClick: m,
|
|
2960
2960
|
disabled: t.value === g.value,
|
|
2961
2961
|
class: "border-white last:rounded-e-lg text-base h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 border text-sm rounded-lg bg-white text-gray-800 hover:shadow-sm hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50 dark:bg-neutral-700 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-800 py-2"
|
|
2962
|
-
},
|
|
2962
|
+
}, qa, 8, Na)
|
|
2963
2963
|
]),
|
|
2964
|
-
l("div",
|
|
2965
|
-
l("div",
|
|
2966
|
-
|
|
2967
|
-
(
|
|
2964
|
+
l("div", Qa, [
|
|
2965
|
+
l("div", Ga, [
|
|
2966
|
+
W(l("div", Za, [
|
|
2967
|
+
(f(), x(U, null, le([10, 20, 30], (p) => l("button", {
|
|
2968
2968
|
type: "button",
|
|
2969
|
-
key:
|
|
2970
|
-
onClick: (a) => y(
|
|
2969
|
+
key: p,
|
|
2970
|
+
onClick: (a) => y(p),
|
|
2971
2971
|
class: "w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:hover:text-neutral-300 dark:focus:bg-neutral-700"
|
|
2972
2972
|
}, [
|
|
2973
|
-
|
|
2974
|
-
u.value ===
|
|
2975
|
-
], 8,
|
|
2973
|
+
J(I(p) + " ", 1),
|
|
2974
|
+
u.value === p ? (f(), x("svg", Xa, lo)) : $("", !0)
|
|
2975
|
+
], 8, Ja)), 64))
|
|
2976
2976
|
], 512), [
|
|
2977
|
-
[
|
|
2977
|
+
[ie, c.value]
|
|
2978
2978
|
]),
|
|
2979
2979
|
l("button", {
|
|
2980
2980
|
type: "button",
|
|
@@ -2982,34 +2982,34 @@ const Fa = { class: "flex items-center justify-between w-full gap-x-1" }, La = {
|
|
|
2982
2982
|
"aria-haspopup": "menu",
|
|
2983
2983
|
"aria-expanded": "false",
|
|
2984
2984
|
"aria-label": "Dropdown",
|
|
2985
|
-
onClick: v[0] || (v[0] = (
|
|
2985
|
+
onClick: v[0] || (v[0] = (p) => c.value = !c.value)
|
|
2986
2986
|
}, [
|
|
2987
|
-
|
|
2988
|
-
|
|
2987
|
+
J(I(u.value) + " ", 1),
|
|
2988
|
+
ao
|
|
2989
2989
|
])
|
|
2990
2990
|
])
|
|
2991
2991
|
])
|
|
2992
2992
|
]));
|
|
2993
2993
|
}
|
|
2994
|
-
}),
|
|
2994
|
+
}), $e = (s, n) => {
|
|
2995
2995
|
const r = s.__vccOpts || s;
|
|
2996
2996
|
for (const [o, t] of n)
|
|
2997
2997
|
r[o] = t;
|
|
2998
2998
|
return r;
|
|
2999
|
-
},
|
|
2999
|
+
}, no = {}, ro = {
|
|
3000
3000
|
class: "w-48 mx-auto mb-4",
|
|
3001
3001
|
width: "178",
|
|
3002
3002
|
height: "90",
|
|
3003
3003
|
viewBox: "0 0 178 90",
|
|
3004
3004
|
fill: "none",
|
|
3005
3005
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3006
|
-
},
|
|
3007
|
-
|
|
3006
|
+
}, io = /* @__PURE__ */ Xe('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-stone-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-stone-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-stone-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-stone-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-stone-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-stone-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-stone-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-stone-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter2)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-stone-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-stone-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-stone-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-stone-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter2" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12), so = [
|
|
3007
|
+
io
|
|
3008
3008
|
];
|
|
3009
|
-
function
|
|
3010
|
-
return
|
|
3009
|
+
function uo(s, n) {
|
|
3010
|
+
return f(), x("svg", ro, so);
|
|
3011
3011
|
}
|
|
3012
|
-
const
|
|
3012
|
+
const co = /* @__PURE__ */ $e(no, [["render", uo]]), po = {}, fo = {
|
|
3013
3013
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3014
3014
|
width: "21",
|
|
3015
3015
|
height: "20",
|
|
@@ -3020,20 +3020,20 @@ const so = /* @__PURE__ */ ge(ao, [["render", io]]), uo = {}, co = {
|
|
|
3020
3020
|
"stroke-linecap": "round",
|
|
3021
3021
|
"stroke-linejoin": "round",
|
|
3022
3022
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-collapse"
|
|
3023
|
-
},
|
|
3023
|
+
}, vo = /* @__PURE__ */ l("path", {
|
|
3024
3024
|
stroke: "none",
|
|
3025
3025
|
d: "M0 0h24v24H0z",
|
|
3026
3026
|
fill: "none"
|
|
3027
|
-
}, null, -1),
|
|
3028
|
-
po,
|
|
3029
|
-
fo,
|
|
3027
|
+
}, null, -1), mo = /* @__PURE__ */ l("path", { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" }, null, -1), ho = /* @__PURE__ */ l("path", { d: "M15 4v16" }, null, -1), go = /* @__PURE__ */ l("path", { d: "M9 10l2 2l-2 2" }, null, -1), yo = [
|
|
3030
3028
|
vo,
|
|
3031
|
-
mo
|
|
3029
|
+
mo,
|
|
3030
|
+
ho,
|
|
3031
|
+
go
|
|
3032
3032
|
];
|
|
3033
|
-
function
|
|
3034
|
-
return
|
|
3033
|
+
function bo(s, n) {
|
|
3034
|
+
return f(), x("svg", fo, yo);
|
|
3035
3035
|
}
|
|
3036
|
-
const
|
|
3036
|
+
const xo = /* @__PURE__ */ $e(po, [["render", bo]]), wo = {}, ko = {
|
|
3037
3037
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3038
3038
|
width: "21",
|
|
3039
3039
|
height: "20",
|
|
@@ -3044,20 +3044,20 @@ const yo = /* @__PURE__ */ ge(uo, [["render", go]]), bo = {}, xo = {
|
|
|
3044
3044
|
"stroke-linecap": "round",
|
|
3045
3045
|
"stroke-linejoin": "round",
|
|
3046
3046
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-expand"
|
|
3047
|
-
},
|
|
3047
|
+
}, _o = /* @__PURE__ */ l("path", {
|
|
3048
3048
|
stroke: "none",
|
|
3049
3049
|
d: "M0 0h24v24H0z",
|
|
3050
3050
|
fill: "none"
|
|
3051
|
-
}, null, -1),
|
|
3052
|
-
wo,
|
|
3053
|
-
ko,
|
|
3051
|
+
}, null, -1), Co = /* @__PURE__ */ l("path", { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" }, null, -1), Vo = /* @__PURE__ */ l("path", { d: "M15 4v16" }, null, -1), $o = /* @__PURE__ */ l("path", { d: "M10 10l-2 2l2 2" }, null, -1), So = [
|
|
3054
3052
|
_o,
|
|
3055
|
-
Co
|
|
3053
|
+
Co,
|
|
3054
|
+
Vo,
|
|
3055
|
+
$o
|
|
3056
3056
|
];
|
|
3057
|
-
function
|
|
3058
|
-
return
|
|
3057
|
+
function Mo(s, n) {
|
|
3058
|
+
return f(), x("svg", ko, So);
|
|
3059
3059
|
}
|
|
3060
|
-
const
|
|
3060
|
+
const Bo = /* @__PURE__ */ $e(wo, [["render", Mo]]), zo = {}, Ao = {
|
|
3061
3061
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3062
3062
|
width: "24",
|
|
3063
3063
|
height: "24",
|
|
@@ -3068,20 +3068,20 @@ const So = /* @__PURE__ */ ge(bo, [["render", $o]]), Mo = {}, Bo = {
|
|
|
3068
3068
|
"stroke-linecap": "round",
|
|
3069
3069
|
"stroke-linejoin": "round",
|
|
3070
3070
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-map"
|
|
3071
|
-
},
|
|
3071
|
+
}, jo = /* @__PURE__ */ l("path", {
|
|
3072
3072
|
stroke: "none",
|
|
3073
3073
|
d: "M0 0h24v24H0z",
|
|
3074
3074
|
fill: "none"
|
|
3075
|
-
}, null, -1),
|
|
3076
|
-
Ao,
|
|
3077
|
-
zo,
|
|
3075
|
+
}, null, -1), Ro = /* @__PURE__ */ l("path", { d: "M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13" }, null, -1), Do = /* @__PURE__ */ l("path", { d: "M9 4v13" }, null, -1), Fo = /* @__PURE__ */ l("path", { d: "M15 7v13" }, null, -1), Lo = [
|
|
3078
3076
|
jo,
|
|
3079
|
-
Ro
|
|
3077
|
+
Ro,
|
|
3078
|
+
Do,
|
|
3079
|
+
Fo
|
|
3080
3080
|
];
|
|
3081
|
-
function
|
|
3082
|
-
return
|
|
3081
|
+
function Ko(s, n) {
|
|
3082
|
+
return f(), x("svg", Ao, Lo);
|
|
3083
3083
|
}
|
|
3084
|
-
const
|
|
3084
|
+
const Po = /* @__PURE__ */ $e(zo, [["render", Ko]]), Uo = {}, Io = {
|
|
3085
3085
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3086
3086
|
width: "24",
|
|
3087
3087
|
height: "24",
|
|
@@ -3092,27 +3092,27 @@ const Lo = /* @__PURE__ */ ge(Mo, [["render", Fo]]), Ko = {}, Po = {
|
|
|
3092
3092
|
"stroke-linecap": "round",
|
|
3093
3093
|
"stroke-linejoin": "round",
|
|
3094
3094
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-table"
|
|
3095
|
-
},
|
|
3095
|
+
}, Oo = /* @__PURE__ */ l("path", {
|
|
3096
3096
|
stroke: "none",
|
|
3097
3097
|
d: "M0 0h24v24H0z",
|
|
3098
3098
|
fill: "none"
|
|
3099
|
-
}, null, -1),
|
|
3100
|
-
Io,
|
|
3101
|
-
Uo,
|
|
3099
|
+
}, null, -1), To = /* @__PURE__ */ l("path", { d: "M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" }, null, -1), Ho = /* @__PURE__ */ l("path", { d: "M3 10h18" }, null, -1), Eo = /* @__PURE__ */ l("path", { d: "M10 3v18" }, null, -1), No = [
|
|
3102
3100
|
Oo,
|
|
3103
|
-
To
|
|
3101
|
+
To,
|
|
3102
|
+
Ho,
|
|
3103
|
+
Eo
|
|
3104
3104
|
];
|
|
3105
|
-
function
|
|
3106
|
-
return
|
|
3105
|
+
function Wo(s, n) {
|
|
3106
|
+
return f(), x("svg", Io, No);
|
|
3107
3107
|
}
|
|
3108
|
-
const
|
|
3109
|
-
function
|
|
3108
|
+
const Yo = /* @__PURE__ */ $e(Uo, [["render", Wo]]);
|
|
3109
|
+
function Qe(s, n) {
|
|
3110
3110
|
let r;
|
|
3111
3111
|
return function(...o) {
|
|
3112
3112
|
clearTimeout(r), r = setTimeout(() => s(...o), n);
|
|
3113
3113
|
};
|
|
3114
3114
|
}
|
|
3115
|
-
function
|
|
3115
|
+
function qo(s, n, r, o) {
|
|
3116
3116
|
n && (n.addSource("vector", {
|
|
3117
3117
|
type: "vector",
|
|
3118
3118
|
tiles: [
|
|
@@ -3146,7 +3146,7 @@ function Yo(s, n, r, o) {
|
|
|
3146
3146
|
}
|
|
3147
3147
|
}));
|
|
3148
3148
|
}
|
|
3149
|
-
const
|
|
3149
|
+
const Qo = [
|
|
3150
3150
|
{
|
|
3151
3151
|
id: "voyager",
|
|
3152
3152
|
name: "Базова карта (voyager)",
|
|
@@ -3171,7 +3171,7 @@ const No = [
|
|
|
3171
3171
|
url: "https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
|
|
3172
3172
|
preview: "https://mt1.google.com/vt/lyrs=s&x=2422&y=1400&z=12"
|
|
3173
3173
|
}
|
|
3174
|
-
],
|
|
3174
|
+
], Go = { class: "relative w-auto h-full" }, Zo = /* @__PURE__ */ l("svg", {
|
|
3175
3175
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3176
3176
|
class: "w-4 h-4",
|
|
3177
3177
|
viewBox: "0 0 24 24",
|
|
@@ -3183,12 +3183,12 @@ const No = [
|
|
|
3183
3183
|
}, [
|
|
3184
3184
|
/* @__PURE__ */ l("path", { d: "M3 11L12 3l9 8" }),
|
|
3185
3185
|
/* @__PURE__ */ l("path", { d: "M5 9v10h4v-6h6v6h4V9" })
|
|
3186
|
-
], -1),
|
|
3187
|
-
|
|
3188
|
-
],
|
|
3186
|
+
], -1), Jo = [
|
|
3187
|
+
Zo
|
|
3188
|
+
], Xo = { class: "absolute left-[20px] bottom-[74px] bg-white max-w-[250px] p-[10px] rounded-lg z-10 border" }, en = { class: "flex justify-start items-center gap-2" }, tn = { class: "ml-1 text-[0.875rem]" }, ln = {
|
|
3189
3189
|
class: "vs-map-slot-layers z-10 select-none",
|
|
3190
3190
|
style: { display: "flex" }
|
|
3191
|
-
},
|
|
3191
|
+
}, an = ["title", "onClick"], on = ["src"], nn = { class: "absolute py-2 px-4 text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg top-[-46px] hidden whitespace-nowrap left-1/2 -translate-x-1/2" }, rn = /* @__PURE__ */ G({
|
|
3192
3192
|
__name: "map",
|
|
3193
3193
|
props: {
|
|
3194
3194
|
table: {},
|
|
@@ -3204,26 +3204,26 @@ const No = [
|
|
|
3204
3204
|
setup(s, { emit: n }) {
|
|
3205
3205
|
const r = s, o = n;
|
|
3206
3206
|
let t, u;
|
|
3207
|
-
const
|
|
3208
|
-
var
|
|
3209
|
-
return ((
|
|
3210
|
-
}), m =
|
|
3211
|
-
var
|
|
3212
|
-
const
|
|
3207
|
+
const c = et(), g = V(null), h = V(!1), w = Y(() => {
|
|
3208
|
+
var S, R;
|
|
3209
|
+
return ((R = (S = c == null ? void 0 : c.appContext.config.globalProperties) == null ? void 0 : S.$settings) == null ? void 0 : R.basemaps) || [];
|
|
3210
|
+
}), m = Y(() => (r.layers && r.layers.length ? r.layers : w.value.length ? w.value : Qo).map((R, E) => {
|
|
3211
|
+
var X;
|
|
3212
|
+
const Q = R.id || ((X = R.name) == null ? void 0 : X.toString().toLowerCase().replace(/\s+/g, "-")) || `layer-${E}`, ee = R.name || R.id || `layer-${E}`;
|
|
3213
3213
|
return {
|
|
3214
|
-
...
|
|
3215
|
-
id:
|
|
3216
|
-
name:
|
|
3214
|
+
...R,
|
|
3215
|
+
id: Q,
|
|
3216
|
+
name: ee
|
|
3217
3217
|
};
|
|
3218
|
-
})),
|
|
3219
|
-
|
|
3220
|
-
var
|
|
3221
|
-
|
|
3218
|
+
})), d = V(""), y = Y(() => m.value.find((S) => S.id === d.value) || m.value[0]);
|
|
3219
|
+
D(m, (S) => {
|
|
3220
|
+
var R;
|
|
3221
|
+
S.length && (!d.value || !S.some((E) => E.id === d.value)) && (d.value = ((R = S[0]) == null ? void 0 : R.id) || "");
|
|
3222
3222
|
}, { immediate: !0 });
|
|
3223
|
-
function
|
|
3224
|
-
return
|
|
3223
|
+
function C(S) {
|
|
3224
|
+
return S ? S.replace("{x}", "2422").replace("{y}", "1400").replace("{z}", "12") : "";
|
|
3225
3225
|
}
|
|
3226
|
-
const v = V(null),
|
|
3226
|
+
const v = V(null), p = V(null), a = [
|
|
3227
3227
|
"#2563EB",
|
|
3228
3228
|
// Primary Blue
|
|
3229
3229
|
"#60A5FA",
|
|
@@ -3245,14 +3245,40 @@ const No = [
|
|
|
3245
3245
|
"#D1D5DB"
|
|
3246
3246
|
// Light Gray
|
|
3247
3247
|
];
|
|
3248
|
-
let
|
|
3248
|
+
let _;
|
|
3249
3249
|
const b = [30, 48];
|
|
3250
3250
|
let i = null, k = [];
|
|
3251
|
-
function z(
|
|
3252
|
-
|
|
3251
|
+
function z() {
|
|
3252
|
+
if (typeof window > "u")
|
|
3253
|
+
return { zoom: null, center: null, hasQuery: !1 };
|
|
3254
|
+
const S = new URLSearchParams(window.location.search), R = Number(S.get("z")), E = Number(S.get("y")), Q = Number(S.get("x"));
|
|
3255
|
+
console.log(R, E, Q);
|
|
3256
|
+
const ee = S.has("x") && S.has("y"), X = S.has("z");
|
|
3257
|
+
return {
|
|
3258
|
+
zoom: X ? R : null,
|
|
3259
|
+
center: ee ? [Q, E] : null,
|
|
3260
|
+
hasQuery: ee || X
|
|
3261
|
+
};
|
|
3253
3262
|
}
|
|
3254
|
-
function R
|
|
3255
|
-
|
|
3263
|
+
function j(S, R) {
|
|
3264
|
+
if (!S || typeof window > "u") return;
|
|
3265
|
+
const E = new URL(window.location.href);
|
|
3266
|
+
E.searchParams.set("z", R.toFixed(2)), E.searchParams.set("x", S[0].toFixed(6)), E.searchParams.set("y", S[1].toFixed(6)), window.history.replaceState({}, "", E);
|
|
3267
|
+
}
|
|
3268
|
+
let A = !1;
|
|
3269
|
+
function O() {
|
|
3270
|
+
if (!t || !A) return;
|
|
3271
|
+
const S = t.getCenter();
|
|
3272
|
+
j([S.lng, S.lat], t.getZoom());
|
|
3273
|
+
}
|
|
3274
|
+
const L = () => {
|
|
3275
|
+
A || (A = !0), O();
|
|
3276
|
+
};
|
|
3277
|
+
function pe(S) {
|
|
3278
|
+
return S ? ["==", ["to-string", ["get", "id"]], S] : ["==", ["literal", 1], 0];
|
|
3279
|
+
}
|
|
3280
|
+
function oe() {
|
|
3281
|
+
const S = pe(r.modelValue);
|
|
3256
3282
|
t.getLayer("vector-highlight-circle") || t.addLayer({
|
|
3257
3283
|
id: "vector-highlight-circle",
|
|
3258
3284
|
type: "circle",
|
|
@@ -3277,128 +3303,131 @@ const No = [
|
|
|
3277
3303
|
"line-width": 3,
|
|
3278
3304
|
"line-opacity": 0.8
|
|
3279
3305
|
}
|
|
3280
|
-
}), t.setFilter("vector-highlight-circle",
|
|
3281
|
-
const
|
|
3282
|
-
t.setLayoutProperty("vector-highlight-circle", "visibility",
|
|
3306
|
+
}), t.setFilter("vector-highlight-circle", S), t.setFilter("vector-highlight-fill", S);
|
|
3307
|
+
const R = r.modelValue ? "visible" : "none";
|
|
3308
|
+
t.setLayoutProperty("vector-highlight-circle", "visibility", R), t.setLayoutProperty("vector-highlight-fill", "visibility", R), M();
|
|
3283
3309
|
}
|
|
3284
|
-
function
|
|
3310
|
+
function N(S) {
|
|
3285
3311
|
if (!t || !k.length) return;
|
|
3286
|
-
const
|
|
3287
|
-
t.getLayer("vector-circle") && t.setPaintProperty("vector-circle", "circle-color",
|
|
3312
|
+
const E = ["case", ["==", ["to-string", ["get", "id"]], S || ""], "#ef4444", k];
|
|
3313
|
+
t.getLayer("vector-circle") && t.setPaintProperty("vector-circle", "circle-color", E), t.getLayer("vector-fill") && t.setPaintProperty("vector-fill", "fill-color", E);
|
|
3288
3314
|
}
|
|
3289
|
-
function
|
|
3290
|
-
if (
|
|
3291
|
-
let
|
|
3315
|
+
function M() {
|
|
3316
|
+
if (T(), !r.modelValue) return;
|
|
3317
|
+
let S = !0;
|
|
3292
3318
|
i = window.setInterval(() => {
|
|
3293
|
-
|
|
3294
|
-
const
|
|
3295
|
-
t != null && t.getLayer("vector-highlight-circle") && t.setPaintProperty("vector-highlight-circle", "circle-opacity",
|
|
3319
|
+
S = !S;
|
|
3320
|
+
const R = S ? 0.8 : 0.2;
|
|
3321
|
+
t != null && t.getLayer("vector-highlight-circle") && t.setPaintProperty("vector-highlight-circle", "circle-opacity", R), t != null && t.getLayer("vector-highlight-fill") && t.setPaintProperty("vector-highlight-fill", "line-opacity", R);
|
|
3296
3322
|
}, 600);
|
|
3297
3323
|
}
|
|
3298
|
-
function
|
|
3324
|
+
function T() {
|
|
3299
3325
|
i && (clearInterval(i), i = null);
|
|
3300
3326
|
}
|
|
3301
|
-
function
|
|
3327
|
+
function Z() {
|
|
3302
3328
|
t && (t.setCenter(r.center || b), t.setZoom(r.zoom || 5));
|
|
3303
3329
|
}
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3330
|
+
const se = z();
|
|
3331
|
+
return A = se.hasQuery, we(async () => {
|
|
3332
|
+
_ = (await fetch(`/api/data/${r.table}/${r.colorAttr}`).then((ee) => ee.json())).rows, _.forEach((ee, X) => {
|
|
3333
|
+
ee.color || Object.assign(ee, { color: a[X % 10] });
|
|
3307
3334
|
}), u = new maplibregl.Popup({
|
|
3308
3335
|
closeButton: !1,
|
|
3309
3336
|
closeOnClick: !1
|
|
3310
3337
|
});
|
|
3311
|
-
const
|
|
3312
|
-
|
|
3338
|
+
const R = y.value;
|
|
3339
|
+
if (!R) return;
|
|
3340
|
+
const E = se.center || r.center || b, Q = se.zoom || r.zoom || 5;
|
|
3341
|
+
t = new maplibregl.Map({
|
|
3313
3342
|
container: g.value,
|
|
3314
3343
|
style: {
|
|
3315
3344
|
version: 8,
|
|
3316
3345
|
sources: {
|
|
3317
|
-
[
|
|
3346
|
+
[R.id]: { type: "raster", tiles: [R.url], tileSize: 256 }
|
|
3318
3347
|
},
|
|
3319
3348
|
layers: [{
|
|
3320
|
-
id:
|
|
3349
|
+
id: R.id,
|
|
3321
3350
|
type: "raster",
|
|
3322
|
-
source:
|
|
3351
|
+
source: R.id,
|
|
3323
3352
|
minzoom: 0,
|
|
3324
3353
|
maxzoom: 19
|
|
3325
3354
|
}]
|
|
3326
3355
|
},
|
|
3327
|
-
center:
|
|
3328
|
-
// [lng, lat]
|
|
3329
|
-
zoom:
|
|
3356
|
+
center: E,
|
|
3357
|
+
// [lng, lat]
|
|
3358
|
+
zoom: Q,
|
|
3330
3359
|
minZoom: 3,
|
|
3331
3360
|
maxZoom: 18,
|
|
3332
3361
|
attributionControl: !1
|
|
3333
3362
|
}), o("update:map", t), t.addControl(new maplibregl.NavigationControl(), "top-right"), t.on("zoom", () => {
|
|
3334
|
-
}), t.on("load", () => {
|
|
3363
|
+
}), t.on("moveend", L), t.on("zoomend", L), A && O(), t.on("load", () => {
|
|
3335
3364
|
t == null || t.resize(), h.value = !0;
|
|
3336
|
-
const
|
|
3337
|
-
k =
|
|
3338
|
-
}), t.on("click", (
|
|
3339
|
-
const
|
|
3340
|
-
|
|
3341
|
-
}), t.on("mousemove", (
|
|
3342
|
-
var
|
|
3343
|
-
const
|
|
3344
|
-
if (!
|
|
3365
|
+
const ee = _.filter((fe) => fe.id).reduce((fe, ye) => [ye.id, ye.color].concat(fe), []), X = ["match", ["get", r.colorAttr], ...ee, "#808080"];
|
|
3366
|
+
k = X, qo(r.table, t, X, r.filter), oe(), N(r.modelValue);
|
|
3367
|
+
}), t.on("click", (ee) => {
|
|
3368
|
+
const X = t.queryRenderedFeatures(ee.point);
|
|
3369
|
+
X.length && o("update:modelValue", X[0].properties.id);
|
|
3370
|
+
}), t.on("mousemove", (ee) => {
|
|
3371
|
+
var _e;
|
|
3372
|
+
const X = t.queryRenderedFeatures(ee.point);
|
|
3373
|
+
if (!X || !X.length) {
|
|
3345
3374
|
u.remove(), t.getCanvas().style.cursor = "";
|
|
3346
3375
|
return;
|
|
3347
3376
|
}
|
|
3348
3377
|
t.getCanvas().style.cursor = "pointer";
|
|
3349
|
-
const
|
|
3350
|
-
|
|
3351
|
-
})
|
|
3352
|
-
}),
|
|
3353
|
-
t && t.setCenter(
|
|
3354
|
-
}),
|
|
3355
|
-
t && t.setZoom(
|
|
3356
|
-
}),
|
|
3357
|
-
const
|
|
3358
|
-
t != null && t.getSource("vector") && t.getSource("vector").setTiles([
|
|
3359
|
-
}),
|
|
3378
|
+
const fe = X[0], { coordinates: ye } = fe.geometry, Se = fe.geometry.type === "Point" ? ye : ye[0][0];
|
|
3379
|
+
p.value = fe.properties, u.setLngLat(Se).setHTML((_e = v.value) == null ? void 0 : _e.innerHTML).addTo(t);
|
|
3380
|
+
});
|
|
3381
|
+
}), D(() => r.center, (S) => {
|
|
3382
|
+
t && t.setCenter(S || b);
|
|
3383
|
+
}), D(() => r.zoom, (S) => {
|
|
3384
|
+
t && t.setZoom(S);
|
|
3385
|
+
}), D(() => r.filter, (S) => {
|
|
3386
|
+
const R = `${window.location.origin}/api/vtile/${r.table}/ua/{z}/{x}/{y}.vmt?clusterZoom={z}&filter=${S ?? ""}`;
|
|
3387
|
+
t != null && t.getSource("vector") && t.getSource("vector").setTiles([R]);
|
|
3388
|
+
}), D(() => r.modelValue, (S) => {
|
|
3360
3389
|
if (!t) return;
|
|
3361
|
-
const
|
|
3362
|
-
t.getLayer("vector-highlight-circle") && (t.setFilter("vector-highlight-circle",
|
|
3363
|
-
}),
|
|
3364
|
-
if (!t || !
|
|
3365
|
-
const
|
|
3366
|
-
|
|
3367
|
-
id:
|
|
3390
|
+
const R = pe(S);
|
|
3391
|
+
t.getLayer("vector-highlight-circle") && (t.setFilter("vector-highlight-circle", R), t.setLayoutProperty("vector-highlight-circle", "visibility", S ? "visible" : "none")), t.getLayer("vector-highlight-fill") && (t.setFilter("vector-highlight-fill", R), t.setLayoutProperty("vector-highlight-fill", "visibility", S ? "visible" : "none")), N(S), S ? M() : T();
|
|
3392
|
+
}), D(d, (S, R) => {
|
|
3393
|
+
if (!t || !S) return;
|
|
3394
|
+
const E = m.value.find((Q) => Q.id === S);
|
|
3395
|
+
E && (t.getLayer(R) && t.removeLayer(R), t.getSource(R) && t.removeSource(R), t.addSource(S, { type: "raster", tiles: [E.url], tileSize: 256 }), t.addLayer({
|
|
3396
|
+
id: E.id,
|
|
3368
3397
|
type: "raster",
|
|
3369
|
-
source:
|
|
3398
|
+
source: E.id,
|
|
3370
3399
|
minzoom: 0,
|
|
3371
3400
|
maxzoom: 19
|
|
3372
3401
|
}, "vector-circle"));
|
|
3373
|
-
}),
|
|
3374
|
-
|
|
3375
|
-
}), (
|
|
3376
|
-
const
|
|
3377
|
-
return
|
|
3402
|
+
}), Ve(() => {
|
|
3403
|
+
T(), t && (t.off("moveend", L), t.off("zoomend", L), t.remove());
|
|
3404
|
+
}), (S, R) => {
|
|
3405
|
+
const E = ft("tooltip");
|
|
3406
|
+
return W((f(), x("div", Go, [
|
|
3378
3407
|
l("div", {
|
|
3379
3408
|
ref_key: "mapContainer",
|
|
3380
3409
|
ref: g,
|
|
3381
3410
|
class: "map-container w-auto relative"
|
|
3382
3411
|
}, null, 512),
|
|
3383
|
-
|
|
3412
|
+
W((f(), x("button", {
|
|
3384
3413
|
type: "button",
|
|
3385
3414
|
class: "absolute top-25 right-2 z-20 h-8 w-8 flex items-center justify-center rounded-lg bg-white border border-gray-200 shadow-[0_8px_20px_rgba(0,0,0,0.08)] text-[18px] leading-none text-gray-700 hover:bg-gray-50",
|
|
3386
3415
|
title: "Повернутися до базового вигляду",
|
|
3387
|
-
onClick:
|
|
3388
|
-
},
|
|
3389
|
-
[
|
|
3416
|
+
onClick: Z
|
|
3417
|
+
}, Jo)), [
|
|
3418
|
+
[E, "Повернутися до базового вигляду"]
|
|
3390
3419
|
]),
|
|
3391
|
-
l("div",
|
|
3392
|
-
(
|
|
3420
|
+
l("div", Xo, [
|
|
3421
|
+
(f(!0), x(U, null, le(e(_), (Q) => (f(), x("div", {
|
|
3393
3422
|
class: "legend-item",
|
|
3394
|
-
key:
|
|
3423
|
+
key: Q.id
|
|
3395
3424
|
}, [
|
|
3396
|
-
l("div",
|
|
3425
|
+
l("div", en, [
|
|
3397
3426
|
l("div", {
|
|
3398
3427
|
class: "w-[15px] h-[15px] rounded-[50%] min-w-[15px]",
|
|
3399
|
-
style:
|
|
3428
|
+
style: Re("background-color:" + Q.color)
|
|
3400
3429
|
}, null, 4),
|
|
3401
|
-
l("div",
|
|
3430
|
+
l("div", tn, I(Q.text), 1)
|
|
3402
3431
|
])
|
|
3403
3432
|
]))), 128))
|
|
3404
3433
|
]),
|
|
@@ -3407,30 +3436,30 @@ const No = [
|
|
|
3407
3436
|
ref: v,
|
|
3408
3437
|
style: { display: "none" }
|
|
3409
3438
|
}, [
|
|
3410
|
-
|
|
3439
|
+
ue(S.$slots, "default", { hoverData: p.value })
|
|
3411
3440
|
], 512),
|
|
3412
|
-
l("div",
|
|
3413
|
-
(
|
|
3414
|
-
key:
|
|
3415
|
-
title:
|
|
3416
|
-
class:
|
|
3417
|
-
onClick: (
|
|
3441
|
+
l("div", ln, [
|
|
3442
|
+
(f(!0), x(U, null, le(m.value, (Q) => W((f(), x("div", {
|
|
3443
|
+
key: Q.id,
|
|
3444
|
+
title: Q.name,
|
|
3445
|
+
class: P(["vs-map-slot-layers__layer relative", { focused: d.value === Q.id }]),
|
|
3446
|
+
onClick: (ee) => d.value = Q.id
|
|
3418
3447
|
}, [
|
|
3419
3448
|
l("img", {
|
|
3420
|
-
src:
|
|
3449
|
+
src: Q.preview || C(Q.url),
|
|
3421
3450
|
class: "vs-map-slot-layers__image"
|
|
3422
|
-
}, null, 8,
|
|
3423
|
-
l("div",
|
|
3424
|
-
], 10,
|
|
3425
|
-
[
|
|
3451
|
+
}, null, 8, on),
|
|
3452
|
+
l("div", nn, I(Q.name), 1)
|
|
3453
|
+
], 10, an)), [
|
|
3454
|
+
[E, Q.name]
|
|
3426
3455
|
])), 128))
|
|
3427
3456
|
])
|
|
3428
3457
|
], 512)), [
|
|
3429
|
-
[
|
|
3458
|
+
[ie, h.value]
|
|
3430
3459
|
]);
|
|
3431
3460
|
};
|
|
3432
3461
|
}
|
|
3433
|
-
}),
|
|
3462
|
+
}), ut = {
|
|
3434
3463
|
mounted(s, n) {
|
|
3435
3464
|
if (typeof document > "u") return;
|
|
3436
3465
|
let r = null;
|
|
@@ -3458,22 +3487,22 @@ const No = [
|
|
|
3458
3487
|
const n = s.tooltipHandlers;
|
|
3459
3488
|
n && (s.removeEventListener("mouseenter", n.showTooltip), s.removeEventListener("mouseleave", n.hideTooltip));
|
|
3460
3489
|
}
|
|
3461
|
-
},
|
|
3490
|
+
}, sn = { class: "pt-[20px]" }, un = { class: "w-full gap-5 inline-flex mb-[6px] pr-3" }, cn = { class: "flex items-center" }, dn = ["title"], pn = /* @__PURE__ */ l("span", { class: "sr-only" }, "Відкрити мапу", -1), fn = { class: "max-[1000px]:flex gap-2 min-[1001px]:hidden" }, vn = { class: "flex" }, mn = {
|
|
3462
3491
|
key: 0,
|
|
3463
3492
|
class: "flex items-center py-[15px] pb-[24px] pl-2 pr-6 gap-4"
|
|
3464
|
-
},
|
|
3493
|
+
}, hn = { class: "font-bold text-2xl mr-[10px]" }, gn = { class: "text-sm text-stone-500 font-medium" }, yn = /* @__PURE__ */ l("span", { class: "text-sm text-stone-500 font-medium" }, " об'єктів", -1), bn = {
|
|
3465
3494
|
key: 0,
|
|
3466
3495
|
class: "inline-flex items-center gap-2 text-sm text-stone-700 select-none ml-auto mt-auto"
|
|
3467
|
-
},
|
|
3496
|
+
}, xn = /* @__PURE__ */ l("span", null, "В межах видимої області", -1), wn = {
|
|
3468
3497
|
class: "wrapperTable flex flex-col",
|
|
3469
3498
|
style: { height: "calc(100vh - 302px)" }
|
|
3470
|
-
},
|
|
3499
|
+
}, kn = {
|
|
3471
3500
|
key: 1,
|
|
3472
3501
|
class: "text-center py-28"
|
|
3473
|
-
},
|
|
3502
|
+
}, _n = /* @__PURE__ */ l("h2", { class: "font-medium text-base text-gray-500 rounded-xl" }, " За вашим запитом даних не знайдено! ", -1), Cn = /* @__PURE__ */ l("p", { class: "font-normal text-sm text-gray-500 rounded-xl" }, " Введіть, будь ласка, інші значення для пошуку. ", -1), Vn = { key: 1 }, $n = {
|
|
3474
3503
|
key: 2,
|
|
3475
3504
|
class: "my-5 pr-2"
|
|
3476
|
-
},
|
|
3505
|
+
}, Sn = { class: "flex justify-between" }, Mn = { class: "w-full lg:w-1/2 relative" }, Ge = /* @__PURE__ */ G({
|
|
3477
3506
|
__name: "vs-parts-map",
|
|
3478
3507
|
props: {
|
|
3479
3508
|
title: {},
|
|
@@ -3492,250 +3521,261 @@ const No = [
|
|
|
3492
3521
|
},
|
|
3493
3522
|
emits: ["change:filter", "update:map"],
|
|
3494
3523
|
setup(s, { emit: n }) {
|
|
3495
|
-
var
|
|
3496
|
-
const r =
|
|
3497
|
-
r && !(r != null && r.appContext.directives.tooltip) && (r.appContext.directives.tooltip =
|
|
3498
|
-
function o(
|
|
3499
|
-
return
|
|
3500
|
-
}
|
|
3501
|
-
const t = s, u = n,
|
|
3502
|
-
|
|
3503
|
-
const g = V(""), h = V(null), w = V(!0), m = V(((
|
|
3504
|
-
let
|
|
3505
|
-
function
|
|
3506
|
-
return Object.entries(
|
|
3507
|
-
}
|
|
3508
|
-
function B
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3524
|
+
var Se, _e, Ie, Oe, Te, He, Ee;
|
|
3525
|
+
const r = et();
|
|
3526
|
+
r && !(r != null && r.appContext.directives.tooltip) && (r.appContext.directives.tooltip = ut);
|
|
3527
|
+
function o(B) {
|
|
3528
|
+
return B ? (B.type === "Point" ? B.coordinates : null) || (B.type.includes("Multi") ? B.coordinates[0][0][0] : B.coordinates[0][0]) : null;
|
|
3529
|
+
}
|
|
3530
|
+
const t = s, u = n, c = V(0);
|
|
3531
|
+
c.value = t.initTotal ?? ((Se = t.rows) == null ? void 0 : Se.length) ?? 0;
|
|
3532
|
+
const g = V(""), h = V(null), w = V(!0), m = V(((_e = t.rows) == null ? void 0 : _e.length) === 1), d = V(0), y = V(t.rows), C = V(1), v = V(20), p = V(t.filters || []), a = V(""), _ = V({}), b = V(((Ie = t.rows) == null ? void 0 : Ie.length) === 1 ? t.rows[0] : {}), i = V(((Oe = t.rows) == null ? void 0 : Oe.length) === 1 ? t.rows[0].id : ""), k = V(((Te = t.rows) == null ? void 0 : Te.length) === 1 ? o((He = t.rows[0]) == null ? void 0 : He.geom) : t.center || null), z = V(((Ee = t.rows) == null ? void 0 : Ee.length) === 1 ? 14 : t.zoom || 5), j = V(!1), A = V(!1), O = V("");
|
|
3533
|
+
let L = !1;
|
|
3534
|
+
function pe(B) {
|
|
3535
|
+
return Object.entries(B).filter(([, F]) => F).map(([F, te]) => `${F}=${te}`).join("|");
|
|
3536
|
+
}
|
|
3537
|
+
function oe(B) {
|
|
3538
|
+
return Object.entries(B).map(([F, te]) => {
|
|
3539
|
+
if (Array.isArray(te)) {
|
|
3540
|
+
const H = te.filter(Boolean);
|
|
3541
|
+
return H.length ? `${F}=[${H.join(",")}]` : "";
|
|
3542
|
+
}
|
|
3543
|
+
return te ? `${F}=${te}` : "";
|
|
3544
|
+
}).filter(Boolean).join("|");
|
|
3545
|
+
}
|
|
3546
|
+
function N() {
|
|
3547
|
+
var H, ke, be, ne;
|
|
3548
|
+
if (!h.value || !A.value) return;
|
|
3549
|
+
const B = (ke = (H = h.value).getBounds) == null ? void 0 : ke.call(H);
|
|
3550
|
+
if (!B) return;
|
|
3551
|
+
const F = (be = B.getSouthWest) == null ? void 0 : be.call(B), te = (ne = B.getNorthEast) == null ? void 0 : ne.call(B);
|
|
3552
|
+
!F || !te || (O.value = `${F.lng} ${F.lat},${te.lng} ${te.lat}`);
|
|
3553
|
+
}
|
|
3554
|
+
async function M(B = !1) {
|
|
3555
|
+
await Me();
|
|
3556
|
+
const F = pe(_.value), te = oe(_.value);
|
|
3557
|
+
a.value = te, A.value ? N() : O.value = "";
|
|
3520
3558
|
try {
|
|
3521
|
-
const
|
|
3559
|
+
const H = {
|
|
3522
3560
|
search: g.value,
|
|
3523
3561
|
limit: v.value.toString(),
|
|
3524
|
-
page:
|
|
3525
|
-
filter:
|
|
3526
|
-
...
|
|
3527
|
-
},
|
|
3562
|
+
page: C.value.toString(),
|
|
3563
|
+
filter: F,
|
|
3564
|
+
...A.value && O.value ? { bbox: O.value } : {}
|
|
3565
|
+
}, ke = new URL(`/api/data/${t.table}`, window.location.origin) + (i.value ? `/${i.value}` : ""), be = new URLSearchParams(H).toString(), ne = await fetch(`${ke.toString()}?${be}`).then((ve) => ve.json());
|
|
3528
3566
|
if (i.value) {
|
|
3529
|
-
let
|
|
3530
|
-
|
|
3567
|
+
let ve;
|
|
3568
|
+
ne.rows.length > 1 ? ve = ne.rows.find((ct) => ct.id === i.value) : [ve] = ne.rows, b.value = ve, B || (k.value = o(ve == null ? void 0 : ve.geom), z.value = 14), m.value = !0;
|
|
3531
3569
|
} else
|
|
3532
|
-
m.value = !1,
|
|
3533
|
-
|
|
3534
|
-
} catch (
|
|
3535
|
-
console.error(
|
|
3570
|
+
m.value = !1, j.value || (z.value = t.zoom || 5), y.value = ne == null ? void 0 : ne.rows;
|
|
3571
|
+
j.value = !1, c.value = ne.filtered, La({ page: C.value, filter: F, id: i.value, filterByView: A.value });
|
|
3572
|
+
} catch (H) {
|
|
3573
|
+
console.error(H.message);
|
|
3536
3574
|
}
|
|
3537
3575
|
}
|
|
3538
|
-
const
|
|
3539
|
-
function
|
|
3540
|
-
!h.value ||
|
|
3576
|
+
const T = Qe(() => M(), 300), Z = Qe(() => M(!0), 400);
|
|
3577
|
+
function se() {
|
|
3578
|
+
!h.value || L || !A.value || (h.value.on("moveend", Z), h.value.on("zoomend", Z), L = !0);
|
|
3541
3579
|
}
|
|
3542
|
-
function
|
|
3543
|
-
!h.value || !
|
|
3580
|
+
function S() {
|
|
3581
|
+
!h.value || !L || (h.value.off("moveend", Z), h.value.off("zoomend", Z), L = !1);
|
|
3544
3582
|
}
|
|
3545
|
-
function
|
|
3546
|
-
v.value =
|
|
3583
|
+
function R(B) {
|
|
3584
|
+
v.value = B, C.value = 1, M();
|
|
3547
3585
|
}
|
|
3548
|
-
function
|
|
3549
|
-
|
|
3586
|
+
function E(B) {
|
|
3587
|
+
C.value = B, M();
|
|
3550
3588
|
}
|
|
3551
|
-
function
|
|
3552
|
-
|
|
3589
|
+
function Q(B) {
|
|
3590
|
+
_.value = B.data, C.value = 1, i.value ? i.value = "" : M(), u("change:filter", B);
|
|
3553
3591
|
}
|
|
3554
|
-
async function
|
|
3592
|
+
async function ee() {
|
|
3555
3593
|
if (t.filters) return;
|
|
3556
|
-
const
|
|
3557
|
-
|
|
3558
|
-
}
|
|
3559
|
-
function
|
|
3560
|
-
|
|
3561
|
-
}
|
|
3562
|
-
|
|
3563
|
-
var
|
|
3564
|
-
|
|
3565
|
-
const
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3594
|
+
const F = await (await fetch(`/api/filter/${t.table}`)).json();
|
|
3595
|
+
p.value = F.list;
|
|
3596
|
+
}
|
|
3597
|
+
function X() {
|
|
3598
|
+
_.value = {}, g.value = "", M();
|
|
3599
|
+
}
|
|
3600
|
+
we(async () => {
|
|
3601
|
+
var te, H;
|
|
3602
|
+
d.value = window.innerWidth, d.value < 1e3 && (w.value = !1);
|
|
3603
|
+
const B = new URLSearchParams(window.location.search);
|
|
3604
|
+
C.value = Number(B.get("page")) || 1, v.value = Number(B.get("limit")) || v.value, i.value = B.get("id") || "", m.value = !!i.value, a.value = B.get("filter") || "";
|
|
3605
|
+
const F = B.get("bbox");
|
|
3606
|
+
F !== null ? A.value = F !== "0" : A.value = !1, (H = (te = B.get("filter")) == null ? void 0 : te.split("|")) == null || H.forEach((ke) => {
|
|
3607
|
+
const [be, ne] = ke.split("=");
|
|
3608
|
+
be && (_.value[be] = ne != null && ne.includes(",") ? ne.split(",") : [ne]);
|
|
3609
|
+
}), ee(), !y.value && !i.value && M();
|
|
3610
|
+
}), Ve(() => {
|
|
3611
|
+
S();
|
|
3572
3612
|
});
|
|
3573
|
-
function
|
|
3574
|
-
|
|
3613
|
+
function fe() {
|
|
3614
|
+
j.value = !0, m.value = !1, b.value = null, i.value = "";
|
|
3575
3615
|
}
|
|
3576
|
-
function
|
|
3577
|
-
|
|
3616
|
+
function ye(B) {
|
|
3617
|
+
B != null && B.geom && (k.value = o(B.geom), z.value = 16), b.value = B, i.value = B.id;
|
|
3578
3618
|
}
|
|
3579
|
-
return
|
|
3580
|
-
u("update:map",
|
|
3581
|
-
}),
|
|
3582
|
-
|
|
3583
|
-
}),
|
|
3619
|
+
return D(h, (B) => {
|
|
3620
|
+
u("update:map", B), B && A.value && se();
|
|
3621
|
+
}), D(g, (B) => {
|
|
3622
|
+
B || M();
|
|
3623
|
+
}), D(i, () => {
|
|
3584
3624
|
M();
|
|
3585
|
-
}),
|
|
3586
|
-
|
|
3587
|
-
}), (
|
|
3588
|
-
var
|
|
3589
|
-
return
|
|
3590
|
-
|
|
3625
|
+
}), D(A, () => {
|
|
3626
|
+
A.value ? se() : S(), M();
|
|
3627
|
+
}), (B, F) => {
|
|
3628
|
+
var te;
|
|
3629
|
+
return f(), x("section", sn, [
|
|
3630
|
+
ue(B.$slots, "header", {
|
|
3591
3631
|
title: t.title,
|
|
3592
|
-
total:
|
|
3632
|
+
total: c.value
|
|
3593
3633
|
}),
|
|
3594
|
-
l("div",
|
|
3595
|
-
|
|
3634
|
+
l("div", un, [
|
|
3635
|
+
q(e(ge), {
|
|
3596
3636
|
type: "text",
|
|
3597
3637
|
modelValue: g.value,
|
|
3598
|
-
"onUpdate:modelValue":
|
|
3638
|
+
"onUpdate:modelValue": F[0] || (F[0] = (H) => g.value = H),
|
|
3599
3639
|
name: "search",
|
|
3600
3640
|
label: "Пошук",
|
|
3601
|
-
onChange: e(
|
|
3641
|
+
onChange: e(T)
|
|
3602
3642
|
}, null, 8, ["modelValue", "onChange"]),
|
|
3603
|
-
|
|
3643
|
+
p.value.length ? (f(), K(e(Ae), {
|
|
3604
3644
|
key: 0,
|
|
3605
|
-
schema:
|
|
3645
|
+
schema: p.value,
|
|
3606
3646
|
view: "inline",
|
|
3607
|
-
onChange:
|
|
3647
|
+
onChange: Q,
|
|
3608
3648
|
limit: 5,
|
|
3609
|
-
value:
|
|
3649
|
+
value: _.value,
|
|
3610
3650
|
ref: "filterRef"
|
|
3611
3651
|
}, null, 8, ["schema", "value"])) : $("", !0),
|
|
3612
|
-
l("div",
|
|
3652
|
+
l("div", cn, [
|
|
3613
3653
|
l("button", {
|
|
3614
3654
|
type: "button",
|
|
3615
3655
|
class: "map-visible-button py-2 px-2 hidden min-[1001px]:inline-flex items-center gap-x-1.5 text-sm rounded-lg border border-gray-200 bg-white text-gray-600 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100",
|
|
3616
3656
|
title: w.value ? "Приховати карту" : "Показати карту",
|
|
3617
|
-
onClick:
|
|
3657
|
+
onClick: F[1] || (F[1] = (H) => w.value = !w.value)
|
|
3618
3658
|
}, [
|
|
3619
|
-
w.value ? (
|
|
3620
|
-
|
|
3621
|
-
], 8,
|
|
3622
|
-
l("div",
|
|
3659
|
+
w.value ? (f(), K(xo, { key: 0 })) : (f(), K(Bo, { key: 1 })),
|
|
3660
|
+
pn
|
|
3661
|
+
], 8, dn),
|
|
3662
|
+
l("div", fn, [
|
|
3623
3663
|
l("button", {
|
|
3624
|
-
onClick:
|
|
3664
|
+
onClick: F[2] || (F[2] = (H) => w.value = !1),
|
|
3625
3665
|
class: "py-2 px-2 h-[38px] inline-flex items-center gap-x-1.5 text-sm rounded-lg border border-gray-200 bg-white text-gray-600 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100"
|
|
3626
3666
|
}, [
|
|
3627
|
-
|
|
3667
|
+
q(Yo)
|
|
3628
3668
|
]),
|
|
3629
3669
|
l("button", {
|
|
3630
|
-
onClick:
|
|
3670
|
+
onClick: F[3] || (F[3] = (H) => w.value = !0),
|
|
3631
3671
|
class: "py-2 px-2 h-[38px] inline-flex items-center gap-x-1.5 text-sm rounded-lg border border-gray-200 bg-white text-gray-600 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100"
|
|
3632
3672
|
}, [
|
|
3633
|
-
|
|
3673
|
+
q(Po)
|
|
3634
3674
|
])
|
|
3635
3675
|
])
|
|
3636
3676
|
])
|
|
3637
3677
|
]),
|
|
3638
|
-
l("div",
|
|
3678
|
+
l("div", vn, [
|
|
3639
3679
|
l("div", {
|
|
3640
|
-
class:
|
|
3680
|
+
class: P([
|
|
3641
3681
|
"relative overflow-hidden shrink-0",
|
|
3642
3682
|
w.value ? "w-2/4 mr-0" : "w-full mr-3",
|
|
3643
3683
|
m.value ? "hidden" : ""
|
|
3644
3684
|
])
|
|
3645
3685
|
}, [
|
|
3646
|
-
(
|
|
3686
|
+
(te = B.$slots) != null && te.header ? $("", !0) : (f(), x("div", mn, [
|
|
3647
3687
|
l("div", null, [
|
|
3648
|
-
l("span",
|
|
3649
|
-
l("span",
|
|
3650
|
-
|
|
3688
|
+
l("span", hn, I(t.title), 1),
|
|
3689
|
+
l("span", gn, I(c.value), 1),
|
|
3690
|
+
yn
|
|
3651
3691
|
]),
|
|
3652
|
-
t.objectsInView ? (
|
|
3653
|
-
|
|
3692
|
+
t.objectsInView ? (f(), x("label", bn, [
|
|
3693
|
+
W(l("input", {
|
|
3654
3694
|
type: "checkbox",
|
|
3655
3695
|
class: "accent-blue-600 w-4 h-4",
|
|
3656
|
-
"onUpdate:modelValue":
|
|
3696
|
+
"onUpdate:modelValue": F[4] || (F[4] = (H) => A.value = H)
|
|
3657
3697
|
}, null, 512), [
|
|
3658
|
-
[
|
|
3698
|
+
[vt, A.value]
|
|
3659
3699
|
]),
|
|
3660
|
-
|
|
3700
|
+
xn
|
|
3661
3701
|
])) : $("", !0)
|
|
3662
3702
|
])),
|
|
3663
|
-
l("div",
|
|
3664
|
-
|
|
3703
|
+
l("div", wn, [
|
|
3704
|
+
c.value >= 1 ? ue(B.$slots, "table", {
|
|
3665
3705
|
key: 0,
|
|
3666
3706
|
rows: y.value,
|
|
3667
|
-
selectRow:
|
|
3668
|
-
}) : (
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3707
|
+
selectRow: ye
|
|
3708
|
+
}) : (f(), x("div", kn, [
|
|
3709
|
+
q(co),
|
|
3710
|
+
_n,
|
|
3711
|
+
Cn,
|
|
3672
3712
|
l("button", {
|
|
3673
3713
|
type: "button",
|
|
3674
3714
|
class: "mt-[10px] py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs rounded-lg border border-stone-200 bg-white text-stone-800 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100",
|
|
3675
|
-
onClick:
|
|
3715
|
+
onClick: X
|
|
3676
3716
|
}, " Очистити дані пошуку ")
|
|
3677
3717
|
]))
|
|
3678
3718
|
]),
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
l("div",
|
|
3682
|
-
|
|
3683
|
-
total:
|
|
3684
|
-
currentPage:
|
|
3719
|
+
c.value >= 1 ? (f(), x("hr", Vn)) : $("", !0),
|
|
3720
|
+
c.value >= 1 ? (f(), x("div", $n, [
|
|
3721
|
+
l("div", Sn, [
|
|
3722
|
+
q(oo, {
|
|
3723
|
+
total: c.value,
|
|
3724
|
+
currentPage: C.value ?? 1,
|
|
3685
3725
|
pageSize: v.value,
|
|
3686
|
-
onPageChange:
|
|
3687
|
-
onPageSizeChange:
|
|
3726
|
+
onPageChange: F[5] || (F[5] = (H) => E(H)),
|
|
3727
|
+
onPageSizeChange: F[6] || (F[6] = (H) => R(H))
|
|
3688
3728
|
}, null, 8, ["total", "currentPage", "pageSize"])
|
|
3689
3729
|
])
|
|
3690
3730
|
])) : $("", !0)
|
|
3691
3731
|
], 2),
|
|
3692
|
-
m.value ? (
|
|
3732
|
+
m.value ? (f(), x("div", {
|
|
3693
3733
|
key: 0,
|
|
3694
|
-
class:
|
|
3734
|
+
class: P(
|
|
3695
3735
|
w.value ? "lg:static lg:w-1/2 mr-0 pb-5" : "pb-5 mr-3"
|
|
3696
3736
|
),
|
|
3697
3737
|
style: { height: "calc(100vh - 152px)" }
|
|
3698
3738
|
}, [
|
|
3699
|
-
|
|
3739
|
+
ue(B.$slots, "details", {
|
|
3700
3740
|
table: t.table,
|
|
3701
3741
|
selectedRow: b.value,
|
|
3702
|
-
closeObjCard:
|
|
3742
|
+
closeObjCard: fe
|
|
3703
3743
|
})
|
|
3704
3744
|
], 2)) : $("", !0),
|
|
3705
|
-
|
|
3706
|
-
|
|
3745
|
+
W(l("div", Mn, [
|
|
3746
|
+
q(rn, {
|
|
3707
3747
|
table: t.table,
|
|
3708
3748
|
map: h.value,
|
|
3709
|
-
"onUpdate:map":
|
|
3749
|
+
"onUpdate:map": F[7] || (F[7] = (H) => h.value = H),
|
|
3710
3750
|
zoom: z.value,
|
|
3711
3751
|
colorAttr: t.colorAttr,
|
|
3712
3752
|
filter: a.value,
|
|
3713
3753
|
center: k.value,
|
|
3714
3754
|
modelValue: i.value,
|
|
3715
|
-
"onUpdate:modelValue":
|
|
3755
|
+
"onUpdate:modelValue": F[8] || (F[8] = (H) => i.value = H),
|
|
3716
3756
|
layers: t.layers
|
|
3717
3757
|
}, {
|
|
3718
|
-
default:
|
|
3719
|
-
|
|
3758
|
+
default: he(({ hoverData: H }) => [
|
|
3759
|
+
ue(B.$slots, "popup", { data: H })
|
|
3720
3760
|
]),
|
|
3721
3761
|
_: 3
|
|
3722
3762
|
}, 8, ["table", "map", "zoom", "colorAttr", "filter", "center", "modelValue", "layers"]),
|
|
3723
|
-
|
|
3763
|
+
ue(B.$slots, "default", {
|
|
3724
3764
|
table: t.table,
|
|
3725
3765
|
map: h.value,
|
|
3726
3766
|
selectedRow: b.value
|
|
3727
3767
|
})
|
|
3728
3768
|
], 512), [
|
|
3729
|
-
[
|
|
3769
|
+
[ie, w.value]
|
|
3730
3770
|
])
|
|
3731
3771
|
])
|
|
3732
3772
|
]);
|
|
3733
3773
|
};
|
|
3734
3774
|
}
|
|
3735
3775
|
});
|
|
3736
|
-
|
|
3737
|
-
s.component("VsPartsMap",
|
|
3776
|
+
Ge.install = (s) => {
|
|
3777
|
+
s.component("VsPartsMap", Ge), s._context.directives.tooltip || s.directive("tooltip", ut);
|
|
3738
3778
|
};
|
|
3739
3779
|
export {
|
|
3740
|
-
|
|
3780
|
+
Ge as default
|
|
3741
3781
|
};
|