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