@topvisor/ui 1.5.10-colorTableAi.0 → 1.5.10-genRegionLabelData
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-2jFVHyen.es.amd.js → app-C6mHPpb7.es.amd.js} +2 -2
- package/.chunks/app-C6mHPpb7.es.amd.js.map +1 -0
- package/.chunks/{app-2jFVHyen.es.js → app-C6mHPpb7.es.js} +12 -6
- package/.chunks/app-C6mHPpb7.es.js.map +1 -0
- package/.chunks/{datepicker-CpnGeB5y.es.amd.js → datepicker-DtdAe-rf.es.amd.js} +2 -2
- package/.chunks/{datepicker-CpnGeB5y.es.amd.js.map → datepicker-DtdAe-rf.es.amd.js.map} +1 -1
- package/.chunks/{datepicker-CpnGeB5y.es.js → datepicker-DtdAe-rf.es.js} +2 -2
- package/.chunks/{datepicker-CpnGeB5y.es.js.map → datepicker-DtdAe-rf.es.js.map} +1 -1
- package/.chunks/dialog-Cs7KfRxQ.es.amd.js +2 -0
- package/.chunks/dialog-Cs7KfRxQ.es.amd.js.map +1 -0
- package/.chunks/{dialog-BKJg54Dh.es.js → dialog-Cs7KfRxQ.es.js} +45 -30
- package/.chunks/dialog-Cs7KfRxQ.es.js.map +1 -0
- package/.chunks/dialog_regionSelectorRegions-CH8ppE6d.es.amd.js +2 -0
- package/.chunks/dialog_regionSelectorRegions-CH8ppE6d.es.amd.js.map +1 -0
- package/.chunks/dialog_regionSelectorRegions-CH8ppE6d.es.js +165 -0
- package/.chunks/dialog_regionSelectorRegions-CH8ppE6d.es.js.map +1 -0
- package/.chunks/forms-DrY7Q_VD.es.amd.js +2 -0
- package/.chunks/forms-DrY7Q_VD.es.amd.js.map +1 -0
- package/.chunks/{forms-CjJD60m3.es.js → forms-DrY7Q_VD.es.js} +138 -133
- package/.chunks/forms-DrY7Q_VD.es.js.map +1 -0
- package/.chunks/{formsExt-B9hGGznb.es.amd.js → formsExt-BgtDJL34.es.amd.js} +2 -2
- package/.chunks/{formsExt-B9hGGznb.es.amd.js.map → formsExt-BgtDJL34.es.amd.js.map} +1 -1
- package/.chunks/{formsExt-B9hGGznb.es.js → formsExt-BgtDJL34.es.js} +3 -3
- package/.chunks/{formsExt-B9hGGznb.es.js.map → formsExt-BgtDJL34.es.js.map} +1 -1
- package/.chunks/{notice-BSVUBQ4B.es.amd.js → notice-qj8gI3Vn.es.amd.js} +2 -2
- package/.chunks/{notice-BSVUBQ4B.es.amd.js.map → notice-qj8gI3Vn.es.amd.js.map} +1 -1
- package/.chunks/{notice-BSVUBQ4B.es.js → notice-qj8gI3Vn.es.js} +2 -2
- package/.chunks/{notice-BSVUBQ4B.es.js.map → notice-qj8gI3Vn.es.js.map} +1 -1
- package/.chunks/{popup-BoCCkzOM.es.amd.js → popup-CWtDQcwo.es.amd.js} +2 -2
- package/.chunks/{popup-BoCCkzOM.es.amd.js.map → popup-CWtDQcwo.es.amd.js.map} +1 -1
- package/.chunks/{popup-BoCCkzOM.es.js → popup-CWtDQcwo.es.js} +3 -3
- package/.chunks/{popup-BoCCkzOM.es.js.map → popup-CWtDQcwo.es.js.map} +1 -1
- package/.chunks/{popup-q1PRZblX.es.amd.js → popup-DQDuBLfC.es.amd.js} +2 -2
- package/.chunks/{popup-q1PRZblX.es.amd.js.map → popup-DQDuBLfC.es.amd.js.map} +1 -1
- package/.chunks/{popup-q1PRZblX.es.js → popup-DQDuBLfC.es.js} +3 -3
- package/.chunks/{popup-q1PRZblX.es.js.map → popup-DQDuBLfC.es.js.map} +1 -1
- package/.chunks/utils-D9A8uWOP.es.amd.js +2 -0
- package/.chunks/utils-D9A8uWOP.es.amd.js.map +1 -0
- package/.chunks/{utils-Dy_MqCAH.es.js → utils-D9A8uWOP.es.js} +3 -4
- package/.chunks/utils-D9A8uWOP.es.js.map +1 -0
- package/.chunks/utils-Dltd8Oce.es.amd.js +2 -0
- package/.chunks/utils-Dltd8Oce.es.amd.js.map +1 -0
- package/.chunks/{utils-BudW09A0.es.js → utils-Dltd8Oce.es.js} +5 -5
- package/.chunks/utils-Dltd8Oce.es.js.map +1 -0
- package/.chunks/{worker-F-Y1IEi2.es.amd.js → worker-C6E8GqL6.es.amd.js} +2 -2
- package/.chunks/{worker-F-Y1IEi2.es.amd.js.map → worker-C6E8GqL6.es.amd.js.map} +1 -1
- package/.chunks/{worker-F-Y1IEi2.es.js → worker-C6E8GqL6.es.js} +3 -3
- package/.chunks/{worker-F-Y1IEi2.es.js.map → worker-C6E8GqL6.es.js.map} +1 -1
- package/assets/forms.css +1 -1
- package/assets/formsExt.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/icomoon/Topvisor icons.json +284 -261
- package/icomoon/demo.html +15 -1
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +3 -1
- 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 +373 -370
- 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/dialog/dialog/page/types.d.ts +10 -0
- package/src/components/project/regionSelector/dialog_regionSelectorRegions/types.d.ts +2 -4
- package/src/components/project/regionSelector/types.d.ts +4 -0
- package/src/core/core/core.d.ts +17 -0
- package/src/core/core/options.d.ts +4 -0
- package/src/core/plugins/core.d.ts +1 -1
- package/src/core/utils/searchers.d.ts +15 -0
- package/src/core/utils/string.d.ts +7 -2
- 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 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +9 -2
- package/utils/string.js.map +1 -1
- package/.chunks/app-2jFVHyen.es.amd.js.map +0 -1
- package/.chunks/app-2jFVHyen.es.js.map +0 -1
- package/.chunks/dialog-BKJg54Dh.es.amd.js +0 -2
- package/.chunks/dialog-BKJg54Dh.es.amd.js.map +0 -1
- package/.chunks/dialog-BKJg54Dh.es.js.map +0 -1
- package/.chunks/dialog_regionSelectorRegions-Dq81iORJ.es.amd.js +0 -2
- package/.chunks/dialog_regionSelectorRegions-Dq81iORJ.es.amd.js.map +0 -1
- package/.chunks/dialog_regionSelectorRegions-Dq81iORJ.es.js +0 -168
- package/.chunks/dialog_regionSelectorRegions-Dq81iORJ.es.js.map +0 -1
- package/.chunks/forms-CjJD60m3.es.amd.js +0 -2
- package/.chunks/forms-CjJD60m3.es.amd.js.map +0 -1
- package/.chunks/forms-CjJD60m3.es.js.map +0 -1
- package/.chunks/utils-BudW09A0.es.amd.js +0 -2
- package/.chunks/utils-BudW09A0.es.amd.js.map +0 -1
- package/.chunks/utils-BudW09A0.es.js.map +0 -1
- package/.chunks/utils-Dy_MqCAH.es.amd.js +0 -2
- package/.chunks/utils-Dy_MqCAH.es.amd.js.map +0 -1
- package/.chunks/utils-Dy_MqCAH.es.js.map +0 -1
- package/src/components/dialog/dialog/stories/dialog_example/pages/utils.d.ts +0 -7
- package/src/components/project/groupSelector/stories/mocks/folders.d.ts +0 -4
- package/src/components/project/groupSelector/stories/mocks/groups.d.ts +0 -6
- package/src/components/project/groupSelector/stories/mocks/index.d.ts +0 -8
- package/src/components/project/groupSelector/stories/play/apiEditorMulti.d.ts +0 -2
- package/src/components/project/projectSelector/stories/mocks/index.d.ts +0 -5
- package/src/components/project/projectSelector/stories/mocks/projects.d.ts +0 -3
- package/src/components/schedule/schedule/stories/play/play.d.ts +0 -5
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-DrY7Q_VD.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-C6E8GqL6.es.js";
|
|
12
|
+
import "../.chunks/app-C6mHPpb7.es.js";
|
|
13
|
+
import { t as l } from "../.chunks/utils-D9A8uWOP.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-DQDuBLfC.es.js";
|
|
19
|
+
import { c as b, d as x, f as S, p as ee } from "../.chunks/formsExt-BgtDJL34.es.js";
|
|
20
|
+
import { Fragment as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createSlots as te, createTextVNode as k, createVNode as A, defineComponent as j, isRef as ne, mergeModels as M, mergeProps as re, nextTick as ie, normalizeClass as N, onMounted as ae, openBlock as P, reactive as oe, ref as F, renderList as I, 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__ */ j({
|
|
23
23
|
__name: "competitorSelector",
|
|
24
|
-
props: /*@__PURE__*/
|
|
24
|
+
props: /*@__PURE__*/ M({
|
|
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 = w(() => {
|
|
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) => (P(), D("div", ge, [R(r).state.isMobile ? (P(), T(y, { key: 0 }, {
|
|
47
|
+
opener: V(() => [A(a, {
|
|
48
48
|
class: "top-competitorSelector_opener",
|
|
49
49
|
color: "theme",
|
|
50
50
|
icon: "",
|
|
51
51
|
icon2: ""
|
|
52
52
|
}, {
|
|
53
|
-
default:
|
|
53
|
+
default: V(() => [k(L(e.items.find((e) => e.value === i.value?.[0])?.content), 1)]),
|
|
54
54
|
_: 1
|
|
55
55
|
})]),
|
|
56
|
-
contentList:
|
|
57
|
-
class:
|
|
56
|
+
contentList: V(() => [(P(!0), D(C, null, I(e.items, (e) => (P(), T(_, {
|
|
57
|
+
class: N({ "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(() => [O("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
|
+
})) : (P(), T(ee, {
|
|
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) => w(() => 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,25 +99,28 @@ 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
|
+
alt: "",
|
|
103
104
|
key: -2,
|
|
104
105
|
name: "--",
|
|
105
106
|
index: -2
|
|
106
|
-
},
|
|
107
|
+
}, Se = {
|
|
107
108
|
key: -2,
|
|
108
109
|
name: "--",
|
|
109
|
-
regions: [
|
|
110
|
-
regionByIndex: /* @__PURE__ */ new Map([[-2,
|
|
111
|
-
},
|
|
110
|
+
regions: [xe],
|
|
111
|
+
regionByIndex: /* @__PURE__ */ new Map([[-2, xe]])
|
|
112
|
+
}, U = {
|
|
113
|
+
alt: "",
|
|
112
114
|
key: -2,
|
|
113
115
|
name: "Autoselect",
|
|
114
116
|
index: -2
|
|
115
|
-
},
|
|
117
|
+
}, Ce = {
|
|
116
118
|
key: -2,
|
|
117
119
|
name: "Autoselect",
|
|
118
|
-
regions: [
|
|
119
|
-
regionByIndex: /* @__PURE__ */ new Map([[-2,
|
|
120
|
-
},
|
|
120
|
+
regions: [U],
|
|
121
|
+
regionByIndex: /* @__PURE__ */ new Map([[-2, U]])
|
|
122
|
+
}, we = {
|
|
123
|
+
alt: "",
|
|
121
124
|
countryCode: "00",
|
|
122
125
|
depth: 1,
|
|
123
126
|
device: 0,
|
|
@@ -125,38 +128,38 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
125
128
|
index: -1,
|
|
126
129
|
lang: "ru",
|
|
127
130
|
name: "Without region"
|
|
128
|
-
},
|
|
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 = [
|
|
129
132
|
4,
|
|
130
133
|
8,
|
|
131
134
|
9
|
|
132
|
-
],
|
|
133
|
-
let r =
|
|
135
|
+
], ke = (e, t, n = []) => {
|
|
136
|
+
let r = je(e, !1, n), i;
|
|
134
137
|
return r.forEach((n) => {
|
|
135
138
|
if ((t.searcher_key === void 0 || t.searcher_key == n.key) && n.regions && (n.regions.forEach((r) => {
|
|
136
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;
|
|
137
140
|
}), i)) return !1;
|
|
138
141
|
}), i;
|
|
139
|
-
},
|
|
142
|
+
}, Ae = l(() => import("../.chunks/dialog_regionSelectorRegions-CH8ppE6d.es.js")), je = (e = "", t = !1, n = []) => {
|
|
140
143
|
let r;
|
|
141
|
-
return r = e === "volume" || e === "cost_forecast" ?
|
|
142
|
-
},
|
|
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) => {
|
|
143
146
|
e = e.filter((e) => r.state.forceSearchersKeysForKeywordsStats.includes(e.key));
|
|
144
|
-
let t =
|
|
147
|
+
let t = Pe(e, !1);
|
|
145
148
|
return r.state.forceSearchersKeysForKeywordsStats.forEach((e) => {
|
|
146
149
|
if (t.has(e)) return;
|
|
147
150
|
let n = {
|
|
148
151
|
key: e,
|
|
149
|
-
name:
|
|
152
|
+
name: be[e],
|
|
150
153
|
regions: [],
|
|
151
154
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
152
155
|
};
|
|
153
156
|
t.set(n.key, n);
|
|
154
157
|
}), r.state.showGlobalRegionForKeywordsStats && t.forEach((e) => {
|
|
155
158
|
if (!e.regionByIndex) return;
|
|
156
|
-
let t = { ...
|
|
159
|
+
let t = { ...De() };
|
|
157
160
|
e.regionByIndex.set(t.index, t);
|
|
158
161
|
}), t;
|
|
159
|
-
},
|
|
162
|
+
}, Ne = (e) => (e = e.filter((e) => !Oe.includes(e.key)), Pe(e, !1)), Pe = (e, t) => {
|
|
160
163
|
let n = /* @__PURE__ */ new Map();
|
|
161
164
|
return e.forEach((e) => {
|
|
162
165
|
if (t && !e.enabled) return;
|
|
@@ -167,18 +170,18 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
167
170
|
r.regionByIndex.set(n.index, n);
|
|
168
171
|
}), r.regionByIndex.size, (!e.regions || r.regionByIndex.size) && n.set(r.key, r);
|
|
169
172
|
}), n;
|
|
170
|
-
},
|
|
173
|
+
}, Fe = (e, t) => {
|
|
171
174
|
let r = n();
|
|
172
175
|
return {
|
|
173
|
-
searcherKey:
|
|
174
|
-
optionBySearcherKey:
|
|
176
|
+
searcherKey: F(t.value.keys().next().value ?? -2),
|
|
177
|
+
optionBySearcherKey: w(() => {
|
|
175
178
|
let n = /* @__PURE__ */ new Map();
|
|
176
179
|
if (t.value.forEach((t) => {
|
|
177
180
|
let r = {
|
|
178
181
|
value: t.key,
|
|
179
182
|
title: t.name
|
|
180
183
|
};
|
|
181
|
-
e.addSearcherIcon && (r.icon =
|
|
184
|
+
e.addSearcherIcon && (r.icon = p(t.key)), n.set(t.key, r);
|
|
182
185
|
}), e.addCompare && !n.has(-2)) {
|
|
183
186
|
let e = {
|
|
184
187
|
value: "",
|
|
@@ -195,33 +198,33 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
195
198
|
return n;
|
|
196
199
|
})
|
|
197
200
|
};
|
|
198
|
-
},
|
|
199
|
-
let r = n(), i =
|
|
201
|
+
}, Ie = (e, t) => {
|
|
202
|
+
let r = n(), i = w(() => e.forMode === "volume" || e.forMode === "cost_forecast"), a = F(-2);
|
|
200
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);
|
|
201
|
-
let o =
|
|
204
|
+
let o = w(() => {
|
|
202
205
|
let e = /* @__PURE__ */ new Map();
|
|
203
|
-
return t.value.regionByIndex?.forEach((
|
|
204
|
-
let a = n.name;
|
|
206
|
+
return t.value.regionByIndex?.forEach((t) => {
|
|
205
207
|
if (i.value) {
|
|
206
|
-
let
|
|
207
|
-
value:
|
|
208
|
-
title:
|
|
208
|
+
let n = {
|
|
209
|
+
value: t.key,
|
|
210
|
+
title: t.name
|
|
209
211
|
};
|
|
210
|
-
e.has(
|
|
212
|
+
e.has(t.key) || e.set(t.key, n);
|
|
211
213
|
return;
|
|
212
214
|
}
|
|
213
|
-
n
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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
|
|
220
223
|
};
|
|
221
|
-
e.set(
|
|
224
|
+
e.set(t.index, o);
|
|
222
225
|
}), e;
|
|
223
226
|
});
|
|
224
|
-
return
|
|
227
|
+
return B(o, (t, n) => {
|
|
225
228
|
if (e.onlySearcher || a.value !== void 0 && t.get(a.value)) return;
|
|
226
229
|
let i = t.keys().next().value;
|
|
227
230
|
if (a.value === -2 || i === -2) {
|
|
@@ -244,8 +247,8 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
244
247
|
regionIndex: a,
|
|
245
248
|
optionByRegionIndex: o
|
|
246
249
|
};
|
|
247
|
-
},
|
|
248
|
-
let r =
|
|
250
|
+
}, Le = (e, t, n) => {
|
|
251
|
+
let r = F([]), i = () => {
|
|
249
252
|
if (e.onlySearcher && t.value) {
|
|
250
253
|
r.value = Array.from(t.value.keys());
|
|
251
254
|
return;
|
|
@@ -259,19 +262,19 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
259
262
|
}, a = () => {
|
|
260
263
|
r.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(r.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
|
|
261
264
|
};
|
|
262
|
-
return
|
|
265
|
+
return B(r, () => {
|
|
263
266
|
a();
|
|
264
267
|
}), e.addCompare && i(), { regionsIndexes: r };
|
|
265
|
-
},
|
|
266
|
-
let t =
|
|
268
|
+
}, Re = (e) => {
|
|
269
|
+
let t = w(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = w(() => je(e.forMode, e.autoRegion, e.searchers)), r = w(() => n.value.get(a.searcherKey.value) || Se), i = w(() => {
|
|
267
270
|
let e = /* @__PURE__ */ new Set();
|
|
268
271
|
return n.value.forEach((t) => {
|
|
269
272
|
t.regionByIndex.forEach((t) => {
|
|
270
273
|
t.index !== -2 && e.add(t.index);
|
|
271
274
|
});
|
|
272
275
|
}), e;
|
|
273
|
-
}), a =
|
|
274
|
-
|
|
276
|
+
}), a = Fe(e, n), o = Ie(e, r), s = Le(e, n, i);
|
|
277
|
+
B(n, () => {
|
|
275
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;
|
|
276
279
|
let t = n.value.keys().next().value;
|
|
277
280
|
n.value.forEach((r) => {
|
|
@@ -294,7 +297,7 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
294
297
|
let n = o.regionIndex.value;
|
|
295
298
|
if (t.value && e.forMode) {
|
|
296
299
|
let t = o.regionIndex.value;
|
|
297
|
-
n =
|
|
300
|
+
n = ke(e.forMode, {
|
|
298
301
|
searcher_key: c(),
|
|
299
302
|
key: t
|
|
300
303
|
}, e.searchers)?.index;
|
|
@@ -316,9 +319,9 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
316
319
|
if (e !== void 0) return u()?.regionByIndex?.get(e);
|
|
317
320
|
}
|
|
318
321
|
};
|
|
319
|
-
},
|
|
322
|
+
}, ze = /* @__PURE__ */ j({
|
|
320
323
|
__name: "regionSelector",
|
|
321
|
-
props: /*@__PURE__*/
|
|
324
|
+
props: /*@__PURE__*/ M({
|
|
322
325
|
projectId: {},
|
|
323
326
|
searchers: { default: () => [] },
|
|
324
327
|
modelValue: {},
|
|
@@ -347,19 +350,19 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
347
350
|
}),
|
|
348
351
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
349
352
|
setup(e, { expose: t }) {
|
|
350
|
-
let n = e, r =
|
|
353
|
+
let n = e, r = w(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i = z(e, "modelValue"), s = z(e, "modelValueSingle"), { selectSearcher: c, selectRegion: l, compare: u, searcherByKey: d, allRegionsIndexes: f, getSearcher: p, getRegion: m } = Re(n), h = () => {
|
|
351
354
|
let e = [];
|
|
352
355
|
d.value.forEach((t) => {
|
|
353
356
|
(n.forMode === "project_relevant_url" || t.enabled) && t.regions.forEach((t) => {
|
|
354
357
|
(n.forMode === "project_relevant_url" || t.enabled) && t.index !== -1 && e.push(t);
|
|
355
358
|
});
|
|
356
|
-
}),
|
|
359
|
+
}), Ae.open("regions", {
|
|
357
360
|
regions: e,
|
|
358
361
|
regionsIndexes: u.regionsIndexes.value,
|
|
359
362
|
"@update:regionsIndexes": (e) => u.regionsIndexes.value = e
|
|
360
363
|
});
|
|
361
364
|
};
|
|
362
|
-
return
|
|
365
|
+
return B([
|
|
363
366
|
l.regionIndex,
|
|
364
367
|
c.searcherKey,
|
|
365
368
|
u.regionsIndexes
|
|
@@ -369,9 +372,9 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
369
372
|
i.value = [...u.regionsIndexes.value];
|
|
370
373
|
} else n.onlySearcher ? (i.value = [c.searcherKey.value], c.searcherKey.value === -2 && !n.autoRegion && (i.value.length = 0)) : (i.value = [l.regionIndex.value], l.regionIndex.value === -2 && !n.autoRegion && (i.value.length = 0));
|
|
371
374
|
!n.onlySearcher && !f.value.size && (c.searcherKey.value = -2);
|
|
372
|
-
}), s.value &&
|
|
375
|
+
}), s.value && B(s, () => {
|
|
373
376
|
s.value && (i.value = [s.value]);
|
|
374
|
-
}, { immediate: !0 }),
|
|
377
|
+
}, { immediate: !0 }), B(i, () => {
|
|
375
378
|
if (i.value[0] && (s.value = i.value[0]), n.onlySearcher) {
|
|
376
379
|
if (!i.value.length || i.value.length === 1 && !d.value.has(i.value[0]) || i.value.length === 1 && i.value[0] === -2 && !n.autoRegion) {
|
|
377
380
|
let e = d.value.keys().next().value;
|
|
@@ -424,14 +427,14 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
424
427
|
}, { immediate: !0 }), t({
|
|
425
428
|
getSearcher: p,
|
|
426
429
|
getRegion: m
|
|
427
|
-
}), (t, n) => (
|
|
430
|
+
}), (t, n) => (P(), D("div", { class: N({
|
|
428
431
|
"top-regionSelector": !0,
|
|
429
432
|
"top-regionSelector-onlySearcher": e.onlySearcher
|
|
430
433
|
}) }, [
|
|
431
|
-
|
|
432
|
-
options:
|
|
433
|
-
modelValue:
|
|
434
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
434
|
+
A(o, {
|
|
435
|
+
options: R(c).optionBySearcherKey.value,
|
|
436
|
+
modelValue: R(c).searcherKey.value,
|
|
437
|
+
"onUpdate:modelValue": n[0] ||= (e) => R(c).searcherKey.value = e,
|
|
435
438
|
name: "searcher_key",
|
|
436
439
|
addChanger: e.addChanger
|
|
437
440
|
}, null, 8, [
|
|
@@ -439,12 +442,12 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
439
442
|
"modelValue",
|
|
440
443
|
"addChanger"
|
|
441
444
|
]),
|
|
442
|
-
!e.onlySearcher &&
|
|
445
|
+
!e.onlySearcher && R(c).searcherKey.value !== R(-1) ? (P(), T(o, {
|
|
443
446
|
key: 0,
|
|
444
447
|
class: "top-select-region",
|
|
445
|
-
options:
|
|
446
|
-
modelValue:
|
|
447
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
448
|
+
options: R(l).optionByRegionIndex.value,
|
|
449
|
+
modelValue: R(l).regionIndex.value,
|
|
450
|
+
"onUpdate:modelValue": n[1] ||= (e) => R(l).regionIndex.value = e,
|
|
448
451
|
name: r.value ? "region_key" : "region_index",
|
|
449
452
|
addChanger: e.addChanger,
|
|
450
453
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
@@ -454,31 +457,31 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
|
|
|
454
457
|
"name",
|
|
455
458
|
"addChanger",
|
|
456
459
|
"data-top-icon"
|
|
457
|
-
])) :
|
|
458
|
-
e.addCompare && !e.onlySearcher &&
|
|
460
|
+
])) : E("", !0),
|
|
461
|
+
e.addCompare && !e.onlySearcher && R(c).searcherKey.value === R(-1) ? (P(), T(a, {
|
|
459
462
|
key: 1,
|
|
460
463
|
name: "compare",
|
|
461
464
|
onClick: h,
|
|
462
|
-
"data-count-compare-regions-indexes":
|
|
465
|
+
"data-count-compare-regions-indexes": R(u).regionsIndexes.value.length
|
|
463
466
|
}, {
|
|
464
|
-
default:
|
|
467
|
+
default: V(() => [k(L(t.$i18n.Common.Selected_regions), 1)]),
|
|
465
468
|
_: 1
|
|
466
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
469
|
+
}, 8, ["data-count-compare-regions-indexes"])) : E("", !0)
|
|
467
470
|
], 2));
|
|
468
471
|
}
|
|
469
|
-
}),
|
|
472
|
+
}), W = {
|
|
470
473
|
id: 0,
|
|
471
474
|
name: "/",
|
|
472
475
|
path: "/"
|
|
473
476
|
};
|
|
474
|
-
function
|
|
477
|
+
function Be(e) {
|
|
475
478
|
return e ? n()?.Common.All_folders : "/ (" + n()?.Keywords.Root_folder + ")";
|
|
476
479
|
}
|
|
477
|
-
var
|
|
478
|
-
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name =
|
|
480
|
+
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) => {
|
|
481
|
+
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Be(t));
|
|
479
482
|
let o = i > 1 ? "-".repeat(i - 1) + " " : "";
|
|
480
|
-
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a),
|
|
481
|
-
}), n),
|
|
483
|
+
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);
|
|
484
|
+
}), n), He = (e, t) => e.gen(`/get/${t}/folders/`, [
|
|
482
485
|
"id",
|
|
483
486
|
"parent_id",
|
|
484
487
|
"name",
|
|
@@ -489,9 +492,9 @@ var Ue = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
|
|
|
489
492
|
});
|
|
490
493
|
//#endregion
|
|
491
494
|
//#region src/core/utils/composables/useWatch.ts
|
|
492
|
-
function
|
|
495
|
+
function Ue(e, t, n) {
|
|
493
496
|
let r = Object.keys(e), i = r.map((t) => e[t]);
|
|
494
|
-
return
|
|
497
|
+
return B(i, (e, n, i) => {
|
|
495
498
|
let a = {};
|
|
496
499
|
e.forEach((e, t) => {
|
|
497
500
|
if (!Object.is(e, n[t])) {
|
|
@@ -506,9 +509,9 @@ function Ge(e, t, n) {
|
|
|
506
509
|
}
|
|
507
510
|
//#endregion
|
|
508
511
|
//#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
|
|
509
|
-
var
|
|
512
|
+
var We = ["innerHTML"], Ge = /* @__PURE__ */ j({
|
|
510
513
|
__name: "folders",
|
|
511
|
-
props: /*@__PURE__*/
|
|
514
|
+
props: /*@__PURE__*/ M({
|
|
512
515
|
folderId: {},
|
|
513
516
|
folder: {},
|
|
514
517
|
folders: {},
|
|
@@ -524,20 +527,20 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
524
527
|
}, {
|
|
525
528
|
folderId: { required: !0 },
|
|
526
529
|
folderIdModifiers: {},
|
|
527
|
-
folder: { default:
|
|
530
|
+
folder: { default: W },
|
|
528
531
|
folderModifiers: {}
|
|
529
532
|
}),
|
|
530
533
|
emits: ["update:folderId", "update:folder"],
|
|
531
534
|
setup(e) {
|
|
532
|
-
let t = e, n =
|
|
533
|
-
|
|
535
|
+
let t = e, n = z(e, "folderId"), r = z(e, "folder"), i = t.client && !t.folders ? He(t.client, t.service) : void 0, a = F(null);
|
|
536
|
+
B(() => t.projectId, () => {
|
|
534
537
|
i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
|
|
535
538
|
}, { immediate: !0 });
|
|
536
|
-
let o =
|
|
539
|
+
let o = w(() => Ve(t.folders ?? { root: [W] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
|
|
537
540
|
...e[0],
|
|
538
|
-
name:
|
|
541
|
+
name: Be(!0)
|
|
539
542
|
}), e);
|
|
540
|
-
return
|
|
543
|
+
return Ue({
|
|
541
544
|
modelFolder: r,
|
|
542
545
|
modelFolderId: n
|
|
543
546
|
}, async (e) => {
|
|
@@ -547,21 +550,21 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
547
550
|
return;
|
|
548
551
|
}
|
|
549
552
|
let i = o.value.get(t.folderId);
|
|
550
|
-
i ||=
|
|
551
|
-
}, { immediate: !0 }), (t, n) => (
|
|
553
|
+
i ||= W, r.value = i, n.value = i.id;
|
|
554
|
+
}, { immediate: !0 }), (t, n) => (P(), T(b, {
|
|
552
555
|
class: "top-groupSelector_folder",
|
|
553
556
|
modelValue: r.value,
|
|
554
557
|
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
555
558
|
items: e.folders ? [...o.value.values()] : void 0,
|
|
556
559
|
"search-type": "inline",
|
|
557
560
|
icon: e.addIcon ? "" : void 0,
|
|
558
|
-
api: e.folders ? void 0 :
|
|
559
|
-
apiSetSearchParams: (...e) =>
|
|
561
|
+
api: e.folders ? void 0 : R(i),
|
|
562
|
+
apiSetSearchParams: (...e) => R(x)(...e, "name"),
|
|
560
563
|
prepareItemsBeforeRender: s,
|
|
561
564
|
addChanger: e.addChanger,
|
|
562
565
|
useCache: ""
|
|
563
566
|
}, {
|
|
564
|
-
item:
|
|
567
|
+
item: V(({ item: e }) => [O("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, We)]),
|
|
565
568
|
_: 1
|
|
566
569
|
}, 8, [
|
|
567
570
|
"modelValue",
|
|
@@ -572,17 +575,17 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
572
575
|
"addChanger"
|
|
573
576
|
]));
|
|
574
577
|
}
|
|
575
|
-
}),
|
|
578
|
+
}), G = {
|
|
576
579
|
id: -1,
|
|
577
580
|
name: "--",
|
|
578
|
-
folder_id:
|
|
579
|
-
folder_path:
|
|
580
|
-
},
|
|
581
|
+
folder_id: W.id,
|
|
582
|
+
folder_path: W.path
|
|
583
|
+
}, K = {
|
|
581
584
|
id: 0,
|
|
582
585
|
name: "All groups",
|
|
583
|
-
folder_id:
|
|
584
|
-
folder_path:
|
|
585
|
-
},
|
|
586
|
+
folder_id: W.id,
|
|
587
|
+
folder_path: W.path
|
|
588
|
+
}, 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/`, [
|
|
586
589
|
"id",
|
|
587
590
|
"name",
|
|
588
591
|
"folder_id",
|
|
@@ -590,12 +593,12 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
590
593
|
]).changeParams({
|
|
591
594
|
folder_id_depth: !0,
|
|
592
595
|
limit: 100
|
|
593
|
-
}),
|
|
596
|
+
}), 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 = {
|
|
594
597
|
key: 0,
|
|
595
598
|
class: "top-comment"
|
|
596
|
-
},
|
|
599
|
+
}, et = ["innerHTML"], tt = ["innerHTML"], nt = ["innerHTML"], rt = /* @__PURE__ */ j({
|
|
597
600
|
__name: "groups",
|
|
598
|
-
props: /*@__PURE__*/
|
|
601
|
+
props: /*@__PURE__*/ M({
|
|
599
602
|
groupId: {},
|
|
600
603
|
group: {},
|
|
601
604
|
projectId: {},
|
|
@@ -626,14 +629,14 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
626
629
|
group: { required: !0 },
|
|
627
630
|
groupModifiers: {}
|
|
628
631
|
}),
|
|
629
|
-
emits: /*@__PURE__*/
|
|
632
|
+
emits: /*@__PURE__*/ M([
|
|
630
633
|
"addGroup",
|
|
631
634
|
"editGroup",
|
|
632
635
|
"delGroup"
|
|
633
636
|
], ["update:groupId", "update:group"]),
|
|
634
637
|
setup(e, { expose: n, emit: r }) {
|
|
635
|
-
let i = e, a = r, o =
|
|
636
|
-
if (i.groups !== void 0) return
|
|
638
|
+
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 = F(null), p = w(() => {
|
|
639
|
+
if (i.groups !== void 0) return qe(i.groups, i.on, i.folder);
|
|
637
640
|
}), m = t("folder_id", "EQUALS", [i.folder?.id ?? 0]);
|
|
638
641
|
c?.changeParams({
|
|
639
642
|
project_id: i.projectId,
|
|
@@ -642,19 +645,19 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
642
645
|
}), i.on !== void 0 && c?.params.filters?.push(t("on", "EQUALS", [Number(i.on)]));
|
|
643
646
|
let h = (e) => {
|
|
644
647
|
s.value = e, o.value = e.id;
|
|
645
|
-
},
|
|
648
|
+
}, _ = (e = !1) => {
|
|
646
649
|
f.value?.resetCache(e);
|
|
647
650
|
};
|
|
648
|
-
|
|
651
|
+
Ue({
|
|
649
652
|
projectId: () => i.projectId,
|
|
650
653
|
folderId: () => i.folder?.id,
|
|
651
654
|
canSelectAll: () => i.canSelectAll
|
|
652
655
|
}, (e) => {
|
|
653
|
-
if (e.projectId && (c?.changeParams({ project_id: i.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + i.projectId })), e.folderId && (m.values = [i.folder?.id ?? 0]),
|
|
656
|
+
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) {
|
|
654
657
|
let e;
|
|
655
|
-
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e =
|
|
658
|
+
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = oe(q()))), (i.autoselect === "placeholder" || !e) && (e = Ke()), h(e);
|
|
656
659
|
}
|
|
657
|
-
}, { immediate: !0 }),
|
|
660
|
+
}, { immediate: !0 }), Ue({
|
|
658
661
|
modelGroup: s,
|
|
659
662
|
modelGroupId: o
|
|
660
663
|
}, async (e) => {
|
|
@@ -666,14 +669,14 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
666
669
|
if (!(i.canAdd && o.value === null)) {
|
|
667
670
|
if (i.groups) {
|
|
668
671
|
let e = p.value?.find((e) => e.id === o.value);
|
|
669
|
-
if (!e && i.canSelectAll && (e =
|
|
672
|
+
if (!e && i.canSelectAll && (e = q()), e) h(e);
|
|
670
673
|
else {
|
|
671
674
|
let e = p.value?.[0];
|
|
672
|
-
e && !o.value ? h(e) : h(
|
|
675
|
+
e && !o.value ? h(e) : h(G);
|
|
673
676
|
}
|
|
674
677
|
}
|
|
675
678
|
if (i.client && !i.groups && (o.value || o.value === 0 && !i.canSelectAll)) {
|
|
676
|
-
let e =
|
|
679
|
+
let e = Je(i.client, i.service).changeParams({
|
|
677
680
|
project_id: i.projectId,
|
|
678
681
|
id: o.value,
|
|
679
682
|
filters: [m]
|
|
@@ -681,17 +684,17 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
681
684
|
e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + i.projectId });
|
|
682
685
|
let t = await e.call();
|
|
683
686
|
if (!t.errors?.length && !t.result) return;
|
|
684
|
-
!t.errors && t.result[0] ? h(t.result[0]) : h(
|
|
687
|
+
!t.errors && t.result[0] ? h(t.result[0]) : h(G);
|
|
685
688
|
}
|
|
686
689
|
}
|
|
687
690
|
}
|
|
688
691
|
}, { immediate: !0 });
|
|
689
|
-
let
|
|
692
|
+
let y = async (e) => {
|
|
690
693
|
if (i.canAdd !== "api" || !l) return;
|
|
691
694
|
let t = s.value, n = await l.changeParams({
|
|
692
695
|
project_id: i.projectId,
|
|
693
696
|
names: [e.name],
|
|
694
|
-
to_id: i.folder?.id ??
|
|
697
|
+
to_id: i.folder?.id ?? W.id,
|
|
695
698
|
to_type: "in_folder_last"
|
|
696
699
|
}).call();
|
|
697
700
|
if (n.result) {
|
|
@@ -699,7 +702,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
699
702
|
h(e), a("addGroup", e);
|
|
700
703
|
} else h(t);
|
|
701
704
|
f.value?.resetCache(!0);
|
|
702
|
-
},
|
|
705
|
+
}, S = async (e, t) => {
|
|
703
706
|
d && ((await d.changeParams({
|
|
704
707
|
project_id: i.projectId,
|
|
705
708
|
id: e.id,
|
|
@@ -708,13 +711,13 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
708
711
|
id: e.id,
|
|
709
712
|
name: t
|
|
710
713
|
}), f.value?.updateCacheItemById(e.id, { name: t })));
|
|
711
|
-
},
|
|
714
|
+
}, ee = async (e) => {
|
|
712
715
|
u && ((await u.changeParams({
|
|
713
716
|
project_id: i.projectId,
|
|
714
717
|
id: e.id
|
|
715
|
-
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ?
|
|
718
|
+
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ? q() : G), a("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
|
|
716
719
|
};
|
|
717
|
-
return n({ resetCacheGroups:
|
|
720
|
+
return n({ resetCacheGroups: _ }), (t, n) => (P(), T(b, {
|
|
718
721
|
ref_key: "refSelector",
|
|
719
722
|
ref: f,
|
|
720
723
|
class: "top-groupSelector_group",
|
|
@@ -723,51 +726,51 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
723
726
|
items: p.value ?? e.groups,
|
|
724
727
|
searchType: "inline",
|
|
725
728
|
icon: e.addIcon ? "" : void 0,
|
|
726
|
-
api: e.groups ? void 0 :
|
|
727
|
-
apiSetSearchParams: (...e) =>
|
|
729
|
+
api: e.groups ? void 0 : R(c),
|
|
730
|
+
apiSetSearchParams: (...e) => R(x)(...e, "name"),
|
|
728
731
|
appendSearchToResult: !!e.canAdd,
|
|
729
|
-
useAllItem: e.canSelectAll ?
|
|
732
|
+
useAllItem: e.canSelectAll ? R(q)().name : !1,
|
|
730
733
|
addChanger: e.addChanger,
|
|
731
734
|
useCache: "",
|
|
732
|
-
onAppendItem:
|
|
733
|
-
},
|
|
734
|
-
item:
|
|
735
|
-
n.id ===
|
|
736
|
-
|
|
735
|
+
onAppendItem: y
|
|
736
|
+
}, te({
|
|
737
|
+
item: V(({ item: n }) => [O("div", Qe, [
|
|
738
|
+
n.id === R(null) ? (P(), D("div", $e, L(t.$i18n.Common.Add) + ": ", 1)) : E("", !0),
|
|
739
|
+
O("span", {
|
|
737
740
|
class: "top-groupSelector_groupItemName top-ellipsis1",
|
|
738
741
|
innerHTML: n.name
|
|
739
|
-
}, null, 8,
|
|
740
|
-
n.folder_path && e.showPath ? (
|
|
742
|
+
}, null, 8, et),
|
|
743
|
+
n.folder_path && e.showPath ? (P(), D("span", {
|
|
741
744
|
key: 1,
|
|
742
745
|
class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
|
|
743
746
|
innerHTML: n.folder_path
|
|
744
|
-
}, null, 8,
|
|
747
|
+
}, null, 8, tt)) : E("", !0)
|
|
745
748
|
])]),
|
|
746
749
|
_: 2
|
|
747
750
|
}, [e.canEditAndDel && e.client ? {
|
|
748
751
|
name: "actions",
|
|
749
|
-
fn:
|
|
752
|
+
fn: V(({ item: r }) => [r.id ? (P(), D(C, { key: 0 }, [A(g, {
|
|
750
753
|
submitText: t.$i18n.Common.Save,
|
|
751
754
|
defaultValue: r.name,
|
|
752
755
|
inputProps: { addCleaner: !1 },
|
|
753
|
-
onSubmit: (e) =>
|
|
756
|
+
onSubmit: (e) => S(r, e)
|
|
754
757
|
}, {
|
|
755
|
-
opener:
|
|
756
|
-
default:
|
|
758
|
+
opener: V(() => [...n[1] ||= [O("div", { "data-top-icon": "" }, null, -1)]]),
|
|
759
|
+
default: V(() => [...n[2] ||= []]),
|
|
757
760
|
_: 1
|
|
758
761
|
}, 8, [
|
|
759
762
|
"submitText",
|
|
760
763
|
"defaultValue",
|
|
761
764
|
"onSubmit"
|
|
762
|
-
]),
|
|
765
|
+
]), A(v, {
|
|
763
766
|
isWarning: "",
|
|
764
767
|
submitText: t.$i18n.Common.Delete,
|
|
765
|
-
onSubmit: (e) =>
|
|
768
|
+
onSubmit: (e) => ee(r)
|
|
766
769
|
}, {
|
|
767
|
-
opener:
|
|
768
|
-
default:
|
|
770
|
+
opener: V(() => [...n[3] ||= [O("div", { "data-top-icon": "" }, null, -1)]]),
|
|
771
|
+
default: V(() => [O("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n.Aitracker.Delete_group_warning }, null, 8, nt)]),
|
|
769
772
|
_: 1
|
|
770
|
-
}, 8, ["submitText", "onSubmit"])], 64)) :
|
|
773
|
+
}, 8, ["submitText", "onSubmit"])], 64)) : E("", !0)]),
|
|
771
774
|
key: "0"
|
|
772
775
|
} : void 0]), 1032, [
|
|
773
776
|
"modelValue",
|
|
@@ -780,9 +783,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
780
783
|
"addChanger"
|
|
781
784
|
]));
|
|
782
785
|
}
|
|
783
|
-
}),
|
|
786
|
+
}), it = { class: "top-groupSelector" }, at = /* @__PURE__ */ j({
|
|
784
787
|
__name: "groupSelector",
|
|
785
|
-
props: /*@__PURE__*/
|
|
788
|
+
props: /*@__PURE__*/ M({
|
|
786
789
|
folderId: {},
|
|
787
790
|
folder: {},
|
|
788
791
|
groupId: {},
|
|
@@ -827,20 +830,20 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
827
830
|
folderModifiers: {},
|
|
828
831
|
groupId: { required: !0 },
|
|
829
832
|
groupIdModifiers: {},
|
|
830
|
-
group: { default:
|
|
833
|
+
group: { default: G },
|
|
831
834
|
groupModifiers: {}
|
|
832
835
|
}),
|
|
833
|
-
emits: /*@__PURE__*/
|
|
836
|
+
emits: /*@__PURE__*/ M(["update:groups"], [
|
|
834
837
|
"update:folderId",
|
|
835
838
|
"update:folder",
|
|
836
839
|
"update:groupId",
|
|
837
840
|
"update:group"
|
|
838
841
|
]),
|
|
839
842
|
setup(e, { expose: t, emit: n }) {
|
|
840
|
-
let r = e, i =
|
|
841
|
-
o.value =
|
|
843
|
+
let r = e, i = F(null), a = z(e, "folderId"), o = z(e, "folder"), s = z(e, "groupId"), c = z(e, "group"), l = n;
|
|
844
|
+
o.value = Ve(r.folders ?? { root: [W] }, r.canSelectAllGroups).get(a.value);
|
|
842
845
|
let u = r.groups?.find((e) => e.id === s.value);
|
|
843
|
-
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u =
|
|
846
|
+
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = q()), (r.autoselect === "placeholder" || !u) && (u = Ke()), u ??= G, c.value = u;
|
|
844
847
|
let d = (e) => {
|
|
845
848
|
let t;
|
|
846
849
|
r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
|
|
@@ -866,7 +869,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
866
869
|
};
|
|
867
870
|
return t({ resetCacheGroups: (e = !1) => {
|
|
868
871
|
i.value?.resetCacheGroups(e);
|
|
869
|
-
} }), (t, n) => (
|
|
872
|
+
} }), (t, n) => (P(), D("div", it, [e.showFolders ? (P(), T(Ge, {
|
|
870
873
|
key: 0,
|
|
871
874
|
folderId: a.value,
|
|
872
875
|
"onUpdate:folderId": n[0] ||= (e) => a.value = e,
|
|
@@ -889,7 +892,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
889
892
|
"addIcon",
|
|
890
893
|
"client",
|
|
891
894
|
"service"
|
|
892
|
-
])) :
|
|
895
|
+
])) : E("", !0), e.showGroups ? (P(), T(rt, {
|
|
893
896
|
key: 1,
|
|
894
897
|
ref_key: "componentGroupsRef",
|
|
895
898
|
ref: i,
|
|
@@ -929,46 +932,46 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
929
932
|
"addIcon",
|
|
930
933
|
"client",
|
|
931
934
|
"service"
|
|
932
|
-
])) :
|
|
935
|
+
])) : E("", !0)]));
|
|
933
936
|
}
|
|
934
|
-
}),
|
|
937
|
+
}), ot = (e) => ({
|
|
935
938
|
id: null,
|
|
936
939
|
name: e,
|
|
937
940
|
listItemProps: {
|
|
938
941
|
type: "title",
|
|
939
942
|
class: "top-projectSelector_item"
|
|
940
943
|
}
|
|
941
|
-
}),
|
|
944
|
+
}), st = {
|
|
942
945
|
scheduledUpdate: !1,
|
|
943
946
|
manualUpdate: !1,
|
|
944
947
|
guestProjects: !1
|
|
945
|
-
},
|
|
948
|
+
}, ct = (e, t) => {
|
|
946
949
|
let r = [], i = {
|
|
947
|
-
scheduledUpdate:
|
|
948
|
-
manualUpdate:
|
|
949
|
-
guestProjects:
|
|
950
|
+
scheduledUpdate: ot(n().Projects.Scheduled_update),
|
|
951
|
+
manualUpdate: ot(n().Projects.Manual_update),
|
|
952
|
+
guestProjects: ot(n().Projects.Guest_projects)
|
|
950
953
|
}, a = t ? {
|
|
951
954
|
scheduledUpdate: !1,
|
|
952
955
|
manualUpdate: !1,
|
|
953
956
|
guestProjects: !1
|
|
954
|
-
} :
|
|
957
|
+
} : st;
|
|
955
958
|
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);
|
|
956
959
|
return r;
|
|
957
|
-
},
|
|
960
|
+
}, lt = (e) => ({
|
|
958
961
|
...e,
|
|
959
|
-
externalLink:
|
|
962
|
+
externalLink: ht(e.url ?? ""),
|
|
960
963
|
listItemProps: {
|
|
961
964
|
class: "top-projectSelector_item",
|
|
962
965
|
attrs: { title: e.name }
|
|
963
966
|
}
|
|
964
|
-
}),
|
|
967
|
+
}), ut = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(st).forEach((e) => st[e] = !1), ct(e.map(lt), n)), dt = (e) => {
|
|
965
968
|
e = e.replace(/#.*/, "");
|
|
966
969
|
let t = location.hash;
|
|
967
970
|
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;
|
|
968
|
-
},
|
|
969
|
-
location.href =
|
|
970
|
-
},
|
|
971
|
-
let t =
|
|
971
|
+
}, ft = (e) => {
|
|
972
|
+
location.href = pt(e);
|
|
973
|
+
}, pt = (e) => {
|
|
974
|
+
let t = mt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
|
|
972
975
|
n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
|
|
973
976
|
"watcher",
|
|
974
977
|
"indexing",
|
|
@@ -978,16 +981,16 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
978
981
|
"adwords"
|
|
979
982
|
].includes(n[4]) && (i = n[4] + "/");
|
|
980
983
|
let a = "https://" + t + "/" + r + e + "/" + i;
|
|
981
|
-
return a =
|
|
982
|
-
},
|
|
984
|
+
return a = dt(a), a;
|
|
985
|
+
}, mt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, ht = (e) => {
|
|
983
986
|
let t = e.startsWith("http") ? e : "https://" + e;
|
|
984
987
|
return t = t.replace(/"/g, "%22"), t;
|
|
985
|
-
},
|
|
988
|
+
}, gt = (e, n) => {
|
|
986
989
|
let r = e.params.filters ?? [];
|
|
987
990
|
r = r.filter((e) => e.name !== "GEN_SEARCH_STRING()");
|
|
988
|
-
let i =
|
|
991
|
+
let i = m(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
|
|
989
992
|
n && r.push(t("GEN_SEARCH_STRING()", "REGEXP", [`(${a}|${o})`])), e.changeParams({ filters: r });
|
|
990
|
-
},
|
|
993
|
+
}, _t = (n) => {
|
|
991
994
|
let i = n.gen("/get/projects_2/projects/", [
|
|
992
995
|
"id",
|
|
993
996
|
"user_id",
|
|
@@ -1007,13 +1010,13 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1007
1010
|
]
|
|
1008
1011
|
}), i.options.loadingShowSpinner = !1, i.options.onApiLoaded = (e, t, n) => {
|
|
1009
1012
|
let r = t.data.filters.length > 1, i = t.data.offset === 0, a = t.data.offset === void 0 || i && !r, o = r;
|
|
1010
|
-
e.result =
|
|
1013
|
+
e.result = ut(e.result, a, o), n?.(e, t);
|
|
1011
1014
|
}, i;
|
|
1012
|
-
},
|
|
1015
|
+
}, vt = (e) => e.gen("/add/projects_2/projects/"), yt = { class: "top-ellipsis1" }, bt = /* @__PURE__ */ j({
|
|
1013
1016
|
__name: "submenu",
|
|
1014
1017
|
props: { id: {} },
|
|
1015
1018
|
setup(e) {
|
|
1016
|
-
let t = e, i = n(), a =
|
|
1019
|
+
let t = e, i = n(), a = mt(), o = (e) => {
|
|
1017
1020
|
let t = [
|
|
1018
1021
|
{
|
|
1019
1022
|
href: `https://${a}/project/keywords/${e.id}/`,
|
|
@@ -1090,60 +1093,60 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1090
1093
|
].filter((e) => !Object.entries(r.state.closedByMod).some(([t, n]) => n && e.href.includes(`/${t}/`)));
|
|
1091
1094
|
return e.right.includes("0") ? t.filter((t) => e.right[t.right] === "1") : t;
|
|
1092
1095
|
};
|
|
1093
|
-
return (e, n) => (
|
|
1096
|
+
return (e, n) => (P(), T(R(y), {
|
|
1094
1097
|
id: t.id,
|
|
1095
1098
|
class: "top-projectSelectorSubmenu",
|
|
1096
1099
|
notch: !1,
|
|
1097
1100
|
pos: "2"
|
|
1098
1101
|
}, {
|
|
1099
|
-
contentList:
|
|
1102
|
+
contentList: V(({ data: t }) => [t ? (P(), D(C, { key: 0 }, [(P(!0), D(C, null, I(o(t.projectItem), (t) => (P(), T(R(_), {
|
|
1100
1103
|
href: t.href,
|
|
1101
1104
|
title: t.title,
|
|
1102
1105
|
"data-top-icon": t.icon,
|
|
1103
1106
|
"data-right": t.right
|
|
1104
1107
|
}, {
|
|
1105
|
-
default:
|
|
1108
|
+
default: V(() => [k(L(e.$core.state.isMobile ? t.title : ""), 1)]),
|
|
1106
1109
|
_: 2
|
|
1107
1110
|
}, 1032, [
|
|
1108
1111
|
"href",
|
|
1109
1112
|
"title",
|
|
1110
1113
|
"data-top-icon",
|
|
1111
1114
|
"data-right"
|
|
1112
|
-
]))), 256)),
|
|
1115
|
+
]))), 256)), A(R(_), {
|
|
1113
1116
|
href: t.projectItem.externalLink,
|
|
1114
1117
|
title: t.projectItem.externalLink,
|
|
1115
1118
|
class: "top-ellipsis",
|
|
1116
1119
|
"data-top-icon": "",
|
|
1117
1120
|
target: "_blank"
|
|
1118
1121
|
}, {
|
|
1119
|
-
default:
|
|
1122
|
+
default: V(() => [O("span", yt, L(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
|
|
1120
1123
|
_: 2
|
|
1121
|
-
}, 1032, ["href", "title"])], 64)) :
|
|
1124
|
+
}, 1032, ["href", "title"])], 64)) : E("", !0)]),
|
|
1122
1125
|
_: 1
|
|
1123
1126
|
}, 8, ["id"]));
|
|
1124
1127
|
}
|
|
1125
|
-
}),
|
|
1126
|
-
localStorage.setItem(
|
|
1128
|
+
}), J = "ui_project_selector_total", xt = 864e5, Y = F(null), X = de(), St = (e) => {
|
|
1129
|
+
localStorage.setItem(J + ":" + r.state.userId, JSON.stringify({
|
|
1127
1130
|
projectsTotal: e,
|
|
1128
|
-
expiresAt: Date.now() +
|
|
1131
|
+
expiresAt: Date.now() + xt
|
|
1129
1132
|
}));
|
|
1130
|
-
},
|
|
1131
|
-
let e = localStorage.getItem(
|
|
1133
|
+
}, Ct = () => {
|
|
1134
|
+
let e = localStorage.getItem(J + ":" + r.state.userId);
|
|
1132
1135
|
if (!e) return;
|
|
1133
1136
|
let { projectsTotal: t, expiresAt: n } = JSON.parse(e);
|
|
1134
1137
|
if (Date.now() > n) {
|
|
1135
|
-
localStorage.removeItem(
|
|
1138
|
+
localStorage.removeItem(J + ":" + r.state.userId);
|
|
1136
1139
|
return;
|
|
1137
1140
|
}
|
|
1138
1141
|
return t;
|
|
1139
|
-
},
|
|
1140
|
-
|
|
1141
|
-
},
|
|
1142
|
+
}, wt = () => {
|
|
1143
|
+
Y.value = null, X.value = void 0, localStorage.removeItem(J + ":" + r.state.userId), S("/get/projects_2/projects/");
|
|
1144
|
+
}, Tt = { class: "top-projectSelector_itemText" }, Et = { class: "top-comment" }, Dt = {
|
|
1142
1145
|
key: 0,
|
|
1143
1146
|
class: "top-comment"
|
|
1144
|
-
},
|
|
1147
|
+
}, Ot = ["href"], kt = 1e3, At = /* @__PURE__ */ j({
|
|
1145
1148
|
__name: "projectSelector",
|
|
1146
|
-
props: /*@__PURE__*/
|
|
1149
|
+
props: /*@__PURE__*/ M({
|
|
1147
1150
|
modelValue: {},
|
|
1148
1151
|
client: {},
|
|
1149
1152
|
menuMode: { type: Boolean },
|
|
@@ -1164,64 +1167,64 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1164
1167
|
}),
|
|
1165
1168
|
emits: ["update:modelValue"],
|
|
1166
1169
|
setup(e) {
|
|
1167
|
-
let t = n(), i = e, a =
|
|
1168
|
-
if (c.value || c.value === 0) return c.value <
|
|
1170
|
+
let t = n(), i = e, a = z(e, "modelValue"), o = _t(i.client), s = vt(i.client), c = F(Ct()), l = F(null), f = pe(), p = w(() => i.placeholder ?? t.Projects.Select_project), m = w(() => !X.value || !i.excludeProjectId ? X.value : X.value.filter((e) => e.id !== i.excludeProjectId)), g = w(() => {
|
|
1171
|
+
if (c.value || c.value === 0) return c.value < kt ? "static" : "api";
|
|
1169
1172
|
}), _ = async () => {
|
|
1170
|
-
|
|
1171
|
-
let e = await
|
|
1172
|
-
return
|
|
1173
|
+
Y.value ||= o.call();
|
|
1174
|
+
let e = await Y.value;
|
|
1175
|
+
return Y.value = null, e;
|
|
1173
1176
|
}, v = async (e) => {
|
|
1174
1177
|
let t = await s.changeParams({
|
|
1175
1178
|
url: e.name,
|
|
1176
1179
|
name: e.name
|
|
1177
1180
|
}).call();
|
|
1178
1181
|
if (!t.errors) {
|
|
1179
|
-
if (
|
|
1180
|
-
let n =
|
|
1182
|
+
if (X.value && g.value === "static") {
|
|
1183
|
+
let n = lt({
|
|
1181
1184
|
id: t.result,
|
|
1182
1185
|
user_id: r.state.userId,
|
|
1183
1186
|
name: e.name,
|
|
1184
1187
|
url: e.name,
|
|
1185
1188
|
on: 0,
|
|
1186
1189
|
right: "11111111111111111111"
|
|
1187
|
-
}), i =
|
|
1188
|
-
|
|
1189
|
-
...
|
|
1190
|
+
}), i = X.value.findIndex((e) => e.on === 0);
|
|
1191
|
+
X.value = [
|
|
1192
|
+
...X.value.slice(0, i),
|
|
1190
1193
|
n,
|
|
1191
|
-
...
|
|
1192
|
-
], c.value && (c.value += 1,
|
|
1194
|
+
...X.value.slice(i)
|
|
1195
|
+
], c.value && (c.value += 1, St(c.value));
|
|
1193
1196
|
}
|
|
1194
|
-
|
|
1197
|
+
g.value === "api" && l.value?.resetCache(!0);
|
|
1195
1198
|
}
|
|
1196
|
-
}, ee = async () => {
|
|
1197
|
-
if (Y.value || h.value === "api") return;
|
|
1198
|
-
let e = await _();
|
|
1199
|
-
e.errors || (Y.value = e.result);
|
|
1200
1199
|
}, y = async () => {
|
|
1200
|
+
if (X.value || g.value === "api") return;
|
|
1201
|
+
let e = await _();
|
|
1202
|
+
e.errors || (X.value = e.result);
|
|
1203
|
+
}, x = async () => {
|
|
1201
1204
|
if (c.value) {
|
|
1202
1205
|
let e = l.value?.popupOpenerRef?.$el;
|
|
1203
|
-
e && e.addEventListener("pointerenter", () =>
|
|
1206
|
+
e && e.addEventListener("pointerenter", () => y(), { once: !0 });
|
|
1204
1207
|
} else {
|
|
1205
|
-
o.changeParams({ limit:
|
|
1208
|
+
o.changeParams({ limit: kt });
|
|
1206
1209
|
let e = await _();
|
|
1207
1210
|
if (e.errors) return;
|
|
1208
|
-
delete o.params.limit, c.value = e.total ?? void 0, !
|
|
1211
|
+
delete o.params.limit, c.value = e.total ?? void 0, !X.value && g.value !== "api" && (X.value = e.result), c.value && St(c.value);
|
|
1209
1212
|
}
|
|
1210
1213
|
};
|
|
1211
|
-
return
|
|
1212
|
-
await
|
|
1214
|
+
return ae(async () => {
|
|
1215
|
+
await x();
|
|
1213
1216
|
}), (t, n) => {
|
|
1214
|
-
let r =
|
|
1215
|
-
return
|
|
1216
|
-
key:
|
|
1217
|
+
let r = ce("TopButton");
|
|
1218
|
+
return P(), D(C, null, [(P(), T(b, {
|
|
1219
|
+
key: g.value ?? "dummy",
|
|
1217
1220
|
ref_key: "refSelector",
|
|
1218
1221
|
ref: l,
|
|
1219
1222
|
class: "top-projectSelector",
|
|
1220
1223
|
modelValue: a.value,
|
|
1221
|
-
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ?
|
|
1224
|
+
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? R(ft)(t.id) : a.value = t,
|
|
1222
1225
|
items: m.value,
|
|
1223
1226
|
itemsChunkSize: 100,
|
|
1224
|
-
itemsIsLoading:
|
|
1227
|
+
itemsIsLoading: g.value === "static" && R(X) === void 0,
|
|
1225
1228
|
title: t.$i18n.Projects.Search_projects,
|
|
1226
1229
|
modificator: e.modificator,
|
|
1227
1230
|
searchFields: [
|
|
@@ -1231,50 +1234,50 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1231
1234
|
],
|
|
1232
1235
|
placeholder: p.value,
|
|
1233
1236
|
hasCloserBtn: "",
|
|
1234
|
-
api:
|
|
1235
|
-
apiSetSearchParams:
|
|
1237
|
+
api: g.value === "api" ? R(o) : void 0,
|
|
1238
|
+
apiSetSearchParams: g.value === "api" ? (...e) => R(gt)(...e) : void 0,
|
|
1236
1239
|
useCache: "",
|
|
1237
1240
|
appendSearchToResult: "",
|
|
1238
1241
|
appendSearchAllowDuplicate: "",
|
|
1239
|
-
appendSearchToResultCond:
|
|
1242
|
+
appendSearchToResultCond: R(u),
|
|
1240
1243
|
appendWithoutSelect: "",
|
|
1241
1244
|
buttonProps: {
|
|
1242
1245
|
...e.buttonProps,
|
|
1243
|
-
isProgress: !
|
|
1244
|
-
disabled: !
|
|
1246
|
+
isProgress: !g.value,
|
|
1247
|
+
disabled: !g.value
|
|
1245
1248
|
},
|
|
1246
1249
|
openerShortcut: e.openerShortcut,
|
|
1247
1250
|
onAppendItem: v,
|
|
1248
|
-
onOpen:
|
|
1251
|
+
onOpen: y
|
|
1249
1252
|
}, {
|
|
1250
|
-
item:
|
|
1251
|
-
e.menuMode ? (
|
|
1253
|
+
item: V(({ item: i }) => [O("div", Tt, [i.id ? (P(), D(C, { key: 0 }, [k(L(R(d)(i.name, 20)) + " ", 1), O("span", Et, " id " + L(i.id), 1)], 64)) : (P(), D(C, { key: 1 }, [i.listItemProps?.type ? E("", !0) : (P(), D("div", Dt, L(t.$i18n.Projects.Add_project) + ": ", 1)), k(" " + L(i.name), 1)], 64))]), i.id ? (P(), D(C, { key: 0 }, [
|
|
1254
|
+
e.menuMode ? (P(), D("a", {
|
|
1252
1255
|
key: 0,
|
|
1253
1256
|
class: "top-projectSelector_itemLink",
|
|
1254
|
-
href:
|
|
1255
|
-
}, null, 8,
|
|
1256
|
-
t.$core.state.isMobile ?
|
|
1257
|
+
href: R(pt)(i.id)
|
|
1258
|
+
}, null, 8, Ot)) : E("", !0),
|
|
1259
|
+
t.$core.state.isMobile ? E("", !0) : (P(), T(r, {
|
|
1257
1260
|
key: 1,
|
|
1258
1261
|
href: i.externalLink,
|
|
1259
1262
|
"data-top-icon": "",
|
|
1260
1263
|
color: "theme",
|
|
1261
1264
|
target: "_blank",
|
|
1262
|
-
onClick: n[0] ||=
|
|
1265
|
+
onClick: n[0] ||= H(() => {}, ["stop"])
|
|
1263
1266
|
}, null, 8, ["href"])),
|
|
1264
|
-
|
|
1265
|
-
id:
|
|
1267
|
+
A(h, {
|
|
1268
|
+
id: R(f),
|
|
1266
1269
|
pos: "2",
|
|
1267
1270
|
notch: !1,
|
|
1268
1271
|
data: { projectItem: i }
|
|
1269
1272
|
}, {
|
|
1270
|
-
default:
|
|
1273
|
+
default: V(() => [A(r, {
|
|
1271
1274
|
class: "top-popup_listMore",
|
|
1272
1275
|
"data-top-icon": "",
|
|
1273
1276
|
color: "theme"
|
|
1274
1277
|
})]),
|
|
1275
1278
|
_: 1
|
|
1276
1279
|
}, 8, ["id", "data"])
|
|
1277
|
-
], 64)) :
|
|
1280
|
+
], 64)) : E("", !0)]),
|
|
1278
1281
|
_: 1
|
|
1279
1282
|
}, 8, [
|
|
1280
1283
|
"modelValue",
|
|
@@ -1288,43 +1291,43 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1288
1291
|
"appendSearchToResultCond",
|
|
1289
1292
|
"buttonProps",
|
|
1290
1293
|
"openerShortcut"
|
|
1291
|
-
])),
|
|
1294
|
+
])), A(bt, { id: R(f) }, null, 8, ["id"])], 64);
|
|
1292
1295
|
};
|
|
1293
1296
|
}
|
|
1294
|
-
}),
|
|
1295
|
-
e =
|
|
1297
|
+
}), jt = (e) => "-" + e, Z = (e) => e[0] === "-" ? e.substring(1) : e, Q = (e, t) => {
|
|
1298
|
+
e = Z(e);
|
|
1296
1299
|
let n = t.find((t) => t.id === e);
|
|
1297
1300
|
if (n) return n;
|
|
1298
|
-
},
|
|
1301
|
+
}, Mt = (e, t, n) => {
|
|
1299
1302
|
t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
|
|
1300
1303
|
let r = c.genElPopupOpener("div", t);
|
|
1301
1304
|
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) => {
|
|
1302
1305
|
t.preventDefault(), t.stopPropagation(), r.onclick = null;
|
|
1303
|
-
let i =
|
|
1306
|
+
let i = F(e.modelValue), a = {
|
|
1304
1307
|
model: i,
|
|
1305
1308
|
mode: e.mode,
|
|
1306
1309
|
targetId: e.targetId,
|
|
1307
1310
|
filters: e.filters,
|
|
1308
1311
|
payload: e.payload
|
|
1309
1312
|
};
|
|
1310
|
-
s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled,
|
|
1311
|
-
e.modelValue = i.value,
|
|
1313
|
+
s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, ne(e.modelValue) || B(i, () => {
|
|
1314
|
+
e.modelValue = i.value, Pt(r, e, n);
|
|
1312
1315
|
}), r.click();
|
|
1313
|
-
},
|
|
1316
|
+
}, ne(e.modelValue) ? B(e.modelValue, () => Pt(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
|
|
1314
1317
|
e.modelValue = t;
|
|
1315
1318
|
let i = s(r, "topTagSelectorTarget");
|
|
1316
|
-
i && (i.model.value = t),
|
|
1317
|
-
}),
|
|
1318
|
-
},
|
|
1319
|
+
i && (i.model.value = t), Pt(r, e, n);
|
|
1320
|
+
}), Pt(r, e, n), r;
|
|
1321
|
+
}, Nt = (e, t) => {
|
|
1319
1322
|
s(e, "topTagSelectorRender")?.(t);
|
|
1320
|
-
},
|
|
1321
|
-
let i =
|
|
1323
|
+
}, Pt = (e, t, r) => {
|
|
1324
|
+
let i = R(t.modelValue);
|
|
1322
1325
|
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) {
|
|
1323
1326
|
e.innerHTML = `<div>${r}</div>`;
|
|
1324
1327
|
return;
|
|
1325
1328
|
}
|
|
1326
1329
|
if (e.innerHTML = "", !i.length && t.mode === "filter") {
|
|
1327
|
-
let t =
|
|
1330
|
+
let t = Ft({
|
|
1328
1331
|
id: "all",
|
|
1329
1332
|
colorId: "",
|
|
1330
1333
|
name: n().Common?.All_tags ?? "",
|
|
@@ -1333,18 +1336,18 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1333
1336
|
e.append(t);
|
|
1334
1337
|
}
|
|
1335
1338
|
i.forEach((n) => {
|
|
1336
|
-
let r =
|
|
1337
|
-
id:
|
|
1338
|
-
colorId:
|
|
1339
|
-
name:
|
|
1340
|
-
state:
|
|
1339
|
+
let r = Ft({
|
|
1340
|
+
id: Z(n),
|
|
1341
|
+
colorId: Q(n, t.tags)?.color_id ?? "",
|
|
1342
|
+
name: Q(n, t.tags)?.name ?? "",
|
|
1343
|
+
state: Z(n) === n ? "selected" : "excluded"
|
|
1341
1344
|
});
|
|
1342
1345
|
e.append(r);
|
|
1343
1346
|
});
|
|
1344
|
-
},
|
|
1347
|
+
}, Ft = (e) => {
|
|
1345
1348
|
let t = document.createElement("div");
|
|
1346
1349
|
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;
|
|
1347
|
-
},
|
|
1350
|
+
}, It = [
|
|
1348
1351
|
{
|
|
1349
1352
|
id: "1",
|
|
1350
1353
|
name: "Without Tag",
|
|
@@ -1395,11 +1398,11 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1395
1398
|
name: "Turquoise",
|
|
1396
1399
|
color_id: "10"
|
|
1397
1400
|
}
|
|
1398
|
-
],
|
|
1401
|
+
], Lt = [
|
|
1399
1402
|
"data-tag_id",
|
|
1400
1403
|
"data-tag_color_id",
|
|
1401
1404
|
"title"
|
|
1402
|
-
],
|
|
1405
|
+
], Rt = /* @__PURE__ */ j({
|
|
1403
1406
|
__name: "tagIcon",
|
|
1404
1407
|
props: {
|
|
1405
1408
|
id: {},
|
|
@@ -1408,8 +1411,8 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1408
1411
|
state: {}
|
|
1409
1412
|
},
|
|
1410
1413
|
setup(e) {
|
|
1411
|
-
return (t, n) => (
|
|
1412
|
-
class:
|
|
1414
|
+
return (t, n) => (P(), D("div", {
|
|
1415
|
+
class: N({
|
|
1413
1416
|
"top-tagSelector_tagIcon": !0,
|
|
1414
1417
|
"top-tagSelector-active": !!e.state,
|
|
1415
1418
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
@@ -1417,11 +1420,11 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1417
1420
|
"data-tag_id": e.id,
|
|
1418
1421
|
"data-tag_color_id": e.colorId,
|
|
1419
1422
|
title: e.name
|
|
1420
|
-
}, null, 10,
|
|
1423
|
+
}, null, 10, Lt));
|
|
1421
1424
|
}
|
|
1422
|
-
}),
|
|
1425
|
+
}), zt = ["contenteditable", "onKeydown"], Bt = /* @__PURE__ */ j({
|
|
1423
1426
|
__name: "tagPopupListItem",
|
|
1424
|
-
props: /*@__PURE__*/
|
|
1427
|
+
props: /*@__PURE__*/ M({
|
|
1425
1428
|
editable: { type: Boolean },
|
|
1426
1429
|
disabled: { type: Boolean },
|
|
1427
1430
|
canExclude: { type: Boolean },
|
|
@@ -1433,18 +1436,18 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1433
1436
|
name: { required: !0 },
|
|
1434
1437
|
nameModifiers: {}
|
|
1435
1438
|
}),
|
|
1436
|
-
emits: /*@__PURE__*/
|
|
1439
|
+
emits: /*@__PURE__*/ M([
|
|
1437
1440
|
"update:name",
|
|
1438
1441
|
"unselect",
|
|
1439
1442
|
"exclude",
|
|
1440
1443
|
"select"
|
|
1441
1444
|
], ["update:name"]),
|
|
1442
1445
|
setup(e, { emit: t }) {
|
|
1443
|
-
let n = e, r = t, i =
|
|
1446
|
+
let n = e, r = t, i = z(e, "name"), a = F(null), o = w(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
|
|
1444
1447
|
contenteditable: s.value,
|
|
1445
1448
|
onpaste: (e) => e.preventDefault()
|
|
1446
|
-
}), s =
|
|
1447
|
-
s.value = !0, await
|
|
1449
|
+
}), s = F(!1), c = async () => {
|
|
1450
|
+
s.value = !0, await ie(), a.value?.focus();
|
|
1448
1451
|
}, l = () => {
|
|
1449
1452
|
let e = a.value?.innerText;
|
|
1450
1453
|
if (!e) return u();
|
|
@@ -1456,8 +1459,8 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1456
1459
|
let t = "selected";
|
|
1457
1460
|
n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
|
|
1458
1461
|
};
|
|
1459
|
-
return (t, n) => (
|
|
1460
|
-
class:
|
|
1462
|
+
return (t, n) => (P(), T(_, {
|
|
1463
|
+
class: N({
|
|
1461
1464
|
"top-tagSelector_tagListItem": !0,
|
|
1462
1465
|
"top-tagSelector_tagListItem-inEdit": s.value,
|
|
1463
1466
|
"top-tagSelector_tagListItem-disabled": e.disabled,
|
|
@@ -1465,10 +1468,10 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1465
1468
|
"top-tagSelector-active": !!e.state,
|
|
1466
1469
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
1467
1470
|
}),
|
|
1468
|
-
onClick:
|
|
1471
|
+
onClick: H(d, ["stop"])
|
|
1469
1472
|
}, {
|
|
1470
|
-
default:
|
|
1471
|
-
|
|
1473
|
+
default: V(() => [
|
|
1474
|
+
A(Rt, {
|
|
1472
1475
|
id: e.id,
|
|
1473
1476
|
name: i.value,
|
|
1474
1477
|
colorId: e.colorId,
|
|
@@ -1479,31 +1482,31 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1479
1482
|
"colorId",
|
|
1480
1483
|
"state"
|
|
1481
1484
|
]),
|
|
1482
|
-
|
|
1485
|
+
O("span", re({
|
|
1483
1486
|
ref_key: "elName",
|
|
1484
1487
|
ref: a,
|
|
1485
1488
|
class: "top-tagSelector_tagListItemName",
|
|
1486
1489
|
contenteditable: s.value ? "plaintext-only" : !1
|
|
1487
|
-
}, o.value, { onKeydown: [
|
|
1488
|
-
e.editable ? (
|
|
1490
|
+
}, o.value, { onKeydown: [he(H(l, ["stop"]), ["enter"]), he(H(u, ["stop"]), ["esc"])] }), L(i.value), 17, zt),
|
|
1491
|
+
e.editable ? (P(), D(C, { key: 0 }, [s.value ? (P(), D("span", {
|
|
1489
1492
|
key: 1,
|
|
1490
1493
|
"data-top-icon": "",
|
|
1491
1494
|
class: "top-tagSelector_edit",
|
|
1492
|
-
onClick:
|
|
1493
|
-
})) : (
|
|
1495
|
+
onClick: H(l, ["stop"])
|
|
1496
|
+
})) : (P(), D("span", {
|
|
1494
1497
|
key: 0,
|
|
1495
1498
|
"data-top-icon": "",
|
|
1496
1499
|
class: "top-tagSelector_edit",
|
|
1497
1500
|
onClick: c
|
|
1498
|
-
}))], 64)) :
|
|
1501
|
+
}))], 64)) : E("", !0)
|
|
1499
1502
|
]),
|
|
1500
1503
|
_: 1
|
|
1501
1504
|
}, 8, ["class"]));
|
|
1502
1505
|
}
|
|
1503
|
-
}),
|
|
1506
|
+
}), Vt = { key: 1 }, Ht = /* @__PURE__ */ j({
|
|
1504
1507
|
inheritAttrs: !1,
|
|
1505
1508
|
__name: "popupOpener",
|
|
1506
|
-
props: /*@__PURE__*/
|
|
1509
|
+
props: /*@__PURE__*/ M({
|
|
1507
1510
|
modelValue: {},
|
|
1508
1511
|
id: {},
|
|
1509
1512
|
tags: {},
|
|
@@ -1519,7 +1522,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1519
1522
|
}),
|
|
1520
1523
|
emits: ["update:modelValue"],
|
|
1521
1524
|
setup(e, { attrs: t }) {
|
|
1522
|
-
let n = e, r =
|
|
1525
|
+
let n = e, r = z(e, "modelValue"), i = n.useTopButton ? a : "div", o = n.useTopButton ? "html" : "default", s = {
|
|
1523
1526
|
model: r,
|
|
1524
1527
|
mode: n.mode,
|
|
1525
1528
|
targetId: n.targetId,
|
|
@@ -1527,9 +1530,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1527
1530
|
payload: n.payload
|
|
1528
1531
|
};
|
|
1529
1532
|
return (a, c) => {
|
|
1530
|
-
let l =
|
|
1531
|
-
return
|
|
1532
|
-
default:
|
|
1533
|
+
let l = le("top-data");
|
|
1534
|
+
return P(), T(h, { id: e.id }, {
|
|
1535
|
+
default: V(() => [me((P(), T(ue(R(i)), re({
|
|
1533
1536
|
class: {
|
|
1534
1537
|
"top-tagSelector": !0,
|
|
1535
1538
|
"top-tagSelector-useTopButton": n.useTopButton,
|
|
@@ -1544,17 +1547,17 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1544
1547
|
color: "theme",
|
|
1545
1548
|
styling: e.styling
|
|
1546
1549
|
}, t), {
|
|
1547
|
-
[
|
|
1550
|
+
[R(o)]: V(() => [!r.value.length && e.mode === "filter" ? (P(), T(Rt, {
|
|
1548
1551
|
key: 0,
|
|
1549
1552
|
id: "all",
|
|
1550
1553
|
colorId: "",
|
|
1551
1554
|
name: a.$i18n.Common.All_tags ?? "",
|
|
1552
1555
|
state: ""
|
|
1553
|
-
}, null, 8, ["name"])) :
|
|
1554
|
-
id:
|
|
1555
|
-
colorId:
|
|
1556
|
-
name:
|
|
1557
|
-
state:
|
|
1556
|
+
}, null, 8, ["name"])) : E("", !0), e.mode === "setter" && e.filters ? (P(), D("div", Vt, [se(a.$slots, "default")])) : (P(!0), D(C, { key: 2 }, I(r.value, (t) => (P(), T(Rt, {
|
|
1557
|
+
id: R(Z)(t),
|
|
1558
|
+
colorId: R(Q)(t, e.tags)?.color_id ?? "",
|
|
1559
|
+
name: R(Q)(t, e.tags)?.name ?? "",
|
|
1560
|
+
state: R(Z)(t) === t ? "selected" : "excluded"
|
|
1558
1561
|
}, null, 8, [
|
|
1559
1562
|
"id",
|
|
1560
1563
|
"colorId",
|
|
@@ -1571,9 +1574,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1571
1574
|
}, 8, ["id"]);
|
|
1572
1575
|
};
|
|
1573
1576
|
}
|
|
1574
|
-
}),
|
|
1577
|
+
}), Ut = /* @__PURE__ */ j({
|
|
1575
1578
|
__name: "tagSelector",
|
|
1576
|
-
props: /*@__PURE__*/
|
|
1579
|
+
props: /*@__PURE__*/ M({
|
|
1577
1580
|
modelValue: {},
|
|
1578
1581
|
tags: {},
|
|
1579
1582
|
tagsEditable: { type: Boolean },
|
|
@@ -1594,20 +1597,20 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1594
1597
|
}, {
|
|
1595
1598
|
modelValue: { required: !0 },
|
|
1596
1599
|
modelModifiers: {},
|
|
1597
|
-
tags: { default:
|
|
1600
|
+
tags: { default: oe(It) },
|
|
1598
1601
|
tagsModifiers: {}
|
|
1599
1602
|
}),
|
|
1600
|
-
emits: /*@__PURE__*/
|
|
1603
|
+
emits: /*@__PURE__*/ M([
|
|
1601
1604
|
"selector",
|
|
1602
1605
|
"setter",
|
|
1603
1606
|
"tagsChanged"
|
|
1604
1607
|
], ["update:modelValue", "update:tags"]),
|
|
1605
1608
|
setup(e, { emit: t }) {
|
|
1606
|
-
let c = n(), l = e, u =
|
|
1609
|
+
let c = n(), l = e, u = z(e, "modelValue"), d = z(e, "tags"), f = t, p = i((e, t) => {
|
|
1607
1610
|
f(e, t);
|
|
1608
1611
|
}, l.emitDelay);
|
|
1609
1612
|
l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
|
|
1610
|
-
let m = l.id ?? "top-popup-id-" + Math.random(), h =
|
|
1613
|
+
let m = l.id ?? "top-popup-id-" + Math.random(), h = F("add"), g = () => {
|
|
1611
1614
|
let e = " " + c.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
|
|
1612
1615
|
return t.set("add", {
|
|
1613
1616
|
value: "add",
|
|
@@ -1619,35 +1622,35 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1619
1622
|
value: "delete",
|
|
1620
1623
|
title: c.Common.Delete + e
|
|
1621
1624
|
}), t;
|
|
1622
|
-
},
|
|
1625
|
+
}, v = de({
|
|
1623
1626
|
model: u,
|
|
1624
1627
|
mode: "filter",
|
|
1625
1628
|
targetId: void 0,
|
|
1626
1629
|
filters: void 0,
|
|
1627
1630
|
payload: void 0
|
|
1628
1631
|
});
|
|
1629
|
-
|
|
1632
|
+
B(u, () => {
|
|
1630
1633
|
p("selector", u.value);
|
|
1631
1634
|
});
|
|
1632
|
-
let
|
|
1633
|
-
if (
|
|
1634
|
-
}),
|
|
1635
|
+
let b = w(() => {
|
|
1636
|
+
if (v.value.mode === "setter" && l.maxTagsForSetter && !v.value.filters) return v.value.model.value.length >= l.maxTagsForSetter;
|
|
1637
|
+
}), x = (e) => {
|
|
1635
1638
|
if (e !== "all") {
|
|
1636
|
-
if (
|
|
1637
|
-
if (
|
|
1639
|
+
if (v.value.model.value.includes(e)) return "selected";
|
|
1640
|
+
if (v.value.model.value.includes(jt(e))) return "excluded";
|
|
1638
1641
|
}
|
|
1639
|
-
return e === "all" && !
|
|
1640
|
-
},
|
|
1641
|
-
let n =
|
|
1642
|
-
t === "select" && r.push(e), t === "exclude" && r.push(n),
|
|
1642
|
+
return e === "all" && !v.value.model.value.length ? "selected" : "";
|
|
1643
|
+
}, S = (e, t) => {
|
|
1644
|
+
let n = jt(e), r = v.value.model.value.filter((t) => t !== e && t !== n);
|
|
1645
|
+
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", {
|
|
1643
1646
|
tagsIds: r,
|
|
1644
|
-
targetId:
|
|
1645
|
-
payload:
|
|
1647
|
+
targetId: v.value.targetId,
|
|
1648
|
+
payload: v.value.payload
|
|
1646
1649
|
});
|
|
1647
|
-
},
|
|
1650
|
+
}, ee = w(() => {
|
|
1648
1651
|
let e = "top-tagSelector_popup";
|
|
1649
|
-
return
|
|
1650
|
-
}),
|
|
1652
|
+
return v.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), v.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
|
|
1653
|
+
}), O = () => {
|
|
1651
1654
|
let e = prompt("", "New tag");
|
|
1652
1655
|
if (!e || e === "New tag") return;
|
|
1653
1656
|
let t = d.value.length + 1;
|
|
@@ -1656,9 +1659,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1656
1659
|
name: e,
|
|
1657
1660
|
color_id: String((t - 1) % 10 + 1)
|
|
1658
1661
|
}), f("tagsChanged", d.value);
|
|
1659
|
-
},
|
|
1660
|
-
if (
|
|
1661
|
-
if (
|
|
1662
|
+
}, j = (e) => {
|
|
1663
|
+
if (v.value = s(e.elPopupOpener, "topTagSelectorTarget"), !v.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1664
|
+
if (v.value.filters && (h.value = "add", v.value.model.value = []), !r.$?.ui.sortable) {
|
|
1662
1665
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
1663
1666
|
return;
|
|
1664
1667
|
}
|
|
@@ -1676,13 +1679,13 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1676
1679
|
}), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
|
|
1677
1680
|
}
|
|
1678
1681
|
});
|
|
1679
|
-
},
|
|
1682
|
+
}, ne = (e) => {
|
|
1680
1683
|
r.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
|
|
1681
1684
|
};
|
|
1682
|
-
return (t, n) => (
|
|
1685
|
+
return (t, n) => (P(), D(C, null, [A(Ht, {
|
|
1683
1686
|
modelValue: u.value,
|
|
1684
1687
|
"onUpdate:modelValue": n[0] ||= (e) => u.value = e,
|
|
1685
|
-
id:
|
|
1688
|
+
id: R(m),
|
|
1686
1689
|
tags: d.value,
|
|
1687
1690
|
styling: e.styling,
|
|
1688
1691
|
mode: "filter",
|
|
@@ -1693,36 +1696,36 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1693
1696
|
"tags",
|
|
1694
1697
|
"styling",
|
|
1695
1698
|
"useTopButton"
|
|
1696
|
-
]),
|
|
1697
|
-
id:
|
|
1698
|
-
class:
|
|
1699
|
-
onOpen: n[4] ||= (e) =>
|
|
1700
|
-
onClose: n[5] ||= (e) =>
|
|
1699
|
+
]), A(y, {
|
|
1700
|
+
id: R(m),
|
|
1701
|
+
class: N(ee.value),
|
|
1702
|
+
onOpen: n[4] ||= (e) => j(e),
|
|
1703
|
+
onClose: n[5] ||= (e) => ne(e),
|
|
1701
1704
|
"transition-duration": 50
|
|
1702
|
-
},
|
|
1703
|
-
contentList:
|
|
1704
|
-
|
|
1705
|
+
}, te({
|
|
1706
|
+
contentList: V(() => [
|
|
1707
|
+
v.value.mode === "filter" && !e.singleMode ? (P(), T(Bt, {
|
|
1705
1708
|
key: 0,
|
|
1706
1709
|
id: "all",
|
|
1707
1710
|
colorId: "",
|
|
1708
1711
|
name: t.$i18n.Common.All_tags ?? "",
|
|
1709
|
-
state:
|
|
1710
|
-
onSelect: n[3] ||= (e) =>
|
|
1711
|
-
}, null, 8, ["name", "state"])) :
|
|
1712
|
-
(
|
|
1712
|
+
state: v.value.model.value.length ? "" : "selected",
|
|
1713
|
+
onSelect: n[3] ||= (e) => v.value.model.value = []
|
|
1714
|
+
}, null, 8, ["name", "state"])) : E("", !0),
|
|
1715
|
+
(P(!0), D(C, null, I(d.value, (t) => (P(), T(Bt, {
|
|
1713
1716
|
key: t.id,
|
|
1714
1717
|
id: t.id,
|
|
1715
1718
|
colorId: t.color_id,
|
|
1716
1719
|
name: t.name,
|
|
1717
|
-
state:
|
|
1718
|
-
canExclude:
|
|
1720
|
+
state: x(t.id),
|
|
1721
|
+
canExclude: v.value.mode === "filter" && !e.singleMode,
|
|
1719
1722
|
editable: e.tagsEditable,
|
|
1720
|
-
disabled:
|
|
1721
|
-
onUnselect: (e) =>
|
|
1722
|
-
onSelect: (e) =>
|
|
1723
|
-
onExclude: (e) =>
|
|
1723
|
+
disabled: b.value && x(t.id) === "",
|
|
1724
|
+
onUnselect: (e) => S(t.id, "unselect"),
|
|
1725
|
+
onSelect: (e) => S(t.id, "select"),
|
|
1726
|
+
onExclude: (e) => S(t.id, "exclude"),
|
|
1724
1727
|
"onUpdate:name": (e) => {
|
|
1725
|
-
t.name = e,
|
|
1728
|
+
t.name = e, R(p)("tagsChanged", d.value);
|
|
1726
1729
|
}
|
|
1727
1730
|
}, null, 8, [
|
|
1728
1731
|
"id",
|
|
@@ -1737,36 +1740,36 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1737
1740
|
"onExclude",
|
|
1738
1741
|
"onUpdate:name"
|
|
1739
1742
|
]))), 128)),
|
|
1740
|
-
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (
|
|
1743
|
+
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (P(), T(_, {
|
|
1741
1744
|
key: 1,
|
|
1742
1745
|
"data-top-icon": "",
|
|
1743
|
-
onClick:
|
|
1746
|
+
onClick: H(O, ["stop"])
|
|
1744
1747
|
}, {
|
|
1745
|
-
default:
|
|
1748
|
+
default: V(() => [k(L(t.$i18n.Common.Add), 1)]),
|
|
1746
1749
|
_: 1
|
|
1747
|
-
})) :
|
|
1750
|
+
})) : E("", !0)
|
|
1748
1751
|
]),
|
|
1749
1752
|
_: 2
|
|
1750
|
-
}, [
|
|
1753
|
+
}, [v.value.mode === "setter" && v.value.filters ? {
|
|
1751
1754
|
name: "header",
|
|
1752
|
-
fn:
|
|
1755
|
+
fn: V(() => [A(o, {
|
|
1753
1756
|
modelValue: h.value,
|
|
1754
1757
|
"onUpdate:modelValue": n[1] ||= (e) => h.value = e,
|
|
1755
1758
|
options: g()
|
|
1756
1759
|
}, null, 8, ["modelValue", "options"])]),
|
|
1757
1760
|
key: "0"
|
|
1758
|
-
} : void 0,
|
|
1761
|
+
} : void 0, v.value.mode === "setter" && v.value.filters ? {
|
|
1759
1762
|
name: "footer",
|
|
1760
|
-
fn:
|
|
1761
|
-
default:
|
|
1763
|
+
fn: V(() => [A(a, { color: "theme" }, {
|
|
1764
|
+
default: V(() => [k(L(t.$i18n.Common.Cancel), 1)]),
|
|
1762
1765
|
_: 1
|
|
1763
|
-
}),
|
|
1764
|
-
tagsIds:
|
|
1765
|
-
filters:
|
|
1766
|
+
}), A(a, { onClick: n[2] ||= (e) => R(p)("setter", {
|
|
1767
|
+
tagsIds: v.value.model.value,
|
|
1768
|
+
filters: v.value.filters,
|
|
1766
1769
|
filtersAction: h.value,
|
|
1767
|
-
payload:
|
|
1770
|
+
payload: v.value.payload
|
|
1768
1771
|
}) }, {
|
|
1769
|
-
default:
|
|
1772
|
+
default: V(() => [k(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)]),
|
|
1770
1773
|
_: 1
|
|
1771
1774
|
})]),
|
|
1772
1775
|
key: "1"
|
|
@@ -1774,6 +1777,6 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
|
1774
1777
|
}
|
|
1775
1778
|
});
|
|
1776
1779
|
//#endregion
|
|
1777
|
-
export {
|
|
1780
|
+
export { ve as TopCompetitorSelector, at as TopGroupSelector, At as TopProjectSelector, ze as TopRegionSelector, Ut as TopTagSelector, Ht as TopTagSelectorPopupOpener, Rt as TopTagSelectorTagIcon, Ae as dialogRegionSelector, ke as findRegion, Mt as genElTopTagSelectorPopupOpener, je as genSearcherByKey, Nt as renderElTopTagSelectorPopupOpener, wt as topProjectSelectorClearCache, ye as useItemsFromCompetitors };
|
|
1778
1781
|
|
|
1779
1782
|
//# sourceMappingURL=project.js.map
|