@topvisor/ui 1.0.26-0 → 1.0.26-2
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/assets/extra.css +1 -0
- package/components/extra/extra.d.ts +3 -0
- package/components/extra/rive/composables.d.ts +4 -0
- package/components/extra/rive/rive.vue.d.ts +11 -0
- package/components/extra/rive/types/competitor.d.ts +0 -0
- package/components/extra/rive/types.d.ts +7 -0
- package/extra/extra.amd.js +2 -0
- package/extra/extra.amd.js.map +1 -0
- package/extra/extra.d.ts +2 -0
- package/extra/extra.js +72 -0
- package/extra/extra.js.map +1 -0
- package/package.json +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +198 -195
- package/project/project.js.map +1 -1
package/project/project.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Core as be } from "../core/app.js";
|
|
2
|
-
import { defineComponent as P, mergeModels as N, useModel as D, computed as E, createElementBlock as B, openBlock as k, createBlock as b, unref as y, withCtx as _, Fragment as Y, renderList as se, normalizeClass as X, createElementVNode as he, toDisplayString as K, createVNode as A, createTextVNode as G, ref as F, watch as w, createCommentVNode as q, withModifiers as z, mergeProps as Se, withKeys as
|
|
2
|
+
import { defineComponent as P, mergeModels as N, useModel as D, computed as E, createElementBlock as B, openBlock as k, createBlock as b, unref as y, withCtx as _, Fragment as Y, renderList as se, normalizeClass as X, createElementVNode as he, toDisplayString as K, createVNode as A, createTextVNode as G, ref as F, watch as w, createCommentVNode as q, withModifiers as z, mergeProps as Se, withKeys as de, nextTick as Ve, resolveDirective as Ee, withDirectives as Me, resolveDynamicComponent as Ke, renderSlot as $e, shallowRef as we, createSlots as Le, reactive as Ae, toValue as ce, isRef as ge } from "vue";
|
|
3
3
|
import { u as R, C as J, _ as H, x as ie, d as Re } from "../.chunks/forms-BEMrEl5V.es.js";
|
|
4
|
-
import { _ as Ie, a as
|
|
4
|
+
import { _ as Ie, a as ue, b as Oe } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-DMQVN3dP.es.js";
|
|
5
5
|
import { _ as Ne } from "../.chunks/menu.vue_vue_type_style_index_0_lang-DzNVeeZl.es.js";
|
|
6
6
|
import { u as De } from "../.chunks/utils-DIly8mml.es.js";
|
|
7
7
|
import { getSearcherGIcon as Fe, getLangLabel as qe, getDeviceGIcon as Pe } from "../utils/searchers.js";
|
|
@@ -21,7 +21,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
21
21
|
}),
|
|
22
22
|
emits: ["update:modelValue"],
|
|
23
23
|
setup(t) {
|
|
24
|
-
const l = t,
|
|
24
|
+
const l = t, o = D(t, "modelValue"), e = E(() => {
|
|
25
25
|
if (l.showSelectAllItem)
|
|
26
26
|
return {
|
|
27
27
|
icon: "",
|
|
@@ -40,30 +40,30 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
40
40
|
icon2: ""
|
|
41
41
|
}, {
|
|
42
42
|
default: _(() => {
|
|
43
|
-
var
|
|
43
|
+
var n;
|
|
44
44
|
return [
|
|
45
|
-
G(K((
|
|
45
|
+
G(K((n = i.items.find((u) => {
|
|
46
46
|
var m;
|
|
47
|
-
return
|
|
48
|
-
})) == null ? void 0 :
|
|
47
|
+
return u.value === ((m = o.value) == null ? void 0 : m[0]);
|
|
48
|
+
})) == null ? void 0 : n.content), 1)
|
|
49
49
|
];
|
|
50
50
|
}),
|
|
51
51
|
_: 1
|
|
52
52
|
})
|
|
53
53
|
]),
|
|
54
54
|
contentList: _(() => [
|
|
55
|
-
(k(!0), B(Y, null, se(i.items, (
|
|
55
|
+
(k(!0), B(Y, null, se(i.items, (n, u) => {
|
|
56
56
|
var m;
|
|
57
|
-
return k(), b(
|
|
57
|
+
return k(), b(ue, {
|
|
58
58
|
class: X({
|
|
59
|
-
"top-active": (m =
|
|
59
|
+
"top-active": (m = o.value) == null ? void 0 : m.includes(n.value)
|
|
60
60
|
}),
|
|
61
|
-
"data-top-icon":
|
|
62
|
-
title:
|
|
63
|
-
onClick: () =>
|
|
61
|
+
"data-top-icon": n.icon,
|
|
62
|
+
title: n.title,
|
|
63
|
+
onClick: () => o.value = [n.value]
|
|
64
64
|
}, {
|
|
65
65
|
default: _(() => [
|
|
66
|
-
he("span", ze, K(
|
|
66
|
+
he("span", ze, K(n.content), 1)
|
|
67
67
|
]),
|
|
68
68
|
_: 2
|
|
69
69
|
}, 1032, ["class", "data-top-icon", "title", "onClick"]);
|
|
@@ -72,8 +72,8 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
72
72
|
_: 1
|
|
73
73
|
})) : (k(), b(Ne, {
|
|
74
74
|
key: 1,
|
|
75
|
-
modelValue:
|
|
76
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
75
|
+
modelValue: o.value,
|
|
76
|
+
"onUpdate:modelValue": a[0] || (a[0] = (n) => o.value = n),
|
|
77
77
|
items: i.items,
|
|
78
78
|
isMultiple: !0,
|
|
79
79
|
styling: "bar",
|
|
@@ -118,71 +118,74 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
118
118
|
index: te,
|
|
119
119
|
lang: "ru",
|
|
120
120
|
name: "Without region"
|
|
121
|
-
}, We = () => (ae.name = R().Common.Autoselect, ae), Ye = () => (We(), re.name = R().Common.Autoselect, console.log(re), re), He = () => (fe.name = R().Keywords.Without_region, fe), ke = (t = !1, l = !1,
|
|
121
|
+
}, We = () => (ae.name = R().Common.Autoselect, ae), Ye = () => (We(), re.name = R().Common.Autoselect, console.log(re), re), He = () => (fe.name = R().Keywords.Without_region, fe), ke = (t = !1, l = !1, o = []) => {
|
|
122
122
|
let e;
|
|
123
|
-
return t ? e = Qe(
|
|
124
|
-
}, Ce = (t, l = !0,
|
|
123
|
+
return t ? e = Qe(o) : e = Ce(o), l && e.set(p, Ye()), e.size || e.set(p, xe), e;
|
|
124
|
+
}, Ce = (t, l = !0, o = [], e = !1) => {
|
|
125
125
|
const i = /* @__PURE__ */ new Map();
|
|
126
126
|
return t.forEach((a) => {
|
|
127
127
|
if (!a.enabled || e && typeof a.key == "number" && a.key > 1) return;
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
if (l && !
|
|
131
|
-
const m = { ...
|
|
132
|
-
|
|
133
|
-
}), !
|
|
134
|
-
|
|
128
|
+
const n = { ...a };
|
|
129
|
+
n.regionByIndex = /* @__PURE__ */ new Map(), a.regions && a.regions.forEach((u) => {
|
|
130
|
+
if (l && !u.enabled) return;
|
|
131
|
+
const m = { ...u };
|
|
132
|
+
n.regionByIndex.set(m.index, m);
|
|
133
|
+
}), !n.regionByIndex.size && o.length, // режим вывода ПС без регионов
|
|
134
|
+
(!a.regions || // есть включенные регионы
|
|
135
|
+
n.regionByIndex.size || // запрошен вывод конкретных ПС
|
|
136
|
+
o.length) && typeof n.key == "number" && i.set(n.key, n);
|
|
137
|
+
}), o.forEach((a) => {
|
|
135
138
|
if (i.has(a)) return;
|
|
136
|
-
const
|
|
139
|
+
const n = {
|
|
137
140
|
key: a,
|
|
138
141
|
name: Ge[a],
|
|
139
142
|
regions: [],
|
|
140
143
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
141
144
|
};
|
|
142
|
-
i.set(
|
|
145
|
+
i.set(n.key, n);
|
|
143
146
|
}), i;
|
|
144
147
|
}, Qe = (t) => {
|
|
145
148
|
const l = Ce(t, !1, [0, 1], !0);
|
|
146
149
|
if (l.has(2)) {
|
|
147
|
-
const
|
|
148
|
-
|
|
150
|
+
const o = l.get(2);
|
|
151
|
+
o && (o.regionByIndex = /* @__PURE__ */ new Map());
|
|
149
152
|
}
|
|
150
|
-
return l.forEach((
|
|
151
|
-
if (!
|
|
153
|
+
return l.forEach((o) => {
|
|
154
|
+
if (!o.regionByIndex) return;
|
|
152
155
|
const e = { ...He() };
|
|
153
|
-
|
|
156
|
+
o.regionByIndex.set(e.index, e);
|
|
154
157
|
}), l;
|
|
155
|
-
}, Xe = (t, l,
|
|
156
|
-
const e = ke(t, !1,
|
|
158
|
+
}, Xe = (t, l, o = []) => {
|
|
159
|
+
const e = ke(t, !1, o);
|
|
157
160
|
let i;
|
|
158
161
|
return e.forEach((a) => {
|
|
159
|
-
if (!(l.searcher_key !== void 0 && l.searcher_key != a.key) && a.regions && (a.regions.forEach((
|
|
160
|
-
if (!i && !(l.key !== void 0 && l.key !=
|
|
161
|
-
return
|
|
162
|
+
if (!(l.searcher_key !== void 0 && l.searcher_key != a.key) && a.regions && (a.regions.forEach((n) => {
|
|
163
|
+
if (!i && !(l.key !== void 0 && l.key != n.key) && !(l.index !== void 0 && l.index != n.index) && !(!t && (l.lang !== void 0 && l.lang != n.lang || l.device !== void 0 && l.device != n.device)))
|
|
164
|
+
return n.searcher_key = a.key, i = n, !1;
|
|
162
165
|
}), i))
|
|
163
166
|
return !1;
|
|
164
167
|
}), i;
|
|
165
168
|
}, Ze = De(() => import("../.chunks/dialog_selectorRegions-Dy0AlECS.es.js")), et = (t, l) => {
|
|
166
|
-
const
|
|
169
|
+
const o = R(), e = F(l.value.keys().next().value ?? p), i = E(() => {
|
|
167
170
|
const a = /* @__PURE__ */ new Map();
|
|
168
|
-
if (l.value.forEach((
|
|
169
|
-
let
|
|
170
|
-
value:
|
|
171
|
-
title:
|
|
171
|
+
if (l.value.forEach((n) => {
|
|
172
|
+
let u = {
|
|
173
|
+
value: n.key,
|
|
174
|
+
title: n.name
|
|
172
175
|
};
|
|
173
|
-
t.addSearcherIcon && (
|
|
176
|
+
t.addSearcherIcon && (u.icon = Fe(n.key)), a.set(n.key, u);
|
|
174
177
|
}), t.addCompare && !a.has(p)) {
|
|
175
|
-
const
|
|
178
|
+
const n = {
|
|
176
179
|
value: "",
|
|
177
180
|
title: "--------------------",
|
|
178
181
|
disabled: !0
|
|
179
182
|
};
|
|
180
|
-
a.set(
|
|
181
|
-
const
|
|
183
|
+
a.set(n.value, n);
|
|
184
|
+
const u = {
|
|
182
185
|
value: M,
|
|
183
|
-
title:
|
|
186
|
+
title: o.Common.Compare
|
|
184
187
|
};
|
|
185
|
-
a.set(
|
|
188
|
+
a.set(u.value, u);
|
|
186
189
|
}
|
|
187
190
|
return a;
|
|
188
191
|
});
|
|
@@ -191,9 +194,9 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
191
194
|
optionBySearcherKey: i
|
|
192
195
|
};
|
|
193
196
|
}, tt = (t, l) => {
|
|
194
|
-
var a,
|
|
195
|
-
const
|
|
196
|
-
t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === p && (t.forFrequency ? e.value = ((
|
|
197
|
+
var a, n, u;
|
|
198
|
+
const o = R(), e = F(p);
|
|
199
|
+
t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === p && (t.forFrequency ? e.value = ((n = (a = l.value) == null ? void 0 : a.regionByIndex.values().next().value) == null ? void 0 : n.key) ?? p : e.value = ((u = l.value) == null ? void 0 : u.regionByIndex.keys().next().value) ?? p);
|
|
197
200
|
const i = E(() => {
|
|
198
201
|
var h;
|
|
199
202
|
const m = /* @__PURE__ */ new Map();
|
|
@@ -207,19 +210,19 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
207
210
|
m.has(S.key) || m.set(S.key, x);
|
|
208
211
|
return;
|
|
209
212
|
}
|
|
210
|
-
S.device && (r += " (" +
|
|
213
|
+
S.device && (r += " (" + o.Common["Device_" + S.device] + ")");
|
|
211
214
|
const g = qe(l.value.key || 0, S.lang ?? "");
|
|
212
215
|
g && (r += " / " + g);
|
|
213
|
-
const
|
|
216
|
+
const d = {
|
|
214
217
|
value: S.index,
|
|
215
218
|
title: r,
|
|
216
219
|
icon: S.device ? Pe(S.device) : void 0
|
|
217
220
|
};
|
|
218
|
-
m.set(S.index,
|
|
221
|
+
m.set(S.index, d);
|
|
219
222
|
}), m;
|
|
220
223
|
});
|
|
221
224
|
return w(i, (m, h) => {
|
|
222
|
-
var
|
|
225
|
+
var d;
|
|
223
226
|
if (t.onlySearcher || e.value !== void 0 && m.get(e.value))
|
|
224
227
|
return;
|
|
225
228
|
let S = m.keys().next().value;
|
|
@@ -227,7 +230,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
227
230
|
e.value = S;
|
|
228
231
|
return;
|
|
229
232
|
}
|
|
230
|
-
let r = ((
|
|
233
|
+
let r = ((d = h == null ? void 0 : h.get(e.value)) == null ? void 0 : d.title) || "", g = -1;
|
|
231
234
|
for (const [x, T] of m.entries()) {
|
|
232
235
|
const C = T.title;
|
|
233
236
|
if (typeof C != "string" || typeof x == "string")
|
|
@@ -236,7 +239,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
236
239
|
S = x;
|
|
237
240
|
break;
|
|
238
241
|
}
|
|
239
|
-
const V = new RegExp(` \\((${
|
|
242
|
+
const V = new RegExp(` \\((${o.Common.Device_1}|${o.Common.Device_2})\\)`);
|
|
240
243
|
let f = r, s = 3;
|
|
241
244
|
C.indexOf(f) === -1 && (f = r.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(f) === -1 && (f = r.replace(/ \/.*/, ""), s--), C.indexOf(f) === -1 && (f = r.replace(/ \/.*/, ""), f = f.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(f) !== -1 && (s <= g || (g = s, S = x));
|
|
242
245
|
}
|
|
@@ -245,23 +248,23 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
245
248
|
regionIndex: e,
|
|
246
249
|
optionByRegionIndex: i
|
|
247
250
|
};
|
|
248
|
-
}, at = (t, l,
|
|
251
|
+
}, at = (t, l, o) => {
|
|
249
252
|
const e = F([]), i = () => {
|
|
250
253
|
if (t.onlySearcher && l.value) {
|
|
251
254
|
e.value = Array.from(l.value.keys());
|
|
252
255
|
return;
|
|
253
256
|
}
|
|
254
|
-
let
|
|
257
|
+
let n = [];
|
|
255
258
|
if (t.modelValue.length > 1)
|
|
256
|
-
|
|
259
|
+
n = [...t.modelValue];
|
|
257
260
|
else
|
|
258
261
|
try {
|
|
259
|
-
|
|
262
|
+
n = JSON.parse(
|
|
260
263
|
localStorage.getItem("ui:project:regionSelector" + t.projectId + ":regionsIndexes")
|
|
261
264
|
) ?? [];
|
|
262
265
|
} catch {
|
|
263
266
|
}
|
|
264
|
-
|
|
267
|
+
n.length && (n = n.filter((u) => o.value.has(u))), n.length || (n = Array.from(o.value)), e.value = [...n];
|
|
265
268
|
}, a = () => {
|
|
266
269
|
e.value.length ? localStorage.setItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes", JSON.stringify(e.value)) : localStorage.removeItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes");
|
|
267
270
|
};
|
|
@@ -271,17 +274,17 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
271
274
|
regionsIndexes: e
|
|
272
275
|
};
|
|
273
276
|
}, lt = (t) => {
|
|
274
|
-
const l = E(() => ke(t.forFrequency, t.autoRegion, t.searchers)),
|
|
277
|
+
const l = E(() => ke(t.forFrequency, t.autoRegion, t.searchers)), o = E(() => l.value.get(i.searcherKey.value) || xe), e = E(() => {
|
|
275
278
|
const r = /* @__PURE__ */ new Set();
|
|
276
279
|
return l.value.forEach((g) => {
|
|
277
|
-
g.regionByIndex.forEach((
|
|
278
|
-
|
|
280
|
+
g.regionByIndex.forEach((d) => {
|
|
281
|
+
d.index !== te && d.index !== p && r.add(d.index);
|
|
279
282
|
});
|
|
280
283
|
}), r;
|
|
281
|
-
}), i = et(t, l), a = tt(t,
|
|
284
|
+
}), i = et(t, l), a = tt(t, o), n = at(t, l, e);
|
|
282
285
|
w(l, () => {
|
|
283
|
-
var g,
|
|
284
|
-
if (t.onlySearcher ?
|
|
286
|
+
var g, d, x, T;
|
|
287
|
+
if (t.onlySearcher ? n.regionsIndexes.value = Array.from(l.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((C) => e.value.has(C)), i.searcherKey.value === M) return;
|
|
285
288
|
let r = l.value.keys().next().value;
|
|
286
289
|
l.value.forEach((C) => {
|
|
287
290
|
var V, f, s;
|
|
@@ -295,39 +298,39 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
295
298
|
const v = (s = l.value.get(C.key)) == null ? void 0 : s.regionByIndex;
|
|
296
299
|
c != null && c.has(p) && !(v != null && v.has(p)) && (r = C.key);
|
|
297
300
|
}
|
|
298
|
-
}), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((
|
|
301
|
+
}), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((d = (g = o.value) == null ? void 0 : g.regionByIndex) != null && d.has(a.regionIndex.value)) && (a.regionIndex.value = (T = (x = o.value) == null ? void 0 : x.regions) == null ? void 0 : T.keys().next().value);
|
|
299
302
|
}, { immediate: !0 });
|
|
300
|
-
const
|
|
303
|
+
const u = () => {
|
|
301
304
|
if (!(i.searcherKey.value === M || i.searcherKey.value === p))
|
|
302
305
|
return i.searcherKey.value;
|
|
303
306
|
}, m = () => {
|
|
304
307
|
if (t.onlySearcher || a.regionIndex.value === p) return;
|
|
305
308
|
let r = a.regionIndex.value;
|
|
306
309
|
if (t.forFrequency) {
|
|
307
|
-
const g = a.regionIndex.value,
|
|
308
|
-
r =
|
|
310
|
+
const g = a.regionIndex.value, d = Xe(t.forFrequency, { searcher_key: u(), key: g }, t.searchers);
|
|
311
|
+
r = d == null ? void 0 : d.index;
|
|
309
312
|
}
|
|
310
313
|
return r;
|
|
311
314
|
}, h = () => {
|
|
312
|
-
const r =
|
|
315
|
+
const r = u();
|
|
313
316
|
if (r !== void 0)
|
|
314
317
|
return l.value.get(r);
|
|
315
318
|
};
|
|
316
319
|
return {
|
|
317
320
|
selectSearcher: i,
|
|
318
321
|
selectRegion: a,
|
|
319
|
-
compare:
|
|
322
|
+
compare: n,
|
|
320
323
|
searcherByKey: l,
|
|
321
324
|
allRegionsIndexes: e,
|
|
322
325
|
getSearcher: h,
|
|
323
326
|
getRegion: () => {
|
|
324
|
-
var g,
|
|
327
|
+
var g, d;
|
|
325
328
|
const r = m();
|
|
326
329
|
if (r !== void 0)
|
|
327
|
-
return (
|
|
330
|
+
return (d = (g = h()) == null ? void 0 : g.regionByIndex) == null ? void 0 : d.get(r);
|
|
328
331
|
}
|
|
329
332
|
};
|
|
330
|
-
},
|
|
333
|
+
}, nt = /* @__PURE__ */ P({
|
|
331
334
|
__name: "selectorRegion",
|
|
332
335
|
props: /* @__PURE__ */ N({
|
|
333
336
|
projectId: {},
|
|
@@ -349,55 +352,55 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
349
352
|
}),
|
|
350
353
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
351
354
|
setup(t, { expose: l }) {
|
|
352
|
-
const
|
|
355
|
+
const o = t, e = D(t, "modelValue"), i = D(t, "modelValueSingle"), {
|
|
353
356
|
selectSearcher: a,
|
|
354
|
-
selectRegion:
|
|
355
|
-
compare:
|
|
357
|
+
selectRegion: n,
|
|
358
|
+
compare: u,
|
|
356
359
|
searcherByKey: m,
|
|
357
360
|
allRegionsIndexes: h,
|
|
358
361
|
getSearcher: S,
|
|
359
362
|
getRegion: r
|
|
360
|
-
} = lt(
|
|
361
|
-
const
|
|
363
|
+
} = lt(o), g = () => {
|
|
364
|
+
const d = [];
|
|
362
365
|
m.value.forEach((x) => {
|
|
363
366
|
x.enabled && x.regions.forEach((T) => {
|
|
364
|
-
T.enabled &&
|
|
367
|
+
T.enabled && d.push(T);
|
|
365
368
|
});
|
|
366
369
|
}), Ze.open("selectorRegions", {
|
|
367
|
-
regions:
|
|
368
|
-
regionsIndexes:
|
|
369
|
-
"@update:regionsIndexes": (x) =>
|
|
370
|
+
regions: d,
|
|
371
|
+
regionsIndexes: u.regionsIndexes.value,
|
|
372
|
+
"@update:regionsIndexes": (x) => u.regionsIndexes.value = x
|
|
370
373
|
});
|
|
371
374
|
};
|
|
372
|
-
return w([
|
|
373
|
-
if (a.searcherKey.value === M &&
|
|
374
|
-
if (JSON.stringify(e.value) === JSON.stringify(
|
|
375
|
+
return w([n.regionIndex, a.searcherKey, u.regionsIndexes], () => {
|
|
376
|
+
if (a.searcherKey.value === M && u.regionsIndexes.value.length) {
|
|
377
|
+
if (JSON.stringify(e.value) === JSON.stringify(u.regionsIndexes.value))
|
|
375
378
|
return;
|
|
376
|
-
e.value = [...
|
|
379
|
+
e.value = [...u.regionsIndexes.value];
|
|
377
380
|
} else
|
|
378
|
-
|
|
379
|
-
!
|
|
381
|
+
o.onlySearcher ? (e.value = [a.searcherKey.value], a.searcherKey.value === p && !o.autoRegion && (e.value.length = 0)) : (e.value = [n.regionIndex.value], n.regionIndex.value === p && !o.autoRegion && (e.value.length = 0));
|
|
382
|
+
!o.onlySearcher && !h.value.size && (a.searcherKey.value = p);
|
|
380
383
|
}), i.value && w(i, () => {
|
|
381
384
|
i.value && (e.value = [i.value]);
|
|
382
385
|
}, { immediate: !0 }), w(e, () => {
|
|
383
|
-
var
|
|
384
|
-
if (e.value[0] && (i.value = e.value[0]),
|
|
385
|
-
if (!e.value.length || e.value.length === 1 && !m.value.has(e.value[0])) {
|
|
386
|
+
var d, x, T, C, V;
|
|
387
|
+
if (e.value[0] && (i.value = e.value[0]), o.onlySearcher) {
|
|
388
|
+
if (!e.value.length || e.value.length === 1 && !m.value.has(e.value[0]) || e.value.length === 1 && e.value[0] === p && !o.autoRegion) {
|
|
386
389
|
let f = m.value.keys().next().value;
|
|
387
|
-
f === p && !
|
|
390
|
+
f === p && !o.autoRegion && (f = void 0, i.value = p), f !== void 0 ? e.value = [f] : e.value.length = 0;
|
|
388
391
|
return;
|
|
389
392
|
}
|
|
390
|
-
if (e.value.length > 1 && JSON.stringify(e.value) !== JSON.stringify(
|
|
391
|
-
e.value = [...
|
|
393
|
+
if (e.value.length > 1 && JSON.stringify(e.value) !== JSON.stringify(u.regionsIndexes.value)) {
|
|
394
|
+
e.value = [...u.regionsIndexes.value];
|
|
392
395
|
return;
|
|
393
396
|
}
|
|
394
397
|
} else {
|
|
395
|
-
let f = [...new Set(e.value)], s = (x = (
|
|
396
|
-
if (
|
|
398
|
+
let f = [...new Set(e.value)], s = (x = (d = m.value.values().next().value) == null ? void 0 : d.regionByIndex) == null ? void 0 : x.keys().next().value;
|
|
399
|
+
if (o.forFrequency && (s = (V = (C = (T = m.value.values().next().value) == null ? void 0 : T.regionByIndex) == null ? void 0 : C.values().next().value) == null ? void 0 : V.key), s === p && !o.autoRegion && (s = void 0, i.value = p), !f.length)
|
|
397
400
|
s !== void 0 && f.push(s);
|
|
398
401
|
else if (f.length === 1) {
|
|
399
402
|
let c = h.value;
|
|
400
|
-
|
|
403
|
+
o.forFrequency && (c = /* @__PURE__ */ new Set(), m.value.forEach((v) => {
|
|
401
404
|
v.regionByIndex.forEach((I) => {
|
|
402
405
|
I.index !== te && I.index !== p && c.add(I.key);
|
|
403
406
|
});
|
|
@@ -409,8 +412,8 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
409
412
|
return;
|
|
410
413
|
}
|
|
411
414
|
}
|
|
412
|
-
if (!(e.value.length === 1 && e.value[0] === (
|
|
413
|
-
if (
|
|
415
|
+
if (!(e.value.length === 1 && e.value[0] === (o.onlySearcher ? a.searcherKey.value : n.regionIndex.value)))
|
|
416
|
+
if (o.onlySearcher) {
|
|
414
417
|
if (e.value.length === 1) {
|
|
415
418
|
a.searcherKey.value = e.value[0];
|
|
416
419
|
return;
|
|
@@ -421,11 +424,11 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
421
424
|
if (!e.value.length)
|
|
422
425
|
return;
|
|
423
426
|
if (e.value.length === 1 && a.searcherKey.value !== M) {
|
|
424
|
-
|
|
427
|
+
n.regionIndex.value = e.value[0];
|
|
425
428
|
let f;
|
|
426
429
|
for (const s of m.value.values()) {
|
|
427
430
|
for (const c of s.regionByIndex.values())
|
|
428
|
-
if ((
|
|
431
|
+
if ((o.forFrequency ? c.key : c.index) === n.regionIndex.value) {
|
|
429
432
|
f = s.key;
|
|
430
433
|
break;
|
|
431
434
|
}
|
|
@@ -434,15 +437,15 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
434
437
|
}
|
|
435
438
|
f !== void 0 && (a.searcherKey.value = f);
|
|
436
439
|
} else
|
|
437
|
-
a.searcherKey.value = M,
|
|
440
|
+
a.searcherKey.value = M, u.regionsIndexes.value = [...e.value];
|
|
438
441
|
}
|
|
439
442
|
}, { immediate: !0 }), l({
|
|
440
443
|
getSearcher: S,
|
|
441
444
|
getRegion: r
|
|
442
|
-
}), (
|
|
445
|
+
}), (d, x) => (k(), B("div", {
|
|
443
446
|
class: X({
|
|
444
447
|
"top-selectorRegion": !0,
|
|
445
|
-
"top-selectorRegion-onlySearcher":
|
|
448
|
+
"top-selectorRegion-onlySearcher": d.onlySearcher
|
|
446
449
|
})
|
|
447
450
|
}, [
|
|
448
451
|
A(ie, {
|
|
@@ -450,32 +453,32 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
450
453
|
modelValue: y(a).searcherKey.value,
|
|
451
454
|
"onUpdate:modelValue": x[0] || (x[0] = (T) => y(a).searcherKey.value = T),
|
|
452
455
|
name: "searcher_key",
|
|
453
|
-
addChanger:
|
|
456
|
+
addChanger: d.addChanger
|
|
454
457
|
}, null, 8, ["options", "modelValue", "addChanger"]),
|
|
455
|
-
!
|
|
458
|
+
!d.onlySearcher && y(a).searcherKey.value !== y(M) ? (k(), b(ie, {
|
|
456
459
|
key: 0,
|
|
457
460
|
class: "top-select-region",
|
|
458
|
-
options: y(
|
|
459
|
-
modelValue: y(
|
|
460
|
-
"onUpdate:modelValue": x[1] || (x[1] = (T) => y(
|
|
461
|
-
name:
|
|
462
|
-
addChanger:
|
|
463
|
-
"data-top-icon":
|
|
461
|
+
options: y(n).optionByRegionIndex.value,
|
|
462
|
+
modelValue: y(n).regionIndex.value,
|
|
463
|
+
"onUpdate:modelValue": x[1] || (x[1] = (T) => y(n).regionIndex.value = T),
|
|
464
|
+
name: d.forFrequency ? "region_key" : "region_index",
|
|
465
|
+
addChanger: d.addChanger,
|
|
466
|
+
"data-top-icon": d.addRegionIcon ? "" : void 0
|
|
464
467
|
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : q("", !0),
|
|
465
|
-
|
|
468
|
+
d.addCompare && !d.onlySearcher && y(a).searcherKey.value === y(M) ? (k(), b(H, {
|
|
466
469
|
key: 1,
|
|
467
470
|
name: "compare",
|
|
468
471
|
onClick: g,
|
|
469
|
-
"data-count-compare-regions-indexes": y(
|
|
472
|
+
"data-count-compare-regions-indexes": y(u).regionsIndexes.value.length
|
|
470
473
|
}, {
|
|
471
474
|
default: _(() => [
|
|
472
|
-
G(K(
|
|
475
|
+
G(K(d.$i18n.Common.Selected_regions), 1)
|
|
473
476
|
]),
|
|
474
477
|
_: 1
|
|
475
478
|
}, 8, ["data-count-compare-regions-indexes"])) : q("", !0)
|
|
476
479
|
], 2));
|
|
477
480
|
}
|
|
478
|
-
}),
|
|
481
|
+
}), ot = [
|
|
479
482
|
{
|
|
480
483
|
id: "1",
|
|
481
484
|
name: "Without Tag",
|
|
@@ -528,10 +531,10 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
528
531
|
}
|
|
529
532
|
], ve = (t) => "-" + t, Q = (t) => t[0] === "-" ? t.substring(1) : t, le = (t, l) => {
|
|
530
533
|
t = Q(t);
|
|
531
|
-
const
|
|
532
|
-
if (
|
|
533
|
-
return
|
|
534
|
-
}, rt = ["data-tag_id", "data-tag_color_id", "title"],
|
|
534
|
+
const o = l.find((e) => e.id === t);
|
|
535
|
+
if (o)
|
|
536
|
+
return o;
|
|
537
|
+
}, rt = ["data-tag_id", "data-tag_color_id", "title"], ne = /* @__PURE__ */ P({
|
|
535
538
|
__name: "tagIcon",
|
|
536
539
|
props: {
|
|
537
540
|
id: {},
|
|
@@ -540,7 +543,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
540
543
|
state: {}
|
|
541
544
|
},
|
|
542
545
|
setup(t) {
|
|
543
|
-
return (l,
|
|
546
|
+
return (l, o) => (k(), B("div", {
|
|
544
547
|
class: X({
|
|
545
548
|
"top-tagSelector_tagIcon": !0,
|
|
546
549
|
"top-tagSelector-active": !!l.state,
|
|
@@ -569,28 +572,28 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
569
572
|
}),
|
|
570
573
|
emits: /* @__PURE__ */ N(["update:name", "unselect", "exclude", "select"], ["update:name"]),
|
|
571
574
|
setup(t, { emit: l }) {
|
|
572
|
-
const
|
|
573
|
-
contenteditable:
|
|
575
|
+
const o = t, e = l, i = D(t, "name"), a = F(null), n = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
576
|
+
contenteditable: u.value,
|
|
574
577
|
onpaste: (g) => g.preventDefault()
|
|
575
|
-
} : {}),
|
|
578
|
+
} : {}), u = F(!1), m = async () => {
|
|
576
579
|
var g;
|
|
577
|
-
|
|
580
|
+
u.value = !0, await Ve(), (g = a.value) == null || g.focus();
|
|
578
581
|
}, h = () => {
|
|
579
|
-
var
|
|
580
|
-
const g = (
|
|
582
|
+
var d;
|
|
583
|
+
const g = (d = a.value) == null ? void 0 : d.innerText;
|
|
581
584
|
if (!g) return S();
|
|
582
|
-
a.value && (a.value.innerText = g),
|
|
585
|
+
a.value && (a.value.innerText = g), u.value = !1, e("update:name", g);
|
|
583
586
|
}, S = async () => {
|
|
584
|
-
a.value && (a.value.innerText =
|
|
587
|
+
a.value && (a.value.innerText = o.name), u.value = !1;
|
|
585
588
|
}, r = (g) => {
|
|
586
|
-
if (
|
|
587
|
-
let
|
|
588
|
-
|
|
589
|
+
if (u.value || o.disabled) return;
|
|
590
|
+
let d = "selected";
|
|
591
|
+
o.canExclude && (g.ctrlKey || g.metaKey) && (d = "excluded"), o.state == d && (d = ""), d === "" && e("unselect"), d === "selected" && e("select"), d === "excluded" && e("exclude");
|
|
589
592
|
};
|
|
590
|
-
return (g,
|
|
593
|
+
return (g, d) => (k(), b(ue, {
|
|
591
594
|
class: X({
|
|
592
595
|
"top-tagSelector_tagListItem": !0,
|
|
593
|
-
"top-tagSelector_tagListItem-inEdit":
|
|
596
|
+
"top-tagSelector_tagListItem-inEdit": u.value,
|
|
594
597
|
"top-tagSelector_tagListItem-disabled": g.disabled,
|
|
595
598
|
"top-tagSelector_tagListItem-canExclude": g.canExclude,
|
|
596
599
|
"top-tagSelector-active": !!g.state,
|
|
@@ -599,7 +602,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
599
602
|
onClick: z(r, ["stop"])
|
|
600
603
|
}, {
|
|
601
604
|
default: _(() => [
|
|
602
|
-
A(
|
|
605
|
+
A(ne, {
|
|
603
606
|
id: g.id,
|
|
604
607
|
name: i.value,
|
|
605
608
|
colorId: g.colorId,
|
|
@@ -609,15 +612,15 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
609
612
|
ref_key: "elName",
|
|
610
613
|
ref: a,
|
|
611
614
|
class: "top-tagSelector_tagListItemName",
|
|
612
|
-
contenteditable:
|
|
613
|
-
},
|
|
615
|
+
contenteditable: u.value ? "plaintext-only" : !1
|
|
616
|
+
}, n.value, {
|
|
614
617
|
onKeydown: [
|
|
615
|
-
|
|
616
|
-
|
|
618
|
+
de(z(h, ["stop"]), ["enter"]),
|
|
619
|
+
de(z(S, ["stop"]), ["esc"])
|
|
617
620
|
]
|
|
618
621
|
}), K(i.value), 17, it),
|
|
619
622
|
g.editable ? (k(), B(Y, { key: 0 }, [
|
|
620
|
-
|
|
623
|
+
u.value ? (k(), B("span", {
|
|
621
624
|
key: 1,
|
|
622
625
|
"data-top-icon": "",
|
|
623
626
|
class: "top-tagSelector_edit",
|
|
@@ -653,45 +656,45 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
653
656
|
}),
|
|
654
657
|
emits: ["update:modelValue"],
|
|
655
658
|
setup(t) {
|
|
656
|
-
const l = t,
|
|
657
|
-
model:
|
|
659
|
+
const l = t, o = D(t, "modelValue"), e = l.useTopButton ? H : "div", i = l.useTopButton ? "html" : "default", a = {
|
|
660
|
+
model: o,
|
|
658
661
|
mode: l.mode,
|
|
659
662
|
targetId: l.targetId,
|
|
660
663
|
filters: l.filters,
|
|
661
664
|
payload: l.payload
|
|
662
665
|
};
|
|
663
|
-
return (
|
|
666
|
+
return (n, u) => {
|
|
664
667
|
const m = Ee("top-data");
|
|
665
|
-
return k(), b(Oe, { id:
|
|
668
|
+
return k(), b(Oe, { id: n.id }, {
|
|
666
669
|
default: _(() => [
|
|
667
670
|
Me((k(), b(Ke(y(e)), Se({
|
|
668
671
|
class: {
|
|
669
672
|
"top-tagSelector": !0,
|
|
670
673
|
"top-tagSelector-filter": l.mode === "filter",
|
|
671
|
-
"top-tagSelector-setter_single": l.mode === "setter" && !
|
|
672
|
-
"top-tagSelector-setter_several": l.mode === "setter" &&
|
|
673
|
-
"top-tagSelector-selectedOne": !
|
|
674
|
-
"top-tagSelector-toTwoLine":
|
|
674
|
+
"top-tagSelector-setter_single": l.mode === "setter" && !n.filters,
|
|
675
|
+
"top-tagSelector-setter_several": l.mode === "setter" && n.filters,
|
|
676
|
+
"top-tagSelector-selectedOne": !o.value.length || o.value.length === 1,
|
|
677
|
+
"top-tagSelector-toTwoLine": o.value.length > 5
|
|
675
678
|
},
|
|
676
679
|
color: "theme",
|
|
677
680
|
styling: ""
|
|
678
|
-
},
|
|
681
|
+
}, n.$attrs), {
|
|
679
682
|
[y(i)]: _(() => [
|
|
680
|
-
!
|
|
683
|
+
!o.value.length && n.mode === "filter" ? (k(), b(ne, {
|
|
681
684
|
key: 0,
|
|
682
685
|
id: "all",
|
|
683
686
|
colorId: "",
|
|
684
|
-
name:
|
|
687
|
+
name: n.$i18n.Common.All_tags ?? "",
|
|
685
688
|
state: ""
|
|
686
689
|
}, null, 8, ["name"])) : q("", !0),
|
|
687
|
-
|
|
688
|
-
$e(
|
|
689
|
-
])) : (k(!0), B(Y, { key: 2 }, se(
|
|
690
|
+
n.mode === "setter" && n.filters ? (k(), B("div", st, [
|
|
691
|
+
$e(n.$slots, "default")
|
|
692
|
+
])) : (k(!0), B(Y, { key: 2 }, se(o.value, (h) => {
|
|
690
693
|
var S, r;
|
|
691
|
-
return k(), b(
|
|
694
|
+
return k(), b(ne, {
|
|
692
695
|
id: y(Q)(h),
|
|
693
|
-
colorId: ((S = y(le)(h,
|
|
694
|
-
name: ((r = y(le)(h,
|
|
696
|
+
colorId: ((S = y(le)(h, n.tags)) == null ? void 0 : S.color_id) ?? "",
|
|
697
|
+
name: ((r = y(le)(h, n.tags)) == null ? void 0 : r.name) ?? "",
|
|
695
698
|
state: y(Q)(h) === h ? "selected" : "excluded"
|
|
696
699
|
}, null, 8, ["id", "colorId", "name", "state"]);
|
|
697
700
|
}), 256))
|
|
@@ -705,7 +708,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
705
708
|
}, 8, ["id"]);
|
|
706
709
|
};
|
|
707
710
|
}
|
|
708
|
-
}),
|
|
711
|
+
}), ut = /* @__PURE__ */ P({
|
|
709
712
|
__name: "tagSelector",
|
|
710
713
|
props: /* @__PURE__ */ N({
|
|
711
714
|
modelValue: {},
|
|
@@ -723,20 +726,20 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
723
726
|
},
|
|
724
727
|
modelModifiers: {},
|
|
725
728
|
tags: {
|
|
726
|
-
default: Ae(
|
|
729
|
+
default: Ae(ot)
|
|
727
730
|
},
|
|
728
731
|
tagsModifiers: {}
|
|
729
732
|
}),
|
|
730
733
|
emits: /* @__PURE__ */ N(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
|
|
731
734
|
setup(t, { emit: l }) {
|
|
732
|
-
const
|
|
733
|
-
|
|
735
|
+
const o = R(), e = t, i = D(t, "modelValue"), a = D(t, "tags"), n = l, u = Re((s, c) => {
|
|
736
|
+
n(s, c);
|
|
734
737
|
}, e.emitDelay);
|
|
735
738
|
e.singleMode && !i.value.length && (i.value = [a.value[0].id]);
|
|
736
739
|
const m = e.id ?? "top-popup-id-" + Math.random(), h = F("add"), S = () => {
|
|
737
740
|
var v;
|
|
738
|
-
const s = " " + ((v =
|
|
739
|
-
return c.set("add", { value: "add", title:
|
|
741
|
+
const s = " " + ((v = o.Common.Tags) == null ? void 0 : v.toLowerCase()), c = /* @__PURE__ */ new Map();
|
|
742
|
+
return c.set("add", { value: "add", title: o.Common.Add + s }), c.set("replace", { value: "replace", title: o.Common.Replace + s }), c.set("delete", { value: "delete", title: o.Common.Delete + s }), c;
|
|
740
743
|
};
|
|
741
744
|
let r = we({
|
|
742
745
|
model: i,
|
|
@@ -746,12 +749,12 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
746
749
|
payload: void 0
|
|
747
750
|
});
|
|
748
751
|
w(i, () => {
|
|
749
|
-
|
|
752
|
+
u("selector", i.value);
|
|
750
753
|
});
|
|
751
754
|
const g = E(() => {
|
|
752
755
|
if (r.value.mode === "setter" && e.maxTagsForSetter && !r.value.filters)
|
|
753
756
|
return r.value.model.value.length >= e.maxTagsForSetter;
|
|
754
|
-
}),
|
|
757
|
+
}), d = (s) => {
|
|
755
758
|
if (s !== "all") {
|
|
756
759
|
if (r.value.model.value.includes(s)) return "selected";
|
|
757
760
|
if (r.value.model.value.includes(ve(s))) return "excluded";
|
|
@@ -764,7 +767,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
764
767
|
if (!e.tags) return 0;
|
|
765
768
|
const Z = e.tags.findIndex((O) => O.id === L), j = e.tags.findIndex((O) => O.id === U);
|
|
766
769
|
return Z - j;
|
|
767
|
-
}), r.value.model.value = I, r.value.mode === "setter" && r.value.targetId !== void 0 &&
|
|
770
|
+
}), r.value.model.value = I, r.value.mode === "setter" && r.value.targetId !== void 0 && u("setter", {
|
|
768
771
|
tagsIds: I,
|
|
769
772
|
targetId: r.value.targetId,
|
|
770
773
|
payload: r.value.payload
|
|
@@ -780,7 +783,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
780
783
|
id: String(c),
|
|
781
784
|
name: s,
|
|
782
785
|
color_id: String((c - 1) % 10 + 1)
|
|
783
|
-
}),
|
|
786
|
+
}), n("tagsChanged", a.value);
|
|
784
787
|
}, V = (s) => {
|
|
785
788
|
var c;
|
|
786
789
|
if (r.value = W(s.elPopupOpener, "topTagSelectorTarget"), !r.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
@@ -803,9 +806,9 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
803
806
|
const O = $(j).attr("data-tag_id");
|
|
804
807
|
U.push(O);
|
|
805
808
|
}), a.value.sort((Z, j) => {
|
|
806
|
-
const O = U.findIndex((
|
|
809
|
+
const O = U.findIndex((oe) => oe === Z.id), _e = U.findIndex((oe) => oe === j.id);
|
|
807
810
|
return O - _e;
|
|
808
|
-
}),
|
|
811
|
+
}), u("tagsChanged", a.value);
|
|
809
812
|
}
|
|
810
813
|
});
|
|
811
814
|
}, f = (s) => {
|
|
@@ -843,18 +846,18 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
843
846
|
id: v.id,
|
|
844
847
|
colorId: v.color_id,
|
|
845
848
|
name: v.name,
|
|
846
|
-
state:
|
|
849
|
+
state: d(v.id),
|
|
847
850
|
canExclude: y(r).mode === "filter" && !s.singleMode,
|
|
848
851
|
editable: s.tagsEditable,
|
|
849
|
-
disabled: g.value &&
|
|
852
|
+
disabled: g.value && d(v.id) === "",
|
|
850
853
|
onUnselect: (I) => x(v.id, "unselect"),
|
|
851
854
|
onSelect: (I) => x(v.id, "select"),
|
|
852
855
|
onExclude: (I) => x(v.id, "exclude"),
|
|
853
856
|
"onUpdate:name": (I) => {
|
|
854
|
-
v.name = I, y(
|
|
857
|
+
v.name = I, y(u)("tagsChanged", a.value);
|
|
855
858
|
}
|
|
856
859
|
}, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
|
|
857
|
-
s.tagsEditable && a.value.length < s.tagsMax && a.value.length < 20 ? (k(), b(
|
|
860
|
+
s.tagsEditable && a.value.length < s.tagsMax && a.value.length < 20 ? (k(), b(ue, {
|
|
858
861
|
key: 1,
|
|
859
862
|
"data-top-icon": "",
|
|
860
863
|
onClick: z(C, ["stop"])
|
|
@@ -888,7 +891,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
888
891
|
_: 1
|
|
889
892
|
}),
|
|
890
893
|
A(H, {
|
|
891
|
-
onClick: c[2] || (c[2] = (v) => y(
|
|
894
|
+
onClick: c[2] || (c[2] = (v) => y(u)("setter", {
|
|
892
895
|
tagsIds: y(r).model.value,
|
|
893
896
|
filters: y(r).filters,
|
|
894
897
|
filtersAction: h.value,
|
|
@@ -911,34 +914,34 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
911
914
|
title: i.url + ` [${i.id}]`,
|
|
912
915
|
icon: i.id === ce(l) ? "" : "",
|
|
913
916
|
content: i.name
|
|
914
|
-
}))), It = (t, l,
|
|
917
|
+
}))), It = (t, l, o) => {
|
|
915
918
|
l || (l = { id: t.id }), l.id = t.id;
|
|
916
919
|
const e = Ue.genElPopupOpener("div", l);
|
|
917
920
|
return e.classList.add("top-tagSelector"), t.useTopButton && e.classList.add("top-button", "top-color_theme"), t.mode === "filter" && e.classList.add("top-tagSelector-filter"), t.mode === "setter" && !t.filters && e.classList.add("top-tagSelector-setter_single"), t.mode === "setter" && t.filters && e.classList.add("top-tagSelector-setter_several"), e.onclick = (i) => {
|
|
918
921
|
i.preventDefault(), i.stopPropagation(), e.onclick = null;
|
|
919
|
-
const a = F(t.modelValue),
|
|
922
|
+
const a = F(t.modelValue), n = {
|
|
920
923
|
model: a,
|
|
921
924
|
mode: t.mode,
|
|
922
925
|
targetId: t.targetId,
|
|
923
926
|
filters: t.filters,
|
|
924
927
|
payload: t.payload
|
|
925
928
|
};
|
|
926
|
-
W(e, "topTagSelectorTarget",
|
|
927
|
-
t.modelValue = a.value, ee(e, t,
|
|
929
|
+
W(e, "topTagSelectorTarget", n), delete e.dataset.topPopupDisabled, ge(t.modelValue) || w(a, () => {
|
|
930
|
+
t.modelValue = a.value, ee(e, t, o);
|
|
928
931
|
}), e.click();
|
|
929
|
-
}, ge(t.modelValue) ? w(t.modelValue, () => ee(e, t,
|
|
932
|
+
}, ge(t.modelValue) ? w(t.modelValue, () => ee(e, t, o)) : W(e, "topTagSelectorRender", (i) => {
|
|
930
933
|
t.modelValue = i;
|
|
931
934
|
const a = W(e, "topTagSelectorTarget");
|
|
932
|
-
a && (a.model.value = i), ee(e, t,
|
|
933
|
-
}), ee(e, t,
|
|
935
|
+
a && (a.model.value = i), ee(e, t, o);
|
|
936
|
+
}), ee(e, t, o), e;
|
|
934
937
|
}, xt = (t, l) => {
|
|
935
|
-
var
|
|
936
|
-
(
|
|
937
|
-
}, ee = (t, l,
|
|
938
|
+
var o;
|
|
939
|
+
(o = W(t, "topTagSelectorRender")) == null || o(l);
|
|
940
|
+
}, ee = (t, l, o) => {
|
|
938
941
|
var i;
|
|
939
942
|
const e = y(l.modelValue);
|
|
940
943
|
if (t.classList.toggle("top-tagSelector-selectedOne", !e.length || e.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", e.length > 5), l.mode === "setter" && l.filters) {
|
|
941
|
-
t.innerHTML = `<div>${
|
|
944
|
+
t.innerHTML = `<div>${o}</div>`;
|
|
942
945
|
return;
|
|
943
946
|
}
|
|
944
947
|
if (t.innerHTML = "", !e.length && l.mode === "filter") {
|
|
@@ -951,19 +954,19 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
951
954
|
t.append(a);
|
|
952
955
|
}
|
|
953
956
|
e.forEach((a) => {
|
|
954
|
-
var
|
|
955
|
-
const
|
|
957
|
+
var u, m;
|
|
958
|
+
const n = pe({
|
|
956
959
|
id: Q(a),
|
|
957
|
-
colorId: ((
|
|
960
|
+
colorId: ((u = le(a, l.tags)) == null ? void 0 : u.color_id) ?? "",
|
|
958
961
|
name: ((m = le(a, l.tags)) == null ? void 0 : m.name) ?? "",
|
|
959
962
|
state: Q(a) === a ? "selected" : "excluded"
|
|
960
963
|
});
|
|
961
|
-
t.append(
|
|
964
|
+
t.append(n);
|
|
962
965
|
});
|
|
963
966
|
}, pe = (t) => {
|
|
964
967
|
const l = document.createElement("div");
|
|
965
968
|
return l.classList.add("top-tagSelector_tagIcon"), l.classList.toggle("top-tagSelector-active", !!t.state), l.classList.toggle("top-tagSelector-excluded", t.state === "excluded"), l.dataset.tag_id = t.id, l.dataset.tag_color_id = t.colorId, l.title = t.name, l;
|
|
966
|
-
}, kt = Je, Ct =
|
|
969
|
+
}, kt = Je, Ct = nt, Tt = ut, _t = Te, bt = ne;
|
|
967
970
|
export {
|
|
968
971
|
kt as TopSelectorCompetitors,
|
|
969
972
|
Ct as TopSelectorRegion,
|