@topvisor/ui 1.0.18-top-info → 1.0.18-top-info-2

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