@topvisor/ui 1.5.10-hotkeys.2 → 1.5.10-hotkeys.4
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/forms-CjJD60m3.es.amd.js.map +1 -1
- package/.chunks/forms-CjJD60m3.es.js.map +1 -1
- package/.chunks/formsExt-CbccziSy.es.amd.js +2 -0
- package/.chunks/formsExt-CbccziSy.es.amd.js.map +1 -0
- package/.chunks/{formsExt-B9hGGznb.es.js → formsExt-CbccziSy.es.js} +15 -11
- package/.chunks/formsExt-CbccziSy.es.js.map +1 -0
- package/assets/forms.css +1 -1
- package/assets/project.css +1 -1
- package/autoload-css-manifest.amd.json +1 -1
- package/autoload-css-manifest.json +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +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 +373 -391
- package/project/project.js.map +1 -1
- package/src/components/formsExt/selector2/composables/useAPI.d.ts +199 -1
- package/src/components/project/project.d.ts +0 -1
- package/src/components/project/projectSelector/cache.d.ts +2 -2
- package/src/components/project/projectSelector/utils.d.ts +6 -4
- package/.chunks/formsExt-B9hGGznb.es.amd.js +0 -2
- package/.chunks/formsExt-B9hGGznb.es.amd.js.map +0 -1
- package/.chunks/formsExt-B9hGGznb.es.js.map +0 -1
- package/src/components/project/navigation/navigateCache.d.ts +0 -15
- package/src/components/project/navigation/navigation.d.ts +0 -4
package/project/project.js
CHANGED
|
@@ -15,13 +15,13 @@ import { validUrl as u } from "../utils/check.js";
|
|
|
15
15
|
import { ellipsis as d } from "../utils/string.js";
|
|
16
16
|
import { getDeviceGIcon as f, getLangLabel as p, getSearcherGIcon as m } from "../utils/searchers.js";
|
|
17
17
|
import { invertKeyboardLayout as h } from "../utils/keyboard.js";
|
|
18
|
-
import { c as g, n as _, o as v, r as
|
|
19
|
-
import { c as
|
|
20
|
-
import { Fragment as
|
|
18
|
+
import { c as g, n as _, o as v, r as ee, s as y } from "../.chunks/popup-q1PRZblX.es.js";
|
|
19
|
+
import { c as b, d as x, f as S, p as C } from "../.chunks/formsExt-CbccziSy.es.js";
|
|
20
|
+
import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createSlots as A, createTextVNode as j, createVNode as M, defineComponent as N, isRef as te, mergeModels as P, mergeProps as ne, nextTick as re, normalizeClass as F, onMounted as ie, openBlock as I, reactive as ae, ref as L, renderList as R, renderSlot as oe, resolveComponent as se, resolveDirective as ce, resolveDynamicComponent as le, shallowRef as ue, toDisplayString as z, toValue as de, unref as B, useId as fe, useModel as V, watch as H, withCtx as U, withDirectives as pe, withKeys as me, withModifiers as W } from "vue";
|
|
21
21
|
//#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
|
|
22
|
-
var
|
|
22
|
+
var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _e = /* @__PURE__ */ N({
|
|
23
23
|
__name: "competitorSelector",
|
|
24
|
-
props: /*@__PURE__*/
|
|
24
|
+
props: /*@__PURE__*/ P({
|
|
25
25
|
modelValue: {},
|
|
26
26
|
items: {},
|
|
27
27
|
showSelectAllItem: {
|
|
@@ -35,7 +35,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
35
35
|
}),
|
|
36
36
|
emits: ["update:modelValue"],
|
|
37
37
|
setup(e) {
|
|
38
|
-
let t = e, i =
|
|
38
|
+
let t = e, i = V(e, "modelValue"), o = T(() => {
|
|
39
39
|
if (t.showSelectAllItem) return {
|
|
40
40
|
icon: t.selectAllItemIcon,
|
|
41
41
|
title: n().Common.Select_all,
|
|
@@ -43,23 +43,23 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
43
43
|
content: ""
|
|
44
44
|
};
|
|
45
45
|
});
|
|
46
|
-
return (t, n) => (
|
|
47
|
-
opener:
|
|
46
|
+
return (t, n) => (I(), O("div", he, [B(r).state.isMobile ? (I(), E(y, { key: 0 }, {
|
|
47
|
+
opener: U(() => [M(a, {
|
|
48
48
|
class: "top-competitorSelector_opener",
|
|
49
49
|
color: "theme",
|
|
50
50
|
icon: "",
|
|
51
51
|
icon2: ""
|
|
52
52
|
}, {
|
|
53
|
-
default:
|
|
53
|
+
default: U(() => [j(z(e.items.find((e) => e.value === i.value?.[0])?.content), 1)]),
|
|
54
54
|
_: 1
|
|
55
55
|
})]),
|
|
56
|
-
contentList:
|
|
57
|
-
class:
|
|
56
|
+
contentList: U(() => [(I(!0), O(w, null, R(e.items, (e) => (I(), E(v, {
|
|
57
|
+
class: F({ "top-active": i.value?.includes(e.value) }),
|
|
58
58
|
"data-top-icon": e.icon,
|
|
59
59
|
title: e.title,
|
|
60
60
|
onClick: () => i.value = [e.value]
|
|
61
61
|
}, {
|
|
62
|
-
default:
|
|
62
|
+
default: U(() => [k("span", ge, z(e.content), 1)]),
|
|
63
63
|
_: 2
|
|
64
64
|
}, 1032, [
|
|
65
65
|
"class",
|
|
@@ -68,7 +68,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
68
68
|
"onClick"
|
|
69
69
|
]))), 256))]),
|
|
70
70
|
_: 1
|
|
71
|
-
})) : (
|
|
71
|
+
})) : (I(), E(C, {
|
|
72
72
|
key: 1,
|
|
73
73
|
modelValue: i.value,
|
|
74
74
|
"onUpdate:modelValue": n[0] ||= (e) => i.value = e,
|
|
@@ -83,12 +83,12 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
83
83
|
"selectAllItem"
|
|
84
84
|
]))]));
|
|
85
85
|
}
|
|
86
|
-
}),
|
|
86
|
+
}), ve = (e, t) => T(() => de(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
|
|
87
87
|
value: e.id,
|
|
88
88
|
title: e.url + ` [${e.id}]`,
|
|
89
|
-
icon: e.id ===
|
|
89
|
+
icon: e.id === de(t) ? "" : "",
|
|
90
90
|
content: e.name
|
|
91
|
-
}))),
|
|
91
|
+
}))), ye = {
|
|
92
92
|
0: "Yandex",
|
|
93
93
|
1: "Google",
|
|
94
94
|
4: "YouTube",
|
|
@@ -99,27 +99,27 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
99
99
|
20: "Yandex.com",
|
|
100
100
|
21: "Yandex.com.tr",
|
|
101
101
|
22: "YandexLive"
|
|
102
|
-
},
|
|
102
|
+
}, be = {
|
|
103
103
|
alt: "",
|
|
104
104
|
key: -2,
|
|
105
105
|
name: "--",
|
|
106
106
|
index: -2
|
|
107
|
-
},
|
|
107
|
+
}, xe = {
|
|
108
108
|
key: -2,
|
|
109
109
|
name: "--",
|
|
110
|
-
regions: [
|
|
111
|
-
regionByIndex: /* @__PURE__ */ new Map([[-2,
|
|
112
|
-
},
|
|
110
|
+
regions: [be],
|
|
111
|
+
regionByIndex: /* @__PURE__ */ new Map([[-2, be]])
|
|
112
|
+
}, G = {
|
|
113
113
|
alt: "",
|
|
114
114
|
key: -2,
|
|
115
115
|
name: "Autoselect",
|
|
116
116
|
index: -2
|
|
117
|
-
},
|
|
117
|
+
}, Se = {
|
|
118
118
|
key: -2,
|
|
119
119
|
name: "Autoselect",
|
|
120
|
-
regions: [
|
|
121
|
-
regionByIndex: /* @__PURE__ */ new Map([[-2,
|
|
122
|
-
},
|
|
120
|
+
regions: [G],
|
|
121
|
+
regionByIndex: /* @__PURE__ */ new Map([[-2, G]])
|
|
122
|
+
}, Ce = {
|
|
123
123
|
alt: "",
|
|
124
124
|
countryCode: "00",
|
|
125
125
|
depth: 1,
|
|
@@ -128,38 +128,38 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
128
128
|
index: -1,
|
|
129
129
|
lang: "ru",
|
|
130
130
|
name: "Without region"
|
|
131
|
-
},
|
|
131
|
+
}, we = () => (G.name = n().Common.Autoselect, G), Te = () => (we(), Se.name = n().Common.Autoselect, console.log(Se), Se), Ee = () => (Ce.name = n().Keywords.Without_region, Ce), De = [
|
|
132
132
|
4,
|
|
133
133
|
8,
|
|
134
134
|
9
|
|
135
|
-
],
|
|
136
|
-
let r =
|
|
135
|
+
], Oe = (e, t, n = []) => {
|
|
136
|
+
let r = Ae(e, !1, n), i;
|
|
137
137
|
return r.forEach((n) => {
|
|
138
138
|
if ((t.searcher_key === void 0 || t.searcher_key == n.key) && n.regions && (n.regions.forEach((r) => {
|
|
139
139
|
if (!i && (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))) return r.searcher_key = n.key, i = r, !1;
|
|
140
140
|
}), i)) return !1;
|
|
141
141
|
}), i;
|
|
142
|
-
},
|
|
142
|
+
}, ke = l(() => import("../.chunks/dialog_regionSelectorRegions-Nob9K60s.es.js")), Ae = (e = "", t = !1, n = []) => {
|
|
143
143
|
let r;
|
|
144
|
-
return r = e === "volume" || e === "cost_forecast" ?
|
|
145
|
-
},
|
|
144
|
+
return r = e === "volume" || e === "cost_forecast" ? je(n) : e === "project_relevant_url" ? Me(n) : Ne(n, !0), t && r.set(-2, Te()), r.size || r.set(-2, xe), r;
|
|
145
|
+
}, je = (e) => {
|
|
146
146
|
e = e.filter((e) => r.state.forceSearchersKeysForKeywordsStats.includes(e.key));
|
|
147
|
-
let t =
|
|
147
|
+
let t = Ne(e, !1);
|
|
148
148
|
return r.state.forceSearchersKeysForKeywordsStats.forEach((e) => {
|
|
149
149
|
if (t.has(e)) return;
|
|
150
150
|
let n = {
|
|
151
151
|
key: e,
|
|
152
|
-
name:
|
|
152
|
+
name: ye[e],
|
|
153
153
|
regions: [],
|
|
154
154
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
155
155
|
};
|
|
156
156
|
t.set(n.key, n);
|
|
157
157
|
}), r.state.showGlobalRegionForKeywordsStats && t.forEach((e) => {
|
|
158
158
|
if (!e.regionByIndex) return;
|
|
159
|
-
let t = { ...
|
|
159
|
+
let t = { ...Ee() };
|
|
160
160
|
e.regionByIndex.set(t.index, t);
|
|
161
161
|
}), t;
|
|
162
|
-
},
|
|
162
|
+
}, Me = (e) => (e = e.filter((e) => !De.includes(e.key)), Ne(e, !1)), Ne = (e, t) => {
|
|
163
163
|
let n = /* @__PURE__ */ new Map();
|
|
164
164
|
return e.forEach((e) => {
|
|
165
165
|
if (t && !e.enabled) return;
|
|
@@ -170,11 +170,11 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
170
170
|
r.regionByIndex.set(n.index, n);
|
|
171
171
|
}), r.regionByIndex.size, (!e.regions || r.regionByIndex.size) && n.set(r.key, r);
|
|
172
172
|
}), n;
|
|
173
|
-
},
|
|
173
|
+
}, Pe = (e, t) => {
|
|
174
174
|
let r = n();
|
|
175
175
|
return {
|
|
176
|
-
searcherKey:
|
|
177
|
-
optionBySearcherKey:
|
|
176
|
+
searcherKey: L(t.value.keys().next().value ?? -2),
|
|
177
|
+
optionBySearcherKey: T(() => {
|
|
178
178
|
let n = /* @__PURE__ */ new Map();
|
|
179
179
|
if (t.value.forEach((t) => {
|
|
180
180
|
let r = {
|
|
@@ -198,10 +198,10 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
198
198
|
return n;
|
|
199
199
|
})
|
|
200
200
|
};
|
|
201
|
-
},
|
|
202
|
-
let r = n(), i =
|
|
201
|
+
}, Fe = (e, t) => {
|
|
202
|
+
let r = n(), i = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), a = L(-2);
|
|
203
203
|
e.modelValue.length === 1 && (a.value = e.modelValue[0]), a.value === -2 && (a.value = i.value ? t.value?.regionByIndex.values().next().value?.key ?? -2 : t.value?.regionByIndex.keys().next().value ?? -2);
|
|
204
|
-
let o =
|
|
204
|
+
let o = T(() => {
|
|
205
205
|
let e = /* @__PURE__ */ new Map();
|
|
206
206
|
return t.value.regionByIndex?.forEach((n) => {
|
|
207
207
|
let a = n.name;
|
|
@@ -214,7 +214,11 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
214
214
|
return;
|
|
215
215
|
}
|
|
216
216
|
let o = p(t.value.key || 0, n.lang ?? ""), s = "";
|
|
217
|
-
n.device !== void 0 && (s = r.Common["Device_" + n.device]), o && (s += s ? `, ${o}` : o), n.alt
|
|
217
|
+
if (n.device !== void 0 && (s = r.Common["Device_" + n.device]), o && (s += s ? `, ${o}` : o), n.alt) {
|
|
218
|
+
let e = n.alt.toUpperCase();
|
|
219
|
+
s += s ? `, ${e}` : e;
|
|
220
|
+
}
|
|
221
|
+
s &&= ` (${s})`;
|
|
218
222
|
let c = {
|
|
219
223
|
value: n.index,
|
|
220
224
|
title: a + s,
|
|
@@ -223,7 +227,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
223
227
|
e.set(n.index, c);
|
|
224
228
|
}), e;
|
|
225
229
|
});
|
|
226
|
-
return
|
|
230
|
+
return H(o, (t, n) => {
|
|
227
231
|
if (e.onlySearcher || a.value !== void 0 && t.get(a.value)) return;
|
|
228
232
|
let i = t.keys().next().value;
|
|
229
233
|
if (a.value === -2 || i === -2) {
|
|
@@ -246,8 +250,8 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
246
250
|
regionIndex: a,
|
|
247
251
|
optionByRegionIndex: o
|
|
248
252
|
};
|
|
249
|
-
},
|
|
250
|
-
let r =
|
|
253
|
+
}, Ie = (e, t, n) => {
|
|
254
|
+
let r = L([]), i = () => {
|
|
251
255
|
if (e.onlySearcher && t.value) {
|
|
252
256
|
r.value = Array.from(t.value.keys());
|
|
253
257
|
return;
|
|
@@ -261,19 +265,19 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
261
265
|
}, a = () => {
|
|
262
266
|
r.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(r.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
|
|
263
267
|
};
|
|
264
|
-
return
|
|
268
|
+
return H(r, () => {
|
|
265
269
|
a();
|
|
266
270
|
}), e.addCompare && i(), { regionsIndexes: r };
|
|
267
|
-
},
|
|
268
|
-
let t =
|
|
271
|
+
}, Le = (e) => {
|
|
272
|
+
let t = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = T(() => Ae(e.forMode, e.autoRegion, e.searchers)), r = T(() => n.value.get(a.searcherKey.value) || xe), i = T(() => {
|
|
269
273
|
let e = /* @__PURE__ */ new Set();
|
|
270
274
|
return n.value.forEach((t) => {
|
|
271
275
|
t.regionByIndex.forEach((t) => {
|
|
272
276
|
t.index !== -2 && e.add(t.index);
|
|
273
277
|
});
|
|
274
278
|
}), e;
|
|
275
|
-
}), a =
|
|
276
|
-
|
|
279
|
+
}), a = Pe(e, n), o = Fe(e, r), s = Ie(e, n, i);
|
|
280
|
+
H(n, () => {
|
|
277
281
|
if (e.onlySearcher ? s.regionsIndexes.value = Array.from(n.value.keys()) : s.regionsIndexes.value = s.regionsIndexes.value.filter((e) => i.value.has(e)), a.searcherKey.value === -1) return;
|
|
278
282
|
let t = n.value.keys().next().value;
|
|
279
283
|
n.value.forEach((r) => {
|
|
@@ -296,7 +300,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
296
300
|
let n = o.regionIndex.value;
|
|
297
301
|
if (t.value && e.forMode) {
|
|
298
302
|
let t = o.regionIndex.value;
|
|
299
|
-
n =
|
|
303
|
+
n = Oe(e.forMode, {
|
|
300
304
|
searcher_key: c(),
|
|
301
305
|
key: t
|
|
302
306
|
}, e.searchers)?.index;
|
|
@@ -318,9 +322,9 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
318
322
|
if (e !== void 0) return u()?.regionByIndex?.get(e);
|
|
319
323
|
}
|
|
320
324
|
};
|
|
321
|
-
},
|
|
325
|
+
}, Re = /* @__PURE__ */ N({
|
|
322
326
|
__name: "regionSelector",
|
|
323
|
-
props: /*@__PURE__*/
|
|
327
|
+
props: /*@__PURE__*/ P({
|
|
324
328
|
projectId: {},
|
|
325
329
|
searchers: { default: () => [] },
|
|
326
330
|
modelValue: {},
|
|
@@ -349,19 +353,19 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
349
353
|
}),
|
|
350
354
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
351
355
|
setup(e, { expose: t }) {
|
|
352
|
-
let n = e, r =
|
|
356
|
+
let n = e, r = T(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i = V(e, "modelValue"), s = V(e, "modelValueSingle"), { selectSearcher: c, selectRegion: l, compare: u, searcherByKey: d, allRegionsIndexes: f, getSearcher: p, getRegion: m } = Le(n), h = () => {
|
|
353
357
|
let e = [];
|
|
354
358
|
d.value.forEach((t) => {
|
|
355
359
|
(n.forMode === "project_relevant_url" || t.enabled) && t.regions.forEach((t) => {
|
|
356
360
|
(n.forMode === "project_relevant_url" || t.enabled) && t.index !== -1 && e.push(t);
|
|
357
361
|
});
|
|
358
|
-
}),
|
|
362
|
+
}), ke.open("regions", {
|
|
359
363
|
regions: e,
|
|
360
364
|
regionsIndexes: u.regionsIndexes.value,
|
|
361
365
|
"@update:regionsIndexes": (e) => u.regionsIndexes.value = e
|
|
362
366
|
});
|
|
363
367
|
};
|
|
364
|
-
return
|
|
368
|
+
return H([
|
|
365
369
|
l.regionIndex,
|
|
366
370
|
c.searcherKey,
|
|
367
371
|
u.regionsIndexes
|
|
@@ -371,9 +375,9 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
371
375
|
i.value = [...u.regionsIndexes.value];
|
|
372
376
|
} else n.onlySearcher ? (i.value = [c.searcherKey.value], c.searcherKey.value === -2 && !n.autoRegion && (i.value.length = 0)) : (i.value = [l.regionIndex.value], l.regionIndex.value === -2 && !n.autoRegion && (i.value.length = 0));
|
|
373
377
|
!n.onlySearcher && !f.value.size && (c.searcherKey.value = -2);
|
|
374
|
-
}), s.value &&
|
|
378
|
+
}), s.value && H(s, () => {
|
|
375
379
|
s.value && (i.value = [s.value]);
|
|
376
|
-
}, { immediate: !0 }),
|
|
380
|
+
}, { immediate: !0 }), H(i, () => {
|
|
377
381
|
if (i.value[0] && (s.value = i.value[0]), n.onlySearcher) {
|
|
378
382
|
if (!i.value.length || i.value.length === 1 && !d.value.has(i.value[0]) || i.value.length === 1 && i.value[0] === -2 && !n.autoRegion) {
|
|
379
383
|
let e = d.value.keys().next().value;
|
|
@@ -426,14 +430,14 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
426
430
|
}, { immediate: !0 }), t({
|
|
427
431
|
getSearcher: p,
|
|
428
432
|
getRegion: m
|
|
429
|
-
}), (t, n) => (
|
|
433
|
+
}), (t, n) => (I(), O("div", { class: F({
|
|
430
434
|
"top-regionSelector": !0,
|
|
431
435
|
"top-regionSelector-onlySearcher": e.onlySearcher
|
|
432
436
|
}) }, [
|
|
433
|
-
|
|
434
|
-
options:
|
|
435
|
-
modelValue:
|
|
436
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
437
|
+
M(o, {
|
|
438
|
+
options: B(c).optionBySearcherKey.value,
|
|
439
|
+
modelValue: B(c).searcherKey.value,
|
|
440
|
+
"onUpdate:modelValue": n[0] ||= (e) => B(c).searcherKey.value = e,
|
|
437
441
|
name: "searcher_key",
|
|
438
442
|
addChanger: e.addChanger
|
|
439
443
|
}, null, 8, [
|
|
@@ -441,12 +445,12 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
441
445
|
"modelValue",
|
|
442
446
|
"addChanger"
|
|
443
447
|
]),
|
|
444
|
-
!e.onlySearcher &&
|
|
448
|
+
!e.onlySearcher && B(c).searcherKey.value !== B(-1) ? (I(), E(o, {
|
|
445
449
|
key: 0,
|
|
446
450
|
class: "top-select-region",
|
|
447
|
-
options:
|
|
448
|
-
modelValue:
|
|
449
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
451
|
+
options: B(l).optionByRegionIndex.value,
|
|
452
|
+
modelValue: B(l).regionIndex.value,
|
|
453
|
+
"onUpdate:modelValue": n[1] ||= (e) => B(l).regionIndex.value = e,
|
|
450
454
|
name: r.value ? "region_key" : "region_index",
|
|
451
455
|
addChanger: e.addChanger,
|
|
452
456
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
@@ -456,31 +460,31 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
456
460
|
"name",
|
|
457
461
|
"addChanger",
|
|
458
462
|
"data-top-icon"
|
|
459
|
-
])) :
|
|
460
|
-
e.addCompare && !e.onlySearcher &&
|
|
463
|
+
])) : D("", !0),
|
|
464
|
+
e.addCompare && !e.onlySearcher && B(c).searcherKey.value === B(-1) ? (I(), E(a, {
|
|
461
465
|
key: 1,
|
|
462
466
|
name: "compare",
|
|
463
467
|
onClick: h,
|
|
464
|
-
"data-count-compare-regions-indexes":
|
|
468
|
+
"data-count-compare-regions-indexes": B(u).regionsIndexes.value.length
|
|
465
469
|
}, {
|
|
466
|
-
default:
|
|
470
|
+
default: U(() => [j(z(t.$i18n.Common.Selected_regions), 1)]),
|
|
467
471
|
_: 1
|
|
468
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
472
|
+
}, 8, ["data-count-compare-regions-indexes"])) : D("", !0)
|
|
469
473
|
], 2));
|
|
470
474
|
}
|
|
471
|
-
}),
|
|
475
|
+
}), K = {
|
|
472
476
|
id: 0,
|
|
473
477
|
name: "/",
|
|
474
478
|
path: "/"
|
|
475
479
|
};
|
|
476
|
-
function
|
|
480
|
+
function ze(e) {
|
|
477
481
|
return e ? n()?.Common.All_folders : "/ (" + n()?.Keywords.Root_folder + ")";
|
|
478
482
|
}
|
|
479
|
-
var
|
|
480
|
-
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name =
|
|
483
|
+
var Be = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
|
|
484
|
+
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = ze(t));
|
|
481
485
|
let o = i > 1 ? "-".repeat(i - 1) + " " : "";
|
|
482
|
-
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a),
|
|
483
|
-
}), n),
|
|
486
|
+
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Be(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
|
|
487
|
+
}), n), Ve = (e, t) => e.gen(`/get/${t}/folders/`, [
|
|
484
488
|
"id",
|
|
485
489
|
"parent_id",
|
|
486
490
|
"name",
|
|
@@ -491,9 +495,9 @@ var He = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
|
|
|
491
495
|
});
|
|
492
496
|
//#endregion
|
|
493
497
|
//#region src/core/utils/composables/useWatch.ts
|
|
494
|
-
function
|
|
498
|
+
function He(e, t, n) {
|
|
495
499
|
let r = Object.keys(e), i = r.map((t) => e[t]);
|
|
496
|
-
return
|
|
500
|
+
return H(i, (e, n, i) => {
|
|
497
501
|
let a = {};
|
|
498
502
|
e.forEach((e, t) => {
|
|
499
503
|
if (!Object.is(e, n[t])) {
|
|
@@ -508,9 +512,9 @@ function We(e, t, n) {
|
|
|
508
512
|
}
|
|
509
513
|
//#endregion
|
|
510
514
|
//#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
|
|
511
|
-
var
|
|
515
|
+
var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
|
|
512
516
|
__name: "folders",
|
|
513
|
-
props: /*@__PURE__*/
|
|
517
|
+
props: /*@__PURE__*/ P({
|
|
514
518
|
folderId: {},
|
|
515
519
|
folder: {},
|
|
516
520
|
folders: {},
|
|
@@ -526,20 +530,20 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
526
530
|
}, {
|
|
527
531
|
folderId: { required: !0 },
|
|
528
532
|
folderIdModifiers: {},
|
|
529
|
-
folder: { default:
|
|
533
|
+
folder: { default: K },
|
|
530
534
|
folderModifiers: {}
|
|
531
535
|
}),
|
|
532
536
|
emits: ["update:folderId", "update:folder"],
|
|
533
537
|
setup(e) {
|
|
534
|
-
let t = e, n =
|
|
535
|
-
|
|
538
|
+
let t = e, n = V(e, "folderId"), r = V(e, "folder"), i = t.client && !t.folders ? Ve(t.client, t.service) : void 0, a = L(null);
|
|
539
|
+
H(() => t.projectId, () => {
|
|
536
540
|
i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
|
|
537
541
|
}, { immediate: !0 });
|
|
538
|
-
let o =
|
|
542
|
+
let o = T(() => Be(t.folders ?? { root: [K] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
|
|
539
543
|
...e[0],
|
|
540
|
-
name:
|
|
544
|
+
name: ze(!0)
|
|
541
545
|
}), e);
|
|
542
|
-
return
|
|
546
|
+
return He({
|
|
543
547
|
modelFolder: r,
|
|
544
548
|
modelFolderId: n
|
|
545
549
|
}, async (e) => {
|
|
@@ -549,21 +553,21 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
549
553
|
return;
|
|
550
554
|
}
|
|
551
555
|
let i = o.value.get(t.folderId);
|
|
552
|
-
i ||=
|
|
553
|
-
}, { immediate: !0 }), (t, n) => (
|
|
556
|
+
i ||= K, r.value = i, n.value = i.id;
|
|
557
|
+
}, { immediate: !0 }), (t, n) => (I(), E(b, {
|
|
554
558
|
class: "top-groupSelector_folder",
|
|
555
559
|
modelValue: r.value,
|
|
556
560
|
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
557
561
|
items: e.folders ? [...o.value.values()] : void 0,
|
|
558
562
|
"search-type": "inline",
|
|
559
563
|
icon: e.addIcon ? "" : void 0,
|
|
560
|
-
api: e.folders ? void 0 :
|
|
561
|
-
apiSetSearchParams: (...e) =>
|
|
564
|
+
api: e.folders ? void 0 : B(i),
|
|
565
|
+
apiSetSearchParams: (...e) => B(x)(...e, "name"),
|
|
562
566
|
prepareItemsBeforeRender: s,
|
|
563
567
|
addChanger: e.addChanger,
|
|
564
568
|
useCache: ""
|
|
565
569
|
}, {
|
|
566
|
-
item:
|
|
570
|
+
item: U(({ item: e }) => [k("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ue)]),
|
|
567
571
|
_: 1
|
|
568
572
|
}, 8, [
|
|
569
573
|
"modelValue",
|
|
@@ -574,17 +578,17 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
574
578
|
"addChanger"
|
|
575
579
|
]));
|
|
576
580
|
}
|
|
577
|
-
}),
|
|
581
|
+
}), q = {
|
|
578
582
|
id: -1,
|
|
579
583
|
name: "--",
|
|
580
|
-
folder_id:
|
|
581
|
-
folder_path:
|
|
582
|
-
},
|
|
584
|
+
folder_id: K.id,
|
|
585
|
+
folder_path: K.path
|
|
586
|
+
}, J = {
|
|
583
587
|
id: 0,
|
|
584
588
|
name: "All groups",
|
|
585
|
-
folder_id:
|
|
586
|
-
folder_path:
|
|
587
|
-
},
|
|
589
|
+
folder_id: K.id,
|
|
590
|
+
folder_path: K.path
|
|
591
|
+
}, Y = () => (J.name = n()?.Common.All_groups, J), Ge = () => (J.name = n()?.Keywords.Choose_group, J), Ke = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), qe = (e, t) => e.gen(`/get/${t}/groups/`, [
|
|
588
592
|
"id",
|
|
589
593
|
"name",
|
|
590
594
|
"folder_id",
|
|
@@ -592,12 +596,12 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
592
596
|
]).changeParams({
|
|
593
597
|
folder_id_depth: !0,
|
|
594
598
|
limit: 100
|
|
595
|
-
}),
|
|
599
|
+
}), Je = (e, t) => e.gen(`/add/${t}/groups/`), Ye = (e, t) => e.gen(`/del/${t}/groups/`), Xe = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Ze = { class: "top-groupSelector_groupItem top-ellipsis1" }, Qe = {
|
|
596
600
|
key: 0,
|
|
597
601
|
class: "top-comment"
|
|
598
|
-
},
|
|
602
|
+
}, $e = ["innerHTML"], et = ["innerHTML"], tt = ["innerHTML"], nt = /* @__PURE__ */ N({
|
|
599
603
|
__name: "groups",
|
|
600
|
-
props: /*@__PURE__*/
|
|
604
|
+
props: /*@__PURE__*/ P({
|
|
601
605
|
groupId: {},
|
|
602
606
|
group: {},
|
|
603
607
|
projectId: {},
|
|
@@ -628,14 +632,14 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
628
632
|
group: { required: !0 },
|
|
629
633
|
groupModifiers: {}
|
|
630
634
|
}),
|
|
631
|
-
emits: /*@__PURE__*/
|
|
635
|
+
emits: /*@__PURE__*/ P([
|
|
632
636
|
"addGroup",
|
|
633
637
|
"editGroup",
|
|
634
638
|
"delGroup"
|
|
635
639
|
], ["update:groupId", "update:group"]),
|
|
636
640
|
setup(e, { expose: n, emit: r }) {
|
|
637
|
-
let i = e, a = r, o =
|
|
638
|
-
if (i.groups !== void 0) return
|
|
641
|
+
let i = e, a = r, o = V(e, "groupId"), s = V(e, "group"), c = i.client && !i.groups ? qe(i.client, i.service) : void 0, l = i.client ? Je(i.client, i.service) : void 0, u = i.client ? Ye(i.client, i.service) : void 0, d = i.client ? Xe(i.client, i.service) : void 0, f = L(null), p = T(() => {
|
|
642
|
+
if (i.groups !== void 0) return Ke(i.groups, i.on, i.folder);
|
|
639
643
|
}), m = t("folder_id", "EQUALS", [i.folder?.id ?? 0]);
|
|
640
644
|
c?.changeParams({
|
|
641
645
|
project_id: i.projectId,
|
|
@@ -647,16 +651,16 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
647
651
|
}, g = (e = !1) => {
|
|
648
652
|
f.value?.resetCache(e);
|
|
649
653
|
};
|
|
650
|
-
|
|
654
|
+
He({
|
|
651
655
|
projectId: () => i.projectId,
|
|
652
656
|
folderId: () => i.folder?.id,
|
|
653
657
|
canSelectAll: () => i.canSelectAll
|
|
654
658
|
}, (e) => {
|
|
655
659
|
if (e.projectId && (c?.changeParams({ project_id: i.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + i.projectId })), e.folderId && (m.values = [i.folder?.id ?? 0]), g(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && o.value !== null) {
|
|
656
660
|
let e;
|
|
657
|
-
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e =
|
|
661
|
+
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = ae(Y()))), (i.autoselect === "placeholder" || !e) && (e = Ge()), h(e);
|
|
658
662
|
}
|
|
659
|
-
}, { immediate: !0 }),
|
|
663
|
+
}, { immediate: !0 }), He({
|
|
660
664
|
modelGroup: s,
|
|
661
665
|
modelGroupId: o
|
|
662
666
|
}, async (e) => {
|
|
@@ -668,14 +672,14 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
668
672
|
if (!(i.canAdd && o.value === null)) {
|
|
669
673
|
if (i.groups) {
|
|
670
674
|
let e = p.value?.find((e) => e.id === o.value);
|
|
671
|
-
if (!e && i.canSelectAll && (e =
|
|
675
|
+
if (!e && i.canSelectAll && (e = Y()), e) h(e);
|
|
672
676
|
else {
|
|
673
677
|
let e = p.value?.[0];
|
|
674
|
-
e && !o.value ? h(e) : h(
|
|
678
|
+
e && !o.value ? h(e) : h(q);
|
|
675
679
|
}
|
|
676
680
|
}
|
|
677
681
|
if (i.client && !i.groups && (o.value || o.value === 0 && !i.canSelectAll)) {
|
|
678
|
-
let e =
|
|
682
|
+
let e = qe(i.client, i.service).changeParams({
|
|
679
683
|
project_id: i.projectId,
|
|
680
684
|
id: o.value,
|
|
681
685
|
filters: [m]
|
|
@@ -683,7 +687,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
683
687
|
e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + i.projectId });
|
|
684
688
|
let t = await e.call();
|
|
685
689
|
if (!t.errors?.length && !t.result) return;
|
|
686
|
-
!t.errors && t.result[0] ? h(t.result[0]) : h(
|
|
690
|
+
!t.errors && t.result[0] ? h(t.result[0]) : h(q);
|
|
687
691
|
}
|
|
688
692
|
}
|
|
689
693
|
}
|
|
@@ -693,7 +697,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
693
697
|
let t = s.value, n = await l.changeParams({
|
|
694
698
|
project_id: i.projectId,
|
|
695
699
|
names: [e.name],
|
|
696
|
-
to_id: i.folder?.id ??
|
|
700
|
+
to_id: i.folder?.id ?? K.id,
|
|
697
701
|
to_type: "in_folder_last"
|
|
698
702
|
}).call();
|
|
699
703
|
if (n.result) {
|
|
@@ -701,7 +705,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
701
705
|
h(e), a("addGroup", e);
|
|
702
706
|
} else h(t);
|
|
703
707
|
f.value?.resetCache(!0);
|
|
704
|
-
},
|
|
708
|
+
}, y = async (e, t) => {
|
|
705
709
|
d && ((await d.changeParams({
|
|
706
710
|
project_id: i.projectId,
|
|
707
711
|
id: e.id,
|
|
@@ -710,13 +714,13 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
710
714
|
id: e.id,
|
|
711
715
|
name: t
|
|
712
716
|
}), f.value?.updateCacheItemById(e.id, { name: t })));
|
|
713
|
-
},
|
|
717
|
+
}, S = async (e) => {
|
|
714
718
|
u && ((await u.changeParams({
|
|
715
719
|
project_id: i.projectId,
|
|
716
720
|
id: e.id
|
|
717
|
-
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ?
|
|
721
|
+
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ? Y() : q), a("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
|
|
718
722
|
};
|
|
719
|
-
return n({ resetCacheGroups: g }), (t, n) => (
|
|
723
|
+
return n({ resetCacheGroups: g }), (t, n) => (I(), E(b, {
|
|
720
724
|
ref_key: "refSelector",
|
|
721
725
|
ref: f,
|
|
722
726
|
class: "top-groupSelector_group",
|
|
@@ -725,51 +729,51 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
725
729
|
items: p.value ?? e.groups,
|
|
726
730
|
searchType: "inline",
|
|
727
731
|
icon: e.addIcon ? "" : void 0,
|
|
728
|
-
api: e.groups ? void 0 :
|
|
729
|
-
apiSetSearchParams: (...e) =>
|
|
732
|
+
api: e.groups ? void 0 : B(c),
|
|
733
|
+
apiSetSearchParams: (...e) => B(x)(...e, "name"),
|
|
730
734
|
appendSearchToResult: !!e.canAdd,
|
|
731
|
-
useAllItem: e.canSelectAll ?
|
|
735
|
+
useAllItem: e.canSelectAll ? B(Y)().name : !1,
|
|
732
736
|
addChanger: e.addChanger,
|
|
733
737
|
useCache: "",
|
|
734
738
|
onAppendItem: v
|
|
735
|
-
},
|
|
736
|
-
item:
|
|
737
|
-
n.id ===
|
|
738
|
-
|
|
739
|
+
}, A({
|
|
740
|
+
item: U(({ item: n }) => [k("div", Ze, [
|
|
741
|
+
n.id === B(null) ? (I(), O("div", Qe, z(t.$i18n.Common.Add) + ": ", 1)) : D("", !0),
|
|
742
|
+
k("span", {
|
|
739
743
|
class: "top-groupSelector_groupItemName top-ellipsis1",
|
|
740
744
|
innerHTML: n.name
|
|
741
|
-
}, null, 8,
|
|
742
|
-
n.folder_path && e.showPath ? (
|
|
745
|
+
}, null, 8, $e),
|
|
746
|
+
n.folder_path && e.showPath ? (I(), O("span", {
|
|
743
747
|
key: 1,
|
|
744
748
|
class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
|
|
745
749
|
innerHTML: n.folder_path
|
|
746
|
-
}, null, 8,
|
|
750
|
+
}, null, 8, et)) : D("", !0)
|
|
747
751
|
])]),
|
|
748
752
|
_: 2
|
|
749
753
|
}, [e.canEditAndDel && e.client ? {
|
|
750
754
|
name: "actions",
|
|
751
|
-
fn:
|
|
755
|
+
fn: U(({ item: r }) => [r.id ? (I(), O(w, { key: 0 }, [M(_, {
|
|
752
756
|
submitText: t.$i18n.Common.Save,
|
|
753
757
|
defaultValue: r.name,
|
|
754
758
|
inputProps: { addCleaner: !1 },
|
|
755
|
-
onSubmit: (e) =>
|
|
759
|
+
onSubmit: (e) => y(r, e)
|
|
756
760
|
}, {
|
|
757
|
-
opener:
|
|
758
|
-
default:
|
|
761
|
+
opener: U(() => [...n[1] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
|
|
762
|
+
default: U(() => [...n[2] ||= []]),
|
|
759
763
|
_: 1
|
|
760
764
|
}, 8, [
|
|
761
765
|
"submitText",
|
|
762
766
|
"defaultValue",
|
|
763
767
|
"onSubmit"
|
|
764
|
-
]),
|
|
768
|
+
]), M(ee, {
|
|
765
769
|
isWarning: "",
|
|
766
770
|
submitText: t.$i18n.Common.Delete,
|
|
767
|
-
onSubmit: (e) =>
|
|
771
|
+
onSubmit: (e) => S(r)
|
|
768
772
|
}, {
|
|
769
|
-
opener:
|
|
770
|
-
default:
|
|
773
|
+
opener: U(() => [...n[3] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
|
|
774
|
+
default: U(() => [k("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n.Aitracker.Delete_group_warning }, null, 8, tt)]),
|
|
771
775
|
_: 1
|
|
772
|
-
}, 8, ["submitText", "onSubmit"])], 64)) :
|
|
776
|
+
}, 8, ["submitText", "onSubmit"])], 64)) : D("", !0)]),
|
|
773
777
|
key: "0"
|
|
774
778
|
} : void 0]), 1032, [
|
|
775
779
|
"modelValue",
|
|
@@ -782,9 +786,9 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
782
786
|
"addChanger"
|
|
783
787
|
]));
|
|
784
788
|
}
|
|
785
|
-
}),
|
|
789
|
+
}), rt = { class: "top-groupSelector" }, it = /* @__PURE__ */ N({
|
|
786
790
|
__name: "groupSelector",
|
|
787
|
-
props: /*@__PURE__*/
|
|
791
|
+
props: /*@__PURE__*/ P({
|
|
788
792
|
folderId: {},
|
|
789
793
|
folder: {},
|
|
790
794
|
groupId: {},
|
|
@@ -829,20 +833,20 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
829
833
|
folderModifiers: {},
|
|
830
834
|
groupId: { required: !0 },
|
|
831
835
|
groupIdModifiers: {},
|
|
832
|
-
group: { default:
|
|
836
|
+
group: { default: q },
|
|
833
837
|
groupModifiers: {}
|
|
834
838
|
}),
|
|
835
|
-
emits: /*@__PURE__*/
|
|
839
|
+
emits: /*@__PURE__*/ P(["update:groups"], [
|
|
836
840
|
"update:folderId",
|
|
837
841
|
"update:folder",
|
|
838
842
|
"update:groupId",
|
|
839
843
|
"update:group"
|
|
840
844
|
]),
|
|
841
845
|
setup(e, { expose: t, emit: n }) {
|
|
842
|
-
let r = e, i =
|
|
843
|
-
o.value =
|
|
846
|
+
let r = e, i = L(null), a = V(e, "folderId"), o = V(e, "folder"), s = V(e, "groupId"), c = V(e, "group"), l = n;
|
|
847
|
+
o.value = Be(r.folders ?? { root: [K] }, r.canSelectAllGroups).get(a.value);
|
|
844
848
|
let u = r.groups?.find((e) => e.id === s.value);
|
|
845
|
-
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u =
|
|
849
|
+
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = Y()), (r.autoselect === "placeholder" || !u) && (u = Ge()), u ??= q, c.value = u;
|
|
846
850
|
let d = (e) => {
|
|
847
851
|
let t;
|
|
848
852
|
r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
|
|
@@ -868,7 +872,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
868
872
|
};
|
|
869
873
|
return t({ resetCacheGroups: (e = !1) => {
|
|
870
874
|
i.value?.resetCacheGroups(e);
|
|
871
|
-
} }), (t, n) => (
|
|
875
|
+
} }), (t, n) => (I(), O("div", rt, [e.showFolders ? (I(), E(We, {
|
|
872
876
|
key: 0,
|
|
873
877
|
folderId: a.value,
|
|
874
878
|
"onUpdate:folderId": n[0] ||= (e) => a.value = e,
|
|
@@ -891,7 +895,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
891
895
|
"addIcon",
|
|
892
896
|
"client",
|
|
893
897
|
"service"
|
|
894
|
-
])) :
|
|
898
|
+
])) : D("", !0), e.showGroups ? (I(), E(nt, {
|
|
895
899
|
key: 1,
|
|
896
900
|
ref_key: "componentGroupsRef",
|
|
897
901
|
ref: i,
|
|
@@ -931,46 +935,42 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
931
935
|
"addIcon",
|
|
932
936
|
"client",
|
|
933
937
|
"service"
|
|
934
|
-
])) :
|
|
938
|
+
])) : D("", !0)]));
|
|
935
939
|
}
|
|
936
|
-
}),
|
|
940
|
+
}), at = (e) => ({
|
|
937
941
|
id: null,
|
|
938
942
|
name: e,
|
|
939
943
|
listItemProps: {
|
|
940
944
|
type: "title",
|
|
941
945
|
class: "top-projectSelector_item"
|
|
942
946
|
}
|
|
943
|
-
}),
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
scheduledUpdate: st(n().Projects.Scheduled_update),
|
|
950
|
-
manualUpdate: st(n().Projects.Manual_update),
|
|
951
|
-
guestProjects: st(n().Projects.Guest_projects)
|
|
952
|
-
}, a = t ? {
|
|
947
|
+
}), ot = (e) => {
|
|
948
|
+
let t = [], r = {
|
|
949
|
+
scheduledUpdate: at(n().Projects.Scheduled_update),
|
|
950
|
+
manualUpdate: at(n().Projects.Manual_update),
|
|
951
|
+
guestProjects: at(n().Projects.Guest_projects)
|
|
952
|
+
}, i = {
|
|
953
953
|
scheduledUpdate: !1,
|
|
954
954
|
manualUpdate: !1,
|
|
955
955
|
guestProjects: !1
|
|
956
|
-
}
|
|
957
|
-
for (let
|
|
958
|
-
return
|
|
959
|
-
},
|
|
956
|
+
};
|
|
957
|
+
for (let n of e) !i.scheduledUpdate && n.right?.startsWith("1") && n.on > 0 && (t.push(r.scheduledUpdate), i.scheduledUpdate = !0), !i.manualUpdate && n.right?.startsWith("1") && n.on === 0 && (t.push(r.manualUpdate), i.manualUpdate = !0), !i.guestProjects && n.right?.startsWith("0") && n.on >= 0 && (t.push(r.guestProjects), i.guestProjects = !0), t.push(n);
|
|
958
|
+
return t;
|
|
959
|
+
}, st = (e) => ({
|
|
960
960
|
...e,
|
|
961
|
-
externalLink:
|
|
961
|
+
externalLink: pt(e.url ?? ""),
|
|
962
962
|
listItemProps: {
|
|
963
963
|
class: "top-projectSelector_item",
|
|
964
964
|
attrs: { title: e.name }
|
|
965
965
|
}
|
|
966
|
-
}),
|
|
966
|
+
}), ct = (e) => !e || e.length === 0 ? [] : ot(e.map(st)), lt = (e) => {
|
|
967
967
|
e = e.replace(/#.*/, "");
|
|
968
968
|
let t = location.hash;
|
|
969
969
|
return t = t.replace(/%22historyView%22:[^,]*,/, ""), t = t.replace(/%22modelsKeys%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:\{[^}]*}(,?)/, "$1")), e + t;
|
|
970
|
-
},
|
|
971
|
-
location.href =
|
|
972
|
-
},
|
|
973
|
-
let t =
|
|
970
|
+
}, ut = (e) => {
|
|
971
|
+
location.href = dt(e);
|
|
972
|
+
}, dt = (e) => {
|
|
973
|
+
let t = ft(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
|
|
974
974
|
n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
|
|
975
975
|
"watcher",
|
|
976
976
|
"indexing",
|
|
@@ -980,16 +980,16 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
980
980
|
"adwords"
|
|
981
981
|
].includes(n[4]) && (i = n[4] + "/");
|
|
982
982
|
let a = "https://" + t + "/" + r + e + "/" + i;
|
|
983
|
-
return a =
|
|
984
|
-
},
|
|
983
|
+
return a = lt(a), a;
|
|
984
|
+
}, ft = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, pt = (e) => {
|
|
985
985
|
let t = e.startsWith("http") ? e : "https://" + e;
|
|
986
986
|
return t = t.replace(/"/g, "%22"), t;
|
|
987
|
-
},
|
|
987
|
+
}, mt = (e, n) => {
|
|
988
988
|
let r = e.params.filters ?? [];
|
|
989
989
|
r = r.filter((e) => e.name !== "GEN_SEARCH_STRING()");
|
|
990
990
|
let i = h(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
|
|
991
991
|
n && r.push(t("GEN_SEARCH_STRING()", "REGEXP", [`(${a}|${o})`])), e.changeParams({ filters: r });
|
|
992
|
-
},
|
|
992
|
+
}, ht = (n) => {
|
|
993
993
|
let i = n.gen("/get/projects_2/projects/", [
|
|
994
994
|
"id",
|
|
995
995
|
"user_id",
|
|
@@ -1007,15 +1007,12 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1007
1007
|
e("ord", "ASC"),
|
|
1008
1008
|
e("id", "DESC")
|
|
1009
1009
|
]
|
|
1010
|
-
}), i.options.loadingShowSpinner = !1, i
|
|
1011
|
-
|
|
1012
|
-
e.result = dt(e.result, a, o), n?.(e, t);
|
|
1013
|
-
}, i;
|
|
1014
|
-
}, yt = (e) => e.gen("/add/projects_2/projects/"), bt = { class: "top-ellipsis1" }, xt = /* @__PURE__ */ j({
|
|
1010
|
+
}), i.options.loadingShowSpinner = !1, i;
|
|
1011
|
+
}, gt = (e) => e.gen("/add/projects_2/projects/"), _t = { class: "top-ellipsis1" }, vt = /* @__PURE__ */ N({
|
|
1015
1012
|
__name: "submenu",
|
|
1016
1013
|
props: { id: {} },
|
|
1017
1014
|
setup(e) {
|
|
1018
|
-
let t = e, i = n(), a =
|
|
1015
|
+
let t = e, i = n(), a = ft(), o = (e) => {
|
|
1019
1016
|
let t = [
|
|
1020
1017
|
{
|
|
1021
1018
|
href: `https://${a}/project/keywords/${e.id}/`,
|
|
@@ -1092,67 +1089,60 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1092
1089
|
].filter((e) => !Object.entries(r.state.closedByMod).some(([t, n]) => n && e.href.includes(`/${t}/`)));
|
|
1093
1090
|
return e.right.includes("0") ? t.filter((t) => e.right[t.right] === "1") : t;
|
|
1094
1091
|
};
|
|
1095
|
-
return (e, n) => (
|
|
1092
|
+
return (e, n) => (I(), E(B(y), {
|
|
1096
1093
|
id: t.id,
|
|
1097
1094
|
class: "top-projectSelectorSubmenu",
|
|
1098
1095
|
notch: !1,
|
|
1099
1096
|
pos: "2"
|
|
1100
1097
|
}, {
|
|
1101
|
-
contentList:
|
|
1098
|
+
contentList: U(({ data: t }) => [t ? (I(), O(w, { key: 0 }, [(I(!0), O(w, null, R(o(t.projectItem), (t) => (I(), E(B(v), {
|
|
1102
1099
|
href: t.href,
|
|
1103
1100
|
title: t.title,
|
|
1104
1101
|
"data-top-icon": t.icon,
|
|
1105
1102
|
"data-right": t.right
|
|
1106
1103
|
}, {
|
|
1107
|
-
default:
|
|
1104
|
+
default: U(() => [j(z(e.$core.state.isMobile ? t.title : ""), 1)]),
|
|
1108
1105
|
_: 2
|
|
1109
1106
|
}, 1032, [
|
|
1110
1107
|
"href",
|
|
1111
1108
|
"title",
|
|
1112
1109
|
"data-top-icon",
|
|
1113
1110
|
"data-right"
|
|
1114
|
-
]))), 256)),
|
|
1111
|
+
]))), 256)), M(B(v), {
|
|
1115
1112
|
href: t.projectItem.externalLink,
|
|
1116
1113
|
title: t.projectItem.externalLink,
|
|
1117
1114
|
class: "top-ellipsis",
|
|
1118
1115
|
"data-top-icon": "",
|
|
1119
1116
|
target: "_blank"
|
|
1120
1117
|
}, {
|
|
1121
|
-
default:
|
|
1118
|
+
default: U(() => [k("span", _t, z(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
|
|
1122
1119
|
_: 2
|
|
1123
|
-
}, 1032, ["href", "title"])], 64)) :
|
|
1120
|
+
}, 1032, ["href", "title"])], 64)) : D("", !0)]),
|
|
1124
1121
|
_: 1
|
|
1125
1122
|
}, 8, ["id"]));
|
|
1126
1123
|
}
|
|
1127
|
-
}),
|
|
1128
|
-
|
|
1129
|
-
projectsIds: [],
|
|
1130
|
-
nextOffset: 0,
|
|
1131
|
-
loading: !1
|
|
1132
|
-
}), Ct = St(), wt = () => {
|
|
1133
|
-
Ct = St();
|
|
1134
|
-
}, Tt = () => Ct, J = "ui_project_selector_total", Et = 864e5, Y = F(null), X = fe(), Dt = (e) => {
|
|
1135
|
-
localStorage.setItem(J + ":" + r.state.userId, JSON.stringify({
|
|
1124
|
+
}), X = "ui_project_selector_total", yt = 864e5, bt = L(null), Z = ue(), xt = (e) => {
|
|
1125
|
+
localStorage.setItem(X + ":" + r.state.userId, JSON.stringify({
|
|
1136
1126
|
projectsTotal: e,
|
|
1137
|
-
expiresAt: Date.now() +
|
|
1127
|
+
expiresAt: Date.now() + yt
|
|
1138
1128
|
}));
|
|
1139
|
-
},
|
|
1140
|
-
let e = localStorage.getItem(
|
|
1129
|
+
}, St = () => {
|
|
1130
|
+
let e = localStorage.getItem(X + ":" + r.state.userId);
|
|
1141
1131
|
if (!e) return;
|
|
1142
1132
|
let { projectsTotal: t, expiresAt: n } = JSON.parse(e);
|
|
1143
1133
|
if (Date.now() > n) {
|
|
1144
|
-
localStorage.removeItem(
|
|
1134
|
+
localStorage.removeItem(X + ":" + r.state.userId);
|
|
1145
1135
|
return;
|
|
1146
1136
|
}
|
|
1147
1137
|
return t;
|
|
1148
|
-
},
|
|
1149
|
-
|
|
1150
|
-
},
|
|
1138
|
+
}, Ct = () => {
|
|
1139
|
+
bt.value = null, Z.value = void 0, localStorage.removeItem(X + ":" + r.state.userId), S("/get/projects_2/projects/");
|
|
1140
|
+
}, wt = { class: "top-projectSelector_itemText" }, Tt = { class: "top-comment" }, Et = {
|
|
1151
1141
|
key: 0,
|
|
1152
1142
|
class: "top-comment"
|
|
1153
|
-
},
|
|
1143
|
+
}, Dt = ["href"], Ot = 1e3, kt = /* @__PURE__ */ N({
|
|
1154
1144
|
__name: "projectSelector",
|
|
1155
|
-
props: /*@__PURE__*/
|
|
1145
|
+
props: /*@__PURE__*/ P({
|
|
1156
1146
|
modelValue: {},
|
|
1157
1147
|
client: {},
|
|
1158
1148
|
menuMode: { type: Boolean },
|
|
@@ -1172,65 +1162,87 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1172
1162
|
modelModifiers: {}
|
|
1173
1163
|
}),
|
|
1174
1164
|
emits: ["update:modelValue"],
|
|
1175
|
-
setup(e) {
|
|
1176
|
-
let
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
let
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1165
|
+
setup(e, { expose: t }) {
|
|
1166
|
+
let i = n(), a = e, o = V(e, "modelValue"), s = ht(a.client), c = gt(a.client), l = L(St()), f = L(null), p = fe(), m = !1, h = T(() => a.placeholder ?? i.Projects.Select_project), _ = T(() => Z.value ? ct(a.excludeProjectId ? Z.value.filter((e) => e.id !== a.excludeProjectId) : Z.value) : void 0), v = (e) => typeof e.id == "number" && "on" in e && "right" in e, ee = (e) => {
|
|
1167
|
+
let t = e.filter(v), n = e.filter((e) => !v(e));
|
|
1168
|
+
return [...ct(t), ...n];
|
|
1169
|
+
}, y = (e = !1) => {
|
|
1170
|
+
let t = Z.value && S.value === "static" ? Z.value : f.value?.getLoadedItems();
|
|
1171
|
+
if (!t) return null;
|
|
1172
|
+
let n = t.findIndex((e) => e.id === o.value.id);
|
|
1173
|
+
return n === -1 ? null : n === 0 && e ? !1 : t[n + (e ? -1 : 1)]?.id ?? null;
|
|
1174
|
+
}, x = async (e = !1) => {
|
|
1175
|
+
if (!f.value || m) return;
|
|
1176
|
+
if (S.value || await P(), S.value === "static" && !await A()) {
|
|
1177
|
+
m = !1;
|
|
1178
|
+
return;
|
|
1179
|
+
}
|
|
1180
|
+
let t = y(e);
|
|
1181
|
+
if (S.value === "api") {
|
|
1182
|
+
for (m = !0; f.value.getNextOffset() !== null && t === null && await f.value.loadItems(f.value.getNextOffset() !== void 0);) t = y(e);
|
|
1183
|
+
m = !1;
|
|
1184
|
+
}
|
|
1185
|
+
t && ut(t);
|
|
1186
|
+
}, S = T(() => {
|
|
1187
|
+
if (l.value || l.value === 0) return l.value < Ot ? "static" : "api";
|
|
1188
|
+
}), C = async () => {
|
|
1189
|
+
bt.value ||= s.call();
|
|
1190
|
+
let e = await bt.value;
|
|
1191
|
+
return bt.value = null, e;
|
|
1192
|
+
}, A = async () => {
|
|
1193
|
+
if (Z.value) return !0;
|
|
1194
|
+
let e = await C();
|
|
1195
|
+
return !e.errors && (Z.value = e.result, !0);
|
|
1196
|
+
}, N = async (e) => {
|
|
1197
|
+
let t = await c.changeParams({
|
|
1184
1198
|
url: e.name,
|
|
1185
1199
|
name: e.name
|
|
1186
1200
|
}).call();
|
|
1187
1201
|
if (!t.errors) {
|
|
1188
|
-
if (
|
|
1189
|
-
let n =
|
|
1202
|
+
if (Z.value && S.value === "static") {
|
|
1203
|
+
let n = {
|
|
1190
1204
|
id: t.result,
|
|
1191
1205
|
user_id: r.state.userId,
|
|
1192
1206
|
name: e.name,
|
|
1193
1207
|
url: e.name,
|
|
1194
1208
|
on: 0,
|
|
1195
1209
|
right: "11111111111111111111"
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
...
|
|
1210
|
+
}, i = Z.value.findIndex((e) => e.on === 0);
|
|
1211
|
+
Z.value = [
|
|
1212
|
+
...Z.value.slice(0, i),
|
|
1199
1213
|
n,
|
|
1200
|
-
...
|
|
1201
|
-
],
|
|
1214
|
+
...Z.value.slice(i)
|
|
1215
|
+
], l.value && (l.value += 1, xt(l.value));
|
|
1202
1216
|
}
|
|
1203
|
-
|
|
1217
|
+
S.value === "api" && f.value?.resetCache(!0);
|
|
1204
1218
|
}
|
|
1205
|
-
},
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
let e = l.value?.popupOpenerRef?.$el;
|
|
1212
|
-
e && e.addEventListener("pointerenter", () => y(), { once: !0 });
|
|
1219
|
+
}, te = async () => {
|
|
1220
|
+
S.value === "static" && await A();
|
|
1221
|
+
}, P = async () => {
|
|
1222
|
+
if (l.value) {
|
|
1223
|
+
let e = f.value?.popupOpenerRef?.$el;
|
|
1224
|
+
e && e.addEventListener("pointerenter", () => te(), { once: !0 });
|
|
1213
1225
|
} else {
|
|
1214
|
-
|
|
1215
|
-
let e = await
|
|
1226
|
+
s.changeParams({ limit: Ot });
|
|
1227
|
+
let e = await C();
|
|
1216
1228
|
if (e.errors) return;
|
|
1217
|
-
delete
|
|
1229
|
+
delete s.params.limit, l.value = e.total ?? void 0, !Z.value && S.value !== "api" && (Z.value = e.result), l.value && xt(l.value);
|
|
1218
1230
|
}
|
|
1219
1231
|
};
|
|
1220
|
-
return
|
|
1221
|
-
await
|
|
1232
|
+
return t({ goToNextProject: x }), ie(async () => {
|
|
1233
|
+
await P();
|
|
1222
1234
|
}), (t, n) => {
|
|
1223
|
-
let r =
|
|
1224
|
-
return
|
|
1225
|
-
key:
|
|
1235
|
+
let r = se("TopButton");
|
|
1236
|
+
return I(), O(w, null, [(I(), E(b, {
|
|
1237
|
+
key: S.value ?? "dummy",
|
|
1226
1238
|
ref_key: "refSelector",
|
|
1227
|
-
ref:
|
|
1239
|
+
ref: f,
|
|
1228
1240
|
class: "top-projectSelector",
|
|
1229
|
-
modelValue:
|
|
1230
|
-
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ?
|
|
1231
|
-
items:
|
|
1241
|
+
modelValue: o.value,
|
|
1242
|
+
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? B(ut)(t.id) : o.value = t,
|
|
1243
|
+
items: _.value,
|
|
1232
1244
|
itemsChunkSize: 100,
|
|
1233
|
-
itemsIsLoading:
|
|
1245
|
+
itemsIsLoading: S.value === "static" && B(Z) === void 0,
|
|
1234
1246
|
title: t.$i18n.Projects.Search_projects,
|
|
1235
1247
|
modificator: e.modificator,
|
|
1236
1248
|
searchFields: [
|
|
@@ -1238,52 +1250,53 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1238
1250
|
"name",
|
|
1239
1251
|
"url"
|
|
1240
1252
|
],
|
|
1241
|
-
placeholder:
|
|
1253
|
+
placeholder: h.value,
|
|
1242
1254
|
hasCloserBtn: "",
|
|
1243
|
-
api:
|
|
1244
|
-
apiSetSearchParams:
|
|
1255
|
+
api: S.value === "api" ? B(s) : void 0,
|
|
1256
|
+
apiSetSearchParams: S.value === "api" ? (...e) => B(mt)(...e) : void 0,
|
|
1245
1257
|
useCache: "",
|
|
1246
1258
|
appendSearchToResult: "",
|
|
1247
1259
|
appendSearchAllowDuplicate: "",
|
|
1248
|
-
appendSearchToResultCond:
|
|
1260
|
+
appendSearchToResultCond: B(u),
|
|
1249
1261
|
appendWithoutSelect: "",
|
|
1250
1262
|
buttonProps: {
|
|
1251
1263
|
...e.buttonProps,
|
|
1252
|
-
isProgress: !
|
|
1253
|
-
disabled: !
|
|
1264
|
+
isProgress: !S.value,
|
|
1265
|
+
disabled: !S.value
|
|
1254
1266
|
},
|
|
1255
1267
|
openerShortcut: e.openerShortcut,
|
|
1256
|
-
|
|
1257
|
-
|
|
1268
|
+
prepareItemsBeforeRender: S.value === "api" ? ee : void 0,
|
|
1269
|
+
onAppendItem: N,
|
|
1270
|
+
onOpen: te
|
|
1258
1271
|
}, {
|
|
1259
|
-
item:
|
|
1260
|
-
e.menuMode ? (
|
|
1272
|
+
item: U(({ item: i }) => [k("div", wt, [i.id ? (I(), O(w, { key: 0 }, [j(z(B(d)(i.name, 20)) + " ", 1), k("span", Tt, " id " + z(i.id), 1)], 64)) : (I(), O(w, { key: 1 }, [i.listItemProps?.type ? D("", !0) : (I(), O("div", Et, z(t.$i18n.Projects.Add_project) + ": ", 1)), j(" " + z(i.name), 1)], 64))]), i.id ? (I(), O(w, { key: 0 }, [
|
|
1273
|
+
e.menuMode ? (I(), O("a", {
|
|
1261
1274
|
key: 0,
|
|
1262
1275
|
class: "top-projectSelector_itemLink",
|
|
1263
|
-
href:
|
|
1264
|
-
}, null, 8,
|
|
1265
|
-
t.$core.state.isMobile ?
|
|
1276
|
+
href: B(dt)(i.id)
|
|
1277
|
+
}, null, 8, Dt)) : D("", !0),
|
|
1278
|
+
t.$core.state.isMobile ? D("", !0) : (I(), E(r, {
|
|
1266
1279
|
key: 1,
|
|
1267
1280
|
href: i.externalLink,
|
|
1268
1281
|
"data-top-icon": "",
|
|
1269
1282
|
color: "theme",
|
|
1270
1283
|
target: "_blank",
|
|
1271
|
-
onClick: n[0] ||=
|
|
1284
|
+
onClick: n[0] ||= W(() => {}, ["stop"])
|
|
1272
1285
|
}, null, 8, ["href"])),
|
|
1273
|
-
|
|
1274
|
-
id:
|
|
1286
|
+
M(g, {
|
|
1287
|
+
id: B(p),
|
|
1275
1288
|
pos: "2",
|
|
1276
1289
|
notch: !1,
|
|
1277
1290
|
data: { projectItem: i }
|
|
1278
1291
|
}, {
|
|
1279
|
-
default:
|
|
1292
|
+
default: U(() => [M(r, {
|
|
1280
1293
|
class: "top-popup_listMore",
|
|
1281
1294
|
"data-top-icon": "",
|
|
1282
1295
|
color: "theme"
|
|
1283
1296
|
})]),
|
|
1284
1297
|
_: 1
|
|
1285
1298
|
}, 8, ["id", "data"])
|
|
1286
|
-
], 64)) :
|
|
1299
|
+
], 64)) : D("", !0)]),
|
|
1287
1300
|
_: 1
|
|
1288
1301
|
}, 8, [
|
|
1289
1302
|
"modelValue",
|
|
@@ -1296,76 +1309,45 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1296
1309
|
"apiSetSearchParams",
|
|
1297
1310
|
"appendSearchToResultCond",
|
|
1298
1311
|
"buttonProps",
|
|
1299
|
-
"openerShortcut"
|
|
1300
|
-
|
|
1312
|
+
"openerShortcut",
|
|
1313
|
+
"prepareItemsBeforeRender"
|
|
1314
|
+
])), M(vt, { id: B(p) }, null, 8, ["id"])], 64);
|
|
1301
1315
|
};
|
|
1302
1316
|
}
|
|
1303
|
-
}),
|
|
1304
|
-
|
|
1305
|
-
if (r === -1) return null;
|
|
1306
|
-
let i;
|
|
1307
|
-
return t === "prev" && (i = n.projectsIds[r - 1]), t === "next" && (i = n.projectsIds[r + 1]), i ?? null;
|
|
1308
|
-
}, Lt = async (n, i, a) => {
|
|
1309
|
-
if (!i) return;
|
|
1310
|
-
let o = Tt();
|
|
1311
|
-
if (o.userId !== r.state.userId && (wt(), o = Tt()), o.loading) return;
|
|
1312
|
-
o.loading = !0;
|
|
1313
|
-
let s = n.gen("/get/projects_2/projects/", ["id"]);
|
|
1314
|
-
s.changeParams({
|
|
1315
|
-
filters: [t("on", "GREATER_THAN_EQUALS", [0])],
|
|
1316
|
-
orders: [
|
|
1317
|
-
e("user_id", "DESC", [r.state.userId]),
|
|
1318
|
-
e("on", "ASC", [0]),
|
|
1319
|
-
e("favorite", "DESC"),
|
|
1320
|
-
e("ord", "ASC"),
|
|
1321
|
-
e("id", "DESC")
|
|
1322
|
-
],
|
|
1323
|
-
limit: 1e3
|
|
1324
|
-
});
|
|
1325
|
-
let c = It(i, a);
|
|
1326
|
-
for (; o.nextOffset !== null && !c;) {
|
|
1327
|
-
s.changeParams({ offset: o.nextOffset });
|
|
1328
|
-
let e = await s.call();
|
|
1329
|
-
if (e.errors) break;
|
|
1330
|
-
o.nextOffset = e.nextOffset ?? null;
|
|
1331
|
-
let t = e.result.map((e) => e.id).filter(Boolean);
|
|
1332
|
-
o.projectsIds.push(...t), c = It(i, a);
|
|
1333
|
-
}
|
|
1334
|
-
o.loading = !1, c && pt(c);
|
|
1335
|
-
}, Rt = (e) => "-" + e, Z = (e) => e[0] === "-" ? e.substring(1) : e, Q = (e, t) => {
|
|
1336
|
-
e = Z(e);
|
|
1317
|
+
}), At = (e) => "-" + e, Q = (e) => e[0] === "-" ? e.substring(1) : e, jt = (e, t) => {
|
|
1318
|
+
e = Q(e);
|
|
1337
1319
|
let n = t.find((t) => t.id === e);
|
|
1338
1320
|
if (n) return n;
|
|
1339
|
-
},
|
|
1321
|
+
}, Mt = (e, t, n) => {
|
|
1340
1322
|
t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
|
|
1341
1323
|
let r = c.genElPopupOpener("div", t);
|
|
1342
1324
|
return r.classList.add("top-tagSelector"), e.useTopButton && r.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || r.classList.add("top-tagSelector-custom"), e.mode === "filter" && r.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && r.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && r.classList.add("top-tagSelector-setter_several"), r.onclick = (t) => {
|
|
1343
1325
|
t.preventDefault(), t.stopPropagation(), r.onclick = null;
|
|
1344
|
-
let i =
|
|
1326
|
+
let i = L(e.modelValue), a = {
|
|
1345
1327
|
model: i,
|
|
1346
1328
|
mode: e.mode,
|
|
1347
1329
|
targetId: e.targetId,
|
|
1348
1330
|
filters: e.filters,
|
|
1349
1331
|
payload: e.payload
|
|
1350
1332
|
};
|
|
1351
|
-
s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled,
|
|
1352
|
-
e.modelValue = i.value,
|
|
1333
|
+
s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, te(e.modelValue) || H(i, () => {
|
|
1334
|
+
e.modelValue = i.value, Pt(r, e, n);
|
|
1353
1335
|
}), r.click();
|
|
1354
|
-
},
|
|
1336
|
+
}, te(e.modelValue) ? H(e.modelValue, () => Pt(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
|
|
1355
1337
|
e.modelValue = t;
|
|
1356
1338
|
let i = s(r, "topTagSelectorTarget");
|
|
1357
|
-
i && (i.model.value = t),
|
|
1358
|
-
}),
|
|
1359
|
-
},
|
|
1339
|
+
i && (i.model.value = t), Pt(r, e, n);
|
|
1340
|
+
}), Pt(r, e, n), r;
|
|
1341
|
+
}, Nt = (e, t) => {
|
|
1360
1342
|
s(e, "topTagSelectorRender")?.(t);
|
|
1361
|
-
},
|
|
1362
|
-
let i =
|
|
1343
|
+
}, Pt = (e, t, r) => {
|
|
1344
|
+
let i = B(t.modelValue);
|
|
1363
1345
|
if (e.classList.toggle("top-tagSelector-selectedOne", !i.length || i.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", i.length > 5), t.mode === "setter" && t.filters) {
|
|
1364
1346
|
e.innerHTML = `<div>${r}</div>`;
|
|
1365
1347
|
return;
|
|
1366
1348
|
}
|
|
1367
1349
|
if (e.innerHTML = "", !i.length && t.mode === "filter") {
|
|
1368
|
-
let t =
|
|
1350
|
+
let t = Ft({
|
|
1369
1351
|
id: "all",
|
|
1370
1352
|
colorId: "",
|
|
1371
1353
|
name: n().Common?.All_tags ?? "",
|
|
@@ -1374,18 +1356,18 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1374
1356
|
e.append(t);
|
|
1375
1357
|
}
|
|
1376
1358
|
i.forEach((n) => {
|
|
1377
|
-
let r =
|
|
1378
|
-
id:
|
|
1379
|
-
colorId:
|
|
1380
|
-
name:
|
|
1381
|
-
state:
|
|
1359
|
+
let r = Ft({
|
|
1360
|
+
id: Q(n),
|
|
1361
|
+
colorId: jt(n, t.tags)?.color_id ?? "",
|
|
1362
|
+
name: jt(n, t.tags)?.name ?? "",
|
|
1363
|
+
state: Q(n) === n ? "selected" : "excluded"
|
|
1382
1364
|
});
|
|
1383
1365
|
e.append(r);
|
|
1384
1366
|
});
|
|
1385
|
-
},
|
|
1367
|
+
}, Ft = (e) => {
|
|
1386
1368
|
let t = document.createElement("div");
|
|
1387
1369
|
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;
|
|
1388
|
-
},
|
|
1370
|
+
}, It = [
|
|
1389
1371
|
{
|
|
1390
1372
|
id: "1",
|
|
1391
1373
|
name: "Without Tag",
|
|
@@ -1436,11 +1418,11 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1436
1418
|
name: "Turquoise",
|
|
1437
1419
|
color_id: "10"
|
|
1438
1420
|
}
|
|
1439
|
-
],
|
|
1421
|
+
], Lt = [
|
|
1440
1422
|
"data-tag_id",
|
|
1441
1423
|
"data-tag_color_id",
|
|
1442
1424
|
"title"
|
|
1443
|
-
],
|
|
1425
|
+
], Rt = /* @__PURE__ */ N({
|
|
1444
1426
|
__name: "tagIcon",
|
|
1445
1427
|
props: {
|
|
1446
1428
|
id: {},
|
|
@@ -1449,8 +1431,8 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1449
1431
|
state: {}
|
|
1450
1432
|
},
|
|
1451
1433
|
setup(e) {
|
|
1452
|
-
return (t, n) => (
|
|
1453
|
-
class:
|
|
1434
|
+
return (t, n) => (I(), O("div", {
|
|
1435
|
+
class: F({
|
|
1454
1436
|
"top-tagSelector_tagIcon": !0,
|
|
1455
1437
|
"top-tagSelector-active": !!e.state,
|
|
1456
1438
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
@@ -1458,11 +1440,11 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1458
1440
|
"data-tag_id": e.id,
|
|
1459
1441
|
"data-tag_color_id": e.colorId,
|
|
1460
1442
|
title: e.name
|
|
1461
|
-
}, null, 10,
|
|
1443
|
+
}, null, 10, Lt));
|
|
1462
1444
|
}
|
|
1463
|
-
}),
|
|
1445
|
+
}), zt = ["contenteditable", "onKeydown"], Bt = /* @__PURE__ */ N({
|
|
1464
1446
|
__name: "tagPopupListItem",
|
|
1465
|
-
props: /*@__PURE__*/
|
|
1447
|
+
props: /*@__PURE__*/ P({
|
|
1466
1448
|
editable: { type: Boolean },
|
|
1467
1449
|
disabled: { type: Boolean },
|
|
1468
1450
|
canExclude: { type: Boolean },
|
|
@@ -1474,18 +1456,18 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1474
1456
|
name: { required: !0 },
|
|
1475
1457
|
nameModifiers: {}
|
|
1476
1458
|
}),
|
|
1477
|
-
emits: /*@__PURE__*/
|
|
1459
|
+
emits: /*@__PURE__*/ P([
|
|
1478
1460
|
"update:name",
|
|
1479
1461
|
"unselect",
|
|
1480
1462
|
"exclude",
|
|
1481
1463
|
"select"
|
|
1482
1464
|
], ["update:name"]),
|
|
1483
1465
|
setup(e, { emit: t }) {
|
|
1484
|
-
let n = e, r = t, i =
|
|
1466
|
+
let n = e, r = t, i = V(e, "name"), a = L(null), o = T(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
|
|
1485
1467
|
contenteditable: s.value,
|
|
1486
1468
|
onpaste: (e) => e.preventDefault()
|
|
1487
|
-
}), s =
|
|
1488
|
-
s.value = !0, await
|
|
1469
|
+
}), s = L(!1), c = async () => {
|
|
1470
|
+
s.value = !0, await re(), a.value?.focus();
|
|
1489
1471
|
}, l = () => {
|
|
1490
1472
|
let e = a.value?.innerText;
|
|
1491
1473
|
if (!e) return u();
|
|
@@ -1497,8 +1479,8 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1497
1479
|
let t = "selected";
|
|
1498
1480
|
n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
|
|
1499
1481
|
};
|
|
1500
|
-
return (t, n) => (
|
|
1501
|
-
class:
|
|
1482
|
+
return (t, n) => (I(), E(v, {
|
|
1483
|
+
class: F({
|
|
1502
1484
|
"top-tagSelector_tagListItem": !0,
|
|
1503
1485
|
"top-tagSelector_tagListItem-inEdit": s.value,
|
|
1504
1486
|
"top-tagSelector_tagListItem-disabled": e.disabled,
|
|
@@ -1506,10 +1488,10 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1506
1488
|
"top-tagSelector-active": !!e.state,
|
|
1507
1489
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
1508
1490
|
}),
|
|
1509
|
-
onClick:
|
|
1491
|
+
onClick: W(d, ["stop"])
|
|
1510
1492
|
}, {
|
|
1511
|
-
default:
|
|
1512
|
-
|
|
1493
|
+
default: U(() => [
|
|
1494
|
+
M(Rt, {
|
|
1513
1495
|
id: e.id,
|
|
1514
1496
|
name: i.value,
|
|
1515
1497
|
colorId: e.colorId,
|
|
@@ -1520,31 +1502,31 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1520
1502
|
"colorId",
|
|
1521
1503
|
"state"
|
|
1522
1504
|
]),
|
|
1523
|
-
|
|
1505
|
+
k("span", ne({
|
|
1524
1506
|
ref_key: "elName",
|
|
1525
1507
|
ref: a,
|
|
1526
1508
|
class: "top-tagSelector_tagListItemName",
|
|
1527
1509
|
contenteditable: s.value ? "plaintext-only" : !1
|
|
1528
|
-
}, o.value, { onKeydown: [
|
|
1529
|
-
e.editable ? (
|
|
1510
|
+
}, o.value, { onKeydown: [me(W(l, ["stop"]), ["enter"]), me(W(u, ["stop"]), ["esc"])] }), z(i.value), 17, zt),
|
|
1511
|
+
e.editable ? (I(), O(w, { key: 0 }, [s.value ? (I(), O("span", {
|
|
1530
1512
|
key: 1,
|
|
1531
1513
|
"data-top-icon": "",
|
|
1532
1514
|
class: "top-tagSelector_edit",
|
|
1533
|
-
onClick:
|
|
1534
|
-
})) : (
|
|
1515
|
+
onClick: W(l, ["stop"])
|
|
1516
|
+
})) : (I(), O("span", {
|
|
1535
1517
|
key: 0,
|
|
1536
1518
|
"data-top-icon": "",
|
|
1537
1519
|
class: "top-tagSelector_edit",
|
|
1538
1520
|
onClick: c
|
|
1539
|
-
}))], 64)) :
|
|
1521
|
+
}))], 64)) : D("", !0)
|
|
1540
1522
|
]),
|
|
1541
1523
|
_: 1
|
|
1542
1524
|
}, 8, ["class"]));
|
|
1543
1525
|
}
|
|
1544
|
-
}),
|
|
1526
|
+
}), Vt = { key: 1 }, Ht = /* @__PURE__ */ N({
|
|
1545
1527
|
inheritAttrs: !1,
|
|
1546
1528
|
__name: "popupOpener",
|
|
1547
|
-
props: /*@__PURE__*/
|
|
1529
|
+
props: /*@__PURE__*/ P({
|
|
1548
1530
|
modelValue: {},
|
|
1549
1531
|
id: {},
|
|
1550
1532
|
tags: {},
|
|
@@ -1560,7 +1542,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1560
1542
|
}),
|
|
1561
1543
|
emits: ["update:modelValue"],
|
|
1562
1544
|
setup(e, { attrs: t }) {
|
|
1563
|
-
let n = e, r =
|
|
1545
|
+
let n = e, r = V(e, "modelValue"), i = n.useTopButton ? a : "div", o = n.useTopButton ? "html" : "default", s = {
|
|
1564
1546
|
model: r,
|
|
1565
1547
|
mode: n.mode,
|
|
1566
1548
|
targetId: n.targetId,
|
|
@@ -1568,9 +1550,9 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1568
1550
|
payload: n.payload
|
|
1569
1551
|
};
|
|
1570
1552
|
return (a, c) => {
|
|
1571
|
-
let l =
|
|
1572
|
-
return
|
|
1573
|
-
default:
|
|
1553
|
+
let l = ce("top-data");
|
|
1554
|
+
return I(), E(g, { id: e.id }, {
|
|
1555
|
+
default: U(() => [pe((I(), E(le(B(i)), ne({
|
|
1574
1556
|
class: {
|
|
1575
1557
|
"top-tagSelector": !0,
|
|
1576
1558
|
"top-tagSelector-useTopButton": n.useTopButton,
|
|
@@ -1585,17 +1567,17 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1585
1567
|
color: "theme",
|
|
1586
1568
|
styling: e.styling
|
|
1587
1569
|
}, t), {
|
|
1588
|
-
[
|
|
1570
|
+
[B(o)]: U(() => [!r.value.length && e.mode === "filter" ? (I(), E(Rt, {
|
|
1589
1571
|
key: 0,
|
|
1590
1572
|
id: "all",
|
|
1591
1573
|
colorId: "",
|
|
1592
1574
|
name: a.$i18n.Common.All_tags ?? "",
|
|
1593
1575
|
state: ""
|
|
1594
|
-
}, null, 8, ["name"])) :
|
|
1595
|
-
id:
|
|
1596
|
-
colorId:
|
|
1597
|
-
name:
|
|
1598
|
-
state:
|
|
1576
|
+
}, null, 8, ["name"])) : D("", !0), e.mode === "setter" && e.filters ? (I(), O("div", Vt, [oe(a.$slots, "default")])) : (I(!0), O(w, { key: 2 }, R(r.value, (t) => (I(), E(Rt, {
|
|
1577
|
+
id: B(Q)(t),
|
|
1578
|
+
colorId: B(jt)(t, e.tags)?.color_id ?? "",
|
|
1579
|
+
name: B(jt)(t, e.tags)?.name ?? "",
|
|
1580
|
+
state: B(Q)(t) === t ? "selected" : "excluded"
|
|
1599
1581
|
}, null, 8, [
|
|
1600
1582
|
"id",
|
|
1601
1583
|
"colorId",
|
|
@@ -1612,9 +1594,9 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1612
1594
|
}, 8, ["id"]);
|
|
1613
1595
|
};
|
|
1614
1596
|
}
|
|
1615
|
-
}),
|
|
1597
|
+
}), Ut = /* @__PURE__ */ N({
|
|
1616
1598
|
__name: "tagSelector",
|
|
1617
|
-
props: /*@__PURE__*/
|
|
1599
|
+
props: /*@__PURE__*/ P({
|
|
1618
1600
|
modelValue: {},
|
|
1619
1601
|
tags: {},
|
|
1620
1602
|
tagsEditable: { type: Boolean },
|
|
@@ -1635,20 +1617,20 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1635
1617
|
}, {
|
|
1636
1618
|
modelValue: { required: !0 },
|
|
1637
1619
|
modelModifiers: {},
|
|
1638
|
-
tags: { default:
|
|
1620
|
+
tags: { default: ae(It) },
|
|
1639
1621
|
tagsModifiers: {}
|
|
1640
1622
|
}),
|
|
1641
|
-
emits: /*@__PURE__*/
|
|
1623
|
+
emits: /*@__PURE__*/ P([
|
|
1642
1624
|
"selector",
|
|
1643
1625
|
"setter",
|
|
1644
1626
|
"tagsChanged"
|
|
1645
1627
|
], ["update:modelValue", "update:tags"]),
|
|
1646
1628
|
setup(e, { emit: t }) {
|
|
1647
|
-
let c = n(), l = e, u =
|
|
1629
|
+
let c = n(), l = e, u = V(e, "modelValue"), d = V(e, "tags"), f = t, p = i((e, t) => {
|
|
1648
1630
|
f(e, t);
|
|
1649
1631
|
}, l.emitDelay);
|
|
1650
1632
|
l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
|
|
1651
|
-
let m = l.id ?? "top-popup-id-" + Math.random(), h =
|
|
1633
|
+
let m = l.id ?? "top-popup-id-" + Math.random(), h = L("add"), g = () => {
|
|
1652
1634
|
let e = " " + c.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
|
|
1653
1635
|
return t.set("add", {
|
|
1654
1636
|
value: "add",
|
|
@@ -1660,35 +1642,35 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1660
1642
|
value: "delete",
|
|
1661
1643
|
title: c.Common.Delete + e
|
|
1662
1644
|
}), t;
|
|
1663
|
-
}, _ =
|
|
1645
|
+
}, _ = ue({
|
|
1664
1646
|
model: u,
|
|
1665
1647
|
mode: "filter",
|
|
1666
1648
|
targetId: void 0,
|
|
1667
1649
|
filters: void 0,
|
|
1668
1650
|
payload: void 0
|
|
1669
1651
|
});
|
|
1670
|
-
|
|
1652
|
+
H(u, () => {
|
|
1671
1653
|
p("selector", u.value);
|
|
1672
1654
|
});
|
|
1673
|
-
let
|
|
1655
|
+
let ee = T(() => {
|
|
1674
1656
|
if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
|
|
1675
|
-
}),
|
|
1657
|
+
}), b = (e) => {
|
|
1676
1658
|
if (e !== "all") {
|
|
1677
1659
|
if (_.value.model.value.includes(e)) return "selected";
|
|
1678
|
-
if (_.value.model.value.includes(
|
|
1660
|
+
if (_.value.model.value.includes(At(e))) return "excluded";
|
|
1679
1661
|
}
|
|
1680
1662
|
return e === "all" && !_.value.model.value.length ? "selected" : "";
|
|
1681
|
-
},
|
|
1682
|
-
let n =
|
|
1663
|
+
}, x = (e, t) => {
|
|
1664
|
+
let n = At(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
|
|
1683
1665
|
t === "select" && r.push(e), t === "exclude" && r.push(n), _.value.mode === "setter" && _.value.targetId !== void 0 && l.requiredForSetter && (r.length || r.push("1"), r.length === 2 && _.value.model.value.length === 1 && _.value.model.value[0] === "1" && (r = r.filter((e) => e !== "1"))), l.singleMode && !_.value.filters && (r.length || (r = _.value.model.value), r.length > 1 && (r = [r[r.length - 1]])), r.sort((e, t) => l.tags ? l.tags.findIndex((t) => t.id === e) - l.tags.findIndex((e) => e.id === t) : 0), _.value.model.value = r, _.value.mode === "setter" && _.value.targetId !== void 0 && p("setter", {
|
|
1684
1666
|
tagsIds: r,
|
|
1685
1667
|
targetId: _.value.targetId,
|
|
1686
1668
|
payload: _.value.payload
|
|
1687
1669
|
});
|
|
1688
|
-
},
|
|
1670
|
+
}, S = T(() => {
|
|
1689
1671
|
let e = "top-tagSelector_popup";
|
|
1690
1672
|
return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
|
|
1691
|
-
}),
|
|
1673
|
+
}), C = () => {
|
|
1692
1674
|
let e = prompt("", "New tag");
|
|
1693
1675
|
if (!e || e === "New tag") return;
|
|
1694
1676
|
let t = d.value.length + 1;
|
|
@@ -1697,7 +1679,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1697
1679
|
name: e,
|
|
1698
1680
|
color_id: String((t - 1) % 10 + 1)
|
|
1699
1681
|
}), f("tagsChanged", d.value);
|
|
1700
|
-
},
|
|
1682
|
+
}, k = (e) => {
|
|
1701
1683
|
if (_.value = s(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1702
1684
|
if (_.value.filters && (h.value = "add", _.value.model.value = []), !r.$?.ui.sortable) {
|
|
1703
1685
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
@@ -1717,13 +1699,13 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1717
1699
|
}), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
|
|
1718
1700
|
}
|
|
1719
1701
|
});
|
|
1720
|
-
},
|
|
1702
|
+
}, N = (e) => {
|
|
1721
1703
|
r.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
|
|
1722
1704
|
};
|
|
1723
|
-
return (t, n) => (
|
|
1705
|
+
return (t, n) => (I(), O(w, null, [M(Ht, {
|
|
1724
1706
|
modelValue: u.value,
|
|
1725
1707
|
"onUpdate:modelValue": n[0] ||= (e) => u.value = e,
|
|
1726
|
-
id:
|
|
1708
|
+
id: B(m),
|
|
1727
1709
|
tags: d.value,
|
|
1728
1710
|
styling: e.styling,
|
|
1729
1711
|
mode: "filter",
|
|
@@ -1734,36 +1716,36 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1734
1716
|
"tags",
|
|
1735
1717
|
"styling",
|
|
1736
1718
|
"useTopButton"
|
|
1737
|
-
]),
|
|
1738
|
-
id:
|
|
1739
|
-
class:
|
|
1740
|
-
onOpen: n[4] ||= (e) =>
|
|
1741
|
-
onClose: n[5] ||= (e) =>
|
|
1719
|
+
]), M(y, {
|
|
1720
|
+
id: B(m),
|
|
1721
|
+
class: F(S.value),
|
|
1722
|
+
onOpen: n[4] ||= (e) => k(e),
|
|
1723
|
+
onClose: n[5] ||= (e) => N(e),
|
|
1742
1724
|
"transition-duration": 50
|
|
1743
|
-
},
|
|
1744
|
-
contentList:
|
|
1745
|
-
_.value.mode === "filter" && !e.singleMode ? (
|
|
1725
|
+
}, A({
|
|
1726
|
+
contentList: U(() => [
|
|
1727
|
+
_.value.mode === "filter" && !e.singleMode ? (I(), E(Bt, {
|
|
1746
1728
|
key: 0,
|
|
1747
1729
|
id: "all",
|
|
1748
1730
|
colorId: "",
|
|
1749
1731
|
name: t.$i18n.Common.All_tags ?? "",
|
|
1750
1732
|
state: _.value.model.value.length ? "" : "selected",
|
|
1751
1733
|
onSelect: n[3] ||= (e) => _.value.model.value = []
|
|
1752
|
-
}, null, 8, ["name", "state"])) :
|
|
1753
|
-
(
|
|
1734
|
+
}, null, 8, ["name", "state"])) : D("", !0),
|
|
1735
|
+
(I(!0), O(w, null, R(d.value, (t) => (I(), E(Bt, {
|
|
1754
1736
|
key: t.id,
|
|
1755
1737
|
id: t.id,
|
|
1756
1738
|
colorId: t.color_id,
|
|
1757
1739
|
name: t.name,
|
|
1758
|
-
state:
|
|
1740
|
+
state: b(t.id),
|
|
1759
1741
|
canExclude: _.value.mode === "filter" && !e.singleMode,
|
|
1760
1742
|
editable: e.tagsEditable,
|
|
1761
|
-
disabled:
|
|
1762
|
-
onUnselect: (e) =>
|
|
1763
|
-
onSelect: (e) =>
|
|
1764
|
-
onExclude: (e) =>
|
|
1743
|
+
disabled: ee.value && b(t.id) === "",
|
|
1744
|
+
onUnselect: (e) => x(t.id, "unselect"),
|
|
1745
|
+
onSelect: (e) => x(t.id, "select"),
|
|
1746
|
+
onExclude: (e) => x(t.id, "exclude"),
|
|
1765
1747
|
"onUpdate:name": (e) => {
|
|
1766
|
-
t.name = e,
|
|
1748
|
+
t.name = e, B(p)("tagsChanged", d.value);
|
|
1767
1749
|
}
|
|
1768
1750
|
}, null, 8, [
|
|
1769
1751
|
"id",
|
|
@@ -1778,19 +1760,19 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1778
1760
|
"onExclude",
|
|
1779
1761
|
"onUpdate:name"
|
|
1780
1762
|
]))), 128)),
|
|
1781
|
-
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (
|
|
1763
|
+
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (I(), E(v, {
|
|
1782
1764
|
key: 1,
|
|
1783
1765
|
"data-top-icon": "",
|
|
1784
|
-
onClick:
|
|
1766
|
+
onClick: W(C, ["stop"])
|
|
1785
1767
|
}, {
|
|
1786
|
-
default:
|
|
1768
|
+
default: U(() => [j(z(t.$i18n.Common.Add), 1)]),
|
|
1787
1769
|
_: 1
|
|
1788
|
-
})) :
|
|
1770
|
+
})) : D("", !0)
|
|
1789
1771
|
]),
|
|
1790
1772
|
_: 2
|
|
1791
1773
|
}, [_.value.mode === "setter" && _.value.filters ? {
|
|
1792
1774
|
name: "header",
|
|
1793
|
-
fn:
|
|
1775
|
+
fn: U(() => [M(o, {
|
|
1794
1776
|
modelValue: h.value,
|
|
1795
1777
|
"onUpdate:modelValue": n[1] ||= (e) => h.value = e,
|
|
1796
1778
|
options: g()
|
|
@@ -1798,16 +1780,16 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1798
1780
|
key: "0"
|
|
1799
1781
|
} : void 0, _.value.mode === "setter" && _.value.filters ? {
|
|
1800
1782
|
name: "footer",
|
|
1801
|
-
fn:
|
|
1802
|
-
default:
|
|
1783
|
+
fn: U(() => [M(a, { color: "theme" }, {
|
|
1784
|
+
default: U(() => [j(z(t.$i18n.Common.Cancel), 1)]),
|
|
1803
1785
|
_: 1
|
|
1804
|
-
}),
|
|
1786
|
+
}), M(a, { onClick: n[2] ||= (e) => B(p)("setter", {
|
|
1805
1787
|
tagsIds: _.value.model.value,
|
|
1806
1788
|
filters: _.value.filters,
|
|
1807
1789
|
filtersAction: h.value,
|
|
1808
1790
|
payload: _.value.payload
|
|
1809
1791
|
}) }, {
|
|
1810
|
-
default:
|
|
1792
|
+
default: U(() => [j(z(h.value === "add" ? t.$i18n.Common.Add : "") + " " + z(h.value === "replace" ? t.$i18n.Common.Replace : "") + " " + z(h.value === "delete" ? t.$i18n.Common.Delete : ""), 1)]),
|
|
1811
1793
|
_: 1
|
|
1812
1794
|
})]),
|
|
1813
1795
|
key: "1"
|
|
@@ -1815,6 +1797,6 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1815
1797
|
}
|
|
1816
1798
|
});
|
|
1817
1799
|
//#endregion
|
|
1818
|
-
export {
|
|
1800
|
+
export { _e as TopCompetitorSelector, it as TopGroupSelector, kt as TopProjectSelector, Re as TopRegionSelector, Ut as TopTagSelector, Ht as TopTagSelectorPopupOpener, Rt as TopTagSelectorTagIcon, ke as dialogRegionSelector, Oe as findRegion, Mt as genElTopTagSelectorPopupOpener, Ae as genSearcherByKey, Nt as renderElTopTagSelectorPopupOpener, Ct as topProjectSelectorClearCache, ve as useItemsFromCompetitors };
|
|
1819
1801
|
|
|
1820
1802
|
//# sourceMappingURL=project.js.map
|