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