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