@topvisor/ui 1.0.34 → 1.0.36
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/{core-CUNwUlL6.es.js → core-CO5q-OhH.es.js} +13 -12
- package/.chunks/core-CO5q-OhH.es.js.map +1 -0
- package/.chunks/core-D-ONEIDC.amd.js +2 -0
- package/.chunks/{core-CUNwUlL6.es.js.map → core-D-ONEIDC.amd.js.map} +1 -1
- package/.chunks/{datepicker-C0a_eKze.amd.js → datepicker-BKWD8N4r.amd.js} +2 -2
- package/.chunks/{datepicker-C0a_eKze.amd.js.map → datepicker-BKWD8N4r.amd.js.map} +1 -1
- package/.chunks/{datepicker-CW2Ql1NG.es.js → datepicker-BfPUBUE1.es.js} +2 -2
- package/.chunks/{datepicker-CW2Ql1NG.es.js.map → datepicker-BfPUBUE1.es.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-Bkw1LXvI.es.js → dialog_selectorRegions-D3CnPt4V.es.js} +4 -4
- package/.chunks/{dialog_selectorRegions-Bkw1LXvI.es.js.map → dialog_selectorRegions-D3CnPt4V.es.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-Bhblg2Ks.amd.js → dialog_selectorRegions-DYPTw--e.amd.js} +2 -2
- package/.chunks/{dialog_selectorRegions-Bhblg2Ks.amd.js.map → dialog_selectorRegions-DYPTw--e.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-CXtBj2Ah.amd.js → dialogs.vue_vue_type_script_setup_true_lang-C5vfO9ia.amd.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-CXtBj2Ah.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-C5vfO9ia.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-JyillkBh.es.js → dialogs.vue_vue_type_script_setup_true_lang-CEkc3TYu.es.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-JyillkBh.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-CEkc3TYu.es.js.map} +1 -1
- package/.chunks/{forms-CKYHAaPQ.amd.js → forms-DPIu5wcK.amd.js} +3 -3
- package/.chunks/{forms-CKYHAaPQ.amd.js.map → forms-DPIu5wcK.amd.js.map} +1 -1
- package/.chunks/{forms-zDpk9gMK.es.js → forms-YZl4XC4S.es.js} +300 -280
- package/.chunks/{forms-zDpk9gMK.es.js.map → forms-YZl4XC4S.es.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-Di1h6iID.es.js → listItem.vue_vue_type_script_setup_true_lang-CDrG3onO.es.js} +23 -23
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CDrG3onO.es.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CTbTjIda.amd.js +2 -0
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-C_ZN2Nia.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-CTbTjIda.amd.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-B5fkWPo5.es.js → menu.vue_vue_type_style_index_0_lang-2vtQvU8o.es.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-vyCH9NUZ.amd.js.map → menu.vue_vue_type_style_index_0_lang-2vtQvU8o.es.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-vyCH9NUZ.amd.js → menu.vue_vue_type_style_index_0_lang-QsJS5sEm.amd.js} +2 -2
- package/.chunks/menu.vue_vue_type_style_index_0_lang-QsJS5sEm.amd.js.map +1 -0
- package/.chunks/{notice-CyeaHgdt.amd.js → notice-CwPCnQ9k.amd.js} +2 -2
- package/.chunks/{notice-CyeaHgdt.amd.js.map → notice-CwPCnQ9k.amd.js.map} +1 -1
- package/.chunks/{notice-B8hUtbou.es.js → notice-CysocnDZ.es.js} +2 -2
- package/.chunks/{notice-B8hUtbou.es.js.map → notice-CysocnDZ.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-C8oRGxFZ.es.js → page.vue_vue_type_script_setup_true_lang-DOTfcVUC.es.js} +4 -4
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-C8oRGxFZ.es.js.map → page.vue_vue_type_script_setup_true_lang-DOTfcVUC.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-DmbqzLa6.amd.js → page.vue_vue_type_script_setup_true_lang-vzWb9Ehr.amd.js} +2 -2
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-DmbqzLa6.amd.js.map → page.vue_vue_type_script_setup_true_lang-vzWb9Ehr.amd.js.map} +1 -1
- package/.chunks/{popup-BaFsC2VD.es.js → popup-Cbr1ckCd.es.js} +2 -2
- package/.chunks/{popup-BaFsC2VD.es.js.map → popup-Cbr1ckCd.es.js.map} +1 -1
- package/.chunks/{popup-DR6JnpNV.amd.js → popup-DdvupIju.amd.js} +2 -2
- package/.chunks/{popup-DR6JnpNV.amd.js.map → popup-DdvupIju.amd.js.map} +1 -1
- package/.chunks/utils-ASIXzycS.es.js +227 -0
- package/.chunks/{utils-CKggUvLI.es.js.map → utils-ASIXzycS.es.js.map} +1 -1
- package/.chunks/{utils-BPcGxQ0s.es.js → utils-Bjl0RkKM.es.js} +2 -2
- package/.chunks/{utils-BPcGxQ0s.es.js.map → utils-Bjl0RkKM.es.js.map} +1 -1
- package/.chunks/utils-CkpzFGzD.amd.js +2 -0
- package/.chunks/{utils-BO3j538g.amd.js.map → utils-CkpzFGzD.amd.js.map} +1 -1
- package/.chunks/{utils-BPyrKdwc.amd.js → utils-D_OVY7zV.amd.js} +2 -2
- package/.chunks/{utils-BPyrKdwc.amd.js.map → utils-D_OVY7zV.amd.js.map} +1 -1
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/layout.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.js +1 -1
- package/charts/charts.js.map +1 -1
- package/components/charts/miniChart/miniChart.vue.d.ts +1 -1
- package/components/charts/miniCharts/miniCharts.d.ts +1 -1
- package/components/charts/miniCharts/miniCharts.vue.d.ts +1 -1
- package/components/charts/miniCharts/stories/dummy.d.ts +1 -1
- package/components/core/notice/item/types.d.ts +2 -0
- package/components/forms/avatar/avatar.vue.d.ts +1 -1
- package/components/forms/caption/caption.vue.d.ts +17 -0
- package/components/forms/caption/types.d.ts +9 -0
- package/components/forms/checkbox/checkbox.vue.d.ts +1 -1
- package/components/forms/controlLabel/controlLabel.vue.d.ts +1 -1
- package/components/forms/forms.d.ts +2 -0
- package/components/forms/hint/hint.vue.d.ts +1 -1
- package/components/forms/input/input.vue.d.ts +1 -1
- package/components/forms/inputDate/inputDate.vue.d.ts +1 -1
- package/components/forms/inputDate/types.d.ts +1 -0
- package/components/forms/radio/radio.vue.d.ts +1 -1
- package/components/forms/select/select.vue.d.ts +1 -1
- package/components/forms/select/stories/exampleOptions.d.ts +1 -1
- package/components/forms/switcher/switcher.vue.d.ts +1 -1
- package/components/forms/textarea/textarea.vue.d.ts +1 -1
- package/components/forms/textarea/{textarea.d.ts → types.d.ts} +4 -0
- package/components/formsExt/checkboxGroup/checkboxGroup.vue.d.ts +1 -1
- package/components/formsExt/editArea/editArea.vue.d.ts +1 -1
- package/components/formsExt/editArea/{editArea.d.ts → types.d.ts} +1 -1
- package/components/formsExt/editInput/editInput.vue.d.ts +1 -1
- package/components/formsExt/editInput/{editInput.d.ts → types.d.ts} +1 -1
- package/components/formsExt/menu/menu.vue.d.ts +1 -1
- package/components/formsExt/menu/stories/items.d.ts +1 -1
- package/components/formsExt/radioGroup/radioGroup.vue.d.ts +1 -1
- package/components/formsExt/selector2/{api.d.ts → composables/useAPI.d.ts} +15 -1
- package/components/formsExt/selector2/composables/useMenu.d.ts +12 -0
- package/components/formsExt/selector2/itemMulti.vue.d.ts +1 -1
- package/components/formsExt/selector2/selector2.vue.d.ts +3 -3
- package/components/formsExt/selector2/utils.d.ts +6 -0
- package/components/popup/alert/alert.vue.d.ts +2 -2
- package/components/popup/alert/{alert.d.ts → types.d.ts} +1 -1
- package/components/popup/confirm/confirm.vue.d.ts +2 -2
- package/components/popup/confirm/{confirm.d.ts → types.d.ts} +1 -1
- package/components/popup/lib/worker.d.ts +2 -2
- package/components/popup/popup/listItem.vue.d.ts +1 -1
- package/components/popup/popup/opener.vue.d.ts +1 -1
- package/components/popup/popup/popup.vue.d.ts +1 -1
- package/components/popup/popup/widgetInput.vue.d.ts +1 -1
- package/components/popup/prompt/prompt.vue.d.ts +2 -2
- package/components/popup/prompt/{prompt.d.ts → types.d.ts} +1 -1
- package/components/project/selectorCompetitors/composables.d.ts +1 -2
- package/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +1 -1
- package/components/project/selectorCompetitors/stories/items.d.ts +1 -1
- package/components/project/selectorCompetitors/{selectorCompetitors.d.ts → types.d.ts} +7 -0
- package/components/project/selectorRegion/composables/compare.d.ts +1 -1
- package/components/project/selectorRegion/composables/selectRegion.d.ts +2 -2
- package/components/project/selectorRegion/composables/selectSearcher.d.ts +2 -2
- package/components/project/selectorRegion/composables/selectorRegion.d.ts +2 -2
- package/components/project/selectorRegion/dialog_selectorRegions/types.d.ts +1 -1
- package/components/project/selectorRegion/selectorRegion.vue.d.ts +1 -1
- package/components/project/selectorRegion/stories/searchers.d.ts +1 -1
- package/components/project/selectorRegion/utils/consts.d.ts +1 -1
- package/components/project/selectorRegion/utils/utils.d.ts +1 -1
- package/components/project/tagSelector/popupOpener/types.d.ts +2 -0
- package/components/project/tagSelector/types.d.ts +2 -0
- package/components/project/tagSelector/utils/el.d.ts +1 -1
- package/components/tabs/tabs/content.vue.d.ts +1 -1
- package/components/tabs/tabs/tab.vue.d.ts +1 -1
- package/components/tabs/tabs/tabs.vue.d.ts +1 -1
- package/components/tabsView/tabsView/menu.vue.d.ts +1 -1
- package/components/tabsView/tabsView/menuItem.vue.d.ts +1 -1
- package/components/tabsView/tabsView/menuTitle.vue.d.ts +1 -1
- package/components/tabsView/tabsView/store.d.ts +5 -185
- package/components/tabsView/tabsView/tabsView.vue.d.ts +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.js +5 -5
- package/core/utils/store.d.ts +1 -1
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.js +2 -2
- package/extra/extra.amd.js +1 -1
- package/extra/extra.amd.js.map +1 -1
- package/extra/extra.js +1 -0
- package/extra/extra.js.map +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +8 -7
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +310 -309
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/Topvisor icons.json +82 -36
- package/icomoon/demo.html +29 -1
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +2 -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 +11 -5
- package/layout/layout.amd.js +1 -1
- package/layout/layout.amd.js.map +1 -1
- package/layout/layout.js +1 -1
- package/layout/layout.js.map +1 -1
- package/package.json +4 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +2 -2
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +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 +244 -241
- package/project/project.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +1 -1
- package/tabsView/tabsView.js.map +1 -1
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.js +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/lodash.amd.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.js +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.js +3 -3
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +5 -5
- package/utils/string.js.map +1 -1
- package/.chunks/core-BHvOvH4M.amd.js +0 -2
- package/.chunks/core-BHvOvH4M.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C_ZN2Nia.amd.js +0 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Di1h6iID.es.js.map +0 -1
- package/.chunks/menu.vue_vue_type_style_index_0_lang-B5fkWPo5.es.js.map +0 -1
- package/.chunks/utils-BO3j538g.amd.js +0 -2
- package/.chunks/utils-CKggUvLI.es.js +0 -227
- package/components/forms/inputDate/inputDate.d.ts +0 -3
- package/components/project/selectorCompetitors/types/competitor.d.ts +0 -7
- /package/components/charts/miniChart/{miniChart.d.ts → types.d.ts} +0 -0
- /package/components/forms/avatar/{avatar.d.ts → types.d.ts} +0 -0
- /package/components/forms/checkbox/{checkbox.d.ts → types.d.ts} +0 -0
- /package/components/forms/controlLabel/{controlLabel.d.ts → types.d.ts} +0 -0
- /package/components/forms/hint/{hint.d.ts → types.d.ts} +0 -0
- /package/components/forms/input/{input.d.ts → types.d.ts} +0 -0
- /package/components/forms/inputRange/{inputRange.d.ts → types.d.ts} +0 -0
- /package/components/forms/radio/{radio.d.ts → types.d.ts} +0 -0
- /package/components/forms/select/{select.d.ts → types.d.ts} +0 -0
- /package/components/forms/switcher/{switcher.d.ts → types.d.ts} +0 -0
- /package/components/formsExt/menu/{menu.d.ts → types.d.ts} +0 -0
- /package/components/formsExt/radioGroup/{radioGroup.d.ts → types.d.ts} +0 -0
- /package/components/formsExt/selector2/{selector2.d.ts → types.d.ts} +0 -0
- /package/components/popup/popup/{popup.d.ts → types.d.ts} +0 -0
- /package/components/project/selectorRegion/{selectorRegion.d.ts → types.d.ts} +0 -0
- /package/components/tabs/tabs/{tabs.d.ts → types.d.ts} +0 -0
- /package/components/tabsView/tabsView/{tabsView.d.ts → types.d.ts} +0 -0
package/formsExt/formsExt.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Core as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { w as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { _ as
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const
|
|
1
|
+
import { Core as Y } from "../core/app.js";
|
|
2
|
+
import { defineComponent as B, ref as w, computed as F, createElementBlock as f, openBlock as p, normalizeClass as C, createCommentVNode as k, createElementVNode as I, toDisplayString as $, createVNode as P, withKeys as L, withModifiers as M, createBlock as A, createSlots as N, withCtx as V, createTextVNode as S, watch as E, toRef as z, mergeProps as W, mergeModels as R, useModel as U, Fragment as _, renderList as G, withDirectives as X, vModelRadio as Q, resolveDirective as Z, unref as b, renderSlot as D } from "vue";
|
|
3
|
+
import { w as q, _ as H, f as x, d as ee, u as oe, C as te, x as le } from "../.chunks/forms-YZl4XC4S.es.js";
|
|
4
|
+
import { TopPopup as se, TopPopupListItem as O, TopPopupWidgetInput as ae } from "../popup/popup.js";
|
|
5
|
+
import { invertKeyboardLayout as re } from "../utils/keyboard.js";
|
|
6
|
+
import { _ as ne } from "../.chunks/menu.vue_vue_type_style_index_0_lang-2vtQvU8o.es.js";
|
|
7
|
+
const j = ["../assets/formsExt.css"].map((s) => import.meta.resolve(s));
|
|
8
|
+
Y.insertCSSLinkToPage(j, !0);
|
|
9
|
+
const ie = { class: "top-editArea_footer" }, ue = /* @__PURE__ */ B({
|
|
10
10
|
__name: "editArea",
|
|
11
11
|
props: {
|
|
12
12
|
defaultValue: { default: "" },
|
|
@@ -27,86 +27,87 @@ const me = { class: "top-editArea_footer" }, fe = /* @__PURE__ */ I({
|
|
|
27
27
|
disabled: { type: Boolean },
|
|
28
28
|
readonly: { type: Boolean },
|
|
29
29
|
isError: { type: Boolean },
|
|
30
|
-
hint: {}
|
|
30
|
+
hint: {},
|
|
31
|
+
maxLength: {}
|
|
31
32
|
},
|
|
32
33
|
emits: ["submit", "close", "clickOnTitle"],
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
|
|
34
|
+
setup(s, { emit: o }) {
|
|
35
|
+
const e = s, a = o, n = w(e.defaultValue), t = w(e.isFocused), d = F(() => n.value !== e.defaultValue), c = (i) => {
|
|
36
|
+
a("submit", i), n.value = e.defaultValue;
|
|
36
37
|
}, y = () => {
|
|
37
|
-
if (
|
|
38
|
-
|
|
38
|
+
if (e.forceShowCloseBtn && !d.value) {
|
|
39
|
+
a("close");
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
+
n.value = e.defaultValue;
|
|
42
43
|
}, g = () => {
|
|
43
|
-
|
|
44
|
+
e.attachToKeyboard && a("clickOnTitle");
|
|
44
45
|
};
|
|
45
|
-
return (
|
|
46
|
-
class:
|
|
46
|
+
return (i, m) => (p(), f("div", {
|
|
47
|
+
class: C({
|
|
47
48
|
"top-editArea": !0,
|
|
48
|
-
"top-editArea-attachedToKeyboard":
|
|
49
|
+
"top-editArea-attachedToKeyboard": i.attachToKeyboard
|
|
49
50
|
})
|
|
50
51
|
}, [
|
|
51
|
-
|
|
52
|
+
i.title ? (p(), f("div", {
|
|
52
53
|
key: 0,
|
|
53
54
|
class: "top-editArea_title",
|
|
54
|
-
onClick:
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
class:
|
|
55
|
+
onClick: m[0] || (m[0] = (r) => g())
|
|
56
|
+
}, $(i.title), 1)) : k("", !0),
|
|
57
|
+
I("div", {
|
|
58
|
+
class: C({
|
|
58
59
|
"top-editArea_form": !0,
|
|
59
|
-
"top-error":
|
|
60
|
-
"top-focus":
|
|
60
|
+
"top-error": i.isError,
|
|
61
|
+
"top-focus": t.value
|
|
61
62
|
})
|
|
62
63
|
}, [
|
|
63
|
-
|
|
64
|
-
modelValue:
|
|
65
|
-
"onUpdate:modelValue":
|
|
66
|
-
name:
|
|
67
|
-
placeholder:
|
|
68
|
-
rows:
|
|
69
|
-
minHeight:
|
|
70
|
-
expandable:
|
|
71
|
-
disabled:
|
|
72
|
-
readonly:
|
|
73
|
-
isError:
|
|
74
|
-
hint:
|
|
64
|
+
P(q, {
|
|
65
|
+
modelValue: n.value,
|
|
66
|
+
"onUpdate:modelValue": m[1] || (m[1] = (r) => n.value = r),
|
|
67
|
+
name: i.name,
|
|
68
|
+
placeholder: i.placeholder,
|
|
69
|
+
rows: i.rows,
|
|
70
|
+
minHeight: i.minHeight,
|
|
71
|
+
expandable: i.expandable,
|
|
72
|
+
disabled: i.disabled,
|
|
73
|
+
readonly: i.readonly,
|
|
74
|
+
isError: i.isError,
|
|
75
|
+
hint: i.hint,
|
|
75
76
|
class: "top-editArea_element",
|
|
76
|
-
onFocus:
|
|
77
|
-
onBlur:
|
|
77
|
+
onFocus: m[2] || (m[2] = () => t.value = !0),
|
|
78
|
+
onBlur: m[3] || (m[3] = () => t.value = !1),
|
|
78
79
|
onKeyup: [
|
|
79
80
|
L(y, ["esc"]),
|
|
80
|
-
|
|
81
|
+
m[4] || (m[4] = L(M((r) => c(n.value), ["ctrl"]), ["enter"]))
|
|
81
82
|
]
|
|
82
83
|
}, null, 8, ["modelValue", "name", "placeholder", "rows", "minHeight", "expandable", "disabled", "readonly", "isError", "hint"]),
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
I("div", ie, [
|
|
85
|
+
d.value || i.forceShowCloseBtn ? (p(), A(H, {
|
|
85
86
|
key: 0,
|
|
86
|
-
icon:
|
|
87
|
+
icon: i.$core.state.isMobile ? "" : "",
|
|
87
88
|
class: "top-editArea_button",
|
|
88
89
|
color: "theme",
|
|
89
90
|
styling: "soft",
|
|
90
91
|
onClick: y
|
|
91
|
-
},
|
|
92
|
-
|
|
92
|
+
}, N({ _: 2 }, [
|
|
93
|
+
i.$core.state.isMobile ? void 0 : {
|
|
93
94
|
name: "default",
|
|
94
|
-
fn:
|
|
95
|
-
|
|
95
|
+
fn: V(() => [
|
|
96
|
+
S($(i.cancelText), 1)
|
|
96
97
|
]),
|
|
97
98
|
key: "0"
|
|
98
99
|
}
|
|
99
100
|
]), 1032, ["icon"])) : k("", !0),
|
|
100
|
-
|
|
101
|
+
d.value ? (p(), A(H, {
|
|
101
102
|
key: 1,
|
|
102
103
|
class: "top-editArea_button",
|
|
103
|
-
icon:
|
|
104
|
-
onClick:
|
|
105
|
-
},
|
|
106
|
-
|
|
104
|
+
icon: i.$core.state.isMobile ? "" : "",
|
|
105
|
+
onClick: m[5] || (m[5] = (r) => c(n.value))
|
|
106
|
+
}, N({ _: 2 }, [
|
|
107
|
+
i.$core.state.isMobile ? void 0 : {
|
|
107
108
|
name: "default",
|
|
108
|
-
fn:
|
|
109
|
-
|
|
109
|
+
fn: V(() => [
|
|
110
|
+
S($(i.submitText), 1)
|
|
110
111
|
]),
|
|
111
112
|
key: "0"
|
|
112
113
|
}
|
|
@@ -115,7 +116,7 @@ const me = { class: "top-editArea_footer" }, fe = /* @__PURE__ */ I({
|
|
|
115
116
|
], 2)
|
|
116
117
|
], 2));
|
|
117
118
|
}
|
|
118
|
-
}),
|
|
119
|
+
}), de = { class: "top-editInput" }, pe = /* @__PURE__ */ B({
|
|
119
120
|
__name: "editInput",
|
|
120
121
|
props: {
|
|
121
122
|
modelValue: {},
|
|
@@ -123,34 +124,34 @@ const me = { class: "top-editArea_footer" }, fe = /* @__PURE__ */ I({
|
|
|
123
124
|
button: {}
|
|
124
125
|
},
|
|
125
126
|
emits: ["update:modelValue"],
|
|
126
|
-
setup(
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
setup(s, { emit: o }) {
|
|
128
|
+
const e = s, a = w(e.modelValue);
|
|
129
|
+
E(z(e.modelValue), () => {
|
|
130
|
+
a.value = e.modelValue;
|
|
130
131
|
});
|
|
131
|
-
const
|
|
132
|
-
|
|
132
|
+
const n = o, t = () => {
|
|
133
|
+
n("update:modelValue", a.value);
|
|
133
134
|
};
|
|
134
|
-
return (
|
|
135
|
-
|
|
136
|
-
onKeydownCapture: c[0] || (c[0] = L(M((y) =>
|
|
137
|
-
onKeydown: L(M(
|
|
138
|
-
modelValue:
|
|
139
|
-
"onUpdate:modelValue": c[1] || (c[1] = (y) =>
|
|
135
|
+
return (d, c) => (p(), f("div", de, [
|
|
136
|
+
P(x, W(d.input, {
|
|
137
|
+
onKeydownCapture: c[0] || (c[0] = L(M((y) => a.value = d.modelValue, ["stop"]), ["esc"])),
|
|
138
|
+
onKeydown: L(M(t, ["stop"]), ["enter"]),
|
|
139
|
+
modelValue: a.value,
|
|
140
|
+
"onUpdate:modelValue": c[1] || (c[1] = (y) => a.value = y)
|
|
140
141
|
}), null, 16, ["onKeydown", "modelValue"]),
|
|
141
|
-
|
|
142
|
+
a.value !== d.modelValue ? (p(), A(H, W({
|
|
142
143
|
key: 0,
|
|
143
144
|
icon: "",
|
|
144
145
|
styling: "soft"
|
|
145
|
-
},
|
|
146
|
+
}, d.button, { onClick: t }), null, 16)) : k("", !0)
|
|
146
147
|
]));
|
|
147
148
|
}
|
|
148
|
-
}),
|
|
149
|
+
}), ce = ["data-top-icon", "onClick"], me = {
|
|
149
150
|
key: 0,
|
|
150
151
|
class: "top-radioGroup_circle"
|
|
151
|
-
},
|
|
152
|
+
}, fe = ["value", "disabled"], ve = /* @__PURE__ */ B({
|
|
152
153
|
__name: "radioGroup",
|
|
153
|
-
props: /* @__PURE__ */
|
|
154
|
+
props: /* @__PURE__ */ R({
|
|
154
155
|
modelValue: {},
|
|
155
156
|
radiosProps: {},
|
|
156
157
|
showIndicator: { type: Boolean },
|
|
@@ -163,53 +164,53 @@ const me = { class: "top-editArea_footer" }, fe = /* @__PURE__ */ I({
|
|
|
163
164
|
modelModifiers: {}
|
|
164
165
|
}),
|
|
165
166
|
emits: ["update:modelValue"],
|
|
166
|
-
setup(
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
var
|
|
170
|
-
(
|
|
167
|
+
setup(s) {
|
|
168
|
+
const o = U(s, "modelValue"), e = s, a = w(null);
|
|
169
|
+
E(o, () => {
|
|
170
|
+
var t, d, c, y, g;
|
|
171
|
+
(t = e.radiosProps) != null && t.some((i) => i.value === o.value) || (o.value = ((c = (d = e.radiosProps) == null ? void 0 : d[0]) == null ? void 0 : c.value) ?? ""), (g = (y = a.value) == null ? void 0 : y.querySelector(".radioGroup_item-selected")) == null || g.scrollIntoView();
|
|
171
172
|
}, { immediate: !0 });
|
|
172
|
-
const
|
|
173
|
-
return (
|
|
173
|
+
const n = "radioGroup-" + Math.random();
|
|
174
|
+
return (t, d) => (p(), f("div", {
|
|
174
175
|
ref_key: "elRef",
|
|
175
|
-
ref:
|
|
176
|
-
class:
|
|
176
|
+
ref: a,
|
|
177
|
+
class: C({
|
|
177
178
|
"top-radioGroup": !0,
|
|
178
179
|
"top-scrollBarXHidding": !0,
|
|
179
|
-
["top-size_" +
|
|
180
|
-
"top-error":
|
|
180
|
+
["top-size_" + t.size]: !!t.size,
|
|
181
|
+
"top-error": t.isError
|
|
181
182
|
})
|
|
182
183
|
}, [
|
|
183
|
-
(
|
|
184
|
-
class:
|
|
185
|
-
"top-radioGroup_item-selected": c.value ===
|
|
184
|
+
(p(!0), f(_, null, G(t.radiosProps, (c) => (p(), f("label", {
|
|
185
|
+
class: C({
|
|
186
|
+
"top-radioGroup_item-selected": c.value === o.value,
|
|
186
187
|
"top-radioGroup_item": !0,
|
|
187
188
|
"top-forms-focusable": !0,
|
|
188
189
|
"top-disabled": c.disabled
|
|
189
190
|
}),
|
|
190
191
|
"data-top-icon": c.icon,
|
|
191
|
-
onClick: (y) =>
|
|
192
|
+
onClick: (y) => o.value = c.value
|
|
192
193
|
}, [
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
"onUpdate:modelValue":
|
|
197
|
-
name:
|
|
194
|
+
S($(c.title) + " ", 1),
|
|
195
|
+
t.showIndicator ? (p(), f("span", me)) : k("", !0),
|
|
196
|
+
X(I("input", {
|
|
197
|
+
"onUpdate:modelValue": d[0] || (d[0] = (y) => o.value = y),
|
|
198
|
+
name: n,
|
|
198
199
|
type: "radio",
|
|
199
|
-
class:
|
|
200
|
+
class: C({
|
|
200
201
|
"top-unvisible": !0
|
|
201
202
|
}),
|
|
202
203
|
value: c.value,
|
|
203
204
|
disabled: c.disabled
|
|
204
|
-
}, null, 8,
|
|
205
|
-
[
|
|
205
|
+
}, null, 8, fe), [
|
|
206
|
+
[Q, o.value]
|
|
206
207
|
])
|
|
207
|
-
], 10,
|
|
208
|
+
], 10, ce))), 256))
|
|
208
209
|
], 2));
|
|
209
210
|
}
|
|
210
|
-
}),
|
|
211
|
+
}), ye = ["data-top-icon"], he = ["value", "checked", "disabled", "onChange"], be = /* @__PURE__ */ B({
|
|
211
212
|
__name: "checkboxGroup",
|
|
212
|
-
props: /* @__PURE__ */
|
|
213
|
+
props: /* @__PURE__ */ R({
|
|
213
214
|
modelValue: {},
|
|
214
215
|
items: {},
|
|
215
216
|
size: { default: "s" },
|
|
@@ -222,109 +223,137 @@ const me = { class: "top-editArea_footer" }, fe = /* @__PURE__ */ I({
|
|
|
222
223
|
modelModifiers: {}
|
|
223
224
|
}),
|
|
224
225
|
emits: ["update:modelValue"],
|
|
225
|
-
setup(
|
|
226
|
-
const
|
|
227
|
-
const
|
|
228
|
-
|
|
226
|
+
setup(s) {
|
|
227
|
+
const o = U(s, "modelValue"), e = (a) => {
|
|
228
|
+
const n = [...o.value], t = n.indexOf(a);
|
|
229
|
+
t === -1 ? n.push(a) : n.splice(t, 1), o.value = n;
|
|
229
230
|
};
|
|
230
|
-
return (
|
|
231
|
-
class:
|
|
231
|
+
return (a, n) => (p(), f("div", {
|
|
232
|
+
class: C({
|
|
232
233
|
"top-checkboxGroup": !0,
|
|
233
|
-
["top-checkboxGroup-" +
|
|
234
|
+
["top-checkboxGroup-" + a.styling]: !0,
|
|
234
235
|
"top-scrollBarXHidding": !0,
|
|
235
|
-
["top-size_" +
|
|
236
|
-
"top-error":
|
|
236
|
+
["top-size_" + a.size]: !!a.size,
|
|
237
|
+
"top-error": a.isError
|
|
237
238
|
})
|
|
238
239
|
}, [
|
|
239
|
-
(
|
|
240
|
-
key:
|
|
241
|
-
class:
|
|
240
|
+
(p(!0), f(_, null, G(a.items, (t) => (p(), f("label", {
|
|
241
|
+
key: t.id,
|
|
242
|
+
class: C({
|
|
242
243
|
"top-checkboxGroup_item": !0,
|
|
243
|
-
"top-checkboxGroup_item-selected":
|
|
244
|
+
"top-checkboxGroup_item-selected": o.value.includes(t.id),
|
|
244
245
|
"top-forms-focusable": !0,
|
|
245
|
-
"top-disabled":
|
|
246
|
+
"top-disabled": t.disabled
|
|
246
247
|
}),
|
|
247
|
-
"data-top-icon":
|
|
248
|
+
"data-top-icon": t.icon
|
|
248
249
|
}, [
|
|
249
|
-
|
|
250
|
+
I("input", {
|
|
250
251
|
type: "checkbox",
|
|
251
252
|
class: "top-unvisible",
|
|
252
|
-
value:
|
|
253
|
-
checked:
|
|
254
|
-
disabled:
|
|
255
|
-
onChange: (
|
|
256
|
-
}, null, 40,
|
|
257
|
-
|
|
258
|
-
], 10,
|
|
253
|
+
value: t.id,
|
|
254
|
+
checked: o.value.includes(t.id),
|
|
255
|
+
disabled: t.disabled,
|
|
256
|
+
onChange: (d) => e(t.id)
|
|
257
|
+
}, null, 40, he),
|
|
258
|
+
S(" " + $(t.title), 1)
|
|
259
|
+
], 10, ye))), 128))
|
|
259
260
|
], 2));
|
|
260
261
|
}
|
|
261
|
-
}),
|
|
262
|
-
const l = C([]), d = C(!1);
|
|
263
|
-
let s = "", m;
|
|
264
|
-
n && !n.params.limit && (n.params.limit = 100);
|
|
265
|
-
const c = async () => {
|
|
266
|
-
if (!n) return;
|
|
267
|
-
let i, S;
|
|
268
|
-
if (o && (n.cache ??= /* @__PURE__ */ new Map(), S = JSON.stringify(n.params), i = n.cache.get(S), i))
|
|
269
|
-
return i;
|
|
270
|
-
if (d.value = !0, i = await n.call(), d.value = !1, i.errors) return;
|
|
271
|
-
if (!Array.isArray(i.result)) {
|
|
272
|
-
console.warn("В result ожидался массив");
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
const z = i.result.findIndex((O) => O.id === void 0 || O.name === void 0);
|
|
276
|
-
if (z !== -1) {
|
|
277
|
-
console.warn(`В result[${z}] нет id или name`);
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
return o && n.cache.set(S, i), i;
|
|
281
|
-
}, y = async () => {
|
|
282
|
-
if (!n) return;
|
|
283
|
-
n.params.offset = 0, n.params.search = s;
|
|
284
|
-
const i = await c();
|
|
285
|
-
i && (m = i.nextOffset, l.value = i.result);
|
|
286
|
-
}, g = async () => {
|
|
287
|
-
if (!n || !m || d.value) return;
|
|
288
|
-
n.params.offset = m, n.params.search = s;
|
|
289
|
-
const i = await c();
|
|
290
|
-
i && (m = i.nextOffset, l.value = l.value.concat(i.result));
|
|
291
|
-
}, r = ne(() => y(), 200);
|
|
292
|
-
return {
|
|
293
|
-
items: l,
|
|
294
|
-
isLoading: d,
|
|
295
|
-
loadAppend: g,
|
|
296
|
-
setSearchTextAndLoad: (i, S = !0) => {
|
|
297
|
-
n && (i.length < t || i === s && l.value.length || (s = i, S ? r() : y()));
|
|
298
|
-
}
|
|
299
|
-
};
|
|
300
|
-
}, Ae = { class: "top-selector2_itemMulti top-ellipsis" }, Te = /* @__PURE__ */ I({
|
|
262
|
+
}), ge = { class: "top-selector2_itemMulti top-ellipsis" }, ke = /* @__PURE__ */ B({
|
|
301
263
|
__name: "itemMulti",
|
|
302
264
|
props: {
|
|
303
265
|
id: {},
|
|
304
266
|
name: {}
|
|
305
267
|
},
|
|
306
268
|
emits: ["delete"],
|
|
307
|
-
setup(
|
|
308
|
-
return (
|
|
309
|
-
|
|
310
|
-
|
|
269
|
+
setup(s) {
|
|
270
|
+
return (o, e) => (p(), f("div", ge, [
|
|
271
|
+
S($(o.name) + " ", 1),
|
|
272
|
+
I("span", {
|
|
311
273
|
class: "top-selector2_itemMultiDelete",
|
|
312
274
|
"data-top-icon": "",
|
|
313
|
-
onClick:
|
|
314
|
-
onMousedown:
|
|
275
|
+
onClick: e[0] || (e[0] = (a) => o.$emit("delete", o.id)),
|
|
276
|
+
onMousedown: e[1] || (e[1] = M(() => {
|
|
315
277
|
}, ["stop"]))
|
|
316
278
|
}, null, 32)
|
|
317
279
|
]));
|
|
318
280
|
}
|
|
319
|
-
}),
|
|
281
|
+
}), we = (s, o, e) => {
|
|
282
|
+
const a = w([]), n = w(!1);
|
|
283
|
+
let t = "", d;
|
|
284
|
+
s && !s.params.limit && (s.params.limit = 100);
|
|
285
|
+
const c = async () => {
|
|
286
|
+
if (!s) return;
|
|
287
|
+
let r, v;
|
|
288
|
+
if (e && (s.cache ??= /* @__PURE__ */ new Map(), v = JSON.stringify(s.params), r = s.cache.get(v), r))
|
|
289
|
+
return r;
|
|
290
|
+
if (n.value = !0, r = await s.call(), n.value = !1, r.errors) return;
|
|
291
|
+
if (!Array.isArray(r.result)) {
|
|
292
|
+
console.warn("В result ожидался массив");
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
const l = r.result.findIndex((u) => u.id === void 0 || u.name === void 0);
|
|
296
|
+
if (l !== -1) {
|
|
297
|
+
console.warn(`В result[${l}] нет id или name`);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
return e && s.cache.set(v, r), r;
|
|
301
|
+
}, y = async () => {
|
|
302
|
+
if (!s) return;
|
|
303
|
+
s.params.offset = 0, s.params.search = t;
|
|
304
|
+
const r = await c();
|
|
305
|
+
r && (d = r.nextOffset, a.value = r.result);
|
|
306
|
+
}, g = async () => {
|
|
307
|
+
if (!s || !d || n.value) return;
|
|
308
|
+
s.params.offset = d, s.params.search = t;
|
|
309
|
+
const r = await c();
|
|
310
|
+
r && (d = r.nextOffset, a.value = a.value.concat(r.result));
|
|
311
|
+
}, i = ee(() => y(), 200);
|
|
312
|
+
return {
|
|
313
|
+
apiRequest: s,
|
|
314
|
+
items: a,
|
|
315
|
+
isLoading: n,
|
|
316
|
+
loadAppend: g,
|
|
317
|
+
setSearchTextAndLoad: (r, v = !0) => {
|
|
318
|
+
s && (r.length < o || r === t && a.value.length || (t = r, v ? i() : y()));
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
}, Ce = 0, J = (s, o, e = !0) => e && o.id === null ? Array.isArray(s) ? s.some((a) => a.id === o.id && a.name === o.name) : o.name === s.name : Array.isArray(s) ? s.some((a) => a.id === o.id) : o.id === s.id, $e = (s, o, e, a, n, t) => {
|
|
322
|
+
const d = w(""), c = {
|
|
323
|
+
id: Ce,
|
|
324
|
+
name: oe().Common.All
|
|
325
|
+
}, y = () => {
|
|
326
|
+
d.value = "", t.items.value = [];
|
|
327
|
+
}, g = F(() => {
|
|
328
|
+
var r;
|
|
329
|
+
const m = [];
|
|
330
|
+
return !e && a.value && m.push(c), (r = o.value) == null || r.forEach((v) => m.push({ ...v })), m;
|
|
331
|
+
}), i = F(() => {
|
|
332
|
+
const m = d.value.toLowerCase(), r = re(m);
|
|
333
|
+
let v = [];
|
|
334
|
+
return g.value.forEach((l) => {
|
|
335
|
+
const u = l.name.toLowerCase();
|
|
336
|
+
(l.id === Number(m) || u.includes(m) || u.includes(r)) && (u === m || u === r ? v.unshift(l) : v.push(l));
|
|
337
|
+
}), v.push(...t.items.value), n.value && d.value && (!v.length || v[0].name.toLowerCase() !== m) && v.push({
|
|
338
|
+
id: null,
|
|
339
|
+
name: d.value
|
|
340
|
+
}), e && (v = v.filter((l) => !J(s.value, l))), v;
|
|
341
|
+
});
|
|
342
|
+
return {
|
|
343
|
+
searchText: d,
|
|
344
|
+
resetSearch: y,
|
|
345
|
+
items: g,
|
|
346
|
+
itemsForShow: i
|
|
347
|
+
};
|
|
348
|
+
}, Te = {
|
|
320
349
|
key: 0,
|
|
321
350
|
class: "top-selector2_activeItems"
|
|
322
|
-
},
|
|
351
|
+
}, Ve = {
|
|
323
352
|
key: 1,
|
|
324
353
|
class: "top-selector2_activeName top-ellipsis"
|
|
325
|
-
},
|
|
354
|
+
}, Ae = /* @__PURE__ */ B({
|
|
326
355
|
__name: "selector2",
|
|
327
|
-
props: /* @__PURE__ */
|
|
356
|
+
props: /* @__PURE__ */ R({
|
|
328
357
|
modelValue: {},
|
|
329
358
|
items: { default: () => [] },
|
|
330
359
|
multiselect: { type: Boolean },
|
|
@@ -341,159 +370,131 @@ const me = { class: "top-editArea_footer" }, fe = /* @__PURE__ */ I({
|
|
|
341
370
|
showSelectedInInput: { type: Boolean, default: !0 },
|
|
342
371
|
showSearch: { type: Boolean, default: !0 }
|
|
343
372
|
}, {
|
|
344
|
-
modelValue: {},
|
|
373
|
+
modelValue: { required: !0 },
|
|
345
374
|
modelModifiers: {}
|
|
346
375
|
}),
|
|
347
376
|
emits: ["update:modelValue"],
|
|
348
|
-
setup(
|
|
349
|
-
const
|
|
350
|
-
l
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
377
|
+
setup(s) {
|
|
378
|
+
const o = s, e = U(s, "modelValue"), a = w(null), n = we(o.apiRequest, o.minLength || 0, o.useCache), t = $e(e, z(o, "items"), o.multiselect, z(o, "appendAllValue"), z(o, "appendSearchToResult"), n), d = w(null), c = () => {
|
|
379
|
+
var l;
|
|
380
|
+
return (l = d.value) == null ? void 0 : l.popup;
|
|
381
|
+
}, y = () => {
|
|
382
|
+
if (!Array.isArray(e.value)) {
|
|
383
|
+
const u = (t.itemsForShow.value.findIndex((K) => K.id === e.value.id) + 1) % t.itemsForShow.value.length;
|
|
384
|
+
e.value = { ...t.itemsForShow.value[u] };
|
|
385
|
+
}
|
|
386
|
+
}, g = async (l) => {
|
|
387
|
+
Array.isArray(e.value) && (e.value = e.value.filter((u) => u.id !== l), setTimeout(() => {
|
|
388
|
+
var u;
|
|
389
|
+
(u = c()) == null || u.recalcPosition();
|
|
390
|
+
}));
|
|
391
|
+
}, i = w(!1);
|
|
392
|
+
n.apiRequest && (E(i, () => {
|
|
393
|
+
i.value && n.setSearchTextAndLoad(t.searchText.value, !1);
|
|
394
|
+
}), E(t.searchText, () => n.setSearchTextAndLoad(t.searchText.value)));
|
|
395
|
+
const m = (l) => {
|
|
396
|
+
o.multiselect && Array.isArray(e.value) ? J(e.value, l) || (e.value = [...e.value, l]) : e.value = l;
|
|
397
|
+
}, r = () => {
|
|
398
|
+
var l;
|
|
399
|
+
i.value = !1, (l = a.value) == null || l.focus(), t.searchText.value && t.resetSearch();
|
|
400
|
+
}, v = (l) => {
|
|
401
|
+
const u = l.target;
|
|
402
|
+
u.scrollTop / (u.scrollHeight - u.offsetHeight) > 0.8 && n.loadAppend();
|
|
357
403
|
};
|
|
358
|
-
window.__STORYBOOK_PREVIEW__ && !
|
|
359
|
-
() =>
|
|
404
|
+
return window.__STORYBOOK_PREVIEW__ && !o.modelValue && E(
|
|
405
|
+
() => o.multiselect,
|
|
360
406
|
() => {
|
|
361
|
-
|
|
407
|
+
e.value = o.multiselect ? [] : { id: null, name: "" };
|
|
362
408
|
},
|
|
363
409
|
{ immediate: !0 }
|
|
364
|
-
)
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
return !t.multiselect && t.appendAllValue && e.push(s), t.items.forEach((a) => e.push({ ...a })), e;
|
|
368
|
-
}), h = (e, a = !0) => a && e.id === null ? Array.isArray(o.value) ? o.value.some((f) => f.id === e.id && f.name === e.name) : e.name === o.value.name : Array.isArray(o.value) ? o.value.some((f) => f.id === e.id) : e.id === o.value.id, i = F(() => {
|
|
369
|
-
const e = l.value.toLowerCase(), a = ue(e);
|
|
370
|
-
let f = [];
|
|
371
|
-
return r.value.forEach((p) => {
|
|
372
|
-
const b = p.name.toLowerCase();
|
|
373
|
-
(p.id === Number(e) || b.includes(e) || b.includes(a)) && (b === e || b === a ? f.unshift(p) : f.push(p));
|
|
374
|
-
}), f.push(...g.items.value), t.appendSearchToResult && l.value && (!f.length || f[0].name.toLowerCase() !== e) && f.push({
|
|
375
|
-
id: null,
|
|
376
|
-
name: l.value
|
|
377
|
-
}), t.multiselect && (f = f.filter((p) => !h(p))), f;
|
|
378
|
-
}), S = async (e) => {
|
|
379
|
-
if (t.multiselect) {
|
|
380
|
-
if (!Array.isArray(o.value) || h(e))
|
|
381
|
-
return;
|
|
382
|
-
const a = [...o.value];
|
|
383
|
-
a.push({ ...e }), o.value = a, j.state.isMobile || setTimeout(() => {
|
|
384
|
-
var f, p, b, H;
|
|
385
|
-
(f = y()) == null || f.recalcPosition(), (H = (b = (p = y()) == null ? void 0 : p.elPopupWidget) == null ? void 0 : b.querySelector("input")) == null || H.focus(), l.value && d();
|
|
386
|
-
});
|
|
387
|
-
} else
|
|
388
|
-
JSON.stringify(e) !== JSON.stringify(o.value) && (o.value = { ...e });
|
|
389
|
-
}, z = () => {
|
|
390
|
-
if (!Array.isArray(o.value)) {
|
|
391
|
-
const a = (r.value.findIndex((f) => f.id === o.value.id) + 1) % r.value.length;
|
|
392
|
-
o.value = { ...r.value[a] };
|
|
393
|
-
}
|
|
394
|
-
}, O = async (e) => {
|
|
395
|
-
Array.isArray(o.value) && (o.value = o.value.filter((a) => a.id !== e), setTimeout(() => {
|
|
396
|
-
var a;
|
|
397
|
-
(a = y()) == null || a.recalcPosition();
|
|
398
|
-
}));
|
|
399
|
-
}, G = C(!1);
|
|
400
|
-
t.apiRequest && (_(G, () => {
|
|
401
|
-
G.value && g.setSearchTextAndLoad(l.value, !1);
|
|
402
|
-
}), _(l, () => g.setSearchTextAndLoad(l.value)));
|
|
403
|
-
const Z = (e) => {
|
|
404
|
-
const a = e.target;
|
|
405
|
-
a.scrollTop / (a.scrollHeight - a.offsetHeight) > 0.8 && g.loadAppend();
|
|
406
|
-
}, q = () => {
|
|
407
|
-
var e;
|
|
408
|
-
G.value = !1, (e = c.value) == null || e.focus(), l.value && d();
|
|
409
|
-
};
|
|
410
|
-
return (e, a) => {
|
|
411
|
-
const f = le("top-focus");
|
|
412
|
-
return u(), T(V(de), {
|
|
410
|
+
), (l, u) => {
|
|
411
|
+
const K = Z("top-focus");
|
|
412
|
+
return p(), A(b(se), {
|
|
413
413
|
ref_key: "popupRef",
|
|
414
|
-
ref:
|
|
415
|
-
onOpen:
|
|
416
|
-
onClose:
|
|
417
|
-
onScrollContentList:
|
|
414
|
+
ref: d,
|
|
415
|
+
onOpen: u[3] || (u[3] = (h) => i.value = !0),
|
|
416
|
+
onClose: u[4] || (u[4] = (h) => r()),
|
|
417
|
+
onScrollContentList: u[5] || (u[5] = (h) => l.apiRequest ? v(h) : void 0),
|
|
418
418
|
notch: !1,
|
|
419
419
|
transitionDuration: 0
|
|
420
|
-
},
|
|
421
|
-
opener:
|
|
422
|
-
|
|
420
|
+
}, N({
|
|
421
|
+
opener: V(() => [
|
|
422
|
+
X((p(), f("div", {
|
|
423
423
|
ref_key: "elRef",
|
|
424
|
-
ref:
|
|
425
|
-
class:
|
|
424
|
+
ref: a,
|
|
425
|
+
class: C({
|
|
426
426
|
"top-selector2": !0,
|
|
427
|
-
"top-selector2-multiselect":
|
|
428
|
-
["top-size_" +
|
|
429
|
-
"top-disabled":
|
|
430
|
-
"top-forms-focusable": !
|
|
431
|
-
"top-error":
|
|
427
|
+
"top-selector2-multiselect": l.multiselect,
|
|
428
|
+
["top-size_" + l.size]: !0,
|
|
429
|
+
"top-disabled": l.disabled,
|
|
430
|
+
"top-forms-focusable": !l.disabled,
|
|
431
|
+
"top-error": l.isError
|
|
432
432
|
}),
|
|
433
433
|
onKeydown: [
|
|
434
|
-
|
|
435
|
-
|
|
434
|
+
u[0] || (u[0] = L(M((h) => h.currentTarget.click(), ["stop", "prevent"]), ["up", "down", "enter", "space"])),
|
|
435
|
+
u[1] || (u[1] = L((h) => e.value = [], ["delete"]))
|
|
436
436
|
],
|
|
437
437
|
tabindex: "0"
|
|
438
438
|
}, [
|
|
439
|
-
|
|
440
|
-
(
|
|
441
|
-
id:
|
|
442
|
-
name:
|
|
443
|
-
onDelete:
|
|
439
|
+
l.multiselect ? (p(), f("div", Te, [
|
|
440
|
+
(p(!0), f(_, null, G(e.value, (h) => (p(), A(ke, {
|
|
441
|
+
id: h.id,
|
|
442
|
+
name: h.name,
|
|
443
|
+
onDelete: g
|
|
444
444
|
}, null, 8, ["id", "name"]))), 256))
|
|
445
445
|
])) : k("", !0),
|
|
446
|
-
|
|
447
|
-
|
|
446
|
+
l.multiselect ? k("", !0) : (p(), f("span", Ve, $(Array.isArray(e.value) ? "" : e.value.name), 1)),
|
|
447
|
+
l.addChanger && !l.multiselect && b(t).items.value.length > 1 && !l.disabled ? (p(), f("span", {
|
|
448
448
|
key: 2,
|
|
449
449
|
class: "top-changer top-changer-selector",
|
|
450
|
-
|
|
450
|
+
"data-top-popup-disabled": "true",
|
|
451
|
+
onClick: y
|
|
451
452
|
})) : k("", !0)
|
|
452
453
|
], 34)), [
|
|
453
454
|
[
|
|
454
|
-
|
|
455
|
-
|
|
455
|
+
K,
|
|
456
|
+
l.isError,
|
|
456
457
|
void 0,
|
|
457
458
|
{ onupdate: !0 }
|
|
458
459
|
]
|
|
459
460
|
])
|
|
460
461
|
]),
|
|
461
|
-
contentList:
|
|
462
|
-
var
|
|
462
|
+
contentList: V(() => {
|
|
463
|
+
var h;
|
|
463
464
|
return [
|
|
464
|
-
(
|
|
465
|
-
class:
|
|
466
|
-
"top-active": !Array.isArray(
|
|
465
|
+
(p(!0), f(_, null, G(b(t).itemsForShow.value, (T) => (p(), A(b(O), {
|
|
466
|
+
class: C({
|
|
467
|
+
"top-active": !Array.isArray(e.value) && !l.multiselect && e.value.id === T.id && e.value.name === T.name
|
|
467
468
|
}),
|
|
468
|
-
key:
|
|
469
|
-
closeByClick: !
|
|
470
|
-
onClick: (
|
|
469
|
+
key: T.id ?? void 0,
|
|
470
|
+
closeByClick: !l.multiselect || b(te).state.isMobile,
|
|
471
|
+
onClick: (Ee) => m(T)
|
|
471
472
|
}, {
|
|
472
|
-
default:
|
|
473
|
-
|
|
473
|
+
default: V(() => [
|
|
474
|
+
l.$slots.item ? D(l.$slots, "item", {
|
|
474
475
|
key: 0,
|
|
475
|
-
item:
|
|
476
|
-
}) : (
|
|
477
|
-
|
|
476
|
+
item: T
|
|
477
|
+
}) : (p(), f(_, { key: 1 }, [
|
|
478
|
+
S($(T.name), 1)
|
|
478
479
|
], 64))
|
|
479
480
|
]),
|
|
480
481
|
_: 2
|
|
481
482
|
}, 1032, ["class", "closeByClick", "onClick"]))), 128)),
|
|
482
|
-
!
|
|
483
|
+
!b(n).isLoading.value && !b(t).itemsForShow.value.length ? (p(), A(b(O), {
|
|
483
484
|
key: 0,
|
|
484
485
|
type: "regular"
|
|
485
486
|
}, {
|
|
486
|
-
default:
|
|
487
|
-
|
|
487
|
+
default: V(() => [
|
|
488
|
+
S($(l.$i18n.Common.No_results), 1)
|
|
488
489
|
]),
|
|
489
490
|
_: 1
|
|
490
491
|
})) : k("", !0),
|
|
491
|
-
|
|
492
|
+
b(n).isLoading.value && (!l.showSearch || (h = l.apiRequest) != null && h.params.offset) ? (p(), A(b(O), {
|
|
492
493
|
key: 1,
|
|
493
494
|
type: "regular"
|
|
494
495
|
}, {
|
|
495
|
-
default:
|
|
496
|
-
|
|
496
|
+
default: V(() => [
|
|
497
|
+
P(b(le), { type: "circles" })
|
|
497
498
|
]),
|
|
498
499
|
_: 1
|
|
499
500
|
})) : k("", !0)
|
|
@@ -501,18 +502,18 @@ const me = { class: "top-editArea_footer" }, fe = /* @__PURE__ */ I({
|
|
|
501
502
|
}),
|
|
502
503
|
_: 2
|
|
503
504
|
}, [
|
|
504
|
-
|
|
505
|
+
l.showSearch ? {
|
|
505
506
|
name: "widget",
|
|
506
|
-
fn:
|
|
507
|
-
var
|
|
507
|
+
fn: V(() => {
|
|
508
|
+
var h;
|
|
508
509
|
return [
|
|
509
|
-
|
|
510
|
+
P(b(ae), {
|
|
510
511
|
title: "Поиск",
|
|
511
512
|
icon: "",
|
|
512
|
-
modelValue:
|
|
513
|
-
"onUpdate:modelValue":
|
|
514
|
-
isLoading:
|
|
515
|
-
placeholder: !Array.isArray(
|
|
513
|
+
modelValue: b(t).searchText.value,
|
|
514
|
+
"onUpdate:modelValue": u[2] || (u[2] = (T) => b(t).searchText.value = T),
|
|
515
|
+
isLoading: b(n).isLoading.value && !((h = l.apiRequest) != null && h.params.offset),
|
|
516
|
+
placeholder: !Array.isArray(e.value) && !l.multiselect && l.showSelectedInInput ? e.value.name : l.placeholder
|
|
516
517
|
}, null, 8, ["modelValue", "isLoading", "placeholder"])
|
|
517
518
|
];
|
|
518
519
|
}),
|
|
@@ -521,41 +522,41 @@ const me = { class: "top-editArea_footer" }, fe = /* @__PURE__ */ I({
|
|
|
521
522
|
]), 1536);
|
|
522
523
|
};
|
|
523
524
|
}
|
|
524
|
-
}),
|
|
525
|
+
}), Se = ["data-top-icon"], Be = { class: "top-info_text" }, Ie = {
|
|
525
526
|
key: 0,
|
|
526
527
|
class: "top-info_value"
|
|
527
|
-
},
|
|
528
|
+
}, Le = /* @__PURE__ */ B({
|
|
528
529
|
__name: "info",
|
|
529
530
|
props: {
|
|
530
531
|
icon: {},
|
|
531
532
|
styling: { default: "default" },
|
|
532
533
|
size: { default: "default" }
|
|
533
534
|
},
|
|
534
|
-
setup(
|
|
535
|
-
return (
|
|
536
|
-
class:
|
|
535
|
+
setup(s) {
|
|
536
|
+
return (o, e) => (p(), f("div", {
|
|
537
|
+
class: C({
|
|
537
538
|
"top-info": !0,
|
|
538
|
-
["top-size_" +
|
|
539
|
-
["top-info-styling_" +
|
|
539
|
+
["top-size_" + o.size]: !0,
|
|
540
|
+
["top-info-styling_" + o.styling]: !0
|
|
540
541
|
}),
|
|
541
|
-
"data-top-icon":
|
|
542
|
+
"data-top-icon": o.icon
|
|
542
543
|
}, [
|
|
543
|
-
|
|
544
|
-
|
|
544
|
+
I("div", Be, [
|
|
545
|
+
D(o.$slots, "default")
|
|
545
546
|
]),
|
|
546
|
-
|
|
547
|
-
|
|
547
|
+
o.$slots.additional ? (p(), f("span", Ie, [
|
|
548
|
+
D(o.$slots, "additional")
|
|
548
549
|
])) : k("", !0)
|
|
549
|
-
], 10,
|
|
550
|
+
], 10, Se));
|
|
550
551
|
}
|
|
551
|
-
}),
|
|
552
|
+
}), Oe = ue, Fe = pe, Ne = ve, De = be, He = Ae, Re = ne, Ue = Le;
|
|
552
553
|
export {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
554
|
+
De as TopCheckboxGroup,
|
|
555
|
+
Oe as TopEditArea,
|
|
556
|
+
Fe as TopEditInput,
|
|
557
|
+
Ue as TopInfo,
|
|
558
|
+
Re as TopMenu,
|
|
559
|
+
Ne as TopRadioGroup,
|
|
560
|
+
He as TopSelector2
|
|
560
561
|
};
|
|
561
562
|
//# sourceMappingURL=formsExt.js.map
|