@topvisor/ui 1.5.0-updates.11 → 1.5.0-updates.13
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/{api-CawzY1Cw.amd.js → api-Ch3koOO6.amd.js} +2 -2
- package/.chunks/{api-CawzY1Cw.amd.js.map → api-Ch3koOO6.amd.js.map} +1 -1
- package/.chunks/{api-CawzY1Cw.esm.js → api-Ch3koOO6.esm.js} +2 -2
- package/.chunks/{api-CawzY1Cw.esm.js.map → api-Ch3koOO6.esm.js.map} +1 -1
- package/.chunks/{app-CCX-gNqz.amd.js → app-DeYDrjuR.amd.js} +2 -2
- package/.chunks/{app-CCX-gNqz.amd.js.map → app-DeYDrjuR.amd.js.map} +1 -1
- package/.chunks/{app-CCX-gNqz.esm.js → app-DeYDrjuR.esm.js} +6 -6
- package/.chunks/{app-CCX-gNqz.esm.js.map → app-DeYDrjuR.esm.js.map} +1 -1
- package/.chunks/{datepicker-BTkZOq7d.amd.js → datepicker-hs1GgrEl.amd.js} +2 -2
- package/.chunks/{datepicker-BTkZOq7d.amd.js.map → datepicker-hs1GgrEl.amd.js.map} +1 -1
- package/.chunks/{datepicker-BTkZOq7d.esm.js → datepicker-hs1GgrEl.esm.js} +2 -2
- package/.chunks/{datepicker-BTkZOq7d.esm.js.map → datepicker-hs1GgrEl.esm.js.map} +1 -1
- package/.chunks/{dialog-DeM4SApg.amd.js → dialog-EVWLEYaz.amd.js} +2 -2
- package/.chunks/{dialog-DeM4SApg.amd.js.map → dialog-EVWLEYaz.amd.js.map} +1 -1
- package/.chunks/{dialog-DeM4SApg.esm.js → dialog-EVWLEYaz.esm.js} +4 -4
- package/.chunks/{dialog-DeM4SApg.esm.js.map → dialog-EVWLEYaz.esm.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-CYrmaDt3.amd.js → dialog_regionSelectorRegions-SkMDN_xf.amd.js} +2 -2
- package/.chunks/{dialog_regionSelectorRegions-CYrmaDt3.amd.js.map → dialog_regionSelectorRegions-SkMDN_xf.amd.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-CYrmaDt3.esm.js → dialog_regionSelectorRegions-SkMDN_xf.esm.js} +5 -5
- package/.chunks/{dialog_regionSelectorRegions-CYrmaDt3.esm.js.map → dialog_regionSelectorRegions-SkMDN_xf.esm.js.map} +1 -1
- package/.chunks/{dialogs-CMrERMI7.amd.js → dialogs-CrQruKtB.amd.js} +2 -2
- package/.chunks/{dialogs-CMrERMI7.amd.js.map → dialogs-CrQruKtB.amd.js.map} +1 -1
- package/.chunks/{dialogs-CMrERMI7.esm.js → dialogs-CrQruKtB.esm.js} +3 -3
- package/.chunks/{dialogs-CMrERMI7.esm.js.map → dialogs-CrQruKtB.esm.js.map} +1 -1
- package/.chunks/{forms-CbUt-6Ff.amd.js → forms-CZB2EgYU.amd.js} +2 -2
- package/.chunks/{forms-CbUt-6Ff.amd.js.map → forms-CZB2EgYU.amd.js.map} +1 -1
- package/.chunks/{forms-CbUt-6Ff.esm.js → forms-CZB2EgYU.esm.js} +5 -5
- package/.chunks/{forms-CbUt-6Ff.esm.js.map → forms-CZB2EgYU.esm.js.map} +1 -1
- package/.chunks/{formsExt-CrTmBhja.amd.js → formsExt-BI1Yr4lK.amd.js} +2 -2
- package/.chunks/{formsExt-CrTmBhja.amd.js.map → formsExt-BI1Yr4lK.amd.js.map} +1 -1
- package/.chunks/{formsExt-CrTmBhja.esm.js → formsExt-BI1Yr4lK.esm.js} +4 -4
- package/.chunks/{formsExt-CrTmBhja.esm.js.map → formsExt-BI1Yr4lK.esm.js.map} +1 -1
- package/.chunks/{notice-CslVdVNm.amd.js → notice-BMqSpsM4.amd.js} +2 -2
- package/.chunks/{notice-CslVdVNm.amd.js.map → notice-BMqSpsM4.amd.js.map} +1 -1
- package/.chunks/{notice-CslVdVNm.esm.js → notice-BMqSpsM4.esm.js} +2 -2
- package/.chunks/{notice-CslVdVNm.esm.js.map → notice-BMqSpsM4.esm.js.map} +1 -1
- package/.chunks/popup-C9Gbdtry.amd.js +2 -0
- package/.chunks/popup-C9Gbdtry.amd.js.map +1 -0
- package/.chunks/{popup-dNrN-eKi.esm.js → popup-C9Gbdtry.esm.js} +6 -6
- package/.chunks/popup-C9Gbdtry.esm.js.map +1 -0
- package/.chunks/{popup-DrByVU-k.amd.js → popup-DvXDsUIo.amd.js} +2 -2
- package/.chunks/{popup-DrByVU-k.amd.js.map → popup-DvXDsUIo.amd.js.map} +1 -1
- package/.chunks/{popup-DrByVU-k.esm.js → popup-DvXDsUIo.esm.js} +3 -3
- package/.chunks/{popup-DrByVU-k.esm.js.map → popup-DvXDsUIo.esm.js.map} +1 -1
- package/.chunks/{utils-Dd0MZgyw.amd.js → utils-BJYweugT.amd.js} +2 -2
- package/.chunks/{utils-Dd0MZgyw.amd.js.map → utils-BJYweugT.amd.js.map} +1 -1
- package/.chunks/{utils-Dd0MZgyw.esm.js → utils-BJYweugT.esm.js} +4 -4
- package/.chunks/{utils-Dd0MZgyw.esm.js.map → utils-BJYweugT.esm.js.map} +1 -1
- package/.chunks/{utils-BwiXsV0S.amd.js → utils-YS9-HaAi.amd.js} +2 -2
- package/.chunks/{utils-BwiXsV0S.amd.js.map → utils-YS9-HaAi.amd.js.map} +1 -1
- package/.chunks/{utils-BwiXsV0S.esm.js → utils-YS9-HaAi.esm.js} +3 -3
- package/.chunks/{utils-BwiXsV0S.esm.js.map → utils-YS9-HaAi.esm.js.map} +1 -1
- package/.chunks/{worker-Db8YrEHo.amd.js → worker-DpFg3xR3.amd.js} +2 -2
- package/.chunks/{worker-Db8YrEHo.amd.js.map → worker-DpFg3xR3.amd.js.map} +1 -1
- package/.chunks/{worker-Db8YrEHo.esm.js → worker-DpFg3xR3.esm.js} +3 -3
- package/.chunks/{worker-Db8YrEHo.esm.js.map → worker-DpFg3xR3.esm.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/assets/project.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 +4 -4
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.amd.js.map +1 -1
- package/dialog/dialog.js +3 -3
- 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/icomoon/Topvisor icons.json +30 -7
- package/icomoon/demo-files/demo.css +3 -0
- package/icomoon/demo.html +19 -2
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +3 -2
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +8 -5
- package/layout/layout.amd.js +1 -1
- package/layout/layout.amd.js.map +1 -1
- package/layout/layout.js +1 -1
- package/package.json +1 -1
- 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 +521 -440
- package/project/project.js.map +1 -1
- package/src/components/formsExt/selector2/types.d.ts +3 -0
- package/src/components/project/groupSelector/groups/types.d.ts +1 -0
- package/src/components/project/groupSelector/groups/utils.d.ts +42 -0
- package/src/components/project/groupSelector/types.d.ts +10 -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 +1 -1
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +1 -1
- package/.chunks/popup-dNrN-eKi.amd.js +0 -2
- package/.chunks/popup-dNrN-eKi.amd.js.map +0 -1
- package/.chunks/popup-dNrN-eKi.esm.js.map +0 -1
package/project/project.js
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|
_autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
|
|
6
6
|
/* end import css */
|
|
7
7
|
|
|
8
|
-
import "../.chunks/api-
|
|
9
|
-
import { E as e, O as t, P as n,
|
|
10
|
-
import { n as
|
|
11
|
-
import { storage as
|
|
12
|
-
import { t as
|
|
13
|
-
import "../.chunks/app-
|
|
14
|
-
import { validUrl as
|
|
15
|
-
import { ellipsis as
|
|
16
|
-
import { t as
|
|
17
|
-
import { getDeviceGIcon as
|
|
18
|
-
import { invertKeyboardLayout as
|
|
19
|
-
import { c as
|
|
20
|
-
import { d as
|
|
8
|
+
import "../.chunks/api-Ch3koOO6.esm.js";
|
|
9
|
+
import { E as e, O as t, P as n, c as r, h as i, n as a } from "../.chunks/forms-CZB2EgYU.esm.js";
|
|
10
|
+
import { n as o, t as s } from "../.chunks/field-CjkpGeA7.esm.js";
|
|
11
|
+
import { storage as c } from "../utils/dom.js";
|
|
12
|
+
import { t as l } from "../.chunks/worker-DpFg3xR3.esm.js";
|
|
13
|
+
import "../.chunks/app-DeYDrjuR.esm.js";
|
|
14
|
+
import { validUrl as u } from "../utils/check.js";
|
|
15
|
+
import { ellipsis as d } from "../utils/string.js";
|
|
16
|
+
import { t as f } from "../.chunks/utils-YS9-HaAi.esm.js";
|
|
17
|
+
import { getDeviceGIcon as p, getLangLabel as m, getSearcherGIcon as h } from "../utils/searchers.js";
|
|
18
|
+
import { invertKeyboardLayout as g } from "../utils/keyboard.js";
|
|
19
|
+
import { c as _, o as v, s as y } from "../.chunks/popup-DvXDsUIo.esm.js";
|
|
20
|
+
import { d as b, s as x, u as S } from "../.chunks/formsExt-BI1Yr4lK.esm.js";
|
|
21
21
|
import "../popup/worker.js";
|
|
22
|
-
import { Fragment as
|
|
22
|
+
import { Fragment as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createSlots as ee, createTextVNode as k, createVNode as A, defineComponent as j, isRef as te, mergeModels as M, mergeProps as ne, nextTick as re, normalizeClass as N, onMounted as ie, openBlock as P, reactive as ae, ref as F, renderList as I, renderSlot as oe, resolveComponent as se, resolveDirective as ce, resolveDynamicComponent as le, shallowRef as ue, toDisplayString as L, toValue as de, unref as R, useModel as z, watch as B, withCtx as V, withDirectives as fe, withKeys as pe, withModifiers as H } from "vue";
|
|
23
23
|
//#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
|
|
24
|
-
var
|
|
24
|
+
var me = { class: "top-competitorSelector" }, he = { class: "top-ellipsis1" }, ge = /* @__PURE__ */ j({
|
|
25
25
|
__name: "competitorSelector",
|
|
26
|
-
props: /* @__PURE__ */
|
|
26
|
+
props: /* @__PURE__ */ M({
|
|
27
27
|
modelValue: {},
|
|
28
28
|
items: {},
|
|
29
29
|
showSelectAllItem: {
|
|
@@ -36,31 +36,31 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
36
36
|
}),
|
|
37
37
|
emits: ["update:modelValue"],
|
|
38
38
|
setup(n) {
|
|
39
|
-
let
|
|
40
|
-
if (
|
|
39
|
+
let r = n, a = z(n, "modelValue"), o = w(() => {
|
|
40
|
+
if (r.showSelectAllItem) return {
|
|
41
41
|
icon: "",
|
|
42
42
|
title: e().Common.Select_all,
|
|
43
43
|
value: "all",
|
|
44
44
|
content: ""
|
|
45
45
|
};
|
|
46
46
|
});
|
|
47
|
-
return (e,
|
|
48
|
-
opener:
|
|
47
|
+
return (e, r) => (P(), D("div", me, [R(t).state.isMobile ? (P(), T(y, { key: 0 }, {
|
|
48
|
+
opener: V(() => [A(i, {
|
|
49
49
|
class: "top-competitorSelector_opener",
|
|
50
50
|
color: "theme",
|
|
51
51
|
icon: "",
|
|
52
52
|
icon2: ""
|
|
53
53
|
}, {
|
|
54
|
-
default:
|
|
54
|
+
default: V(() => [k(L(n.items.find((e) => e.value === a.value?.[0])?.content), 1)]),
|
|
55
55
|
_: 1
|
|
56
56
|
})]),
|
|
57
|
-
contentList:
|
|
58
|
-
class:
|
|
57
|
+
contentList: V(() => [(P(!0), D(C, null, I(n.items, (e) => (P(), T(v, {
|
|
58
|
+
class: N({ "top-active": a.value?.includes(e.value) }),
|
|
59
59
|
"data-top-icon": e.icon,
|
|
60
60
|
title: e.title,
|
|
61
61
|
onClick: () => a.value = [e.value]
|
|
62
62
|
}, {
|
|
63
|
-
default:
|
|
63
|
+
default: V(() => [O("span", he, L(e.content), 1)]),
|
|
64
64
|
_: 2
|
|
65
65
|
}, 1032, [
|
|
66
66
|
"class",
|
|
@@ -69,10 +69,10 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
69
69
|
"onClick"
|
|
70
70
|
]))), 256))]),
|
|
71
71
|
_: 1
|
|
72
|
-
})) : (
|
|
72
|
+
})) : (P(), T(b, {
|
|
73
73
|
key: 1,
|
|
74
74
|
modelValue: a.value,
|
|
75
|
-
"onUpdate:modelValue":
|
|
75
|
+
"onUpdate:modelValue": r[0] ||= (e) => a.value = e,
|
|
76
76
|
items: n.items,
|
|
77
77
|
isMultiple: !0,
|
|
78
78
|
styling: "bar",
|
|
@@ -84,12 +84,12 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
84
84
|
"selectAllItem"
|
|
85
85
|
]))]));
|
|
86
86
|
}
|
|
87
|
-
}),
|
|
87
|
+
}), _e = (e, t) => w(() => de(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
|
|
88
88
|
value: e.id,
|
|
89
89
|
title: e.url + ` [${e.id}]`,
|
|
90
|
-
icon: e.id ===
|
|
90
|
+
icon: e.id === de(t) ? "" : "",
|
|
91
91
|
content: e.name
|
|
92
|
-
}))),
|
|
92
|
+
}))), ve = {
|
|
93
93
|
0: "Yandex",
|
|
94
94
|
1: "Google",
|
|
95
95
|
4: "YouTube",
|
|
@@ -99,25 +99,25 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
99
99
|
9: "GoogleStore",
|
|
100
100
|
20: "Yandex.com",
|
|
101
101
|
21: "Yandex.com.tr"
|
|
102
|
-
},
|
|
102
|
+
}, ye = {
|
|
103
103
|
key: -2,
|
|
104
104
|
name: "--",
|
|
105
105
|
index: -2
|
|
106
|
-
},
|
|
106
|
+
}, be = {
|
|
107
107
|
key: -2,
|
|
108
108
|
name: "--",
|
|
109
|
-
regions: [
|
|
110
|
-
regionByIndex: new Map([[-2,
|
|
111
|
-
},
|
|
109
|
+
regions: [ye],
|
|
110
|
+
regionByIndex: new Map([[-2, ye]])
|
|
111
|
+
}, U = {
|
|
112
112
|
key: -2,
|
|
113
113
|
name: "Autoselect",
|
|
114
114
|
index: -2
|
|
115
|
-
},
|
|
115
|
+
}, xe = {
|
|
116
116
|
key: -2,
|
|
117
117
|
name: "Autoselect",
|
|
118
|
-
regions: [
|
|
119
|
-
regionByIndex: new Map([[-2,
|
|
120
|
-
},
|
|
118
|
+
regions: [U],
|
|
119
|
+
regionByIndex: new Map([[-2, U]])
|
|
120
|
+
}, Se = {
|
|
121
121
|
countryCode: "00",
|
|
122
122
|
depth: 1,
|
|
123
123
|
device: 0,
|
|
@@ -125,10 +125,10 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
125
125
|
index: -1,
|
|
126
126
|
lang: "ru",
|
|
127
127
|
name: "Without region"
|
|
128
|
-
},
|
|
128
|
+
}, Ce = () => (U.name = e().Common.Autoselect, U), we = () => (Ce(), xe.name = e().Common.Autoselect, console.log(xe), xe), Te = () => (Se.name = e().Keywords.Without_region, Se), Ee = (e = "", t = !1, n = []) => {
|
|
129
129
|
let r;
|
|
130
|
-
return r = e ?
|
|
131
|
-
},
|
|
130
|
+
return r = e ? Oe(n, e) : De(n), t && r.set(-2, we()), r.size || r.set(-2, be), r;
|
|
131
|
+
}, De = (e, t = !0, n = [], r = "") => {
|
|
132
132
|
let i = /* @__PURE__ */ new Map();
|
|
133
133
|
return e.forEach((e) => {
|
|
134
134
|
if (!e.enabled || r && typeof e.key == "number" && e.key > 1) return;
|
|
@@ -142,42 +142,42 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
142
142
|
if (i.has(e)) return;
|
|
143
143
|
let t = {
|
|
144
144
|
key: e,
|
|
145
|
-
name:
|
|
145
|
+
name: ve[e],
|
|
146
146
|
regions: [],
|
|
147
147
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
148
148
|
};
|
|
149
149
|
i.set(t.key, t);
|
|
150
150
|
}), i;
|
|
151
|
-
},
|
|
152
|
-
let n =
|
|
151
|
+
}, Oe = (e, t) => {
|
|
152
|
+
let n = De(e, !1, [0, 1], t);
|
|
153
153
|
if (n.has(2)) {
|
|
154
154
|
let e = n.get(2);
|
|
155
155
|
e && (e.regionByIndex = /* @__PURE__ */ new Map());
|
|
156
156
|
}
|
|
157
157
|
return (t === "volume" || t === "cost_forecast") && n.forEach((e) => {
|
|
158
158
|
if (!e.regionByIndex) return;
|
|
159
|
-
let t = { ...
|
|
159
|
+
let t = { ...Te() };
|
|
160
160
|
e.regionByIndex.set(t.index, t);
|
|
161
161
|
}), n;
|
|
162
|
-
},
|
|
163
|
-
let r =
|
|
162
|
+
}, ke = (e, t, n = []) => {
|
|
163
|
+
let r = Ee(e, !1, n), i;
|
|
164
164
|
return r.forEach((n) => {
|
|
165
165
|
if (!(t.searcher_key !== void 0 && t.searcher_key != n.key) && n.regions && (n.regions.forEach((r) => {
|
|
166
166
|
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;
|
|
167
167
|
}), i)) return !1;
|
|
168
168
|
}), i;
|
|
169
|
-
},
|
|
169
|
+
}, Ae = f(() => import("../.chunks/dialog_regionSelectorRegions-SkMDN_xf.esm.js")), je = (t, n) => {
|
|
170
170
|
let r = e();
|
|
171
171
|
return {
|
|
172
|
-
searcherKey:
|
|
173
|
-
optionBySearcherKey:
|
|
172
|
+
searcherKey: F(n.value.keys().next().value ?? -2),
|
|
173
|
+
optionBySearcherKey: w(() => {
|
|
174
174
|
let e = /* @__PURE__ */ new Map();
|
|
175
175
|
if (n.value.forEach((n) => {
|
|
176
176
|
let r = {
|
|
177
177
|
value: n.key,
|
|
178
178
|
title: n.name
|
|
179
179
|
};
|
|
180
|
-
t.addSearcherIcon && (r.icon =
|
|
180
|
+
t.addSearcherIcon && (r.icon = h(n.key)), e.set(n.key, r);
|
|
181
181
|
}), t.addCompare && !e.has(-2)) {
|
|
182
182
|
let t = {
|
|
183
183
|
value: "",
|
|
@@ -194,10 +194,10 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
194
194
|
return e;
|
|
195
195
|
})
|
|
196
196
|
};
|
|
197
|
-
},
|
|
198
|
-
let r = e(), i =
|
|
197
|
+
}, Me = (t, n) => {
|
|
198
|
+
let r = e(), i = F(-2);
|
|
199
199
|
t.modelValue.length === 1 && (i.value = t.modelValue[0]), i.value === -2 && (t.forMode ? i.value = n.value?.regionByIndex.values().next().value?.key ?? -2 : i.value = n.value?.regionByIndex.keys().next().value ?? -2);
|
|
200
|
-
let a =
|
|
200
|
+
let a = w(() => {
|
|
201
201
|
let e = /* @__PURE__ */ new Map();
|
|
202
202
|
return n.value.regionByIndex?.forEach((i) => {
|
|
203
203
|
let a = i.name;
|
|
@@ -210,17 +210,17 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
212
|
i.device && (a += " (" + r.Common["Device_" + i.device] + ")");
|
|
213
|
-
let o =
|
|
213
|
+
let o = m(n.value.key || 0, i.lang ?? "");
|
|
214
214
|
o && (a += " / " + o);
|
|
215
215
|
let s = {
|
|
216
216
|
value: i.index,
|
|
217
217
|
title: a,
|
|
218
|
-
icon: i.device ?
|
|
218
|
+
icon: i.device ? p(i.device) : void 0
|
|
219
219
|
};
|
|
220
220
|
e.set(i.index, s);
|
|
221
221
|
}), e;
|
|
222
222
|
});
|
|
223
|
-
return
|
|
223
|
+
return B(a, (e, n) => {
|
|
224
224
|
if (t.onlySearcher || i.value !== void 0 && e.get(i.value)) return;
|
|
225
225
|
let a = e.keys().next().value;
|
|
226
226
|
if (i.value === -2 || a === -2) {
|
|
@@ -243,8 +243,8 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
243
243
|
regionIndex: i,
|
|
244
244
|
optionByRegionIndex: a
|
|
245
245
|
};
|
|
246
|
-
},
|
|
247
|
-
let r =
|
|
246
|
+
}, Ne = (e, t, n) => {
|
|
247
|
+
let r = F([]), i = () => {
|
|
248
248
|
if (e.onlySearcher && t.value) {
|
|
249
249
|
r.value = Array.from(t.value.keys());
|
|
250
250
|
return;
|
|
@@ -258,19 +258,19 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
258
258
|
}, a = () => {
|
|
259
259
|
r.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(r.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
|
|
260
260
|
};
|
|
261
|
-
return
|
|
261
|
+
return B(r, () => {
|
|
262
262
|
a();
|
|
263
263
|
}), e.addCompare && i(), { regionsIndexes: r };
|
|
264
|
-
},
|
|
265
|
-
let t =
|
|
264
|
+
}, Pe = (e) => {
|
|
265
|
+
let t = w(() => Ee(e.forMode, e.autoRegion, e.searchers)), n = w(() => t.value.get(i.searcherKey.value) || be), r = w(() => {
|
|
266
266
|
let e = /* @__PURE__ */ new Set();
|
|
267
267
|
return t.value.forEach((t) => {
|
|
268
268
|
t.regionByIndex.forEach((t) => {
|
|
269
269
|
t.index !== -1 && t.index !== -2 && e.add(t.index);
|
|
270
270
|
});
|
|
271
271
|
}), e;
|
|
272
|
-
}), i =
|
|
273
|
-
|
|
272
|
+
}), i = je(e, t), a = Me(e, n), o = Ne(e, t, r);
|
|
273
|
+
B(t, () => {
|
|
274
274
|
if (e.onlySearcher ? o.regionsIndexes.value = Array.from(t.value.keys()) : o.regionsIndexes.value = o.regionsIndexes.value.filter((e) => r.value.has(e)), i.searcherKey.value === -1) return;
|
|
275
275
|
let s = t.value.keys().next().value;
|
|
276
276
|
t.value.forEach((n) => {
|
|
@@ -293,7 +293,7 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
293
293
|
let t = a.regionIndex.value;
|
|
294
294
|
if (e.forMode) {
|
|
295
295
|
let n = a.regionIndex.value;
|
|
296
|
-
t =
|
|
296
|
+
t = ke(e.forMode, {
|
|
297
297
|
searcher_key: s(),
|
|
298
298
|
key: n
|
|
299
299
|
}, e.searchers)?.index;
|
|
@@ -315,9 +315,9 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
315
315
|
if (e !== void 0) return l()?.regionByIndex?.get(e);
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
|
-
},
|
|
318
|
+
}, Fe = /* @__PURE__ */ j({
|
|
319
319
|
__name: "regionSelector",
|
|
320
|
-
props: /* @__PURE__ */
|
|
320
|
+
props: /* @__PURE__ */ M({
|
|
321
321
|
projectId: {},
|
|
322
322
|
searchers: { default: () => [] },
|
|
323
323
|
modelValue: {},
|
|
@@ -346,43 +346,43 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
346
346
|
}),
|
|
347
347
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
348
348
|
setup(e, { expose: t }) {
|
|
349
|
-
let n = e,
|
|
349
|
+
let n = e, r = z(e, "modelValue"), o = z(e, "modelValueSingle"), { selectSearcher: s, selectRegion: c, compare: l, searcherByKey: u, allRegionsIndexes: d, getSearcher: f, getRegion: p } = Pe(n), m = () => {
|
|
350
350
|
let e = [];
|
|
351
351
|
u.value.forEach((t) => {
|
|
352
352
|
t.enabled && t.regions.forEach((t) => {
|
|
353
353
|
t.enabled && e.push(t);
|
|
354
354
|
});
|
|
355
|
-
}),
|
|
355
|
+
}), Ae.open("regions", {
|
|
356
356
|
regions: e,
|
|
357
357
|
regionsIndexes: l.regionsIndexes.value,
|
|
358
358
|
"@update:regionsIndexes": (e) => l.regionsIndexes.value = e
|
|
359
359
|
});
|
|
360
360
|
};
|
|
361
|
-
return
|
|
361
|
+
return B([
|
|
362
362
|
c.regionIndex,
|
|
363
363
|
s.searcherKey,
|
|
364
364
|
l.regionsIndexes
|
|
365
365
|
], () => {
|
|
366
366
|
if (s.searcherKey.value === -1 && l.regionsIndexes.value.length) {
|
|
367
|
-
if (JSON.stringify(
|
|
368
|
-
|
|
369
|
-
} else n.onlySearcher ? (
|
|
367
|
+
if (JSON.stringify(r.value) === JSON.stringify(l.regionsIndexes.value)) return;
|
|
368
|
+
r.value = [...l.regionsIndexes.value];
|
|
369
|
+
} else n.onlySearcher ? (r.value = [s.searcherKey.value], s.searcherKey.value === -2 && !n.autoRegion && (r.value.length = 0)) : (r.value = [c.regionIndex.value], c.regionIndex.value === -2 && !n.autoRegion && (r.value.length = 0));
|
|
370
370
|
!n.onlySearcher && !d.value.size && (s.searcherKey.value = -2);
|
|
371
|
-
}), o.value &&
|
|
372
|
-
o.value && (
|
|
373
|
-
}, { immediate: !0 }),
|
|
374
|
-
if (
|
|
375
|
-
if (!
|
|
371
|
+
}), o.value && B(o, () => {
|
|
372
|
+
o.value && (r.value = [o.value]);
|
|
373
|
+
}, { immediate: !0 }), B(r, () => {
|
|
374
|
+
if (r.value[0] && (o.value = r.value[0]), n.onlySearcher) {
|
|
375
|
+
if (!r.value.length || r.value.length === 1 && !u.value.has(r.value[0]) || r.value.length === 1 && r.value[0] === -2 && !n.autoRegion) {
|
|
376
376
|
let e = u.value.keys().next().value;
|
|
377
|
-
e === -2 && !n.autoRegion && (e = void 0, o.value = -2), e === void 0 ?
|
|
377
|
+
e === -2 && !n.autoRegion && (e = void 0, o.value = -2), e === void 0 ? r.value.length = 0 : r.value = [e];
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
|
-
if (
|
|
381
|
-
|
|
380
|
+
if (r.value.length > 1 && JSON.stringify(r.value) !== JSON.stringify(l.regionsIndexes.value)) {
|
|
381
|
+
r.value = [...l.regionsIndexes.value];
|
|
382
382
|
return;
|
|
383
383
|
}
|
|
384
384
|
} else {
|
|
385
|
-
let e = [...new Set(
|
|
385
|
+
let e = [...new Set(r.value)], t = u.value.values().next().value?.regionByIndex?.keys().next().value;
|
|
386
386
|
if (n.forMode && (t = u.value.values().next().value?.regionByIndex?.values().next().value?.key), t === -2 && !n.autoRegion && (t = void 0, o.value = -2), !e.length) t !== void 0 && e.push(t);
|
|
387
387
|
else if (e.length === 1) {
|
|
388
388
|
let r = d.value;
|
|
@@ -392,22 +392,22 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
392
392
|
});
|
|
393
393
|
})), r.has(e[0]) || (e = [], t !== void 0 && e.push(t));
|
|
394
394
|
} else e = e.filter((e) => d.value.has(e)), !e.length && t !== void 0 && e.push(t);
|
|
395
|
-
if (JSON.stringify(
|
|
396
|
-
|
|
395
|
+
if (JSON.stringify(r.value) !== JSON.stringify(e)) {
|
|
396
|
+
r.value = e;
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
if (!(
|
|
401
|
-
if (
|
|
402
|
-
s.searcherKey.value =
|
|
400
|
+
if (!(r.value.length === 1 && r.value[0] === (n.onlySearcher ? s.searcherKey.value : c.regionIndex.value))) if (n.onlySearcher) {
|
|
401
|
+
if (r.value.length === 1) {
|
|
402
|
+
s.searcherKey.value = r.value[0];
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
405
405
|
s.searcherKey.value = -1;
|
|
406
406
|
return;
|
|
407
407
|
} else {
|
|
408
|
-
if (!
|
|
409
|
-
if (
|
|
410
|
-
c.regionIndex.value =
|
|
408
|
+
if (!r.value.length) return;
|
|
409
|
+
if (r.value.length === 1 && s.searcherKey.value !== -1) {
|
|
410
|
+
c.regionIndex.value = r.value[0];
|
|
411
411
|
let e;
|
|
412
412
|
for (let t of u.value.values()) {
|
|
413
413
|
for (let r of t.regionByIndex.values()) if ((n.forMode ? r.key : r.index) === c.regionIndex.value) {
|
|
@@ -417,19 +417,19 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
417
417
|
if (e !== void 0) break;
|
|
418
418
|
}
|
|
419
419
|
e !== void 0 && (s.searcherKey.value = e);
|
|
420
|
-
} else s.searcherKey.value = -1, l.regionsIndexes.value = [...
|
|
420
|
+
} else s.searcherKey.value = -1, l.regionsIndexes.value = [...r.value];
|
|
421
421
|
}
|
|
422
422
|
}, { immediate: !0 }), t({
|
|
423
423
|
getSearcher: f,
|
|
424
424
|
getRegion: p
|
|
425
|
-
}), (t, n) => (
|
|
425
|
+
}), (t, n) => (P(), D("div", { class: N({
|
|
426
426
|
"top-regionSelector": !0,
|
|
427
427
|
"top-regionSelector-onlySearcher": e.onlySearcher
|
|
428
428
|
}) }, [
|
|
429
|
-
|
|
430
|
-
options:
|
|
431
|
-
modelValue:
|
|
432
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
429
|
+
A(a, {
|
|
430
|
+
options: R(s).optionBySearcherKey.value,
|
|
431
|
+
modelValue: R(s).searcherKey.value,
|
|
432
|
+
"onUpdate:modelValue": n[0] ||= (e) => R(s).searcherKey.value = e,
|
|
433
433
|
name: "searcher_key",
|
|
434
434
|
addChanger: e.addChanger
|
|
435
435
|
}, null, 8, [
|
|
@@ -437,12 +437,12 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
437
437
|
"modelValue",
|
|
438
438
|
"addChanger"
|
|
439
439
|
]),
|
|
440
|
-
!e.onlySearcher &&
|
|
440
|
+
!e.onlySearcher && R(s).searcherKey.value !== R(-1) ? (P(), T(a, {
|
|
441
441
|
key: 0,
|
|
442
442
|
class: "top-select-region",
|
|
443
|
-
options:
|
|
444
|
-
modelValue:
|
|
445
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
443
|
+
options: R(c).optionByRegionIndex.value,
|
|
444
|
+
modelValue: R(c).regionIndex.value,
|
|
445
|
+
"onUpdate:modelValue": n[1] ||= (e) => R(c).regionIndex.value = e,
|
|
446
446
|
name: e.forMode ? "region_key" : "region_index",
|
|
447
447
|
addChanger: e.addChanger,
|
|
448
448
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
@@ -452,31 +452,31 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
|
|
|
452
452
|
"name",
|
|
453
453
|
"addChanger",
|
|
454
454
|
"data-top-icon"
|
|
455
|
-
])) :
|
|
456
|
-
e.addCompare && !e.onlySearcher &&
|
|
455
|
+
])) : E("", !0),
|
|
456
|
+
e.addCompare && !e.onlySearcher && R(s).searcherKey.value === R(-1) ? (P(), T(i, {
|
|
457
457
|
key: 1,
|
|
458
458
|
name: "compare",
|
|
459
459
|
onClick: m,
|
|
460
|
-
"data-count-compare-regions-indexes":
|
|
460
|
+
"data-count-compare-regions-indexes": R(l).regionsIndexes.value.length
|
|
461
461
|
}, {
|
|
462
|
-
default:
|
|
462
|
+
default: V(() => [k(L(t.$i18n.Common.Selected_regions), 1)]),
|
|
463
463
|
_: 1
|
|
464
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
464
|
+
}, 8, ["data-count-compare-regions-indexes"])) : E("", !0)
|
|
465
465
|
], 2));
|
|
466
466
|
}
|
|
467
|
-
}),
|
|
467
|
+
}), W = {
|
|
468
468
|
id: 0,
|
|
469
469
|
name: "/",
|
|
470
470
|
path: "/"
|
|
471
471
|
};
|
|
472
|
-
function
|
|
472
|
+
function Ie(t) {
|
|
473
473
|
return t ? e()?.Common.All_folders : "/ (" + e()?.Keywords.Root_folder + ")";
|
|
474
474
|
}
|
|
475
|
-
var
|
|
476
|
-
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name =
|
|
475
|
+
var Le = (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) => {
|
|
476
|
+
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Ie(t));
|
|
477
477
|
let o = i > 1 ? "-".repeat(i - 1) + " " : "";
|
|
478
|
-
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a),
|
|
479
|
-
}), n),
|
|
478
|
+
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Le(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);
|
|
479
|
+
}), n), Re = (e, t) => e.gen(`/get/${t}/folders/`, [
|
|
480
480
|
"id",
|
|
481
481
|
"parent_id",
|
|
482
482
|
"name",
|
|
@@ -487,9 +487,9 @@ var Re = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
|
|
|
487
487
|
});
|
|
488
488
|
//#endregion
|
|
489
489
|
//#region src/core/utils/composables/useWatch.ts
|
|
490
|
-
function
|
|
490
|
+
function ze(e, t, n) {
|
|
491
491
|
let r = Object.keys(e);
|
|
492
|
-
return
|
|
492
|
+
return B(r.map((t) => e[t]), (e, n, i) => {
|
|
493
493
|
let a = {};
|
|
494
494
|
e.forEach((e, t) => {
|
|
495
495
|
if (!Object.is(e, n[t])) {
|
|
@@ -504,9 +504,9 @@ function Be(e, t, n) {
|
|
|
504
504
|
}
|
|
505
505
|
//#endregion
|
|
506
506
|
//#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
|
|
507
|
-
var
|
|
507
|
+
var Be = ["innerHTML"], Ve = /* @__PURE__ */ j({
|
|
508
508
|
__name: "folders",
|
|
509
|
-
props: /* @__PURE__ */
|
|
509
|
+
props: /* @__PURE__ */ M({
|
|
510
510
|
folderId: {},
|
|
511
511
|
folder: {},
|
|
512
512
|
folders: {},
|
|
@@ -522,17 +522,17 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
522
522
|
}, {
|
|
523
523
|
folderId: { required: !0 },
|
|
524
524
|
folderIdModifiers: {},
|
|
525
|
-
folder: { default:
|
|
525
|
+
folder: { default: W },
|
|
526
526
|
folderModifiers: {}
|
|
527
527
|
}),
|
|
528
528
|
emits: ["update:folderId", "update:folder"],
|
|
529
529
|
setup(e) {
|
|
530
|
-
let t = e, n =
|
|
531
|
-
|
|
530
|
+
let t = e, n = z(e, "folderId"), r = z(e, "folder"), i = t.client && !t.folders ? Re(t.client, t.service) : void 0, a = F(null);
|
|
531
|
+
B(() => t.projectId, () => {
|
|
532
532
|
i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
|
|
533
533
|
}, { immediate: !0 });
|
|
534
|
-
let o =
|
|
535
|
-
return
|
|
534
|
+
let o = w(() => Le(t.folders ?? { root: [W] }, t.canSelectAll));
|
|
535
|
+
return ze({
|
|
536
536
|
modelFolder: r,
|
|
537
537
|
modelFolderId: n
|
|
538
538
|
}, async (e) => {
|
|
@@ -542,20 +542,20 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
542
542
|
return;
|
|
543
543
|
}
|
|
544
544
|
let i = o.value.get(t.folderId);
|
|
545
|
-
i ||=
|
|
546
|
-
}, { immediate: !0 }), (t, n) => (
|
|
545
|
+
i ||= W, r.value = i, n.value = i.id;
|
|
546
|
+
}, { immediate: !0 }), (t, n) => (P(), T(x, {
|
|
547
547
|
class: "top-groupSelector_folder",
|
|
548
548
|
modelValue: r.value,
|
|
549
549
|
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
550
550
|
items: e.folders ? [...o.value.values()] : void 0,
|
|
551
551
|
"search-type": "inline",
|
|
552
552
|
icon: e.addIcon ? "" : void 0,
|
|
553
|
-
api: e.folders ? void 0 :
|
|
554
|
-
apiSetSearchParams: (...e) =>
|
|
553
|
+
api: e.folders ? void 0 : R(i),
|
|
554
|
+
apiSetSearchParams: (...e) => R(S)(...e, "name"),
|
|
555
555
|
addChanger: e.addChanger,
|
|
556
556
|
useCache: ""
|
|
557
557
|
}, {
|
|
558
|
-
item:
|
|
558
|
+
item: V(({ item: e }) => [O("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Be)]),
|
|
559
559
|
_: 1
|
|
560
560
|
}, 8, [
|
|
561
561
|
"modelValue",
|
|
@@ -566,17 +566,17 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
566
566
|
"addChanger"
|
|
567
567
|
]));
|
|
568
568
|
}
|
|
569
|
-
}),
|
|
569
|
+
}), G = {
|
|
570
570
|
id: -1,
|
|
571
571
|
name: "--",
|
|
572
|
-
folder_id:
|
|
573
|
-
folder_path:
|
|
574
|
-
},
|
|
572
|
+
folder_id: W.id,
|
|
573
|
+
folder_path: W.path
|
|
574
|
+
}, K = {
|
|
575
575
|
id: 0,
|
|
576
576
|
name: "All groups",
|
|
577
|
-
folder_id:
|
|
578
|
-
folder_path:
|
|
579
|
-
},
|
|
577
|
+
folder_id: W.id,
|
|
578
|
+
folder_path: W.path
|
|
579
|
+
}, q = () => (K.name = e()?.Common.All_groups, K), He = () => (K.name = e()?.Keywords.Choose_group, K), Ue = (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), We = (e, t) => e.gen(`/get/${t}/groups/`, [
|
|
580
580
|
"id",
|
|
581
581
|
"name",
|
|
582
582
|
"folder_id",
|
|
@@ -584,12 +584,12 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
584
584
|
]).changeParams({
|
|
585
585
|
folder_id_depth: !0,
|
|
586
586
|
limit: 100
|
|
587
|
-
}),
|
|
587
|
+
}), Ge = (e, t) => e.gen(`/add/${t}/groups/`), Ke = (e, t) => e.gen(`/del/${t}/groups/`), qe = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Je = { class: "top-groupSelector_groupItem" }, Ye = {
|
|
588
588
|
key: 0,
|
|
589
589
|
class: "top-comment"
|
|
590
|
-
},
|
|
590
|
+
}, Xe = ["innerHTML"], Ze = ["innerHTML"], Qe = ["data-id"], $e = ["innerHTML"], et = /* @__PURE__ */ j({
|
|
591
591
|
__name: "groups",
|
|
592
|
-
props: /* @__PURE__ */
|
|
592
|
+
props: /* @__PURE__ */ M({
|
|
593
593
|
groupId: {},
|
|
594
594
|
group: {},
|
|
595
595
|
projectId: {},
|
|
@@ -600,6 +600,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
600
600
|
default: void 0
|
|
601
601
|
},
|
|
602
602
|
canAdd: { type: [String, Boolean] },
|
|
603
|
+
canEdit: { type: Boolean },
|
|
603
604
|
canSelectAll: { type: [Boolean, String] },
|
|
604
605
|
autoselect: { default: "first" },
|
|
605
606
|
addChanger: {
|
|
@@ -619,113 +620,190 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
619
620
|
group: { required: !0 },
|
|
620
621
|
groupModifiers: {}
|
|
621
622
|
}),
|
|
622
|
-
emits: /* @__PURE__ */
|
|
623
|
+
emits: /* @__PURE__ */ M(["addGroup"], ["update:groupId", "update:group"]),
|
|
623
624
|
setup(e, { emit: t }) {
|
|
624
|
-
let n = e,
|
|
625
|
-
|
|
625
|
+
let n = e, a = t, o = z(e, "groupId"), c = z(e, "group"), l = n.client && !n.groups ? We(n.client, n.service) : void 0, u = n.client ? Ge(n.client, n.service) : void 0, d = n.client ? Ke(n.client, n.service) : void 0, f = n.client ? qe(n.client, n.service) : void 0, p = "topPopupDelete." + Math.random(), m = "topPopuprename." + Math.random(), h = F(null), g = F(void 0), v = F(""), b = s("folder_id", "EQUALS", [n.folder?.id ?? 0]);
|
|
626
|
+
l?.changeParams({
|
|
626
627
|
project_id: n.projectId,
|
|
627
628
|
folder_id_depth: !0,
|
|
628
|
-
filters: [
|
|
629
|
-
}), n.on !== void 0 &&
|
|
630
|
-
let
|
|
631
|
-
|
|
629
|
+
filters: [b]
|
|
630
|
+
}), n.on !== void 0 && l?.params.filters?.push(s("on", "EQUALS", [Number(n.on)]));
|
|
631
|
+
let w = (e) => {
|
|
632
|
+
c.value = e, o.value = e.id;
|
|
632
633
|
};
|
|
633
|
-
|
|
634
|
+
ze({
|
|
634
635
|
projectId: () => n.projectId,
|
|
635
636
|
folderId: () => n.folder?.id,
|
|
636
637
|
canSelectAll: () => n.canSelectAll
|
|
637
638
|
}, (e) => {
|
|
638
|
-
if (e.projectId && (
|
|
639
|
+
if (e.projectId && (l?.changeParams({ project_id: n.projectId }), l?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + n.projectId })), e.folderId && (b.values = [n.folder?.id ?? 0], n.groups && (g.value = Ue(n.groups, n.on, n.folder))), h.value?.resetCache(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && o.value !== null) {
|
|
639
640
|
let e;
|
|
640
|
-
n.autoselect === "first" && (e =
|
|
641
|
+
n.autoselect === "first" && (e = g.value?.[0], n.canSelectAll && (e = ae(q()))), (n.autoselect === "placeholder" || !e) && (e = He()), w(e);
|
|
641
642
|
}
|
|
642
|
-
}, { immediate: !0 }),
|
|
643
|
-
modelGroup:
|
|
644
|
-
modelGroupId:
|
|
643
|
+
}, { immediate: !0 }), ze({
|
|
644
|
+
modelGroup: c,
|
|
645
|
+
modelGroupId: o
|
|
645
646
|
}, async (e) => {
|
|
646
|
-
if (
|
|
647
|
+
if (o.value !== c.value.id) {
|
|
647
648
|
if (e.modelGroup && !e.modelGroupId) {
|
|
648
|
-
|
|
649
|
+
o.value = c.value.id;
|
|
649
650
|
return;
|
|
650
651
|
}
|
|
651
|
-
if (!(n.canAdd &&
|
|
652
|
+
if (!(n.canAdd && o.value === null)) {
|
|
652
653
|
if (n.groups) {
|
|
653
|
-
let e =
|
|
654
|
-
if (!e && n.canSelectAll && (e =
|
|
654
|
+
let e = g.value?.find((e) => e.id === o.value);
|
|
655
|
+
if (!e && n.canSelectAll && (e = q()), e) w(e);
|
|
655
656
|
else {
|
|
656
|
-
let e =
|
|
657
|
-
e && !
|
|
657
|
+
let e = g.value?.[0];
|
|
658
|
+
e && !o.value ? w(e) : w(G);
|
|
658
659
|
}
|
|
659
660
|
}
|
|
660
|
-
if (n.client && !n.groups && (
|
|
661
|
-
let e =
|
|
661
|
+
if (n.client && !n.groups && (o.value || o.value === 0 && !n.canSelectAll)) {
|
|
662
|
+
let e = We(n.client, n.service).changeParams({
|
|
662
663
|
project_id: n.projectId,
|
|
663
|
-
id:
|
|
664
|
-
filters: [
|
|
664
|
+
id: o.value,
|
|
665
|
+
filters: [b]
|
|
665
666
|
});
|
|
666
667
|
e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + n.projectId });
|
|
667
668
|
let t = await e.call();
|
|
668
669
|
if (!t.errors?.length && !t.result) return;
|
|
669
|
-
!t.errors && t.result[0] ?
|
|
670
|
+
!t.errors && t.result[0] ? w(t.result[0]) : w(G);
|
|
670
671
|
}
|
|
671
672
|
}
|
|
672
673
|
}
|
|
673
674
|
}, { immediate: !0 });
|
|
674
|
-
let
|
|
675
|
-
if (n.canAdd !== "api" || !
|
|
676
|
-
let t =
|
|
675
|
+
let T = async (e) => {
|
|
676
|
+
if (n.canAdd !== "api" || !u) return;
|
|
677
|
+
let t = c.value, r = await u.changeParams({
|
|
677
678
|
project_id: n.projectId,
|
|
678
679
|
names: [e.name],
|
|
679
|
-
to_id: n.folder?.id ??
|
|
680
|
+
to_id: n.folder?.id ?? W.id,
|
|
680
681
|
to_type: "in_folder_last"
|
|
681
682
|
}).call();
|
|
682
|
-
if (
|
|
683
|
-
let e =
|
|
684
|
-
|
|
685
|
-
} else
|
|
686
|
-
|
|
683
|
+
if (r.result) {
|
|
684
|
+
let e = r.result[0];
|
|
685
|
+
w(e), a("addGroup", e);
|
|
686
|
+
} else w(t);
|
|
687
|
+
h.value?.resetCache(!0);
|
|
688
|
+
}, ee = async (e) => {
|
|
689
|
+
f && ((await f.changeParams({
|
|
690
|
+
project_id: n.projectId,
|
|
691
|
+
id: e.id,
|
|
692
|
+
name: v.value
|
|
693
|
+
}).call()).errors || (c.value.id === e.id && w({
|
|
694
|
+
...c.value,
|
|
695
|
+
name: v.value
|
|
696
|
+
}), h.value?.resetCache(!0), v.value = ""));
|
|
697
|
+
}, j = async (e) => {
|
|
698
|
+
if (d && !(await d.changeParams({
|
|
699
|
+
project_id: n.projectId,
|
|
700
|
+
id: e.id
|
|
701
|
+
}).call()).errors) {
|
|
702
|
+
if (c.value.id === e.id) {
|
|
703
|
+
let t = g.value ?? [], r = t.findIndex((t) => t.id === e.id), i = t[r + 1], a = t[r - 1];
|
|
704
|
+
w(i ?? a ?? (n.canSelectAll ? q() : G));
|
|
705
|
+
}
|
|
706
|
+
h.value?.resetCache(!0);
|
|
707
|
+
}
|
|
687
708
|
};
|
|
688
|
-
return (t, n) => (
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
709
|
+
return (t, n) => (P(), D(C, null, [
|
|
710
|
+
A(x, {
|
|
711
|
+
ref_key: "refSelector",
|
|
712
|
+
ref: h,
|
|
713
|
+
class: "top-groupSelector_group",
|
|
714
|
+
modelValue: c.value,
|
|
715
|
+
"onUpdate:modelValue": n[0] ||= (e) => c.value = e,
|
|
716
|
+
items: g.value ?? e.groups,
|
|
717
|
+
searchType: "inline",
|
|
718
|
+
icon: e.addIcon ? "" : void 0,
|
|
719
|
+
api: e.groups ? void 0 : R(l),
|
|
720
|
+
apiSetSearchParams: (...e) => R(S)(...e, "name"),
|
|
721
|
+
appendSearchToResult: !!e.canAdd,
|
|
722
|
+
useAllItem: e.canSelectAll ? R(q)().name : !1,
|
|
723
|
+
addChanger: e.addChanger,
|
|
724
|
+
useCache: "",
|
|
725
|
+
onAppendItem: T
|
|
726
|
+
}, {
|
|
727
|
+
item: V(({ item: r }) => [O("div", Je, [
|
|
728
|
+
r.id === R(null) ? (P(), D("div", Ye, L(t.$i18n.Common.Add) + ": ", 1)) : E("", !0),
|
|
729
|
+
O("span", {
|
|
730
|
+
class: "top-ellipsis1 top-groupSelector_groupItemName",
|
|
731
|
+
innerHTML: r.name
|
|
732
|
+
}, null, 8, Xe),
|
|
733
|
+
r.folder_path && e.showPath ? (P(), D("span", {
|
|
734
|
+
key: 1,
|
|
735
|
+
class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
|
|
736
|
+
innerHTML: r.folder_path
|
|
737
|
+
}, null, 8, Ze)) : E("", !0)
|
|
738
|
+
]), e.canEdit ? (P(), D(C, { key: 0 }, [r.id ? (P(), D("div", {
|
|
739
|
+
key: 0,
|
|
740
|
+
class: "top-groupSelector_actions",
|
|
741
|
+
"data-id": r.id
|
|
742
|
+
}, [A(_, {
|
|
743
|
+
id: m,
|
|
744
|
+
pos: "1",
|
|
745
|
+
data: { item: r }
|
|
746
|
+
}, {
|
|
747
|
+
default: V(() => [...n[2] ||= [O("div", {
|
|
748
|
+
class: "top-groupSelector_action",
|
|
749
|
+
"data-top-icon": ""
|
|
750
|
+
}, null, -1)]]),
|
|
751
|
+
_: 1
|
|
752
|
+
}, 8, ["data"]), A(_, {
|
|
753
|
+
id: p,
|
|
754
|
+
pos: "2",
|
|
755
|
+
data: { item: r }
|
|
756
|
+
}, {
|
|
757
|
+
default: V(() => [...n[3] ||= [O("div", {
|
|
758
|
+
class: "top-groupSelector_action",
|
|
759
|
+
"data-top-icon": ""
|
|
760
|
+
}, null, -1)]]),
|
|
761
|
+
_: 1
|
|
762
|
+
}, 8, ["data"])], 8, Qe)) : E("", !0)], 64)) : E("", !0)]),
|
|
763
|
+
_: 1
|
|
764
|
+
}, 8, [
|
|
765
|
+
"modelValue",
|
|
766
|
+
"items",
|
|
767
|
+
"icon",
|
|
768
|
+
"api",
|
|
769
|
+
"apiSetSearchParams",
|
|
770
|
+
"appendSearchToResult",
|
|
771
|
+
"useAllItem",
|
|
772
|
+
"addChanger"
|
|
773
|
+
]),
|
|
774
|
+
A(y, { id: m }, {
|
|
775
|
+
content: V(({ data: e }) => [A(r, {
|
|
776
|
+
modelValue: e?.item.name,
|
|
777
|
+
"onUpdate:modelValue": n[1] ||= (e) => v.value = e
|
|
778
|
+
}, null, 8, ["modelValue"])]),
|
|
779
|
+
footer: V(({ data: e }) => [A(i, { styling: "soft" }, {
|
|
780
|
+
default: V(() => [k(L(t.$i18n.Common.Cancel), 1)]),
|
|
781
|
+
_: 1
|
|
782
|
+
}), A(i, { onClick: (t) => ee(e?.item) }, {
|
|
783
|
+
default: V(() => [k(L(t.$i18n.Common.Save), 1)]),
|
|
784
|
+
_: 1
|
|
785
|
+
}, 8, ["onClick"])]),
|
|
786
|
+
_: 1
|
|
787
|
+
}),
|
|
788
|
+
A(y, { id: p }, {
|
|
789
|
+
content: V(() => [O("span", { innerHTML: t.$i18n.Keywords.Delete_group_warning }, null, 8, $e)]),
|
|
790
|
+
footer: V(({ data: e }) => [A(i, { styling: "soft" }, {
|
|
791
|
+
default: V(() => [k(L(t.$i18n.Common.Cancel), 1)]),
|
|
792
|
+
_: 1
|
|
793
|
+
}), A(i, {
|
|
794
|
+
color: "red",
|
|
795
|
+
onClick: (t) => j(e?.item)
|
|
796
|
+
}, {
|
|
797
|
+
default: V(() => [k(L(t.$i18n.Common.Delete), 1)]),
|
|
798
|
+
_: 1
|
|
799
|
+
}, 8, ["onClick"])]),
|
|
800
|
+
_: 1
|
|
801
|
+
})
|
|
802
|
+
], 64));
|
|
725
803
|
}
|
|
726
|
-
}),
|
|
804
|
+
}), tt = { class: "top-groupSelector" }, nt = /* @__PURE__ */ j({
|
|
727
805
|
__name: "groupSelector",
|
|
728
|
-
props: /* @__PURE__ */
|
|
806
|
+
props: /* @__PURE__ */ M({
|
|
729
807
|
folderId: {},
|
|
730
808
|
folder: {},
|
|
731
809
|
groupId: {},
|
|
@@ -739,6 +817,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
739
817
|
},
|
|
740
818
|
canSelectAllGroups: { type: Boolean },
|
|
741
819
|
canAddGroup: { type: [String, Boolean] },
|
|
820
|
+
canEditGroup: { type: Boolean },
|
|
742
821
|
autoselect: { default: "first" },
|
|
743
822
|
addChanger: {
|
|
744
823
|
type: Boolean,
|
|
@@ -765,25 +844,25 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
765
844
|
folderModifiers: {},
|
|
766
845
|
groupId: { required: !0 },
|
|
767
846
|
groupIdModifiers: {},
|
|
768
|
-
group: { default:
|
|
847
|
+
group: { default: G },
|
|
769
848
|
groupModifiers: {}
|
|
770
849
|
}),
|
|
771
|
-
emits: /* @__PURE__ */
|
|
850
|
+
emits: /* @__PURE__ */ M(["update:groups"], [
|
|
772
851
|
"update:folderId",
|
|
773
852
|
"update:folder",
|
|
774
853
|
"update:groupId",
|
|
775
854
|
"update:group"
|
|
776
855
|
]),
|
|
777
856
|
setup(e, { emit: t }) {
|
|
778
|
-
let n = e, r =
|
|
779
|
-
i.value =
|
|
857
|
+
let n = e, r = z(e, "folderId"), i = z(e, "folder"), a = z(e, "groupId"), o = z(e, "group"), s = t;
|
|
858
|
+
i.value = Le(n.folders ?? { root: [W] }, n.canSelectAllGroups).get(r.value);
|
|
780
859
|
let c = n.groups?.find((e) => e.id === a.value);
|
|
781
|
-
a.value || (c = n.groups?.[0]), n.canSelectAllGroups && !c && (c =
|
|
860
|
+
a.value || (c = n.groups?.[0]), n.canSelectAllGroups && !c && (c = q()), n.canSelectAllGroups && !c && (c = q()), (n.autoselect === "placeholder" || !c) && (c = He()), c ??= G, o.value = c;
|
|
782
861
|
let l = (e) => {
|
|
783
862
|
let t;
|
|
784
863
|
n.groups && e && (t = [...n.groups, e]), s("update:groups", t);
|
|
785
864
|
};
|
|
786
|
-
return (t, n) => (
|
|
865
|
+
return (t, n) => (P(), D("div", tt, [e.showFolders ? (P(), T(Ve, {
|
|
787
866
|
key: 0,
|
|
788
867
|
folderId: r.value,
|
|
789
868
|
"onUpdate:folderId": n[0] ||= (e) => r.value = e,
|
|
@@ -806,7 +885,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
806
885
|
"addIcon",
|
|
807
886
|
"client",
|
|
808
887
|
"service"
|
|
809
|
-
])) :
|
|
888
|
+
])) : E("", !0), e.showGroups ? (P(), T(et, {
|
|
810
889
|
key: 1,
|
|
811
890
|
groupId: a.value,
|
|
812
891
|
"onUpdate:groupId": n[2] ||= (e) => a.value = e,
|
|
@@ -817,6 +896,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
817
896
|
groups: e.groups,
|
|
818
897
|
on: e.on,
|
|
819
898
|
canAdd: e.canAddGroup,
|
|
899
|
+
canEdit: e.canEditGroup,
|
|
820
900
|
canSelectAll: e.canSelectAllGroups,
|
|
821
901
|
autoselect: e.autoselect,
|
|
822
902
|
addChanger: e.addChanger,
|
|
@@ -833,6 +913,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
833
913
|
"groups",
|
|
834
914
|
"on",
|
|
835
915
|
"canAdd",
|
|
916
|
+
"canEdit",
|
|
836
917
|
"canSelectAll",
|
|
837
918
|
"autoselect",
|
|
838
919
|
"addChanger",
|
|
@@ -840,41 +921,41 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
840
921
|
"addIcon",
|
|
841
922
|
"client",
|
|
842
923
|
"service"
|
|
843
|
-
])) :
|
|
924
|
+
])) : E("", !0)]));
|
|
844
925
|
}
|
|
845
|
-
}),
|
|
926
|
+
}), rt = (e) => ({
|
|
846
927
|
id: null,
|
|
847
928
|
name: e,
|
|
848
929
|
listItemProps: { type: "title" }
|
|
849
|
-
}),
|
|
930
|
+
}), it = {
|
|
850
931
|
scheduledUpdate: !1,
|
|
851
932
|
manualUpdate: !1,
|
|
852
933
|
guestProjects: !1
|
|
853
|
-
},
|
|
934
|
+
}, at = (t, n) => {
|
|
854
935
|
let r = [], i = {
|
|
855
|
-
scheduledUpdate:
|
|
856
|
-
manualUpdate:
|
|
857
|
-
guestProjects:
|
|
936
|
+
scheduledUpdate: rt(e().Projects.Scheduled_update),
|
|
937
|
+
manualUpdate: rt(e().Projects.Manual_update),
|
|
938
|
+
guestProjects: rt(e().Projects.Guest_projects)
|
|
858
939
|
}, a = n ? {
|
|
859
940
|
scheduledUpdate: !1,
|
|
860
941
|
manualUpdate: !1,
|
|
861
942
|
guestProjects: !1
|
|
862
|
-
} :
|
|
943
|
+
} : it;
|
|
863
944
|
for (let e of t) !a.scheduledUpdate && e.right?.startsWith("1") && e.on > 0 && (r.push(i.scheduledUpdate), a.scheduledUpdate = !0), !a.manualUpdate && e.right?.startsWith("1") && e.on === 0 && (r.push(i.manualUpdate), a.manualUpdate = !0), !a.guestProjects && e.right?.startsWith("0") && e.on >= 0 && (r.push(i.guestProjects), a.guestProjects = !0), r.push(e);
|
|
864
945
|
return r;
|
|
865
|
-
},
|
|
946
|
+
}, ot = (e) => e.map((e) => ({
|
|
866
947
|
...e,
|
|
867
948
|
listItemProps: { attrs: { title: e.name } }
|
|
868
|
-
})),
|
|
949
|
+
})), st = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(it).forEach((e) => it[e] = !1), at(ot(e), n)), ct = (e) => {
|
|
869
950
|
e = e.replace(/#.*/, "");
|
|
870
951
|
let t = location.hash;
|
|
871
952
|
return t = t.replace(/historyView=[^&]*/, ""), t = t.replace(/modelsKeys=[^&]*/, ""), t = t.replace(/competitorsIds=[^&]*/, ""), t = t.replace(/searchersKeys=[^&]*/, ""), t = t.replace(/regionIndex=[^&]*/, ""), t = t.replace(/regionsIndexes=[^&]*/, ""), t = t.replace(/folderId=[^&]*/, ""), t = t.replace(/groupId=[^&]*/, ""), t = t.replace(/tags=[^&]*/, ""), window.mo?.getHash && !window.mo.getHash("dataSort").toString().includes("0000-00-00") && (t = t.replace(/dataSort=[^&]*/, "")), 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;
|
|
872
|
-
},
|
|
873
|
-
t && t.target instanceof HTMLElement &&
|
|
874
|
-
let n =
|
|
953
|
+
}, lt = (e, t) => {
|
|
954
|
+
t && t.target instanceof HTMLElement && l.close(t.target.closest(".top-popup-wrapper"));
|
|
955
|
+
let n = ct(e);
|
|
875
956
|
location.href = n;
|
|
876
|
-
},
|
|
877
|
-
let t =
|
|
957
|
+
}, ut = (e) => {
|
|
958
|
+
let t = dt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
|
|
878
959
|
return n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
|
|
879
960
|
"watcher",
|
|
880
961
|
"indexing",
|
|
@@ -883,15 +964,15 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
883
964
|
"direct",
|
|
884
965
|
"adwords"
|
|
885
966
|
].includes(n[4]) && (i = n[4] + "/"), "https://" + t + "/" + r + e + "/" + i;
|
|
886
|
-
},
|
|
967
|
+
}, dt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, ft = (e) => {
|
|
887
968
|
let t = e.startsWith("http") ? e : "http://" + e;
|
|
888
969
|
return t = t.replace(/"/g, "%22"), t;
|
|
889
|
-
},
|
|
970
|
+
}, pt = (e, t) => {
|
|
890
971
|
let n = e.params.filters ?? [];
|
|
891
972
|
n = n.filter((e) => e.name !== "GEN_SEARCH_STRING()");
|
|
892
|
-
let r =
|
|
893
|
-
t && n.push(
|
|
894
|
-
},
|
|
973
|
+
let r = g(t), i = t.replace(/([[^$.|?*+()])/g, "\\$1"), a = r.replace(/([[^$.|?*+()])/g, "\\$1");
|
|
974
|
+
t && n.push(s("GEN_SEARCH_STRING()", "REGEXP", [`(${i}|${a})`])), e.changeParams({ filters: n });
|
|
975
|
+
}, mt = (e, t, n) => {
|
|
895
976
|
let r = e.gen("/get/projects_2/projects/", [
|
|
896
977
|
"id",
|
|
897
978
|
"user_id",
|
|
@@ -902,23 +983,23 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
902
983
|
]);
|
|
903
984
|
return r.params = {
|
|
904
985
|
...n,
|
|
905
|
-
filters: [
|
|
986
|
+
filters: [s("on", "GREATER_THAN_EQUALS", [0])],
|
|
906
987
|
orders: [
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
988
|
+
o("user_id", "DESC", [t]),
|
|
989
|
+
o("on", "DESC"),
|
|
990
|
+
o("favorite", "DESC"),
|
|
991
|
+
o("id", "DESC")
|
|
911
992
|
]
|
|
912
993
|
}, r.options.onApiLoaded = (e, t, n) => {
|
|
913
994
|
let r = t.data.filters.length === 1 && t.data.offset === 0 || t.data.limit === 1e3, i = t.data.limit === 100 && t.data.filters.length > 1 ? !0 : void 0;
|
|
914
|
-
e.result =
|
|
995
|
+
e.result = st(e.result, r, i), n?.(e, t);
|
|
915
996
|
}, r;
|
|
916
|
-
},
|
|
997
|
+
}, ht = (e) => e.gen("/add/projects_2/projects/"), gt = { class: "top-projectSelectorSubmenu_item" }, _t = [
|
|
917
998
|
"href",
|
|
918
999
|
"title",
|
|
919
1000
|
"data-top-icon",
|
|
920
1001
|
"data-right"
|
|
921
|
-
],
|
|
1002
|
+
], vt = { class: "top-projectSelectorSubmenu_item" }, yt = ["href"], bt = /* @__PURE__ */ j({
|
|
922
1003
|
__name: "submenu",
|
|
923
1004
|
props: {
|
|
924
1005
|
id: {},
|
|
@@ -926,7 +1007,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
926
1007
|
url: {}
|
|
927
1008
|
},
|
|
928
1009
|
setup(t) {
|
|
929
|
-
let n = t, r = e(), i =
|
|
1010
|
+
let n = t, r = e(), i = dt(), a = [
|
|
930
1011
|
{
|
|
931
1012
|
href: `https://${i}/project/keywords/${n.id}/`,
|
|
932
1013
|
title: r.Common.Menu_phrases,
|
|
@@ -999,7 +1080,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
999
1080
|
icon: "",
|
|
1000
1081
|
right: "2"
|
|
1001
1082
|
}
|
|
1002
|
-
], o =
|
|
1083
|
+
], o = w(() => {
|
|
1003
1084
|
if (!window.page?.data?.aiTracker) {
|
|
1004
1085
|
let e = a.findIndex((e) => e.href.includes("ai-tracker"));
|
|
1005
1086
|
e !== -1 && a.splice(e, 1);
|
|
@@ -1007,53 +1088,53 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1007
1088
|
return n.right.includes("0") ? a.filter((e) => n.right[e.right] === "1") : a;
|
|
1008
1089
|
});
|
|
1009
1090
|
return (e, n) => {
|
|
1010
|
-
let r =
|
|
1011
|
-
return
|
|
1091
|
+
let r = se("TopButton");
|
|
1092
|
+
return P(), T(R(y), {
|
|
1012
1093
|
class: "top-projectSelectorSubmenu",
|
|
1013
1094
|
notch: !1,
|
|
1014
1095
|
pos: "2"
|
|
1015
1096
|
}, {
|
|
1016
|
-
opener:
|
|
1097
|
+
opener: V(() => [A(r, {
|
|
1017
1098
|
class: "top-projectSelectorSubmenu_opener",
|
|
1018
1099
|
"data-top-icon": "",
|
|
1019
1100
|
color: "theme"
|
|
1020
1101
|
})]),
|
|
1021
|
-
contentList:
|
|
1102
|
+
contentList: V(() => [(P(!0), D(C, null, I(o.value, (e) => (P(), D("li", gt, [O("a", {
|
|
1022
1103
|
href: e.href,
|
|
1023
1104
|
title: e.title,
|
|
1024
1105
|
"data-top-icon": e.icon,
|
|
1025
1106
|
"data-right": e.right
|
|
1026
|
-
}, null, 8,
|
|
1107
|
+
}, null, 8, _t)]))), 256)), O("li", vt, [O("a", {
|
|
1027
1108
|
href: t.url,
|
|
1028
1109
|
"data-top-icon": "",
|
|
1029
1110
|
target: "_blank"
|
|
1030
|
-
}, null, 8,
|
|
1111
|
+
}, null, 8, yt)])]),
|
|
1031
1112
|
_: 1
|
|
1032
1113
|
});
|
|
1033
1114
|
};
|
|
1034
1115
|
}
|
|
1035
|
-
}),
|
|
1036
|
-
localStorage.setItem(
|
|
1116
|
+
}), J = "ui_project_selector_total:", xt = 1440 * 60 * 1e3, Y = ue(), St = F(0), X = F(null), Ct = (e, t) => {
|
|
1117
|
+
localStorage.setItem(J + e, JSON.stringify({
|
|
1037
1118
|
projectsTotal: t,
|
|
1038
|
-
expiresAt: Date.now() +
|
|
1119
|
+
expiresAt: Date.now() + xt
|
|
1039
1120
|
}));
|
|
1040
|
-
},
|
|
1041
|
-
let t = localStorage.getItem(
|
|
1121
|
+
}, wt = (e) => {
|
|
1122
|
+
let t = localStorage.getItem(J + e);
|
|
1042
1123
|
if (!t) return;
|
|
1043
1124
|
let { projectsTotal: n, expiresAt: r } = JSON.parse(t);
|
|
1044
1125
|
if (Date.now() > r) {
|
|
1045
|
-
localStorage.removeItem(
|
|
1126
|
+
localStorage.removeItem(J + e);
|
|
1046
1127
|
return;
|
|
1047
1128
|
}
|
|
1048
1129
|
return n;
|
|
1049
|
-
},
|
|
1050
|
-
|
|
1051
|
-
},
|
|
1130
|
+
}, Tt = (e, t = !0) => {
|
|
1131
|
+
Y.value = void 0, localStorage.removeItem(J + e), t && St.value++;
|
|
1132
|
+
}, Et = { class: "top-projectSelector_item" }, Dt = { class: "top-projectSelector_itemText" }, Ot = { class: "top-comment" }, kt = {
|
|
1052
1133
|
key: 0,
|
|
1053
1134
|
class: "top-comment"
|
|
1054
|
-
},
|
|
1135
|
+
}, At = ["href", "onClick"], jt = 1e3, Mt = /* @__PURE__ */ j({
|
|
1055
1136
|
__name: "projectSelector",
|
|
1056
|
-
props: /* @__PURE__ */
|
|
1137
|
+
props: /* @__PURE__ */ M({
|
|
1057
1138
|
modelValue: {},
|
|
1058
1139
|
client: {},
|
|
1059
1140
|
addLinksToProjects: {
|
|
@@ -1076,33 +1157,33 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1076
1157
|
setup(t) {
|
|
1077
1158
|
let n = e();
|
|
1078
1159
|
if (!window.mo?.user?.id) throw Error("TopProjectSelector: не удалось определить userId. Компонент требует авторизованного пользователя (см. window.mo.user.id)");
|
|
1079
|
-
let r = window.mo.user.id, i = t, a =
|
|
1080
|
-
if (!(!c.value && c.value !== 0)) return c.value <
|
|
1160
|
+
let r = window.mo.user.id, i = t, a = z(t, "modelValue"), o = mt(i.client, r), s = ht(i.client), c = F(wt(r)), l = F(null), f = w(() => i.placeholder ?? n.Projects.Select_project), p = w(() => !Y.value || !i.excludeProjectId ? Y.value : Y.value.filter((e) => e.id !== i.excludeProjectId)), m = w(() => {
|
|
1161
|
+
if (!(!c.value && c.value !== 0)) return c.value < jt ? "static" : "api";
|
|
1081
1162
|
});
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
}),
|
|
1085
|
-
!a.value.id || !i.addLinksToProjects ||
|
|
1163
|
+
B(St, () => {
|
|
1164
|
+
v();
|
|
1165
|
+
}), B(a, () => {
|
|
1166
|
+
!a.value.id || !i.addLinksToProjects || lt(ut(a.value.id));
|
|
1086
1167
|
});
|
|
1087
1168
|
let h = async () => {
|
|
1088
|
-
|
|
1089
|
-
let e = await
|
|
1169
|
+
X.value ||= mt(i.client, r, { limit: jt }).call();
|
|
1170
|
+
let e = await X.value;
|
|
1090
1171
|
if (e.errors) {
|
|
1091
|
-
|
|
1172
|
+
X.value = null;
|
|
1092
1173
|
return;
|
|
1093
1174
|
}
|
|
1094
|
-
return
|
|
1095
|
-
},
|
|
1175
|
+
return X.value = null, e;
|
|
1176
|
+
}, g = async () => {
|
|
1096
1177
|
if (c.value) return;
|
|
1097
1178
|
let e = await h();
|
|
1098
|
-
e && (c.value = e.total, m.value === "static" && !
|
|
1099
|
-
},
|
|
1179
|
+
e && (c.value = e.total, m.value === "static" && !Y.value && (Y.value = e.result), c.value && Ct(r, c.value));
|
|
1180
|
+
}, _ = async (e) => {
|
|
1100
1181
|
let t = await s.changeParams({
|
|
1101
1182
|
url: e.name,
|
|
1102
1183
|
name: e.name
|
|
1103
1184
|
}).call();
|
|
1104
1185
|
if (!t.errors) {
|
|
1105
|
-
if (
|
|
1186
|
+
if (Y.value && m.value === "static") {
|
|
1106
1187
|
let n = {
|
|
1107
1188
|
id: Number(t.result),
|
|
1108
1189
|
user_id: r,
|
|
@@ -1111,29 +1192,29 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1111
1192
|
on: 0,
|
|
1112
1193
|
right: "11111111111111111111",
|
|
1113
1194
|
listItemProps: { attrs: { title: e.name } }
|
|
1114
|
-
}, i =
|
|
1115
|
-
|
|
1116
|
-
...
|
|
1195
|
+
}, i = Y.value.findIndex((e) => e.on === 0);
|
|
1196
|
+
Y.value = [
|
|
1197
|
+
...Y.value.slice(0, i),
|
|
1117
1198
|
n,
|
|
1118
|
-
...
|
|
1119
|
-
], c.value && (c.value += 1,
|
|
1199
|
+
...Y.value.slice(i)
|
|
1200
|
+
], c.value && (c.value += 1, Ct(r, c.value));
|
|
1120
1201
|
}
|
|
1121
|
-
m.value === "api" &&
|
|
1202
|
+
m.value === "api" && Tt(r);
|
|
1122
1203
|
}
|
|
1123
|
-
},
|
|
1124
|
-
m.value === "api" &&
|
|
1125
|
-
},
|
|
1126
|
-
if (
|
|
1204
|
+
}, v = () => {
|
|
1205
|
+
m.value === "api" && l.value?.resetCache(!0);
|
|
1206
|
+
}, y = async () => {
|
|
1207
|
+
if (Y.value || m.value !== "static") return;
|
|
1127
1208
|
let e = await h();
|
|
1128
|
-
e && (
|
|
1209
|
+
e && (Y.value = e.result);
|
|
1129
1210
|
};
|
|
1130
|
-
return
|
|
1131
|
-
await
|
|
1211
|
+
return ie(async () => {
|
|
1212
|
+
await g();
|
|
1132
1213
|
}), (e, n) => {
|
|
1133
|
-
let r =
|
|
1134
|
-
return
|
|
1214
|
+
let r = se("TopButton");
|
|
1215
|
+
return P(), T(x, {
|
|
1135
1216
|
ref_key: "refSelector",
|
|
1136
|
-
ref:
|
|
1217
|
+
ref: l,
|
|
1137
1218
|
class: "top-projectSelector",
|
|
1138
1219
|
modelValue: a.value,
|
|
1139
1220
|
"onUpdate:modelValue": n[1] ||= (e) => a.value = e,
|
|
@@ -1147,44 +1228,44 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1147
1228
|
],
|
|
1148
1229
|
placeholder: f.value,
|
|
1149
1230
|
hasCloserBtn: "",
|
|
1150
|
-
api: m.value === "api" ?
|
|
1151
|
-
apiSetSearchParams: m.value === "api" ? (...e) =>
|
|
1231
|
+
api: m.value === "api" ? R(o) : void 0,
|
|
1232
|
+
apiSetSearchParams: m.value === "api" ? (...e) => R(pt)(...e) : void 0,
|
|
1152
1233
|
useCache: "",
|
|
1153
1234
|
appendSearchToResult: "",
|
|
1154
1235
|
appendSearchAllowDuplicate: "",
|
|
1155
|
-
appendSearchToResultCond:
|
|
1236
|
+
appendSearchToResultCond: R(u),
|
|
1156
1237
|
appendWithoutSelect: "",
|
|
1157
1238
|
buttonProps: t.buttonProps,
|
|
1158
1239
|
openerShortcut: t.openerShortcut,
|
|
1159
|
-
onAppendItem:
|
|
1160
|
-
onOpen:
|
|
1240
|
+
onAppendItem: _,
|
|
1241
|
+
onOpen: y
|
|
1161
1242
|
}, {
|
|
1162
|
-
item:
|
|
1163
|
-
t.addLinksToProjects ? (
|
|
1243
|
+
item: V(({ item: i }) => [O("div", Et, [O("div", Dt, [i.id ? (P(), D(C, { key: 0 }, [k(L(R(d)(i.name, 20)) + " ", 1), O("span", Ot, " id " + L(i.id), 1)], 64)) : (P(), D(C, { key: 1 }, [i.listItemProps?.type ? E("", !0) : (P(), D("div", kt, L(e.$i18n.Projects.Add_project) + ": ", 1)), k(" " + L(i.name), 1)], 64))]), i.id ? (P(), D(C, { key: 0 }, [
|
|
1244
|
+
t.addLinksToProjects ? (P(), D("a", {
|
|
1164
1245
|
key: 0,
|
|
1165
1246
|
class: "top-projectSelector_itemLink",
|
|
1166
|
-
href:
|
|
1167
|
-
onClick:
|
|
1168
|
-
}, null, 8,
|
|
1169
|
-
e.$core.state.isMobile ?
|
|
1247
|
+
href: R(ut)(i.id),
|
|
1248
|
+
onClick: H((e) => R(lt)(R(ut)(i.id), e), ["prevent", "stop"])
|
|
1249
|
+
}, null, 8, At)) : E("", !0),
|
|
1250
|
+
e.$core.state.isMobile ? E("", !0) : (P(), T(r, {
|
|
1170
1251
|
key: 1,
|
|
1171
1252
|
class: "top-projectSelector_itemExtLink",
|
|
1172
|
-
href:
|
|
1253
|
+
href: R(ft)(i.url),
|
|
1173
1254
|
"data-top-icon": "",
|
|
1174
1255
|
color: "theme",
|
|
1175
1256
|
target: "_blank",
|
|
1176
|
-
onClick: n[0] ||=
|
|
1257
|
+
onClick: n[0] ||= H(() => {}, ["stop"])
|
|
1177
1258
|
}, null, 8, ["href"])),
|
|
1178
|
-
|
|
1259
|
+
A(bt, {
|
|
1179
1260
|
id: i.id,
|
|
1180
1261
|
right: i.right ?? void 0,
|
|
1181
|
-
url:
|
|
1262
|
+
url: R(ft)(i.url)
|
|
1182
1263
|
}, null, 8, [
|
|
1183
1264
|
"id",
|
|
1184
1265
|
"right",
|
|
1185
1266
|
"url"
|
|
1186
1267
|
])
|
|
1187
|
-
], 64)) :
|
|
1268
|
+
], 64)) : E("", !0)])]),
|
|
1188
1269
|
_: 1
|
|
1189
1270
|
}, 8, [
|
|
1190
1271
|
"modelValue",
|
|
@@ -1200,40 +1281,40 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1200
1281
|
]);
|
|
1201
1282
|
};
|
|
1202
1283
|
}
|
|
1203
|
-
}),
|
|
1204
|
-
e =
|
|
1284
|
+
}), Nt = (e) => "-" + e, Z = (e) => e[0] === "-" ? e.substring(1) : e, Q = (e, t) => {
|
|
1285
|
+
e = Z(e);
|
|
1205
1286
|
let n = t.find((t) => t.id === e);
|
|
1206
1287
|
if (n) return n;
|
|
1207
|
-
},
|
|
1288
|
+
}, Pt = (e, t, n) => {
|
|
1208
1289
|
t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
|
|
1209
|
-
let r =
|
|
1290
|
+
let r = l.genElPopupOpener("div", t);
|
|
1210
1291
|
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) => {
|
|
1211
1292
|
t.preventDefault(), t.stopPropagation(), r.onclick = null;
|
|
1212
|
-
let i =
|
|
1213
|
-
|
|
1293
|
+
let i = F(e.modelValue);
|
|
1294
|
+
c(r, "topTagSelectorTarget", {
|
|
1214
1295
|
model: i,
|
|
1215
1296
|
mode: e.mode,
|
|
1216
1297
|
targetId: e.targetId,
|
|
1217
1298
|
filters: e.filters,
|
|
1218
1299
|
payload: e.payload
|
|
1219
|
-
}), delete r.dataset.topPopupDisabled,
|
|
1220
|
-
e.modelValue = i.value,
|
|
1300
|
+
}), delete r.dataset.topPopupDisabled, te(e.modelValue) || B(i, () => {
|
|
1301
|
+
e.modelValue = i.value, It(r, e, n);
|
|
1221
1302
|
}), r.click();
|
|
1222
|
-
},
|
|
1303
|
+
}, te(e.modelValue) ? B(e.modelValue, () => It(r, e, n)) : c(r, "topTagSelectorRender", (t) => {
|
|
1223
1304
|
e.modelValue = t;
|
|
1224
|
-
let i =
|
|
1225
|
-
i && (i.model.value = t),
|
|
1226
|
-
}),
|
|
1227
|
-
},
|
|
1228
|
-
|
|
1229
|
-
},
|
|
1230
|
-
let i =
|
|
1305
|
+
let i = c(r, "topTagSelectorTarget");
|
|
1306
|
+
i && (i.model.value = t), It(r, e, n);
|
|
1307
|
+
}), It(r, e, n), r;
|
|
1308
|
+
}, Ft = (e, t) => {
|
|
1309
|
+
c(e, "topTagSelectorRender")?.(t);
|
|
1310
|
+
}, It = (t, n, r) => {
|
|
1311
|
+
let i = R(n.modelValue);
|
|
1231
1312
|
if (t.classList.toggle("top-tagSelector-selectedOne", !i.length || i.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", i.length > 5), n.mode === "setter" && n.filters) {
|
|
1232
1313
|
t.innerHTML = `<div>${r}</div>`;
|
|
1233
1314
|
return;
|
|
1234
1315
|
}
|
|
1235
1316
|
if (t.innerHTML = "", !i.length && n.mode === "filter") {
|
|
1236
|
-
let n =
|
|
1317
|
+
let n = Lt({
|
|
1237
1318
|
id: "all",
|
|
1238
1319
|
colorId: "",
|
|
1239
1320
|
name: e().Common?.All_tags ?? "",
|
|
@@ -1242,18 +1323,18 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1242
1323
|
t.append(n);
|
|
1243
1324
|
}
|
|
1244
1325
|
i.forEach((e) => {
|
|
1245
|
-
let r =
|
|
1246
|
-
id:
|
|
1247
|
-
colorId:
|
|
1248
|
-
name:
|
|
1249
|
-
state:
|
|
1326
|
+
let r = Lt({
|
|
1327
|
+
id: Z(e),
|
|
1328
|
+
colorId: Q(e, n.tags)?.color_id ?? "",
|
|
1329
|
+
name: Q(e, n.tags)?.name ?? "",
|
|
1330
|
+
state: Z(e) === e ? "selected" : "excluded"
|
|
1250
1331
|
});
|
|
1251
1332
|
t.append(r);
|
|
1252
1333
|
});
|
|
1253
|
-
},
|
|
1334
|
+
}, Lt = (e) => {
|
|
1254
1335
|
let t = document.createElement("div");
|
|
1255
1336
|
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;
|
|
1256
|
-
},
|
|
1337
|
+
}, Rt = [
|
|
1257
1338
|
{
|
|
1258
1339
|
id: "1",
|
|
1259
1340
|
name: "Without Tag",
|
|
@@ -1304,11 +1385,11 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1304
1385
|
name: "Turquoise",
|
|
1305
1386
|
color_id: "10"
|
|
1306
1387
|
}
|
|
1307
|
-
],
|
|
1388
|
+
], zt = [
|
|
1308
1389
|
"data-tag_id",
|
|
1309
1390
|
"data-tag_color_id",
|
|
1310
1391
|
"title"
|
|
1311
|
-
],
|
|
1392
|
+
], Bt = /* @__PURE__ */ j({
|
|
1312
1393
|
__name: "tagIcon",
|
|
1313
1394
|
props: {
|
|
1314
1395
|
id: {},
|
|
@@ -1317,8 +1398,8 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1317
1398
|
state: {}
|
|
1318
1399
|
},
|
|
1319
1400
|
setup(e) {
|
|
1320
|
-
return (t, n) => (
|
|
1321
|
-
class:
|
|
1401
|
+
return (t, n) => (P(), D("div", {
|
|
1402
|
+
class: N({
|
|
1322
1403
|
"top-tagSelector_tagIcon": !0,
|
|
1323
1404
|
"top-tagSelector-active": !!e.state,
|
|
1324
1405
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
@@ -1326,11 +1407,11 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1326
1407
|
"data-tag_id": e.id,
|
|
1327
1408
|
"data-tag_color_id": e.colorId,
|
|
1328
1409
|
title: e.name
|
|
1329
|
-
}, null, 10,
|
|
1410
|
+
}, null, 10, zt));
|
|
1330
1411
|
}
|
|
1331
|
-
}),
|
|
1412
|
+
}), Vt = ["contenteditable", "onKeydown"], Ht = /* @__PURE__ */ j({
|
|
1332
1413
|
__name: "tagPopupListItem",
|
|
1333
|
-
props: /* @__PURE__ */
|
|
1414
|
+
props: /* @__PURE__ */ M({
|
|
1334
1415
|
editable: { type: Boolean },
|
|
1335
1416
|
disabled: { type: Boolean },
|
|
1336
1417
|
canExclude: { type: Boolean },
|
|
@@ -1342,18 +1423,18 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1342
1423
|
name: { required: !0 },
|
|
1343
1424
|
nameModifiers: {}
|
|
1344
1425
|
}),
|
|
1345
|
-
emits: /* @__PURE__ */
|
|
1426
|
+
emits: /* @__PURE__ */ M([
|
|
1346
1427
|
"update:name",
|
|
1347
1428
|
"unselect",
|
|
1348
1429
|
"exclude",
|
|
1349
1430
|
"select"
|
|
1350
1431
|
], ["update:name"]),
|
|
1351
1432
|
setup(e, { emit: t }) {
|
|
1352
|
-
let n = e, r = t, i =
|
|
1433
|
+
let n = e, r = t, i = z(e, "name"), a = F(null), o = w(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
|
|
1353
1434
|
contenteditable: s.value,
|
|
1354
1435
|
onpaste: (e) => e.preventDefault()
|
|
1355
|
-
}), s =
|
|
1356
|
-
s.value = !0, await
|
|
1436
|
+
}), s = F(!1), c = async () => {
|
|
1437
|
+
s.value = !0, await re(), a.value?.focus();
|
|
1357
1438
|
}, l = () => {
|
|
1358
1439
|
let e = a.value?.innerText;
|
|
1359
1440
|
if (!e) return u();
|
|
@@ -1365,8 +1446,8 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1365
1446
|
let t = "selected";
|
|
1366
1447
|
n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
|
|
1367
1448
|
};
|
|
1368
|
-
return (t, n) => (
|
|
1369
|
-
class:
|
|
1449
|
+
return (t, n) => (P(), T(v, {
|
|
1450
|
+
class: N({
|
|
1370
1451
|
"top-tagSelector_tagListItem": !0,
|
|
1371
1452
|
"top-tagSelector_tagListItem-inEdit": s.value,
|
|
1372
1453
|
"top-tagSelector_tagListItem-disabled": e.disabled,
|
|
@@ -1374,10 +1455,10 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1374
1455
|
"top-tagSelector-active": !!e.state,
|
|
1375
1456
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
1376
1457
|
}),
|
|
1377
|
-
onClick:
|
|
1458
|
+
onClick: H(d, ["stop"])
|
|
1378
1459
|
}, {
|
|
1379
|
-
default:
|
|
1380
|
-
|
|
1460
|
+
default: V(() => [
|
|
1461
|
+
A(Bt, {
|
|
1381
1462
|
id: e.id,
|
|
1382
1463
|
name: i.value,
|
|
1383
1464
|
colorId: e.colorId,
|
|
@@ -1388,31 +1469,31 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1388
1469
|
"colorId",
|
|
1389
1470
|
"state"
|
|
1390
1471
|
]),
|
|
1391
|
-
|
|
1472
|
+
O("span", ne({
|
|
1392
1473
|
ref_key: "elName",
|
|
1393
1474
|
ref: a,
|
|
1394
1475
|
class: "top-tagSelector_tagListItemName",
|
|
1395
1476
|
contenteditable: s.value ? "plaintext-only" : !1
|
|
1396
|
-
}, o.value, { onKeydown: [
|
|
1397
|
-
e.editable ? (
|
|
1477
|
+
}, o.value, { onKeydown: [pe(H(l, ["stop"]), ["enter"]), pe(H(u, ["stop"]), ["esc"])] }), L(i.value), 17, Vt),
|
|
1478
|
+
e.editable ? (P(), D(C, { key: 0 }, [s.value ? (P(), D("span", {
|
|
1398
1479
|
key: 1,
|
|
1399
1480
|
"data-top-icon": "",
|
|
1400
1481
|
class: "top-tagSelector_edit",
|
|
1401
|
-
onClick:
|
|
1402
|
-
})) : (
|
|
1482
|
+
onClick: H(l, ["stop"])
|
|
1483
|
+
})) : (P(), D("span", {
|
|
1403
1484
|
key: 0,
|
|
1404
1485
|
"data-top-icon": "",
|
|
1405
1486
|
class: "top-tagSelector_edit",
|
|
1406
1487
|
onClick: c
|
|
1407
|
-
}))], 64)) :
|
|
1488
|
+
}))], 64)) : E("", !0)
|
|
1408
1489
|
]),
|
|
1409
1490
|
_: 1
|
|
1410
1491
|
}, 8, ["class"]));
|
|
1411
1492
|
}
|
|
1412
|
-
}),
|
|
1493
|
+
}), Ut = { key: 1 }, Wt = /* @__PURE__ */ j({
|
|
1413
1494
|
inheritAttrs: !1,
|
|
1414
1495
|
__name: "popupOpener",
|
|
1415
|
-
props: /* @__PURE__ */
|
|
1496
|
+
props: /* @__PURE__ */ M({
|
|
1416
1497
|
modelValue: {},
|
|
1417
1498
|
id: {},
|
|
1418
1499
|
tags: {},
|
|
@@ -1428,17 +1509,17 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1428
1509
|
}),
|
|
1429
1510
|
emits: ["update:modelValue"],
|
|
1430
1511
|
setup(e) {
|
|
1431
|
-
let t = e, n =
|
|
1512
|
+
let t = e, n = z(e, "modelValue"), r = t.useTopButton ? i : "div", a = t.useTopButton ? "html" : "default", o = {
|
|
1432
1513
|
model: n,
|
|
1433
1514
|
mode: t.mode,
|
|
1434
1515
|
targetId: t.targetId,
|
|
1435
1516
|
filters: t.filters,
|
|
1436
1517
|
payload: t.payload
|
|
1437
1518
|
};
|
|
1438
|
-
return (
|
|
1439
|
-
let c =
|
|
1440
|
-
return
|
|
1441
|
-
default:
|
|
1519
|
+
return (i, s) => {
|
|
1520
|
+
let c = ce("top-data");
|
|
1521
|
+
return P(), T(_, { id: e.id }, {
|
|
1522
|
+
default: V(() => [fe((P(), T(le(R(r)), ne({
|
|
1442
1523
|
class: {
|
|
1443
1524
|
"top-tagSelector": !0,
|
|
1444
1525
|
"top-tagSelector-useTopButton": t.useTopButton,
|
|
@@ -1452,18 +1533,18 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1452
1533
|
},
|
|
1453
1534
|
color: "theme",
|
|
1454
1535
|
styling: e.styling
|
|
1455
|
-
},
|
|
1456
|
-
[
|
|
1536
|
+
}, i.$attrs), {
|
|
1537
|
+
[R(a)]: V(() => [!n.value.length && e.mode === "filter" ? (P(), T(Bt, {
|
|
1457
1538
|
key: 0,
|
|
1458
1539
|
id: "all",
|
|
1459
1540
|
colorId: "",
|
|
1460
|
-
name:
|
|
1541
|
+
name: i.$i18n.Common.All_tags ?? "",
|
|
1461
1542
|
state: ""
|
|
1462
|
-
}, null, 8, ["name"])) :
|
|
1463
|
-
id:
|
|
1464
|
-
colorId:
|
|
1465
|
-
name:
|
|
1466
|
-
state:
|
|
1543
|
+
}, null, 8, ["name"])) : E("", !0), e.mode === "setter" && e.filters ? (P(), D("div", Ut, [oe(i.$slots, "default")])) : (P(!0), D(C, { key: 2 }, I(n.value, (t) => (P(), T(Bt, {
|
|
1544
|
+
id: R(Z)(t),
|
|
1545
|
+
colorId: R(Q)(t, e.tags)?.color_id ?? "",
|
|
1546
|
+
name: R(Q)(t, e.tags)?.name ?? "",
|
|
1547
|
+
state: R(Z)(t) === t ? "selected" : "excluded"
|
|
1467
1548
|
}, null, 8, [
|
|
1468
1549
|
"id",
|
|
1469
1550
|
"colorId",
|
|
@@ -1480,9 +1561,9 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1480
1561
|
}, 8, ["id"]);
|
|
1481
1562
|
};
|
|
1482
1563
|
}
|
|
1483
|
-
}),
|
|
1564
|
+
}), Gt = /* @__PURE__ */ j({
|
|
1484
1565
|
__name: "tagSelector",
|
|
1485
|
-
props: /* @__PURE__ */
|
|
1566
|
+
props: /* @__PURE__ */ M({
|
|
1486
1567
|
modelValue: {},
|
|
1487
1568
|
tags: {},
|
|
1488
1569
|
tagsEditable: { type: Boolean },
|
|
@@ -1503,60 +1584,60 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1503
1584
|
}, {
|
|
1504
1585
|
modelValue: { required: !0 },
|
|
1505
1586
|
modelModifiers: {},
|
|
1506
|
-
tags: { default:
|
|
1587
|
+
tags: { default: ae(Rt) },
|
|
1507
1588
|
tagsModifiers: {}
|
|
1508
1589
|
}),
|
|
1509
|
-
emits: /* @__PURE__ */
|
|
1590
|
+
emits: /* @__PURE__ */ M([
|
|
1510
1591
|
"selector",
|
|
1511
1592
|
"setter",
|
|
1512
1593
|
"tagsChanged"
|
|
1513
1594
|
], ["update:modelValue", "update:tags"]),
|
|
1514
|
-
setup(
|
|
1515
|
-
let
|
|
1595
|
+
setup(r, { emit: o }) {
|
|
1596
|
+
let s = e(), l = r, u = z(r, "modelValue"), d = z(r, "tags"), f = o, p = n((e, t) => {
|
|
1516
1597
|
f(e, t);
|
|
1517
1598
|
}, l.emitDelay);
|
|
1518
1599
|
l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
|
|
1519
|
-
let m = l.id ?? "top-popup-id-" + Math.random(), h =
|
|
1520
|
-
let e = " " +
|
|
1600
|
+
let m = l.id ?? "top-popup-id-" + Math.random(), h = F("add"), g = () => {
|
|
1601
|
+
let e = " " + s.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
|
|
1521
1602
|
return t.set("add", {
|
|
1522
1603
|
value: "add",
|
|
1523
|
-
title:
|
|
1604
|
+
title: s.Common.Add + e
|
|
1524
1605
|
}), t.set("replace", {
|
|
1525
1606
|
value: "replace",
|
|
1526
|
-
title:
|
|
1607
|
+
title: s.Common.Replace + e
|
|
1527
1608
|
}), t.set("delete", {
|
|
1528
1609
|
value: "delete",
|
|
1529
|
-
title:
|
|
1610
|
+
title: s.Common.Delete + e
|
|
1530
1611
|
}), t;
|
|
1531
|
-
},
|
|
1612
|
+
}, _ = ue({
|
|
1532
1613
|
model: u,
|
|
1533
1614
|
mode: "filter",
|
|
1534
1615
|
targetId: void 0,
|
|
1535
1616
|
filters: void 0,
|
|
1536
1617
|
payload: void 0
|
|
1537
1618
|
});
|
|
1538
|
-
|
|
1619
|
+
B(u, () => {
|
|
1539
1620
|
p("selector", u.value);
|
|
1540
1621
|
});
|
|
1541
|
-
let
|
|
1542
|
-
if (
|
|
1543
|
-
}),
|
|
1622
|
+
let b = w(() => {
|
|
1623
|
+
if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
|
|
1624
|
+
}), x = (e) => {
|
|
1544
1625
|
if (e !== "all") {
|
|
1545
|
-
if (
|
|
1546
|
-
if (
|
|
1626
|
+
if (_.value.model.value.includes(e)) return "selected";
|
|
1627
|
+
if (_.value.model.value.includes(Nt(e))) return "excluded";
|
|
1547
1628
|
}
|
|
1548
|
-
return e === "all" && !
|
|
1549
|
-
},
|
|
1550
|
-
let n =
|
|
1551
|
-
t === "select" && r.push(e), t === "exclude" && r.push(n),
|
|
1629
|
+
return e === "all" && !_.value.model.value.length ? "selected" : "";
|
|
1630
|
+
}, S = (e, t) => {
|
|
1631
|
+
let n = Nt(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
|
|
1632
|
+
t === "select" && r.push(e), t === "exclude" && r.push(n), _.value.mode === "setter" && _.value.targetId !== void 0 && l.requiredForSetter && (r.length || r.push("1"), r.length === 2 && _.value.model.value.length === 1 && _.value.model.value[0] === "1" && (r = r.filter((e) => e !== "1"))), l.singleMode && !_.value.filters && (r.length || (r = _.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), _.value.model.value = r, _.value.mode === "setter" && _.value.targetId !== void 0 && p("setter", {
|
|
1552
1633
|
tagsIds: r,
|
|
1553
|
-
targetId:
|
|
1554
|
-
payload:
|
|
1634
|
+
targetId: _.value.targetId,
|
|
1635
|
+
payload: _.value.payload
|
|
1555
1636
|
});
|
|
1556
|
-
},
|
|
1637
|
+
}, O = w(() => {
|
|
1557
1638
|
let e = "top-tagSelector_popup";
|
|
1558
|
-
return
|
|
1559
|
-
}),
|
|
1639
|
+
return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
|
|
1640
|
+
}), j = () => {
|
|
1560
1641
|
let e = prompt("", "New tag");
|
|
1561
1642
|
if (!e || e === "New tag") return;
|
|
1562
1643
|
let t = d.value.length + 1;
|
|
@@ -1565,9 +1646,9 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1565
1646
|
name: e,
|
|
1566
1647
|
color_id: String((t - 1) % 10 + 1)
|
|
1567
1648
|
}), f("tagsChanged", d.value);
|
|
1568
|
-
},
|
|
1569
|
-
if (
|
|
1570
|
-
if (
|
|
1649
|
+
}, te = (e) => {
|
|
1650
|
+
if (_.value = c(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1651
|
+
if (_.value.filters && (h.value = "add", _.value.model.value = []), !t.$?.ui.sortable) {
|
|
1571
1652
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
1572
1653
|
return;
|
|
1573
1654
|
}
|
|
@@ -1585,53 +1666,53 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1585
1666
|
}), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
|
|
1586
1667
|
}
|
|
1587
1668
|
});
|
|
1588
|
-
},
|
|
1669
|
+
}, M = (e) => {
|
|
1589
1670
|
t.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
|
|
1590
1671
|
};
|
|
1591
|
-
return (e, t) => (
|
|
1672
|
+
return (e, t) => (P(), D(C, null, [A(Wt, {
|
|
1592
1673
|
modelValue: u.value,
|
|
1593
1674
|
"onUpdate:modelValue": t[0] ||= (e) => u.value = e,
|
|
1594
|
-
id:
|
|
1675
|
+
id: R(m),
|
|
1595
1676
|
tags: d.value,
|
|
1596
|
-
styling:
|
|
1677
|
+
styling: r.styling,
|
|
1597
1678
|
mode: "filter",
|
|
1598
|
-
useTopButton:
|
|
1679
|
+
useTopButton: r.useTopButton
|
|
1599
1680
|
}, null, 8, [
|
|
1600
1681
|
"modelValue",
|
|
1601
1682
|
"id",
|
|
1602
1683
|
"tags",
|
|
1603
1684
|
"styling",
|
|
1604
1685
|
"useTopButton"
|
|
1605
|
-
]),
|
|
1606
|
-
id:
|
|
1607
|
-
class:
|
|
1608
|
-
onOpen: t[4] ||= (e) =>
|
|
1609
|
-
onClose: t[5] ||= (e) =>
|
|
1686
|
+
]), A(y, {
|
|
1687
|
+
id: R(m),
|
|
1688
|
+
class: N(O.value),
|
|
1689
|
+
onOpen: t[4] ||= (e) => te(e),
|
|
1690
|
+
onClose: t[5] ||= (e) => M(e),
|
|
1610
1691
|
"transition-duration": 50
|
|
1611
|
-
},
|
|
1612
|
-
contentList:
|
|
1613
|
-
|
|
1692
|
+
}, ee({
|
|
1693
|
+
contentList: V(() => [
|
|
1694
|
+
R(_).mode === "filter" && !r.singleMode ? (P(), T(Ht, {
|
|
1614
1695
|
key: 0,
|
|
1615
1696
|
id: "all",
|
|
1616
1697
|
colorId: "",
|
|
1617
1698
|
name: e.$i18n.Common.All_tags ?? "",
|
|
1618
|
-
state:
|
|
1619
|
-
onSelect: t[3] ||= (e) =>
|
|
1620
|
-
}, null, 8, ["name", "state"])) :
|
|
1621
|
-
(
|
|
1699
|
+
state: R(_).model.value.length ? "" : "selected",
|
|
1700
|
+
onSelect: t[3] ||= (e) => R(_).model.value = []
|
|
1701
|
+
}, null, 8, ["name", "state"])) : E("", !0),
|
|
1702
|
+
(P(!0), D(C, null, I(d.value, (e) => (P(), T(Ht, {
|
|
1622
1703
|
key: e.id,
|
|
1623
1704
|
id: e.id,
|
|
1624
1705
|
colorId: e.color_id,
|
|
1625
1706
|
name: e.name,
|
|
1626
|
-
state:
|
|
1627
|
-
canExclude:
|
|
1628
|
-
editable:
|
|
1629
|
-
disabled:
|
|
1630
|
-
onUnselect: (t) =>
|
|
1631
|
-
onSelect: (t) =>
|
|
1632
|
-
onExclude: (t) =>
|
|
1707
|
+
state: x(e.id),
|
|
1708
|
+
canExclude: R(_).mode === "filter" && !r.singleMode,
|
|
1709
|
+
editable: r.tagsEditable,
|
|
1710
|
+
disabled: b.value && x(e.id) === "",
|
|
1711
|
+
onUnselect: (t) => S(e.id, "unselect"),
|
|
1712
|
+
onSelect: (t) => S(e.id, "select"),
|
|
1713
|
+
onExclude: (t) => S(e.id, "exclude"),
|
|
1633
1714
|
"onUpdate:name": (t) => {
|
|
1634
|
-
e.name = t,
|
|
1715
|
+
e.name = t, R(p)("tagsChanged", d.value);
|
|
1635
1716
|
}
|
|
1636
1717
|
}, null, 8, [
|
|
1637
1718
|
"id",
|
|
@@ -1646,36 +1727,36 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1646
1727
|
"onExclude",
|
|
1647
1728
|
"onUpdate:name"
|
|
1648
1729
|
]))), 128)),
|
|
1649
|
-
|
|
1730
|
+
r.tagsEditable && d.value.length < r.tagsMax && d.value.length < 20 ? (P(), T(v, {
|
|
1650
1731
|
key: 1,
|
|
1651
1732
|
"data-top-icon": "",
|
|
1652
|
-
onClick:
|
|
1733
|
+
onClick: H(j, ["stop"])
|
|
1653
1734
|
}, {
|
|
1654
|
-
default:
|
|
1735
|
+
default: V(() => [k(L(e.$i18n.Common.Add), 1)]),
|
|
1655
1736
|
_: 1
|
|
1656
|
-
})) :
|
|
1737
|
+
})) : E("", !0)
|
|
1657
1738
|
]),
|
|
1658
1739
|
_: 2
|
|
1659
|
-
}, [
|
|
1740
|
+
}, [R(_).mode === "setter" && R(_).filters ? {
|
|
1660
1741
|
name: "header",
|
|
1661
|
-
fn:
|
|
1742
|
+
fn: V(() => [A(a, {
|
|
1662
1743
|
modelValue: h.value,
|
|
1663
1744
|
"onUpdate:modelValue": t[1] ||= (e) => h.value = e,
|
|
1664
|
-
options:
|
|
1745
|
+
options: g()
|
|
1665
1746
|
}, null, 8, ["modelValue", "options"])]),
|
|
1666
1747
|
key: "0"
|
|
1667
|
-
} : void 0,
|
|
1748
|
+
} : void 0, R(_).mode === "setter" && R(_).filters ? {
|
|
1668
1749
|
name: "footer",
|
|
1669
|
-
fn:
|
|
1670
|
-
default:
|
|
1750
|
+
fn: V(() => [A(i, { color: "theme" }, {
|
|
1751
|
+
default: V(() => [k(L(e.$i18n.Common.Cancel), 1)]),
|
|
1671
1752
|
_: 1
|
|
1672
|
-
}),
|
|
1673
|
-
tagsIds:
|
|
1674
|
-
filters:
|
|
1753
|
+
}), A(i, { onClick: t[2] ||= (e) => R(p)("setter", {
|
|
1754
|
+
tagsIds: R(_).model.value,
|
|
1755
|
+
filters: R(_).filters,
|
|
1675
1756
|
filtersAction: h.value,
|
|
1676
|
-
payload:
|
|
1757
|
+
payload: R(_).payload
|
|
1677
1758
|
}) }, {
|
|
1678
|
-
default:
|
|
1759
|
+
default: V(() => [k(L(h.value === "add" ? e.$i18n.Common.Add : "") + " " + L(h.value === "replace" ? e.$i18n.Common.Replace : "") + " " + L(h.value === "delete" ? e.$i18n.Common.Delete : ""), 1)]),
|
|
1679
1760
|
_: 1
|
|
1680
1761
|
})]),
|
|
1681
1762
|
key: "1"
|
|
@@ -1683,6 +1764,6 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
|
|
|
1683
1764
|
}
|
|
1684
1765
|
});
|
|
1685
1766
|
//#endregion
|
|
1686
|
-
export {
|
|
1767
|
+
export { ge as TopCompetitorSelector, nt as TopGroupSelector, Mt as TopProjectSelector, Fe as TopRegionSelector, Gt as TopTagSelector, Wt as TopTagSelectorPopupOpener, Bt as TopTagSelectorTagIcon, Tt as clearCache, Ae as dialogRegionSelector, ke as findRegion, Pt as genElTopTagSelectorPopupOpener, Ee as genSearcherByKey, Ft as renderElTopTagSelectorPopupOpener, _e as useItemsFromCompetitors };
|
|
1687
1768
|
|
|
1688
1769
|
//# sourceMappingURL=project.js.map
|