@topvisor/ui 1.5.10-hotkeys.2 → 1.5.10-hotkeys.3
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-CT5_dKnt.es.amd.js +2 -0
- package/.chunks/formsExt-CT5_dKnt.es.amd.js.map +1 -0
- package/.chunks/{formsExt-B9hGGznb.es.js → formsExt-CT5_dKnt.es.js} +15 -11
- package/.chunks/formsExt-CT5_dKnt.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 +366 -390
- 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-CT5_dKnt.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;
|
|
@@ -223,7 +223,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
223
223
|
e.set(n.index, c);
|
|
224
224
|
}), e;
|
|
225
225
|
});
|
|
226
|
-
return
|
|
226
|
+
return H(o, (t, n) => {
|
|
227
227
|
if (e.onlySearcher || a.value !== void 0 && t.get(a.value)) return;
|
|
228
228
|
let i = t.keys().next().value;
|
|
229
229
|
if (a.value === -2 || i === -2) {
|
|
@@ -246,8 +246,8 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
246
246
|
regionIndex: a,
|
|
247
247
|
optionByRegionIndex: o
|
|
248
248
|
};
|
|
249
|
-
},
|
|
250
|
-
let r =
|
|
249
|
+
}, Ie = (e, t, n) => {
|
|
250
|
+
let r = L([]), i = () => {
|
|
251
251
|
if (e.onlySearcher && t.value) {
|
|
252
252
|
r.value = Array.from(t.value.keys());
|
|
253
253
|
return;
|
|
@@ -261,19 +261,19 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
261
261
|
}, a = () => {
|
|
262
262
|
r.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(r.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
|
|
263
263
|
};
|
|
264
|
-
return
|
|
264
|
+
return H(r, () => {
|
|
265
265
|
a();
|
|
266
266
|
}), e.addCompare && i(), { regionsIndexes: r };
|
|
267
|
-
},
|
|
268
|
-
let t =
|
|
267
|
+
}, Le = (e) => {
|
|
268
|
+
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
269
|
let e = /* @__PURE__ */ new Set();
|
|
270
270
|
return n.value.forEach((t) => {
|
|
271
271
|
t.regionByIndex.forEach((t) => {
|
|
272
272
|
t.index !== -2 && e.add(t.index);
|
|
273
273
|
});
|
|
274
274
|
}), e;
|
|
275
|
-
}), a =
|
|
276
|
-
|
|
275
|
+
}), a = Pe(e, n), o = Fe(e, r), s = Ie(e, n, i);
|
|
276
|
+
H(n, () => {
|
|
277
277
|
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
278
|
let t = n.value.keys().next().value;
|
|
279
279
|
n.value.forEach((r) => {
|
|
@@ -296,7 +296,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
296
296
|
let n = o.regionIndex.value;
|
|
297
297
|
if (t.value && e.forMode) {
|
|
298
298
|
let t = o.regionIndex.value;
|
|
299
|
-
n =
|
|
299
|
+
n = Oe(e.forMode, {
|
|
300
300
|
searcher_key: c(),
|
|
301
301
|
key: t
|
|
302
302
|
}, e.searchers)?.index;
|
|
@@ -318,9 +318,9 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
318
318
|
if (e !== void 0) return u()?.regionByIndex?.get(e);
|
|
319
319
|
}
|
|
320
320
|
};
|
|
321
|
-
},
|
|
321
|
+
}, Re = /* @__PURE__ */ N({
|
|
322
322
|
__name: "regionSelector",
|
|
323
|
-
props: /*@__PURE__*/
|
|
323
|
+
props: /*@__PURE__*/ P({
|
|
324
324
|
projectId: {},
|
|
325
325
|
searchers: { default: () => [] },
|
|
326
326
|
modelValue: {},
|
|
@@ -349,19 +349,19 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
349
349
|
}),
|
|
350
350
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
351
351
|
setup(e, { expose: t }) {
|
|
352
|
-
let n = e, r =
|
|
352
|
+
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
353
|
let e = [];
|
|
354
354
|
d.value.forEach((t) => {
|
|
355
355
|
(n.forMode === "project_relevant_url" || t.enabled) && t.regions.forEach((t) => {
|
|
356
356
|
(n.forMode === "project_relevant_url" || t.enabled) && t.index !== -1 && e.push(t);
|
|
357
357
|
});
|
|
358
|
-
}),
|
|
358
|
+
}), ke.open("regions", {
|
|
359
359
|
regions: e,
|
|
360
360
|
regionsIndexes: u.regionsIndexes.value,
|
|
361
361
|
"@update:regionsIndexes": (e) => u.regionsIndexes.value = e
|
|
362
362
|
});
|
|
363
363
|
};
|
|
364
|
-
return
|
|
364
|
+
return H([
|
|
365
365
|
l.regionIndex,
|
|
366
366
|
c.searcherKey,
|
|
367
367
|
u.regionsIndexes
|
|
@@ -371,9 +371,9 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
371
371
|
i.value = [...u.regionsIndexes.value];
|
|
372
372
|
} 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
373
|
!n.onlySearcher && !f.value.size && (c.searcherKey.value = -2);
|
|
374
|
-
}), s.value &&
|
|
374
|
+
}), s.value && H(s, () => {
|
|
375
375
|
s.value && (i.value = [s.value]);
|
|
376
|
-
}, { immediate: !0 }),
|
|
376
|
+
}, { immediate: !0 }), H(i, () => {
|
|
377
377
|
if (i.value[0] && (s.value = i.value[0]), n.onlySearcher) {
|
|
378
378
|
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
379
|
let e = d.value.keys().next().value;
|
|
@@ -426,14 +426,14 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
426
426
|
}, { immediate: !0 }), t({
|
|
427
427
|
getSearcher: p,
|
|
428
428
|
getRegion: m
|
|
429
|
-
}), (t, n) => (
|
|
429
|
+
}), (t, n) => (I(), O("div", { class: F({
|
|
430
430
|
"top-regionSelector": !0,
|
|
431
431
|
"top-regionSelector-onlySearcher": e.onlySearcher
|
|
432
432
|
}) }, [
|
|
433
|
-
|
|
434
|
-
options:
|
|
435
|
-
modelValue:
|
|
436
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
433
|
+
M(o, {
|
|
434
|
+
options: B(c).optionBySearcherKey.value,
|
|
435
|
+
modelValue: B(c).searcherKey.value,
|
|
436
|
+
"onUpdate:modelValue": n[0] ||= (e) => B(c).searcherKey.value = e,
|
|
437
437
|
name: "searcher_key",
|
|
438
438
|
addChanger: e.addChanger
|
|
439
439
|
}, null, 8, [
|
|
@@ -441,12 +441,12 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
441
441
|
"modelValue",
|
|
442
442
|
"addChanger"
|
|
443
443
|
]),
|
|
444
|
-
!e.onlySearcher &&
|
|
444
|
+
!e.onlySearcher && B(c).searcherKey.value !== B(-1) ? (I(), E(o, {
|
|
445
445
|
key: 0,
|
|
446
446
|
class: "top-select-region",
|
|
447
|
-
options:
|
|
448
|
-
modelValue:
|
|
449
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
447
|
+
options: B(l).optionByRegionIndex.value,
|
|
448
|
+
modelValue: B(l).regionIndex.value,
|
|
449
|
+
"onUpdate:modelValue": n[1] ||= (e) => B(l).regionIndex.value = e,
|
|
450
450
|
name: r.value ? "region_key" : "region_index",
|
|
451
451
|
addChanger: e.addChanger,
|
|
452
452
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
@@ -456,31 +456,31 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
456
456
|
"name",
|
|
457
457
|
"addChanger",
|
|
458
458
|
"data-top-icon"
|
|
459
|
-
])) :
|
|
460
|
-
e.addCompare && !e.onlySearcher &&
|
|
459
|
+
])) : D("", !0),
|
|
460
|
+
e.addCompare && !e.onlySearcher && B(c).searcherKey.value === B(-1) ? (I(), E(a, {
|
|
461
461
|
key: 1,
|
|
462
462
|
name: "compare",
|
|
463
463
|
onClick: h,
|
|
464
|
-
"data-count-compare-regions-indexes":
|
|
464
|
+
"data-count-compare-regions-indexes": B(u).regionsIndexes.value.length
|
|
465
465
|
}, {
|
|
466
|
-
default:
|
|
466
|
+
default: U(() => [j(z(t.$i18n.Common.Selected_regions), 1)]),
|
|
467
467
|
_: 1
|
|
468
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
468
|
+
}, 8, ["data-count-compare-regions-indexes"])) : D("", !0)
|
|
469
469
|
], 2));
|
|
470
470
|
}
|
|
471
|
-
}),
|
|
471
|
+
}), K = {
|
|
472
472
|
id: 0,
|
|
473
473
|
name: "/",
|
|
474
474
|
path: "/"
|
|
475
475
|
};
|
|
476
|
-
function
|
|
476
|
+
function ze(e) {
|
|
477
477
|
return e ? n()?.Common.All_folders : "/ (" + n()?.Keywords.Root_folder + ")";
|
|
478
478
|
}
|
|
479
|
-
var
|
|
480
|
-
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name =
|
|
479
|
+
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) => {
|
|
480
|
+
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = ze(t));
|
|
481
481
|
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),
|
|
482
|
+
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);
|
|
483
|
+
}), n), Ve = (e, t) => e.gen(`/get/${t}/folders/`, [
|
|
484
484
|
"id",
|
|
485
485
|
"parent_id",
|
|
486
486
|
"name",
|
|
@@ -491,9 +491,9 @@ var He = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
|
|
|
491
491
|
});
|
|
492
492
|
//#endregion
|
|
493
493
|
//#region src/core/utils/composables/useWatch.ts
|
|
494
|
-
function
|
|
494
|
+
function He(e, t, n) {
|
|
495
495
|
let r = Object.keys(e), i = r.map((t) => e[t]);
|
|
496
|
-
return
|
|
496
|
+
return H(i, (e, n, i) => {
|
|
497
497
|
let a = {};
|
|
498
498
|
e.forEach((e, t) => {
|
|
499
499
|
if (!Object.is(e, n[t])) {
|
|
@@ -508,9 +508,9 @@ function We(e, t, n) {
|
|
|
508
508
|
}
|
|
509
509
|
//#endregion
|
|
510
510
|
//#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
|
|
511
|
-
var
|
|
511
|
+
var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
|
|
512
512
|
__name: "folders",
|
|
513
|
-
props: /*@__PURE__*/
|
|
513
|
+
props: /*@__PURE__*/ P({
|
|
514
514
|
folderId: {},
|
|
515
515
|
folder: {},
|
|
516
516
|
folders: {},
|
|
@@ -526,20 +526,20 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
526
526
|
}, {
|
|
527
527
|
folderId: { required: !0 },
|
|
528
528
|
folderIdModifiers: {},
|
|
529
|
-
folder: { default:
|
|
529
|
+
folder: { default: K },
|
|
530
530
|
folderModifiers: {}
|
|
531
531
|
}),
|
|
532
532
|
emits: ["update:folderId", "update:folder"],
|
|
533
533
|
setup(e) {
|
|
534
|
-
let t = e, n =
|
|
535
|
-
|
|
534
|
+
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);
|
|
535
|
+
H(() => t.projectId, () => {
|
|
536
536
|
i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
|
|
537
537
|
}, { immediate: !0 });
|
|
538
|
-
let o =
|
|
538
|
+
let o = T(() => Be(t.folders ?? { root: [K] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
|
|
539
539
|
...e[0],
|
|
540
|
-
name:
|
|
540
|
+
name: ze(!0)
|
|
541
541
|
}), e);
|
|
542
|
-
return
|
|
542
|
+
return He({
|
|
543
543
|
modelFolder: r,
|
|
544
544
|
modelFolderId: n
|
|
545
545
|
}, async (e) => {
|
|
@@ -549,21 +549,21 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
549
549
|
return;
|
|
550
550
|
}
|
|
551
551
|
let i = o.value.get(t.folderId);
|
|
552
|
-
i ||=
|
|
553
|
-
}, { immediate: !0 }), (t, n) => (
|
|
552
|
+
i ||= K, r.value = i, n.value = i.id;
|
|
553
|
+
}, { immediate: !0 }), (t, n) => (I(), E(b, {
|
|
554
554
|
class: "top-groupSelector_folder",
|
|
555
555
|
modelValue: r.value,
|
|
556
556
|
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
557
557
|
items: e.folders ? [...o.value.values()] : void 0,
|
|
558
558
|
"search-type": "inline",
|
|
559
559
|
icon: e.addIcon ? "" : void 0,
|
|
560
|
-
api: e.folders ? void 0 :
|
|
561
|
-
apiSetSearchParams: (...e) =>
|
|
560
|
+
api: e.folders ? void 0 : B(i),
|
|
561
|
+
apiSetSearchParams: (...e) => B(x)(...e, "name"),
|
|
562
562
|
prepareItemsBeforeRender: s,
|
|
563
563
|
addChanger: e.addChanger,
|
|
564
564
|
useCache: ""
|
|
565
565
|
}, {
|
|
566
|
-
item:
|
|
566
|
+
item: U(({ item: e }) => [k("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ue)]),
|
|
567
567
|
_: 1
|
|
568
568
|
}, 8, [
|
|
569
569
|
"modelValue",
|
|
@@ -574,17 +574,17 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
574
574
|
"addChanger"
|
|
575
575
|
]));
|
|
576
576
|
}
|
|
577
|
-
}),
|
|
577
|
+
}), q = {
|
|
578
578
|
id: -1,
|
|
579
579
|
name: "--",
|
|
580
|
-
folder_id:
|
|
581
|
-
folder_path:
|
|
582
|
-
},
|
|
580
|
+
folder_id: K.id,
|
|
581
|
+
folder_path: K.path
|
|
582
|
+
}, J = {
|
|
583
583
|
id: 0,
|
|
584
584
|
name: "All groups",
|
|
585
|
-
folder_id:
|
|
586
|
-
folder_path:
|
|
587
|
-
},
|
|
585
|
+
folder_id: K.id,
|
|
586
|
+
folder_path: K.path
|
|
587
|
+
}, 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
588
|
"id",
|
|
589
589
|
"name",
|
|
590
590
|
"folder_id",
|
|
@@ -592,12 +592,12 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
592
592
|
]).changeParams({
|
|
593
593
|
folder_id_depth: !0,
|
|
594
594
|
limit: 100
|
|
595
|
-
}),
|
|
595
|
+
}), 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
596
|
key: 0,
|
|
597
597
|
class: "top-comment"
|
|
598
|
-
},
|
|
598
|
+
}, $e = ["innerHTML"], et = ["innerHTML"], tt = ["innerHTML"], nt = /* @__PURE__ */ N({
|
|
599
599
|
__name: "groups",
|
|
600
|
-
props: /*@__PURE__*/
|
|
600
|
+
props: /*@__PURE__*/ P({
|
|
601
601
|
groupId: {},
|
|
602
602
|
group: {},
|
|
603
603
|
projectId: {},
|
|
@@ -628,14 +628,14 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
628
628
|
group: { required: !0 },
|
|
629
629
|
groupModifiers: {}
|
|
630
630
|
}),
|
|
631
|
-
emits: /*@__PURE__*/
|
|
631
|
+
emits: /*@__PURE__*/ P([
|
|
632
632
|
"addGroup",
|
|
633
633
|
"editGroup",
|
|
634
634
|
"delGroup"
|
|
635
635
|
], ["update:groupId", "update:group"]),
|
|
636
636
|
setup(e, { expose: n, emit: r }) {
|
|
637
|
-
let i = e, a = r, o =
|
|
638
|
-
if (i.groups !== void 0) return
|
|
637
|
+
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(() => {
|
|
638
|
+
if (i.groups !== void 0) return Ke(i.groups, i.on, i.folder);
|
|
639
639
|
}), m = t("folder_id", "EQUALS", [i.folder?.id ?? 0]);
|
|
640
640
|
c?.changeParams({
|
|
641
641
|
project_id: i.projectId,
|
|
@@ -647,16 +647,16 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
647
647
|
}, g = (e = !1) => {
|
|
648
648
|
f.value?.resetCache(e);
|
|
649
649
|
};
|
|
650
|
-
|
|
650
|
+
He({
|
|
651
651
|
projectId: () => i.projectId,
|
|
652
652
|
folderId: () => i.folder?.id,
|
|
653
653
|
canSelectAll: () => i.canSelectAll
|
|
654
654
|
}, (e) => {
|
|
655
655
|
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
656
|
let e;
|
|
657
|
-
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e =
|
|
657
|
+
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = ae(Y()))), (i.autoselect === "placeholder" || !e) && (e = Ge()), h(e);
|
|
658
658
|
}
|
|
659
|
-
}, { immediate: !0 }),
|
|
659
|
+
}, { immediate: !0 }), He({
|
|
660
660
|
modelGroup: s,
|
|
661
661
|
modelGroupId: o
|
|
662
662
|
}, async (e) => {
|
|
@@ -668,14 +668,14 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
668
668
|
if (!(i.canAdd && o.value === null)) {
|
|
669
669
|
if (i.groups) {
|
|
670
670
|
let e = p.value?.find((e) => e.id === o.value);
|
|
671
|
-
if (!e && i.canSelectAll && (e =
|
|
671
|
+
if (!e && i.canSelectAll && (e = Y()), e) h(e);
|
|
672
672
|
else {
|
|
673
673
|
let e = p.value?.[0];
|
|
674
|
-
e && !o.value ? h(e) : h(
|
|
674
|
+
e && !o.value ? h(e) : h(q);
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
if (i.client && !i.groups && (o.value || o.value === 0 && !i.canSelectAll)) {
|
|
678
|
-
let e =
|
|
678
|
+
let e = qe(i.client, i.service).changeParams({
|
|
679
679
|
project_id: i.projectId,
|
|
680
680
|
id: o.value,
|
|
681
681
|
filters: [m]
|
|
@@ -683,7 +683,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
683
683
|
e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + i.projectId });
|
|
684
684
|
let t = await e.call();
|
|
685
685
|
if (!t.errors?.length && !t.result) return;
|
|
686
|
-
!t.errors && t.result[0] ? h(t.result[0]) : h(
|
|
686
|
+
!t.errors && t.result[0] ? h(t.result[0]) : h(q);
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
689
|
}
|
|
@@ -693,7 +693,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
693
693
|
let t = s.value, n = await l.changeParams({
|
|
694
694
|
project_id: i.projectId,
|
|
695
695
|
names: [e.name],
|
|
696
|
-
to_id: i.folder?.id ??
|
|
696
|
+
to_id: i.folder?.id ?? K.id,
|
|
697
697
|
to_type: "in_folder_last"
|
|
698
698
|
}).call();
|
|
699
699
|
if (n.result) {
|
|
@@ -701,7 +701,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
701
701
|
h(e), a("addGroup", e);
|
|
702
702
|
} else h(t);
|
|
703
703
|
f.value?.resetCache(!0);
|
|
704
|
-
},
|
|
704
|
+
}, y = async (e, t) => {
|
|
705
705
|
d && ((await d.changeParams({
|
|
706
706
|
project_id: i.projectId,
|
|
707
707
|
id: e.id,
|
|
@@ -710,13 +710,13 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
710
710
|
id: e.id,
|
|
711
711
|
name: t
|
|
712
712
|
}), f.value?.updateCacheItemById(e.id, { name: t })));
|
|
713
|
-
},
|
|
713
|
+
}, S = async (e) => {
|
|
714
714
|
u && ((await u.changeParams({
|
|
715
715
|
project_id: i.projectId,
|
|
716
716
|
id: e.id
|
|
717
|
-
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ?
|
|
717
|
+
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ? Y() : q), a("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
|
|
718
718
|
};
|
|
719
|
-
return n({ resetCacheGroups: g }), (t, n) => (
|
|
719
|
+
return n({ resetCacheGroups: g }), (t, n) => (I(), E(b, {
|
|
720
720
|
ref_key: "refSelector",
|
|
721
721
|
ref: f,
|
|
722
722
|
class: "top-groupSelector_group",
|
|
@@ -725,51 +725,51 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
725
725
|
items: p.value ?? e.groups,
|
|
726
726
|
searchType: "inline",
|
|
727
727
|
icon: e.addIcon ? "" : void 0,
|
|
728
|
-
api: e.groups ? void 0 :
|
|
729
|
-
apiSetSearchParams: (...e) =>
|
|
728
|
+
api: e.groups ? void 0 : B(c),
|
|
729
|
+
apiSetSearchParams: (...e) => B(x)(...e, "name"),
|
|
730
730
|
appendSearchToResult: !!e.canAdd,
|
|
731
|
-
useAllItem: e.canSelectAll ?
|
|
731
|
+
useAllItem: e.canSelectAll ? B(Y)().name : !1,
|
|
732
732
|
addChanger: e.addChanger,
|
|
733
733
|
useCache: "",
|
|
734
734
|
onAppendItem: v
|
|
735
|
-
},
|
|
736
|
-
item:
|
|
737
|
-
n.id ===
|
|
738
|
-
|
|
735
|
+
}, A({
|
|
736
|
+
item: U(({ item: n }) => [k("div", Ze, [
|
|
737
|
+
n.id === B(null) ? (I(), O("div", Qe, z(t.$i18n.Common.Add) + ": ", 1)) : D("", !0),
|
|
738
|
+
k("span", {
|
|
739
739
|
class: "top-groupSelector_groupItemName top-ellipsis1",
|
|
740
740
|
innerHTML: n.name
|
|
741
|
-
}, null, 8,
|
|
742
|
-
n.folder_path && e.showPath ? (
|
|
741
|
+
}, null, 8, $e),
|
|
742
|
+
n.folder_path && e.showPath ? (I(), O("span", {
|
|
743
743
|
key: 1,
|
|
744
744
|
class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
|
|
745
745
|
innerHTML: n.folder_path
|
|
746
|
-
}, null, 8,
|
|
746
|
+
}, null, 8, et)) : D("", !0)
|
|
747
747
|
])]),
|
|
748
748
|
_: 2
|
|
749
749
|
}, [e.canEditAndDel && e.client ? {
|
|
750
750
|
name: "actions",
|
|
751
|
-
fn:
|
|
751
|
+
fn: U(({ item: r }) => [r.id ? (I(), O(w, { key: 0 }, [M(_, {
|
|
752
752
|
submitText: t.$i18n.Common.Save,
|
|
753
753
|
defaultValue: r.name,
|
|
754
754
|
inputProps: { addCleaner: !1 },
|
|
755
|
-
onSubmit: (e) =>
|
|
755
|
+
onSubmit: (e) => y(r, e)
|
|
756
756
|
}, {
|
|
757
|
-
opener:
|
|
758
|
-
default:
|
|
757
|
+
opener: U(() => [...n[1] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
|
|
758
|
+
default: U(() => [...n[2] ||= []]),
|
|
759
759
|
_: 1
|
|
760
760
|
}, 8, [
|
|
761
761
|
"submitText",
|
|
762
762
|
"defaultValue",
|
|
763
763
|
"onSubmit"
|
|
764
|
-
]),
|
|
764
|
+
]), M(ee, {
|
|
765
765
|
isWarning: "",
|
|
766
766
|
submitText: t.$i18n.Common.Delete,
|
|
767
|
-
onSubmit: (e) =>
|
|
767
|
+
onSubmit: (e) => S(r)
|
|
768
768
|
}, {
|
|
769
|
-
opener:
|
|
770
|
-
default:
|
|
769
|
+
opener: U(() => [...n[3] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
|
|
770
|
+
default: U(() => [k("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n["Ai.Tracker"].Delete_group_warning }, null, 8, tt)]),
|
|
771
771
|
_: 1
|
|
772
|
-
}, 8, ["submitText", "onSubmit"])], 64)) :
|
|
772
|
+
}, 8, ["submitText", "onSubmit"])], 64)) : D("", !0)]),
|
|
773
773
|
key: "0"
|
|
774
774
|
} : void 0]), 1032, [
|
|
775
775
|
"modelValue",
|
|
@@ -782,9 +782,9 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
782
782
|
"addChanger"
|
|
783
783
|
]));
|
|
784
784
|
}
|
|
785
|
-
}),
|
|
785
|
+
}), rt = { class: "top-groupSelector" }, it = /* @__PURE__ */ N({
|
|
786
786
|
__name: "groupSelector",
|
|
787
|
-
props: /*@__PURE__*/
|
|
787
|
+
props: /*@__PURE__*/ P({
|
|
788
788
|
folderId: {},
|
|
789
789
|
folder: {},
|
|
790
790
|
groupId: {},
|
|
@@ -829,20 +829,20 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
829
829
|
folderModifiers: {},
|
|
830
830
|
groupId: { required: !0 },
|
|
831
831
|
groupIdModifiers: {},
|
|
832
|
-
group: { default:
|
|
832
|
+
group: { default: q },
|
|
833
833
|
groupModifiers: {}
|
|
834
834
|
}),
|
|
835
|
-
emits: /*@__PURE__*/
|
|
835
|
+
emits: /*@__PURE__*/ P(["update:groups"], [
|
|
836
836
|
"update:folderId",
|
|
837
837
|
"update:folder",
|
|
838
838
|
"update:groupId",
|
|
839
839
|
"update:group"
|
|
840
840
|
]),
|
|
841
841
|
setup(e, { expose: t, emit: n }) {
|
|
842
|
-
let r = e, i =
|
|
843
|
-
o.value =
|
|
842
|
+
let r = e, i = L(null), a = V(e, "folderId"), o = V(e, "folder"), s = V(e, "groupId"), c = V(e, "group"), l = n;
|
|
843
|
+
o.value = Be(r.folders ?? { root: [K] }, r.canSelectAllGroups).get(a.value);
|
|
844
844
|
let u = r.groups?.find((e) => e.id === s.value);
|
|
845
|
-
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u =
|
|
845
|
+
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = Y()), (r.autoselect === "placeholder" || !u) && (u = Ge()), u ??= q, c.value = u;
|
|
846
846
|
let d = (e) => {
|
|
847
847
|
let t;
|
|
848
848
|
r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
|
|
@@ -868,7 +868,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
868
868
|
};
|
|
869
869
|
return t({ resetCacheGroups: (e = !1) => {
|
|
870
870
|
i.value?.resetCacheGroups(e);
|
|
871
|
-
} }), (t, n) => (
|
|
871
|
+
} }), (t, n) => (I(), O("div", rt, [e.showFolders ? (I(), E(We, {
|
|
872
872
|
key: 0,
|
|
873
873
|
folderId: a.value,
|
|
874
874
|
"onUpdate:folderId": n[0] ||= (e) => a.value = e,
|
|
@@ -891,7 +891,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
891
891
|
"addIcon",
|
|
892
892
|
"client",
|
|
893
893
|
"service"
|
|
894
|
-
])) :
|
|
894
|
+
])) : D("", !0), e.showGroups ? (I(), E(nt, {
|
|
895
895
|
key: 1,
|
|
896
896
|
ref_key: "componentGroupsRef",
|
|
897
897
|
ref: i,
|
|
@@ -931,46 +931,42 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
931
931
|
"addIcon",
|
|
932
932
|
"client",
|
|
933
933
|
"service"
|
|
934
|
-
])) :
|
|
934
|
+
])) : D("", !0)]));
|
|
935
935
|
}
|
|
936
|
-
}),
|
|
936
|
+
}), at = (e) => ({
|
|
937
937
|
id: null,
|
|
938
938
|
name: e,
|
|
939
939
|
listItemProps: {
|
|
940
940
|
type: "title",
|
|
941
941
|
class: "top-projectSelector_item"
|
|
942
942
|
}
|
|
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 ? {
|
|
943
|
+
}), ot = (e) => {
|
|
944
|
+
let t = [], r = {
|
|
945
|
+
scheduledUpdate: at(n().Projects.Scheduled_update),
|
|
946
|
+
manualUpdate: at(n().Projects.Manual_update),
|
|
947
|
+
guestProjects: at(n().Projects.Guest_projects)
|
|
948
|
+
}, i = {
|
|
953
949
|
scheduledUpdate: !1,
|
|
954
950
|
manualUpdate: !1,
|
|
955
951
|
guestProjects: !1
|
|
956
|
-
}
|
|
957
|
-
for (let
|
|
958
|
-
return
|
|
959
|
-
},
|
|
952
|
+
};
|
|
953
|
+
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);
|
|
954
|
+
return t;
|
|
955
|
+
}, st = (e) => ({
|
|
960
956
|
...e,
|
|
961
|
-
externalLink:
|
|
957
|
+
externalLink: pt(e.url ?? ""),
|
|
962
958
|
listItemProps: {
|
|
963
959
|
class: "top-projectSelector_item",
|
|
964
960
|
attrs: { title: e.name }
|
|
965
961
|
}
|
|
966
|
-
}),
|
|
962
|
+
}), ct = (e) => !e || e.length === 0 ? [] : ot(e.map(st)), lt = (e) => {
|
|
967
963
|
e = e.replace(/#.*/, "");
|
|
968
964
|
let t = location.hash;
|
|
969
965
|
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 =
|
|
966
|
+
}, ut = (e) => {
|
|
967
|
+
location.href = dt(e);
|
|
968
|
+
}, dt = (e) => {
|
|
969
|
+
let t = ft(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
|
|
974
970
|
n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
|
|
975
971
|
"watcher",
|
|
976
972
|
"indexing",
|
|
@@ -980,16 +976,16 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
980
976
|
"adwords"
|
|
981
977
|
].includes(n[4]) && (i = n[4] + "/");
|
|
982
978
|
let a = "https://" + t + "/" + r + e + "/" + i;
|
|
983
|
-
return a =
|
|
984
|
-
},
|
|
979
|
+
return a = lt(a), a;
|
|
980
|
+
}, ft = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, pt = (e) => {
|
|
985
981
|
let t = e.startsWith("http") ? e : "https://" + e;
|
|
986
982
|
return t = t.replace(/"/g, "%22"), t;
|
|
987
|
-
},
|
|
983
|
+
}, mt = (e, n) => {
|
|
988
984
|
let r = e.params.filters ?? [];
|
|
989
985
|
r = r.filter((e) => e.name !== "GEN_SEARCH_STRING()");
|
|
990
986
|
let i = h(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
|
|
991
987
|
n && r.push(t("GEN_SEARCH_STRING()", "REGEXP", [`(${a}|${o})`])), e.changeParams({ filters: r });
|
|
992
|
-
},
|
|
988
|
+
}, ht = (n) => {
|
|
993
989
|
let i = n.gen("/get/projects_2/projects/", [
|
|
994
990
|
"id",
|
|
995
991
|
"user_id",
|
|
@@ -1007,15 +1003,12 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1007
1003
|
e("ord", "ASC"),
|
|
1008
1004
|
e("id", "DESC")
|
|
1009
1005
|
]
|
|
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({
|
|
1006
|
+
}), i.options.loadingShowSpinner = !1, i;
|
|
1007
|
+
}, gt = (e) => e.gen("/add/projects_2/projects/"), _t = { class: "top-ellipsis1" }, vt = /* @__PURE__ */ N({
|
|
1015
1008
|
__name: "submenu",
|
|
1016
1009
|
props: { id: {} },
|
|
1017
1010
|
setup(e) {
|
|
1018
|
-
let t = e, i = n(), a =
|
|
1011
|
+
let t = e, i = n(), a = ft(), o = (e) => {
|
|
1019
1012
|
let t = [
|
|
1020
1013
|
{
|
|
1021
1014
|
href: `https://${a}/project/keywords/${e.id}/`,
|
|
@@ -1092,67 +1085,60 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1092
1085
|
].filter((e) => !Object.entries(r.state.closedByMod).some(([t, n]) => n && e.href.includes(`/${t}/`)));
|
|
1093
1086
|
return e.right.includes("0") ? t.filter((t) => e.right[t.right] === "1") : t;
|
|
1094
1087
|
};
|
|
1095
|
-
return (e, n) => (
|
|
1088
|
+
return (e, n) => (I(), E(B(y), {
|
|
1096
1089
|
id: t.id,
|
|
1097
1090
|
class: "top-projectSelectorSubmenu",
|
|
1098
1091
|
notch: !1,
|
|
1099
1092
|
pos: "2"
|
|
1100
1093
|
}, {
|
|
1101
|
-
contentList:
|
|
1094
|
+
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
1095
|
href: t.href,
|
|
1103
1096
|
title: t.title,
|
|
1104
1097
|
"data-top-icon": t.icon,
|
|
1105
1098
|
"data-right": t.right
|
|
1106
1099
|
}, {
|
|
1107
|
-
default:
|
|
1100
|
+
default: U(() => [j(z(e.$core.state.isMobile ? t.title : ""), 1)]),
|
|
1108
1101
|
_: 2
|
|
1109
1102
|
}, 1032, [
|
|
1110
1103
|
"href",
|
|
1111
1104
|
"title",
|
|
1112
1105
|
"data-top-icon",
|
|
1113
1106
|
"data-right"
|
|
1114
|
-
]))), 256)),
|
|
1107
|
+
]))), 256)), M(B(v), {
|
|
1115
1108
|
href: t.projectItem.externalLink,
|
|
1116
1109
|
title: t.projectItem.externalLink,
|
|
1117
1110
|
class: "top-ellipsis",
|
|
1118
1111
|
"data-top-icon": "",
|
|
1119
1112
|
target: "_blank"
|
|
1120
1113
|
}, {
|
|
1121
|
-
default:
|
|
1114
|
+
default: U(() => [k("span", _t, z(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
|
|
1122
1115
|
_: 2
|
|
1123
|
-
}, 1032, ["href", "title"])], 64)) :
|
|
1116
|
+
}, 1032, ["href", "title"])], 64)) : D("", !0)]),
|
|
1124
1117
|
_: 1
|
|
1125
1118
|
}, 8, ["id"]));
|
|
1126
1119
|
}
|
|
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({
|
|
1120
|
+
}), X = "ui_project_selector_total", yt = 864e5, bt = L(null), Z = ue(), xt = (e) => {
|
|
1121
|
+
localStorage.setItem(X + ":" + r.state.userId, JSON.stringify({
|
|
1136
1122
|
projectsTotal: e,
|
|
1137
|
-
expiresAt: Date.now() +
|
|
1123
|
+
expiresAt: Date.now() + yt
|
|
1138
1124
|
}));
|
|
1139
|
-
},
|
|
1140
|
-
let e = localStorage.getItem(
|
|
1125
|
+
}, St = () => {
|
|
1126
|
+
let e = localStorage.getItem(X + ":" + r.state.userId);
|
|
1141
1127
|
if (!e) return;
|
|
1142
1128
|
let { projectsTotal: t, expiresAt: n } = JSON.parse(e);
|
|
1143
1129
|
if (Date.now() > n) {
|
|
1144
|
-
localStorage.removeItem(
|
|
1130
|
+
localStorage.removeItem(X + ":" + r.state.userId);
|
|
1145
1131
|
return;
|
|
1146
1132
|
}
|
|
1147
1133
|
return t;
|
|
1148
|
-
},
|
|
1149
|
-
|
|
1150
|
-
},
|
|
1134
|
+
}, Ct = () => {
|
|
1135
|
+
bt.value = null, Z.value = void 0, localStorage.removeItem(X + ":" + r.state.userId), S("/get/projects_2/projects/");
|
|
1136
|
+
}, wt = { class: "top-projectSelector_itemText" }, Tt = { class: "top-comment" }, Et = {
|
|
1151
1137
|
key: 0,
|
|
1152
1138
|
class: "top-comment"
|
|
1153
|
-
},
|
|
1139
|
+
}, Dt = ["href"], Ot = 1e3, kt = /* @__PURE__ */ N({
|
|
1154
1140
|
__name: "projectSelector",
|
|
1155
|
-
props: /*@__PURE__*/
|
|
1141
|
+
props: /*@__PURE__*/ P({
|
|
1156
1142
|
modelValue: {},
|
|
1157
1143
|
client: {},
|
|
1158
1144
|
menuMode: { type: Boolean },
|
|
@@ -1172,65 +1158,85 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1172
1158
|
modelModifiers: {}
|
|
1173
1159
|
}),
|
|
1174
1160
|
emits: ["update:modelValue"],
|
|
1175
|
-
setup(e) {
|
|
1176
|
-
let
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
let
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1161
|
+
setup(e, { expose: t }) {
|
|
1162
|
+
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) => {
|
|
1163
|
+
let t = e.filter(v), n = e.filter((e) => !v(e));
|
|
1164
|
+
return [...ct(t), ...n];
|
|
1165
|
+
}, y = (e = !1) => {
|
|
1166
|
+
let t = Z.value && S.value === "static" ? Z.value : f.value?.getLoadedItems();
|
|
1167
|
+
if (!t) return null;
|
|
1168
|
+
let n = t.findIndex((e) => e.id === o.value.id);
|
|
1169
|
+
return n === -1 ? null : n === 0 && e ? !1 : t[n + (e ? -1 : 1)]?.id ?? null;
|
|
1170
|
+
}, x = async (e = !1) => {
|
|
1171
|
+
if (!f.value || m) return;
|
|
1172
|
+
if (S.value || await P(), S.value === "static" && !await A()) {
|
|
1173
|
+
m = !1;
|
|
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) => {
|
|
1191
|
+
let t = await c.changeParams({
|
|
1184
1192
|
url: e.name,
|
|
1185
1193
|
name: e.name
|
|
1186
1194
|
}).call();
|
|
1187
1195
|
if (!t.errors) {
|
|
1188
|
-
if (
|
|
1189
|
-
let n =
|
|
1196
|
+
if (Z.value && S.value === "static") {
|
|
1197
|
+
let n = {
|
|
1190
1198
|
id: t.result,
|
|
1191
1199
|
user_id: r.state.userId,
|
|
1192
1200
|
name: e.name,
|
|
1193
1201
|
url: e.name,
|
|
1194
1202
|
on: 0,
|
|
1195
1203
|
right: "11111111111111111111"
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
...
|
|
1204
|
+
}, i = Z.value.findIndex((e) => e.on === 0);
|
|
1205
|
+
Z.value = [
|
|
1206
|
+
...Z.value.slice(0, i),
|
|
1199
1207
|
n,
|
|
1200
|
-
...
|
|
1201
|
-
],
|
|
1208
|
+
...Z.value.slice(i)
|
|
1209
|
+
], l.value && (l.value += 1, xt(l.value));
|
|
1202
1210
|
}
|
|
1203
|
-
|
|
1211
|
+
S.value === "api" && f.value?.resetCache(!0);
|
|
1204
1212
|
}
|
|
1205
|
-
},
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
let e = l.value?.popupOpenerRef?.$el;
|
|
1212
|
-
e && e.addEventListener("pointerenter", () => y(), { once: !0 });
|
|
1213
|
+
}, te = async () => {
|
|
1214
|
+
S.value === "static" && await A();
|
|
1215
|
+
}, P = async () => {
|
|
1216
|
+
if (l.value) {
|
|
1217
|
+
let e = f.value?.popupOpenerRef?.$el;
|
|
1218
|
+
e && e.addEventListener("pointerenter", () => te(), { once: !0 });
|
|
1213
1219
|
} else {
|
|
1214
|
-
|
|
1215
|
-
let e = await
|
|
1220
|
+
s.changeParams({ limit: Ot });
|
|
1221
|
+
let e = await C();
|
|
1216
1222
|
if (e.errors) return;
|
|
1217
|
-
delete
|
|
1223
|
+
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
1224
|
}
|
|
1219
1225
|
};
|
|
1220
|
-
return
|
|
1221
|
-
await
|
|
1226
|
+
return t({ navigateToAdjacentProject: x }), ie(async () => {
|
|
1227
|
+
await P();
|
|
1222
1228
|
}), (t, n) => {
|
|
1223
|
-
let r =
|
|
1224
|
-
return
|
|
1225
|
-
key:
|
|
1229
|
+
let r = se("TopButton");
|
|
1230
|
+
return I(), O(w, null, [(I(), E(b, {
|
|
1231
|
+
key: S.value ?? "dummy",
|
|
1226
1232
|
ref_key: "refSelector",
|
|
1227
|
-
ref:
|
|
1233
|
+
ref: f,
|
|
1228
1234
|
class: "top-projectSelector",
|
|
1229
|
-
modelValue:
|
|
1230
|
-
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ?
|
|
1231
|
-
items:
|
|
1235
|
+
modelValue: o.value,
|
|
1236
|
+
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? B(ut)(t.id) : o.value = t,
|
|
1237
|
+
items: _.value,
|
|
1232
1238
|
itemsChunkSize: 100,
|
|
1233
|
-
itemsIsLoading:
|
|
1239
|
+
itemsIsLoading: S.value === "static" && B(Z) === void 0,
|
|
1234
1240
|
title: t.$i18n.Projects.Search_projects,
|
|
1235
1241
|
modificator: e.modificator,
|
|
1236
1242
|
searchFields: [
|
|
@@ -1238,52 +1244,53 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1238
1244
|
"name",
|
|
1239
1245
|
"url"
|
|
1240
1246
|
],
|
|
1241
|
-
placeholder:
|
|
1247
|
+
placeholder: h.value,
|
|
1242
1248
|
hasCloserBtn: "",
|
|
1243
|
-
api:
|
|
1244
|
-
apiSetSearchParams:
|
|
1249
|
+
api: S.value === "api" ? B(s) : void 0,
|
|
1250
|
+
apiSetSearchParams: S.value === "api" ? (...e) => B(mt)(...e) : void 0,
|
|
1245
1251
|
useCache: "",
|
|
1246
1252
|
appendSearchToResult: "",
|
|
1247
1253
|
appendSearchAllowDuplicate: "",
|
|
1248
|
-
appendSearchToResultCond:
|
|
1254
|
+
appendSearchToResultCond: B(u),
|
|
1249
1255
|
appendWithoutSelect: "",
|
|
1250
1256
|
buttonProps: {
|
|
1251
1257
|
...e.buttonProps,
|
|
1252
|
-
isProgress: !
|
|
1253
|
-
disabled: !
|
|
1258
|
+
isProgress: !S.value,
|
|
1259
|
+
disabled: !S.value
|
|
1254
1260
|
},
|
|
1255
1261
|
openerShortcut: e.openerShortcut,
|
|
1256
|
-
|
|
1257
|
-
|
|
1262
|
+
prepareItemsBeforeRender: S.value === "api" ? ee : void 0,
|
|
1263
|
+
onAppendItem: N,
|
|
1264
|
+
onOpen: te
|
|
1258
1265
|
}, {
|
|
1259
|
-
item:
|
|
1260
|
-
e.menuMode ? (
|
|
1266
|
+
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 }, [
|
|
1267
|
+
e.menuMode ? (I(), O("a", {
|
|
1261
1268
|
key: 0,
|
|
1262
1269
|
class: "top-projectSelector_itemLink",
|
|
1263
|
-
href:
|
|
1264
|
-
}, null, 8,
|
|
1265
|
-
t.$core.state.isMobile ?
|
|
1270
|
+
href: B(dt)(i.id)
|
|
1271
|
+
}, null, 8, Dt)) : D("", !0),
|
|
1272
|
+
t.$core.state.isMobile ? D("", !0) : (I(), E(r, {
|
|
1266
1273
|
key: 1,
|
|
1267
1274
|
href: i.externalLink,
|
|
1268
1275
|
"data-top-icon": "",
|
|
1269
1276
|
color: "theme",
|
|
1270
1277
|
target: "_blank",
|
|
1271
|
-
onClick: n[0] ||=
|
|
1278
|
+
onClick: n[0] ||= W(() => {}, ["stop"])
|
|
1272
1279
|
}, null, 8, ["href"])),
|
|
1273
|
-
|
|
1274
|
-
id:
|
|
1280
|
+
M(g, {
|
|
1281
|
+
id: B(p),
|
|
1275
1282
|
pos: "2",
|
|
1276
1283
|
notch: !1,
|
|
1277
1284
|
data: { projectItem: i }
|
|
1278
1285
|
}, {
|
|
1279
|
-
default:
|
|
1286
|
+
default: U(() => [M(r, {
|
|
1280
1287
|
class: "top-popup_listMore",
|
|
1281
1288
|
"data-top-icon": "",
|
|
1282
1289
|
color: "theme"
|
|
1283
1290
|
})]),
|
|
1284
1291
|
_: 1
|
|
1285
1292
|
}, 8, ["id", "data"])
|
|
1286
|
-
], 64)) :
|
|
1293
|
+
], 64)) : D("", !0)]),
|
|
1287
1294
|
_: 1
|
|
1288
1295
|
}, 8, [
|
|
1289
1296
|
"modelValue",
|
|
@@ -1296,76 +1303,45 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1296
1303
|
"apiSetSearchParams",
|
|
1297
1304
|
"appendSearchToResultCond",
|
|
1298
1305
|
"buttonProps",
|
|
1299
|
-
"openerShortcut"
|
|
1300
|
-
|
|
1306
|
+
"openerShortcut",
|
|
1307
|
+
"prepareItemsBeforeRender"
|
|
1308
|
+
])), M(vt, { id: B(p) }, null, 8, ["id"])], 64);
|
|
1301
1309
|
};
|
|
1302
1310
|
}
|
|
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);
|
|
1311
|
+
}), At = (e) => "-" + e, Q = (e) => e[0] === "-" ? e.substring(1) : e, jt = (e, t) => {
|
|
1312
|
+
e = Q(e);
|
|
1337
1313
|
let n = t.find((t) => t.id === e);
|
|
1338
1314
|
if (n) return n;
|
|
1339
|
-
},
|
|
1315
|
+
}, Mt = (e, t, n) => {
|
|
1340
1316
|
t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
|
|
1341
1317
|
let r = c.genElPopupOpener("div", t);
|
|
1342
1318
|
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
1319
|
t.preventDefault(), t.stopPropagation(), r.onclick = null;
|
|
1344
|
-
let i =
|
|
1320
|
+
let i = L(e.modelValue), a = {
|
|
1345
1321
|
model: i,
|
|
1346
1322
|
mode: e.mode,
|
|
1347
1323
|
targetId: e.targetId,
|
|
1348
1324
|
filters: e.filters,
|
|
1349
1325
|
payload: e.payload
|
|
1350
1326
|
};
|
|
1351
|
-
s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled,
|
|
1352
|
-
e.modelValue = i.value,
|
|
1327
|
+
s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, te(e.modelValue) || H(i, () => {
|
|
1328
|
+
e.modelValue = i.value, Pt(r, e, n);
|
|
1353
1329
|
}), r.click();
|
|
1354
|
-
},
|
|
1330
|
+
}, te(e.modelValue) ? H(e.modelValue, () => Pt(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
|
|
1355
1331
|
e.modelValue = t;
|
|
1356
1332
|
let i = s(r, "topTagSelectorTarget");
|
|
1357
|
-
i && (i.model.value = t),
|
|
1358
|
-
}),
|
|
1359
|
-
},
|
|
1333
|
+
i && (i.model.value = t), Pt(r, e, n);
|
|
1334
|
+
}), Pt(r, e, n), r;
|
|
1335
|
+
}, Nt = (e, t) => {
|
|
1360
1336
|
s(e, "topTagSelectorRender")?.(t);
|
|
1361
|
-
},
|
|
1362
|
-
let i =
|
|
1337
|
+
}, Pt = (e, t, r) => {
|
|
1338
|
+
let i = B(t.modelValue);
|
|
1363
1339
|
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
1340
|
e.innerHTML = `<div>${r}</div>`;
|
|
1365
1341
|
return;
|
|
1366
1342
|
}
|
|
1367
1343
|
if (e.innerHTML = "", !i.length && t.mode === "filter") {
|
|
1368
|
-
let t =
|
|
1344
|
+
let t = Ft({
|
|
1369
1345
|
id: "all",
|
|
1370
1346
|
colorId: "",
|
|
1371
1347
|
name: n().Common?.All_tags ?? "",
|
|
@@ -1374,18 +1350,18 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1374
1350
|
e.append(t);
|
|
1375
1351
|
}
|
|
1376
1352
|
i.forEach((n) => {
|
|
1377
|
-
let r =
|
|
1378
|
-
id:
|
|
1379
|
-
colorId:
|
|
1380
|
-
name:
|
|
1381
|
-
state:
|
|
1353
|
+
let r = Ft({
|
|
1354
|
+
id: Q(n),
|
|
1355
|
+
colorId: jt(n, t.tags)?.color_id ?? "",
|
|
1356
|
+
name: jt(n, t.tags)?.name ?? "",
|
|
1357
|
+
state: Q(n) === n ? "selected" : "excluded"
|
|
1382
1358
|
});
|
|
1383
1359
|
e.append(r);
|
|
1384
1360
|
});
|
|
1385
|
-
},
|
|
1361
|
+
}, Ft = (e) => {
|
|
1386
1362
|
let t = document.createElement("div");
|
|
1387
1363
|
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
|
-
},
|
|
1364
|
+
}, It = [
|
|
1389
1365
|
{
|
|
1390
1366
|
id: "1",
|
|
1391
1367
|
name: "Without Tag",
|
|
@@ -1436,11 +1412,11 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1436
1412
|
name: "Turquoise",
|
|
1437
1413
|
color_id: "10"
|
|
1438
1414
|
}
|
|
1439
|
-
],
|
|
1415
|
+
], Lt = [
|
|
1440
1416
|
"data-tag_id",
|
|
1441
1417
|
"data-tag_color_id",
|
|
1442
1418
|
"title"
|
|
1443
|
-
],
|
|
1419
|
+
], Rt = /* @__PURE__ */ N({
|
|
1444
1420
|
__name: "tagIcon",
|
|
1445
1421
|
props: {
|
|
1446
1422
|
id: {},
|
|
@@ -1449,8 +1425,8 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1449
1425
|
state: {}
|
|
1450
1426
|
},
|
|
1451
1427
|
setup(e) {
|
|
1452
|
-
return (t, n) => (
|
|
1453
|
-
class:
|
|
1428
|
+
return (t, n) => (I(), O("div", {
|
|
1429
|
+
class: F({
|
|
1454
1430
|
"top-tagSelector_tagIcon": !0,
|
|
1455
1431
|
"top-tagSelector-active": !!e.state,
|
|
1456
1432
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
@@ -1458,11 +1434,11 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1458
1434
|
"data-tag_id": e.id,
|
|
1459
1435
|
"data-tag_color_id": e.colorId,
|
|
1460
1436
|
title: e.name
|
|
1461
|
-
}, null, 10,
|
|
1437
|
+
}, null, 10, Lt));
|
|
1462
1438
|
}
|
|
1463
|
-
}),
|
|
1439
|
+
}), zt = ["contenteditable", "onKeydown"], Bt = /* @__PURE__ */ N({
|
|
1464
1440
|
__name: "tagPopupListItem",
|
|
1465
|
-
props: /*@__PURE__*/
|
|
1441
|
+
props: /*@__PURE__*/ P({
|
|
1466
1442
|
editable: { type: Boolean },
|
|
1467
1443
|
disabled: { type: Boolean },
|
|
1468
1444
|
canExclude: { type: Boolean },
|
|
@@ -1474,18 +1450,18 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1474
1450
|
name: { required: !0 },
|
|
1475
1451
|
nameModifiers: {}
|
|
1476
1452
|
}),
|
|
1477
|
-
emits: /*@__PURE__*/
|
|
1453
|
+
emits: /*@__PURE__*/ P([
|
|
1478
1454
|
"update:name",
|
|
1479
1455
|
"unselect",
|
|
1480
1456
|
"exclude",
|
|
1481
1457
|
"select"
|
|
1482
1458
|
], ["update:name"]),
|
|
1483
1459
|
setup(e, { emit: t }) {
|
|
1484
|
-
let n = e, r = t, i =
|
|
1460
|
+
let n = e, r = t, i = V(e, "name"), a = L(null), o = T(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
|
|
1485
1461
|
contenteditable: s.value,
|
|
1486
1462
|
onpaste: (e) => e.preventDefault()
|
|
1487
|
-
}), s =
|
|
1488
|
-
s.value = !0, await
|
|
1463
|
+
}), s = L(!1), c = async () => {
|
|
1464
|
+
s.value = !0, await re(), a.value?.focus();
|
|
1489
1465
|
}, l = () => {
|
|
1490
1466
|
let e = a.value?.innerText;
|
|
1491
1467
|
if (!e) return u();
|
|
@@ -1497,8 +1473,8 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1497
1473
|
let t = "selected";
|
|
1498
1474
|
n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
|
|
1499
1475
|
};
|
|
1500
|
-
return (t, n) => (
|
|
1501
|
-
class:
|
|
1476
|
+
return (t, n) => (I(), E(v, {
|
|
1477
|
+
class: F({
|
|
1502
1478
|
"top-tagSelector_tagListItem": !0,
|
|
1503
1479
|
"top-tagSelector_tagListItem-inEdit": s.value,
|
|
1504
1480
|
"top-tagSelector_tagListItem-disabled": e.disabled,
|
|
@@ -1506,10 +1482,10 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1506
1482
|
"top-tagSelector-active": !!e.state,
|
|
1507
1483
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
1508
1484
|
}),
|
|
1509
|
-
onClick:
|
|
1485
|
+
onClick: W(d, ["stop"])
|
|
1510
1486
|
}, {
|
|
1511
|
-
default:
|
|
1512
|
-
|
|
1487
|
+
default: U(() => [
|
|
1488
|
+
M(Rt, {
|
|
1513
1489
|
id: e.id,
|
|
1514
1490
|
name: i.value,
|
|
1515
1491
|
colorId: e.colorId,
|
|
@@ -1520,31 +1496,31 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1520
1496
|
"colorId",
|
|
1521
1497
|
"state"
|
|
1522
1498
|
]),
|
|
1523
|
-
|
|
1499
|
+
k("span", ne({
|
|
1524
1500
|
ref_key: "elName",
|
|
1525
1501
|
ref: a,
|
|
1526
1502
|
class: "top-tagSelector_tagListItemName",
|
|
1527
1503
|
contenteditable: s.value ? "plaintext-only" : !1
|
|
1528
|
-
}, o.value, { onKeydown: [
|
|
1529
|
-
e.editable ? (
|
|
1504
|
+
}, o.value, { onKeydown: [me(W(l, ["stop"]), ["enter"]), me(W(u, ["stop"]), ["esc"])] }), z(i.value), 17, zt),
|
|
1505
|
+
e.editable ? (I(), O(w, { key: 0 }, [s.value ? (I(), O("span", {
|
|
1530
1506
|
key: 1,
|
|
1531
1507
|
"data-top-icon": "",
|
|
1532
1508
|
class: "top-tagSelector_edit",
|
|
1533
|
-
onClick:
|
|
1534
|
-
})) : (
|
|
1509
|
+
onClick: W(l, ["stop"])
|
|
1510
|
+
})) : (I(), O("span", {
|
|
1535
1511
|
key: 0,
|
|
1536
1512
|
"data-top-icon": "",
|
|
1537
1513
|
class: "top-tagSelector_edit",
|
|
1538
1514
|
onClick: c
|
|
1539
|
-
}))], 64)) :
|
|
1515
|
+
}))], 64)) : D("", !0)
|
|
1540
1516
|
]),
|
|
1541
1517
|
_: 1
|
|
1542
1518
|
}, 8, ["class"]));
|
|
1543
1519
|
}
|
|
1544
|
-
}),
|
|
1520
|
+
}), Vt = { key: 1 }, Ht = /* @__PURE__ */ N({
|
|
1545
1521
|
inheritAttrs: !1,
|
|
1546
1522
|
__name: "popupOpener",
|
|
1547
|
-
props: /*@__PURE__*/
|
|
1523
|
+
props: /*@__PURE__*/ P({
|
|
1548
1524
|
modelValue: {},
|
|
1549
1525
|
id: {},
|
|
1550
1526
|
tags: {},
|
|
@@ -1560,7 +1536,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1560
1536
|
}),
|
|
1561
1537
|
emits: ["update:modelValue"],
|
|
1562
1538
|
setup(e, { attrs: t }) {
|
|
1563
|
-
let n = e, r =
|
|
1539
|
+
let n = e, r = V(e, "modelValue"), i = n.useTopButton ? a : "div", o = n.useTopButton ? "html" : "default", s = {
|
|
1564
1540
|
model: r,
|
|
1565
1541
|
mode: n.mode,
|
|
1566
1542
|
targetId: n.targetId,
|
|
@@ -1568,9 +1544,9 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1568
1544
|
payload: n.payload
|
|
1569
1545
|
};
|
|
1570
1546
|
return (a, c) => {
|
|
1571
|
-
let l =
|
|
1572
|
-
return
|
|
1573
|
-
default:
|
|
1547
|
+
let l = ce("top-data");
|
|
1548
|
+
return I(), E(g, { id: e.id }, {
|
|
1549
|
+
default: U(() => [pe((I(), E(le(B(i)), ne({
|
|
1574
1550
|
class: {
|
|
1575
1551
|
"top-tagSelector": !0,
|
|
1576
1552
|
"top-tagSelector-useTopButton": n.useTopButton,
|
|
@@ -1585,17 +1561,17 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1585
1561
|
color: "theme",
|
|
1586
1562
|
styling: e.styling
|
|
1587
1563
|
}, t), {
|
|
1588
|
-
[
|
|
1564
|
+
[B(o)]: U(() => [!r.value.length && e.mode === "filter" ? (I(), E(Rt, {
|
|
1589
1565
|
key: 0,
|
|
1590
1566
|
id: "all",
|
|
1591
1567
|
colorId: "",
|
|
1592
1568
|
name: a.$i18n.Common.All_tags ?? "",
|
|
1593
1569
|
state: ""
|
|
1594
|
-
}, null, 8, ["name"])) :
|
|
1595
|
-
id:
|
|
1596
|
-
colorId:
|
|
1597
|
-
name:
|
|
1598
|
-
state:
|
|
1570
|
+
}, 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, {
|
|
1571
|
+
id: B(Q)(t),
|
|
1572
|
+
colorId: B(jt)(t, e.tags)?.color_id ?? "",
|
|
1573
|
+
name: B(jt)(t, e.tags)?.name ?? "",
|
|
1574
|
+
state: B(Q)(t) === t ? "selected" : "excluded"
|
|
1599
1575
|
}, null, 8, [
|
|
1600
1576
|
"id",
|
|
1601
1577
|
"colorId",
|
|
@@ -1612,9 +1588,9 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1612
1588
|
}, 8, ["id"]);
|
|
1613
1589
|
};
|
|
1614
1590
|
}
|
|
1615
|
-
}),
|
|
1591
|
+
}), Ut = /* @__PURE__ */ N({
|
|
1616
1592
|
__name: "tagSelector",
|
|
1617
|
-
props: /*@__PURE__*/
|
|
1593
|
+
props: /*@__PURE__*/ P({
|
|
1618
1594
|
modelValue: {},
|
|
1619
1595
|
tags: {},
|
|
1620
1596
|
tagsEditable: { type: Boolean },
|
|
@@ -1635,20 +1611,20 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1635
1611
|
}, {
|
|
1636
1612
|
modelValue: { required: !0 },
|
|
1637
1613
|
modelModifiers: {},
|
|
1638
|
-
tags: { default:
|
|
1614
|
+
tags: { default: ae(It) },
|
|
1639
1615
|
tagsModifiers: {}
|
|
1640
1616
|
}),
|
|
1641
|
-
emits: /*@__PURE__*/
|
|
1617
|
+
emits: /*@__PURE__*/ P([
|
|
1642
1618
|
"selector",
|
|
1643
1619
|
"setter",
|
|
1644
1620
|
"tagsChanged"
|
|
1645
1621
|
], ["update:modelValue", "update:tags"]),
|
|
1646
1622
|
setup(e, { emit: t }) {
|
|
1647
|
-
let c = n(), l = e, u =
|
|
1623
|
+
let c = n(), l = e, u = V(e, "modelValue"), d = V(e, "tags"), f = t, p = i((e, t) => {
|
|
1648
1624
|
f(e, t);
|
|
1649
1625
|
}, l.emitDelay);
|
|
1650
1626
|
l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
|
|
1651
|
-
let m = l.id ?? "top-popup-id-" + Math.random(), h =
|
|
1627
|
+
let m = l.id ?? "top-popup-id-" + Math.random(), h = L("add"), g = () => {
|
|
1652
1628
|
let e = " " + c.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
|
|
1653
1629
|
return t.set("add", {
|
|
1654
1630
|
value: "add",
|
|
@@ -1660,35 +1636,35 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1660
1636
|
value: "delete",
|
|
1661
1637
|
title: c.Common.Delete + e
|
|
1662
1638
|
}), t;
|
|
1663
|
-
}, _ =
|
|
1639
|
+
}, _ = ue({
|
|
1664
1640
|
model: u,
|
|
1665
1641
|
mode: "filter",
|
|
1666
1642
|
targetId: void 0,
|
|
1667
1643
|
filters: void 0,
|
|
1668
1644
|
payload: void 0
|
|
1669
1645
|
});
|
|
1670
|
-
|
|
1646
|
+
H(u, () => {
|
|
1671
1647
|
p("selector", u.value);
|
|
1672
1648
|
});
|
|
1673
|
-
let
|
|
1649
|
+
let ee = T(() => {
|
|
1674
1650
|
if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
|
|
1675
|
-
}),
|
|
1651
|
+
}), b = (e) => {
|
|
1676
1652
|
if (e !== "all") {
|
|
1677
1653
|
if (_.value.model.value.includes(e)) return "selected";
|
|
1678
|
-
if (_.value.model.value.includes(
|
|
1654
|
+
if (_.value.model.value.includes(At(e))) return "excluded";
|
|
1679
1655
|
}
|
|
1680
1656
|
return e === "all" && !_.value.model.value.length ? "selected" : "";
|
|
1681
|
-
},
|
|
1682
|
-
let n =
|
|
1657
|
+
}, x = (e, t) => {
|
|
1658
|
+
let n = At(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
|
|
1683
1659
|
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
1660
|
tagsIds: r,
|
|
1685
1661
|
targetId: _.value.targetId,
|
|
1686
1662
|
payload: _.value.payload
|
|
1687
1663
|
});
|
|
1688
|
-
},
|
|
1664
|
+
}, S = T(() => {
|
|
1689
1665
|
let e = "top-tagSelector_popup";
|
|
1690
1666
|
return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
|
|
1691
|
-
}),
|
|
1667
|
+
}), C = () => {
|
|
1692
1668
|
let e = prompt("", "New tag");
|
|
1693
1669
|
if (!e || e === "New tag") return;
|
|
1694
1670
|
let t = d.value.length + 1;
|
|
@@ -1697,7 +1673,7 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1697
1673
|
name: e,
|
|
1698
1674
|
color_id: String((t - 1) % 10 + 1)
|
|
1699
1675
|
}), f("tagsChanged", d.value);
|
|
1700
|
-
},
|
|
1676
|
+
}, k = (e) => {
|
|
1701
1677
|
if (_.value = s(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1702
1678
|
if (_.value.filters && (h.value = "add", _.value.model.value = []), !r.$?.ui.sortable) {
|
|
1703
1679
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
@@ -1717,13 +1693,13 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1717
1693
|
}), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
|
|
1718
1694
|
}
|
|
1719
1695
|
});
|
|
1720
|
-
},
|
|
1696
|
+
}, N = (e) => {
|
|
1721
1697
|
r.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
|
|
1722
1698
|
};
|
|
1723
|
-
return (t, n) => (
|
|
1699
|
+
return (t, n) => (I(), O(w, null, [M(Ht, {
|
|
1724
1700
|
modelValue: u.value,
|
|
1725
1701
|
"onUpdate:modelValue": n[0] ||= (e) => u.value = e,
|
|
1726
|
-
id:
|
|
1702
|
+
id: B(m),
|
|
1727
1703
|
tags: d.value,
|
|
1728
1704
|
styling: e.styling,
|
|
1729
1705
|
mode: "filter",
|
|
@@ -1734,36 +1710,36 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1734
1710
|
"tags",
|
|
1735
1711
|
"styling",
|
|
1736
1712
|
"useTopButton"
|
|
1737
|
-
]),
|
|
1738
|
-
id:
|
|
1739
|
-
class:
|
|
1740
|
-
onOpen: n[4] ||= (e) =>
|
|
1741
|
-
onClose: n[5] ||= (e) =>
|
|
1713
|
+
]), M(y, {
|
|
1714
|
+
id: B(m),
|
|
1715
|
+
class: F(S.value),
|
|
1716
|
+
onOpen: n[4] ||= (e) => k(e),
|
|
1717
|
+
onClose: n[5] ||= (e) => N(e),
|
|
1742
1718
|
"transition-duration": 50
|
|
1743
|
-
},
|
|
1744
|
-
contentList:
|
|
1745
|
-
_.value.mode === "filter" && !e.singleMode ? (
|
|
1719
|
+
}, A({
|
|
1720
|
+
contentList: U(() => [
|
|
1721
|
+
_.value.mode === "filter" && !e.singleMode ? (I(), E(Bt, {
|
|
1746
1722
|
key: 0,
|
|
1747
1723
|
id: "all",
|
|
1748
1724
|
colorId: "",
|
|
1749
1725
|
name: t.$i18n.Common.All_tags ?? "",
|
|
1750
1726
|
state: _.value.model.value.length ? "" : "selected",
|
|
1751
1727
|
onSelect: n[3] ||= (e) => _.value.model.value = []
|
|
1752
|
-
}, null, 8, ["name", "state"])) :
|
|
1753
|
-
(
|
|
1728
|
+
}, null, 8, ["name", "state"])) : D("", !0),
|
|
1729
|
+
(I(!0), O(w, null, R(d.value, (t) => (I(), E(Bt, {
|
|
1754
1730
|
key: t.id,
|
|
1755
1731
|
id: t.id,
|
|
1756
1732
|
colorId: t.color_id,
|
|
1757
1733
|
name: t.name,
|
|
1758
|
-
state:
|
|
1734
|
+
state: b(t.id),
|
|
1759
1735
|
canExclude: _.value.mode === "filter" && !e.singleMode,
|
|
1760
1736
|
editable: e.tagsEditable,
|
|
1761
|
-
disabled:
|
|
1762
|
-
onUnselect: (e) =>
|
|
1763
|
-
onSelect: (e) =>
|
|
1764
|
-
onExclude: (e) =>
|
|
1737
|
+
disabled: ee.value && b(t.id) === "",
|
|
1738
|
+
onUnselect: (e) => x(t.id, "unselect"),
|
|
1739
|
+
onSelect: (e) => x(t.id, "select"),
|
|
1740
|
+
onExclude: (e) => x(t.id, "exclude"),
|
|
1765
1741
|
"onUpdate:name": (e) => {
|
|
1766
|
-
t.name = e,
|
|
1742
|
+
t.name = e, B(p)("tagsChanged", d.value);
|
|
1767
1743
|
}
|
|
1768
1744
|
}, null, 8, [
|
|
1769
1745
|
"id",
|
|
@@ -1778,19 +1754,19 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1778
1754
|
"onExclude",
|
|
1779
1755
|
"onUpdate:name"
|
|
1780
1756
|
]))), 128)),
|
|
1781
|
-
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (
|
|
1757
|
+
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (I(), E(v, {
|
|
1782
1758
|
key: 1,
|
|
1783
1759
|
"data-top-icon": "",
|
|
1784
|
-
onClick:
|
|
1760
|
+
onClick: W(C, ["stop"])
|
|
1785
1761
|
}, {
|
|
1786
|
-
default:
|
|
1762
|
+
default: U(() => [j(z(t.$i18n.Common.Add), 1)]),
|
|
1787
1763
|
_: 1
|
|
1788
|
-
})) :
|
|
1764
|
+
})) : D("", !0)
|
|
1789
1765
|
]),
|
|
1790
1766
|
_: 2
|
|
1791
1767
|
}, [_.value.mode === "setter" && _.value.filters ? {
|
|
1792
1768
|
name: "header",
|
|
1793
|
-
fn:
|
|
1769
|
+
fn: U(() => [M(o, {
|
|
1794
1770
|
modelValue: h.value,
|
|
1795
1771
|
"onUpdate:modelValue": n[1] ||= (e) => h.value = e,
|
|
1796
1772
|
options: g()
|
|
@@ -1798,16 +1774,16 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1798
1774
|
key: "0"
|
|
1799
1775
|
} : void 0, _.value.mode === "setter" && _.value.filters ? {
|
|
1800
1776
|
name: "footer",
|
|
1801
|
-
fn:
|
|
1802
|
-
default:
|
|
1777
|
+
fn: U(() => [M(a, { color: "theme" }, {
|
|
1778
|
+
default: U(() => [j(z(t.$i18n.Common.Cancel), 1)]),
|
|
1803
1779
|
_: 1
|
|
1804
|
-
}),
|
|
1780
|
+
}), M(a, { onClick: n[2] ||= (e) => B(p)("setter", {
|
|
1805
1781
|
tagsIds: _.value.model.value,
|
|
1806
1782
|
filters: _.value.filters,
|
|
1807
1783
|
filtersAction: h.value,
|
|
1808
1784
|
payload: _.value.payload
|
|
1809
1785
|
}) }, {
|
|
1810
|
-
default:
|
|
1786
|
+
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
1787
|
_: 1
|
|
1812
1788
|
})]),
|
|
1813
1789
|
key: "1"
|
|
@@ -1815,6 +1791,6 @@ var Ge = ["innerHTML"], Ke = /* @__PURE__ */ j({
|
|
|
1815
1791
|
}
|
|
1816
1792
|
});
|
|
1817
1793
|
//#endregion
|
|
1818
|
-
export {
|
|
1794
|
+
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
1795
|
|
|
1820
1796
|
//# sourceMappingURL=project.js.map
|