@topvisor/ui 1.5.4-3 → 1.5.4-groupSelector.1
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/package.json +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +414 -402
- package/project/project.js.map +1 -1
- package/src/components/project/groupSelector/groupSelector.vue.d.ts +175 -5
- package/src/components/project/groupSelector/groups/groups.vue.d.ts +3 -1
package/project/project.js
CHANGED
|
@@ -16,14 +16,14 @@ import { ellipsis as u } from "../utils/string.js";
|
|
|
16
16
|
import { t as d } from "../.chunks/utils-DrvuXyXl.esm.js";
|
|
17
17
|
import { getDeviceGIcon as f, getLangLabel as p, getSearcherGIcon as m } from "../utils/searchers.js";
|
|
18
18
|
import { invertKeyboardLayout as h } from "../utils/keyboard.js";
|
|
19
|
-
import { c as g, n as _, o as v, r as ee, s as
|
|
20
|
-
import { d as
|
|
19
|
+
import { c as g, n as _, o as v, r as ee, s as y } from "../.chunks/popup-DHCqvZzI.esm.js";
|
|
20
|
+
import { d as b, s as x, u as te } from "../.chunks/formsExt-Ck5q-jXI.esm.js";
|
|
21
21
|
import "../popup/worker.js";
|
|
22
|
-
import { Fragment as
|
|
22
|
+
import { Fragment as S, computed as C, createBlock as w, createCommentVNode as T, createElementBlock as E, createElementVNode as D, createSlots as ne, createTextVNode as O, createVNode as k, defineComponent as A, isRef as j, mergeModels as M, mergeProps as re, nextTick as ie, normalizeClass as N, onMounted as ae, openBlock as P, reactive as oe, ref as F, renderList as I, renderSlot as se, resolveComponent as ce, resolveDirective as le, resolveDynamicComponent as ue, shallowRef as de, toDisplayString as L, toValue as fe, unref as R, useModel as z, watch as B, withCtx as V, withDirectives as pe, withKeys as me, withModifiers as H } from "vue";
|
|
23
23
|
//#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
|
|
24
|
-
var
|
|
24
|
+
var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _e = /* @__PURE__ */ A({
|
|
25
25
|
__name: "competitorSelector",
|
|
26
|
-
props: /* @__PURE__ */
|
|
26
|
+
props: /* @__PURE__ */ M({
|
|
27
27
|
modelValue: {},
|
|
28
28
|
items: {},
|
|
29
29
|
showSelectAllItem: {
|
|
@@ -36,7 +36,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
36
36
|
}),
|
|
37
37
|
emits: ["update:modelValue"],
|
|
38
38
|
setup(n) {
|
|
39
|
-
let i = n, a =
|
|
39
|
+
let i = n, a = z(n, "modelValue"), o = C(() => {
|
|
40
40
|
if (i.showSelectAllItem) return {
|
|
41
41
|
icon: "",
|
|
42
42
|
title: e().Common.Select_all,
|
|
@@ -44,23 +44,23 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
44
44
|
content: ""
|
|
45
45
|
};
|
|
46
46
|
});
|
|
47
|
-
return (e, i) => (
|
|
48
|
-
opener:
|
|
47
|
+
return (e, i) => (P(), E("div", he, [R(t).state.isMobile ? (P(), w(y, { key: 0 }, {
|
|
48
|
+
opener: V(() => [k(r, {
|
|
49
49
|
class: "top-competitorSelector_opener",
|
|
50
50
|
color: "theme",
|
|
51
51
|
icon: "",
|
|
52
52
|
icon2: ""
|
|
53
53
|
}, {
|
|
54
|
-
default:
|
|
54
|
+
default: V(() => [O(L(n.items.find((e) => e.value === a.value?.[0])?.content), 1)]),
|
|
55
55
|
_: 1
|
|
56
56
|
})]),
|
|
57
|
-
contentList:
|
|
58
|
-
class:
|
|
57
|
+
contentList: V(() => [(P(!0), E(S, null, I(n.items, (e) => (P(), w(v, {
|
|
58
|
+
class: N({ "top-active": a.value?.includes(e.value) }),
|
|
59
59
|
"data-top-icon": e.icon,
|
|
60
60
|
title: e.title,
|
|
61
61
|
onClick: () => a.value = [e.value]
|
|
62
62
|
}, {
|
|
63
|
-
default:
|
|
63
|
+
default: V(() => [D("span", ge, L(e.content), 1)]),
|
|
64
64
|
_: 2
|
|
65
65
|
}, 1032, [
|
|
66
66
|
"class",
|
|
@@ -69,7 +69,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
69
69
|
"onClick"
|
|
70
70
|
]))), 256))]),
|
|
71
71
|
_: 1
|
|
72
|
-
})) : (
|
|
72
|
+
})) : (P(), w(b, {
|
|
73
73
|
key: 1,
|
|
74
74
|
modelValue: a.value,
|
|
75
75
|
"onUpdate:modelValue": i[0] ||= (e) => a.value = e,
|
|
@@ -84,12 +84,12 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
84
84
|
"selectAllItem"
|
|
85
85
|
]))]));
|
|
86
86
|
}
|
|
87
|
-
}),
|
|
87
|
+
}), ve = (e, t) => C(() => fe(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
|
|
88
88
|
value: e.id,
|
|
89
89
|
title: e.url + ` [${e.id}]`,
|
|
90
|
-
icon: e.id ===
|
|
90
|
+
icon: e.id === fe(t) ? "" : "",
|
|
91
91
|
content: e.name
|
|
92
|
-
}))),
|
|
92
|
+
}))), ye = {
|
|
93
93
|
0: "Yandex",
|
|
94
94
|
1: "Google",
|
|
95
95
|
4: "YouTube",
|
|
@@ -99,25 +99,25 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
99
99
|
9: "GoogleStore",
|
|
100
100
|
20: "Yandex.com",
|
|
101
101
|
21: "Yandex.com.tr"
|
|
102
|
-
},
|
|
102
|
+
}, be = {
|
|
103
103
|
key: -2,
|
|
104
104
|
name: "--",
|
|
105
105
|
index: -2
|
|
106
|
-
},
|
|
106
|
+
}, xe = {
|
|
107
107
|
key: -2,
|
|
108
108
|
name: "--",
|
|
109
|
-
regions: [
|
|
110
|
-
regionByIndex: new Map([[-2,
|
|
111
|
-
},
|
|
109
|
+
regions: [be],
|
|
110
|
+
regionByIndex: new Map([[-2, be]])
|
|
111
|
+
}, U = {
|
|
112
112
|
key: -2,
|
|
113
113
|
name: "Autoselect",
|
|
114
114
|
index: -2
|
|
115
|
-
},
|
|
115
|
+
}, Se = {
|
|
116
116
|
key: -2,
|
|
117
117
|
name: "Autoselect",
|
|
118
|
-
regions: [
|
|
119
|
-
regionByIndex: new Map([[-2,
|
|
120
|
-
},
|
|
118
|
+
regions: [U],
|
|
119
|
+
regionByIndex: new Map([[-2, U]])
|
|
120
|
+
}, Ce = {
|
|
121
121
|
countryCode: "00",
|
|
122
122
|
depth: 1,
|
|
123
123
|
device: 0,
|
|
@@ -125,10 +125,10 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
125
125
|
index: -1,
|
|
126
126
|
lang: "ru",
|
|
127
127
|
name: "Without region"
|
|
128
|
-
},
|
|
128
|
+
}, we = () => (U.name = e().Common.Autoselect, U), Te = () => (we(), Se.name = e().Common.Autoselect, console.log(Se), Se), Ee = () => (Ce.name = e().Keywords.Without_region, Ce), De = (e = "", t = !1, n = []) => {
|
|
129
129
|
let r;
|
|
130
|
-
return r = e ?
|
|
131
|
-
},
|
|
130
|
+
return r = e ? ke(n, e) : Oe(n), t && r.set(-2, Te()), r.size || r.set(-2, xe), r;
|
|
131
|
+
}, Oe = (e, t = !0, n = [], r = "") => {
|
|
132
132
|
let i = /* @__PURE__ */ new Map();
|
|
133
133
|
return e.forEach((e) => {
|
|
134
134
|
if (!e.enabled || r && typeof e.key == "number" && e.key > 1) return;
|
|
@@ -142,35 +142,35 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
142
142
|
if (i.has(e)) return;
|
|
143
143
|
let t = {
|
|
144
144
|
key: e,
|
|
145
|
-
name:
|
|
145
|
+
name: ye[e],
|
|
146
146
|
regions: [],
|
|
147
147
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
148
148
|
};
|
|
149
149
|
i.set(t.key, t);
|
|
150
150
|
}), i;
|
|
151
|
-
},
|
|
152
|
-
let r =
|
|
151
|
+
}, ke = (e, n) => {
|
|
152
|
+
let r = Oe(e, !1, t.state.forceSearchersKeysForKeywordsStats, n);
|
|
153
153
|
if (r.has(2)) {
|
|
154
154
|
let e = r.get(2);
|
|
155
155
|
e && (e.regionByIndex = /* @__PURE__ */ new Map());
|
|
156
156
|
}
|
|
157
157
|
return (n === "volume" || n === "cost_forecast") && t.state.showGlobalRegionForKeywordsStats && r.forEach((e) => {
|
|
158
158
|
if (!e.regionByIndex) return;
|
|
159
|
-
let t = { ...
|
|
159
|
+
let t = { ...Ee() };
|
|
160
160
|
e.regionByIndex.set(t.index, t);
|
|
161
161
|
}), r;
|
|
162
|
-
},
|
|
163
|
-
let r =
|
|
162
|
+
}, Ae = (e, t, n = []) => {
|
|
163
|
+
let r = De(e, !1, n), i;
|
|
164
164
|
return r.forEach((n) => {
|
|
165
165
|
if (!(t.searcher_key !== void 0 && t.searcher_key != n.key) && n.regions && (n.regions.forEach((r) => {
|
|
166
166
|
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;
|
|
167
167
|
}), i)) return !1;
|
|
168
168
|
}), i;
|
|
169
|
-
},
|
|
169
|
+
}, je = d(() => import("../.chunks/dialog_regionSelectorRegions-BKvg82IO.esm.js")), Me = (t, n) => {
|
|
170
170
|
let r = e();
|
|
171
171
|
return {
|
|
172
|
-
searcherKey:
|
|
173
|
-
optionBySearcherKey:
|
|
172
|
+
searcherKey: F(n.value.keys().next().value ?? -2),
|
|
173
|
+
optionBySearcherKey: C(() => {
|
|
174
174
|
let e = /* @__PURE__ */ new Map();
|
|
175
175
|
if (n.value.forEach((n) => {
|
|
176
176
|
let r = {
|
|
@@ -194,10 +194,10 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
194
194
|
return e;
|
|
195
195
|
})
|
|
196
196
|
};
|
|
197
|
-
},
|
|
198
|
-
let r = e(), i =
|
|
197
|
+
}, Ne = (t, n) => {
|
|
198
|
+
let r = e(), i = F(-2);
|
|
199
199
|
t.modelValue.length === 1 && (i.value = t.modelValue[0]), i.value === -2 && (t.forMode ? i.value = n.value?.regionByIndex.values().next().value?.key ?? -2 : i.value = n.value?.regionByIndex.keys().next().value ?? -2);
|
|
200
|
-
let a =
|
|
200
|
+
let a = C(() => {
|
|
201
201
|
let e = /* @__PURE__ */ new Map();
|
|
202
202
|
return n.value.regionByIndex?.forEach((i) => {
|
|
203
203
|
let a = i.name;
|
|
@@ -220,7 +220,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
220
220
|
e.set(i.index, s);
|
|
221
221
|
}), e;
|
|
222
222
|
});
|
|
223
|
-
return
|
|
223
|
+
return B(a, (e, n) => {
|
|
224
224
|
if (t.onlySearcher || i.value !== void 0 && e.get(i.value)) return;
|
|
225
225
|
let a = e.keys().next().value;
|
|
226
226
|
if (i.value === -2 || a === -2) {
|
|
@@ -243,8 +243,8 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
243
243
|
regionIndex: i,
|
|
244
244
|
optionByRegionIndex: a
|
|
245
245
|
};
|
|
246
|
-
},
|
|
247
|
-
let r =
|
|
246
|
+
}, Pe = (e, t, n) => {
|
|
247
|
+
let r = F([]), i = () => {
|
|
248
248
|
if (e.onlySearcher && t.value) {
|
|
249
249
|
r.value = Array.from(t.value.keys());
|
|
250
250
|
return;
|
|
@@ -258,19 +258,19 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
258
258
|
}, a = () => {
|
|
259
259
|
r.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(r.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
|
|
260
260
|
};
|
|
261
|
-
return
|
|
261
|
+
return B(r, () => {
|
|
262
262
|
a();
|
|
263
263
|
}), e.addCompare && i(), { regionsIndexes: r };
|
|
264
|
-
},
|
|
265
|
-
let t =
|
|
264
|
+
}, Fe = (e) => {
|
|
265
|
+
let t = C(() => De(e.forMode, e.autoRegion, e.searchers)), n = C(() => t.value.get(i.searcherKey.value) || xe), r = C(() => {
|
|
266
266
|
let e = /* @__PURE__ */ new Set();
|
|
267
267
|
return t.value.forEach((t) => {
|
|
268
268
|
t.regionByIndex.forEach((t) => {
|
|
269
269
|
t.index !== -1 && t.index !== -2 && e.add(t.index);
|
|
270
270
|
});
|
|
271
271
|
}), e;
|
|
272
|
-
}), i =
|
|
273
|
-
|
|
272
|
+
}), i = Me(e, t), a = Ne(e, n), o = Pe(e, t, r);
|
|
273
|
+
B(t, () => {
|
|
274
274
|
if (e.onlySearcher ? o.regionsIndexes.value = Array.from(t.value.keys()) : o.regionsIndexes.value = o.regionsIndexes.value.filter((e) => r.value.has(e)), i.searcherKey.value === -1) return;
|
|
275
275
|
let s = t.value.keys().next().value;
|
|
276
276
|
t.value.forEach((n) => {
|
|
@@ -293,7 +293,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
293
293
|
let t = a.regionIndex.value;
|
|
294
294
|
if (e.forMode) {
|
|
295
295
|
let n = a.regionIndex.value;
|
|
296
|
-
t =
|
|
296
|
+
t = Ae(e.forMode, {
|
|
297
297
|
searcher_key: s(),
|
|
298
298
|
key: n
|
|
299
299
|
}, e.searchers)?.index;
|
|
@@ -315,9 +315,9 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
315
315
|
if (e !== void 0) return l()?.regionByIndex?.get(e);
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
|
-
},
|
|
318
|
+
}, Ie = /* @__PURE__ */ A({
|
|
319
319
|
__name: "regionSelector",
|
|
320
|
-
props: /* @__PURE__ */
|
|
320
|
+
props: /* @__PURE__ */ M({
|
|
321
321
|
projectId: {},
|
|
322
322
|
searchers: { default: () => [] },
|
|
323
323
|
modelValue: {},
|
|
@@ -346,19 +346,19 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
346
346
|
}),
|
|
347
347
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
348
348
|
setup(e, { expose: t }) {
|
|
349
|
-
let n = e, a =
|
|
349
|
+
let n = e, a = z(e, "modelValue"), o = z(e, "modelValueSingle"), { selectSearcher: s, selectRegion: c, compare: l, searcherByKey: u, allRegionsIndexes: d, getSearcher: f, getRegion: p } = Fe(n), m = () => {
|
|
350
350
|
let e = [];
|
|
351
351
|
u.value.forEach((t) => {
|
|
352
352
|
t.enabled && t.regions.forEach((t) => {
|
|
353
353
|
t.enabled && e.push(t);
|
|
354
354
|
});
|
|
355
|
-
}),
|
|
355
|
+
}), je.open("regions", {
|
|
356
356
|
regions: e,
|
|
357
357
|
regionsIndexes: l.regionsIndexes.value,
|
|
358
358
|
"@update:regionsIndexes": (e) => l.regionsIndexes.value = e
|
|
359
359
|
});
|
|
360
360
|
};
|
|
361
|
-
return
|
|
361
|
+
return B([
|
|
362
362
|
c.regionIndex,
|
|
363
363
|
s.searcherKey,
|
|
364
364
|
l.regionsIndexes
|
|
@@ -368,9 +368,9 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
368
368
|
a.value = [...l.regionsIndexes.value];
|
|
369
369
|
} else n.onlySearcher ? (a.value = [s.searcherKey.value], s.searcherKey.value === -2 && !n.autoRegion && (a.value.length = 0)) : (a.value = [c.regionIndex.value], c.regionIndex.value === -2 && !n.autoRegion && (a.value.length = 0));
|
|
370
370
|
!n.onlySearcher && !d.value.size && (s.searcherKey.value = -2);
|
|
371
|
-
}), o.value &&
|
|
371
|
+
}), o.value && B(o, () => {
|
|
372
372
|
o.value && (a.value = [o.value]);
|
|
373
|
-
}, { immediate: !0 }),
|
|
373
|
+
}, { immediate: !0 }), B(a, () => {
|
|
374
374
|
if (a.value[0] && (o.value = a.value[0]), n.onlySearcher) {
|
|
375
375
|
if (!a.value.length || a.value.length === 1 && !u.value.has(a.value[0]) || a.value.length === 1 && a.value[0] === -2 && !n.autoRegion) {
|
|
376
376
|
let e = u.value.keys().next().value;
|
|
@@ -422,14 +422,14 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
422
422
|
}, { immediate: !0 }), t({
|
|
423
423
|
getSearcher: f,
|
|
424
424
|
getRegion: p
|
|
425
|
-
}), (t, n) => (
|
|
425
|
+
}), (t, n) => (P(), E("div", { class: N({
|
|
426
426
|
"top-regionSelector": !0,
|
|
427
427
|
"top-regionSelector-onlySearcher": e.onlySearcher
|
|
428
428
|
}) }, [
|
|
429
|
-
|
|
430
|
-
options:
|
|
431
|
-
modelValue:
|
|
432
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
429
|
+
k(i, {
|
|
430
|
+
options: R(s).optionBySearcherKey.value,
|
|
431
|
+
modelValue: R(s).searcherKey.value,
|
|
432
|
+
"onUpdate:modelValue": n[0] ||= (e) => R(s).searcherKey.value = e,
|
|
433
433
|
name: "searcher_key",
|
|
434
434
|
addChanger: e.addChanger
|
|
435
435
|
}, null, 8, [
|
|
@@ -437,12 +437,12 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
437
437
|
"modelValue",
|
|
438
438
|
"addChanger"
|
|
439
439
|
]),
|
|
440
|
-
!e.onlySearcher &&
|
|
440
|
+
!e.onlySearcher && R(s).searcherKey.value !== R(-1) ? (P(), w(i, {
|
|
441
441
|
key: 0,
|
|
442
442
|
class: "top-select-region",
|
|
443
|
-
options:
|
|
444
|
-
modelValue:
|
|
445
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
443
|
+
options: R(c).optionByRegionIndex.value,
|
|
444
|
+
modelValue: R(c).regionIndex.value,
|
|
445
|
+
"onUpdate:modelValue": n[1] ||= (e) => R(c).regionIndex.value = e,
|
|
446
446
|
name: e.forMode ? "region_key" : "region_index",
|
|
447
447
|
addChanger: e.addChanger,
|
|
448
448
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
@@ -452,31 +452,31 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
452
452
|
"name",
|
|
453
453
|
"addChanger",
|
|
454
454
|
"data-top-icon"
|
|
455
|
-
])) :
|
|
456
|
-
e.addCompare && !e.onlySearcher &&
|
|
455
|
+
])) : T("", !0),
|
|
456
|
+
e.addCompare && !e.onlySearcher && R(s).searcherKey.value === R(-1) ? (P(), w(r, {
|
|
457
457
|
key: 1,
|
|
458
458
|
name: "compare",
|
|
459
459
|
onClick: m,
|
|
460
|
-
"data-count-compare-regions-indexes":
|
|
460
|
+
"data-count-compare-regions-indexes": R(l).regionsIndexes.value.length
|
|
461
461
|
}, {
|
|
462
|
-
default:
|
|
462
|
+
default: V(() => [O(L(t.$i18n.Common.Selected_regions), 1)]),
|
|
463
463
|
_: 1
|
|
464
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
464
|
+
}, 8, ["data-count-compare-regions-indexes"])) : T("", !0)
|
|
465
465
|
], 2));
|
|
466
466
|
}
|
|
467
|
-
}),
|
|
467
|
+
}), W = {
|
|
468
468
|
id: 0,
|
|
469
469
|
name: "/",
|
|
470
470
|
path: "/"
|
|
471
471
|
};
|
|
472
|
-
function
|
|
472
|
+
function Le(t) {
|
|
473
473
|
return t ? e()?.Common.All_folders : "/ (" + e()?.Keywords.Root_folder + ")";
|
|
474
474
|
}
|
|
475
|
-
var
|
|
476
|
-
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name =
|
|
475
|
+
var Re = (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) => {
|
|
476
|
+
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Le(t));
|
|
477
477
|
let o = i > 1 ? "-".repeat(i - 1) + " " : "";
|
|
478
|
-
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a),
|
|
479
|
-
}), n),
|
|
478
|
+
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Re(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);
|
|
479
|
+
}), n), ze = (e, t) => e.gen(`/get/${t}/folders/`, [
|
|
480
480
|
"id",
|
|
481
481
|
"parent_id",
|
|
482
482
|
"name",
|
|
@@ -487,9 +487,9 @@ var Be = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
|
|
|
487
487
|
});
|
|
488
488
|
//#endregion
|
|
489
489
|
//#region src/core/utils/composables/useWatch.ts
|
|
490
|
-
function
|
|
490
|
+
function Be(e, t, n) {
|
|
491
491
|
let r = Object.keys(e);
|
|
492
|
-
return
|
|
492
|
+
return B(r.map((t) => e[t]), (e, n, i) => {
|
|
493
493
|
let a = {};
|
|
494
494
|
e.forEach((e, t) => {
|
|
495
495
|
if (!Object.is(e, n[t])) {
|
|
@@ -504,9 +504,9 @@ function He(e, t, n) {
|
|
|
504
504
|
}
|
|
505
505
|
//#endregion
|
|
506
506
|
//#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
|
|
507
|
-
var
|
|
507
|
+
var Ve = ["innerHTML"], He = /* @__PURE__ */ A({
|
|
508
508
|
__name: "folders",
|
|
509
|
-
props: /* @__PURE__ */
|
|
509
|
+
props: /* @__PURE__ */ M({
|
|
510
510
|
folderId: {},
|
|
511
511
|
folder: {},
|
|
512
512
|
folders: {},
|
|
@@ -522,17 +522,17 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
522
522
|
}, {
|
|
523
523
|
folderId: { required: !0 },
|
|
524
524
|
folderIdModifiers: {},
|
|
525
|
-
folder: { default:
|
|
525
|
+
folder: { default: W },
|
|
526
526
|
folderModifiers: {}
|
|
527
527
|
}),
|
|
528
528
|
emits: ["update:folderId", "update:folder"],
|
|
529
529
|
setup(e) {
|
|
530
|
-
let t = e, n =
|
|
531
|
-
|
|
530
|
+
let t = e, n = z(e, "folderId"), r = z(e, "folder"), i = t.client && !t.folders ? ze(t.client, t.service) : void 0, a = F(null);
|
|
531
|
+
B(() => t.projectId, () => {
|
|
532
532
|
i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
|
|
533
533
|
}, { immediate: !0 });
|
|
534
|
-
let o =
|
|
535
|
-
return
|
|
534
|
+
let o = C(() => Re(t.folders ?? { root: [W] }, t.canSelectAll));
|
|
535
|
+
return Be({
|
|
536
536
|
modelFolder: r,
|
|
537
537
|
modelFolderId: n
|
|
538
538
|
}, async (e) => {
|
|
@@ -542,20 +542,20 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
542
542
|
return;
|
|
543
543
|
}
|
|
544
544
|
let i = o.value.get(t.folderId);
|
|
545
|
-
i ||=
|
|
546
|
-
}, { immediate: !0 }), (t, n) => (
|
|
545
|
+
i ||= W, r.value = i, n.value = i.id;
|
|
546
|
+
}, { immediate: !0 }), (t, n) => (P(), w(x, {
|
|
547
547
|
class: "top-groupSelector_folder",
|
|
548
548
|
modelValue: r.value,
|
|
549
549
|
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
550
550
|
items: e.folders ? [...o.value.values()] : void 0,
|
|
551
551
|
"search-type": "inline",
|
|
552
552
|
icon: e.addIcon ? "" : void 0,
|
|
553
|
-
api: e.folders ? void 0 :
|
|
554
|
-
apiSetSearchParams: (...e) =>
|
|
553
|
+
api: e.folders ? void 0 : R(i),
|
|
554
|
+
apiSetSearchParams: (...e) => R(te)(...e, "name"),
|
|
555
555
|
addChanger: e.addChanger,
|
|
556
556
|
useCache: ""
|
|
557
557
|
}, {
|
|
558
|
-
item:
|
|
558
|
+
item: V(({ item: e }) => [D("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ve)]),
|
|
559
559
|
_: 1
|
|
560
560
|
}, 8, [
|
|
561
561
|
"modelValue",
|
|
@@ -566,17 +566,17 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
566
566
|
"addChanger"
|
|
567
567
|
]));
|
|
568
568
|
}
|
|
569
|
-
}),
|
|
569
|
+
}), G = {
|
|
570
570
|
id: -1,
|
|
571
571
|
name: "--",
|
|
572
|
-
folder_id:
|
|
573
|
-
folder_path:
|
|
574
|
-
},
|
|
572
|
+
folder_id: W.id,
|
|
573
|
+
folder_path: W.path
|
|
574
|
+
}, K = {
|
|
575
575
|
id: 0,
|
|
576
576
|
name: "All groups",
|
|
577
|
-
folder_id:
|
|
578
|
-
folder_path:
|
|
579
|
-
},
|
|
577
|
+
folder_id: W.id,
|
|
578
|
+
folder_path: W.path
|
|
579
|
+
}, q = () => (K.name = e()?.Common.All_groups, K), Ue = () => (K.name = e()?.Keywords.Choose_group, K), We = (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), Ge = (e, t) => e.gen(`/get/${t}/groups/`, [
|
|
580
580
|
"id",
|
|
581
581
|
"name",
|
|
582
582
|
"folder_id",
|
|
@@ -584,12 +584,12 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
584
584
|
]).changeParams({
|
|
585
585
|
folder_id_depth: !0,
|
|
586
586
|
limit: 100
|
|
587
|
-
}),
|
|
587
|
+
}), Ke = (e, t) => e.gen(`/add/${t}/groups/`), qe = (e, t) => e.gen(`/del/${t}/groups/`), Je = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Ye = { class: "top-groupSelector_groupItem top-ellipsis1" }, Xe = {
|
|
588
588
|
key: 0,
|
|
589
589
|
class: "top-comment"
|
|
590
|
-
},
|
|
590
|
+
}, Ze = ["innerHTML"], Qe = ["innerHTML"], $e = ["innerHTML"], et = /* @__PURE__ */ A({
|
|
591
591
|
__name: "groups",
|
|
592
|
-
props: /* @__PURE__ */
|
|
592
|
+
props: /* @__PURE__ */ M({
|
|
593
593
|
groupId: {},
|
|
594
594
|
group: {},
|
|
595
595
|
projectId: {},
|
|
@@ -620,147 +620,155 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
620
620
|
group: { required: !0 },
|
|
621
621
|
groupModifiers: {}
|
|
622
622
|
}),
|
|
623
|
-
emits: /* @__PURE__ */
|
|
623
|
+
emits: /* @__PURE__ */ M([
|
|
624
624
|
"addGroup",
|
|
625
625
|
"editGroup",
|
|
626
626
|
"delGroup"
|
|
627
627
|
], ["update:groupId", "update:group"]),
|
|
628
|
-
setup(e, {
|
|
629
|
-
let
|
|
630
|
-
|
|
631
|
-
project_id:
|
|
628
|
+
setup(e, { expose: t, emit: n }) {
|
|
629
|
+
let r = e, i = n, a = z(e, "groupId"), s = z(e, "group"), c = r.client && !r.groups ? Ge(r.client, r.service) : void 0, l = r.client ? Ke(r.client, r.service) : void 0, u = r.client ? qe(r.client, r.service) : void 0, d = r.client ? Je(r.client, r.service) : void 0, f = F(null), p = F(void 0), m = o("folder_id", "EQUALS", [r.folder?.id ?? 0]);
|
|
630
|
+
c?.changeParams({
|
|
631
|
+
project_id: r.projectId,
|
|
632
632
|
folder_id_depth: !0,
|
|
633
|
-
filters: [
|
|
634
|
-
}),
|
|
635
|
-
let
|
|
636
|
-
|
|
633
|
+
filters: [m]
|
|
634
|
+
}), r.on !== void 0 && c?.params.filters?.push(o("on", "EQUALS", [Number(r.on)]));
|
|
635
|
+
let h = (e) => {
|
|
636
|
+
s.value = e, a.value = e.id;
|
|
637
|
+
}, g = (e = !1) => {
|
|
638
|
+
f.value?.resetCache(e);
|
|
639
|
+
}, v = () => {
|
|
640
|
+
r.groups && (p.value = We(r.groups, r.on, r.folder));
|
|
641
|
+
}, y = () => {
|
|
642
|
+
h(r.canSelectAll ? q() : G);
|
|
643
|
+
}, b = async () => {
|
|
644
|
+
if (r.groups) {
|
|
645
|
+
let e = p.value?.find((e) => e.id === a.value);
|
|
646
|
+
if (!e && r.canSelectAll && (e = q()), e) h(e);
|
|
647
|
+
else {
|
|
648
|
+
let e = p.value?.[0];
|
|
649
|
+
e && !a.value ? h(e) : h(G);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
if (r.client && !r.groups && (a.value || a.value === 0 && !r.canSelectAll)) {
|
|
653
|
+
let e = Ge(r.client, r.service).changeParams({
|
|
654
|
+
project_id: r.projectId,
|
|
655
|
+
id: a.value,
|
|
656
|
+
filters: [m]
|
|
657
|
+
});
|
|
658
|
+
e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + r.projectId });
|
|
659
|
+
let t = await e.call();
|
|
660
|
+
if (!t.errors?.length && !t.result) return;
|
|
661
|
+
!t.errors && t.result[0] ? h(t.result[0]) : y();
|
|
662
|
+
}
|
|
663
|
+
}, C = async () => {
|
|
664
|
+
g(!0), v(), await b();
|
|
637
665
|
};
|
|
638
|
-
|
|
639
|
-
projectId: () =>
|
|
640
|
-
folderId: () =>
|
|
641
|
-
canSelectAll: () =>
|
|
666
|
+
Be({
|
|
667
|
+
projectId: () => r.projectId,
|
|
668
|
+
folderId: () => r.folder?.id,
|
|
669
|
+
canSelectAll: () => r.canSelectAll
|
|
642
670
|
}, (e) => {
|
|
643
|
-
if (e.projectId && (
|
|
671
|
+
if (e.projectId && (c?.changeParams({ project_id: r.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + r.projectId })), e.folderId && (m.values = [r.folder?.id ?? 0], v()), g(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && a.value !== null) {
|
|
644
672
|
let e;
|
|
645
|
-
|
|
673
|
+
r.autoselect === "first" && (e = p.value?.[0], r.canSelectAll && (e = oe(q()))), (r.autoselect === "placeholder" || !e) && (e = Ue()), h(e);
|
|
646
674
|
}
|
|
647
|
-
}, { immediate: !0 }),
|
|
648
|
-
modelGroup:
|
|
649
|
-
modelGroupId:
|
|
675
|
+
}, { immediate: !0 }), Be({
|
|
676
|
+
modelGroup: s,
|
|
677
|
+
modelGroupId: a
|
|
650
678
|
}, async (e) => {
|
|
651
|
-
if (
|
|
679
|
+
if (a.value !== s.value.id) {
|
|
652
680
|
if (e.modelGroup && !e.modelGroupId) {
|
|
653
|
-
|
|
681
|
+
a.value = s.value.id;
|
|
654
682
|
return;
|
|
655
683
|
}
|
|
656
|
-
|
|
657
|
-
if (n.groups) {
|
|
658
|
-
let e = f.value?.find((e) => e.id === i.value);
|
|
659
|
-
if (!e && n.canSelectAll && (e = G()), e) m(e);
|
|
660
|
-
else {
|
|
661
|
-
let e = f.value?.[0];
|
|
662
|
-
e && !i.value ? m(e) : m(U);
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
if (n.client && !n.groups && (i.value || i.value === 0 && !n.canSelectAll)) {
|
|
666
|
-
let e = qe(n.client, n.service).changeParams({
|
|
667
|
-
project_id: n.projectId,
|
|
668
|
-
id: i.value,
|
|
669
|
-
filters: [p]
|
|
670
|
-
});
|
|
671
|
-
e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + n.projectId });
|
|
672
|
-
let t = await e.call();
|
|
673
|
-
if (!t.errors?.length && !t.result) return;
|
|
674
|
-
!t.errors && t.result[0] ? m(t.result[0]) : m(U);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
684
|
+
r.canAdd && a.value === null || await b();
|
|
677
685
|
}
|
|
678
686
|
}, { immediate: !0 });
|
|
679
|
-
let
|
|
680
|
-
if (
|
|
681
|
-
let t =
|
|
682
|
-
project_id:
|
|
687
|
+
let O = async (e) => {
|
|
688
|
+
if (r.canAdd !== "api" || !l) return;
|
|
689
|
+
let t = s.value, n = await l.changeParams({
|
|
690
|
+
project_id: r.projectId,
|
|
683
691
|
names: [e.name],
|
|
684
|
-
to_id:
|
|
692
|
+
to_id: r.folder?.id ?? W.id,
|
|
685
693
|
to_type: "in_folder_last"
|
|
686
694
|
}).call();
|
|
687
|
-
if (
|
|
688
|
-
let e =
|
|
689
|
-
|
|
690
|
-
} else
|
|
691
|
-
|
|
692
|
-
},
|
|
693
|
-
|
|
694
|
-
project_id:
|
|
695
|
+
if (n.result) {
|
|
696
|
+
let e = n.result[0];
|
|
697
|
+
h(e), i("addGroup", e);
|
|
698
|
+
} else h(t);
|
|
699
|
+
f.value?.resetCache(!0);
|
|
700
|
+
}, A = async (e, t) => {
|
|
701
|
+
d && ((await d.changeParams({
|
|
702
|
+
project_id: r.projectId,
|
|
695
703
|
id: e.id,
|
|
696
704
|
name: t
|
|
697
|
-
}).call()).errors || (
|
|
698
|
-
...
|
|
705
|
+
}).call()).errors || (s.value.id === e.id && h({
|
|
706
|
+
...s.value,
|
|
699
707
|
name: t
|
|
700
|
-
}),
|
|
708
|
+
}), i("editGroup", {
|
|
701
709
|
...e,
|
|
702
710
|
name: t
|
|
703
|
-
}),
|
|
704
|
-
},
|
|
705
|
-
|
|
706
|
-
project_id:
|
|
711
|
+
}), f.value?.updateItemById(e.id, { name: t })));
|
|
712
|
+
}, j = async (e) => {
|
|
713
|
+
u && ((await u.changeParams({
|
|
714
|
+
project_id: r.projectId,
|
|
707
715
|
id: e.id
|
|
708
|
-
}).call()).errors || (
|
|
716
|
+
}).call()).errors || (s.value.id === e.id && y(), i("delGroup", e), f.value?.deleteItemById(e.id)));
|
|
709
717
|
};
|
|
710
|
-
return (t, n) => (
|
|
718
|
+
return t({ reload: C }), (t, n) => (P(), w(x, {
|
|
711
719
|
ref_key: "refSelector",
|
|
712
|
-
ref:
|
|
720
|
+
ref: f,
|
|
713
721
|
class: "top-groupSelector_group",
|
|
714
|
-
modelValue:
|
|
715
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
716
|
-
items:
|
|
722
|
+
modelValue: s.value,
|
|
723
|
+
"onUpdate:modelValue": n[0] ||= (e) => s.value = e,
|
|
724
|
+
items: p.value ?? e.groups,
|
|
717
725
|
searchType: "inline",
|
|
718
726
|
icon: e.addIcon ? "" : void 0,
|
|
719
|
-
api: e.groups ? void 0 :
|
|
720
|
-
apiSetSearchParams: (...e) =>
|
|
727
|
+
api: e.groups ? void 0 : R(c),
|
|
728
|
+
apiSetSearchParams: (...e) => R(te)(...e, "name"),
|
|
721
729
|
appendSearchToResult: !!e.canAdd,
|
|
722
|
-
useAllItem: e.canSelectAll ?
|
|
730
|
+
useAllItem: e.canSelectAll ? R(q)().name : !1,
|
|
723
731
|
addChanger: e.addChanger,
|
|
724
732
|
useCache: "",
|
|
725
|
-
onAppendItem:
|
|
726
|
-
},
|
|
727
|
-
item:
|
|
728
|
-
n.id ===
|
|
729
|
-
|
|
733
|
+
onAppendItem: O
|
|
734
|
+
}, ne({
|
|
735
|
+
item: V(({ item: n }) => [D("div", Ye, [
|
|
736
|
+
n.id === R(null) ? (P(), E("div", Xe, L(t.$i18n.Common.Add) + ": ", 1)) : T("", !0),
|
|
737
|
+
D("span", {
|
|
730
738
|
class: "top-groupSelector_groupItemName top-ellipsis1",
|
|
731
739
|
innerHTML: n.name
|
|
732
|
-
}, null, 8,
|
|
733
|
-
n.folder_path && e.showPath ? (
|
|
740
|
+
}, null, 8, Ze),
|
|
741
|
+
n.folder_path && e.showPath ? (P(), E("span", {
|
|
734
742
|
key: 1,
|
|
735
743
|
class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
|
|
736
744
|
innerHTML: n.folder_path
|
|
737
|
-
}, null, 8,
|
|
745
|
+
}, null, 8, Qe)) : T("", !0)
|
|
738
746
|
])]),
|
|
739
747
|
_: 2
|
|
740
748
|
}, [e.canEditAndDel && e.client ? {
|
|
741
749
|
name: "actions",
|
|
742
|
-
fn:
|
|
750
|
+
fn: V(({ item: r }) => [r.id ? (P(), E(S, { key: 0 }, [k(_, {
|
|
743
751
|
submitText: t.$i18n.Common.Save,
|
|
744
752
|
defaultValue: r.name,
|
|
745
753
|
inputProps: { addCleaner: !1 },
|
|
746
|
-
onSubmit: (e) =>
|
|
754
|
+
onSubmit: (e) => A(r, e)
|
|
747
755
|
}, {
|
|
748
|
-
opener:
|
|
749
|
-
default:
|
|
756
|
+
opener: V(() => [...n[1] ||= [D("div", { "data-top-icon": "" }, null, -1)]]),
|
|
757
|
+
default: V(() => [...n[2] ||= []]),
|
|
750
758
|
_: 1
|
|
751
759
|
}, 8, [
|
|
752
760
|
"submitText",
|
|
753
761
|
"defaultValue",
|
|
754
762
|
"onSubmit"
|
|
755
|
-
]),
|
|
763
|
+
]), k(ee, {
|
|
756
764
|
isWarning: "",
|
|
757
765
|
submitText: t.$i18n.Common.Delete,
|
|
758
|
-
onSubmit: (e) =>
|
|
766
|
+
onSubmit: (e) => j(r)
|
|
759
767
|
}, {
|
|
760
|
-
opener:
|
|
761
|
-
default:
|
|
768
|
+
opener: V(() => [...n[3] ||= [D("div", { "data-top-icon": "" }, null, -1)]]),
|
|
769
|
+
default: V(() => [D("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n["Ai.Tracker"].Delete_group_warning }, null, 8, $e)]),
|
|
762
770
|
_: 1
|
|
763
|
-
}, 8, ["submitText", "onSubmit"])], 64)) :
|
|
771
|
+
}, 8, ["submitText", "onSubmit"])], 64)) : T("", !0)]),
|
|
764
772
|
key: "0"
|
|
765
773
|
} : void 0]), 1032, [
|
|
766
774
|
"modelValue",
|
|
@@ -773,9 +781,9 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
773
781
|
"addChanger"
|
|
774
782
|
]));
|
|
775
783
|
}
|
|
776
|
-
}),
|
|
784
|
+
}), tt = { class: "top-groupSelector" }, nt = /* @__PURE__ */ A({
|
|
777
785
|
__name: "groupSelector",
|
|
778
|
-
props: /* @__PURE__ */
|
|
786
|
+
props: /* @__PURE__ */ M({
|
|
779
787
|
folderId: {},
|
|
780
788
|
folder: {},
|
|
781
789
|
groupId: {},
|
|
@@ -819,42 +827,44 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
819
827
|
folderModifiers: {},
|
|
820
828
|
groupId: { required: !0 },
|
|
821
829
|
groupIdModifiers: {},
|
|
822
|
-
group: { default:
|
|
830
|
+
group: { default: G },
|
|
823
831
|
groupModifiers: {}
|
|
824
832
|
}),
|
|
825
|
-
emits: /* @__PURE__ */
|
|
833
|
+
emits: /* @__PURE__ */ M(["update:groups"], [
|
|
826
834
|
"update:folderId",
|
|
827
835
|
"update:folder",
|
|
828
836
|
"update:groupId",
|
|
829
837
|
"update:group"
|
|
830
838
|
]),
|
|
831
|
-
setup(e, {
|
|
832
|
-
let
|
|
833
|
-
|
|
834
|
-
let
|
|
835
|
-
|
|
836
|
-
let
|
|
839
|
+
setup(e, { expose: t, emit: n }) {
|
|
840
|
+
let r = e, i = F(null), a = z(e, "folderId"), o = z(e, "folder"), s = z(e, "groupId"), c = z(e, "group"), l = n;
|
|
841
|
+
o.value = Re(r.folders ?? { root: [W] }, r.canSelectAllGroups).get(a.value);
|
|
842
|
+
let u = r.groups?.find((e) => e.id === s.value);
|
|
843
|
+
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = q()), (r.autoselect === "placeholder" || !u) && (u = Ue()), u ??= G, c.value = u;
|
|
844
|
+
let d = (e) => {
|
|
837
845
|
let t;
|
|
838
|
-
|
|
839
|
-
},
|
|
840
|
-
if (!
|
|
841
|
-
|
|
846
|
+
r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
|
|
847
|
+
}, f = (e) => {
|
|
848
|
+
if (!r.groups) {
|
|
849
|
+
l("update:groups");
|
|
842
850
|
return;
|
|
843
851
|
}
|
|
844
|
-
|
|
845
|
-
},
|
|
846
|
-
if (!
|
|
847
|
-
|
|
852
|
+
l("update:groups", r.groups.map((t) => t.id === e.id ? e : t));
|
|
853
|
+
}, p = (e) => {
|
|
854
|
+
if (!r.groups) {
|
|
855
|
+
l("update:groups");
|
|
848
856
|
return;
|
|
849
857
|
}
|
|
850
|
-
|
|
858
|
+
l("update:groups", r.groups.filter((t) => t.id !== e.id));
|
|
851
859
|
};
|
|
852
|
-
return
|
|
860
|
+
return t({ reloadGroups: async () => {
|
|
861
|
+
await i.value?.reload();
|
|
862
|
+
} }), (t, n) => (P(), E("div", tt, [e.showFolders ? (P(), w(He, {
|
|
853
863
|
key: 0,
|
|
854
|
-
folderId:
|
|
855
|
-
"onUpdate:folderId": n[0] ||= (e) =>
|
|
856
|
-
folder:
|
|
857
|
-
"onUpdate:folder": n[1] ||= (e) =>
|
|
864
|
+
folderId: a.value,
|
|
865
|
+
"onUpdate:folderId": n[0] ||= (e) => a.value = e,
|
|
866
|
+
folder: o.value,
|
|
867
|
+
"onUpdate:folder": n[1] ||= (e) => o.value = e,
|
|
858
868
|
projectId: e.projectId,
|
|
859
869
|
folders: e.folders,
|
|
860
870
|
canSelectAll: e.canSelectAllGroups,
|
|
@@ -872,14 +882,16 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
872
882
|
"addIcon",
|
|
873
883
|
"client",
|
|
874
884
|
"service"
|
|
875
|
-
])) :
|
|
885
|
+
])) : T("", !0), e.showGroups ? (P(), w(et, {
|
|
876
886
|
key: 1,
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
"onUpdate:
|
|
887
|
+
ref_key: "componentGroupsRef",
|
|
888
|
+
ref: i,
|
|
889
|
+
groupId: s.value,
|
|
890
|
+
"onUpdate:groupId": n[2] ||= (e) => s.value = e,
|
|
891
|
+
group: c.value,
|
|
892
|
+
"onUpdate:group": n[3] ||= (e) => c.value = e,
|
|
881
893
|
projectId: e.projectId,
|
|
882
|
-
folder:
|
|
894
|
+
folder: o.value,
|
|
883
895
|
groups: e.groups,
|
|
884
896
|
on: e.on,
|
|
885
897
|
canAdd: e.canAddGroup,
|
|
@@ -891,9 +903,9 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
891
903
|
addIcon: e.addIcon,
|
|
892
904
|
client: e.client,
|
|
893
905
|
service: e.service,
|
|
894
|
-
onAddGroup:
|
|
895
|
-
onEditGroup:
|
|
896
|
-
onDelGroup:
|
|
906
|
+
onAddGroup: d,
|
|
907
|
+
onEditGroup: f,
|
|
908
|
+
onDelGroup: p
|
|
897
909
|
}, null, 8, [
|
|
898
910
|
"groupId",
|
|
899
911
|
"group",
|
|
@@ -910,41 +922,41 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
910
922
|
"addIcon",
|
|
911
923
|
"client",
|
|
912
924
|
"service"
|
|
913
|
-
])) :
|
|
925
|
+
])) : T("", !0)]));
|
|
914
926
|
}
|
|
915
|
-
}),
|
|
927
|
+
}), rt = (e) => ({
|
|
916
928
|
id: null,
|
|
917
929
|
name: e,
|
|
918
930
|
listItemProps: { type: "title" }
|
|
919
|
-
}),
|
|
931
|
+
}), it = {
|
|
920
932
|
scheduledUpdate: !1,
|
|
921
933
|
manualUpdate: !1,
|
|
922
934
|
guestProjects: !1
|
|
923
|
-
},
|
|
935
|
+
}, at = (t, n) => {
|
|
924
936
|
let r = [], i = {
|
|
925
|
-
scheduledUpdate:
|
|
926
|
-
manualUpdate:
|
|
927
|
-
guestProjects:
|
|
937
|
+
scheduledUpdate: rt(e().Projects.Scheduled_update),
|
|
938
|
+
manualUpdate: rt(e().Projects.Manual_update),
|
|
939
|
+
guestProjects: rt(e().Projects.Guest_projects)
|
|
928
940
|
}, a = n ? {
|
|
929
941
|
scheduledUpdate: !1,
|
|
930
942
|
manualUpdate: !1,
|
|
931
943
|
guestProjects: !1
|
|
932
|
-
} :
|
|
944
|
+
} : it;
|
|
933
945
|
for (let e of t) !a.scheduledUpdate && e.right?.startsWith("1") && e.on > 0 && (r.push(i.scheduledUpdate), a.scheduledUpdate = !0), !a.manualUpdate && e.right?.startsWith("1") && e.on === 0 && (r.push(i.manualUpdate), a.manualUpdate = !0), !a.guestProjects && e.right?.startsWith("0") && e.on >= 0 && (r.push(i.guestProjects), a.guestProjects = !0), r.push(e);
|
|
934
946
|
return r;
|
|
935
|
-
},
|
|
947
|
+
}, ot = (e) => e.map((e) => ({
|
|
936
948
|
...e,
|
|
937
949
|
listItemProps: { attrs: { title: e.name } }
|
|
938
|
-
})),
|
|
950
|
+
})), st = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(it).forEach((e) => it[e] = !1), at(ot(e), n)), ct = (e) => {
|
|
939
951
|
e = e.replace(/#.*/, "");
|
|
940
952
|
let t = location.hash;
|
|
941
953
|
return t = t.replace(/historyView=[^&]*/, ""), t = t.replace(/modelsKeys=[^&]*/, ""), t = t.replace(/competitorsIds=[^&]*/, ""), t = t.replace(/searchersKeys=[^&]*/, ""), t = t.replace(/regionIndex=[^&]*/, ""), t = t.replace(/regionsIndexes=[^&]*/, ""), t = t.replace(/folderId=[^&]*/, ""), t = t.replace(/groupId=[^&]*/, ""), t = t.replace(/tags=[^&]*/, ""), window.mo?.getHash && !window.mo.getHash("dataSort").toString().includes("0000-00-00") && (t = t.replace(/dataSort=[^&]*/, "")), 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;
|
|
942
|
-
},
|
|
954
|
+
}, lt = (e, t) => {
|
|
943
955
|
t && t.target instanceof HTMLElement && c.close(t.target.closest(".top-popup-wrapper"));
|
|
944
|
-
let n =
|
|
956
|
+
let n = ct(e);
|
|
945
957
|
location.href = n;
|
|
946
|
-
},
|
|
947
|
-
let t =
|
|
958
|
+
}, ut = (e) => {
|
|
959
|
+
let t = dt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
|
|
948
960
|
return n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
|
|
949
961
|
"watcher",
|
|
950
962
|
"indexing",
|
|
@@ -953,15 +965,15 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
953
965
|
"direct",
|
|
954
966
|
"adwords"
|
|
955
967
|
].includes(n[4]) && (i = n[4] + "/"), "https://" + t + "/" + r + e + "/" + i;
|
|
956
|
-
},
|
|
968
|
+
}, dt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, ft = (e) => {
|
|
957
969
|
let t = e.startsWith("http") ? e : "http://" + e;
|
|
958
970
|
return t = t.replace(/"/g, "%22"), t;
|
|
959
|
-
},
|
|
971
|
+
}, pt = (e, t) => {
|
|
960
972
|
let n = e.params.filters ?? [];
|
|
961
973
|
n = n.filter((e) => e.name !== "GEN_SEARCH_STRING()");
|
|
962
974
|
let r = h(t), i = t.replace(/([[^$.|?*+()])/g, "\\$1"), a = r.replace(/([[^$.|?*+()])/g, "\\$1");
|
|
963
975
|
t && n.push(o("GEN_SEARCH_STRING()", "REGEXP", [`(${i}|${a})`])), e.changeParams({ filters: n });
|
|
964
|
-
},
|
|
976
|
+
}, mt = (e, t, n) => {
|
|
965
977
|
let r = e.gen("/get/projects_2/projects/", [
|
|
966
978
|
"id",
|
|
967
979
|
"user_id",
|
|
@@ -981,14 +993,14 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
981
993
|
]
|
|
982
994
|
}, r.options.onApiLoaded = (e, t, n) => {
|
|
983
995
|
let r = t.data.filters.length === 1 && t.data.offset === 0 || t.data.limit === 1e3, i = t.data.limit === 100 && t.data.filters.length > 1 ? !0 : void 0;
|
|
984
|
-
e.result =
|
|
996
|
+
e.result = st(e.result, r, i), n?.(e, t);
|
|
985
997
|
}, r;
|
|
986
|
-
},
|
|
998
|
+
}, ht = (e) => e.gen("/add/projects_2/projects/"), gt = { class: "top-projectSelectorSubmenu_item" }, _t = [
|
|
987
999
|
"href",
|
|
988
1000
|
"title",
|
|
989
1001
|
"data-top-icon",
|
|
990
1002
|
"data-right"
|
|
991
|
-
],
|
|
1003
|
+
], vt = { class: "top-projectSelectorSubmenu_item" }, yt = ["href"], bt = /* @__PURE__ */ A({
|
|
992
1004
|
__name: "submenu",
|
|
993
1005
|
props: {
|
|
994
1006
|
id: {},
|
|
@@ -996,7 +1008,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
996
1008
|
url: {}
|
|
997
1009
|
},
|
|
998
1010
|
setup(t) {
|
|
999
|
-
let n = t, r = e(), i =
|
|
1011
|
+
let n = t, r = e(), i = dt(), a = [
|
|
1000
1012
|
{
|
|
1001
1013
|
href: `https://${i}/project/keywords/${n.id}/`,
|
|
1002
1014
|
title: r.Common.Menu_phrases,
|
|
@@ -1069,7 +1081,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1069
1081
|
icon: "",
|
|
1070
1082
|
right: "2"
|
|
1071
1083
|
}
|
|
1072
|
-
], o =
|
|
1084
|
+
], o = C(() => {
|
|
1073
1085
|
if (!window.page?.data?.aiTracker) {
|
|
1074
1086
|
let e = a.findIndex((e) => e.href.includes("ai-tracker"));
|
|
1075
1087
|
e !== -1 && a.splice(e, 1);
|
|
@@ -1077,53 +1089,53 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1077
1089
|
return n.right.includes("0") ? a.filter((e) => n.right[e.right] === "1") : a;
|
|
1078
1090
|
});
|
|
1079
1091
|
return (e, n) => {
|
|
1080
|
-
let r =
|
|
1081
|
-
return
|
|
1092
|
+
let r = ce("TopButton");
|
|
1093
|
+
return P(), w(R(y), {
|
|
1082
1094
|
class: "top-projectSelectorSubmenu",
|
|
1083
1095
|
notch: !1,
|
|
1084
1096
|
pos: "2"
|
|
1085
1097
|
}, {
|
|
1086
|
-
opener:
|
|
1098
|
+
opener: V(() => [k(r, {
|
|
1087
1099
|
class: "top-projectSelectorSubmenu_opener",
|
|
1088
1100
|
"data-top-icon": "",
|
|
1089
1101
|
color: "theme"
|
|
1090
1102
|
})]),
|
|
1091
|
-
contentList:
|
|
1103
|
+
contentList: V(() => [(P(!0), E(S, null, I(o.value, (e) => (P(), E("li", gt, [D("a", {
|
|
1092
1104
|
href: e.href,
|
|
1093
1105
|
title: e.title,
|
|
1094
1106
|
"data-top-icon": e.icon,
|
|
1095
1107
|
"data-right": e.right
|
|
1096
|
-
}, null, 8,
|
|
1108
|
+
}, null, 8, _t)]))), 256)), D("li", vt, [D("a", {
|
|
1097
1109
|
href: t.url,
|
|
1098
1110
|
"data-top-icon": "",
|
|
1099
1111
|
target: "_blank"
|
|
1100
|
-
}, null, 8,
|
|
1112
|
+
}, null, 8, yt)])]),
|
|
1101
1113
|
_: 1
|
|
1102
1114
|
});
|
|
1103
1115
|
};
|
|
1104
1116
|
}
|
|
1105
|
-
}),
|
|
1106
|
-
localStorage.setItem(
|
|
1117
|
+
}), J = "ui_project_selector_total:", xt = 1440 * 60 * 1e3, Y = de(), St = F(0), X = F(null), Ct = (e, t) => {
|
|
1118
|
+
localStorage.setItem(J + e, JSON.stringify({
|
|
1107
1119
|
projectsTotal: t,
|
|
1108
|
-
expiresAt: Date.now() +
|
|
1120
|
+
expiresAt: Date.now() + xt
|
|
1109
1121
|
}));
|
|
1110
|
-
},
|
|
1111
|
-
let t = localStorage.getItem(
|
|
1122
|
+
}, wt = (e) => {
|
|
1123
|
+
let t = localStorage.getItem(J + e);
|
|
1112
1124
|
if (!t) return;
|
|
1113
1125
|
let { projectsTotal: n, expiresAt: r } = JSON.parse(t);
|
|
1114
1126
|
if (Date.now() > r) {
|
|
1115
|
-
localStorage.removeItem(
|
|
1127
|
+
localStorage.removeItem(J + e);
|
|
1116
1128
|
return;
|
|
1117
1129
|
}
|
|
1118
1130
|
return n;
|
|
1119
|
-
},
|
|
1120
|
-
|
|
1121
|
-
},
|
|
1131
|
+
}, Tt = (e, t = !0) => {
|
|
1132
|
+
Y.value = void 0, localStorage.removeItem(J + e), t && St.value++;
|
|
1133
|
+
}, Et = { class: "top-projectSelector_item" }, Dt = { class: "top-projectSelector_itemText" }, Ot = { class: "top-comment" }, kt = {
|
|
1122
1134
|
key: 0,
|
|
1123
1135
|
class: "top-comment"
|
|
1124
|
-
},
|
|
1136
|
+
}, At = ["href", "onClick"], jt = 1e3, Mt = /* @__PURE__ */ A({
|
|
1125
1137
|
__name: "projectSelector",
|
|
1126
|
-
props: /* @__PURE__ */
|
|
1138
|
+
props: /* @__PURE__ */ M({
|
|
1127
1139
|
modelValue: {},
|
|
1128
1140
|
client: {},
|
|
1129
1141
|
addLinksToProjects: {
|
|
@@ -1146,33 +1158,33 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1146
1158
|
setup(t) {
|
|
1147
1159
|
let n = e();
|
|
1148
1160
|
if (!window.mo?.user?.id) throw Error("TopProjectSelector: не удалось определить userId. Компонент требует авторизованного пользователя (см. window.mo.user.id)");
|
|
1149
|
-
let r = window.mo.user.id, i = t, a =
|
|
1150
|
-
if (!(!c.value && c.value !== 0)) return c.value <
|
|
1161
|
+
let r = window.mo.user.id, i = t, a = z(t, "modelValue"), o = mt(i.client, r), s = ht(i.client), c = F(wt(r)), d = F(null), f = C(() => i.placeholder ?? n.Projects.Select_project), p = C(() => !Y.value || !i.excludeProjectId ? Y.value : Y.value.filter((e) => e.id !== i.excludeProjectId)), m = C(() => {
|
|
1162
|
+
if (!(!c.value && c.value !== 0)) return c.value < jt ? "static" : "api";
|
|
1151
1163
|
});
|
|
1152
|
-
|
|
1164
|
+
B(St, () => {
|
|
1153
1165
|
v();
|
|
1154
|
-
}),
|
|
1155
|
-
!a.value.id || !i.addLinksToProjects ||
|
|
1166
|
+
}), B(a, () => {
|
|
1167
|
+
!a.value.id || !i.addLinksToProjects || lt(ut(a.value.id));
|
|
1156
1168
|
});
|
|
1157
1169
|
let h = async () => {
|
|
1158
|
-
|
|
1159
|
-
let e = await
|
|
1170
|
+
X.value ||= mt(i.client, r, { limit: jt }).call();
|
|
1171
|
+
let e = await X.value;
|
|
1160
1172
|
if (e.errors) {
|
|
1161
|
-
|
|
1173
|
+
X.value = null;
|
|
1162
1174
|
return;
|
|
1163
1175
|
}
|
|
1164
|
-
return
|
|
1176
|
+
return X.value = null, e;
|
|
1165
1177
|
}, g = async () => {
|
|
1166
1178
|
if (c.value) return;
|
|
1167
1179
|
let e = await h();
|
|
1168
|
-
e && (c.value = e.total, m.value === "static" && !
|
|
1180
|
+
e && (c.value = e.total, m.value === "static" && !Y.value && (Y.value = e.result), c.value && Ct(r, c.value));
|
|
1169
1181
|
}, _ = async (e) => {
|
|
1170
1182
|
let t = await s.changeParams({
|
|
1171
1183
|
url: e.name,
|
|
1172
1184
|
name: e.name
|
|
1173
1185
|
}).call();
|
|
1174
1186
|
if (!t.errors) {
|
|
1175
|
-
if (
|
|
1187
|
+
if (Y.value && m.value === "static") {
|
|
1176
1188
|
let n = {
|
|
1177
1189
|
id: Number(t.result),
|
|
1178
1190
|
user_id: r,
|
|
@@ -1181,27 +1193,27 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1181
1193
|
on: 0,
|
|
1182
1194
|
right: "11111111111111111111",
|
|
1183
1195
|
listItemProps: { attrs: { title: e.name } }
|
|
1184
|
-
}, i =
|
|
1185
|
-
|
|
1186
|
-
...
|
|
1196
|
+
}, i = Y.value.findIndex((e) => e.on === 0);
|
|
1197
|
+
Y.value = [
|
|
1198
|
+
...Y.value.slice(0, i),
|
|
1187
1199
|
n,
|
|
1188
|
-
...
|
|
1189
|
-
], c.value && (c.value += 1,
|
|
1200
|
+
...Y.value.slice(i)
|
|
1201
|
+
], c.value && (c.value += 1, Ct(r, c.value));
|
|
1190
1202
|
}
|
|
1191
|
-
m.value === "api" &&
|
|
1203
|
+
m.value === "api" && Tt(r);
|
|
1192
1204
|
}
|
|
1193
1205
|
}, v = () => {
|
|
1194
1206
|
m.value === "api" && d.value?.resetCache(!0);
|
|
1195
1207
|
}, ee = async () => {
|
|
1196
|
-
if (
|
|
1208
|
+
if (Y.value || m.value !== "static") return;
|
|
1197
1209
|
let e = await h();
|
|
1198
|
-
e && (
|
|
1210
|
+
e && (Y.value = e.result);
|
|
1199
1211
|
};
|
|
1200
|
-
return
|
|
1212
|
+
return ae(async () => {
|
|
1201
1213
|
await g();
|
|
1202
1214
|
}), (e, n) => {
|
|
1203
|
-
let r =
|
|
1204
|
-
return
|
|
1215
|
+
let r = ce("TopButton");
|
|
1216
|
+
return P(), w(x, {
|
|
1205
1217
|
ref_key: "refSelector",
|
|
1206
1218
|
ref: d,
|
|
1207
1219
|
class: "top-projectSelector",
|
|
@@ -1217,44 +1229,44 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1217
1229
|
],
|
|
1218
1230
|
placeholder: f.value,
|
|
1219
1231
|
hasCloserBtn: "",
|
|
1220
|
-
api: m.value === "api" ?
|
|
1221
|
-
apiSetSearchParams: m.value === "api" ? (...e) =>
|
|
1232
|
+
api: m.value === "api" ? R(o) : void 0,
|
|
1233
|
+
apiSetSearchParams: m.value === "api" ? (...e) => R(pt)(...e) : void 0,
|
|
1222
1234
|
useCache: "",
|
|
1223
1235
|
appendSearchToResult: "",
|
|
1224
1236
|
appendSearchAllowDuplicate: "",
|
|
1225
|
-
appendSearchToResultCond:
|
|
1237
|
+
appendSearchToResultCond: R(l),
|
|
1226
1238
|
appendWithoutSelect: "",
|
|
1227
1239
|
buttonProps: t.buttonProps,
|
|
1228
1240
|
openerShortcut: t.openerShortcut,
|
|
1229
1241
|
onAppendItem: _,
|
|
1230
1242
|
onOpen: ee
|
|
1231
1243
|
}, {
|
|
1232
|
-
item:
|
|
1233
|
-
t.addLinksToProjects ? (
|
|
1244
|
+
item: V(({ item: i }) => [D("div", Et, [D("div", Dt, [i.id ? (P(), E(S, { key: 0 }, [O(L(R(u)(i.name, 20)) + " ", 1), D("span", Ot, " id " + L(i.id), 1)], 64)) : (P(), E(S, { key: 1 }, [i.listItemProps?.type ? T("", !0) : (P(), E("div", kt, L(e.$i18n.Projects.Add_project) + ": ", 1)), O(" " + L(i.name), 1)], 64))]), i.id ? (P(), E(S, { key: 0 }, [
|
|
1245
|
+
t.addLinksToProjects ? (P(), E("a", {
|
|
1234
1246
|
key: 0,
|
|
1235
1247
|
class: "top-projectSelector_itemLink",
|
|
1236
|
-
href:
|
|
1237
|
-
onClick:
|
|
1238
|
-
}, null, 8,
|
|
1239
|
-
e.$core.state.isMobile ?
|
|
1248
|
+
href: R(ut)(i.id),
|
|
1249
|
+
onClick: H((e) => R(lt)(R(ut)(i.id), e), ["prevent", "stop"])
|
|
1250
|
+
}, null, 8, At)) : T("", !0),
|
|
1251
|
+
e.$core.state.isMobile ? T("", !0) : (P(), w(r, {
|
|
1240
1252
|
key: 1,
|
|
1241
1253
|
class: "top-projectSelector_itemExtLink",
|
|
1242
|
-
href:
|
|
1254
|
+
href: R(ft)(i.url),
|
|
1243
1255
|
"data-top-icon": "",
|
|
1244
1256
|
color: "theme",
|
|
1245
1257
|
target: "_blank",
|
|
1246
|
-
onClick: n[0] ||=
|
|
1258
|
+
onClick: n[0] ||= H(() => {}, ["stop"])
|
|
1247
1259
|
}, null, 8, ["href"])),
|
|
1248
|
-
|
|
1260
|
+
k(bt, {
|
|
1249
1261
|
id: i.id,
|
|
1250
1262
|
right: i.right ?? void 0,
|
|
1251
|
-
url:
|
|
1263
|
+
url: R(ft)(i.url)
|
|
1252
1264
|
}, null, 8, [
|
|
1253
1265
|
"id",
|
|
1254
1266
|
"right",
|
|
1255
1267
|
"url"
|
|
1256
1268
|
])
|
|
1257
|
-
], 64)) :
|
|
1269
|
+
], 64)) : T("", !0)])]),
|
|
1258
1270
|
_: 1
|
|
1259
1271
|
}, 8, [
|
|
1260
1272
|
"modelValue",
|
|
@@ -1270,40 +1282,40 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1270
1282
|
]);
|
|
1271
1283
|
};
|
|
1272
1284
|
}
|
|
1273
|
-
}),
|
|
1274
|
-
e =
|
|
1285
|
+
}), Nt = (e) => "-" + e, Z = (e) => e[0] === "-" ? e.substring(1) : e, Q = (e, t) => {
|
|
1286
|
+
e = Z(e);
|
|
1275
1287
|
let n = t.find((t) => t.id === e);
|
|
1276
1288
|
if (n) return n;
|
|
1277
|
-
},
|
|
1289
|
+
}, Pt = (e, t, n) => {
|
|
1278
1290
|
t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
|
|
1279
1291
|
let r = c.genElPopupOpener("div", t);
|
|
1280
1292
|
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) => {
|
|
1281
1293
|
t.preventDefault(), t.stopPropagation(), r.onclick = null;
|
|
1282
|
-
let i =
|
|
1294
|
+
let i = F(e.modelValue);
|
|
1283
1295
|
s(r, "topTagSelectorTarget", {
|
|
1284
1296
|
model: i,
|
|
1285
1297
|
mode: e.mode,
|
|
1286
1298
|
targetId: e.targetId,
|
|
1287
1299
|
filters: e.filters,
|
|
1288
1300
|
payload: e.payload
|
|
1289
|
-
}), delete r.dataset.topPopupDisabled,
|
|
1290
|
-
e.modelValue = i.value,
|
|
1301
|
+
}), delete r.dataset.topPopupDisabled, j(e.modelValue) || B(i, () => {
|
|
1302
|
+
e.modelValue = i.value, It(r, e, n);
|
|
1291
1303
|
}), r.click();
|
|
1292
|
-
},
|
|
1304
|
+
}, j(e.modelValue) ? B(e.modelValue, () => It(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
|
|
1293
1305
|
e.modelValue = t;
|
|
1294
1306
|
let i = s(r, "topTagSelectorTarget");
|
|
1295
|
-
i && (i.model.value = t),
|
|
1296
|
-
}),
|
|
1297
|
-
},
|
|
1307
|
+
i && (i.model.value = t), It(r, e, n);
|
|
1308
|
+
}), It(r, e, n), r;
|
|
1309
|
+
}, Ft = (e, t) => {
|
|
1298
1310
|
s(e, "topTagSelectorRender")?.(t);
|
|
1299
|
-
},
|
|
1300
|
-
let i =
|
|
1311
|
+
}, It = (t, n, r) => {
|
|
1312
|
+
let i = R(n.modelValue);
|
|
1301
1313
|
if (t.classList.toggle("top-tagSelector-selectedOne", !i.length || i.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", i.length > 5), n.mode === "setter" && n.filters) {
|
|
1302
1314
|
t.innerHTML = `<div>${r}</div>`;
|
|
1303
1315
|
return;
|
|
1304
1316
|
}
|
|
1305
1317
|
if (t.innerHTML = "", !i.length && n.mode === "filter") {
|
|
1306
|
-
let n =
|
|
1318
|
+
let n = Lt({
|
|
1307
1319
|
id: "all",
|
|
1308
1320
|
colorId: "",
|
|
1309
1321
|
name: e().Common?.All_tags ?? "",
|
|
@@ -1312,18 +1324,18 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1312
1324
|
t.append(n);
|
|
1313
1325
|
}
|
|
1314
1326
|
i.forEach((e) => {
|
|
1315
|
-
let r =
|
|
1316
|
-
id:
|
|
1317
|
-
colorId:
|
|
1318
|
-
name:
|
|
1319
|
-
state:
|
|
1327
|
+
let r = Lt({
|
|
1328
|
+
id: Z(e),
|
|
1329
|
+
colorId: Q(e, n.tags)?.color_id ?? "",
|
|
1330
|
+
name: Q(e, n.tags)?.name ?? "",
|
|
1331
|
+
state: Z(e) === e ? "selected" : "excluded"
|
|
1320
1332
|
});
|
|
1321
1333
|
t.append(r);
|
|
1322
1334
|
});
|
|
1323
|
-
},
|
|
1335
|
+
}, Lt = (e) => {
|
|
1324
1336
|
let t = document.createElement("div");
|
|
1325
1337
|
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;
|
|
1326
|
-
},
|
|
1338
|
+
}, Rt = [
|
|
1327
1339
|
{
|
|
1328
1340
|
id: "1",
|
|
1329
1341
|
name: "Without Tag",
|
|
@@ -1374,11 +1386,11 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1374
1386
|
name: "Turquoise",
|
|
1375
1387
|
color_id: "10"
|
|
1376
1388
|
}
|
|
1377
|
-
],
|
|
1389
|
+
], zt = [
|
|
1378
1390
|
"data-tag_id",
|
|
1379
1391
|
"data-tag_color_id",
|
|
1380
1392
|
"title"
|
|
1381
|
-
],
|
|
1393
|
+
], Bt = /* @__PURE__ */ A({
|
|
1382
1394
|
__name: "tagIcon",
|
|
1383
1395
|
props: {
|
|
1384
1396
|
id: {},
|
|
@@ -1387,8 +1399,8 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1387
1399
|
state: {}
|
|
1388
1400
|
},
|
|
1389
1401
|
setup(e) {
|
|
1390
|
-
return (t, n) => (
|
|
1391
|
-
class:
|
|
1402
|
+
return (t, n) => (P(), E("div", {
|
|
1403
|
+
class: N({
|
|
1392
1404
|
"top-tagSelector_tagIcon": !0,
|
|
1393
1405
|
"top-tagSelector-active": !!e.state,
|
|
1394
1406
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
@@ -1396,11 +1408,11 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1396
1408
|
"data-tag_id": e.id,
|
|
1397
1409
|
"data-tag_color_id": e.colorId,
|
|
1398
1410
|
title: e.name
|
|
1399
|
-
}, null, 10,
|
|
1411
|
+
}, null, 10, zt));
|
|
1400
1412
|
}
|
|
1401
|
-
}), Vt = ["contenteditable", "onKeydown"], Ht = /* @__PURE__ */
|
|
1413
|
+
}), Vt = ["contenteditable", "onKeydown"], Ht = /* @__PURE__ */ A({
|
|
1402
1414
|
__name: "tagPopupListItem",
|
|
1403
|
-
props: /* @__PURE__ */
|
|
1415
|
+
props: /* @__PURE__ */ M({
|
|
1404
1416
|
editable: { type: Boolean },
|
|
1405
1417
|
disabled: { type: Boolean },
|
|
1406
1418
|
canExclude: { type: Boolean },
|
|
@@ -1412,18 +1424,18 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1412
1424
|
name: { required: !0 },
|
|
1413
1425
|
nameModifiers: {}
|
|
1414
1426
|
}),
|
|
1415
|
-
emits: /* @__PURE__ */
|
|
1427
|
+
emits: /* @__PURE__ */ M([
|
|
1416
1428
|
"update:name",
|
|
1417
1429
|
"unselect",
|
|
1418
1430
|
"exclude",
|
|
1419
1431
|
"select"
|
|
1420
1432
|
], ["update:name"]),
|
|
1421
1433
|
setup(e, { emit: t }) {
|
|
1422
|
-
let n = e, r = t, i =
|
|
1434
|
+
let n = e, r = t, i = z(e, "name"), a = F(null), o = C(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
|
|
1423
1435
|
contenteditable: s.value,
|
|
1424
1436
|
onpaste: (e) => e.preventDefault()
|
|
1425
|
-
}), s =
|
|
1426
|
-
s.value = !0, await
|
|
1437
|
+
}), s = F(!1), c = async () => {
|
|
1438
|
+
s.value = !0, await ie(), a.value?.focus();
|
|
1427
1439
|
}, l = () => {
|
|
1428
1440
|
let e = a.value?.innerText;
|
|
1429
1441
|
if (!e) return u();
|
|
@@ -1435,8 +1447,8 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1435
1447
|
let t = "selected";
|
|
1436
1448
|
n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
|
|
1437
1449
|
};
|
|
1438
|
-
return (t, n) => (
|
|
1439
|
-
class:
|
|
1450
|
+
return (t, n) => (P(), w(v, {
|
|
1451
|
+
class: N({
|
|
1440
1452
|
"top-tagSelector_tagListItem": !0,
|
|
1441
1453
|
"top-tagSelector_tagListItem-inEdit": s.value,
|
|
1442
1454
|
"top-tagSelector_tagListItem-disabled": e.disabled,
|
|
@@ -1444,10 +1456,10 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1444
1456
|
"top-tagSelector-active": !!e.state,
|
|
1445
1457
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
1446
1458
|
}),
|
|
1447
|
-
onClick:
|
|
1459
|
+
onClick: H(d, ["stop"])
|
|
1448
1460
|
}, {
|
|
1449
|
-
default:
|
|
1450
|
-
|
|
1461
|
+
default: V(() => [
|
|
1462
|
+
k(Bt, {
|
|
1451
1463
|
id: e.id,
|
|
1452
1464
|
name: i.value,
|
|
1453
1465
|
colorId: e.colorId,
|
|
@@ -1458,31 +1470,31 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1458
1470
|
"colorId",
|
|
1459
1471
|
"state"
|
|
1460
1472
|
]),
|
|
1461
|
-
|
|
1473
|
+
D("span", re({
|
|
1462
1474
|
ref_key: "elName",
|
|
1463
1475
|
ref: a,
|
|
1464
1476
|
class: "top-tagSelector_tagListItemName",
|
|
1465
1477
|
contenteditable: s.value ? "plaintext-only" : !1
|
|
1466
|
-
}, o.value, { onKeydown: [
|
|
1467
|
-
e.editable ? (
|
|
1478
|
+
}, o.value, { onKeydown: [me(H(l, ["stop"]), ["enter"]), me(H(u, ["stop"]), ["esc"])] }), L(i.value), 17, Vt),
|
|
1479
|
+
e.editable ? (P(), E(S, { key: 0 }, [s.value ? (P(), E("span", {
|
|
1468
1480
|
key: 1,
|
|
1469
1481
|
"data-top-icon": "",
|
|
1470
1482
|
class: "top-tagSelector_edit",
|
|
1471
|
-
onClick:
|
|
1472
|
-
})) : (
|
|
1483
|
+
onClick: H(l, ["stop"])
|
|
1484
|
+
})) : (P(), E("span", {
|
|
1473
1485
|
key: 0,
|
|
1474
1486
|
"data-top-icon": "",
|
|
1475
1487
|
class: "top-tagSelector_edit",
|
|
1476
1488
|
onClick: c
|
|
1477
|
-
}))], 64)) :
|
|
1489
|
+
}))], 64)) : T("", !0)
|
|
1478
1490
|
]),
|
|
1479
1491
|
_: 1
|
|
1480
1492
|
}, 8, ["class"]));
|
|
1481
1493
|
}
|
|
1482
|
-
}), Ut = { key: 1 }, Wt = /* @__PURE__ */
|
|
1494
|
+
}), Ut = { key: 1 }, Wt = /* @__PURE__ */ A({
|
|
1483
1495
|
inheritAttrs: !1,
|
|
1484
1496
|
__name: "popupOpener",
|
|
1485
|
-
props: /* @__PURE__ */
|
|
1497
|
+
props: /* @__PURE__ */ M({
|
|
1486
1498
|
modelValue: {},
|
|
1487
1499
|
id: {},
|
|
1488
1500
|
tags: {},
|
|
@@ -1498,7 +1510,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1498
1510
|
}),
|
|
1499
1511
|
emits: ["update:modelValue"],
|
|
1500
1512
|
setup(e) {
|
|
1501
|
-
let t = e, n =
|
|
1513
|
+
let t = e, n = z(e, "modelValue"), i = t.useTopButton ? r : "div", a = t.useTopButton ? "html" : "default", o = {
|
|
1502
1514
|
model: n,
|
|
1503
1515
|
mode: t.mode,
|
|
1504
1516
|
targetId: t.targetId,
|
|
@@ -1506,9 +1518,9 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1506
1518
|
payload: t.payload
|
|
1507
1519
|
};
|
|
1508
1520
|
return (r, s) => {
|
|
1509
|
-
let c =
|
|
1510
|
-
return
|
|
1511
|
-
default:
|
|
1521
|
+
let c = le("top-data");
|
|
1522
|
+
return P(), w(g, { id: e.id }, {
|
|
1523
|
+
default: V(() => [pe((P(), w(ue(R(i)), re({
|
|
1512
1524
|
class: {
|
|
1513
1525
|
"top-tagSelector": !0,
|
|
1514
1526
|
"top-tagSelector-useTopButton": t.useTopButton,
|
|
@@ -1523,17 +1535,17 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1523
1535
|
color: "theme",
|
|
1524
1536
|
styling: e.styling
|
|
1525
1537
|
}, r.$attrs), {
|
|
1526
|
-
[
|
|
1538
|
+
[R(a)]: V(() => [!n.value.length && e.mode === "filter" ? (P(), w(Bt, {
|
|
1527
1539
|
key: 0,
|
|
1528
1540
|
id: "all",
|
|
1529
1541
|
colorId: "",
|
|
1530
1542
|
name: r.$i18n.Common.All_tags ?? "",
|
|
1531
1543
|
state: ""
|
|
1532
|
-
}, null, 8, ["name"])) :
|
|
1533
|
-
id:
|
|
1534
|
-
colorId:
|
|
1535
|
-
name:
|
|
1536
|
-
state:
|
|
1544
|
+
}, null, 8, ["name"])) : T("", !0), e.mode === "setter" && e.filters ? (P(), E("div", Ut, [se(r.$slots, "default")])) : (P(!0), E(S, { key: 2 }, I(n.value, (t) => (P(), w(Bt, {
|
|
1545
|
+
id: R(Z)(t),
|
|
1546
|
+
colorId: R(Q)(t, e.tags)?.color_id ?? "",
|
|
1547
|
+
name: R(Q)(t, e.tags)?.name ?? "",
|
|
1548
|
+
state: R(Z)(t) === t ? "selected" : "excluded"
|
|
1537
1549
|
}, null, 8, [
|
|
1538
1550
|
"id",
|
|
1539
1551
|
"colorId",
|
|
@@ -1550,9 +1562,9 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1550
1562
|
}, 8, ["id"]);
|
|
1551
1563
|
};
|
|
1552
1564
|
}
|
|
1553
|
-
}), Gt = /* @__PURE__ */
|
|
1565
|
+
}), Gt = /* @__PURE__ */ A({
|
|
1554
1566
|
__name: "tagSelector",
|
|
1555
|
-
props: /* @__PURE__ */
|
|
1567
|
+
props: /* @__PURE__ */ M({
|
|
1556
1568
|
modelValue: {},
|
|
1557
1569
|
tags: {},
|
|
1558
1570
|
tagsEditable: { type: Boolean },
|
|
@@ -1573,20 +1585,20 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1573
1585
|
}, {
|
|
1574
1586
|
modelValue: { required: !0 },
|
|
1575
1587
|
modelModifiers: {},
|
|
1576
|
-
tags: { default:
|
|
1588
|
+
tags: { default: oe(Rt) },
|
|
1577
1589
|
tagsModifiers: {}
|
|
1578
1590
|
}),
|
|
1579
|
-
emits: /* @__PURE__ */
|
|
1591
|
+
emits: /* @__PURE__ */ M([
|
|
1580
1592
|
"selector",
|
|
1581
1593
|
"setter",
|
|
1582
1594
|
"tagsChanged"
|
|
1583
1595
|
], ["update:modelValue", "update:tags"]),
|
|
1584
1596
|
setup(a, { emit: o }) {
|
|
1585
|
-
let c = e(), l = a, u =
|
|
1597
|
+
let c = e(), l = a, u = z(a, "modelValue"), d = z(a, "tags"), f = o, p = n((e, t) => {
|
|
1586
1598
|
f(e, t);
|
|
1587
1599
|
}, l.emitDelay);
|
|
1588
1600
|
l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
|
|
1589
|
-
let m = l.id ?? "top-popup-id-" + Math.random(), h =
|
|
1601
|
+
let m = l.id ?? "top-popup-id-" + Math.random(), h = F("add"), g = () => {
|
|
1590
1602
|
let e = " " + c.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
|
|
1591
1603
|
return t.set("add", {
|
|
1592
1604
|
value: "add",
|
|
@@ -1598,35 +1610,35 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1598
1610
|
value: "delete",
|
|
1599
1611
|
title: c.Common.Delete + e
|
|
1600
1612
|
}), t;
|
|
1601
|
-
}, _ =
|
|
1613
|
+
}, _ = de({
|
|
1602
1614
|
model: u,
|
|
1603
1615
|
mode: "filter",
|
|
1604
1616
|
targetId: void 0,
|
|
1605
1617
|
filters: void 0,
|
|
1606
1618
|
payload: void 0
|
|
1607
1619
|
});
|
|
1608
|
-
|
|
1620
|
+
B(u, () => {
|
|
1609
1621
|
p("selector", u.value);
|
|
1610
1622
|
});
|
|
1611
|
-
let ee =
|
|
1623
|
+
let ee = C(() => {
|
|
1612
1624
|
if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
|
|
1613
|
-
}),
|
|
1625
|
+
}), b = (e) => {
|
|
1614
1626
|
if (e !== "all") {
|
|
1615
1627
|
if (_.value.model.value.includes(e)) return "selected";
|
|
1616
|
-
if (_.value.model.value.includes(
|
|
1628
|
+
if (_.value.model.value.includes(Nt(e))) return "excluded";
|
|
1617
1629
|
}
|
|
1618
1630
|
return e === "all" && !_.value.model.value.length ? "selected" : "";
|
|
1619
|
-
},
|
|
1620
|
-
let n =
|
|
1631
|
+
}, x = (e, t) => {
|
|
1632
|
+
let n = Nt(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
|
|
1621
1633
|
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", {
|
|
1622
1634
|
tagsIds: r,
|
|
1623
1635
|
targetId: _.value.targetId,
|
|
1624
1636
|
payload: _.value.payload
|
|
1625
1637
|
});
|
|
1626
|
-
},
|
|
1638
|
+
}, te = C(() => {
|
|
1627
1639
|
let e = "top-tagSelector_popup";
|
|
1628
1640
|
return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
|
|
1629
|
-
}),
|
|
1641
|
+
}), D = () => {
|
|
1630
1642
|
let e = prompt("", "New tag");
|
|
1631
1643
|
if (!e || e === "New tag") return;
|
|
1632
1644
|
let t = d.value.length + 1;
|
|
@@ -1635,7 +1647,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1635
1647
|
name: e,
|
|
1636
1648
|
color_id: String((t - 1) % 10 + 1)
|
|
1637
1649
|
}), f("tagsChanged", d.value);
|
|
1638
|
-
},
|
|
1650
|
+
}, A = (e) => {
|
|
1639
1651
|
if (_.value = s(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1640
1652
|
if (_.value.filters && (h.value = "add", _.value.model.value = []), !t.$?.ui.sortable) {
|
|
1641
1653
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
@@ -1655,13 +1667,13 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1655
1667
|
}), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
|
|
1656
1668
|
}
|
|
1657
1669
|
});
|
|
1658
|
-
},
|
|
1670
|
+
}, j = (e) => {
|
|
1659
1671
|
t.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
|
|
1660
1672
|
};
|
|
1661
|
-
return (e, t) => (
|
|
1673
|
+
return (e, t) => (P(), E(S, null, [k(Wt, {
|
|
1662
1674
|
modelValue: u.value,
|
|
1663
1675
|
"onUpdate:modelValue": t[0] ||= (e) => u.value = e,
|
|
1664
|
-
id:
|
|
1676
|
+
id: R(m),
|
|
1665
1677
|
tags: d.value,
|
|
1666
1678
|
styling: a.styling,
|
|
1667
1679
|
mode: "filter",
|
|
@@ -1672,36 +1684,36 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1672
1684
|
"tags",
|
|
1673
1685
|
"styling",
|
|
1674
1686
|
"useTopButton"
|
|
1675
|
-
]),
|
|
1676
|
-
id:
|
|
1677
|
-
class:
|
|
1678
|
-
onOpen: t[4] ||= (e) =>
|
|
1679
|
-
onClose: t[5] ||= (e) =>
|
|
1687
|
+
]), k(y, {
|
|
1688
|
+
id: R(m),
|
|
1689
|
+
class: N(te.value),
|
|
1690
|
+
onOpen: t[4] ||= (e) => A(e),
|
|
1691
|
+
onClose: t[5] ||= (e) => j(e),
|
|
1680
1692
|
"transition-duration": 50
|
|
1681
|
-
},
|
|
1682
|
-
contentList:
|
|
1683
|
-
|
|
1693
|
+
}, ne({
|
|
1694
|
+
contentList: V(() => [
|
|
1695
|
+
R(_).mode === "filter" && !a.singleMode ? (P(), w(Ht, {
|
|
1684
1696
|
key: 0,
|
|
1685
1697
|
id: "all",
|
|
1686
1698
|
colorId: "",
|
|
1687
1699
|
name: e.$i18n.Common.All_tags ?? "",
|
|
1688
|
-
state:
|
|
1689
|
-
onSelect: t[3] ||= (e) =>
|
|
1690
|
-
}, null, 8, ["name", "state"])) :
|
|
1691
|
-
(
|
|
1700
|
+
state: R(_).model.value.length ? "" : "selected",
|
|
1701
|
+
onSelect: t[3] ||= (e) => R(_).model.value = []
|
|
1702
|
+
}, null, 8, ["name", "state"])) : T("", !0),
|
|
1703
|
+
(P(!0), E(S, null, I(d.value, (e) => (P(), w(Ht, {
|
|
1692
1704
|
key: e.id,
|
|
1693
1705
|
id: e.id,
|
|
1694
1706
|
colorId: e.color_id,
|
|
1695
1707
|
name: e.name,
|
|
1696
|
-
state:
|
|
1697
|
-
canExclude:
|
|
1708
|
+
state: b(e.id),
|
|
1709
|
+
canExclude: R(_).mode === "filter" && !a.singleMode,
|
|
1698
1710
|
editable: a.tagsEditable,
|
|
1699
|
-
disabled: ee.value &&
|
|
1700
|
-
onUnselect: (t) =>
|
|
1701
|
-
onSelect: (t) =>
|
|
1702
|
-
onExclude: (t) =>
|
|
1711
|
+
disabled: ee.value && b(e.id) === "",
|
|
1712
|
+
onUnselect: (t) => x(e.id, "unselect"),
|
|
1713
|
+
onSelect: (t) => x(e.id, "select"),
|
|
1714
|
+
onExclude: (t) => x(e.id, "exclude"),
|
|
1703
1715
|
"onUpdate:name": (t) => {
|
|
1704
|
-
e.name = t,
|
|
1716
|
+
e.name = t, R(p)("tagsChanged", d.value);
|
|
1705
1717
|
}
|
|
1706
1718
|
}, null, 8, [
|
|
1707
1719
|
"id",
|
|
@@ -1716,36 +1728,36 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1716
1728
|
"onExclude",
|
|
1717
1729
|
"onUpdate:name"
|
|
1718
1730
|
]))), 128)),
|
|
1719
|
-
a.tagsEditable && d.value.length < a.tagsMax && d.value.length < 20 ? (
|
|
1731
|
+
a.tagsEditable && d.value.length < a.tagsMax && d.value.length < 20 ? (P(), w(v, {
|
|
1720
1732
|
key: 1,
|
|
1721
1733
|
"data-top-icon": "",
|
|
1722
|
-
onClick:
|
|
1734
|
+
onClick: H(D, ["stop"])
|
|
1723
1735
|
}, {
|
|
1724
|
-
default:
|
|
1736
|
+
default: V(() => [O(L(e.$i18n.Common.Add), 1)]),
|
|
1725
1737
|
_: 1
|
|
1726
|
-
})) :
|
|
1738
|
+
})) : T("", !0)
|
|
1727
1739
|
]),
|
|
1728
1740
|
_: 2
|
|
1729
|
-
}, [
|
|
1741
|
+
}, [R(_).mode === "setter" && R(_).filters ? {
|
|
1730
1742
|
name: "header",
|
|
1731
|
-
fn:
|
|
1743
|
+
fn: V(() => [k(i, {
|
|
1732
1744
|
modelValue: h.value,
|
|
1733
1745
|
"onUpdate:modelValue": t[1] ||= (e) => h.value = e,
|
|
1734
1746
|
options: g()
|
|
1735
1747
|
}, null, 8, ["modelValue", "options"])]),
|
|
1736
1748
|
key: "0"
|
|
1737
|
-
} : void 0,
|
|
1749
|
+
} : void 0, R(_).mode === "setter" && R(_).filters ? {
|
|
1738
1750
|
name: "footer",
|
|
1739
|
-
fn:
|
|
1740
|
-
default:
|
|
1751
|
+
fn: V(() => [k(r, { color: "theme" }, {
|
|
1752
|
+
default: V(() => [O(L(e.$i18n.Common.Cancel), 1)]),
|
|
1741
1753
|
_: 1
|
|
1742
|
-
}),
|
|
1743
|
-
tagsIds:
|
|
1744
|
-
filters:
|
|
1754
|
+
}), k(r, { onClick: t[2] ||= (e) => R(p)("setter", {
|
|
1755
|
+
tagsIds: R(_).model.value,
|
|
1756
|
+
filters: R(_).filters,
|
|
1745
1757
|
filtersAction: h.value,
|
|
1746
|
-
payload:
|
|
1758
|
+
payload: R(_).payload
|
|
1747
1759
|
}) }, {
|
|
1748
|
-
default:
|
|
1760
|
+
default: V(() => [O(L(h.value === "add" ? e.$i18n.Common.Add : "") + " " + L(h.value === "replace" ? e.$i18n.Common.Replace : "") + " " + L(h.value === "delete" ? e.$i18n.Common.Delete : ""), 1)]),
|
|
1749
1761
|
_: 1
|
|
1750
1762
|
})]),
|
|
1751
1763
|
key: "1"
|
|
@@ -1753,6 +1765,6 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
|
|
|
1753
1765
|
}
|
|
1754
1766
|
});
|
|
1755
1767
|
//#endregion
|
|
1756
|
-
export {
|
|
1768
|
+
export { _e as TopCompetitorSelector, nt as TopGroupSelector, Mt as TopProjectSelector, Ie as TopRegionSelector, Gt as TopTagSelector, Wt as TopTagSelectorPopupOpener, Bt as TopTagSelectorTagIcon, Tt as clearCache, je as dialogRegionSelector, Ae as findRegion, Pt as genElTopTagSelectorPopupOpener, De as genSearcherByKey, Ft as renderElTopTagSelectorPopupOpener, ve as useItemsFromCompetitors };
|
|
1757
1769
|
|
|
1758
1770
|
//# sourceMappingURL=project.js.map
|