@topvisor/ui 1.0.3 → 1.0.6
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-BJGX0c7G.amd.js → datepicker-CRfiJCmp.amd.js} +2 -2
- package/.chunks/{datepicker-BJGX0c7G.amd.js.map → datepicker-CRfiJCmp.amd.js.map} +1 -1
- package/.chunks/{datepicker-3uPurK_5.es.js → datepicker-CugKFVIH.es.js} +2 -2
- package/.chunks/{datepicker-3uPurK_5.es.js.map → datepicker-CugKFVIH.es.js.map} +1 -1
- package/.chunks/{forms-D9r2-H5Y.es.js → forms-CHiMZ8vg.es.js} +758 -743
- package/.chunks/forms-CHiMZ8vg.es.js.map +1 -0
- package/.chunks/forms-CjYoXTEQ.amd.js +3 -0
- package/.chunks/forms-CjYoXTEQ.amd.js.map +1 -0
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-Bdv8YBAk.es.js → listItem.vue_vue_type_script_setup_true_lang-Bb7B8CTJ.es.js} +4 -4
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-Bdv8YBAk.es.js.map → listItem.vue_vue_type_script_setup_true_lang-Bb7B8CTJ.es.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BxpjEUsq.amd.js → listItem.vue_vue_type_script_setup_true_lang-CEF3WDJ_.amd.js} +2 -2
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BxpjEUsq.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-CEF3WDJ_.amd.js.map} +1 -1
- package/.chunks/{menu-B0Ul7Kbg.es.js → menu-CHeV29rC.es.js} +2 -2
- package/.chunks/{menu-B0Ul7Kbg.es.js.map → menu-CHeV29rC.es.js.map} +1 -1
- package/.chunks/{menu-CbhB9e4x.amd.js → menu-D1lnYuWU.amd.js} +2 -2
- package/.chunks/{menu-CbhB9e4x.amd.js.map → menu-D1lnYuWU.amd.js.map} +1 -1
- package/.chunks/{popup-pQCswyfj.amd.js → popup-C4Tne4qA.amd.js} +5 -5
- package/.chunks/{popup-pQCswyfj.amd.js.map → popup-C4Tne4qA.amd.js.map} +1 -1
- package/.chunks/{popup-Coq_61yv.es.js → popup-D-G2sXks.es.js} +2 -3
- package/.chunks/{popup-Coq_61yv.es.js.map → popup-D-G2sXks.es.js.map} +1 -1
- package/.chunks/utils-BOlUthaH.es.js +91 -0
- package/.chunks/utils-BOlUthaH.es.js.map +1 -0
- package/.chunks/utils-x88W55mf.amd.js +2 -0
- package/.chunks/utils-x88W55mf.amd.js.map +1 -0
- package/assets/forms.css +1 -1
- package/assets/project.css +1 -1
- package/assets/tabsView.css +1 -1
- package/assets/themes/dark.css +1 -1
- package/assets/themes/light.css +1 -1
- package/components/forms/avatar/avatar.vue.d.ts +3 -33
- package/components/forms/button/button.vue.d.ts +11 -31
- package/components/forms/checkbox/checkbox.vue.d.ts +12 -16
- package/components/forms/controlLabel/controlLabel.vue.d.ts +9 -13
- package/components/forms/hint/hint.vue.d.ts +2 -11
- package/components/forms/input/input.vue.d.ts +13 -31
- package/components/forms/inputDate/inputDate.vue.d.ts +6 -27
- package/components/forms/inputRange/inputRange.vue.d.ts +10 -5
- package/components/forms/loadbar/loadbar.vue.d.ts +2 -2
- package/components/forms/radio/radio.vue.d.ts +12 -16
- package/components/forms/select/select.vue.d.ts +8 -27
- package/components/forms/switcher/switcher.vue.d.ts +12 -16
- package/components/forms/textarea/textarea.vue.d.ts +6 -29
- package/components/formsExt/editArea/editArea.vue.d.ts +9 -38
- package/components/formsExt/editInput/editInput.vue.d.ts +5 -14
- package/components/formsExt/menu/menu.vue.d.ts +6 -27
- package/components/formsExt/radioGroup/radioGroup.vue.d.ts +8 -27
- package/components/formsExt/selector2/api.d.ts +2 -2
- package/components/formsExt/selector2/itemMulti.vue.d.ts +5 -14
- package/components/formsExt/selector2/selector2.vue.d.ts +107 -35
- package/components/popup/alert/alert.vue.d.ts +17 -21
- package/components/popup/confirm/confirm.vue.d.ts +19 -23
- package/components/popup/popup/listItem.vue.d.ts +10 -28
- package/components/popup/popup/opener.vue.d.ts +10 -30
- package/components/popup/popup/popup.vue.d.ts +21 -43
- package/components/popup/popup/widgetInput.vue.d.ts +11 -29
- package/components/popup/prompt/prompt.vue.d.ts +19 -23
- package/components/popup/worker.d.ts +0 -4
- package/components/project/project.d.ts +2 -0
- package/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +6 -27
- package/components/project/selectorRegion/composables/compare.d.ts +12 -0
- package/components/project/selectorRegion/composables/selectRegion.d.ts +14 -0
- package/components/project/selectorRegion/composables/selectSearcher.d.ts +13 -0
- package/components/project/selectorRegion/composables/selectorRegion.d.ts +25 -0
- package/components/project/selectorRegion/selectorRegion.d.ts +182 -0
- package/components/project/selectorRegion/selectorRegion.vue.d.ts +25 -0
- package/components/project/selectorRegion/stories/searchers.d.ts +3 -0
- package/components/project/selectorRegion/utils/consts.d.ts +20 -0
- package/components/project/selectorRegion/utils/utils.d.ts +23 -0
- package/components/project/utils.d.ts +1 -0
- package/components/tabs/tabs/content.vue.d.ts +9 -13
- package/components/tabs/tabs/tab.vue.d.ts +9 -13
- package/components/tabs/tabs/tabs.vue.d.ts +11 -15
- package/components/tabsView/tabsView/menu.vue.d.ts +17 -20
- package/components/tabsView/tabsView/menuDelimeter.vue.d.ts +2 -2
- package/components/tabsView/tabsView/menuItem.vue.d.ts +11 -29
- package/components/tabsView/tabsView/menuTitle.vue.d.ts +10 -14
- package/components/tabsView/tabsView/store.d.ts +6 -6
- package/components/tabsView/tabsView/tabsView.vue.d.ts +15 -31
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +2 -2
- package/core/app.js.map +1 -1
- package/core/core/core.d.ts +0 -8
- package/core/core.amd.js +1 -1
- package/core/core.js +1 -1
- package/core/plugins/core.d.ts +1 -1
- package/core/utils/date.d.ts +2 -2
- package/core/utils/scroll.d.ts +7 -1
- package/core/utils/searchers.d.ts +40 -0
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +5 -5
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +64 -64
- package/icomoon/Topvisor icons.json +5846 -0
- package/icomoon/demo.html +26 -26
- package/icomoon/fonts/Topvisor-2.svg +12 -12
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +16 -16
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +14 -14
- package/popup/worker.amd.js +1 -1
- package/popup/worker.d.ts +0 -4
- package/popup/worker.js +3 -4
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +366 -45
- package/project/project.js.map +1 -1
- package/project/utils.amd.js +2 -0
- package/project/utils.amd.js.map +1 -0
- package/project/utils.d.ts +2 -0
- package/project/utils.js +6 -0
- package/project/utils.js.map +1 -0
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.js +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +150 -143
- package/tabsView/tabsView.js.map +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +4 -4
- package/utils/price.amd.js +1 -1
- package/utils/price.amd.js.map +1 -1
- package/utils/price.js +6 -7
- package/utils/price.js.map +1 -1
- package/utils/scroll.amd.js +1 -1
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.js +10 -8
- package/utils/scroll.js.map +1 -1
- package/utils/searchers.amd.js +2 -0
- package/utils/searchers.amd.js.map +1 -0
- package/utils/searchers.d.ts +2 -0
- package/utils/searchers.js +130 -0
- package/utils/searchers.js.map +1 -0
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +1 -1
- package/.chunks/forms-BImXJ_ZO.amd.js +0 -3
- package/.chunks/forms-BImXJ_ZO.amd.js.map +0 -1
- package/.chunks/forms-D9r2-H5Y.es.js.map +0 -1
- package/.chunks/i18n-C_OH9IT3.amd.js +0 -2
- package/.chunks/i18n-C_OH9IT3.amd.js.map +0 -1
- package/.chunks/i18n-DuTvft1T.es.js +0 -26
- package/.chunks/i18n-DuTvft1T.es.js.map +0 -1
package/formsExt/formsExt.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import Q from "../core/core.js";
|
|
2
2
|
import { defineComponent as L, ref as V, computed as N, resolveDirective as x, openBlock as c, createElementBlock as v, normalizeClass as I, toDisplayString as $, createCommentVNode as T, createElementVNode as E, withDirectives as Y, createVNode as F, withKeys as O, withModifiers as S, createBlock as C, withCtx as w, createTextVNode as B, watch as k, toRef as q, mergeProps as X, mergeModels as D, useModel as j, Fragment as P, renderList as H, vModelRadio as ee, unref as M, renderSlot as te } from "vue";
|
|
3
|
-
import {
|
|
3
|
+
import { w as oe, T as z, _ as K, v as le, r as ae, C as se } from "../.chunks/forms-CHiMZ8vg.es.js";
|
|
4
4
|
import { invertKeyboardLayout as re } from "../utils/keyboard.js";
|
|
5
5
|
import { TopPopup as ne, TopPopupWidgetInput as ie, TopPopupListItem as R } from "../popup/popup.js";
|
|
6
|
-
import { M as ue } from "../.chunks/menu-
|
|
7
|
-
const Z = ["../assets/formsExt.css"].map((
|
|
6
|
+
import { M as ue } from "../.chunks/menu-CHeV29rC.es.js";
|
|
7
|
+
const Z = ["../assets/formsExt.css"].map((r) => import.meta.resolve(r));
|
|
8
8
|
Q.insertCSSLinkToPage(Z, !0);
|
|
9
9
|
const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
10
10
|
__name: "editArea",
|
|
@@ -29,11 +29,11 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
29
29
|
hint: {}
|
|
30
30
|
},
|
|
31
31
|
emits: ["submit", "close", "clickOnTitle"],
|
|
32
|
-
setup(
|
|
33
|
-
const e =
|
|
32
|
+
setup(r, { emit: d }) {
|
|
33
|
+
const e = r, a = d, m = V(e.defaultValue), f = V(e.isFocused), n = N(() => m.value !== e.defaultValue), p = N(() => e.attachToKeyboard ? "" : e.forceShowCloseBtn && !n.value ? e.closeText : e.cancelText), i = (u) => {
|
|
34
34
|
a("submit", u), m.value = e.defaultValue;
|
|
35
35
|
}, y = () => {
|
|
36
|
-
if (e.forceShowCloseBtn && !
|
|
36
|
+
if (e.forceShowCloseBtn && !n.value) {
|
|
37
37
|
a("close");
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
@@ -84,7 +84,7 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
84
84
|
[g, { disabled: !f.value }]
|
|
85
85
|
]),
|
|
86
86
|
E("div", de, [
|
|
87
|
-
|
|
87
|
+
n.value || u.forceShowCloseBtn ? (c(), C(z, {
|
|
88
88
|
key: 0,
|
|
89
89
|
class: "top-editArea_button",
|
|
90
90
|
color: "theme",
|
|
@@ -97,7 +97,7 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
97
97
|
]),
|
|
98
98
|
_: 1
|
|
99
99
|
}, 8, ["icon"])) : T("", !0),
|
|
100
|
-
|
|
100
|
+
n.value ? (c(), C(z, {
|
|
101
101
|
key: 1,
|
|
102
102
|
class: "top-editArea_button",
|
|
103
103
|
icon: u.attachToKeyboard ? "" : "",
|
|
@@ -135,26 +135,26 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
135
135
|
button: {}
|
|
136
136
|
},
|
|
137
137
|
emits: ["update:modelValue"],
|
|
138
|
-
setup(
|
|
139
|
-
const e =
|
|
138
|
+
setup(r, { emit: d }) {
|
|
139
|
+
const e = r, a = V(e.modelValue);
|
|
140
140
|
k(q(e.modelValue), () => {
|
|
141
141
|
a.value = e.modelValue;
|
|
142
142
|
});
|
|
143
143
|
const m = d, f = () => {
|
|
144
144
|
m("update:modelValue", a.value);
|
|
145
145
|
};
|
|
146
|
-
return (
|
|
147
|
-
F(le, X(
|
|
148
|
-
onKeydownCapture: p[0] || (p[0] = O(S((i) => a.value =
|
|
146
|
+
return (n, p) => (c(), v("div", ve, [
|
|
147
|
+
F(le, X(n.input, {
|
|
148
|
+
onKeydownCapture: p[0] || (p[0] = O(S((i) => a.value = n.modelValue, ["stop"]), ["esc"])),
|
|
149
149
|
onKeydown: O(S(f, ["stop"]), ["enter"]),
|
|
150
150
|
modelValue: a.value,
|
|
151
151
|
"onUpdate:modelValue": p[1] || (p[1] = (i) => a.value = i)
|
|
152
152
|
}), null, 16, ["onKeydown", "modelValue"]),
|
|
153
|
-
a.value !==
|
|
153
|
+
a.value !== n.modelValue ? (c(), C(z, X({
|
|
154
154
|
key: 0,
|
|
155
155
|
icon: "",
|
|
156
156
|
styling: "soft"
|
|
157
|
-
},
|
|
157
|
+
}, n.button, { onClick: f }), null, 16)) : T("", !0)
|
|
158
158
|
]));
|
|
159
159
|
}
|
|
160
160
|
}), he = {
|
|
@@ -180,24 +180,24 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
180
180
|
modelModifiers: {}
|
|
181
181
|
}),
|
|
182
182
|
emits: /* @__PURE__ */ D(["update:modelValue"], ["update:modelValue"]),
|
|
183
|
-
setup(
|
|
184
|
-
const e = j(
|
|
183
|
+
setup(r, { emit: d }) {
|
|
184
|
+
const e = j(r, "modelValue"), a = r, m = V(null);
|
|
185
185
|
k(e, () => {
|
|
186
|
-
var
|
|
187
|
-
(
|
|
186
|
+
var n, p, i, y, b;
|
|
187
|
+
(n = a.radiosProps) != null && n.some((u) => u.value === e.value) || (e.value = ((i = (p = a.radiosProps) == null ? void 0 : p[0]) == null ? void 0 : i.value) ?? ""), (b = (y = m.value) == null ? void 0 : y.querySelector(".radioGroup_item-selected")) == null || b.scrollIntoView();
|
|
188
188
|
}, { immediate: !0 });
|
|
189
189
|
const f = "radioGroup-" + Math.random();
|
|
190
|
-
return (
|
|
190
|
+
return (n, p) => (c(), v("div", {
|
|
191
191
|
ref_key: "elRef",
|
|
192
192
|
ref: m,
|
|
193
193
|
class: I({
|
|
194
194
|
"top-radioGroup": !0,
|
|
195
195
|
"top-scrollBarXHidding": !0,
|
|
196
|
-
["top-size_" +
|
|
197
|
-
"top-error":
|
|
196
|
+
["top-size_" + n.size]: !!n.size,
|
|
197
|
+
"top-error": n.isError
|
|
198
198
|
})
|
|
199
199
|
}, [
|
|
200
|
-
(c(!0), v(P, null, H(
|
|
200
|
+
(c(!0), v(P, null, H(n.radiosProps, (i) => (c(), v("label", {
|
|
201
201
|
class: I({
|
|
202
202
|
"top-radioGroup_item-selected": i.value === e.value,
|
|
203
203
|
"top-radioGroup_item": !0,
|
|
@@ -208,7 +208,7 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
208
208
|
onClick: (y) => e.value = i.value
|
|
209
209
|
}, [
|
|
210
210
|
B($(i.title) + " ", 1),
|
|
211
|
-
|
|
211
|
+
n.showIndicator ? (c(), v("span", Te)) : T("", !0),
|
|
212
212
|
Y(E("input", {
|
|
213
213
|
"onUpdate:modelValue": p[0] || (p[0] = (y) => e.value = y),
|
|
214
214
|
name: f,
|
|
@@ -234,16 +234,16 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
234
234
|
"top-disabled": "top-disabled"
|
|
235
235
|
}, Ce = {
|
|
236
236
|
$style: we
|
|
237
|
-
}, Ie = /* @__PURE__ */ K(_e, [["__cssModules", Ce]]), $e = (
|
|
237
|
+
}, Ie = /* @__PURE__ */ K(_e, [["__cssModules", Ce]]), $e = (r, d, e) => {
|
|
238
238
|
const a = V([]), m = V(!1);
|
|
239
|
-
let f = "",
|
|
240
|
-
|
|
239
|
+
let f = "", n;
|
|
240
|
+
r && !r.params.limit && (r.params.limit = 100);
|
|
241
241
|
const p = async () => {
|
|
242
|
-
if (!
|
|
242
|
+
if (!r) return;
|
|
243
243
|
let o, g;
|
|
244
|
-
if (e && (
|
|
244
|
+
if (e && (r.cache ??= /* @__PURE__ */ new Map(), g = JSON.stringify(r.params), o = r.cache.get(g), o))
|
|
245
245
|
return o;
|
|
246
|
-
if (m.value = !0, o = await
|
|
246
|
+
if (m.value = !0, o = await r.call(), m.value = !1, o.errors) return;
|
|
247
247
|
if (!Array.isArray(o.result)) {
|
|
248
248
|
console.warn("В result ожидался массив");
|
|
249
249
|
return;
|
|
@@ -253,24 +253,24 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
253
253
|
console.warn(`В result[${h}] нет id или name`);
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
256
|
-
return e &&
|
|
256
|
+
return e && r.cache.set(g, o), o;
|
|
257
257
|
}, i = async () => {
|
|
258
|
-
if (!
|
|
259
|
-
|
|
258
|
+
if (!r) return;
|
|
259
|
+
r.params.offset = 0, r.params.search = f;
|
|
260
260
|
const o = await p();
|
|
261
|
-
o && (
|
|
261
|
+
o && (n = o.nextOffset, a.value = o.result);
|
|
262
262
|
}, y = async () => {
|
|
263
|
-
if (!
|
|
264
|
-
|
|
263
|
+
if (!r || !n || m.value) return;
|
|
264
|
+
r.params.offset = n, r.params.search = f;
|
|
265
265
|
const o = await p();
|
|
266
|
-
o && (
|
|
266
|
+
o && (n = o.nextOffset, a.value = a.value.concat(o.result));
|
|
267
267
|
}, b = ae(() => i(), 200);
|
|
268
268
|
return {
|
|
269
269
|
items: a,
|
|
270
270
|
isLoading: m,
|
|
271
271
|
loadAppend: y,
|
|
272
272
|
setSearchTextAndLoad: (o, g = !0) => {
|
|
273
|
-
|
|
273
|
+
r && (o.length < d || o === f && a.value.length || (f = o, g ? b() : i()));
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
276
|
}, Se = { class: "top-selector2_itemMulti top-ellipsis" }, Be = /* @__PURE__ */ L({
|
|
@@ -280,7 +280,7 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
280
280
|
name: {}
|
|
281
281
|
},
|
|
282
282
|
emits: ["delete"],
|
|
283
|
-
setup(
|
|
283
|
+
setup(r) {
|
|
284
284
|
return (d, e) => (c(), v("div", Se, [
|
|
285
285
|
B($(d.name) + " ", 1),
|
|
286
286
|
E("span", {
|
|
@@ -327,11 +327,11 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
327
327
|
modelModifiers: {}
|
|
328
328
|
}),
|
|
329
329
|
emits: ["update:modelValue"],
|
|
330
|
-
setup(
|
|
331
|
-
const d =
|
|
330
|
+
setup(r) {
|
|
331
|
+
const d = r, e = j(r, "modelValue"), a = V(""), m = {
|
|
332
332
|
id: 0,
|
|
333
333
|
name: "Все"
|
|
334
|
-
}, f = V(null),
|
|
334
|
+
}, f = V(null), n = () => {
|
|
335
335
|
var t;
|
|
336
336
|
return (t = f.value) == null ? void 0 : t.popup;
|
|
337
337
|
};
|
|
@@ -344,53 +344,53 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
344
344
|
);
|
|
345
345
|
const p = $e(d.apiRequest, d.minLength, d.useCache), i = N(() => {
|
|
346
346
|
const t = [];
|
|
347
|
-
return !d.multiselect && d.appendAllValue && t.push(m), d.items.forEach((
|
|
348
|
-
}), y = (t,
|
|
349
|
-
const t = a.value.toLowerCase(),
|
|
347
|
+
return !d.multiselect && d.appendAllValue && t.push(m), d.items.forEach((s) => t.push({ ...s })), t;
|
|
348
|
+
}), y = (t, s = !0) => s && t.id === null ? Array.isArray(e.value) ? e.value.some((l) => l.id === t.id && l.name === t.name) : t.name === e.value.name : Array.isArray(e.value) ? e.value.some((l) => l.id === t.id) : t.id === e.value.id, b = N(() => {
|
|
349
|
+
const t = a.value.toLowerCase(), s = re(t);
|
|
350
350
|
let l = [];
|
|
351
351
|
return i.value.forEach((A) => {
|
|
352
352
|
const _ = A.name.toLowerCase();
|
|
353
|
-
(A.id === Number(t) || _.includes(t) || _.includes(
|
|
353
|
+
(A.id === Number(t) || _.includes(t) || _.includes(s)) && (_ === t || _ === s ? l.unshift(A) : l.push(A));
|
|
354
354
|
}), l.push(...p.items.value), d.appendSearchToResult && a.value && (!l.length || l[0].name.toLowerCase() !== t) && l.push({
|
|
355
355
|
id: null,
|
|
356
356
|
name: a.value
|
|
357
357
|
}), d.multiselect && (l = l.filter((A) => !y(A))), l;
|
|
358
358
|
}), u = async (t) => {
|
|
359
|
-
var
|
|
359
|
+
var s, l;
|
|
360
360
|
if (d.multiselect) {
|
|
361
361
|
if (!Array.isArray(e.value) || y(t))
|
|
362
362
|
return;
|
|
363
363
|
const A = [...e.value];
|
|
364
|
-
A.push({ ...t }), e.value = A, se.state.isMobile ? (
|
|
364
|
+
A.push({ ...t }), e.value = A, se.state.isMobile ? (s = n()) == null || s.close() : setTimeout(() => {
|
|
365
365
|
var _, U, W, J;
|
|
366
|
-
(_ =
|
|
366
|
+
(_ = n()) == null || _.recalcPosition(), (J = (W = (U = n()) == null ? void 0 : U.elPopupWidget) == null ? void 0 : W.querySelector("input")) == null || J.focus(), a.value && (b.value.length || (a.value = "", p.items.value = []));
|
|
367
367
|
});
|
|
368
368
|
} else
|
|
369
|
-
a.value && (a.value = "", p.items.value = []), JSON.stringify(t) !== JSON.stringify(e.value) && (e.value = { ...t }), (l =
|
|
369
|
+
a.value && (a.value = "", p.items.value = []), JSON.stringify(t) !== JSON.stringify(e.value) && (e.value = { ...t }), (l = n()) == null || l.close();
|
|
370
370
|
}, o = () => {
|
|
371
371
|
if (!Array.isArray(e.value)) {
|
|
372
|
-
const
|
|
373
|
-
e.value = { ...i.value[
|
|
372
|
+
const s = (i.value.findIndex((l) => l.id === e.value.id) + 1) % i.value.length;
|
|
373
|
+
e.value = { ...i.value[s] };
|
|
374
374
|
}
|
|
375
375
|
}, g = async (t) => {
|
|
376
|
-
Array.isArray(e.value) && (e.value = e.value.filter((
|
|
377
|
-
var
|
|
378
|
-
(
|
|
376
|
+
Array.isArray(e.value) && (e.value = e.value.filter((s) => s.id !== t), setTimeout(() => {
|
|
377
|
+
var s;
|
|
378
|
+
(s = n()) == null || s.recalcPosition();
|
|
379
379
|
}));
|
|
380
380
|
}, h = V(!1);
|
|
381
381
|
d.apiRequest && (k(h, () => {
|
|
382
382
|
h.value && p.setSearchTextAndLoad(a.value, !1);
|
|
383
383
|
}), k(a, () => p.setSearchTextAndLoad(a.value)));
|
|
384
384
|
const G = (t) => {
|
|
385
|
-
const
|
|
386
|
-
|
|
385
|
+
const s = t.target;
|
|
386
|
+
s.scrollTop / (s.scrollHeight - s.offsetHeight) > 0.8 && p.loadAppend();
|
|
387
387
|
};
|
|
388
|
-
return (t,
|
|
388
|
+
return (t, s) => (c(), C(M(ne), {
|
|
389
389
|
ref_key: "popupRef",
|
|
390
390
|
ref: f,
|
|
391
|
-
onOpen:
|
|
392
|
-
onClose:
|
|
393
|
-
onScrollContentList:
|
|
391
|
+
onOpen: s[1] || (s[1] = (l) => h.value = !0),
|
|
392
|
+
onClose: s[2] || (s[2] = (l) => h.value = !1),
|
|
393
|
+
onScrollContentList: s[3] || (s[3] = (l) => t.apiRequest ? G(l) : void 0),
|
|
394
394
|
notch: !1,
|
|
395
395
|
transitionDuration: 0
|
|
396
396
|
}, {
|
|
@@ -425,7 +425,7 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
425
425
|
title: "Поиск",
|
|
426
426
|
icon: "",
|
|
427
427
|
modelValue: a.value,
|
|
428
|
-
"onUpdate:modelValue":
|
|
428
|
+
"onUpdate:modelValue": s[0] || (s[0] = (l) => a.value = l),
|
|
429
429
|
isLoading: M(p).isLoading.value,
|
|
430
430
|
placeholder: !Array.isArray(e.value) && !t.multiselect && t.showSelectedInInput ? e.value.name : t.placeholder
|
|
431
431
|
}, null, 8, ["modelValue", "isLoading", "placeholder"])
|
|
@@ -452,9 +452,9 @@ const de = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
452
452
|
key: 0,
|
|
453
453
|
type: "regular"
|
|
454
454
|
}, {
|
|
455
|
-
default: w(() => [
|
|
455
|
+
default: w(() => s[4] || (s[4] = [
|
|
456
456
|
B(" Нет результатов ")
|
|
457
|
-
]),
|
|
457
|
+
])),
|
|
458
458
|
_: 1
|
|
459
459
|
}))
|
|
460
460
|
]),
|