@topvisor/ui 1.4.0-TopGroupSelector.9 → 1.4.1-projectSelector.0
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-BgoBbm_5.es.js +242 -0
- package/.chunks/core-BgoBbm_5.es.js.map +1 -0
- package/.chunks/core-D1KnwO7l.amd.js +2 -0
- package/.chunks/core-D1KnwO7l.amd.js.map +1 -0
- package/.chunks/{datepicker-D1Hw3a3o.es.js → datepicker-BPTUHd97.es.js} +2 -2
- package/.chunks/datepicker-BPTUHd97.es.js.map +1 -0
- package/.chunks/{datepicker-3coUsFW2.amd.js → datepicker-O_SK-Dz4.amd.js} +2 -2
- package/.chunks/datepicker-O_SK-Dz4.amd.js.map +1 -0
- package/.chunks/{dialog_regionSelectorRegions-CZ8IX7la.amd.js → dialog_regionSelectorRegions-Ba-Eypgv.amd.js} +2 -2
- package/.chunks/dialog_regionSelectorRegions-Ba-Eypgv.amd.js.map +1 -0
- package/.chunks/{dialog_regionSelectorRegions-1UVhgK2f.es.js → dialog_regionSelectorRegions-DA38RsiW.es.js} +4 -4
- package/.chunks/dialog_regionSelectorRegions-DA38RsiW.es.js.map +1 -0
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js → dialogs.vue_vue_type_script_setup_true_lang-CWprVs8d.amd.js} +2 -2
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CWprVs8d.amd.js.map +1 -0
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js → dialogs.vue_vue_type_script_setup_true_lang-CzFMOjlE.es.js} +2 -2
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CzFMOjlE.es.js.map +1 -0
- package/.chunks/field-Cvv0SRcJ.amd.js.map +1 -1
- package/.chunks/field-CyyFzM-Y.es.js.map +1 -1
- package/.chunks/{forms-CUSCBQu3.amd.js → forms-4D_EVI46.amd.js} +3 -3
- package/.chunks/forms-4D_EVI46.amd.js.map +1 -0
- package/.chunks/{forms-BseC3Ftz.es.js → forms-xkXHvvah.es.js} +565 -551
- package/.chunks/forms-xkXHvvah.es.js.map +1 -0
- package/.chunks/index-DLUtoTUg.amd.js.map +1 -1
- package/.chunks/index-DkQWJkMc.es.js.map +1 -1
- package/.chunks/lazy-40pjr8cZ.es.js.map +1 -1
- package/.chunks/lazy-DSFLxvj4.amd.js.map +1 -1
- package/.chunks/{notice-DwjipV21.amd.js → notice-hF3z8ewG.amd.js} +2 -2
- package/.chunks/notice-hF3z8ewG.amd.js.map +1 -0
- package/.chunks/{notice-Cl3ZgiHm.es.js → notice-wqZxmsUH.es.js} +2 -2
- package/.chunks/notice-wqZxmsUH.es.js.map +1 -0
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js → page.vue_vue_type_script_setup_true_lang-rW3w9LMh.es.js} +4 -4
- package/.chunks/page.vue_vue_type_script_setup_true_lang-rW3w9LMh.es.js.map +1 -0
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js → page.vue_vue_type_script_setup_true_lang-tiWuQ_ZK.amd.js} +2 -2
- package/.chunks/page.vue_vue_type_script_setup_true_lang-tiWuQ_ZK.amd.js.map +1 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-C9A--uWd.es.js +503 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-C9A--uWd.es.js.map +1 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-DABqSSXw.amd.js +2 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-DABqSSXw.amd.js.map +1 -0
- package/.chunks/{popup-Jw_Yyg3U.es.js → popup-BeLPdHWv.es.js} +2 -2
- package/.chunks/popup-BeLPdHWv.es.js.map +1 -0
- package/.chunks/{popup-DRuyYFGB.amd.js → popup-Bwmu8rOb.amd.js} +2 -2
- package/.chunks/popup-Bwmu8rOb.amd.js.map +1 -0
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js → popupHint.vue_vue_type_style_index_0_lang-B0BWXhHK.amd.js} +2 -2
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-B0BWXhHK.amd.js.map +1 -0
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js → popupHint.vue_vue_type_style_index_0_lang-fnjq0yg1.es.js} +2 -2
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-fnjq0yg1.es.js.map +1 -0
- package/.chunks/store-CX_6ZXhO.es.js.map +1 -1
- package/.chunks/store-YRW59xEF.amd.js.map +1 -1
- package/.chunks/{utils-D9nYQabE.amd.js → utils-BRJvuqe_.amd.js} +2 -2
- package/.chunks/utils-BRJvuqe_.amd.js.map +1 -0
- package/.chunks/{utils-YrUExsH7.es.js → utils-ByqQkftW.es.js} +2 -2
- package/.chunks/utils-ByqQkftW.es.js.map +1 -0
- package/.chunks/{utils-Q69SXlnV.es.js → utils-YVlPlqDK.es.js} +3 -3
- package/.chunks/utils-YVlPlqDK.es.js.map +1 -0
- package/.chunks/{utils-CzHUG_xz.amd.js → utils-cAJahDml.amd.js} +2 -2
- package/.chunks/utils-cAJahDml.amd.js.map +1 -0
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js → widgetInput.vue_vue_type_script_setup_true_lang-D7lVLE3D.amd.js} +2 -2
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-D7lVLE3D.amd.js.map +1 -0
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js → widgetInput.vue_vue_type_script_setup_true_lang-UUovJzhL.es.js} +2 -2
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-UUovJzhL.es.js.map +1 -0
- package/README.md +82 -82
- package/api/additional.amd.js.map +1 -1
- package/api/additional.js.map +1 -1
- package/api/index.amd.js +1 -1
- package/api/index.amd.js.map +1 -1
- package/api/index.js +1 -1
- package/api/index.js.map +1 -1
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/policy.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 +1 -1
- 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 +5 -5
- 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 +2 -2
- package/dialog/dialog.js.map +1 -1
- package/extra/extra.amd.js.map +1 -1
- package/extra/extra.js.map +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +3 -3
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +123 -111
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/Read Me.txt +7 -7
- package/icomoon/Topvisor icons.json +6658 -0
- package/icomoon/demo-files/demo.css +158 -158
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.css +158 -158
- package/icomoon/demo.html +15 -1
- package/icomoon/demo.js +30 -30
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +1 -0
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +8 -5
- package/jquery-ui.min.css +5 -5
- package/layout/layout.amd.js +1 -1
- package/layout/layout.amd.js.map +1 -1
- package/layout/layout.js +1 -1
- package/layout/layout.js.map +1 -1
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +6 -6
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +2 -2
- 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 +892 -613
- package/project/project.js.map +1 -1
- package/require/css.amd.js +12 -12
- package/src/api/api/types/client/request-options.d.ts +8 -3
- package/src/components/forms/caption/types.d.ts +5 -1
- package/src/components/forms/input/input.vue.d.ts +2 -4
- package/src/components/forms/input/types.d.ts +15 -0
- package/src/components/forms/select/select.vue.d.ts +15 -2
- package/src/components/forms/select/types.d.ts +6 -0
- package/src/components/formsExt/editArea/editArea.vue.d.ts +15 -2
- package/src/components/formsExt/editArea/types.d.ts +6 -0
- package/src/components/formsExt/editInput/editInput.vue.d.ts +16 -1
- package/src/components/formsExt/selector2/composables/useAPI.d.ts +2 -0
- package/src/components/formsExt/selector2/composables/useMenu.d.ts +3 -1
- package/src/components/formsExt/selector2/types.d.ts +14 -0
- package/src/components/popup/popup/listItem.vue.d.ts +24 -4
- package/src/components/popup/popup/types.d.ts +1 -0
- package/src/components/project/groupSelector/groupSelector.vue.d.ts +5 -0
- package/src/components/project/groupSelector/groups/groups.vue.d.ts +2 -0
- package/src/components/project/groupSelector/groups/types.d.ts +4 -0
- package/src/components/project/groupSelector/groups/utils.d.ts +1 -1
- package/src/components/project/groupSelector/types.d.ts +4 -0
- package/src/components/project/project.d.ts +1 -0
- package/src/components/project/projectSelector/projectSelector.vue.d.ts +121 -0
- package/src/components/project/projectSelector/stories/mocks/projects.d.ts +10 -0
- package/src/components/project/projectSelector/submenu/submenu.vue.d.ts +4 -0
- package/src/components/project/projectSelector/submenu/types.d.ts +17 -0
- package/src/components/project/projectSelector/types.d.ts +57 -0
- package/src/components/project/projectSelector/utils.d.ts +206 -0
- package/src/core/directives/shortcut.d.ts +12 -0
- package/src/core/utils/string.d.ts +1 -1
- package/tabs/tabs.amd.js.map +1 -1
- 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 +2 -2
- package/tabsView/tabsView.js.map +1 -1
- package/utils/check.amd.js.map +1 -1
- package/utils/check.js.map +1 -1
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.amd.js.map +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/clipboard.js.map +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/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/utils/image.amd.js.map +1 -1
- package/utils/image.js.map +1 -1
- package/utils/keyboard.amd.js.map +1 -1
- package/utils/keyboard.js.map +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/number.amd.js.map +1 -1
- package/utils/number.js.map +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.amd.js.map +1 -1
- package/utils/price.js +1 -1
- package/utils/price.js.map +1 -1
- package/utils/route.amd.js.map +1 -1
- package/utils/route.js.map +1 -1
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.js.map +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.amd.js.map +1 -1
- package/utils/searchers.js +3 -3
- package/utils/searchers.js.map +1 -1
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +50 -50
- package/utils/string.js.map +1 -1
- package/utils/system.amd.js.map +1 -1
- package/utils/system.js.map +1 -1
- package/utils/url.amd.js.map +1 -1
- package/utils/url.js.map +1 -1
- package/web-types.json +31 -0
- package/.chunks/core-BL-38XF7.es.js +0 -196
- package/.chunks/core-BL-38XF7.es.js.map +0 -1
- package/.chunks/core-BsPx05H9.amd.js +0 -2
- package/.chunks/core-BsPx05H9.amd.js.map +0 -1
- package/.chunks/datepicker-3coUsFW2.amd.js.map +0 -1
- package/.chunks/datepicker-D1Hw3a3o.es.js.map +0 -1
- package/.chunks/dialog_regionSelectorRegions-1UVhgK2f.es.js.map +0 -1
- package/.chunks/dialog_regionSelectorRegions-CZ8IX7la.amd.js.map +0 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js.map +0 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js.map +0 -1
- package/.chunks/forms-BseC3Ftz.es.js.map +0 -1
- package/.chunks/forms-CUSCBQu3.amd.js.map +0 -1
- package/.chunks/notice-Cl3ZgiHm.es.js.map +0 -1
- package/.chunks/notice-DwjipV21.amd.js.map +0 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js.map +0 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js +0 -496
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js +0 -2
- package/.chunks/policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js.map +0 -1
- package/.chunks/popup-DRuyYFGB.amd.js.map +0 -1
- package/.chunks/popup-Jw_Yyg3U.es.js.map +0 -1
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js.map +0 -1
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js.map +0 -1
- package/.chunks/utils-CzHUG_xz.amd.js.map +0 -1
- package/.chunks/utils-D9nYQabE.amd.js.map +0 -1
- package/.chunks/utils-Q69SXlnV.es.js.map +0 -1
- package/.chunks/utils-YrUExsH7.es.js.map +0 -1
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js.map +0 -1
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js.map +0 -1
package/project/project.js
CHANGED
|
@@ -3,18 +3,19 @@
|
|
|
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 { a as
|
|
10
|
-
import { u as
|
|
11
|
-
import { getSearcherGIcon as
|
|
12
|
-
import "../.chunks/core-
|
|
13
|
-
import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { g as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
6
|
+
import { defineComponent as G, mergeModels as M, useModel as B, computed as w, createElementBlock as T, openBlock as v, createBlock as j, unref as p, withCtx as C, Fragment as q, renderList as se, normalizeClass as Z, createElementVNode as L, toDisplayString as A, createVNode as E, createTextVNode as N, toValue as ke, ref as V, watch as P, createCommentVNode as _, reactive as _e, resolveComponent as Ee, onMounted as Ue, withModifiers as D, isRef as Ce, mergeProps as Ge, withKeys as je, nextTick as Fe, resolveDirective as We, withDirectives as ze, resolveDynamicComponent as Je, renderSlot as Ye, shallowRef as He, createSlots as Qe } from "vue";
|
|
7
|
+
import { u as b, C as J, e as Q, q as fe, d as Xe } from "../.chunks/forms-xkXHvvah.es.js";
|
|
8
|
+
import { _ as he, b as ye, a as Ze } from "../.chunks/popupHint.vue_vue_type_style_index_0_lang-fnjq0yg1.es.js";
|
|
9
|
+
import { a as et, _ as Ie, b as Se, c as Ke, I as le } from "../.chunks/policy.vue_vue_type_style_index_0_lang-C9A--uWd.es.js";
|
|
10
|
+
import { u as tt } from "../.chunks/utils-ByqQkftW.es.js";
|
|
11
|
+
import { getSearcherGIcon as ot, getLangLabel as lt, getDeviceGIcon as nt } from "../utils/searchers.js";
|
|
12
|
+
import "../.chunks/core-BgoBbm_5.es.js";
|
|
13
|
+
import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-CzFMOjlE.es.js";
|
|
14
|
+
import { g as Te } from "../.chunks/field-CyyFzM-Y.es.js";
|
|
15
|
+
import { validUrl as Ae } from "../utils/check.js";
|
|
16
|
+
import { storage as Y } from "../utils/dom.js";
|
|
17
|
+
import { TopPopupWorker as at } from "../popup/worker.js";
|
|
18
|
+
const rt = { class: "top-competitorSelector" }, it = { class: "top-ellipsis1" }, io = /* @__PURE__ */ G({
|
|
18
19
|
__name: "competitorSelector",
|
|
19
20
|
props: /* @__PURE__ */ M({
|
|
20
21
|
modelValue: {},
|
|
@@ -26,64 +27,64 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
26
27
|
}),
|
|
27
28
|
emits: ["update:modelValue"],
|
|
28
29
|
setup(e) {
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
30
|
+
const t = e, o = B(e, "modelValue"), l = w(() => {
|
|
31
|
+
if (t.showSelectAllItem)
|
|
31
32
|
return {
|
|
32
33
|
icon: "",
|
|
33
|
-
title:
|
|
34
|
+
title: b().Common.Select_all,
|
|
34
35
|
value: "all",
|
|
35
36
|
content: ""
|
|
36
37
|
};
|
|
37
38
|
});
|
|
38
|
-
return (
|
|
39
|
-
|
|
40
|
-
opener:
|
|
41
|
-
|
|
39
|
+
return (a, n) => (v(), T("div", rt, [
|
|
40
|
+
p(J).state.isMobile ? (v(), j(he, { key: 0 }, {
|
|
41
|
+
opener: C(() => [
|
|
42
|
+
E(Q, {
|
|
42
43
|
class: "top-competitorSelector_opener",
|
|
43
44
|
color: "theme",
|
|
44
45
|
icon: "",
|
|
45
46
|
icon2: ""
|
|
46
47
|
}, {
|
|
47
|
-
default:
|
|
48
|
-
|
|
48
|
+
default: C(() => [
|
|
49
|
+
N(A(e.items.find((r) => r.value === o.value?.[0])?.content), 1)
|
|
49
50
|
]),
|
|
50
51
|
_: 1
|
|
51
52
|
})
|
|
52
53
|
]),
|
|
53
|
-
contentList:
|
|
54
|
-
(
|
|
55
|
-
class:
|
|
56
|
-
"top-active": o.value?.includes(
|
|
54
|
+
contentList: C(() => [
|
|
55
|
+
(v(!0), T(q, null, se(e.items, (r) => (v(), j(ye, {
|
|
56
|
+
class: Z({
|
|
57
|
+
"top-active": o.value?.includes(r.value)
|
|
57
58
|
}),
|
|
58
|
-
"data-top-icon":
|
|
59
|
-
title:
|
|
60
|
-
onClick: () => o.value = [
|
|
59
|
+
"data-top-icon": r.icon,
|
|
60
|
+
title: r.title,
|
|
61
|
+
onClick: () => o.value = [r.value]
|
|
61
62
|
}, {
|
|
62
|
-
default:
|
|
63
|
-
|
|
63
|
+
default: C(() => [
|
|
64
|
+
L("span", it, A(r.content), 1)
|
|
64
65
|
]),
|
|
65
66
|
_: 2
|
|
66
67
|
}, 1032, ["class", "data-top-icon", "title", "onClick"]))), 256))
|
|
67
68
|
]),
|
|
68
69
|
_: 1
|
|
69
|
-
})) : (
|
|
70
|
+
})) : (v(), j(et, {
|
|
70
71
|
key: 1,
|
|
71
72
|
modelValue: o.value,
|
|
72
|
-
"onUpdate:modelValue":
|
|
73
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => o.value = r),
|
|
73
74
|
items: e.items,
|
|
74
75
|
isMultiple: !0,
|
|
75
76
|
styling: "bar",
|
|
76
77
|
canBeEmptyMultiple: !1,
|
|
77
|
-
selectAllItem:
|
|
78
|
+
selectAllItem: l.value
|
|
78
79
|
}, null, 8, ["modelValue", "items", "selectAllItem"]))
|
|
79
80
|
]));
|
|
80
81
|
}
|
|
81
|
-
}),
|
|
82
|
-
value:
|
|
83
|
-
title:
|
|
84
|
-
icon:
|
|
85
|
-
content:
|
|
86
|
-
}))),
|
|
82
|
+
}), so = (e, t) => w(() => ke(e).filter((a) => a.on >= 0 || a.id === t).map((a) => ({
|
|
83
|
+
value: a.id,
|
|
84
|
+
title: a.url + ` [${a.id}]`,
|
|
85
|
+
icon: a.id === ke(t) ? "" : "",
|
|
86
|
+
content: a.name
|
|
87
|
+
}))), O = -1, y = -2, ne = -1, dt = {
|
|
87
88
|
0: "Yandex",
|
|
88
89
|
1: "Google",
|
|
89
90
|
4: "YouTube",
|
|
@@ -93,239 +94,239 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
93
94
|
9: "GoogleStore",
|
|
94
95
|
20: "Yandex.com",
|
|
95
96
|
21: "Yandex.com.tr"
|
|
96
|
-
},
|
|
97
|
+
}, Be = {
|
|
97
98
|
key: y,
|
|
98
99
|
name: "--",
|
|
99
100
|
index: y
|
|
100
|
-
},
|
|
101
|
+
}, Le = {
|
|
101
102
|
key: y,
|
|
102
103
|
name: "--",
|
|
103
|
-
regions: [
|
|
104
|
-
regionByIndex: /* @__PURE__ */ new Map([[y,
|
|
104
|
+
regions: [Be],
|
|
105
|
+
regionByIndex: /* @__PURE__ */ new Map([[y, Be]])
|
|
105
106
|
}, ae = {
|
|
106
107
|
key: y,
|
|
107
108
|
name: "Autoselect",
|
|
108
109
|
index: y
|
|
109
|
-
},
|
|
110
|
+
}, ce = {
|
|
110
111
|
key: y,
|
|
111
112
|
name: "Autoselect",
|
|
112
113
|
regions: [ae],
|
|
113
114
|
regionByIndex: /* @__PURE__ */ new Map([[y, ae]])
|
|
114
|
-
},
|
|
115
|
+
}, be = {
|
|
115
116
|
countryCode: "00",
|
|
116
117
|
depth: 1,
|
|
117
118
|
device: 0,
|
|
118
|
-
key:
|
|
119
|
-
index:
|
|
119
|
+
key: ne,
|
|
120
|
+
index: ne,
|
|
120
121
|
lang: "ru",
|
|
121
122
|
name: "Without region"
|
|
122
|
-
},
|
|
123
|
-
let
|
|
124
|
-
return e ?
|
|
125
|
-
},
|
|
126
|
-
const
|
|
127
|
-
return e.forEach((
|
|
128
|
-
if (!
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
if (
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
}), !
|
|
135
|
-
(!
|
|
136
|
-
|
|
137
|
-
o.length) && typeof
|
|
138
|
-
}), o.forEach((
|
|
139
|
-
if (
|
|
140
|
-
const
|
|
141
|
-
key:
|
|
142
|
-
name:
|
|
123
|
+
}, st = () => (ae.name = b().Common.Autoselect, ae), ut = () => (st(), ce.name = b().Common.Autoselect, console.log(ce), ce), ct = () => (be.name = b().Keywords.Without_region, be), Oe = (e = !1, t = !1, o = []) => {
|
|
124
|
+
let l;
|
|
125
|
+
return e ? l = gt(o) : l = Re(o), t && l.set(y, ut()), l.size || l.set(y, Le), l;
|
|
126
|
+
}, Re = (e, t = !0, o = [], l = !1) => {
|
|
127
|
+
const a = /* @__PURE__ */ new Map();
|
|
128
|
+
return e.forEach((n) => {
|
|
129
|
+
if (!n.enabled || l && typeof n.key == "number" && n.key > 1) return;
|
|
130
|
+
const r = { ...n };
|
|
131
|
+
r.regionByIndex = /* @__PURE__ */ new Map(), n.regions && n.regions.forEach((u) => {
|
|
132
|
+
if (t && !u.enabled) return;
|
|
133
|
+
const c = { ...u };
|
|
134
|
+
r.regionByIndex.set(c.index, c);
|
|
135
|
+
}), !r.regionByIndex.size && o.length, // режим вывода ПС без регионов
|
|
136
|
+
(!n.regions || // есть включенные регионы
|
|
137
|
+
r.regionByIndex.size || // запрошен вывод конкретных ПС
|
|
138
|
+
o.length) && typeof r.key == "number" && a.set(r.key, r);
|
|
139
|
+
}), o.forEach((n) => {
|
|
140
|
+
if (a.has(n)) return;
|
|
141
|
+
const r = {
|
|
142
|
+
key: n,
|
|
143
|
+
name: dt[n],
|
|
143
144
|
regions: [],
|
|
144
145
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
145
146
|
};
|
|
146
|
-
|
|
147
|
-
}),
|
|
148
|
-
},
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
const o =
|
|
147
|
+
a.set(r.key, r);
|
|
148
|
+
}), a;
|
|
149
|
+
}, gt = (e) => {
|
|
150
|
+
const t = Re(e, !1, [0, 1], !0);
|
|
151
|
+
if (t.has(2)) {
|
|
152
|
+
const o = t.get(2);
|
|
152
153
|
o && (o.regionByIndex = /* @__PURE__ */ new Map());
|
|
153
154
|
}
|
|
154
|
-
return
|
|
155
|
+
return t.forEach((o) => {
|
|
155
156
|
if (!o.regionByIndex) return;
|
|
156
|
-
const
|
|
157
|
-
o.regionByIndex.set(
|
|
158
|
-
}),
|
|
159
|
-
},
|
|
160
|
-
const
|
|
161
|
-
let
|
|
162
|
-
return
|
|
163
|
-
if (!(
|
|
164
|
-
if (!
|
|
165
|
-
return
|
|
166
|
-
}),
|
|
157
|
+
const l = { ...ct() };
|
|
158
|
+
o.regionByIndex.set(l.index, l);
|
|
159
|
+
}), t;
|
|
160
|
+
}, ft = (e, t, o = []) => {
|
|
161
|
+
const l = Oe(e, !1, o);
|
|
162
|
+
let a;
|
|
163
|
+
return l.forEach((n) => {
|
|
164
|
+
if (!(t.searcher_key !== void 0 && t.searcher_key != n.key) && n.regions && (n.regions.forEach((r) => {
|
|
165
|
+
if (!a && !(t.key !== void 0 && t.key != r.key) && !(t.index !== void 0 && t.index != r.index) && !(!e && (t.lang !== void 0 && t.lang != r.lang || t.device !== void 0 && t.device != r.device)))
|
|
166
|
+
return r.searcher_key = n.key, a = r, !1;
|
|
167
|
+
}), a))
|
|
167
168
|
return !1;
|
|
168
|
-
}),
|
|
169
|
-
},
|
|
170
|
-
const o =
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
169
|
+
}), a;
|
|
170
|
+
}, mt = tt(() => import("../.chunks/dialog_regionSelectorRegions-DA38RsiW.es.js")), pt = (e, t) => {
|
|
171
|
+
const o = b(), l = V(t.value.keys().next().value ?? y), a = w(() => {
|
|
172
|
+
const n = /* @__PURE__ */ new Map();
|
|
173
|
+
if (t.value.forEach((r) => {
|
|
173
174
|
let u = {
|
|
174
|
-
value:
|
|
175
|
-
title:
|
|
175
|
+
value: r.key,
|
|
176
|
+
title: r.name
|
|
176
177
|
};
|
|
177
|
-
e.addSearcherIcon && (u.icon =
|
|
178
|
-
}), e.addCompare && !
|
|
179
|
-
const
|
|
178
|
+
e.addSearcherIcon && (u.icon = ot(r.key)), n.set(r.key, u);
|
|
179
|
+
}), e.addCompare && !n.has(y)) {
|
|
180
|
+
const r = {
|
|
180
181
|
value: "",
|
|
181
182
|
title: "--------------------",
|
|
182
183
|
disabled: !0
|
|
183
184
|
};
|
|
184
|
-
|
|
185
|
+
n.set(r.value, r);
|
|
185
186
|
const u = {
|
|
186
|
-
value:
|
|
187
|
+
value: O,
|
|
187
188
|
title: o.Common.Compare
|
|
188
189
|
};
|
|
189
|
-
|
|
190
|
+
n.set(u.value, u);
|
|
190
191
|
}
|
|
191
|
-
return
|
|
192
|
+
return n;
|
|
192
193
|
});
|
|
193
194
|
return {
|
|
194
|
-
searcherKey:
|
|
195
|
-
optionBySearcherKey:
|
|
195
|
+
searcherKey: l,
|
|
196
|
+
optionBySearcherKey: a
|
|
196
197
|
};
|
|
197
|
-
},
|
|
198
|
-
const o =
|
|
199
|
-
e.modelValue.length === 1 && (
|
|
200
|
-
const
|
|
201
|
-
const
|
|
202
|
-
return
|
|
203
|
-
let u =
|
|
198
|
+
}, vt = (e, t) => {
|
|
199
|
+
const o = b(), l = V(y);
|
|
200
|
+
e.modelValue.length === 1 && (l.value = e.modelValue[0]), l.value === y && (e.forFrequency ? l.value = t.value?.regionByIndex.values().next().value?.key ?? y : l.value = t.value?.regionByIndex.keys().next().value ?? y);
|
|
201
|
+
const a = w(() => {
|
|
202
|
+
const n = /* @__PURE__ */ new Map();
|
|
203
|
+
return t.value.regionByIndex?.forEach((r) => {
|
|
204
|
+
let u = r.name;
|
|
204
205
|
if (e.forFrequency) {
|
|
205
|
-
const
|
|
206
|
-
value:
|
|
206
|
+
const S = {
|
|
207
|
+
value: r.key,
|
|
207
208
|
title: u
|
|
208
209
|
};
|
|
209
|
-
|
|
210
|
+
n.has(r.key) || n.set(r.key, S);
|
|
210
211
|
return;
|
|
211
212
|
}
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
const
|
|
216
|
-
value:
|
|
213
|
+
r.device && (u += " (" + o.Common["Device_" + r.device] + ")");
|
|
214
|
+
const c = lt(t.value.key || 0, r.lang ?? "");
|
|
215
|
+
c && (u += " / " + c);
|
|
216
|
+
const f = {
|
|
217
|
+
value: r.index,
|
|
217
218
|
title: u,
|
|
218
|
-
icon:
|
|
219
|
+
icon: r.device ? nt(r.device) : void 0
|
|
219
220
|
};
|
|
220
|
-
|
|
221
|
-
}),
|
|
221
|
+
n.set(r.index, f);
|
|
222
|
+
}), n;
|
|
222
223
|
});
|
|
223
|
-
return
|
|
224
|
-
if (e.onlySearcher ||
|
|
224
|
+
return P(a, (n, r) => {
|
|
225
|
+
if (e.onlySearcher || l.value !== void 0 && n.get(l.value))
|
|
225
226
|
return;
|
|
226
|
-
let u =
|
|
227
|
-
if (
|
|
228
|
-
|
|
227
|
+
let u = n.keys().next().value;
|
|
228
|
+
if (l.value === y || u === y) {
|
|
229
|
+
l.value = u;
|
|
229
230
|
return;
|
|
230
231
|
}
|
|
231
|
-
let
|
|
232
|
-
for (const [
|
|
233
|
-
const
|
|
234
|
-
if (typeof
|
|
232
|
+
let c = r?.get(l.value)?.title || "", f = -1;
|
|
233
|
+
for (const [S, i] of n.entries()) {
|
|
234
|
+
const g = i.title;
|
|
235
|
+
if (typeof g != "string" || typeof S == "string")
|
|
235
236
|
break;
|
|
236
|
-
if (
|
|
237
|
-
u =
|
|
237
|
+
if (g === c) {
|
|
238
|
+
u = S;
|
|
238
239
|
break;
|
|
239
240
|
}
|
|
240
241
|
const d = new RegExp(` \\((${o.Common.Device_1}|${o.Common.Device_2})\\)`);
|
|
241
|
-
let s =
|
|
242
|
-
|
|
242
|
+
let s = c, m = 3;
|
|
243
|
+
g.indexOf(s) === -1 && (s = c.replace(/^[^a-zа-я]/i, "").replace(d, ""), m--), g.indexOf(s) === -1 && (s = c.replace(/ \/.*/, ""), m--), g.indexOf(s) === -1 && (s = c.replace(/ \/.*/, ""), s = s.replace(/^[^a-zа-я]/i, "").replace(d, ""), m--), g.indexOf(s) !== -1 && (m <= f || (f = m, u = S));
|
|
243
244
|
}
|
|
244
|
-
|
|
245
|
+
l.value = u;
|
|
245
246
|
}), {
|
|
246
|
-
regionIndex:
|
|
247
|
-
optionByRegionIndex:
|
|
247
|
+
regionIndex: l,
|
|
248
|
+
optionByRegionIndex: a
|
|
248
249
|
};
|
|
249
|
-
},
|
|
250
|
-
const
|
|
251
|
-
if (e.onlySearcher &&
|
|
252
|
-
|
|
250
|
+
}, ht = (e, t, o) => {
|
|
251
|
+
const l = V([]), a = () => {
|
|
252
|
+
if (e.onlySearcher && t.value) {
|
|
253
|
+
l.value = Array.from(t.value.keys());
|
|
253
254
|
return;
|
|
254
255
|
}
|
|
255
|
-
let
|
|
256
|
+
let r = [];
|
|
256
257
|
if (e.modelValue.length > 1)
|
|
257
|
-
|
|
258
|
+
r = [...e.modelValue];
|
|
258
259
|
else
|
|
259
260
|
try {
|
|
260
|
-
|
|
261
|
+
r = JSON.parse(
|
|
261
262
|
localStorage.getItem("ui:project:regionSelector" + e.projectId + ":regionsIndexes")
|
|
262
263
|
) ?? [];
|
|
263
264
|
} catch {
|
|
264
265
|
}
|
|
265
|
-
|
|
266
|
-
},
|
|
267
|
-
|
|
266
|
+
r.length && (r = r.filter((u) => o.value.has(u))), r.length || (r = Array.from(o.value)), l.value = [...r];
|
|
267
|
+
}, n = () => {
|
|
268
|
+
l.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(l.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
|
|
268
269
|
};
|
|
269
|
-
return
|
|
270
|
-
|
|
271
|
-
}), e.addCompare &&
|
|
272
|
-
regionsIndexes:
|
|
270
|
+
return P(l, () => {
|
|
271
|
+
n();
|
|
272
|
+
}), e.addCompare && a(), {
|
|
273
|
+
regionsIndexes: l
|
|
273
274
|
};
|
|
274
|
-
},
|
|
275
|
-
const
|
|
275
|
+
}, yt = (e) => {
|
|
276
|
+
const t = w(() => Oe(e.forFrequency, e.autoRegion, e.searchers)), o = w(() => t.value.get(a.searcherKey.value) || Le), l = w(() => {
|
|
276
277
|
const i = /* @__PURE__ */ new Set();
|
|
277
|
-
return
|
|
278
|
-
|
|
279
|
-
d.index !==
|
|
278
|
+
return t.value.forEach((g) => {
|
|
279
|
+
g.regionByIndex.forEach((d) => {
|
|
280
|
+
d.index !== ne && d.index !== y && i.add(d.index);
|
|
280
281
|
});
|
|
281
282
|
}), i;
|
|
282
|
-
}),
|
|
283
|
-
|
|
284
|
-
if (e.onlySearcher ?
|
|
285
|
-
let i =
|
|
286
|
-
|
|
287
|
-
if (e.onlySearcher &&
|
|
288
|
-
i =
|
|
283
|
+
}), a = pt(e, t), n = vt(e, o), r = ht(e, t, l);
|
|
284
|
+
P(t, () => {
|
|
285
|
+
if (e.onlySearcher ? r.regionsIndexes.value = Array.from(t.value.keys()) : r.regionsIndexes.value = r.regionsIndexes.value.filter((g) => l.value.has(g)), a.searcherKey.value === O) return;
|
|
286
|
+
let i = t.value.keys().next().value;
|
|
287
|
+
t.value.forEach((g) => {
|
|
288
|
+
if (e.onlySearcher && g.key === a.searcherKey.value) {
|
|
289
|
+
i = a.searcherKey.value;
|
|
289
290
|
return;
|
|
290
291
|
}
|
|
291
|
-
if (
|
|
292
|
+
if (n.regionIndex.value && g.regionByIndex?.has(n.regionIndex.value) && (i = g.key), !e.onlySearcher) {
|
|
292
293
|
let d;
|
|
293
|
-
i !== void 0 && (d =
|
|
294
|
-
const s =
|
|
295
|
-
d?.has(y) && !s?.has(y) && (i =
|
|
294
|
+
i !== void 0 && (d = t.value.get(i)?.regionByIndex);
|
|
295
|
+
const s = t.value.get(g.key)?.regionByIndex;
|
|
296
|
+
d?.has(y) && !s?.has(y) && (i = g.key);
|
|
296
297
|
}
|
|
297
|
-
}), i !== void 0 && (
|
|
298
|
+
}), i !== void 0 && (a.searcherKey.value = i), n.regionIndex.value !== void 0 && !o.value?.regionByIndex?.has(n.regionIndex.value) && (n.regionIndex.value = o.value?.regions?.keys().next().value);
|
|
298
299
|
}, { immediate: !0 });
|
|
299
300
|
const u = () => {
|
|
300
|
-
if (!(
|
|
301
|
-
return
|
|
302
|
-
},
|
|
303
|
-
if (e.onlySearcher ||
|
|
304
|
-
let i =
|
|
301
|
+
if (!(a.searcherKey.value === O || a.searcherKey.value === y))
|
|
302
|
+
return a.searcherKey.value;
|
|
303
|
+
}, c = () => {
|
|
304
|
+
if (e.onlySearcher || n.regionIndex.value === y) return;
|
|
305
|
+
let i = n.regionIndex.value;
|
|
305
306
|
if (e.forFrequency) {
|
|
306
|
-
const
|
|
307
|
-
i =
|
|
307
|
+
const g = n.regionIndex.value;
|
|
308
|
+
i = ft(e.forFrequency, { searcher_key: u(), key: g }, e.searchers)?.index;
|
|
308
309
|
}
|
|
309
310
|
return i;
|
|
310
|
-
},
|
|
311
|
+
}, f = () => {
|
|
311
312
|
const i = u();
|
|
312
313
|
if (i !== void 0)
|
|
313
|
-
return
|
|
314
|
+
return t.value.get(i);
|
|
314
315
|
};
|
|
315
316
|
return {
|
|
316
|
-
selectSearcher:
|
|
317
|
-
selectRegion:
|
|
318
|
-
compare:
|
|
319
|
-
searcherByKey:
|
|
320
|
-
allRegionsIndexes:
|
|
321
|
-
getSearcher:
|
|
317
|
+
selectSearcher: a,
|
|
318
|
+
selectRegion: n,
|
|
319
|
+
compare: r,
|
|
320
|
+
searcherByKey: t,
|
|
321
|
+
allRegionsIndexes: l,
|
|
322
|
+
getSearcher: f,
|
|
322
323
|
getRegion: () => {
|
|
323
|
-
const i =
|
|
324
|
+
const i = c();
|
|
324
325
|
if (i !== void 0)
|
|
325
|
-
return
|
|
326
|
+
return f()?.regionByIndex?.get(i);
|
|
326
327
|
}
|
|
327
328
|
};
|
|
328
|
-
},
|
|
329
|
+
}, uo = /* @__PURE__ */ G({
|
|
329
330
|
__name: "regionSelector",
|
|
330
331
|
props: /* @__PURE__ */ M({
|
|
331
332
|
projectId: {},
|
|
@@ -346,164 +347,161 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
346
347
|
modelValueSingleModifiers: {}
|
|
347
348
|
}),
|
|
348
349
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
349
|
-
setup(e, { expose:
|
|
350
|
-
const o = e,
|
|
351
|
-
selectSearcher:
|
|
352
|
-
selectRegion:
|
|
350
|
+
setup(e, { expose: t }) {
|
|
351
|
+
const o = e, l = B(e, "modelValue"), a = B(e, "modelValueSingle"), {
|
|
352
|
+
selectSearcher: n,
|
|
353
|
+
selectRegion: r,
|
|
353
354
|
compare: u,
|
|
354
|
-
searcherByKey:
|
|
355
|
-
allRegionsIndexes:
|
|
356
|
-
getSearcher:
|
|
355
|
+
searcherByKey: c,
|
|
356
|
+
allRegionsIndexes: f,
|
|
357
|
+
getSearcher: S,
|
|
357
358
|
getRegion: i
|
|
358
|
-
} =
|
|
359
|
+
} = yt(o), g = () => {
|
|
359
360
|
const d = [];
|
|
360
|
-
|
|
361
|
-
s.enabled && s.regions.forEach((
|
|
362
|
-
|
|
361
|
+
c.value.forEach((s) => {
|
|
362
|
+
s.enabled && s.regions.forEach((m) => {
|
|
363
|
+
m.enabled && d.push(m);
|
|
363
364
|
});
|
|
364
|
-
}),
|
|
365
|
+
}), mt.open("regions", {
|
|
365
366
|
regions: d,
|
|
366
367
|
regionsIndexes: u.regionsIndexes.value,
|
|
367
368
|
"@update:regionsIndexes": (s) => u.regionsIndexes.value = s
|
|
368
369
|
});
|
|
369
370
|
};
|
|
370
|
-
return
|
|
371
|
-
if (
|
|
372
|
-
if (JSON.stringify(
|
|
371
|
+
return P([r.regionIndex, n.searcherKey, u.regionsIndexes], () => {
|
|
372
|
+
if (n.searcherKey.value === O && u.regionsIndexes.value.length) {
|
|
373
|
+
if (JSON.stringify(l.value) === JSON.stringify(u.regionsIndexes.value))
|
|
373
374
|
return;
|
|
374
|
-
|
|
375
|
+
l.value = [...u.regionsIndexes.value];
|
|
375
376
|
} else
|
|
376
|
-
o.onlySearcher ? (
|
|
377
|
-
!o.onlySearcher && !
|
|
378
|
-
}),
|
|
379
|
-
|
|
380
|
-
}, { immediate: !0 }),
|
|
381
|
-
if (
|
|
382
|
-
if (!
|
|
383
|
-
let d =
|
|
384
|
-
d === y && !o.autoRegion && (d = void 0,
|
|
377
|
+
o.onlySearcher ? (l.value = [n.searcherKey.value], n.searcherKey.value === y && !o.autoRegion && (l.value.length = 0)) : (l.value = [r.regionIndex.value], r.regionIndex.value === y && !o.autoRegion && (l.value.length = 0));
|
|
378
|
+
!o.onlySearcher && !f.value.size && (n.searcherKey.value = y);
|
|
379
|
+
}), a.value && P(a, () => {
|
|
380
|
+
a.value && (l.value = [a.value]);
|
|
381
|
+
}, { immediate: !0 }), P(l, () => {
|
|
382
|
+
if (l.value[0] && (a.value = l.value[0]), o.onlySearcher) {
|
|
383
|
+
if (!l.value.length || l.value.length === 1 && !c.value.has(l.value[0]) || l.value.length === 1 && l.value[0] === y && !o.autoRegion) {
|
|
384
|
+
let d = c.value.keys().next().value;
|
|
385
|
+
d === y && !o.autoRegion && (d = void 0, a.value = y), d !== void 0 ? l.value = [d] : l.value.length = 0;
|
|
385
386
|
return;
|
|
386
387
|
}
|
|
387
|
-
if (
|
|
388
|
-
|
|
388
|
+
if (l.value.length > 1 && JSON.stringify(l.value) !== JSON.stringify(u.regionsIndexes.value)) {
|
|
389
|
+
l.value = [...u.regionsIndexes.value];
|
|
389
390
|
return;
|
|
390
391
|
}
|
|
391
392
|
} else {
|
|
392
|
-
let d = [...new Set(
|
|
393
|
-
if (o.forFrequency && (s =
|
|
393
|
+
let d = [...new Set(l.value)], s = c.value.values().next().value?.regionByIndex?.keys().next().value;
|
|
394
|
+
if (o.forFrequency && (s = c.value.values().next().value?.regionByIndex?.values().next().value?.key), s === y && !o.autoRegion && (s = void 0, a.value = y), !d.length)
|
|
394
395
|
s !== void 0 && d.push(s);
|
|
395
396
|
else if (d.length === 1) {
|
|
396
|
-
let
|
|
397
|
-
o.forFrequency && (
|
|
398
|
-
|
|
399
|
-
|
|
397
|
+
let m = f.value;
|
|
398
|
+
o.forFrequency && (m = /* @__PURE__ */ new Set(), c.value.forEach((ee) => {
|
|
399
|
+
ee.regionByIndex.forEach((U) => {
|
|
400
|
+
U.index !== ne && U.index !== y && m.add(U.key);
|
|
400
401
|
});
|
|
401
|
-
})),
|
|
402
|
+
})), m.has(d[0]) || (d = [], s !== void 0 && d.push(s));
|
|
402
403
|
} else
|
|
403
|
-
d = d.filter((
|
|
404
|
-
if (JSON.stringify(
|
|
405
|
-
|
|
404
|
+
d = d.filter((m) => f.value.has(m)), !d.length && s !== void 0 && d.push(s);
|
|
405
|
+
if (JSON.stringify(l.value) !== JSON.stringify(d)) {
|
|
406
|
+
l.value = d;
|
|
406
407
|
return;
|
|
407
408
|
}
|
|
408
409
|
}
|
|
409
|
-
if (!(
|
|
410
|
+
if (!(l.value.length === 1 && l.value[0] === (o.onlySearcher ? n.searcherKey.value : r.regionIndex.value)))
|
|
410
411
|
if (o.onlySearcher) {
|
|
411
|
-
if (
|
|
412
|
-
|
|
412
|
+
if (l.value.length === 1) {
|
|
413
|
+
n.searcherKey.value = l.value[0];
|
|
413
414
|
return;
|
|
414
415
|
}
|
|
415
|
-
|
|
416
|
+
n.searcherKey.value = O;
|
|
416
417
|
return;
|
|
417
418
|
} else {
|
|
418
|
-
if (!
|
|
419
|
+
if (!l.value.length)
|
|
419
420
|
return;
|
|
420
|
-
if (
|
|
421
|
-
|
|
421
|
+
if (l.value.length === 1 && n.searcherKey.value !== O) {
|
|
422
|
+
r.regionIndex.value = l.value[0];
|
|
422
423
|
let d;
|
|
423
|
-
for (const s of
|
|
424
|
-
for (const
|
|
425
|
-
if ((o.forFrequency ?
|
|
424
|
+
for (const s of c.value.values()) {
|
|
425
|
+
for (const m of s.regionByIndex.values())
|
|
426
|
+
if ((o.forFrequency ? m.key : m.index) === r.regionIndex.value) {
|
|
426
427
|
d = s.key;
|
|
427
428
|
break;
|
|
428
429
|
}
|
|
429
430
|
if (d !== void 0)
|
|
430
431
|
break;
|
|
431
432
|
}
|
|
432
|
-
d !== void 0 && (
|
|
433
|
+
d !== void 0 && (n.searcherKey.value = d);
|
|
433
434
|
} else
|
|
434
|
-
|
|
435
|
+
n.searcherKey.value = O, u.regionsIndexes.value = [...l.value];
|
|
435
436
|
}
|
|
436
|
-
}, { immediate: !0 }),
|
|
437
|
-
getSearcher:
|
|
437
|
+
}, { immediate: !0 }), t({
|
|
438
|
+
getSearcher: S,
|
|
438
439
|
getRegion: i
|
|
439
|
-
}), (d, s) => (
|
|
440
|
-
class:
|
|
440
|
+
}), (d, s) => (v(), T("div", {
|
|
441
|
+
class: Z({
|
|
441
442
|
"top-selectorRegion": !0,
|
|
442
443
|
"top-selectorRegion-onlySearcher": e.onlySearcher
|
|
443
444
|
})
|
|
444
445
|
}, [
|
|
445
|
-
|
|
446
|
-
options:
|
|
447
|
-
modelValue:
|
|
448
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
446
|
+
E(fe, {
|
|
447
|
+
options: p(n).optionBySearcherKey.value,
|
|
448
|
+
modelValue: p(n).searcherKey.value,
|
|
449
|
+
"onUpdate:modelValue": s[0] || (s[0] = (m) => p(n).searcherKey.value = m),
|
|
449
450
|
name: "searcher_key",
|
|
450
451
|
addChanger: e.addChanger
|
|
451
452
|
}, null, 8, ["options", "modelValue", "addChanger"]),
|
|
452
|
-
!e.onlySearcher &&
|
|
453
|
+
!e.onlySearcher && p(n).searcherKey.value !== p(O) ? (v(), j(fe, {
|
|
453
454
|
key: 0,
|
|
454
455
|
class: "top-select-region",
|
|
455
|
-
options:
|
|
456
|
-
modelValue:
|
|
457
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
|
456
|
+
options: p(r).optionByRegionIndex.value,
|
|
457
|
+
modelValue: p(r).regionIndex.value,
|
|
458
|
+
"onUpdate:modelValue": s[1] || (s[1] = (m) => p(r).regionIndex.value = m),
|
|
458
459
|
name: e.forFrequency ? "region_key" : "region_index",
|
|
459
460
|
addChanger: e.addChanger,
|
|
460
461
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
461
|
-
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) :
|
|
462
|
-
e.addCompare && !e.onlySearcher &&
|
|
462
|
+
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : _("", !0),
|
|
463
|
+
e.addCompare && !e.onlySearcher && p(n).searcherKey.value === p(O) ? (v(), j(Q, {
|
|
463
464
|
key: 1,
|
|
464
465
|
name: "compare",
|
|
465
|
-
onClick:
|
|
466
|
-
"data-count-compare-regions-indexes":
|
|
466
|
+
onClick: g,
|
|
467
|
+
"data-count-compare-regions-indexes": p(u).regionsIndexes.value.length
|
|
467
468
|
}, {
|
|
468
|
-
default:
|
|
469
|
-
|
|
469
|
+
default: C(() => [
|
|
470
|
+
N(A(d.$i18n.Common.Selected_regions), 1)
|
|
470
471
|
]),
|
|
471
472
|
_: 1
|
|
472
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
473
|
+
}, 8, ["data-count-compare-regions-indexes"])) : _("", !0)
|
|
473
474
|
], 2));
|
|
474
475
|
}
|
|
475
|
-
}),
|
|
476
|
+
}), R = {
|
|
476
477
|
id: 0,
|
|
477
478
|
name: "/",
|
|
478
479
|
path: "/"
|
|
479
|
-
}, ft = (e, a) => {
|
|
480
|
-
let o = e?.root[0] ?? O;
|
|
481
|
-
return o = { ...o }, o.name = Le(a), o;
|
|
482
480
|
};
|
|
483
|
-
function
|
|
484
|
-
return e ?
|
|
481
|
+
function It(e) {
|
|
482
|
+
return e ? b()?.Common.All_folders : "/ (" + b()?.Keywords.Root_folder + ")";
|
|
485
483
|
}
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
}), o),
|
|
491
|
-
function
|
|
492
|
-
const
|
|
493
|
-
return
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
if (!Object.is(
|
|
497
|
-
const i =
|
|
498
|
-
|
|
499
|
-
old:
|
|
500
|
-
new:
|
|
484
|
+
const xe = (e, t, o = /* @__PURE__ */ new Map(), l = { id: "root" }, a = 0) => (l.childsIds = [], l.id && (l.countAllGroupsActive = l.count_groups_active), e[l.id] && e[l.id].forEach((n) => {
|
|
485
|
+
n = { ...n }, l.childsIds.push(n.id), n.id === 0 && (n.name = It(t));
|
|
486
|
+
const r = a > 1 ? "-".repeat(a - 1) + " " : "";
|
|
487
|
+
r && !n.name.startsWith(r) && (n.name = r + n.name), o.set(n.id, n), xe(e, t, o, n, a + 1), l.childsIds = l.childsIds.concat(n.childsIds), l.id && n.count_groups_active && (l.countAllGroupsActive += n.count_groups_active);
|
|
488
|
+
}), o), St = (e) => e.gen("/get/keywords_2/folders/", ["id", "parent_id", "name", "path"]).changeParams({ orders: ["ord_path"], limit: 100 });
|
|
489
|
+
function me(e, t, o) {
|
|
490
|
+
const l = Object.keys(e), a = l.map((n) => e[n]);
|
|
491
|
+
return P(a, (n, r, u) => {
|
|
492
|
+
const c = {};
|
|
493
|
+
n.forEach((f, S) => {
|
|
494
|
+
if (!Object.is(f, r[S])) {
|
|
495
|
+
const i = l[S];
|
|
496
|
+
c[i] = {
|
|
497
|
+
old: r[S],
|
|
498
|
+
new: f
|
|
501
499
|
};
|
|
502
500
|
}
|
|
503
|
-
}), Object.keys(
|
|
501
|
+
}), Object.keys(c).length && t(c, u);
|
|
504
502
|
}, o);
|
|
505
503
|
}
|
|
506
|
-
const
|
|
504
|
+
const xt = /* @__PURE__ */ G({
|
|
507
505
|
__name: "folders",
|
|
508
506
|
props: /* @__PURE__ */ M({
|
|
509
507
|
folderId: {},
|
|
@@ -517,68 +515,62 @@ const vt = /* @__PURE__ */ R({
|
|
|
517
515
|
}, {
|
|
518
516
|
folderId: { required: !0 },
|
|
519
517
|
folderIdModifiers: {},
|
|
520
|
-
folder: { default:
|
|
518
|
+
folder: { default: R },
|
|
521
519
|
folderModifiers: {}
|
|
522
520
|
}),
|
|
523
521
|
emits: ["update:folderId", "update:folder"],
|
|
524
522
|
setup(e) {
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
project_id:
|
|
529
|
-
}),
|
|
530
|
-
checkFingerprint: "TopGroupSelectorFolders:" +
|
|
531
|
-
}),
|
|
523
|
+
const t = e, o = B(e, "folderId"), l = B(e, "folder"), a = t.client && !t.folders ? St(t.client) : void 0, n = V(null);
|
|
524
|
+
P(() => t.projectId, () => {
|
|
525
|
+
a?.changeParams({
|
|
526
|
+
project_id: t.projectId
|
|
527
|
+
}), a?.setOptions({
|
|
528
|
+
checkFingerprint: "TopGroupSelectorFolders:" + t.projectId
|
|
529
|
+
}), n.value?.resetCache();
|
|
532
530
|
}, { immediate: !0 });
|
|
533
|
-
const
|
|
534
|
-
return
|
|
535
|
-
modelFolder:
|
|
531
|
+
const r = w(() => xe(t.folders ?? { root: [R] }, t.canSelectAll));
|
|
532
|
+
return me({
|
|
533
|
+
modelFolder: l,
|
|
536
534
|
modelFolderId: o
|
|
537
535
|
}, async (u) => {
|
|
538
|
-
if (o.value ===
|
|
536
|
+
if (o.value === l.value.id)
|
|
539
537
|
return;
|
|
540
538
|
if (u.modelFolder && !u.modelFolderId) {
|
|
541
|
-
o.value =
|
|
539
|
+
o.value = l.value.id;
|
|
542
540
|
return;
|
|
543
541
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}
|
|
548
|
-
let f = n.value.get(a.folderId);
|
|
549
|
-
f || (f = O), t.value = f, o.value = f.id;
|
|
550
|
-
}, { immediate: !0 }), V(t, () => {
|
|
551
|
-
o.value = t.value.id;
|
|
552
|
-
}), (u, f) => (h(), C(we, {
|
|
542
|
+
let c = r.value.get(t.folderId);
|
|
543
|
+
c || (c = R), l.value = c, o.value = c.id;
|
|
544
|
+
}, { immediate: !0 }), (u, c) => (v(), j(Ie, {
|
|
553
545
|
class: "top-groupSelector_folder",
|
|
554
|
-
modelValue:
|
|
555
|
-
"onUpdate:modelValue":
|
|
556
|
-
items: e.folders ? [...
|
|
546
|
+
modelValue: l.value,
|
|
547
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => l.value = f),
|
|
548
|
+
items: e.folders ? [...r.value.values()] : void 0,
|
|
557
549
|
"search-type": "inline",
|
|
558
550
|
icon: e.addIcon ? "" : void 0,
|
|
559
|
-
api: e.folders ? void 0 :
|
|
560
|
-
apiSetSearchParams: (...
|
|
551
|
+
api: e.folders ? void 0 : p(a),
|
|
552
|
+
apiSetSearchParams: (...f) => p(Se)(...f, "name"),
|
|
561
553
|
addChanger: e.addChanger,
|
|
562
554
|
useCache: ""
|
|
563
555
|
}, null, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "addChanger"]));
|
|
564
556
|
}
|
|
565
|
-
}),
|
|
557
|
+
}), re = {
|
|
566
558
|
id: -1,
|
|
567
559
|
name: "--",
|
|
568
|
-
folder_id:
|
|
569
|
-
folder_path:
|
|
570
|
-
},
|
|
571
|
-
id:
|
|
560
|
+
folder_id: R.id,
|
|
561
|
+
folder_path: R.path
|
|
562
|
+
}, ie = {
|
|
563
|
+
id: Ke,
|
|
572
564
|
name: "All groups",
|
|
573
|
-
folder_id:
|
|
574
|
-
folder_path:
|
|
575
|
-
},
|
|
565
|
+
folder_id: R.id,
|
|
566
|
+
folder_path: R.path
|
|
567
|
+
}, H = () => (ie.name = b()?.Common.All_groups, ie), Ne = () => (ie.name = b()?.Keywords.Choose_group, ie), kt = (e, t, o) => (e = [...e], t !== void 0 && (e = e.filter((l) => l.on == Number(t))), o && o.id && o.childsIds && (e = e.filter((l) => l.folder_id === o.id || o.childsIds.includes(l.folder_id))), e), $e = (e) => e.gen("/get/keywords_2/groups/", ["id", "name", "folder_id", "folder_path"]).changeParams({ folder_id_depth: !0, limit: 100 }), Ct = (e) => e.gen("/add/keywords_2/groups/"), jt = { class: "top-groupSelector_groupItem" }, Tt = {
|
|
576
568
|
key: 0,
|
|
577
569
|
class: "top-comment"
|
|
578
|
-
},
|
|
570
|
+
}, At = {
|
|
579
571
|
key: 1,
|
|
580
572
|
class: "top-groupSelector_groupItemFolderPath"
|
|
581
|
-
},
|
|
573
|
+
}, Bt = /* @__PURE__ */ G({
|
|
582
574
|
__name: "groups",
|
|
583
575
|
props: /* @__PURE__ */ M({
|
|
584
576
|
groupId: {},
|
|
@@ -591,6 +583,7 @@ const vt = /* @__PURE__ */ R({
|
|
|
591
583
|
canSelectAll: { type: [Boolean, String] },
|
|
592
584
|
autoselect: { default: "first" },
|
|
593
585
|
addChanger: { type: Boolean, default: !0 },
|
|
586
|
+
showPath: { type: Boolean },
|
|
594
587
|
addIcon: { type: Boolean, default: !0 },
|
|
595
588
|
client: {}
|
|
596
589
|
}, {
|
|
@@ -600,116 +593,118 @@ const vt = /* @__PURE__ */ R({
|
|
|
600
593
|
groupModifiers: {}
|
|
601
594
|
}),
|
|
602
595
|
emits: /* @__PURE__ */ M(["addGroup"], ["update:groupId", "update:group"]),
|
|
603
|
-
setup(e, { emit:
|
|
604
|
-
const o = e,
|
|
605
|
-
|
|
596
|
+
setup(e, { emit: t }) {
|
|
597
|
+
const o = e, l = t, a = B(e, "groupId"), n = B(e, "group"), r = o.client && !o.groups ? $e(o.client) : void 0, u = o.client ? Ct(o.client) : void 0, c = V(null), f = V(void 0), S = Te("folder_id", "EQUALS", [o.folder?.id ?? 0]);
|
|
598
|
+
r?.changeParams({
|
|
606
599
|
project_id: o.projectId,
|
|
600
|
+
folder_id_depth: !0,
|
|
607
601
|
filters: [
|
|
608
|
-
|
|
602
|
+
S
|
|
609
603
|
]
|
|
610
|
-
}), o.on !== void 0 &&
|
|
604
|
+
}), o.on !== void 0 && r?.params.filters?.push(Te("on", "EQUALS", [Number(o.on)]));
|
|
611
605
|
const i = (d) => {
|
|
612
|
-
|
|
606
|
+
n.value = d, a.value = d.id;
|
|
613
607
|
};
|
|
614
|
-
|
|
608
|
+
me({
|
|
615
609
|
projectId: () => o.projectId,
|
|
616
610
|
folderId: () => o.folder?.id,
|
|
617
611
|
canSelectAll: () => o.canSelectAll
|
|
618
612
|
}, (d) => {
|
|
619
|
-
if (d.projectId && (
|
|
613
|
+
if (d.projectId && (r?.changeParams({
|
|
620
614
|
project_id: o.projectId
|
|
621
|
-
}),
|
|
615
|
+
}), r?.setOptions({
|
|
622
616
|
checkFingerprint: "TopGroupSelectorGroups:" + o.projectId
|
|
623
|
-
})), d.folderId && (
|
|
617
|
+
})), d.folderId && (S.values = [
|
|
624
618
|
o.folder?.id ?? 0
|
|
625
|
-
], o.groups && (
|
|
619
|
+
], o.groups && (f.value = kt(o.groups, o.on, o.folder))), c.value?.resetCache(), (d.folderId?.old !== void 0 || d.canSelectAll?.old !== void 0) && a.value !== le) {
|
|
626
620
|
let s;
|
|
627
|
-
o.autoselect === "first" && (s =
|
|
621
|
+
o.autoselect === "first" && (s = f.value?.[0], o.canSelectAll && (s = _e(H()))), (o.autoselect === "placeholder" || !s) && (s = Ne()), i(s);
|
|
628
622
|
}
|
|
629
|
-
}, { immediate: !0 }),
|
|
630
|
-
modelGroup:
|
|
631
|
-
modelGroupId:
|
|
623
|
+
}, { immediate: !0 }), me({
|
|
624
|
+
modelGroup: n,
|
|
625
|
+
modelGroupId: a
|
|
632
626
|
}, async (d) => {
|
|
633
|
-
if (
|
|
627
|
+
if (a.value !== n.value.id) {
|
|
634
628
|
if (d.modelGroup && !d.modelGroupId) {
|
|
635
|
-
|
|
629
|
+
a.value = n.value.id;
|
|
636
630
|
return;
|
|
637
631
|
}
|
|
638
|
-
if (!(o.canAdd &&
|
|
632
|
+
if (!(o.canAdd && a.value === le)) {
|
|
639
633
|
if (o.groups) {
|
|
640
|
-
let s =
|
|
641
|
-
if (!s && o.canSelectAll && (s =
|
|
634
|
+
let s = f.value?.find((m) => m.id === a.value);
|
|
635
|
+
if (!s && o.canSelectAll && (s = H()), s)
|
|
642
636
|
i(s);
|
|
643
637
|
else {
|
|
644
|
-
const
|
|
645
|
-
|
|
638
|
+
const m = f.value?.[0];
|
|
639
|
+
m && !a.value ? i(m) : i(re);
|
|
646
640
|
}
|
|
647
641
|
}
|
|
648
|
-
if (o.client && !o.groups && (
|
|
649
|
-
const s =
|
|
642
|
+
if (o.client && !o.groups && (a.value || a.value === Ke && !o.canSelectAll)) {
|
|
643
|
+
const s = $e(o.client).changeParams({
|
|
650
644
|
project_id: o.projectId,
|
|
651
|
-
id:
|
|
645
|
+
id: a.value,
|
|
652
646
|
filters: [
|
|
653
|
-
|
|
647
|
+
S
|
|
654
648
|
]
|
|
655
649
|
});
|
|
656
650
|
s?.setOptions({
|
|
657
651
|
checkFingerprint: "TopGroupSelectorFindGroup:" + o.projectId
|
|
658
652
|
});
|
|
659
|
-
const
|
|
660
|
-
if (!
|
|
661
|
-
!
|
|
653
|
+
const m = await s.call();
|
|
654
|
+
if (!m.errors?.length && !m.result) return;
|
|
655
|
+
!m.errors && m.result[0] ? i(m.result[0]) : i(re);
|
|
662
656
|
}
|
|
663
657
|
}
|
|
664
658
|
}
|
|
665
659
|
}, { immediate: !0 });
|
|
666
|
-
const
|
|
660
|
+
const g = async (d) => {
|
|
667
661
|
if (o.canAdd !== "api" || !u) return;
|
|
668
|
-
const s =
|
|
662
|
+
const s = n.value, m = await u.changeParams({
|
|
669
663
|
project_id: o.projectId,
|
|
670
664
|
names: [d.name],
|
|
671
|
-
to_id: o.folder?.id ??
|
|
665
|
+
to_id: o.folder?.id ?? R.id,
|
|
672
666
|
to_type: "in_folder_last"
|
|
673
667
|
}).call();
|
|
674
|
-
|
|
668
|
+
m.result ? (i(m.result), l("addGroup", m.result)) : i(s), c.value?.resetCache(!0);
|
|
675
669
|
};
|
|
676
|
-
return (d, s) => (
|
|
670
|
+
return (d, s) => (v(), j(Ie, {
|
|
677
671
|
ref_key: "refSelector",
|
|
678
|
-
ref:
|
|
672
|
+
ref: c,
|
|
679
673
|
class: "top-groupSelector_group",
|
|
680
|
-
modelValue:
|
|
681
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
682
|
-
items:
|
|
674
|
+
modelValue: n.value,
|
|
675
|
+
"onUpdate:modelValue": s[0] || (s[0] = (m) => n.value = m),
|
|
676
|
+
items: f.value ?? e.groups,
|
|
683
677
|
searchType: "inline",
|
|
684
678
|
icon: e.addIcon ? "" : void 0,
|
|
685
|
-
api: e.groups ? void 0 :
|
|
686
|
-
apiSetSearchParams: (...
|
|
679
|
+
api: e.groups ? void 0 : p(r),
|
|
680
|
+
apiSetSearchParams: (...m) => p(Se)(...m, "name"),
|
|
687
681
|
appendSearchToResult: !!e.canAdd,
|
|
688
|
-
useAllItem: e.canSelectAll ?
|
|
682
|
+
useAllItem: e.canSelectAll ? p(H)().name : !1,
|
|
689
683
|
addChanger: e.addChanger,
|
|
690
684
|
useCache: "",
|
|
691
|
-
onAppendItem:
|
|
685
|
+
onAppendItem: g
|
|
692
686
|
}, {
|
|
693
|
-
item:
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
687
|
+
item: C(({ item: m }) => [
|
|
688
|
+
L("div", jt, [
|
|
689
|
+
m.id === p(le) ? (v(), T("div", Tt, A(d.$i18n.Common.Add) + ": ", 1)) : _("", !0),
|
|
690
|
+
L("span", null, A(m.name), 1),
|
|
691
|
+
m.folder_path && e.showPath ? (v(), T("span", At, A(m.folder_path), 1)) : _("", !0)
|
|
698
692
|
])
|
|
699
693
|
]),
|
|
700
694
|
_: 1
|
|
701
695
|
}, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "appendSearchToResult", "useAllItem", "addChanger"]));
|
|
702
696
|
}
|
|
703
|
-
}),
|
|
697
|
+
}), bt = { class: "top-groupSelector" }, co = /* @__PURE__ */ G({
|
|
704
698
|
__name: "groupSelector",
|
|
705
699
|
props: /* @__PURE__ */ M({
|
|
706
700
|
folderId: {},
|
|
701
|
+
folder: {},
|
|
707
702
|
groupId: {},
|
|
708
703
|
group: {},
|
|
709
704
|
projectId: {},
|
|
710
705
|
folders: {},
|
|
711
706
|
groups: {},
|
|
712
|
-
on: { type: Boolean },
|
|
707
|
+
on: { type: Boolean, default: void 0 },
|
|
713
708
|
canSelectAllGroups: { type: Boolean },
|
|
714
709
|
canAddGroup: {},
|
|
715
710
|
autoselect: { default: "first" },
|
|
@@ -721,110 +716,393 @@ const vt = /* @__PURE__ */ R({
|
|
|
721
716
|
}, {
|
|
722
717
|
folderId: { required: !0 },
|
|
723
718
|
folderIdModifiers: {},
|
|
719
|
+
folder: {},
|
|
720
|
+
folderModifiers: {},
|
|
724
721
|
groupId: { required: !0 },
|
|
725
722
|
groupIdModifiers: {},
|
|
726
|
-
group: {},
|
|
723
|
+
group: { default: re },
|
|
727
724
|
groupModifiers: {}
|
|
728
725
|
}),
|
|
729
|
-
emits: /* @__PURE__ */ M(["update:groups"], ["update:folderId", "update:groupId", "update:group"]),
|
|
730
|
-
setup(e, { emit:
|
|
731
|
-
const o = e,
|
|
732
|
-
|
|
733
|
-
let
|
|
734
|
-
|
|
735
|
-
const
|
|
736
|
-
let
|
|
737
|
-
o.groups && i && (
|
|
726
|
+
emits: /* @__PURE__ */ M(["update:groups"], ["update:folderId", "update:folder", "update:groupId", "update:group"]),
|
|
727
|
+
setup(e, { emit: t }) {
|
|
728
|
+
const o = e, l = B(e, "folderId"), a = B(e, "folder"), n = B(e, "groupId"), r = B(e, "group"), u = t, c = xe(o.folders ?? { root: [R] }, o.canSelectAllGroups);
|
|
729
|
+
a.value = c.get(l.value);
|
|
730
|
+
let f = o.groups?.find((i) => i.id === n.value);
|
|
731
|
+
n.value || (f = o.groups?.[0]), o.canSelectAllGroups && !f && (f = H()), o.canSelectAllGroups && !f && (f = H()), (o.autoselect === "placeholder" || !f) && (f = Ne()), f ??= re, r.value = f;
|
|
732
|
+
const S = (i) => {
|
|
733
|
+
let g;
|
|
734
|
+
o.groups && i && (g = [...o.groups, i]), u("update:groups", g);
|
|
738
735
|
};
|
|
739
|
-
return (i,
|
|
740
|
-
e.showFolders ? (
|
|
736
|
+
return (i, g) => (v(), T("div", bt, [
|
|
737
|
+
e.showFolders ? (v(), j(xt, {
|
|
741
738
|
key: 0,
|
|
742
|
-
folderId:
|
|
743
|
-
"onUpdate:folderId":
|
|
744
|
-
folder:
|
|
745
|
-
"onUpdate:folder":
|
|
739
|
+
folderId: l.value,
|
|
740
|
+
"onUpdate:folderId": g[0] || (g[0] = (d) => l.value = d),
|
|
741
|
+
folder: a.value,
|
|
742
|
+
"onUpdate:folder": g[1] || (g[1] = (d) => a.value = d),
|
|
746
743
|
projectId: e.projectId,
|
|
747
744
|
folders: e.folders,
|
|
748
745
|
canSelectAll: e.canSelectAllGroups,
|
|
749
746
|
addChanger: e.addChanger,
|
|
750
747
|
addIcon: e.addIcon,
|
|
751
748
|
client: e.client
|
|
752
|
-
}, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client"])) :
|
|
753
|
-
e.showGroups ? (
|
|
749
|
+
}, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client"])) : _("", !0),
|
|
750
|
+
e.showGroups ? (v(), j(Bt, {
|
|
754
751
|
key: 1,
|
|
755
|
-
groupId:
|
|
756
|
-
"onUpdate:groupId":
|
|
757
|
-
group:
|
|
758
|
-
"onUpdate:group":
|
|
752
|
+
groupId: n.value,
|
|
753
|
+
"onUpdate:groupId": g[2] || (g[2] = (d) => n.value = d),
|
|
754
|
+
group: r.value,
|
|
755
|
+
"onUpdate:group": g[3] || (g[3] = (d) => r.value = d),
|
|
759
756
|
projectId: e.projectId,
|
|
760
|
-
folder:
|
|
757
|
+
folder: a.value,
|
|
761
758
|
groups: e.groups,
|
|
762
759
|
on: e.on,
|
|
763
760
|
canAdd: e.canAddGroup,
|
|
764
761
|
canSelectAll: e.canSelectAllGroups,
|
|
765
762
|
autoselect: e.autoselect,
|
|
766
763
|
addChanger: e.addChanger,
|
|
764
|
+
showPath: e.showFolders && !!e.folders?.[0],
|
|
767
765
|
addIcon: e.addIcon,
|
|
768
766
|
client: e.client,
|
|
769
|
-
onAddGroup:
|
|
770
|
-
}, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "addIcon", "client"])) :
|
|
767
|
+
onAddGroup: S
|
|
768
|
+
}, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "showPath", "addIcon", "client"])) : _("", !0)
|
|
771
769
|
]));
|
|
772
770
|
}
|
|
773
|
-
}),
|
|
774
|
-
|
|
775
|
-
|
|
771
|
+
}), $t = { class: "top-projectSelectorSubmenu_item" }, wt = ["href", "title", "data-top-icon", "data-right"], Mt = { class: "top-projectSelectorSubmenu_item" }, Pt = ["href"], Vt = /* @__PURE__ */ G({
|
|
772
|
+
__name: "submenu",
|
|
773
|
+
props: {
|
|
774
|
+
id: {},
|
|
775
|
+
right: {},
|
|
776
|
+
url: {}
|
|
777
|
+
},
|
|
778
|
+
setup(e) {
|
|
779
|
+
const t = e, o = b();
|
|
780
|
+
let l = [
|
|
781
|
+
{
|
|
782
|
+
href: `/project/keywords/${t.id}/`,
|
|
783
|
+
title: o.Common.Menu_phrases,
|
|
784
|
+
icon: "",
|
|
785
|
+
right: "2"
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
href: `/project/dynamics/${t.id}/`,
|
|
789
|
+
title: o.Common.Menu_dynamics,
|
|
790
|
+
icon: "",
|
|
791
|
+
right: "1"
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
href: `/project/snapshots/${t.id}/`,
|
|
795
|
+
title: o.Common.Menu_snapshots,
|
|
796
|
+
icon: "",
|
|
797
|
+
right: "1"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
href: `/project/competitors/${t.id}/`,
|
|
801
|
+
title: o.Common.Menu_competitors,
|
|
802
|
+
icon: "",
|
|
803
|
+
right: "1"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
href: `/project/analytics/${t.id}/`,
|
|
807
|
+
title: o.Common.Menu_analytics,
|
|
808
|
+
icon: "",
|
|
809
|
+
right: "5"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
href: `/project/broker/${t.id}/`,
|
|
813
|
+
title: o.Common.Menu_broker,
|
|
814
|
+
icon: "",
|
|
815
|
+
right: "6"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
href: `/project/audit/${t.id}/sitemap/`,
|
|
819
|
+
title: o.Audit.Sitemap_gen,
|
|
820
|
+
icon: "",
|
|
821
|
+
right: "8"
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
href: `/project/audit/${t.id}/audit/`,
|
|
825
|
+
title: o.Common.Menu_audit,
|
|
826
|
+
icon: "",
|
|
827
|
+
right: "8"
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
href: `//project/audit/${t.id}/indexing/`,
|
|
831
|
+
title: o.Audit.Indexing,
|
|
832
|
+
icon: "",
|
|
833
|
+
right: "8"
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
href: `/project/audit/${t.id}/watcher/`,
|
|
837
|
+
title: o.Audit.Watcher,
|
|
838
|
+
icon: "",
|
|
839
|
+
right: "9"
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
href: `/project/settings/${t.id}/`,
|
|
843
|
+
title: o.Common.Menu_settings,
|
|
844
|
+
icon: "",
|
|
845
|
+
right: "2"
|
|
846
|
+
}
|
|
847
|
+
];
|
|
848
|
+
const a = w(() => t.right.includes("0") ? l.filter((n) => t.right[n.right] === "1") : l);
|
|
849
|
+
return (n, r) => {
|
|
850
|
+
const u = Ee("TopButton");
|
|
851
|
+
return v(), j(p(he), {
|
|
852
|
+
class: "top-projectSelectorSubmenu",
|
|
853
|
+
notch: !1,
|
|
854
|
+
pos: "2"
|
|
855
|
+
}, {
|
|
856
|
+
opener: C(() => [
|
|
857
|
+
E(u, {
|
|
858
|
+
class: "top-projectSelectorSubmenu_opener",
|
|
859
|
+
"data-top-icon": "",
|
|
860
|
+
color: "theme"
|
|
861
|
+
})
|
|
862
|
+
]),
|
|
863
|
+
contentList: C(() => [
|
|
864
|
+
(v(!0), T(q, null, se(a.value, (c) => (v(), T("li", $t, [
|
|
865
|
+
L("a", {
|
|
866
|
+
href: c.href,
|
|
867
|
+
title: c.title,
|
|
868
|
+
"data-top-icon": c.icon,
|
|
869
|
+
"data-right": c.right
|
|
870
|
+
}, null, 8, wt)
|
|
871
|
+
]))), 256)),
|
|
872
|
+
L("li", Mt, [
|
|
873
|
+
L("a", {
|
|
874
|
+
href: e.url,
|
|
875
|
+
"data-top-icon": "",
|
|
876
|
+
target: "_blank"
|
|
877
|
+
}, null, 8, Pt)
|
|
878
|
+
])
|
|
879
|
+
]),
|
|
880
|
+
_: 1
|
|
881
|
+
});
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
}), ge = (e) => ({
|
|
885
|
+
id: null,
|
|
886
|
+
name: e,
|
|
887
|
+
listItemProps: {
|
|
888
|
+
type: "title"
|
|
889
|
+
}
|
|
890
|
+
}), _t = (e) => {
|
|
891
|
+
const t = b();
|
|
892
|
+
return [
|
|
893
|
+
{ filter: (l) => l.right.startsWith("1") && l.on > 0, title: ge(t.Projects.Scheduled_update) },
|
|
894
|
+
{ filter: (l) => l.right.startsWith("1") && l.on === 0, title: ge(t.Projects.Manual_update) },
|
|
895
|
+
{ filter: (l) => l.right.startsWith("0") && l.on >= 0, title: ge(t.Projects.Guest_projects) }
|
|
896
|
+
].flatMap(({ filter: l, title: a }) => {
|
|
897
|
+
const n = e.filter(l);
|
|
898
|
+
return n.length ? [a, ...n] : [];
|
|
899
|
+
});
|
|
900
|
+
}, Et = (e) => e.map((t) => ({
|
|
901
|
+
...t,
|
|
902
|
+
listItemProps: {
|
|
903
|
+
class: "top-projectSelector_item",
|
|
904
|
+
href: qe(Number(t.id)),
|
|
905
|
+
title: t.name
|
|
906
|
+
}
|
|
907
|
+
})), pe = (e, t) => {
|
|
908
|
+
if (!e) return;
|
|
909
|
+
t && (e = e.filter((l) => l.id !== t));
|
|
910
|
+
const o = Et(e);
|
|
911
|
+
return _t(o);
|
|
912
|
+
}, Gt = (e) => {
|
|
913
|
+
if (!e) return "";
|
|
914
|
+
let t = e;
|
|
915
|
+
return t = t.replace(/historyView=[^&]*/, ""), t = t.replace(/competitorsIds=[^&]*/, ""), t = t.replace(/searchersKeys=[^&]*/, ""), t = t.replace(/regionIndex=[^&]*/, ""), t = t.replace(/regionsIndexes=[^&]*/, ""), t = t.replace(/folderId=[^&]*/, ""), t = t.replace(/groupId=[^&]*/, ""), t = t.replace(/tags=[^&]*/, ""), window.mo?.getHash && !window.mo.getHash("dataSort").toString().includes("0000-00-00") && (t = t.replace(/dataSort=[^&]*/, "")), t = t.replace(/%22historyView%22:[^,]*,/, ""), t = t.replace(/%22competitorsIds%22:\[[^\]]*\],/, ""), t = t.replace(/%22searchersKeys%22:\[[^\]]*\],/, ""), t = t.replace(/%22regionIndex%22:[^,]*,/, ""), t = t.replace(/%22regionsIndexes%22:\[[^\]]*\],/, ""), t = t.replace(/%22folderId%22:[^,]*,/, ""), t = t.replace(/%22groupId%22:[^,]*,/, ""), t = t.replace(/%22tagsIds%22:\[[^\]]*\],/, ""), /%22dataSort%22:\{[^\}]*0000-00-00[^\}]*\}/.test(t) || (t = t.replace(/%22dataSort%22:\{[^\}]*\},/, "")), t;
|
|
916
|
+
}, qe = (e) => {
|
|
917
|
+
const t = location.pathname.split("/");
|
|
918
|
+
let o = "project/dynamics/", l = "";
|
|
919
|
+
t[1] == "project" && (o = t[1] + "/" + t[2] + "/"), ["watcher", "indexing", "sitemap", "audit", "direct", "adwords"].includes(t[4]) && (l = t[4] + "/");
|
|
920
|
+
let a = "/" + o + e + "/" + l;
|
|
921
|
+
const n = Gt(location.hash);
|
|
922
|
+
return a += n, a;
|
|
923
|
+
}, we = (e) => {
|
|
924
|
+
let t = e.startsWith("http") ? e : "http://" + e;
|
|
925
|
+
return t = t.replace(/"/g, "%22"), t;
|
|
926
|
+
}, Kt = (e, t) => {
|
|
927
|
+
const o = e.gen("/get/projects_2/projects/", ["id", "user_id", "name", "url", "on", "right"]);
|
|
928
|
+
return o.options.onApiLoaded = (l, a, n) => {
|
|
929
|
+
l.result = pe(l.result, t), n?.(l, a);
|
|
930
|
+
}, o;
|
|
931
|
+
}, Lt = (e) => e.gen("/add/projects_2/projects/"), Ot = { class: "top-projectSelector_itemText" }, Rt = { class: "top-projectSelector_itemName" }, Nt = { class: "top-projectSelector_itemId" }, qt = { key: 1 }, Dt = {
|
|
932
|
+
key: 0,
|
|
933
|
+
class: "top-comment"
|
|
934
|
+
}, go = /* @__PURE__ */ G({
|
|
935
|
+
__name: "projectSelector",
|
|
936
|
+
props: /* @__PURE__ */ M({
|
|
937
|
+
project: {},
|
|
938
|
+
projects: {},
|
|
939
|
+
userId: { default: window.mo?.user?.id },
|
|
940
|
+
icon: {},
|
|
941
|
+
modificator: { default: "projectSelector" },
|
|
942
|
+
excludeProjectId: {},
|
|
943
|
+
placeholder: {},
|
|
944
|
+
openerText: {},
|
|
945
|
+
buttonProps: {},
|
|
946
|
+
openerShortcut: {},
|
|
947
|
+
client: {}
|
|
948
|
+
}, {
|
|
949
|
+
project: {
|
|
950
|
+
default: { id: le, name: "" }
|
|
951
|
+
},
|
|
952
|
+
projectModifiers: {}
|
|
953
|
+
}),
|
|
954
|
+
emits: ["update:project"],
|
|
955
|
+
setup(e) {
|
|
956
|
+
const t = b(), o = e, l = w(() => o.placeholder ?? t.Projects.Select_project), a = w(() => o.openerText ?? t.Common.Projects), n = B(e, "project");
|
|
957
|
+
n.value.name || (n.value.name = a.value);
|
|
958
|
+
const r = o.client ? Kt(o.client, o.excludeProjectId) : void 0, u = o.client ? Lt(o.client) : void 0, c = V(pe(o.projects, o.excludeProjectId)), f = V(null);
|
|
959
|
+
P([() => o.projects, () => o.excludeProjectId], () => {
|
|
960
|
+
c.value = pe(o.projects, o.excludeProjectId);
|
|
961
|
+
});
|
|
962
|
+
const S = async (i) => {
|
|
963
|
+
if (!u) return;
|
|
964
|
+
const g = await u.changeParams({
|
|
965
|
+
url: i.name,
|
|
966
|
+
name: i.name
|
|
967
|
+
}).call();
|
|
968
|
+
if (!g.errors)
|
|
969
|
+
if (o.projects) {
|
|
970
|
+
const d = {
|
|
971
|
+
id: Number(g.result),
|
|
972
|
+
url: i.name,
|
|
973
|
+
name: i.name,
|
|
974
|
+
user_id: o.userId,
|
|
975
|
+
on: 0,
|
|
976
|
+
right: "11111111111111111111",
|
|
977
|
+
listItemProps: {
|
|
978
|
+
class: "top-projectSelector_item",
|
|
979
|
+
href: qe(Number(g.result))
|
|
980
|
+
}
|
|
981
|
+
};
|
|
982
|
+
c.value?.unshift(d);
|
|
983
|
+
} else
|
|
984
|
+
f.value?.resetCache(!0);
|
|
985
|
+
};
|
|
986
|
+
return Ue(() => {
|
|
987
|
+
n.value.name || (n.value.name = a.value);
|
|
988
|
+
}), (i, g) => {
|
|
989
|
+
const d = Ee("TopButton");
|
|
990
|
+
return v(), j(Ie, {
|
|
991
|
+
ref_key: "refSelector",
|
|
992
|
+
ref: f,
|
|
993
|
+
class: "top-projectSelector",
|
|
994
|
+
modelValue: n.value,
|
|
995
|
+
"onUpdate:modelValue": g[1] || (g[1] = (s) => n.value = s),
|
|
996
|
+
items: c.value,
|
|
997
|
+
title: i.$i18n.Projects.Search_projects,
|
|
998
|
+
icon: e.icon,
|
|
999
|
+
modificator: e.modificator,
|
|
1000
|
+
placeholder: l.value,
|
|
1001
|
+
api: e.projects ? void 0 : p(r),
|
|
1002
|
+
apiSetSearchParams: e.projects ? void 0 : (...s) => p(Se)(...s, "name"),
|
|
1003
|
+
useCache: "",
|
|
1004
|
+
appendSearchToResult: "",
|
|
1005
|
+
appendSearchToResultCond: p(Ae),
|
|
1006
|
+
buttonProps: e.buttonProps,
|
|
1007
|
+
openerShortcut: e.openerShortcut,
|
|
1008
|
+
onAppendItem: S
|
|
1009
|
+
}, {
|
|
1010
|
+
widgetAction: C(() => [
|
|
1011
|
+
i.$core.state.isMobile ? _("", !0) : (v(), j(d, {
|
|
1012
|
+
key: 0,
|
|
1013
|
+
class: "top-projectSelector_cancel closer",
|
|
1014
|
+
color: "theme"
|
|
1015
|
+
}, {
|
|
1016
|
+
default: C(() => [
|
|
1017
|
+
N(A(i.$i18n.Common.Cancel), 1)
|
|
1018
|
+
]),
|
|
1019
|
+
_: 1
|
|
1020
|
+
}))
|
|
1021
|
+
]),
|
|
1022
|
+
item: C(({ item: s }) => [
|
|
1023
|
+
s.id ? (v(), T(q, { key: 0 }, [
|
|
1024
|
+
L("div", Ot, [
|
|
1025
|
+
L("span", Rt, A(s.name), 1),
|
|
1026
|
+
L("span", Nt, " id " + A(s.id), 1)
|
|
1027
|
+
]),
|
|
1028
|
+
E(d, {
|
|
1029
|
+
class: "top-projectSelector_itemLink",
|
|
1030
|
+
href: p(we)(s.url),
|
|
1031
|
+
"data-top-icon": "",
|
|
1032
|
+
color: "theme",
|
|
1033
|
+
target: "_blank",
|
|
1034
|
+
onClick: g[0] || (g[0] = D(() => {
|
|
1035
|
+
}, ["stop"]))
|
|
1036
|
+
}, null, 8, ["href"]),
|
|
1037
|
+
E(Vt, {
|
|
1038
|
+
id: s.id,
|
|
1039
|
+
right: s.right ?? void 0,
|
|
1040
|
+
url: p(we)(s.url)
|
|
1041
|
+
}, null, 8, ["id", "right", "url"])
|
|
1042
|
+
], 64)) : (v(), T("div", qt, [
|
|
1043
|
+
p(Ae)(s.name) ? (v(), T("div", Dt, A(i.$i18n.Projects.Add_project) + ": ", 1)) : _("", !0),
|
|
1044
|
+
N(" " + A(s.name), 1)
|
|
1045
|
+
]))
|
|
1046
|
+
]),
|
|
1047
|
+
_: 1
|
|
1048
|
+
}, 8, ["modelValue", "items", "title", "icon", "modificator", "placeholder", "api", "apiSetSearchParams", "appendSearchToResultCond", "buttonProps", "openerShortcut"]);
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
}), Me = (e) => "-" + e, X = (e) => e[0] === "-" ? e.substring(1) : e, de = (e, t) => {
|
|
1052
|
+
e = X(e);
|
|
1053
|
+
const o = t.find((l) => l.id === e);
|
|
776
1054
|
if (o)
|
|
777
1055
|
return o;
|
|
778
|
-
},
|
|
779
|
-
|
|
780
|
-
const
|
|
781
|
-
return
|
|
782
|
-
|
|
783
|
-
const
|
|
784
|
-
model:
|
|
1056
|
+
}, fo = (e, t, o) => {
|
|
1057
|
+
t || (t = { id: e.id }), t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
|
|
1058
|
+
const l = at.genElPopupOpener("div", t);
|
|
1059
|
+
return l.classList.add("top-tagSelector"), e.useTopButton && l.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || l.classList.add("top-tagSelector-custom"), e.mode === "filter" && l.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && l.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && l.classList.add("top-tagSelector-setter_several"), l.onclick = (a) => {
|
|
1060
|
+
a.preventDefault(), a.stopPropagation(), l.onclick = null;
|
|
1061
|
+
const n = V(e.modelValue), r = {
|
|
1062
|
+
model: n,
|
|
785
1063
|
mode: e.mode,
|
|
786
1064
|
targetId: e.targetId,
|
|
787
1065
|
filters: e.filters,
|
|
788
1066
|
payload: e.payload
|
|
789
1067
|
};
|
|
790
|
-
|
|
791
|
-
e.modelValue =
|
|
792
|
-
}),
|
|
793
|
-
},
|
|
794
|
-
e.modelValue =
|
|
795
|
-
const
|
|
796
|
-
|
|
797
|
-
}),
|
|
798
|
-
},
|
|
799
|
-
|
|
800
|
-
},
|
|
801
|
-
const
|
|
802
|
-
if (e.classList.toggle("top-tagSelector-selectedOne", !
|
|
1068
|
+
Y(l, "topTagSelectorTarget", r), delete l.dataset.topPopupDisabled, Ce(e.modelValue) || P(n, () => {
|
|
1069
|
+
e.modelValue = n.value, oe(l, e, o);
|
|
1070
|
+
}), l.click();
|
|
1071
|
+
}, Ce(e.modelValue) ? P(e.modelValue, () => oe(l, e, o)) : Y(l, "topTagSelectorRender", (a) => {
|
|
1072
|
+
e.modelValue = a;
|
|
1073
|
+
const n = Y(l, "topTagSelectorTarget");
|
|
1074
|
+
n && (n.model.value = a), oe(l, e, o);
|
|
1075
|
+
}), oe(l, e, o), l;
|
|
1076
|
+
}, mo = (e, t) => {
|
|
1077
|
+
Y(e, "topTagSelectorRender")?.(t);
|
|
1078
|
+
}, oe = (e, t, o) => {
|
|
1079
|
+
const l = p(t.modelValue);
|
|
1080
|
+
if (e.classList.toggle("top-tagSelector-selectedOne", !l.length || l.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", l.length > 5), t.mode === "setter" && t.filters) {
|
|
803
1081
|
e.innerHTML = `<div>${o}</div>`;
|
|
804
1082
|
return;
|
|
805
1083
|
}
|
|
806
|
-
if (e.innerHTML = "", !
|
|
807
|
-
const
|
|
1084
|
+
if (e.innerHTML = "", !l.length && t.mode === "filter") {
|
|
1085
|
+
const a = Pe({
|
|
808
1086
|
id: "all",
|
|
809
1087
|
colorId: "",
|
|
810
|
-
name:
|
|
1088
|
+
name: b().Common?.All_tags ?? "",
|
|
811
1089
|
state: ""
|
|
812
1090
|
});
|
|
813
|
-
e.append(
|
|
1091
|
+
e.append(a);
|
|
814
1092
|
}
|
|
815
|
-
|
|
816
|
-
const
|
|
817
|
-
id:
|
|
818
|
-
colorId:
|
|
819
|
-
name:
|
|
820
|
-
state:
|
|
1093
|
+
l.forEach((a) => {
|
|
1094
|
+
const n = Pe({
|
|
1095
|
+
id: X(a),
|
|
1096
|
+
colorId: de(a, t.tags)?.color_id ?? "",
|
|
1097
|
+
name: de(a, t.tags)?.name ?? "",
|
|
1098
|
+
state: X(a) === a ? "selected" : "excluded"
|
|
821
1099
|
});
|
|
822
|
-
e.append(
|
|
1100
|
+
e.append(n);
|
|
823
1101
|
});
|
|
824
|
-
},
|
|
825
|
-
const
|
|
826
|
-
return
|
|
827
|
-
},
|
|
1102
|
+
}, Pe = (e) => {
|
|
1103
|
+
const t = document.createElement("div");
|
|
1104
|
+
return t.classList.add("top-tagSelector_tagIcon"), t.classList.toggle("top-tagSelector-active", !!e.state), t.classList.toggle("top-tagSelector-excluded", e.state === "excluded"), t.dataset.tag_id = e.id, t.dataset.tag_color_id = e.colorId, t.title = e.name, t;
|
|
1105
|
+
}, Ut = [
|
|
828
1106
|
{
|
|
829
1107
|
id: "1",
|
|
830
1108
|
name: "Without Tag",
|
|
@@ -875,7 +1153,7 @@ const vt = /* @__PURE__ */ R({
|
|
|
875
1153
|
name: "Turquoise",
|
|
876
1154
|
color_id: "10"
|
|
877
1155
|
}
|
|
878
|
-
],
|
|
1156
|
+
], Ft = ["data-tag_id", "data-tag_color_id", "title"], ve = /* @__PURE__ */ G({
|
|
879
1157
|
__name: "tagIcon",
|
|
880
1158
|
props: {
|
|
881
1159
|
id: {},
|
|
@@ -884,8 +1162,8 @@ const vt = /* @__PURE__ */ R({
|
|
|
884
1162
|
state: {}
|
|
885
1163
|
},
|
|
886
1164
|
setup(e) {
|
|
887
|
-
return (
|
|
888
|
-
class:
|
|
1165
|
+
return (t, o) => (v(), T("div", {
|
|
1166
|
+
class: Z({
|
|
889
1167
|
"top-tagSelector_tagIcon": !0,
|
|
890
1168
|
"top-tagSelector-active": !!e.state,
|
|
891
1169
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
@@ -893,9 +1171,9 @@ const vt = /* @__PURE__ */ R({
|
|
|
893
1171
|
"data-tag_id": e.id,
|
|
894
1172
|
"data-tag_color_id": e.colorId,
|
|
895
1173
|
title: e.name
|
|
896
|
-
}, null, 10,
|
|
1174
|
+
}, null, 10, Ft));
|
|
897
1175
|
}
|
|
898
|
-
}),
|
|
1176
|
+
}), Wt = ["contenteditable", "onKeydown"], Ve = /* @__PURE__ */ G({
|
|
899
1177
|
__name: "tagPopupListItem",
|
|
900
1178
|
props: /* @__PURE__ */ M({
|
|
901
1179
|
editable: { type: Boolean },
|
|
@@ -912,25 +1190,25 @@ const vt = /* @__PURE__ */ R({
|
|
|
912
1190
|
nameModifiers: {}
|
|
913
1191
|
}),
|
|
914
1192
|
emits: /* @__PURE__ */ M(["update:name", "unselect", "exclude", "select"], ["update:name"]),
|
|
915
|
-
setup(e, { emit:
|
|
916
|
-
const o = e,
|
|
1193
|
+
setup(e, { emit: t }) {
|
|
1194
|
+
const o = e, l = t, a = B(e, "name"), n = V(null), r = w(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
917
1195
|
contenteditable: u.value,
|
|
918
|
-
onpaste: (
|
|
919
|
-
} : {}), u =
|
|
920
|
-
u.value = !0, await
|
|
921
|
-
},
|
|
922
|
-
const
|
|
923
|
-
if (!
|
|
924
|
-
|
|
925
|
-
},
|
|
926
|
-
|
|
927
|
-
}, i = (
|
|
1196
|
+
onpaste: (g) => g.preventDefault()
|
|
1197
|
+
} : {}), u = V(!1), c = async () => {
|
|
1198
|
+
u.value = !0, await Fe(), n.value?.focus();
|
|
1199
|
+
}, f = () => {
|
|
1200
|
+
const g = n.value?.innerText;
|
|
1201
|
+
if (!g) return S();
|
|
1202
|
+
n.value && (n.value.innerText = g), u.value = !1, l("update:name", g);
|
|
1203
|
+
}, S = async () => {
|
|
1204
|
+
n.value && (n.value.innerText = o.name), u.value = !1;
|
|
1205
|
+
}, i = (g) => {
|
|
928
1206
|
if (u.value || o.disabled) return;
|
|
929
1207
|
let d = "selected";
|
|
930
|
-
o.canExclude && (
|
|
1208
|
+
o.canExclude && (g.ctrlKey || g.metaKey) && (d = "excluded"), o.state == d && (d = ""), d === "" && l("unselect"), d === "selected" && l("select"), d === "excluded" && l("exclude");
|
|
931
1209
|
};
|
|
932
|
-
return (
|
|
933
|
-
class:
|
|
1210
|
+
return (g, d) => (v(), j(ye, {
|
|
1211
|
+
class: Z({
|
|
934
1212
|
"top-tagSelector_tagListItem": !0,
|
|
935
1213
|
"top-tagSelector_tagListItem-inEdit": u.value,
|
|
936
1214
|
"top-tagSelector_tagListItem-disabled": e.disabled,
|
|
@@ -938,44 +1216,44 @@ const vt = /* @__PURE__ */ R({
|
|
|
938
1216
|
"top-tagSelector-active": !!e.state,
|
|
939
1217
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
940
1218
|
}),
|
|
941
|
-
onClick:
|
|
1219
|
+
onClick: D(i, ["stop"])
|
|
942
1220
|
}, {
|
|
943
|
-
default:
|
|
944
|
-
|
|
1221
|
+
default: C(() => [
|
|
1222
|
+
E(ve, {
|
|
945
1223
|
id: e.id,
|
|
946
|
-
name:
|
|
1224
|
+
name: a.value,
|
|
947
1225
|
colorId: e.colorId,
|
|
948
1226
|
state: e.state
|
|
949
1227
|
}, null, 8, ["id", "name", "colorId", "state"]),
|
|
950
|
-
|
|
1228
|
+
L("span", Ge({
|
|
951
1229
|
ref_key: "elName",
|
|
952
|
-
ref:
|
|
1230
|
+
ref: n,
|
|
953
1231
|
class: "top-tagSelector_tagListItemName",
|
|
954
1232
|
contenteditable: u.value ? "plaintext-only" : !1
|
|
955
|
-
},
|
|
1233
|
+
}, r.value, {
|
|
956
1234
|
onKeydown: [
|
|
957
|
-
|
|
958
|
-
|
|
1235
|
+
je(D(f, ["stop"]), ["enter"]),
|
|
1236
|
+
je(D(S, ["stop"]), ["esc"])
|
|
959
1237
|
]
|
|
960
|
-
}),
|
|
961
|
-
e.editable ? (
|
|
962
|
-
u.value ? (
|
|
1238
|
+
}), A(a.value), 17, Wt),
|
|
1239
|
+
e.editable ? (v(), T(q, { key: 0 }, [
|
|
1240
|
+
u.value ? (v(), T("span", {
|
|
963
1241
|
key: 1,
|
|
964
1242
|
"data-top-icon": "",
|
|
965
1243
|
class: "top-tagSelector_edit",
|
|
966
|
-
onClick:
|
|
967
|
-
})) : (
|
|
1244
|
+
onClick: D(f, ["stop"])
|
|
1245
|
+
})) : (v(), T("span", {
|
|
968
1246
|
key: 0,
|
|
969
1247
|
"data-top-icon": "",
|
|
970
1248
|
class: "top-tagSelector_edit",
|
|
971
|
-
onClick:
|
|
1249
|
+
onClick: c
|
|
972
1250
|
}))
|
|
973
|
-
], 64)) :
|
|
1251
|
+
], 64)) : _("", !0)
|
|
974
1252
|
]),
|
|
975
1253
|
_: 1
|
|
976
1254
|
}, 8, ["class"]));
|
|
977
1255
|
}
|
|
978
|
-
}),
|
|
1256
|
+
}), zt = { key: 1 }, Jt = /* @__PURE__ */ G({
|
|
979
1257
|
inheritAttrs: !1,
|
|
980
1258
|
__name: "popupOpener",
|
|
981
1259
|
props: /* @__PURE__ */ M({
|
|
@@ -996,59 +1274,59 @@ const vt = /* @__PURE__ */ R({
|
|
|
996
1274
|
}),
|
|
997
1275
|
emits: ["update:modelValue"],
|
|
998
1276
|
setup(e) {
|
|
999
|
-
const
|
|
1277
|
+
const t = e, o = B(e, "modelValue"), l = t.useTopButton ? Q : "div", a = t.useTopButton ? "html" : "default", n = {
|
|
1000
1278
|
model: o,
|
|
1001
|
-
mode:
|
|
1002
|
-
targetId:
|
|
1003
|
-
filters:
|
|
1004
|
-
payload:
|
|
1279
|
+
mode: t.mode,
|
|
1280
|
+
targetId: t.targetId,
|
|
1281
|
+
filters: t.filters,
|
|
1282
|
+
payload: t.payload
|
|
1005
1283
|
};
|
|
1006
|
-
return (
|
|
1007
|
-
const
|
|
1008
|
-
return
|
|
1009
|
-
default:
|
|
1010
|
-
|
|
1284
|
+
return (r, u) => {
|
|
1285
|
+
const c = We("top-data");
|
|
1286
|
+
return v(), j(Ze, { id: e.id }, {
|
|
1287
|
+
default: C(() => [
|
|
1288
|
+
ze((v(), j(Je(p(l)), Ge({
|
|
1011
1289
|
class: {
|
|
1012
1290
|
"top-tagSelector": !0,
|
|
1013
|
-
"top-tagSelector-useTopButton":
|
|
1014
|
-
"top-tagSelector-custom": !
|
|
1015
|
-
"top-as-selector":
|
|
1016
|
-
"top-tagSelector-filter":
|
|
1017
|
-
"top-tagSelector-setter_single":
|
|
1018
|
-
"top-tagSelector-setter_several":
|
|
1291
|
+
"top-tagSelector-useTopButton": t.useTopButton,
|
|
1292
|
+
"top-tagSelector-custom": !t.useTopButton,
|
|
1293
|
+
"top-as-selector": t.useTopButton,
|
|
1294
|
+
"top-tagSelector-filter": t.mode === "filter",
|
|
1295
|
+
"top-tagSelector-setter_single": t.mode === "setter" && !e.filters,
|
|
1296
|
+
"top-tagSelector-setter_several": t.mode === "setter" && e.filters,
|
|
1019
1297
|
"top-tagSelector-selectedOne": !o.value.length || o.value.length === 1,
|
|
1020
1298
|
"top-tagSelector-toTwoLine": o.value.length > 5
|
|
1021
1299
|
},
|
|
1022
1300
|
color: "theme",
|
|
1023
1301
|
styling: e.styling
|
|
1024
|
-
},
|
|
1025
|
-
[
|
|
1026
|
-
!o.value.length && e.mode === "filter" ? (
|
|
1302
|
+
}, r.$attrs), {
|
|
1303
|
+
[p(a)]: C(() => [
|
|
1304
|
+
!o.value.length && e.mode === "filter" ? (v(), j(ve, {
|
|
1027
1305
|
key: 0,
|
|
1028
1306
|
id: "all",
|
|
1029
1307
|
colorId: "",
|
|
1030
|
-
name:
|
|
1308
|
+
name: r.$i18n.Common.All_tags ?? "",
|
|
1031
1309
|
state: ""
|
|
1032
|
-
}, null, 8, ["name"])) :
|
|
1033
|
-
e.mode === "setter" && e.filters ? (
|
|
1034
|
-
|
|
1035
|
-
])) : (
|
|
1036
|
-
id:
|
|
1037
|
-
colorId:
|
|
1038
|
-
name:
|
|
1039
|
-
state:
|
|
1310
|
+
}, null, 8, ["name"])) : _("", !0),
|
|
1311
|
+
e.mode === "setter" && e.filters ? (v(), T("div", zt, [
|
|
1312
|
+
Ye(r.$slots, "default")
|
|
1313
|
+
])) : (v(!0), T(q, { key: 2 }, se(o.value, (f) => (v(), j(ve, {
|
|
1314
|
+
id: p(X)(f),
|
|
1315
|
+
colorId: p(de)(f, e.tags)?.color_id ?? "",
|
|
1316
|
+
name: p(de)(f, e.tags)?.name ?? "",
|
|
1317
|
+
state: p(X)(f) === f ? "selected" : "excluded"
|
|
1040
1318
|
}, null, 8, ["id", "colorId", "name", "state"]))), 256))
|
|
1041
1319
|
]),
|
|
1042
1320
|
_: 2
|
|
1043
1321
|
}, 1040, ["class", "styling"])), [
|
|
1044
|
-
[
|
|
1322
|
+
[c, n, "topTagSelectorTarget"]
|
|
1045
1323
|
])
|
|
1046
1324
|
]),
|
|
1047
1325
|
_: 3
|
|
1048
1326
|
}, 8, ["id"]);
|
|
1049
1327
|
};
|
|
1050
1328
|
}
|
|
1051
|
-
}),
|
|
1329
|
+
}), po = /* @__PURE__ */ G({
|
|
1052
1330
|
__name: "tagSelector",
|
|
1053
1331
|
props: /* @__PURE__ */ M({
|
|
1054
1332
|
modelValue: {},
|
|
@@ -1068,177 +1346,177 @@ const vt = /* @__PURE__ */ R({
|
|
|
1068
1346
|
},
|
|
1069
1347
|
modelModifiers: {},
|
|
1070
1348
|
tags: {
|
|
1071
|
-
default:
|
|
1349
|
+
default: _e(Ut)
|
|
1072
1350
|
},
|
|
1073
1351
|
tagsModifiers: {}
|
|
1074
1352
|
}),
|
|
1075
1353
|
emits: /* @__PURE__ */ M(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
|
|
1076
|
-
setup(e, { emit:
|
|
1077
|
-
const o =
|
|
1078
|
-
|
|
1079
|
-
},
|
|
1080
|
-
|
|
1081
|
-
const
|
|
1082
|
-
const
|
|
1083
|
-
return I.set("add", { value: "add", title: o.Common.Add +
|
|
1354
|
+
setup(e, { emit: t }) {
|
|
1355
|
+
const o = b(), l = e, a = B(e, "modelValue"), n = B(e, "tags"), r = t, u = Xe((h, I) => {
|
|
1356
|
+
r(h, I);
|
|
1357
|
+
}, l.emitDelay);
|
|
1358
|
+
l.singleMode && !a.value.length && (a.value = [n.value[0].id]);
|
|
1359
|
+
const c = l.id ?? "top-popup-id-" + Math.random(), f = V("add"), S = () => {
|
|
1360
|
+
const h = " " + o.Common.Tags?.toLowerCase(), I = /* @__PURE__ */ new Map();
|
|
1361
|
+
return I.set("add", { value: "add", title: o.Common.Add + h }), I.set("replace", { value: "replace", title: o.Common.Replace + h }), I.set("delete", { value: "delete", title: o.Common.Delete + h }), I;
|
|
1084
1362
|
};
|
|
1085
|
-
let i =
|
|
1086
|
-
model:
|
|
1363
|
+
let i = He({
|
|
1364
|
+
model: a,
|
|
1087
1365
|
mode: "filter",
|
|
1088
1366
|
targetId: void 0,
|
|
1089
1367
|
filters: void 0,
|
|
1090
1368
|
payload: void 0
|
|
1091
1369
|
});
|
|
1092
|
-
|
|
1093
|
-
u("selector",
|
|
1370
|
+
P(a, () => {
|
|
1371
|
+
u("selector", a.value);
|
|
1094
1372
|
});
|
|
1095
|
-
const
|
|
1096
|
-
if (i.value.mode === "setter" &&
|
|
1097
|
-
return i.value.model.value.length >=
|
|
1098
|
-
}), d = (
|
|
1099
|
-
if (
|
|
1100
|
-
if (i.value.model.value.includes(
|
|
1101
|
-
if (i.value.model.value.includes(
|
|
1373
|
+
const g = w(() => {
|
|
1374
|
+
if (i.value.mode === "setter" && l.maxTagsForSetter && !i.value.filters)
|
|
1375
|
+
return i.value.model.value.length >= l.maxTagsForSetter;
|
|
1376
|
+
}), d = (h) => {
|
|
1377
|
+
if (h !== "all") {
|
|
1378
|
+
if (i.value.model.value.includes(h)) return "selected";
|
|
1379
|
+
if (i.value.model.value.includes(Me(h))) return "excluded";
|
|
1102
1380
|
}
|
|
1103
|
-
return
|
|
1104
|
-
}, s = (
|
|
1105
|
-
const
|
|
1106
|
-
let k = i.value.model.value.filter((K) => K !==
|
|
1107
|
-
I === "select" && k.push(
|
|
1108
|
-
if (!
|
|
1109
|
-
const
|
|
1110
|
-
return
|
|
1381
|
+
return h === "all" && !i.value.model.value.length ? "selected" : "";
|
|
1382
|
+
}, s = (h, I) => {
|
|
1383
|
+
const x = Me(h);
|
|
1384
|
+
let k = i.value.model.value.filter((K) => K !== h && K !== x);
|
|
1385
|
+
I === "select" && k.push(h), I === "exclude" && k.push(x), i.value.mode === "setter" && i.value.targetId !== void 0 && l.requiredForSetter && (k.length || k.push("1"), k.length === 2 && i.value.model.value.length === 1 && i.value.model.value[0] === "1" && (k = k.filter((K) => K !== "1"))), l.singleMode && !i.value.filters && (k.length || (k = i.value.model.value), k.length > 1 && (k = [k[k.length - 1]])), k.sort((K, te) => {
|
|
1386
|
+
if (!l.tags) return 0;
|
|
1387
|
+
const F = l.tags.findIndex((z) => z.id === K), W = l.tags.findIndex((z) => z.id === te);
|
|
1388
|
+
return F - W;
|
|
1111
1389
|
}), i.value.model.value = k, i.value.mode === "setter" && i.value.targetId !== void 0 && u("setter", {
|
|
1112
1390
|
tagsIds: k,
|
|
1113
1391
|
targetId: i.value.targetId,
|
|
1114
1392
|
payload: i.value.payload
|
|
1115
1393
|
});
|
|
1116
|
-
},
|
|
1117
|
-
let
|
|
1118
|
-
return i.value.mode === "filter" && (
|
|
1119
|
-
}),
|
|
1120
|
-
const
|
|
1121
|
-
if (!
|
|
1122
|
-
const I =
|
|
1123
|
-
|
|
1394
|
+
}, m = w(() => {
|
|
1395
|
+
let h = "top-tagSelector_popup";
|
|
1396
|
+
return i.value.mode === "filter" && (h += " top-tagSelector_popup-filter"), i.value.mode === "setter" && (h += " top-tagSelector_popup-setter"), h;
|
|
1397
|
+
}), ee = () => {
|
|
1398
|
+
const h = prompt("", "New tag");
|
|
1399
|
+
if (!h || h === "New tag") return;
|
|
1400
|
+
const I = n.value.length + 1;
|
|
1401
|
+
n.value.push({
|
|
1124
1402
|
id: String(I),
|
|
1125
|
-
name:
|
|
1403
|
+
name: h,
|
|
1126
1404
|
color_id: String((I - 1) % 10 + 1)
|
|
1127
|
-
}),
|
|
1128
|
-
},
|
|
1129
|
-
if (i.value =
|
|
1130
|
-
if (i.value.filters && (
|
|
1405
|
+
}), r("tagsChanged", n.value);
|
|
1406
|
+
}, U = (h) => {
|
|
1407
|
+
if (i.value = Y(h.elPopupOpener, "topTagSelectorTarget"), !i.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1408
|
+
if (i.value.filters && (f.value = "add", i.value.model.value = []), !J.$?.ui.sortable) {
|
|
1131
1409
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
1132
1410
|
return;
|
|
1133
1411
|
}
|
|
1134
|
-
!
|
|
1412
|
+
!J.state.isMobile && !J.state.isMobileUA && n.value && $(h.elPopup).sortable({
|
|
1135
1413
|
items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
|
|
1136
1414
|
/**
|
|
1137
1415
|
* @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
|
|
1138
1416
|
*/
|
|
1139
1417
|
cancel: '[contenteditable="plaintext-only"], [contenteditable="true"]',
|
|
1140
1418
|
distance: 10,
|
|
1141
|
-
stop: function(I,
|
|
1142
|
-
if (!
|
|
1143
|
-
const k = $(
|
|
1144
|
-
k.each((
|
|
1145
|
-
if (!
|
|
1146
|
-
const
|
|
1147
|
-
K.push(
|
|
1148
|
-
}),
|
|
1149
|
-
const
|
|
1150
|
-
return
|
|
1151
|
-
}), u("tagsChanged",
|
|
1419
|
+
stop: function(I, x) {
|
|
1420
|
+
if (!n.value) return;
|
|
1421
|
+
const k = $(x.item).parent().find("[data-tag_id]"), K = [];
|
|
1422
|
+
k.each((te, F) => {
|
|
1423
|
+
if (!n.value) return;
|
|
1424
|
+
const W = $(F).attr("data-tag_id");
|
|
1425
|
+
K.push(W);
|
|
1426
|
+
}), n.value.sort((te, F) => {
|
|
1427
|
+
const W = K.findIndex((ue) => ue === te.id), z = K.findIndex((ue) => ue === F.id);
|
|
1428
|
+
return W - z;
|
|
1429
|
+
}), u("tagsChanged", n.value);
|
|
1152
1430
|
}
|
|
1153
1431
|
});
|
|
1154
|
-
},
|
|
1155
|
-
|
|
1432
|
+
}, De = (h) => {
|
|
1433
|
+
J.$?.ui.sortable && $(h.elPopup).data("ui-sortable") && $(h.elPopup).sortable("destroy");
|
|
1156
1434
|
};
|
|
1157
|
-
return (
|
|
1158
|
-
|
|
1159
|
-
modelValue:
|
|
1160
|
-
"onUpdate:modelValue": I[0] || (I[0] = (
|
|
1161
|
-
id:
|
|
1162
|
-
tags:
|
|
1435
|
+
return (h, I) => (v(), T(q, null, [
|
|
1436
|
+
E(Jt, {
|
|
1437
|
+
modelValue: a.value,
|
|
1438
|
+
"onUpdate:modelValue": I[0] || (I[0] = (x) => a.value = x),
|
|
1439
|
+
id: p(c),
|
|
1440
|
+
tags: n.value,
|
|
1163
1441
|
styling: e.styling,
|
|
1164
1442
|
mode: "filter",
|
|
1165
1443
|
useTopButton: e.useTopButton
|
|
1166
1444
|
}, null, 8, ["modelValue", "id", "tags", "styling", "useTopButton"]),
|
|
1167
|
-
|
|
1168
|
-
id:
|
|
1169
|
-
class:
|
|
1170
|
-
onOpen: I[4] || (I[4] = (
|
|
1171
|
-
onClose: I[5] || (I[5] = (
|
|
1445
|
+
E(he, {
|
|
1446
|
+
id: p(c),
|
|
1447
|
+
class: Z(m.value),
|
|
1448
|
+
onOpen: I[4] || (I[4] = (x) => U(x)),
|
|
1449
|
+
onClose: I[5] || (I[5] = (x) => De(x)),
|
|
1172
1450
|
"transition-duration": 50
|
|
1173
|
-
},
|
|
1174
|
-
contentList:
|
|
1175
|
-
|
|
1451
|
+
}, Qe({
|
|
1452
|
+
contentList: C(() => [
|
|
1453
|
+
p(i).mode === "filter" && !e.singleMode ? (v(), j(Ve, {
|
|
1176
1454
|
key: 0,
|
|
1177
1455
|
id: "all",
|
|
1178
1456
|
colorId: "",
|
|
1179
|
-
name:
|
|
1180
|
-
state:
|
|
1181
|
-
onSelect: I[3] || (I[3] = (
|
|
1182
|
-
}, null, 8, ["name", "state"])) :
|
|
1183
|
-
(
|
|
1184
|
-
key:
|
|
1185
|
-
id:
|
|
1186
|
-
colorId:
|
|
1187
|
-
name:
|
|
1188
|
-
state: d(
|
|
1189
|
-
canExclude:
|
|
1457
|
+
name: h.$i18n.Common.All_tags ?? "",
|
|
1458
|
+
state: p(i).model.value.length ? "" : "selected",
|
|
1459
|
+
onSelect: I[3] || (I[3] = (x) => p(i).model.value = [])
|
|
1460
|
+
}, null, 8, ["name", "state"])) : _("", !0),
|
|
1461
|
+
(v(!0), T(q, null, se(n.value, (x) => (v(), j(Ve, {
|
|
1462
|
+
key: x.id,
|
|
1463
|
+
id: x.id,
|
|
1464
|
+
colorId: x.color_id,
|
|
1465
|
+
name: x.name,
|
|
1466
|
+
state: d(x.id),
|
|
1467
|
+
canExclude: p(i).mode === "filter" && !e.singleMode,
|
|
1190
1468
|
editable: e.tagsEditable,
|
|
1191
|
-
disabled:
|
|
1192
|
-
onUnselect: (k) => s(
|
|
1193
|
-
onSelect: (k) => s(
|
|
1194
|
-
onExclude: (k) => s(
|
|
1469
|
+
disabled: g.value && d(x.id) === "",
|
|
1470
|
+
onUnselect: (k) => s(x.id, "unselect"),
|
|
1471
|
+
onSelect: (k) => s(x.id, "select"),
|
|
1472
|
+
onExclude: (k) => s(x.id, "exclude"),
|
|
1195
1473
|
"onUpdate:name": (k) => {
|
|
1196
|
-
|
|
1474
|
+
x.name = k, p(u)("tagsChanged", n.value);
|
|
1197
1475
|
}
|
|
1198
1476
|
}, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
|
|
1199
|
-
e.tagsEditable &&
|
|
1477
|
+
e.tagsEditable && n.value.length < e.tagsMax && n.value.length < 20 ? (v(), j(ye, {
|
|
1200
1478
|
key: 1,
|
|
1201
1479
|
"data-top-icon": "",
|
|
1202
|
-
onClick:
|
|
1480
|
+
onClick: D(ee, ["stop"])
|
|
1203
1481
|
}, {
|
|
1204
|
-
default:
|
|
1205
|
-
|
|
1482
|
+
default: C(() => [
|
|
1483
|
+
N(A(h.$i18n.Common.Add), 1)
|
|
1206
1484
|
]),
|
|
1207
1485
|
_: 1
|
|
1208
|
-
})) :
|
|
1486
|
+
})) : _("", !0)
|
|
1209
1487
|
]),
|
|
1210
1488
|
_: 2
|
|
1211
1489
|
}, [
|
|
1212
|
-
|
|
1490
|
+
p(i).mode === "setter" && p(i).filters ? {
|
|
1213
1491
|
name: "header",
|
|
1214
|
-
fn:
|
|
1215
|
-
|
|
1216
|
-
modelValue:
|
|
1217
|
-
"onUpdate:modelValue": I[1] || (I[1] = (
|
|
1218
|
-
options:
|
|
1492
|
+
fn: C(() => [
|
|
1493
|
+
E(fe, {
|
|
1494
|
+
modelValue: f.value,
|
|
1495
|
+
"onUpdate:modelValue": I[1] || (I[1] = (x) => f.value = x),
|
|
1496
|
+
options: S()
|
|
1219
1497
|
}, null, 8, ["modelValue", "options"])
|
|
1220
1498
|
]),
|
|
1221
1499
|
key: "0"
|
|
1222
1500
|
} : void 0,
|
|
1223
|
-
|
|
1501
|
+
p(i).mode === "setter" && p(i).filters ? {
|
|
1224
1502
|
name: "footer",
|
|
1225
|
-
fn:
|
|
1226
|
-
|
|
1227
|
-
default:
|
|
1228
|
-
|
|
1503
|
+
fn: C(() => [
|
|
1504
|
+
E(Q, { color: "theme" }, {
|
|
1505
|
+
default: C(() => [
|
|
1506
|
+
N(A(h.$i18n.Common.Cancel2), 1)
|
|
1229
1507
|
]),
|
|
1230
1508
|
_: 1
|
|
1231
1509
|
}),
|
|
1232
|
-
|
|
1233
|
-
onClick: I[2] || (I[2] = (
|
|
1234
|
-
tagsIds:
|
|
1235
|
-
filters:
|
|
1236
|
-
filtersAction:
|
|
1237
|
-
payload:
|
|
1510
|
+
E(Q, {
|
|
1511
|
+
onClick: I[2] || (I[2] = (x) => p(u)("setter", {
|
|
1512
|
+
tagsIds: p(i).model.value,
|
|
1513
|
+
filters: p(i).filters,
|
|
1514
|
+
filtersAction: f.value,
|
|
1515
|
+
payload: p(i).payload
|
|
1238
1516
|
}))
|
|
1239
1517
|
}, {
|
|
1240
|
-
default:
|
|
1241
|
-
|
|
1518
|
+
default: C(() => [
|
|
1519
|
+
N(A(f.value === "add" ? h.$i18n.Common.Add : "") + " " + A(f.value === "replace" ? h.$i18n.Common.Replace : "") + " " + A(f.value === "delete" ? h.$i18n.Common.Delete : ""), 1)
|
|
1242
1520
|
]),
|
|
1243
1521
|
_: 1
|
|
1244
1522
|
})
|
|
@@ -1250,17 +1528,18 @@ const vt = /* @__PURE__ */ R({
|
|
|
1250
1528
|
}
|
|
1251
1529
|
});
|
|
1252
1530
|
export {
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1531
|
+
io as TopCompetitorSelector,
|
|
1532
|
+
co as TopGroupSelector,
|
|
1533
|
+
go as TopProjectSelector,
|
|
1534
|
+
uo as TopRegionSelector,
|
|
1535
|
+
po as TopTagSelector,
|
|
1536
|
+
Jt as TopTagSelectorPopupOpener,
|
|
1537
|
+
ve as TopTagSelectorTagIcon,
|
|
1538
|
+
mt as dialogRegionSelector,
|
|
1539
|
+
ft as findRegion,
|
|
1540
|
+
fo as genElTopTagSelectorPopupOpener,
|
|
1541
|
+
Oe as genSearcherByKey,
|
|
1542
|
+
mo as renderElTopTagSelectorPopupOpener,
|
|
1543
|
+
so as useItemsFromCompetitors
|
|
1265
1544
|
};
|
|
1266
1545
|
//# sourceMappingURL=project.js.map
|