@topvisor/ui 1.3.5-popupFromInput.0 → 1.4.0-TopGroupSelector.11
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-BL-38XF7.es.js +196 -0
- package/.chunks/core-BL-38XF7.es.js.map +1 -0
- package/.chunks/core-BsPx05H9.amd.js +2 -0
- package/.chunks/core-BsPx05H9.amd.js.map +1 -0
- package/.chunks/{datepicker-Bq_z2paN.amd.js → datepicker-3coUsFW2.amd.js} +2 -2
- package/.chunks/{datepicker-Bq_z2paN.amd.js.map → datepicker-3coUsFW2.amd.js.map} +1 -1
- package/.chunks/{datepicker-CGGp0VnN.es.js → datepicker-D1Hw3a3o.es.js} +14 -17
- package/.chunks/{datepicker-CGGp0VnN.es.js.map → datepicker-D1Hw3a3o.es.js.map} +1 -1
- package/.chunks/dialog_regionSelectorRegions-1UVhgK2f.es.js +180 -0
- package/.chunks/dialog_regionSelectorRegions-1UVhgK2f.es.js.map +1 -0
- package/.chunks/dialog_regionSelectorRegions-CZ8IX7la.amd.js +2 -0
- package/.chunks/dialog_regionSelectorRegions-CZ8IX7la.amd.js.map +1 -0
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DCVIoEeY.es.js → dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js} +111 -112
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DCVIoEeY.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js.map} +1 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js +2 -0
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-Bf0wXalT.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js.map} +1 -1
- package/.chunks/forms-BseC3Ftz.es.js +2035 -0
- package/.chunks/{forms-BhbgRJ5I.es.js.map → forms-BseC3Ftz.es.js.map} +1 -1
- package/.chunks/forms-CUSCBQu3.amd.js +3 -0
- package/.chunks/{forms-CNcrvkYD.amd.js.map → forms-CUSCBQu3.amd.js.map} +1 -1
- package/.chunks/index-DLUtoTUg.amd.js +2 -0
- package/.chunks/index-DLUtoTUg.amd.js.map +1 -0
- package/.chunks/index-DkQWJkMc.es.js +54 -0
- package/.chunks/index-DkQWJkMc.es.js.map +1 -0
- package/.chunks/notice-Cl3ZgiHm.es.js +191 -0
- package/.chunks/{notice-CpPhDTUb.es.js.map → notice-Cl3ZgiHm.es.js.map} +1 -1
- package/.chunks/notice-DwjipV21.amd.js +4 -0
- package/.chunks/{notice-BpLsm6Zh.amd.js.map → notice-DwjipV21.amd.js.map} +1 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js +2 -0
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-B-1LEQAz.amd.js.map → page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js.map} +1 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js +139 -0
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-9abPBMpd.es.js.map → page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js.map} +1 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js +496 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js.map +1 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js +2 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js.map +1 -0
- package/.chunks/popup-DRuyYFGB.amd.js +2 -0
- package/.chunks/popup-DRuyYFGB.amd.js.map +1 -0
- package/.chunks/popup-Jw_Yyg3U.es.js +470 -0
- package/.chunks/popup-Jw_Yyg3U.es.js.map +1 -0
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js +209 -0
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js.map +1 -0
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js +2 -0
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js.map +1 -0
- package/.chunks/utils-CzHUG_xz.amd.js +2 -0
- package/.chunks/{utils-5uxIj2CI.amd.js.map → utils-CzHUG_xz.amd.js.map} +1 -1
- package/.chunks/utils-D9nYQabE.amd.js +2 -0
- package/.chunks/{utils-Bg_su8b-.amd.js.map → utils-D9nYQabE.amd.js.map} +1 -1
- package/.chunks/{utils-D58EUoHa.es.js → utils-Q69SXlnV.es.js} +192 -208
- package/.chunks/{utils-D58EUoHa.es.js.map → utils-Q69SXlnV.es.js.map} +1 -1
- package/.chunks/{utils-UBgfsQ8v.es.js → utils-YrUExsH7.es.js} +23 -24
- package/.chunks/{utils-UBgfsQ8v.es.js.map → utils-YrUExsH7.es.js.map} +1 -1
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CSD2uMSW.es.js → widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js} +2 -2
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CSD2uMSW.es.js.map → widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js.map} +1 -1
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-D6SVtg2Q.amd.js → widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js} +2 -2
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-D6SVtg2Q.amd.js.map → widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js.map} +1 -1
- package/api/index.amd.js +1 -1
- package/api/index.amd.js.map +1 -1
- package/api/index.js +138 -133
- package/api/index.js.map +1 -1
- package/assets/dialog_regionSelectorRegions.css +1 -0
- package/assets/forms.css +1 -1
- package/assets/policy.css +1 -0
- package/assets/popupHint.css +1 -1
- package/assets/project.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.js +80 -80
- package/charts/charts.js.map +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +93 -96
- package/core/app.js.map +1 -1
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.amd.js.map +1 -1
- package/dialog/dialog.js +13 -13
- package/dialog/dialog.js.map +1 -1
- package/extra/extra.amd.js +1 -1
- package/extra/extra.amd.js.map +1 -1
- package/extra/extra.js +20 -23
- package/extra/extra.js.map +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +5 -5
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +185 -534
- package/formsExt/formsExt.js.map +1 -1
- package/layout/layout.amd.js +1 -1
- package/layout/layout.js +6 -6
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +43 -46
- 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 +11 -9
- 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 +848 -579
- package/project/project.js.map +1 -1
- package/src/api/api/client/client.d.ts +5 -0
- package/src/api/api/mocker/index.d.ts +3 -3
- package/src/api/api/types/client/request.d.ts +6 -0
- package/src/api/api/types/ext.d.ts +2 -2
- package/src/api/api/types/mocker.d.ts +2 -2
- package/src/components/forms/button/types.d.ts +6 -0
- package/src/components/formsExt/formsExt.d.ts +1 -0
- package/src/components/formsExt/libs/optionGroup/types.d.ts +1 -1
- package/src/components/formsExt/selector2/cache.d.ts +12 -0
- package/src/components/formsExt/selector2/composables/useAPI.d.ts +2036 -2
- package/src/components/formsExt/selector2/composables/useMenu.d.ts +2045 -5
- package/src/components/formsExt/selector2/itemMulti.vue.d.ts +3 -3
- package/src/components/formsExt/selector2/selector2.vue.d.ts +11 -3
- package/src/components/formsExt/selector2/types.d.ts +39 -5
- package/src/components/formsExt/selector2/utils.d.ts +17 -0
- package/src/components/popup/lib/popup.d.ts +1 -2
- package/src/components/popup/popup/opener/types.d.ts +6 -2
- package/src/components/popup/popup/types.d.ts +3 -2
- package/src/components/popup/popup.d.ts +1 -1
- package/src/components/project/groupSelector/folders/folders.vue.d.ts +18 -0
- package/src/components/project/groupSelector/folders/types.d.ts +63 -0
- package/src/components/project/groupSelector/folders/utils.d.ts +63 -0
- package/src/components/project/groupSelector/groupSelector.vue.d.ts +33 -0
- package/src/components/project/groupSelector/groups/groups.vue.d.ts +126 -0
- package/src/components/project/groupSelector/groups/types.d.ts +58 -0
- package/src/components/project/groupSelector/groups/utils.d.ts +92 -0
- package/src/components/project/groupSelector/stories/mocks/folders.d.ts +4 -0
- package/src/components/project/groupSelector/stories/mocks/groups.d.ts +2 -0
- package/src/components/project/groupSelector/stories/mocks/index.d.ts +7 -0
- package/src/components/project/groupSelector/types.d.ts +133 -0
- package/src/components/project/project.d.ts +5 -4
- package/src/components/project/{selectorRegion → regionSelector}/utils/utils.d.ts +3 -3
- package/src/core/utils/composables/useWatch.d.ts +32 -0
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.amd.js.map +1 -1
- package/tabs/tabs.js +24 -24
- 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 +131 -133
- 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/scroll.amd.js +1 -1
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.js +14 -14
- package/utils/scroll.js.map +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 +3 -7
- package/utils/string.js.map +1 -1
- package/.chunks/core-DcLw0dEO.amd.js +0 -2
- package/.chunks/core-DcLw0dEO.amd.js.map +0 -1
- package/.chunks/core-DpTLGhiK.es.js +0 -197
- package/.chunks/core-DpTLGhiK.es.js.map +0 -1
- package/.chunks/dialog_selectorRegions-BtAADQHf.es.js +0 -190
- package/.chunks/dialog_selectorRegions-BtAADQHf.es.js.map +0 -1
- package/.chunks/dialog_selectorRegions-DCrHvHDs.amd.js +0 -2
- package/.chunks/dialog_selectorRegions-DCrHvHDs.amd.js.map +0 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-Bf0wXalT.amd.js +0 -2
- package/.chunks/forms-BhbgRJ5I.es.js +0 -2045
- package/.chunks/forms-CNcrvkYD.amd.js +0 -3
- package/.chunks/index-BEI7XZmU.amd.js +0 -2
- package/.chunks/index-BEI7XZmU.amd.js.map +0 -1
- package/.chunks/index-igPkes8X.es.js +0 -48
- package/.chunks/index-igPkes8X.es.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-QvP1d9jN.amd.js +0 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-QvP1d9jN.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-xvzbyqai.es.js +0 -196
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-xvzbyqai.es.js.map +0 -1
- package/.chunks/menu.vue_vue_type_style_index_0_lang-C3Rr6ZyL.amd.js +0 -2
- package/.chunks/menu.vue_vue_type_style_index_0_lang-C3Rr6ZyL.amd.js.map +0 -1
- package/.chunks/menu.vue_vue_type_style_index_0_lang-dOeZ7an1.es.js +0 -112
- package/.chunks/menu.vue_vue_type_style_index_0_lang-dOeZ7an1.es.js.map +0 -1
- package/.chunks/notice-BpLsm6Zh.amd.js +0 -4
- package/.chunks/notice-CpPhDTUb.es.js +0 -194
- package/.chunks/opener.vue_vue_type_script_setup_true_lang-DRzrTv7Q.es.js +0 -36
- package/.chunks/opener.vue_vue_type_script_setup_true_lang-DRzrTv7Q.es.js.map +0 -1
- package/.chunks/opener.vue_vue_type_script_setup_true_lang-gNZhYkDf.amd.js +0 -2
- package/.chunks/opener.vue_vue_type_script_setup_true_lang-gNZhYkDf.amd.js.map +0 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-9abPBMpd.es.js +0 -143
- package/.chunks/page.vue_vue_type_script_setup_true_lang-B-1LEQAz.amd.js +0 -2
- package/.chunks/popup-BJj9BJP5.es.js +0 -485
- package/.chunks/popup-BJj9BJP5.es.js.map +0 -1
- package/.chunks/popup-CfXISjhC.amd.js +0 -2
- package/.chunks/popup-CfXISjhC.amd.js.map +0 -1
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd.js +0 -2
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd.js.map +0 -1
- package/.chunks/utils-5uxIj2CI.amd.js +0 -2
- package/.chunks/utils-Bg_su8b-.amd.js +0 -2
- package/assets/dialog_selectorRegions.css +0 -1
- package/assets/formsExt.css +0 -1
- package/assets/listItem.css +0 -1
- package/assets/menu.css +0 -1
- package/src/components/popup/popup/opener.vue.d.ts +0 -16
- /package/src/components/project/{selectorCompetitors/selectorCompetitors.vue.d.ts → competitorSelector/competitorSelector.vue.d.ts} +0 -0
- /package/src/components/project/{selectorCompetitors → competitorSelector}/composables.d.ts +0 -0
- /package/src/components/project/{selectorCompetitors → competitorSelector}/types.d.ts +0 -0
- /package/src/components/project/{selectorRegion → regionSelector}/composables/compare.d.ts +0 -0
- /package/src/components/project/{selectorRegion → regionSelector}/composables/selectRegion.d.ts +0 -0
- /package/src/components/project/{selectorRegion → regionSelector}/composables/selectSearcher.d.ts +0 -0
- /package/src/components/project/{selectorRegion → regionSelector}/composables/selectorRegion.d.ts +0 -0
- /package/src/components/project/{selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue.d.ts → regionSelector/dialog_regionSelectorRegions/dialog_regionSelectorRegions.vue.d.ts} +0 -0
- /package/src/components/project/{selectorRegion/dialog_selectorRegions → regionSelector/dialog_regionSelectorRegions}/types.d.ts +0 -0
- /package/src/components/project/{selectorRegion/selectorRegion.vue.d.ts → regionSelector/regionSelector.vue.d.ts} +0 -0
- /package/src/components/project/{selectorRegion → regionSelector}/types.d.ts +0 -0
- /package/src/components/project/{selectorRegion → regionSelector}/utils/consts.d.ts +0 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { defineComponent as v, provide as f, onMounted as w, getCurrentInstance as b, watch as D, createElementBlock as d, openBlock as i, unref as a, normalizeStyle as m, normalizeClass as r, createElementVNode as s, renderSlot as n, computed as C, resolveDirective as $, createCommentVNode as p, createBlock as h, Teleport as g, withDirectives as k } from "vue";
|
|
2
|
+
import { g as T } from "./dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js";
|
|
3
|
+
import { C as A } from "./forms-BseC3Ftz.es.js";
|
|
4
|
+
import { b as B } from "./utils-YrUExsH7.es.js";
|
|
5
|
+
const W = ["id", "data-view-page-active", "data-modal", "data-position"], G = /* @__PURE__ */ v({
|
|
6
|
+
__name: "dialog",
|
|
7
|
+
props: {
|
|
8
|
+
id: {},
|
|
9
|
+
pageActive: {},
|
|
10
|
+
width: { default: "600px" },
|
|
11
|
+
height: { default: "auto" },
|
|
12
|
+
modal: { type: Boolean, default: !0 },
|
|
13
|
+
position: {},
|
|
14
|
+
historyType: { default: "push" },
|
|
15
|
+
classes: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["open", "close"],
|
|
18
|
+
setup(e) {
|
|
19
|
+
const o = T(e.id);
|
|
20
|
+
if (!o)
|
|
21
|
+
throw new Error("TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()");
|
|
22
|
+
return f("dialogWorker", o), w(() => {
|
|
23
|
+
const l = b(), t = l.parent;
|
|
24
|
+
if (t?.parent?.type.name !== "DialogWrapper")
|
|
25
|
+
throw new Error("TopDialog cannot be used in a template, use useTopDialog()");
|
|
26
|
+
if (Array.isArray(t.subTree.children) && t.subTree.children.length !== 1)
|
|
27
|
+
throw new Error("TopDialog can has only one root element");
|
|
28
|
+
o.onMounted(t, l);
|
|
29
|
+
}), D(o.isOpened, () => {
|
|
30
|
+
o.isReady.value = !0;
|
|
31
|
+
}, {
|
|
32
|
+
flush: "post",
|
|
33
|
+
once: !0
|
|
34
|
+
}), (l, t) => (i(), d("div", {
|
|
35
|
+
id: a(o).idAttr,
|
|
36
|
+
class: r(["top-dialog", e.classes]),
|
|
37
|
+
style: m({
|
|
38
|
+
"--top-dialog-width": e.width,
|
|
39
|
+
"--top-dialog-height": e.height
|
|
40
|
+
}),
|
|
41
|
+
tabindex: "-1",
|
|
42
|
+
"data-view-page-active": a(o).pageActive.value,
|
|
43
|
+
"data-modal": e.modal,
|
|
44
|
+
"data-position": e.position
|
|
45
|
+
}, [
|
|
46
|
+
t[0] || (t[0] = s("div", { class: "modal-layer modal-layer-header" }, null, -1)),
|
|
47
|
+
s("div", {
|
|
48
|
+
class: "modal-layer modal-layer-body",
|
|
49
|
+
style: m({ "min-height": e.height + "px" })
|
|
50
|
+
}, null, 4),
|
|
51
|
+
n(l.$slots, "default")
|
|
52
|
+
], 14, W));
|
|
53
|
+
}
|
|
54
|
+
}), E = {
|
|
55
|
+
key: 0,
|
|
56
|
+
style: { display: "none" }
|
|
57
|
+
}, N = ["data-order", "data-view-page"], S = { class: "modal-header" }, L = { class: "top-title" }, M = { class: "buttons" }, P = ["title"], z = ["title"], F = ["data-order", "data-view-page"], R = { class: "modal-body" }, H = /* @__PURE__ */ v({
|
|
58
|
+
__name: "page",
|
|
59
|
+
props: {
|
|
60
|
+
isLoading: { type: Boolean },
|
|
61
|
+
name: {},
|
|
62
|
+
order: { default: 0 },
|
|
63
|
+
prevName: {},
|
|
64
|
+
footerFullWith: { type: Boolean }
|
|
65
|
+
},
|
|
66
|
+
setup(e) {
|
|
67
|
+
const c = e, o = B(), l = C(() => ({
|
|
68
|
+
active: o.pageActive?.value === c.name,
|
|
69
|
+
"i-load-data": c.isLoading || o.isLoadingPage.value
|
|
70
|
+
}));
|
|
71
|
+
return (t, u) => {
|
|
72
|
+
const y = $("top-scroll-shadow");
|
|
73
|
+
return a(o).isReady.value ? (i(), d("div", E, [
|
|
74
|
+
(i(), h(g, {
|
|
75
|
+
to: "#" + a(o).idAttr + " .modal-layer-header",
|
|
76
|
+
disabled: !a(o).needShowPage(e.name)
|
|
77
|
+
}, [
|
|
78
|
+
s("div", {
|
|
79
|
+
"data-order": e.order,
|
|
80
|
+
"data-view-page": e.name,
|
|
81
|
+
class: r(l.value)
|
|
82
|
+
}, [
|
|
83
|
+
s("div", S, [
|
|
84
|
+
s("div", L, [
|
|
85
|
+
n(t.$slots, "header")
|
|
86
|
+
]),
|
|
87
|
+
s("div", M, [
|
|
88
|
+
n(t.$slots, "headerButtons")
|
|
89
|
+
]),
|
|
90
|
+
a(A).state.isMobile && e.prevName ? (i(), d("div", {
|
|
91
|
+
key: 0,
|
|
92
|
+
class: "close",
|
|
93
|
+
title: t.$i18n.Common.Back,
|
|
94
|
+
"data-top-icon": "",
|
|
95
|
+
onClick: u[0] || (u[0] = (V) => a(o).open(e.prevName))
|
|
96
|
+
}, null, 8, P)) : (i(), d("div", {
|
|
97
|
+
key: 1,
|
|
98
|
+
class: "close",
|
|
99
|
+
title: t.$i18n.Common.Close,
|
|
100
|
+
"data-top-icon": "",
|
|
101
|
+
"data-action": "top-dialog-close"
|
|
102
|
+
}, null, 8, z))
|
|
103
|
+
])
|
|
104
|
+
], 10, N)
|
|
105
|
+
], 8, ["to", "disabled"])),
|
|
106
|
+
(i(), h(g, {
|
|
107
|
+
to: "#" + a(o).idAttr + " .modal-layer-body",
|
|
108
|
+
disabled: !a(o).needShowPage(e.name)
|
|
109
|
+
}, [
|
|
110
|
+
s("div", {
|
|
111
|
+
"data-order": e.order,
|
|
112
|
+
"data-view-page": e.name,
|
|
113
|
+
class: r(["has_scroll_container", l.value]),
|
|
114
|
+
style: m({ "--top-dialog-footer-height": t.$slots.footer ? void 0 : "0px" })
|
|
115
|
+
}, [
|
|
116
|
+
k((i(), d("div", R, [
|
|
117
|
+
n(t.$slots, "body")
|
|
118
|
+
])), [
|
|
119
|
+
[y]
|
|
120
|
+
]),
|
|
121
|
+
t.$slots.footer ? (i(), d("div", {
|
|
122
|
+
key: 0,
|
|
123
|
+
class: r(["modal-footer", {
|
|
124
|
+
"modal-footer-fullWith": e.footerFullWith
|
|
125
|
+
}])
|
|
126
|
+
}, [
|
|
127
|
+
n(t.$slots, "footer")
|
|
128
|
+
], 2)) : p("", !0)
|
|
129
|
+
], 14, F)
|
|
130
|
+
], 8, ["to", "disabled"]))
|
|
131
|
+
])) : p("", !0);
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
export {
|
|
136
|
+
G as _,
|
|
137
|
+
H as a
|
|
138
|
+
};
|
|
139
|
+
//# sourceMappingURL=page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
{"version":3,"file":"page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js","sources":["../../src/components/dialog/dialog/dialog.vue","../../src/components/dialog/dialog/page/page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ComponentInternalInstance } from 'vue';\nimport { getCurrentInstance, onMounted, provide, watch } from 'vue';\nimport { getDialogWorker } from './dialogs/dialogs.vue';\nimport type { Emits, Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\twidth: '600px',\n\theight: 'auto',\n\tmodal: true,\n\thistoryType: 'push',\n});\n\ndefineEmits<Emits>();\n\ndefineSlots<Slots>();\n\nconst dialog = getDialogWorker(props.id);\nif (!dialog) {\n\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()');\n}\n\n/**\n * Для useTopDialogSelf()\n */\nprovide('dialogWorker', dialog);\n\n/**\n * Инициализация начального состояния TopDialogHandle\n */\nonMounted(() => {\n\tconst topDialogBaseComponent = getCurrentInstance() as ComponentInternalInstance;\n\tconst topDialogComponent = topDialogBaseComponent.parent;\n\n\tif (topDialogComponent?.parent?.type.name !== 'DialogWrapper') {\n\t\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog()');\n\t}\n\n\tif (Array.isArray(topDialogComponent.subTree.children) && topDialogComponent.subTree.children.length !== 1) {\n\t\tthrow new Error('TopDialog can has only one root element');\n\t}\n\n\tdialog.onMounted(topDialogComponent, topDialogBaseComponent);\n});\n\nwatch(dialog.isOpened, () => {\n\tdialog.isReady.value = true;\n}, {\n\tflush: 'post',\n\tonce: true,\n});\n</script>\n\n<template>\n\t<div\n\t\t:id=\"dialog.idAttr\"\n\t\tclass=\"top-dialog\"\n\t\t:class=\"classes\"\n\t\t:style=\"{\n\t\t\t'--top-dialog-width': width,\n\t\t\t'--top-dialog-height': height,\n\t\t}\"\n\t\ttabindex=\"-1\"\n\t\t:data-view-page-active=\"dialog.pageActive.value\"\n\t\t:data-modal=\"modal\"\n\t\t:data-position=\"position\"\n\t>\n\t\t<div class=\"modal-layer modal-layer-header\"></div>\n\n\t\t<div class=\"modal-layer modal-layer-body\" :style=\"{'min-height': height + 'px'}\"></div>\n\n\t\t<slot name=\"default\"></slot>\n\t</div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport Core from '@/core/core/core';\nimport { useTopDialogSelf } from '@/components/dialog/dialog/composables/utils';\nimport type { Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\torder: 0,\n});\n\ndefineSlots<Slots>();\n\nconst dialog = useTopDialogSelf();\n\nconst classes = computed(() => {\n\treturn {\n\t\tactive: dialog.pageActive?.value === props.name,\n\t\t'i-load-data': props.isLoading || dialog.isLoadingPage.value,\n\t};\n});\n</script>\n\n<template>\n\t<div\n\t\tstyle=\"display: none\"\n\t\tv-if=\"dialog.isReady.value\"\n\t>\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-header'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\t:class=\"classes\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t<div class=\"top-title\">\n\t\t\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t\t<slot name=\"headerButtons\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"Core.state.isMobile && prevName\"\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Back\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\t@click=\"dialog.open(prevName)\"\n\t\t\t\t\t></div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\tdata-action=\"top-dialog-close\"\n\t\t\t\t\t></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-body'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\tclass=\"has_scroll_container\"\n\t\t\t\t:class=\"classes\"\n\t\t\t\t:style=\"{'--top-dialog-footer-height': $slots.footer ? undefined : '0px'}\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-body\" v-top-scroll-shadow>\n\t\t\t\t\t<slot name=\"body\"></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclass=\"modal-footer\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'modal-footer-fullWith': footerFullWith\n\t\t\t\t\t}\"\n\t\t\t\t\tv-if=\"$slots.footer\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\t</div>\n</template>\n"],"names":["dialog","getDialogWorker","__props","provide","onMounted","topDialogBaseComponent","getCurrentInstance","topDialogComponent","watch","_createElementBlock","_unref","_normalizeClass","_normalizeStyle","_createElementVNode","_renderSlot","_ctx","props","useTopDialogSelf","classes","computed","_openBlock","_hoisted_1","_createBlock","_Teleport","_hoisted_3","_hoisted_4","_hoisted_5","Core","$i18n","_cache","$event","$slots","_withDirectives","_hoisted_9"],"mappings":"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"}
|
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
|
|
2
|
+
import { Core as _autoloadCSSCore } from '../core/app.js';
|
|
3
|
+
const fileNames = ['../assets/policy.css'].map(fileName => import.meta.resolve(fileName));
|
|
4
|
+
_autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
|
|
5
|
+
|
|
6
|
+
import { defineComponent as J, mergeModels as W, useModel as ee, ref as $, onMounted as ae, onUpdated as se, createElementBlock as L, openBlock as g, normalizeClass as ne, createCommentVNode as M, Fragment as F, renderList as z, createBlock as S, mergeProps as R, createSlots as U, withCtx as B, createTextVNode as E, toDisplayString as P, createVNode as te, createElementVNode as re, withModifiers as oe, computed as N, watch as H, toRef as O, resolveComponent as ie, resolveDirective as ue, unref as f, renderSlot as ce, withDirectives as Q, resolveDynamicComponent as fe } from "vue";
|
|
7
|
+
import { e as X, b as de, C as Y, d as pe, u as ve, r as me } from "./forms-BseC3Ftz.es.js";
|
|
8
|
+
import { _ as ye, b as Z } from "./popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js";
|
|
9
|
+
import { _ as he } from "./widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js";
|
|
10
|
+
import { invertKeyboardLayout as ge } from "../utils/keyboard.js";
|
|
11
|
+
import { g as Ae } from "./field-CyyFzM-Y.es.js";
|
|
12
|
+
const Ie = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "top-menu_selectAll"
|
|
15
|
+
}, Re = /* @__PURE__ */ J({
|
|
16
|
+
__name: "menu",
|
|
17
|
+
props: /* @__PURE__ */ W({
|
|
18
|
+
modelValue: {},
|
|
19
|
+
items: {},
|
|
20
|
+
isMultiple: { type: Boolean },
|
|
21
|
+
canBeEmptyMultiple: { type: Boolean },
|
|
22
|
+
styling: { default: "default" },
|
|
23
|
+
selectAllItem: {}
|
|
24
|
+
}, {
|
|
25
|
+
modelValue: {
|
|
26
|
+
required: !0
|
|
27
|
+
},
|
|
28
|
+
modelModifiers: {}
|
|
29
|
+
}),
|
|
30
|
+
emits: ["update:modelValue"],
|
|
31
|
+
setup(e) {
|
|
32
|
+
const a = e, l = ee(e, "modelValue"), t = $();
|
|
33
|
+
!a.isMultiple && typeof l.value != "string" && typeof l.value != "number" && console.warn('Type check failed for prop "modelValue". Expected String: ' + typeof l.value), a.isMultiple && !Array.isArray(l.value) && console.warn('Type check failed for prop "modelValue". Expected Array: ' + typeof l.value), a.isMultiple && !a.canBeEmptyMultiple && Array.isArray(l.value) && !l.value.length && a.items[0] && (l.value = [a.items[0]?.href ?? a.items[0]?.value]);
|
|
34
|
+
const u = (n) => Array.isArray(l.value) ? l.value.includes(n.value) : n.value === l.value, b = (n, v = !1) => {
|
|
35
|
+
if (Array.isArray(l.value)) {
|
|
36
|
+
let i = l.value.slice();
|
|
37
|
+
if (v) {
|
|
38
|
+
i.length || (i = a.items.map((y) => y.value));
|
|
39
|
+
const A = i.indexOf(n.value);
|
|
40
|
+
A === -1 ? i.push(n.value) : i.splice(A, 1);
|
|
41
|
+
} else
|
|
42
|
+
i.length === 1 && i[0] === n.value ? i = [] : i = [n.value];
|
|
43
|
+
!a.canBeEmptyMultiple && !i.length && (i = [n.value]), l.value = i;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
l.value = n.value;
|
|
47
|
+
}, d = (n) => {
|
|
48
|
+
if (t.value.scrollWidth <= t.value.offsetWidth || n.shiftKey || Math.abs(n.deltaY) < 50) return;
|
|
49
|
+
n.preventDefault();
|
|
50
|
+
const v = n.deltaY > 0 ? 30 : -30;
|
|
51
|
+
t.value.scrollLeft = t.value.scrollLeft + v;
|
|
52
|
+
}, c = (n = !0) => {
|
|
53
|
+
const v = t.value.querySelector(".top-active");
|
|
54
|
+
if (!v) return;
|
|
55
|
+
const i = 24, A = v.offsetLeft - t.value.offsetLeft - i, y = v.offsetLeft - t.value.offsetLeft + v.clientWidth + i, h = t.value.scrollLeft, x = t.value.clientWidth + t.value.scrollLeft;
|
|
56
|
+
let I;
|
|
57
|
+
A < h && (I = A), y > x && (I = y - t.value.clientWidth), I !== void 0 && (de() ? Y.$?.(t.value).animate({ scrollLeft: I }, n ? 200 : 0) : t.value.scrollTo({ left: I, behavior: n ? "smooth" : "auto" }));
|
|
58
|
+
}, s = () => {
|
|
59
|
+
if (Array.isArray(l.value)) {
|
|
60
|
+
if (l.value.length === a.items.length) {
|
|
61
|
+
l.value = [a.items[0].href ?? a.items[0].value];
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
l.value = a.items.map((n) => n.href ?? n.value);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return ae(() => c(!1)), se(() => c(!0)), (n, v) => (g(), L("div", {
|
|
68
|
+
ref_key: "el",
|
|
69
|
+
ref: t,
|
|
70
|
+
class: ne({
|
|
71
|
+
"top-menu": !0,
|
|
72
|
+
["top-style_" + e.styling]: !0
|
|
73
|
+
// ['top-unwrap-x']: styling === 'default',
|
|
74
|
+
}),
|
|
75
|
+
onWheel: d
|
|
76
|
+
}, [
|
|
77
|
+
(g(!0), L(F, null, z(e.items, (i) => (g(), S(X, R({ ref_for: !0 }, i, {
|
|
78
|
+
class: "top-menu_item",
|
|
79
|
+
color: "theme",
|
|
80
|
+
onClick: (A) => b(i, A.ctrlKey || A.metaKey),
|
|
81
|
+
isActive: u(i)
|
|
82
|
+
}), U({ _: 2 }, [
|
|
83
|
+
i.content ? {
|
|
84
|
+
name: "default",
|
|
85
|
+
fn: B(() => [
|
|
86
|
+
E(P(i.content), 1)
|
|
87
|
+
]),
|
|
88
|
+
key: "0"
|
|
89
|
+
} : void 0
|
|
90
|
+
]), 1040, ["onClick", "isActive"]))), 256)),
|
|
91
|
+
Array.isArray(l.value) && e.selectAllItem ? (g(), L("div", Ie, [
|
|
92
|
+
te(X, R(e.selectAllItem, {
|
|
93
|
+
class: "top-menu_item",
|
|
94
|
+
color: "theme",
|
|
95
|
+
styling: "",
|
|
96
|
+
onClick: v[0] || (v[0] = (i) => s()),
|
|
97
|
+
isActive: l.value.length === e.items.length
|
|
98
|
+
}), U({ _: 2 }, [
|
|
99
|
+
e.selectAllItem.content ? {
|
|
100
|
+
name: "default",
|
|
101
|
+
fn: B(() => [
|
|
102
|
+
E(P(e.selectAllItem.content), 1)
|
|
103
|
+
]),
|
|
104
|
+
key: "0"
|
|
105
|
+
} : void 0
|
|
106
|
+
]), 1040, ["isActive"])
|
|
107
|
+
])) : M("", !0)
|
|
108
|
+
], 34));
|
|
109
|
+
}
|
|
110
|
+
}), ke = { class: "top-selector2_itemMulti top-ellipsis" }, Le = /* @__PURE__ */ J({
|
|
111
|
+
__name: "itemMulti",
|
|
112
|
+
props: {
|
|
113
|
+
id: {},
|
|
114
|
+
name: {}
|
|
115
|
+
},
|
|
116
|
+
emits: ["delete"],
|
|
117
|
+
setup(e) {
|
|
118
|
+
return (a, l) => (g(), L("div", ke, [
|
|
119
|
+
E(P(e.name) + " ", 1),
|
|
120
|
+
re("span", {
|
|
121
|
+
class: "top-selector2_itemMultiDelete",
|
|
122
|
+
"data-top-icon": "",
|
|
123
|
+
onClick: l[0] || (l[0] = (t) => a.$emit("delete", { id: e.id, name: e.name })),
|
|
124
|
+
onMousedown: l[1] || (l[1] = oe(() => {
|
|
125
|
+
}, ["stop"]))
|
|
126
|
+
}, null, 32)
|
|
127
|
+
]));
|
|
128
|
+
}
|
|
129
|
+
}), D = /* @__PURE__ */ new Map(), Ce = (e) => {
|
|
130
|
+
D.get(e)?.clear();
|
|
131
|
+
}, Te = (e) => {
|
|
132
|
+
const a = window.mo?.user?.id;
|
|
133
|
+
return JSON.stringify(e.params) + ":" + e.url + ":" + a;
|
|
134
|
+
}, be = (e, a) => D.get(a)?.get(e), xe = (e, a, l) => {
|
|
135
|
+
D.has(a) || D.set(a, /* @__PURE__ */ new Map()), D.get(a)?.set(e, l);
|
|
136
|
+
}, we = (e, a, l, t) => {
|
|
137
|
+
const u = $([]), b = $(!1), d = $(0);
|
|
138
|
+
let c = "", s;
|
|
139
|
+
e && !e.params.limit && (e.params.limit = 100);
|
|
140
|
+
const n = async () => {
|
|
141
|
+
if (!e) return;
|
|
142
|
+
const y = t ? Te(e) : void 0;
|
|
143
|
+
if (y) {
|
|
144
|
+
const I = be(y, e.path);
|
|
145
|
+
if (I)
|
|
146
|
+
return e.abortByFingerprint(), I;
|
|
147
|
+
}
|
|
148
|
+
const h = await e.call();
|
|
149
|
+
if (h.errors) return;
|
|
150
|
+
if (!Array.isArray(h.result)) {
|
|
151
|
+
console.warn("Array expected in `res.result`");
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const x = h.result.findIndex((I) => I.id === void 0 || I.name === void 0);
|
|
155
|
+
if (x !== -1) {
|
|
156
|
+
console.warn(`В result[${x}] нет id или name`);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
return y && xe(y, e.path, h), h;
|
|
160
|
+
}, v = async (y) => {
|
|
161
|
+
if (!e) return;
|
|
162
|
+
if (y) {
|
|
163
|
+
if (!s || b.value) return;
|
|
164
|
+
e.params.offset = s;
|
|
165
|
+
} else
|
|
166
|
+
e.params.offset = 0;
|
|
167
|
+
a?.(e, c), b.value = !0;
|
|
168
|
+
const h = await n();
|
|
169
|
+
b.value = !1, d.value++, h && (s = h.nextOffset, y ? u.value = u.value.concat(h.result) : u.value = h.result);
|
|
170
|
+
}, i = pe(() => v(!1), 200);
|
|
171
|
+
return {
|
|
172
|
+
apiRequest: e,
|
|
173
|
+
items: u,
|
|
174
|
+
isLoading: b,
|
|
175
|
+
countLoading: d,
|
|
176
|
+
load: v,
|
|
177
|
+
setSearchTextAndLoad: (y, h = !0) => {
|
|
178
|
+
if (e) {
|
|
179
|
+
if (y.length < l) {
|
|
180
|
+
e.abortByFingerprint(), u.value = [];
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
y === c && u.value.length || (c = y, h ? i() : v(!1));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}, le = 0, K = null, _ = (e, a, l = !0) => l && a.id === K ? Array.isArray(e) ? e.some((t) => t.id === a.id && t.name === a.name) : a.name === e.name : Array.isArray(e) ? e.some((t) => t.id === a.id) : a.id === e.id, Ke = (e, a, l) => {
|
|
188
|
+
let t = e.params.filters ?? [];
|
|
189
|
+
t = t.filter((u) => u.name !== l), a && t.push(Ae(l, "CONTAINS", [a])), e.changeParams({ filters: t });
|
|
190
|
+
}, Se = (e, a, l, t, u, b, d, c, s) => {
|
|
191
|
+
const n = $(""), v = {
|
|
192
|
+
id: le,
|
|
193
|
+
name: ve().Common.All
|
|
194
|
+
}, i = () => {
|
|
195
|
+
n.value = "";
|
|
196
|
+
}, A = () => !(!s.apiRequest || n.value.length >= c), y = N(() => {
|
|
197
|
+
const r = [];
|
|
198
|
+
return !t && u.value && (typeof u.value == "string" && (v.name = u.value), r.push(v)), l.value?.forEach((C) => r.push({ ...C })), r;
|
|
199
|
+
}), h = $([]), x = () => {
|
|
200
|
+
h.value = I();
|
|
201
|
+
}, I = () => {
|
|
202
|
+
const r = n.value.toLowerCase(), C = ge(r);
|
|
203
|
+
let o = [], w;
|
|
204
|
+
const T = [], j = () => {
|
|
205
|
+
T.at(-1)?.listItemProps?.type === "delimiter" && T.pop(), T.length && (w && o.push(w), o.push(...T), T.length = 0);
|
|
206
|
+
};
|
|
207
|
+
for (const k of y.value)
|
|
208
|
+
switch (k.listItemProps?.type) {
|
|
209
|
+
case "title":
|
|
210
|
+
j(), w = k;
|
|
211
|
+
break;
|
|
212
|
+
case "delimiter":
|
|
213
|
+
if (T.length) {
|
|
214
|
+
let G = T.length;
|
|
215
|
+
T.at(-1)?.listItemProps?.type === "delimiter" && G--, T[G] = k;
|
|
216
|
+
}
|
|
217
|
+
break;
|
|
218
|
+
default:
|
|
219
|
+
const V = k.name.toLowerCase();
|
|
220
|
+
(k.id === Number(r) || V.includes(r) || V.includes(C)) && (V === r || V === C ? T.unshift(k) : T.push(k));
|
|
221
|
+
}
|
|
222
|
+
if (j(), o.push(...s.items.value), b.value && n.value && // результаты могут быть найдены, но не точные, тогда предложить добавить элемент
|
|
223
|
+
!o.find((k) => k.name.toLowerCase() === r)) {
|
|
224
|
+
const k = {
|
|
225
|
+
id: K,
|
|
226
|
+
name: n.value
|
|
227
|
+
};
|
|
228
|
+
o.push(k);
|
|
229
|
+
}
|
|
230
|
+
return t && (o = o.filter((k) => !_(e.value, k))), o;
|
|
231
|
+
}, q = (r) => {
|
|
232
|
+
r.listItemProps?.type === "title" || r.listItemProps?.type === "delimiter" || (t && Array.isArray(e.value) ? _(e.value, r) || (e.value = [...e.value, r]) : e.value = r, r.id === K && a("appendItem", r), setTimeout(() => {
|
|
233
|
+
i();
|
|
234
|
+
}));
|
|
235
|
+
};
|
|
236
|
+
if (s.apiRequest) {
|
|
237
|
+
const r = [l, s.items];
|
|
238
|
+
t && r.push(e), H(r, () => {
|
|
239
|
+
x();
|
|
240
|
+
});
|
|
241
|
+
} else
|
|
242
|
+
H([e, l, n], () => {
|
|
243
|
+
x();
|
|
244
|
+
}, {
|
|
245
|
+
immediate: !0,
|
|
246
|
+
// слежение за изменениями `items`
|
|
247
|
+
deep: 2
|
|
248
|
+
});
|
|
249
|
+
return {
|
|
250
|
+
searchText: n,
|
|
251
|
+
resetSearch: i,
|
|
252
|
+
genIsShort: A,
|
|
253
|
+
itemsForShow: h,
|
|
254
|
+
selectItem: q,
|
|
255
|
+
selectNextItem: () => {
|
|
256
|
+
if (Array.isArray(e.value)) return;
|
|
257
|
+
const r = h.value.filter((w) => !["title", "delimiter"].includes(w.listItemProps?.type ?? "")), o = (r.findIndex((w) => w.id === e.value.id) + 1) % r.length;
|
|
258
|
+
e.value = { ...r[o] };
|
|
259
|
+
},
|
|
260
|
+
deleteItemByItem: async (r) => {
|
|
261
|
+
Array.isArray(e.value) && (e.value = e.value.filter((C) => C.id !== r.id || C.name !== r.name));
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
}, Be = {
|
|
265
|
+
key: 0,
|
|
266
|
+
class: "top-selector2_activeItems"
|
|
267
|
+
}, Me = {
|
|
268
|
+
key: 1,
|
|
269
|
+
class: "top-selector2_activeName top-ellipsis"
|
|
270
|
+
}, Pe = {
|
|
271
|
+
key: 2,
|
|
272
|
+
class: "top-selector2_placeholder top-ellipsis"
|
|
273
|
+
}, qe = /* @__PURE__ */ J({
|
|
274
|
+
__name: "selector2",
|
|
275
|
+
props: /* @__PURE__ */ W({
|
|
276
|
+
modelValue: {},
|
|
277
|
+
items: { default: () => [] },
|
|
278
|
+
title: {},
|
|
279
|
+
disabled: { type: Boolean },
|
|
280
|
+
icon: {},
|
|
281
|
+
modificator: {},
|
|
282
|
+
size: { default: "s" },
|
|
283
|
+
isError: { type: Boolean },
|
|
284
|
+
openByFocusInput: { type: Boolean, default: void 0 },
|
|
285
|
+
searchType: { default: "popup" },
|
|
286
|
+
placeholder: {},
|
|
287
|
+
api: {},
|
|
288
|
+
apiSetSearchParams: {},
|
|
289
|
+
minLength: { default: 0 },
|
|
290
|
+
useCache: { type: Boolean },
|
|
291
|
+
appendSearchToResult: { type: Boolean },
|
|
292
|
+
multiselect: { type: Boolean },
|
|
293
|
+
useAllItem: { type: [Boolean, String] },
|
|
294
|
+
addChanger: { type: Boolean },
|
|
295
|
+
buttonProps: {},
|
|
296
|
+
selectedAsPlaceholder: { type: Boolean }
|
|
297
|
+
}, {
|
|
298
|
+
modelValue: { required: !0 },
|
|
299
|
+
modelModifiers: {}
|
|
300
|
+
}),
|
|
301
|
+
emits: /* @__PURE__ */ W(["appendItem"], ["update:modelValue"]),
|
|
302
|
+
setup(e, { expose: a, emit: l }) {
|
|
303
|
+
const t = e, u = ee(e, "modelValue"), b = l;
|
|
304
|
+
a({
|
|
305
|
+
/**
|
|
306
|
+
* Сброс локального кеша и кеша api
|
|
307
|
+
*
|
|
308
|
+
* @param resetAPICache - Сбросить API кеш, по умолчанию не сбрасывается. Для случаев, когда загруженные данные становятся неактуальными
|
|
309
|
+
*/
|
|
310
|
+
resetCache: (m = !1) => {
|
|
311
|
+
c.apiRequest && (m && Ce(c.apiRequest.path), c.items.value = [], c.countLoading.value = 0, c.apiRequest.params.offset = 0, requestAnimationFrame(() => {
|
|
312
|
+
s.itemsForShow.value = [];
|
|
313
|
+
}), i()?.elPopup && c.setSearchTextAndLoad(s.searchText.value));
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
const d = N(() => t.searchType === "inline" && t.multiselect || t.searchType === "inline" && Y.state.isMobile ? "popup" : t.searchType), c = we(t.api, t.apiSetSearchParams, t.minLength, t.useCache), s = Se(
|
|
317
|
+
u,
|
|
318
|
+
b,
|
|
319
|
+
O(t, "items"),
|
|
320
|
+
t.multiselect,
|
|
321
|
+
O(t, "useAllItem"),
|
|
322
|
+
O(t, "appendSearchToResult"),
|
|
323
|
+
d,
|
|
324
|
+
t.minLength,
|
|
325
|
+
c
|
|
326
|
+
), n = N(() => t.buttonProps ? "TopButton" : d.value === "inline" ? "TopInput" : "div"), v = $(null), i = () => v.value?.popup;
|
|
327
|
+
c.apiRequest && H(s.searchText, () => {
|
|
328
|
+
c.setSearchTextAndLoad(s.searchText.value);
|
|
329
|
+
});
|
|
330
|
+
const A = N(() => Array.isArray(u.value) || t.multiselect || !t.selectedAsPlaceholder && d.value !== "inline" ? t.placeholder : u.value?.name || t.placeholder), y = (m) => {
|
|
331
|
+
let p = !1;
|
|
332
|
+
switch (m.key) {
|
|
333
|
+
case "Delete":
|
|
334
|
+
case "Backspace":
|
|
335
|
+
Array.isArray(u.value) && (m.preventDefault(), m.stopPropagation(), u.value.pop());
|
|
336
|
+
break;
|
|
337
|
+
case "ArrowUp":
|
|
338
|
+
case "ArrowRight":
|
|
339
|
+
case "ArrowDown":
|
|
340
|
+
case "ArrowLeft":
|
|
341
|
+
case "Enter":
|
|
342
|
+
case " ":
|
|
343
|
+
p = !0;
|
|
344
|
+
break;
|
|
345
|
+
case "Escape":
|
|
346
|
+
d.value === "inline" && s.resetSearch();
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
const r = m.key.length === 1 && !m.ctrlKey && !m.metaKey;
|
|
350
|
+
(d.value === "popup" || d.value === "inline") && r && (p = !0), i()?.elPopup && (p = !1), p && (d.value === "popup" && (m.preventDefault(), m.stopPropagation(), r && (s.searchText.value || (s.searchText.value = m.key))), m.currentTarget?.click());
|
|
351
|
+
}, h = (m) => {
|
|
352
|
+
m.preventDefault(), s.selectNextItem();
|
|
353
|
+
}, x = () => {
|
|
354
|
+
c.apiRequest && c.setSearchTextAndLoad(s.searchText.value, !1);
|
|
355
|
+
}, I = () => {
|
|
356
|
+
d.value === "popup" && s.searchText.value && s.resetSearch();
|
|
357
|
+
}, q = (m) => {
|
|
358
|
+
const p = m.target;
|
|
359
|
+
p.scrollTop / (p.scrollHeight - p.offsetHeight) > 0.8 && c.load(!0);
|
|
360
|
+
};
|
|
361
|
+
return (m, p) => {
|
|
362
|
+
const r = ie("TopLoadbar"), C = ue("top-focus");
|
|
363
|
+
return g(), S(f(ye), {
|
|
364
|
+
ref_key: "popupRef",
|
|
365
|
+
ref: v,
|
|
366
|
+
onOpen: p[3] || (p[3] = (o) => x()),
|
|
367
|
+
onClose: p[4] || (p[4] = (o) => I()),
|
|
368
|
+
onScrollContentList: p[5] || (p[5] = (o) => f(c) ? q(o) : void 0),
|
|
369
|
+
notch: !1,
|
|
370
|
+
transitionDuration: 0,
|
|
371
|
+
openByFocusInput: d.value === "inline" && (e.openByFocusInput ?? !0),
|
|
372
|
+
disabled: d.value === "inline" && f(s).genIsShort()
|
|
373
|
+
}, U({
|
|
374
|
+
opener: B(() => [
|
|
375
|
+
Q((g(), S(fe(n.value), R(e.buttonProps, {
|
|
376
|
+
class: {
|
|
377
|
+
"top-selector2": !0,
|
|
378
|
+
"top-selector2-multiselect": e.multiselect,
|
|
379
|
+
["top-selector2-" + e.modificator]: !!e.modificator,
|
|
380
|
+
"top-as-input": !e.buttonProps && d.value !== "inline",
|
|
381
|
+
"top-as-selector": !0,
|
|
382
|
+
["top-size_" + e.size]: !0,
|
|
383
|
+
"top-disabled": e.disabled,
|
|
384
|
+
"top-forms-focusable": !e.disabled,
|
|
385
|
+
"top-error": e.isError
|
|
386
|
+
},
|
|
387
|
+
icon: e.icon,
|
|
388
|
+
tabindex: "0",
|
|
389
|
+
onKeydown: y,
|
|
390
|
+
onBlur: p[0] || (p[0] = (o) => d.value === "inline" && f(s).resetSearch()),
|
|
391
|
+
placeholder: A.value,
|
|
392
|
+
title: e.title,
|
|
393
|
+
captionType: d.value === "inline" && e.title !== void 0 ? "top" : void 0,
|
|
394
|
+
modelValue: f(s).searchText.value,
|
|
395
|
+
"onUpdate:modelValue": p[1] || (p[1] = (o) => f(s).searchText.value = o)
|
|
396
|
+
}), {
|
|
397
|
+
default: B(() => [
|
|
398
|
+
e.multiselect ? (g(), L("div", Be, [
|
|
399
|
+
(g(!0), L(F, null, z(u.value, (o) => (g(), S(Le, {
|
|
400
|
+
id: o.id,
|
|
401
|
+
name: o.name,
|
|
402
|
+
onDelete: f(s).deleteItemByItem
|
|
403
|
+
}, null, 8, ["id", "name", "onDelete"]))), 256))
|
|
404
|
+
])) : M("", !0),
|
|
405
|
+
d.value !== "inline" && !e.multiselect ? (g(), L("span", Me, P(Array.isArray(u.value) ? "" : u.value.name), 1)) : M("", !0),
|
|
406
|
+
e.multiselect && !u.value.length ? (g(), L("span", Pe, P(A.value), 1)) : M("", !0),
|
|
407
|
+
e.addChanger && !e.buttonProps && !e.multiselect && f(s).itemsForShow.value.length > 1 && !e.disabled ? (g(), L("span", {
|
|
408
|
+
key: 3,
|
|
409
|
+
class: "top-changer top-changer-selector",
|
|
410
|
+
"data-top-popup-disabled": "true",
|
|
411
|
+
onClick: h
|
|
412
|
+
})) : M("", !0)
|
|
413
|
+
]),
|
|
414
|
+
_: 1
|
|
415
|
+
}, 16, ["class", "icon", "placeholder", "title", "captionType", "modelValue"])), [
|
|
416
|
+
[
|
|
417
|
+
C,
|
|
418
|
+
e.isError,
|
|
419
|
+
void 0,
|
|
420
|
+
{ onupdate: !0 }
|
|
421
|
+
]
|
|
422
|
+
])
|
|
423
|
+
]),
|
|
424
|
+
contentList: B(() => [
|
|
425
|
+
(g(!0), L(F, null, z(f(s).itemsForShow.value, (o) => (g(), S(f(Z), R({
|
|
426
|
+
key: o.id ?? void 0,
|
|
427
|
+
class: {
|
|
428
|
+
"top-active": !Array.isArray(u.value) && !e.multiselect && u.value.id === o.id && u.value.name === o.name,
|
|
429
|
+
"top-selector2_item-all": o.id === f(le),
|
|
430
|
+
"top-selector2_item-new": o.id === f(K)
|
|
431
|
+
}
|
|
432
|
+
}, { ref_for: !0 }, o.listItemProps, {
|
|
433
|
+
closeByClick: !e.multiselect || f(Y).state.isMobile,
|
|
434
|
+
onClick: (w) => f(s).selectItem(o)
|
|
435
|
+
}), {
|
|
436
|
+
default: B(() => [
|
|
437
|
+
m.$slots.item ? ce(m.$slots, "item", {
|
|
438
|
+
key: 0,
|
|
439
|
+
item: o
|
|
440
|
+
}) : (g(), L(F, { key: 1 }, [
|
|
441
|
+
E(P(o.name), 1)
|
|
442
|
+
], 64))
|
|
443
|
+
]),
|
|
444
|
+
_: 2
|
|
445
|
+
}, 1040, ["class", "closeByClick", "onClick"]))), 128)),
|
|
446
|
+
!f(s).itemsForShow.value.length && !f(s).genIsShort() ? (g(), S(f(Z), {
|
|
447
|
+
key: 0,
|
|
448
|
+
type: "regular"
|
|
449
|
+
}, {
|
|
450
|
+
default: B(() => [
|
|
451
|
+
!f(c).isLoading.value || f(c).countLoading.value ? (g(), L(F, { key: 0 }, [
|
|
452
|
+
E(P(m.$i18n.Common.No_results), 1)
|
|
453
|
+
], 64)) : (g(), S(f(me), {
|
|
454
|
+
key: 1,
|
|
455
|
+
type: "circles"
|
|
456
|
+
}))
|
|
457
|
+
]),
|
|
458
|
+
_: 1
|
|
459
|
+
})) : M("", !0),
|
|
460
|
+
f(c).countLoading.value && f(c).isLoading.value && d.value === "inline" ? (g(), S(r, { key: 1 })) : M("", !0)
|
|
461
|
+
]),
|
|
462
|
+
_: 2
|
|
463
|
+
}, [
|
|
464
|
+
d.value === "popup" ? {
|
|
465
|
+
name: "widget",
|
|
466
|
+
fn: B(() => [
|
|
467
|
+
Q(te(f(he), {
|
|
468
|
+
title: "Поиск",
|
|
469
|
+
icon: "",
|
|
470
|
+
modelValue: f(s).searchText.value,
|
|
471
|
+
"onUpdate:modelValue": p[2] || (p[2] = (o) => f(s).searchText.value = o),
|
|
472
|
+
isLoading: !!f(c).countLoading.value && f(c).isLoading.value,
|
|
473
|
+
placeholder: A.value
|
|
474
|
+
}, null, 8, ["modelValue", "isLoading", "placeholder"]), [
|
|
475
|
+
[
|
|
476
|
+
C,
|
|
477
|
+
u.value,
|
|
478
|
+
void 0,
|
|
479
|
+
{ onupdate: !0 }
|
|
480
|
+
]
|
|
481
|
+
])
|
|
482
|
+
]),
|
|
483
|
+
key: "0"
|
|
484
|
+
} : void 0
|
|
485
|
+
]), 1032, ["openByFocusInput", "disabled"]);
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
export {
|
|
490
|
+
K as I,
|
|
491
|
+
qe as _,
|
|
492
|
+
Re as a,
|
|
493
|
+
Ke as b,
|
|
494
|
+
le as c
|
|
495
|
+
};
|
|
496
|
+
//# sourceMappingURL=policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js.map
|