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