@topvisor/ui 1.4.1-projectSelector.2 → 1.4.1-projectSelector.3
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/.chunks/{policy.vue_vue_type_style_index_0_lang-ClaW4X74.es.js → policy.vue_vue_type_style_index_0_lang-RJnqOsjD.es.js} +178 -167
- package/.chunks/{policy.vue_vue_type_style_index_0_lang-ClaW4X74.es.js.map → policy.vue_vue_type_style_index_0_lang-RJnqOsjD.es.js.map} +1 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-dgZjCI-7.amd.js +2 -0
- package/.chunks/{policy.vue_vue_type_style_index_0_lang-CO-f4TwZ.amd.js.map → policy.vue_vue_type_style_index_0_lang-dgZjCI-7.amd.js.map} +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +33 -33
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/Read Me.txt +1 -1
- package/icomoon/Topvisor icons.json +361 -131
- package/icomoon/demo.html +141 -1
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +11 -1
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +35 -5
- package/package.json +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +806 -759
- package/project/project.js.map +1 -1
- package/src/components/formsExt/selector2/selector2.vue.d.ts +2 -0
- package/src/components/formsExt/selector2/types.d.ts +18 -4
- package/src/components/project/groupSelector/groups/groups.vue.d.ts +7 -1
- package/src/components/project/projectSelector/cache.d.ts +4 -0
- package/src/components/project/projectSelector/projectSelector.vue.d.ts +25 -17
- package/src/components/project/projectSelector/types.d.ts +1 -2
- package/src/components/project/projectSelector/utils.d.ts +7 -3
- package/.chunks/policy.vue_vue_type_style_index_0_lang-CO-f4TwZ.amd.js +0 -2
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
const fileNames = ['../assets/policy.css'].map(fileName => import.meta.resolve(fileName));
|
|
4
4
|
_autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
|
|
5
5
|
|
|
6
|
-
import { defineComponent as G, mergeModels as U, useModel as se, ref as
|
|
6
|
+
import { defineComponent as G, mergeModels as U, useModel as se, ref as P, onMounted as ie, onUpdated as ue, createElementBlock as T, openBlock as h, normalizeClass as ce, createCommentVNode as x, Fragment as V, renderList as H, createBlock as b, mergeProps as W, createSlots as Y, withCtx as B, createTextVNode as $, toDisplayString as M, createVNode as ne, createElementVNode as oe, withModifiers as de, computed as q, watch as J, toRef as K, resolveComponent as Z, resolveDirective as _, unref as d, renderSlot as fe, withDirectives as ee, resolveDynamicComponent as pe } from "vue";
|
|
7
7
|
import { e as te, b as ve, C as j, d as me, u as he, s as ye } from "./forms-BAUgA7Ct.es.js";
|
|
8
8
|
import { _ as ge, b as le } from "./popupHint.vue_vue_type_style_index_0_lang-BIWw5zUX.es.js";
|
|
9
9
|
import { _ as Ae } from "./widgetInput.vue_vue_type_script_setup_true_lang-Brs-RxDI.es.js";
|
|
10
10
|
import { invertKeyboardLayout as Ie } from "../utils/keyboard.js";
|
|
11
|
-
import { g as
|
|
12
|
-
const
|
|
11
|
+
import { g as Ce } from "./field-CyyFzM-Y.es.js";
|
|
12
|
+
const Te = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "top-menu_selectAll"
|
|
15
15
|
}, We = /* @__PURE__ */ G({
|
|
@@ -29,32 +29,32 @@ const Ce = {
|
|
|
29
29
|
}),
|
|
30
30
|
emits: ["update:modelValue"],
|
|
31
31
|
setup(e) {
|
|
32
|
-
const a = e, l = se(e, "modelValue"), t =
|
|
32
|
+
const a = e, l = se(e, "modelValue"), t = P();
|
|
33
33
|
!a.isMultiple && typeof l.value != "string" && typeof l.value != "number" && console.warn('Type check failed for prop "modelValue". Expected String: ' + typeof l.value), a.isMultiple && !Array.isArray(l.value) && console.warn('Type check failed for prop "modelValue". Expected Array: ' + typeof l.value), a.isMultiple && !a.canBeEmptyMultiple && Array.isArray(l.value) && !l.value.length && a.items[0] && (l.value = [a.items[0]?.href ?? a.items[0]?.value]);
|
|
34
|
-
const
|
|
34
|
+
const u = (r) => Array.isArray(l.value) ? l.value.includes(r.value) : r.value === l.value, k = (r, f = !1) => {
|
|
35
35
|
if (Array.isArray(l.value)) {
|
|
36
|
-
let
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
const A =
|
|
40
|
-
A === -1 ?
|
|
36
|
+
let i = l.value.slice();
|
|
37
|
+
if (f) {
|
|
38
|
+
i.length || (i = a.items.map((y) => y.value));
|
|
39
|
+
const A = i.indexOf(r.value);
|
|
40
|
+
A === -1 ? i.push(r.value) : i.splice(A, 1);
|
|
41
41
|
} else
|
|
42
|
-
|
|
43
|
-
!a.canBeEmptyMultiple && !
|
|
42
|
+
i.length === 1 && i[0] === r.value ? i = [] : i = [r.value];
|
|
43
|
+
!a.canBeEmptyMultiple && !i.length && (i = [r.value]), l.value = i;
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
l.value = r.value;
|
|
47
47
|
}, p = (r) => {
|
|
48
48
|
if (t.value.scrollWidth <= t.value.offsetWidth || r.shiftKey || Math.abs(r.deltaY) < 50) return;
|
|
49
49
|
r.preventDefault();
|
|
50
|
-
const
|
|
51
|
-
t.value.scrollLeft = t.value.scrollLeft +
|
|
52
|
-
},
|
|
53
|
-
const
|
|
54
|
-
if (!
|
|
55
|
-
const
|
|
50
|
+
const f = r.deltaY > 0 ? 30 : -30;
|
|
51
|
+
t.value.scrollLeft = t.value.scrollLeft + f;
|
|
52
|
+
}, c = (r = !0) => {
|
|
53
|
+
const f = t.value.querySelector(".top-active");
|
|
54
|
+
if (!f) return;
|
|
55
|
+
const i = 24, A = f.offsetLeft - t.value.offsetLeft - i, y = f.offsetLeft - t.value.offsetLeft + f.clientWidth + i, g = t.value.scrollLeft, w = t.value.clientWidth + t.value.scrollLeft;
|
|
56
56
|
let I;
|
|
57
|
-
A < g && (I = A),
|
|
57
|
+
A < g && (I = A), y > w && (I = y - t.value.clientWidth), I !== void 0 && (ve() ? j.$?.(t.value).animate({ scrollLeft: I }, r ? 200 : 0) : t.value.scrollTo({ left: I, behavior: r ? "smooth" : "auto" }));
|
|
58
58
|
}, n = () => {
|
|
59
59
|
if (Array.isArray(l.value)) {
|
|
60
60
|
if (l.value.length === a.items.length) {
|
|
@@ -64,7 +64,7 @@ const Ce = {
|
|
|
64
64
|
l.value = a.items.map((r) => r.href ?? r.value);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
return ie(() =>
|
|
67
|
+
return ie(() => c(!1)), ue(() => c(!0)), (r, f) => (h(), T("div", {
|
|
68
68
|
ref_key: "el",
|
|
69
69
|
ref: t,
|
|
70
70
|
class: ce({
|
|
@@ -74,40 +74,40 @@ const Ce = {
|
|
|
74
74
|
}),
|
|
75
75
|
onWheel: p
|
|
76
76
|
}, [
|
|
77
|
-
(
|
|
77
|
+
(h(!0), T(V, null, H(e.items, (i) => (h(), b(te, W({ ref_for: !0 }, i, {
|
|
78
78
|
class: "top-menu_item",
|
|
79
79
|
color: "theme",
|
|
80
|
-
onClick: (A) =>
|
|
81
|
-
isActive: i
|
|
80
|
+
onClick: (A) => k(i, A.ctrlKey || A.metaKey),
|
|
81
|
+
isActive: u(i)
|
|
82
82
|
}), Y({ _: 2 }, [
|
|
83
|
-
|
|
83
|
+
i.content ? {
|
|
84
84
|
name: "default",
|
|
85
85
|
fn: B(() => [
|
|
86
|
-
|
|
86
|
+
$(M(i.content), 1)
|
|
87
87
|
]),
|
|
88
88
|
key: "0"
|
|
89
89
|
} : void 0
|
|
90
90
|
]), 1040, ["onClick", "isActive"]))), 256)),
|
|
91
|
-
Array.isArray(l.value) && e.selectAllItem ? (
|
|
92
|
-
ne(te,
|
|
91
|
+
Array.isArray(l.value) && e.selectAllItem ? (h(), T("div", Te, [
|
|
92
|
+
ne(te, W(e.selectAllItem, {
|
|
93
93
|
class: "top-menu_item",
|
|
94
94
|
color: "theme",
|
|
95
95
|
styling: "",
|
|
96
|
-
onClick:
|
|
96
|
+
onClick: f[0] || (f[0] = (i) => n()),
|
|
97
97
|
isActive: l.value.length === e.items.length
|
|
98
98
|
}), Y({ _: 2 }, [
|
|
99
99
|
e.selectAllItem.content ? {
|
|
100
100
|
name: "default",
|
|
101
101
|
fn: B(() => [
|
|
102
|
-
|
|
102
|
+
$(M(e.selectAllItem.content), 1)
|
|
103
103
|
]),
|
|
104
104
|
key: "0"
|
|
105
105
|
} : void 0
|
|
106
106
|
]), 1040, ["isActive"])
|
|
107
|
-
])) :
|
|
107
|
+
])) : x("", !0)
|
|
108
108
|
], 34));
|
|
109
109
|
}
|
|
110
|
-
}),
|
|
110
|
+
}), ke = { class: "top-selector2_itemMulti top-ellipsis" }, Le = /* @__PURE__ */ G({
|
|
111
111
|
__name: "itemMulti",
|
|
112
112
|
props: {
|
|
113
113
|
id: {},
|
|
@@ -115,9 +115,9 @@ const Ce = {
|
|
|
115
115
|
},
|
|
116
116
|
emits: ["delete"],
|
|
117
117
|
setup(e) {
|
|
118
|
-
return (a, l) => (
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
return (a, l) => (h(), T("div", ke, [
|
|
119
|
+
$(M(e.name) + " ", 1),
|
|
120
|
+
oe("span", {
|
|
121
121
|
class: "top-selector2_itemMultiDelete",
|
|
122
122
|
"data-top-icon": "",
|
|
123
123
|
onClick: l[0] || (l[0] = (t) => a.$emit("delete", { id: e.id, name: e.name })),
|
|
@@ -126,22 +126,22 @@ const Ce = {
|
|
|
126
126
|
}, null, 32)
|
|
127
127
|
]));
|
|
128
128
|
}
|
|
129
|
-
}),
|
|
130
|
-
|
|
129
|
+
}), N = /* @__PURE__ */ new Map(), Se = (e) => {
|
|
130
|
+
N.get(e)?.clear();
|
|
131
131
|
}, we = (e) => {
|
|
132
132
|
const a = window.mo?.user?.id;
|
|
133
133
|
return JSON.stringify(e.params) + ":" + e.url + ":" + a;
|
|
134
|
-
}, be = (e, a) =>
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
const
|
|
138
|
-
let
|
|
134
|
+
}, be = (e, a) => N.get(a)?.get(e), Be = (e, a, l) => {
|
|
135
|
+
N.has(a) || N.set(a, /* @__PURE__ */ new Map()), N.get(a)?.set(e, l);
|
|
136
|
+
}, xe = (e, a, l, t) => {
|
|
137
|
+
const u = P([]), k = P(!1), p = P(0);
|
|
138
|
+
let c = "", n;
|
|
139
139
|
e && !e.params.limit && (e.params.limit = 100);
|
|
140
140
|
const r = async () => {
|
|
141
141
|
if (!e) return;
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
const I = be(
|
|
142
|
+
const y = t ? we(e) : void 0;
|
|
143
|
+
if (y) {
|
|
144
|
+
const I = be(y, e.path);
|
|
145
145
|
if (I)
|
|
146
146
|
return e.abortByFingerprint(), I;
|
|
147
147
|
}
|
|
@@ -156,58 +156,58 @@ const Ce = {
|
|
|
156
156
|
console.warn(`В result[${w}] нет id или name`);
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
|
-
return
|
|
160
|
-
},
|
|
159
|
+
return y && Be(y, e.path, g), g;
|
|
160
|
+
}, f = async (y) => {
|
|
161
161
|
if (!e) return;
|
|
162
|
-
if (
|
|
163
|
-
if (!n ||
|
|
162
|
+
if (y) {
|
|
163
|
+
if (!n || k.value) return;
|
|
164
164
|
e.params.offset = n;
|
|
165
165
|
} else
|
|
166
166
|
e.params.offset = 0;
|
|
167
|
-
a?.(e,
|
|
167
|
+
a?.(e, c), k.value = !0;
|
|
168
168
|
const g = await r();
|
|
169
|
-
|
|
170
|
-
},
|
|
169
|
+
k.value = !1, p.value++, g && (n = g.nextOffset, y ? u.value = u.value.concat(g.result) : u.value = g.result);
|
|
170
|
+
}, i = me(() => f(!1), 200);
|
|
171
171
|
return {
|
|
172
172
|
apiRequest: e,
|
|
173
|
-
items:
|
|
174
|
-
isLoading:
|
|
173
|
+
items: u,
|
|
174
|
+
isLoading: k,
|
|
175
175
|
countLoading: p,
|
|
176
|
-
load:
|
|
177
|
-
setSearchTextAndLoad: (
|
|
176
|
+
load: f,
|
|
177
|
+
setSearchTextAndLoad: (y, g = !0) => {
|
|
178
178
|
if (e) {
|
|
179
|
-
if (
|
|
180
|
-
e.abortByFingerprint(),
|
|
179
|
+
if (y.length < l) {
|
|
180
|
+
e.abortByFingerprint(), u.value = [];
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
|
-
|
|
183
|
+
y === c && u.value.length || (c = y, g ? i() : f(!1));
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
};
|
|
187
|
-
},
|
|
187
|
+
}, re = 0, O = null, ae = (e, a, l = !0) => l && a.id === O ? Array.isArray(e) ? e.some((t) => t.id === a.id && t.name === a.name) : a.name === e.name : Array.isArray(e) ? e.some((t) => t.id === a.id) : a.id === e.id, Oe = (e, a, l) => {
|
|
188
188
|
let t = e.params.filters ?? [];
|
|
189
|
-
t = t.filter((
|
|
190
|
-
}, Me = (e, a, l, t,
|
|
191
|
-
const
|
|
192
|
-
id:
|
|
189
|
+
t = t.filter((u) => u.name !== l), a && t.push(Ce(l, "CONTAINS", [a])), e.changeParams({ filters: t });
|
|
190
|
+
}, Me = (e, a, l, t, u, k, p, c, n, r) => {
|
|
191
|
+
const f = P(""), i = {
|
|
192
|
+
id: re,
|
|
193
193
|
name: he().Common.All
|
|
194
194
|
}, A = () => {
|
|
195
|
-
|
|
196
|
-
},
|
|
197
|
-
const
|
|
198
|
-
return !t &&
|
|
199
|
-
}), w =
|
|
200
|
-
w.value =
|
|
201
|
-
},
|
|
202
|
-
const
|
|
203
|
-
let
|
|
195
|
+
f.value = "";
|
|
196
|
+
}, y = () => !(!r.apiRequest || f.value.length >= n), g = q(() => {
|
|
197
|
+
const o = [];
|
|
198
|
+
return !t && u.value && (typeof u.value == "string" && (i.name = u.value), o.push(i)), l.value?.forEach((L) => o.push({ ...L })), o;
|
|
199
|
+
}), w = P([]), I = () => {
|
|
200
|
+
w.value = z();
|
|
201
|
+
}, z = () => {
|
|
202
|
+
const o = f.value.toLowerCase(), L = Ie(o), D = o.replace(/^https?:\/\/(www\.)?|\/$/g, "");
|
|
203
|
+
let s = [], R;
|
|
204
204
|
const S = [], Q = () => {
|
|
205
|
-
S.at(-1)?.listItemProps?.type === "delimiter" && S.pop(), S.length && (
|
|
205
|
+
S.at(-1)?.listItemProps?.type === "delimiter" && S.pop(), S.length && (R && s.push(R), s.push(...S), S.length = 0);
|
|
206
206
|
};
|
|
207
207
|
for (const C of g.value)
|
|
208
208
|
switch (C.listItemProps?.type) {
|
|
209
209
|
case "title":
|
|
210
|
-
Q(),
|
|
210
|
+
Q(), R = C;
|
|
211
211
|
break;
|
|
212
212
|
case "delimiter":
|
|
213
213
|
if (S.length) {
|
|
@@ -216,30 +216,30 @@ const Ce = {
|
|
|
216
216
|
}
|
|
217
217
|
break;
|
|
218
218
|
default:
|
|
219
|
-
const
|
|
220
|
-
(String(C.id).includes(
|
|
219
|
+
const E = C.name.toLowerCase();
|
|
220
|
+
(String(C.id).includes(o) || E.includes(o) || E.includes(L) || E.includes(D)) && (E === o || E === L ? S.unshift(C) : S.push(C));
|
|
221
221
|
}
|
|
222
|
-
if (Q(),
|
|
223
|
-
!
|
|
222
|
+
if (Q(), s.push(...r.items.value), k.value && f.value && (!p.value || p.value(o)) && // результаты могут быть найдены, но не точные, тогда предложить добавить элемент
|
|
223
|
+
!s.find((C) => C.name.toLowerCase() === o)) {
|
|
224
224
|
const C = {
|
|
225
|
-
id:
|
|
226
|
-
name:
|
|
225
|
+
id: O,
|
|
226
|
+
name: f.value
|
|
227
227
|
};
|
|
228
|
-
|
|
228
|
+
s.push(C);
|
|
229
229
|
}
|
|
230
|
-
return t && (
|
|
231
|
-
}, v = (
|
|
232
|
-
|
|
230
|
+
return t && (s = s.filter((C) => !ae(e.value, C))), s;
|
|
231
|
+
}, v = (o) => {
|
|
232
|
+
o.listItemProps?.type === "title" || o.listItemProps?.type === "delimiter" || (t && Array.isArray(e.value) ? ae(e.value, o) || (e.value = [...e.value, o]) : e.value = o, o.id === O && a("appendItem", o), setTimeout(() => {
|
|
233
233
|
A();
|
|
234
234
|
}));
|
|
235
235
|
};
|
|
236
236
|
if (r.apiRequest) {
|
|
237
|
-
const
|
|
238
|
-
t &&
|
|
237
|
+
const o = [l, r.items];
|
|
238
|
+
t && o.push(e), J(o, () => {
|
|
239
239
|
I();
|
|
240
240
|
});
|
|
241
241
|
} else
|
|
242
|
-
J([e, l,
|
|
242
|
+
J([e, l, f], () => {
|
|
243
243
|
I();
|
|
244
244
|
}, {
|
|
245
245
|
immediate: !0,
|
|
@@ -247,18 +247,18 @@ const Ce = {
|
|
|
247
247
|
deep: 2
|
|
248
248
|
});
|
|
249
249
|
return {
|
|
250
|
-
searchText:
|
|
250
|
+
searchText: f,
|
|
251
251
|
resetSearch: A,
|
|
252
|
-
genIsShort:
|
|
252
|
+
genIsShort: y,
|
|
253
253
|
itemsForShow: w,
|
|
254
254
|
selectItem: v,
|
|
255
255
|
selectNextItem: () => {
|
|
256
256
|
if (Array.isArray(e.value)) return;
|
|
257
|
-
const
|
|
258
|
-
e.value = { ...
|
|
257
|
+
const o = w.value.filter((s) => !["title", "delimiter"].includes(s.listItemProps?.type ?? "")), D = (o.findIndex((s) => s.id === e.value.id) + 1) % o.length;
|
|
258
|
+
e.value = { ...o[D] };
|
|
259
259
|
},
|
|
260
|
-
deleteItemByItem: async (
|
|
261
|
-
Array.isArray(e.value) && (e.value = e.value.filter((
|
|
260
|
+
deleteItemByItem: async (o) => {
|
|
261
|
+
Array.isArray(e.value) && (e.value = e.value.filter((L) => L.id !== o.id || L.name !== o.name));
|
|
262
262
|
}
|
|
263
263
|
};
|
|
264
264
|
}, Pe = {
|
|
@@ -284,12 +284,14 @@ const Ce = {
|
|
|
284
284
|
openByFocusInput: { type: Boolean, default: void 0 },
|
|
285
285
|
searchType: { default: "popup" },
|
|
286
286
|
placeholder: {},
|
|
287
|
+
hasCloserBtn: { type: Boolean },
|
|
287
288
|
api: {},
|
|
288
289
|
apiSetSearchParams: {},
|
|
289
290
|
minLength: { default: 0 },
|
|
290
291
|
useCache: { type: Boolean },
|
|
291
292
|
appendSearchToResult: { type: Boolean },
|
|
292
293
|
appendSearchToResultCond: {},
|
|
294
|
+
closeAfterAppend: { type: Boolean },
|
|
293
295
|
multiselect: { type: Boolean },
|
|
294
296
|
useAllItem: { type: [Boolean, String] },
|
|
295
297
|
addChanger: { type: Boolean },
|
|
@@ -300,9 +302,9 @@ const Ce = {
|
|
|
300
302
|
modelValue: { required: !0 },
|
|
301
303
|
modelModifiers: {}
|
|
302
304
|
}),
|
|
303
|
-
emits: /* @__PURE__ */ U(["appendItem"], ["update:modelValue"]),
|
|
305
|
+
emits: /* @__PURE__ */ U(["appendItem", "open"], ["update:modelValue"]),
|
|
304
306
|
setup(e, { expose: a, emit: l }) {
|
|
305
|
-
const t = e,
|
|
307
|
+
const t = e, u = se(e, "modelValue"), k = l;
|
|
306
308
|
a({
|
|
307
309
|
/**
|
|
308
310
|
* Сброс локального кеша и кеша api
|
|
@@ -310,32 +312,32 @@ const Ce = {
|
|
|
310
312
|
* @param resetAPICache - Сбросить API кеш, по умолчанию не сбрасывается. Для случаев, когда загруженные данные становятся неактуальными
|
|
311
313
|
*/
|
|
312
314
|
resetCache: (v = !1) => {
|
|
313
|
-
|
|
315
|
+
c.apiRequest && (v && Se(c.apiRequest.path), c.items.value = [], c.countLoading.value = 0, c.apiRequest.params.offset = 0, requestAnimationFrame(() => {
|
|
314
316
|
n.itemsForShow.value = [];
|
|
315
|
-
}),
|
|
317
|
+
}), i()?.elPopup && c.setSearchTextAndLoad(n.searchText.value));
|
|
316
318
|
}
|
|
317
319
|
});
|
|
318
|
-
const p =
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
const p = q(() => t.searchType === "inline" && t.multiselect || t.searchType === "inline" && j.state.isMobile ? "popup" : t.searchType), c = xe(t.api, t.apiSetSearchParams, t.minLength, t.useCache), n = Me(
|
|
321
|
+
u,
|
|
322
|
+
k,
|
|
323
|
+
K(t, "items"),
|
|
322
324
|
t.multiselect,
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
325
|
+
K(t, "useAllItem"),
|
|
326
|
+
K(t, "appendSearchToResult"),
|
|
327
|
+
K(t, "appendSearchToResultCond"),
|
|
326
328
|
p,
|
|
327
329
|
t.minLength,
|
|
328
|
-
|
|
329
|
-
), r =
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
c
|
|
331
|
+
), r = q(() => t.buttonProps ? "TopButton" : p.value === "inline" ? "TopInput" : "div"), f = P(null), i = () => f.value?.popup;
|
|
332
|
+
c.apiRequest && J(n.searchText, () => {
|
|
333
|
+
c.setSearchTextAndLoad(n.searchText.value);
|
|
332
334
|
});
|
|
333
|
-
const A =
|
|
335
|
+
const A = q(() => Array.isArray(u.value) || t.multiselect || !t.selectedAsPlaceholder && p.value !== "inline" ? t.placeholder : u.value?.name || t.placeholder), y = (v) => {
|
|
334
336
|
let m = !1;
|
|
335
337
|
switch (v.key) {
|
|
336
338
|
case "Delete":
|
|
337
339
|
case "Backspace":
|
|
338
|
-
Array.isArray(
|
|
340
|
+
Array.isArray(u.value) && (v.preventDefault(), v.stopPropagation(), u.value.pop());
|
|
339
341
|
break;
|
|
340
342
|
case "ArrowUp":
|
|
341
343
|
case "ArrowRight":
|
|
@@ -350,32 +352,32 @@ const Ce = {
|
|
|
350
352
|
break;
|
|
351
353
|
}
|
|
352
354
|
const F = v.key.length === 1 && !v.ctrlKey && !v.metaKey;
|
|
353
|
-
(p.value === "popup" || p.value === "inline") && F && (m = !0),
|
|
355
|
+
(p.value === "popup" || p.value === "inline") && F && (m = !0), i()?.elPopup && (m = !1), m && (p.value === "popup" && (v.preventDefault(), v.stopPropagation(), F && (n.searchText.value || (n.searchText.value = v.key))), v.currentTarget?.click());
|
|
354
356
|
}, g = (v) => {
|
|
355
357
|
v.preventDefault(), n.selectNextItem();
|
|
356
358
|
}, w = () => {
|
|
357
|
-
|
|
359
|
+
c.apiRequest && c.setSearchTextAndLoad(n.searchText.value, !1), k("open");
|
|
358
360
|
}, I = () => {
|
|
359
361
|
p.value === "popup" && n.searchText.value && n.resetSearch();
|
|
360
|
-
},
|
|
362
|
+
}, z = (v) => {
|
|
361
363
|
const m = v.target;
|
|
362
|
-
m.scrollTop / (m.scrollHeight - m.offsetHeight) > 0.8 &&
|
|
364
|
+
m.scrollTop / (m.scrollHeight - m.offsetHeight) > 0.8 && c.load(!0);
|
|
363
365
|
};
|
|
364
366
|
return (v, m) => {
|
|
365
|
-
const F =
|
|
366
|
-
return
|
|
367
|
+
const F = Z("TopButton"), o = Z("TopLoadbar"), L = _("top-focus"), D = _("top-shortcut");
|
|
368
|
+
return h(), b(d(ge), {
|
|
367
369
|
ref_key: "popupRef",
|
|
368
|
-
ref:
|
|
369
|
-
onOpen: m[3] || (m[3] = (
|
|
370
|
-
onClose: m[4] || (m[4] = (
|
|
371
|
-
onScrollContentList: m[5] || (m[5] = (
|
|
370
|
+
ref: f,
|
|
371
|
+
onOpen: m[3] || (m[3] = (s) => w()),
|
|
372
|
+
onClose: m[4] || (m[4] = (s) => I()),
|
|
373
|
+
onScrollContentList: m[5] || (m[5] = (s) => d(c) ? z(s) : void 0),
|
|
372
374
|
notch: !1,
|
|
373
375
|
transitionDuration: 0,
|
|
374
376
|
openByFocusInput: p.value === "inline" && (e.openByFocusInput ?? !0),
|
|
375
|
-
disabled: p.value === "inline" &&
|
|
377
|
+
disabled: p.value === "inline" && d(n).genIsShort()
|
|
376
378
|
}, Y({
|
|
377
379
|
opener: B(() => [
|
|
378
|
-
ee((
|
|
380
|
+
ee((h(), b(pe(r.value), W(e.buttonProps, {
|
|
379
381
|
class: {
|
|
380
382
|
"top-selector2": !0,
|
|
381
383
|
"top-selector2-multiselect": e.multiselect,
|
|
@@ -389,102 +391,111 @@ const Ce = {
|
|
|
389
391
|
},
|
|
390
392
|
icon: e.icon,
|
|
391
393
|
tabindex: "0",
|
|
392
|
-
onKeydown:
|
|
393
|
-
onBlur: m[0] || (m[0] = (
|
|
394
|
+
onKeydown: y,
|
|
395
|
+
onBlur: m[0] || (m[0] = (s) => p.value === "inline" && d(n).resetSearch()),
|
|
394
396
|
placeholder: A.value,
|
|
395
397
|
title: e.title,
|
|
396
398
|
captionType: p.value === "inline" && e.title !== void 0 ? "top" : void 0,
|
|
397
|
-
modelValue:
|
|
398
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
399
|
+
modelValue: d(n).searchText.value,
|
|
400
|
+
"onUpdate:modelValue": m[1] || (m[1] = (s) => d(n).searchText.value = s)
|
|
399
401
|
}), {
|
|
400
402
|
default: B(() => [
|
|
401
|
-
e.multiselect ? (
|
|
402
|
-
(
|
|
403
|
-
id:
|
|
404
|
-
name:
|
|
405
|
-
onDelete:
|
|
403
|
+
e.multiselect ? (h(), T("div", Pe, [
|
|
404
|
+
(h(!0), T(V, null, H(u.value, (s) => (h(), b(Le, {
|
|
405
|
+
id: s.id,
|
|
406
|
+
name: s.name,
|
|
407
|
+
onDelete: d(n).deleteItemByItem
|
|
406
408
|
}, null, 8, ["id", "name", "onDelete"]))), 256))
|
|
407
|
-
])) :
|
|
408
|
-
p.value !== "inline" && !e.multiselect ? (
|
|
409
|
-
e.multiselect && !
|
|
410
|
-
e.addChanger && !e.buttonProps && !e.multiselect &&
|
|
409
|
+
])) : x("", !0),
|
|
410
|
+
p.value !== "inline" && !e.multiselect ? (h(), T("span", $e, M(Array.isArray(u.value) ? "" : u.value.name), 1)) : x("", !0),
|
|
411
|
+
e.multiselect && !u.value.length ? (h(), T("span", Fe, M(A.value), 1)) : x("", !0),
|
|
412
|
+
e.addChanger && !e.buttonProps && !e.multiselect && d(n).itemsForShow.value.length > 1 && !e.disabled ? (h(), T("span", {
|
|
411
413
|
key: 3,
|
|
412
414
|
class: "top-changer top-changer-selector",
|
|
413
415
|
"data-top-popup-disabled": "true",
|
|
414
416
|
onClick: g
|
|
415
|
-
})) :
|
|
417
|
+
})) : x("", !0)
|
|
416
418
|
]),
|
|
417
419
|
_: 1
|
|
418
420
|
}, 16, ["class", "icon", "placeholder", "title", "captionType", "modelValue"])), [
|
|
419
421
|
[
|
|
420
|
-
|
|
422
|
+
L,
|
|
421
423
|
e.isError,
|
|
422
424
|
void 0,
|
|
423
425
|
{ onupdate: !0 }
|
|
424
426
|
],
|
|
425
|
-
[
|
|
427
|
+
[D, e.openerShortcut]
|
|
426
428
|
])
|
|
427
429
|
]),
|
|
428
430
|
contentList: B(() => [
|
|
429
|
-
(
|
|
430
|
-
key:
|
|
431
|
+
(h(!0), T(V, null, H(d(n).itemsForShow.value, (s) => (h(), b(d(le), W({
|
|
432
|
+
key: s.id ?? void 0,
|
|
431
433
|
class: {
|
|
432
|
-
"top-active": !Array.isArray(
|
|
433
|
-
"top-selector2_item-all":
|
|
434
|
-
"top-selector2_item-new":
|
|
434
|
+
"top-active": !Array.isArray(u.value) && !e.multiselect && u.value.id === s.id && u.value.name === s.name,
|
|
435
|
+
"top-selector2_item-all": s.id === d(re),
|
|
436
|
+
"top-selector2_item-new": s.id === d(O)
|
|
435
437
|
}
|
|
436
|
-
}, { ref_for: !0 },
|
|
437
|
-
closeByClick: !e.multiselect ||
|
|
438
|
-
onClick: (
|
|
438
|
+
}, { ref_for: !0 }, s.listItemProps, {
|
|
439
|
+
closeByClick: e.closeAfterAppend ?? (!e.multiselect || d(j).state.isMobile),
|
|
440
|
+
onClick: (R) => d(n).selectItem(s)
|
|
439
441
|
}), {
|
|
440
442
|
default: B(() => [
|
|
441
|
-
v.$slots.item ?
|
|
443
|
+
v.$slots.item ? fe(v.$slots, "item", {
|
|
442
444
|
key: 0,
|
|
443
|
-
item:
|
|
444
|
-
}) : (
|
|
445
|
-
|
|
445
|
+
item: s
|
|
446
|
+
}) : (h(), T(V, { key: 1 }, [
|
|
447
|
+
$(M(s.name), 1)
|
|
446
448
|
], 64))
|
|
447
449
|
]),
|
|
448
450
|
_: 2
|
|
449
451
|
}, 1040, ["class", "closeByClick", "onClick"]))), 128)),
|
|
450
|
-
!
|
|
452
|
+
!d(n).itemsForShow.value.length && !d(n).genIsShort() ? (h(), b(d(le), {
|
|
451
453
|
key: 0,
|
|
452
454
|
type: "regular"
|
|
453
455
|
}, {
|
|
454
456
|
default: B(() => [
|
|
455
|
-
!c
|
|
456
|
-
|
|
457
|
-
], 64)) : (
|
|
457
|
+
!d(c).isLoading.value || d(c).countLoading.value ? (h(), T(V, { key: 0 }, [
|
|
458
|
+
$(M(v.$i18n.Common.No_results), 1)
|
|
459
|
+
], 64)) : (h(), b(d(ye), {
|
|
458
460
|
key: 1,
|
|
459
461
|
type: "circles"
|
|
460
462
|
}))
|
|
461
463
|
]),
|
|
462
464
|
_: 1
|
|
463
|
-
})) :
|
|
464
|
-
c
|
|
465
|
+
})) : x("", !0),
|
|
466
|
+
d(c).countLoading.value && d(c).isLoading.value && p.value === "inline" ? (h(), b(o, { key: 1 })) : x("", !0)
|
|
465
467
|
]),
|
|
466
468
|
_: 2
|
|
467
469
|
}, [
|
|
468
470
|
p.value === "popup" ? {
|
|
469
471
|
name: "widget",
|
|
470
472
|
fn: B(() => [
|
|
471
|
-
|
|
472
|
-
ee(ne(
|
|
473
|
+
oe("div", De, [
|
|
474
|
+
ee(ne(d(Ae), {
|
|
473
475
|
title: "Поиск",
|
|
474
476
|
icon: "",
|
|
475
|
-
modelValue:
|
|
476
|
-
"onUpdate:modelValue": m[2] || (m[2] = (
|
|
477
|
-
isLoading: !!c
|
|
477
|
+
modelValue: d(n).searchText.value,
|
|
478
|
+
"onUpdate:modelValue": m[2] || (m[2] = (s) => d(n).searchText.value = s),
|
|
479
|
+
isLoading: !!d(c).countLoading.value && d(c).isLoading.value,
|
|
478
480
|
placeholder: A.value
|
|
479
481
|
}, null, 8, ["modelValue", "isLoading", "placeholder"]), [
|
|
480
482
|
[
|
|
481
|
-
|
|
482
|
-
|
|
483
|
+
L,
|
|
484
|
+
u.value,
|
|
483
485
|
void 0,
|
|
484
486
|
{ onupdate: !0 }
|
|
485
487
|
]
|
|
486
488
|
]),
|
|
487
|
-
|
|
489
|
+
e.hasCloserBtn && !v.$core.state.isMobile ? (h(), b(F, {
|
|
490
|
+
key: 0,
|
|
491
|
+
class: "closer",
|
|
492
|
+
color: "theme"
|
|
493
|
+
}, {
|
|
494
|
+
default: B(() => [
|
|
495
|
+
$(M(v.$i18n.Common.Cancel), 1)
|
|
496
|
+
]),
|
|
497
|
+
_: 1
|
|
498
|
+
})) : x("", !0)
|
|
488
499
|
])
|
|
489
500
|
]),
|
|
490
501
|
key: "0"
|
|
@@ -494,10 +505,10 @@ const Ce = {
|
|
|
494
505
|
}
|
|
495
506
|
});
|
|
496
507
|
export {
|
|
497
|
-
|
|
508
|
+
O as I,
|
|
498
509
|
ze as _,
|
|
499
510
|
We as a,
|
|
500
511
|
Oe as b,
|
|
501
|
-
|
|
512
|
+
re as c
|
|
502
513
|
};
|
|
503
|
-
//# sourceMappingURL=policy.vue_vue_type_style_index_0_lang-
|
|
514
|
+
//# sourceMappingURL=policy.vue_vue_type_style_index_0_lang-RJnqOsjD.es.js.map
|