@topvisor/ui 1.0.18-top-info-4 → 1.0.18-ux-5

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.
@@ -1,12 +1,12 @@
1
- import { Core as Z } from "../core/app.js";
2
- import { defineComponent as _, ref as V, computed as N, openBlock as c, createElementBlock as v, normalizeClass as C, toDisplayString as w, createCommentVNode as A, createElementVNode as E, createVNode as F, withKeys as K, withModifiers as B, createBlock as S, withCtx as k, createTextVNode as L, watch as I, toRef as x, mergeProps as R, mergeModels as z, useModel as Y, Fragment as O, renderList as G, withDirectives as j, vModelRadio as ee, resolveDirective as te, unref as M, renderSlot as D } from "vue";
3
- import { x as oe, _ as H, c as le, s as ae, a as se, C as ne } from "../.chunks/forms-BeCSWhdZ.es.js";
4
- import { invertKeyboardLayout as re } from "../utils/keyboard.js";
5
- import { TopPopup as ie, TopPopupWidgetInput as ue, TopPopupListItem as X } from "../popup/popup.js";
6
- import { _ as de } from "../.chunks/menu.vue_vue_type_style_index_0_lang-BNzX8C8v.es.js";
7
- const q = ["../assets/formsExt.css"].map((n) => import.meta.resolve(n));
8
- Z.insertCSSLinkToPage(q, !0);
9
- const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
1
+ import { Core as q } from "../core/app.js";
2
+ import { defineComponent as L, ref as V, computed as z, openBlock as p, createElementBlock as v, normalizeClass as C, toDisplayString as w, createCommentVNode as A, createElementVNode as _, createVNode as R, withKeys as E, withModifiers as S, createBlock as $, withCtx as k, createTextVNode as B, watch as I, toRef as ee, mergeProps as X, mergeModels as G, useModel as j, Fragment as N, renderList as D, withDirectives as Q, vModelRadio as te, resolveDirective as oe, unref as O, renderSlot as H } from "vue";
3
+ import { x as le, _ as F, c as ae, s as se, a as ne, C as re } from "../.chunks/forms-BeCSWhdZ.es.js";
4
+ import { invertKeyboardLayout as ie } from "../utils/keyboard.js";
5
+ import { TopPopup as ue, TopPopupWidgetInput as de, TopPopupListItem as Y } from "../popup/popup.js";
6
+ import { _ as pe } from "../.chunks/menu.vue_vue_type_style_index_0_lang-BNzX8C8v.es.js";
7
+ const x = ["../assets/formsExt.css"].map((n) => import.meta.resolve(n));
8
+ q.insertCSSLinkToPage(x, !0);
9
+ const ce = { class: "top-editArea_footer" }, me = /* @__PURE__ */ L({
10
10
  __name: "editArea",
11
11
  props: {
12
12
  defaultValue: { default: "" },
@@ -30,38 +30,38 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
30
30
  },
31
31
  emits: ["submit", "close", "clickOnTitle"],
32
32
  setup(n, { emit: a }) {
33
- const e = n, o = a, f = V(e.defaultValue), y = V(e.isFocused), r = N(() => f.value !== e.defaultValue), u = N(() => e.attachToKeyboard ? "" : e.forceShowCloseBtn && !r.value ? e.closeText : e.cancelText), p = (i) => {
34
- o("submit", i), f.value = e.defaultValue;
33
+ const e = n, l = a, f = V(e.defaultValue), y = V(e.isFocused), u = z(() => f.value !== e.defaultValue), c = z(() => e.attachToKeyboard ? "" : e.forceShowCloseBtn && !u.value ? e.closeText : e.cancelText), r = (i) => {
34
+ l("submit", i), f.value = e.defaultValue;
35
35
  }, h = () => {
36
- if (e.forceShowCloseBtn && !r.value) {
37
- o("close");
36
+ if (e.forceShowCloseBtn && !u.value) {
37
+ l("close");
38
38
  return;
39
39
  }
40
40
  f.value = e.defaultValue;
41
- }, b = () => {
42
- e.attachToKeyboard && o("clickOnTitle");
41
+ }, T = () => {
42
+ e.attachToKeyboard && l("clickOnTitle");
43
43
  };
44
- return (i, l) => (c(), v("div", {
44
+ return (i, o) => (p(), v("div", {
45
45
  class: C({
46
46
  "top-editArea": !0,
47
47
  "top-editArea-attachedToKeyboard": i.attachToKeyboard
48
48
  })
49
49
  }, [
50
- i.title ? (c(), v("div", {
50
+ i.title ? (p(), v("div", {
51
51
  key: 0,
52
52
  class: "top-editArea_title",
53
- onClick: l[0] || (l[0] = (g) => b())
53
+ onClick: o[0] || (o[0] = (g) => T())
54
54
  }, w(i.title), 1)) : A("", !0),
55
- E("div", {
55
+ _("div", {
56
56
  class: C({
57
57
  "top-editArea_form": !0,
58
58
  "top-error": i.isError,
59
59
  "top-focus": y.value
60
60
  })
61
61
  }, [
62
- F(oe, {
62
+ R(le, {
63
63
  modelValue: f.value,
64
- "onUpdate:modelValue": l[1] || (l[1] = (g) => f.value = g),
64
+ "onUpdate:modelValue": o[1] || (o[1] = (g) => f.value = g),
65
65
  name: i.name,
66
66
  placeholder: i.placeholder,
67
67
  rows: i.rows,
@@ -72,15 +72,15 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
72
72
  isError: i.isError,
73
73
  hint: i.hint,
74
74
  class: "top-editArea_element",
75
- onFocus: l[2] || (l[2] = () => y.value = !0),
76
- onBlur: l[3] || (l[3] = () => y.value = !1),
75
+ onFocus: o[2] || (o[2] = () => y.value = !0),
76
+ onBlur: o[3] || (o[3] = () => y.value = !1),
77
77
  onKeyup: [
78
- K(h, ["esc"]),
79
- l[4] || (l[4] = K(B((g) => p(f.value), ["ctrl"]), ["enter"]))
78
+ E(h, ["esc"]),
79
+ o[4] || (o[4] = E(S((g) => r(f.value), ["ctrl"]), ["enter"]))
80
80
  ]
81
81
  }, null, 8, ["modelValue", "name", "placeholder", "rows", "minHeight", "expandable", "disabled", "readonly", "isError", "hint"]),
82
- E("div", pe, [
83
- !i.attachToKeyboard && (r.value || i.forceShowCloseBtn) ? (c(), S(H, {
82
+ _("div", ce, [
83
+ !i.attachToKeyboard && (u.value || i.forceShowCloseBtn) ? (p(), $(F, {
84
84
  key: 0,
85
85
  class: "top-editArea_button",
86
86
  color: "theme",
@@ -88,18 +88,18 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
88
88
  onClick: h
89
89
  }, {
90
90
  default: k(() => [
91
- L(w(u.value), 1)
91
+ B(w(c.value), 1)
92
92
  ]),
93
93
  _: 1
94
94
  })) : A("", !0),
95
- r.value ? (c(), S(H, {
95
+ u.value ? (p(), $(F, {
96
96
  key: 1,
97
97
  class: "top-editArea_button",
98
98
  icon: i.attachToKeyboard ? "" : "",
99
- onClick: l[5] || (l[5] = (g) => p(f.value))
99
+ onClick: o[5] || (o[5] = (g) => r(f.value))
100
100
  }, {
101
101
  default: k(() => [
102
- L(w(i.attachToKeyboard ? "" : i.submitText), 1)
102
+ B(w(i.attachToKeyboard ? "" : i.submitText), 1)
103
103
  ]),
104
104
  _: 1
105
105
  }, 8, ["icon"])) : A("", !0)
@@ -107,7 +107,7 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
107
107
  ], 2)
108
108
  ], 2));
109
109
  }
110
- }), me = { class: "top-editInput" }, fe = /* @__PURE__ */ _({
110
+ }), fe = { class: "top-editInput" }, ve = /* @__PURE__ */ L({
111
111
  __name: "editInput",
112
112
  props: {
113
113
  modelValue: {},
@@ -116,33 +116,33 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
116
116
  },
117
117
  emits: ["update:modelValue"],
118
118
  setup(n, { emit: a }) {
119
- const e = n, o = V(e.modelValue);
120
- I(x(e.modelValue), () => {
121
- o.value = e.modelValue;
119
+ const e = n, l = V(e.modelValue);
120
+ I(ee(e.modelValue), () => {
121
+ l.value = e.modelValue;
122
122
  });
123
123
  const f = a, y = () => {
124
- f("update:modelValue", o.value);
124
+ f("update:modelValue", l.value);
125
125
  };
126
- return (r, u) => (c(), v("div", me, [
127
- F(le, R(r.input, {
128
- onKeydownCapture: u[0] || (u[0] = K(B((p) => o.value = r.modelValue, ["stop"]), ["esc"])),
129
- onKeydown: K(B(y, ["stop"]), ["enter"]),
130
- modelValue: o.value,
131
- "onUpdate:modelValue": u[1] || (u[1] = (p) => o.value = p)
126
+ return (u, c) => (p(), v("div", fe, [
127
+ R(ae, X(u.input, {
128
+ onKeydownCapture: c[0] || (c[0] = E(S((r) => l.value = u.modelValue, ["stop"]), ["esc"])),
129
+ onKeydown: E(S(y, ["stop"]), ["enter"]),
130
+ modelValue: l.value,
131
+ "onUpdate:modelValue": c[1] || (c[1] = (r) => l.value = r)
132
132
  }), null, 16, ["onKeydown", "modelValue"]),
133
- o.value !== r.modelValue ? (c(), S(H, R({
133
+ l.value !== u.modelValue ? (p(), $(F, X({
134
134
  key: 0,
135
135
  icon: "",
136
136
  styling: "soft"
137
- }, r.button, { onClick: y }), null, 16)) : A("", !0)
137
+ }, u.button, { onClick: y }), null, 16)) : A("", !0)
138
138
  ]));
139
139
  }
140
- }), ve = ["data-top-icon", "onClick"], ye = {
140
+ }), ye = ["data-top-icon", "onClick"], he = {
141
141
  key: 0,
142
142
  class: "top-radioGroup_circle"
143
- }, he = ["value", "disabled"], ge = /* @__PURE__ */ _({
143
+ }, ge = ["value", "disabled"], be = /* @__PURE__ */ L({
144
144
  __name: "radioGroup",
145
- props: /* @__PURE__ */ z({
145
+ props: /* @__PURE__ */ G({
146
146
  modelValue: {},
147
147
  radiosProps: {},
148
148
  showIndicator: { type: Boolean },
@@ -154,91 +154,91 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
154
154
  },
155
155
  modelModifiers: {}
156
156
  }),
157
- emits: /* @__PURE__ */ z(["update:modelValue"], ["update:modelValue"]),
157
+ emits: /* @__PURE__ */ G(["update:modelValue"], ["update:modelValue"]),
158
158
  setup(n, { emit: a }) {
159
- const e = Y(n, "modelValue"), o = n, f = V(null);
159
+ const e = j(n, "modelValue"), l = n, f = V(null);
160
160
  I(e, () => {
161
- var r, u, p, h, b;
162
- (r = o.radiosProps) != null && r.some((i) => i.value === e.value) || (e.value = ((p = (u = o.radiosProps) == null ? void 0 : u[0]) == null ? void 0 : p.value) ?? ""), (b = (h = f.value) == null ? void 0 : h.querySelector(".radioGroup_item-selected")) == null || b.scrollIntoView();
161
+ var u, c, r, h, T;
162
+ (u = l.radiosProps) != null && u.some((i) => i.value === e.value) || (e.value = ((r = (c = l.radiosProps) == null ? void 0 : c[0]) == null ? void 0 : r.value) ?? ""), (T = (h = f.value) == null ? void 0 : h.querySelector(".radioGroup_item-selected")) == null || T.scrollIntoView();
163
163
  }, { immediate: !0 });
164
164
  const y = "radioGroup-" + Math.random();
165
- return (r, u) => (c(), v("div", {
165
+ return (u, c) => (p(), v("div", {
166
166
  ref_key: "elRef",
167
167
  ref: f,
168
168
  class: C({
169
169
  "top-radioGroup": !0,
170
170
  "top-scrollBarXHidding": !0,
171
- ["top-size_" + r.size]: !!r.size,
172
- "top-error": r.isError
171
+ ["top-size_" + u.size]: !!u.size,
172
+ "top-error": u.isError
173
173
  })
174
174
  }, [
175
- (c(!0), v(O, null, G(r.radiosProps, (p) => (c(), v("label", {
175
+ (p(!0), v(N, null, D(u.radiosProps, (r) => (p(), v("label", {
176
176
  class: C({
177
- "top-radioGroup_item-selected": p.value === e.value,
177
+ "top-radioGroup_item-selected": r.value === e.value,
178
178
  "top-radioGroup_item": !0,
179
179
  "top-forms-focusable": !0,
180
- "top-disabled": p.disabled
180
+ "top-disabled": r.disabled
181
181
  }),
182
- "data-top-icon": p.icon,
183
- onClick: (h) => e.value = p.value
182
+ "data-top-icon": r.icon,
183
+ onClick: (h) => e.value = r.value
184
184
  }, [
185
- L(w(p.title) + " ", 1),
186
- r.showIndicator ? (c(), v("span", ye)) : A("", !0),
187
- j(E("input", {
188
- "onUpdate:modelValue": u[0] || (u[0] = (h) => e.value = h),
185
+ B(w(r.title) + " ", 1),
186
+ u.showIndicator ? (p(), v("span", he)) : A("", !0),
187
+ Q(_("input", {
188
+ "onUpdate:modelValue": c[0] || (c[0] = (h) => e.value = h),
189
189
  name: y,
190
190
  type: "radio",
191
191
  class: C({
192
192
  "top-unvisible": !0
193
193
  }),
194
- value: p.value,
195
- disabled: p.disabled
196
- }, null, 8, he), [
197
- [ee, e.value]
194
+ value: r.value,
195
+ disabled: r.disabled
196
+ }, null, 8, ge), [
197
+ [te, e.value]
198
198
  ])
199
- ], 10, ve))), 256))
199
+ ], 10, ye))), 256))
200
200
  ], 2));
201
201
  }
202
- }), be = (n, a, e) => {
203
- const o = V([]), f = V(!1);
204
- let y = "", r;
202
+ }), Ve = (n, a, e) => {
203
+ const l = V([]), f = V(!1);
204
+ let y = "", u;
205
205
  n && !n.params.limit && (n.params.limit = 100);
206
- const u = async () => {
206
+ const c = async () => {
207
207
  if (!n) return;
208
- let l, g;
209
- if (e && (n.cache ??= /* @__PURE__ */ new Map(), g = JSON.stringify(n.params), l = n.cache.get(g), l))
210
- return l;
211
- if (f.value = !0, l = await n.call(), f.value = !1, l.errors) return;
212
- if (!Array.isArray(l.result)) {
208
+ let o, g;
209
+ if (e && (n.cache ??= /* @__PURE__ */ new Map(), g = JSON.stringify(n.params), o = n.cache.get(g), o))
210
+ return o;
211
+ if (f.value = !0, o = await n.call(), f.value = !1, o.errors) return;
212
+ if (!Array.isArray(o.result)) {
213
213
  console.warn("В result ожидался массив");
214
214
  return;
215
215
  }
216
- const P = l.result.findIndex(($) => $.id === void 0 || $.name === void 0);
217
- if (P !== -1) {
218
- console.warn(`В result[${P}] нет id или name`);
216
+ const K = o.result.findIndex((P) => P.id === void 0 || P.name === void 0);
217
+ if (K !== -1) {
218
+ console.warn(`В result[${K}] нет id или name`);
219
219
  return;
220
220
  }
221
- return e && n.cache.set(g, l), l;
222
- }, p = async () => {
221
+ return e && n.cache.set(g, o), o;
222
+ }, r = async () => {
223
223
  if (!n) return;
224
224
  n.params.offset = 0, n.params.search = y;
225
- const l = await u();
226
- l && (r = l.nextOffset, o.value = l.result);
225
+ const o = await c();
226
+ o && (u = o.nextOffset, l.value = o.result);
227
227
  }, h = async () => {
228
- if (!n || !r || f.value) return;
229
- n.params.offset = r, n.params.search = y;
230
- const l = await u();
231
- l && (r = l.nextOffset, o.value = o.value.concat(l.result));
232
- }, b = ae(() => p(), 200);
228
+ if (!n || !u || f.value) return;
229
+ n.params.offset = u, n.params.search = y;
230
+ const o = await c();
231
+ o && (u = o.nextOffset, l.value = l.value.concat(o.result));
232
+ }, T = se(() => r(), 200);
233
233
  return {
234
- items: o,
234
+ items: l,
235
235
  isLoading: f,
236
236
  loadAppend: h,
237
- setSearchTextAndLoad: (l, g = !0) => {
238
- n && (l.length < a || l === y && o.value.length || (y = l, g ? b() : p()));
237
+ setSearchTextAndLoad: (o, g = !0) => {
238
+ n && (o.length < a || o === y && l.value.length || (y = o, g ? T() : r()));
239
239
  }
240
240
  };
241
- }, Ve = { class: "top-selector2_itemMulti top-ellipsis" }, Ae = /* @__PURE__ */ _({
241
+ }, Ae = { class: "top-selector2_itemMulti top-ellipsis" }, Te = /* @__PURE__ */ L({
242
242
  __name: "itemMulti",
243
243
  props: {
244
244
  id: {},
@@ -246,26 +246,26 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
246
246
  },
247
247
  emits: ["delete"],
248
248
  setup(n) {
249
- return (a, e) => (c(), v("div", Ve, [
250
- L(w(a.name) + " ", 1),
251
- E("span", {
249
+ return (a, e) => (p(), v("div", Ae, [
250
+ B(w(a.name) + " ", 1),
251
+ _("span", {
252
252
  class: "top-selector2_itemMultiDelete",
253
253
  "data-top-icon": "",
254
- onClick: e[0] || (e[0] = (o) => a.$emit("delete", a.id)),
255
- onMousedown: e[1] || (e[1] = B(() => {
254
+ onClick: e[0] || (e[0] = (l) => a.$emit("delete", a.id)),
255
+ onMousedown: e[1] || (e[1] = S(() => {
256
256
  }, ["stop"]))
257
257
  }, null, 32)
258
258
  ]));
259
259
  }
260
- }), Te = {
260
+ }), Ce = {
261
261
  key: 0,
262
262
  class: "top-selector2_activeItems"
263
- }, Ce = {
263
+ }, we = {
264
264
  key: 1,
265
265
  class: "top-selector2_activeName top-ellipsis"
266
- }, we = /* @__PURE__ */ _({
266
+ }, ke = /* @__PURE__ */ L({
267
267
  __name: "selector2",
268
- props: /* @__PURE__ */ z({
268
+ props: /* @__PURE__ */ G({
269
269
  modelValue: {},
270
270
  items: { default: () => [] },
271
271
  multiselect: { type: Boolean },
@@ -286,10 +286,10 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
286
286
  }),
287
287
  emits: ["update:modelValue"],
288
288
  setup(n) {
289
- const a = n, e = Y(n, "modelValue"), o = V(""), f = {
289
+ const a = n, e = j(n, "modelValue"), l = V(""), f = {
290
290
  id: 0,
291
- name: se().Common.All
292
- }, y = V(null), r = () => {
291
+ name: ne().Common.All
292
+ }, y = V(null), u = V(null), c = () => {
293
293
  var t;
294
294
  return (t = y.value) == null ? void 0 : t.popup;
295
295
  };
@@ -300,67 +300,72 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
300
300
  },
301
301
  { immediate: !0 }
302
302
  );
303
- const u = be(a.apiRequest, a.minLength, a.useCache), p = N(() => {
303
+ const r = Ve(a.apiRequest, a.minLength, a.useCache), h = z(() => {
304
304
  const t = [];
305
305
  return !a.multiselect && a.appendAllValue && t.push(f), a.items.forEach((s) => t.push({ ...s })), t;
306
- }), h = (t, s = !0) => s && t.id === null ? Array.isArray(e.value) ? e.value.some((m) => m.id === t.id && m.name === t.name) : t.name === e.value.name : Array.isArray(e.value) ? e.value.some((m) => m.id === t.id) : t.id === e.value.id, b = N(() => {
307
- const t = o.value.toLowerCase(), s = re(t);
306
+ }), T = (t, s = !0) => s && t.id === null ? Array.isArray(e.value) ? e.value.some((m) => m.id === t.id && m.name === t.name) : t.name === e.value.name : Array.isArray(e.value) ? e.value.some((m) => m.id === t.id) : t.id === e.value.id, i = z(() => {
307
+ const t = l.value.toLowerCase(), s = ie(t);
308
308
  let m = [];
309
- return p.value.forEach((d) => {
310
- const T = d.name.toLowerCase();
311
- (d.id === Number(t) || T.includes(t) || T.includes(s)) && (T === t || T === s ? m.unshift(d) : m.push(d));
312
- }), m.push(...u.items.value), a.appendSearchToResult && o.value && (!m.length || m[0].name.toLowerCase() !== t) && m.push({
309
+ return h.value.forEach((d) => {
310
+ const b = d.name.toLowerCase();
311
+ (d.id === Number(t) || b.includes(t) || b.includes(s)) && (b === t || b === s ? m.unshift(d) : m.push(d));
312
+ }), m.push(...r.items.value), a.appendSearchToResult && l.value && (!m.length || m[0].name.toLowerCase() !== t) && m.push({
313
313
  id: null,
314
- name: o.value
315
- }), a.multiselect && (m = m.filter((d) => !h(d))), m;
316
- }), i = V(u.isLoading.value);
317
- I(u.isLoading, () => {
318
- i.value = u.isLoading.value;
314
+ name: l.value
315
+ }), a.multiselect && (m = m.filter((d) => !T(d))), m;
316
+ }), o = V(r.isLoading.value);
317
+ I(r.isLoading, () => {
318
+ o.value = r.isLoading.value;
319
319
  });
320
- const l = async (t) => {
320
+ const g = async (t) => {
321
321
  var s, m;
322
322
  if (a.multiselect) {
323
- if (!Array.isArray(e.value) || h(t))
323
+ if (!Array.isArray(e.value) || T(t))
324
324
  return;
325
- a.apiRequest && o.value && (i.value = !0);
325
+ a.apiRequest && l.value && (o.value = !0);
326
326
  const d = [...e.value];
327
- d.push({ ...t }), e.value = d, ne.state.isMobile ? ((s = r()) == null || s.close(), o.value && (o.value = "", u.items.value = [])) : setTimeout(() => {
328
- var T, U, W, J;
329
- (T = r()) == null || T.recalcPosition(), (J = (W = (U = r()) == null ? void 0 : U.elPopupWidget) == null ? void 0 : W.querySelector("input")) == null || J.focus(), o.value && (b.value.length ? a.apiRequest && (i.value = !1) : (o.value = "", u.items.value = []));
327
+ d.push({ ...t }), e.value = d, re.state.isMobile ? ((s = c()) == null || s.close(), l.value && (l.value = "", r.items.value = [])) : setTimeout(() => {
328
+ var b, U, W, J;
329
+ (b = c()) == null || b.recalcPosition(), (J = (W = (U = c()) == null ? void 0 : U.elPopupWidget) == null ? void 0 : W.querySelector("input")) == null || J.focus(), l.value && (i.value.length ? a.apiRequest && (o.value = !1) : (l.value = "", r.items.value = []));
330
330
  });
331
331
  } else
332
- o.value && (o.value = "", u.items.value = []), JSON.stringify(t) !== JSON.stringify(e.value) && (e.value = { ...t }), (m = r()) == null || m.close();
333
- }, g = () => {
332
+ l.value && (l.value = "", r.items.value = []), JSON.stringify(t) !== JSON.stringify(e.value) && (e.value = { ...t }), (m = c()) == null || m.close();
333
+ }, K = () => {
334
334
  if (!Array.isArray(e.value)) {
335
- const s = (p.value.findIndex((m) => m.id === e.value.id) + 1) % p.value.length;
336
- e.value = { ...p.value[s] };
335
+ const s = (h.value.findIndex((m) => m.id === e.value.id) + 1) % h.value.length;
336
+ e.value = { ...h.value[s] };
337
337
  }
338
338
  }, P = async (t) => {
339
339
  Array.isArray(e.value) && (e.value = e.value.filter((s) => s.id !== t), setTimeout(() => {
340
340
  var s;
341
- (s = r()) == null || s.recalcPosition();
341
+ (s = c()) == null || s.recalcPosition();
342
342
  }));
343
- }, $ = V(!1);
344
- a.apiRequest && (I($, () => {
345
- $.value && u.setSearchTextAndLoad(o.value, !1);
346
- }), I(o, () => u.setSearchTextAndLoad(o.value)));
347
- const Q = (t) => {
343
+ }, M = V(!1);
344
+ a.apiRequest && (I(M, () => {
345
+ M.value && r.setSearchTextAndLoad(l.value, !1);
346
+ }), I(l, () => r.setSearchTextAndLoad(l.value)));
347
+ const Z = (t) => {
348
348
  const s = t.target;
349
- s.scrollTop / (s.scrollHeight - s.offsetHeight) > 0.8 && u.loadAppend();
349
+ s.scrollTop / (s.scrollHeight - s.offsetHeight) > 0.8 && r.loadAppend();
350
350
  };
351
351
  return (t, s) => {
352
- const m = te("top-focus");
353
- return c(), S(M(ie), {
352
+ const m = oe("top-focus");
353
+ return p(), $(O(ue), {
354
354
  ref_key: "popupRef",
355
355
  ref: y,
356
- onOpen: s[2] || (s[2] = (d) => $.value = !0),
357
- onClose: s[3] || (s[3] = (d) => $.value = !1),
358
- onScrollContentList: s[4] || (s[4] = (d) => t.apiRequest ? Q(d) : void 0),
356
+ onOpen: s[2] || (s[2] = (d) => M.value = !0),
357
+ onClose: s[3] || (s[3] = (d) => {
358
+ var b;
359
+ return M.value = !1, (b = u.value) == null ? void 0 : b.focus();
360
+ }),
361
+ onScrollContentList: s[4] || (s[4] = (d) => t.apiRequest ? Z(d) : void 0),
359
362
  notch: !1,
360
363
  transitionDuration: 0
361
364
  }, {
362
365
  opener: k(() => [
363
- j((c(), v("div", {
366
+ Q((p(), v("div", {
367
+ ref_key: "elRef",
368
+ ref: u,
364
369
  class: C({
365
370
  "top-selector2": !0,
366
371
  "top-selector2-multiselect": t.multiselect,
@@ -369,21 +374,21 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
369
374
  "top-forms-focusable": !t.disabled,
370
375
  "top-error": t.isError
371
376
  }),
372
- onKeydown: s[0] || (s[0] = K((d) => d.currentTarget.click(), ["enter", "space"])),
377
+ onKeydown: s[0] || (s[0] = E(S((d) => d.currentTarget.click(), ["stop", "prevent"]), ["enter", "space"])),
373
378
  tabindex: "0"
374
379
  }, [
375
- t.multiselect ? (c(), v("div", Te, [
376
- (c(!0), v(O, null, G(e.value, (d) => (c(), S(Ae, {
380
+ t.multiselect ? (p(), v("div", Ce, [
381
+ (p(!0), v(N, null, D(e.value, (d) => (p(), $(Te, {
377
382
  id: d.id,
378
383
  name: d.name,
379
384
  onDelete: P
380
385
  }, null, 8, ["id", "name"]))), 256))
381
386
  ])) : A("", !0),
382
- t.multiselect ? A("", !0) : (c(), v("span", Ce, w(Array.isArray(e.value) ? "" : e.value.name), 1)),
383
- t.addChanger && !t.multiselect && p.value.length > 1 && !t.disabled ? (c(), v("span", {
387
+ t.multiselect ? A("", !0) : (p(), v("span", we, w(Array.isArray(e.value) ? "" : e.value.name), 1)),
388
+ t.addChanger && !t.multiselect && h.value.length > 1 && !t.disabled ? (p(), v("span", {
384
389
  key: 2,
385
390
  class: "top-changer top-changer-selector",
386
- onClick: B(g, ["stop"])
391
+ onClick: S(K, ["stop"])
387
392
  })) : A("", !0)
388
393
  ], 34)), [
389
394
  [
@@ -395,39 +400,39 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
395
400
  ])
396
401
  ]),
397
402
  widget: k(() => [
398
- F(M(ue), {
403
+ R(O(de), {
399
404
  title: "Поиск",
400
405
  icon: "",
401
- modelValue: o.value,
402
- "onUpdate:modelValue": s[1] || (s[1] = (d) => o.value = d),
403
- isLoading: i.value,
406
+ modelValue: l.value,
407
+ "onUpdate:modelValue": s[1] || (s[1] = (d) => l.value = d),
408
+ isLoading: o.value,
404
409
  placeholder: !Array.isArray(e.value) && !t.multiselect && t.showSelectedInInput ? e.value.name : t.placeholder
405
410
  }, null, 8, ["modelValue", "isLoading", "placeholder"])
406
411
  ]),
407
412
  contentList: k(() => [
408
- (c(!0), v(O, null, G(b.value, (d) => (c(), S(M(X), {
413
+ (p(!0), v(N, null, D(i.value, (d) => (p(), $(O(Y), {
409
414
  class: C({
410
415
  "top-active": !Array.isArray(e.value) && !t.multiselect && e.value.name === d.name
411
416
  }),
412
417
  key: d.id ?? void 0,
413
- onClick: B((T) => l(d), ["stop"])
418
+ onClick: S((b) => g(d), ["stop"])
414
419
  }, {
415
420
  default: k(() => [
416
- t.$slots.item ? D(t.$slots, "item", {
421
+ t.$slots.item ? H(t.$slots, "item", {
417
422
  key: 0,
418
423
  item: d
419
- }) : (c(), v(O, { key: 1 }, [
420
- L(w(d.name), 1)
424
+ }) : (p(), v(N, { key: 1 }, [
425
+ B(w(d.name), 1)
421
426
  ], 64))
422
427
  ]),
423
428
  _: 2
424
429
  }, 1032, ["class", "onClick"]))), 128)),
425
- !i.value && !b.value.length ? (c(), S(M(X), {
430
+ !o.value && !i.value.length ? (p(), $(O(Y), {
426
431
  key: 0,
427
432
  type: "regular"
428
433
  }, {
429
434
  default: k(() => [
430
- L(w(t.$i18n.Common.No_results), 1)
435
+ B(w(t.$i18n.Common.No_results), 1)
431
436
  ]),
432
437
  _: 1
433
438
  })) : A("", !0)
@@ -436,10 +441,10 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
436
441
  }, 512);
437
442
  };
438
443
  }
439
- }), $e = ["data-top-icon"], ke = { class: "top-info_text" }, Se = {
444
+ }), $e = ["data-top-icon"], Se = { class: "top-info_text" }, Ie = {
440
445
  key: 0,
441
446
  class: "top-info_value"
442
- }, Ie = /* @__PURE__ */ _({
447
+ }, Be = /* @__PURE__ */ L({
443
448
  __name: "info",
444
449
  props: {
445
450
  icon: {},
@@ -447,7 +452,7 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
447
452
  size: { default: "default" }
448
453
  },
449
454
  setup(n) {
450
- return (a, e) => (c(), v("div", {
455
+ return (a, e) => (p(), v("div", {
451
456
  class: C({
452
457
  "top-info": !0,
453
458
  ["top-size_" + a.size]: !0,
@@ -455,21 +460,21 @@ const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ _({
455
460
  }),
456
461
  "data-top-icon": a.icon
457
462
  }, [
458
- E("div", ke, [
459
- D(a.$slots, "default")
463
+ _("div", Se, [
464
+ H(a.$slots, "default")
460
465
  ]),
461
- a.$slots.additional ? (c(), v("span", Se, [
462
- D(a.$slots, "additional")
466
+ a.$slots.additional ? (p(), v("span", Ie, [
467
+ H(a.$slots, "additional")
463
468
  ])) : A("", !0)
464
469
  ], 10, $e));
465
470
  }
466
- }), Me = ce, Oe = fe, Ne = ge, ze = we, Ge = de, De = Ie;
471
+ }), Oe = me, Ne = ve, ze = be, Ge = ke, De = pe, He = Be;
467
472
  export {
468
- Me as TopEditArea,
469
- Oe as TopEditInput,
470
- De as TopInfo,
471
- Ge as TopMenu,
472
- Ne as TopRadioGroup,
473
- ze as TopSelector2
473
+ Oe as TopEditArea,
474
+ Ne as TopEditInput,
475
+ He as TopInfo,
476
+ De as TopMenu,
477
+ ze as TopRadioGroup,
478
+ Ge as TopSelector2
474
479
  };
475
480
  //# sourceMappingURL=formsExt.js.map