@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.
Files changed (30) hide show
  1. 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
  2. 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
  3. package/.chunks/policy.vue_vue_type_style_index_0_lang-dgZjCI-7.amd.js +2 -0
  4. 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
  5. package/formsExt/formsExt.amd.js +1 -1
  6. package/formsExt/formsExt.amd.js.map +1 -1
  7. package/formsExt/formsExt.js +33 -33
  8. package/formsExt/formsExt.js.map +1 -1
  9. package/icomoon/Read Me.txt +1 -1
  10. package/icomoon/Topvisor icons.json +361 -131
  11. package/icomoon/demo.html +141 -1
  12. package/icomoon/fonts/Topvisor-2.eot +0 -0
  13. package/icomoon/fonts/Topvisor-2.svg +11 -1
  14. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  15. package/icomoon/fonts/Topvisor-2.woff +0 -0
  16. package/icomoon/selection.json +1 -1
  17. package/icomoon/style.css +35 -5
  18. package/package.json +1 -1
  19. package/project/project.amd.js +1 -1
  20. package/project/project.amd.js.map +1 -1
  21. package/project/project.js +806 -759
  22. package/project/project.js.map +1 -1
  23. package/src/components/formsExt/selector2/selector2.vue.d.ts +2 -0
  24. package/src/components/formsExt/selector2/types.d.ts +18 -4
  25. package/src/components/project/groupSelector/groups/groups.vue.d.ts +7 -1
  26. package/src/components/project/projectSelector/cache.d.ts +4 -0
  27. package/src/components/project/projectSelector/projectSelector.vue.d.ts +25 -17
  28. package/src/components/project/projectSelector/types.d.ts +1 -2
  29. package/src/components/project/projectSelector/utils.d.ts +7 -3
  30. 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 $, onMounted as ie, onUpdated as ue, createElementBlock as L, openBlock as y, normalizeClass as ce, createCommentVNode as M, Fragment as E, renderList as H, createBlock as x, mergeProps as q, createSlots as Y, withCtx as B, createTextVNode as N, toDisplayString as P, createVNode as ne, createElementVNode as re, withModifiers as de, computed as K, watch as J, toRef as R, resolveComponent as fe, resolveDirective as Z, unref as c, renderSlot as _, withDirectives as ee, resolveDynamicComponent as pe } from "vue";
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 ke } from "./field-CyyFzM-Y.es.js";
12
- const Ce = {
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 i = (r) => Array.isArray(l.value) ? l.value.includes(r.value) : r.value === l.value, T = (r, d = !1) => {
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 o = l.value.slice();
37
- if (d) {
38
- o.length || (o = a.items.map((h) => h.value));
39
- const A = o.indexOf(r.value);
40
- A === -1 ? o.push(r.value) : o.splice(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
- o.length === 1 && o[0] === r.value ? o = [] : o = [r.value];
43
- !a.canBeEmptyMultiple && !o.length && (o = [r.value]), l.value = o;
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 d = r.deltaY > 0 ? 30 : -30;
51
- t.value.scrollLeft = t.value.scrollLeft + d;
52
- }, u = (r = !0) => {
53
- const d = t.value.querySelector(".top-active");
54
- if (!d) return;
55
- const o = 24, A = d.offsetLeft - t.value.offsetLeft - o, h = d.offsetLeft - t.value.offsetLeft + d.clientWidth + o, g = t.value.scrollLeft, w = t.value.clientWidth + t.value.scrollLeft;
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), h > w && (I = h - 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" }));
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(() => u(!1)), ue(() => u(!0)), (r, d) => (y(), L("div", {
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
- (y(!0), L(E, null, H(e.items, (o) => (y(), x(te, q({ ref_for: !0 }, o, {
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) => T(o, A.ctrlKey || A.metaKey),
81
- isActive: i(o)
80
+ onClick: (A) => k(i, A.ctrlKey || A.metaKey),
81
+ isActive: u(i)
82
82
  }), Y({ _: 2 }, [
83
- o.content ? {
83
+ i.content ? {
84
84
  name: "default",
85
85
  fn: B(() => [
86
- N(P(o.content), 1)
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 ? (y(), L("div", Ce, [
92
- ne(te, q(e.selectAllItem, {
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: d[0] || (d[0] = (o) => n()),
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
- N(P(e.selectAllItem.content), 1)
102
+ $(M(e.selectAllItem.content), 1)
103
103
  ]),
104
104
  key: "0"
105
105
  } : void 0
106
106
  ]), 1040, ["isActive"])
107
- ])) : M("", !0)
107
+ ])) : x("", !0)
108
108
  ], 34));
109
109
  }
110
- }), Le = { class: "top-selector2_itemMulti top-ellipsis" }, Se = /* @__PURE__ */ G({
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) => (y(), L("div", Le, [
119
- N(P(e.name) + " ", 1),
120
- re("span", {
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
- }), V = /* @__PURE__ */ new Map(), Te = (e) => {
130
- V.get(e)?.clear();
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) => V.get(a)?.get(e), xe = (e, a, l) => {
135
- V.has(a) || V.set(a, /* @__PURE__ */ new Map()), V.get(a)?.set(e, l);
136
- }, Be = (e, a, l, t) => {
137
- const i = $([]), T = $(!1), p = $(0);
138
- let u = "", n;
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 h = t ? we(e) : void 0;
143
- if (h) {
144
- const I = be(h, e.path);
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 h && xe(h, e.path, g), g;
160
- }, d = async (h) => {
159
+ return y && Be(y, e.path, g), g;
160
+ }, f = async (y) => {
161
161
  if (!e) return;
162
- if (h) {
163
- if (!n || T.value) return;
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, u), T.value = !0;
167
+ a?.(e, c), k.value = !0;
168
168
  const g = await r();
169
- T.value = !1, p.value++, g && (n = g.nextOffset, h ? i.value = i.value.concat(g.result) : i.value = g.result);
170
- }, o = me(() => d(!1), 200);
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: i,
174
- isLoading: T,
173
+ items: u,
174
+ isLoading: k,
175
175
  countLoading: p,
176
- load: d,
177
- setSearchTextAndLoad: (h, g = !0) => {
176
+ load: f,
177
+ setSearchTextAndLoad: (y, g = !0) => {
178
178
  if (e) {
179
- if (h.length < l) {
180
- e.abortByFingerprint(), i.value = [];
179
+ if (y.length < l) {
180
+ e.abortByFingerprint(), u.value = [];
181
181
  return;
182
182
  }
183
- h === u && i.value.length || (u = h, g ? o() : d(!1));
183
+ y === c && u.value.length || (c = y, g ? i() : f(!1));
184
184
  }
185
185
  }
186
186
  };
187
- }, oe = 0, W = null, ae = (e, a, l = !0) => l && a.id === W ? 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) => {
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((i) => i.name !== l), a && t.push(ke(l, "CONTAINS", [a])), e.changeParams({ filters: t });
190
- }, Me = (e, a, l, t, i, T, p, u, n, r) => {
191
- const d = $(""), o = {
192
- id: oe,
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
- d.value = "";
196
- }, h = () => !(!r.apiRequest || d.value.length >= n), g = K(() => {
197
- const s = [];
198
- return !t && i.value && (typeof i.value == "string" && (o.name = i.value), s.push(o)), l.value?.forEach((b) => s.push({ ...b })), s;
199
- }), w = $([]), I = () => {
200
- w.value = O();
201
- }, O = () => {
202
- const s = d.value.toLowerCase(), b = Ie(s), f = s.replace(/^https?:\/\/(www\.)?|\/$/g, "");
203
- let k = [], z;
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 && (z && k.push(z), k.push(...S), S.length = 0);
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(), z = C;
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 D = C.name.toLowerCase();
220
- (String(C.id).includes(s) || D.includes(s) || D.includes(b) || D.includes(f)) && (D === s || D === b ? S.unshift(C) : S.push(C));
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(), k.push(...r.items.value), T.value && d.value && (!p.value || p.value(s)) && // результаты могут быть найдены, но не точные, тогда предложить добавить элемент
223
- !k.find((C) => C.name.toLowerCase() === s)) {
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: W,
226
- name: d.value
225
+ id: O,
226
+ name: f.value
227
227
  };
228
- k.push(C);
228
+ s.push(C);
229
229
  }
230
- return t && (k = k.filter((C) => !ae(e.value, C))), k;
231
- }, v = (s) => {
232
- s.listItemProps?.type === "title" || s.listItemProps?.type === "delimiter" || (t && Array.isArray(e.value) ? ae(e.value, s) || (e.value = [...e.value, s]) : e.value = s, s.id === W && a("appendItem", s), setTimeout(() => {
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 s = [l, r.items];
238
- t && s.push(e), J(s, () => {
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, d], () => {
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: d,
250
+ searchText: f,
251
251
  resetSearch: A,
252
- genIsShort: h,
252
+ genIsShort: y,
253
253
  itemsForShow: w,
254
254
  selectItem: v,
255
255
  selectNextItem: () => {
256
256
  if (Array.isArray(e.value)) return;
257
- const s = w.value.filter((k) => !["title", "delimiter"].includes(k.listItemProps?.type ?? "")), f = (s.findIndex((k) => k.id === e.value.id) + 1) % s.length;
258
- e.value = { ...s[f] };
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 (s) => {
261
- Array.isArray(e.value) && (e.value = e.value.filter((b) => b.id !== s.id || b.name !== s.name));
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, i = se(e, "modelValue"), T = l;
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
- u.apiRequest && (v && Te(u.apiRequest.path), u.items.value = [], u.countLoading.value = 0, u.apiRequest.params.offset = 0, requestAnimationFrame(() => {
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
- }), o()?.elPopup && u.setSearchTextAndLoad(n.searchText.value));
317
+ }), i()?.elPopup && c.setSearchTextAndLoad(n.searchText.value));
316
318
  }
317
319
  });
318
- const p = K(() => t.searchType === "inline" && t.multiselect || t.searchType === "inline" && j.state.isMobile ? "popup" : t.searchType), u = Be(t.api, t.apiSetSearchParams, t.minLength, t.useCache), n = Me(
319
- i,
320
- T,
321
- R(t, "items"),
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
- R(t, "useAllItem"),
324
- R(t, "appendSearchToResult"),
325
- R(t, "appendSearchToResultCond"),
325
+ K(t, "useAllItem"),
326
+ K(t, "appendSearchToResult"),
327
+ K(t, "appendSearchToResultCond"),
326
328
  p,
327
329
  t.minLength,
328
- u
329
- ), r = K(() => t.buttonProps ? "TopButton" : p.value === "inline" ? "TopInput" : "div"), d = $(null), o = () => d.value?.popup;
330
- u.apiRequest && J(n.searchText, () => {
331
- u.setSearchTextAndLoad(n.searchText.value);
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 = K(() => Array.isArray(i.value) || t.multiselect || !t.selectedAsPlaceholder && p.value !== "inline" ? t.placeholder : i.value?.name || t.placeholder), h = (v) => {
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(i.value) && (v.preventDefault(), v.stopPropagation(), i.value.pop());
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), o()?.elPopup && (m = !1), m && (p.value === "popup" && (v.preventDefault(), v.stopPropagation(), F && (n.searchText.value || (n.searchText.value = v.key))), v.currentTarget?.click());
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
- u.apiRequest && u.setSearchTextAndLoad(n.searchText.value, !1);
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
- }, O = (v) => {
362
+ }, z = (v) => {
361
363
  const m = v.target;
362
- m.scrollTop / (m.scrollHeight - m.offsetHeight) > 0.8 && u.load(!0);
364
+ m.scrollTop / (m.scrollHeight - m.offsetHeight) > 0.8 && c.load(!0);
363
365
  };
364
366
  return (v, m) => {
365
- const F = fe("TopLoadbar"), s = Z("top-focus"), b = Z("top-shortcut");
366
- return y(), x(c(ge), {
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: d,
369
- onOpen: m[3] || (m[3] = (f) => w()),
370
- onClose: m[4] || (m[4] = (f) => I()),
371
- onScrollContentList: m[5] || (m[5] = (f) => c(u) ? O(f) : void 0),
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" && c(n).genIsShort()
377
+ disabled: p.value === "inline" && d(n).genIsShort()
376
378
  }, Y({
377
379
  opener: B(() => [
378
- ee((y(), x(pe(r.value), q(e.buttonProps, {
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: h,
393
- onBlur: m[0] || (m[0] = (f) => p.value === "inline" && c(n).resetSearch()),
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: c(n).searchText.value,
398
- "onUpdate:modelValue": m[1] || (m[1] = (f) => c(n).searchText.value = f)
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 ? (y(), L("div", Pe, [
402
- (y(!0), L(E, null, H(i.value, (f) => (y(), x(Se, {
403
- id: f.id,
404
- name: f.name,
405
- onDelete: c(n).deleteItemByItem
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
- ])) : M("", !0),
408
- p.value !== "inline" && !e.multiselect ? (y(), L("span", $e, P(Array.isArray(i.value) ? "" : i.value.name), 1)) : M("", !0),
409
- e.multiselect && !i.value.length ? (y(), L("span", Fe, P(A.value), 1)) : M("", !0),
410
- e.addChanger && !e.buttonProps && !e.multiselect && c(n).itemsForShow.value.length > 1 && !e.disabled ? (y(), L("span", {
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
- })) : M("", !0)
417
+ })) : x("", !0)
416
418
  ]),
417
419
  _: 1
418
420
  }, 16, ["class", "icon", "placeholder", "title", "captionType", "modelValue"])), [
419
421
  [
420
- s,
422
+ L,
421
423
  e.isError,
422
424
  void 0,
423
425
  { onupdate: !0 }
424
426
  ],
425
- [b, e.openerShortcut]
427
+ [D, e.openerShortcut]
426
428
  ])
427
429
  ]),
428
430
  contentList: B(() => [
429
- (y(!0), L(E, null, H(c(n).itemsForShow.value, (f) => (y(), x(c(le), q({
430
- key: f.id ?? void 0,
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(i.value) && !e.multiselect && i.value.id === f.id && i.value.name === f.name,
433
- "top-selector2_item-all": f.id === c(oe),
434
- "top-selector2_item-new": f.id === c(W)
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 }, f.listItemProps, {
437
- closeByClick: !e.multiselect || c(j).state.isMobile,
438
- onClick: (k) => c(n).selectItem(f)
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 ? _(v.$slots, "item", {
443
+ v.$slots.item ? fe(v.$slots, "item", {
442
444
  key: 0,
443
- item: f
444
- }) : (y(), L(E, { key: 1 }, [
445
- N(P(f.name), 1)
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
- !c(n).itemsForShow.value.length && !c(n).genIsShort() ? (y(), x(c(le), {
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(u).isLoading.value || c(u).countLoading.value ? (y(), L(E, { key: 0 }, [
456
- N(P(v.$i18n.Common.No_results), 1)
457
- ], 64)) : (y(), x(c(ye), {
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
- })) : M("", !0),
464
- c(u).countLoading.value && c(u).isLoading.value && p.value === "inline" ? (y(), x(F, { key: 1 })) : M("", !0)
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
- re("div", De, [
472
- ee(ne(c(Ae), {
473
+ oe("div", De, [
474
+ ee(ne(d(Ae), {
473
475
  title: "Поиск",
474
476
  icon: "",
475
- modelValue: c(n).searchText.value,
476
- "onUpdate:modelValue": m[2] || (m[2] = (f) => c(n).searchText.value = f),
477
- isLoading: !!c(u).countLoading.value && c(u).isLoading.value,
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
- s,
482
- i.value,
483
+ L,
484
+ u.value,
483
485
  void 0,
484
486
  { onupdate: !0 }
485
487
  ]
486
488
  ]),
487
- _(v.$slots, "widgetAction")
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
- W as I,
508
+ O as I,
498
509
  ze as _,
499
510
  We as a,
500
511
  Oe as b,
501
- oe as c
512
+ re as c
502
513
  };
503
- //# sourceMappingURL=policy.vue_vue_type_style_index_0_lang-ClaW4X74.es.js.map
514
+ //# sourceMappingURL=policy.vue_vue_type_style_index_0_lang-RJnqOsjD.es.js.map