@topvisor/ui 1.4.3-projectSelector.0 → 1.4.3-projectSelector.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/{policy.vue_vue_type_style_index_0_lang-BiCaYVJ6.es.js → policy.vue_vue_type_style_index_0_lang-BAP-FIuQ.es.js} +176 -176
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BAP-FIuQ.es.js.map +1 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-EZT5LjSx.amd.js +2 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-EZT5LjSx.amd.js.map +1 -0
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.js +1 -1
- package/package.json +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +248 -239
- package/project/project.js.map +1 -1
- package/src/components/project/projectSelector/cache.d.ts +1 -1
- package/src/components/project/projectSelector/projectSelector.vue.d.ts +1 -1
- package/src/components/project/projectSelector/utils.d.ts +10 -8
- package/.chunks/policy.vue_vue_type_style_index_0_lang-AfwHvWs8.amd.js +0 -2
- package/.chunks/policy.vue_vue_type_style_index_0_lang-AfwHvWs8.amd.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BiCaYVJ6.es.js.map +0 -1
package/project/project.js
CHANGED
|
@@ -3,20 +3,21 @@
|
|
|
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 L, mergeModels as V, useModel as b, computed as
|
|
7
|
-
import { u as
|
|
6
|
+
import { defineComponent as L, mergeModels as V, useModel as b, computed as E, createElementBlock as T, openBlock as p, createBlock as k, unref as m, withCtx as A, Fragment as F, renderList as ge, normalizeClass as oe, createElementVNode as O, toDisplayString as B, createVNode as K, createTextVNode as H, toValue as Be, ref as _, watch as G, createCommentVNode as M, reactive as Ne, resolveComponent as Ue, shallowRef as De, onMounted as Ze, withModifiers as W, isRef as be, mergeProps as qe, withKeys as $e, nextTick as et, resolveDirective as tt, withDirectives as ot, resolveDynamicComponent as at, renderSlot as lt, createSlots as nt } from "vue";
|
|
7
|
+
import { u as j, C as Q, e as ee, q as ye, d as rt } from "../.chunks/forms-CUaoBGD5.es.js";
|
|
8
8
|
import { _ as ke, b as Te, a as it } from "../.chunks/popupHint.vue_vue_type_style_index_0_lang-DzT1BFMx.es.js";
|
|
9
|
-
import { a as dt, _ as
|
|
9
|
+
import { a as dt, _ as Ae, b as Fe, c as We, I as ve } from "../.chunks/policy.vue_vue_type_style_index_0_lang-BAP-FIuQ.es.js";
|
|
10
10
|
import { u as st } from "../.chunks/utils-Kzz2mc2t.es.js";
|
|
11
11
|
import { getSearcherGIcon as ut, getLangLabel as ct, getDeviceGIcon as ft } from "../utils/searchers.js";
|
|
12
12
|
import "../.chunks/core-DBWAn2Eg.es.js";
|
|
13
13
|
import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-BZM_iKPW.es.js";
|
|
14
|
-
import { g as
|
|
15
|
-
import { validUrl as
|
|
14
|
+
import { g as ie, a as le } from "../.chunks/field-CyyFzM-Y.es.js";
|
|
15
|
+
import { validUrl as we } from "../utils/check.js";
|
|
16
16
|
import { ellipsis as gt } from "../utils/string.js";
|
|
17
|
+
import { invertKeyboardLayout as mt } from "../utils/keyboard.js";
|
|
17
18
|
import { storage as X } from "../utils/dom.js";
|
|
18
|
-
import { TopPopupWorker as
|
|
19
|
-
const
|
|
19
|
+
import { TopPopupWorker as vt } from "../popup/worker.js";
|
|
20
|
+
const pt = { class: "top-competitorSelector" }, ht = { class: "top-ellipsis1" }, To = /* @__PURE__ */ L({
|
|
20
21
|
__name: "competitorSelector",
|
|
21
22
|
props: /* @__PURE__ */ V({
|
|
22
23
|
modelValue: {},
|
|
@@ -28,32 +29,32 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
28
29
|
}),
|
|
29
30
|
emits: ["update:modelValue"],
|
|
30
31
|
setup(e) {
|
|
31
|
-
const t = e, o = b(e, "modelValue"), a =
|
|
32
|
+
const t = e, o = b(e, "modelValue"), a = E(() => {
|
|
32
33
|
if (t.showSelectAllItem)
|
|
33
34
|
return {
|
|
34
35
|
icon: "",
|
|
35
|
-
title:
|
|
36
|
+
title: j().Common.Select_all,
|
|
36
37
|
value: "all",
|
|
37
38
|
content: ""
|
|
38
39
|
};
|
|
39
40
|
});
|
|
40
|
-
return (r, l) => (p(), T("div",
|
|
41
|
+
return (r, l) => (p(), T("div", pt, [
|
|
41
42
|
m(Q).state.isMobile ? (p(), k(ke, { key: 0 }, {
|
|
42
|
-
opener:
|
|
43
|
-
|
|
43
|
+
opener: A(() => [
|
|
44
|
+
K(ee, {
|
|
44
45
|
class: "top-competitorSelector_opener",
|
|
45
46
|
color: "theme",
|
|
46
47
|
icon: "",
|
|
47
48
|
icon2: ""
|
|
48
49
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
|
|
50
|
+
default: A(() => [
|
|
51
|
+
H(B(e.items.find((n) => n.value === o.value?.[0])?.content), 1)
|
|
51
52
|
]),
|
|
52
53
|
_: 1
|
|
53
54
|
})
|
|
54
55
|
]),
|
|
55
|
-
contentList:
|
|
56
|
-
(p(!0), T(F, null,
|
|
56
|
+
contentList: A(() => [
|
|
57
|
+
(p(!0), T(F, null, ge(e.items, (n) => (p(), k(Te, {
|
|
57
58
|
class: oe({
|
|
58
59
|
"top-active": o.value?.includes(n.value)
|
|
59
60
|
}),
|
|
@@ -61,8 +62,8 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
61
62
|
title: n.title,
|
|
62
63
|
onClick: () => o.value = [n.value]
|
|
63
64
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
65
|
+
default: A(() => [
|
|
66
|
+
O("span", ht, B(n.content), 1)
|
|
66
67
|
]),
|
|
67
68
|
_: 2
|
|
68
69
|
}, 1032, ["class", "data-top-icon", "title", "onClick"]))), 256))
|
|
@@ -80,12 +81,12 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
80
81
|
}, null, 8, ["modelValue", "items", "selectAllItem"]))
|
|
81
82
|
]));
|
|
82
83
|
}
|
|
83
|
-
}),
|
|
84
|
+
}), Ao = (e, t) => E(() => Be(e).filter((r) => r.on >= 0 || r.id === t).map((r) => ({
|
|
84
85
|
value: r.id,
|
|
85
86
|
title: r.url + ` [${r.id}]`,
|
|
86
|
-
icon: r.id ===
|
|
87
|
+
icon: r.id === Be(t) ? "" : "",
|
|
87
88
|
content: r.name
|
|
88
|
-
}))), D = -1, y = -2,
|
|
89
|
+
}))), D = -1, y = -2, de = -1, yt = {
|
|
89
90
|
0: "Yandex",
|
|
90
91
|
1: "Google",
|
|
91
92
|
4: "YouTube",
|
|
@@ -95,35 +96,35 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
95
96
|
9: "GoogleStore",
|
|
96
97
|
20: "Yandex.com",
|
|
97
98
|
21: "Yandex.com.tr"
|
|
98
|
-
},
|
|
99
|
+
}, Pe = {
|
|
99
100
|
key: y,
|
|
100
101
|
name: "--",
|
|
101
102
|
index: y
|
|
102
|
-
},
|
|
103
|
+
}, He = {
|
|
103
104
|
key: y,
|
|
104
105
|
name: "--",
|
|
105
|
-
regions: [
|
|
106
|
-
regionByIndex: /* @__PURE__ */ new Map([[y,
|
|
107
|
-
},
|
|
106
|
+
regions: [Pe],
|
|
107
|
+
regionByIndex: /* @__PURE__ */ new Map([[y, Pe]])
|
|
108
|
+
}, se = {
|
|
108
109
|
key: y,
|
|
109
110
|
name: "Autoselect",
|
|
110
111
|
index: y
|
|
111
|
-
},
|
|
112
|
+
}, pe = {
|
|
112
113
|
key: y,
|
|
113
114
|
name: "Autoselect",
|
|
114
|
-
regions: [
|
|
115
|
-
regionByIndex: /* @__PURE__ */ new Map([[y,
|
|
116
|
-
},
|
|
115
|
+
regions: [se],
|
|
116
|
+
regionByIndex: /* @__PURE__ */ new Map([[y, se]])
|
|
117
|
+
}, Ee = {
|
|
117
118
|
countryCode: "00",
|
|
118
119
|
depth: 1,
|
|
119
120
|
device: 0,
|
|
120
|
-
key:
|
|
121
|
-
index:
|
|
121
|
+
key: de,
|
|
122
|
+
index: de,
|
|
122
123
|
lang: "ru",
|
|
123
124
|
name: "Without region"
|
|
124
|
-
},
|
|
125
|
+
}, St = () => (se.name = j().Common.Autoselect, se), It = () => (St(), pe.name = j().Common.Autoselect, console.log(pe), pe), xt = () => (Ee.name = j().Keywords.Without_region, Ee), Je = (e = !1, t = !1, o = []) => {
|
|
125
126
|
let a;
|
|
126
|
-
return e ? a =
|
|
127
|
+
return e ? a = Ct(o) : a = ze(o), t && a.set(y, It()), a.size || a.set(y, He), a;
|
|
127
128
|
}, ze = (e, t = !0, o = [], a = !1) => {
|
|
128
129
|
const r = /* @__PURE__ */ new Map();
|
|
129
130
|
return e.forEach((l) => {
|
|
@@ -141,13 +142,13 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
141
142
|
if (r.has(l)) return;
|
|
142
143
|
const n = {
|
|
143
144
|
key: l,
|
|
144
|
-
name:
|
|
145
|
+
name: yt[l],
|
|
145
146
|
regions: [],
|
|
146
147
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
147
148
|
};
|
|
148
149
|
r.set(n.key, n);
|
|
149
150
|
}), r;
|
|
150
|
-
},
|
|
151
|
+
}, Ct = (e) => {
|
|
151
152
|
const t = ze(e, !1, [0, 1], !0);
|
|
152
153
|
if (t.has(2)) {
|
|
153
154
|
const o = t.get(2);
|
|
@@ -155,11 +156,11 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
155
156
|
}
|
|
156
157
|
return t.forEach((o) => {
|
|
157
158
|
if (!o.regionByIndex) return;
|
|
158
|
-
const a = { ...
|
|
159
|
+
const a = { ...xt() };
|
|
159
160
|
o.regionByIndex.set(a.index, a);
|
|
160
161
|
}), t;
|
|
161
|
-
},
|
|
162
|
-
const a =
|
|
162
|
+
}, kt = (e, t, o = []) => {
|
|
163
|
+
const a = Je(e, !1, o);
|
|
163
164
|
let r;
|
|
164
165
|
return a.forEach((l) => {
|
|
165
166
|
if (!(t.searcher_key !== void 0 && t.searcher_key != l.key) && l.regions && (l.regions.forEach((n) => {
|
|
@@ -168,8 +169,8 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
168
169
|
}), r))
|
|
169
170
|
return !1;
|
|
170
171
|
}), r;
|
|
171
|
-
},
|
|
172
|
-
const o =
|
|
172
|
+
}, Tt = st(() => import("../.chunks/dialog_regionSelectorRegions-BMWyYCfD.es.js")), At = (e, t) => {
|
|
173
|
+
const o = j(), a = _(t.value.keys().next().value ?? y), r = E(() => {
|
|
173
174
|
const l = /* @__PURE__ */ new Map();
|
|
174
175
|
if (t.value.forEach((n) => {
|
|
175
176
|
let s = {
|
|
@@ -197,9 +198,9 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
197
198
|
optionBySearcherKey: r
|
|
198
199
|
};
|
|
199
200
|
}, jt = (e, t) => {
|
|
200
|
-
const o =
|
|
201
|
+
const o = j(), a = _(y);
|
|
201
202
|
e.modelValue.length === 1 && (a.value = e.modelValue[0]), a.value === y && (e.forFrequency ? a.value = t.value?.regionByIndex.values().next().value?.key ?? y : a.value = t.value?.regionByIndex.keys().next().value ?? y);
|
|
202
|
-
const r =
|
|
203
|
+
const r = E(() => {
|
|
203
204
|
const l = /* @__PURE__ */ new Map();
|
|
204
205
|
return t.value.regionByIndex?.forEach((n) => {
|
|
205
206
|
let s = n.name;
|
|
@@ -248,7 +249,7 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
248
249
|
regionIndex: a,
|
|
249
250
|
optionByRegionIndex: r
|
|
250
251
|
};
|
|
251
|
-
},
|
|
252
|
+
}, Bt = (e, t, o) => {
|
|
252
253
|
const a = _([]), r = () => {
|
|
253
254
|
if (e.onlySearcher && t.value) {
|
|
254
255
|
a.value = Array.from(t.value.keys());
|
|
@@ -273,15 +274,15 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
273
274
|
}), e.addCompare && r(), {
|
|
274
275
|
regionsIndexes: a
|
|
275
276
|
};
|
|
276
|
-
},
|
|
277
|
-
const t =
|
|
277
|
+
}, bt = (e) => {
|
|
278
|
+
const t = E(() => Je(e.forFrequency, e.autoRegion, e.searchers)), o = E(() => t.value.get(r.searcherKey.value) || He), a = E(() => {
|
|
278
279
|
const i = /* @__PURE__ */ new Set();
|
|
279
280
|
return t.value.forEach((v) => {
|
|
280
281
|
v.regionByIndex.forEach((d) => {
|
|
281
|
-
d.index !==
|
|
282
|
+
d.index !== de && d.index !== y && i.add(d.index);
|
|
282
283
|
});
|
|
283
284
|
}), i;
|
|
284
|
-
}), r =
|
|
285
|
+
}), r = At(e, t), l = jt(e, o), n = Bt(e, t, a);
|
|
285
286
|
G(t, () => {
|
|
286
287
|
if (e.onlySearcher ? n.regionsIndexes.value = Array.from(t.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((v) => a.value.has(v)), r.searcherKey.value === D) return;
|
|
287
288
|
let i = t.value.keys().next().value;
|
|
@@ -306,7 +307,7 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
306
307
|
let i = l.regionIndex.value;
|
|
307
308
|
if (e.forFrequency) {
|
|
308
309
|
const v = l.regionIndex.value;
|
|
309
|
-
i =
|
|
310
|
+
i = kt(e.forFrequency, { searcher_key: s(), key: v }, e.searchers)?.index;
|
|
310
311
|
}
|
|
311
312
|
return i;
|
|
312
313
|
}, c = () => {
|
|
@@ -327,7 +328,7 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
327
328
|
return c()?.regionByIndex?.get(i);
|
|
328
329
|
}
|
|
329
330
|
};
|
|
330
|
-
},
|
|
331
|
+
}, jo = /* @__PURE__ */ L({
|
|
331
332
|
__name: "regionSelector",
|
|
332
333
|
props: /* @__PURE__ */ V({
|
|
333
334
|
projectId: {},
|
|
@@ -357,13 +358,13 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
357
358
|
allRegionsIndexes: c,
|
|
358
359
|
getSearcher: S,
|
|
359
360
|
getRegion: i
|
|
360
|
-
} =
|
|
361
|
+
} = bt(o), v = () => {
|
|
361
362
|
const d = [];
|
|
362
363
|
g.value.forEach((f) => {
|
|
363
364
|
f.enabled && f.regions.forEach((u) => {
|
|
364
365
|
u.enabled && d.push(u);
|
|
365
366
|
});
|
|
366
|
-
}),
|
|
367
|
+
}), Tt.open("regions", {
|
|
367
368
|
regions: d,
|
|
368
369
|
regionsIndexes: s.regionsIndexes.value,
|
|
369
370
|
"@update:regionsIndexes": (f) => s.regionsIndexes.value = f
|
|
@@ -397,8 +398,8 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
397
398
|
else if (d.length === 1) {
|
|
398
399
|
let u = c.value;
|
|
399
400
|
o.forFrequency && (u = /* @__PURE__ */ new Set(), g.value.forEach((w) => {
|
|
400
|
-
w.regionByIndex.forEach((
|
|
401
|
-
|
|
401
|
+
w.regionByIndex.forEach((N) => {
|
|
402
|
+
N.index !== de && N.index !== y && u.add(N.key);
|
|
402
403
|
});
|
|
403
404
|
})), u.has(d[0]) || (d = [], f !== void 0 && d.push(f));
|
|
404
405
|
} else
|
|
@@ -444,14 +445,14 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
444
445
|
"top-selectorRegion-onlySearcher": e.onlySearcher
|
|
445
446
|
})
|
|
446
447
|
}, [
|
|
447
|
-
|
|
448
|
+
K(ye, {
|
|
448
449
|
options: m(l).optionBySearcherKey.value,
|
|
449
450
|
modelValue: m(l).searcherKey.value,
|
|
450
451
|
"onUpdate:modelValue": f[0] || (f[0] = (u) => m(l).searcherKey.value = u),
|
|
451
452
|
name: "searcher_key",
|
|
452
453
|
addChanger: e.addChanger
|
|
453
454
|
}, null, 8, ["options", "modelValue", "addChanger"]),
|
|
454
|
-
!e.onlySearcher && m(l).searcherKey.value !== m(D) ? (p(), k(
|
|
455
|
+
!e.onlySearcher && m(l).searcherKey.value !== m(D) ? (p(), k(ye, {
|
|
455
456
|
key: 0,
|
|
456
457
|
class: "top-select-region",
|
|
457
458
|
options: m(n).optionByRegionIndex.value,
|
|
@@ -460,18 +461,18 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
460
461
|
name: e.forFrequency ? "region_key" : "region_index",
|
|
461
462
|
addChanger: e.addChanger,
|
|
462
463
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
463
|
-
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) :
|
|
464
|
+
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : M("", !0),
|
|
464
465
|
e.addCompare && !e.onlySearcher && m(l).searcherKey.value === m(D) ? (p(), k(ee, {
|
|
465
466
|
key: 1,
|
|
466
467
|
name: "compare",
|
|
467
468
|
onClick: v,
|
|
468
469
|
"data-count-compare-regions-indexes": m(s).regionsIndexes.value.length
|
|
469
470
|
}, {
|
|
470
|
-
default:
|
|
471
|
-
|
|
471
|
+
default: A(() => [
|
|
472
|
+
H(B(d.$i18n.Common.Selected_regions), 1)
|
|
472
473
|
]),
|
|
473
474
|
_: 1
|
|
474
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
475
|
+
}, 8, ["data-count-compare-regions-indexes"])) : M("", !0)
|
|
475
476
|
], 2));
|
|
476
477
|
}
|
|
477
478
|
}), q = {
|
|
@@ -479,13 +480,13 @@ const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" },
|
|
|
479
480
|
name: "/",
|
|
480
481
|
path: "/"
|
|
481
482
|
};
|
|
482
|
-
function
|
|
483
|
-
return e ?
|
|
483
|
+
function $t(e) {
|
|
484
|
+
return e ? j()?.Common.All_folders : "/ (" + j()?.Keywords.Root_folder + ")";
|
|
484
485
|
}
|
|
485
|
-
const
|
|
486
|
-
l = { ...l }, a.childsIds.push(l.id), l.id === 0 && (l.name =
|
|
486
|
+
const je = (e, t, o = /* @__PURE__ */ new Map(), a = { id: "root" }, r = 0) => (a.childsIds = [], a.id && (a.countAllGroupsActive = a.count_groups_active), e[a.id] && e[a.id].forEach((l) => {
|
|
487
|
+
l = { ...l }, a.childsIds.push(l.id), l.id === 0 && (l.name = $t(t));
|
|
487
488
|
const n = r > 1 ? "-".repeat(r - 1) + " " : "";
|
|
488
|
-
n && !l.name.startsWith(n) && (l.name = n + l.name), o.set(l.id, l),
|
|
489
|
+
n && !l.name.startsWith(n) && (l.name = n + l.name), o.set(l.id, l), je(e, t, o, l, r + 1), a.childsIds = a.childsIds.concat(l.childsIds), a.id && l.count_groups_active && (a.countAllGroupsActive += l.count_groups_active);
|
|
489
490
|
}), o), wt = (e) => e.gen("/get/keywords_2/folders/", ["id", "parent_id", "name", "path"]).changeParams({ orders: ["ord_path"], limit: 100 });
|
|
490
491
|
function Se(e, t, o) {
|
|
491
492
|
const a = Object.keys(e), r = a.map((l) => e[l]);
|
|
@@ -529,7 +530,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
529
530
|
checkFingerprint: "TopGroupSelectorFolders:" + t.projectId
|
|
530
531
|
}), l.value?.resetCache();
|
|
531
532
|
}, { immediate: !0 });
|
|
532
|
-
const n =
|
|
533
|
+
const n = E(() => je(t.folders ?? { root: [q] }, t.canSelectAll));
|
|
533
534
|
return Se({
|
|
534
535
|
modelFolder: a,
|
|
535
536
|
modelFolderId: o
|
|
@@ -542,7 +543,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
542
543
|
}
|
|
543
544
|
let g = n.value.get(t.folderId);
|
|
544
545
|
g || (g = q), a.value = g, o.value = g.id;
|
|
545
|
-
}, { immediate: !0 }), (s, g) => (p(), k(
|
|
546
|
+
}, { immediate: !0 }), (s, g) => (p(), k(Ae, {
|
|
546
547
|
class: "top-groupSelector_folder",
|
|
547
548
|
modelValue: a.value,
|
|
548
549
|
"onUpdate:modelValue": g[0] || (g[0] = (c) => a.value = c),
|
|
@@ -550,28 +551,28 @@ const Pt = /* @__PURE__ */ L({
|
|
|
550
551
|
"search-type": "inline",
|
|
551
552
|
icon: e.addIcon ? "" : void 0,
|
|
552
553
|
api: e.folders ? void 0 : m(r),
|
|
553
|
-
apiSetSearchParams: (...c) => m(
|
|
554
|
+
apiSetSearchParams: (...c) => m(Fe)(...c, "name"),
|
|
554
555
|
addChanger: e.addChanger,
|
|
555
556
|
useCache: ""
|
|
556
557
|
}, null, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "addChanger"]));
|
|
557
558
|
}
|
|
558
|
-
}),
|
|
559
|
+
}), ue = {
|
|
559
560
|
id: -1,
|
|
560
561
|
name: "--",
|
|
561
562
|
folder_id: q.id,
|
|
562
563
|
folder_path: q.path
|
|
563
|
-
},
|
|
564
|
+
}, ce = {
|
|
564
565
|
id: We,
|
|
565
566
|
name: "All groups",
|
|
566
567
|
folder_id: q.id,
|
|
567
568
|
folder_path: q.path
|
|
568
|
-
}, Z = () => (
|
|
569
|
+
}, Z = () => (ce.name = j()?.Common.All_groups, ce), Ye = () => (ce.name = j()?.Keywords.Choose_group, ce), Et = (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), _e = (e) => e.gen("/get/keywords_2/groups/", ["id", "name", "folder_id", "folder_path"]).changeParams({ folder_id_depth: !0, limit: 100 }), _t = (e) => e.gen("/add/keywords_2/groups/"), Mt = { class: "top-groupSelector_groupItem" }, Vt = {
|
|
569
570
|
key: 0,
|
|
570
571
|
class: "top-comment"
|
|
571
|
-
},
|
|
572
|
+
}, Gt = {
|
|
572
573
|
key: 1,
|
|
573
574
|
class: "top-groupSelector_groupItemFolderPath"
|
|
574
|
-
},
|
|
575
|
+
}, Lt = /* @__PURE__ */ L({
|
|
575
576
|
__name: "groups",
|
|
576
577
|
props: /* @__PURE__ */ V({
|
|
577
578
|
groupId: {},
|
|
@@ -595,14 +596,14 @@ const Pt = /* @__PURE__ */ L({
|
|
|
595
596
|
}),
|
|
596
597
|
emits: /* @__PURE__ */ V(["addGroup"], ["update:groupId", "update:group"]),
|
|
597
598
|
setup(e, { emit: t }) {
|
|
598
|
-
const o = e, a = t, r = b(e, "groupId"), l = b(e, "group"), n = o.client && !o.groups ?
|
|
599
|
+
const o = e, a = t, r = b(e, "groupId"), l = b(e, "group"), n = o.client && !o.groups ? _e(o.client) : void 0, s = o.client ? _t(o.client) : void 0, g = _(null), c = _(void 0), S = ie("folder_id", "EQUALS", [o.folder?.id ?? 0]);
|
|
599
600
|
n?.changeParams({
|
|
600
601
|
project_id: o.projectId,
|
|
601
602
|
folder_id_depth: !0,
|
|
602
603
|
filters: [
|
|
603
604
|
S
|
|
604
605
|
]
|
|
605
|
-
}), o.on !== void 0 && n?.params.filters?.push(
|
|
606
|
+
}), o.on !== void 0 && n?.params.filters?.push(ie("on", "EQUALS", [Number(o.on)]));
|
|
606
607
|
const i = (d) => {
|
|
607
608
|
l.value = d, r.value = d.id;
|
|
608
609
|
};
|
|
@@ -617,7 +618,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
617
618
|
checkFingerprint: "TopGroupSelectorGroups:" + o.projectId
|
|
618
619
|
})), d.folderId && (S.values = [
|
|
619
620
|
o.folder?.id ?? 0
|
|
620
|
-
], o.groups && (c.value =
|
|
621
|
+
], o.groups && (c.value = Et(o.groups, o.on, o.folder))), g.value?.resetCache(), (d.folderId?.old !== void 0 || d.canSelectAll?.old !== void 0) && r.value !== ve) {
|
|
621
622
|
let f;
|
|
622
623
|
o.autoselect === "first" && (f = c.value?.[0], o.canSelectAll && (f = Ne(Z()))), (o.autoselect === "placeholder" || !f) && (f = Ye()), i(f);
|
|
623
624
|
}
|
|
@@ -630,18 +631,18 @@ const Pt = /* @__PURE__ */ L({
|
|
|
630
631
|
r.value = l.value.id;
|
|
631
632
|
return;
|
|
632
633
|
}
|
|
633
|
-
if (!(o.canAdd && r.value ===
|
|
634
|
+
if (!(o.canAdd && r.value === ve)) {
|
|
634
635
|
if (o.groups) {
|
|
635
636
|
let f = c.value?.find((u) => u.id === r.value);
|
|
636
637
|
if (!f && o.canSelectAll && (f = Z()), f)
|
|
637
638
|
i(f);
|
|
638
639
|
else {
|
|
639
640
|
const u = c.value?.[0];
|
|
640
|
-
u && !r.value ? i(u) : i(
|
|
641
|
+
u && !r.value ? i(u) : i(ue);
|
|
641
642
|
}
|
|
642
643
|
}
|
|
643
644
|
if (o.client && !o.groups && (r.value || r.value === We && !o.canSelectAll)) {
|
|
644
|
-
const f =
|
|
645
|
+
const f = _e(o.client).changeParams({
|
|
645
646
|
project_id: o.projectId,
|
|
646
647
|
id: r.value,
|
|
647
648
|
filters: [
|
|
@@ -653,7 +654,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
653
654
|
});
|
|
654
655
|
const u = await f.call();
|
|
655
656
|
if (!u.errors?.length && !u.result) return;
|
|
656
|
-
!u.errors && u.result[0] ? i(u.result[0]) : i(
|
|
657
|
+
!u.errors && u.result[0] ? i(u.result[0]) : i(ue);
|
|
657
658
|
}
|
|
658
659
|
}
|
|
659
660
|
}
|
|
@@ -668,7 +669,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
668
669
|
}).call();
|
|
669
670
|
u.result ? (i(u.result), a("addGroup", u.result)) : i(f), g.value?.resetCache(!0);
|
|
670
671
|
};
|
|
671
|
-
return (d, f) => (p(), k(
|
|
672
|
+
return (d, f) => (p(), k(Ae, {
|
|
672
673
|
ref_key: "refSelector",
|
|
673
674
|
ref: g,
|
|
674
675
|
class: "top-groupSelector_group",
|
|
@@ -678,24 +679,24 @@ const Pt = /* @__PURE__ */ L({
|
|
|
678
679
|
searchType: "inline",
|
|
679
680
|
icon: e.addIcon ? "" : void 0,
|
|
680
681
|
api: e.groups ? void 0 : m(n),
|
|
681
|
-
apiSetSearchParams: (...u) => m(
|
|
682
|
+
apiSetSearchParams: (...u) => m(Fe)(...u, "name"),
|
|
682
683
|
appendSearchToResult: !!e.canAdd,
|
|
683
684
|
useAllItem: e.canSelectAll ? m(Z)().name : !1,
|
|
684
685
|
addChanger: e.addChanger,
|
|
685
686
|
useCache: "",
|
|
686
687
|
onAppendItem: v
|
|
687
688
|
}, {
|
|
688
|
-
item:
|
|
689
|
-
|
|
690
|
-
u.id === m(
|
|
691
|
-
|
|
692
|
-
u.folder_path && e.showPath ? (p(), T("span",
|
|
689
|
+
item: A(({ item: u }) => [
|
|
690
|
+
O("div", Mt, [
|
|
691
|
+
u.id === m(ve) ? (p(), T("div", Vt, B(d.$i18n.Common.Add) + ": ", 1)) : M("", !0),
|
|
692
|
+
O("span", null, B(u.name), 1),
|
|
693
|
+
u.folder_path && e.showPath ? (p(), T("span", Gt, B(u.folder_path), 1)) : M("", !0)
|
|
693
694
|
])
|
|
694
695
|
]),
|
|
695
696
|
_: 1
|
|
696
697
|
}, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "appendSearchToResult", "useAllItem", "addChanger"]));
|
|
697
698
|
}
|
|
698
|
-
}),
|
|
699
|
+
}), Rt = { class: "top-groupSelector" }, Bo = /* @__PURE__ */ L({
|
|
699
700
|
__name: "groupSelector",
|
|
700
701
|
props: /* @__PURE__ */ V({
|
|
701
702
|
folderId: {},
|
|
@@ -721,20 +722,20 @@ const Pt = /* @__PURE__ */ L({
|
|
|
721
722
|
folderModifiers: {},
|
|
722
723
|
groupId: { required: !0 },
|
|
723
724
|
groupIdModifiers: {},
|
|
724
|
-
group: { default:
|
|
725
|
+
group: { default: ue },
|
|
725
726
|
groupModifiers: {}
|
|
726
727
|
}),
|
|
727
728
|
emits: /* @__PURE__ */ V(["update:groups"], ["update:folderId", "update:folder", "update:groupId", "update:group"]),
|
|
728
729
|
setup(e, { emit: t }) {
|
|
729
|
-
const o = e, a = b(e, "folderId"), r = b(e, "folder"), l = b(e, "groupId"), n = b(e, "group"), s = t, g =
|
|
730
|
+
const o = e, a = b(e, "folderId"), r = b(e, "folder"), l = b(e, "groupId"), n = b(e, "group"), s = t, g = je(o.folders ?? { root: [q] }, o.canSelectAllGroups);
|
|
730
731
|
r.value = g.get(a.value);
|
|
731
732
|
let c = o.groups?.find((i) => i.id === l.value);
|
|
732
|
-
l.value || (c = o.groups?.[0]), o.canSelectAllGroups && !c && (c = Z()), o.canSelectAllGroups && !c && (c = Z()), (o.autoselect === "placeholder" || !c) && (c = Ye()), c ??=
|
|
733
|
+
l.value || (c = o.groups?.[0]), o.canSelectAllGroups && !c && (c = Z()), o.canSelectAllGroups && !c && (c = Z()), (o.autoselect === "placeholder" || !c) && (c = Ye()), c ??= ue, n.value = c;
|
|
733
734
|
const S = (i) => {
|
|
734
735
|
let v;
|
|
735
736
|
o.groups && i && (v = [...o.groups, i]), s("update:groups", v);
|
|
736
737
|
};
|
|
737
|
-
return (i, v) => (p(), T("div",
|
|
738
|
+
return (i, v) => (p(), T("div", Rt, [
|
|
738
739
|
e.showFolders ? (p(), k(Pt, {
|
|
739
740
|
key: 0,
|
|
740
741
|
folderId: a.value,
|
|
@@ -747,8 +748,8 @@ const Pt = /* @__PURE__ */ L({
|
|
|
747
748
|
addChanger: e.addChanger,
|
|
748
749
|
addIcon: e.addIcon,
|
|
749
750
|
client: e.client
|
|
750
|
-
}, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client"])) :
|
|
751
|
-
e.showGroups ? (p(), k(
|
|
751
|
+
}, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client"])) : M("", !0),
|
|
752
|
+
e.showGroups ? (p(), k(Lt, {
|
|
752
753
|
key: 1,
|
|
753
754
|
groupId: l.value,
|
|
754
755
|
"onUpdate:groupId": v[2] || (v[2] = (d) => l.value = d),
|
|
@@ -766,10 +767,10 @@ const Pt = /* @__PURE__ */ L({
|
|
|
766
767
|
addIcon: e.addIcon,
|
|
767
768
|
client: e.client,
|
|
768
769
|
onAddGroup: S
|
|
769
|
-
}, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "showPath", "addIcon", "client"])) :
|
|
770
|
+
}, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "showPath", "addIcon", "client"])) : M("", !0)
|
|
770
771
|
]));
|
|
771
772
|
}
|
|
772
|
-
}), Kt = { class: "top-projectSelectorSubmenu_item" }, Ot = ["href", "title", "data-top-icon", "data-right"],
|
|
773
|
+
}), Kt = { class: "top-projectSelectorSubmenu_item" }, Ot = ["href", "title", "data-top-icon", "data-right"], Nt = { class: "top-projectSelectorSubmenu_item" }, Ut = ["href"], Dt = /* @__PURE__ */ L({
|
|
773
774
|
__name: "submenu",
|
|
774
775
|
props: {
|
|
775
776
|
id: {},
|
|
@@ -777,7 +778,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
777
778
|
url: {}
|
|
778
779
|
},
|
|
779
780
|
setup(e) {
|
|
780
|
-
const t = e, o =
|
|
781
|
+
const t = e, o = j();
|
|
781
782
|
let a = [
|
|
782
783
|
{
|
|
783
784
|
href: `/project/keywords/${t.id}/`,
|
|
@@ -828,7 +829,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
828
829
|
right: "8"
|
|
829
830
|
},
|
|
830
831
|
{
|
|
831
|
-
href:
|
|
832
|
+
href: `/project/audit/${t.id}/indexing/`,
|
|
832
833
|
title: o.Audit.Indexing,
|
|
833
834
|
icon: "",
|
|
834
835
|
right: "8"
|
|
@@ -846,32 +847,32 @@ const Pt = /* @__PURE__ */ L({
|
|
|
846
847
|
right: "2"
|
|
847
848
|
}
|
|
848
849
|
];
|
|
849
|
-
const r =
|
|
850
|
+
const r = E(() => t.right.includes("0") ? a.filter((l) => t.right[l.right] === "1") : a);
|
|
850
851
|
return (l, n) => {
|
|
851
|
-
const s =
|
|
852
|
+
const s = Ue("TopButton");
|
|
852
853
|
return p(), k(m(ke), {
|
|
853
854
|
class: "top-projectSelectorSubmenu",
|
|
854
855
|
notch: !1,
|
|
855
856
|
pos: "2"
|
|
856
857
|
}, {
|
|
857
|
-
opener:
|
|
858
|
-
|
|
858
|
+
opener: A(() => [
|
|
859
|
+
K(s, {
|
|
859
860
|
class: "top-projectSelectorSubmenu_opener",
|
|
860
861
|
"data-top-icon": "",
|
|
861
862
|
color: "theme"
|
|
862
863
|
})
|
|
863
864
|
]),
|
|
864
|
-
contentList:
|
|
865
|
-
(p(!0), T(F, null,
|
|
866
|
-
|
|
865
|
+
contentList: A(() => [
|
|
866
|
+
(p(!0), T(F, null, ge(r.value, (g) => (p(), T("li", Kt, [
|
|
867
|
+
O("a", {
|
|
867
868
|
href: g.href,
|
|
868
869
|
title: g.title,
|
|
869
870
|
"data-top-icon": g.icon,
|
|
870
871
|
"data-right": g.right
|
|
871
872
|
}, null, 8, Ot)
|
|
872
873
|
]))), 256)),
|
|
873
|
-
|
|
874
|
-
|
|
874
|
+
O("li", Nt, [
|
|
875
|
+
O("a", {
|
|
875
876
|
href: e.url,
|
|
876
877
|
"data-top-icon": "",
|
|
877
878
|
target: "_blank"
|
|
@@ -882,7 +883,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
882
883
|
});
|
|
883
884
|
};
|
|
884
885
|
}
|
|
885
|
-
}),
|
|
886
|
+
}), he = (e) => ({
|
|
886
887
|
id: null,
|
|
887
888
|
name: e,
|
|
888
889
|
listItemProps: {
|
|
@@ -892,11 +893,11 @@ const Pt = /* @__PURE__ */ L({
|
|
|
892
893
|
scheduledUpdate: !1,
|
|
893
894
|
manualUpdate: !1,
|
|
894
895
|
guestProjects: !1
|
|
895
|
-
},
|
|
896
|
+
}, qt = (e, t) => {
|
|
896
897
|
const o = [], a = {
|
|
897
|
-
scheduledUpdate:
|
|
898
|
-
manualUpdate:
|
|
899
|
-
guestProjects:
|
|
898
|
+
scheduledUpdate: he(j().Projects.Scheduled_update),
|
|
899
|
+
manualUpdate: he(j().Projects.Manual_update),
|
|
900
|
+
guestProjects: he(j().Projects.Guest_projects)
|
|
900
901
|
}, r = t ? {
|
|
901
902
|
scheduledUpdate: !1,
|
|
902
903
|
manualUpdate: !1,
|
|
@@ -905,7 +906,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
905
906
|
for (const l of e)
|
|
906
907
|
!r.scheduledUpdate && l.right?.startsWith("1") && l.on > 0 && (o.push(a.scheduledUpdate), r.scheduledUpdate = !0), !r.manualUpdate && l.right?.startsWith("1") && l.on === 0 && (o.push(a.manualUpdate), r.manualUpdate = !0), !r.guestProjects && l.right?.startsWith("0") && l.on >= 0 && (o.push(a.guestProjects), r.guestProjects = !0), o.push(l);
|
|
907
908
|
return o;
|
|
908
|
-
},
|
|
909
|
+
}, Ft = (e, t, o, a) => !e || e.length === 0 ? [] : (t && (e = e.filter((r) => r.id !== t)), o && Object.keys(Ie).forEach((r) => Ie[r] = !1), qt(e, a)), Wt = (e) => {
|
|
909
910
|
if (!e) return "";
|
|
910
911
|
let t = e;
|
|
911
912
|
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;
|
|
@@ -914,9 +915,9 @@ const Pt = /* @__PURE__ */ L({
|
|
|
914
915
|
let o = "project/dynamics/", a = "";
|
|
915
916
|
t[1] == "project" && (o = t[1] + "/" + t[2] + "/"), ["watcher", "indexing", "sitemap", "audit", "direct", "adwords"].includes(t[4]) && (a = t[4] + "/");
|
|
916
917
|
let r = "/" + o + e + "/" + a;
|
|
917
|
-
const l =
|
|
918
|
+
const l = Wt(location.hash);
|
|
918
919
|
return r += l, r;
|
|
919
|
-
},
|
|
920
|
+
}, Ht = (e, t) => {
|
|
920
921
|
if (e)
|
|
921
922
|
return e.map((o) => o.id ? {
|
|
922
923
|
...o,
|
|
@@ -926,15 +927,20 @@ const Pt = /* @__PURE__ */ L({
|
|
|
926
927
|
title: o.name
|
|
927
928
|
}
|
|
928
929
|
} : o);
|
|
929
|
-
},
|
|
930
|
+
}, Me = (e) => {
|
|
930
931
|
let t = e.startsWith("http") ? e : "http://" + e;
|
|
931
932
|
return t = t.replace(/"/g, "%22"), t;
|
|
932
|
-
},
|
|
933
|
+
}, Jt = (e, t) => {
|
|
934
|
+
let o = e.params.filters ?? [];
|
|
935
|
+
o = o.filter((n) => n.name !== "GEN_SEARCH_STRING()");
|
|
936
|
+
const a = mt(t), r = t.replace(/([[^$.|?*+()])/g, "\\$1"), l = a.replace(/([[^$.|?*+()])/g, "\\$1");
|
|
937
|
+
o.push(ie("GEN_SEARCH_STRING()", "REGEXP", [`(${r}|${l})`])), e.changeParams({ filters: o });
|
|
938
|
+
}, Ve = (e, t, o, a) => {
|
|
933
939
|
const r = e.gen("/get/projects_2/projects/", ["id", "user_id", "name", "url", "on", "right"]);
|
|
934
940
|
return r.params = {
|
|
935
941
|
...a,
|
|
936
942
|
filters: [
|
|
937
|
-
|
|
943
|
+
ie("on", "GREATER_THAN_EQUALS", [0])
|
|
938
944
|
],
|
|
939
945
|
orders: [
|
|
940
946
|
le("user_id", "DESC", [t]),
|
|
@@ -944,14 +950,14 @@ const Pt = /* @__PURE__ */ L({
|
|
|
944
950
|
]
|
|
945
951
|
}, r.options.onApiLoaded = (l, n, s) => {
|
|
946
952
|
const g = n.data.filters.length === 1 && n.data.offset === 0 || n.data.limit === 1e3, c = n.data.limit === 100 && n.data.filters.length > 1 ? !0 : void 0;
|
|
947
|
-
l.result =
|
|
953
|
+
l.result = Ft(l.result, o, g, c), s?.(l, n);
|
|
948
954
|
}, r;
|
|
949
|
-
},
|
|
955
|
+
}, zt = (e) => e.gen("/add/projects_2/projects/"), xe = "ui_project_selector_total:", Yt = 1440 * 60 * 1e3, U = De(), Xe = _(0), ne = _(null), Ge = (e, t) => {
|
|
950
956
|
localStorage.setItem(
|
|
951
957
|
xe + e,
|
|
952
|
-
JSON.stringify({ projectsTotal: t, expiresAt: Date.now() +
|
|
958
|
+
JSON.stringify({ projectsTotal: t, expiresAt: Date.now() + Yt })
|
|
953
959
|
);
|
|
954
|
-
},
|
|
960
|
+
}, Qt = (e) => {
|
|
955
961
|
const t = localStorage.getItem(xe + e);
|
|
956
962
|
if (!t) return;
|
|
957
963
|
const { projectsTotal: o, expiresAt: a } = JSON.parse(t);
|
|
@@ -960,12 +966,12 @@ const Pt = /* @__PURE__ */ L({
|
|
|
960
966
|
return;
|
|
961
967
|
}
|
|
962
968
|
return o;
|
|
963
|
-
},
|
|
964
|
-
|
|
965
|
-
},
|
|
969
|
+
}, Xt = (e = !0) => {
|
|
970
|
+
U.value = void 0, e && Xe.value++;
|
|
971
|
+
}, Zt = { class: "top-projectSelector_itemText" }, eo = { class: "top-projectSelector_itemName" }, to = { class: "top-projectSelector_itemId" }, oo = { key: 1 }, ao = {
|
|
966
972
|
key: 0,
|
|
967
973
|
class: "top-comment"
|
|
968
|
-
},
|
|
974
|
+
}, Le = 1e3, bo = /* @__PURE__ */ L({
|
|
969
975
|
__name: "projectSelector",
|
|
970
976
|
props: /* @__PURE__ */ V({
|
|
971
977
|
userId: { default: window.mo?.user?.id },
|
|
@@ -978,29 +984,32 @@ const Pt = /* @__PURE__ */ L({
|
|
|
978
984
|
buttonProps: {},
|
|
979
985
|
openerShortcut: {}
|
|
980
986
|
}, {
|
|
981
|
-
project: {
|
|
987
|
+
project: {
|
|
988
|
+
default: { id: null, name: "" },
|
|
989
|
+
required: !1
|
|
990
|
+
},
|
|
982
991
|
projectModifiers: {}
|
|
983
992
|
}),
|
|
984
993
|
emits: ["update:project"],
|
|
985
994
|
setup(e) {
|
|
986
|
-
const t =
|
|
995
|
+
const t = j(), o = e, a = b(e, "project"), r = Ve(
|
|
987
996
|
o.client,
|
|
988
997
|
o.userId,
|
|
989
998
|
o.excludeProjectId
|
|
990
|
-
), l =
|
|
999
|
+
), l = zt(o.client), n = _(Qt(o.userId)), s = _(null), g = E(() => o.placeholder ?? t.Projects.Select_project), c = E(() => {
|
|
991
1000
|
if (!(!n.value && n.value !== 0))
|
|
992
|
-
return n.value <
|
|
1001
|
+
return n.value < Le ? "static" : "api";
|
|
993
1002
|
});
|
|
994
1003
|
G(Xe, () => {
|
|
995
1004
|
d();
|
|
996
1005
|
});
|
|
997
1006
|
const S = async () => {
|
|
998
1007
|
if (!ne.value) {
|
|
999
|
-
const w =
|
|
1008
|
+
const w = Ve(
|
|
1000
1009
|
o.client,
|
|
1001
1010
|
o.userId,
|
|
1002
1011
|
o.excludeProjectId,
|
|
1003
|
-
{ limit:
|
|
1012
|
+
{ limit: Le }
|
|
1004
1013
|
);
|
|
1005
1014
|
ne.value = w.call();
|
|
1006
1015
|
}
|
|
@@ -1010,15 +1019,15 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1010
1019
|
}, i = async () => {
|
|
1011
1020
|
if (n.value) return;
|
|
1012
1021
|
const u = await S();
|
|
1013
|
-
u && (n.value = u.total, c.value === "static" && !
|
|
1022
|
+
u && (n.value = u.total, c.value === "static" && !U.value && (U.value = u.result), n.value && Ge(o.userId, n.value));
|
|
1014
1023
|
}, v = async (u) => {
|
|
1015
1024
|
const w = await l.changeParams({
|
|
1016
1025
|
url: u.name,
|
|
1017
1026
|
name: u.name
|
|
1018
1027
|
}).call();
|
|
1019
1028
|
if (!w.errors) {
|
|
1020
|
-
if (
|
|
1021
|
-
const
|
|
1029
|
+
if (U.value && c.value === "static") {
|
|
1030
|
+
const N = {
|
|
1022
1031
|
id: Number(w.result),
|
|
1023
1032
|
user_id: o.userId,
|
|
1024
1033
|
name: u.name,
|
|
@@ -1031,82 +1040,82 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1031
1040
|
title: u.name
|
|
1032
1041
|
}
|
|
1033
1042
|
};
|
|
1034
|
-
|
|
1043
|
+
U.value = [N, ...U.value], n.value && Ge(o.userId, n.value + 1);
|
|
1035
1044
|
}
|
|
1036
|
-
c.value === "api" &&
|
|
1045
|
+
c.value === "api" && Xt(o.userId);
|
|
1037
1046
|
}
|
|
1038
1047
|
}, d = () => {
|
|
1039
1048
|
c.value === "api" && s.value?.resetCache(!0);
|
|
1040
1049
|
}, f = async () => {
|
|
1041
|
-
if (
|
|
1050
|
+
if (U.value || c.value !== "static") return;
|
|
1042
1051
|
const u = await S();
|
|
1043
|
-
u && (
|
|
1052
|
+
u && (U.value = u.result);
|
|
1044
1053
|
};
|
|
1045
1054
|
return Ze(async () => {
|
|
1046
1055
|
await i();
|
|
1047
1056
|
}), (u, w) => {
|
|
1048
|
-
const
|
|
1049
|
-
return c.value ? (p(), k(
|
|
1057
|
+
const N = Ue("TopButton");
|
|
1058
|
+
return c.value ? (p(), k(Ae, {
|
|
1050
1059
|
key: 0,
|
|
1051
1060
|
ref_key: "refSelector",
|
|
1052
1061
|
ref: s,
|
|
1053
1062
|
class: "top-projectSelector",
|
|
1054
1063
|
modelValue: a.value,
|
|
1055
1064
|
"onUpdate:modelValue": w[1] || (w[1] = (P) => a.value = P),
|
|
1056
|
-
items: m(
|
|
1065
|
+
items: m(Ht)(m(U), e.addLinksToProjects),
|
|
1057
1066
|
title: u.$i18n.Projects.Search_projects,
|
|
1058
1067
|
modificator: e.modificator,
|
|
1059
1068
|
placeholder: g.value,
|
|
1060
1069
|
hasCloserBtn: "",
|
|
1061
1070
|
api: c.value === "api" ? m(r) : void 0,
|
|
1062
|
-
apiSetSearchParams: c.value === "api" ? (...P) => m(
|
|
1071
|
+
apiSetSearchParams: c.value === "api" ? (...P) => m(Jt)(...P) : void 0,
|
|
1063
1072
|
useCache: "",
|
|
1064
1073
|
appendSearchToResult: "",
|
|
1065
|
-
appendSearchToResultCond: m(
|
|
1074
|
+
appendSearchToResultCond: m(we),
|
|
1066
1075
|
appendWithoutSelect: "",
|
|
1067
1076
|
buttonProps: e.buttonProps,
|
|
1068
1077
|
openerShortcut: e.openerShortcut,
|
|
1069
1078
|
onAppendItem: v,
|
|
1070
1079
|
onOpen: f
|
|
1071
1080
|
}, {
|
|
1072
|
-
item:
|
|
1081
|
+
item: A(({ item: P }) => [
|
|
1073
1082
|
P.id ? (p(), T(F, { key: 0 }, [
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1083
|
+
O("div", Zt, [
|
|
1084
|
+
O("span", eo, B(m(gt)(P.name, 20)), 1),
|
|
1085
|
+
O("span", to, " id " + B(P.id), 1)
|
|
1077
1086
|
]),
|
|
1078
|
-
u.$core.state.isMobile ?
|
|
1087
|
+
u.$core.state.isMobile ? M("", !0) : (p(), k(N, {
|
|
1079
1088
|
key: 0,
|
|
1080
1089
|
class: "top-projectSelector_itemLink",
|
|
1081
|
-
href: m(
|
|
1090
|
+
href: m(Me)(P.url),
|
|
1082
1091
|
"data-top-icon": "",
|
|
1083
1092
|
color: "theme",
|
|
1084
1093
|
target: "_blank",
|
|
1085
1094
|
onClick: w[0] || (w[0] = W(() => {
|
|
1086
1095
|
}, ["stop"]))
|
|
1087
1096
|
}, null, 8, ["href"])),
|
|
1088
|
-
|
|
1097
|
+
K(Dt, {
|
|
1089
1098
|
id: P.id,
|
|
1090
1099
|
right: P.right ?? void 0,
|
|
1091
|
-
url: m(
|
|
1100
|
+
url: m(Me)(P.url)
|
|
1092
1101
|
}, null, 8, ["id", "right", "url"])
|
|
1093
|
-
], 64)) : (p(), T("div",
|
|
1094
|
-
m(
|
|
1095
|
-
|
|
1102
|
+
], 64)) : (p(), T("div", oo, [
|
|
1103
|
+
m(we)(P.name) ? (p(), T("div", ao, B(u.$i18n.Projects.Add_project) + ": ", 1)) : M("", !0),
|
|
1104
|
+
H(" " + B(P.name), 1)
|
|
1096
1105
|
]))
|
|
1097
1106
|
]),
|
|
1098
1107
|
_: 1
|
|
1099
|
-
}, 8, ["modelValue", "items", "title", "modificator", "placeholder", "api", "apiSetSearchParams", "appendSearchToResultCond", "buttonProps", "openerShortcut"])) :
|
|
1108
|
+
}, 8, ["modelValue", "items", "title", "modificator", "placeholder", "api", "apiSetSearchParams", "appendSearchToResultCond", "buttonProps", "openerShortcut"])) : M("", !0);
|
|
1100
1109
|
};
|
|
1101
1110
|
}
|
|
1102
|
-
}),
|
|
1111
|
+
}), Re = (e) => "-" + e, te = (e) => e[0] === "-" ? e.substring(1) : e, fe = (e, t) => {
|
|
1103
1112
|
e = te(e);
|
|
1104
1113
|
const o = t.find((a) => a.id === e);
|
|
1105
1114
|
if (o)
|
|
1106
1115
|
return o;
|
|
1107
|
-
},
|
|
1116
|
+
}, $o = (e, t, o) => {
|
|
1108
1117
|
t || (t = { id: e.id }), t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
|
|
1109
|
-
const a =
|
|
1118
|
+
const a = vt.genElPopupOpener("div", t);
|
|
1110
1119
|
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 = (r) => {
|
|
1111
1120
|
r.preventDefault(), r.stopPropagation(), a.onclick = null;
|
|
1112
1121
|
const l = _(e.modelValue), n = {
|
|
@@ -1116,15 +1125,15 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1116
1125
|
filters: e.filters,
|
|
1117
1126
|
payload: e.payload
|
|
1118
1127
|
};
|
|
1119
|
-
X(a, "topTagSelectorTarget", n), delete a.dataset.topPopupDisabled,
|
|
1128
|
+
X(a, "topTagSelectorTarget", n), delete a.dataset.topPopupDisabled, be(e.modelValue) || G(l, () => {
|
|
1120
1129
|
e.modelValue = l.value, re(a, e, o);
|
|
1121
1130
|
}), a.click();
|
|
1122
|
-
},
|
|
1131
|
+
}, be(e.modelValue) ? G(e.modelValue, () => re(a, e, o)) : X(a, "topTagSelectorRender", (r) => {
|
|
1123
1132
|
e.modelValue = r;
|
|
1124
1133
|
const l = X(a, "topTagSelectorTarget");
|
|
1125
1134
|
l && (l.model.value = r), re(a, e, o);
|
|
1126
1135
|
}), re(a, e, o), a;
|
|
1127
|
-
},
|
|
1136
|
+
}, wo = (e, t) => {
|
|
1128
1137
|
X(e, "topTagSelectorRender")?.(t);
|
|
1129
1138
|
}, re = (e, t, o) => {
|
|
1130
1139
|
const a = m(t.modelValue);
|
|
@@ -1133,27 +1142,27 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1133
1142
|
return;
|
|
1134
1143
|
}
|
|
1135
1144
|
if (e.innerHTML = "", !a.length && t.mode === "filter") {
|
|
1136
|
-
const r =
|
|
1145
|
+
const r = Ke({
|
|
1137
1146
|
id: "all",
|
|
1138
1147
|
colorId: "",
|
|
1139
|
-
name:
|
|
1148
|
+
name: j().Common?.All_tags ?? "",
|
|
1140
1149
|
state: ""
|
|
1141
1150
|
});
|
|
1142
1151
|
e.append(r);
|
|
1143
1152
|
}
|
|
1144
1153
|
a.forEach((r) => {
|
|
1145
|
-
const l =
|
|
1154
|
+
const l = Ke({
|
|
1146
1155
|
id: te(r),
|
|
1147
|
-
colorId:
|
|
1148
|
-
name:
|
|
1156
|
+
colorId: fe(r, t.tags)?.color_id ?? "",
|
|
1157
|
+
name: fe(r, t.tags)?.name ?? "",
|
|
1149
1158
|
state: te(r) === r ? "selected" : "excluded"
|
|
1150
1159
|
});
|
|
1151
1160
|
e.append(l);
|
|
1152
1161
|
});
|
|
1153
|
-
},
|
|
1162
|
+
}, Ke = (e) => {
|
|
1154
1163
|
const t = document.createElement("div");
|
|
1155
1164
|
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;
|
|
1156
|
-
},
|
|
1165
|
+
}, lo = [
|
|
1157
1166
|
{
|
|
1158
1167
|
id: "1",
|
|
1159
1168
|
name: "Without Tag",
|
|
@@ -1204,7 +1213,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1204
1213
|
name: "Turquoise",
|
|
1205
1214
|
color_id: "10"
|
|
1206
1215
|
}
|
|
1207
|
-
],
|
|
1216
|
+
], no = ["data-tag_id", "data-tag_color_id", "title"], Ce = /* @__PURE__ */ L({
|
|
1208
1217
|
__name: "tagIcon",
|
|
1209
1218
|
props: {
|
|
1210
1219
|
id: {},
|
|
@@ -1222,9 +1231,9 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1222
1231
|
"data-tag_id": e.id,
|
|
1223
1232
|
"data-tag_color_id": e.colorId,
|
|
1224
1233
|
title: e.name
|
|
1225
|
-
}, null, 10,
|
|
1234
|
+
}, null, 10, no));
|
|
1226
1235
|
}
|
|
1227
|
-
}),
|
|
1236
|
+
}), ro = ["contenteditable", "onKeydown"], Oe = /* @__PURE__ */ L({
|
|
1228
1237
|
__name: "tagPopupListItem",
|
|
1229
1238
|
props: /* @__PURE__ */ V({
|
|
1230
1239
|
editable: { type: Boolean },
|
|
@@ -1242,7 +1251,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1242
1251
|
}),
|
|
1243
1252
|
emits: /* @__PURE__ */ V(["update:name", "unselect", "exclude", "select"], ["update:name"]),
|
|
1244
1253
|
setup(e, { emit: t }) {
|
|
1245
|
-
const o = e, a = t, r = b(e, "name"), l = _(null), n =
|
|
1254
|
+
const o = e, a = t, r = b(e, "name"), l = _(null), n = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
1246
1255
|
contenteditable: s.value,
|
|
1247
1256
|
onpaste: (v) => v.preventDefault()
|
|
1248
1257
|
} : {}), s = _(!1), g = async () => {
|
|
@@ -1269,24 +1278,24 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1269
1278
|
}),
|
|
1270
1279
|
onClick: W(i, ["stop"])
|
|
1271
1280
|
}, {
|
|
1272
|
-
default:
|
|
1273
|
-
|
|
1281
|
+
default: A(() => [
|
|
1282
|
+
K(Ce, {
|
|
1274
1283
|
id: e.id,
|
|
1275
1284
|
name: r.value,
|
|
1276
1285
|
colorId: e.colorId,
|
|
1277
1286
|
state: e.state
|
|
1278
1287
|
}, null, 8, ["id", "name", "colorId", "state"]),
|
|
1279
|
-
|
|
1288
|
+
O("span", qe({
|
|
1280
1289
|
ref_key: "elName",
|
|
1281
1290
|
ref: l,
|
|
1282
1291
|
class: "top-tagSelector_tagListItemName",
|
|
1283
1292
|
contenteditable: s.value ? "plaintext-only" : !1
|
|
1284
1293
|
}, n.value, {
|
|
1285
1294
|
onKeydown: [
|
|
1286
|
-
|
|
1287
|
-
|
|
1295
|
+
$e(W(c, ["stop"]), ["enter"]),
|
|
1296
|
+
$e(W(S, ["stop"]), ["esc"])
|
|
1288
1297
|
]
|
|
1289
|
-
}), B(r.value), 17,
|
|
1298
|
+
}), B(r.value), 17, ro),
|
|
1290
1299
|
e.editable ? (p(), T(F, { key: 0 }, [
|
|
1291
1300
|
s.value ? (p(), T("span", {
|
|
1292
1301
|
key: 1,
|
|
@@ -1299,12 +1308,12 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1299
1308
|
class: "top-tagSelector_edit",
|
|
1300
1309
|
onClick: g
|
|
1301
1310
|
}))
|
|
1302
|
-
], 64)) :
|
|
1311
|
+
], 64)) : M("", !0)
|
|
1303
1312
|
]),
|
|
1304
1313
|
_: 1
|
|
1305
1314
|
}, 8, ["class"]));
|
|
1306
1315
|
}
|
|
1307
|
-
}),
|
|
1316
|
+
}), io = { key: 1 }, so = /* @__PURE__ */ L({
|
|
1308
1317
|
inheritAttrs: !1,
|
|
1309
1318
|
__name: "popupOpener",
|
|
1310
1319
|
props: /* @__PURE__ */ V({
|
|
@@ -1335,8 +1344,8 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1335
1344
|
return (n, s) => {
|
|
1336
1345
|
const g = tt("top-data");
|
|
1337
1346
|
return p(), k(it, { id: e.id }, {
|
|
1338
|
-
default:
|
|
1339
|
-
ot((p(), k(at(m(a)),
|
|
1347
|
+
default: A(() => [
|
|
1348
|
+
ot((p(), k(at(m(a)), qe({
|
|
1340
1349
|
class: {
|
|
1341
1350
|
"top-tagSelector": !0,
|
|
1342
1351
|
"top-tagSelector-useTopButton": t.useTopButton,
|
|
@@ -1351,20 +1360,20 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1351
1360
|
color: "theme",
|
|
1352
1361
|
styling: e.styling
|
|
1353
1362
|
}, n.$attrs), {
|
|
1354
|
-
[m(r)]:
|
|
1363
|
+
[m(r)]: A(() => [
|
|
1355
1364
|
!o.value.length && e.mode === "filter" ? (p(), k(Ce, {
|
|
1356
1365
|
key: 0,
|
|
1357
1366
|
id: "all",
|
|
1358
1367
|
colorId: "",
|
|
1359
1368
|
name: n.$i18n.Common.All_tags ?? "",
|
|
1360
1369
|
state: ""
|
|
1361
|
-
}, null, 8, ["name"])) :
|
|
1362
|
-
e.mode === "setter" && e.filters ? (p(), T("div",
|
|
1370
|
+
}, null, 8, ["name"])) : M("", !0),
|
|
1371
|
+
e.mode === "setter" && e.filters ? (p(), T("div", io, [
|
|
1363
1372
|
lt(n.$slots, "default")
|
|
1364
|
-
])) : (p(!0), T(F, { key: 2 },
|
|
1373
|
+
])) : (p(!0), T(F, { key: 2 }, ge(o.value, (c) => (p(), k(Ce, {
|
|
1365
1374
|
id: m(te)(c),
|
|
1366
|
-
colorId: m(
|
|
1367
|
-
name: m(
|
|
1375
|
+
colorId: m(fe)(c, e.tags)?.color_id ?? "",
|
|
1376
|
+
name: m(fe)(c, e.tags)?.name ?? "",
|
|
1368
1377
|
state: m(te)(c) === c ? "selected" : "excluded"
|
|
1369
1378
|
}, null, 8, ["id", "colorId", "name", "state"]))), 256))
|
|
1370
1379
|
]),
|
|
@@ -1377,7 +1386,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1377
1386
|
}, 8, ["id"]);
|
|
1378
1387
|
};
|
|
1379
1388
|
}
|
|
1380
|
-
}),
|
|
1389
|
+
}), Po = /* @__PURE__ */ L({
|
|
1381
1390
|
__name: "tagSelector",
|
|
1382
1391
|
props: /* @__PURE__ */ V({
|
|
1383
1392
|
modelValue: {},
|
|
@@ -1397,13 +1406,13 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1397
1406
|
},
|
|
1398
1407
|
modelModifiers: {},
|
|
1399
1408
|
tags: {
|
|
1400
|
-
default: Ne(
|
|
1409
|
+
default: Ne(lo)
|
|
1401
1410
|
},
|
|
1402
1411
|
tagsModifiers: {}
|
|
1403
1412
|
}),
|
|
1404
1413
|
emits: /* @__PURE__ */ V(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
|
|
1405
1414
|
setup(e, { emit: t }) {
|
|
1406
|
-
const o =
|
|
1415
|
+
const o = j(), a = e, r = b(e, "modelValue"), l = b(e, "tags"), n = t, s = rt((h, I) => {
|
|
1407
1416
|
n(h, I);
|
|
1408
1417
|
}, a.emitDelay);
|
|
1409
1418
|
a.singleMode && !r.value.length && (r.value = [l.value[0].id]);
|
|
@@ -1411,7 +1420,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1411
1420
|
const h = " " + o.Common.Tags?.toLowerCase(), I = /* @__PURE__ */ new Map();
|
|
1412
1421
|
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;
|
|
1413
1422
|
};
|
|
1414
|
-
let i =
|
|
1423
|
+
let i = De({
|
|
1415
1424
|
model: r,
|
|
1416
1425
|
mode: "filter",
|
|
1417
1426
|
targetId: void 0,
|
|
@@ -1421,28 +1430,28 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1421
1430
|
G(r, () => {
|
|
1422
1431
|
s("selector", r.value);
|
|
1423
1432
|
});
|
|
1424
|
-
const v =
|
|
1433
|
+
const v = E(() => {
|
|
1425
1434
|
if (i.value.mode === "setter" && a.maxTagsForSetter && !i.value.filters)
|
|
1426
1435
|
return i.value.model.value.length >= a.maxTagsForSetter;
|
|
1427
1436
|
}), d = (h) => {
|
|
1428
1437
|
if (h !== "all") {
|
|
1429
1438
|
if (i.value.model.value.includes(h)) return "selected";
|
|
1430
|
-
if (i.value.model.value.includes(
|
|
1439
|
+
if (i.value.model.value.includes(Re(h))) return "excluded";
|
|
1431
1440
|
}
|
|
1432
1441
|
return h === "all" && !i.value.model.value.length ? "selected" : "";
|
|
1433
1442
|
}, f = (h, I) => {
|
|
1434
|
-
const x =
|
|
1435
|
-
let C = i.value.model.value.filter((
|
|
1436
|
-
I === "select" && C.push(h), I === "exclude" && C.push(x), i.value.mode === "setter" && i.value.targetId !== void 0 && a.requiredForSetter && (C.length || C.push("1"), C.length === 2 && i.value.model.value.length === 1 && i.value.model.value[0] === "1" && (C = C.filter((
|
|
1443
|
+
const x = Re(h);
|
|
1444
|
+
let C = i.value.model.value.filter((R) => R !== h && R !== x);
|
|
1445
|
+
I === "select" && C.push(h), I === "exclude" && C.push(x), i.value.mode === "setter" && i.value.targetId !== void 0 && a.requiredForSetter && (C.length || C.push("1"), C.length === 2 && i.value.model.value.length === 1 && i.value.model.value[0] === "1" && (C = C.filter((R) => R !== "1"))), a.singleMode && !i.value.filters && (C.length || (C = i.value.model.value), C.length > 1 && (C = [C[C.length - 1]])), C.sort((R, ae) => {
|
|
1437
1446
|
if (!a.tags) return 0;
|
|
1438
|
-
const
|
|
1439
|
-
return
|
|
1447
|
+
const J = a.tags.findIndex((Y) => Y.id === R), z = a.tags.findIndex((Y) => Y.id === ae);
|
|
1448
|
+
return J - z;
|
|
1440
1449
|
}), i.value.model.value = C, i.value.mode === "setter" && i.value.targetId !== void 0 && s("setter", {
|
|
1441
1450
|
tagsIds: C,
|
|
1442
1451
|
targetId: i.value.targetId,
|
|
1443
1452
|
payload: i.value.payload
|
|
1444
1453
|
});
|
|
1445
|
-
}, u =
|
|
1454
|
+
}, u = E(() => {
|
|
1446
1455
|
let h = "top-tagSelector_popup";
|
|
1447
1456
|
return i.value.mode === "filter" && (h += " top-tagSelector_popup-filter"), i.value.mode === "setter" && (h += " top-tagSelector_popup-setter"), h;
|
|
1448
1457
|
}), w = () => {
|
|
@@ -1454,7 +1463,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1454
1463
|
name: h,
|
|
1455
1464
|
color_id: String((I - 1) % 10 + 1)
|
|
1456
1465
|
}), n("tagsChanged", l.value);
|
|
1457
|
-
},
|
|
1466
|
+
}, N = (h) => {
|
|
1458
1467
|
if (i.value = X(h.elPopupOpener, "topTagSelectorTarget"), !i.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1459
1468
|
if (i.value.filters && (c.value = "add", i.value.model.value = []), !Q.$?.ui.sortable) {
|
|
1460
1469
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
@@ -1469,13 +1478,13 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1469
1478
|
distance: 10,
|
|
1470
1479
|
stop: function(I, x) {
|
|
1471
1480
|
if (!l.value) return;
|
|
1472
|
-
const C = $(x.item).parent().find("[data-tag_id]"),
|
|
1473
|
-
C.each((ae,
|
|
1481
|
+
const C = $(x.item).parent().find("[data-tag_id]"), R = [];
|
|
1482
|
+
C.each((ae, J) => {
|
|
1474
1483
|
if (!l.value) return;
|
|
1475
|
-
const z = $(
|
|
1476
|
-
|
|
1477
|
-
}), l.value.sort((ae,
|
|
1478
|
-
const z =
|
|
1484
|
+
const z = $(J).attr("data-tag_id");
|
|
1485
|
+
R.push(z);
|
|
1486
|
+
}), l.value.sort((ae, J) => {
|
|
1487
|
+
const z = R.findIndex((me) => me === ae.id), Y = R.findIndex((me) => me === J.id);
|
|
1479
1488
|
return z - Y;
|
|
1480
1489
|
}), s("tagsChanged", l.value);
|
|
1481
1490
|
}
|
|
@@ -1484,7 +1493,7 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1484
1493
|
Q.$?.ui.sortable && $(h.elPopup).data("ui-sortable") && $(h.elPopup).sortable("destroy");
|
|
1485
1494
|
};
|
|
1486
1495
|
return (h, I) => (p(), T(F, null, [
|
|
1487
|
-
|
|
1496
|
+
K(so, {
|
|
1488
1497
|
modelValue: r.value,
|
|
1489
1498
|
"onUpdate:modelValue": I[0] || (I[0] = (x) => r.value = x),
|
|
1490
1499
|
id: m(g),
|
|
@@ -1493,23 +1502,23 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1493
1502
|
mode: "filter",
|
|
1494
1503
|
useTopButton: e.useTopButton
|
|
1495
1504
|
}, null, 8, ["modelValue", "id", "tags", "styling", "useTopButton"]),
|
|
1496
|
-
|
|
1505
|
+
K(ke, {
|
|
1497
1506
|
id: m(g),
|
|
1498
1507
|
class: oe(u.value),
|
|
1499
|
-
onOpen: I[4] || (I[4] = (x) =>
|
|
1508
|
+
onOpen: I[4] || (I[4] = (x) => N(x)),
|
|
1500
1509
|
onClose: I[5] || (I[5] = (x) => P(x)),
|
|
1501
1510
|
"transition-duration": 50
|
|
1502
1511
|
}, nt({
|
|
1503
|
-
contentList:
|
|
1504
|
-
m(i).mode === "filter" && !e.singleMode ? (p(), k(
|
|
1512
|
+
contentList: A(() => [
|
|
1513
|
+
m(i).mode === "filter" && !e.singleMode ? (p(), k(Oe, {
|
|
1505
1514
|
key: 0,
|
|
1506
1515
|
id: "all",
|
|
1507
1516
|
colorId: "",
|
|
1508
1517
|
name: h.$i18n.Common.All_tags ?? "",
|
|
1509
1518
|
state: m(i).model.value.length ? "" : "selected",
|
|
1510
1519
|
onSelect: I[3] || (I[3] = (x) => m(i).model.value = [])
|
|
1511
|
-
}, null, 8, ["name", "state"])) :
|
|
1512
|
-
(p(!0), T(F, null,
|
|
1520
|
+
}, null, 8, ["name", "state"])) : M("", !0),
|
|
1521
|
+
(p(!0), T(F, null, ge(l.value, (x) => (p(), k(Oe, {
|
|
1513
1522
|
key: x.id,
|
|
1514
1523
|
id: x.id,
|
|
1515
1524
|
colorId: x.color_id,
|
|
@@ -1530,18 +1539,18 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1530
1539
|
"data-top-icon": "",
|
|
1531
1540
|
onClick: W(w, ["stop"])
|
|
1532
1541
|
}, {
|
|
1533
|
-
default:
|
|
1534
|
-
|
|
1542
|
+
default: A(() => [
|
|
1543
|
+
H(B(h.$i18n.Common.Add), 1)
|
|
1535
1544
|
]),
|
|
1536
1545
|
_: 1
|
|
1537
|
-
})) :
|
|
1546
|
+
})) : M("", !0)
|
|
1538
1547
|
]),
|
|
1539
1548
|
_: 2
|
|
1540
1549
|
}, [
|
|
1541
1550
|
m(i).mode === "setter" && m(i).filters ? {
|
|
1542
1551
|
name: "header",
|
|
1543
|
-
fn:
|
|
1544
|
-
|
|
1552
|
+
fn: A(() => [
|
|
1553
|
+
K(ye, {
|
|
1545
1554
|
modelValue: c.value,
|
|
1546
1555
|
"onUpdate:modelValue": I[1] || (I[1] = (x) => c.value = x),
|
|
1547
1556
|
options: S()
|
|
@@ -1551,14 +1560,14 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1551
1560
|
} : void 0,
|
|
1552
1561
|
m(i).mode === "setter" && m(i).filters ? {
|
|
1553
1562
|
name: "footer",
|
|
1554
|
-
fn:
|
|
1555
|
-
|
|
1556
|
-
default:
|
|
1557
|
-
|
|
1563
|
+
fn: A(() => [
|
|
1564
|
+
K(ee, { color: "theme" }, {
|
|
1565
|
+
default: A(() => [
|
|
1566
|
+
H(B(h.$i18n.Common.Cancel2), 1)
|
|
1558
1567
|
]),
|
|
1559
1568
|
_: 1
|
|
1560
1569
|
}),
|
|
1561
|
-
|
|
1570
|
+
K(ee, {
|
|
1562
1571
|
onClick: I[2] || (I[2] = (x) => m(s)("setter", {
|
|
1563
1572
|
tagsIds: m(i).model.value,
|
|
1564
1573
|
filters: m(i).filters,
|
|
@@ -1566,8 +1575,8 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1566
1575
|
payload: m(i).payload
|
|
1567
1576
|
}))
|
|
1568
1577
|
}, {
|
|
1569
|
-
default:
|
|
1570
|
-
|
|
1578
|
+
default: A(() => [
|
|
1579
|
+
H(B(c.value === "add" ? h.$i18n.Common.Add : "") + " " + B(c.value === "replace" ? h.$i18n.Common.Replace : "") + " " + B(c.value === "delete" ? h.$i18n.Common.Delete : ""), 1)
|
|
1571
1580
|
]),
|
|
1572
1581
|
_: 1
|
|
1573
1582
|
})
|
|
@@ -1579,18 +1588,18 @@ const Pt = /* @__PURE__ */ L({
|
|
|
1579
1588
|
}
|
|
1580
1589
|
});
|
|
1581
1590
|
export {
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1591
|
+
To as TopCompetitorSelector,
|
|
1592
|
+
Bo as TopGroupSelector,
|
|
1593
|
+
bo as TopProjectSelector,
|
|
1594
|
+
jo as TopRegionSelector,
|
|
1595
|
+
Po as TopTagSelector,
|
|
1596
|
+
so as TopTagSelectorPopupOpener,
|
|
1588
1597
|
Ce as TopTagSelectorTagIcon,
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1598
|
+
Tt as dialogRegionSelector,
|
|
1599
|
+
kt as findRegion,
|
|
1600
|
+
$o as genElTopTagSelectorPopupOpener,
|
|
1601
|
+
Je as genSearcherByKey,
|
|
1602
|
+
wo as renderElTopTagSelectorPopupOpener,
|
|
1603
|
+
Ao as useItemsFromCompetitors
|
|
1595
1604
|
};
|
|
1596
1605
|
//# sourceMappingURL=project.js.map
|