@topvisor/ui 1.0.13 → 1.0.14-pinia-prepare-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/.chunks/{datepicker-DOmAO7Nq.es.js → datepicker-BuFX5Ibd.es.js} +2 -2
- package/.chunks/{datepicker-DOmAO7Nq.es.js.map → datepicker-BuFX5Ibd.es.js.map} +1 -1
- package/.chunks/{datepicker-DX0qKxI_.amd.js → datepicker-nf_2LrjW.amd.js} +2 -2
- package/.chunks/{datepicker-DX0qKxI_.amd.js.map → datepicker-nf_2LrjW.amd.js.map} +1 -1
- package/.chunks/{forms-Dg1N8Jv3.amd.js → forms-BLpuaGu3.amd.js} +3 -3
- package/.chunks/{forms-Dg1N8Jv3.amd.js.map → forms-BLpuaGu3.amd.js.map} +1 -1
- package/.chunks/{forms-FHMqYVvM.es.js → forms-CO7gZ-Jf.es.js} +124 -124
- package/.chunks/{forms-FHMqYVvM.es.js.map → forms-CO7gZ-Jf.es.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CuWOLCGe.es.js → listItem.vue_vue_type_script_setup_true_lang-BViq2HMb.es.js} +2 -2
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CuWOLCGe.es.js.map → listItem.vue_vue_type_script_setup_true_lang-BViq2HMb.es.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-tzOQcPs_.amd.js → listItem.vue_vue_type_script_setup_true_lang-C3_ynkiW.amd.js} +2 -2
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-tzOQcPs_.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-C3_ynkiW.amd.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-C_ND48ou.amd.js → menu.vue_vue_type_style_index_0_lang-B3O5DQLa.amd.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-C_ND48ou.amd.js.map → menu.vue_vue_type_style_index_0_lang-B3O5DQLa.amd.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-BGdS1bYl.es.js → menu.vue_vue_type_style_index_0_lang-tVQzbd1R.es.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-BGdS1bYl.es.js.map → menu.vue_vue_type_style_index_0_lang-tVQzbd1R.es.js.map} +1 -1
- package/.chunks/notice-BShByAqB.amd.js +4 -0
- package/.chunks/notice-BShByAqB.amd.js.map +1 -0
- package/.chunks/notice-DqPTC2Eb.es.js +175 -0
- package/.chunks/notice-DqPTC2Eb.es.js.map +1 -0
- package/.chunks/{popup-CSNWKE4F.amd.js → popup-3eJtfdGC.amd.js} +2 -2
- package/.chunks/popup-3eJtfdGC.amd.js.map +1 -0
- package/.chunks/{popup-CBNL-Ixi.es.js → popup-PVygOyt6.es.js} +4 -4
- package/.chunks/popup-PVygOyt6.es.js.map +1 -0
- package/.chunks/{utils-B6497Bik.es.js → utils-CaTXdV8x.es.js} +52 -44
- package/.chunks/utils-CaTXdV8x.es.js.map +1 -0
- package/.chunks/utils-DqBBCGAB.amd.js +2 -0
- package/.chunks/utils-DqBBCGAB.amd.js.map +1 -0
- package/.chunks/{utils-BgirCapu.es.js → utils-DtkfhYfA.es.js} +59 -54
- package/.chunks/utils-DtkfhYfA.es.js.map +1 -0
- package/.chunks/{utils-DINqzHO_.amd.js → utils-FeIFDJOE.amd.js} +2 -2
- package/.chunks/utils-FeIFDJOE.amd.js.map +1 -0
- package/README.md +7 -12
- package/assets/core.css +1 -1
- package/assets/layout.css +1 -0
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.js +47 -42
- package/charts/charts.js.map +1 -1
- package/components/charts/miniChart/miniChart.d.ts +5 -0
- package/components/core/notice/item/item.vue.d.ts +3 -1
- package/components/core/notice/item/types.d.ts +4 -0
- package/components/core/notice/utils.d.ts +1 -0
- package/components/dialog/dialog/composables/{asyncDialogWorker.d.ts → asyncDialogHandle.d.ts} +1 -1
- package/components/dialog/dialog/composables/utils.d.ts +2 -2
- package/components/dialog/dialog/dialogs/dialogs.vue.d.ts +1 -1
- package/components/dialog/lib/types.d.ts +6 -1
- package/components/dialog/lib/worker.d.ts +5 -0
- package/components/layout/islandRows/islandRows.vue.d.ts +16 -0
- package/components/layout/islandRows/islandRowsRow/islandRowsRow.vue.d.ts +17 -0
- package/components/layout/islandRows/islandRowsRow/types.d.ts +2 -0
- package/components/layout/islandRows/types.d.ts +10 -0
- package/components/layout/layout.d.ts +7 -0
- package/components/layout/rows/rows.vue.d.ts +20 -0
- package/components/layout/rows/types.d.ts +6 -0
- package/components/project/project.d.ts +1 -0
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +30 -33
- package/core/app.js.map +1 -1
- package/core/core/options.d.ts +2 -2
- package/core/utils/check.d.ts +1 -1
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.js +2 -2
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.js +54 -54
- package/icomoon/Topvisor icons.json +1421 -1192
- package/icomoon/demo-files/demo.css +0 -3
- package/icomoon/demo.html +103 -36
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +8 -3
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +21 -5
- package/layout/layout.amd.js +2 -0
- package/layout/layout.amd.js.map +1 -0
- package/layout/layout.d.ts +2 -0
- package/layout/layout.js +54 -0
- package/layout/layout.js.map +1 -0
- package/package.json +3 -3
- 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 +457 -444
- package/project/project.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.js +16 -16
- package/utils/check.amd.js +1 -1
- package/utils/check.amd.js.map +1 -1
- package/utils/check.js +12 -12
- package/utils/check.js.map +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 +5 -5
- package/utils/price.amd.js +1 -1
- package/utils/price.js +1 -1
- package/utils/string.amd.js +1 -1
- package/utils/string.js +1 -1
- package/.chunks/notice-BixWe-8g.amd.js +0 -4
- package/.chunks/notice-BixWe-8g.amd.js.map +0 -1
- package/.chunks/notice-D07Kq3fU.es.js +0 -172
- package/.chunks/notice-D07Kq3fU.es.js.map +0 -1
- package/.chunks/popup-CBNL-Ixi.es.js.map +0 -1
- package/.chunks/popup-CSNWKE4F.amd.js.map +0 -1
- package/.chunks/utils-B6497Bik.es.js.map +0 -1
- package/.chunks/utils-BgirCapu.es.js.map +0 -1
- package/.chunks/utils-Bxmh9YxC.amd.js +0 -2
- package/.chunks/utils-Bxmh9YxC.amd.js.map +0 -1
- package/.chunks/utils-DINqzHO_.amd.js.map +0 -1
- /package/components/dialog/dialog/composables/{dialogWorker.d.ts → dialogHandle.d.ts} +0 -0
package/project/project.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Core as
|
|
2
|
-
import { defineComponent as P, mergeModels as O, useModel as
|
|
3
|
-
import { c as R, C as J, _ as W, y as re,
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { getSearcherGIcon as
|
|
1
|
+
import { Core as Te } from "../core/app.js";
|
|
2
|
+
import { defineComponent as P, mergeModels as O, useModel as D, computed as M, openBlock as x, createElementBlock as w, unref as h, createBlock as B, withCtx as b, createVNode as A, createTextVNode as z, toDisplayString as K, Fragment as Y, renderList as ie, normalizeClass as Q, createElementVNode as ye, ref as F, watch as L, createCommentVNode as q, withModifiers as j, mergeProps as pe, withKeys as de, nextTick as be, resolveDirective as Be, withDirectives as Ve, resolveDynamicComponent as we, renderSlot as Me, reactive as $e, shallowRef as Ee, createSlots as Ke, toValue as ue, isRef as ce } from "vue";
|
|
3
|
+
import { c as R, C as J, _ as W, y as re, s as Le } from "../.chunks/forms-CO7gZ-Jf.es.js";
|
|
4
|
+
import { _ as he, b as se, a as Ae } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-BViq2HMb.es.js";
|
|
5
|
+
import { _ as Oe } from "../.chunks/menu.vue_vue_type_style_index_0_lang-tVQzbd1R.es.js";
|
|
6
|
+
import { getSearcherGIcon as Re, getLangLabel as Ne, getDeviceGIcon as De } from "../utils/searchers.js";
|
|
7
7
|
import { storage as G } from "../utils/dom.js";
|
|
8
|
-
import { TopPopupWorker as
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
8
|
+
import { TopPopupWorker as Fe } from "../popup/worker.js";
|
|
9
|
+
const _e = ["../assets/project.css"].map((e) => import.meta.resolve(e));
|
|
10
|
+
Te.insertCSSLinkToPage(_e, !0);
|
|
11
|
+
const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }, Ue = /* @__PURE__ */ P({
|
|
12
12
|
__name: "selectorCompetitors",
|
|
13
13
|
props: /* @__PURE__ */ O({
|
|
14
14
|
modelValue: {},
|
|
@@ -20,8 +20,8 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
20
20
|
}),
|
|
21
21
|
emits: ["update:modelValue"],
|
|
22
22
|
setup(e) {
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
23
|
+
const a = e, i = D(e, "modelValue"), t = M(() => {
|
|
24
|
+
if (a.showSelectAllItem)
|
|
25
25
|
return {
|
|
26
26
|
icon: "",
|
|
27
27
|
title: R().Common.Select_all,
|
|
@@ -29,51 +29,51 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
29
29
|
content: ""
|
|
30
30
|
};
|
|
31
31
|
});
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
opener:
|
|
35
|
-
|
|
32
|
+
return (l, o) => (x(), w("div", qe, [
|
|
33
|
+
h(J).state.isMobile ? (x(), B(he, { key: 0 }, {
|
|
34
|
+
opener: b(() => [
|
|
35
|
+
A(W, {
|
|
36
36
|
class: "top-selectorCompetitors_opener",
|
|
37
37
|
color: "theme",
|
|
38
38
|
icon: "",
|
|
39
39
|
icon2: ""
|
|
40
40
|
}, {
|
|
41
|
-
default:
|
|
41
|
+
default: b(() => {
|
|
42
42
|
var n;
|
|
43
43
|
return [
|
|
44
|
-
z(
|
|
45
|
-
var
|
|
46
|
-
return
|
|
44
|
+
z(K((n = l.items.find((d) => {
|
|
45
|
+
var g;
|
|
46
|
+
return d.value === ((g = i.value) == null ? void 0 : g[0]);
|
|
47
47
|
})) == null ? void 0 : n.content), 1)
|
|
48
48
|
];
|
|
49
49
|
}),
|
|
50
50
|
_: 1
|
|
51
51
|
})
|
|
52
52
|
]),
|
|
53
|
-
contentList:
|
|
54
|
-
(
|
|
55
|
-
var
|
|
56
|
-
return
|
|
53
|
+
contentList: b(() => [
|
|
54
|
+
(x(!0), w(Y, null, ie(l.items, (n, d) => {
|
|
55
|
+
var g;
|
|
56
|
+
return x(), B(se, {
|
|
57
57
|
class: Q({
|
|
58
|
-
"top-active": (
|
|
58
|
+
"top-active": (g = i.value) == null ? void 0 : g.includes(n.value)
|
|
59
59
|
}),
|
|
60
60
|
"data-top-icon": n.icon,
|
|
61
61
|
title: n.title,
|
|
62
62
|
onClick: () => i.value = [n.value]
|
|
63
63
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
64
|
+
default: b(() => [
|
|
65
|
+
ye("span", Pe, K(n.content), 1)
|
|
66
66
|
]),
|
|
67
67
|
_: 2
|
|
68
68
|
}, 1032, ["class", "data-top-icon", "title", "onClick"]);
|
|
69
69
|
}), 256))
|
|
70
70
|
]),
|
|
71
71
|
_: 1
|
|
72
|
-
})) : (
|
|
72
|
+
})) : (x(), B(Oe, {
|
|
73
73
|
key: 1,
|
|
74
74
|
modelValue: i.value,
|
|
75
75
|
"onUpdate:modelValue": o[0] || (o[0] = (n) => i.value = n),
|
|
76
|
-
items:
|
|
76
|
+
items: l.items,
|
|
77
77
|
isMultiple: !0,
|
|
78
78
|
styling: "bar",
|
|
79
79
|
canBeEmptyMultiple: !1,
|
|
@@ -81,7 +81,7 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
81
81
|
}, null, 8, ["modelValue", "items", "selectAllItem"]))
|
|
82
82
|
]));
|
|
83
83
|
}
|
|
84
|
-
}),
|
|
84
|
+
}), I = -2, je = {
|
|
85
85
|
0: "Yandex",
|
|
86
86
|
1: "Google",
|
|
87
87
|
2: "go.Mail",
|
|
@@ -94,24 +94,24 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
94
94
|
20: "Yandex.com",
|
|
95
95
|
21: "Yandex.com.tr"
|
|
96
96
|
}, ee = {
|
|
97
|
-
key:
|
|
97
|
+
key: I,
|
|
98
98
|
name: "--",
|
|
99
|
-
index:
|
|
100
|
-
},
|
|
101
|
-
key:
|
|
99
|
+
index: I
|
|
100
|
+
}, Se = {
|
|
101
|
+
key: I,
|
|
102
102
|
name: "--",
|
|
103
103
|
regions: [ee],
|
|
104
|
-
regionByIndex: /* @__PURE__ */ new Map([[
|
|
104
|
+
regionByIndex: /* @__PURE__ */ new Map([[I, ee]])
|
|
105
105
|
}, te = {
|
|
106
|
-
key:
|
|
106
|
+
key: I,
|
|
107
107
|
name: "Autoselect",
|
|
108
|
-
index:
|
|
108
|
+
index: I
|
|
109
109
|
}, ne = {
|
|
110
|
-
key:
|
|
110
|
+
key: I,
|
|
111
111
|
name: "Autoselect",
|
|
112
112
|
regions: [te],
|
|
113
|
-
regionByIndex: /* @__PURE__ */ new Map([[
|
|
114
|
-
},
|
|
113
|
+
regionByIndex: /* @__PURE__ */ new Map([[I, te]])
|
|
114
|
+
}, me = {
|
|
115
115
|
countryCode: "00",
|
|
116
116
|
depth: 1,
|
|
117
117
|
device: 0,
|
|
@@ -119,137 +119,137 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
119
119
|
index: -1,
|
|
120
120
|
lang: "ru",
|
|
121
121
|
name: "Without region"
|
|
122
|
-
},
|
|
122
|
+
}, Je = () => (te.name = R().Common.Autoselect, te), ze = () => (Je(), ne.name = R().Common.Autoselect, console.log(ne), ne), Ge = () => (me.name = R().Keywords.Without_region, me), Ie = (e = !1, a = !1, i = []) => {
|
|
123
123
|
let t;
|
|
124
|
-
return e ? t =
|
|
125
|
-
},
|
|
126
|
-
const
|
|
124
|
+
return e ? t = Ye(i) : t = xe(i), a && t.set(I, ze()), t.size || t.set(I, Se), t;
|
|
125
|
+
}, xe = (e, a = !0, i = [], t = !1) => {
|
|
126
|
+
const l = /* @__PURE__ */ new Map();
|
|
127
127
|
return e.forEach((o) => {
|
|
128
128
|
if (!o.enabled || t && typeof o.key == "number" && o.key > 1) return;
|
|
129
129
|
const n = { ...o };
|
|
130
|
-
n.regionByIndex = /* @__PURE__ */ new Map(), o.regions && o.regions.forEach((
|
|
131
|
-
if (
|
|
132
|
-
const
|
|
133
|
-
n.regionByIndex && n.regionByIndex.set(
|
|
134
|
-
}), !n.regionByIndex.size && !i.length && n.regionByIndex.set(ee.index, ee), typeof n.key == "number" &&
|
|
130
|
+
n.regionByIndex = /* @__PURE__ */ new Map(), o.regions && o.regions.forEach((d) => {
|
|
131
|
+
if (a && !d.enabled) return;
|
|
132
|
+
const g = { ...d };
|
|
133
|
+
n.regionByIndex && n.regionByIndex.set(g.index, g);
|
|
134
|
+
}), !n.regionByIndex.size && !i.length && n.regionByIndex.set(ee.index, ee), typeof n.key == "number" && l.set(n.key, n);
|
|
135
135
|
}), i.forEach((o) => {
|
|
136
|
-
if (
|
|
136
|
+
if (l.has(o)) return;
|
|
137
137
|
const n = {
|
|
138
138
|
key: o,
|
|
139
|
-
name:
|
|
139
|
+
name: je[o],
|
|
140
140
|
regions: [],
|
|
141
141
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
142
142
|
};
|
|
143
|
-
|
|
144
|
-
}),
|
|
145
|
-
},
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
const i =
|
|
143
|
+
l.set(n.key, n);
|
|
144
|
+
}), l;
|
|
145
|
+
}, Ye = (e) => {
|
|
146
|
+
const a = xe(e, !1, [0, 1], !0);
|
|
147
|
+
if (a.has(2)) {
|
|
148
|
+
const i = a.get(2);
|
|
149
149
|
i && (i.regionByIndex = /* @__PURE__ */ new Map());
|
|
150
150
|
}
|
|
151
|
-
return
|
|
151
|
+
return a.forEach((i) => {
|
|
152
152
|
if (!i.regionByIndex) return;
|
|
153
|
-
const t = { ...
|
|
153
|
+
const t = { ...Ge() };
|
|
154
154
|
i.regionByIndex.set(t.index, t);
|
|
155
|
-
}),
|
|
156
|
-
},
|
|
157
|
-
const t =
|
|
158
|
-
let
|
|
155
|
+
}), a;
|
|
156
|
+
}, We = (e, a, i = []) => {
|
|
157
|
+
const t = Ie(e, !1, i);
|
|
158
|
+
let l;
|
|
159
159
|
return t.forEach((o) => {
|
|
160
|
-
if (!(
|
|
161
|
-
if (!
|
|
162
|
-
return n.searcher_key = o.key,
|
|
163
|
-
}),
|
|
160
|
+
if (!(a.searcher_key !== void 0 && a.searcher_key != o.key) && o.regions && (o.regions.forEach((n) => {
|
|
161
|
+
if (!l && !(a.key !== void 0 && a.key != n.key) && !(a.index !== void 0 && a.index != n.index) && !(!e && (a.lang !== void 0 && a.lang != n.lang || a.device !== void 0 && a.device != n.device)))
|
|
162
|
+
return n.searcher_key = o.key, l = n, !1;
|
|
163
|
+
}), l))
|
|
164
164
|
return !1;
|
|
165
|
-
}),
|
|
166
|
-
},
|
|
167
|
-
const i = R(), t =
|
|
165
|
+
}), l;
|
|
166
|
+
}, He = (e, a) => {
|
|
167
|
+
const i = R(), t = F(a.value.keys().next().value ?? I), l = M(() => {
|
|
168
168
|
const o = /* @__PURE__ */ new Map();
|
|
169
|
-
if (
|
|
170
|
-
let
|
|
169
|
+
if (a.value.forEach((n) => {
|
|
170
|
+
let d = {
|
|
171
171
|
value: n.key,
|
|
172
172
|
title: n.name
|
|
173
173
|
};
|
|
174
|
-
e.addSearcherIcon && (
|
|
175
|
-
}), e.addCompare && !o.has(
|
|
174
|
+
e.addSearcherIcon && (d.icon = Re(n.key)), o.set(n.key, d);
|
|
175
|
+
}), e.addCompare && !o.has(I)) {
|
|
176
176
|
const n = {
|
|
177
177
|
value: "",
|
|
178
178
|
title: "--------------------",
|
|
179
179
|
disabled: !0
|
|
180
180
|
};
|
|
181
181
|
o.set(n.value, n);
|
|
182
|
-
const
|
|
182
|
+
const d = {
|
|
183
183
|
value: -1,
|
|
184
184
|
title: i.Common.Compare
|
|
185
185
|
};
|
|
186
|
-
o.set(
|
|
186
|
+
o.set(d.value, d);
|
|
187
187
|
}
|
|
188
188
|
return o;
|
|
189
189
|
});
|
|
190
190
|
return {
|
|
191
191
|
searcherKey: t,
|
|
192
|
-
optionBySearcherKey:
|
|
192
|
+
optionBySearcherKey: l
|
|
193
193
|
};
|
|
194
|
-
},
|
|
195
|
-
var o, n,
|
|
196
|
-
const i = R(), t =
|
|
197
|
-
e.modelValue.length === 1 && (t.value = e.modelValue[0]), t.value ===
|
|
198
|
-
const
|
|
199
|
-
var
|
|
200
|
-
const
|
|
201
|
-
return (
|
|
202
|
-
let
|
|
194
|
+
}, Qe = (e, a) => {
|
|
195
|
+
var o, n, d;
|
|
196
|
+
const i = R(), t = F(I);
|
|
197
|
+
e.modelValue.length === 1 && (t.value = e.modelValue[0]), t.value === I && (e.forFrequency ? t.value = ((n = (o = a.value) == null ? void 0 : o.regionByIndex.values().next().value) == null ? void 0 : n.key) ?? I : t.value = ((d = a.value) == null ? void 0 : d.regionByIndex.keys().next().value) ?? I);
|
|
198
|
+
const l = M(() => {
|
|
199
|
+
var f;
|
|
200
|
+
const g = /* @__PURE__ */ new Map();
|
|
201
|
+
return (f = a.value.regionByIndex) == null || f.forEach((v) => {
|
|
202
|
+
let r = v.name;
|
|
203
203
|
if (e.forFrequency) {
|
|
204
204
|
const C = {
|
|
205
|
-
value:
|
|
206
|
-
title:
|
|
205
|
+
value: v.key,
|
|
206
|
+
title: r
|
|
207
207
|
};
|
|
208
|
-
|
|
208
|
+
g.has(v.key) || g.set(v.key, C);
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
const
|
|
215
|
-
value:
|
|
216
|
-
title:
|
|
217
|
-
icon:
|
|
211
|
+
v.device && (r += " (" + i.Common["Device_" + v.device] + ")");
|
|
212
|
+
const m = Ne(a.value.key || 0, v.lang ?? "");
|
|
213
|
+
m && (r += " / " + m);
|
|
214
|
+
const y = {
|
|
215
|
+
value: v.index,
|
|
216
|
+
title: r,
|
|
217
|
+
icon: v.device ? De(v.device) : void 0
|
|
218
218
|
};
|
|
219
|
-
|
|
220
|
-
}),
|
|
219
|
+
g.set(v.index, y);
|
|
220
|
+
}), g;
|
|
221
221
|
});
|
|
222
|
-
return
|
|
223
|
-
var
|
|
224
|
-
if (e.onlySearcher || t.value !== void 0 &&
|
|
222
|
+
return L(l, (g, f) => {
|
|
223
|
+
var y;
|
|
224
|
+
if (e.onlySearcher || t.value !== void 0 && g.get(t.value))
|
|
225
225
|
return;
|
|
226
|
-
let
|
|
227
|
-
if (t.value ===
|
|
228
|
-
t.value =
|
|
226
|
+
let v = g.keys().next().value;
|
|
227
|
+
if (t.value === I || v === I) {
|
|
228
|
+
t.value = v;
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
|
-
let
|
|
232
|
-
for (const [C, k] of
|
|
233
|
-
const
|
|
234
|
-
if (typeof
|
|
231
|
+
let r = ((y = f == null ? void 0 : f.get(t.value)) == null ? void 0 : y.title) || "", m = -1;
|
|
232
|
+
for (const [C, k] of g.entries()) {
|
|
233
|
+
const S = k.title;
|
|
234
|
+
if (typeof S != "string" || typeof C == "string")
|
|
235
235
|
break;
|
|
236
|
-
if (
|
|
237
|
-
|
|
236
|
+
if (S === r) {
|
|
237
|
+
v = C;
|
|
238
238
|
break;
|
|
239
239
|
}
|
|
240
240
|
const _ = new RegExp(` \\((${i.Common.Device_1}|${i.Common.Device_2})\\)`);
|
|
241
|
-
let T =
|
|
242
|
-
|
|
241
|
+
let T = r, u = 3;
|
|
242
|
+
S.indexOf(T) === -1 && (T = r.replace(/^[^a-zа-я]/i, "").replace(_, ""), u--), S.indexOf(T) === -1 && (T = r.replace(/ \/.*/, ""), u--), S.indexOf(T) === -1 && (T = r.replace(/ \/.*/, ""), T = T.replace(/^[^a-zа-я]/i, "").replace(_, ""), u--), S.indexOf(T) !== -1 && (u <= m || (m = u, v = C));
|
|
243
243
|
}
|
|
244
|
-
t.value =
|
|
244
|
+
t.value = v;
|
|
245
245
|
}), {
|
|
246
246
|
regionIndex: t,
|
|
247
|
-
optionByRegionIndex:
|
|
247
|
+
optionByRegionIndex: l
|
|
248
248
|
};
|
|
249
|
-
},
|
|
250
|
-
const t =
|
|
251
|
-
if (e.onlySearcher &&
|
|
252
|
-
t.value = Array.from(
|
|
249
|
+
}, Xe = (e, a, i) => {
|
|
250
|
+
const t = F([]), l = () => {
|
|
251
|
+
if (e.onlySearcher && a.value) {
|
|
252
|
+
t.value = Array.from(a.value.keys());
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
255
255
|
let n = [];
|
|
@@ -262,74 +262,74 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
262
262
|
) ?? [];
|
|
263
263
|
} catch {
|
|
264
264
|
}
|
|
265
|
-
n.length && (n = n.filter((
|
|
265
|
+
n.length && (n = n.filter((d) => i.value.has(d))), n.length || (n = Array.from(i.value)), t.value = [...n];
|
|
266
266
|
}, o = () => {
|
|
267
267
|
t.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(t.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
|
|
268
268
|
};
|
|
269
|
-
return
|
|
269
|
+
return L(t, () => {
|
|
270
270
|
o();
|
|
271
|
-
}), e.addCompare &&
|
|
271
|
+
}), e.addCompare && l(), {
|
|
272
272
|
regionsIndexes: t
|
|
273
273
|
};
|
|
274
|
-
},
|
|
275
|
-
const
|
|
276
|
-
const
|
|
277
|
-
return
|
|
278
|
-
var
|
|
279
|
-
(
|
|
280
|
-
C.index !== -1 && C.index !==
|
|
274
|
+
}, Ze = (e) => {
|
|
275
|
+
const a = M(() => Ie(e.forFrequency, e.autoRegion, e.searchers)), i = M(() => a.value.get(l.searcherKey.value) || Se), t = M(() => {
|
|
276
|
+
const r = /* @__PURE__ */ new Set();
|
|
277
|
+
return a.value.forEach((m) => {
|
|
278
|
+
var y;
|
|
279
|
+
(y = m.regions) == null || y.forEach((C) => {
|
|
280
|
+
C.index !== -1 && C.index !== I && r.add(C.index);
|
|
281
281
|
});
|
|
282
|
-
}),
|
|
283
|
-
}),
|
|
284
|
-
|
|
285
|
-
var
|
|
286
|
-
if (e.onlySearcher ? n.regionsIndexes.value = Array.from(
|
|
287
|
-
let
|
|
288
|
-
|
|
289
|
-
var _, T,
|
|
290
|
-
if (e.onlySearcher &&
|
|
291
|
-
|
|
282
|
+
}), r;
|
|
283
|
+
}), l = He(e, a), o = Qe(e, i), n = Xe(e, a, t);
|
|
284
|
+
L(a, () => {
|
|
285
|
+
var m, y, C, k;
|
|
286
|
+
if (e.onlySearcher ? n.regionsIndexes.value = Array.from(a.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((S) => t.value.has(S)), l.searcherKey.value === -1) return;
|
|
287
|
+
let r = a.value.keys().next().value;
|
|
288
|
+
a.value.forEach((S) => {
|
|
289
|
+
var _, T, u;
|
|
290
|
+
if (e.onlySearcher && S.key === l.searcherKey.value) {
|
|
291
|
+
r = l.searcherKey.value;
|
|
292
292
|
return;
|
|
293
293
|
}
|
|
294
|
-
if (o.regionIndex.value && ((_ =
|
|
294
|
+
if (o.regionIndex.value && ((_ = S.regionByIndex) != null && _.has(o.regionIndex.value)) && (r = S.key), !e.onlySearcher) {
|
|
295
295
|
let s;
|
|
296
|
-
|
|
297
|
-
const c = (
|
|
298
|
-
s != null && s.has(
|
|
296
|
+
r !== void 0 && (s = (T = a.value.get(r)) == null ? void 0 : T.regionByIndex);
|
|
297
|
+
const c = (u = a.value.get(S.key)) == null ? void 0 : u.regionByIndex;
|
|
298
|
+
s != null && s.has(I) && !(c != null && c.has(I)) && (r = S.key);
|
|
299
299
|
}
|
|
300
|
-
}),
|
|
300
|
+
}), r !== void 0 && (l.searcherKey.value = r), o.regionIndex.value !== void 0 && !((y = (m = i.value) == null ? void 0 : m.regionByIndex) != null && y.has(o.regionIndex.value)) && (o.regionIndex.value = (k = (C = i.value) == null ? void 0 : C.regions) == null ? void 0 : k.keys().next().value);
|
|
301
301
|
}, { immediate: !0 });
|
|
302
|
-
const
|
|
303
|
-
if (!(
|
|
304
|
-
return
|
|
305
|
-
},
|
|
306
|
-
if (e.onlySearcher || o.regionIndex.value ===
|
|
307
|
-
let
|
|
302
|
+
const d = () => {
|
|
303
|
+
if (!(l.searcherKey.value === -1 || l.searcherKey.value === I))
|
|
304
|
+
return l.searcherKey.value;
|
|
305
|
+
}, g = () => {
|
|
306
|
+
if (e.onlySearcher || o.regionIndex.value === I) return;
|
|
307
|
+
let r = o.regionIndex.value;
|
|
308
308
|
if (e.forFrequency) {
|
|
309
|
-
const
|
|
310
|
-
|
|
309
|
+
const m = o.regionIndex.value, y = We(e.forFrequency, { searcher_key: d(), key: m }, e.searchers);
|
|
310
|
+
r = y == null ? void 0 : y.index;
|
|
311
311
|
}
|
|
312
|
-
return
|
|
313
|
-
},
|
|
314
|
-
const
|
|
315
|
-
if (
|
|
316
|
-
return
|
|
312
|
+
return r;
|
|
313
|
+
}, f = () => {
|
|
314
|
+
const r = d();
|
|
315
|
+
if (r !== void 0)
|
|
316
|
+
return a.value.get(r);
|
|
317
317
|
};
|
|
318
318
|
return {
|
|
319
|
-
selectSearcher:
|
|
319
|
+
selectSearcher: l,
|
|
320
320
|
selectRegion: o,
|
|
321
321
|
compare: n,
|
|
322
|
-
searcherByKey:
|
|
322
|
+
searcherByKey: a,
|
|
323
323
|
allRegionsIndexes: t,
|
|
324
|
-
getSearcher:
|
|
324
|
+
getSearcher: f,
|
|
325
325
|
getRegion: () => {
|
|
326
|
-
var
|
|
327
|
-
const
|
|
328
|
-
if (
|
|
329
|
-
return (
|
|
326
|
+
var m, y;
|
|
327
|
+
const r = g();
|
|
328
|
+
if (r !== void 0)
|
|
329
|
+
return (y = (m = f()) == null ? void 0 : m.regionByIndex) == null ? void 0 : y.get(r);
|
|
330
330
|
}
|
|
331
331
|
};
|
|
332
|
-
},
|
|
332
|
+
}, et = /* @__PURE__ */ P({
|
|
333
333
|
__name: "selectorRegion",
|
|
334
334
|
props: /* @__PURE__ */ O({
|
|
335
335
|
projectId: {},
|
|
@@ -350,130 +350,130 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
350
350
|
modelValueSingleModifiers: {}
|
|
351
351
|
}),
|
|
352
352
|
emits: /* @__PURE__ */ O(["compareRegions"], ["update:modelValue", "update:modelValueSingle"]),
|
|
353
|
-
setup(e, { expose:
|
|
354
|
-
const t = e,
|
|
355
|
-
selectSearcher:
|
|
356
|
-
selectRegion:
|
|
357
|
-
compare:
|
|
358
|
-
searcherByKey:
|
|
359
|
-
allRegionsIndexes:
|
|
360
|
-
getSearcher:
|
|
361
|
-
getRegion:
|
|
362
|
-
} =
|
|
353
|
+
setup(e, { expose: a, emit: i }) {
|
|
354
|
+
const t = e, l = D(e, "modelValue"), o = D(e, "modelValueSingle"), n = i, {
|
|
355
|
+
selectSearcher: d,
|
|
356
|
+
selectRegion: g,
|
|
357
|
+
compare: f,
|
|
358
|
+
searcherByKey: v,
|
|
359
|
+
allRegionsIndexes: r,
|
|
360
|
+
getSearcher: m,
|
|
361
|
+
getRegion: y
|
|
362
|
+
} = Ze(t), C = () => {
|
|
363
363
|
var k;
|
|
364
364
|
if (window.fieldTemplates && ((k = window.fieldTemplates) != null && k.openSelectorRegions)) {
|
|
365
365
|
window.fieldTemplates.openSelectorRegions(
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
(
|
|
366
|
+
v.value,
|
|
367
|
+
f.regionsIndexes.value,
|
|
368
|
+
(S) => f.regionsIndexes.value = S
|
|
369
369
|
);
|
|
370
370
|
return;
|
|
371
371
|
}
|
|
372
|
-
n("compareRegions",
|
|
372
|
+
n("compareRegions", v.value);
|
|
373
373
|
};
|
|
374
|
-
return
|
|
375
|
-
if (
|
|
376
|
-
if (JSON.stringify(
|
|
374
|
+
return L([g.regionIndex, d.searcherKey, f.regionsIndexes], () => {
|
|
375
|
+
if (d.searcherKey.value === -1 && f.regionsIndexes.value.length) {
|
|
376
|
+
if (JSON.stringify(l.value) === JSON.stringify(f.regionsIndexes.value))
|
|
377
377
|
return;
|
|
378
|
-
|
|
378
|
+
l.value = [...f.regionsIndexes.value];
|
|
379
379
|
} else
|
|
380
|
-
|
|
381
|
-
!t.onlySearcher && !
|
|
382
|
-
}), o.value &&
|
|
383
|
-
|
|
384
|
-
}, { immediate: !0 }),
|
|
385
|
-
var k,
|
|
386
|
-
if (
|
|
387
|
-
if (!
|
|
388
|
-
let s =
|
|
389
|
-
s !== void 0 && (
|
|
380
|
+
l.value = [t.onlySearcher ? d.searcherKey.value : g.regionIndex.value];
|
|
381
|
+
!t.onlySearcher && !r.value.size && (d.searcherKey.value = I);
|
|
382
|
+
}), o.value && L(o, () => {
|
|
383
|
+
l.value = [o.value];
|
|
384
|
+
}, { immediate: !0 }), L(l, () => {
|
|
385
|
+
var k, S, _, T, u;
|
|
386
|
+
if (l.value[0] && (o.value = l.value[0]), t.onlySearcher) {
|
|
387
|
+
if (!l.value.length || l.value.length === 1 && !v.value.has(l.value[0])) {
|
|
388
|
+
let s = v.value.keys().next().value;
|
|
389
|
+
s !== void 0 && (l.value = [s]);
|
|
390
390
|
return;
|
|
391
391
|
}
|
|
392
|
-
if (
|
|
393
|
-
|
|
392
|
+
if (l.value.length > 1 && JSON.stringify(l.value) !== JSON.stringify(f.regionsIndexes.value)) {
|
|
393
|
+
l.value = [...f.regionsIndexes.value];
|
|
394
394
|
return;
|
|
395
395
|
}
|
|
396
396
|
} else {
|
|
397
|
-
let s = [...new Set(
|
|
398
|
-
if (t.forFrequency && (c = (
|
|
397
|
+
let s = [...new Set(l.value)], c = (S = (k = v.value.values().next().value) == null ? void 0 : k.regionByIndex) == null ? void 0 : S.keys().next().value;
|
|
398
|
+
if (t.forFrequency && (c = (u = (T = (_ = v.value.values().next().value) == null ? void 0 : _.regionByIndex) == null ? void 0 : T.values().next().value) == null ? void 0 : u.key), !s.length)
|
|
399
399
|
c !== void 0 && s.push(c);
|
|
400
400
|
else if (s.length === 1) {
|
|
401
|
-
let
|
|
402
|
-
t.forFrequency && (
|
|
403
|
-
V.regionByIndex.forEach((
|
|
404
|
-
|
|
401
|
+
let p = r.value;
|
|
402
|
+
t.forFrequency && (p = /* @__PURE__ */ new Set(), v.value.forEach((V) => {
|
|
403
|
+
V.regionByIndex.forEach((E) => {
|
|
404
|
+
E.index !== -1 && E.index !== I && p.add(E.key);
|
|
405
405
|
});
|
|
406
|
-
})), !
|
|
406
|
+
})), !p.has(s[0]) && s[0] !== -2 && (s = [], c !== void 0 && s.push(c));
|
|
407
407
|
} else
|
|
408
|
-
s = s.filter((
|
|
409
|
-
if (JSON.stringify(
|
|
410
|
-
|
|
408
|
+
s = s.filter((p) => r.value.has(p)), !s.length && c !== void 0 && s.push(c);
|
|
409
|
+
if (JSON.stringify(l.value) !== JSON.stringify(s)) {
|
|
410
|
+
l.value = s;
|
|
411
411
|
return;
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
if (!(
|
|
414
|
+
if (!(l.value.length === 1 && l.value[0] === (t.onlySearcher ? d.searcherKey.value : g.regionIndex.value)))
|
|
415
415
|
if (t.onlySearcher) {
|
|
416
|
-
if (
|
|
417
|
-
|
|
416
|
+
if (l.value.length === 1) {
|
|
417
|
+
d.searcherKey.value = l.value[0];
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
|
-
|
|
420
|
+
d.searcherKey.value = -1;
|
|
421
421
|
return;
|
|
422
|
-
} else if (
|
|
423
|
-
|
|
422
|
+
} else if (l.value.length === 1 && d.searcherKey.value !== -1) {
|
|
423
|
+
g.regionIndex.value = l.value[0];
|
|
424
424
|
let s;
|
|
425
|
-
for (const c of
|
|
426
|
-
for (const
|
|
427
|
-
if ((t.forFrequency ?
|
|
425
|
+
for (const c of v.value.values()) {
|
|
426
|
+
for (const p of c.regionByIndex.values())
|
|
427
|
+
if ((t.forFrequency ? p.key : p.index) === g.regionIndex.value) {
|
|
428
428
|
s = c.key;
|
|
429
429
|
break;
|
|
430
430
|
}
|
|
431
431
|
if (s !== void 0)
|
|
432
432
|
break;
|
|
433
433
|
}
|
|
434
|
-
s !== void 0 && (
|
|
434
|
+
s !== void 0 && (d.searcherKey.value = s);
|
|
435
435
|
} else
|
|
436
|
-
|
|
437
|
-
}, { immediate: !0 }),
|
|
438
|
-
getSearcher:
|
|
439
|
-
getRegion:
|
|
440
|
-
}), (k,
|
|
436
|
+
d.searcherKey.value = -1, f.regionsIndexes.value = [...l.value];
|
|
437
|
+
}, { immediate: !0 }), a({
|
|
438
|
+
getSearcher: m,
|
|
439
|
+
getRegion: y
|
|
440
|
+
}), (k, S) => (x(), w("div", {
|
|
441
441
|
class: Q({
|
|
442
442
|
"top-selectorRegion": !0,
|
|
443
443
|
"top-selectorRegion-onlySearcher": k.onlySearcher
|
|
444
444
|
})
|
|
445
445
|
}, [
|
|
446
|
-
|
|
447
|
-
options:
|
|
448
|
-
modelValue:
|
|
449
|
-
"onUpdate:modelValue":
|
|
446
|
+
A(re, {
|
|
447
|
+
options: h(d).optionBySearcherKey.value,
|
|
448
|
+
modelValue: h(d).searcherKey.value,
|
|
449
|
+
"onUpdate:modelValue": S[0] || (S[0] = (_) => h(d).searcherKey.value = _),
|
|
450
450
|
name: "searcher_key",
|
|
451
451
|
addChanger: k.addChanger
|
|
452
452
|
}, null, 8, ["options", "modelValue", "addChanger"]),
|
|
453
|
-
!k.onlySearcher &&
|
|
453
|
+
!k.onlySearcher && h(d).searcherKey.value !== -1 ? (x(), B(re, {
|
|
454
454
|
key: 0,
|
|
455
455
|
class: "top-select-region",
|
|
456
|
-
options:
|
|
457
|
-
modelValue:
|
|
458
|
-
"onUpdate:modelValue":
|
|
456
|
+
options: h(g).optionByRegionIndex.value,
|
|
457
|
+
modelValue: h(g).regionIndex.value,
|
|
458
|
+
"onUpdate:modelValue": S[1] || (S[1] = (_) => h(g).regionIndex.value = _),
|
|
459
459
|
name: k.forFrequency ? "region_key" : "region_index",
|
|
460
460
|
addChanger: k.addChanger,
|
|
461
461
|
"data-top-icon": k.addRegionIcon ? "" : void 0
|
|
462
|
-
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) :
|
|
463
|
-
k.addCompare && !k.onlySearcher &&
|
|
462
|
+
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : q("", !0),
|
|
463
|
+
k.addCompare && !k.onlySearcher && h(d).searcherKey.value === -1 ? (x(), B(W, {
|
|
464
464
|
key: 1,
|
|
465
465
|
name: "compare",
|
|
466
466
|
onClick: C,
|
|
467
|
-
"data-count-compare-regions-indexes":
|
|
467
|
+
"data-count-compare-regions-indexes": h(f).regionsIndexes.value.length
|
|
468
468
|
}, {
|
|
469
|
-
default:
|
|
470
|
-
z(
|
|
469
|
+
default: b(() => [
|
|
470
|
+
z(K(k.$i18n.Common.Selected_regions), 1)
|
|
471
471
|
]),
|
|
472
472
|
_: 1
|
|
473
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
473
|
+
}, 8, ["data-count-compare-regions-indexes"])) : q("", !0)
|
|
474
474
|
], 2));
|
|
475
475
|
}
|
|
476
|
-
}),
|
|
476
|
+
}), tt = [
|
|
477
477
|
{
|
|
478
478
|
id: "1",
|
|
479
479
|
name: "Without Tag",
|
|
@@ -524,12 +524,12 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
524
524
|
name: "Turquoise",
|
|
525
525
|
color_id: "10"
|
|
526
526
|
}
|
|
527
|
-
],
|
|
527
|
+
], ge = (e) => "-" + e, H = (e) => e[0] === "-" ? e.substring(1) : e, ae = (e, a) => {
|
|
528
528
|
e = H(e);
|
|
529
|
-
const i =
|
|
529
|
+
const i = a.find((t) => t.id === e);
|
|
530
530
|
if (i)
|
|
531
531
|
return i;
|
|
532
|
-
},
|
|
532
|
+
}, at = ["data-tag_id", "data-tag_color_id", "title"], le = /* @__PURE__ */ P({
|
|
533
533
|
__name: "tagIcon",
|
|
534
534
|
props: {
|
|
535
535
|
id: {},
|
|
@@ -538,18 +538,18 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
538
538
|
state: {}
|
|
539
539
|
},
|
|
540
540
|
setup(e) {
|
|
541
|
-
return (
|
|
541
|
+
return (a, i) => (x(), w("div", {
|
|
542
542
|
class: Q({
|
|
543
543
|
"top-tagSelector_tagIcon": !0,
|
|
544
|
-
"top-tagSelector-active": !!
|
|
545
|
-
"top-tagSelector-excluded":
|
|
544
|
+
"top-tagSelector-active": !!a.state,
|
|
545
|
+
"top-tagSelector-excluded": a.state === "excluded"
|
|
546
546
|
}),
|
|
547
|
-
"data-tag_id":
|
|
548
|
-
"data-tag_color_id":
|
|
549
|
-
title:
|
|
550
|
-
}, null, 10,
|
|
547
|
+
"data-tag_id": a.id,
|
|
548
|
+
"data-tag_color_id": a.colorId,
|
|
549
|
+
title: a.name
|
|
550
|
+
}, null, 10, at));
|
|
551
551
|
}
|
|
552
|
-
}),
|
|
552
|
+
}), lt = ["contenteditable", "onKeydown"], fe = /* @__PURE__ */ P({
|
|
553
553
|
__name: "tagPopupListItem",
|
|
554
554
|
props: /* @__PURE__ */ O({
|
|
555
555
|
editable: { type: Boolean },
|
|
@@ -566,68 +566,72 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
566
566
|
nameModifiers: {}
|
|
567
567
|
}),
|
|
568
568
|
emits: /* @__PURE__ */ O(["update:name", "unselect", "exclude", "select"], ["update:name"]),
|
|
569
|
-
setup(e, { emit:
|
|
570
|
-
const i = e, t =
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
},
|
|
574
|
-
var
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
569
|
+
setup(e, { emit: a }) {
|
|
570
|
+
const i = e, t = a, l = D(e, "name"), o = F(null), n = M(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
571
|
+
contenteditable: d.value,
|
|
572
|
+
onpaste: (m) => m.preventDefault()
|
|
573
|
+
} : {}), d = F(!1), g = async () => {
|
|
574
|
+
var m;
|
|
575
|
+
d.value = !0, await be(), (m = o.value) == null || m.focus();
|
|
576
|
+
}, f = () => {
|
|
577
|
+
var y;
|
|
578
|
+
const m = (y = o.value) == null ? void 0 : y.innerText;
|
|
579
|
+
if (!m) return v();
|
|
580
|
+
o.value && (o.value.innerText = m), d.value = !1, t("update:name", m);
|
|
581
|
+
}, v = async () => {
|
|
582
|
+
o.value && (o.value.innerText = i.name), d.value = !1;
|
|
583
|
+
}, r = (m) => {
|
|
584
|
+
if (d.value || i.disabled) return;
|
|
585
|
+
let y = "selected";
|
|
586
|
+
i.canExclude && (m.ctrlKey || m.metaKey) && (y = "excluded"), i.state == y && (y = ""), y === "" && t("unselect"), y === "selected" && t("select"), y === "excluded" && t("exclude");
|
|
584
587
|
};
|
|
585
|
-
return (
|
|
588
|
+
return (m, y) => (x(), B(se, {
|
|
586
589
|
class: Q({
|
|
587
590
|
"top-tagSelector_tagListItem": !0,
|
|
588
|
-
"top-tagSelector_tagListItem-inEdit":
|
|
589
|
-
"top-tagSelector_tagListItem-disabled":
|
|
590
|
-
"top-tagSelector_tagListItem-canExclude":
|
|
591
|
-
"top-tagSelector-active": !!
|
|
592
|
-
"top-tagSelector-excluded":
|
|
591
|
+
"top-tagSelector_tagListItem-inEdit": d.value,
|
|
592
|
+
"top-tagSelector_tagListItem-disabled": m.disabled,
|
|
593
|
+
"top-tagSelector_tagListItem-canExclude": m.canExclude,
|
|
594
|
+
"top-tagSelector-active": !!m.state,
|
|
595
|
+
"top-tagSelector-excluded": m.state === "excluded"
|
|
593
596
|
}),
|
|
594
|
-
onClick: j(
|
|
597
|
+
onClick: j(r, ["stop"])
|
|
595
598
|
}, {
|
|
596
|
-
default:
|
|
597
|
-
|
|
598
|
-
id:
|
|
599
|
-
name:
|
|
600
|
-
colorId:
|
|
601
|
-
state:
|
|
599
|
+
default: b(() => [
|
|
600
|
+
A(le, {
|
|
601
|
+
id: m.id,
|
|
602
|
+
name: l.value,
|
|
603
|
+
colorId: m.colorId,
|
|
604
|
+
state: m.state
|
|
602
605
|
}, null, 8, ["id", "name", "colorId", "state"]),
|
|
603
|
-
|
|
606
|
+
ye("span", pe({
|
|
604
607
|
ref_key: "elName",
|
|
605
608
|
ref: o,
|
|
606
609
|
class: "top-tagSelector_tagListItemName",
|
|
607
|
-
contenteditable:
|
|
610
|
+
contenteditable: d.value ? "plaintext-only" : !1
|
|
611
|
+
}, n.value, {
|
|
608
612
|
onKeydown: [
|
|
609
|
-
de(j(
|
|
610
|
-
de(j(
|
|
613
|
+
de(j(f, ["stop"]), ["enter"]),
|
|
614
|
+
de(j(v, ["stop"]), ["esc"])
|
|
611
615
|
]
|
|
612
|
-
},
|
|
613
|
-
|
|
614
|
-
|
|
616
|
+
}), K(l.value), 17, lt),
|
|
617
|
+
m.editable ? (x(), w(Y, { key: 0 }, [
|
|
618
|
+
d.value ? (x(), w("span", {
|
|
615
619
|
key: 1,
|
|
616
620
|
"data-top-icon": "",
|
|
617
621
|
class: "top-tagSelector_edit",
|
|
618
|
-
onClick: j(
|
|
619
|
-
})) : (
|
|
622
|
+
onClick: j(f, ["stop"])
|
|
623
|
+
})) : (x(), w("span", {
|
|
620
624
|
key: 0,
|
|
621
625
|
"data-top-icon": "",
|
|
622
626
|
class: "top-tagSelector_edit",
|
|
623
|
-
onClick:
|
|
627
|
+
onClick: g
|
|
624
628
|
}))
|
|
625
|
-
], 64)) :
|
|
629
|
+
], 64)) : q("", !0)
|
|
626
630
|
]),
|
|
627
631
|
_: 1
|
|
628
632
|
}, 8, ["class"]));
|
|
629
633
|
}
|
|
630
|
-
}),
|
|
634
|
+
}), ot = { key: 1 }, ke = /* @__PURE__ */ P({
|
|
631
635
|
inheritAttrs: !1,
|
|
632
636
|
__name: "popupOpener",
|
|
633
637
|
props: /* @__PURE__ */ O({
|
|
@@ -647,59 +651,59 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
647
651
|
}),
|
|
648
652
|
emits: ["update:modelValue"],
|
|
649
653
|
setup(e) {
|
|
650
|
-
const
|
|
654
|
+
const a = e, i = D(e, "modelValue"), t = a.useTopButton ? W : "div", l = a.useTopButton ? "html" : "default", o = {
|
|
651
655
|
model: i,
|
|
652
|
-
mode:
|
|
653
|
-
targetId:
|
|
654
|
-
filters:
|
|
655
|
-
payload:
|
|
656
|
+
mode: a.mode,
|
|
657
|
+
targetId: a.targetId,
|
|
658
|
+
filters: a.filters,
|
|
659
|
+
payload: a.payload
|
|
656
660
|
};
|
|
657
|
-
return (n,
|
|
658
|
-
const
|
|
659
|
-
return
|
|
660
|
-
default:
|
|
661
|
-
|
|
661
|
+
return (n, d) => {
|
|
662
|
+
const g = Be("top-data");
|
|
663
|
+
return x(), B(Ae, { id: n.id }, {
|
|
664
|
+
default: b(() => [
|
|
665
|
+
Ve((x(), B(we(h(t)), pe({
|
|
662
666
|
class: {
|
|
663
667
|
"top-tagSelector": !0,
|
|
664
|
-
"top-tagSelector-filter":
|
|
665
|
-
"top-tagSelector-setter_single":
|
|
666
|
-
"top-tagSelector-setter_several":
|
|
668
|
+
"top-tagSelector-filter": a.mode === "filter",
|
|
669
|
+
"top-tagSelector-setter_single": a.mode === "setter" && !n.filters,
|
|
670
|
+
"top-tagSelector-setter_several": a.mode === "setter" && n.filters,
|
|
667
671
|
"top-tagSelector-selectedOne": !i.value.length || i.value.length === 1,
|
|
668
672
|
"top-tagSelector-toTwoLine": i.value.length > 5
|
|
669
673
|
},
|
|
670
674
|
color: "theme",
|
|
671
675
|
styling: ""
|
|
672
676
|
}, n.$attrs), {
|
|
673
|
-
[
|
|
674
|
-
!i.value.length && n.mode === "filter" ? (
|
|
677
|
+
[h(l)]: b(() => [
|
|
678
|
+
!i.value.length && n.mode === "filter" ? (x(), B(le, {
|
|
675
679
|
key: 0,
|
|
676
680
|
id: "all",
|
|
677
681
|
colorId: "",
|
|
678
682
|
name: n.$i18n.Common.All_tags ?? "",
|
|
679
683
|
state: ""
|
|
680
|
-
}, null, 8, ["name"])) :
|
|
681
|
-
n.mode === "setter" && n.filters ? (
|
|
682
|
-
|
|
683
|
-
])) : (
|
|
684
|
-
var
|
|
685
|
-
return
|
|
686
|
-
id:
|
|
687
|
-
colorId: ((
|
|
688
|
-
name: ((
|
|
689
|
-
state:
|
|
684
|
+
}, null, 8, ["name"])) : q("", !0),
|
|
685
|
+
n.mode === "setter" && n.filters ? (x(), w("div", ot, [
|
|
686
|
+
Me(n.$slots, "default")
|
|
687
|
+
])) : (x(!0), w(Y, { key: 2 }, ie(i.value, (f) => {
|
|
688
|
+
var v, r;
|
|
689
|
+
return x(), B(le, {
|
|
690
|
+
id: h(H)(f),
|
|
691
|
+
colorId: ((v = h(ae)(f, n.tags)) == null ? void 0 : v.color_id) ?? "",
|
|
692
|
+
name: ((r = h(ae)(f, n.tags)) == null ? void 0 : r.name) ?? "",
|
|
693
|
+
state: h(H)(f) === f ? "selected" : "excluded"
|
|
690
694
|
}, null, 8, ["id", "colorId", "name", "state"]);
|
|
691
695
|
}), 256))
|
|
692
696
|
]),
|
|
693
697
|
_: 2
|
|
694
698
|
}, 1040, ["class"])), [
|
|
695
|
-
[
|
|
699
|
+
[g, o, "topTagSelectorTarget"]
|
|
696
700
|
])
|
|
697
701
|
]),
|
|
698
702
|
_: 3
|
|
699
703
|
}, 8, ["id"]);
|
|
700
704
|
};
|
|
701
705
|
}
|
|
702
|
-
}),
|
|
706
|
+
}), nt = /* @__PURE__ */ P({
|
|
703
707
|
__name: "tagSelector",
|
|
704
708
|
props: /* @__PURE__ */ O({
|
|
705
709
|
modelValue: {},
|
|
@@ -717,177 +721,180 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
717
721
|
},
|
|
718
722
|
modelModifiers: {},
|
|
719
723
|
tags: {
|
|
720
|
-
default:
|
|
724
|
+
default: $e(tt)
|
|
721
725
|
},
|
|
722
726
|
tagsModifiers: {}
|
|
723
727
|
}),
|
|
724
728
|
emits: /* @__PURE__ */ O(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
|
|
725
|
-
setup(e, { emit:
|
|
726
|
-
const i = R(), t = e,
|
|
727
|
-
n(
|
|
729
|
+
setup(e, { emit: a }) {
|
|
730
|
+
const i = R(), t = e, l = D(e, "modelValue"), o = D(e, "tags"), n = a, d = Le((u, s) => {
|
|
731
|
+
n(u, s);
|
|
728
732
|
}, t.emitDelay);
|
|
729
|
-
t.singleMode && !
|
|
730
|
-
const
|
|
733
|
+
t.singleMode && !l.value.length && (l.value = [o.value[0].id]);
|
|
734
|
+
const g = t.id ?? "top-popup-id-" + Math.random(), f = F("add"), v = () => {
|
|
731
735
|
var c;
|
|
732
|
-
const
|
|
733
|
-
return s.set("add", { value: "add", title: i.Common.Add +
|
|
736
|
+
const u = " " + ((c = i.Common.Tags) == null ? void 0 : c.toLowerCase()), s = /* @__PURE__ */ new Map();
|
|
737
|
+
return s.set("add", { value: "add", title: i.Common.Add + u }), s.set("replace", { value: "replace", title: i.Common.Replace + u }), s.set("delete", { value: "delete", title: i.Common.Delete + u }), s;
|
|
734
738
|
};
|
|
735
|
-
let
|
|
736
|
-
model:
|
|
739
|
+
let r = Ee({
|
|
740
|
+
model: l,
|
|
737
741
|
mode: "filter",
|
|
738
742
|
targetId: void 0,
|
|
739
743
|
filters: void 0,
|
|
740
744
|
payload: void 0
|
|
741
745
|
});
|
|
742
|
-
|
|
743
|
-
|
|
746
|
+
L(l, () => {
|
|
747
|
+
d("selector", l.value);
|
|
744
748
|
});
|
|
745
|
-
const
|
|
746
|
-
if (
|
|
747
|
-
return
|
|
748
|
-
}),
|
|
749
|
-
if (
|
|
750
|
-
if (
|
|
751
|
-
if (
|
|
749
|
+
const m = M(() => {
|
|
750
|
+
if (r.value.mode === "setter" && t.maxTagsForSetter && !r.value.filters)
|
|
751
|
+
return r.value.model.value.length >= t.maxTagsForSetter;
|
|
752
|
+
}), y = (u) => {
|
|
753
|
+
if (u !== "all") {
|
|
754
|
+
if (r.value.model.value.includes(u)) return "selected";
|
|
755
|
+
if (r.value.model.value.includes(ge(u))) return "excluded";
|
|
752
756
|
}
|
|
753
|
-
return
|
|
754
|
-
}, C = (
|
|
755
|
-
const c =
|
|
756
|
-
let
|
|
757
|
-
s === "select" &&
|
|
757
|
+
return u === "all" && !r.value.model.value.length ? "selected" : "";
|
|
758
|
+
}, C = (u, s) => {
|
|
759
|
+
const c = ge(u);
|
|
760
|
+
let p = r.value.model.value.filter((V) => V !== u && V !== c);
|
|
761
|
+
s === "select" && p.push(u), s === "exclude" && p.push(c), r.value.mode === "setter" && r.value.targetId !== void 0 && t.requiredForSetter && (p.length || p.push("1"), p.length === 2 && r.value.model.value.length === 1 && r.value.model.value[0] === "1" && (p = p.filter((V) => V !== "1"))), t.singleMode && !r.value.filters && (p.length || (p = r.value.model.value), p.length > 1 && (p = [p[p.length - 1]])), p.sort((V, E) => {
|
|
758
762
|
if (!t.tags) return 0;
|
|
759
|
-
const X = t.tags.findIndex((N) => N.id === V), U = t.tags.findIndex((N) => N.id ===
|
|
763
|
+
const X = t.tags.findIndex((N) => N.id === V), U = t.tags.findIndex((N) => N.id === E);
|
|
760
764
|
return X - U;
|
|
761
|
-
}),
|
|
762
|
-
tagsIds:
|
|
763
|
-
targetId:
|
|
764
|
-
payload:
|
|
765
|
+
}), r.value.model.value = p, r.value.mode === "setter" && r.value.targetId !== void 0 && d("setter", {
|
|
766
|
+
tagsIds: p,
|
|
767
|
+
targetId: r.value.targetId,
|
|
768
|
+
payload: r.value.payload
|
|
765
769
|
});
|
|
766
|
-
}, k =
|
|
767
|
-
let
|
|
768
|
-
return
|
|
769
|
-
}),
|
|
770
|
-
const
|
|
771
|
-
if (!
|
|
770
|
+
}, k = M(() => {
|
|
771
|
+
let u = "top-tagSelector_popup";
|
|
772
|
+
return r.value.mode === "filter" && (u += " top-tagSelector_popup-filter"), r.value.mode === "setter" && (u += " top-tagSelector_popup-setter"), u;
|
|
773
|
+
}), S = () => {
|
|
774
|
+
const u = prompt("", "New tag");
|
|
775
|
+
if (!u || u === "New tag") return;
|
|
772
776
|
const s = o.value.length + 1;
|
|
773
777
|
o.value.push({
|
|
774
778
|
id: String(s),
|
|
775
|
-
name:
|
|
779
|
+
name: u,
|
|
776
780
|
color_id: String((s - 1) % 10 + 1)
|
|
777
781
|
}), n("tagsChanged", o.value);
|
|
778
|
-
}, _ = (
|
|
782
|
+
}, _ = (u) => {
|
|
779
783
|
var s;
|
|
780
|
-
if (
|
|
781
|
-
if (
|
|
784
|
+
if (r.value = G(u.elPopupOpener, "topTagSelectorTarget"), !r.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
785
|
+
if (r.value.filters && (f.value = "add", r.value.model.value = []), !((s = J.$) != null && s.ui.sortable)) {
|
|
782
786
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
783
787
|
return;
|
|
784
788
|
}
|
|
785
|
-
!J.state.isMobile && !J.state.isMobileUA && o.value && $(
|
|
789
|
+
!J.state.isMobile && !J.state.isMobileUA && o.value && $(u.elPopup).sortable({
|
|
786
790
|
items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
|
|
787
|
-
|
|
791
|
+
/**
|
|
792
|
+
* @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
|
|
793
|
+
*/
|
|
794
|
+
cancel: '[contenteditable="plaintext-only"], [contenteditable="true"]',
|
|
788
795
|
distance: 10,
|
|
789
|
-
stop: function(c,
|
|
796
|
+
stop: function(c, p) {
|
|
790
797
|
if (!o.value) return;
|
|
791
|
-
const V = $(
|
|
798
|
+
const V = $(p.item).parent().find("[data-tag_id]"), E = [];
|
|
792
799
|
V.each((X, U) => {
|
|
793
800
|
if (!o.value) return;
|
|
794
801
|
const N = $(U).attr("data-tag_id");
|
|
795
|
-
|
|
802
|
+
E.push(N);
|
|
796
803
|
}), o.value.sort((X, U) => {
|
|
797
|
-
const N =
|
|
798
|
-
return N -
|
|
799
|
-
}),
|
|
804
|
+
const N = E.findIndex((oe) => oe === X.id), Ce = E.findIndex((oe) => oe === U.id);
|
|
805
|
+
return N - Ce;
|
|
806
|
+
}), d("tagsChanged", o.value);
|
|
800
807
|
}
|
|
801
808
|
});
|
|
802
|
-
}, T = (
|
|
809
|
+
}, T = (u) => {
|
|
803
810
|
var s;
|
|
804
|
-
(s = J.$) != null && s.ui.sortable && $(
|
|
811
|
+
(s = J.$) != null && s.ui.sortable && $(u.elPopup).data("ui-sortable") && $(u.elPopup).sortable("destroy");
|
|
805
812
|
};
|
|
806
|
-
return (
|
|
807
|
-
|
|
813
|
+
return (u, s) => (x(), w(Y, null, [
|
|
814
|
+
A(ke, {
|
|
808
815
|
class: "top-select_arrow",
|
|
809
|
-
modelValue:
|
|
810
|
-
"onUpdate:modelValue": s[0] || (s[0] = (c) =>
|
|
811
|
-
id:
|
|
816
|
+
modelValue: l.value,
|
|
817
|
+
"onUpdate:modelValue": s[0] || (s[0] = (c) => l.value = c),
|
|
818
|
+
id: h(g),
|
|
812
819
|
tags: o.value,
|
|
813
820
|
mode: "filter",
|
|
814
821
|
useTopButton: ""
|
|
815
822
|
}, null, 8, ["modelValue", "id", "tags"]),
|
|
816
|
-
|
|
817
|
-
id:
|
|
823
|
+
A(he, {
|
|
824
|
+
id: h(g),
|
|
818
825
|
class: Q(k.value),
|
|
819
826
|
onOpen: s[4] || (s[4] = (c) => _(c)),
|
|
820
827
|
onClose: s[5] || (s[5] = (c) => T(c)),
|
|
821
828
|
"transition-duration": 50
|
|
822
829
|
}, Ke({
|
|
823
|
-
contentList:
|
|
824
|
-
|
|
830
|
+
contentList: b(() => [
|
|
831
|
+
h(r).mode === "filter" && !u.singleMode ? (x(), B(fe, {
|
|
825
832
|
key: 0,
|
|
826
833
|
id: "all",
|
|
827
834
|
colorId: "",
|
|
828
|
-
name:
|
|
829
|
-
state:
|
|
830
|
-
onSelect: s[3] || (s[3] = (c) =>
|
|
831
|
-
}, null, 8, ["name", "state"])) :
|
|
832
|
-
(
|
|
835
|
+
name: u.$i18n.Common.All_tags ?? "",
|
|
836
|
+
state: h(r).model.value.length ? "" : "selected",
|
|
837
|
+
onSelect: s[3] || (s[3] = (c) => h(r).model.value = [])
|
|
838
|
+
}, null, 8, ["name", "state"])) : q("", !0),
|
|
839
|
+
(x(!0), w(Y, null, ie(o.value, (c) => (x(), B(fe, {
|
|
833
840
|
key: c.id,
|
|
834
841
|
id: c.id,
|
|
835
842
|
colorId: c.color_id,
|
|
836
843
|
name: c.name,
|
|
837
|
-
state:
|
|
838
|
-
canExclude:
|
|
839
|
-
editable:
|
|
840
|
-
disabled:
|
|
841
|
-
onUnselect: (
|
|
842
|
-
onSelect: (
|
|
843
|
-
onExclude: (
|
|
844
|
-
"onUpdate:name": (
|
|
845
|
-
c.name =
|
|
844
|
+
state: y(c.id),
|
|
845
|
+
canExclude: h(r).mode === "filter" && !u.singleMode,
|
|
846
|
+
editable: u.tagsEditable,
|
|
847
|
+
disabled: m.value && y(c.id) === "",
|
|
848
|
+
onUnselect: (p) => C(c.id, "unselect"),
|
|
849
|
+
onSelect: (p) => C(c.id, "select"),
|
|
850
|
+
onExclude: (p) => C(c.id, "exclude"),
|
|
851
|
+
"onUpdate:name": (p) => {
|
|
852
|
+
c.name = p, h(d)("tagsChanged", o.value);
|
|
846
853
|
}
|
|
847
854
|
}, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
|
|
848
|
-
|
|
855
|
+
u.tagsEditable && o.value.length < u.tagsMax && o.value.length < 20 ? (x(), B(se, {
|
|
849
856
|
key: 1,
|
|
850
857
|
"data-top-icon": "",
|
|
851
|
-
onClick: j(
|
|
858
|
+
onClick: j(S, ["stop"])
|
|
852
859
|
}, {
|
|
853
|
-
default:
|
|
854
|
-
z(
|
|
860
|
+
default: b(() => [
|
|
861
|
+
z(K(u.$i18n.Common.Add), 1)
|
|
855
862
|
]),
|
|
856
863
|
_: 1
|
|
857
|
-
})) :
|
|
864
|
+
})) : q("", !0)
|
|
858
865
|
]),
|
|
859
866
|
_: 2
|
|
860
867
|
}, [
|
|
861
|
-
|
|
868
|
+
h(r).mode === "setter" && h(r).filters ? {
|
|
862
869
|
name: "header",
|
|
863
|
-
fn:
|
|
864
|
-
|
|
865
|
-
modelValue:
|
|
866
|
-
"onUpdate:modelValue": s[1] || (s[1] = (c) =>
|
|
867
|
-
options:
|
|
870
|
+
fn: b(() => [
|
|
871
|
+
A(re, {
|
|
872
|
+
modelValue: f.value,
|
|
873
|
+
"onUpdate:modelValue": s[1] || (s[1] = (c) => f.value = c),
|
|
874
|
+
options: v()
|
|
868
875
|
}, null, 8, ["modelValue", "options"])
|
|
869
876
|
]),
|
|
870
877
|
key: "0"
|
|
871
878
|
} : void 0,
|
|
872
|
-
|
|
879
|
+
h(r).mode === "setter" && h(r).filters ? {
|
|
873
880
|
name: "footer",
|
|
874
|
-
fn:
|
|
875
|
-
|
|
876
|
-
default:
|
|
877
|
-
z(
|
|
881
|
+
fn: b(() => [
|
|
882
|
+
A(W, { color: "theme" }, {
|
|
883
|
+
default: b(() => [
|
|
884
|
+
z(K(u.$i18n.Common.Cancel), 1)
|
|
878
885
|
]),
|
|
879
886
|
_: 1
|
|
880
887
|
}),
|
|
881
|
-
|
|
882
|
-
onClick: s[2] || (s[2] = (c) =>
|
|
883
|
-
tagsIds:
|
|
884
|
-
filters:
|
|
885
|
-
filtersAction:
|
|
886
|
-
payload:
|
|
888
|
+
A(W, {
|
|
889
|
+
onClick: s[2] || (s[2] = (c) => h(d)("setter", {
|
|
890
|
+
tagsIds: h(r).model.value,
|
|
891
|
+
filters: h(r).filters,
|
|
892
|
+
filtersAction: f.value,
|
|
893
|
+
payload: h(r).payload
|
|
887
894
|
}))
|
|
888
895
|
}, {
|
|
889
|
-
default:
|
|
890
|
-
z(
|
|
896
|
+
default: b(() => [
|
|
897
|
+
z(K(f.value === "add" ? u.$i18n.Common.Add : "") + " " + K(f.value === "replace" ? u.$i18n.Common.Replace : "") + " " + K(f.value === "delete" ? u.$i18n.Common.Remove : ""), 1)
|
|
891
898
|
]),
|
|
892
899
|
_: 1
|
|
893
900
|
})
|
|
@@ -897,68 +904,74 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
|
|
|
897
904
|
]), 1032, ["id", "class"])
|
|
898
905
|
], 64));
|
|
899
906
|
}
|
|
900
|
-
}),
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
907
|
+
}), ft = (e, a) => M(() => ue(e).filter((l) => l.on >= 0 || l.id === a).map((l) => ({
|
|
908
|
+
value: l.id,
|
|
909
|
+
title: l.url + ` [${l.id}]`,
|
|
910
|
+
icon: l.id === ue(a) ? "" : "",
|
|
911
|
+
content: l.name
|
|
912
|
+
}))), vt = (e, a, i) => {
|
|
913
|
+
a || (a = { id: e.id }), a.id = e.id;
|
|
914
|
+
const t = Fe.genElPopupOpener("div", a);
|
|
915
|
+
return t.classList.add("top-tagSelector"), e.useTopButton && t.classList.add("top-button", "top-color_theme"), e.mode === "filter" && t.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && t.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && t.classList.add("top-tagSelector-setter_several"), t.onclick = (l) => {
|
|
916
|
+
l.preventDefault(), l.stopPropagation(), t.onclick = null;
|
|
917
|
+
const o = F(e.modelValue), n = {
|
|
906
918
|
model: o,
|
|
907
919
|
mode: e.mode,
|
|
908
920
|
targetId: e.targetId,
|
|
909
921
|
filters: e.filters,
|
|
910
922
|
payload: e.payload
|
|
911
923
|
};
|
|
912
|
-
G(t, "topTagSelectorTarget", n), delete t.dataset.topPopupDisabled,
|
|
924
|
+
G(t, "topTagSelectorTarget", n), delete t.dataset.topPopupDisabled, ce(e.modelValue) || L(o, () => {
|
|
913
925
|
e.modelValue = o.value, Z(t, e, i);
|
|
914
926
|
}), t.click();
|
|
915
|
-
},
|
|
916
|
-
e.modelValue =
|
|
927
|
+
}, ce(e.modelValue) ? L(e.modelValue, () => Z(t, e, i)) : G(t, "topTagSelectorRender", (l) => {
|
|
928
|
+
e.modelValue = l;
|
|
917
929
|
const o = G(t, "topTagSelectorTarget");
|
|
918
|
-
o && (o.model.value =
|
|
930
|
+
o && (o.model.value = l), Z(t, e, i);
|
|
919
931
|
}), Z(t, e, i), t;
|
|
920
|
-
},
|
|
932
|
+
}, yt = (e, a) => {
|
|
921
933
|
var i;
|
|
922
|
-
(i = G(e, "topTagSelectorRender")) == null || i(
|
|
923
|
-
}, Z = (e,
|
|
924
|
-
var
|
|
925
|
-
const t =
|
|
926
|
-
if (e.classList.toggle("top-tagSelector-selectedOne", !t.length || t.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", t.length > 5),
|
|
934
|
+
(i = G(e, "topTagSelectorRender")) == null || i(a);
|
|
935
|
+
}, Z = (e, a, i) => {
|
|
936
|
+
var l;
|
|
937
|
+
const t = h(a.modelValue);
|
|
938
|
+
if (e.classList.toggle("top-tagSelector-selectedOne", !t.length || t.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", t.length > 5), a.mode === "setter" && a.filters) {
|
|
927
939
|
e.innerHTML = `<div>${i}</div>`;
|
|
928
940
|
return;
|
|
929
941
|
}
|
|
930
|
-
if (e.innerHTML = "", !t.length &&
|
|
931
|
-
const o =
|
|
942
|
+
if (e.innerHTML = "", !t.length && a.mode === "filter") {
|
|
943
|
+
const o = ve({
|
|
932
944
|
id: "all",
|
|
933
945
|
colorId: "",
|
|
934
|
-
name: ((
|
|
946
|
+
name: ((l = R().Common) == null ? void 0 : l.All_tags) ?? "",
|
|
935
947
|
state: ""
|
|
936
948
|
});
|
|
937
949
|
e.append(o);
|
|
938
950
|
}
|
|
939
951
|
t.forEach((o) => {
|
|
940
|
-
var
|
|
941
|
-
const n =
|
|
952
|
+
var d, g;
|
|
953
|
+
const n = ve({
|
|
942
954
|
id: H(o),
|
|
943
|
-
colorId: ((
|
|
944
|
-
name: ((
|
|
955
|
+
colorId: ((d = ae(o, a.tags)) == null ? void 0 : d.color_id) ?? "",
|
|
956
|
+
name: ((g = ae(o, a.tags)) == null ? void 0 : g.name) ?? "",
|
|
945
957
|
state: H(o) === o ? "selected" : "excluded"
|
|
946
958
|
});
|
|
947
959
|
e.append(n);
|
|
948
960
|
});
|
|
949
|
-
},
|
|
950
|
-
const
|
|
951
|
-
return
|
|
952
|
-
},
|
|
961
|
+
}, ve = (e) => {
|
|
962
|
+
const a = document.createElement("div");
|
|
963
|
+
return a.classList.add("top-tagSelector_tagIcon"), a.classList.toggle("top-tagSelector-active", !!e.state), a.classList.toggle("top-tagSelector-excluded", e.state === "excluded"), a.dataset.tag_id = e.id, a.dataset.tag_color_id = e.colorId, a.title = e.name, a;
|
|
964
|
+
}, pt = Ue, ht = et, St = nt, It = ke, xt = le;
|
|
953
965
|
export {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
966
|
+
pt as TopSelectorCompetitors,
|
|
967
|
+
ht as TopSelectorRegion,
|
|
968
|
+
St as TopTagSelector,
|
|
969
|
+
It as TopTagSelectorPopupOpener,
|
|
970
|
+
xt as TopTagSelectorTagIcon,
|
|
971
|
+
We as findRegion,
|
|
972
|
+
vt as genElTopTagSelectorPopupOpener,
|
|
973
|
+
Ie as genSearcherByKey,
|
|
974
|
+
yt as renderElTopTagSelectorPopupOpener,
|
|
975
|
+
ft as useItemsFromCompetitors
|
|
963
976
|
};
|
|
964
977
|
//# sourceMappingURL=project.js.map
|