@topvisor/ui 1.4.0-TopGroupSelector.9 → 1.4.1-titleHTML.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.chunks/{core-BsPx05H9.amd.js → core-B-mZaxOL.amd.js} +2 -2
- package/.chunks/{core-BsPx05H9.amd.js.map → core-B-mZaxOL.amd.js.map} +1 -1
- package/.chunks/{core-BL-38XF7.es.js → core-BNsYbDEi.es.js} +4 -4
- package/.chunks/{core-BL-38XF7.es.js.map → core-BNsYbDEi.es.js.map} +1 -1
- package/.chunks/{datepicker-D1Hw3a3o.es.js → datepicker-D8SjLnKy.es.js} +2 -2
- package/.chunks/{datepicker-D1Hw3a3o.es.js.map → datepicker-D8SjLnKy.es.js.map} +1 -1
- package/.chunks/{datepicker-3coUsFW2.amd.js → datepicker-ppUhXCHG.amd.js} +2 -2
- package/.chunks/{datepicker-3coUsFW2.amd.js.map → datepicker-ppUhXCHG.amd.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-1UVhgK2f.es.js → dialog_regionSelectorRegions-BVuXu3Hl.es.js} +4 -4
- package/.chunks/{dialog_regionSelectorRegions-1UVhgK2f.es.js.map → dialog_regionSelectorRegions-BVuXu3Hl.es.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-CZ8IX7la.amd.js → dialog_regionSelectorRegions-C1DNLHM7.amd.js} +2 -2
- package/.chunks/{dialog_regionSelectorRegions-CZ8IX7la.amd.js.map → dialog_regionSelectorRegions-C1DNLHM7.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js → dialogs.vue_vue_type_script_setup_true_lang-B3hYoW1m.amd.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-B3hYoW1m.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js → dialogs.vue_vue_type_script_setup_true_lang-DlvY7Imv.es.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-DlvY7Imv.es.js.map} +1 -1
- package/.chunks/{forms-CUSCBQu3.amd.js → forms-B_v2vU59.amd.js} +3 -3
- package/.chunks/{forms-CUSCBQu3.amd.js.map → forms-B_v2vU59.amd.js.map} +1 -1
- package/.chunks/{forms-BseC3Ftz.es.js → forms-Dz-wIQ-s.es.js} +557 -543
- package/.chunks/{forms-BseC3Ftz.es.js.map → forms-Dz-wIQ-s.es.js.map} +1 -1
- package/.chunks/{notice-DwjipV21.amd.js → notice-6HGA0ECG.amd.js} +2 -2
- package/.chunks/{notice-DwjipV21.amd.js.map → notice-6HGA0ECG.amd.js.map} +1 -1
- package/.chunks/{notice-Cl3ZgiHm.es.js → notice-B_txXVCr.es.js} +2 -2
- package/.chunks/{notice-Cl3ZgiHm.es.js.map → notice-B_txXVCr.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js → page.vue_vue_type_script_setup_true_lang-BKQrX7yF.es.js} +4 -4
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js.map → page.vue_vue_type_script_setup_true_lang-BKQrX7yF.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js → page.vue_vue_type_script_setup_true_lang-WX1HlCFp.amd.js} +2 -2
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js.map → page.vue_vue_type_script_setup_true_lang-WX1HlCFp.amd.js.map} +1 -1
- package/.chunks/{policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js → policy.vue_vue_type_style_index_0_lang-2tHXHN3e.es.js} +4 -4
- package/.chunks/{policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js.map → policy.vue_vue_type_style_index_0_lang-2tHXHN3e.es.js.map} +1 -1
- package/.chunks/{policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js → policy.vue_vue_type_style_index_0_lang-Dgb5Q7Hx.amd.js} +2 -2
- package/.chunks/{policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js.map → policy.vue_vue_type_style_index_0_lang-Dgb5Q7Hx.amd.js.map} +1 -1
- package/.chunks/{popup-Jw_Yyg3U.es.js → popup-DiKBvdXr.es.js} +2 -2
- package/.chunks/{popup-Jw_Yyg3U.es.js.map → popup-DiKBvdXr.es.js.map} +1 -1
- package/.chunks/{popup-DRuyYFGB.amd.js → popup-H0d4XQtU.amd.js} +2 -2
- package/.chunks/{popup-DRuyYFGB.amd.js.map → popup-H0d4XQtU.amd.js.map} +1 -1
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js → popupHint.vue_vue_type_style_index_0_lang-CdIajfDS.amd.js} +2 -2
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js.map → popupHint.vue_vue_type_style_index_0_lang-CdIajfDS.amd.js.map} +1 -1
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js → popupHint.vue_vue_type_style_index_0_lang-DkmYKxyr.es.js} +2 -2
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js.map → popupHint.vue_vue_type_style_index_0_lang-DkmYKxyr.es.js.map} +1 -1
- package/.chunks/{utils-D9nYQabE.amd.js → utils-BUMfp_te.amd.js} +2 -2
- package/.chunks/{utils-D9nYQabE.amd.js.map → utils-BUMfp_te.amd.js.map} +1 -1
- package/.chunks/{utils-Q69SXlnV.es.js → utils-B_WbEbrB.es.js} +3 -3
- package/.chunks/{utils-Q69SXlnV.es.js.map → utils-B_WbEbrB.es.js.map} +1 -1
- package/.chunks/{utils-YrUExsH7.es.js → utils-CVP195Ai.es.js} +2 -2
- package/.chunks/{utils-YrUExsH7.es.js.map → utils-CVP195Ai.es.js.map} +1 -1
- package/.chunks/{utils-CzHUG_xz.amd.js → utils-DNzj9OOY.amd.js} +2 -2
- package/.chunks/{utils-CzHUG_xz.amd.js.map → utils-DNzj9OOY.amd.js.map} +1 -1
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js → widgetInput.vue_vue_type_script_setup_true_lang-C4wFo0AR.amd.js} +2 -2
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js.map → widgetInput.vue_vue_type_script_setup_true_lang-C4wFo0AR.amd.js.map} +1 -1
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js → widgetInput.vue_vue_type_script_setup_true_lang-CCV8nSim.es.js} +2 -2
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js.map → widgetInput.vue_vue_type_script_setup_true_lang-CCV8nSim.es.js.map} +1 -1
- package/api/index.amd.js +1 -1
- package/api/index.amd.js.map +1 -1
- package/api/index.js +1 -1
- package/api/index.js.map +1 -1
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/policy.css +1 -1
- package/assets/project.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.js +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.js +5 -5
- 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.amd.js.map +1 -1
- package/formsExt/formsExt.js +117 -113
- package/formsExt/formsExt.js.map +1 -1
- package/layout/layout.amd.js +1 -1
- package/layout/layout.js +1 -1
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.js +4 -4
- 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 +210 -213
- package/project/project.js.map +1 -1
- package/src/api/api/types/client/request-options.d.ts +8 -3
- package/src/components/forms/caption/types.d.ts +5 -1
- package/src/components/forms/input/input.vue.d.ts +2 -4
- package/src/components/forms/input/types.d.ts +15 -0
- package/src/components/forms/select/select.vue.d.ts +15 -2
- package/src/components/forms/select/types.d.ts +6 -0
- package/src/components/formsExt/editArea/editArea.vue.d.ts +15 -2
- package/src/components/formsExt/editArea/types.d.ts +6 -0
- package/src/components/project/groupSelector/groupSelector.vue.d.ts +5 -0
- package/src/components/project/groupSelector/groups/types.d.ts +4 -0
- package/src/components/project/groupSelector/types.d.ts +4 -0
- package/src/core/utils/string.d.ts +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.js +2 -2
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.js +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.js +3 -3
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +50 -50
- package/utils/string.js.map +1 -1
package/project/project.js
CHANGED
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
const fileNames = ['../assets/project.css'].map(fileName => import.meta.resolve(fileName));
|
|
4
4
|
_autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
|
|
5
5
|
|
|
6
|
-
import { defineComponent as R, mergeModels as
|
|
7
|
-
import { u as w, C as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { a as We, _ as
|
|
10
|
-
import { u as
|
|
11
|
-
import { getSearcherGIcon as
|
|
12
|
-
import "../.chunks/core-
|
|
13
|
-
import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { defineComponent as R, mergeModels as V, useModel as T, computed as M, createElementBlock as A, openBlock as h, createBlock as C, unref as v, withCtx as B, Fragment as Y, renderList as me, normalizeClass as X, createElementVNode as oe, toDisplayString as b, createVNode as P, createTextVNode as J, toValue as ye, ref as K, watch as E, createCommentVNode as O, reactive as be, isRef as he, withModifiers as U, mergeProps as Ve, withKeys as Ie, nextTick as Re, resolveDirective as Pe, withDirectives as Ne, resolveDynamicComponent as De, renderSlot as qe, shallowRef as Fe, createSlots as Ue } from "vue";
|
|
7
|
+
import { u as w, C as z, e as Q, p as ce, d as ze } from "../.chunks/forms-Dz-wIQ-s.es.js";
|
|
8
|
+
import { _ as we, b as ve, a as Je } from "../.chunks/popupHint.vue_vue_type_style_index_0_lang-DkmYKxyr.es.js";
|
|
9
|
+
import { a as We, _ as Me, b as Ee, c as $e, I as ue } from "../.chunks/policy.vue_vue_type_style_index_0_lang-2tHXHN3e.es.js";
|
|
10
|
+
import { u as _e } from "../.chunks/utils-CVP195Ai.es.js";
|
|
11
|
+
import { getSearcherGIcon as Ye, getLangLabel as Qe, getDeviceGIcon as He } from "../utils/searchers.js";
|
|
12
|
+
import "../.chunks/core-BNsYbDEi.es.js";
|
|
13
|
+
import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-DlvY7Imv.es.js";
|
|
14
14
|
import { g as Se } from "../.chunks/field-CyyFzM-Y.es.js";
|
|
15
|
-
import { storage as
|
|
16
|
-
import { TopPopupWorker as
|
|
17
|
-
const
|
|
15
|
+
import { storage as W } from "../utils/dom.js";
|
|
16
|
+
import { TopPopupWorker as Xe } from "../popup/worker.js";
|
|
17
|
+
const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" }, Rt = /* @__PURE__ */ R({
|
|
18
18
|
__name: "competitorSelector",
|
|
19
|
-
props: /* @__PURE__ */
|
|
19
|
+
props: /* @__PURE__ */ V({
|
|
20
20
|
modelValue: {},
|
|
21
21
|
items: {},
|
|
22
22
|
showSelectAllItem: { type: Boolean, default: !0 }
|
|
@@ -26,7 +26,7 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
26
26
|
}),
|
|
27
27
|
emits: ["update:modelValue"],
|
|
28
28
|
setup(e) {
|
|
29
|
-
const a = e, o = T(e, "modelValue"), t =
|
|
29
|
+
const a = e, o = T(e, "modelValue"), t = M(() => {
|
|
30
30
|
if (a.showSelectAllItem)
|
|
31
31
|
return {
|
|
32
32
|
icon: "",
|
|
@@ -35,17 +35,17 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
35
35
|
content: ""
|
|
36
36
|
};
|
|
37
37
|
});
|
|
38
|
-
return (r, l) => (h(), A("div",
|
|
39
|
-
v(
|
|
38
|
+
return (r, l) => (h(), A("div", Ze, [
|
|
39
|
+
v(z).state.isMobile ? (h(), C(we, { key: 0 }, {
|
|
40
40
|
opener: B(() => [
|
|
41
|
-
|
|
41
|
+
P(Q, {
|
|
42
42
|
class: "top-competitorSelector_opener",
|
|
43
43
|
color: "theme",
|
|
44
44
|
icon: "",
|
|
45
45
|
icon2: ""
|
|
46
46
|
}, {
|
|
47
47
|
default: B(() => [
|
|
48
|
-
|
|
48
|
+
J(b(e.items.find((n) => n.value === o.value?.[0])?.content), 1)
|
|
49
49
|
]),
|
|
50
50
|
_: 1
|
|
51
51
|
})
|
|
@@ -60,7 +60,7 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
60
60
|
onClick: () => o.value = [n.value]
|
|
61
61
|
}, {
|
|
62
62
|
default: B(() => [
|
|
63
|
-
oe("span",
|
|
63
|
+
oe("span", et, b(n.content), 1)
|
|
64
64
|
]),
|
|
65
65
|
_: 2
|
|
66
66
|
}, 1032, ["class", "data-top-icon", "title", "onClick"]))), 256))
|
|
@@ -78,12 +78,12 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
78
78
|
}, null, 8, ["modelValue", "items", "selectAllItem"]))
|
|
79
79
|
]));
|
|
80
80
|
}
|
|
81
|
-
}), Pt = (e, a) =>
|
|
81
|
+
}), Pt = (e, a) => M(() => ye(e).filter((r) => r.on >= 0 || r.id === a).map((r) => ({
|
|
82
82
|
value: r.id,
|
|
83
83
|
title: r.url + ` [${r.id}]`,
|
|
84
84
|
icon: r.id === ye(a) ? "" : "",
|
|
85
85
|
content: r.name
|
|
86
|
-
}))),
|
|
86
|
+
}))), L = -1, y = -2, le = -1, tt = {
|
|
87
87
|
0: "Yandex",
|
|
88
88
|
1: "Google",
|
|
89
89
|
4: "YouTube",
|
|
@@ -106,7 +106,7 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
106
106
|
key: y,
|
|
107
107
|
name: "Autoselect",
|
|
108
108
|
index: y
|
|
109
|
-
},
|
|
109
|
+
}, se = {
|
|
110
110
|
key: y,
|
|
111
111
|
name: "Autoselect",
|
|
112
112
|
regions: [ae],
|
|
@@ -119,9 +119,9 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
119
119
|
index: le,
|
|
120
120
|
lang: "ru",
|
|
121
121
|
name: "Without region"
|
|
122
|
-
},
|
|
122
|
+
}, ot = () => (ae.name = w().Common.Autoselect, ae), lt = () => (ot(), se.name = w().Common.Autoselect, console.log(se), se), at = () => (ke.name = w().Keywords.Without_region, ke), Ke = (e = !1, a = !1, o = []) => {
|
|
123
123
|
let t;
|
|
124
|
-
return e ? t =
|
|
124
|
+
return e ? t = nt(o) : t = Oe(o), a && t.set(y, lt()), t.size || t.set(y, Ge), t;
|
|
125
125
|
}, Oe = (e, a = !0, o = [], t = !1) => {
|
|
126
126
|
const r = /* @__PURE__ */ new Map();
|
|
127
127
|
return e.forEach((l) => {
|
|
@@ -139,13 +139,13 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
139
139
|
if (r.has(l)) return;
|
|
140
140
|
const n = {
|
|
141
141
|
key: l,
|
|
142
|
-
name:
|
|
142
|
+
name: tt[l],
|
|
143
143
|
regions: [],
|
|
144
144
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
145
145
|
};
|
|
146
146
|
r.set(n.key, n);
|
|
147
147
|
}), r;
|
|
148
|
-
},
|
|
148
|
+
}, nt = (e) => {
|
|
149
149
|
const a = Oe(e, !1, [0, 1], !0);
|
|
150
150
|
if (a.has(2)) {
|
|
151
151
|
const o = a.get(2);
|
|
@@ -153,10 +153,10 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
153
153
|
}
|
|
154
154
|
return a.forEach((o) => {
|
|
155
155
|
if (!o.regionByIndex) return;
|
|
156
|
-
const t = { ...
|
|
156
|
+
const t = { ...at() };
|
|
157
157
|
o.regionByIndex.set(t.index, t);
|
|
158
158
|
}), a;
|
|
159
|
-
},
|
|
159
|
+
}, rt = (e, a, o = []) => {
|
|
160
160
|
const t = Ke(e, !1, o);
|
|
161
161
|
let r;
|
|
162
162
|
return t.forEach((l) => {
|
|
@@ -166,15 +166,15 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
166
166
|
}), r))
|
|
167
167
|
return !1;
|
|
168
168
|
}), r;
|
|
169
|
-
},
|
|
170
|
-
const o = w(), t =
|
|
169
|
+
}, it = _e(() => import("../.chunks/dialog_regionSelectorRegions-BVuXu3Hl.es.js")), dt = (e, a) => {
|
|
170
|
+
const o = w(), t = K(a.value.keys().next().value ?? y), r = M(() => {
|
|
171
171
|
const l = /* @__PURE__ */ new Map();
|
|
172
172
|
if (a.value.forEach((n) => {
|
|
173
173
|
let u = {
|
|
174
174
|
value: n.key,
|
|
175
175
|
title: n.name
|
|
176
176
|
};
|
|
177
|
-
e.addSearcherIcon && (u.icon =
|
|
177
|
+
e.addSearcherIcon && (u.icon = Ye(n.key)), l.set(n.key, u);
|
|
178
178
|
}), e.addCompare && !l.has(y)) {
|
|
179
179
|
const n = {
|
|
180
180
|
value: "",
|
|
@@ -183,7 +183,7 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
183
183
|
};
|
|
184
184
|
l.set(n.value, n);
|
|
185
185
|
const u = {
|
|
186
|
-
value:
|
|
186
|
+
value: L,
|
|
187
187
|
title: o.Common.Compare
|
|
188
188
|
};
|
|
189
189
|
l.set(u.value, u);
|
|
@@ -194,10 +194,10 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
194
194
|
searcherKey: t,
|
|
195
195
|
optionBySearcherKey: r
|
|
196
196
|
};
|
|
197
|
-
},
|
|
198
|
-
const o = w(), t =
|
|
197
|
+
}, ut = (e, a) => {
|
|
198
|
+
const o = w(), t = K(y);
|
|
199
199
|
e.modelValue.length === 1 && (t.value = e.modelValue[0]), t.value === y && (e.forFrequency ? t.value = a.value?.regionByIndex.values().next().value?.key ?? y : t.value = a.value?.regionByIndex.keys().next().value ?? y);
|
|
200
|
-
const r =
|
|
200
|
+
const r = M(() => {
|
|
201
201
|
const l = /* @__PURE__ */ new Map();
|
|
202
202
|
return a.value.regionByIndex?.forEach((n) => {
|
|
203
203
|
let u = n.name;
|
|
@@ -210,17 +210,17 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
212
|
n.device && (u += " (" + o.Common["Device_" + n.device] + ")");
|
|
213
|
-
const f =
|
|
213
|
+
const f = Qe(a.value.key || 0, n.lang ?? "");
|
|
214
214
|
f && (u += " / " + f);
|
|
215
215
|
const c = {
|
|
216
216
|
value: n.index,
|
|
217
217
|
title: u,
|
|
218
|
-
icon: n.device ?
|
|
218
|
+
icon: n.device ? He(n.device) : void 0
|
|
219
219
|
};
|
|
220
220
|
l.set(n.index, c);
|
|
221
221
|
}), l;
|
|
222
222
|
});
|
|
223
|
-
return
|
|
223
|
+
return E(r, (l, n) => {
|
|
224
224
|
if (e.onlySearcher || t.value !== void 0 && l.get(t.value))
|
|
225
225
|
return;
|
|
226
226
|
let u = l.keys().next().value;
|
|
@@ -246,8 +246,8 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
246
246
|
regionIndex: t,
|
|
247
247
|
optionByRegionIndex: r
|
|
248
248
|
};
|
|
249
|
-
},
|
|
250
|
-
const t =
|
|
249
|
+
}, st = (e, a, o) => {
|
|
250
|
+
const t = K([]), r = () => {
|
|
251
251
|
if (e.onlySearcher && a.value) {
|
|
252
252
|
t.value = Array.from(a.value.keys());
|
|
253
253
|
return;
|
|
@@ -266,22 +266,22 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
266
266
|
}, l = () => {
|
|
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 E(t, () => {
|
|
270
270
|
l();
|
|
271
271
|
}), e.addCompare && r(), {
|
|
272
272
|
regionsIndexes: t
|
|
273
273
|
};
|
|
274
|
-
},
|
|
275
|
-
const a =
|
|
274
|
+
}, ct = (e) => {
|
|
275
|
+
const a = M(() => Ke(e.forFrequency, e.autoRegion, e.searchers)), o = M(() => a.value.get(r.searcherKey.value) || Ge), t = M(() => {
|
|
276
276
|
const i = /* @__PURE__ */ new Set();
|
|
277
277
|
return a.value.forEach((m) => {
|
|
278
278
|
m.regionByIndex.forEach((d) => {
|
|
279
279
|
d.index !== le && d.index !== y && i.add(d.index);
|
|
280
280
|
});
|
|
281
281
|
}), i;
|
|
282
|
-
}), r =
|
|
283
|
-
|
|
284
|
-
if (e.onlySearcher ? n.regionsIndexes.value = Array.from(a.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((m) => t.value.has(m)), r.searcherKey.value ===
|
|
282
|
+
}), r = dt(e, a), l = ut(e, o), n = st(e, a, t);
|
|
283
|
+
E(a, () => {
|
|
284
|
+
if (e.onlySearcher ? n.regionsIndexes.value = Array.from(a.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((m) => t.value.has(m)), r.searcherKey.value === L) return;
|
|
285
285
|
let i = a.value.keys().next().value;
|
|
286
286
|
a.value.forEach((m) => {
|
|
287
287
|
if (e.onlySearcher && m.key === r.searcherKey.value) {
|
|
@@ -297,14 +297,14 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
297
297
|
}), i !== void 0 && (r.searcherKey.value = i), l.regionIndex.value !== void 0 && !o.value?.regionByIndex?.has(l.regionIndex.value) && (l.regionIndex.value = o.value?.regions?.keys().next().value);
|
|
298
298
|
}, { immediate: !0 });
|
|
299
299
|
const u = () => {
|
|
300
|
-
if (!(r.searcherKey.value ===
|
|
300
|
+
if (!(r.searcherKey.value === L || r.searcherKey.value === y))
|
|
301
301
|
return r.searcherKey.value;
|
|
302
302
|
}, f = () => {
|
|
303
303
|
if (e.onlySearcher || l.regionIndex.value === y) return;
|
|
304
304
|
let i = l.regionIndex.value;
|
|
305
305
|
if (e.forFrequency) {
|
|
306
306
|
const m = l.regionIndex.value;
|
|
307
|
-
i =
|
|
307
|
+
i = rt(e.forFrequency, { searcher_key: u(), key: m }, e.searchers)?.index;
|
|
308
308
|
}
|
|
309
309
|
return i;
|
|
310
310
|
}, c = () => {
|
|
@@ -325,9 +325,9 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
325
325
|
return c()?.regionByIndex?.get(i);
|
|
326
326
|
}
|
|
327
327
|
};
|
|
328
|
-
},
|
|
328
|
+
}, Nt = /* @__PURE__ */ R({
|
|
329
329
|
__name: "regionSelector",
|
|
330
|
-
props: /* @__PURE__ */
|
|
330
|
+
props: /* @__PURE__ */ V({
|
|
331
331
|
projectId: {},
|
|
332
332
|
searchers: { default: () => [] },
|
|
333
333
|
modelValue: {},
|
|
@@ -355,29 +355,29 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
355
355
|
allRegionsIndexes: c,
|
|
356
356
|
getSearcher: x,
|
|
357
357
|
getRegion: i
|
|
358
|
-
} =
|
|
358
|
+
} = ct(o), m = () => {
|
|
359
359
|
const d = [];
|
|
360
360
|
f.value.forEach((s) => {
|
|
361
361
|
s.enabled && s.regions.forEach((g) => {
|
|
362
362
|
g.enabled && d.push(g);
|
|
363
363
|
});
|
|
364
|
-
}),
|
|
364
|
+
}), it.open("regions", {
|
|
365
365
|
regions: d,
|
|
366
366
|
regionsIndexes: u.regionsIndexes.value,
|
|
367
367
|
"@update:regionsIndexes": (s) => u.regionsIndexes.value = s
|
|
368
368
|
});
|
|
369
369
|
};
|
|
370
|
-
return
|
|
371
|
-
if (l.searcherKey.value ===
|
|
370
|
+
return E([n.regionIndex, l.searcherKey, u.regionsIndexes], () => {
|
|
371
|
+
if (l.searcherKey.value === L && u.regionsIndexes.value.length) {
|
|
372
372
|
if (JSON.stringify(t.value) === JSON.stringify(u.regionsIndexes.value))
|
|
373
373
|
return;
|
|
374
374
|
t.value = [...u.regionsIndexes.value];
|
|
375
375
|
} else
|
|
376
376
|
o.onlySearcher ? (t.value = [l.searcherKey.value], l.searcherKey.value === y && !o.autoRegion && (t.value.length = 0)) : (t.value = [n.regionIndex.value], n.regionIndex.value === y && !o.autoRegion && (t.value.length = 0));
|
|
377
377
|
!o.onlySearcher && !c.value.size && (l.searcherKey.value = y);
|
|
378
|
-
}), r.value &&
|
|
378
|
+
}), r.value && E(r, () => {
|
|
379
379
|
r.value && (t.value = [r.value]);
|
|
380
|
-
}, { immediate: !0 }),
|
|
380
|
+
}, { immediate: !0 }), E(t, () => {
|
|
381
381
|
if (t.value[0] && (r.value = t.value[0]), o.onlySearcher) {
|
|
382
382
|
if (!t.value.length || t.value.length === 1 && !f.value.has(t.value[0]) || t.value.length === 1 && t.value[0] === y && !o.autoRegion) {
|
|
383
383
|
let d = f.value.keys().next().value;
|
|
@@ -395,8 +395,8 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
395
395
|
else if (d.length === 1) {
|
|
396
396
|
let g = c.value;
|
|
397
397
|
o.forFrequency && (g = /* @__PURE__ */ new Set(), f.value.forEach((Z) => {
|
|
398
|
-
Z.regionByIndex.forEach((
|
|
399
|
-
|
|
398
|
+
Z.regionByIndex.forEach((N) => {
|
|
399
|
+
N.index !== le && N.index !== y && g.add(N.key);
|
|
400
400
|
});
|
|
401
401
|
})), g.has(d[0]) || (d = [], s !== void 0 && d.push(s));
|
|
402
402
|
} else
|
|
@@ -412,12 +412,12 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
412
412
|
l.searcherKey.value = t.value[0];
|
|
413
413
|
return;
|
|
414
414
|
}
|
|
415
|
-
l.searcherKey.value =
|
|
415
|
+
l.searcherKey.value = L;
|
|
416
416
|
return;
|
|
417
417
|
} else {
|
|
418
418
|
if (!t.value.length)
|
|
419
419
|
return;
|
|
420
|
-
if (t.value.length === 1 && l.searcherKey.value !==
|
|
420
|
+
if (t.value.length === 1 && l.searcherKey.value !== L) {
|
|
421
421
|
n.regionIndex.value = t.value[0];
|
|
422
422
|
let d;
|
|
423
423
|
for (const s of f.value.values()) {
|
|
@@ -431,7 +431,7 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
431
431
|
}
|
|
432
432
|
d !== void 0 && (l.searcherKey.value = d);
|
|
433
433
|
} else
|
|
434
|
-
l.searcherKey.value =
|
|
434
|
+
l.searcherKey.value = L, u.regionsIndexes.value = [...t.value];
|
|
435
435
|
}
|
|
436
436
|
}, { immediate: !0 }), a({
|
|
437
437
|
getSearcher: x,
|
|
@@ -442,14 +442,14 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
442
442
|
"top-selectorRegion-onlySearcher": e.onlySearcher
|
|
443
443
|
})
|
|
444
444
|
}, [
|
|
445
|
-
|
|
445
|
+
P(ce, {
|
|
446
446
|
options: v(l).optionBySearcherKey.value,
|
|
447
447
|
modelValue: v(l).searcherKey.value,
|
|
448
448
|
"onUpdate:modelValue": s[0] || (s[0] = (g) => v(l).searcherKey.value = g),
|
|
449
449
|
name: "searcher_key",
|
|
450
450
|
addChanger: e.addChanger
|
|
451
451
|
}, null, 8, ["options", "modelValue", "addChanger"]),
|
|
452
|
-
!e.onlySearcher && v(l).searcherKey.value !== v(
|
|
452
|
+
!e.onlySearcher && v(l).searcherKey.value !== v(L) ? (h(), C(ce, {
|
|
453
453
|
key: 0,
|
|
454
454
|
class: "top-select-region",
|
|
455
455
|
options: v(n).optionByRegionIndex.value,
|
|
@@ -458,39 +458,36 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
|
|
|
458
458
|
name: e.forFrequency ? "region_key" : "region_index",
|
|
459
459
|
addChanger: e.addChanger,
|
|
460
460
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
461
|
-
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) :
|
|
462
|
-
e.addCompare && !e.onlySearcher && v(l).searcherKey.value === v(
|
|
461
|
+
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : O("", !0),
|
|
462
|
+
e.addCompare && !e.onlySearcher && v(l).searcherKey.value === v(L) ? (h(), C(Q, {
|
|
463
463
|
key: 1,
|
|
464
464
|
name: "compare",
|
|
465
465
|
onClick: m,
|
|
466
466
|
"data-count-compare-regions-indexes": v(u).regionsIndexes.value.length
|
|
467
467
|
}, {
|
|
468
468
|
default: B(() => [
|
|
469
|
-
|
|
469
|
+
J(b(d.$i18n.Common.Selected_regions), 1)
|
|
470
470
|
]),
|
|
471
471
|
_: 1
|
|
472
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
472
|
+
}, 8, ["data-count-compare-regions-indexes"])) : O("", !0)
|
|
473
473
|
], 2));
|
|
474
474
|
}
|
|
475
|
-
}),
|
|
475
|
+
}), j = {
|
|
476
476
|
id: 0,
|
|
477
477
|
name: "/",
|
|
478
478
|
path: "/"
|
|
479
|
-
}, ft = (e, a) => {
|
|
480
|
-
let o = e?.root[0] ?? O;
|
|
481
|
-
return o = { ...o }, o.name = Le(a), o;
|
|
482
479
|
};
|
|
483
|
-
function
|
|
480
|
+
function gt(e) {
|
|
484
481
|
return e ? w()?.Common.All_folders : "/ (" + w()?.Keywords.Root_folder + ")";
|
|
485
482
|
}
|
|
486
483
|
const pe = (e, a, o = /* @__PURE__ */ new Map(), t = { id: "root" }, r = 0) => (t.childsIds = [], t.id && (t.countAllGroupsActive = t.count_groups_active), e[t.id] && e[t.id].forEach((l) => {
|
|
487
|
-
l = { ...l }, t.childsIds.push(l.id), l.id === 0 && (l.name =
|
|
484
|
+
l = { ...l }, t.childsIds.push(l.id), l.id === 0 && (l.name = gt(a));
|
|
488
485
|
const n = r > 1 ? "-".repeat(r - 1) + " " : "";
|
|
489
486
|
n && !l.name.startsWith(n) && (l.name = n + l.name), o.set(l.id, l), pe(e, a, o, l, r + 1), t.childsIds = t.childsIds.concat(l.childsIds), t.id && l.count_groups_active && (t.countAllGroupsActive += l.count_groups_active);
|
|
490
|
-
}), o),
|
|
491
|
-
function
|
|
487
|
+
}), o), ft = (e) => e.gen("/get/keywords_2/folders/", ["id", "parent_id", "name", "path"]).changeParams({ orders: ["ord_path"], limit: 100 });
|
|
488
|
+
function ge(e, a, o) {
|
|
492
489
|
const t = Object.keys(e), r = t.map((l) => e[l]);
|
|
493
|
-
return
|
|
490
|
+
return E(r, (l, n, u) => {
|
|
494
491
|
const f = {};
|
|
495
492
|
l.forEach((c, x) => {
|
|
496
493
|
if (!Object.is(c, n[x])) {
|
|
@@ -503,9 +500,9 @@ function ce(e, a, o) {
|
|
|
503
500
|
}), Object.keys(f).length && a(f, u);
|
|
504
501
|
}, o);
|
|
505
502
|
}
|
|
506
|
-
const
|
|
503
|
+
const mt = /* @__PURE__ */ R({
|
|
507
504
|
__name: "folders",
|
|
508
|
-
props: /* @__PURE__ */
|
|
505
|
+
props: /* @__PURE__ */ V({
|
|
509
506
|
folderId: {},
|
|
510
507
|
folder: {},
|
|
511
508
|
folders: {},
|
|
@@ -517,21 +514,21 @@ const vt = /* @__PURE__ */ R({
|
|
|
517
514
|
}, {
|
|
518
515
|
folderId: { required: !0 },
|
|
519
516
|
folderIdModifiers: {},
|
|
520
|
-
folder: { default:
|
|
517
|
+
folder: { default: j },
|
|
521
518
|
folderModifiers: {}
|
|
522
519
|
}),
|
|
523
520
|
emits: ["update:folderId", "update:folder"],
|
|
524
521
|
setup(e) {
|
|
525
|
-
const a = e, o = T(e, "folderId"), t = T(e, "folder"), r = a.client && !a.folders ?
|
|
526
|
-
|
|
522
|
+
const a = e, o = T(e, "folderId"), t = T(e, "folder"), r = a.client && !a.folders ? ft(a.client) : void 0, l = K(null);
|
|
523
|
+
E(() => a.projectId, () => {
|
|
527
524
|
r?.changeParams({
|
|
528
525
|
project_id: a.projectId
|
|
529
526
|
}), r?.setOptions({
|
|
530
527
|
checkFingerprint: "TopGroupSelectorFolders:" + a.projectId
|
|
531
528
|
}), l.value?.resetCache();
|
|
532
529
|
}, { immediate: !0 });
|
|
533
|
-
const n =
|
|
534
|
-
return
|
|
530
|
+
const n = M(() => pe(a.folders ?? { root: [j] }, a.canSelectAll));
|
|
531
|
+
return ge({
|
|
535
532
|
modelFolder: t,
|
|
536
533
|
modelFolderId: o
|
|
537
534
|
}, async (u) => {
|
|
@@ -541,15 +538,9 @@ const vt = /* @__PURE__ */ R({
|
|
|
541
538
|
o.value = t.value.id;
|
|
542
539
|
return;
|
|
543
540
|
}
|
|
544
|
-
if (u.modelFolderId) {
|
|
545
|
-
const c = n.value.get(a.folderId);
|
|
546
|
-
c && (t.value = c, t.value = c);
|
|
547
|
-
}
|
|
548
541
|
let f = n.value.get(a.folderId);
|
|
549
|
-
f || (f =
|
|
550
|
-
}, { immediate: !0 }),
|
|
551
|
-
o.value = t.value.id;
|
|
552
|
-
}), (u, f) => (h(), C(we, {
|
|
542
|
+
f || (f = j), t.value = f, o.value = f.id;
|
|
543
|
+
}, { immediate: !0 }), (u, f) => (h(), C(Me, {
|
|
553
544
|
class: "top-groupSelector_folder",
|
|
554
545
|
modelValue: t.value,
|
|
555
546
|
"onUpdate:modelValue": f[0] || (f[0] = (c) => t.value = c),
|
|
@@ -562,25 +553,25 @@ const vt = /* @__PURE__ */ R({
|
|
|
562
553
|
useCache: ""
|
|
563
554
|
}, null, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "addChanger"]));
|
|
564
555
|
}
|
|
565
|
-
}),
|
|
556
|
+
}), ne = {
|
|
566
557
|
id: -1,
|
|
567
558
|
name: "--",
|
|
568
|
-
folder_id:
|
|
569
|
-
folder_path:
|
|
570
|
-
},
|
|
559
|
+
folder_id: j.id,
|
|
560
|
+
folder_path: j.path
|
|
561
|
+
}, re = {
|
|
571
562
|
id: $e,
|
|
572
563
|
name: "All groups",
|
|
573
|
-
folder_id:
|
|
574
|
-
folder_path:
|
|
575
|
-
},
|
|
564
|
+
folder_id: j.id,
|
|
565
|
+
folder_path: j.path
|
|
566
|
+
}, _ = () => (re.name = w()?.Common.All_groups, re), Le = () => (re.name = w()?.Keywords.Choose_group, re), vt = (e, a, o) => (e = [...e], a !== void 0 && (e = e.filter((t) => t.on == Number(a))), o && o.id && o.childsIds && (e = e.filter((t) => t.folder_id === o.id || o.childsIds.includes(t.folder_id))), e), Ce = (e) => e.gen("/get/keywords_2/groups/", ["id", "name", "folder_id", "folder_path"]).changeParams({ folder_id_depth: !0, limit: 100 }), pt = (e) => e.gen("/add/keywords_2/groups/"), yt = { class: "top-groupSelector_groupItem" }, ht = {
|
|
576
567
|
key: 0,
|
|
577
568
|
class: "top-comment"
|
|
578
|
-
},
|
|
569
|
+
}, It = {
|
|
579
570
|
key: 1,
|
|
580
571
|
class: "top-groupSelector_groupItemFolderPath"
|
|
581
|
-
},
|
|
572
|
+
}, St = /* @__PURE__ */ R({
|
|
582
573
|
__name: "groups",
|
|
583
|
-
props: /* @__PURE__ */
|
|
574
|
+
props: /* @__PURE__ */ V({
|
|
584
575
|
groupId: {},
|
|
585
576
|
group: {},
|
|
586
577
|
projectId: {},
|
|
@@ -591,6 +582,7 @@ const vt = /* @__PURE__ */ R({
|
|
|
591
582
|
canSelectAll: { type: [Boolean, String] },
|
|
592
583
|
autoselect: { default: "first" },
|
|
593
584
|
addChanger: { type: Boolean, default: !0 },
|
|
585
|
+
showPath: { type: Boolean },
|
|
594
586
|
addIcon: { type: Boolean, default: !0 },
|
|
595
587
|
client: {}
|
|
596
588
|
}, {
|
|
@@ -599,19 +591,20 @@ const vt = /* @__PURE__ */ R({
|
|
|
599
591
|
group: { required: !0 },
|
|
600
592
|
groupModifiers: {}
|
|
601
593
|
}),
|
|
602
|
-
emits: /* @__PURE__ */
|
|
594
|
+
emits: /* @__PURE__ */ V(["addGroup"], ["update:groupId", "update:group"]),
|
|
603
595
|
setup(e, { emit: a }) {
|
|
604
|
-
const o = e, t = a, r = T(e, "groupId"), l = T(e, "group"), n = o.client && !o.groups ? Ce(o.client) : void 0, u = o.client ?
|
|
596
|
+
const o = e, t = a, r = T(e, "groupId"), l = T(e, "group"), n = o.client && !o.groups ? Ce(o.client) : void 0, u = o.client ? pt(o.client) : void 0, f = K(null), c = K(void 0), x = Se("folder_id", "EQUALS", [o.folder?.id ?? 0]);
|
|
605
597
|
n?.changeParams({
|
|
606
598
|
project_id: o.projectId,
|
|
599
|
+
folder_id_depth: !0,
|
|
607
600
|
filters: [
|
|
608
601
|
x
|
|
609
602
|
]
|
|
610
|
-
}), o.on !== void 0 && n?.params.filters?.push(Se("on", "EQUALS", [o.on]));
|
|
603
|
+
}), o.on !== void 0 && n?.params.filters?.push(Se("on", "EQUALS", [Number(o.on)]));
|
|
611
604
|
const i = (d) => {
|
|
612
605
|
l.value = d, r.value = d.id;
|
|
613
606
|
};
|
|
614
|
-
|
|
607
|
+
ge({
|
|
615
608
|
projectId: () => o.projectId,
|
|
616
609
|
folderId: () => o.folder?.id,
|
|
617
610
|
canSelectAll: () => o.canSelectAll
|
|
@@ -622,11 +615,11 @@ const vt = /* @__PURE__ */ R({
|
|
|
622
615
|
checkFingerprint: "TopGroupSelectorGroups:" + o.projectId
|
|
623
616
|
})), d.folderId && (x.values = [
|
|
624
617
|
o.folder?.id ?? 0
|
|
625
|
-
], o.groups && (c.value =
|
|
618
|
+
], o.groups && (c.value = vt(o.groups, o.on, o.folder))), f.value?.resetCache(), (d.folderId?.old !== void 0 || d.canSelectAll?.old !== void 0) && r.value !== ue) {
|
|
626
619
|
let s;
|
|
627
|
-
o.autoselect === "first" && (s = c.value?.[0], o.canSelectAll && (s = be(
|
|
620
|
+
o.autoselect === "first" && (s = c.value?.[0], o.canSelectAll && (s = be(_()))), (o.autoselect === "placeholder" || !s) && (s = Le()), i(s);
|
|
628
621
|
}
|
|
629
|
-
}, { immediate: !0 }),
|
|
622
|
+
}, { immediate: !0 }), ge({
|
|
630
623
|
modelGroup: l,
|
|
631
624
|
modelGroupId: r
|
|
632
625
|
}, async (d) => {
|
|
@@ -635,14 +628,14 @@ const vt = /* @__PURE__ */ R({
|
|
|
635
628
|
r.value = l.value.id;
|
|
636
629
|
return;
|
|
637
630
|
}
|
|
638
|
-
if (!(o.canAdd && r.value ===
|
|
631
|
+
if (!(o.canAdd && r.value === ue)) {
|
|
639
632
|
if (o.groups) {
|
|
640
633
|
let s = c.value?.find((g) => g.id === r.value);
|
|
641
|
-
if (!s && o.canSelectAll && (s =
|
|
634
|
+
if (!s && o.canSelectAll && (s = _()), s)
|
|
642
635
|
i(s);
|
|
643
636
|
else {
|
|
644
637
|
const g = c.value?.[0];
|
|
645
|
-
g && !r.value ? i(g) : i(
|
|
638
|
+
g && !r.value ? i(g) : i(ne);
|
|
646
639
|
}
|
|
647
640
|
}
|
|
648
641
|
if (o.client && !o.groups && (r.value || r.value === $e && !o.canSelectAll)) {
|
|
@@ -658,7 +651,7 @@ const vt = /* @__PURE__ */ R({
|
|
|
658
651
|
});
|
|
659
652
|
const g = await s.call();
|
|
660
653
|
if (!g.errors?.length && !g.result) return;
|
|
661
|
-
!g.errors && g.result[0] ? i(g.result[0]) : i(
|
|
654
|
+
!g.errors && g.result[0] ? i(g.result[0]) : i(ne);
|
|
662
655
|
}
|
|
663
656
|
}
|
|
664
657
|
}
|
|
@@ -668,12 +661,12 @@ const vt = /* @__PURE__ */ R({
|
|
|
668
661
|
const s = l.value, g = await u.changeParams({
|
|
669
662
|
project_id: o.projectId,
|
|
670
663
|
names: [d.name],
|
|
671
|
-
to_id: o.folder?.id ??
|
|
664
|
+
to_id: o.folder?.id ?? j.id,
|
|
672
665
|
to_type: "in_folder_last"
|
|
673
666
|
}).call();
|
|
674
667
|
g.result ? (i(g.result), t("addGroup", g.result)) : i(s), f.value?.resetCache(!0);
|
|
675
668
|
};
|
|
676
|
-
return (d, s) => (h(), C(
|
|
669
|
+
return (d, s) => (h(), C(Me, {
|
|
677
670
|
ref_key: "refSelector",
|
|
678
671
|
ref: f,
|
|
679
672
|
class: "top-groupSelector_group",
|
|
@@ -685,31 +678,32 @@ const vt = /* @__PURE__ */ R({
|
|
|
685
678
|
api: e.groups ? void 0 : v(n),
|
|
686
679
|
apiSetSearchParams: (...g) => v(Ee)(...g, "name"),
|
|
687
680
|
appendSearchToResult: !!e.canAdd,
|
|
688
|
-
useAllItem: e.canSelectAll ? v(
|
|
681
|
+
useAllItem: e.canSelectAll ? v(_)().name : !1,
|
|
689
682
|
addChanger: e.addChanger,
|
|
690
683
|
useCache: "",
|
|
691
684
|
onAppendItem: m
|
|
692
685
|
}, {
|
|
693
686
|
item: B(({ item: g }) => [
|
|
694
|
-
oe("div",
|
|
695
|
-
g.id === v(
|
|
687
|
+
oe("div", yt, [
|
|
688
|
+
g.id === v(ue) ? (h(), A("div", ht, b(d.$i18n.Common.Add) + ": ", 1)) : O("", !0),
|
|
696
689
|
oe("span", null, b(g.name), 1),
|
|
697
|
-
g.folder_path ? (h(), A("span",
|
|
690
|
+
g.folder_path && e.showPath ? (h(), A("span", It, b(g.folder_path), 1)) : O("", !0)
|
|
698
691
|
])
|
|
699
692
|
]),
|
|
700
693
|
_: 1
|
|
701
694
|
}, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "appendSearchToResult", "useAllItem", "addChanger"]));
|
|
702
695
|
}
|
|
703
|
-
}),
|
|
696
|
+
}), xt = { class: "top-groupSelector" }, Dt = /* @__PURE__ */ R({
|
|
704
697
|
__name: "groupSelector",
|
|
705
|
-
props: /* @__PURE__ */
|
|
698
|
+
props: /* @__PURE__ */ V({
|
|
706
699
|
folderId: {},
|
|
700
|
+
folder: {},
|
|
707
701
|
groupId: {},
|
|
708
702
|
group: {},
|
|
709
703
|
projectId: {},
|
|
710
704
|
folders: {},
|
|
711
705
|
groups: {},
|
|
712
|
-
on: { type: Boolean },
|
|
706
|
+
on: { type: Boolean, default: void 0 },
|
|
713
707
|
canSelectAllGroups: { type: Boolean },
|
|
714
708
|
canAddGroup: {},
|
|
715
709
|
autoselect: { default: "first" },
|
|
@@ -721,82 +715,85 @@ const vt = /* @__PURE__ */ R({
|
|
|
721
715
|
}, {
|
|
722
716
|
folderId: { required: !0 },
|
|
723
717
|
folderIdModifiers: {},
|
|
718
|
+
folder: {},
|
|
719
|
+
folderModifiers: {},
|
|
724
720
|
groupId: { required: !0 },
|
|
725
721
|
groupIdModifiers: {},
|
|
726
|
-
group: {},
|
|
722
|
+
group: { default: ne },
|
|
727
723
|
groupModifiers: {}
|
|
728
724
|
}),
|
|
729
|
-
emits: /* @__PURE__ */
|
|
725
|
+
emits: /* @__PURE__ */ V(["update:groups"], ["update:folderId", "update:folder", "update:groupId", "update:group"]),
|
|
730
726
|
setup(e, { emit: a }) {
|
|
731
|
-
const o = e, t = T(e, "folderId"), r = T(e, "
|
|
732
|
-
|
|
733
|
-
let c = o.groups?.find((i) => i.id ===
|
|
734
|
-
|
|
727
|
+
const o = e, t = T(e, "folderId"), r = T(e, "folder"), l = T(e, "groupId"), n = T(e, "group"), u = a, f = pe(o.folders ?? { root: [j] }, o.canSelectAllGroups);
|
|
728
|
+
r.value = f.get(t.value);
|
|
729
|
+
let c = o.groups?.find((i) => i.id === l.value);
|
|
730
|
+
l.value || (c = o.groups?.[0]), o.canSelectAllGroups && !c && (c = _()), o.canSelectAllGroups && !c && (c = _()), (o.autoselect === "placeholder" || !c) && (c = Le()), c ??= ne, n.value = c;
|
|
735
731
|
const x = (i) => {
|
|
736
732
|
let m;
|
|
737
|
-
o.groups && i && (m = [...o.groups, i]),
|
|
733
|
+
o.groups && i && (m = [...o.groups, i]), u("update:groups", m);
|
|
738
734
|
};
|
|
739
|
-
return (i, m) => (h(), A("div",
|
|
740
|
-
e.showFolders ? (h(), C(
|
|
735
|
+
return (i, m) => (h(), A("div", xt, [
|
|
736
|
+
e.showFolders ? (h(), C(mt, {
|
|
741
737
|
key: 0,
|
|
742
738
|
folderId: t.value,
|
|
743
739
|
"onUpdate:folderId": m[0] || (m[0] = (d) => t.value = d),
|
|
744
|
-
folder:
|
|
745
|
-
"onUpdate:folder": m[1] || (m[1] = (d) =>
|
|
740
|
+
folder: r.value,
|
|
741
|
+
"onUpdate:folder": m[1] || (m[1] = (d) => r.value = d),
|
|
746
742
|
projectId: e.projectId,
|
|
747
743
|
folders: e.folders,
|
|
748
744
|
canSelectAll: e.canSelectAllGroups,
|
|
749
745
|
addChanger: e.addChanger,
|
|
750
746
|
addIcon: e.addIcon,
|
|
751
747
|
client: e.client
|
|
752
|
-
}, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client"])) :
|
|
753
|
-
e.showGroups ? (h(), C(
|
|
748
|
+
}, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client"])) : O("", !0),
|
|
749
|
+
e.showGroups ? (h(), C(St, {
|
|
754
750
|
key: 1,
|
|
755
|
-
groupId:
|
|
756
|
-
"onUpdate:groupId": m[2] || (m[2] = (d) =>
|
|
757
|
-
group:
|
|
758
|
-
"onUpdate:group": m[3] || (m[3] = (d) =>
|
|
751
|
+
groupId: l.value,
|
|
752
|
+
"onUpdate:groupId": m[2] || (m[2] = (d) => l.value = d),
|
|
753
|
+
group: n.value,
|
|
754
|
+
"onUpdate:group": m[3] || (m[3] = (d) => n.value = d),
|
|
759
755
|
projectId: e.projectId,
|
|
760
|
-
folder:
|
|
756
|
+
folder: r.value,
|
|
761
757
|
groups: e.groups,
|
|
762
758
|
on: e.on,
|
|
763
759
|
canAdd: e.canAddGroup,
|
|
764
760
|
canSelectAll: e.canSelectAllGroups,
|
|
765
761
|
autoselect: e.autoselect,
|
|
766
762
|
addChanger: e.addChanger,
|
|
763
|
+
showPath: e.showFolders && !!e.folders?.[0],
|
|
767
764
|
addIcon: e.addIcon,
|
|
768
765
|
client: e.client,
|
|
769
766
|
onAddGroup: x
|
|
770
|
-
}, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "addIcon", "client"])) :
|
|
767
|
+
}, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "showPath", "addIcon", "client"])) : O("", !0)
|
|
771
768
|
]));
|
|
772
769
|
}
|
|
773
|
-
}), Be = (e) => "-" + e, H = (e) => e[0] === "-" ? e.substring(1) : e,
|
|
770
|
+
}), Be = (e) => "-" + e, H = (e) => e[0] === "-" ? e.substring(1) : e, ie = (e, a) => {
|
|
774
771
|
e = H(e);
|
|
775
772
|
const o = a.find((t) => t.id === e);
|
|
776
773
|
if (o)
|
|
777
774
|
return o;
|
|
778
775
|
}, qt = (e, a, o) => {
|
|
779
776
|
a || (a = { id: e.id }), a.id = e.id, a.pos ??= "3", a.notch ??= !0, a.posBy ??= "fixed";
|
|
780
|
-
const t =
|
|
777
|
+
const t = Xe.genElPopupOpener("div", a);
|
|
781
778
|
return t.classList.add("top-tagSelector"), e.useTopButton && t.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || t.classList.add("top-tagSelector-custom"), 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 = (r) => {
|
|
782
779
|
r.preventDefault(), r.stopPropagation(), t.onclick = null;
|
|
783
|
-
const l =
|
|
780
|
+
const l = K(e.modelValue), n = {
|
|
784
781
|
model: l,
|
|
785
782
|
mode: e.mode,
|
|
786
783
|
targetId: e.targetId,
|
|
787
784
|
filters: e.filters,
|
|
788
785
|
payload: e.payload
|
|
789
786
|
};
|
|
790
|
-
|
|
787
|
+
W(t, "topTagSelectorTarget", n), delete t.dataset.topPopupDisabled, he(e.modelValue) || E(l, () => {
|
|
791
788
|
e.modelValue = l.value, te(t, e, o);
|
|
792
789
|
}), t.click();
|
|
793
|
-
}, he(e.modelValue) ?
|
|
790
|
+
}, he(e.modelValue) ? E(e.modelValue, () => te(t, e, o)) : W(t, "topTagSelectorRender", (r) => {
|
|
794
791
|
e.modelValue = r;
|
|
795
|
-
const l =
|
|
792
|
+
const l = W(t, "topTagSelectorTarget");
|
|
796
793
|
l && (l.model.value = r), te(t, e, o);
|
|
797
794
|
}), te(t, e, o), t;
|
|
798
|
-
},
|
|
799
|
-
|
|
795
|
+
}, Ft = (e, a) => {
|
|
796
|
+
W(e, "topTagSelectorRender")?.(a);
|
|
800
797
|
}, te = (e, a, o) => {
|
|
801
798
|
const t = v(a.modelValue);
|
|
802
799
|
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) {
|
|
@@ -815,8 +812,8 @@ const vt = /* @__PURE__ */ R({
|
|
|
815
812
|
t.forEach((r) => {
|
|
816
813
|
const l = Te({
|
|
817
814
|
id: H(r),
|
|
818
|
-
colorId:
|
|
819
|
-
name:
|
|
815
|
+
colorId: ie(r, a.tags)?.color_id ?? "",
|
|
816
|
+
name: ie(r, a.tags)?.name ?? "",
|
|
820
817
|
state: H(r) === r ? "selected" : "excluded"
|
|
821
818
|
});
|
|
822
819
|
e.append(l);
|
|
@@ -824,7 +821,7 @@ const vt = /* @__PURE__ */ R({
|
|
|
824
821
|
}, Te = (e) => {
|
|
825
822
|
const a = document.createElement("div");
|
|
826
823
|
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;
|
|
827
|
-
},
|
|
824
|
+
}, kt = [
|
|
828
825
|
{
|
|
829
826
|
id: "1",
|
|
830
827
|
name: "Without Tag",
|
|
@@ -875,7 +872,7 @@ const vt = /* @__PURE__ */ R({
|
|
|
875
872
|
name: "Turquoise",
|
|
876
873
|
color_id: "10"
|
|
877
874
|
}
|
|
878
|
-
],
|
|
875
|
+
], Ct = ["data-tag_id", "data-tag_color_id", "title"], fe = /* @__PURE__ */ R({
|
|
879
876
|
__name: "tagIcon",
|
|
880
877
|
props: {
|
|
881
878
|
id: {},
|
|
@@ -893,11 +890,11 @@ const vt = /* @__PURE__ */ R({
|
|
|
893
890
|
"data-tag_id": e.id,
|
|
894
891
|
"data-tag_color_id": e.colorId,
|
|
895
892
|
title: e.name
|
|
896
|
-
}, null, 10,
|
|
893
|
+
}, null, 10, Ct));
|
|
897
894
|
}
|
|
898
|
-
}),
|
|
895
|
+
}), Bt = ["contenteditable", "onKeydown"], Ae = /* @__PURE__ */ R({
|
|
899
896
|
__name: "tagPopupListItem",
|
|
900
|
-
props: /* @__PURE__ */
|
|
897
|
+
props: /* @__PURE__ */ V({
|
|
901
898
|
editable: { type: Boolean },
|
|
902
899
|
disabled: { type: Boolean },
|
|
903
900
|
canExclude: { type: Boolean },
|
|
@@ -911,13 +908,13 @@ const vt = /* @__PURE__ */ R({
|
|
|
911
908
|
},
|
|
912
909
|
nameModifiers: {}
|
|
913
910
|
}),
|
|
914
|
-
emits: /* @__PURE__ */
|
|
911
|
+
emits: /* @__PURE__ */ V(["update:name", "unselect", "exclude", "select"], ["update:name"]),
|
|
915
912
|
setup(e, { emit: a }) {
|
|
916
|
-
const o = e, t = a, r = T(e, "name"), l =
|
|
913
|
+
const o = e, t = a, r = T(e, "name"), l = K(null), n = M(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
917
914
|
contenteditable: u.value,
|
|
918
915
|
onpaste: (m) => m.preventDefault()
|
|
919
|
-
} : {}), u =
|
|
920
|
-
u.value = !0, await
|
|
916
|
+
} : {}), u = K(!1), f = async () => {
|
|
917
|
+
u.value = !0, await Re(), l.value?.focus();
|
|
921
918
|
}, c = () => {
|
|
922
919
|
const m = l.value?.innerText;
|
|
923
920
|
if (!m) return x();
|
|
@@ -941,7 +938,7 @@ const vt = /* @__PURE__ */ R({
|
|
|
941
938
|
onClick: U(i, ["stop"])
|
|
942
939
|
}, {
|
|
943
940
|
default: B(() => [
|
|
944
|
-
|
|
941
|
+
P(fe, {
|
|
945
942
|
id: e.id,
|
|
946
943
|
name: r.value,
|
|
947
944
|
colorId: e.colorId,
|
|
@@ -957,7 +954,7 @@ const vt = /* @__PURE__ */ R({
|
|
|
957
954
|
Ie(U(c, ["stop"]), ["enter"]),
|
|
958
955
|
Ie(U(x, ["stop"]), ["esc"])
|
|
959
956
|
]
|
|
960
|
-
}), b(r.value), 17,
|
|
957
|
+
}), b(r.value), 17, Bt),
|
|
961
958
|
e.editable ? (h(), A(Y, { key: 0 }, [
|
|
962
959
|
u.value ? (h(), A("span", {
|
|
963
960
|
key: 1,
|
|
@@ -970,15 +967,15 @@ const vt = /* @__PURE__ */ R({
|
|
|
970
967
|
class: "top-tagSelector_edit",
|
|
971
968
|
onClick: f
|
|
972
969
|
}))
|
|
973
|
-
], 64)) :
|
|
970
|
+
], 64)) : O("", !0)
|
|
974
971
|
]),
|
|
975
972
|
_: 1
|
|
976
973
|
}, 8, ["class"]));
|
|
977
974
|
}
|
|
978
|
-
}),
|
|
975
|
+
}), Tt = { key: 1 }, At = /* @__PURE__ */ R({
|
|
979
976
|
inheritAttrs: !1,
|
|
980
977
|
__name: "popupOpener",
|
|
981
|
-
props: /* @__PURE__ */
|
|
978
|
+
props: /* @__PURE__ */ V({
|
|
982
979
|
modelValue: {},
|
|
983
980
|
id: {},
|
|
984
981
|
tags: {},
|
|
@@ -1007,7 +1004,7 @@ const vt = /* @__PURE__ */ R({
|
|
|
1007
1004
|
const f = Pe("top-data");
|
|
1008
1005
|
return h(), C(Je, { id: e.id }, {
|
|
1009
1006
|
default: B(() => [
|
|
1010
|
-
|
|
1007
|
+
Ne((h(), C(De(v(t)), Ve({
|
|
1011
1008
|
class: {
|
|
1012
1009
|
"top-tagSelector": !0,
|
|
1013
1010
|
"top-tagSelector-useTopButton": a.useTopButton,
|
|
@@ -1029,13 +1026,13 @@ const vt = /* @__PURE__ */ R({
|
|
|
1029
1026
|
colorId: "",
|
|
1030
1027
|
name: n.$i18n.Common.All_tags ?? "",
|
|
1031
1028
|
state: ""
|
|
1032
|
-
}, null, 8, ["name"])) :
|
|
1033
|
-
e.mode === "setter" && e.filters ? (h(), A("div",
|
|
1029
|
+
}, null, 8, ["name"])) : O("", !0),
|
|
1030
|
+
e.mode === "setter" && e.filters ? (h(), A("div", Tt, [
|
|
1034
1031
|
qe(n.$slots, "default")
|
|
1035
1032
|
])) : (h(!0), A(Y, { key: 2 }, me(o.value, (c) => (h(), C(fe, {
|
|
1036
1033
|
id: v(H)(c),
|
|
1037
|
-
colorId: v(
|
|
1038
|
-
name: v(
|
|
1034
|
+
colorId: v(ie)(c, e.tags)?.color_id ?? "",
|
|
1035
|
+
name: v(ie)(c, e.tags)?.name ?? "",
|
|
1039
1036
|
state: v(H)(c) === c ? "selected" : "excluded"
|
|
1040
1037
|
}, null, 8, ["id", "colorId", "name", "state"]))), 256))
|
|
1041
1038
|
]),
|
|
@@ -1048,9 +1045,9 @@ const vt = /* @__PURE__ */ R({
|
|
|
1048
1045
|
}, 8, ["id"]);
|
|
1049
1046
|
};
|
|
1050
1047
|
}
|
|
1051
|
-
}),
|
|
1048
|
+
}), Ut = /* @__PURE__ */ R({
|
|
1052
1049
|
__name: "tagSelector",
|
|
1053
|
-
props: /* @__PURE__ */
|
|
1050
|
+
props: /* @__PURE__ */ V({
|
|
1054
1051
|
modelValue: {},
|
|
1055
1052
|
tags: {},
|
|
1056
1053
|
tagsEditable: { type: Boolean },
|
|
@@ -1068,31 +1065,31 @@ const vt = /* @__PURE__ */ R({
|
|
|
1068
1065
|
},
|
|
1069
1066
|
modelModifiers: {},
|
|
1070
1067
|
tags: {
|
|
1071
|
-
default: be(
|
|
1068
|
+
default: be(kt)
|
|
1072
1069
|
},
|
|
1073
1070
|
tagsModifiers: {}
|
|
1074
1071
|
}),
|
|
1075
|
-
emits: /* @__PURE__ */
|
|
1072
|
+
emits: /* @__PURE__ */ V(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
|
|
1076
1073
|
setup(e, { emit: a }) {
|
|
1077
1074
|
const o = w(), t = e, r = T(e, "modelValue"), l = T(e, "tags"), n = a, u = ze((p, I) => {
|
|
1078
1075
|
n(p, I);
|
|
1079
1076
|
}, t.emitDelay);
|
|
1080
1077
|
t.singleMode && !r.value.length && (r.value = [l.value[0].id]);
|
|
1081
|
-
const f = t.id ?? "top-popup-id-" + Math.random(), c =
|
|
1078
|
+
const f = t.id ?? "top-popup-id-" + Math.random(), c = K("add"), x = () => {
|
|
1082
1079
|
const p = " " + o.Common.Tags?.toLowerCase(), I = /* @__PURE__ */ new Map();
|
|
1083
1080
|
return I.set("add", { value: "add", title: o.Common.Add + p }), I.set("replace", { value: "replace", title: o.Common.Replace + p }), I.set("delete", { value: "delete", title: o.Common.Delete + p }), I;
|
|
1084
1081
|
};
|
|
1085
|
-
let i =
|
|
1082
|
+
let i = Fe({
|
|
1086
1083
|
model: r,
|
|
1087
1084
|
mode: "filter",
|
|
1088
1085
|
targetId: void 0,
|
|
1089
1086
|
filters: void 0,
|
|
1090
1087
|
payload: void 0
|
|
1091
1088
|
});
|
|
1092
|
-
|
|
1089
|
+
E(r, () => {
|
|
1093
1090
|
u("selector", r.value);
|
|
1094
1091
|
});
|
|
1095
|
-
const m =
|
|
1092
|
+
const m = M(() => {
|
|
1096
1093
|
if (i.value.mode === "setter" && t.maxTagsForSetter && !i.value.filters)
|
|
1097
1094
|
return i.value.model.value.length >= t.maxTagsForSetter;
|
|
1098
1095
|
}), d = (p) => {
|
|
@@ -1103,17 +1100,17 @@ const vt = /* @__PURE__ */ R({
|
|
|
1103
1100
|
return p === "all" && !i.value.model.value.length ? "selected" : "";
|
|
1104
1101
|
}, s = (p, I) => {
|
|
1105
1102
|
const S = Be(p);
|
|
1106
|
-
let k = i.value.model.value.filter((
|
|
1107
|
-
I === "select" && k.push(p), I === "exclude" && k.push(S), i.value.mode === "setter" && i.value.targetId !== void 0 && t.requiredForSetter && (k.length || k.push("1"), k.length === 2 && i.value.model.value.length === 1 && i.value.model.value[0] === "1" && (k = k.filter((
|
|
1103
|
+
let k = i.value.model.value.filter((G) => G !== p && G !== S);
|
|
1104
|
+
I === "select" && k.push(p), I === "exclude" && k.push(S), i.value.mode === "setter" && i.value.targetId !== void 0 && t.requiredForSetter && (k.length || k.push("1"), k.length === 2 && i.value.model.value.length === 1 && i.value.model.value[0] === "1" && (k = k.filter((G) => G !== "1"))), t.singleMode && !i.value.filters && (k.length || (k = i.value.model.value), k.length > 1 && (k = [k[k.length - 1]])), k.sort((G, ee) => {
|
|
1108
1105
|
if (!t.tags) return 0;
|
|
1109
|
-
const D = t.tags.findIndex((
|
|
1110
|
-
return D -
|
|
1106
|
+
const D = t.tags.findIndex((F) => F.id === G), q = t.tags.findIndex((F) => F.id === ee);
|
|
1107
|
+
return D - q;
|
|
1111
1108
|
}), i.value.model.value = k, i.value.mode === "setter" && i.value.targetId !== void 0 && u("setter", {
|
|
1112
1109
|
tagsIds: k,
|
|
1113
1110
|
targetId: i.value.targetId,
|
|
1114
1111
|
payload: i.value.payload
|
|
1115
1112
|
});
|
|
1116
|
-
}, g =
|
|
1113
|
+
}, g = M(() => {
|
|
1117
1114
|
let p = "top-tagSelector_popup";
|
|
1118
1115
|
return i.value.mode === "filter" && (p += " top-tagSelector_popup-filter"), i.value.mode === "setter" && (p += " top-tagSelector_popup-setter"), p;
|
|
1119
1116
|
}), Z = () => {
|
|
@@ -1125,13 +1122,13 @@ const vt = /* @__PURE__ */ R({
|
|
|
1125
1122
|
name: p,
|
|
1126
1123
|
color_id: String((I - 1) % 10 + 1)
|
|
1127
1124
|
}), n("tagsChanged", l.value);
|
|
1128
|
-
},
|
|
1129
|
-
if (i.value =
|
|
1130
|
-
if (i.value.filters && (c.value = "add", i.value.model.value = []), !
|
|
1125
|
+
}, N = (p) => {
|
|
1126
|
+
if (i.value = W(p.elPopupOpener, "topTagSelectorTarget"), !i.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1127
|
+
if (i.value.filters && (c.value = "add", i.value.model.value = []), !z.$?.ui.sortable) {
|
|
1131
1128
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
1132
1129
|
return;
|
|
1133
1130
|
}
|
|
1134
|
-
!
|
|
1131
|
+
!z.state.isMobile && !z.state.isMobileUA && l.value && $(p.elPopup).sortable({
|
|
1135
1132
|
items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
|
|
1136
1133
|
/**
|
|
1137
1134
|
* @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
|
|
@@ -1140,22 +1137,22 @@ const vt = /* @__PURE__ */ R({
|
|
|
1140
1137
|
distance: 10,
|
|
1141
1138
|
stop: function(I, S) {
|
|
1142
1139
|
if (!l.value) return;
|
|
1143
|
-
const k = $(S.item).parent().find("[data-tag_id]"),
|
|
1140
|
+
const k = $(S.item).parent().find("[data-tag_id]"), G = [];
|
|
1144
1141
|
k.each((ee, D) => {
|
|
1145
1142
|
if (!l.value) return;
|
|
1146
|
-
const
|
|
1147
|
-
|
|
1143
|
+
const q = $(D).attr("data-tag_id");
|
|
1144
|
+
G.push(q);
|
|
1148
1145
|
}), l.value.sort((ee, D) => {
|
|
1149
|
-
const
|
|
1150
|
-
return
|
|
1146
|
+
const q = G.findIndex((de) => de === ee.id), F = G.findIndex((de) => de === D.id);
|
|
1147
|
+
return q - F;
|
|
1151
1148
|
}), u("tagsChanged", l.value);
|
|
1152
1149
|
}
|
|
1153
1150
|
});
|
|
1154
|
-
},
|
|
1155
|
-
|
|
1151
|
+
}, je = (p) => {
|
|
1152
|
+
z.$?.ui.sortable && $(p.elPopup).data("ui-sortable") && $(p.elPopup).sortable("destroy");
|
|
1156
1153
|
};
|
|
1157
1154
|
return (p, I) => (h(), A(Y, null, [
|
|
1158
|
-
|
|
1155
|
+
P(At, {
|
|
1159
1156
|
modelValue: r.value,
|
|
1160
1157
|
"onUpdate:modelValue": I[0] || (I[0] = (S) => r.value = S),
|
|
1161
1158
|
id: v(f),
|
|
@@ -1164,13 +1161,13 @@ const vt = /* @__PURE__ */ R({
|
|
|
1164
1161
|
mode: "filter",
|
|
1165
1162
|
useTopButton: e.useTopButton
|
|
1166
1163
|
}, null, 8, ["modelValue", "id", "tags", "styling", "useTopButton"]),
|
|
1167
|
-
|
|
1164
|
+
P(we, {
|
|
1168
1165
|
id: v(f),
|
|
1169
1166
|
class: X(g.value),
|
|
1170
|
-
onOpen: I[4] || (I[4] = (S) =>
|
|
1171
|
-
onClose: I[5] || (I[5] = (S) =>
|
|
1167
|
+
onOpen: I[4] || (I[4] = (S) => N(S)),
|
|
1168
|
+
onClose: I[5] || (I[5] = (S) => je(S)),
|
|
1172
1169
|
"transition-duration": 50
|
|
1173
|
-
},
|
|
1170
|
+
}, Ue({
|
|
1174
1171
|
contentList: B(() => [
|
|
1175
1172
|
v(i).mode === "filter" && !e.singleMode ? (h(), C(Ae, {
|
|
1176
1173
|
key: 0,
|
|
@@ -1179,7 +1176,7 @@ const vt = /* @__PURE__ */ R({
|
|
|
1179
1176
|
name: p.$i18n.Common.All_tags ?? "",
|
|
1180
1177
|
state: v(i).model.value.length ? "" : "selected",
|
|
1181
1178
|
onSelect: I[3] || (I[3] = (S) => v(i).model.value = [])
|
|
1182
|
-
}, null, 8, ["name", "state"])) :
|
|
1179
|
+
}, null, 8, ["name", "state"])) : O("", !0),
|
|
1183
1180
|
(h(!0), A(Y, null, me(l.value, (S) => (h(), C(Ae, {
|
|
1184
1181
|
key: S.id,
|
|
1185
1182
|
id: S.id,
|
|
@@ -1202,17 +1199,17 @@ const vt = /* @__PURE__ */ R({
|
|
|
1202
1199
|
onClick: U(Z, ["stop"])
|
|
1203
1200
|
}, {
|
|
1204
1201
|
default: B(() => [
|
|
1205
|
-
|
|
1202
|
+
J(b(p.$i18n.Common.Add), 1)
|
|
1206
1203
|
]),
|
|
1207
1204
|
_: 1
|
|
1208
|
-
})) :
|
|
1205
|
+
})) : O("", !0)
|
|
1209
1206
|
]),
|
|
1210
1207
|
_: 2
|
|
1211
1208
|
}, [
|
|
1212
1209
|
v(i).mode === "setter" && v(i).filters ? {
|
|
1213
1210
|
name: "header",
|
|
1214
1211
|
fn: B(() => [
|
|
1215
|
-
|
|
1212
|
+
P(ce, {
|
|
1216
1213
|
modelValue: c.value,
|
|
1217
1214
|
"onUpdate:modelValue": I[1] || (I[1] = (S) => c.value = S),
|
|
1218
1215
|
options: x()
|
|
@@ -1223,13 +1220,13 @@ const vt = /* @__PURE__ */ R({
|
|
|
1223
1220
|
v(i).mode === "setter" && v(i).filters ? {
|
|
1224
1221
|
name: "footer",
|
|
1225
1222
|
fn: B(() => [
|
|
1226
|
-
|
|
1223
|
+
P(Q, { color: "theme" }, {
|
|
1227
1224
|
default: B(() => [
|
|
1228
|
-
|
|
1225
|
+
J(b(p.$i18n.Common.Cancel), 1)
|
|
1229
1226
|
]),
|
|
1230
1227
|
_: 1
|
|
1231
1228
|
}),
|
|
1232
|
-
|
|
1229
|
+
P(Q, {
|
|
1233
1230
|
onClick: I[2] || (I[2] = (S) => v(u)("setter", {
|
|
1234
1231
|
tagsIds: v(i).model.value,
|
|
1235
1232
|
filters: v(i).filters,
|
|
@@ -1238,7 +1235,7 @@ const vt = /* @__PURE__ */ R({
|
|
|
1238
1235
|
}))
|
|
1239
1236
|
}, {
|
|
1240
1237
|
default: B(() => [
|
|
1241
|
-
|
|
1238
|
+
J(b(c.value === "add" ? p.$i18n.Common.Add : "") + " " + b(c.value === "replace" ? p.$i18n.Common.Replace : "") + " " + b(c.value === "delete" ? p.$i18n.Common.Delete : ""), 1)
|
|
1242
1239
|
]),
|
|
1243
1240
|
_: 1
|
|
1244
1241
|
})
|
|
@@ -1250,17 +1247,17 @@ const vt = /* @__PURE__ */ R({
|
|
|
1250
1247
|
}
|
|
1251
1248
|
});
|
|
1252
1249
|
export {
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1250
|
+
Rt as TopCompetitorSelector,
|
|
1251
|
+
Dt as TopGroupSelector,
|
|
1252
|
+
Nt as TopRegionSelector,
|
|
1253
|
+
Ut as TopTagSelector,
|
|
1254
|
+
At as TopTagSelectorPopupOpener,
|
|
1258
1255
|
fe as TopTagSelectorTagIcon,
|
|
1259
|
-
|
|
1260
|
-
|
|
1256
|
+
it as dialogRegionSelector,
|
|
1257
|
+
rt as findRegion,
|
|
1261
1258
|
qt as genElTopTagSelectorPopupOpener,
|
|
1262
1259
|
Ke as genSearcherByKey,
|
|
1263
|
-
|
|
1260
|
+
Ft as renderElTopTagSelectorPopupOpener,
|
|
1264
1261
|
Pt as useItemsFromCompetitors
|
|
1265
1262
|
};
|
|
1266
1263
|
//# sourceMappingURL=project.js.map
|