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