@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.
- package/.chunks/{datepicker-BuYd9fIc.es.js → datepicker-Cy-5va_6.es.js} +2 -2
- package/.chunks/{datepicker-BuYd9fIc.es.js.map → datepicker-Cy-5va_6.es.js.map} +1 -1
- package/.chunks/{forms-ErdYx-BZ.es.js → forms-OGVavtfB.es.js} +5 -5
- package/.chunks/{forms-ErdYx-BZ.es.js.map → forms-OGVavtfB.es.js.map} +1 -1
- 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
- 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
- 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
- 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
- package/.chunks/{notice-fp6NkW26.es.js → notice-jRsIavFg.es.js} +2 -2
- package/.chunks/{notice-fp6NkW26.es.js.map → notice-jRsIavFg.es.js.map} +1 -1
- package/.chunks/{popup-Da51DYeD.es.js → popup-CrJ_XTLl.es.js} +2 -2
- package/.chunks/{popup-Da51DYeD.es.js.map → popup-CrJ_XTLl.es.js.map} +1 -1
- package/.chunks/{utils-o4Qr_QFJ.es.js → utils-B8ZoN-WY.es.js} +2 -2
- package/.chunks/{utils-o4Qr_QFJ.es.js.map → utils-B8ZoN-WY.es.js.map} +1 -1
- package/.chunks/{utils-DGXc0kRd.es.js → utils-bjDrzWln.es.js} +3 -3
- package/.chunks/{utils-DGXc0kRd.es.js.map → utils-bjDrzWln.es.js.map} +1 -1
- package/assets/formsExt.css +1 -1
- package/assets/layout.css +1 -1
- package/charts/charts.js +1 -1
- package/components/formsExt/formsExt.d.ts +2 -0
- package/components/formsExt/info/info.vue.d.ts +22 -0
- package/core/app.js +5 -5
- package/dialog/dialog.js +2 -2
- package/forms/forms.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +180 -151
- package/formsExt/formsExt.js.map +1 -1
- package/layout/layout.js +1 -1
- package/layout/layout.js.map +1 -1
- package/package.json +1 -1
- package/popup/popup.js +2 -2
- package/popup/worker.js +2 -2
- package/project/project.js +3 -3
- package/tabsView/tabsView.js +16 -16
- package/utils/clipboard.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/price.js +1 -1
- package/utils/string.js +1 -1
- package/web-types.json +1 -1
package/formsExt/formsExt.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Core as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import {
|
|
4
|
-
import { invertKeyboardLayout as
|
|
5
|
-
import { TopPopup as
|
|
6
|
-
import { _ as de } from "../.chunks/menu.vue_vue_type_style_index_0_lang-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */
|
|
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(
|
|
33
|
-
const e =
|
|
34
|
-
o("submit",
|
|
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 (
|
|
45
|
-
const
|
|
44
|
+
return (i, l) => {
|
|
45
|
+
const A = x("top-focus");
|
|
46
46
|
return c(), v("div", {
|
|
47
|
-
class:
|
|
47
|
+
class: w({
|
|
48
48
|
"top-editArea": !0,
|
|
49
|
-
"top-editArea-attachedToKeyboard":
|
|
49
|
+
"top-editArea-attachedToKeyboard": i.attachToKeyboard
|
|
50
50
|
})
|
|
51
51
|
}, [
|
|
52
|
-
|
|
52
|
+
i.title ? (c(), v("div", {
|
|
53
53
|
key: 0,
|
|
54
54
|
class: "top-editArea_title",
|
|
55
|
-
onClick: l[0] || (l[0] = (
|
|
56
|
-
}, T(
|
|
57
|
-
|
|
58
|
-
class:
|
|
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":
|
|
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] = (
|
|
67
|
-
name:
|
|
68
|
-
placeholder:
|
|
69
|
-
rows:
|
|
70
|
-
minHeight:
|
|
71
|
-
expandable:
|
|
72
|
-
disabled:
|
|
73
|
-
readonly:
|
|
74
|
-
isError:
|
|
75
|
-
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
|
-
|
|
81
|
-
l[4] || (l[4] =
|
|
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
|
-
[
|
|
84
|
+
[A, { disabled: !f.value }]
|
|
85
85
|
]),
|
|
86
|
-
|
|
87
|
-
!
|
|
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
|
-
|
|
95
|
+
B(T(d.value), 1)
|
|
96
96
|
]),
|
|
97
97
|
_: 1
|
|
98
|
-
})) :
|
|
99
|
-
r.value ? (c(),
|
|
98
|
+
})) : V("", !0),
|
|
99
|
+
r.value ? (c(), I(D, {
|
|
100
100
|
key: 1,
|
|
101
101
|
class: "top-editArea_button",
|
|
102
|
-
icon:
|
|
103
|
-
onClick: l[5] || (l[5] = (
|
|
102
|
+
icon: i.attachToKeyboard ? "" : "",
|
|
103
|
+
onClick: l[5] || (l[5] = (C) => p(m.value))
|
|
104
104
|
}, {
|
|
105
105
|
default: S(() => [
|
|
106
|
-
|
|
106
|
+
B(T(i.attachToKeyboard ? "" : i.submitText), 1)
|
|
107
107
|
]),
|
|
108
108
|
_: 1
|
|
109
|
-
}, 8, ["icon"])) :
|
|
109
|
+
}, 8, ["icon"])) : V("", !0)
|
|
110
110
|
])
|
|
111
111
|
], 2)
|
|
112
112
|
], 2);
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
}), me = { class: "top-editInput" }, fe = /* @__PURE__ */
|
|
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(
|
|
124
|
-
const e =
|
|
125
|
-
|
|
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 =
|
|
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] =
|
|
134
|
-
onKeydown:
|
|
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(),
|
|
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)) :
|
|
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"],
|
|
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(
|
|
164
|
-
const e = Y(
|
|
165
|
-
|
|
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((
|
|
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:
|
|
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(
|
|
181
|
-
class:
|
|
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
|
-
|
|
191
|
-
r.showIndicator ? (c(), v("span", ye)) :
|
|
192
|
-
X(
|
|
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:
|
|
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
|
-
[
|
|
202
|
+
[te, e.value]
|
|
203
203
|
])
|
|
204
204
|
], 10, ve))), 256))
|
|
205
205
|
], 2));
|
|
206
206
|
}
|
|
207
|
-
}),
|
|
208
|
-
const o =
|
|
207
|
+
}), be = (n, s, e) => {
|
|
208
|
+
const o = b([]), m = b(!1);
|
|
209
209
|
let f = "", r;
|
|
210
|
-
|
|
210
|
+
n && !n.params.limit && (n.params.limit = 100);
|
|
211
211
|
const d = async () => {
|
|
212
|
-
if (!
|
|
213
|
-
let l,
|
|
214
|
-
if (e && (
|
|
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
|
|
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
|
|
222
|
-
if (
|
|
223
|
-
console.warn(`В result[${
|
|
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 &&
|
|
226
|
+
return e && n.cache.set(A, l), l;
|
|
227
227
|
}, p = async () => {
|
|
228
|
-
if (!
|
|
229
|
-
|
|
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 (!
|
|
234
|
-
|
|
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,
|
|
243
|
-
|
|
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__ */
|
|
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(
|
|
254
|
-
return (
|
|
255
|
-
|
|
256
|
-
|
|
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) =>
|
|
260
|
-
onMousedown: e[1] || (e[1] =
|
|
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__ */
|
|
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(
|
|
294
|
-
const
|
|
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 =
|
|
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__ && !
|
|
302
|
-
() =>
|
|
301
|
+
window.__STORYBOOK_PREVIEW__ && !s.modelValue && L(
|
|
302
|
+
() => s.multiselect,
|
|
303
303
|
() => {
|
|
304
|
-
e.value =
|
|
304
|
+
e.value = s.multiselect ? [] : { id: null, name: "" };
|
|
305
305
|
},
|
|
306
306
|
{ immediate: !0 }
|
|
307
307
|
);
|
|
308
|
-
const d =
|
|
308
|
+
const d = be(s.apiRequest, s.minLength, s.useCache), p = O(() => {
|
|
309
309
|
const t = [];
|
|
310
|
-
return !
|
|
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 =
|
|
312
|
-
const t = o.value.toLowerCase(), u =
|
|
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((
|
|
315
|
-
const
|
|
316
|
-
(
|
|
317
|
-
}), a.push(...d.items.value),
|
|
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
|
-
}),
|
|
321
|
-
}),
|
|
322
|
-
|
|
323
|
-
|
|
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 (
|
|
327
|
+
if (s.multiselect) {
|
|
328
328
|
if (!Array.isArray(e.value) || y(t))
|
|
329
329
|
return;
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
var
|
|
334
|
-
(
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}),
|
|
352
|
-
const
|
|
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(),
|
|
356
|
+
return (t, u) => (c(), I(P(ie), {
|
|
357
357
|
ref_key: "popupRef",
|
|
358
358
|
ref: f,
|
|
359
|
-
onOpen: u[1] || (u[1] = (a) =>
|
|
360
|
-
onClose: u[2] || (u[2] = (a) =>
|
|
361
|
-
onScrollContentList: u[3] || (u[3] = (a) => t.apiRequest ?
|
|
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
|
-
|
|
367
|
-
class:
|
|
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(
|
|
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:
|
|
380
|
+
onDelete: C
|
|
381
381
|
}, null, 8, ["id", "name"]))), 256))
|
|
382
|
-
])) :
|
|
383
|
-
t.multiselect ?
|
|
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:
|
|
388
|
-
})) :
|
|
387
|
+
onClick: E(A, ["stop"])
|
|
388
|
+
})) : V("", !0)
|
|
389
389
|
], 2)
|
|
390
390
|
]),
|
|
391
391
|
widget: S(() => [
|
|
392
|
-
H(
|
|
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:
|
|
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(
|
|
403
|
-
class:
|
|
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:
|
|
407
|
+
onClick: E((g) => l(a), ["stop"])
|
|
408
408
|
}, {
|
|
409
409
|
default: S(() => [
|
|
410
|
-
t.$slots.item ?
|
|
410
|
+
t.$slots.item ? j(t.$slots, "item", {
|
|
411
411
|
key: 0,
|
|
412
412
|
item: a
|
|
413
|
-
}) : (c(), v(
|
|
414
|
-
|
|
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
|
-
!
|
|
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
|
-
|
|
424
|
+
B(T(t.$i18n.Common.No_results), 1)
|
|
425
425
|
]),
|
|
426
426
|
_: 1
|
|
427
|
-
})) :
|
|
427
|
+
})) : V("", !0)
|
|
428
428
|
]),
|
|
429
429
|
_: 3
|
|
430
430
|
}, 512));
|
|
431
431
|
}
|
|
432
|
-
}),
|
|
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
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
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
|