@topvisor/ui 1.0.28-2 → 1.0.29
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/{core-CAMGByIQ.amd.js → core-B5IW1crr.amd.js} +2 -2
- package/.chunks/{core-CAMGByIQ.amd.js.map → core-B5IW1crr.amd.js.map} +1 -1
- package/.chunks/{core-asoGK-7D.es.js → core-DRIjN4g1.es.js} +4 -4
- package/.chunks/{core-asoGK-7D.es.js.map → core-DRIjN4g1.es.js.map} +1 -1
- package/.chunks/{datepicker-BYBYKhbw.es.js → datepicker-Cfpqg9n4.es.js} +2 -2
- package/.chunks/{datepicker-BYBYKhbw.es.js.map → datepicker-Cfpqg9n4.es.js.map} +1 -1
- package/.chunks/{datepicker-BvawRSTl.amd.js → datepicker-i5vu0x7-.amd.js} +2 -2
- package/.chunks/{datepicker-BvawRSTl.amd.js.map → datepicker-i5vu0x7-.amd.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-DVz3N6Dj.amd.js → dialog_selectorRegions-C7J8opN2.amd.js} +2 -2
- package/.chunks/{dialog_selectorRegions-DVz3N6Dj.amd.js.map → dialog_selectorRegions-C7J8opN2.amd.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-CpBiVjgI.es.js → dialog_selectorRegions-r5nqFKp1.es.js} +4 -4
- package/.chunks/{dialog_selectorRegions-CpBiVjgI.es.js.map → dialog_selectorRegions-r5nqFKp1.es.js.map} +1 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-B3xzaLH0.amd.js +2 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-B3xzaLH0.amd.js.map +1 -0
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang--09NOqOd.es.js → dialogs.vue_vue_type_script_setup_true_lang-DgBrFjit.es.js} +43 -43
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DgBrFjit.es.js.map +1 -0
- package/.chunks/{forms-qJ3k2PG6.es.js → forms-Bwwj0krD.es.js} +252 -237
- package/.chunks/{forms-qJ3k2PG6.es.js.map → forms-Bwwj0krD.es.js.map} +1 -1
- package/.chunks/{forms-CD0nOB5f.amd.js → forms-DkgEGq2v.amd.js} +3 -3
- package/.chunks/{forms-CD0nOB5f.amd.js.map → forms-DkgEGq2v.amd.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BAEJrRYd.amd.js → listItem.vue_vue_type_script_setup_true_lang-B4u0czzG.amd.js} +2 -2
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BAEJrRYd.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-B4u0czzG.amd.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BlC9NJdi.es.js → listItem.vue_vue_type_script_setup_true_lang-DVE3W6HU.es.js} +2 -2
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BlC9NJdi.es.js.map → listItem.vue_vue_type_script_setup_true_lang-DVE3W6HU.es.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-Oq5353Ax.amd.js → menu.vue_vue_type_style_index_0_lang-5m--z41A.amd.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-Oq5353Ax.amd.js.map → menu.vue_vue_type_style_index_0_lang-5m--z41A.amd.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-CDkyMyEi.es.js → menu.vue_vue_type_style_index_0_lang-CcF-VJjz.es.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-CDkyMyEi.es.js.map → menu.vue_vue_type_style_index_0_lang-CcF-VJjz.es.js.map} +1 -1
- package/.chunks/{notice-somyoQTl.es.js → notice-C7Vv281V.es.js} +2 -2
- package/.chunks/{notice-somyoQTl.es.js.map → notice-C7Vv281V.es.js.map} +1 -1
- package/.chunks/{notice-rP8nJxrF.amd.js → notice-ovDg_lw4.amd.js} +2 -2
- package/.chunks/{notice-rP8nJxrF.amd.js.map → notice-ovDg_lw4.amd.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-SJpF_87B.es.js → page.vue_vue_type_script_setup_true_lang-BrJDj6Jc.es.js} +4 -4
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-SJpF_87B.es.js.map → page.vue_vue_type_script_setup_true_lang-BrJDj6Jc.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-D8EtPAsl.amd.js → page.vue_vue_type_script_setup_true_lang-CswbEDMB.amd.js} +2 -2
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-D8EtPAsl.amd.js.map → page.vue_vue_type_script_setup_true_lang-CswbEDMB.amd.js.map} +1 -1
- package/.chunks/{popup-NHfxJUAB.es.js → popup-CXow1wKz.es.js} +4 -4
- package/.chunks/popup-CXow1wKz.es.js.map +1 -0
- package/.chunks/popup-Dj-jihki.amd.js +2 -0
- package/.chunks/popup-Dj-jihki.amd.js.map +1 -0
- package/.chunks/utils-BHg6iA_G.es.js +220 -0
- package/.chunks/utils-BHg6iA_G.es.js.map +1 -0
- package/.chunks/{utils-BPFSJAiy.amd.js → utils-BlYAmcIw.amd.js} +2 -2
- package/.chunks/{utils-BPFSJAiy.amd.js.map → utils-BlYAmcIw.amd.js.map} +1 -1
- package/.chunks/utils-DDcc2EWO.amd.js +2 -0
- package/.chunks/utils-DDcc2EWO.amd.js.map +1 -0
- package/.chunks/{utils-B-1oTT6I.es.js → utils-DKtp_zOP.es.js} +2 -2
- package/.chunks/{utils-B-1oTT6I.es.js.map → utils-DKtp_zOP.es.js.map} +1 -1
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/layout.css +1 -1
- package/assets/project.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.js +1 -1
- package/charts/charts.js.map +1 -1
- package/components/forms/avatar/avatar.d.ts +4 -10
- package/components/forms/button/button.vue.d.ts +2 -3
- package/components/forms/button/types.d.ts +5 -19
- package/components/forms/forms.d.ts +2 -0
- package/components/forms/helpers.d.ts +1 -10
- package/components/forms/input/input.d.ts +5 -16
- package/components/forms/input/input.vue.d.ts +2 -3
- package/components/forms/preloader/preloader.vue.d.ts +4 -0
- package/components/forms/preloader/types.d.ts +3 -0
- package/components/forms/select/select.d.ts +2 -2
- package/components/forms/select/select.vue.d.ts +1 -2
- package/components/formsExt/checkboxGroup/checkboxGroup.vue.d.ts +3 -3
- package/components/formsExt/checkboxGroup/stories/example.d.ts +15 -0
- package/components/formsExt/checkboxGroup/types.d.ts +2 -3
- package/components/formsExt/radioGroup/radioGroup.d.ts +3 -3
- package/components/formsExt/radioGroup/radioGroup.vue.d.ts +4 -7
- package/components/formsExt/radioGroup/stories/example.d.ts +20 -0
- package/components/formsExt/selector2/selector2.d.ts +2 -2
- package/components/formsExt/selector2/selector2.vue.d.ts +1 -2
- package/components/project/selectorRegion/composables/selectRegion.d.ts +0 -1
- package/core/app.amd.js +1 -1
- package/core/app.js +5 -5
- package/core/directives/preloader.d.ts +8 -0
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.js +2 -2
- package/extra/extra.amd.js +1 -1
- package/extra/extra.amd.js.map +1 -1
- package/extra/extra.js +15 -16
- package/extra/extra.js.map +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +6 -5
- package/forms/helpers.amd.js +1 -1
- package/forms/helpers.amd.js.map +1 -1
- package/forms/helpers.d.ts +0 -1
- package/forms/helpers.js +1 -9
- package/forms/helpers.js.map +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +313 -303
- package/formsExt/formsExt.js.map +1 -1
- package/layout/layout.amd.js +1 -1
- package/layout/layout.js +1 -1
- package/layout/layout.js.map +1 -1
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.js +2 -2
- package/popup/worker.amd.js +1 -1
- package/popup/worker.js +2 -2
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +175 -175
- package/project/project.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +1 -1
- package/tabsView/tabsView.js.map +1 -1
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.js +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.js +3 -3
- package/utils/string.amd.js +1 -1
- package/utils/string.js +1 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang--09NOqOd.es.js.map +0 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-BCvCrDYf.amd.js +0 -2
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-BCvCrDYf.amd.js.map +0 -1
- package/.chunks/popup-BpdlKk5T.amd.js +0 -2
- package/.chunks/popup-BpdlKk5T.amd.js.map +0 -1
- package/.chunks/popup-NHfxJUAB.es.js.map +0 -1
- package/.chunks/utils-CZwaa5j-.amd.js +0 -2
- package/.chunks/utils-CZwaa5j-.amd.js.map +0 -1
- package/.chunks/utils-DI9i3mGB.es.js +0 -225
- package/.chunks/utils-DI9i3mGB.es.js.map +0 -1
package/project/project.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Core as be } from "../core/app.js";
|
|
2
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
|
-
import { u as R, C as J, _ as H,
|
|
4
|
-
import { _ as Ie, a as ue, b as Oe } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as Ne } from "../.chunks/menu.vue_vue_type_style_index_0_lang-
|
|
6
|
-
import { u as De } from "../.chunks/utils-
|
|
3
|
+
import { u as R, C as J, _ as H, y as ie, d as Re } from "../.chunks/forms-Bwwj0krD.es.js";
|
|
4
|
+
import { _ as Ie, a as ue, b as Oe } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-DVE3W6HU.es.js";
|
|
5
|
+
import { _ as Ne } from "../.chunks/menu.vue_vue_type_style_index_0_lang-CcF-VJjz.es.js";
|
|
6
|
+
import { u as De } from "../.chunks/utils-DKtp_zOP.es.js";
|
|
7
7
|
import { getSearcherGIcon as Fe, getLangLabel as qe, getDeviceGIcon as Pe } from "../utils/searchers.js";
|
|
8
8
|
import { storage as W } from "../utils/dom.js";
|
|
9
9
|
import { TopPopupWorker as Ue } from "../popup/worker.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, n = 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 o;
|
|
44
44
|
return [
|
|
45
|
-
G(K((
|
|
46
|
-
var
|
|
47
|
-
return u.value === ((
|
|
48
|
-
})) == null ? void 0 :
|
|
45
|
+
G(K((o = i.items.find((u) => {
|
|
46
|
+
var f;
|
|
47
|
+
return u.value === ((f = n.value) == null ? void 0 : f[0]);
|
|
48
|
+
})) == null ? void 0 : o.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, (
|
|
56
|
-
var
|
|
55
|
+
(k(!0), B(Y, null, se(i.items, (o) => {
|
|
56
|
+
var u;
|
|
57
57
|
return k(), b(ue, {
|
|
58
58
|
class: X({
|
|
59
|
-
"top-active": (
|
|
59
|
+
"top-active": (u = n.value) == null ? void 0 : u.includes(o.value)
|
|
60
60
|
}),
|
|
61
|
-
"data-top-icon":
|
|
62
|
-
title:
|
|
63
|
-
onClick: () =>
|
|
61
|
+
"data-top-icon": o.icon,
|
|
62
|
+
title: o.title,
|
|
63
|
+
onClick: () => n.value = [o.value]
|
|
64
64
|
}, {
|
|
65
65
|
default: _(() => [
|
|
66
|
-
he("span", ze, K(
|
|
66
|
+
he("span", ze, K(o.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: n.value,
|
|
76
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => n.value = o),
|
|
77
77
|
items: i.items,
|
|
78
78
|
isMultiple: !0,
|
|
79
79
|
styling: "bar",
|
|
@@ -118,72 +118,72 @@ 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, n = []) => {
|
|
122
122
|
let e;
|
|
123
|
-
return t ? e = Qe(
|
|
124
|
-
}, Ce = (t, l = !0,
|
|
123
|
+
return t ? e = Qe(n) : e = Ce(n), l && e.set(p, Ye()), e.size || e.set(p, xe), e;
|
|
124
|
+
}, Ce = (t, l = !0, n = [], 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
|
-
|
|
128
|
+
const o = { ...a };
|
|
129
|
+
o.regionByIndex = /* @__PURE__ */ new Map(), a.regions && a.regions.forEach((u) => {
|
|
130
130
|
if (l && !u.enabled) return;
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
}), !
|
|
131
|
+
const f = { ...u };
|
|
132
|
+
o.regionByIndex.set(f.index, f);
|
|
133
|
+
}), !o.regionByIndex.size && n.length, // режим вывода ПС без регионов
|
|
134
134
|
(!a.regions || // есть включенные регионы
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}),
|
|
135
|
+
o.regionByIndex.size || // запрошен вывод конкретных ПС
|
|
136
|
+
n.length) && typeof o.key == "number" && i.set(o.key, o);
|
|
137
|
+
}), n.forEach((a) => {
|
|
138
138
|
if (i.has(a)) return;
|
|
139
|
-
const
|
|
139
|
+
const o = {
|
|
140
140
|
key: a,
|
|
141
141
|
name: Ge[a],
|
|
142
142
|
regions: [],
|
|
143
143
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
144
144
|
};
|
|
145
|
-
i.set(
|
|
145
|
+
i.set(o.key, o);
|
|
146
146
|
}), i;
|
|
147
147
|
}, Qe = (t) => {
|
|
148
148
|
const l = Ce(t, !1, [0, 1], !0);
|
|
149
149
|
if (l.has(2)) {
|
|
150
|
-
const
|
|
151
|
-
|
|
150
|
+
const n = l.get(2);
|
|
151
|
+
n && (n.regionByIndex = /* @__PURE__ */ new Map());
|
|
152
152
|
}
|
|
153
|
-
return l.forEach((
|
|
154
|
-
if (!
|
|
153
|
+
return l.forEach((n) => {
|
|
154
|
+
if (!n.regionByIndex) return;
|
|
155
155
|
const e = { ...He() };
|
|
156
|
-
|
|
156
|
+
n.regionByIndex.set(e.index, e);
|
|
157
157
|
}), l;
|
|
158
|
-
}, Xe = (t, l,
|
|
159
|
-
const e = ke(t, !1,
|
|
158
|
+
}, Xe = (t, l, n = []) => {
|
|
159
|
+
const e = ke(t, !1, n);
|
|
160
160
|
let i;
|
|
161
161
|
return e.forEach((a) => {
|
|
162
|
-
if (!(l.searcher_key !== void 0 && l.searcher_key != a.key) && a.regions && (a.regions.forEach((
|
|
163
|
-
if (!i && !(l.key !== void 0 && l.key !=
|
|
164
|
-
return
|
|
162
|
+
if (!(l.searcher_key !== void 0 && l.searcher_key != a.key) && a.regions && (a.regions.forEach((o) => {
|
|
163
|
+
if (!i && !(l.key !== void 0 && l.key != o.key) && !(l.index !== void 0 && l.index != o.index) && !(!t && (l.lang !== void 0 && l.lang != o.lang || l.device !== void 0 && l.device != o.device)))
|
|
164
|
+
return o.searcher_key = a.key, i = o, !1;
|
|
165
165
|
}), i))
|
|
166
166
|
return !1;
|
|
167
167
|
}), i;
|
|
168
|
-
}, Ze = De(() => import("../.chunks/dialog_selectorRegions-
|
|
169
|
-
const
|
|
168
|
+
}, Ze = De(() => import("../.chunks/dialog_selectorRegions-r5nqFKp1.es.js")), et = (t, l) => {
|
|
169
|
+
const n = R(), e = F(l.value.keys().next().value ?? p), i = E(() => {
|
|
170
170
|
const a = /* @__PURE__ */ new Map();
|
|
171
|
-
if (l.value.forEach((
|
|
171
|
+
if (l.value.forEach((o) => {
|
|
172
172
|
let u = {
|
|
173
|
-
value:
|
|
174
|
-
title:
|
|
173
|
+
value: o.key,
|
|
174
|
+
title: o.name
|
|
175
175
|
};
|
|
176
|
-
t.addSearcherIcon && (u.icon = Fe(
|
|
176
|
+
t.addSearcherIcon && (u.icon = Fe(o.key)), a.set(o.key, u);
|
|
177
177
|
}), t.addCompare && !a.has(p)) {
|
|
178
|
-
const
|
|
178
|
+
const o = {
|
|
179
179
|
value: "",
|
|
180
180
|
title: "--------------------",
|
|
181
181
|
disabled: !0
|
|
182
182
|
};
|
|
183
|
-
a.set(
|
|
183
|
+
a.set(o.value, o);
|
|
184
184
|
const u = {
|
|
185
185
|
value: M,
|
|
186
|
-
title:
|
|
186
|
+
title: n.Common.Compare
|
|
187
187
|
};
|
|
188
188
|
a.set(u.value, u);
|
|
189
189
|
}
|
|
@@ -194,12 +194,12 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
194
194
|
optionBySearcherKey: i
|
|
195
195
|
};
|
|
196
196
|
}, tt = (t, l) => {
|
|
197
|
-
var a,
|
|
198
|
-
const
|
|
199
|
-
t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === p && (t.forFrequency ? e.value = ((
|
|
197
|
+
var a, o, u;
|
|
198
|
+
const n = R(), e = F(p);
|
|
199
|
+
t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === p && (t.forFrequency ? e.value = ((o = (a = l.value) == null ? void 0 : a.regionByIndex.values().next().value) == null ? void 0 : o.key) ?? p : e.value = ((u = l.value) == null ? void 0 : u.regionByIndex.keys().next().value) ?? p);
|
|
200
200
|
const i = E(() => {
|
|
201
201
|
var h;
|
|
202
|
-
const
|
|
202
|
+
const f = /* @__PURE__ */ new Map();
|
|
203
203
|
return (h = l.value.regionByIndex) == null || h.forEach((S) => {
|
|
204
204
|
let r = S.name;
|
|
205
205
|
if (t.forFrequency) {
|
|
@@ -207,10 +207,10 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
207
207
|
value: S.key,
|
|
208
208
|
title: r
|
|
209
209
|
};
|
|
210
|
-
|
|
210
|
+
f.has(S.key) || f.set(S.key, x);
|
|
211
211
|
return;
|
|
212
212
|
}
|
|
213
|
-
S.device && (r += " (" +
|
|
213
|
+
S.device && (r += " (" + n.Common["Device_" + S.device] + ")");
|
|
214
214
|
const g = qe(l.value.key || 0, S.lang ?? "");
|
|
215
215
|
g && (r += " / " + g);
|
|
216
216
|
const d = {
|
|
@@ -218,20 +218,20 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
218
218
|
title: r,
|
|
219
219
|
icon: S.device ? Pe(S.device) : void 0
|
|
220
220
|
};
|
|
221
|
-
|
|
222
|
-
}),
|
|
221
|
+
f.set(S.index, d);
|
|
222
|
+
}), f;
|
|
223
223
|
});
|
|
224
|
-
return w(i, (
|
|
224
|
+
return w(i, (f, h) => {
|
|
225
225
|
var d;
|
|
226
|
-
if (t.onlySearcher || e.value !== void 0 &&
|
|
226
|
+
if (t.onlySearcher || e.value !== void 0 && f.get(e.value))
|
|
227
227
|
return;
|
|
228
|
-
let S =
|
|
228
|
+
let S = f.keys().next().value;
|
|
229
229
|
if (e.value === p || S === p) {
|
|
230
230
|
e.value = S;
|
|
231
231
|
return;
|
|
232
232
|
}
|
|
233
233
|
let r = ((d = h == null ? void 0 : h.get(e.value)) == null ? void 0 : d.title) || "", g = -1;
|
|
234
|
-
for (const [x, T] of
|
|
234
|
+
for (const [x, T] of f.entries()) {
|
|
235
235
|
const C = T.title;
|
|
236
236
|
if (typeof C != "string" || typeof x == "string")
|
|
237
237
|
break;
|
|
@@ -239,32 +239,32 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
239
239
|
S = x;
|
|
240
240
|
break;
|
|
241
241
|
}
|
|
242
|
-
const V = new RegExp(` \\((${
|
|
243
|
-
let
|
|
244
|
-
C.indexOf(
|
|
242
|
+
const V = new RegExp(` \\((${n.Common.Device_1}|${n.Common.Device_2})\\)`);
|
|
243
|
+
let m = r, s = 3;
|
|
244
|
+
C.indexOf(m) === -1 && (m = r.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(m) === -1 && (m = r.replace(/ \/.*/, ""), s--), C.indexOf(m) === -1 && (m = r.replace(/ \/.*/, ""), m = m.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(m) !== -1 && (s <= g || (g = s, S = x));
|
|
245
245
|
}
|
|
246
246
|
e.value = S;
|
|
247
247
|
}), {
|
|
248
248
|
regionIndex: e,
|
|
249
249
|
optionByRegionIndex: i
|
|
250
250
|
};
|
|
251
|
-
}, at = (t, l,
|
|
251
|
+
}, at = (t, l, n) => {
|
|
252
252
|
const e = F([]), i = () => {
|
|
253
253
|
if (t.onlySearcher && l.value) {
|
|
254
254
|
e.value = Array.from(l.value.keys());
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
|
-
let
|
|
257
|
+
let o = [];
|
|
258
258
|
if (t.modelValue.length > 1)
|
|
259
|
-
|
|
259
|
+
o = [...t.modelValue];
|
|
260
260
|
else
|
|
261
261
|
try {
|
|
262
|
-
|
|
262
|
+
o = JSON.parse(
|
|
263
263
|
localStorage.getItem("ui:project:regionSelector" + t.projectId + ":regionsIndexes")
|
|
264
264
|
) ?? [];
|
|
265
265
|
} catch {
|
|
266
266
|
}
|
|
267
|
-
|
|
267
|
+
o.length && (o = o.filter((u) => n.value.has(u))), o.length || (o = Array.from(n.value)), e.value = [...o];
|
|
268
268
|
}, a = () => {
|
|
269
269
|
e.value.length ? localStorage.setItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes", JSON.stringify(e.value)) : localStorage.removeItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes");
|
|
270
270
|
};
|
|
@@ -274,36 +274,36 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
274
274
|
regionsIndexes: e
|
|
275
275
|
};
|
|
276
276
|
}, lt = (t) => {
|
|
277
|
-
const l = E(() => ke(t.forFrequency, t.autoRegion, t.searchers)),
|
|
277
|
+
const l = E(() => ke(t.forFrequency, t.autoRegion, t.searchers)), n = E(() => l.value.get(i.searcherKey.value) || xe), e = E(() => {
|
|
278
278
|
const r = /* @__PURE__ */ new Set();
|
|
279
279
|
return l.value.forEach((g) => {
|
|
280
280
|
g.regionByIndex.forEach((d) => {
|
|
281
281
|
d.index !== te && d.index !== p && r.add(d.index);
|
|
282
282
|
});
|
|
283
283
|
}), r;
|
|
284
|
-
}), i = et(t, l), a = tt(t,
|
|
284
|
+
}), i = et(t, l), a = tt(t, n), o = at(t, l, e);
|
|
285
285
|
w(l, () => {
|
|
286
286
|
var g, d, x, T;
|
|
287
|
-
if (t.onlySearcher ?
|
|
287
|
+
if (t.onlySearcher ? o.regionsIndexes.value = Array.from(l.value.keys()) : o.regionsIndexes.value = o.regionsIndexes.value.filter((C) => e.value.has(C)), i.searcherKey.value === M) return;
|
|
288
288
|
let r = l.value.keys().next().value;
|
|
289
289
|
l.value.forEach((C) => {
|
|
290
|
-
var V,
|
|
290
|
+
var V, m, s;
|
|
291
291
|
if (t.onlySearcher && C.key === i.searcherKey.value) {
|
|
292
292
|
r = i.searcherKey.value;
|
|
293
293
|
return;
|
|
294
294
|
}
|
|
295
295
|
if (a.regionIndex.value && ((V = C.regionByIndex) != null && V.has(a.regionIndex.value)) && (r = C.key), !t.onlySearcher) {
|
|
296
296
|
let c;
|
|
297
|
-
r !== void 0 && (c = (
|
|
297
|
+
r !== void 0 && (c = (m = l.value.get(r)) == null ? void 0 : m.regionByIndex);
|
|
298
298
|
const v = (s = l.value.get(C.key)) == null ? void 0 : s.regionByIndex;
|
|
299
299
|
c != null && c.has(p) && !(v != null && v.has(p)) && (r = C.key);
|
|
300
300
|
}
|
|
301
|
-
}), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((d = (g =
|
|
301
|
+
}), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((d = (g = n.value) == null ? void 0 : g.regionByIndex) != null && d.has(a.regionIndex.value)) && (a.regionIndex.value = (T = (x = n.value) == null ? void 0 : x.regions) == null ? void 0 : T.keys().next().value);
|
|
302
302
|
}, { immediate: !0 });
|
|
303
303
|
const u = () => {
|
|
304
304
|
if (!(i.searcherKey.value === M || i.searcherKey.value === p))
|
|
305
305
|
return i.searcherKey.value;
|
|
306
|
-
},
|
|
306
|
+
}, f = () => {
|
|
307
307
|
if (t.onlySearcher || a.regionIndex.value === p) return;
|
|
308
308
|
let r = a.regionIndex.value;
|
|
309
309
|
if (t.forFrequency) {
|
|
@@ -319,18 +319,18 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
319
319
|
return {
|
|
320
320
|
selectSearcher: i,
|
|
321
321
|
selectRegion: a,
|
|
322
|
-
compare:
|
|
322
|
+
compare: o,
|
|
323
323
|
searcherByKey: l,
|
|
324
324
|
allRegionsIndexes: e,
|
|
325
325
|
getSearcher: h,
|
|
326
326
|
getRegion: () => {
|
|
327
327
|
var g, d;
|
|
328
|
-
const r =
|
|
328
|
+
const r = f();
|
|
329
329
|
if (r !== void 0)
|
|
330
330
|
return (d = (g = h()) == null ? void 0 : g.regionByIndex) == null ? void 0 : d.get(r);
|
|
331
331
|
}
|
|
332
332
|
};
|
|
333
|
-
},
|
|
333
|
+
}, ot = /* @__PURE__ */ P({
|
|
334
334
|
__name: "selectorRegion",
|
|
335
335
|
props: /* @__PURE__ */ N({
|
|
336
336
|
projectId: {},
|
|
@@ -352,17 +352,17 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
352
352
|
}),
|
|
353
353
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
354
354
|
setup(t, { expose: l }) {
|
|
355
|
-
const
|
|
355
|
+
const n = t, e = D(t, "modelValue"), i = D(t, "modelValueSingle"), {
|
|
356
356
|
selectSearcher: a,
|
|
357
|
-
selectRegion:
|
|
357
|
+
selectRegion: o,
|
|
358
358
|
compare: u,
|
|
359
|
-
searcherByKey:
|
|
359
|
+
searcherByKey: f,
|
|
360
360
|
allRegionsIndexes: h,
|
|
361
361
|
getSearcher: S,
|
|
362
362
|
getRegion: r
|
|
363
|
-
} = lt(
|
|
363
|
+
} = lt(n), g = () => {
|
|
364
364
|
const d = [];
|
|
365
|
-
|
|
365
|
+
f.value.forEach((x) => {
|
|
366
366
|
x.enabled && x.regions.forEach((T) => {
|
|
367
367
|
T.enabled && d.push(T);
|
|
368
368
|
});
|
|
@@ -372,22 +372,22 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
372
372
|
"@update:regionsIndexes": (x) => u.regionsIndexes.value = x
|
|
373
373
|
});
|
|
374
374
|
};
|
|
375
|
-
return w([
|
|
375
|
+
return w([o.regionIndex, a.searcherKey, u.regionsIndexes], () => {
|
|
376
376
|
if (a.searcherKey.value === M && u.regionsIndexes.value.length) {
|
|
377
377
|
if (JSON.stringify(e.value) === JSON.stringify(u.regionsIndexes.value))
|
|
378
378
|
return;
|
|
379
379
|
e.value = [...u.regionsIndexes.value];
|
|
380
380
|
} else
|
|
381
|
-
|
|
382
|
-
!
|
|
381
|
+
n.onlySearcher ? (e.value = [a.searcherKey.value], a.searcherKey.value === p && !n.autoRegion && (e.value.length = 0)) : (e.value = [o.regionIndex.value], o.regionIndex.value === p && !n.autoRegion && (e.value.length = 0));
|
|
382
|
+
!n.onlySearcher && !h.value.size && (a.searcherKey.value = p);
|
|
383
383
|
}), i.value && w(i, () => {
|
|
384
384
|
i.value && (e.value = [i.value]);
|
|
385
385
|
}, { immediate: !0 }), w(e, () => {
|
|
386
386
|
var d, x, T, C, V;
|
|
387
|
-
if (e.value[0] && (i.value = e.value[0]),
|
|
388
|
-
if (!e.value.length || e.value.length === 1 && !
|
|
389
|
-
let
|
|
390
|
-
|
|
387
|
+
if (e.value[0] && (i.value = e.value[0]), n.onlySearcher) {
|
|
388
|
+
if (!e.value.length || e.value.length === 1 && !f.value.has(e.value[0]) || e.value.length === 1 && e.value[0] === p && !n.autoRegion) {
|
|
389
|
+
let m = f.value.keys().next().value;
|
|
390
|
+
m === p && !n.autoRegion && (m = void 0, i.value = p), m !== void 0 ? e.value = [m] : e.value.length = 0;
|
|
391
391
|
return;
|
|
392
392
|
}
|
|
393
393
|
if (e.value.length > 1 && JSON.stringify(e.value) !== JSON.stringify(u.regionsIndexes.value)) {
|
|
@@ -395,25 +395,25 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
395
395
|
return;
|
|
396
396
|
}
|
|
397
397
|
} else {
|
|
398
|
-
let
|
|
399
|
-
if (
|
|
400
|
-
s !== void 0 &&
|
|
401
|
-
else if (
|
|
398
|
+
let m = [...new Set(e.value)], s = (x = (d = f.value.values().next().value) == null ? void 0 : d.regionByIndex) == null ? void 0 : x.keys().next().value;
|
|
399
|
+
if (n.forFrequency && (s = (V = (C = (T = f.value.values().next().value) == null ? void 0 : T.regionByIndex) == null ? void 0 : C.values().next().value) == null ? void 0 : V.key), s === p && !n.autoRegion && (s = void 0, i.value = p), !m.length)
|
|
400
|
+
s !== void 0 && m.push(s);
|
|
401
|
+
else if (m.length === 1) {
|
|
402
402
|
let c = h.value;
|
|
403
|
-
|
|
403
|
+
n.forFrequency && (c = /* @__PURE__ */ new Set(), f.value.forEach((v) => {
|
|
404
404
|
v.regionByIndex.forEach((I) => {
|
|
405
405
|
I.index !== te && I.index !== p && c.add(I.key);
|
|
406
406
|
});
|
|
407
|
-
})), c.has(
|
|
407
|
+
})), c.has(m[0]) || (m = [], s !== void 0 && m.push(s));
|
|
408
408
|
} else
|
|
409
|
-
|
|
410
|
-
if (JSON.stringify(e.value) !== JSON.stringify(
|
|
411
|
-
e.value =
|
|
409
|
+
m = m.filter((c) => h.value.has(c)), !m.length && s !== void 0 && m.push(s);
|
|
410
|
+
if (JSON.stringify(e.value) !== JSON.stringify(m)) {
|
|
411
|
+
e.value = m;
|
|
412
412
|
return;
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
if (!(e.value.length === 1 && e.value[0] === (
|
|
416
|
-
if (
|
|
415
|
+
if (!(e.value.length === 1 && e.value[0] === (n.onlySearcher ? a.searcherKey.value : o.regionIndex.value)))
|
|
416
|
+
if (n.onlySearcher) {
|
|
417
417
|
if (e.value.length === 1) {
|
|
418
418
|
a.searcherKey.value = e.value[0];
|
|
419
419
|
return;
|
|
@@ -424,18 +424,18 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
424
424
|
if (!e.value.length)
|
|
425
425
|
return;
|
|
426
426
|
if (e.value.length === 1 && a.searcherKey.value !== M) {
|
|
427
|
-
|
|
428
|
-
let
|
|
429
|
-
for (const s of
|
|
427
|
+
o.regionIndex.value = e.value[0];
|
|
428
|
+
let m;
|
|
429
|
+
for (const s of f.value.values()) {
|
|
430
430
|
for (const c of s.regionByIndex.values())
|
|
431
|
-
if ((
|
|
432
|
-
|
|
431
|
+
if ((n.forFrequency ? c.key : c.index) === o.regionIndex.value) {
|
|
432
|
+
m = s.key;
|
|
433
433
|
break;
|
|
434
434
|
}
|
|
435
|
-
if (
|
|
435
|
+
if (m !== void 0)
|
|
436
436
|
break;
|
|
437
437
|
}
|
|
438
|
-
|
|
438
|
+
m !== void 0 && (a.searcherKey.value = m);
|
|
439
439
|
} else
|
|
440
440
|
a.searcherKey.value = M, u.regionsIndexes.value = [...e.value];
|
|
441
441
|
}
|
|
@@ -458,9 +458,9 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
458
458
|
!d.onlySearcher && y(a).searcherKey.value !== y(M) ? (k(), b(ie, {
|
|
459
459
|
key: 0,
|
|
460
460
|
class: "top-select-region",
|
|
461
|
-
options: y(
|
|
462
|
-
modelValue: y(
|
|
463
|
-
"onUpdate:modelValue": x[1] || (x[1] = (T) => y(
|
|
461
|
+
options: y(o).optionByRegionIndex.value,
|
|
462
|
+
modelValue: y(o).regionIndex.value,
|
|
463
|
+
"onUpdate:modelValue": x[1] || (x[1] = (T) => y(o).regionIndex.value = T),
|
|
464
464
|
name: d.forFrequency ? "region_key" : "region_index",
|
|
465
465
|
addChanger: d.addChanger,
|
|
466
466
|
"data-top-icon": d.addRegionIcon ? "" : void 0
|
|
@@ -478,7 +478,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
478
478
|
}, 8, ["data-count-compare-regions-indexes"])) : q("", !0)
|
|
479
479
|
], 2));
|
|
480
480
|
}
|
|
481
|
-
}),
|
|
481
|
+
}), nt = [
|
|
482
482
|
{
|
|
483
483
|
id: "1",
|
|
484
484
|
name: "Without Tag",
|
|
@@ -531,10 +531,10 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
531
531
|
}
|
|
532
532
|
], ve = (t) => "-" + t, Q = (t) => t[0] === "-" ? t.substring(1) : t, le = (t, l) => {
|
|
533
533
|
t = Q(t);
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
536
|
-
return
|
|
537
|
-
}, rt = ["data-tag_id", "data-tag_color_id", "title"],
|
|
534
|
+
const n = l.find((e) => e.id === t);
|
|
535
|
+
if (n)
|
|
536
|
+
return n;
|
|
537
|
+
}, rt = ["data-tag_id", "data-tag_color_id", "title"], oe = /* @__PURE__ */ P({
|
|
538
538
|
__name: "tagIcon",
|
|
539
539
|
props: {
|
|
540
540
|
id: {},
|
|
@@ -543,7 +543,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
543
543
|
state: {}
|
|
544
544
|
},
|
|
545
545
|
setup(t) {
|
|
546
|
-
return (l,
|
|
546
|
+
return (l, n) => (k(), B("div", {
|
|
547
547
|
class: X({
|
|
548
548
|
"top-tagSelector_tagIcon": !0,
|
|
549
549
|
"top-tagSelector-active": !!l.state,
|
|
@@ -572,10 +572,10 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
572
572
|
}),
|
|
573
573
|
emits: /* @__PURE__ */ N(["update:name", "unselect", "exclude", "select"], ["update:name"]),
|
|
574
574
|
setup(t, { emit: l }) {
|
|
575
|
-
const
|
|
575
|
+
const n = t, e = l, i = D(t, "name"), a = F(null), o = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
576
576
|
contenteditable: u.value,
|
|
577
577
|
onpaste: (g) => g.preventDefault()
|
|
578
|
-
} : {}), u = F(!1),
|
|
578
|
+
} : {}), u = F(!1), f = async () => {
|
|
579
579
|
var g;
|
|
580
580
|
u.value = !0, await Ve(), (g = a.value) == null || g.focus();
|
|
581
581
|
}, h = () => {
|
|
@@ -584,11 +584,11 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
584
584
|
if (!g) return S();
|
|
585
585
|
a.value && (a.value.innerText = g), u.value = !1, e("update:name", g);
|
|
586
586
|
}, S = async () => {
|
|
587
|
-
a.value && (a.value.innerText =
|
|
587
|
+
a.value && (a.value.innerText = n.name), u.value = !1;
|
|
588
588
|
}, r = (g) => {
|
|
589
|
-
if (u.value ||
|
|
589
|
+
if (u.value || n.disabled) return;
|
|
590
590
|
let d = "selected";
|
|
591
|
-
|
|
591
|
+
n.canExclude && (g.ctrlKey || g.metaKey) && (d = "excluded"), n.state == d && (d = ""), d === "" && e("unselect"), d === "selected" && e("select"), d === "excluded" && e("exclude");
|
|
592
592
|
};
|
|
593
593
|
return (g, d) => (k(), b(ue, {
|
|
594
594
|
class: X({
|
|
@@ -602,7 +602,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
602
602
|
onClick: z(r, ["stop"])
|
|
603
603
|
}, {
|
|
604
604
|
default: _(() => [
|
|
605
|
-
A(
|
|
605
|
+
A(oe, {
|
|
606
606
|
id: g.id,
|
|
607
607
|
name: i.value,
|
|
608
608
|
colorId: g.colorId,
|
|
@@ -613,7 +613,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
613
613
|
ref: a,
|
|
614
614
|
class: "top-tagSelector_tagListItemName",
|
|
615
615
|
contenteditable: u.value ? "plaintext-only" : !1
|
|
616
|
-
},
|
|
616
|
+
}, o.value, {
|
|
617
617
|
onKeydown: [
|
|
618
618
|
de(z(h, ["stop"]), ["enter"]),
|
|
619
619
|
de(z(S, ["stop"]), ["esc"])
|
|
@@ -629,7 +629,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
629
629
|
key: 0,
|
|
630
630
|
"data-top-icon": "",
|
|
631
631
|
class: "top-tagSelector_edit",
|
|
632
|
-
onClick:
|
|
632
|
+
onClick: f
|
|
633
633
|
}))
|
|
634
634
|
], 64)) : q("", !0)
|
|
635
635
|
]),
|
|
@@ -656,52 +656,52 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
656
656
|
}),
|
|
657
657
|
emits: ["update:modelValue"],
|
|
658
658
|
setup(t) {
|
|
659
|
-
const l = t,
|
|
660
|
-
model:
|
|
659
|
+
const l = t, n = D(t, "modelValue"), e = l.useTopButton ? H : "div", i = l.useTopButton ? "html" : "default", a = {
|
|
660
|
+
model: n,
|
|
661
661
|
mode: l.mode,
|
|
662
662
|
targetId: l.targetId,
|
|
663
663
|
filters: l.filters,
|
|
664
664
|
payload: l.payload
|
|
665
665
|
};
|
|
666
|
-
return (
|
|
667
|
-
const
|
|
668
|
-
return k(), b(Oe, { id:
|
|
666
|
+
return (o, u) => {
|
|
667
|
+
const f = Ee("top-data");
|
|
668
|
+
return k(), b(Oe, { id: o.id }, {
|
|
669
669
|
default: _(() => [
|
|
670
670
|
Me((k(), b(Ke(y(e)), Se({
|
|
671
671
|
class: {
|
|
672
672
|
"top-tagSelector": !0,
|
|
673
673
|
"top-tagSelector-filter": l.mode === "filter",
|
|
674
|
-
"top-tagSelector-setter_single": l.mode === "setter" && !
|
|
675
|
-
"top-tagSelector-setter_several": l.mode === "setter" &&
|
|
676
|
-
"top-tagSelector-selectedOne": !
|
|
677
|
-
"top-tagSelector-toTwoLine":
|
|
674
|
+
"top-tagSelector-setter_single": l.mode === "setter" && !o.filters,
|
|
675
|
+
"top-tagSelector-setter_several": l.mode === "setter" && o.filters,
|
|
676
|
+
"top-tagSelector-selectedOne": !n.value.length || n.value.length === 1,
|
|
677
|
+
"top-tagSelector-toTwoLine": n.value.length > 5
|
|
678
678
|
},
|
|
679
679
|
color: "theme",
|
|
680
680
|
styling: ""
|
|
681
|
-
},
|
|
681
|
+
}, o.$attrs), {
|
|
682
682
|
[y(i)]: _(() => [
|
|
683
|
-
!
|
|
683
|
+
!n.value.length && o.mode === "filter" ? (k(), b(oe, {
|
|
684
684
|
key: 0,
|
|
685
685
|
id: "all",
|
|
686
686
|
colorId: "",
|
|
687
|
-
name:
|
|
687
|
+
name: o.$i18n.Common.All_tags ?? "",
|
|
688
688
|
state: ""
|
|
689
689
|
}, null, 8, ["name"])) : q("", !0),
|
|
690
|
-
|
|
691
|
-
$e(
|
|
692
|
-
])) : (k(!0), B(Y, { key: 2 }, se(
|
|
690
|
+
o.mode === "setter" && o.filters ? (k(), B("div", st, [
|
|
691
|
+
$e(o.$slots, "default")
|
|
692
|
+
])) : (k(!0), B(Y, { key: 2 }, se(n.value, (h) => {
|
|
693
693
|
var S, r;
|
|
694
|
-
return k(), b(
|
|
694
|
+
return k(), b(oe, {
|
|
695
695
|
id: y(Q)(h),
|
|
696
|
-
colorId: ((S = y(le)(h,
|
|
697
|
-
name: ((r = y(le)(h,
|
|
696
|
+
colorId: ((S = y(le)(h, o.tags)) == null ? void 0 : S.color_id) ?? "",
|
|
697
|
+
name: ((r = y(le)(h, o.tags)) == null ? void 0 : r.name) ?? "",
|
|
698
698
|
state: y(Q)(h) === h ? "selected" : "excluded"
|
|
699
699
|
}, null, 8, ["id", "colorId", "name", "state"]);
|
|
700
700
|
}), 256))
|
|
701
701
|
]),
|
|
702
702
|
_: 2
|
|
703
703
|
}, 1040, ["class"])), [
|
|
704
|
-
[
|
|
704
|
+
[f, a, "topTagSelectorTarget"]
|
|
705
705
|
])
|
|
706
706
|
]),
|
|
707
707
|
_: 3
|
|
@@ -726,20 +726,20 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
726
726
|
},
|
|
727
727
|
modelModifiers: {},
|
|
728
728
|
tags: {
|
|
729
|
-
default: Ae(
|
|
729
|
+
default: Ae(nt)
|
|
730
730
|
},
|
|
731
731
|
tagsModifiers: {}
|
|
732
732
|
}),
|
|
733
733
|
emits: /* @__PURE__ */ N(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
|
|
734
734
|
setup(t, { emit: l }) {
|
|
735
|
-
const
|
|
736
|
-
|
|
735
|
+
const n = R(), e = t, i = D(t, "modelValue"), a = D(t, "tags"), o = l, u = Re((s, c) => {
|
|
736
|
+
o(s, c);
|
|
737
737
|
}, e.emitDelay);
|
|
738
738
|
e.singleMode && !i.value.length && (i.value = [a.value[0].id]);
|
|
739
|
-
const
|
|
739
|
+
const f = e.id ?? "top-popup-id-" + Math.random(), h = F("add"), S = () => {
|
|
740
740
|
var v;
|
|
741
|
-
const s = " " + ((v =
|
|
742
|
-
return c.set("add", { value: "add", title:
|
|
741
|
+
const s = " " + ((v = n.Common.Tags) == null ? void 0 : v.toLowerCase()), c = /* @__PURE__ */ new Map();
|
|
742
|
+
return c.set("add", { value: "add", title: n.Common.Add + s }), c.set("replace", { value: "replace", title: n.Common.Replace + s }), c.set("delete", { value: "delete", title: n.Common.Delete + s }), c;
|
|
743
743
|
};
|
|
744
744
|
let r = we({
|
|
745
745
|
model: i,
|
|
@@ -783,7 +783,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
783
783
|
id: String(c),
|
|
784
784
|
name: s,
|
|
785
785
|
color_id: String((c - 1) % 10 + 1)
|
|
786
|
-
}),
|
|
786
|
+
}), o("tagsChanged", a.value);
|
|
787
787
|
}, V = (s) => {
|
|
788
788
|
var c;
|
|
789
789
|
if (r.value = W(s.elPopupOpener, "topTagSelectorTarget"), !r.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
@@ -806,12 +806,12 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
806
806
|
const O = $(j).attr("data-tag_id");
|
|
807
807
|
U.push(O);
|
|
808
808
|
}), a.value.sort((Z, j) => {
|
|
809
|
-
const O = U.findIndex((
|
|
809
|
+
const O = U.findIndex((ne) => ne === Z.id), _e = U.findIndex((ne) => ne === j.id);
|
|
810
810
|
return O - _e;
|
|
811
811
|
}), u("tagsChanged", a.value);
|
|
812
812
|
}
|
|
813
813
|
});
|
|
814
|
-
},
|
|
814
|
+
}, m = (s) => {
|
|
815
815
|
var c;
|
|
816
816
|
(c = J.$) != null && c.ui.sortable && $(s.elPopup).data("ui-sortable") && $(s.elPopup).sortable("destroy");
|
|
817
817
|
};
|
|
@@ -820,16 +820,16 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
820
820
|
class: "top-select_arrow",
|
|
821
821
|
modelValue: i.value,
|
|
822
822
|
"onUpdate:modelValue": c[0] || (c[0] = (v) => i.value = v),
|
|
823
|
-
id: y(
|
|
823
|
+
id: y(f),
|
|
824
824
|
tags: a.value,
|
|
825
825
|
mode: "filter",
|
|
826
826
|
useTopButton: ""
|
|
827
827
|
}, null, 8, ["modelValue", "id", "tags"]),
|
|
828
828
|
A(Ie, {
|
|
829
|
-
id: y(
|
|
829
|
+
id: y(f),
|
|
830
830
|
class: X(T.value),
|
|
831
831
|
onOpen: c[4] || (c[4] = (v) => V(v)),
|
|
832
|
-
onClose: c[5] || (c[5] = (v) =>
|
|
832
|
+
onClose: c[5] || (c[5] = (v) => m(v)),
|
|
833
833
|
"transition-duration": 50
|
|
834
834
|
}, Le({
|
|
835
835
|
contentList: _(() => [
|
|
@@ -914,34 +914,34 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
914
914
|
title: i.url + ` [${i.id}]`,
|
|
915
915
|
icon: i.id === ce(l) ? "" : "",
|
|
916
916
|
content: i.name
|
|
917
|
-
}))), It = (t, l,
|
|
917
|
+
}))), It = (t, l, n) => {
|
|
918
918
|
l || (l = { id: t.id }), l.id = t.id;
|
|
919
919
|
const e = Ue.genElPopupOpener("div", l);
|
|
920
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) => {
|
|
921
921
|
i.preventDefault(), i.stopPropagation(), e.onclick = null;
|
|
922
|
-
const a = F(t.modelValue),
|
|
922
|
+
const a = F(t.modelValue), o = {
|
|
923
923
|
model: a,
|
|
924
924
|
mode: t.mode,
|
|
925
925
|
targetId: t.targetId,
|
|
926
926
|
filters: t.filters,
|
|
927
927
|
payload: t.payload
|
|
928
928
|
};
|
|
929
|
-
W(e, "topTagSelectorTarget",
|
|
930
|
-
t.modelValue = a.value, ee(e, t,
|
|
929
|
+
W(e, "topTagSelectorTarget", o), delete e.dataset.topPopupDisabled, ge(t.modelValue) || w(a, () => {
|
|
930
|
+
t.modelValue = a.value, ee(e, t, n);
|
|
931
931
|
}), e.click();
|
|
932
|
-
}, ge(t.modelValue) ? w(t.modelValue, () => ee(e, t,
|
|
932
|
+
}, ge(t.modelValue) ? w(t.modelValue, () => ee(e, t, n)) : W(e, "topTagSelectorRender", (i) => {
|
|
933
933
|
t.modelValue = i;
|
|
934
934
|
const a = W(e, "topTagSelectorTarget");
|
|
935
|
-
a && (a.model.value = i), ee(e, t,
|
|
936
|
-
}), ee(e, t,
|
|
935
|
+
a && (a.model.value = i), ee(e, t, n);
|
|
936
|
+
}), ee(e, t, n), e;
|
|
937
937
|
}, xt = (t, l) => {
|
|
938
|
-
var
|
|
939
|
-
(
|
|
940
|
-
}, ee = (t, l,
|
|
938
|
+
var n;
|
|
939
|
+
(n = W(t, "topTagSelectorRender")) == null || n(l);
|
|
940
|
+
}, ee = (t, l, n) => {
|
|
941
941
|
var i;
|
|
942
942
|
const e = y(l.modelValue);
|
|
943
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) {
|
|
944
|
-
t.innerHTML = `<div>${
|
|
944
|
+
t.innerHTML = `<div>${n}</div>`;
|
|
945
945
|
return;
|
|
946
946
|
}
|
|
947
947
|
if (t.innerHTML = "", !e.length && l.mode === "filter") {
|
|
@@ -954,19 +954,19 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
|
|
|
954
954
|
t.append(a);
|
|
955
955
|
}
|
|
956
956
|
e.forEach((a) => {
|
|
957
|
-
var u,
|
|
958
|
-
const
|
|
957
|
+
var u, f;
|
|
958
|
+
const o = pe({
|
|
959
959
|
id: Q(a),
|
|
960
960
|
colorId: ((u = le(a, l.tags)) == null ? void 0 : u.color_id) ?? "",
|
|
961
|
-
name: ((
|
|
961
|
+
name: ((f = le(a, l.tags)) == null ? void 0 : f.name) ?? "",
|
|
962
962
|
state: Q(a) === a ? "selected" : "excluded"
|
|
963
963
|
});
|
|
964
|
-
t.append(
|
|
964
|
+
t.append(o);
|
|
965
965
|
});
|
|
966
966
|
}, pe = (t) => {
|
|
967
967
|
const l = document.createElement("div");
|
|
968
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;
|
|
969
|
-
}, kt = Je, Ct =
|
|
969
|
+
}, kt = Je, Ct = ot, Tt = ut, _t = Te, bt = oe;
|
|
970
970
|
export {
|
|
971
971
|
kt as TopSelectorCompetitors,
|
|
972
972
|
Ct as TopSelectorRegion,
|