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