@topvisor/ui 0.9.26-dev → 0.9.27-dev
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-C0rB8tdN.amd.js → datepicker-34kJtztn.amd.js} +2 -2
- package/.chunks/{datepicker-C0rB8tdN.amd.js.map → datepicker-34kJtztn.amd.js.map} +1 -1
- package/.chunks/{datepicker-BMrdz1zd.es.js → datepicker-DwZTG-k0.es.js} +3 -4
- package/.chunks/{datepicker-BMrdz1zd.es.js.map → datepicker-DwZTG-k0.es.js.map} +1 -1
- package/.chunks/forms-1ZAO_mt8.es.js +1179 -0
- package/.chunks/forms-1ZAO_mt8.es.js.map +1 -0
- package/.chunks/forms-D_IeAEJM.amd.js +3 -0
- package/.chunks/forms-D_IeAEJM.amd.js.map +1 -0
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CHYNz0kA.es.js → listItem.vue_vue_type_script_setup_true_lang-DsAW8MMm.es.js} +38 -38
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-DsAW8MMm.es.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-HVMrwfs6.amd.js +2 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-HVMrwfs6.amd.js.map +1 -0
- package/.chunks/menu-C-SkDk9B.amd.js +2 -0
- package/.chunks/menu-C-SkDk9B.amd.js.map +1 -0
- package/.chunks/menu-CBKYqQZZ.es.js +120 -0
- package/.chunks/menu-CBKYqQZZ.es.js.map +1 -0
- package/.chunks/{popup-CyJ0WBUB.amd.js → popup-7Bt5JEDW.amd.js} +2 -2
- package/.chunks/{popup-CyJ0WBUB.amd.js.map → popup-7Bt5JEDW.amd.js.map} +1 -1
- package/.chunks/{popup-B2BoAirk.es.js → popup-D0tRWEp2.es.js} +9 -16
- package/.chunks/{popup-B2BoAirk.es.js.map → popup-D0tRWEp2.es.js.map} +1 -1
- package/.chunks/{widgetInput-Ce8a61St.amd.js → widgetInput-CeUAGCKd.amd.js} +2 -2
- package/.chunks/widgetInput-CeUAGCKd.amd.js.map +1 -0
- package/.chunks/{widgetInput-pNYn7i5g.es.js → widgetInput-CmVe9G3z.es.js} +2 -2
- package/.chunks/{widgetInput-pNYn7i5g.es.js.map → widgetInput-CmVe9G3z.es.js.map} +1 -1
- package/assets/forms.css +1 -1
- package/assets/formsExt.css +1 -1
- package/assets/menu.css +1 -0
- package/assets/project.css +1 -0
- package/core/core.amd.js +1 -1
- package/core/core.js +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +8 -8
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +248 -357
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/demo.html +16 -2
- package/icomoon/fonts/Topvisor-2.svg +1 -0
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +6 -3
- package/package.json +2 -2
- package/popup/popup.amd.js +1 -1
- package/popup/popup.js +2 -2
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.d.ts +2 -0
- package/popup/worker.js +4 -6
- package/popup/worker.js.map +1 -1
- package/project/project.amd.js +2 -0
- package/project/project.amd.js.map +1 -0
- package/project/project.d.ts +1 -0
- package/project/project.js +93 -0
- package/project/project.js.map +1 -0
- package/src/components/forms/avatar/avatar.stories.d.ts +16 -15
- package/src/components/forms/avatar/avatar.vue.d.ts +5 -4
- package/src/components/forms/button/button.d.ts +2 -2
- package/src/components/forms/button/button.stories.d.ts +59 -58
- package/src/components/forms/button/button.vue.d.ts +7 -6
- package/src/components/forms/checkbox/checkbox.stories.d.ts +35 -34
- package/src/components/forms/checkbox/checkbox.vue.d.ts +16 -16
- package/src/components/forms/controlLabel/controlLabel.stories.d.ts +13 -13
- package/src/components/forms/controlLabel/controlLabel.vue.d.ts +3 -2
- package/src/components/forms/hint/hint.stories.d.ts +44 -44
- package/src/components/forms/hint/hint.vue.d.ts +3 -2
- package/src/components/forms/input/input.d.ts +2 -2
- package/src/components/forms/input/input.stories.d.ts +64 -63
- package/src/components/forms/input/input.vue.d.ts +7 -6
- package/src/components/forms/inputDate/inputDate.d.ts +2 -1
- package/src/components/forms/inputDate/inputDate.stories.d.ts +31 -30
- package/src/components/forms/inputDate/inputDate.vue.d.ts +5 -4
- package/src/components/forms/inputRange/inputRange.stories.d.ts +93 -92
- package/src/components/forms/inputRange/inputRange.vue.d.ts +1 -1
- package/src/components/forms/loadbar/loadbar.stories.d.ts +1 -1
- package/src/components/forms/loadbar/loadbar.vue.d.ts +1 -1
- package/src/components/forms/radio/radio.stories.d.ts +33 -32
- package/src/components/forms/radio/radio.vue.d.ts +4 -3
- package/src/components/forms/select/select.d.ts +2 -2
- package/src/components/forms/select/select.stories.d.ts +24 -23
- package/src/components/forms/select/select.vue.d.ts +22 -22
- package/src/components/forms/select/stories/exampleOptions.d.ts +2 -1
- package/src/components/forms/switcher/switcher.stories.d.ts +33 -32
- package/src/components/forms/switcher/switcher.vue.d.ts +4 -3
- package/src/components/forms/textarea/textarea.stories.d.ts +25 -24
- package/src/components/forms/textarea/textarea.vue.d.ts +5 -4
- package/src/components/formsExt/editArea/editArea.d.ts +2 -1
- package/src/components/formsExt/editArea/editArea.stories.d.ts +47 -46
- package/src/components/formsExt/editArea/editArea.vue.d.ts +5 -4
- package/src/components/formsExt/editInput/editInput.d.ts +3 -2
- package/src/components/formsExt/editInput/editInput.stories.d.ts +21 -20
- package/src/components/formsExt/editInput/editInput.vue.d.ts +4 -3
- package/src/components/formsExt/menu/menu.d.ts +2 -1
- package/src/components/formsExt/menu/menu.stories.d.ts +16 -15
- package/src/components/formsExt/menu/menu.vue.d.ts +16 -15
- package/src/components/formsExt/menu/stories/items.d.ts +2 -1
- package/src/components/formsExt/radioGroup/radioGroup.d.ts +2 -2
- package/src/components/formsExt/radioGroup/radioGroup.stories.d.ts +16 -15
- package/src/components/formsExt/radioGroup/radioGroup.vue.d.ts +14 -14
- package/src/components/formsExt/selector2/api.d.ts +3 -2
- package/src/components/formsExt/selector2/itemMulti.vue.d.ts +4 -3
- package/src/components/formsExt/selector2/selector2.d.ts +2 -2
- package/src/components/formsExt/selector2/selector2.stories.d.ts +67 -66
- package/src/components/formsExt/selector2/selector2.vue.d.ts +33 -32
- package/src/components/popup/lib/popup.d.ts +2 -4
- package/src/components/popup/lib/worker.d.ts +2 -1
- package/src/components/popup/popup/listItem.vue.d.ts +4 -3
- package/src/components/popup/popup/opener.vue.d.ts +6 -5
- package/src/components/popup/popup/popup.stories.d.ts +217 -216
- package/src/components/popup/popup/popup.vue.d.ts +8 -7
- package/src/components/popup/popup/widgetInput.vue.d.ts +28 -28
- package/src/components/project/project.d.ts +1 -0
- package/src/components/project/selectorCompetitors/selectorCompetitors.d.ts +20 -0
- package/src/components/project/selectorCompetitors/selectorCompetitors.stories.d.ts +42 -0
- package/src/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +24 -0
- package/src/components/project/selectorCompetitors/stories/items.d.ts +4 -0
- package/src/components/tabs/tabs/content.vue.d.ts +3 -2
- package/src/components/tabs/tabs/tab.vue.d.ts +3 -2
- package/src/components/tabs/tabs/tabs.stories.d.ts +184 -184
- package/src/components/tabs/tabs/tabs.vue.d.ts +3 -2
- package/src/components/tabsView/tabsView/menu.vue.d.ts +6 -6
- package/src/components/tabsView/tabsView/menuDelimeter.vue.d.ts +1 -1
- package/src/components/tabsView/tabsView/menuItem.vue.d.ts +5 -4
- package/src/components/tabsView/tabsView/menuTitle.vue.d.ts +3 -2
- package/src/components/tabsView/tabsView/store.d.ts +23 -22
- package/src/components/tabsView/tabsView/tabsView.d.ts +2 -1
- package/src/components/tabsView/tabsView/tabsView.stories.d.ts +94 -94
- package/src/components/tabsView/tabsView/tabsView.vue.d.ts +12 -12
- package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuItem.stories.d.ts +92 -92
- package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuTitle.stories.d.ts +44 -44
- package/src/core/core/core.d.ts +3 -3
- package/src/core/core/page.d.ts +4 -0
- package/src/core/core/state.d.ts +4 -0
- package/src/core/utils/check.d.ts +22 -0
- package/src/core/utils/date.d.ts +30 -12
- package/src/core/utils/device.d.ts +34 -1
- package/src/core/utils/dom.d.ts +23 -27
- package/src/core/utils/image.d.ts +6 -0
- package/src/core/utils/keyboard.d.ts +3 -0
- package/src/core/utils/number.d.ts +7 -0
- package/src/core/utils/price.d.ts +8 -0
- package/src/core/utils/scroll.d.ts +4 -0
- package/src/core/utils/store/localStorage.d.ts +2 -1
- package/src/core/utils/store/plugin.d.ts +3 -2
- package/src/core/utils/store/store.d.ts +3 -11
- package/src/core/utils/string.d.ts +80 -0
- package/src/core/utils/url.d.ts +32 -0
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.js +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +6 -10
- package/tabsView/tabsView.js.map +1 -1
- package/utils/check.amd.js +2 -0
- package/utils/check.amd.js.map +1 -0
- package/utils/check.d.ts +1 -0
- package/utils/check.js +26 -0
- package/utils/check.js.map +1 -0
- package/utils/css.amd.js.map +1 -1
- package/utils/css.js +1 -2
- package/utils/css.js.map +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +8 -5
- package/utils/device.amd.js +1 -1
- package/utils/device.js +11 -7
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/utils/image.amd.js +2 -0
- package/utils/image.amd.js.map +1 -0
- package/utils/image.d.ts +1 -0
- package/utils/image.js +8 -0
- package/utils/image.js.map +1 -0
- package/utils/keyboard.amd.js.map +1 -1
- package/utils/keyboard.js.map +1 -1
- package/utils/number.amd.js +2 -0
- package/utils/number.amd.js.map +1 -0
- package/utils/number.d.ts +1 -0
- package/utils/number.js +9 -0
- package/utils/number.js.map +1 -0
- package/utils/price.amd.js +2 -0
- package/utils/price.amd.js.map +1 -0
- package/utils/price.d.ts +1 -0
- package/utils/price.js +10 -0
- package/utils/price.js.map +1 -0
- package/utils/route.amd.js.map +1 -1
- 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 +21 -15
- package/utils/scroll.js.map +1 -1
- package/utils/string.amd.js +2 -0
- package/utils/string.amd.js.map +1 -0
- package/utils/string.d.ts +1 -0
- package/utils/string.js +138 -0
- package/utils/string.js.map +1 -0
- package/utils/system.amd.js.map +1 -1
- package/utils/system.js.map +1 -1
- package/utils/url.amd.js +3 -0
- package/utils/url.amd.js.map +1 -0
- package/utils/url.d.ts +1 -0
- package/utils/url.js +176 -0
- package/utils/url.js.map +1 -0
- package/utils/window.amd.js +1 -1
- package/utils/window.js +1 -1
- package/.chunks/forms-C4UtO06K.es.js +0 -1026
- package/.chunks/forms-C4UtO06K.es.js.map +0 -1
- package/.chunks/forms-DujTMzoW.amd.js +0 -3
- package/.chunks/forms-DujTMzoW.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CHYNz0kA.es.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Ob3185Bq.amd.js +0 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Ob3185Bq.amd.js.map +0 -1
- package/.chunks/widgetInput-Ce8a61St.amd.js.map +0 -1
package/formsExt/formsExt.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { insertToPage as Z } from "../utils/css.js";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { T as
|
|
4
|
-
import { invertKeyboardLayout as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { P as
|
|
7
|
-
import { debounce as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { defineComponent as K, ref as V, computed as N, resolveDirective as q, openBlock as c, createElementBlock as v, normalizeClass as T, toDisplayString as C, createCommentVNode as _, createElementVNode as E, withDirectives as Y, createVNode as F, withKeys as O, withModifiers as B, createBlock as I, withCtx as $, createTextVNode as M, watch as S, toRef as ee, mergeProps as X, renderSlot as j, mergeModels as D, useModel as Q, Fragment as P, renderList as H, vModelRadio as te, unref as k } from "vue";
|
|
3
|
+
import { T as oe, B as z, a as L, I as le, C as ae } from "../.chunks/forms-1ZAO_mt8.es.js";
|
|
4
|
+
import { invertKeyboardLayout as re } from "../utils/keyboard.js";
|
|
5
|
+
import { _ as se, b as R } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-DsAW8MMm.es.js";
|
|
6
|
+
import { P as ne } from "../.chunks/widgetInput-CmVe9G3z.es.js";
|
|
7
|
+
import { debounce as ie } from "lodash";
|
|
8
|
+
import { M as Re } from "../.chunks/menu-CBKYqQZZ.es.js";
|
|
9
|
+
const x = ["../assets/formsExt.css"].map((s) => import.meta.resolve(s));
|
|
10
|
+
await Z(x);
|
|
11
|
+
const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
|
|
11
12
|
__name: "editArea",
|
|
12
13
|
props: {
|
|
13
14
|
defaultValue: { default: "" },
|
|
@@ -30,90 +31,90 @@ const ce = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
30
31
|
hint: {}
|
|
31
32
|
},
|
|
32
33
|
emits: ["submit", "close", "clickOnTitle"],
|
|
33
|
-
setup(
|
|
34
|
-
const e =
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
if (e.forceShowCloseBtn && !
|
|
38
|
-
|
|
34
|
+
setup(s, { emit: d }) {
|
|
35
|
+
const e = s, a = d, m = V(e.defaultValue), f = V(e.isFocused), r = N(() => m.value !== e.defaultValue), p = N(() => e.attachToKeyboard ? "" : e.forceShowCloseBtn && !r.value ? e.closeText : e.cancelText), i = (u) => {
|
|
36
|
+
a("submit", u), m.value = e.defaultValue;
|
|
37
|
+
}, y = () => {
|
|
38
|
+
if (e.forceShowCloseBtn && !r.value) {
|
|
39
|
+
a("close");
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
e.attachToKeyboard &&
|
|
42
|
+
m.value = e.defaultValue;
|
|
43
|
+
}, A = () => {
|
|
44
|
+
e.attachToKeyboard && a("clickOnTitle");
|
|
44
45
|
};
|
|
45
|
-
return (
|
|
46
|
-
const
|
|
47
|
-
return
|
|
48
|
-
class:
|
|
46
|
+
return (u, o) => {
|
|
47
|
+
const g = q("focus");
|
|
48
|
+
return c(), v("div", {
|
|
49
|
+
class: T({
|
|
49
50
|
"top-editArea": !0,
|
|
50
|
-
"top-editArea-attachedToKeyboard":
|
|
51
|
+
"top-editArea-attachedToKeyboard": u.attachToKeyboard
|
|
51
52
|
})
|
|
52
53
|
}, [
|
|
53
|
-
|
|
54
|
+
u.title ? (c(), v("div", {
|
|
54
55
|
key: 0,
|
|
55
56
|
class: "top-editArea_title",
|
|
56
|
-
onClick:
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
class:
|
|
57
|
+
onClick: o[0] || (o[0] = (h) => A())
|
|
58
|
+
}, C(u.title), 1)) : _("", !0),
|
|
59
|
+
E("div", {
|
|
60
|
+
class: T({
|
|
60
61
|
"top-editArea_form": !0,
|
|
61
|
-
"top-error":
|
|
62
|
-
"top-editArea_form-focus":
|
|
62
|
+
"top-error": u.isError,
|
|
63
|
+
"top-editArea_form-focus": f.value
|
|
63
64
|
})
|
|
64
65
|
}, [
|
|
65
|
-
|
|
66
|
-
modelValue:
|
|
67
|
-
"onUpdate:modelValue":
|
|
68
|
-
name:
|
|
69
|
-
placeholder:
|
|
70
|
-
rows:
|
|
71
|
-
minHeight:
|
|
72
|
-
expandable:
|
|
73
|
-
disabled:
|
|
74
|
-
readonly:
|
|
75
|
-
isError:
|
|
76
|
-
hint:
|
|
66
|
+
Y(F(oe, {
|
|
67
|
+
modelValue: m.value,
|
|
68
|
+
"onUpdate:modelValue": o[1] || (o[1] = (h) => m.value = h),
|
|
69
|
+
name: u.name,
|
|
70
|
+
placeholder: u.placeholder,
|
|
71
|
+
rows: u.rows,
|
|
72
|
+
minHeight: u.minHeight,
|
|
73
|
+
expandable: u.expandable,
|
|
74
|
+
disabled: u.disabled,
|
|
75
|
+
readonly: u.readonly,
|
|
76
|
+
isError: u.isError,
|
|
77
|
+
hint: u.hint,
|
|
77
78
|
class: "top-editArea_element",
|
|
78
|
-
onFocus:
|
|
79
|
-
onBlur:
|
|
79
|
+
onFocus: o[2] || (o[2] = () => f.value = !0),
|
|
80
|
+
onBlur: o[3] || (o[3] = () => f.value = !1),
|
|
80
81
|
onKeyup: [
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
O(y, ["esc"]),
|
|
83
|
+
o[4] || (o[4] = O(B((h) => i(m.value), ["ctrl"]), ["enter"]))
|
|
83
84
|
]
|
|
84
85
|
}, null, 8, ["modelValue", "name", "placeholder", "rows", "minHeight", "expandable", "disabled", "readonly", "isError", "hint"]), [
|
|
85
|
-
[
|
|
86
|
+
[g, f.value]
|
|
86
87
|
]),
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
E("div", ue, [
|
|
89
|
+
r.value || u.forceShowCloseBtn ? (c(), I(z, {
|
|
89
90
|
key: 0,
|
|
90
91
|
class: "top-editArea_button",
|
|
91
92
|
color: "theme",
|
|
92
|
-
icon:
|
|
93
|
-
onClick:
|
|
93
|
+
icon: u.attachToKeyboard ? "" : "",
|
|
94
|
+
onClick: y
|
|
94
95
|
}, {
|
|
95
|
-
default:
|
|
96
|
-
|
|
96
|
+
default: $(() => [
|
|
97
|
+
M(C(p.value), 1)
|
|
97
98
|
]),
|
|
98
99
|
_: 1
|
|
99
|
-
}, 8, ["icon"])) :
|
|
100
|
-
|
|
100
|
+
}, 8, ["icon"])) : _("", !0),
|
|
101
|
+
r.value ? (c(), I(z, {
|
|
101
102
|
key: 1,
|
|
102
103
|
class: "top-editArea_button",
|
|
103
|
-
icon:
|
|
104
|
-
onClick:
|
|
104
|
+
icon: u.attachToKeyboard ? "" : "",
|
|
105
|
+
onClick: o[5] || (o[5] = (h) => i(m.value))
|
|
105
106
|
}, {
|
|
106
|
-
default:
|
|
107
|
-
|
|
107
|
+
default: $(() => [
|
|
108
|
+
M(C(u.attachToKeyboard ? "" : u.submitText), 1)
|
|
108
109
|
]),
|
|
109
110
|
_: 1
|
|
110
|
-
}, 8, ["icon"])) :
|
|
111
|
+
}, 8, ["icon"])) : _("", !0)
|
|
111
112
|
])
|
|
112
113
|
], 2)
|
|
113
114
|
], 2);
|
|
114
115
|
};
|
|
115
116
|
}
|
|
116
|
-
}),
|
|
117
|
+
}), pe = {
|
|
117
118
|
"top-editArea": "top-editArea",
|
|
118
119
|
"top-editArea_title": "top-editArea_title",
|
|
119
120
|
"top-editArea_form": "top-editArea_form",
|
|
@@ -125,9 +126,9 @@ const ce = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
125
126
|
"top-editArea-attachedToKeyboard": "top-editArea-attachedToKeyboard",
|
|
126
127
|
"top-button": "top-button",
|
|
127
128
|
"top-editArea_button": "top-editArea_button"
|
|
128
|
-
},
|
|
129
|
-
$style:
|
|
130
|
-
},
|
|
129
|
+
}, ce = {
|
|
130
|
+
$style: pe
|
|
131
|
+
}, ze = /* @__PURE__ */ L(de, [["__cssModules", ce]]), me = { class: "top-editInput" }, fe = /* @__PURE__ */ K({
|
|
131
132
|
__name: "editInput",
|
|
132
133
|
props: {
|
|
133
134
|
modelValue: {},
|
|
@@ -135,44 +136,44 @@ const ce = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
135
136
|
button: {}
|
|
136
137
|
},
|
|
137
138
|
emits: ["update:modelValue"],
|
|
138
|
-
setup(
|
|
139
|
-
const e =
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
setup(s, { emit: d }) {
|
|
140
|
+
const e = s, a = V(e.modelValue);
|
|
141
|
+
S(ee(e.modelValue), () => {
|
|
142
|
+
a.value = e.modelValue;
|
|
142
143
|
});
|
|
143
|
-
const
|
|
144
|
-
|
|
144
|
+
const m = d, f = () => {
|
|
145
|
+
m("update:modelValue", a.value);
|
|
145
146
|
};
|
|
146
|
-
return (
|
|
147
|
-
F(
|
|
148
|
-
onKeydownCapture: p[0] || (p[0] =
|
|
149
|
-
onKeydown:
|
|
150
|
-
modelValue:
|
|
151
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
147
|
+
return (r, p) => (c(), v("div", me, [
|
|
148
|
+
F(le, X(r.input, {
|
|
149
|
+
onKeydownCapture: p[0] || (p[0] = O(B((i) => a.value = r.modelValue, ["stop"]), ["esc"])),
|
|
150
|
+
onKeydown: O(B(f, ["stop"]), ["enter"]),
|
|
151
|
+
modelValue: a.value,
|
|
152
|
+
"onUpdate:modelValue": p[1] || (p[1] = (i) => a.value = i)
|
|
152
153
|
}), null, 16, ["onKeydown", "modelValue"]),
|
|
153
|
-
|
|
154
|
+
a.value !== r.modelValue ? (c(), I(z, X({
|
|
154
155
|
key: 0,
|
|
155
156
|
icon: "",
|
|
156
157
|
styling: "soft"
|
|
157
|
-
},
|
|
158
|
-
default:
|
|
159
|
-
j(
|
|
158
|
+
}, r.button, { onClick: f }), {
|
|
159
|
+
default: $(() => [
|
|
160
|
+
j(r.$slots, "default")
|
|
160
161
|
]),
|
|
161
162
|
_: 3
|
|
162
|
-
}, 16)) :
|
|
163
|
+
}, 16)) : _("", !0)
|
|
163
164
|
]));
|
|
164
165
|
}
|
|
165
|
-
}),
|
|
166
|
+
}), ve = {
|
|
166
167
|
"top-editInput": "top-editInput",
|
|
167
168
|
"top-input": "top-input"
|
|
168
|
-
},
|
|
169
|
-
$style:
|
|
170
|
-
},
|
|
169
|
+
}, ye = {
|
|
170
|
+
$style: ve
|
|
171
|
+
}, Fe = /* @__PURE__ */ L(fe, [["__cssModules", ye]]), he = ["data-top-icon", "onClick"], Ae = {
|
|
171
172
|
key: 0,
|
|
172
173
|
class: "top-radioGroup_circle"
|
|
173
|
-
},
|
|
174
|
+
}, be = ["value", "disabled"], ge = /* @__PURE__ */ K({
|
|
174
175
|
__name: "radioGroup",
|
|
175
|
-
props: /* @__PURE__ */
|
|
176
|
+
props: /* @__PURE__ */ D({
|
|
176
177
|
modelValue: {},
|
|
177
178
|
radiosProps: {},
|
|
178
179
|
showIndicator: { type: Boolean },
|
|
@@ -184,52 +185,52 @@ const ce = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
184
185
|
},
|
|
185
186
|
modelModifiers: {}
|
|
186
187
|
}),
|
|
187
|
-
emits: /* @__PURE__ */
|
|
188
|
-
setup(
|
|
189
|
-
const e =
|
|
190
|
-
|
|
191
|
-
var
|
|
192
|
-
(
|
|
188
|
+
emits: /* @__PURE__ */ D(["update:modelValue"], ["update:modelValue"]),
|
|
189
|
+
setup(s, { emit: d }) {
|
|
190
|
+
const e = Q(s, "modelValue"), a = s, m = V(null);
|
|
191
|
+
S(e, () => {
|
|
192
|
+
var r, p, i, y, A;
|
|
193
|
+
(r = a.radiosProps) != null && r.some((u) => u.value === e.value) || (e.value = ((i = (p = a.radiosProps) == null ? void 0 : p[0]) == null ? void 0 : i.value) ?? ""), (A = (y = m.value) == null ? void 0 : y.querySelector(".radioGroup_item-selected")) == null || A.scrollIntoView();
|
|
193
194
|
}, { immediate: !0 });
|
|
194
|
-
const
|
|
195
|
-
return (
|
|
195
|
+
const f = "radioGroup-" + Math.random();
|
|
196
|
+
return (r, p) => (c(), v("div", {
|
|
196
197
|
ref_key: "elRef",
|
|
197
|
-
ref:
|
|
198
|
-
class:
|
|
198
|
+
ref: m,
|
|
199
|
+
class: T({
|
|
199
200
|
"top-radioGroup": !0,
|
|
200
201
|
"top-scrollBarXHidding": !0,
|
|
201
|
-
["top-size_" +
|
|
202
|
-
"top-error":
|
|
202
|
+
["top-size_" + r.size]: !!r.size,
|
|
203
|
+
"top-error": r.isError
|
|
203
204
|
})
|
|
204
205
|
}, [
|
|
205
|
-
(
|
|
206
|
-
class:
|
|
207
|
-
"top-radioGroup_item-selected":
|
|
206
|
+
(c(!0), v(P, null, H(r.radiosProps, (i) => (c(), v("label", {
|
|
207
|
+
class: T({
|
|
208
|
+
"top-radioGroup_item-selected": i.value === e.value,
|
|
208
209
|
"top-radioGroup_item": !0,
|
|
209
210
|
"top-forms-focusable": !0,
|
|
210
|
-
"top-disabled":
|
|
211
|
+
"top-disabled": i.disabled
|
|
211
212
|
}),
|
|
212
|
-
"data-top-icon":
|
|
213
|
-
onClick: (
|
|
213
|
+
"data-top-icon": i.icon,
|
|
214
|
+
onClick: (y) => e.value = i.value
|
|
214
215
|
}, [
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
219
|
-
name:
|
|
216
|
+
M(C(i.title) + " ", 1),
|
|
217
|
+
r.showIndicator ? (c(), v("span", Ae)) : _("", !0),
|
|
218
|
+
Y(E("input", {
|
|
219
|
+
"onUpdate:modelValue": p[0] || (p[0] = (y) => e.value = y),
|
|
220
|
+
name: f,
|
|
220
221
|
type: "radio",
|
|
221
|
-
class:
|
|
222
|
+
class: T({
|
|
222
223
|
"top-unvisible": !0
|
|
223
224
|
}),
|
|
224
|
-
value:
|
|
225
|
-
disabled:
|
|
226
|
-
}, null, 8,
|
|
225
|
+
value: i.value,
|
|
226
|
+
disabled: i.disabled
|
|
227
|
+
}, null, 8, be), [
|
|
227
228
|
[te, e.value]
|
|
228
229
|
])
|
|
229
|
-
], 10,
|
|
230
|
+
], 10, he))), 256))
|
|
230
231
|
], 2));
|
|
231
232
|
}
|
|
232
|
-
}),
|
|
233
|
+
}), _e = {
|
|
233
234
|
"top-scrollBarXHidding": "top-scrollBarXHidding",
|
|
234
235
|
"top-radioGroup": "top-radioGroup",
|
|
235
236
|
"top-radioGroup_item": "top-radioGroup_item",
|
|
@@ -237,86 +238,82 @@ const ce = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
237
238
|
"top-radioGroup_circle": "top-radioGroup_circle",
|
|
238
239
|
"top-disabled": "top-disabled",
|
|
239
240
|
"top-error": "top-error"
|
|
240
|
-
},
|
|
241
|
-
$style:
|
|
242
|
-
},
|
|
243
|
-
const
|
|
244
|
-
let
|
|
245
|
-
|
|
241
|
+
}, Ve = {
|
|
242
|
+
$style: _e
|
|
243
|
+
}, Ue = /* @__PURE__ */ L(ge, [["__cssModules", Ve]]), $e = (s, d, e) => {
|
|
244
|
+
const a = V([]), m = V(!1);
|
|
245
|
+
let f = "", r;
|
|
246
|
+
s && !s.params.limit && (s.params.limit = 100);
|
|
246
247
|
const p = async () => {
|
|
247
|
-
if (!
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
if (
|
|
253
|
-
return;
|
|
254
|
-
if (!Array.isArray(a.result)) {
|
|
248
|
+
if (!s) return;
|
|
249
|
+
let o, g;
|
|
250
|
+
if (e && (s.cache ??= /* @__PURE__ */ new Map(), g = JSON.stringify(s.params), o = s.cache.get(g), o))
|
|
251
|
+
return o;
|
|
252
|
+
if (m.value = !0, o = await s.call(), m.value = !1, o.errors) return;
|
|
253
|
+
if (!Array.isArray(o.result)) {
|
|
255
254
|
console.warn("В result ожидался массив");
|
|
256
255
|
return;
|
|
257
256
|
}
|
|
258
|
-
const
|
|
259
|
-
if (
|
|
260
|
-
console.warn(`В result[${
|
|
257
|
+
const h = o.result.findIndex((G) => G.id === void 0 || G.name === void 0);
|
|
258
|
+
if (h !== -1) {
|
|
259
|
+
console.warn(`В result[${h}] нет id или name`);
|
|
261
260
|
return;
|
|
262
261
|
}
|
|
263
|
-
return e &&
|
|
264
|
-
},
|
|
265
|
-
if (!
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
a && (u = a.nextOffset, l.value = l.value.concat(a.result));
|
|
276
|
-
}, f = de(() => c(), 200);
|
|
262
|
+
return e && s.cache.set(g, o), o;
|
|
263
|
+
}, i = async () => {
|
|
264
|
+
if (!s) return;
|
|
265
|
+
s.params.offset = 0, s.params.search = f;
|
|
266
|
+
const o = await p();
|
|
267
|
+
o && (r = o.nextOffset, a.value = o.result);
|
|
268
|
+
}, y = async () => {
|
|
269
|
+
if (!s || !r || m.value) return;
|
|
270
|
+
s.params.offset = r, s.params.search = f;
|
|
271
|
+
const o = await p();
|
|
272
|
+
o && (r = o.nextOffset, a.value = a.value.concat(o.result));
|
|
273
|
+
}, A = ie(() => i(), 200);
|
|
277
274
|
return {
|
|
278
|
-
items:
|
|
279
|
-
isLoading:
|
|
280
|
-
loadAppend:
|
|
281
|
-
setSearchTextAndLoad: (
|
|
282
|
-
|
|
275
|
+
items: a,
|
|
276
|
+
isLoading: m,
|
|
277
|
+
loadAppend: y,
|
|
278
|
+
setSearchTextAndLoad: (o, g = !0) => {
|
|
279
|
+
s && (o.length < d || o === f && a.value.length || (f = o, g ? A() : i()));
|
|
283
280
|
}
|
|
284
281
|
};
|
|
285
|
-
},
|
|
282
|
+
}, we = { class: "top-selector2_itemMulti top-ellipsis" }, Ie = /* @__PURE__ */ K({
|
|
286
283
|
__name: "itemMulti",
|
|
287
284
|
props: {
|
|
288
285
|
id: {},
|
|
289
286
|
name: {}
|
|
290
287
|
},
|
|
291
288
|
emits: ["delete"],
|
|
292
|
-
setup(
|
|
293
|
-
return (
|
|
294
|
-
|
|
295
|
-
|
|
289
|
+
setup(s) {
|
|
290
|
+
return (d, e) => (c(), v("div", we, [
|
|
291
|
+
M(C(d.name) + " ", 1),
|
|
292
|
+
E("span", {
|
|
296
293
|
class: "top-selector2_itemMultiDelete",
|
|
297
294
|
"data-top-icon": "",
|
|
298
|
-
onClick: e[0] || (e[0] = (
|
|
299
|
-
onMousedown: e[1] || (e[1] =
|
|
295
|
+
onClick: e[0] || (e[0] = (a) => d.$emit("delete", d.id)),
|
|
296
|
+
onMousedown: e[1] || (e[1] = B(() => {
|
|
300
297
|
}, ["stop"]))
|
|
301
298
|
}, null, 32)
|
|
302
299
|
]));
|
|
303
300
|
}
|
|
304
|
-
}),
|
|
301
|
+
}), Te = {
|
|
305
302
|
"top-selector2_itemMulti": "top-selector2_itemMulti",
|
|
306
303
|
"top-selector2_itemMultiDelete": "top-selector2_itemMultiDelete",
|
|
307
304
|
"top-selector2": "top-selector2",
|
|
308
305
|
"top-active": "top-active"
|
|
309
|
-
},
|
|
310
|
-
$style:
|
|
311
|
-
},
|
|
306
|
+
}, Ce = {
|
|
307
|
+
$style: Te
|
|
308
|
+
}, Be = /* @__PURE__ */ L(Ie, [["__cssModules", Ce]]), Me = {
|
|
312
309
|
key: 0,
|
|
313
310
|
class: "top-selector2_activeItems"
|
|
314
|
-
},
|
|
311
|
+
}, ke = {
|
|
315
312
|
key: 1,
|
|
316
313
|
class: "top-selector2_activeName top-ellipsis"
|
|
317
|
-
},
|
|
314
|
+
}, Se = /* @__PURE__ */ K({
|
|
318
315
|
__name: "selector2",
|
|
319
|
-
props: /* @__PURE__ */
|
|
316
|
+
props: /* @__PURE__ */ D({
|
|
320
317
|
modelValue: {},
|
|
321
318
|
items: { default: () => [] },
|
|
322
319
|
multiselect: { type: Boolean },
|
|
@@ -336,76 +333,76 @@ const ce = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
336
333
|
modelModifiers: {}
|
|
337
334
|
}),
|
|
338
335
|
emits: ["update:modelValue"],
|
|
339
|
-
setup(
|
|
340
|
-
const
|
|
336
|
+
setup(s) {
|
|
337
|
+
const d = s, e = Q(s, "modelValue"), a = V(""), m = {
|
|
341
338
|
id: 0,
|
|
342
339
|
name: "Все"
|
|
343
|
-
},
|
|
340
|
+
}, f = V(null), r = () => {
|
|
344
341
|
var t;
|
|
345
|
-
return (t =
|
|
342
|
+
return (t = f.value) == null ? void 0 : t.popup;
|
|
346
343
|
};
|
|
347
|
-
window.__STORYBOOK_PREVIEW__ && !
|
|
348
|
-
() =>
|
|
344
|
+
window.__STORYBOOK_PREVIEW__ && !d.modelValue && S(
|
|
345
|
+
() => d.multiselect,
|
|
349
346
|
() => {
|
|
350
|
-
e.value =
|
|
347
|
+
e.value = d.multiselect ? [] : { id: null, name: "" };
|
|
351
348
|
},
|
|
352
349
|
{ immediate: !0 }
|
|
353
350
|
);
|
|
354
|
-
const p = $e(
|
|
351
|
+
const p = $e(d.apiRequest, d.minLength, d.useCache), i = N(() => {
|
|
355
352
|
const t = [];
|
|
356
|
-
return !
|
|
357
|
-
}),
|
|
358
|
-
const t =
|
|
359
|
-
let
|
|
360
|
-
return
|
|
361
|
-
const
|
|
362
|
-
(b.id === Number(t) ||
|
|
363
|
-
}),
|
|
353
|
+
return !d.multiselect && d.appendAllValue && t.push(m), d.items.forEach((n) => t.push({ ...n })), t;
|
|
354
|
+
}), y = (t, n = !0) => n && t.id === null ? Array.isArray(e.value) ? e.value.some((l) => l.id === t.id && l.name === t.name) : t.name === e.value.name : Array.isArray(e.value) ? e.value.some((l) => l.id === t.id) : t.id === e.value.id, A = N(() => {
|
|
355
|
+
const t = a.value.toLowerCase(), n = re(t);
|
|
356
|
+
let l = [];
|
|
357
|
+
return i.value.forEach((b) => {
|
|
358
|
+
const w = b.name.toLowerCase();
|
|
359
|
+
(b.id === Number(t) || w.includes(t) || w.includes(n)) && (w === t || w === n ? l.unshift(b) : l.push(b));
|
|
360
|
+
}), l.push(...p.items.value), d.appendSearchToResult && a.value && (!l.length || l[0].name.toLowerCase() !== t) && l.push({
|
|
364
361
|
id: null,
|
|
365
|
-
name:
|
|
366
|
-
}),
|
|
367
|
-
}),
|
|
368
|
-
var
|
|
369
|
-
if (
|
|
370
|
-
if (!Array.isArray(e.value) ||
|
|
362
|
+
name: a.value
|
|
363
|
+
}), d.multiselect && (l = l.filter((b) => !y(b))), l;
|
|
364
|
+
}), u = async (t) => {
|
|
365
|
+
var n, l;
|
|
366
|
+
if (d.multiselect) {
|
|
367
|
+
if (!Array.isArray(e.value) || y(t))
|
|
371
368
|
return;
|
|
372
369
|
const b = [...e.value];
|
|
373
|
-
b.push({ ...t }), e.value = b,
|
|
374
|
-
var
|
|
375
|
-
(
|
|
370
|
+
b.push({ ...t }), e.value = b, ae.state.isMobile ? (n = r()) == null || n.close() : setTimeout(() => {
|
|
371
|
+
var w, U, W, J;
|
|
372
|
+
(w = r()) == null || w.recalcPosition(), (J = (W = (U = r()) == null ? void 0 : U.elPopupWidget) == null ? void 0 : W.querySelector("input")) == null || J.focus(), a.value && (A.value.length || (a.value = "", p.items.value = []));
|
|
376
373
|
});
|
|
377
374
|
} else
|
|
378
|
-
|
|
379
|
-
},
|
|
375
|
+
a.value && (a.value = "", p.items.value = []), JSON.stringify(t) !== JSON.stringify(e.value) && (e.value = { ...t }), (l = r()) == null || l.close();
|
|
376
|
+
}, o = () => {
|
|
380
377
|
if (!Array.isArray(e.value)) {
|
|
381
|
-
const
|
|
382
|
-
e.value = { ...
|
|
378
|
+
const n = (i.value.findIndex((l) => l.id === e.value.id) + 1) % i.value.length;
|
|
379
|
+
e.value = { ...i.value[n] };
|
|
383
380
|
}
|
|
384
|
-
},
|
|
385
|
-
Array.isArray(e.value) && (e.value = e.value.filter((
|
|
386
|
-
var
|
|
387
|
-
(
|
|
381
|
+
}, g = async (t) => {
|
|
382
|
+
Array.isArray(e.value) && (e.value = e.value.filter((n) => n.id !== t), setTimeout(() => {
|
|
383
|
+
var n;
|
|
384
|
+
(n = r()) == null || n.recalcPosition();
|
|
388
385
|
}));
|
|
389
|
-
},
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}),
|
|
393
|
-
const
|
|
394
|
-
const
|
|
395
|
-
|
|
386
|
+
}, h = V(!1);
|
|
387
|
+
d.apiRequest && (S(h, () => {
|
|
388
|
+
h.value && p.setSearchTextAndLoad(a.value, !1);
|
|
389
|
+
}), S(a, () => p.setSearchTextAndLoad(a.value)));
|
|
390
|
+
const G = (t) => {
|
|
391
|
+
const n = t.target;
|
|
392
|
+
n.scrollTop / (n.scrollHeight - n.offsetHeight) > 0.8 && p.loadAppend();
|
|
396
393
|
};
|
|
397
|
-
return (t,
|
|
394
|
+
return (t, n) => (c(), I(k(se), {
|
|
398
395
|
ref_key: "popupRef",
|
|
399
|
-
ref:
|
|
400
|
-
onOpen:
|
|
401
|
-
onClose:
|
|
402
|
-
onScrollContentList:
|
|
396
|
+
ref: f,
|
|
397
|
+
onOpen: n[1] || (n[1] = (l) => h.value = !0),
|
|
398
|
+
onClose: n[2] || (n[2] = (l) => h.value = !1),
|
|
399
|
+
onScrollContentList: n[3] || (n[3] = (l) => t.apiRequest ? G(l) : void 0),
|
|
403
400
|
notch: !1,
|
|
404
401
|
transitionDuration: 0
|
|
405
402
|
}, {
|
|
406
|
-
opener:
|
|
407
|
-
|
|
408
|
-
class:
|
|
403
|
+
opener: $(() => [
|
|
404
|
+
E("div", {
|
|
405
|
+
class: T({
|
|
409
406
|
"top-selector2": !0,
|
|
410
407
|
"top-selector2-multiselect": t.multiselect,
|
|
411
408
|
["top-size_" + t.size]: !0,
|
|
@@ -414,55 +411,55 @@ const ce = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
414
411
|
"top-error": t.isError
|
|
415
412
|
})
|
|
416
413
|
}, [
|
|
417
|
-
t.multiselect ? (
|
|
418
|
-
(
|
|
419
|
-
id:
|
|
420
|
-
name:
|
|
421
|
-
onDelete:
|
|
414
|
+
t.multiselect ? (c(), v("div", Me, [
|
|
415
|
+
(c(!0), v(P, null, H(e.value, (l) => (c(), I(Be, {
|
|
416
|
+
id: l.id,
|
|
417
|
+
name: l.name,
|
|
418
|
+
onDelete: g
|
|
422
419
|
}, null, 8, ["id", "name"]))), 256))
|
|
423
|
-
])) :
|
|
424
|
-
t.multiselect ?
|
|
425
|
-
t.addChanger && !t.multiselect &&
|
|
420
|
+
])) : _("", !0),
|
|
421
|
+
t.multiselect ? _("", !0) : (c(), v("span", ke, C(Array.isArray(e.value) ? "" : e.value.name), 1)),
|
|
422
|
+
t.addChanger && !t.multiselect && i.value.length > 1 && !t.disabled ? (c(), v("span", {
|
|
426
423
|
key: 2,
|
|
427
424
|
class: "top-changer top-changer-selector",
|
|
428
|
-
onClick:
|
|
429
|
-
})) :
|
|
425
|
+
onClick: B(o, ["stop"])
|
|
426
|
+
})) : _("", !0)
|
|
430
427
|
], 2)
|
|
431
428
|
]),
|
|
432
|
-
widget:
|
|
433
|
-
F(
|
|
429
|
+
widget: $(() => [
|
|
430
|
+
F(k(ne), {
|
|
434
431
|
title: "Поиск",
|
|
435
432
|
icon: "",
|
|
436
|
-
modelValue:
|
|
437
|
-
"onUpdate:modelValue":
|
|
438
|
-
isLoading:
|
|
433
|
+
modelValue: a.value,
|
|
434
|
+
"onUpdate:modelValue": n[0] || (n[0] = (l) => a.value = l),
|
|
435
|
+
isLoading: k(p).isLoading.value,
|
|
439
436
|
placeholder: !Array.isArray(e.value) && !t.multiselect && t.showSelectedInInput ? e.value.name : t.placeholder
|
|
440
437
|
}, null, 8, ["modelValue", "isLoading", "placeholder"])
|
|
441
438
|
]),
|
|
442
|
-
contentList:
|
|
443
|
-
(
|
|
444
|
-
class:
|
|
445
|
-
"top-active": !Array.isArray(e.value) && !t.multiselect && e.value.name ===
|
|
439
|
+
contentList: $(() => [
|
|
440
|
+
(c(!0), v(P, null, H(A.value, (l) => (c(), I(k(R), {
|
|
441
|
+
class: T({
|
|
442
|
+
"top-active": !Array.isArray(e.value) && !t.multiselect && e.value.name === l.name
|
|
446
443
|
}),
|
|
447
|
-
key:
|
|
448
|
-
onClick:
|
|
444
|
+
key: l.id ?? void 0,
|
|
445
|
+
onClick: B((b) => u(l), ["stop"])
|
|
449
446
|
}, {
|
|
450
|
-
default:
|
|
447
|
+
default: $(() => [
|
|
451
448
|
t.$slots.item ? j(t.$slots, "item", {
|
|
452
449
|
key: 0,
|
|
453
|
-
item:
|
|
454
|
-
}) : (
|
|
455
|
-
|
|
450
|
+
item: l
|
|
451
|
+
}) : (c(), v(P, { key: 1 }, [
|
|
452
|
+
M(C(l.name), 1)
|
|
456
453
|
], 64))
|
|
457
454
|
]),
|
|
458
455
|
_: 2
|
|
459
456
|
}, 1032, ["class", "onClick"]))), 128)),
|
|
460
|
-
|
|
457
|
+
A.value.length ? _("", !0) : (c(), I(k(R), {
|
|
461
458
|
key: 0,
|
|
462
459
|
type: "regular"
|
|
463
460
|
}, {
|
|
464
|
-
default:
|
|
465
|
-
|
|
461
|
+
default: $(() => [
|
|
462
|
+
M(" Нет результатов ")
|
|
466
463
|
]),
|
|
467
464
|
_: 1
|
|
468
465
|
}))
|
|
@@ -470,127 +467,21 @@ const ce = { class: "top-editArea_footer" }, pe = /* @__PURE__ */ L({
|
|
|
470
467
|
_: 3
|
|
471
468
|
}, 512));
|
|
472
469
|
}
|
|
473
|
-
}),
|
|
470
|
+
}), Ee = {
|
|
474
471
|
"top-selector2": "top-selector2",
|
|
475
472
|
"top-selector2-multiselect": "top-selector2-multiselect",
|
|
476
473
|
"top-active": "top-active",
|
|
477
474
|
"top-selector2_activeItems": "top-selector2_activeItems",
|
|
478
475
|
"top-selector2_activeName": "top-selector2_activeName",
|
|
479
476
|
"top-changer-selector": "top-changer-selector"
|
|
480
|
-
},
|
|
481
|
-
$style:
|
|
482
|
-
},
|
|
483
|
-
__name: "menu",
|
|
484
|
-
props: /* @__PURE__ */ H({
|
|
485
|
-
modelValue: {},
|
|
486
|
-
items: {},
|
|
487
|
-
isMultiple: { type: Boolean },
|
|
488
|
-
canBeEmptyMultiple: { type: Boolean },
|
|
489
|
-
styling: { default: "default" },
|
|
490
|
-
selectAllItem: {}
|
|
491
|
-
}, {
|
|
492
|
-
modelValue: {
|
|
493
|
-
required: !0
|
|
494
|
-
},
|
|
495
|
-
modelModifiers: {}
|
|
496
|
-
}),
|
|
497
|
-
emits: ["update:modelValue"],
|
|
498
|
-
setup(i) {
|
|
499
|
-
const r = i, e = U(i, "modelValue"), l = M();
|
|
500
|
-
!r.isMultiple && !(typeof e.value == "string" || e.value instanceof String) && console.warn('Type check failed for prop "modelValue". Expected String: ' + typeof e.value), r.isMultiple && !Array.isArray(e.value) && console.warn('Type check failed for prop "modelValue". Expected Array: ' + typeof e.value), r.isMultiple && !r.canBeEmptyMultiple && Array.isArray(e.value) && !e.value.length && (e.value = [r.items[0].href ?? r.items[0].value]);
|
|
501
|
-
const v = (s) => Array.isArray(e.value) ? e.value.includes(s.value) : s.value === e.value, y = (s, f = !1) => {
|
|
502
|
-
if (Array.isArray(e.value)) {
|
|
503
|
-
let o = e.value.slice();
|
|
504
|
-
if (f) {
|
|
505
|
-
o.length || (o = r.items.map((A) => A.value));
|
|
506
|
-
const a = o.indexOf(s.value);
|
|
507
|
-
a === -1 ? o.push(s.value) : o.splice(a, 1);
|
|
508
|
-
} else
|
|
509
|
-
o.length === 1 && o[0] === s.value ? o = [] : o = [s.value];
|
|
510
|
-
!r.canBeEmptyMultiple && !o.length && (o = [s.value]), e.value = o;
|
|
511
|
-
return;
|
|
512
|
-
}
|
|
513
|
-
e.value = s.value;
|
|
514
|
-
}, u = (s) => {
|
|
515
|
-
if (l.value.scrollWidth <= l.value.offsetWidth || s.shiftKey || Math.abs(s.deltaY) < 50)
|
|
516
|
-
return;
|
|
517
|
-
s.preventDefault();
|
|
518
|
-
const f = s.deltaY > 0 ? 30 : -30;
|
|
519
|
-
l.value.scrollLeft = l.value.scrollLeft + f;
|
|
520
|
-
}, p = (s = !0) => {
|
|
521
|
-
var d, n;
|
|
522
|
-
const f = l.value.querySelector(".top-active");
|
|
523
|
-
if (!f)
|
|
524
|
-
return;
|
|
525
|
-
const o = 24, a = f.offsetLeft - l.value.offsetLeft - o, A = f.offsetLeft - l.value.offsetLeft + f.clientWidth + o, g = l.value.scrollLeft, C = l.value.clientWidth + l.value.scrollLeft;
|
|
526
|
-
let t = null;
|
|
527
|
-
a < g && (t = a), A > C && (t = A - l.value.clientWidth), t !== null && (re() ? (n = (d = Q).$) == null || n.call(d, l.value).animate({ scrollLeft: t }, s ? 200 : 0) : l.value.scrollTo({ left: t, behavior: s ? "smooth" : "auto" }));
|
|
528
|
-
}, c = () => {
|
|
529
|
-
if (Array.isArray(e.value)) {
|
|
530
|
-
if (e.value.length === r.items.length) {
|
|
531
|
-
e.value = [r.items[0].href ?? r.items[0].value];
|
|
532
|
-
return;
|
|
533
|
-
}
|
|
534
|
-
e.value = r.items.map((s) => s.href ?? s.value);
|
|
535
|
-
}
|
|
536
|
-
};
|
|
537
|
-
return le(() => p(!1)), oe(() => p(!0)), (s, f) => (m(), h("div", {
|
|
538
|
-
ref_key: "el",
|
|
539
|
-
ref: l,
|
|
540
|
-
class: I({
|
|
541
|
-
"top-menu": !0,
|
|
542
|
-
["top-style_" + s.styling]: !0,
|
|
543
|
-
"top-unwrap-x": s.styling === "default"
|
|
544
|
-
}),
|
|
545
|
-
onWheel: u
|
|
546
|
-
}, [
|
|
547
|
-
(m(!0), h(P, null, z(s.items, (o) => (m(), w(T(N), W({ ref_for: !0 }, o, {
|
|
548
|
-
class: "top-menu_item",
|
|
549
|
-
color: "theme",
|
|
550
|
-
styling: "",
|
|
551
|
-
onClick: (a) => y(o, a.ctrlKey),
|
|
552
|
-
isActive: v(o)
|
|
553
|
-
}), X({ _: 2 }, [
|
|
554
|
-
o.content ? {
|
|
555
|
-
name: "default",
|
|
556
|
-
fn: _(() => [
|
|
557
|
-
k($(o.content), 1)
|
|
558
|
-
]),
|
|
559
|
-
key: "0"
|
|
560
|
-
} : void 0
|
|
561
|
-
]), 1040, ["onClick", "isActive"]))), 256)),
|
|
562
|
-
Array.isArray(e.value) && s.selectAllItem ? (m(), w(T(N), W({ key: 0 }, s.selectAllItem, {
|
|
563
|
-
class: "top-menu_item",
|
|
564
|
-
color: "theme",
|
|
565
|
-
styling: "",
|
|
566
|
-
onClick: f[0] || (f[0] = (o) => c()),
|
|
567
|
-
isActive: e.value.length === s.items.length
|
|
568
|
-
}), X({ _: 2 }, [
|
|
569
|
-
s.selectAllItem.content ? {
|
|
570
|
-
name: "default",
|
|
571
|
-
fn: _(() => [
|
|
572
|
-
k($(s.selectAllItem.content), 1)
|
|
573
|
-
]),
|
|
574
|
-
key: "0"
|
|
575
|
-
} : void 0
|
|
576
|
-
]), 1040, ["isActive"])) : V("", !0)
|
|
577
|
-
], 34));
|
|
578
|
-
}
|
|
579
|
-
}), Ne = {
|
|
580
|
-
"top-menu": "top-menu",
|
|
581
|
-
"top-menu_item": "top-menu_item",
|
|
582
|
-
"top-style_default": "top-style_default",
|
|
583
|
-
"top-active": "top-active",
|
|
584
|
-
"top-style_bar": "top-style_bar",
|
|
585
|
-
"top-unwrap-x": "top-unwrap-x"
|
|
586
|
-
}, Oe = {
|
|
587
|
-
$style: Ne
|
|
588
|
-
}, Qe = /* @__PURE__ */ E(Ge, [["__cssModules", Oe]]);
|
|
477
|
+
}, Ke = {
|
|
478
|
+
$style: Ee
|
|
479
|
+
}, We = /* @__PURE__ */ L(Se, [["__cssModules", Ke]]);
|
|
589
480
|
export {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
481
|
+
ze as EditArea,
|
|
482
|
+
Fe as EditInput,
|
|
483
|
+
Re as Menu,
|
|
484
|
+
Ue as RadioGroup,
|
|
485
|
+
We as Selector2
|
|
595
486
|
};
|
|
596
487
|
//# sourceMappingURL=formsExt.js.map
|