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