@topvisor/ui 1.3.5-popupFromInput.0 → 1.4.0-TopGroupSelector.10
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 +847 -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
package/project/project.js
CHANGED
|
@@ -3,18 +3,20 @@
|
|
|
3
3
|
const fileNames = ['../assets/project.css'].map(fileName => import.meta.resolve(fileName));
|
|
4
4
|
_autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
|
|
5
5
|
|
|
6
|
-
import { defineComponent as
|
|
7
|
-
import { u as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { u as
|
|
11
|
-
import { getSearcherGIcon as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
import { defineComponent as R, mergeModels as V, useModel as T, computed as w, createElementBlock as A, openBlock as h, createBlock as C, unref as v, withCtx as B, Fragment as Y, renderList as me, normalizeClass as X, createElementVNode as oe, toDisplayString as b, createVNode as N, createTextVNode as z, toValue as ye, ref as K, watch as E, createCommentVNode as O, reactive as be, isRef as he, withModifiers as U, mergeProps as Ve, withKeys as Ie, nextTick as Re, resolveDirective as Ne, withDirectives as Pe, resolveDynamicComponent as De, renderSlot as qe, shallowRef as Fe, createSlots as Ue } from "vue";
|
|
7
|
+
import { u as M, C as _, e as Q, p as ce, d as _e } from "../.chunks/forms-BseC3Ftz.es.js";
|
|
8
|
+
import { _ as Me, b as ve, a as ze } from "../.chunks/popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js";
|
|
9
|
+
import { a as Je, _ as we, b as Ee, c as $e, I as ue } from "../.chunks/policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js";
|
|
10
|
+
import { u as We } from "../.chunks/utils-YrUExsH7.es.js";
|
|
11
|
+
import { getSearcherGIcon as Ye, getLangLabel as Qe, getDeviceGIcon as He } from "../utils/searchers.js";
|
|
12
|
+
import "../.chunks/core-BL-38XF7.es.js";
|
|
13
|
+
import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js";
|
|
14
|
+
import { g as Se } from "../.chunks/field-CyyFzM-Y.es.js";
|
|
15
|
+
import { storage as J } from "../utils/dom.js";
|
|
16
|
+
import { TopPopupWorker as Xe } from "../popup/worker.js";
|
|
17
|
+
const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" }, Rt = /* @__PURE__ */ R({
|
|
18
|
+
__name: "competitorSelector",
|
|
19
|
+
props: /* @__PURE__ */ V({
|
|
18
20
|
modelValue: {},
|
|
19
21
|
items: {},
|
|
20
22
|
showSelectAllItem: { type: Boolean, default: !0 }
|
|
@@ -23,74 +25,65 @@ const qe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
23
25
|
modelModifiers: {}
|
|
24
26
|
}),
|
|
25
27
|
emits: ["update:modelValue"],
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
28
|
+
setup(e) {
|
|
29
|
+
const a = e, o = T(e, "modelValue"), t = w(() => {
|
|
30
|
+
if (a.showSelectAllItem)
|
|
29
31
|
return {
|
|
30
32
|
icon: "",
|
|
31
|
-
title:
|
|
33
|
+
title: M().Common.Select_all,
|
|
32
34
|
value: "all",
|
|
33
35
|
content: ""
|
|
34
36
|
};
|
|
35
37
|
});
|
|
36
|
-
return (
|
|
37
|
-
|
|
38
|
+
return (r, l) => (h(), A("div", Ze, [
|
|
39
|
+
v(_).state.isMobile ? (h(), C(Me, { key: 0 }, {
|
|
38
40
|
opener: B(() => [
|
|
39
|
-
|
|
40
|
-
class: "top-
|
|
41
|
+
N(Q, {
|
|
42
|
+
class: "top-competitorSelector_opener",
|
|
41
43
|
color: "theme",
|
|
42
44
|
icon: "",
|
|
43
45
|
icon2: ""
|
|
44
46
|
}, {
|
|
45
|
-
default: B(() =>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
G(K((o = i.items.find((u) => {
|
|
49
|
-
var f;
|
|
50
|
-
return u.value === ((f = n.value) == null ? void 0 : f[0]);
|
|
51
|
-
})) == null ? void 0 : o.content), 1)
|
|
52
|
-
];
|
|
53
|
-
}),
|
|
47
|
+
default: B(() => [
|
|
48
|
+
z(b(e.items.find((n) => n.value === o.value?.[0])?.content), 1)
|
|
49
|
+
]),
|
|
54
50
|
_: 1
|
|
55
51
|
})
|
|
56
52
|
]),
|
|
57
53
|
contentList: B(() => [
|
|
58
|
-
(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
_: 2
|
|
72
|
-
}, 1032, ["class", "data-top-icon", "title", "onClick"]);
|
|
73
|
-
}), 256))
|
|
54
|
+
(h(!0), A(Y, null, me(e.items, (n) => (h(), C(ve, {
|
|
55
|
+
class: X({
|
|
56
|
+
"top-active": o.value?.includes(n.value)
|
|
57
|
+
}),
|
|
58
|
+
"data-top-icon": n.icon,
|
|
59
|
+
title: n.title,
|
|
60
|
+
onClick: () => o.value = [n.value]
|
|
61
|
+
}, {
|
|
62
|
+
default: B(() => [
|
|
63
|
+
oe("span", et, b(n.content), 1)
|
|
64
|
+
]),
|
|
65
|
+
_: 2
|
|
66
|
+
}, 1032, ["class", "data-top-icon", "title", "onClick"]))), 256))
|
|
74
67
|
]),
|
|
75
68
|
_: 1
|
|
76
|
-
})) : (
|
|
69
|
+
})) : (h(), C(Je, {
|
|
77
70
|
key: 1,
|
|
78
|
-
modelValue:
|
|
79
|
-
"onUpdate:modelValue":
|
|
80
|
-
items:
|
|
71
|
+
modelValue: o.value,
|
|
72
|
+
"onUpdate:modelValue": l[0] || (l[0] = (n) => o.value = n),
|
|
73
|
+
items: e.items,
|
|
81
74
|
isMultiple: !0,
|
|
82
75
|
styling: "bar",
|
|
83
76
|
canBeEmptyMultiple: !1,
|
|
84
|
-
selectAllItem:
|
|
77
|
+
selectAllItem: t.value
|
|
85
78
|
}, null, 8, ["modelValue", "items", "selectAllItem"]))
|
|
86
79
|
]));
|
|
87
80
|
}
|
|
88
|
-
}),
|
|
89
|
-
value:
|
|
90
|
-
title:
|
|
91
|
-
icon:
|
|
92
|
-
content:
|
|
93
|
-
}))),
|
|
81
|
+
}), Nt = (e, a) => w(() => ye(e).filter((r) => r.on >= 0 || r.id === a).map((r) => ({
|
|
82
|
+
value: r.id,
|
|
83
|
+
title: r.url + ` [${r.id}]`,
|
|
84
|
+
icon: r.id === ye(a) ? "" : "",
|
|
85
|
+
content: r.name
|
|
86
|
+
}))), L = -1, y = -2, le = -1, tt = {
|
|
94
87
|
0: "Yandex",
|
|
95
88
|
1: "Google",
|
|
96
89
|
4: "YouTube",
|
|
@@ -100,247 +93,241 @@ const qe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
100
93
|
9: "GoogleStore",
|
|
101
94
|
20: "Yandex.com",
|
|
102
95
|
21: "Yandex.com.tr"
|
|
103
|
-
}, me = {
|
|
104
|
-
key: p,
|
|
105
|
-
name: "--",
|
|
106
|
-
index: p
|
|
107
96
|
}, xe = {
|
|
108
|
-
key:
|
|
97
|
+
key: y,
|
|
98
|
+
name: "--",
|
|
99
|
+
index: y
|
|
100
|
+
}, Ge = {
|
|
101
|
+
key: y,
|
|
109
102
|
name: "--",
|
|
110
|
-
regions: [
|
|
111
|
-
regionByIndex: /* @__PURE__ */ new Map([[
|
|
112
|
-
},
|
|
113
|
-
key:
|
|
103
|
+
regions: [xe],
|
|
104
|
+
regionByIndex: /* @__PURE__ */ new Map([[y, xe]])
|
|
105
|
+
}, ae = {
|
|
106
|
+
key: y,
|
|
114
107
|
name: "Autoselect",
|
|
115
|
-
index:
|
|
116
|
-
},
|
|
117
|
-
key:
|
|
108
|
+
index: y
|
|
109
|
+
}, se = {
|
|
110
|
+
key: y,
|
|
118
111
|
name: "Autoselect",
|
|
119
|
-
regions: [
|
|
120
|
-
regionByIndex: /* @__PURE__ */ new Map([[
|
|
121
|
-
},
|
|
112
|
+
regions: [ae],
|
|
113
|
+
regionByIndex: /* @__PURE__ */ new Map([[y, ae]])
|
|
114
|
+
}, ke = {
|
|
122
115
|
countryCode: "00",
|
|
123
116
|
depth: 1,
|
|
124
117
|
device: 0,
|
|
125
|
-
key:
|
|
126
|
-
index:
|
|
118
|
+
key: le,
|
|
119
|
+
index: le,
|
|
127
120
|
lang: "ru",
|
|
128
121
|
name: "Without region"
|
|
129
|
-
},
|
|
130
|
-
let
|
|
131
|
-
return
|
|
132
|
-
},
|
|
133
|
-
const
|
|
134
|
-
return
|
|
135
|
-
if (!
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
if (
|
|
122
|
+
}, ot = () => (ae.name = M().Common.Autoselect, ae), lt = () => (ot(), se.name = M().Common.Autoselect, console.log(se), se), at = () => (ke.name = M().Keywords.Without_region, ke), Ke = (e = !1, a = !1, o = []) => {
|
|
123
|
+
let t;
|
|
124
|
+
return e ? t = nt(o) : t = Oe(o), a && t.set(y, lt()), t.size || t.set(y, Ge), t;
|
|
125
|
+
}, Oe = (e, a = !0, o = [], t = !1) => {
|
|
126
|
+
const r = /* @__PURE__ */ new Map();
|
|
127
|
+
return e.forEach((l) => {
|
|
128
|
+
if (!l.enabled || t && typeof l.key == "number" && l.key > 1) return;
|
|
129
|
+
const n = { ...l };
|
|
130
|
+
n.regionByIndex = /* @__PURE__ */ new Map(), l.regions && l.regions.forEach((u) => {
|
|
131
|
+
if (a && !u.enabled) return;
|
|
139
132
|
const f = { ...u };
|
|
140
|
-
|
|
141
|
-
}), !
|
|
142
|
-
(!
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}),
|
|
146
|
-
if (
|
|
147
|
-
const
|
|
148
|
-
key:
|
|
149
|
-
name:
|
|
133
|
+
n.regionByIndex.set(f.index, f);
|
|
134
|
+
}), !n.regionByIndex.size && o.length, // режим вывода ПС без регионов
|
|
135
|
+
(!l.regions || // есть включенные регионы
|
|
136
|
+
n.regionByIndex.size || // запрошен вывод конкретных ПС
|
|
137
|
+
o.length) && typeof n.key == "number" && r.set(n.key, n);
|
|
138
|
+
}), o.forEach((l) => {
|
|
139
|
+
if (r.has(l)) return;
|
|
140
|
+
const n = {
|
|
141
|
+
key: l,
|
|
142
|
+
name: tt[l],
|
|
150
143
|
regions: [],
|
|
151
144
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
152
145
|
};
|
|
153
|
-
|
|
154
|
-
}),
|
|
155
|
-
},
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
158
|
-
const
|
|
159
|
-
|
|
146
|
+
r.set(n.key, n);
|
|
147
|
+
}), r;
|
|
148
|
+
}, nt = (e) => {
|
|
149
|
+
const a = Oe(e, !1, [0, 1], !0);
|
|
150
|
+
if (a.has(2)) {
|
|
151
|
+
const o = a.get(2);
|
|
152
|
+
o && (o.regionByIndex = /* @__PURE__ */ new Map());
|
|
160
153
|
}
|
|
161
|
-
return
|
|
162
|
-
if (!
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
}),
|
|
166
|
-
},
|
|
167
|
-
const
|
|
168
|
-
let
|
|
169
|
-
return
|
|
170
|
-
if (!(
|
|
171
|
-
if (!
|
|
172
|
-
return
|
|
173
|
-
}),
|
|
154
|
+
return a.forEach((o) => {
|
|
155
|
+
if (!o.regionByIndex) return;
|
|
156
|
+
const t = { ...at() };
|
|
157
|
+
o.regionByIndex.set(t.index, t);
|
|
158
|
+
}), a;
|
|
159
|
+
}, rt = (e, a, o = []) => {
|
|
160
|
+
const t = Ke(e, !1, o);
|
|
161
|
+
let r;
|
|
162
|
+
return t.forEach((l) => {
|
|
163
|
+
if (!(a.searcher_key !== void 0 && a.searcher_key != l.key) && l.regions && (l.regions.forEach((n) => {
|
|
164
|
+
if (!r && !(a.key !== void 0 && a.key != n.key) && !(a.index !== void 0 && a.index != n.index) && !(!e && (a.lang !== void 0 && a.lang != n.lang || a.device !== void 0 && a.device != n.device)))
|
|
165
|
+
return n.searcher_key = l.key, r = n, !1;
|
|
166
|
+
}), r))
|
|
174
167
|
return !1;
|
|
175
|
-
}),
|
|
176
|
-
},
|
|
177
|
-
const
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
168
|
+
}), r;
|
|
169
|
+
}, it = We(() => import("../.chunks/dialog_regionSelectorRegions-1UVhgK2f.es.js")), dt = (e, a) => {
|
|
170
|
+
const o = M(), t = K(a.value.keys().next().value ?? y), r = w(() => {
|
|
171
|
+
const l = /* @__PURE__ */ new Map();
|
|
172
|
+
if (a.value.forEach((n) => {
|
|
180
173
|
let u = {
|
|
181
|
-
value:
|
|
182
|
-
title:
|
|
174
|
+
value: n.key,
|
|
175
|
+
title: n.name
|
|
183
176
|
};
|
|
184
|
-
|
|
185
|
-
}),
|
|
186
|
-
const
|
|
177
|
+
e.addSearcherIcon && (u.icon = Ye(n.key)), l.set(n.key, u);
|
|
178
|
+
}), e.addCompare && !l.has(y)) {
|
|
179
|
+
const n = {
|
|
187
180
|
value: "",
|
|
188
181
|
title: "--------------------",
|
|
189
182
|
disabled: !0
|
|
190
183
|
};
|
|
191
|
-
|
|
184
|
+
l.set(n.value, n);
|
|
192
185
|
const u = {
|
|
193
|
-
value:
|
|
194
|
-
title:
|
|
186
|
+
value: L,
|
|
187
|
+
title: o.Common.Compare
|
|
195
188
|
};
|
|
196
|
-
|
|
189
|
+
l.set(u.value, u);
|
|
197
190
|
}
|
|
198
|
-
return
|
|
191
|
+
return l;
|
|
199
192
|
});
|
|
200
193
|
return {
|
|
201
|
-
searcherKey:
|
|
202
|
-
optionBySearcherKey:
|
|
194
|
+
searcherKey: t,
|
|
195
|
+
optionBySearcherKey: r
|
|
203
196
|
};
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
let r = S.name;
|
|
213
|
-
if (t.forFrequency) {
|
|
197
|
+
}, ut = (e, a) => {
|
|
198
|
+
const o = M(), t = K(y);
|
|
199
|
+
e.modelValue.length === 1 && (t.value = e.modelValue[0]), t.value === y && (e.forFrequency ? t.value = a.value?.regionByIndex.values().next().value?.key ?? y : t.value = a.value?.regionByIndex.keys().next().value ?? y);
|
|
200
|
+
const r = w(() => {
|
|
201
|
+
const l = /* @__PURE__ */ new Map();
|
|
202
|
+
return a.value.regionByIndex?.forEach((n) => {
|
|
203
|
+
let u = n.name;
|
|
204
|
+
if (e.forFrequency) {
|
|
214
205
|
const x = {
|
|
215
|
-
value:
|
|
216
|
-
title:
|
|
206
|
+
value: n.key,
|
|
207
|
+
title: u
|
|
217
208
|
};
|
|
218
|
-
|
|
209
|
+
l.has(n.key) || l.set(n.key, x);
|
|
219
210
|
return;
|
|
220
211
|
}
|
|
221
|
-
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
const
|
|
225
|
-
value:
|
|
226
|
-
title:
|
|
227
|
-
icon:
|
|
212
|
+
n.device && (u += " (" + o.Common["Device_" + n.device] + ")");
|
|
213
|
+
const f = Qe(a.value.key || 0, n.lang ?? "");
|
|
214
|
+
f && (u += " / " + f);
|
|
215
|
+
const c = {
|
|
216
|
+
value: n.index,
|
|
217
|
+
title: u,
|
|
218
|
+
icon: n.device ? He(n.device) : void 0
|
|
228
219
|
};
|
|
229
|
-
|
|
230
|
-
}),
|
|
220
|
+
l.set(n.index, c);
|
|
221
|
+
}), l;
|
|
231
222
|
});
|
|
232
|
-
return
|
|
233
|
-
|
|
234
|
-
if (t.onlySearcher || e.value !== void 0 && f.get(e.value))
|
|
223
|
+
return E(r, (l, n) => {
|
|
224
|
+
if (e.onlySearcher || t.value !== void 0 && l.get(t.value))
|
|
235
225
|
return;
|
|
236
|
-
let
|
|
237
|
-
if (
|
|
238
|
-
|
|
226
|
+
let u = l.keys().next().value;
|
|
227
|
+
if (t.value === y || u === y) {
|
|
228
|
+
t.value = u;
|
|
239
229
|
return;
|
|
240
230
|
}
|
|
241
|
-
let
|
|
242
|
-
for (const [x,
|
|
243
|
-
const
|
|
244
|
-
if (typeof
|
|
231
|
+
let f = n?.get(t.value)?.title || "", c = -1;
|
|
232
|
+
for (const [x, i] of l.entries()) {
|
|
233
|
+
const m = i.title;
|
|
234
|
+
if (typeof m != "string" || typeof x == "string")
|
|
245
235
|
break;
|
|
246
|
-
if (
|
|
247
|
-
|
|
236
|
+
if (m === f) {
|
|
237
|
+
u = x;
|
|
248
238
|
break;
|
|
249
239
|
}
|
|
250
|
-
const
|
|
251
|
-
let
|
|
252
|
-
|
|
240
|
+
const d = new RegExp(` \\((${o.Common.Device_1}|${o.Common.Device_2})\\)`);
|
|
241
|
+
let s = f, g = 3;
|
|
242
|
+
m.indexOf(s) === -1 && (s = f.replace(/^[^a-zа-я]/i, "").replace(d, ""), g--), m.indexOf(s) === -1 && (s = f.replace(/ \/.*/, ""), g--), m.indexOf(s) === -1 && (s = f.replace(/ \/.*/, ""), s = s.replace(/^[^a-zа-я]/i, "").replace(d, ""), g--), m.indexOf(s) !== -1 && (g <= c || (c = g, u = x));
|
|
253
243
|
}
|
|
254
|
-
|
|
244
|
+
t.value = u;
|
|
255
245
|
}), {
|
|
256
|
-
regionIndex:
|
|
257
|
-
optionByRegionIndex:
|
|
246
|
+
regionIndex: t,
|
|
247
|
+
optionByRegionIndex: r
|
|
258
248
|
};
|
|
259
|
-
},
|
|
260
|
-
const
|
|
261
|
-
if (
|
|
262
|
-
|
|
249
|
+
}, st = (e, a, o) => {
|
|
250
|
+
const t = K([]), r = () => {
|
|
251
|
+
if (e.onlySearcher && a.value) {
|
|
252
|
+
t.value = Array.from(a.value.keys());
|
|
263
253
|
return;
|
|
264
254
|
}
|
|
265
|
-
let
|
|
266
|
-
if (
|
|
267
|
-
|
|
255
|
+
let n = [];
|
|
256
|
+
if (e.modelValue.length > 1)
|
|
257
|
+
n = [...e.modelValue];
|
|
268
258
|
else
|
|
269
259
|
try {
|
|
270
|
-
|
|
271
|
-
localStorage.getItem("ui:project:regionSelector" +
|
|
260
|
+
n = JSON.parse(
|
|
261
|
+
localStorage.getItem("ui:project:regionSelector" + e.projectId + ":regionsIndexes")
|
|
272
262
|
) ?? [];
|
|
273
263
|
} catch {
|
|
274
264
|
}
|
|
275
|
-
|
|
276
|
-
},
|
|
277
|
-
|
|
265
|
+
n.length && (n = n.filter((u) => o.value.has(u))), n.length || (n = Array.from(o.value)), t.value = [...n];
|
|
266
|
+
}, l = () => {
|
|
267
|
+
t.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(t.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
|
|
278
268
|
};
|
|
279
|
-
return
|
|
280
|
-
|
|
281
|
-
}),
|
|
282
|
-
regionsIndexes:
|
|
269
|
+
return E(t, () => {
|
|
270
|
+
l();
|
|
271
|
+
}), e.addCompare && r(), {
|
|
272
|
+
regionsIndexes: t
|
|
283
273
|
};
|
|
284
|
-
},
|
|
285
|
-
const
|
|
286
|
-
const
|
|
287
|
-
return
|
|
288
|
-
|
|
289
|
-
d.index !==
|
|
274
|
+
}, ct = (e) => {
|
|
275
|
+
const a = w(() => Ke(e.forFrequency, e.autoRegion, e.searchers)), o = w(() => a.value.get(r.searcherKey.value) || Ge), t = w(() => {
|
|
276
|
+
const i = /* @__PURE__ */ new Set();
|
|
277
|
+
return a.value.forEach((m) => {
|
|
278
|
+
m.regionByIndex.forEach((d) => {
|
|
279
|
+
d.index !== le && d.index !== y && i.add(d.index);
|
|
290
280
|
});
|
|
291
|
-
}),
|
|
292
|
-
}),
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
if (t.onlySearcher && T.key === i.searcherKey.value) {
|
|
300
|
-
r = i.searcherKey.value;
|
|
281
|
+
}), i;
|
|
282
|
+
}), r = dt(e, a), l = ut(e, o), n = st(e, a, t);
|
|
283
|
+
E(a, () => {
|
|
284
|
+
if (e.onlySearcher ? n.regionsIndexes.value = Array.from(a.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((m) => t.value.has(m)), r.searcherKey.value === L) return;
|
|
285
|
+
let i = a.value.keys().next().value;
|
|
286
|
+
a.value.forEach((m) => {
|
|
287
|
+
if (e.onlySearcher && m.key === r.searcherKey.value) {
|
|
288
|
+
i = r.searcherKey.value;
|
|
301
289
|
return;
|
|
302
290
|
}
|
|
303
|
-
if (
|
|
304
|
-
let
|
|
305
|
-
|
|
306
|
-
const
|
|
307
|
-
|
|
291
|
+
if (l.regionIndex.value && m.regionByIndex?.has(l.regionIndex.value) && (i = m.key), !e.onlySearcher) {
|
|
292
|
+
let d;
|
|
293
|
+
i !== void 0 && (d = a.value.get(i)?.regionByIndex);
|
|
294
|
+
const s = a.value.get(m.key)?.regionByIndex;
|
|
295
|
+
d?.has(y) && !s?.has(y) && (i = m.key);
|
|
308
296
|
}
|
|
309
|
-
}),
|
|
297
|
+
}), i !== void 0 && (r.searcherKey.value = i), l.regionIndex.value !== void 0 && !o.value?.regionByIndex?.has(l.regionIndex.value) && (l.regionIndex.value = o.value?.regions?.keys().next().value);
|
|
310
298
|
}, { immediate: !0 });
|
|
311
299
|
const u = () => {
|
|
312
|
-
if (!(
|
|
313
|
-
return
|
|
300
|
+
if (!(r.searcherKey.value === L || r.searcherKey.value === y))
|
|
301
|
+
return r.searcherKey.value;
|
|
314
302
|
}, f = () => {
|
|
315
|
-
if (
|
|
316
|
-
let
|
|
317
|
-
if (
|
|
318
|
-
const
|
|
319
|
-
|
|
303
|
+
if (e.onlySearcher || l.regionIndex.value === y) return;
|
|
304
|
+
let i = l.regionIndex.value;
|
|
305
|
+
if (e.forFrequency) {
|
|
306
|
+
const m = l.regionIndex.value;
|
|
307
|
+
i = rt(e.forFrequency, { searcher_key: u(), key: m }, e.searchers)?.index;
|
|
320
308
|
}
|
|
321
|
-
return
|
|
322
|
-
},
|
|
323
|
-
const
|
|
324
|
-
if (
|
|
325
|
-
return
|
|
309
|
+
return i;
|
|
310
|
+
}, c = () => {
|
|
311
|
+
const i = u();
|
|
312
|
+
if (i !== void 0)
|
|
313
|
+
return a.value.get(i);
|
|
326
314
|
};
|
|
327
315
|
return {
|
|
328
|
-
selectSearcher:
|
|
329
|
-
selectRegion:
|
|
330
|
-
compare:
|
|
331
|
-
searcherByKey:
|
|
332
|
-
allRegionsIndexes:
|
|
333
|
-
getSearcher:
|
|
316
|
+
selectSearcher: r,
|
|
317
|
+
selectRegion: l,
|
|
318
|
+
compare: n,
|
|
319
|
+
searcherByKey: a,
|
|
320
|
+
allRegionsIndexes: t,
|
|
321
|
+
getSearcher: c,
|
|
334
322
|
getRegion: () => {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
return (d = (g = h()) == null ? void 0 : g.regionByIndex) == null ? void 0 : d.get(r);
|
|
323
|
+
const i = f();
|
|
324
|
+
if (i !== void 0)
|
|
325
|
+
return c()?.regionByIndex?.get(i);
|
|
339
326
|
}
|
|
340
327
|
};
|
|
341
|
-
},
|
|
342
|
-
__name: "
|
|
343
|
-
props: /* @__PURE__ */
|
|
328
|
+
}, Pt = /* @__PURE__ */ R({
|
|
329
|
+
__name: "regionSelector",
|
|
330
|
+
props: /* @__PURE__ */ V({
|
|
344
331
|
projectId: {},
|
|
345
332
|
searchers: { default: () => [] },
|
|
346
333
|
modelValue: {},
|
|
@@ -359,191 +346,479 @@ const qe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
359
346
|
modelValueSingleModifiers: {}
|
|
360
347
|
}),
|
|
361
348
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
362
|
-
setup(
|
|
363
|
-
const
|
|
364
|
-
selectSearcher:
|
|
365
|
-
selectRegion:
|
|
349
|
+
setup(e, { expose: a }) {
|
|
350
|
+
const o = e, t = T(e, "modelValue"), r = T(e, "modelValueSingle"), {
|
|
351
|
+
selectSearcher: l,
|
|
352
|
+
selectRegion: n,
|
|
366
353
|
compare: u,
|
|
367
354
|
searcherByKey: f,
|
|
368
|
-
allRegionsIndexes:
|
|
369
|
-
getSearcher:
|
|
370
|
-
getRegion:
|
|
371
|
-
} =
|
|
355
|
+
allRegionsIndexes: c,
|
|
356
|
+
getSearcher: x,
|
|
357
|
+
getRegion: i
|
|
358
|
+
} = ct(o), m = () => {
|
|
372
359
|
const d = [];
|
|
373
|
-
f.value.forEach((
|
|
374
|
-
|
|
375
|
-
|
|
360
|
+
f.value.forEach((s) => {
|
|
361
|
+
s.enabled && s.regions.forEach((g) => {
|
|
362
|
+
g.enabled && d.push(g);
|
|
376
363
|
});
|
|
377
|
-
}),
|
|
364
|
+
}), it.open("regions", {
|
|
378
365
|
regions: d,
|
|
379
366
|
regionsIndexes: u.regionsIndexes.value,
|
|
380
|
-
"@update:regionsIndexes": (
|
|
367
|
+
"@update:regionsIndexes": (s) => u.regionsIndexes.value = s
|
|
381
368
|
});
|
|
382
369
|
};
|
|
383
|
-
return
|
|
384
|
-
if (
|
|
385
|
-
if (JSON.stringify(
|
|
370
|
+
return E([n.regionIndex, l.searcherKey, u.regionsIndexes], () => {
|
|
371
|
+
if (l.searcherKey.value === L && u.regionsIndexes.value.length) {
|
|
372
|
+
if (JSON.stringify(t.value) === JSON.stringify(u.regionsIndexes.value))
|
|
386
373
|
return;
|
|
387
|
-
|
|
374
|
+
t.value = [...u.regionsIndexes.value];
|
|
388
375
|
} else
|
|
389
|
-
|
|
390
|
-
!
|
|
391
|
-
}),
|
|
392
|
-
|
|
393
|
-
}, { immediate: !0 }),
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
m === p && !n.autoRegion && (m = void 0, i.value = p), m !== void 0 ? e.value = [m] : e.value.length = 0;
|
|
376
|
+
o.onlySearcher ? (t.value = [l.searcherKey.value], l.searcherKey.value === y && !o.autoRegion && (t.value.length = 0)) : (t.value = [n.regionIndex.value], n.regionIndex.value === y && !o.autoRegion && (t.value.length = 0));
|
|
377
|
+
!o.onlySearcher && !c.value.size && (l.searcherKey.value = y);
|
|
378
|
+
}), r.value && E(r, () => {
|
|
379
|
+
r.value && (t.value = [r.value]);
|
|
380
|
+
}, { immediate: !0 }), E(t, () => {
|
|
381
|
+
if (t.value[0] && (r.value = t.value[0]), o.onlySearcher) {
|
|
382
|
+
if (!t.value.length || t.value.length === 1 && !f.value.has(t.value[0]) || t.value.length === 1 && t.value[0] === y && !o.autoRegion) {
|
|
383
|
+
let d = f.value.keys().next().value;
|
|
384
|
+
d === y && !o.autoRegion && (d = void 0, r.value = y), d !== void 0 ? t.value = [d] : t.value.length = 0;
|
|
399
385
|
return;
|
|
400
386
|
}
|
|
401
|
-
if (
|
|
402
|
-
|
|
387
|
+
if (t.value.length > 1 && JSON.stringify(t.value) !== JSON.stringify(u.regionsIndexes.value)) {
|
|
388
|
+
t.value = [...u.regionsIndexes.value];
|
|
403
389
|
return;
|
|
404
390
|
}
|
|
405
391
|
} else {
|
|
406
|
-
let
|
|
407
|
-
if (
|
|
408
|
-
s !== void 0 &&
|
|
409
|
-
else if (
|
|
410
|
-
let
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
392
|
+
let d = [...new Set(t.value)], s = f.value.values().next().value?.regionByIndex?.keys().next().value;
|
|
393
|
+
if (o.forFrequency && (s = f.value.values().next().value?.regionByIndex?.values().next().value?.key), s === y && !o.autoRegion && (s = void 0, r.value = y), !d.length)
|
|
394
|
+
s !== void 0 && d.push(s);
|
|
395
|
+
else if (d.length === 1) {
|
|
396
|
+
let g = c.value;
|
|
397
|
+
o.forFrequency && (g = /* @__PURE__ */ new Set(), f.value.forEach((Z) => {
|
|
398
|
+
Z.regionByIndex.forEach((P) => {
|
|
399
|
+
P.index !== le && P.index !== y && g.add(P.key);
|
|
414
400
|
});
|
|
415
|
-
})),
|
|
401
|
+
})), g.has(d[0]) || (d = [], s !== void 0 && d.push(s));
|
|
416
402
|
} else
|
|
417
|
-
|
|
418
|
-
if (JSON.stringify(
|
|
419
|
-
|
|
403
|
+
d = d.filter((g) => c.value.has(g)), !d.length && s !== void 0 && d.push(s);
|
|
404
|
+
if (JSON.stringify(t.value) !== JSON.stringify(d)) {
|
|
405
|
+
t.value = d;
|
|
420
406
|
return;
|
|
421
407
|
}
|
|
422
408
|
}
|
|
423
|
-
if (!(
|
|
424
|
-
if (
|
|
425
|
-
if (
|
|
426
|
-
|
|
409
|
+
if (!(t.value.length === 1 && t.value[0] === (o.onlySearcher ? l.searcherKey.value : n.regionIndex.value)))
|
|
410
|
+
if (o.onlySearcher) {
|
|
411
|
+
if (t.value.length === 1) {
|
|
412
|
+
l.searcherKey.value = t.value[0];
|
|
427
413
|
return;
|
|
428
414
|
}
|
|
429
|
-
|
|
415
|
+
l.searcherKey.value = L;
|
|
430
416
|
return;
|
|
431
417
|
} else {
|
|
432
|
-
if (!
|
|
418
|
+
if (!t.value.length)
|
|
433
419
|
return;
|
|
434
|
-
if (
|
|
435
|
-
|
|
436
|
-
let
|
|
420
|
+
if (t.value.length === 1 && l.searcherKey.value !== L) {
|
|
421
|
+
n.regionIndex.value = t.value[0];
|
|
422
|
+
let d;
|
|
437
423
|
for (const s of f.value.values()) {
|
|
438
|
-
for (const
|
|
439
|
-
if ((
|
|
440
|
-
|
|
424
|
+
for (const g of s.regionByIndex.values())
|
|
425
|
+
if ((o.forFrequency ? g.key : g.index) === n.regionIndex.value) {
|
|
426
|
+
d = s.key;
|
|
441
427
|
break;
|
|
442
428
|
}
|
|
443
|
-
if (
|
|
429
|
+
if (d !== void 0)
|
|
444
430
|
break;
|
|
445
431
|
}
|
|
446
|
-
|
|
432
|
+
d !== void 0 && (l.searcherKey.value = d);
|
|
447
433
|
} else
|
|
448
|
-
|
|
434
|
+
l.searcherKey.value = L, u.regionsIndexes.value = [...t.value];
|
|
449
435
|
}
|
|
450
|
-
}, { immediate: !0 }),
|
|
451
|
-
getSearcher:
|
|
452
|
-
getRegion:
|
|
453
|
-
}), (d,
|
|
436
|
+
}, { immediate: !0 }), a({
|
|
437
|
+
getSearcher: x,
|
|
438
|
+
getRegion: i
|
|
439
|
+
}), (d, s) => (h(), A("div", {
|
|
454
440
|
class: X({
|
|
455
441
|
"top-selectorRegion": !0,
|
|
456
|
-
"top-selectorRegion-onlySearcher":
|
|
442
|
+
"top-selectorRegion-onlySearcher": e.onlySearcher
|
|
457
443
|
})
|
|
458
444
|
}, [
|
|
459
|
-
|
|
460
|
-
options:
|
|
461
|
-
modelValue:
|
|
462
|
-
"onUpdate:modelValue":
|
|
445
|
+
N(ce, {
|
|
446
|
+
options: v(l).optionBySearcherKey.value,
|
|
447
|
+
modelValue: v(l).searcherKey.value,
|
|
448
|
+
"onUpdate:modelValue": s[0] || (s[0] = (g) => v(l).searcherKey.value = g),
|
|
463
449
|
name: "searcher_key",
|
|
464
|
-
addChanger:
|
|
450
|
+
addChanger: e.addChanger
|
|
465
451
|
}, null, 8, ["options", "modelValue", "addChanger"]),
|
|
466
|
-
!
|
|
452
|
+
!e.onlySearcher && v(l).searcherKey.value !== v(L) ? (h(), C(ce, {
|
|
467
453
|
key: 0,
|
|
468
454
|
class: "top-select-region",
|
|
469
|
-
options:
|
|
470
|
-
modelValue:
|
|
471
|
-
"onUpdate:modelValue":
|
|
472
|
-
name:
|
|
473
|
-
addChanger:
|
|
474
|
-
"data-top-icon":
|
|
475
|
-
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) :
|
|
476
|
-
|
|
455
|
+
options: v(n).optionByRegionIndex.value,
|
|
456
|
+
modelValue: v(n).regionIndex.value,
|
|
457
|
+
"onUpdate:modelValue": s[1] || (s[1] = (g) => v(n).regionIndex.value = g),
|
|
458
|
+
name: e.forFrequency ? "region_key" : "region_index",
|
|
459
|
+
addChanger: e.addChanger,
|
|
460
|
+
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
461
|
+
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : O("", !0),
|
|
462
|
+
e.addCompare && !e.onlySearcher && v(l).searcherKey.value === v(L) ? (h(), C(Q, {
|
|
477
463
|
key: 1,
|
|
478
464
|
name: "compare",
|
|
479
|
-
onClick:
|
|
480
|
-
"data-count-compare-regions-indexes":
|
|
465
|
+
onClick: m,
|
|
466
|
+
"data-count-compare-regions-indexes": v(u).regionsIndexes.value.length
|
|
481
467
|
}, {
|
|
482
468
|
default: B(() => [
|
|
483
|
-
|
|
469
|
+
z(b(d.$i18n.Common.Selected_regions), 1)
|
|
484
470
|
]),
|
|
485
471
|
_: 1
|
|
486
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
472
|
+
}, 8, ["data-count-compare-regions-indexes"])) : O("", !0)
|
|
487
473
|
], 2));
|
|
488
474
|
}
|
|
489
|
-
}),
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
475
|
+
}), j = {
|
|
476
|
+
id: 0,
|
|
477
|
+
name: "/",
|
|
478
|
+
path: "/"
|
|
479
|
+
};
|
|
480
|
+
function gt(e) {
|
|
481
|
+
return e ? M()?.Common.All_folders : "/ (" + M()?.Keywords.Root_folder + ")";
|
|
482
|
+
}
|
|
483
|
+
const pe = (e, a, o = /* @__PURE__ */ new Map(), t = { id: "root" }, r = 0) => (t.childsIds = [], t.id && (t.countAllGroupsActive = t.count_groups_active), e[t.id] && e[t.id].forEach((l) => {
|
|
484
|
+
l = { ...l }, t.childsIds.push(l.id), l.id === 0 && (l.name = gt(a));
|
|
485
|
+
const n = r > 1 ? "-".repeat(r - 1) + " " : "";
|
|
486
|
+
n && !l.name.startsWith(n) && (l.name = n + l.name), o.set(l.id, l), pe(e, a, o, l, r + 1), t.childsIds = t.childsIds.concat(l.childsIds), t.id && l.count_groups_active && (t.countAllGroupsActive += l.count_groups_active);
|
|
487
|
+
}), o), ft = (e) => e.gen("/get/keywords_2/folders/", ["id", "parent_id", "name", "path"]).changeParams({ orders: ["ord_path"], limit: 100 });
|
|
488
|
+
function ge(e, a, o) {
|
|
489
|
+
const t = Object.keys(e), r = t.map((l) => e[l]);
|
|
490
|
+
return E(r, (l, n, u) => {
|
|
491
|
+
const f = {};
|
|
492
|
+
l.forEach((c, x) => {
|
|
493
|
+
if (!Object.is(c, n[x])) {
|
|
494
|
+
const i = t[x];
|
|
495
|
+
f[i] = {
|
|
496
|
+
old: n[x],
|
|
497
|
+
new: c
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
}), Object.keys(f).length && a(f, u);
|
|
501
|
+
}, o);
|
|
502
|
+
}
|
|
503
|
+
const mt = /* @__PURE__ */ R({
|
|
504
|
+
__name: "folders",
|
|
505
|
+
props: /* @__PURE__ */ V({
|
|
506
|
+
folderId: {},
|
|
507
|
+
folder: {},
|
|
508
|
+
folders: {},
|
|
509
|
+
projectId: {},
|
|
510
|
+
canSelectAll: { type: Boolean },
|
|
511
|
+
addChanger: { type: Boolean },
|
|
512
|
+
addIcon: { type: Boolean, default: !0 },
|
|
513
|
+
client: {}
|
|
514
|
+
}, {
|
|
515
|
+
folderId: { required: !0 },
|
|
516
|
+
folderIdModifiers: {},
|
|
517
|
+
folder: { default: j },
|
|
518
|
+
folderModifiers: {}
|
|
519
|
+
}),
|
|
520
|
+
emits: ["update:folderId", "update:folder"],
|
|
521
|
+
setup(e) {
|
|
522
|
+
const a = e, o = T(e, "folderId"), t = T(e, "folder"), r = a.client && !a.folders ? ft(a.client) : void 0, l = K(null);
|
|
523
|
+
E(() => a.projectId, () => {
|
|
524
|
+
r?.changeParams({
|
|
525
|
+
project_id: a.projectId
|
|
526
|
+
}), r?.setOptions({
|
|
527
|
+
checkFingerprint: "TopGroupSelectorFolders:" + a.projectId
|
|
528
|
+
}), l.value?.resetCache();
|
|
529
|
+
}, { immediate: !0 });
|
|
530
|
+
const n = w(() => pe(a.folders ?? { root: [j] }, a.canSelectAll));
|
|
531
|
+
return ge({
|
|
532
|
+
modelFolder: t,
|
|
533
|
+
modelFolderId: o
|
|
534
|
+
}, async (u) => {
|
|
535
|
+
if (o.value === t.value.id)
|
|
536
|
+
return;
|
|
537
|
+
if (u.modelFolder && !u.modelFolderId) {
|
|
538
|
+
o.value = t.value.id;
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
let f = n.value.get(a.folderId);
|
|
542
|
+
f || (f = j), t.value = f, o.value = f.id;
|
|
543
|
+
}, { immediate: !0 }), (u, f) => (h(), C(we, {
|
|
544
|
+
class: "top-groupSelector_folder",
|
|
545
|
+
modelValue: t.value,
|
|
546
|
+
"onUpdate:modelValue": f[0] || (f[0] = (c) => t.value = c),
|
|
547
|
+
items: e.folders ? [...n.value.values()] : void 0,
|
|
548
|
+
"search-type": "inline",
|
|
549
|
+
icon: e.addIcon ? "" : void 0,
|
|
550
|
+
api: e.folders ? void 0 : v(r),
|
|
551
|
+
apiSetSearchParams: (...c) => v(Ee)(...c, "name"),
|
|
552
|
+
addChanger: e.addChanger,
|
|
553
|
+
useCache: ""
|
|
554
|
+
}, null, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "addChanger"]));
|
|
555
|
+
}
|
|
556
|
+
}), ne = {
|
|
557
|
+
id: -1,
|
|
558
|
+
name: "--",
|
|
559
|
+
folder_id: j.id,
|
|
560
|
+
folder_path: j.path
|
|
561
|
+
}, re = {
|
|
562
|
+
id: $e,
|
|
563
|
+
name: "All groups",
|
|
564
|
+
folder_id: j.id,
|
|
565
|
+
folder_path: j.path
|
|
566
|
+
}, W = () => (re.name = M()?.Common.All_groups, re), Le = () => (re.name = M()?.Keywords.Choose_group, re), vt = (e, a, o) => (e = [...e], a !== void 0 && (e = e.filter((t) => t.on == Number(a))), o && o.id && o.childsIds && (e = e.filter((t) => t.folder_id === o.id || o.childsIds.includes(t.folder_id))), e), Ce = (e) => e.gen("/get/keywords_2/groups/", ["id", "name", "folder_id", "folder_path"]).changeParams({ folder_id_depth: !0, limit: 100 }), pt = (e) => e.gen("/add/keywords_2/groups/"), yt = { class: "top-groupSelector_groupItem" }, ht = {
|
|
567
|
+
key: 0,
|
|
568
|
+
class: "top-comment"
|
|
569
|
+
}, It = {
|
|
570
|
+
key: 1,
|
|
571
|
+
class: "top-groupSelector_groupItemFolderPath"
|
|
572
|
+
}, St = /* @__PURE__ */ R({
|
|
573
|
+
__name: "groups",
|
|
574
|
+
props: /* @__PURE__ */ V({
|
|
575
|
+
groupId: {},
|
|
576
|
+
group: {},
|
|
577
|
+
projectId: {},
|
|
578
|
+
folder: {},
|
|
579
|
+
groups: {},
|
|
580
|
+
on: { type: Boolean, default: void 0 },
|
|
581
|
+
canAdd: { type: [String, Boolean] },
|
|
582
|
+
canSelectAll: { type: [Boolean, String] },
|
|
583
|
+
autoselect: { default: "first" },
|
|
584
|
+
addChanger: { type: Boolean, default: !0 },
|
|
585
|
+
addIcon: { type: Boolean, default: !0 },
|
|
586
|
+
client: {}
|
|
587
|
+
}, {
|
|
588
|
+
groupId: { required: !0 },
|
|
589
|
+
groupIdModifiers: {},
|
|
590
|
+
group: { required: !0 },
|
|
591
|
+
groupModifiers: {}
|
|
592
|
+
}),
|
|
593
|
+
emits: /* @__PURE__ */ V(["addGroup"], ["update:groupId", "update:group"]),
|
|
594
|
+
setup(e, { emit: a }) {
|
|
595
|
+
const o = e, t = a, r = T(e, "groupId"), l = T(e, "group"), n = o.client && !o.groups ? Ce(o.client) : void 0, u = o.client ? pt(o.client) : void 0, f = K(null), c = K(void 0), x = Se("folder_id", "EQUALS", [o.folder?.id ?? 0]);
|
|
596
|
+
n?.changeParams({
|
|
597
|
+
project_id: o.projectId,
|
|
598
|
+
filters: [
|
|
599
|
+
x
|
|
600
|
+
]
|
|
601
|
+
}), o.on !== void 0 && n?.params.filters?.push(Se("on", "EQUALS", [o.on]));
|
|
602
|
+
const i = (d) => {
|
|
603
|
+
l.value = d, r.value = d.id;
|
|
604
|
+
};
|
|
605
|
+
ge({
|
|
606
|
+
projectId: () => o.projectId,
|
|
607
|
+
folderId: () => o.folder?.id,
|
|
608
|
+
canSelectAll: () => o.canSelectAll
|
|
609
|
+
}, (d) => {
|
|
610
|
+
if (d.projectId && (n?.changeParams({
|
|
611
|
+
project_id: o.projectId
|
|
612
|
+
}), n?.setOptions({
|
|
613
|
+
checkFingerprint: "TopGroupSelectorGroups:" + o.projectId
|
|
614
|
+
})), d.folderId && (x.values = [
|
|
615
|
+
o.folder?.id ?? 0
|
|
616
|
+
], o.groups && (c.value = vt(o.groups, o.on, o.folder))), f.value?.resetCache(), (d.folderId?.old !== void 0 || d.canSelectAll?.old !== void 0) && r.value !== ue) {
|
|
617
|
+
let s;
|
|
618
|
+
o.autoselect === "first" && (s = c.value?.[0], o.canSelectAll && (s = be(W()))), (o.autoselect === "placeholder" || !s) && (s = Le()), i(s);
|
|
619
|
+
}
|
|
620
|
+
}, { immediate: !0 }), ge({
|
|
621
|
+
modelGroup: l,
|
|
622
|
+
modelGroupId: r
|
|
623
|
+
}, async (d) => {
|
|
624
|
+
if (r.value !== l.value.id) {
|
|
625
|
+
if (d.modelGroup && !d.modelGroupId) {
|
|
626
|
+
r.value = l.value.id;
|
|
627
|
+
return;
|
|
628
|
+
}
|
|
629
|
+
if (!(o.canAdd && r.value === ue)) {
|
|
630
|
+
if (o.groups) {
|
|
631
|
+
let s = c.value?.find((g) => g.id === r.value);
|
|
632
|
+
if (!s && o.canSelectAll && (s = W()), s)
|
|
633
|
+
i(s);
|
|
634
|
+
else {
|
|
635
|
+
const g = c.value?.[0];
|
|
636
|
+
g && !r.value ? i(g) : i(ne);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
if (o.client && !o.groups && (r.value || r.value === $e && !o.canSelectAll)) {
|
|
640
|
+
const s = Ce(o.client).changeParams({
|
|
641
|
+
project_id: o.projectId,
|
|
642
|
+
id: r.value,
|
|
643
|
+
filters: [
|
|
644
|
+
x
|
|
645
|
+
]
|
|
646
|
+
});
|
|
647
|
+
s?.setOptions({
|
|
648
|
+
checkFingerprint: "TopGroupSelectorFindGroup:" + o.projectId
|
|
649
|
+
});
|
|
650
|
+
const g = await s.call();
|
|
651
|
+
if (!g.errors?.length && !g.result) return;
|
|
652
|
+
!g.errors && g.result[0] ? i(g.result[0]) : i(ne);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}, { immediate: !0 });
|
|
657
|
+
const m = async (d) => {
|
|
658
|
+
if (o.canAdd !== "api" || !u) return;
|
|
659
|
+
const s = l.value, g = await u.changeParams({
|
|
660
|
+
project_id: o.projectId,
|
|
661
|
+
names: [d.name],
|
|
662
|
+
to_id: o.folder?.id ?? j.id,
|
|
663
|
+
to_type: "in_folder_last"
|
|
664
|
+
}).call();
|
|
665
|
+
g.result ? (i(g.result), t("addGroup", g.result)) : i(s), f.value?.resetCache(!0);
|
|
666
|
+
};
|
|
667
|
+
return (d, s) => (h(), C(we, {
|
|
668
|
+
ref_key: "refSelector",
|
|
669
|
+
ref: f,
|
|
670
|
+
class: "top-groupSelector_group",
|
|
671
|
+
modelValue: l.value,
|
|
672
|
+
"onUpdate:modelValue": s[0] || (s[0] = (g) => l.value = g),
|
|
673
|
+
items: c.value ?? e.groups,
|
|
674
|
+
searchType: "inline",
|
|
675
|
+
icon: e.addIcon ? "" : void 0,
|
|
676
|
+
api: e.groups ? void 0 : v(n),
|
|
677
|
+
apiSetSearchParams: (...g) => v(Ee)(...g, "name"),
|
|
678
|
+
appendSearchToResult: !!e.canAdd,
|
|
679
|
+
useAllItem: e.canSelectAll ? v(W)().name : !1,
|
|
680
|
+
addChanger: e.addChanger,
|
|
681
|
+
useCache: "",
|
|
682
|
+
onAppendItem: m
|
|
683
|
+
}, {
|
|
684
|
+
item: B(({ item: g }) => [
|
|
685
|
+
oe("div", yt, [
|
|
686
|
+
g.id === v(ue) ? (h(), A("div", ht, b(d.$i18n.Common.Add) + ": ", 1)) : O("", !0),
|
|
687
|
+
oe("span", null, b(g.name), 1),
|
|
688
|
+
g.folder_path ? (h(), A("span", It, b(g.folder_path), 1)) : O("", !0)
|
|
689
|
+
])
|
|
690
|
+
]),
|
|
691
|
+
_: 1
|
|
692
|
+
}, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "appendSearchToResult", "useAllItem", "addChanger"]));
|
|
693
|
+
}
|
|
694
|
+
}), xt = { class: "top-groupSelector" }, Dt = /* @__PURE__ */ R({
|
|
695
|
+
__name: "groupSelector",
|
|
696
|
+
props: /* @__PURE__ */ V({
|
|
697
|
+
folderId: {},
|
|
698
|
+
folder: {},
|
|
699
|
+
groupId: {},
|
|
700
|
+
group: {},
|
|
701
|
+
projectId: {},
|
|
702
|
+
folders: {},
|
|
703
|
+
groups: {},
|
|
704
|
+
on: { type: Boolean, default: void 0 },
|
|
705
|
+
canSelectAllGroups: { type: Boolean },
|
|
706
|
+
canAddGroup: {},
|
|
707
|
+
autoselect: { default: "first" },
|
|
708
|
+
addChanger: { type: Boolean, default: !0 },
|
|
709
|
+
showFolders: { type: Boolean, default: !0 },
|
|
710
|
+
showGroups: { type: Boolean, default: !0 },
|
|
711
|
+
addIcon: { type: Boolean, default: !0 },
|
|
712
|
+
client: {}
|
|
713
|
+
}, {
|
|
714
|
+
folderId: { required: !0 },
|
|
715
|
+
folderIdModifiers: {},
|
|
716
|
+
folder: {},
|
|
717
|
+
folderModifiers: {},
|
|
718
|
+
groupId: { required: !0 },
|
|
719
|
+
groupIdModifiers: {},
|
|
720
|
+
group: { default: ne },
|
|
721
|
+
groupModifiers: {}
|
|
722
|
+
}),
|
|
723
|
+
emits: /* @__PURE__ */ V(["update:groups"], ["update:folderId", "update:folder", "update:groupId", "update:group"]),
|
|
724
|
+
setup(e, { emit: a }) {
|
|
725
|
+
const o = e, t = T(e, "folderId"), r = T(e, "folder"), l = T(e, "groupId"), n = T(e, "group"), u = a, f = pe(o.folders ?? { root: [j] }, o.canSelectAllGroups);
|
|
726
|
+
r.value = f.get(t.value);
|
|
727
|
+
let c = o.groups?.find((i) => i.id === l.value);
|
|
728
|
+
l.value || (c = o.groups?.[0]), o.canSelectAllGroups && !c && (c = W()), o.canSelectAllGroups && !c && (c = W()), (o.autoselect === "placeholder" || !c) && (c = Le()), c ??= ne, n.value = c;
|
|
729
|
+
const x = (i) => {
|
|
730
|
+
let m;
|
|
731
|
+
o.groups && i && (m = [...o.groups, i]), u("update:groups", m);
|
|
732
|
+
};
|
|
733
|
+
return (i, m) => (h(), A("div", xt, [
|
|
734
|
+
e.showFolders ? (h(), C(mt, {
|
|
735
|
+
key: 0,
|
|
736
|
+
folderId: t.value,
|
|
737
|
+
"onUpdate:folderId": m[0] || (m[0] = (d) => t.value = d),
|
|
738
|
+
folder: r.value,
|
|
739
|
+
"onUpdate:folder": m[1] || (m[1] = (d) => r.value = d),
|
|
740
|
+
projectId: e.projectId,
|
|
741
|
+
folders: e.folders,
|
|
742
|
+
canSelectAll: e.canSelectAllGroups,
|
|
743
|
+
addChanger: e.addChanger,
|
|
744
|
+
addIcon: e.addIcon,
|
|
745
|
+
client: e.client
|
|
746
|
+
}, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client"])) : O("", !0),
|
|
747
|
+
e.showGroups ? (h(), C(St, {
|
|
748
|
+
key: 1,
|
|
749
|
+
groupId: l.value,
|
|
750
|
+
"onUpdate:groupId": m[2] || (m[2] = (d) => l.value = d),
|
|
751
|
+
group: n.value,
|
|
752
|
+
"onUpdate:group": m[3] || (m[3] = (d) => n.value = d),
|
|
753
|
+
projectId: e.projectId,
|
|
754
|
+
folder: r.value,
|
|
755
|
+
groups: e.groups,
|
|
756
|
+
on: e.on,
|
|
757
|
+
canAdd: e.canAddGroup,
|
|
758
|
+
canSelectAll: e.canSelectAllGroups,
|
|
759
|
+
autoselect: e.autoselect,
|
|
760
|
+
addChanger: e.addChanger,
|
|
761
|
+
addIcon: e.addIcon,
|
|
762
|
+
client: e.client,
|
|
763
|
+
onAddGroup: x
|
|
764
|
+
}, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "addIcon", "client"])) : O("", !0)
|
|
765
|
+
]));
|
|
766
|
+
}
|
|
767
|
+
}), Be = (e) => "-" + e, H = (e) => e[0] === "-" ? e.substring(1) : e, ie = (e, a) => {
|
|
768
|
+
e = H(e);
|
|
769
|
+
const o = a.find((t) => t.id === e);
|
|
770
|
+
if (o)
|
|
771
|
+
return o;
|
|
772
|
+
}, qt = (e, a, o) => {
|
|
773
|
+
a || (a = { id: e.id }), a.id = e.id, a.pos ??= "3", a.notch ??= !0, a.posBy ??= "fixed";
|
|
774
|
+
const t = Xe.genElPopupOpener("div", a);
|
|
775
|
+
return t.classList.add("top-tagSelector"), e.useTopButton && t.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || t.classList.add("top-tagSelector-custom"), e.mode === "filter" && t.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && t.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && t.classList.add("top-tagSelector-setter_several"), t.onclick = (r) => {
|
|
776
|
+
r.preventDefault(), r.stopPropagation(), t.onclick = null;
|
|
777
|
+
const l = K(e.modelValue), n = {
|
|
778
|
+
model: l,
|
|
779
|
+
mode: e.mode,
|
|
780
|
+
targetId: e.targetId,
|
|
781
|
+
filters: e.filters,
|
|
782
|
+
payload: e.payload
|
|
505
783
|
};
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
}),
|
|
509
|
-
},
|
|
510
|
-
|
|
511
|
-
const
|
|
512
|
-
|
|
513
|
-
}),
|
|
514
|
-
},
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
if (t.classList.toggle("top-tagSelector-selectedOne", !e.length || e.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", e.length > 5), l.mode === "setter" && l.filters) {
|
|
521
|
-
t.innerHTML = `<div>${n}</div>`;
|
|
784
|
+
J(t, "topTagSelectorTarget", n), delete t.dataset.topPopupDisabled, he(e.modelValue) || E(l, () => {
|
|
785
|
+
e.modelValue = l.value, te(t, e, o);
|
|
786
|
+
}), t.click();
|
|
787
|
+
}, he(e.modelValue) ? E(e.modelValue, () => te(t, e, o)) : J(t, "topTagSelectorRender", (r) => {
|
|
788
|
+
e.modelValue = r;
|
|
789
|
+
const l = J(t, "topTagSelectorTarget");
|
|
790
|
+
l && (l.model.value = r), te(t, e, o);
|
|
791
|
+
}), te(t, e, o), t;
|
|
792
|
+
}, Ft = (e, a) => {
|
|
793
|
+
J(e, "topTagSelectorRender")?.(a);
|
|
794
|
+
}, te = (e, a, o) => {
|
|
795
|
+
const t = v(a.modelValue);
|
|
796
|
+
if (e.classList.toggle("top-tagSelector-selectedOne", !t.length || t.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", t.length > 5), a.mode === "setter" && a.filters) {
|
|
797
|
+
e.innerHTML = `<div>${o}</div>`;
|
|
522
798
|
return;
|
|
523
799
|
}
|
|
524
|
-
if (
|
|
525
|
-
const
|
|
800
|
+
if (e.innerHTML = "", !t.length && a.mode === "filter") {
|
|
801
|
+
const r = Te({
|
|
526
802
|
id: "all",
|
|
527
803
|
colorId: "",
|
|
528
|
-
name: (
|
|
804
|
+
name: M().Common?.All_tags ?? "",
|
|
529
805
|
state: ""
|
|
530
806
|
});
|
|
531
|
-
|
|
807
|
+
e.append(r);
|
|
532
808
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
state: Q(a) === a ? "selected" : "excluded"
|
|
809
|
+
t.forEach((r) => {
|
|
810
|
+
const l = Te({
|
|
811
|
+
id: H(r),
|
|
812
|
+
colorId: ie(r, a.tags)?.color_id ?? "",
|
|
813
|
+
name: ie(r, a.tags)?.name ?? "",
|
|
814
|
+
state: H(r) === r ? "selected" : "excluded"
|
|
540
815
|
});
|
|
541
|
-
|
|
816
|
+
e.append(l);
|
|
542
817
|
});
|
|
543
|
-
},
|
|
544
|
-
const
|
|
545
|
-
return
|
|
546
|
-
},
|
|
818
|
+
}, Te = (e) => {
|
|
819
|
+
const a = document.createElement("div");
|
|
820
|
+
return a.classList.add("top-tagSelector_tagIcon"), a.classList.toggle("top-tagSelector-active", !!e.state), a.classList.toggle("top-tagSelector-excluded", e.state === "excluded"), a.dataset.tag_id = e.id, a.dataset.tag_color_id = e.colorId, a.title = e.name, a;
|
|
821
|
+
}, kt = [
|
|
547
822
|
{
|
|
548
823
|
id: "1",
|
|
549
824
|
name: "Without Tag",
|
|
@@ -594,7 +869,7 @@ const qe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
594
869
|
name: "Turquoise",
|
|
595
870
|
color_id: "10"
|
|
596
871
|
}
|
|
597
|
-
],
|
|
872
|
+
], Ct = ["data-tag_id", "data-tag_color_id", "title"], fe = /* @__PURE__ */ R({
|
|
598
873
|
__name: "tagIcon",
|
|
599
874
|
props: {
|
|
600
875
|
id: {},
|
|
@@ -602,21 +877,21 @@ const qe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
602
877
|
name: {},
|
|
603
878
|
state: {}
|
|
604
879
|
},
|
|
605
|
-
setup(
|
|
606
|
-
return (
|
|
880
|
+
setup(e) {
|
|
881
|
+
return (a, o) => (h(), A("div", {
|
|
607
882
|
class: X({
|
|
608
883
|
"top-tagSelector_tagIcon": !0,
|
|
609
|
-
"top-tagSelector-active": !!
|
|
610
|
-
"top-tagSelector-excluded":
|
|
884
|
+
"top-tagSelector-active": !!e.state,
|
|
885
|
+
"top-tagSelector-excluded": e.state === "excluded"
|
|
611
886
|
}),
|
|
612
|
-
"data-tag_id":
|
|
613
|
-
"data-tag_color_id":
|
|
614
|
-
title:
|
|
615
|
-
}, null, 10,
|
|
887
|
+
"data-tag_id": e.id,
|
|
888
|
+
"data-tag_color_id": e.colorId,
|
|
889
|
+
title: e.name
|
|
890
|
+
}, null, 10, Ct));
|
|
616
891
|
}
|
|
617
|
-
}),
|
|
892
|
+
}), Bt = ["contenteditable", "onKeydown"], Ae = /* @__PURE__ */ R({
|
|
618
893
|
__name: "tagPopupListItem",
|
|
619
|
-
props: /* @__PURE__ */
|
|
894
|
+
props: /* @__PURE__ */ V({
|
|
620
895
|
editable: { type: Boolean },
|
|
621
896
|
disabled: { type: Boolean },
|
|
622
897
|
canExclude: { type: Boolean },
|
|
@@ -630,76 +905,74 @@ const qe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
630
905
|
},
|
|
631
906
|
nameModifiers: {}
|
|
632
907
|
}),
|
|
633
|
-
emits: /* @__PURE__ */
|
|
634
|
-
setup(
|
|
635
|
-
const
|
|
908
|
+
emits: /* @__PURE__ */ V(["update:name", "unselect", "exclude", "select"], ["update:name"]),
|
|
909
|
+
setup(e, { emit: a }) {
|
|
910
|
+
const o = e, t = a, r = T(e, "name"), l = K(null), n = w(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
636
911
|
contenteditable: u.value,
|
|
637
|
-
onpaste: (
|
|
638
|
-
} : {}), u =
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
},
|
|
647
|
-
|
|
648
|
-
}, r = (g) => {
|
|
649
|
-
if (u.value || n.disabled) return;
|
|
912
|
+
onpaste: (m) => m.preventDefault()
|
|
913
|
+
} : {}), u = K(!1), f = async () => {
|
|
914
|
+
u.value = !0, await Re(), l.value?.focus();
|
|
915
|
+
}, c = () => {
|
|
916
|
+
const m = l.value?.innerText;
|
|
917
|
+
if (!m) return x();
|
|
918
|
+
l.value && (l.value.innerText = m), u.value = !1, t("update:name", m);
|
|
919
|
+
}, x = async () => {
|
|
920
|
+
l.value && (l.value.innerText = o.name), u.value = !1;
|
|
921
|
+
}, i = (m) => {
|
|
922
|
+
if (u.value || o.disabled) return;
|
|
650
923
|
let d = "selected";
|
|
651
|
-
|
|
924
|
+
o.canExclude && (m.ctrlKey || m.metaKey) && (d = "excluded"), o.state == d && (d = ""), d === "" && t("unselect"), d === "selected" && t("select"), d === "excluded" && t("exclude");
|
|
652
925
|
};
|
|
653
|
-
return (
|
|
926
|
+
return (m, d) => (h(), C(ve, {
|
|
654
927
|
class: X({
|
|
655
928
|
"top-tagSelector_tagListItem": !0,
|
|
656
929
|
"top-tagSelector_tagListItem-inEdit": u.value,
|
|
657
|
-
"top-tagSelector_tagListItem-disabled":
|
|
658
|
-
"top-tagSelector_tagListItem-canExclude":
|
|
659
|
-
"top-tagSelector-active": !!
|
|
660
|
-
"top-tagSelector-excluded":
|
|
930
|
+
"top-tagSelector_tagListItem-disabled": e.disabled,
|
|
931
|
+
"top-tagSelector_tagListItem-canExclude": e.canExclude,
|
|
932
|
+
"top-tagSelector-active": !!e.state,
|
|
933
|
+
"top-tagSelector-excluded": e.state === "excluded"
|
|
661
934
|
}),
|
|
662
|
-
onClick:
|
|
935
|
+
onClick: U(i, ["stop"])
|
|
663
936
|
}, {
|
|
664
937
|
default: B(() => [
|
|
665
|
-
|
|
666
|
-
id:
|
|
667
|
-
name:
|
|
668
|
-
colorId:
|
|
669
|
-
state:
|
|
938
|
+
N(fe, {
|
|
939
|
+
id: e.id,
|
|
940
|
+
name: r.value,
|
|
941
|
+
colorId: e.colorId,
|
|
942
|
+
state: e.state
|
|
670
943
|
}, null, 8, ["id", "name", "colorId", "state"]),
|
|
671
|
-
|
|
944
|
+
oe("span", Ve({
|
|
672
945
|
ref_key: "elName",
|
|
673
|
-
ref:
|
|
946
|
+
ref: l,
|
|
674
947
|
class: "top-tagSelector_tagListItemName",
|
|
675
948
|
contenteditable: u.value ? "plaintext-only" : !1
|
|
676
|
-
},
|
|
949
|
+
}, n.value, {
|
|
677
950
|
onKeydown: [
|
|
678
|
-
|
|
679
|
-
|
|
951
|
+
Ie(U(c, ["stop"]), ["enter"]),
|
|
952
|
+
Ie(U(x, ["stop"]), ["esc"])
|
|
680
953
|
]
|
|
681
|
-
}),
|
|
682
|
-
|
|
683
|
-
u.value ? (
|
|
954
|
+
}), b(r.value), 17, Bt),
|
|
955
|
+
e.editable ? (h(), A(Y, { key: 0 }, [
|
|
956
|
+
u.value ? (h(), A("span", {
|
|
684
957
|
key: 1,
|
|
685
958
|
"data-top-icon": "",
|
|
686
959
|
class: "top-tagSelector_edit",
|
|
687
|
-
onClick:
|
|
688
|
-
})) : (
|
|
960
|
+
onClick: U(c, ["stop"])
|
|
961
|
+
})) : (h(), A("span", {
|
|
689
962
|
key: 0,
|
|
690
963
|
"data-top-icon": "",
|
|
691
964
|
class: "top-tagSelector_edit",
|
|
692
965
|
onClick: f
|
|
693
966
|
}))
|
|
694
|
-
], 64)) :
|
|
967
|
+
], 64)) : O("", !0)
|
|
695
968
|
]),
|
|
696
969
|
_: 1
|
|
697
970
|
}, 8, ["class"]));
|
|
698
971
|
}
|
|
699
|
-
}),
|
|
972
|
+
}), Tt = { key: 1 }, At = /* @__PURE__ */ R({
|
|
700
973
|
inheritAttrs: !1,
|
|
701
974
|
__name: "popupOpener",
|
|
702
|
-
props: /* @__PURE__ */
|
|
975
|
+
props: /* @__PURE__ */ V({
|
|
703
976
|
modelValue: {},
|
|
704
977
|
id: {},
|
|
705
978
|
tags: {},
|
|
@@ -716,65 +989,62 @@ const qe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
716
989
|
modelModifiers: {}
|
|
717
990
|
}),
|
|
718
991
|
emits: ["update:modelValue"],
|
|
719
|
-
setup(
|
|
720
|
-
const
|
|
721
|
-
model:
|
|
722
|
-
mode:
|
|
723
|
-
targetId:
|
|
724
|
-
filters:
|
|
725
|
-
payload:
|
|
992
|
+
setup(e) {
|
|
993
|
+
const a = e, o = T(e, "modelValue"), t = a.useTopButton ? Q : "div", r = a.useTopButton ? "html" : "default", l = {
|
|
994
|
+
model: o,
|
|
995
|
+
mode: a.mode,
|
|
996
|
+
targetId: a.targetId,
|
|
997
|
+
filters: a.filters,
|
|
998
|
+
payload: a.payload
|
|
726
999
|
};
|
|
727
|
-
return (
|
|
728
|
-
const f =
|
|
729
|
-
return
|
|
1000
|
+
return (n, u) => {
|
|
1001
|
+
const f = Ne("top-data");
|
|
1002
|
+
return h(), C(ze, { id: e.id }, {
|
|
730
1003
|
default: B(() => [
|
|
731
|
-
|
|
1004
|
+
Pe((h(), C(De(v(t)), Ve({
|
|
732
1005
|
class: {
|
|
733
1006
|
"top-tagSelector": !0,
|
|
734
|
-
"top-tagSelector-useTopButton":
|
|
735
|
-
"top-tagSelector-custom": !
|
|
736
|
-
"top-as-selector":
|
|
737
|
-
"top-tagSelector-filter":
|
|
738
|
-
"top-tagSelector-setter_single":
|
|
739
|
-
"top-tagSelector-setter_several":
|
|
740
|
-
"top-tagSelector-selectedOne": !
|
|
741
|
-
"top-tagSelector-toTwoLine":
|
|
1007
|
+
"top-tagSelector-useTopButton": a.useTopButton,
|
|
1008
|
+
"top-tagSelector-custom": !a.useTopButton,
|
|
1009
|
+
"top-as-selector": a.useTopButton,
|
|
1010
|
+
"top-tagSelector-filter": a.mode === "filter",
|
|
1011
|
+
"top-tagSelector-setter_single": a.mode === "setter" && !e.filters,
|
|
1012
|
+
"top-tagSelector-setter_several": a.mode === "setter" && e.filters,
|
|
1013
|
+
"top-tagSelector-selectedOne": !o.value.length || o.value.length === 1,
|
|
1014
|
+
"top-tagSelector-toTwoLine": o.value.length > 5
|
|
742
1015
|
},
|
|
743
1016
|
color: "theme",
|
|
744
|
-
styling:
|
|
745
|
-
},
|
|
746
|
-
[
|
|
747
|
-
!
|
|
1017
|
+
styling: e.styling
|
|
1018
|
+
}, n.$attrs), {
|
|
1019
|
+
[v(r)]: B(() => [
|
|
1020
|
+
!o.value.length && e.mode === "filter" ? (h(), C(fe, {
|
|
748
1021
|
key: 0,
|
|
749
1022
|
id: "all",
|
|
750
1023
|
colorId: "",
|
|
751
|
-
name:
|
|
1024
|
+
name: n.$i18n.Common.All_tags ?? "",
|
|
752
1025
|
state: ""
|
|
753
|
-
}, null, 8, ["name"])) :
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
])) : (
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
state: y(Q)(h) === h ? "selected" : "excluded"
|
|
763
|
-
}, null, 8, ["id", "colorId", "name", "state"]);
|
|
764
|
-
}), 256))
|
|
1026
|
+
}, null, 8, ["name"])) : O("", !0),
|
|
1027
|
+
e.mode === "setter" && e.filters ? (h(), A("div", Tt, [
|
|
1028
|
+
qe(n.$slots, "default")
|
|
1029
|
+
])) : (h(!0), A(Y, { key: 2 }, me(o.value, (c) => (h(), C(fe, {
|
|
1030
|
+
id: v(H)(c),
|
|
1031
|
+
colorId: v(ie)(c, e.tags)?.color_id ?? "",
|
|
1032
|
+
name: v(ie)(c, e.tags)?.name ?? "",
|
|
1033
|
+
state: v(H)(c) === c ? "selected" : "excluded"
|
|
1034
|
+
}, null, 8, ["id", "colorId", "name", "state"]))), 256))
|
|
765
1035
|
]),
|
|
766
1036
|
_: 2
|
|
767
1037
|
}, 1040, ["class", "styling"])), [
|
|
768
|
-
[f,
|
|
1038
|
+
[f, l, "topTagSelectorTarget"]
|
|
769
1039
|
])
|
|
770
1040
|
]),
|
|
771
1041
|
_: 3
|
|
772
1042
|
}, 8, ["id"]);
|
|
773
1043
|
};
|
|
774
1044
|
}
|
|
775
|
-
}),
|
|
1045
|
+
}), Ut = /* @__PURE__ */ R({
|
|
776
1046
|
__name: "tagSelector",
|
|
777
|
-
props: /* @__PURE__ */
|
|
1047
|
+
props: /* @__PURE__ */ V({
|
|
778
1048
|
modelValue: {},
|
|
779
1049
|
tags: {},
|
|
780
1050
|
tagsEditable: { type: Boolean },
|
|
@@ -792,180 +1062,177 @@ const qe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
792
1062
|
},
|
|
793
1063
|
modelModifiers: {},
|
|
794
1064
|
tags: {
|
|
795
|
-
default:
|
|
1065
|
+
default: be(kt)
|
|
796
1066
|
},
|
|
797
1067
|
tagsModifiers: {}
|
|
798
1068
|
}),
|
|
799
|
-
emits: /* @__PURE__ */
|
|
800
|
-
setup(
|
|
801
|
-
const
|
|
802
|
-
|
|
803
|
-
},
|
|
804
|
-
|
|
805
|
-
const f =
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
return c.set("add", { value: "add", title: n.Common.Add + s }), c.set("replace", { value: "replace", title: n.Common.Replace + s }), c.set("delete", { value: "delete", title: n.Common.Delete + s }), c;
|
|
1069
|
+
emits: /* @__PURE__ */ V(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
|
|
1070
|
+
setup(e, { emit: a }) {
|
|
1071
|
+
const o = M(), t = e, r = T(e, "modelValue"), l = T(e, "tags"), n = a, u = _e((p, I) => {
|
|
1072
|
+
n(p, I);
|
|
1073
|
+
}, t.emitDelay);
|
|
1074
|
+
t.singleMode && !r.value.length && (r.value = [l.value[0].id]);
|
|
1075
|
+
const f = t.id ?? "top-popup-id-" + Math.random(), c = K("add"), x = () => {
|
|
1076
|
+
const p = " " + o.Common.Tags?.toLowerCase(), I = /* @__PURE__ */ new Map();
|
|
1077
|
+
return I.set("add", { value: "add", title: o.Common.Add + p }), I.set("replace", { value: "replace", title: o.Common.Replace + p }), I.set("delete", { value: "delete", title: o.Common.Delete + p }), I;
|
|
809
1078
|
};
|
|
810
|
-
let
|
|
811
|
-
model:
|
|
1079
|
+
let i = Fe({
|
|
1080
|
+
model: r,
|
|
812
1081
|
mode: "filter",
|
|
813
1082
|
targetId: void 0,
|
|
814
1083
|
filters: void 0,
|
|
815
1084
|
payload: void 0
|
|
816
1085
|
});
|
|
817
|
-
|
|
818
|
-
u("selector",
|
|
1086
|
+
E(r, () => {
|
|
1087
|
+
u("selector", r.value);
|
|
819
1088
|
});
|
|
820
|
-
const
|
|
821
|
-
if (
|
|
822
|
-
return
|
|
823
|
-
}), d = (
|
|
824
|
-
if (
|
|
825
|
-
if (
|
|
826
|
-
if (
|
|
1089
|
+
const m = w(() => {
|
|
1090
|
+
if (i.value.mode === "setter" && t.maxTagsForSetter && !i.value.filters)
|
|
1091
|
+
return i.value.model.value.length >= t.maxTagsForSetter;
|
|
1092
|
+
}), d = (p) => {
|
|
1093
|
+
if (p !== "all") {
|
|
1094
|
+
if (i.value.model.value.includes(p)) return "selected";
|
|
1095
|
+
if (i.value.model.value.includes(Be(p))) return "excluded";
|
|
827
1096
|
}
|
|
828
|
-
return
|
|
829
|
-
},
|
|
830
|
-
const
|
|
831
|
-
let
|
|
832
|
-
|
|
833
|
-
if (!
|
|
834
|
-
const
|
|
835
|
-
return
|
|
836
|
-
}),
|
|
837
|
-
tagsIds:
|
|
838
|
-
targetId:
|
|
839
|
-
payload:
|
|
1097
|
+
return p === "all" && !i.value.model.value.length ? "selected" : "";
|
|
1098
|
+
}, s = (p, I) => {
|
|
1099
|
+
const S = Be(p);
|
|
1100
|
+
let k = i.value.model.value.filter((G) => G !== p && G !== S);
|
|
1101
|
+
I === "select" && k.push(p), I === "exclude" && k.push(S), i.value.mode === "setter" && i.value.targetId !== void 0 && t.requiredForSetter && (k.length || k.push("1"), k.length === 2 && i.value.model.value.length === 1 && i.value.model.value[0] === "1" && (k = k.filter((G) => G !== "1"))), t.singleMode && !i.value.filters && (k.length || (k = i.value.model.value), k.length > 1 && (k = [k[k.length - 1]])), k.sort((G, ee) => {
|
|
1102
|
+
if (!t.tags) return 0;
|
|
1103
|
+
const D = t.tags.findIndex((F) => F.id === G), q = t.tags.findIndex((F) => F.id === ee);
|
|
1104
|
+
return D - q;
|
|
1105
|
+
}), i.value.model.value = k, i.value.mode === "setter" && i.value.targetId !== void 0 && u("setter", {
|
|
1106
|
+
tagsIds: k,
|
|
1107
|
+
targetId: i.value.targetId,
|
|
1108
|
+
payload: i.value.payload
|
|
840
1109
|
});
|
|
841
|
-
},
|
|
842
|
-
let
|
|
843
|
-
return
|
|
844
|
-
}),
|
|
845
|
-
const
|
|
846
|
-
if (!
|
|
847
|
-
const
|
|
848
|
-
|
|
849
|
-
id: String(
|
|
850
|
-
name:
|
|
851
|
-
color_id: String((
|
|
852
|
-
}),
|
|
853
|
-
},
|
|
854
|
-
|
|
855
|
-
if (
|
|
856
|
-
if (r.value.filters && (h.value = "add", r.value.model.value = []), !((c = j.$) != null && c.ui.sortable)) {
|
|
1110
|
+
}, g = w(() => {
|
|
1111
|
+
let p = "top-tagSelector_popup";
|
|
1112
|
+
return i.value.mode === "filter" && (p += " top-tagSelector_popup-filter"), i.value.mode === "setter" && (p += " top-tagSelector_popup-setter"), p;
|
|
1113
|
+
}), Z = () => {
|
|
1114
|
+
const p = prompt("", "New tag");
|
|
1115
|
+
if (!p || p === "New tag") return;
|
|
1116
|
+
const I = l.value.length + 1;
|
|
1117
|
+
l.value.push({
|
|
1118
|
+
id: String(I),
|
|
1119
|
+
name: p,
|
|
1120
|
+
color_id: String((I - 1) % 10 + 1)
|
|
1121
|
+
}), n("tagsChanged", l.value);
|
|
1122
|
+
}, P = (p) => {
|
|
1123
|
+
if (i.value = J(p.elPopupOpener, "topTagSelectorTarget"), !i.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1124
|
+
if (i.value.filters && (c.value = "add", i.value.model.value = []), !_.$?.ui.sortable) {
|
|
857
1125
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
858
1126
|
return;
|
|
859
1127
|
}
|
|
860
|
-
!
|
|
1128
|
+
!_.state.isMobile && !_.state.isMobileUA && l.value && $(p.elPopup).sortable({
|
|
861
1129
|
items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
|
|
862
1130
|
/**
|
|
863
1131
|
* @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
|
|
864
1132
|
*/
|
|
865
1133
|
cancel: '[contenteditable="plaintext-only"], [contenteditable="true"]',
|
|
866
1134
|
distance: 10,
|
|
867
|
-
stop: function(
|
|
868
|
-
if (!
|
|
869
|
-
const
|
|
870
|
-
|
|
871
|
-
if (!
|
|
872
|
-
const
|
|
873
|
-
|
|
874
|
-
}),
|
|
875
|
-
const
|
|
876
|
-
return
|
|
877
|
-
}), u("tagsChanged",
|
|
1135
|
+
stop: function(I, S) {
|
|
1136
|
+
if (!l.value) return;
|
|
1137
|
+
const k = $(S.item).parent().find("[data-tag_id]"), G = [];
|
|
1138
|
+
k.each((ee, D) => {
|
|
1139
|
+
if (!l.value) return;
|
|
1140
|
+
const q = $(D).attr("data-tag_id");
|
|
1141
|
+
G.push(q);
|
|
1142
|
+
}), l.value.sort((ee, D) => {
|
|
1143
|
+
const q = G.findIndex((de) => de === ee.id), F = G.findIndex((de) => de === D.id);
|
|
1144
|
+
return q - F;
|
|
1145
|
+
}), u("tagsChanged", l.value);
|
|
878
1146
|
}
|
|
879
1147
|
});
|
|
880
|
-
},
|
|
881
|
-
|
|
882
|
-
(c = j.$) != null && c.ui.sortable && $(s.elPopup).data("ui-sortable") && $(s.elPopup).sortable("destroy");
|
|
1148
|
+
}, je = (p) => {
|
|
1149
|
+
_.$?.ui.sortable && $(p.elPopup).data("ui-sortable") && $(p.elPopup).sortable("destroy");
|
|
883
1150
|
};
|
|
884
|
-
return (
|
|
885
|
-
|
|
886
|
-
modelValue:
|
|
887
|
-
"onUpdate:modelValue":
|
|
888
|
-
id:
|
|
889
|
-
tags:
|
|
890
|
-
styling:
|
|
1151
|
+
return (p, I) => (h(), A(Y, null, [
|
|
1152
|
+
N(At, {
|
|
1153
|
+
modelValue: r.value,
|
|
1154
|
+
"onUpdate:modelValue": I[0] || (I[0] = (S) => r.value = S),
|
|
1155
|
+
id: v(f),
|
|
1156
|
+
tags: l.value,
|
|
1157
|
+
styling: e.styling,
|
|
891
1158
|
mode: "filter",
|
|
892
|
-
useTopButton:
|
|
1159
|
+
useTopButton: e.useTopButton
|
|
893
1160
|
}, null, 8, ["modelValue", "id", "tags", "styling", "useTopButton"]),
|
|
894
|
-
|
|
895
|
-
id:
|
|
896
|
-
class: X(
|
|
897
|
-
onOpen:
|
|
898
|
-
onClose:
|
|
1161
|
+
N(Me, {
|
|
1162
|
+
id: v(f),
|
|
1163
|
+
class: X(g.value),
|
|
1164
|
+
onOpen: I[4] || (I[4] = (S) => P(S)),
|
|
1165
|
+
onClose: I[5] || (I[5] = (S) => je(S)),
|
|
899
1166
|
"transition-duration": 50
|
|
900
|
-
},
|
|
1167
|
+
}, Ue({
|
|
901
1168
|
contentList: B(() => [
|
|
902
|
-
|
|
1169
|
+
v(i).mode === "filter" && !e.singleMode ? (h(), C(Ae, {
|
|
903
1170
|
key: 0,
|
|
904
1171
|
id: "all",
|
|
905
1172
|
colorId: "",
|
|
906
|
-
name:
|
|
907
|
-
state:
|
|
908
|
-
onSelect:
|
|
909
|
-
}, null, 8, ["name", "state"])) :
|
|
910
|
-
(
|
|
911
|
-
key:
|
|
912
|
-
id:
|
|
913
|
-
colorId:
|
|
914
|
-
name:
|
|
915
|
-
state: d(
|
|
916
|
-
canExclude:
|
|
917
|
-
editable:
|
|
918
|
-
disabled:
|
|
919
|
-
onUnselect: (
|
|
920
|
-
onSelect: (
|
|
921
|
-
onExclude: (
|
|
922
|
-
"onUpdate:name": (
|
|
923
|
-
|
|
1173
|
+
name: p.$i18n.Common.All_tags ?? "",
|
|
1174
|
+
state: v(i).model.value.length ? "" : "selected",
|
|
1175
|
+
onSelect: I[3] || (I[3] = (S) => v(i).model.value = [])
|
|
1176
|
+
}, null, 8, ["name", "state"])) : O("", !0),
|
|
1177
|
+
(h(!0), A(Y, null, me(l.value, (S) => (h(), C(Ae, {
|
|
1178
|
+
key: S.id,
|
|
1179
|
+
id: S.id,
|
|
1180
|
+
colorId: S.color_id,
|
|
1181
|
+
name: S.name,
|
|
1182
|
+
state: d(S.id),
|
|
1183
|
+
canExclude: v(i).mode === "filter" && !e.singleMode,
|
|
1184
|
+
editable: e.tagsEditable,
|
|
1185
|
+
disabled: m.value && d(S.id) === "",
|
|
1186
|
+
onUnselect: (k) => s(S.id, "unselect"),
|
|
1187
|
+
onSelect: (k) => s(S.id, "select"),
|
|
1188
|
+
onExclude: (k) => s(S.id, "exclude"),
|
|
1189
|
+
"onUpdate:name": (k) => {
|
|
1190
|
+
S.name = k, v(u)("tagsChanged", l.value);
|
|
924
1191
|
}
|
|
925
1192
|
}, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
|
|
926
|
-
|
|
1193
|
+
e.tagsEditable && l.value.length < e.tagsMax && l.value.length < 20 ? (h(), C(ve, {
|
|
927
1194
|
key: 1,
|
|
928
1195
|
"data-top-icon": "",
|
|
929
|
-
onClick:
|
|
1196
|
+
onClick: U(Z, ["stop"])
|
|
930
1197
|
}, {
|
|
931
1198
|
default: B(() => [
|
|
932
|
-
|
|
1199
|
+
z(b(p.$i18n.Common.Add), 1)
|
|
933
1200
|
]),
|
|
934
1201
|
_: 1
|
|
935
|
-
})) :
|
|
1202
|
+
})) : O("", !0)
|
|
936
1203
|
]),
|
|
937
1204
|
_: 2
|
|
938
1205
|
}, [
|
|
939
|
-
|
|
1206
|
+
v(i).mode === "setter" && v(i).filters ? {
|
|
940
1207
|
name: "header",
|
|
941
1208
|
fn: B(() => [
|
|
942
|
-
|
|
943
|
-
modelValue:
|
|
944
|
-
"onUpdate:modelValue":
|
|
945
|
-
options:
|
|
1209
|
+
N(ce, {
|
|
1210
|
+
modelValue: c.value,
|
|
1211
|
+
"onUpdate:modelValue": I[1] || (I[1] = (S) => c.value = S),
|
|
1212
|
+
options: x()
|
|
946
1213
|
}, null, 8, ["modelValue", "options"])
|
|
947
1214
|
]),
|
|
948
1215
|
key: "0"
|
|
949
1216
|
} : void 0,
|
|
950
|
-
|
|
1217
|
+
v(i).mode === "setter" && v(i).filters ? {
|
|
951
1218
|
name: "footer",
|
|
952
1219
|
fn: B(() => [
|
|
953
|
-
|
|
1220
|
+
N(Q, { color: "theme" }, {
|
|
954
1221
|
default: B(() => [
|
|
955
|
-
|
|
1222
|
+
z(b(p.$i18n.Common.Cancel), 1)
|
|
956
1223
|
]),
|
|
957
1224
|
_: 1
|
|
958
1225
|
}),
|
|
959
|
-
|
|
960
|
-
onClick:
|
|
961
|
-
tagsIds:
|
|
962
|
-
filters:
|
|
963
|
-
filtersAction:
|
|
964
|
-
payload:
|
|
1226
|
+
N(Q, {
|
|
1227
|
+
onClick: I[2] || (I[2] = (S) => v(u)("setter", {
|
|
1228
|
+
tagsIds: v(i).model.value,
|
|
1229
|
+
filters: v(i).filters,
|
|
1230
|
+
filtersAction: c.value,
|
|
1231
|
+
payload: v(i).payload
|
|
965
1232
|
}))
|
|
966
1233
|
}, {
|
|
967
1234
|
default: B(() => [
|
|
968
|
-
|
|
1235
|
+
z(b(c.value === "add" ? p.$i18n.Common.Add : "") + " " + b(c.value === "replace" ? p.$i18n.Common.Replace : "") + " " + b(c.value === "delete" ? p.$i18n.Common.Delete : ""), 1)
|
|
969
1236
|
]),
|
|
970
1237
|
_: 1
|
|
971
1238
|
})
|
|
@@ -977,16 +1244,17 @@ const qe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
977
1244
|
}
|
|
978
1245
|
});
|
|
979
1246
|
export {
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
1247
|
+
Rt as TopCompetitorSelector,
|
|
1248
|
+
Dt as TopGroupSelector,
|
|
1249
|
+
Pt as TopRegionSelector,
|
|
1250
|
+
Ut as TopTagSelector,
|
|
1251
|
+
At as TopTagSelectorPopupOpener,
|
|
1252
|
+
fe as TopTagSelectorTagIcon,
|
|
1253
|
+
it as dialogRegionSelector,
|
|
1254
|
+
rt as findRegion,
|
|
1255
|
+
qt as genElTopTagSelectorPopupOpener,
|
|
1256
|
+
Ke as genSearcherByKey,
|
|
1257
|
+
Ft as renderElTopTagSelectorPopupOpener,
|
|
1258
|
+
Nt as useItemsFromCompetitors
|
|
991
1259
|
};
|
|
992
1260
|
//# sourceMappingURL=project.js.map
|