@topvisor/ui 1.5.10 → 1.6.1-searcherKey.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/{app-C6mHPpb7.es.amd.js → app-qGtdp_Vh.es.amd.js} +2 -2
- package/.chunks/{app-C6mHPpb7.es.amd.js.map → app-qGtdp_Vh.es.amd.js.map} +1 -1
- package/.chunks/{app-C6mHPpb7.es.js → app-qGtdp_Vh.es.js} +5 -5
- package/.chunks/{app-C6mHPpb7.es.js.map → app-qGtdp_Vh.es.js.map} +1 -1
- package/.chunks/{datepicker-DtdAe-rf.es.amd.js → datepicker-MlbIM78m.es.amd.js} +2 -2
- package/.chunks/{datepicker-DtdAe-rf.es.amd.js.map → datepicker-MlbIM78m.es.amd.js.map} +1 -1
- package/.chunks/{datepicker-DtdAe-rf.es.js → datepicker-MlbIM78m.es.js} +2 -2
- package/.chunks/{datepicker-DtdAe-rf.es.js.map → datepicker-MlbIM78m.es.js.map} +1 -1
- package/.chunks/{dialog-Cs7KfRxQ.es.amd.js → dialog-C_1nmPXN.es.amd.js} +2 -2
- package/.chunks/{dialog-Cs7KfRxQ.es.amd.js.map → dialog-C_1nmPXN.es.amd.js.map} +1 -1
- package/.chunks/{dialog-Cs7KfRxQ.es.js → dialog-C_1nmPXN.es.js} +3 -3
- package/.chunks/{dialog-Cs7KfRxQ.es.js.map → dialog-C_1nmPXN.es.js.map} +1 -1
- package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.amd.js +2 -0
- package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.amd.js.map +1 -0
- package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.js +165 -0
- package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.js.map +1 -0
- package/.chunks/{forms-DrY7Q_VD.es.amd.js → forms-dosApNxi.es.amd.js} +2 -2
- package/.chunks/{forms-DrY7Q_VD.es.amd.js.map → forms-dosApNxi.es.amd.js.map} +1 -1
- package/.chunks/{forms-DrY7Q_VD.es.js → forms-dosApNxi.es.js} +5 -5
- package/.chunks/{forms-DrY7Q_VD.es.js.map → forms-dosApNxi.es.js.map} +1 -1
- package/.chunks/{formsExt-BgtDJL34.es.amd.js → formsExt-D7XsRleI.es.amd.js} +2 -2
- package/.chunks/{formsExt-BgtDJL34.es.amd.js.map → formsExt-D7XsRleI.es.amd.js.map} +1 -1
- package/.chunks/{formsExt-BgtDJL34.es.js → formsExt-D7XsRleI.es.js} +3 -3
- package/.chunks/{formsExt-BgtDJL34.es.js.map → formsExt-D7XsRleI.es.js.map} +1 -1
- package/.chunks/{notice-qj8gI3Vn.es.amd.js → notice-8nwvAJQm.es.amd.js} +2 -2
- package/.chunks/{notice-qj8gI3Vn.es.amd.js.map → notice-8nwvAJQm.es.amd.js.map} +1 -1
- package/.chunks/{notice-qj8gI3Vn.es.js → notice-8nwvAJQm.es.js} +2 -2
- package/.chunks/{notice-qj8gI3Vn.es.js.map → notice-8nwvAJQm.es.js.map} +1 -1
- package/.chunks/{popup-CWtDQcwo.es.amd.js → popup-Bn5Wm8WI.es.amd.js} +2 -2
- package/.chunks/{popup-CWtDQcwo.es.amd.js.map → popup-Bn5Wm8WI.es.amd.js.map} +1 -1
- package/.chunks/{popup-CWtDQcwo.es.js → popup-Bn5Wm8WI.es.js} +3 -3
- package/.chunks/{popup-CWtDQcwo.es.js.map → popup-Bn5Wm8WI.es.js.map} +1 -1
- package/.chunks/{popup-DQDuBLfC.es.amd.js → popup-cAqd6Dj3.es.amd.js} +2 -2
- package/.chunks/{popup-DQDuBLfC.es.amd.js.map → popup-cAqd6Dj3.es.amd.js.map} +1 -1
- package/.chunks/{popup-DQDuBLfC.es.js → popup-cAqd6Dj3.es.js} +3 -3
- package/.chunks/{popup-DQDuBLfC.es.js.map → popup-cAqd6Dj3.es.js.map} +1 -1
- package/.chunks/utils-D46Z7je_.es.amd.js +3 -0
- package/.chunks/utils-D46Z7je_.es.amd.js.map +1 -0
- package/.chunks/{utils-Dltd8Oce.es.js → utils-D46Z7je_.es.js} +5 -5
- package/.chunks/utils-D46Z7je_.es.js.map +1 -0
- package/.chunks/{utils-D9A8uWOP.es.amd.js → utils-mBJcBhkk.es.amd.js} +2 -2
- package/.chunks/{utils-D9A8uWOP.es.amd.js.map → utils-mBJcBhkk.es.amd.js.map} +1 -1
- package/.chunks/{utils-D9A8uWOP.es.js → utils-mBJcBhkk.es.js} +2 -2
- package/.chunks/{utils-D9A8uWOP.es.js.map → utils-mBJcBhkk.es.js.map} +1 -1
- package/.chunks/worker-BfCrg4RI.es.amd.js +2 -0
- package/.chunks/worker-BfCrg4RI.es.amd.js.map +1 -0
- package/.chunks/{worker-C6E8GqL6.es.js → worker-BfCrg4RI.es.js} +4 -4
- package/.chunks/worker-BfCrg4RI.es.js.map +1 -0
- package/assets/forms.css +1 -1
- package/autoload-css-manifest.amd.json +4 -4
- package/autoload-css-manifest.json +4 -4
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.js +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +3 -3
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.amd.js.map +1 -1
- package/dialog/dialog.js +2 -2
- package/forms/forms.amd.js +1 -1
- package/forms/forms.amd.js.map +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 +1 -1
- package/layout/layout.amd.js +1 -1
- package/layout/layout.amd.js.map +1 -1
- package/layout/layout.js +1 -1
- package/package.json +2 -2
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +470 -424
- package/project/project.js.map +1 -1
- package/schedule/schedule.amd.js +1 -1
- package/schedule/schedule.amd.js.map +1 -1
- package/schedule/schedule.js +2 -2
- package/src/components/project/projectSelector/utils.d.ts +9 -1
- package/src/components/project/regionSelector/dialog_regionSelectorRegions/types.d.ts +2 -4
- package/src/components/project/regionSelector/types.d.ts +6 -0
- package/src/core/utils/searchers.d.ts +15 -0
- package/src/core/utils/string.d.ts +5 -4
- package/src/core/utils/tests/nl2br.test.d.ts +1 -0
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +2 -2
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.amd.js.map +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.amd.js.map +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.amd.js.map +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.amd.js.map +1 -1
- package/utils/lodash.js +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/searchers.amd.js +1 -1
- package/utils/searchers.amd.js.map +1 -1
- package/utils/searchers.js +24 -7
- package/utils/searchers.js.map +1 -1
- package/utils/string.amd.js +2 -2
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +2 -9
- package/utils/string.js.map +1 -1
- package/.chunks/dialog_regionSelectorRegions-B3lesZe-.es.amd.js +0 -2
- package/.chunks/dialog_regionSelectorRegions-B3lesZe-.es.amd.js.map +0 -1
- package/.chunks/dialog_regionSelectorRegions-B3lesZe-.es.js +0 -169
- package/.chunks/dialog_regionSelectorRegions-B3lesZe-.es.js.map +0 -1
- package/.chunks/utils-Dltd8Oce.es.amd.js +0 -2
- package/.chunks/utils-Dltd8Oce.es.amd.js.map +0 -1
- package/.chunks/utils-Dltd8Oce.es.js.map +0 -1
- package/.chunks/worker-C6E8GqL6.es.amd.js +0 -2
- package/.chunks/worker-C6E8GqL6.es.amd.js.map +0 -1
- package/.chunks/worker-C6E8GqL6.es.js.map +0 -1
package/project/project.js
CHANGED
|
@@ -6,22 +6,22 @@
|
|
|
6
6
|
/* end import css */
|
|
7
7
|
|
|
8
8
|
import { a as e, i as t } from "../.chunks/api-nVBtzTDk.es.js";
|
|
9
|
-
import { E as n, O as r, P as i, h as a, n as o } from "../.chunks/forms-
|
|
9
|
+
import { E as n, O as r, P as i, h as a, n as o } from "../.chunks/forms-dosApNxi.es.js";
|
|
10
10
|
import { storage as s } from "../utils/dom.js";
|
|
11
|
-
import { t as c } from "../.chunks/worker-
|
|
12
|
-
import "../.chunks/app-
|
|
13
|
-
import { t as l } from "../.chunks/utils-
|
|
11
|
+
import { t as c } from "../.chunks/worker-BfCrg4RI.es.js";
|
|
12
|
+
import "../.chunks/app-qGtdp_Vh.es.js";
|
|
13
|
+
import { t as l } from "../.chunks/utils-mBJcBhkk.es.js";
|
|
14
14
|
import { validUrl as u } from "../utils/check.js";
|
|
15
15
|
import { ellipsis as d } from "../utils/string.js";
|
|
16
|
-
import {
|
|
17
|
-
import { invertKeyboardLayout as
|
|
18
|
-
import { c as
|
|
19
|
-
import { c as b, d as x, f as
|
|
20
|
-
import { Fragment as
|
|
16
|
+
import { genRegionLabelData as f, getSearcherGIcon as p } from "../utils/searchers.js";
|
|
17
|
+
import { invertKeyboardLayout as m } from "../utils/keyboard.js";
|
|
18
|
+
import { c as h, n as g, o as _, r as v, s as y } from "../.chunks/popup-cAqd6Dj3.es.js";
|
|
19
|
+
import { c as b, d as x, f as S, p as C } from "../.chunks/formsExt-D7XsRleI.es.js";
|
|
20
|
+
import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createSlots as ee, createTextVNode as A, createVNode as j, defineComponent as M, isRef as te, mergeModels as N, mergeProps as ne, nextTick as re, normalizeClass as P, onMounted as ie, openBlock as F, reactive as ae, ref as I, renderList as oe, renderSlot as se, resolveComponent as ce, resolveDirective as le, resolveDynamicComponent as ue, shallowRef as de, toDisplayString as L, toValue as fe, unref as R, useId as pe, useModel as z, watch as B, withCtx as V, withDirectives as me, withKeys as he, withModifiers as H } from "vue";
|
|
21
21
|
//#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
|
|
22
|
-
var
|
|
22
|
+
var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, ve = /* @__PURE__ */ M({
|
|
23
23
|
__name: "competitorSelector",
|
|
24
|
-
props: /*@__PURE__*/
|
|
24
|
+
props: /*@__PURE__*/ N({
|
|
25
25
|
modelValue: {},
|
|
26
26
|
items: {},
|
|
27
27
|
showSelectAllItem: {
|
|
@@ -35,7 +35,7 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
35
35
|
}),
|
|
36
36
|
emits: ["update:modelValue"],
|
|
37
37
|
setup(e) {
|
|
38
|
-
let t = e, i =
|
|
38
|
+
let t = e, i = z(e, "modelValue"), o = T(() => {
|
|
39
39
|
if (t.showSelectAllItem) return {
|
|
40
40
|
icon: t.selectAllItemIcon,
|
|
41
41
|
title: n().Common.Select_all,
|
|
@@ -43,23 +43,23 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
43
43
|
content: ""
|
|
44
44
|
};
|
|
45
45
|
});
|
|
46
|
-
return (t, n) => (
|
|
47
|
-
opener:
|
|
46
|
+
return (t, n) => (F(), O("div", ge, [R(r).state.isMobile ? (F(), E(y, { key: 0 }, {
|
|
47
|
+
opener: V(() => [j(a, {
|
|
48
48
|
class: "top-competitorSelector_opener",
|
|
49
49
|
color: "theme",
|
|
50
50
|
icon: "",
|
|
51
51
|
icon2: ""
|
|
52
52
|
}, {
|
|
53
|
-
default:
|
|
53
|
+
default: V(() => [A(L(e.items.find((e) => e.value === i.value?.[0])?.content), 1)]),
|
|
54
54
|
_: 1
|
|
55
55
|
})]),
|
|
56
|
-
contentList:
|
|
57
|
-
class:
|
|
56
|
+
contentList: V(() => [(F(!0), O(w, null, oe(e.items, (e) => (F(), E(_, {
|
|
57
|
+
class: P({ "top-active": i.value?.includes(e.value) }),
|
|
58
58
|
"data-top-icon": e.icon,
|
|
59
59
|
title: e.title,
|
|
60
60
|
onClick: () => i.value = [e.value]
|
|
61
61
|
}, {
|
|
62
|
-
default:
|
|
62
|
+
default: V(() => [k("span", _e, L(e.content), 1)]),
|
|
63
63
|
_: 2
|
|
64
64
|
}, 1032, [
|
|
65
65
|
"class",
|
|
@@ -68,7 +68,7 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
68
68
|
"onClick"
|
|
69
69
|
]))), 256))]),
|
|
70
70
|
_: 1
|
|
71
|
-
})) : (
|
|
71
|
+
})) : (F(), E(C, {
|
|
72
72
|
key: 1,
|
|
73
73
|
modelValue: i.value,
|
|
74
74
|
"onUpdate:modelValue": n[0] ||= (e) => i.value = e,
|
|
@@ -83,12 +83,12 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
83
83
|
"selectAllItem"
|
|
84
84
|
]))]));
|
|
85
85
|
}
|
|
86
|
-
}),
|
|
86
|
+
}), ye = (e, t) => T(() => fe(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
|
|
87
87
|
value: e.id,
|
|
88
88
|
title: e.url + ` [${e.id}]`,
|
|
89
|
-
icon: e.id ===
|
|
89
|
+
icon: e.id === fe(t) ? "" : "",
|
|
90
90
|
content: e.name
|
|
91
|
-
}))),
|
|
91
|
+
}))), be = {
|
|
92
92
|
0: "Yandex",
|
|
93
93
|
1: "Google",
|
|
94
94
|
4: "YouTube",
|
|
@@ -99,27 +99,27 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
99
99
|
20: "Yandex.com",
|
|
100
100
|
21: "Yandex.com.tr",
|
|
101
101
|
22: "YandexLive"
|
|
102
|
-
},
|
|
102
|
+
}, xe = {
|
|
103
103
|
alt: "",
|
|
104
104
|
key: -2,
|
|
105
105
|
name: "--",
|
|
106
106
|
index: -2
|
|
107
|
-
},
|
|
107
|
+
}, Se = {
|
|
108
108
|
key: -2,
|
|
109
109
|
name: "--",
|
|
110
|
-
regions: [
|
|
111
|
-
regionByIndex: /* @__PURE__ */ new Map([[-2,
|
|
112
|
-
},
|
|
110
|
+
regions: [xe],
|
|
111
|
+
regionByIndex: /* @__PURE__ */ new Map([[-2, xe]])
|
|
112
|
+
}, U = {
|
|
113
113
|
alt: "",
|
|
114
114
|
key: -2,
|
|
115
115
|
name: "Autoselect",
|
|
116
116
|
index: -2
|
|
117
|
-
},
|
|
117
|
+
}, Ce = {
|
|
118
118
|
key: -2,
|
|
119
119
|
name: "Autoselect",
|
|
120
|
-
regions: [
|
|
121
|
-
regionByIndex: /* @__PURE__ */ new Map([[-2,
|
|
122
|
-
},
|
|
120
|
+
regions: [U],
|
|
121
|
+
regionByIndex: /* @__PURE__ */ new Map([[-2, U]])
|
|
122
|
+
}, we = {
|
|
123
123
|
alt: "",
|
|
124
124
|
countryCode: "00",
|
|
125
125
|
depth: 1,
|
|
@@ -128,38 +128,38 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
128
128
|
index: -1,
|
|
129
129
|
lang: "ru",
|
|
130
130
|
name: "Without region"
|
|
131
|
-
},
|
|
131
|
+
}, Te = () => (U.name = n().Common.Autoselect, U), Ee = () => (Te(), Ce.name = n().Common.Autoselect, console.log(Ce), Ce), De = () => (we.name = n().Keywords.Without_region, we), Oe = [
|
|
132
132
|
4,
|
|
133
133
|
8,
|
|
134
134
|
9
|
|
135
|
-
],
|
|
136
|
-
let r =
|
|
135
|
+
], ke = (e, t, n = []) => {
|
|
136
|
+
let r = je(e, !1, n), i;
|
|
137
137
|
return r.forEach((n) => {
|
|
138
138
|
if ((t.searcher_key === void 0 || t.searcher_key == n.key) && n.regions && (n.regions.forEach((r) => {
|
|
139
139
|
if (!i && (t.key === void 0 || t.key == r.key) && (t.index === void 0 || t.index == r.index) && !(!e && (t.lang !== void 0 && t.lang != r.lang || t.device !== void 0 && t.device != r.device))) return r.searcher_key = n.key, i = r, !1;
|
|
140
140
|
}), i)) return !1;
|
|
141
141
|
}), i;
|
|
142
|
-
},
|
|
142
|
+
}, Ae = l(() => import("../.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.js")), je = (e = "", t = !1, n = []) => {
|
|
143
143
|
let r;
|
|
144
|
-
return r = e === "volume" || e === "cost_forecast" ?
|
|
145
|
-
},
|
|
144
|
+
return r = e === "volume" || e === "cost_forecast" ? Me(n) : e === "project_relevant_url" ? Ne(n) : Pe(n, !0), t && r.set(-2, Ee()), r.size || r.set(-2, Se), r;
|
|
145
|
+
}, Me = (e) => {
|
|
146
146
|
e = e.filter((e) => r.state.forceSearchersKeysForKeywordsStats.includes(e.key));
|
|
147
|
-
let t =
|
|
147
|
+
let t = Pe(e, !1);
|
|
148
148
|
return r.state.forceSearchersKeysForKeywordsStats.forEach((e) => {
|
|
149
149
|
if (t.has(e)) return;
|
|
150
150
|
let n = {
|
|
151
151
|
key: e,
|
|
152
|
-
name:
|
|
152
|
+
name: be[e],
|
|
153
153
|
regions: [],
|
|
154
154
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
155
155
|
};
|
|
156
156
|
t.set(n.key, n);
|
|
157
157
|
}), r.state.showGlobalRegionForKeywordsStats && t.forEach((e) => {
|
|
158
158
|
if (!e.regionByIndex) return;
|
|
159
|
-
let t = { ...
|
|
159
|
+
let t = { ...De() };
|
|
160
160
|
e.regionByIndex.set(t.index, t);
|
|
161
161
|
}), t;
|
|
162
|
-
},
|
|
162
|
+
}, Ne = (e) => (e = e.filter((e) => !Oe.includes(e.key)), Pe(e, !1)), Pe = (e, t) => {
|
|
163
163
|
let n = /* @__PURE__ */ new Map();
|
|
164
164
|
return e.forEach((e) => {
|
|
165
165
|
if (t && !e.enabled) return;
|
|
@@ -170,18 +170,18 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
170
170
|
r.regionByIndex.set(n.index, n);
|
|
171
171
|
}), r.regionByIndex.size, (!e.regions || r.regionByIndex.size) && n.set(r.key, r);
|
|
172
172
|
}), n;
|
|
173
|
-
},
|
|
173
|
+
}, Fe = (e, t) => {
|
|
174
174
|
let r = n();
|
|
175
175
|
return {
|
|
176
|
-
searcherKey:
|
|
177
|
-
optionBySearcherKey:
|
|
176
|
+
searcherKey: I(e.modelValueSearcherKey ?? t.value.keys().next().value ?? -2),
|
|
177
|
+
optionBySearcherKey: T(() => {
|
|
178
178
|
let n = /* @__PURE__ */ new Map();
|
|
179
179
|
if (t.value.forEach((t) => {
|
|
180
180
|
let r = {
|
|
181
181
|
value: t.key,
|
|
182
182
|
title: t.name
|
|
183
183
|
};
|
|
184
|
-
e.addSearcherIcon && (r.icon =
|
|
184
|
+
e.addSearcherIcon && (r.icon = p(t.key)), n.set(t.key, r);
|
|
185
185
|
}), e.addCompare && !n.has(-2)) {
|
|
186
186
|
let e = {
|
|
187
187
|
value: "",
|
|
@@ -198,36 +198,33 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
198
198
|
return n;
|
|
199
199
|
})
|
|
200
200
|
};
|
|
201
|
-
},
|
|
202
|
-
let r = n(), i =
|
|
201
|
+
}, Ie = (e, t) => {
|
|
202
|
+
let r = n(), i = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), a = I(-2);
|
|
203
203
|
e.modelValue.length === 1 && (a.value = e.modelValue[0]), a.value === -2 && (a.value = i.value ? t.value?.regionByIndex.values().next().value?.key ?? -2 : t.value?.regionByIndex.keys().next().value ?? -2);
|
|
204
|
-
let o =
|
|
204
|
+
let o = T(() => {
|
|
205
205
|
let e = /* @__PURE__ */ new Map();
|
|
206
|
-
return t.value.regionByIndex?.forEach((
|
|
207
|
-
let a = n.name;
|
|
206
|
+
return t.value.regionByIndex?.forEach((t) => {
|
|
208
207
|
if (i.value) {
|
|
209
|
-
let
|
|
210
|
-
value:
|
|
211
|
-
title:
|
|
208
|
+
let n = {
|
|
209
|
+
value: t.key,
|
|
210
|
+
title: t.name
|
|
212
211
|
};
|
|
213
|
-
e.has(
|
|
212
|
+
e.has(t.key) || e.set(t.key, n);
|
|
214
213
|
return;
|
|
215
214
|
}
|
|
216
|
-
let
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
title: a + s,
|
|
225
|
-
icon: n.device === void 0 ? void 0 : f(n.device)
|
|
215
|
+
let n = f(t), r = [];
|
|
216
|
+
n.deviceLabel && r.push(n.deviceLabel), n.langLabel && r.push(n.langLabel), n.altLabel && r.push(n.altLabel);
|
|
217
|
+
let a = r.join(", ");
|
|
218
|
+
a &&= ` (${a})`;
|
|
219
|
+
let o = {
|
|
220
|
+
value: t.index,
|
|
221
|
+
title: t.name + a,
|
|
222
|
+
icon: n.deviceTopIcon
|
|
226
223
|
};
|
|
227
|
-
e.set(
|
|
224
|
+
e.set(t.index, o);
|
|
228
225
|
}), e;
|
|
229
226
|
});
|
|
230
|
-
return
|
|
227
|
+
return B(o, (t, n) => {
|
|
231
228
|
if (e.onlySearcher || a.value !== void 0 && t.get(a.value)) return;
|
|
232
229
|
let i = t.keys().next().value;
|
|
233
230
|
if (a.value === -2 || i === -2) {
|
|
@@ -250,8 +247,8 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
250
247
|
regionIndex: a,
|
|
251
248
|
optionByRegionIndex: o
|
|
252
249
|
};
|
|
253
|
-
},
|
|
254
|
-
let r =
|
|
250
|
+
}, Le = (e, t, n) => {
|
|
251
|
+
let r = I([]), i = () => {
|
|
255
252
|
if (e.onlySearcher && t.value) {
|
|
256
253
|
r.value = Array.from(t.value.keys());
|
|
257
254
|
return;
|
|
@@ -265,22 +262,22 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
265
262
|
}, a = () => {
|
|
266
263
|
r.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(r.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
|
|
267
264
|
};
|
|
268
|
-
return
|
|
265
|
+
return B(r, () => {
|
|
269
266
|
a();
|
|
270
267
|
}), e.addCompare && i(), { regionsIndexes: r };
|
|
271
|
-
},
|
|
272
|
-
let t =
|
|
268
|
+
}, Re = (e) => {
|
|
269
|
+
let t = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = T(() => je(e.forMode, e.autoRegion, e.searchers)), r = T(() => n.value.get(a.searcherKey.value) || Se), i = T(() => {
|
|
273
270
|
let e = /* @__PURE__ */ new Set();
|
|
274
271
|
return n.value.forEach((t) => {
|
|
275
272
|
t.regionByIndex.forEach((t) => {
|
|
276
273
|
t.index !== -2 && e.add(t.index);
|
|
277
274
|
});
|
|
278
275
|
}), e;
|
|
279
|
-
}), a =
|
|
280
|
-
|
|
276
|
+
}), a = Fe(e, n), o = Ie(e, r), s = Le(e, n, i);
|
|
277
|
+
B(n, () => {
|
|
281
278
|
if (e.onlySearcher ? s.regionsIndexes.value = Array.from(n.value.keys()) : s.regionsIndexes.value = s.regionsIndexes.value.filter((e) => i.value.has(e)), a.searcherKey.value === -1) return;
|
|
282
279
|
let t = n.value.keys().next().value;
|
|
283
|
-
n.value.forEach((r) => {
|
|
280
|
+
e.modelValueSearcherKey === void 0 ? n.value.forEach((r) => {
|
|
284
281
|
if (e.onlySearcher && r.key === a.searcherKey.value) {
|
|
285
282
|
t = a.searcherKey.value;
|
|
286
283
|
return;
|
|
@@ -291,7 +288,7 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
291
288
|
let i = n.value.get(r.key)?.regionByIndex;
|
|
292
289
|
e?.has(-2) && !i?.has(-2) && (t = r.key);
|
|
293
290
|
}
|
|
294
|
-
}), t !== void 0 && (a.searcherKey.value = t), o.regionIndex.value !== void 0 && !(r.value?.regionByIndex)?.has(o.regionIndex.value) && (o.regionIndex.value = r.value?.regions?.keys().next().value);
|
|
291
|
+
}) : t = e.modelValueSearcherKey, t !== void 0 && (a.searcherKey.value = t), o.regionIndex.value !== void 0 && !(r.value?.regionByIndex)?.has(o.regionIndex.value) && (o.regionIndex.value = r.value?.regions?.keys().next().value);
|
|
295
292
|
}, { immediate: !0 });
|
|
296
293
|
let c = () => {
|
|
297
294
|
if (a.searcherKey.value !== -1 && a.searcherKey.value !== -2) return a.searcherKey.value;
|
|
@@ -300,7 +297,7 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
300
297
|
let n = o.regionIndex.value;
|
|
301
298
|
if (t.value && e.forMode) {
|
|
302
299
|
let t = o.regionIndex.value;
|
|
303
|
-
n =
|
|
300
|
+
n = ke(e.forMode, {
|
|
304
301
|
searcher_key: c(),
|
|
305
302
|
key: t
|
|
306
303
|
}, e.searchers)?.index;
|
|
@@ -322,13 +319,14 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
322
319
|
if (e !== void 0) return u()?.regionByIndex?.get(e);
|
|
323
320
|
}
|
|
324
321
|
};
|
|
325
|
-
},
|
|
322
|
+
}, ze = /* @__PURE__ */ M({
|
|
326
323
|
__name: "regionSelector",
|
|
327
|
-
props: /*@__PURE__*/
|
|
324
|
+
props: /*@__PURE__*/ N({
|
|
328
325
|
projectId: {},
|
|
329
326
|
searchers: { default: () => [] },
|
|
330
327
|
modelValue: {},
|
|
331
328
|
modelValueSingle: {},
|
|
329
|
+
modelValueSearcherKey: {},
|
|
332
330
|
addCompare: { type: Boolean },
|
|
333
331
|
forMode: {},
|
|
334
332
|
autoRegion: { type: Boolean },
|
|
@@ -349,95 +347,107 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
349
347
|
modelValue: { required: !0 },
|
|
350
348
|
modelModifiers: {},
|
|
351
349
|
modelValueSingle: {},
|
|
352
|
-
modelValueSingleModifiers: {}
|
|
350
|
+
modelValueSingleModifiers: {},
|
|
351
|
+
modelValueSearcherKey: {},
|
|
352
|
+
modelValueSearcherKeyModifiers: {}
|
|
353
353
|
}),
|
|
354
|
-
emits: [
|
|
354
|
+
emits: [
|
|
355
|
+
"update:modelValue",
|
|
356
|
+
"update:modelValueSingle",
|
|
357
|
+
"update:modelValueSearcherKey"
|
|
358
|
+
],
|
|
355
359
|
setup(e, { expose: t }) {
|
|
356
|
-
let n = e, r =
|
|
360
|
+
let n = e, r = T(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i = z(e, "modelValue"), s = z(e, "modelValueSingle"), c = z(e, "modelValueSearcherKey"), l = i.value.some((e) => e !== -2);
|
|
361
|
+
if (r.value && !n.onlySearcher && c.value === void 0 && l) throw Error("При использовании `region.key` в `modelValue` необходимо передавать `modelValueSearcherKey`");
|
|
362
|
+
let { selectSearcher: u, selectRegion: d, compare: f, searcherByKey: p, allRegionsIndexes: m, getSearcher: h, getRegion: g } = Re(n), _ = () => {
|
|
357
363
|
let e = [];
|
|
358
|
-
|
|
364
|
+
p.value.forEach((t) => {
|
|
359
365
|
(n.forMode === "project_relevant_url" || t.enabled) && t.regions.forEach((t) => {
|
|
360
366
|
(n.forMode === "project_relevant_url" || t.enabled) && t.index !== -1 && e.push(t);
|
|
361
367
|
});
|
|
362
|
-
}),
|
|
368
|
+
}), Ae.open("regions", {
|
|
363
369
|
regions: e,
|
|
364
|
-
regionsIndexes:
|
|
365
|
-
"@update:regionsIndexes": (e) =>
|
|
370
|
+
regionsIndexes: f.regionsIndexes.value,
|
|
371
|
+
"@update:regionsIndexes": (e) => f.regionsIndexes.value = e
|
|
366
372
|
});
|
|
367
373
|
};
|
|
368
|
-
return
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
374
|
+
return B([
|
|
375
|
+
d.regionIndex,
|
|
376
|
+
u.searcherKey,
|
|
377
|
+
f.regionsIndexes
|
|
372
378
|
], () => {
|
|
373
|
-
if (
|
|
374
|
-
if (JSON.stringify(i.value) === JSON.stringify(
|
|
375
|
-
i.value = [...
|
|
376
|
-
} else n.onlySearcher ? (i.value = [
|
|
377
|
-
!n.onlySearcher && !
|
|
378
|
-
}),
|
|
379
|
+
if (u.searcherKey.value === -1 && f.regionsIndexes.value.length) {
|
|
380
|
+
if (JSON.stringify(i.value) === JSON.stringify(f.regionsIndexes.value)) return;
|
|
381
|
+
i.value = [...f.regionsIndexes.value];
|
|
382
|
+
} else n.onlySearcher ? (i.value = [u.searcherKey.value], u.searcherKey.value === -2 && !n.autoRegion && (i.value.length = 0)) : (i.value = [d.regionIndex.value], d.regionIndex.value === -2 && !n.autoRegion && (i.value.length = 0));
|
|
383
|
+
!n.onlySearcher && !m.value.size && (u.searcherKey.value = -2);
|
|
384
|
+
}), B(c, () => {
|
|
385
|
+
c.value !== void 0 && (u.searcherKey.value = c.value);
|
|
386
|
+
}), B(u.searcherKey, () => {
|
|
387
|
+
c.value !== void 0 && (c.value = u.searcherKey.value);
|
|
388
|
+
}), s.value && B(s, () => {
|
|
379
389
|
s.value && (i.value = [s.value]);
|
|
380
|
-
}, { immediate: !0 }),
|
|
390
|
+
}, { immediate: !0 }), B(i, () => {
|
|
381
391
|
if (i.value[0] && (s.value = i.value[0]), n.onlySearcher) {
|
|
382
|
-
if (!i.value.length || i.value.length === 1 && !
|
|
383
|
-
let e =
|
|
392
|
+
if (!i.value.length || i.value.length === 1 && !p.value.has(i.value[0]) || i.value.length === 1 && i.value[0] === -2 && !n.autoRegion) {
|
|
393
|
+
let e = p.value.keys().next().value;
|
|
384
394
|
e === -2 && !n.autoRegion && (e = void 0, s.value = -2), e === void 0 ? i.value.length = 0 : i.value = [e];
|
|
385
395
|
return;
|
|
386
396
|
}
|
|
387
|
-
if (i.value.length > 1 && JSON.stringify(i.value) !== JSON.stringify(
|
|
388
|
-
i.value = [...
|
|
397
|
+
if (i.value.length > 1 && JSON.stringify(i.value) !== JSON.stringify(f.regionsIndexes.value)) {
|
|
398
|
+
i.value = [...f.regionsIndexes.value];
|
|
389
399
|
return;
|
|
390
400
|
}
|
|
391
401
|
} else {
|
|
392
|
-
let e = [...new Set(i.value)], t =
|
|
393
|
-
if (r.value && (t =
|
|
402
|
+
let e = [...new Set(i.value)], t = p.value.values().next().value?.regionByIndex?.keys().next().value;
|
|
403
|
+
if (r.value && (t = p.value.values().next().value?.regionByIndex?.values().next().value?.key), t === -2 && !n.autoRegion && (t = void 0, s.value = -2), !e.length) t !== void 0 && e.push(t);
|
|
394
404
|
else if (e.length === 1) {
|
|
395
|
-
let n =
|
|
396
|
-
r.value && (n = /* @__PURE__ */ new Set(),
|
|
405
|
+
let n = m.value;
|
|
406
|
+
r.value && (n = /* @__PURE__ */ new Set(), p.value.forEach((e) => {
|
|
397
407
|
e.regionByIndex.forEach((e) => {
|
|
398
408
|
e.index !== -2 && n.add(e.key);
|
|
399
409
|
});
|
|
400
410
|
})), n.has(e[0]) || (e = [], t !== void 0 && e.push(t));
|
|
401
|
-
} else e = e.filter((e) =>
|
|
411
|
+
} else e = e.filter((e) => m.value.has(e)), !e.length && t !== void 0 && e.push(t);
|
|
402
412
|
if (JSON.stringify(i.value) !== JSON.stringify(e)) {
|
|
403
413
|
i.value = e;
|
|
404
414
|
return;
|
|
405
415
|
}
|
|
406
416
|
}
|
|
407
|
-
if (i.value.length !== 1 || i.value[0] !== (n.onlySearcher ?
|
|
417
|
+
if (i.value.length !== 1 || i.value[0] !== (n.onlySearcher ? u.searcherKey.value : d.regionIndex.value)) {
|
|
408
418
|
if (n.onlySearcher) {
|
|
409
419
|
if (i.value.length === 1) {
|
|
410
|
-
|
|
420
|
+
u.searcherKey.value = i.value[0];
|
|
411
421
|
return;
|
|
412
422
|
}
|
|
413
|
-
|
|
423
|
+
u.searcherKey.value = -1;
|
|
414
424
|
return;
|
|
415
425
|
}
|
|
416
426
|
if (!i.value.length) return;
|
|
417
|
-
if (i.value.length === 1 &&
|
|
418
|
-
|
|
419
|
-
let e;
|
|
420
|
-
for (let t of
|
|
421
|
-
for (let n of t.regionByIndex.values()) if ((r.value ? n.key : n.index) ===
|
|
427
|
+
if (i.value.length === 1 && u.searcherKey.value !== -1) {
|
|
428
|
+
d.regionIndex.value = i.value[0];
|
|
429
|
+
let e = c.value;
|
|
430
|
+
if (e === void 0) for (let t of p.value.values()) {
|
|
431
|
+
for (let n of t.regionByIndex.values()) if ((r.value ? n.key : n.index) === d.regionIndex.value) {
|
|
422
432
|
e = t.key;
|
|
423
433
|
break;
|
|
424
434
|
}
|
|
425
435
|
if (e !== void 0) break;
|
|
426
436
|
}
|
|
427
|
-
e !== void 0 && (
|
|
428
|
-
} else
|
|
437
|
+
e !== void 0 && (u.searcherKey.value = e);
|
|
438
|
+
} else u.searcherKey.value = -1, f.regionsIndexes.value = [...i.value];
|
|
429
439
|
}
|
|
430
440
|
}, { immediate: !0 }), t({
|
|
431
|
-
getSearcher:
|
|
432
|
-
getRegion:
|
|
433
|
-
}), (t, n) => (
|
|
441
|
+
getSearcher: h,
|
|
442
|
+
getRegion: g
|
|
443
|
+
}), (t, n) => (F(), O("div", { class: P({
|
|
434
444
|
"top-regionSelector": !0,
|
|
435
445
|
"top-regionSelector-onlySearcher": e.onlySearcher
|
|
436
446
|
}) }, [
|
|
437
|
-
|
|
438
|
-
options:
|
|
439
|
-
modelValue:
|
|
440
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
447
|
+
j(o, {
|
|
448
|
+
options: R(u).optionBySearcherKey.value,
|
|
449
|
+
modelValue: R(u).searcherKey.value,
|
|
450
|
+
"onUpdate:modelValue": n[0] ||= (e) => R(u).searcherKey.value = e,
|
|
441
451
|
name: "searcher_key",
|
|
442
452
|
addChanger: e.addChanger
|
|
443
453
|
}, null, 8, [
|
|
@@ -445,12 +455,12 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
445
455
|
"modelValue",
|
|
446
456
|
"addChanger"
|
|
447
457
|
]),
|
|
448
|
-
!e.onlySearcher &&
|
|
458
|
+
!e.onlySearcher && R(u).searcherKey.value !== R(-1) ? (F(), E(o, {
|
|
449
459
|
key: 0,
|
|
450
460
|
class: "top-select-region",
|
|
451
|
-
options:
|
|
452
|
-
modelValue:
|
|
453
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
461
|
+
options: R(d).optionByRegionIndex.value,
|
|
462
|
+
modelValue: R(d).regionIndex.value,
|
|
463
|
+
"onUpdate:modelValue": n[1] ||= (e) => R(d).regionIndex.value = e,
|
|
454
464
|
name: r.value ? "region_key" : "region_index",
|
|
455
465
|
addChanger: e.addChanger,
|
|
456
466
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
@@ -460,31 +470,31 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
460
470
|
"name",
|
|
461
471
|
"addChanger",
|
|
462
472
|
"data-top-icon"
|
|
463
|
-
])) :
|
|
464
|
-
e.addCompare && !e.onlySearcher &&
|
|
473
|
+
])) : D("", !0),
|
|
474
|
+
e.addCompare && !e.onlySearcher && R(u).searcherKey.value === R(-1) ? (F(), E(a, {
|
|
465
475
|
key: 1,
|
|
466
476
|
name: "compare",
|
|
467
|
-
onClick:
|
|
468
|
-
"data-count-compare-regions-indexes":
|
|
477
|
+
onClick: _,
|
|
478
|
+
"data-count-compare-regions-indexes": R(f).regionsIndexes.value.length
|
|
469
479
|
}, {
|
|
470
|
-
default:
|
|
480
|
+
default: V(() => [A(L(t.$i18n.Common.Selected_regions), 1)]),
|
|
471
481
|
_: 1
|
|
472
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
482
|
+
}, 8, ["data-count-compare-regions-indexes"])) : D("", !0)
|
|
473
483
|
], 2));
|
|
474
484
|
}
|
|
475
|
-
}),
|
|
485
|
+
}), W = {
|
|
476
486
|
id: 0,
|
|
477
487
|
name: "/",
|
|
478
488
|
path: "/"
|
|
479
489
|
};
|
|
480
|
-
function
|
|
490
|
+
function Be(e) {
|
|
481
491
|
return e ? n()?.Common.All_folders : "/ (" + n()?.Keywords.Root_folder + ")";
|
|
482
492
|
}
|
|
483
|
-
var
|
|
484
|
-
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name =
|
|
493
|
+
var Ve = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
|
|
494
|
+
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Be(t));
|
|
485
495
|
let o = i > 1 ? "-".repeat(i - 1) + " " : "";
|
|
486
|
-
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a),
|
|
487
|
-
}), n),
|
|
496
|
+
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Ve(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
|
|
497
|
+
}), n), He = (e, t) => e.gen(`/get/${t}/folders/`, [
|
|
488
498
|
"id",
|
|
489
499
|
"parent_id",
|
|
490
500
|
"name",
|
|
@@ -495,9 +505,9 @@ var Ue = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
|
|
|
495
505
|
});
|
|
496
506
|
//#endregion
|
|
497
507
|
//#region src/core/utils/composables/useWatch.ts
|
|
498
|
-
function
|
|
508
|
+
function Ue(e, t, n) {
|
|
499
509
|
let r = Object.keys(e), i = r.map((t) => e[t]);
|
|
500
|
-
return
|
|
510
|
+
return B(i, (e, n, i) => {
|
|
501
511
|
let a = {};
|
|
502
512
|
e.forEach((e, t) => {
|
|
503
513
|
if (!Object.is(e, n[t])) {
|
|
@@ -512,9 +522,9 @@ function Ge(e, t, n) {
|
|
|
512
522
|
}
|
|
513
523
|
//#endregion
|
|
514
524
|
//#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
|
|
515
|
-
var
|
|
525
|
+
var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
516
526
|
__name: "folders",
|
|
517
|
-
props: /*@__PURE__*/
|
|
527
|
+
props: /*@__PURE__*/ N({
|
|
518
528
|
folderId: {},
|
|
519
529
|
folder: {},
|
|
520
530
|
folders: {},
|
|
@@ -530,20 +540,20 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
530
540
|
}, {
|
|
531
541
|
folderId: { required: !0 },
|
|
532
542
|
folderIdModifiers: {},
|
|
533
|
-
folder: { default:
|
|
543
|
+
folder: { default: W },
|
|
534
544
|
folderModifiers: {}
|
|
535
545
|
}),
|
|
536
546
|
emits: ["update:folderId", "update:folder"],
|
|
537
547
|
setup(e) {
|
|
538
|
-
let t = e, n =
|
|
539
|
-
|
|
548
|
+
let t = e, n = z(e, "folderId"), r = z(e, "folder"), i = t.client && !t.folders ? He(t.client, t.service) : void 0, a = I(null);
|
|
549
|
+
B(() => t.projectId, () => {
|
|
540
550
|
i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
|
|
541
551
|
}, { immediate: !0 });
|
|
542
|
-
let o =
|
|
552
|
+
let o = T(() => Ve(t.folders ?? { root: [W] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
|
|
543
553
|
...e[0],
|
|
544
|
-
name:
|
|
554
|
+
name: Be(!0)
|
|
545
555
|
}), e);
|
|
546
|
-
return
|
|
556
|
+
return Ue({
|
|
547
557
|
modelFolder: r,
|
|
548
558
|
modelFolderId: n
|
|
549
559
|
}, async (e) => {
|
|
@@ -553,21 +563,21 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
553
563
|
return;
|
|
554
564
|
}
|
|
555
565
|
let i = o.value.get(t.folderId);
|
|
556
|
-
i ||=
|
|
557
|
-
}, { immediate: !0 }), (t, n) => (
|
|
566
|
+
i ||= W, r.value = i, n.value = i.id;
|
|
567
|
+
}, { immediate: !0 }), (t, n) => (F(), E(b, {
|
|
558
568
|
class: "top-groupSelector_folder",
|
|
559
569
|
modelValue: r.value,
|
|
560
570
|
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
561
571
|
items: e.folders ? [...o.value.values()] : void 0,
|
|
562
572
|
"search-type": "inline",
|
|
563
573
|
icon: e.addIcon ? "" : void 0,
|
|
564
|
-
api: e.folders ? void 0 :
|
|
565
|
-
apiSetSearchParams: (...e) =>
|
|
574
|
+
api: e.folders ? void 0 : R(i),
|
|
575
|
+
apiSetSearchParams: (...e) => R(x)(...e, "name"),
|
|
566
576
|
prepareItemsBeforeRender: s,
|
|
567
577
|
addChanger: e.addChanger,
|
|
568
578
|
useCache: ""
|
|
569
579
|
}, {
|
|
570
|
-
item:
|
|
580
|
+
item: V(({ item: e }) => [k("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, We)]),
|
|
571
581
|
_: 1
|
|
572
582
|
}, 8, [
|
|
573
583
|
"modelValue",
|
|
@@ -578,17 +588,17 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
578
588
|
"addChanger"
|
|
579
589
|
]));
|
|
580
590
|
}
|
|
581
|
-
}),
|
|
591
|
+
}), G = {
|
|
582
592
|
id: -1,
|
|
583
593
|
name: "--",
|
|
584
|
-
folder_id:
|
|
585
|
-
folder_path:
|
|
586
|
-
},
|
|
594
|
+
folder_id: W.id,
|
|
595
|
+
folder_path: W.path
|
|
596
|
+
}, K = {
|
|
587
597
|
id: 0,
|
|
588
598
|
name: "All groups",
|
|
589
|
-
folder_id:
|
|
590
|
-
folder_path:
|
|
591
|
-
},
|
|
599
|
+
folder_id: W.id,
|
|
600
|
+
folder_path: W.path
|
|
601
|
+
}, q = () => (K.name = n()?.Common.All_groups, K), Ke = () => (K.name = n()?.Keywords.Choose_group, K), qe = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), Je = (e, t) => e.gen(`/get/${t}/groups/`, [
|
|
592
602
|
"id",
|
|
593
603
|
"name",
|
|
594
604
|
"folder_id",
|
|
@@ -596,12 +606,12 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
596
606
|
]).changeParams({
|
|
597
607
|
folder_id_depth: !0,
|
|
598
608
|
limit: 100
|
|
599
|
-
}),
|
|
609
|
+
}), Ye = (e, t) => e.gen(`/add/${t}/groups/`), Xe = (e, t) => e.gen(`/del/${t}/groups/`), Ze = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Qe = { class: "top-groupSelector_groupItem top-ellipsis1" }, $e = {
|
|
600
610
|
key: 0,
|
|
601
611
|
class: "top-comment"
|
|
602
|
-
},
|
|
612
|
+
}, et = ["innerHTML"], tt = ["innerHTML"], nt = ["innerHTML"], rt = /* @__PURE__ */ M({
|
|
603
613
|
__name: "groups",
|
|
604
|
-
props: /*@__PURE__*/
|
|
614
|
+
props: /*@__PURE__*/ N({
|
|
605
615
|
groupId: {},
|
|
606
616
|
group: {},
|
|
607
617
|
projectId: {},
|
|
@@ -632,14 +642,14 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
632
642
|
group: { required: !0 },
|
|
633
643
|
groupModifiers: {}
|
|
634
644
|
}),
|
|
635
|
-
emits: /*@__PURE__*/
|
|
645
|
+
emits: /*@__PURE__*/ N([
|
|
636
646
|
"addGroup",
|
|
637
647
|
"editGroup",
|
|
638
648
|
"delGroup"
|
|
639
649
|
], ["update:groupId", "update:group"]),
|
|
640
650
|
setup(e, { expose: n, emit: r }) {
|
|
641
|
-
let i = e, a = r, o =
|
|
642
|
-
if (i.groups !== void 0) return
|
|
651
|
+
let i = e, a = r, o = z(e, "groupId"), s = z(e, "group"), c = i.client && !i.groups ? Je(i.client, i.service) : void 0, l = i.client ? Ye(i.client, i.service) : void 0, u = i.client ? Xe(i.client, i.service) : void 0, d = i.client ? Ze(i.client, i.service) : void 0, f = I(null), p = T(() => {
|
|
652
|
+
if (i.groups !== void 0) return qe(i.groups, i.on, i.folder);
|
|
643
653
|
}), m = t("folder_id", "EQUALS", [i.folder?.id ?? 0]);
|
|
644
654
|
c?.changeParams({
|
|
645
655
|
project_id: i.projectId,
|
|
@@ -648,19 +658,19 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
648
658
|
}), i.on !== void 0 && c?.params.filters?.push(t("on", "EQUALS", [Number(i.on)]));
|
|
649
659
|
let h = (e) => {
|
|
650
660
|
s.value = e, o.value = e.id;
|
|
651
|
-
},
|
|
661
|
+
}, _ = (e = !1) => {
|
|
652
662
|
f.value?.resetCache(e);
|
|
653
663
|
};
|
|
654
|
-
|
|
664
|
+
Ue({
|
|
655
665
|
projectId: () => i.projectId,
|
|
656
666
|
folderId: () => i.folder?.id,
|
|
657
667
|
canSelectAll: () => i.canSelectAll
|
|
658
668
|
}, (e) => {
|
|
659
|
-
if (e.projectId && (c?.changeParams({ project_id: i.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + i.projectId })), e.folderId && (m.values = [i.folder?.id ?? 0]),
|
|
669
|
+
if (e.projectId && (c?.changeParams({ project_id: i.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + i.projectId })), e.folderId && (m.values = [i.folder?.id ?? 0]), _(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && o.value !== null) {
|
|
660
670
|
let e;
|
|
661
|
-
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e =
|
|
671
|
+
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = ae(q()))), (i.autoselect === "placeholder" || !e) && (e = Ke()), h(e);
|
|
662
672
|
}
|
|
663
|
-
}, { immediate: !0 }),
|
|
673
|
+
}, { immediate: !0 }), Ue({
|
|
664
674
|
modelGroup: s,
|
|
665
675
|
modelGroupId: o
|
|
666
676
|
}, async (e) => {
|
|
@@ -672,14 +682,14 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
672
682
|
if (!(i.canAdd && o.value === null)) {
|
|
673
683
|
if (i.groups) {
|
|
674
684
|
let e = p.value?.find((e) => e.id === o.value);
|
|
675
|
-
if (!e && i.canSelectAll && (e =
|
|
685
|
+
if (!e && i.canSelectAll && (e = q()), e) h(e);
|
|
676
686
|
else {
|
|
677
687
|
let e = p.value?.[0];
|
|
678
|
-
e && !o.value ? h(e) : h(
|
|
688
|
+
e && !o.value ? h(e) : h(G);
|
|
679
689
|
}
|
|
680
690
|
}
|
|
681
691
|
if (i.client && !i.groups && (o.value || o.value === 0 && !i.canSelectAll)) {
|
|
682
|
-
let e =
|
|
692
|
+
let e = Je(i.client, i.service).changeParams({
|
|
683
693
|
project_id: i.projectId,
|
|
684
694
|
id: o.value,
|
|
685
695
|
filters: [m]
|
|
@@ -687,17 +697,17 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
687
697
|
e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + i.projectId });
|
|
688
698
|
let t = await e.call();
|
|
689
699
|
if (!t.errors?.length && !t.result) return;
|
|
690
|
-
!t.errors && t.result[0] ? h(t.result[0]) : h(
|
|
700
|
+
!t.errors && t.result[0] ? h(t.result[0]) : h(G);
|
|
691
701
|
}
|
|
692
702
|
}
|
|
693
703
|
}
|
|
694
704
|
}, { immediate: !0 });
|
|
695
|
-
let
|
|
705
|
+
let y = async (e) => {
|
|
696
706
|
if (i.canAdd !== "api" || !l) return;
|
|
697
707
|
let t = s.value, n = await l.changeParams({
|
|
698
708
|
project_id: i.projectId,
|
|
699
709
|
names: [e.name],
|
|
700
|
-
to_id: i.folder?.id ??
|
|
710
|
+
to_id: i.folder?.id ?? W.id,
|
|
701
711
|
to_type: "in_folder_last"
|
|
702
712
|
}).call();
|
|
703
713
|
if (n.result) {
|
|
@@ -705,7 +715,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
705
715
|
h(e), a("addGroup", e);
|
|
706
716
|
} else h(t);
|
|
707
717
|
f.value?.resetCache(!0);
|
|
708
|
-
},
|
|
718
|
+
}, S = async (e, t) => {
|
|
709
719
|
d && ((await d.changeParams({
|
|
710
720
|
project_id: i.projectId,
|
|
711
721
|
id: e.id,
|
|
@@ -714,13 +724,13 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
714
724
|
id: e.id,
|
|
715
725
|
name: t
|
|
716
726
|
}), f.value?.updateCacheItemById(e.id, { name: t })));
|
|
717
|
-
},
|
|
727
|
+
}, C = async (e) => {
|
|
718
728
|
u && ((await u.changeParams({
|
|
719
729
|
project_id: i.projectId,
|
|
720
730
|
id: e.id
|
|
721
|
-
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ?
|
|
731
|
+
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ? q() : G), a("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
|
|
722
732
|
};
|
|
723
|
-
return n({ resetCacheGroups:
|
|
733
|
+
return n({ resetCacheGroups: _ }), (t, n) => (F(), E(b, {
|
|
724
734
|
ref_key: "refSelector",
|
|
725
735
|
ref: f,
|
|
726
736
|
class: "top-groupSelector_group",
|
|
@@ -729,51 +739,51 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
729
739
|
items: p.value ?? e.groups,
|
|
730
740
|
searchType: "inline",
|
|
731
741
|
icon: e.addIcon ? "" : void 0,
|
|
732
|
-
api: e.groups ? void 0 :
|
|
733
|
-
apiSetSearchParams: (...e) =>
|
|
742
|
+
api: e.groups ? void 0 : R(c),
|
|
743
|
+
apiSetSearchParams: (...e) => R(x)(...e, "name"),
|
|
734
744
|
appendSearchToResult: !!e.canAdd,
|
|
735
|
-
useAllItem: e.canSelectAll ?
|
|
745
|
+
useAllItem: e.canSelectAll ? R(q)().name : !1,
|
|
736
746
|
addChanger: e.addChanger,
|
|
737
747
|
useCache: "",
|
|
738
|
-
onAppendItem:
|
|
739
|
-
},
|
|
740
|
-
item:
|
|
741
|
-
n.id ===
|
|
742
|
-
|
|
748
|
+
onAppendItem: y
|
|
749
|
+
}, ee({
|
|
750
|
+
item: V(({ item: n }) => [k("div", Qe, [
|
|
751
|
+
n.id === R(null) ? (F(), O("div", $e, L(t.$i18n.Common.Add) + ": ", 1)) : D("", !0),
|
|
752
|
+
k("span", {
|
|
743
753
|
class: "top-groupSelector_groupItemName top-ellipsis1",
|
|
744
754
|
innerHTML: n.name
|
|
745
|
-
}, null, 8,
|
|
746
|
-
n.folder_path && e.showPath ? (
|
|
755
|
+
}, null, 8, et),
|
|
756
|
+
n.folder_path && e.showPath ? (F(), O("span", {
|
|
747
757
|
key: 1,
|
|
748
758
|
class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
|
|
749
759
|
innerHTML: n.folder_path
|
|
750
|
-
}, null, 8,
|
|
760
|
+
}, null, 8, tt)) : D("", !0)
|
|
751
761
|
])]),
|
|
752
762
|
_: 2
|
|
753
763
|
}, [e.canEditAndDel && e.client ? {
|
|
754
764
|
name: "actions",
|
|
755
|
-
fn:
|
|
765
|
+
fn: V(({ item: r }) => [r.id ? (F(), O(w, { key: 0 }, [j(g, {
|
|
756
766
|
submitText: t.$i18n.Common.Save,
|
|
757
767
|
defaultValue: r.name,
|
|
758
768
|
inputProps: { addCleaner: !1 },
|
|
759
|
-
onSubmit: (e) =>
|
|
769
|
+
onSubmit: (e) => S(r, e)
|
|
760
770
|
}, {
|
|
761
|
-
opener:
|
|
762
|
-
default:
|
|
771
|
+
opener: V(() => [...n[1] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
|
|
772
|
+
default: V(() => [...n[2] ||= []]),
|
|
763
773
|
_: 1
|
|
764
774
|
}, 8, [
|
|
765
775
|
"submitText",
|
|
766
776
|
"defaultValue",
|
|
767
777
|
"onSubmit"
|
|
768
|
-
]),
|
|
778
|
+
]), j(v, {
|
|
769
779
|
isWarning: "",
|
|
770
780
|
submitText: t.$i18n.Common.Delete,
|
|
771
|
-
onSubmit: (e) =>
|
|
781
|
+
onSubmit: (e) => C(r)
|
|
772
782
|
}, {
|
|
773
|
-
opener:
|
|
774
|
-
default:
|
|
783
|
+
opener: V(() => [...n[3] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
|
|
784
|
+
default: V(() => [k("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n.Aitracker.Delete_group_warning }, null, 8, nt)]),
|
|
775
785
|
_: 1
|
|
776
|
-
}, 8, ["submitText", "onSubmit"])], 64)) :
|
|
786
|
+
}, 8, ["submitText", "onSubmit"])], 64)) : D("", !0)]),
|
|
777
787
|
key: "0"
|
|
778
788
|
} : void 0]), 1032, [
|
|
779
789
|
"modelValue",
|
|
@@ -786,9 +796,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
786
796
|
"addChanger"
|
|
787
797
|
]));
|
|
788
798
|
}
|
|
789
|
-
}),
|
|
799
|
+
}), it = { class: "top-groupSelector" }, at = /* @__PURE__ */ M({
|
|
790
800
|
__name: "groupSelector",
|
|
791
|
-
props: /*@__PURE__*/
|
|
801
|
+
props: /*@__PURE__*/ N({
|
|
792
802
|
folderId: {},
|
|
793
803
|
folder: {},
|
|
794
804
|
groupId: {},
|
|
@@ -833,20 +843,20 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
833
843
|
folderModifiers: {},
|
|
834
844
|
groupId: { required: !0 },
|
|
835
845
|
groupIdModifiers: {},
|
|
836
|
-
group: { default:
|
|
846
|
+
group: { default: G },
|
|
837
847
|
groupModifiers: {}
|
|
838
848
|
}),
|
|
839
|
-
emits: /*@__PURE__*/
|
|
849
|
+
emits: /*@__PURE__*/ N(["update:groups"], [
|
|
840
850
|
"update:folderId",
|
|
841
851
|
"update:folder",
|
|
842
852
|
"update:groupId",
|
|
843
853
|
"update:group"
|
|
844
854
|
]),
|
|
845
855
|
setup(e, { expose: t, emit: n }) {
|
|
846
|
-
let r = e, i =
|
|
847
|
-
o.value =
|
|
856
|
+
let r = e, i = I(null), a = z(e, "folderId"), o = z(e, "folder"), s = z(e, "groupId"), c = z(e, "group"), l = n;
|
|
857
|
+
o.value = Ve(r.folders ?? { root: [W] }, r.canSelectAllGroups).get(a.value);
|
|
848
858
|
let u = r.groups?.find((e) => e.id === s.value);
|
|
849
|
-
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u =
|
|
859
|
+
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = q()), (r.autoselect === "placeholder" || !u) && (u = Ke()), u ??= G, c.value = u;
|
|
850
860
|
let d = (e) => {
|
|
851
861
|
let t;
|
|
852
862
|
r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
|
|
@@ -872,7 +882,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
872
882
|
};
|
|
873
883
|
return t({ resetCacheGroups: (e = !1) => {
|
|
874
884
|
i.value?.resetCacheGroups(e);
|
|
875
|
-
} }), (t, n) => (
|
|
885
|
+
} }), (t, n) => (F(), O("div", it, [e.showFolders ? (F(), E(Ge, {
|
|
876
886
|
key: 0,
|
|
877
887
|
folderId: a.value,
|
|
878
888
|
"onUpdate:folderId": n[0] ||= (e) => a.value = e,
|
|
@@ -895,7 +905,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
895
905
|
"addIcon",
|
|
896
906
|
"client",
|
|
897
907
|
"service"
|
|
898
|
-
])) :
|
|
908
|
+
])) : D("", !0), e.showGroups ? (F(), E(rt, {
|
|
899
909
|
key: 1,
|
|
900
910
|
ref_key: "componentGroupsRef",
|
|
901
911
|
ref: i,
|
|
@@ -935,46 +945,46 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
935
945
|
"addIcon",
|
|
936
946
|
"client",
|
|
937
947
|
"service"
|
|
938
|
-
])) :
|
|
948
|
+
])) : D("", !0)]));
|
|
939
949
|
}
|
|
940
|
-
}),
|
|
950
|
+
}), ot = (e) => ({
|
|
941
951
|
id: null,
|
|
942
952
|
name: e,
|
|
943
953
|
listItemProps: {
|
|
944
954
|
type: "title",
|
|
945
955
|
class: "top-projectSelector_item"
|
|
946
956
|
}
|
|
947
|
-
}),
|
|
957
|
+
}), st = {
|
|
948
958
|
scheduledUpdate: !1,
|
|
949
959
|
manualUpdate: !1,
|
|
950
960
|
guestProjects: !1
|
|
951
|
-
},
|
|
961
|
+
}, ct = (e, t) => {
|
|
952
962
|
let r = [], i = {
|
|
953
|
-
scheduledUpdate:
|
|
954
|
-
manualUpdate:
|
|
955
|
-
guestProjects:
|
|
963
|
+
scheduledUpdate: ot(n().Projects.Scheduled_update),
|
|
964
|
+
manualUpdate: ot(n().Projects.Manual_update),
|
|
965
|
+
guestProjects: ot(n().Projects.Guest_projects)
|
|
956
966
|
}, a = t ? {
|
|
957
967
|
scheduledUpdate: !1,
|
|
958
968
|
manualUpdate: !1,
|
|
959
969
|
guestProjects: !1
|
|
960
|
-
} :
|
|
970
|
+
} : st;
|
|
961
971
|
for (let t of e) !a.scheduledUpdate && t.right?.startsWith("1") && t.on > 0 && (r.push(i.scheduledUpdate), a.scheduledUpdate = !0), !a.manualUpdate && t.right?.startsWith("1") && t.on === 0 && (r.push(i.manualUpdate), a.manualUpdate = !0), !a.guestProjects && t.right?.startsWith("0") && t.on >= 0 && (r.push(i.guestProjects), a.guestProjects = !0), r.push(t);
|
|
962
972
|
return r;
|
|
963
|
-
},
|
|
973
|
+
}, lt = (e) => ({
|
|
964
974
|
...e,
|
|
965
|
-
externalLink:
|
|
975
|
+
externalLink: ht(e.url ?? ""),
|
|
966
976
|
listItemProps: {
|
|
967
977
|
class: "top-projectSelector_item",
|
|
968
978
|
attrs: { title: e.name }
|
|
969
979
|
}
|
|
970
|
-
}),
|
|
980
|
+
}), ut = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(st).forEach((e) => st[e] = !1), ct(e.map(lt), n)), dt = (e) => {
|
|
971
981
|
e = e.replace(/#.*/, "");
|
|
972
982
|
let t = location.hash;
|
|
973
983
|
return t = t.replace(/%22historyView%22:[^,]*,/, ""), t = t.replace(/%22modelsKeys%22:\[[^\]]*],/, ""), t = t.replace(/%22competitorsIds%22:\[[^\]]*],/, ""), t = t.replace(/%22searchersKeys%22:\[[^\]]*],/, ""), t = t.replace(/%22regionIndex%22:[^,]*,/, ""), t = t.replace(/%22regionsIndexes%22:\[[^\]]*],/, ""), t = t.replace(/%22folderId%22:[^,]*,/, ""), t = t.replace(/%22groupId%22:[^,]*,/, ""), t = t.replace(/%22tagsIds%22:\[[^\]]*],/, ""), /%22dataSort%22:\{[^}]*0000-00-00[^}]*}/.test(t) || (t = t.replace(/,?%22dataSort%22:\{[^}]*}(,?)/, "$1")), e + t;
|
|
974
|
-
},
|
|
975
|
-
location.href =
|
|
976
|
-
},
|
|
977
|
-
let t =
|
|
984
|
+
}, ft = (e) => {
|
|
985
|
+
location.href = pt(e);
|
|
986
|
+
}, pt = (e) => {
|
|
987
|
+
let t = mt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
|
|
978
988
|
n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
|
|
979
989
|
"watcher",
|
|
980
990
|
"indexing",
|
|
@@ -984,17 +994,17 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
984
994
|
"adwords"
|
|
985
995
|
].includes(n[4]) && (i = n[4] + "/");
|
|
986
996
|
let a = "https://" + t + "/" + r + e + "/" + i;
|
|
987
|
-
return a =
|
|
988
|
-
},
|
|
997
|
+
return a = dt(a), a;
|
|
998
|
+
}, mt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, ht = (e) => {
|
|
989
999
|
let t = e.startsWith("http") ? e : "https://" + e;
|
|
990
1000
|
return t = t.replace(/"/g, "%22"), t;
|
|
991
|
-
},
|
|
1001
|
+
}, gt = (e, n) => {
|
|
992
1002
|
let r = e.params.filters ?? [];
|
|
993
1003
|
r = r.filter((e) => e.name !== "GEN_SEARCH_STRING()");
|
|
994
|
-
let i =
|
|
1004
|
+
let i = m(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
|
|
995
1005
|
n && r.push(t("GEN_SEARCH_STRING()", "REGEXP", [`(${a}|${o})`])), e.changeParams({ filters: r });
|
|
996
|
-
},
|
|
997
|
-
let
|
|
1006
|
+
}, _t = (n, i = !0) => {
|
|
1007
|
+
let a = n.gen("/get/projects_2/projects/", [
|
|
998
1008
|
"id",
|
|
999
1009
|
"user_id",
|
|
1000
1010
|
"name",
|
|
@@ -1002,7 +1012,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1002
1012
|
"on",
|
|
1003
1013
|
"right"
|
|
1004
1014
|
]);
|
|
1005
|
-
return
|
|
1015
|
+
return a.changeParams({
|
|
1006
1016
|
filters: [t("on", "GREATER_THAN_EQUALS", [0])],
|
|
1007
1017
|
orders: [
|
|
1008
1018
|
e("user_id", "DESC", [r.state.userId]),
|
|
@@ -1011,15 +1021,46 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1011
1021
|
e("ord", "ASC"),
|
|
1012
1022
|
e("id", "DESC")
|
|
1013
1023
|
]
|
|
1014
|
-
}),
|
|
1024
|
+
}), a.options.loadingShowSpinner = !1, i && (a.options.onApiLoaded = (e, t, n) => {
|
|
1015
1025
|
let r = t.data.filters.length > 1, i = t.data.offset === 0, a = t.data.offset === void 0 || i && !r, o = r;
|
|
1016
|
-
e.result =
|
|
1017
|
-
},
|
|
1018
|
-
},
|
|
1026
|
+
e.result = ut(e.result, a, o), n?.(e, t);
|
|
1027
|
+
}), a;
|
|
1028
|
+
}, vt = (e) => {
|
|
1029
|
+
let t = () => ({
|
|
1030
|
+
userId: r.state.userId,
|
|
1031
|
+
projectsIds: [],
|
|
1032
|
+
nextOffset: 0,
|
|
1033
|
+
isLoading: !1,
|
|
1034
|
+
needFind: !0
|
|
1035
|
+
}), n = t(), i = (e, t) => {
|
|
1036
|
+
let r = n.projectsIds.indexOf(e);
|
|
1037
|
+
if (r === -1) return;
|
|
1038
|
+
if (r === 0 && t) {
|
|
1039
|
+
n.needFind = !1;
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
let i = t ? -1 : 1;
|
|
1043
|
+
return n.projectsIds[r + i];
|
|
1044
|
+
};
|
|
1045
|
+
return { getNextProjectId: async (a, o = !1) => {
|
|
1046
|
+
if (n.isLoading) return;
|
|
1047
|
+
n.userId !== r.state.userId && (n = t());
|
|
1048
|
+
let s = _t(e, !1);
|
|
1049
|
+
s.changeParams({ limit: 1e3 });
|
|
1050
|
+
let c;
|
|
1051
|
+
for (n.isLoading = !0, n.needFind = !0; c = i(a, o), n.needFind && !c && n.nextOffset !== null;) {
|
|
1052
|
+
s.changeParams({ offset: n.nextOffset });
|
|
1053
|
+
let e = await s.call();
|
|
1054
|
+
if (e.errors) break;
|
|
1055
|
+
n.nextOffset = e.nextOffset ?? null, n.projectsIds.push(...e.result.map((e) => e.id));
|
|
1056
|
+
}
|
|
1057
|
+
return n.isLoading = !1, c;
|
|
1058
|
+
} };
|
|
1059
|
+
}, yt = (e) => e.gen("/add/projects_2/projects/"), bt = { class: "top-ellipsis1" }, xt = /* @__PURE__ */ M({
|
|
1019
1060
|
__name: "submenu",
|
|
1020
1061
|
props: { id: {} },
|
|
1021
1062
|
setup(e) {
|
|
1022
|
-
let t = e, i = n(), a =
|
|
1063
|
+
let t = e, i = n(), a = mt(), o = (e) => {
|
|
1023
1064
|
let t = [
|
|
1024
1065
|
{
|
|
1025
1066
|
href: `https://${a}/project/keywords/${e.id}/`,
|
|
@@ -1096,60 +1137,60 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1096
1137
|
].filter((e) => !Object.entries(r.state.closedByMod).some(([t, n]) => n && e.href.includes(`/${t}/`)));
|
|
1097
1138
|
return e.right.includes("0") ? t.filter((t) => e.right[t.right] === "1") : t;
|
|
1098
1139
|
};
|
|
1099
|
-
return (e, n) => (
|
|
1140
|
+
return (e, n) => (F(), E(R(y), {
|
|
1100
1141
|
id: t.id,
|
|
1101
1142
|
class: "top-projectSelectorSubmenu",
|
|
1102
1143
|
notch: !1,
|
|
1103
1144
|
pos: "2"
|
|
1104
1145
|
}, {
|
|
1105
|
-
contentList:
|
|
1146
|
+
contentList: V(({ data: t }) => [t ? (F(), O(w, { key: 0 }, [(F(!0), O(w, null, oe(o(t.projectItem), (t) => (F(), E(R(_), {
|
|
1106
1147
|
href: t.href,
|
|
1107
1148
|
title: t.title,
|
|
1108
1149
|
"data-top-icon": t.icon,
|
|
1109
1150
|
"data-right": t.right
|
|
1110
1151
|
}, {
|
|
1111
|
-
default:
|
|
1152
|
+
default: V(() => [A(L(e.$core.state.isMobile ? t.title : ""), 1)]),
|
|
1112
1153
|
_: 2
|
|
1113
1154
|
}, 1032, [
|
|
1114
1155
|
"href",
|
|
1115
1156
|
"title",
|
|
1116
1157
|
"data-top-icon",
|
|
1117
1158
|
"data-right"
|
|
1118
|
-
]))), 256)),
|
|
1159
|
+
]))), 256)), j(R(_), {
|
|
1119
1160
|
href: t.projectItem.externalLink,
|
|
1120
1161
|
title: t.projectItem.externalLink,
|
|
1121
1162
|
class: "top-ellipsis",
|
|
1122
1163
|
"data-top-icon": "",
|
|
1123
1164
|
target: "_blank"
|
|
1124
1165
|
}, {
|
|
1125
|
-
default:
|
|
1166
|
+
default: V(() => [k("span", bt, L(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
|
|
1126
1167
|
_: 2
|
|
1127
|
-
}, 1032, ["href", "title"])], 64)) :
|
|
1168
|
+
}, 1032, ["href", "title"])], 64)) : D("", !0)]),
|
|
1128
1169
|
_: 1
|
|
1129
1170
|
}, 8, ["id"]));
|
|
1130
1171
|
}
|
|
1131
|
-
}),
|
|
1132
|
-
localStorage.setItem(
|
|
1172
|
+
}), J = "ui_project_selector_total", St = 864e5, Y = I(null), X = de(), Ct = (e) => {
|
|
1173
|
+
localStorage.setItem(J + ":" + r.state.userId, JSON.stringify({
|
|
1133
1174
|
projectsTotal: e,
|
|
1134
|
-
expiresAt: Date.now() +
|
|
1175
|
+
expiresAt: Date.now() + St
|
|
1135
1176
|
}));
|
|
1136
|
-
},
|
|
1137
|
-
let e = localStorage.getItem(
|
|
1177
|
+
}, wt = () => {
|
|
1178
|
+
let e = localStorage.getItem(J + ":" + r.state.userId);
|
|
1138
1179
|
if (!e) return;
|
|
1139
1180
|
let { projectsTotal: t, expiresAt: n } = JSON.parse(e);
|
|
1140
1181
|
if (Date.now() > n) {
|
|
1141
|
-
localStorage.removeItem(
|
|
1182
|
+
localStorage.removeItem(J + ":" + r.state.userId);
|
|
1142
1183
|
return;
|
|
1143
1184
|
}
|
|
1144
1185
|
return t;
|
|
1145
|
-
},
|
|
1146
|
-
|
|
1147
|
-
},
|
|
1186
|
+
}, Tt = () => {
|
|
1187
|
+
Y.value = null, X.value = void 0, localStorage.removeItem(J + ":" + r.state.userId), S("/get/projects_2/projects/");
|
|
1188
|
+
}, Et = { class: "top-projectSelector_itemText" }, Dt = { class: "top-comment" }, Ot = {
|
|
1148
1189
|
key: 0,
|
|
1149
1190
|
class: "top-comment"
|
|
1150
|
-
},
|
|
1191
|
+
}, kt = ["href"], At = 1e3, jt = /* @__PURE__ */ M({
|
|
1151
1192
|
__name: "projectSelector",
|
|
1152
|
-
props: /*@__PURE__*/
|
|
1193
|
+
props: /*@__PURE__*/ N({
|
|
1153
1194
|
modelValue: {},
|
|
1154
1195
|
client: {},
|
|
1155
1196
|
menuMode: { type: Boolean },
|
|
@@ -1169,65 +1210,70 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1169
1210
|
modelModifiers: {}
|
|
1170
1211
|
}),
|
|
1171
1212
|
emits: ["update:modelValue"],
|
|
1172
|
-
setup(e) {
|
|
1173
|
-
let
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1213
|
+
setup(e, { expose: t }) {
|
|
1214
|
+
let i = n(), a = e, o = z(e, "modelValue"), s = _t(a.client), c = yt(a.client), l = I(wt()), f = I(null), p = pe(), m = T(() => a.placeholder ?? i.Projects.Select_project), g = T(() => !X.value || !a.excludeProjectId ? X.value : X.value.filter((e) => e.id !== a.excludeProjectId)), { getNextProjectId: _ } = vt(a.client), v = async (e = !1) => {
|
|
1215
|
+
let t = o.value.id;
|
|
1216
|
+
if (!t) return;
|
|
1217
|
+
let n = await _(t, e);
|
|
1218
|
+
n && ft(n);
|
|
1219
|
+
}, y = T(() => {
|
|
1220
|
+
if (l.value || l.value === 0) return l.value < At ? "static" : "api";
|
|
1221
|
+
}), x = async () => {
|
|
1222
|
+
Y.value ||= s.call();
|
|
1223
|
+
let e = await Y.value;
|
|
1224
|
+
return Y.value = null, e;
|
|
1225
|
+
}, S = async (e) => {
|
|
1226
|
+
let t = await c.changeParams({
|
|
1181
1227
|
url: e.name,
|
|
1182
1228
|
name: e.name
|
|
1183
1229
|
}).call();
|
|
1184
1230
|
if (!t.errors) {
|
|
1185
|
-
if (
|
|
1186
|
-
let n =
|
|
1231
|
+
if (X.value && y.value === "static") {
|
|
1232
|
+
let n = lt({
|
|
1187
1233
|
id: t.result,
|
|
1188
1234
|
user_id: r.state.userId,
|
|
1189
1235
|
name: e.name,
|
|
1190
1236
|
url: e.name,
|
|
1191
1237
|
on: 0,
|
|
1192
1238
|
right: "11111111111111111111"
|
|
1193
|
-
}), i =
|
|
1194
|
-
|
|
1195
|
-
...
|
|
1239
|
+
}), i = X.value.findIndex((e) => e.on === 0);
|
|
1240
|
+
X.value = [
|
|
1241
|
+
...X.value.slice(0, i),
|
|
1196
1242
|
n,
|
|
1197
|
-
...
|
|
1198
|
-
],
|
|
1243
|
+
...X.value.slice(i)
|
|
1244
|
+
], l.value && (l.value += 1, Ct(l.value));
|
|
1199
1245
|
}
|
|
1200
|
-
|
|
1246
|
+
y.value === "api" && f.value?.resetCache(!0);
|
|
1201
1247
|
}
|
|
1248
|
+
}, C = async () => {
|
|
1249
|
+
if (X.value || y.value === "api") return;
|
|
1250
|
+
let e = await x();
|
|
1251
|
+
e.errors || (X.value = e.result);
|
|
1202
1252
|
}, ee = async () => {
|
|
1203
|
-
if (
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
}, y = async () => {
|
|
1207
|
-
if (c.value) {
|
|
1208
|
-
let e = l.value?.popupOpenerRef?.$el;
|
|
1209
|
-
e && e.addEventListener("pointerenter", () => ee(), { once: !0 });
|
|
1253
|
+
if (l.value) {
|
|
1254
|
+
let e = f.value?.popupOpenerRef?.$el;
|
|
1255
|
+
e && e.addEventListener("pointerenter", () => C(), { once: !0 });
|
|
1210
1256
|
} else {
|
|
1211
|
-
|
|
1212
|
-
let e = await
|
|
1257
|
+
s.changeParams({ limit: At });
|
|
1258
|
+
let e = await x();
|
|
1213
1259
|
if (e.errors) return;
|
|
1214
|
-
delete
|
|
1260
|
+
delete s.params.limit, l.value = e.total ?? void 0, !X.value && y.value !== "api" && (X.value = e.result), l.value && Ct(l.value);
|
|
1215
1261
|
}
|
|
1216
1262
|
};
|
|
1217
|
-
return
|
|
1218
|
-
await
|
|
1263
|
+
return t({ goToNextProject: v }), ie(async () => {
|
|
1264
|
+
await ee();
|
|
1219
1265
|
}), (t, n) => {
|
|
1220
|
-
let r =
|
|
1221
|
-
return
|
|
1222
|
-
key:
|
|
1266
|
+
let r = ce("TopButton");
|
|
1267
|
+
return F(), O(w, null, [(F(), E(b, {
|
|
1268
|
+
key: y.value ?? "dummy",
|
|
1223
1269
|
ref_key: "refSelector",
|
|
1224
|
-
ref:
|
|
1270
|
+
ref: f,
|
|
1225
1271
|
class: "top-projectSelector",
|
|
1226
|
-
modelValue:
|
|
1227
|
-
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ?
|
|
1228
|
-
items:
|
|
1272
|
+
modelValue: o.value,
|
|
1273
|
+
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? R(ft)(t.id) : o.value = t,
|
|
1274
|
+
items: g.value,
|
|
1229
1275
|
itemsChunkSize: 100,
|
|
1230
|
-
itemsIsLoading:
|
|
1276
|
+
itemsIsLoading: y.value === "static" && R(X) === void 0,
|
|
1231
1277
|
title: t.$i18n.Projects.Search_projects,
|
|
1232
1278
|
modificator: e.modificator,
|
|
1233
1279
|
searchFields: [
|
|
@@ -1235,52 +1281,52 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1235
1281
|
"name",
|
|
1236
1282
|
"url"
|
|
1237
1283
|
],
|
|
1238
|
-
placeholder:
|
|
1284
|
+
placeholder: m.value,
|
|
1239
1285
|
hasCloserBtn: "",
|
|
1240
|
-
api:
|
|
1241
|
-
apiSetSearchParams:
|
|
1286
|
+
api: y.value === "api" ? R(s) : void 0,
|
|
1287
|
+
apiSetSearchParams: y.value === "api" ? (...e) => R(gt)(...e) : void 0,
|
|
1242
1288
|
useCache: "",
|
|
1243
1289
|
appendSearchToResult: "",
|
|
1244
1290
|
appendSearchAllowDuplicate: "",
|
|
1245
|
-
appendSearchToResultCond:
|
|
1291
|
+
appendSearchToResultCond: R(u),
|
|
1246
1292
|
appendWithoutSelect: "",
|
|
1247
1293
|
buttonProps: {
|
|
1248
1294
|
...e.buttonProps,
|
|
1249
|
-
isProgress: !
|
|
1250
|
-
disabled: !
|
|
1295
|
+
isProgress: !y.value,
|
|
1296
|
+
disabled: !y.value
|
|
1251
1297
|
},
|
|
1252
1298
|
openerShortcut: e.openerShortcut,
|
|
1253
|
-
onAppendItem:
|
|
1254
|
-
onOpen:
|
|
1299
|
+
onAppendItem: S,
|
|
1300
|
+
onOpen: C
|
|
1255
1301
|
}, {
|
|
1256
|
-
item:
|
|
1257
|
-
e.menuMode ? (
|
|
1302
|
+
item: V(({ item: i }) => [k("div", Et, [i.id ? (F(), O(w, { key: 0 }, [A(L(R(d)(i.name, 20)) + " ", 1), k("span", Dt, " id " + L(i.id), 1)], 64)) : (F(), O(w, { key: 1 }, [i.listItemProps?.type ? D("", !0) : (F(), O("div", Ot, L(t.$i18n.Projects.Add_project) + ": ", 1)), A(" " + L(i.name), 1)], 64))]), i.id ? (F(), O(w, { key: 0 }, [
|
|
1303
|
+
e.menuMode ? (F(), O("a", {
|
|
1258
1304
|
key: 0,
|
|
1259
1305
|
class: "top-projectSelector_itemLink",
|
|
1260
|
-
href:
|
|
1261
|
-
}, null, 8,
|
|
1262
|
-
t.$core.state.isMobile ?
|
|
1306
|
+
href: R(pt)(i.id)
|
|
1307
|
+
}, null, 8, kt)) : D("", !0),
|
|
1308
|
+
t.$core.state.isMobile ? D("", !0) : (F(), E(r, {
|
|
1263
1309
|
key: 1,
|
|
1264
1310
|
href: i.externalLink,
|
|
1265
1311
|
"data-top-icon": "",
|
|
1266
1312
|
color: "theme",
|
|
1267
1313
|
target: "_blank",
|
|
1268
|
-
onClick: n[0] ||=
|
|
1314
|
+
onClick: n[0] ||= H(() => {}, ["stop"])
|
|
1269
1315
|
}, null, 8, ["href"])),
|
|
1270
|
-
|
|
1271
|
-
id:
|
|
1316
|
+
j(h, {
|
|
1317
|
+
id: R(p),
|
|
1272
1318
|
pos: "2",
|
|
1273
1319
|
notch: !1,
|
|
1274
1320
|
data: { projectItem: i }
|
|
1275
1321
|
}, {
|
|
1276
|
-
default:
|
|
1322
|
+
default: V(() => [j(r, {
|
|
1277
1323
|
class: "top-popup_listMore",
|
|
1278
1324
|
"data-top-icon": "",
|
|
1279
1325
|
color: "theme"
|
|
1280
1326
|
})]),
|
|
1281
1327
|
_: 1
|
|
1282
1328
|
}, 8, ["id", "data"])
|
|
1283
|
-
], 64)) :
|
|
1329
|
+
], 64)) : D("", !0)]),
|
|
1284
1330
|
_: 1
|
|
1285
1331
|
}, 8, [
|
|
1286
1332
|
"modelValue",
|
|
@@ -1294,11 +1340,11 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1294
1340
|
"appendSearchToResultCond",
|
|
1295
1341
|
"buttonProps",
|
|
1296
1342
|
"openerShortcut"
|
|
1297
|
-
])),
|
|
1343
|
+
])), j(xt, { id: R(p) }, null, 8, ["id"])], 64);
|
|
1298
1344
|
};
|
|
1299
1345
|
}
|
|
1300
|
-
}),
|
|
1301
|
-
e =
|
|
1346
|
+
}), Mt = (e) => "-" + e, Z = (e) => e[0] === "-" ? e.substring(1) : e, Nt = (e, t) => {
|
|
1347
|
+
e = Z(e);
|
|
1302
1348
|
let n = t.find((t) => t.id === e);
|
|
1303
1349
|
if (n) return n;
|
|
1304
1350
|
}, Pt = (e, t, n) => {
|
|
@@ -1306,31 +1352,31 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1306
1352
|
let r = c.genElPopupOpener("div", t);
|
|
1307
1353
|
return r.classList.add("top-tagSelector"), e.useTopButton && r.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || r.classList.add("top-tagSelector-custom"), e.mode === "filter" && r.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && r.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && r.classList.add("top-tagSelector-setter_several"), r.onclick = (t) => {
|
|
1308
1354
|
t.preventDefault(), t.stopPropagation(), r.onclick = null;
|
|
1309
|
-
let i =
|
|
1355
|
+
let i = I(e.modelValue), a = {
|
|
1310
1356
|
model: i,
|
|
1311
1357
|
mode: e.mode,
|
|
1312
1358
|
targetId: e.targetId,
|
|
1313
1359
|
filters: e.filters,
|
|
1314
1360
|
payload: e.payload
|
|
1315
1361
|
};
|
|
1316
|
-
s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled,
|
|
1317
|
-
e.modelValue = i.value,
|
|
1362
|
+
s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, te(e.modelValue) || B(i, () => {
|
|
1363
|
+
e.modelValue = i.value, It(r, e, n);
|
|
1318
1364
|
}), r.click();
|
|
1319
|
-
},
|
|
1365
|
+
}, te(e.modelValue) ? B(e.modelValue, () => It(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
|
|
1320
1366
|
e.modelValue = t;
|
|
1321
1367
|
let i = s(r, "topTagSelectorTarget");
|
|
1322
|
-
i && (i.model.value = t),
|
|
1323
|
-
}),
|
|
1368
|
+
i && (i.model.value = t), It(r, e, n);
|
|
1369
|
+
}), It(r, e, n), r;
|
|
1324
1370
|
}, Ft = (e, t) => {
|
|
1325
1371
|
s(e, "topTagSelectorRender")?.(t);
|
|
1326
|
-
},
|
|
1327
|
-
let i =
|
|
1372
|
+
}, It = (e, t, r) => {
|
|
1373
|
+
let i = R(t.modelValue);
|
|
1328
1374
|
if (e.classList.toggle("top-tagSelector-selectedOne", !i.length || i.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", i.length > 5), t.mode === "setter" && t.filters) {
|
|
1329
1375
|
e.innerHTML = `<div>${r}</div>`;
|
|
1330
1376
|
return;
|
|
1331
1377
|
}
|
|
1332
1378
|
if (e.innerHTML = "", !i.length && t.mode === "filter") {
|
|
1333
|
-
let t =
|
|
1379
|
+
let t = Lt({
|
|
1334
1380
|
id: "all",
|
|
1335
1381
|
colorId: "",
|
|
1336
1382
|
name: n().Common?.All_tags ?? "",
|
|
@@ -1339,18 +1385,18 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1339
1385
|
e.append(t);
|
|
1340
1386
|
}
|
|
1341
1387
|
i.forEach((n) => {
|
|
1342
|
-
let r =
|
|
1343
|
-
id:
|
|
1344
|
-
colorId:
|
|
1345
|
-
name:
|
|
1346
|
-
state:
|
|
1388
|
+
let r = Lt({
|
|
1389
|
+
id: Z(n),
|
|
1390
|
+
colorId: Nt(n, t.tags)?.color_id ?? "",
|
|
1391
|
+
name: Nt(n, t.tags)?.name ?? "",
|
|
1392
|
+
state: Z(n) === n ? "selected" : "excluded"
|
|
1347
1393
|
});
|
|
1348
1394
|
e.append(r);
|
|
1349
1395
|
});
|
|
1350
|
-
},
|
|
1396
|
+
}, Lt = (e) => {
|
|
1351
1397
|
let t = document.createElement("div");
|
|
1352
1398
|
return t.classList.add("top-tagSelector_tagIcon"), t.classList.toggle("top-tagSelector-active", !!e.state), t.classList.toggle("top-tagSelector-excluded", e.state === "excluded"), t.dataset.tag_id = e.id, t.dataset.tag_color_id = e.colorId, t.title = e.name, t;
|
|
1353
|
-
},
|
|
1399
|
+
}, Rt = [
|
|
1354
1400
|
{
|
|
1355
1401
|
id: "1",
|
|
1356
1402
|
name: "Without Tag",
|
|
@@ -1401,11 +1447,11 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1401
1447
|
name: "Turquoise",
|
|
1402
1448
|
color_id: "10"
|
|
1403
1449
|
}
|
|
1404
|
-
],
|
|
1450
|
+
], zt = [
|
|
1405
1451
|
"data-tag_id",
|
|
1406
1452
|
"data-tag_color_id",
|
|
1407
1453
|
"title"
|
|
1408
|
-
],
|
|
1454
|
+
], Q = /* @__PURE__ */ M({
|
|
1409
1455
|
__name: "tagIcon",
|
|
1410
1456
|
props: {
|
|
1411
1457
|
id: {},
|
|
@@ -1414,8 +1460,8 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1414
1460
|
state: {}
|
|
1415
1461
|
},
|
|
1416
1462
|
setup(e) {
|
|
1417
|
-
return (t, n) => (
|
|
1418
|
-
class:
|
|
1463
|
+
return (t, n) => (F(), O("div", {
|
|
1464
|
+
class: P({
|
|
1419
1465
|
"top-tagSelector_tagIcon": !0,
|
|
1420
1466
|
"top-tagSelector-active": !!e.state,
|
|
1421
1467
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
@@ -1423,11 +1469,11 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1423
1469
|
"data-tag_id": e.id,
|
|
1424
1470
|
"data-tag_color_id": e.colorId,
|
|
1425
1471
|
title: e.name
|
|
1426
|
-
}, null, 10,
|
|
1472
|
+
}, null, 10, zt));
|
|
1427
1473
|
}
|
|
1428
|
-
}), Bt = ["contenteditable", "onKeydown"], Vt = /* @__PURE__ */
|
|
1474
|
+
}), Bt = ["contenteditable", "onKeydown"], Vt = /* @__PURE__ */ M({
|
|
1429
1475
|
__name: "tagPopupListItem",
|
|
1430
|
-
props: /*@__PURE__*/
|
|
1476
|
+
props: /*@__PURE__*/ N({
|
|
1431
1477
|
editable: { type: Boolean },
|
|
1432
1478
|
disabled: { type: Boolean },
|
|
1433
1479
|
canExclude: { type: Boolean },
|
|
@@ -1439,18 +1485,18 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1439
1485
|
name: { required: !0 },
|
|
1440
1486
|
nameModifiers: {}
|
|
1441
1487
|
}),
|
|
1442
|
-
emits: /*@__PURE__*/
|
|
1488
|
+
emits: /*@__PURE__*/ N([
|
|
1443
1489
|
"update:name",
|
|
1444
1490
|
"unselect",
|
|
1445
1491
|
"exclude",
|
|
1446
1492
|
"select"
|
|
1447
1493
|
], ["update:name"]),
|
|
1448
1494
|
setup(e, { emit: t }) {
|
|
1449
|
-
let n = e, r = t, i =
|
|
1495
|
+
let n = e, r = t, i = z(e, "name"), a = I(null), o = T(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
|
|
1450
1496
|
contenteditable: s.value,
|
|
1451
1497
|
onpaste: (e) => e.preventDefault()
|
|
1452
|
-
}), s =
|
|
1453
|
-
s.value = !0, await
|
|
1498
|
+
}), s = I(!1), c = async () => {
|
|
1499
|
+
s.value = !0, await re(), a.value?.focus();
|
|
1454
1500
|
}, l = () => {
|
|
1455
1501
|
let e = a.value?.innerText;
|
|
1456
1502
|
if (!e) return u();
|
|
@@ -1462,8 +1508,8 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1462
1508
|
let t = "selected";
|
|
1463
1509
|
n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
|
|
1464
1510
|
};
|
|
1465
|
-
return (t, n) => (
|
|
1466
|
-
class:
|
|
1511
|
+
return (t, n) => (F(), E(_, {
|
|
1512
|
+
class: P({
|
|
1467
1513
|
"top-tagSelector_tagListItem": !0,
|
|
1468
1514
|
"top-tagSelector_tagListItem-inEdit": s.value,
|
|
1469
1515
|
"top-tagSelector_tagListItem-disabled": e.disabled,
|
|
@@ -1471,10 +1517,10 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1471
1517
|
"top-tagSelector-active": !!e.state,
|
|
1472
1518
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
1473
1519
|
}),
|
|
1474
|
-
onClick:
|
|
1520
|
+
onClick: H(d, ["stop"])
|
|
1475
1521
|
}, {
|
|
1476
|
-
default:
|
|
1477
|
-
|
|
1522
|
+
default: V(() => [
|
|
1523
|
+
j(Q, {
|
|
1478
1524
|
id: e.id,
|
|
1479
1525
|
name: i.value,
|
|
1480
1526
|
colorId: e.colorId,
|
|
@@ -1485,31 +1531,31 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1485
1531
|
"colorId",
|
|
1486
1532
|
"state"
|
|
1487
1533
|
]),
|
|
1488
|
-
|
|
1534
|
+
k("span", ne({
|
|
1489
1535
|
ref_key: "elName",
|
|
1490
1536
|
ref: a,
|
|
1491
1537
|
class: "top-tagSelector_tagListItemName",
|
|
1492
1538
|
contenteditable: s.value ? "plaintext-only" : !1
|
|
1493
|
-
}, o.value, { onKeydown: [
|
|
1494
|
-
e.editable ? (
|
|
1539
|
+
}, o.value, { onKeydown: [he(H(l, ["stop"]), ["enter"]), he(H(u, ["stop"]), ["esc"])] }), L(i.value), 17, Bt),
|
|
1540
|
+
e.editable ? (F(), O(w, { key: 0 }, [s.value ? (F(), O("span", {
|
|
1495
1541
|
key: 1,
|
|
1496
1542
|
"data-top-icon": "",
|
|
1497
1543
|
class: "top-tagSelector_edit",
|
|
1498
|
-
onClick:
|
|
1499
|
-
})) : (
|
|
1544
|
+
onClick: H(l, ["stop"])
|
|
1545
|
+
})) : (F(), O("span", {
|
|
1500
1546
|
key: 0,
|
|
1501
1547
|
"data-top-icon": "",
|
|
1502
1548
|
class: "top-tagSelector_edit",
|
|
1503
1549
|
onClick: c
|
|
1504
|
-
}))], 64)) :
|
|
1550
|
+
}))], 64)) : D("", !0)
|
|
1505
1551
|
]),
|
|
1506
1552
|
_: 1
|
|
1507
1553
|
}, 8, ["class"]));
|
|
1508
1554
|
}
|
|
1509
|
-
}), Ht = { key: 1 }, Ut = /* @__PURE__ */
|
|
1555
|
+
}), Ht = { key: 1 }, Ut = /* @__PURE__ */ M({
|
|
1510
1556
|
inheritAttrs: !1,
|
|
1511
1557
|
__name: "popupOpener",
|
|
1512
|
-
props: /*@__PURE__*/
|
|
1558
|
+
props: /*@__PURE__*/ N({
|
|
1513
1559
|
modelValue: {},
|
|
1514
1560
|
id: {},
|
|
1515
1561
|
tags: {},
|
|
@@ -1525,7 +1571,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1525
1571
|
}),
|
|
1526
1572
|
emits: ["update:modelValue"],
|
|
1527
1573
|
setup(e, { attrs: t }) {
|
|
1528
|
-
let n = e, r =
|
|
1574
|
+
let n = e, r = z(e, "modelValue"), i = n.useTopButton ? a : "div", o = n.useTopButton ? "html" : "default", s = {
|
|
1529
1575
|
model: r,
|
|
1530
1576
|
mode: n.mode,
|
|
1531
1577
|
targetId: n.targetId,
|
|
@@ -1533,9 +1579,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1533
1579
|
payload: n.payload
|
|
1534
1580
|
};
|
|
1535
1581
|
return (a, c) => {
|
|
1536
|
-
let l =
|
|
1537
|
-
return
|
|
1538
|
-
default:
|
|
1582
|
+
let l = le("top-data");
|
|
1583
|
+
return F(), E(h, { id: e.id }, {
|
|
1584
|
+
default: V(() => [me((F(), E(ue(R(i)), ne({
|
|
1539
1585
|
class: {
|
|
1540
1586
|
"top-tagSelector": !0,
|
|
1541
1587
|
"top-tagSelector-useTopButton": n.useTopButton,
|
|
@@ -1550,17 +1596,17 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1550
1596
|
color: "theme",
|
|
1551
1597
|
styling: e.styling
|
|
1552
1598
|
}, t), {
|
|
1553
|
-
[
|
|
1599
|
+
[R(o)]: V(() => [!r.value.length && e.mode === "filter" ? (F(), E(Q, {
|
|
1554
1600
|
key: 0,
|
|
1555
1601
|
id: "all",
|
|
1556
1602
|
colorId: "",
|
|
1557
1603
|
name: a.$i18n.Common.All_tags ?? "",
|
|
1558
1604
|
state: ""
|
|
1559
|
-
}, null, 8, ["name"])) :
|
|
1560
|
-
id:
|
|
1561
|
-
colorId:
|
|
1562
|
-
name:
|
|
1563
|
-
state:
|
|
1605
|
+
}, null, 8, ["name"])) : D("", !0), e.mode === "setter" && e.filters ? (F(), O("div", Ht, [se(a.$slots, "default")])) : (F(!0), O(w, { key: 2 }, oe(r.value, (t) => (F(), E(Q, {
|
|
1606
|
+
id: R(Z)(t),
|
|
1607
|
+
colorId: R(Nt)(t, e.tags)?.color_id ?? "",
|
|
1608
|
+
name: R(Nt)(t, e.tags)?.name ?? "",
|
|
1609
|
+
state: R(Z)(t) === t ? "selected" : "excluded"
|
|
1564
1610
|
}, null, 8, [
|
|
1565
1611
|
"id",
|
|
1566
1612
|
"colorId",
|
|
@@ -1577,9 +1623,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1577
1623
|
}, 8, ["id"]);
|
|
1578
1624
|
};
|
|
1579
1625
|
}
|
|
1580
|
-
}), Wt = /* @__PURE__ */
|
|
1626
|
+
}), Wt = /* @__PURE__ */ M({
|
|
1581
1627
|
__name: "tagSelector",
|
|
1582
|
-
props: /*@__PURE__*/
|
|
1628
|
+
props: /*@__PURE__*/ N({
|
|
1583
1629
|
modelValue: {},
|
|
1584
1630
|
tags: {},
|
|
1585
1631
|
tagsEditable: { type: Boolean },
|
|
@@ -1600,20 +1646,20 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1600
1646
|
}, {
|
|
1601
1647
|
modelValue: { required: !0 },
|
|
1602
1648
|
modelModifiers: {},
|
|
1603
|
-
tags: { default:
|
|
1649
|
+
tags: { default: ae(Rt) },
|
|
1604
1650
|
tagsModifiers: {}
|
|
1605
1651
|
}),
|
|
1606
|
-
emits: /*@__PURE__*/
|
|
1652
|
+
emits: /*@__PURE__*/ N([
|
|
1607
1653
|
"selector",
|
|
1608
1654
|
"setter",
|
|
1609
1655
|
"tagsChanged"
|
|
1610
1656
|
], ["update:modelValue", "update:tags"]),
|
|
1611
1657
|
setup(e, { emit: t }) {
|
|
1612
|
-
let c = n(), l = e, u =
|
|
1658
|
+
let c = n(), l = e, u = z(e, "modelValue"), d = z(e, "tags"), f = t, p = i((e, t) => {
|
|
1613
1659
|
f(e, t);
|
|
1614
1660
|
}, l.emitDelay);
|
|
1615
1661
|
l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
|
|
1616
|
-
let m = l.id ?? "top-popup-id-" + Math.random(), h =
|
|
1662
|
+
let m = l.id ?? "top-popup-id-" + Math.random(), h = I("add"), g = () => {
|
|
1617
1663
|
let e = " " + c.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
|
|
1618
1664
|
return t.set("add", {
|
|
1619
1665
|
value: "add",
|
|
@@ -1625,35 +1671,35 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1625
1671
|
value: "delete",
|
|
1626
1672
|
title: c.Common.Delete + e
|
|
1627
1673
|
}), t;
|
|
1628
|
-
},
|
|
1674
|
+
}, v = de({
|
|
1629
1675
|
model: u,
|
|
1630
1676
|
mode: "filter",
|
|
1631
1677
|
targetId: void 0,
|
|
1632
1678
|
filters: void 0,
|
|
1633
1679
|
payload: void 0
|
|
1634
1680
|
});
|
|
1635
|
-
|
|
1681
|
+
B(u, () => {
|
|
1636
1682
|
p("selector", u.value);
|
|
1637
1683
|
});
|
|
1638
|
-
let
|
|
1639
|
-
if (
|
|
1640
|
-
}),
|
|
1684
|
+
let b = T(() => {
|
|
1685
|
+
if (v.value.mode === "setter" && l.maxTagsForSetter && !v.value.filters) return v.value.model.value.length >= l.maxTagsForSetter;
|
|
1686
|
+
}), x = (e) => {
|
|
1641
1687
|
if (e !== "all") {
|
|
1642
|
-
if (
|
|
1643
|
-
if (
|
|
1688
|
+
if (v.value.model.value.includes(e)) return "selected";
|
|
1689
|
+
if (v.value.model.value.includes(Mt(e))) return "excluded";
|
|
1644
1690
|
}
|
|
1645
|
-
return e === "all" && !
|
|
1646
|
-
},
|
|
1647
|
-
let n =
|
|
1648
|
-
t === "select" && r.push(e), t === "exclude" && r.push(n),
|
|
1691
|
+
return e === "all" && !v.value.model.value.length ? "selected" : "";
|
|
1692
|
+
}, S = (e, t) => {
|
|
1693
|
+
let n = Mt(e), r = v.value.model.value.filter((t) => t !== e && t !== n);
|
|
1694
|
+
t === "select" && r.push(e), t === "exclude" && r.push(n), v.value.mode === "setter" && v.value.targetId !== void 0 && l.requiredForSetter && (r.length || r.push("1"), r.length === 2 && v.value.model.value.length === 1 && v.value.model.value[0] === "1" && (r = r.filter((e) => e !== "1"))), l.singleMode && !v.value.filters && (r.length || (r = v.value.model.value), r.length > 1 && (r = [r[r.length - 1]])), r.sort((e, t) => l.tags ? l.tags.findIndex((t) => t.id === e) - l.tags.findIndex((e) => e.id === t) : 0), v.value.model.value = r, v.value.mode === "setter" && v.value.targetId !== void 0 && p("setter", {
|
|
1649
1695
|
tagsIds: r,
|
|
1650
|
-
targetId:
|
|
1651
|
-
payload:
|
|
1696
|
+
targetId: v.value.targetId,
|
|
1697
|
+
payload: v.value.payload
|
|
1652
1698
|
});
|
|
1653
|
-
},
|
|
1699
|
+
}, C = T(() => {
|
|
1654
1700
|
let e = "top-tagSelector_popup";
|
|
1655
|
-
return
|
|
1656
|
-
}),
|
|
1701
|
+
return v.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), v.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
|
|
1702
|
+
}), k = () => {
|
|
1657
1703
|
let e = prompt("", "New tag");
|
|
1658
1704
|
if (!e || e === "New tag") return;
|
|
1659
1705
|
let t = d.value.length + 1;
|
|
@@ -1662,9 +1708,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1662
1708
|
name: e,
|
|
1663
1709
|
color_id: String((t - 1) % 10 + 1)
|
|
1664
1710
|
}), f("tagsChanged", d.value);
|
|
1665
|
-
},
|
|
1666
|
-
if (
|
|
1667
|
-
if (
|
|
1711
|
+
}, M = (e) => {
|
|
1712
|
+
if (v.value = s(e.elPopupOpener, "topTagSelectorTarget"), !v.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1713
|
+
if (v.value.filters && (h.value = "add", v.value.model.value = []), !r.$?.ui.sortable) {
|
|
1668
1714
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
1669
1715
|
return;
|
|
1670
1716
|
}
|
|
@@ -1682,13 +1728,13 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1682
1728
|
}), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
|
|
1683
1729
|
}
|
|
1684
1730
|
});
|
|
1685
|
-
},
|
|
1731
|
+
}, te = (e) => {
|
|
1686
1732
|
r.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
|
|
1687
1733
|
};
|
|
1688
|
-
return (t, n) => (
|
|
1734
|
+
return (t, n) => (F(), O(w, null, [j(Ut, {
|
|
1689
1735
|
modelValue: u.value,
|
|
1690
1736
|
"onUpdate:modelValue": n[0] ||= (e) => u.value = e,
|
|
1691
|
-
id:
|
|
1737
|
+
id: R(m),
|
|
1692
1738
|
tags: d.value,
|
|
1693
1739
|
styling: e.styling,
|
|
1694
1740
|
mode: "filter",
|
|
@@ -1699,36 +1745,36 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1699
1745
|
"tags",
|
|
1700
1746
|
"styling",
|
|
1701
1747
|
"useTopButton"
|
|
1702
|
-
]),
|
|
1703
|
-
id:
|
|
1704
|
-
class:
|
|
1705
|
-
onOpen: n[4] ||= (e) =>
|
|
1706
|
-
onClose: n[5] ||= (e) =>
|
|
1748
|
+
]), j(y, {
|
|
1749
|
+
id: R(m),
|
|
1750
|
+
class: P(C.value),
|
|
1751
|
+
onOpen: n[4] ||= (e) => M(e),
|
|
1752
|
+
onClose: n[5] ||= (e) => te(e),
|
|
1707
1753
|
"transition-duration": 50
|
|
1708
|
-
},
|
|
1709
|
-
contentList:
|
|
1710
|
-
|
|
1754
|
+
}, ee({
|
|
1755
|
+
contentList: V(() => [
|
|
1756
|
+
v.value.mode === "filter" && !e.singleMode ? (F(), E(Vt, {
|
|
1711
1757
|
key: 0,
|
|
1712
1758
|
id: "all",
|
|
1713
1759
|
colorId: "",
|
|
1714
1760
|
name: t.$i18n.Common.All_tags ?? "",
|
|
1715
|
-
state:
|
|
1716
|
-
onSelect: n[3] ||= (e) =>
|
|
1717
|
-
}, null, 8, ["name", "state"])) :
|
|
1718
|
-
(
|
|
1761
|
+
state: v.value.model.value.length ? "" : "selected",
|
|
1762
|
+
onSelect: n[3] ||= (e) => v.value.model.value = []
|
|
1763
|
+
}, null, 8, ["name", "state"])) : D("", !0),
|
|
1764
|
+
(F(!0), O(w, null, oe(d.value, (t) => (F(), E(Vt, {
|
|
1719
1765
|
key: t.id,
|
|
1720
1766
|
id: t.id,
|
|
1721
1767
|
colorId: t.color_id,
|
|
1722
1768
|
name: t.name,
|
|
1723
|
-
state:
|
|
1724
|
-
canExclude:
|
|
1769
|
+
state: x(t.id),
|
|
1770
|
+
canExclude: v.value.mode === "filter" && !e.singleMode,
|
|
1725
1771
|
editable: e.tagsEditable,
|
|
1726
|
-
disabled:
|
|
1727
|
-
onUnselect: (e) =>
|
|
1728
|
-
onSelect: (e) =>
|
|
1729
|
-
onExclude: (e) =>
|
|
1772
|
+
disabled: b.value && x(t.id) === "",
|
|
1773
|
+
onUnselect: (e) => S(t.id, "unselect"),
|
|
1774
|
+
onSelect: (e) => S(t.id, "select"),
|
|
1775
|
+
onExclude: (e) => S(t.id, "exclude"),
|
|
1730
1776
|
"onUpdate:name": (e) => {
|
|
1731
|
-
t.name = e,
|
|
1777
|
+
t.name = e, R(p)("tagsChanged", d.value);
|
|
1732
1778
|
}
|
|
1733
1779
|
}, null, 8, [
|
|
1734
1780
|
"id",
|
|
@@ -1743,36 +1789,36 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1743
1789
|
"onExclude",
|
|
1744
1790
|
"onUpdate:name"
|
|
1745
1791
|
]))), 128)),
|
|
1746
|
-
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (
|
|
1792
|
+
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (F(), E(_, {
|
|
1747
1793
|
key: 1,
|
|
1748
1794
|
"data-top-icon": "",
|
|
1749
|
-
onClick:
|
|
1795
|
+
onClick: H(k, ["stop"])
|
|
1750
1796
|
}, {
|
|
1751
|
-
default:
|
|
1797
|
+
default: V(() => [A(L(t.$i18n.Common.Add), 1)]),
|
|
1752
1798
|
_: 1
|
|
1753
|
-
})) :
|
|
1799
|
+
})) : D("", !0)
|
|
1754
1800
|
]),
|
|
1755
1801
|
_: 2
|
|
1756
|
-
}, [
|
|
1802
|
+
}, [v.value.mode === "setter" && v.value.filters ? {
|
|
1757
1803
|
name: "header",
|
|
1758
|
-
fn:
|
|
1804
|
+
fn: V(() => [j(o, {
|
|
1759
1805
|
modelValue: h.value,
|
|
1760
1806
|
"onUpdate:modelValue": n[1] ||= (e) => h.value = e,
|
|
1761
1807
|
options: g()
|
|
1762
1808
|
}, null, 8, ["modelValue", "options"])]),
|
|
1763
1809
|
key: "0"
|
|
1764
|
-
} : void 0,
|
|
1810
|
+
} : void 0, v.value.mode === "setter" && v.value.filters ? {
|
|
1765
1811
|
name: "footer",
|
|
1766
|
-
fn:
|
|
1767
|
-
default:
|
|
1812
|
+
fn: V(() => [j(a, { color: "theme" }, {
|
|
1813
|
+
default: V(() => [A(L(t.$i18n.Common.Cancel), 1)]),
|
|
1768
1814
|
_: 1
|
|
1769
|
-
}),
|
|
1770
|
-
tagsIds:
|
|
1771
|
-
filters:
|
|
1815
|
+
}), j(a, { onClick: n[2] ||= (e) => R(p)("setter", {
|
|
1816
|
+
tagsIds: v.value.model.value,
|
|
1817
|
+
filters: v.value.filters,
|
|
1772
1818
|
filtersAction: h.value,
|
|
1773
|
-
payload:
|
|
1819
|
+
payload: v.value.payload
|
|
1774
1820
|
}) }, {
|
|
1775
|
-
default:
|
|
1821
|
+
default: V(() => [A(L(h.value === "add" ? t.$i18n.Common.Add : "") + " " + L(h.value === "replace" ? t.$i18n.Common.Replace : "") + " " + L(h.value === "delete" ? t.$i18n.Common.Delete : ""), 1)]),
|
|
1776
1822
|
_: 1
|
|
1777
1823
|
})]),
|
|
1778
1824
|
key: "1"
|
|
@@ -1780,6 +1826,6 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1780
1826
|
}
|
|
1781
1827
|
});
|
|
1782
1828
|
//#endregion
|
|
1783
|
-
export {
|
|
1829
|
+
export { ve as TopCompetitorSelector, at as TopGroupSelector, jt as TopProjectSelector, ze as TopRegionSelector, Wt as TopTagSelector, Ut as TopTagSelectorPopupOpener, Q as TopTagSelectorTagIcon, Ae as dialogRegionSelector, ke as findRegion, Pt as genElTopTagSelectorPopupOpener, je as genSearcherByKey, Ft as renderElTopTagSelectorPopupOpener, Tt as topProjectSelectorClearCache, ye as useItemsFromCompetitors };
|
|
1784
1830
|
|
|
1785
1831
|
//# sourceMappingURL=project.js.map
|