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