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