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