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