@topvisor/ui 0.9.33-dev → 0.9.34-utils-components-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-BGhDjLcn.es.js +289 -0
- package/.chunks/datepicker-BGhDjLcn.es.js.map +1 -0
- package/.chunks/datepicker-DM6aPyRB.amd.js +247 -0
- package/.chunks/datepicker-DM6aPyRB.amd.js.map +1 -0
- package/.chunks/forms-CRAV8PiZ.es.js +1186 -0
- package/.chunks/forms-CRAV8PiZ.es.js.map +1 -0
- package/.chunks/forms-Cksc7Rb7.amd.js +3 -0
- package/.chunks/forms-Cksc7Rb7.amd.js.map +1 -0
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BliXIrA8.es.js → listItem.vue_vue_type_script_setup_true_lang-C2XaxeNZ.es.js} +9 -9
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C2XaxeNZ.es.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CpNwVBHY.amd.js +2 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CpNwVBHY.amd.js.map +1 -0
- package/.chunks/{menu-CHczkYl6.es.js → menu-BWjYRHkQ.es.js} +8 -8
- package/.chunks/menu-BWjYRHkQ.es.js.map +1 -0
- package/.chunks/{menu-buQxcAhv.amd.js → menu-BX8GV8-v.amd.js} +2 -2
- package/.chunks/menu-BX8GV8-v.amd.js.map +1 -0
- package/.chunks/popup-3fVBIqu0.amd.js +440 -0
- package/.chunks/popup-3fVBIqu0.amd.js.map +1 -0
- package/.chunks/{popup-CJLGyBwQ.es.js → popup-BWTP6yaC.es.js} +486 -486
- package/.chunks/popup-BWTP6yaC.es.js.map +1 -0
- package/.chunks/punycode.es6-C2yitnNb.amd.js +2 -0
- package/.chunks/punycode.es6-C2yitnNb.amd.js.map +1 -0
- package/.chunks/punycode.es6-CNI-zL6U.es.js +134 -0
- package/.chunks/punycode.es6-CNI-zL6U.es.js.map +1 -0
- package/.chunks/store-Bl79G7T_.amd.js.map +1 -1
- package/.chunks/store-PoMCiuBr.es.js.map +1 -1
- package/README.md +86 -86
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/formsExt.css +1 -1
- package/core/core.amd.js +1 -1
- package/core/core.js +1 -1
- package/core/directives/focus.amd.js +2 -0
- package/core/directives/focus.amd.js.map +1 -0
- package/core/directives/focus.d.ts +3 -0
- package/core/directives/focus.js +5 -0
- package/core/directives/focus.js.map +1 -0
- package/core/directives/sticky.amd.js +2 -0
- package/core/directives/sticky.amd.js.map +1 -0
- package/core/directives/sticky.d.ts +3 -0
- package/core/directives/sticky.js +5 -0
- package/core/directives/sticky.js.map +1 -0
- package/core/directives/swimUp.amd.js +2 -0
- package/core/directives/swimUp.amd.js.map +1 -0
- package/core/directives/swimUp.d.ts +3 -0
- package/core/directives/swimUp.js +5 -0
- package/core/directives/swimUp.js.map +1 -0
- package/core/directives/tooltip.amd.js +2 -0
- package/core/directives/tooltip.amd.js.map +1 -0
- package/core/directives/tooltip.d.ts +3 -0
- package/core/directives/tooltip.js +5 -0
- package/core/directives/tooltip.js.map +1 -0
- package/core/plugin/plugin.amd.js +2 -0
- package/core/plugin/plugin.amd.js.map +1 -0
- package/core/plugin/plugin.d.ts +3 -0
- package/core/plugin/plugin.js +23 -0
- package/core/plugin/plugin.js.map +1 -0
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +14 -15
- package/forms/forms.js.map +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 +121 -362
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/Read Me.txt +7 -7
- package/icomoon/demo-files/demo.css +161 -161
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +3379 -3379
- package/icomoon/fonts/Topvisor-2.svg +263 -263
- package/icomoon/style.css +740 -740
- package/package.json +33 -24
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +47 -6
- 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 +3 -3
- 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 +15 -15
- package/project/project.js.map +1 -1
- package/require/css.amd.js +11 -11
- package/src/components/forms/button/button.stories.d.ts +3 -3
- package/src/components/forms/button/button.vue.d.ts +7 -5
- package/src/components/forms/checkbox/checkbox.stories.d.ts +8 -7
- package/src/components/forms/checkbox/checkbox.vue.d.ts +10 -6
- package/src/components/forms/controlLabel/controlLabel.stories.d.ts +3 -3
- package/src/components/forms/controlLabel/controlLabel.vue.d.ts +4 -2
- package/src/components/forms/forms.d.ts +30 -18
- package/src/components/forms/hint/hint.stories.d.ts +13 -77
- package/src/components/forms/input/input.stories.d.ts +3 -3
- package/src/components/forms/input/input.vue.d.ts +6 -4
- package/src/components/forms/inputDate/datepicker.d.ts +0 -2
- package/src/components/forms/inputRange/inputRange.stories.d.ts +17 -49
- package/src/components/forms/inputRange/inputRange.vue.d.ts +4 -2
- package/src/components/forms/radio/radio.stories.d.ts +3 -3
- package/src/components/forms/radio/radio.vue.d.ts +6 -4
- package/src/components/forms/select/select.stories.d.ts +2 -2
- package/src/components/forms/select/select.vue.d.ts +4 -3
- package/src/components/forms/switcher/switcher.stories.d.ts +3 -3
- package/src/components/forms/switcher/switcher.vue.d.ts +6 -4
- package/src/components/formsExt/editInput/editInput.stories.d.ts +3 -3
- package/src/components/formsExt/editInput/editInput.vue.d.ts +6 -4
- package/src/components/formsExt/formsExt.d.ts +10 -5
- package/src/components/formsExt/menu/menu.stories.d.ts +1 -1
- package/src/components/formsExt/menu/menu.vue.d.ts +2 -2
- package/src/components/formsExt/selector2/api.d.ts +1 -1
- package/src/components/formsExt/selector2/selector2.stories.d.ts +36 -35
- package/src/components/popup/popup/listItem.vue.d.ts +7 -5
- package/src/components/popup/popup/opener.vue.d.ts +6 -4
- package/src/components/popup/popup/popup.stories.d.ts +22 -86
- package/src/components/popup/popup/popup.vue.d.ts +11 -9
- package/src/components/popup/popup.d.ts +10 -4
- package/src/components/popup/worker.d.ts +4 -1
- package/src/components/project/project.d.ts +4 -1
- package/src/components/project/selectorCompetitors/composables.d.ts +1 -0
- package/src/components/project/selectorCompetitors/selectorCompetitors.stories.d.ts +2 -2
- package/src/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +4 -3
- package/src/components/tabs/tabs/content.vue.d.ts +4 -2
- package/src/components/tabs/tabs/tab.vue.d.ts +4 -2
- package/src/components/tabs/tabs/tabs.stories.d.ts +28 -92
- package/src/components/tabs/tabs/tabs.vue.d.ts +4 -2
- package/src/components/tabs/tabs.d.ts +8 -3
- package/src/components/tabsView/tabsView/menu.vue.d.ts +6 -4
- package/src/components/tabsView/tabsView/menuItem.vue.d.ts +6 -4
- package/src/components/tabsView/tabsView/menuTitle.vue.d.ts +4 -2
- package/src/components/tabsView/tabsView/store.d.ts +14 -14
- package/src/components/tabsView/tabsView/tabsView.stories.d.ts +12 -12
- package/src/components/tabsView/tabsView/tabsView.vue.d.ts +6 -4
- 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 +9 -9
- 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 +9 -9
- package/src/components/tabsView/tabsView.d.ts +8 -3
- package/src/core/core/core.d.ts +1 -1
- package/src/core/directives/focus.d.ts +9 -0
- package/src/core/directives/sticky.d.ts +11 -0
- package/src/core/directives/swimUp.d.ts +10 -0
- package/src/core/directives/tooltip.d.ts +11 -0
- package/src/core/plugin/plugin.d.ts +48 -0
- package/src/core/utils/device.d.ts +0 -3
- package/src/core/utils/number.d.ts +1 -1
- package/src/core/utils/price.d.ts +1 -1
- package/src/core/utils/store/localStorage.d.ts +1 -1
- package/src/core/utils/store/store.d.ts +2 -2
- package/src/core/utils/string.d.ts +1 -1
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.amd.js.map +1 -1
- package/tabs/tabs.js +23 -23
- 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 +72 -73
- package/tabsView/tabsView.js.map +1 -1
- package/utils/check.amd.js +1 -1
- package/utils/check.amd.js.map +1 -1
- package/utils/check.js +22 -5
- package/utils/check.js.map +1 -1
- package/utils/css.amd.js.map +1 -1
- package/utils/css.js.map +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +4 -4
- package/utils/device.amd.js +1 -1
- package/utils/device.js +6 -6
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/utils/image.amd.js +1 -1
- package/utils/image.amd.js.map +1 -1
- package/utils/image.js +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/number.amd.js.map +1 -1
- package/utils/number.js.map +1 -1
- package/utils/price.amd.js.map +1 -1
- package/utils/price.js.map +1 -1
- package/utils/route.amd.js.map +1 -1
- package/utils/route.js.map +1 -1
- package/utils/scroll.amd.js +1 -1
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.js +1 -1
- package/utils/scroll.js.map +1 -1
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +134 -16
- 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 +2 -1
- package/utils/url.amd.js.map +1 -1
- package/utils/url.js +44 -7
- package/utils/url.js.map +1 -1
- package/utils/window.amd.js +1 -1
- package/utils/window.js +1 -1
- package/web-types.json +62 -0
- package/.chunks/datepicker-B2sjxM3R.amd.js +0 -247
- package/.chunks/datepicker-B2sjxM3R.amd.js.map +0 -1
- package/.chunks/datepicker-V4rjmE4P.es.js +0 -289
- package/.chunks/datepicker-V4rjmE4P.es.js.map +0 -1
- package/.chunks/forms-Dixfp052.amd.js +0 -4
- package/.chunks/forms-Dixfp052.amd.js.map +0 -1
- package/.chunks/forms-o7UeMJFf.es.js +0 -1507
- package/.chunks/forms-o7UeMJFf.es.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-BliXIrA8.es.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C0tRJmSC.amd.js +0 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C0tRJmSC.amd.js.map +0 -1
- package/.chunks/menu-CHczkYl6.es.js.map +0 -1
- package/.chunks/menu-buQxcAhv.amd.js.map +0 -1
- package/.chunks/popup-BMNS1F2G.amd.js +0 -440
- package/.chunks/popup-BMNS1F2G.amd.js.map +0 -1
- package/.chunks/popup-CJLGyBwQ.es.js.map +0 -1
- package/.chunks/widgetInput-ASxjfQpi.amd.js +0 -2
- package/.chunks/widgetInput-ASxjfQpi.amd.js.map +0 -1
- package/.chunks/widgetInput-p8fSQGk9.es.js +0 -46
- package/.chunks/widgetInput-p8fSQGk9.es.js.map +0 -1
- package/src/components/formsExt/selector2/itemMulti.vue.d.ts +0 -18
- package/src/components/formsExt/selector2/selector2.vue.d.ts +0 -130
- package/src/core/core/plugin.d.ts +0 -38
- /package/assets/{widgetInput.css → popup.css} +0 -0
package/formsExt/formsExt.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { insertToPage as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { M as Re } from "../.chunks/menu-CHczkYl6.es.js";
|
|
9
|
-
const x = ["../assets/formsExt.css"].map((r) => import.meta.resolve(r));
|
|
10
|
-
Z(x, !0);
|
|
11
|
-
const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
|
|
1
|
+
import { insertToPage as P } from "../utils/css.js";
|
|
2
|
+
import { defineComponent as G, ref as T, computed as g, resolveDirective as z, openBlock as d, createElementBlock as c, normalizeClass as m, toDisplayString as V, createCommentVNode as f, createElementVNode as A, withDirectives as E, createVNode as I, withKeys as h, withModifiers as _, createBlock as B, withCtx as w, createTextVNode as C, watch as S, toRef as F, mergeProps as K, renderSlot as N, mergeModels as M, useModel as U, Fragment as q, renderList as D, vModelRadio as O } from "vue";
|
|
3
|
+
import { v as X, r as k, q as $, u as L } from "../.chunks/forms-CRAV8PiZ.es.js";
|
|
4
|
+
import { M as j } from "../.chunks/menu-BWjYRHkQ.es.js";
|
|
5
|
+
const R = ["../assets/formsExt.css"].map((u) => import.meta.resolve(u));
|
|
6
|
+
P(R, !0);
|
|
7
|
+
const J = { class: "top-editArea_footer" }, Q = /* @__PURE__ */ G({
|
|
12
8
|
__name: "editArea",
|
|
13
9
|
props: {
|
|
14
10
|
defaultValue: { default: "" },
|
|
@@ -31,91 +27,91 @@ const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
|
|
|
31
27
|
hint: {}
|
|
32
28
|
},
|
|
33
29
|
emits: ["submit", "close", "clickOnTitle"],
|
|
34
|
-
setup(
|
|
35
|
-
const e =
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
if (e.forceShowCloseBtn && !
|
|
39
|
-
|
|
30
|
+
setup(u, { emit: v }) {
|
|
31
|
+
const e = u, l = v, r = T(e.defaultValue), n = T(e.isFocused), t = g(() => r.value !== e.defaultValue), s = g(() => e.attachToKeyboard ? "" : e.forceShowCloseBtn && !t.value ? e.closeText : e.cancelText), a = (o) => {
|
|
32
|
+
l("submit", o), r.value = e.defaultValue;
|
|
33
|
+
}, p = () => {
|
|
34
|
+
if (e.forceShowCloseBtn && !t.value) {
|
|
35
|
+
l("close");
|
|
40
36
|
return;
|
|
41
37
|
}
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
e.attachToKeyboard &&
|
|
38
|
+
r.value = e.defaultValue;
|
|
39
|
+
}, y = () => {
|
|
40
|
+
e.attachToKeyboard && l("clickOnTitle");
|
|
45
41
|
};
|
|
46
|
-
return (
|
|
47
|
-
const
|
|
48
|
-
return
|
|
49
|
-
class:
|
|
42
|
+
return (o, i) => {
|
|
43
|
+
const H = z("focus");
|
|
44
|
+
return d(), c("div", {
|
|
45
|
+
class: m({
|
|
50
46
|
"top-editArea": !0,
|
|
51
|
-
"top-editArea-attachedToKeyboard":
|
|
47
|
+
"top-editArea-attachedToKeyboard": o.attachToKeyboard
|
|
52
48
|
})
|
|
53
49
|
}, [
|
|
54
|
-
|
|
50
|
+
o.title ? (d(), c("div", {
|
|
55
51
|
key: 0,
|
|
56
52
|
class: "top-editArea_title",
|
|
57
|
-
onClick:
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
class:
|
|
53
|
+
onClick: i[0] || (i[0] = (b) => y())
|
|
54
|
+
}, V(o.title), 1)) : f("", !0),
|
|
55
|
+
A("div", {
|
|
56
|
+
class: m({
|
|
61
57
|
"top-editArea_form": !0,
|
|
62
|
-
"top-error":
|
|
63
|
-
"top-focus":
|
|
58
|
+
"top-error": o.isError,
|
|
59
|
+
"top-focus": n.value
|
|
64
60
|
})
|
|
65
61
|
}, [
|
|
66
|
-
|
|
67
|
-
modelValue:
|
|
68
|
-
"onUpdate:modelValue":
|
|
69
|
-
name:
|
|
70
|
-
placeholder:
|
|
71
|
-
rows:
|
|
72
|
-
minHeight:
|
|
73
|
-
expandable:
|
|
74
|
-
disabled:
|
|
75
|
-
readonly:
|
|
76
|
-
isError:
|
|
77
|
-
hint:
|
|
62
|
+
E(I(X, {
|
|
63
|
+
modelValue: r.value,
|
|
64
|
+
"onUpdate:modelValue": i[1] || (i[1] = (b) => r.value = b),
|
|
65
|
+
name: o.name,
|
|
66
|
+
placeholder: o.placeholder,
|
|
67
|
+
rows: o.rows,
|
|
68
|
+
minHeight: o.minHeight,
|
|
69
|
+
expandable: o.expandable,
|
|
70
|
+
disabled: o.disabled,
|
|
71
|
+
readonly: o.readonly,
|
|
72
|
+
isError: o.isError,
|
|
73
|
+
hint: o.hint,
|
|
78
74
|
class: "top-editArea_element",
|
|
79
|
-
onFocus:
|
|
80
|
-
onBlur:
|
|
75
|
+
onFocus: i[2] || (i[2] = () => n.value = !0),
|
|
76
|
+
onBlur: i[3] || (i[3] = () => n.value = !1),
|
|
81
77
|
onKeyup: [
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
h(p, ["esc"]),
|
|
79
|
+
i[4] || (i[4] = h(_((b) => a(r.value), ["ctrl"]), ["enter"]))
|
|
84
80
|
]
|
|
85
81
|
}, null, 8, ["modelValue", "name", "placeholder", "rows", "minHeight", "expandable", "disabled", "readonly", "isError", "hint"]), [
|
|
86
|
-
[
|
|
82
|
+
[H, n.value]
|
|
87
83
|
]),
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
A("div", J, [
|
|
85
|
+
t.value || o.forceShowCloseBtn ? (d(), B(k, {
|
|
90
86
|
key: 0,
|
|
91
87
|
class: "top-editArea_button",
|
|
92
88
|
color: "theme",
|
|
93
89
|
styling: "soft",
|
|
94
|
-
icon:
|
|
95
|
-
onClick:
|
|
90
|
+
icon: o.attachToKeyboard ? "" : "",
|
|
91
|
+
onClick: p
|
|
96
92
|
}, {
|
|
97
|
-
default:
|
|
98
|
-
|
|
93
|
+
default: w(() => [
|
|
94
|
+
C(V(s.value), 1)
|
|
99
95
|
]),
|
|
100
96
|
_: 1
|
|
101
|
-
}, 8, ["icon"])) :
|
|
102
|
-
|
|
97
|
+
}, 8, ["icon"])) : f("", !0),
|
|
98
|
+
t.value ? (d(), B(k, {
|
|
103
99
|
key: 1,
|
|
104
100
|
class: "top-editArea_button",
|
|
105
|
-
icon:
|
|
106
|
-
onClick:
|
|
101
|
+
icon: o.attachToKeyboard ? "" : "",
|
|
102
|
+
onClick: i[5] || (i[5] = (b) => a(r.value))
|
|
107
103
|
}, {
|
|
108
|
-
default:
|
|
109
|
-
|
|
104
|
+
default: w(() => [
|
|
105
|
+
C(V(o.attachToKeyboard ? "" : o.submitText), 1)
|
|
110
106
|
]),
|
|
111
107
|
_: 1
|
|
112
|
-
}, 8, ["icon"])) :
|
|
108
|
+
}, 8, ["icon"])) : f("", !0)
|
|
113
109
|
])
|
|
114
110
|
], 2)
|
|
115
111
|
], 2);
|
|
116
112
|
};
|
|
117
113
|
}
|
|
118
|
-
}),
|
|
114
|
+
}), W = {
|
|
119
115
|
"top-editArea": "top-editArea",
|
|
120
116
|
"top-editArea_title": "top-editArea_title",
|
|
121
117
|
"top-editArea_form": "top-editArea_form",
|
|
@@ -127,9 +123,9 @@ const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
|
|
|
127
123
|
"top-editArea-attachedToKeyboard": "top-editArea-attachedToKeyboard",
|
|
128
124
|
"top-button": "top-button",
|
|
129
125
|
"top-editArea_button": "top-editArea_button"
|
|
130
|
-
},
|
|
131
|
-
$style:
|
|
132
|
-
},
|
|
126
|
+
}, Y = {
|
|
127
|
+
$style: W
|
|
128
|
+
}, Z = /* @__PURE__ */ $(Q, [["__cssModules", Y]]), x = { class: "top-editInput" }, ee = /* @__PURE__ */ G({
|
|
133
129
|
__name: "editInput",
|
|
134
130
|
props: {
|
|
135
131
|
modelValue: {},
|
|
@@ -137,44 +133,44 @@ const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
|
|
|
137
133
|
button: {}
|
|
138
134
|
},
|
|
139
135
|
emits: ["update:modelValue"],
|
|
140
|
-
setup(
|
|
141
|
-
const e =
|
|
142
|
-
S(
|
|
143
|
-
|
|
136
|
+
setup(u, { emit: v }) {
|
|
137
|
+
const e = u, l = T(e.modelValue);
|
|
138
|
+
S(F(e.modelValue), () => {
|
|
139
|
+
l.value = e.modelValue;
|
|
144
140
|
});
|
|
145
|
-
const
|
|
146
|
-
|
|
141
|
+
const r = v, n = () => {
|
|
142
|
+
r("update:modelValue", l.value);
|
|
147
143
|
};
|
|
148
|
-
return (
|
|
149
|
-
|
|
150
|
-
onKeydownCapture:
|
|
151
|
-
onKeydown:
|
|
152
|
-
modelValue:
|
|
153
|
-
"onUpdate:modelValue":
|
|
144
|
+
return (t, s) => (d(), c("div", x, [
|
|
145
|
+
I(L, K(t.input, {
|
|
146
|
+
onKeydownCapture: s[0] || (s[0] = h(_((a) => l.value = t.modelValue, ["stop"]), ["esc"])),
|
|
147
|
+
onKeydown: h(_(n, ["stop"]), ["enter"]),
|
|
148
|
+
modelValue: l.value,
|
|
149
|
+
"onUpdate:modelValue": s[1] || (s[1] = (a) => l.value = a)
|
|
154
150
|
}), null, 16, ["onKeydown", "modelValue"]),
|
|
155
|
-
|
|
151
|
+
l.value !== t.modelValue ? (d(), B(k, K({
|
|
156
152
|
key: 0,
|
|
157
153
|
icon: "",
|
|
158
154
|
styling: "soft"
|
|
159
|
-
},
|
|
160
|
-
default:
|
|
161
|
-
|
|
155
|
+
}, t.button, { onClick: n }), {
|
|
156
|
+
default: w(() => [
|
|
157
|
+
N(t.$slots, "default")
|
|
162
158
|
]),
|
|
163
159
|
_: 3
|
|
164
|
-
}, 16)) :
|
|
160
|
+
}, 16)) : f("", !0)
|
|
165
161
|
]));
|
|
166
162
|
}
|
|
167
|
-
}),
|
|
163
|
+
}), oe = {
|
|
168
164
|
"top-editInput": "top-editInput",
|
|
169
165
|
"top-input": "top-input"
|
|
170
|
-
},
|
|
171
|
-
$style:
|
|
172
|
-
},
|
|
166
|
+
}, te = {
|
|
167
|
+
$style: oe
|
|
168
|
+
}, ae = /* @__PURE__ */ $(ee, [["__cssModules", te]]), le = ["data-top-icon", "onClick"], re = {
|
|
173
169
|
key: 0,
|
|
174
170
|
class: "top-radioGroup_circle"
|
|
175
|
-
},
|
|
171
|
+
}, se = ["value", "disabled"], ie = /* @__PURE__ */ G({
|
|
176
172
|
__name: "radioGroup",
|
|
177
|
-
props: /* @__PURE__ */
|
|
173
|
+
props: /* @__PURE__ */ M({
|
|
178
174
|
modelValue: {},
|
|
179
175
|
radiosProps: {},
|
|
180
176
|
showIndicator: { type: Boolean },
|
|
@@ -186,52 +182,52 @@ const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
|
|
|
186
182
|
},
|
|
187
183
|
modelModifiers: {}
|
|
188
184
|
}),
|
|
189
|
-
emits: /* @__PURE__ */
|
|
190
|
-
setup(
|
|
191
|
-
const e =
|
|
185
|
+
emits: /* @__PURE__ */ M(["update:modelValue"], ["update:modelValue"]),
|
|
186
|
+
setup(u, { emit: v }) {
|
|
187
|
+
const e = U(u, "modelValue"), l = u, r = T(null);
|
|
192
188
|
S(e, () => {
|
|
193
|
-
var s,
|
|
194
|
-
(
|
|
189
|
+
var t, s, a, p, y;
|
|
190
|
+
(t = l.radiosProps) != null && t.some((o) => o.value === e.value) || (e.value = ((a = (s = l.radiosProps) == null ? void 0 : s[0]) == null ? void 0 : a.value) ?? ""), (y = (p = r.value) == null ? void 0 : p.querySelector(".radioGroup_item-selected")) == null || y.scrollIntoView();
|
|
195
191
|
}, { immediate: !0 });
|
|
196
|
-
const
|
|
197
|
-
return (
|
|
192
|
+
const n = "radioGroup-" + Math.random();
|
|
193
|
+
return (t, s) => (d(), c("div", {
|
|
198
194
|
ref_key: "elRef",
|
|
199
|
-
ref:
|
|
200
|
-
class:
|
|
195
|
+
ref: r,
|
|
196
|
+
class: m({
|
|
201
197
|
"top-radioGroup": !0,
|
|
202
198
|
"top-scrollBarXHidding": !0,
|
|
203
|
-
["top-size_" +
|
|
204
|
-
"top-error":
|
|
199
|
+
["top-size_" + t.size]: !!t.size,
|
|
200
|
+
"top-error": t.isError
|
|
205
201
|
})
|
|
206
202
|
}, [
|
|
207
|
-
(
|
|
208
|
-
class:
|
|
209
|
-
"top-radioGroup_item-selected":
|
|
203
|
+
(d(!0), c(q, null, D(t.radiosProps, (a) => (d(), c("label", {
|
|
204
|
+
class: m({
|
|
205
|
+
"top-radioGroup_item-selected": a.value === e.value,
|
|
210
206
|
"top-radioGroup_item": !0,
|
|
211
207
|
"top-forms-focusable": !0,
|
|
212
|
-
"top-disabled":
|
|
208
|
+
"top-disabled": a.disabled
|
|
213
209
|
}),
|
|
214
|
-
"data-top-icon":
|
|
215
|
-
onClick: (
|
|
210
|
+
"data-top-icon": a.icon,
|
|
211
|
+
onClick: (p) => e.value = a.value
|
|
216
212
|
}, [
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
"onUpdate:modelValue":
|
|
221
|
-
name:
|
|
213
|
+
C(V(a.title) + " ", 1),
|
|
214
|
+
t.showIndicator ? (d(), c("span", re)) : f("", !0),
|
|
215
|
+
E(A("input", {
|
|
216
|
+
"onUpdate:modelValue": s[0] || (s[0] = (p) => e.value = p),
|
|
217
|
+
name: n,
|
|
222
218
|
type: "radio",
|
|
223
|
-
class:
|
|
219
|
+
class: m({
|
|
224
220
|
"top-unvisible": !0
|
|
225
221
|
}),
|
|
226
|
-
value:
|
|
227
|
-
disabled:
|
|
228
|
-
}, null, 8,
|
|
229
|
-
[
|
|
222
|
+
value: a.value,
|
|
223
|
+
disabled: a.disabled
|
|
224
|
+
}, null, 8, se), [
|
|
225
|
+
[O, e.value]
|
|
230
226
|
])
|
|
231
|
-
], 10,
|
|
227
|
+
], 10, le))), 256))
|
|
232
228
|
], 2));
|
|
233
229
|
}
|
|
234
|
-
}),
|
|
230
|
+
}), de = {
|
|
235
231
|
"top-scrollBarXHidding": "top-scrollBarXHidding",
|
|
236
232
|
"top-radioGroup": "top-radioGroup",
|
|
237
233
|
"top-radioGroup_item": "top-radioGroup_item",
|
|
@@ -239,250 +235,13 @@ const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
|
|
|
239
235
|
"top-radioGroup_circle": "top-radioGroup_circle",
|
|
240
236
|
"top-disabled": "top-disabled",
|
|
241
237
|
"top-error": "top-error"
|
|
242
|
-
},
|
|
243
|
-
$style:
|
|
244
|
-
},
|
|
245
|
-
const a = _([]), m = _(!1);
|
|
246
|
-
let f = "", s;
|
|
247
|
-
r && !r.params.limit && (r.params.limit = 100);
|
|
248
|
-
const p = async () => {
|
|
249
|
-
if (!r) return;
|
|
250
|
-
let o, g;
|
|
251
|
-
if (e && (r.cache ??= /* @__PURE__ */ new Map(), g = JSON.stringify(r.params), o = r.cache.get(g), o))
|
|
252
|
-
return o;
|
|
253
|
-
if (m.value = !0, o = await r.call(), m.value = !1, o.errors) return;
|
|
254
|
-
if (!Array.isArray(o.result)) {
|
|
255
|
-
console.warn("В result ожидался массив");
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
const h = o.result.findIndex((G) => G.id === void 0 || G.name === void 0);
|
|
259
|
-
if (h !== -1) {
|
|
260
|
-
console.warn(`В result[${h}] нет id или name`);
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
return e && r.cache.set(g, o), o;
|
|
264
|
-
}, i = async () => {
|
|
265
|
-
if (!r) return;
|
|
266
|
-
r.params.offset = 0, r.params.search = f;
|
|
267
|
-
const o = await p();
|
|
268
|
-
o && (s = o.nextOffset, a.value = o.result);
|
|
269
|
-
}, y = async () => {
|
|
270
|
-
if (!r || !s || m.value) return;
|
|
271
|
-
r.params.offset = s, r.params.search = f;
|
|
272
|
-
const o = await p();
|
|
273
|
-
o && (s = o.nextOffset, a.value = a.value.concat(o.result));
|
|
274
|
-
}, b = ie(() => i(), 200);
|
|
275
|
-
return {
|
|
276
|
-
items: a,
|
|
277
|
-
isLoading: m,
|
|
278
|
-
loadAppend: y,
|
|
279
|
-
setSearchTextAndLoad: (o, g = !0) => {
|
|
280
|
-
r && (o.length < d || o === f && a.value.length || (f = o, g ? b() : i()));
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
}, we = { class: "top-selector2_itemMulti top-ellipsis" }, Ie = /* @__PURE__ */ K({
|
|
284
|
-
__name: "itemMulti",
|
|
285
|
-
props: {
|
|
286
|
-
id: {},
|
|
287
|
-
name: {}
|
|
288
|
-
},
|
|
289
|
-
emits: ["delete"],
|
|
290
|
-
setup(r) {
|
|
291
|
-
return (d, e) => (c(), v("div", we, [
|
|
292
|
-
M(C(d.name) + " ", 1),
|
|
293
|
-
E("span", {
|
|
294
|
-
class: "top-selector2_itemMultiDelete",
|
|
295
|
-
"data-top-icon": "",
|
|
296
|
-
onClick: e[0] || (e[0] = (a) => d.$emit("delete", d.id)),
|
|
297
|
-
onMousedown: e[1] || (e[1] = B(() => {
|
|
298
|
-
}, ["stop"]))
|
|
299
|
-
}, null, 32)
|
|
300
|
-
]));
|
|
301
|
-
}
|
|
302
|
-
}), Te = {
|
|
303
|
-
"top-selector2_itemMulti": "top-selector2_itemMulti",
|
|
304
|
-
"top-selector2_itemMultiDelete": "top-selector2_itemMultiDelete",
|
|
305
|
-
"top-selector2": "top-selector2",
|
|
306
|
-
"top-active": "top-active"
|
|
307
|
-
}, Ce = {
|
|
308
|
-
$style: Te
|
|
309
|
-
}, Be = /* @__PURE__ */ L(Ie, [["__cssModules", Ce]]), Me = {
|
|
310
|
-
key: 0,
|
|
311
|
-
class: "top-selector2_activeItems"
|
|
312
|
-
}, ke = {
|
|
313
|
-
key: 1,
|
|
314
|
-
class: "top-selector2_activeName top-ellipsis"
|
|
315
|
-
}, Se = /* @__PURE__ */ K({
|
|
316
|
-
__name: "selector2",
|
|
317
|
-
props: /* @__PURE__ */ D({
|
|
318
|
-
modelValue: {},
|
|
319
|
-
items: { default: () => [] },
|
|
320
|
-
multiselect: { type: Boolean },
|
|
321
|
-
disabled: { type: Boolean },
|
|
322
|
-
size: { default: "s" },
|
|
323
|
-
isError: { type: Boolean },
|
|
324
|
-
apiRequest: {},
|
|
325
|
-
minLength: { default: 0 },
|
|
326
|
-
useCache: { type: Boolean },
|
|
327
|
-
appendSearchToResult: { type: Boolean },
|
|
328
|
-
appendAllValue: { type: Boolean },
|
|
329
|
-
addChanger: { type: Boolean },
|
|
330
|
-
placeholder: {},
|
|
331
|
-
showSelectedInInput: { type: Boolean, default: !0 }
|
|
332
|
-
}, {
|
|
333
|
-
modelValue: {},
|
|
334
|
-
modelModifiers: {}
|
|
335
|
-
}),
|
|
336
|
-
emits: ["update:modelValue"],
|
|
337
|
-
setup(r) {
|
|
338
|
-
const d = r, e = Q(r, "modelValue"), a = _(""), m = {
|
|
339
|
-
id: 0,
|
|
340
|
-
name: "Все"
|
|
341
|
-
}, f = _(null), s = () => {
|
|
342
|
-
var t;
|
|
343
|
-
return (t = f.value) == null ? void 0 : t.popup;
|
|
344
|
-
};
|
|
345
|
-
window.__STORYBOOK_PREVIEW__ && !d.modelValue && S(
|
|
346
|
-
() => d.multiselect,
|
|
347
|
-
() => {
|
|
348
|
-
e.value = d.multiselect ? [] : { id: null, name: "" };
|
|
349
|
-
},
|
|
350
|
-
{ immediate: !0 }
|
|
351
|
-
);
|
|
352
|
-
const p = $e(d.apiRequest, d.minLength, d.useCache), i = N(() => {
|
|
353
|
-
const t = [];
|
|
354
|
-
return !d.multiselect && d.appendAllValue && t.push(m), d.items.forEach((n) => t.push({ ...n })), t;
|
|
355
|
-
}), 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, b = N(() => {
|
|
356
|
-
const t = a.value.toLowerCase(), n = se(t);
|
|
357
|
-
let l = [];
|
|
358
|
-
return i.value.forEach((A) => {
|
|
359
|
-
const w = A.name.toLowerCase();
|
|
360
|
-
(A.id === Number(t) || w.includes(t) || w.includes(n)) && (w === t || w === n ? l.unshift(A) : l.push(A));
|
|
361
|
-
}), l.push(...p.items.value), d.appendSearchToResult && a.value && (!l.length || l[0].name.toLowerCase() !== t) && l.push({
|
|
362
|
-
id: null,
|
|
363
|
-
name: a.value
|
|
364
|
-
}), d.multiselect && (l = l.filter((A) => !y(A))), l;
|
|
365
|
-
}), u = async (t) => {
|
|
366
|
-
var n, l;
|
|
367
|
-
if (d.multiselect) {
|
|
368
|
-
if (!Array.isArray(e.value) || y(t))
|
|
369
|
-
return;
|
|
370
|
-
const A = [...e.value];
|
|
371
|
-
A.push({ ...t }), e.value = A, ae.state.isMobile ? (n = s()) == null || n.close() : setTimeout(() => {
|
|
372
|
-
var w, U, W, J;
|
|
373
|
-
(w = s()) == null || w.recalcPosition(), (J = (W = (U = s()) == null ? void 0 : U.elPopupWidget) == null ? void 0 : W.querySelector("input")) == null || J.focus(), a.value && (b.value.length || (a.value = "", p.items.value = []));
|
|
374
|
-
});
|
|
375
|
-
} else
|
|
376
|
-
a.value && (a.value = "", p.items.value = []), JSON.stringify(t) !== JSON.stringify(e.value) && (e.value = { ...t }), (l = s()) == null || l.close();
|
|
377
|
-
}, o = () => {
|
|
378
|
-
if (!Array.isArray(e.value)) {
|
|
379
|
-
const n = (i.value.findIndex((l) => l.id === e.value.id) + 1) % i.value.length;
|
|
380
|
-
e.value = { ...i.value[n] };
|
|
381
|
-
}
|
|
382
|
-
}, g = async (t) => {
|
|
383
|
-
Array.isArray(e.value) && (e.value = e.value.filter((n) => n.id !== t), setTimeout(() => {
|
|
384
|
-
var n;
|
|
385
|
-
(n = s()) == null || n.recalcPosition();
|
|
386
|
-
}));
|
|
387
|
-
}, h = _(!1);
|
|
388
|
-
d.apiRequest && (S(h, () => {
|
|
389
|
-
h.value && p.setSearchTextAndLoad(a.value, !1);
|
|
390
|
-
}), S(a, () => p.setSearchTextAndLoad(a.value)));
|
|
391
|
-
const G = (t) => {
|
|
392
|
-
const n = t.target;
|
|
393
|
-
n.scrollTop / (n.scrollHeight - n.offsetHeight) > 0.8 && p.loadAppend();
|
|
394
|
-
};
|
|
395
|
-
return (t, n) => (c(), I(k(re), {
|
|
396
|
-
ref_key: "popupRef",
|
|
397
|
-
ref: f,
|
|
398
|
-
onOpen: n[1] || (n[1] = (l) => h.value = !0),
|
|
399
|
-
onClose: n[2] || (n[2] = (l) => h.value = !1),
|
|
400
|
-
onScrollContentList: n[3] || (n[3] = (l) => t.apiRequest ? G(l) : void 0),
|
|
401
|
-
notch: !1,
|
|
402
|
-
transitionDuration: 0
|
|
403
|
-
}, {
|
|
404
|
-
opener: $(() => [
|
|
405
|
-
E("div", {
|
|
406
|
-
class: T({
|
|
407
|
-
"top-selector2": !0,
|
|
408
|
-
"top-selector2-multiselect": t.multiselect,
|
|
409
|
-
["top-size_" + t.size]: !0,
|
|
410
|
-
"top-disabled": t.disabled,
|
|
411
|
-
"top-forms-focusable": !t.disabled,
|
|
412
|
-
"top-error": t.isError
|
|
413
|
-
})
|
|
414
|
-
}, [
|
|
415
|
-
t.multiselect ? (c(), v("div", Me, [
|
|
416
|
-
(c(!0), v(P, null, H(e.value, (l) => (c(), I(Be, {
|
|
417
|
-
id: l.id,
|
|
418
|
-
name: l.name,
|
|
419
|
-
onDelete: g
|
|
420
|
-
}, null, 8, ["id", "name"]))), 256))
|
|
421
|
-
])) : V("", !0),
|
|
422
|
-
t.multiselect ? V("", !0) : (c(), v("span", ke, C(Array.isArray(e.value) ? "" : e.value.name), 1)),
|
|
423
|
-
t.addChanger && !t.multiselect && i.value.length > 1 && !t.disabled ? (c(), v("span", {
|
|
424
|
-
key: 2,
|
|
425
|
-
class: "top-changer top-changer-selector",
|
|
426
|
-
onClick: B(o, ["stop"])
|
|
427
|
-
})) : V("", !0)
|
|
428
|
-
], 2)
|
|
429
|
-
]),
|
|
430
|
-
widget: $(() => [
|
|
431
|
-
F(k(ne), {
|
|
432
|
-
title: "Поиск",
|
|
433
|
-
icon: "",
|
|
434
|
-
modelValue: a.value,
|
|
435
|
-
"onUpdate:modelValue": n[0] || (n[0] = (l) => a.value = l),
|
|
436
|
-
isLoading: k(p).isLoading.value,
|
|
437
|
-
placeholder: !Array.isArray(e.value) && !t.multiselect && t.showSelectedInInput ? e.value.name : t.placeholder
|
|
438
|
-
}, null, 8, ["modelValue", "isLoading", "placeholder"])
|
|
439
|
-
]),
|
|
440
|
-
contentList: $(() => [
|
|
441
|
-
(c(!0), v(P, null, H(b.value, (l) => (c(), I(k(R), {
|
|
442
|
-
class: T({
|
|
443
|
-
"top-active": !Array.isArray(e.value) && !t.multiselect && e.value.name === l.name
|
|
444
|
-
}),
|
|
445
|
-
key: l.id ?? void 0,
|
|
446
|
-
onClick: B((A) => u(l), ["stop"])
|
|
447
|
-
}, {
|
|
448
|
-
default: $(() => [
|
|
449
|
-
t.$slots.item ? j(t.$slots, "item", {
|
|
450
|
-
key: 0,
|
|
451
|
-
item: l
|
|
452
|
-
}) : (c(), v(P, { key: 1 }, [
|
|
453
|
-
M(C(l.name), 1)
|
|
454
|
-
], 64))
|
|
455
|
-
]),
|
|
456
|
-
_: 2
|
|
457
|
-
}, 1032, ["class", "onClick"]))), 128)),
|
|
458
|
-
b.value.length ? V("", !0) : (c(), I(k(R), {
|
|
459
|
-
key: 0,
|
|
460
|
-
type: "regular"
|
|
461
|
-
}, {
|
|
462
|
-
default: $(() => [
|
|
463
|
-
M(" Нет результатов ")
|
|
464
|
-
]),
|
|
465
|
-
_: 1
|
|
466
|
-
}))
|
|
467
|
-
]),
|
|
468
|
-
_: 3
|
|
469
|
-
}, 512));
|
|
470
|
-
}
|
|
471
|
-
}), Ee = {
|
|
472
|
-
"top-selector2": "top-selector2",
|
|
473
|
-
"top-selector2-multiselect": "top-selector2-multiselect",
|
|
474
|
-
"top-active": "top-active",
|
|
475
|
-
"top-selector2_activeItems": "top-selector2_activeItems",
|
|
476
|
-
"top-selector2_activeName": "top-selector2_activeName",
|
|
477
|
-
"top-changer-selector": "top-changer-selector"
|
|
478
|
-
}, Ke = {
|
|
479
|
-
$style: Ee
|
|
480
|
-
}, We = /* @__PURE__ */ L(Se, [["__cssModules", Ke]]);
|
|
238
|
+
}, ne = {
|
|
239
|
+
$style: de
|
|
240
|
+
}, ue = /* @__PURE__ */ $(ie, [["__cssModules", ne]]), ve = Z, ye = ae, be = ue, Ve = j;
|
|
481
241
|
export {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
We as Selector2
|
|
242
|
+
ve as TopEditArea,
|
|
243
|
+
ye as TopEditInput,
|
|
244
|
+
Ve as TopMenu,
|
|
245
|
+
be as TopRadioGroup
|
|
487
246
|
};
|
|
488
247
|
//# sourceMappingURL=formsExt.js.map
|