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