@topvisor/ui 1.4.3-3 → 1.4.3-updateGroupSelector.1
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/package.json +2 -2
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +62 -57
- package/project/project.js.map +1 -1
- package/src/components/project/groupSelector/folders/types.d.ts +1 -0
- package/src/components/project/groupSelector/folders/utils.d.ts +417 -38
- package/src/components/project/groupSelector/groupSelector.vue.d.ts +1 -0
- package/src/components/project/groupSelector/groups/types.d.ts +1 -0
- package/src/components/project/groupSelector/groups/utils.d.ts +790 -56
- package/src/components/project/groupSelector/types.d.ts +6 -0
package/project/project.js
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
const fileNames = ['../assets/project.css'].map(fileName => import.meta.resolve(fileName));
|
|
4
4
|
_autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
|
|
5
5
|
|
|
6
|
-
import { defineComponent as R, mergeModels as V, useModel as T, computed as M, createElementBlock as A, openBlock as h, createBlock as C, unref as v, withCtx as B, Fragment as
|
|
7
|
-
import { u as w, C as z, e as
|
|
6
|
+
import { defineComponent as R, mergeModels as V, useModel as T, computed as M, createElementBlock as A, openBlock as h, createBlock as C, unref as v, withCtx as B, Fragment as Q, renderList as me, normalizeClass as Z, createElementVNode as oe, toDisplayString as b, createVNode as P, createTextVNode as J, toValue as ye, ref as K, watch as E, createCommentVNode as O, reactive as be, isRef as he, withModifiers as U, mergeProps as Ve, withKeys as Ie, nextTick as Re, resolveDirective as Pe, withDirectives as Ne, resolveDynamicComponent as qe, renderSlot as De, shallowRef as Fe, createSlots as Ue } from "vue";
|
|
7
|
+
import { u as w, C as z, e as H, q as ce, d as ze } from "../.chunks/forms-CUaoBGD5.es.js";
|
|
8
8
|
import { _ as we, b as ve, a as Je } from "../.chunks/popupHint.vue_vue_type_style_index_0_lang-DzT1BFMx.es.js";
|
|
9
|
-
import { a as We, _ as Me, b as
|
|
10
|
-
import { u as
|
|
11
|
-
import { getSearcherGIcon as
|
|
9
|
+
import { a as We, _ as Me, b as $e, c as Ee, I as ue } from "../.chunks/policy.vue_vue_type_style_index_0_lang-uPC0N7jl.es.js";
|
|
10
|
+
import { u as Ye } from "../.chunks/utils-Kzz2mc2t.es.js";
|
|
11
|
+
import { getSearcherGIcon as Qe, getLangLabel as He, getDeviceGIcon as Xe } from "../utils/searchers.js";
|
|
12
12
|
import "../.chunks/core-DBWAn2Eg.es.js";
|
|
13
13
|
import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-BZM_iKPW.es.js";
|
|
14
14
|
import { g as Se } from "../.chunks/field-CyyFzM-Y.es.js";
|
|
15
15
|
import { storage as W } from "../utils/dom.js";
|
|
16
|
-
import { TopPopupWorker as
|
|
17
|
-
const
|
|
16
|
+
import { TopPopupWorker as Ze } from "../popup/worker.js";
|
|
17
|
+
const _e = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" }, Rt = /* @__PURE__ */ R({
|
|
18
18
|
__name: "competitorSelector",
|
|
19
19
|
props: /* @__PURE__ */ V({
|
|
20
20
|
modelValue: {},
|
|
@@ -35,10 +35,10 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
35
35
|
content: ""
|
|
36
36
|
};
|
|
37
37
|
});
|
|
38
|
-
return (r, l) => (h(), A("div",
|
|
38
|
+
return (r, l) => (h(), A("div", _e, [
|
|
39
39
|
v(z).state.isMobile ? (h(), C(we, { key: 0 }, {
|
|
40
40
|
opener: B(() => [
|
|
41
|
-
P(
|
|
41
|
+
P(H, {
|
|
42
42
|
class: "top-competitorSelector_opener",
|
|
43
43
|
color: "theme",
|
|
44
44
|
icon: "",
|
|
@@ -51,8 +51,8 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
51
51
|
})
|
|
52
52
|
]),
|
|
53
53
|
contentList: B(() => [
|
|
54
|
-
(h(!0), A(
|
|
55
|
-
class:
|
|
54
|
+
(h(!0), A(Q, null, me(e.items, (n) => (h(), C(ve, {
|
|
55
|
+
class: Z({
|
|
56
56
|
"top-active": o.value?.includes(n.value)
|
|
57
57
|
}),
|
|
58
58
|
"data-top-icon": n.icon,
|
|
@@ -166,7 +166,7 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
166
166
|
}), r))
|
|
167
167
|
return !1;
|
|
168
168
|
}), r;
|
|
169
|
-
}, it =
|
|
169
|
+
}, it = Ye(() => import("../.chunks/dialog_regionSelectorRegions-BMWyYCfD.es.js")), dt = (e, a) => {
|
|
170
170
|
const o = w(), t = K(a.value.keys().next().value ?? y), r = M(() => {
|
|
171
171
|
const l = /* @__PURE__ */ new Map();
|
|
172
172
|
if (a.value.forEach((n) => {
|
|
@@ -174,7 +174,7 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
174
174
|
value: n.key,
|
|
175
175
|
title: n.name
|
|
176
176
|
};
|
|
177
|
-
e.addSearcherIcon && (u.icon =
|
|
177
|
+
e.addSearcherIcon && (u.icon = Qe(n.key)), l.set(n.key, u);
|
|
178
178
|
}), e.addCompare && !l.has(y)) {
|
|
179
179
|
const n = {
|
|
180
180
|
value: "",
|
|
@@ -210,12 +210,12 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
212
|
n.device && (u += " (" + o.Common["Device_" + n.device] + ")");
|
|
213
|
-
const f =
|
|
213
|
+
const f = He(a.value.key || 0, n.lang ?? "");
|
|
214
214
|
f && (u += " / " + f);
|
|
215
215
|
const c = {
|
|
216
216
|
value: n.index,
|
|
217
217
|
title: u,
|
|
218
|
-
icon: n.device ?
|
|
218
|
+
icon: n.device ? Xe(n.device) : void 0
|
|
219
219
|
};
|
|
220
220
|
l.set(n.index, c);
|
|
221
221
|
}), l;
|
|
@@ -394,8 +394,8 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
394
394
|
s !== void 0 && d.push(s);
|
|
395
395
|
else if (d.length === 1) {
|
|
396
396
|
let g = c.value;
|
|
397
|
-
o.forFrequency && (g = /* @__PURE__ */ new Set(), f.value.forEach((
|
|
398
|
-
|
|
397
|
+
o.forFrequency && (g = /* @__PURE__ */ new Set(), f.value.forEach((_) => {
|
|
398
|
+
_.regionByIndex.forEach((N) => {
|
|
399
399
|
N.index !== le && N.index !== y && g.add(N.key);
|
|
400
400
|
});
|
|
401
401
|
})), g.has(d[0]) || (d = [], s !== void 0 && d.push(s));
|
|
@@ -437,7 +437,7 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
437
437
|
getSearcher: x,
|
|
438
438
|
getRegion: i
|
|
439
439
|
}), (d, s) => (h(), A("div", {
|
|
440
|
-
class:
|
|
440
|
+
class: Z({
|
|
441
441
|
"top-selectorRegion": !0,
|
|
442
442
|
"top-selectorRegion-onlySearcher": e.onlySearcher
|
|
443
443
|
})
|
|
@@ -459,7 +459,7 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
459
459
|
addChanger: e.addChanger,
|
|
460
460
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
461
461
|
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : O("", !0),
|
|
462
|
-
e.addCompare && !e.onlySearcher && v(l).searcherKey.value === v(L) ? (h(), C(
|
|
462
|
+
e.addCompare && !e.onlySearcher && v(l).searcherKey.value === v(L) ? (h(), C(H, {
|
|
463
463
|
key: 1,
|
|
464
464
|
name: "compare",
|
|
465
465
|
onClick: m,
|
|
@@ -484,7 +484,7 @@ const pe = (e, a, o = /* @__PURE__ */ new Map(), t = { id: "root" }, r = 0) => (
|
|
|
484
484
|
l = { ...l }, t.childsIds.push(l.id), l.id === 0 && (l.name = gt(a));
|
|
485
485
|
const n = r > 1 ? "-".repeat(r - 1) + " " : "";
|
|
486
486
|
n && !l.name.startsWith(n) && (l.name = n + l.name), o.set(l.id, l), pe(e, a, o, l, r + 1), t.childsIds = t.childsIds.concat(l.childsIds), t.id && l.count_groups_active && (t.countAllGroupsActive += l.count_groups_active);
|
|
487
|
-
}), o), ft = (e) => e.gen(
|
|
487
|
+
}), o), ft = (e, a) => e.gen(`/get/${a}/folders/`, ["id", "parent_id", "name", "path"]).changeParams({ orders: ["ord_path"], limit: 100 });
|
|
488
488
|
function ge(e, a, o) {
|
|
489
489
|
const t = Object.keys(e), r = t.map((l) => e[l]);
|
|
490
490
|
return E(r, (l, n, u) => {
|
|
@@ -510,7 +510,8 @@ const mt = /* @__PURE__ */ R({
|
|
|
510
510
|
canSelectAll: { type: Boolean },
|
|
511
511
|
addChanger: { type: Boolean },
|
|
512
512
|
addIcon: { type: Boolean, default: !0 },
|
|
513
|
-
client: {}
|
|
513
|
+
client: {},
|
|
514
|
+
service: {}
|
|
514
515
|
}, {
|
|
515
516
|
folderId: { required: !0 },
|
|
516
517
|
folderIdModifiers: {},
|
|
@@ -519,7 +520,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
519
520
|
}),
|
|
520
521
|
emits: ["update:folderId", "update:folder"],
|
|
521
522
|
setup(e) {
|
|
522
|
-
const a = e, o = T(e, "folderId"), t = T(e, "folder"), r = a.client && !a.folders ? ft(a.client) : void 0, l = K(null);
|
|
523
|
+
const a = e, o = T(e, "folderId"), t = T(e, "folder"), r = a.client && !a.folders ? ft(a.client, a.service) : void 0, l = K(null);
|
|
523
524
|
E(() => a.projectId, () => {
|
|
524
525
|
r?.changeParams({
|
|
525
526
|
project_id: a.projectId
|
|
@@ -548,7 +549,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
548
549
|
"search-type": "inline",
|
|
549
550
|
icon: e.addIcon ? "" : void 0,
|
|
550
551
|
api: e.folders ? void 0 : v(r),
|
|
551
|
-
apiSetSearchParams: (...c) => v(
|
|
552
|
+
apiSetSearchParams: (...c) => v($e)(...c, "name"),
|
|
552
553
|
addChanger: e.addChanger,
|
|
553
554
|
useCache: ""
|
|
554
555
|
}, null, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "addChanger"]));
|
|
@@ -559,11 +560,11 @@ const mt = /* @__PURE__ */ R({
|
|
|
559
560
|
folder_id: j.id,
|
|
560
561
|
folder_path: j.path
|
|
561
562
|
}, re = {
|
|
562
|
-
id:
|
|
563
|
+
id: Ee,
|
|
563
564
|
name: "All groups",
|
|
564
565
|
folder_id: j.id,
|
|
565
566
|
folder_path: j.path
|
|
566
|
-
},
|
|
567
|
+
}, Y = () => (re.name = w()?.Common.All_groups, re), Le = () => (re.name = w()?.Keywords.Choose_group, re), vt = (e, a, o) => (e = [...e], a !== void 0 && (e = e.filter((t) => t.on == Number(a))), o && o.id && o.childsIds && (e = e.filter((t) => t.folder_id === o.id || o.childsIds.includes(t.folder_id))), e), Ce = (e, a) => e.gen(`/get/${a}/groups/`, ["id", "name", "folder_id", "folder_path"]).changeParams({ folder_id_depth: !0, limit: 100 }), pt = (e, a) => e.gen(`/add/${a}/groups/`), yt = { class: "top-groupSelector_groupItem" }, ht = {
|
|
567
568
|
key: 0,
|
|
568
569
|
class: "top-comment"
|
|
569
570
|
}, It = {
|
|
@@ -584,7 +585,8 @@ const mt = /* @__PURE__ */ R({
|
|
|
584
585
|
addChanger: { type: Boolean, default: !0 },
|
|
585
586
|
showPath: { type: Boolean },
|
|
586
587
|
addIcon: { type: Boolean, default: !0 },
|
|
587
|
-
client: {}
|
|
588
|
+
client: {},
|
|
589
|
+
service: {}
|
|
588
590
|
}, {
|
|
589
591
|
groupId: { required: !0 },
|
|
590
592
|
groupIdModifiers: {},
|
|
@@ -593,7 +595,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
593
595
|
}),
|
|
594
596
|
emits: /* @__PURE__ */ V(["addGroup"], ["update:groupId", "update:group"]),
|
|
595
597
|
setup(e, { emit: a }) {
|
|
596
|
-
const o = e, t = a, r = T(e, "groupId"), l = T(e, "group"), n = o.client && !o.groups ? Ce(o.client) : void 0, u = o.client ? pt(o.client) : void 0, f = K(null), c = K(void 0), x = Se("folder_id", "EQUALS", [o.folder?.id ?? 0]);
|
|
598
|
+
const o = e, t = a, r = T(e, "groupId"), l = T(e, "group"), n = o.client && !o.groups ? Ce(o.client, o.service) : void 0, u = o.client ? pt(o.client, o.service) : void 0, f = K(null), c = K(void 0), x = Se("folder_id", "EQUALS", [o.folder?.id ?? 0]);
|
|
597
599
|
n?.changeParams({
|
|
598
600
|
project_id: o.projectId,
|
|
599
601
|
folder_id_depth: !0,
|
|
@@ -617,7 +619,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
617
619
|
o.folder?.id ?? 0
|
|
618
620
|
], o.groups && (c.value = vt(o.groups, o.on, o.folder))), f.value?.resetCache(), (d.folderId?.old !== void 0 || d.canSelectAll?.old !== void 0) && r.value !== ue) {
|
|
619
621
|
let s;
|
|
620
|
-
o.autoselect === "first" && (s = c.value?.[0], o.canSelectAll && (s = be(
|
|
622
|
+
o.autoselect === "first" && (s = c.value?.[0], o.canSelectAll && (s = be(Y()))), (o.autoselect === "placeholder" || !s) && (s = Le()), i(s);
|
|
621
623
|
}
|
|
622
624
|
}, { immediate: !0 }), ge({
|
|
623
625
|
modelGroup: l,
|
|
@@ -631,15 +633,15 @@ const mt = /* @__PURE__ */ R({
|
|
|
631
633
|
if (!(o.canAdd && r.value === ue)) {
|
|
632
634
|
if (o.groups) {
|
|
633
635
|
let s = c.value?.find((g) => g.id === r.value);
|
|
634
|
-
if (!s && o.canSelectAll && (s =
|
|
636
|
+
if (!s && o.canSelectAll && (s = Y()), s)
|
|
635
637
|
i(s);
|
|
636
638
|
else {
|
|
637
639
|
const g = c.value?.[0];
|
|
638
640
|
g && !r.value ? i(g) : i(ne);
|
|
639
641
|
}
|
|
640
642
|
}
|
|
641
|
-
if (o.client && !o.groups && (r.value || r.value ===
|
|
642
|
-
const s = Ce(o.client).changeParams({
|
|
643
|
+
if (o.client && !o.groups && (r.value || r.value === Ee && !o.canSelectAll)) {
|
|
644
|
+
const s = Ce(o.client, o.service).changeParams({
|
|
643
645
|
project_id: o.projectId,
|
|
644
646
|
id: r.value,
|
|
645
647
|
filters: [
|
|
@@ -676,9 +678,9 @@ const mt = /* @__PURE__ */ R({
|
|
|
676
678
|
searchType: "inline",
|
|
677
679
|
icon: e.addIcon ? "" : void 0,
|
|
678
680
|
api: e.groups ? void 0 : v(n),
|
|
679
|
-
apiSetSearchParams: (...g) => v(
|
|
681
|
+
apiSetSearchParams: (...g) => v($e)(...g, "name"),
|
|
680
682
|
appendSearchToResult: !!e.canAdd,
|
|
681
|
-
useAllItem: e.canSelectAll ? v(
|
|
683
|
+
useAllItem: e.canSelectAll ? v(Y)().name : !1,
|
|
682
684
|
addChanger: e.addChanger,
|
|
683
685
|
useCache: "",
|
|
684
686
|
onAppendItem: m
|
|
@@ -711,7 +713,8 @@ const mt = /* @__PURE__ */ R({
|
|
|
711
713
|
showFolders: { type: Boolean, default: !0 },
|
|
712
714
|
showGroups: { type: Boolean, default: !0 },
|
|
713
715
|
addIcon: { type: Boolean, default: !0 },
|
|
714
|
-
client: {}
|
|
716
|
+
client: {},
|
|
717
|
+
service: { default: "keywords_2" }
|
|
715
718
|
}, {
|
|
716
719
|
folderId: { required: !0 },
|
|
717
720
|
folderIdModifiers: {},
|
|
@@ -727,7 +730,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
727
730
|
const o = e, t = T(e, "folderId"), r = T(e, "folder"), l = T(e, "groupId"), n = T(e, "group"), u = a, f = pe(o.folders ?? { root: [j] }, o.canSelectAllGroups);
|
|
728
731
|
r.value = f.get(t.value);
|
|
729
732
|
let c = o.groups?.find((i) => i.id === l.value);
|
|
730
|
-
l.value || (c = o.groups?.[0]), o.canSelectAllGroups && !c && (c =
|
|
733
|
+
l.value || (c = o.groups?.[0]), o.canSelectAllGroups && !c && (c = Y()), o.canSelectAllGroups && !c && (c = Y()), (o.autoselect === "placeholder" || !c) && (c = Le()), c ??= ne, n.value = c;
|
|
731
734
|
const x = (i) => {
|
|
732
735
|
let m;
|
|
733
736
|
o.groups && i && (m = [...o.groups, i]), u("update:groups", m);
|
|
@@ -744,8 +747,9 @@ const mt = /* @__PURE__ */ R({
|
|
|
744
747
|
canSelectAll: e.canSelectAllGroups,
|
|
745
748
|
addChanger: e.addChanger,
|
|
746
749
|
addIcon: e.addIcon,
|
|
747
|
-
client: e.client
|
|
748
|
-
|
|
750
|
+
client: e.client,
|
|
751
|
+
service: e.service
|
|
752
|
+
}, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client", "service"])) : O("", !0),
|
|
749
753
|
e.showGroups ? (h(), C(St, {
|
|
750
754
|
key: 1,
|
|
751
755
|
groupId: l.value,
|
|
@@ -763,18 +767,19 @@ const mt = /* @__PURE__ */ R({
|
|
|
763
767
|
showPath: e.showFolders && !!e.folders?.[0],
|
|
764
768
|
addIcon: e.addIcon,
|
|
765
769
|
client: e.client,
|
|
770
|
+
service: e.service,
|
|
766
771
|
onAddGroup: x
|
|
767
|
-
}, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "showPath", "addIcon", "client"])) : O("", !0)
|
|
772
|
+
}, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "showPath", "addIcon", "client", "service"])) : O("", !0)
|
|
768
773
|
]));
|
|
769
774
|
}
|
|
770
|
-
}), Be = (e) => "-" + e,
|
|
771
|
-
e =
|
|
775
|
+
}), Be = (e) => "-" + e, X = (e) => e[0] === "-" ? e.substring(1) : e, ie = (e, a) => {
|
|
776
|
+
e = X(e);
|
|
772
777
|
const o = a.find((t) => t.id === e);
|
|
773
778
|
if (o)
|
|
774
779
|
return o;
|
|
775
780
|
}, Dt = (e, a, o) => {
|
|
776
781
|
a || (a = { id: e.id }), a.id = e.id, a.pos ??= "3", a.notch ??= !0, a.posBy ??= "fixed";
|
|
777
|
-
const t =
|
|
782
|
+
const t = Ze.genElPopupOpener("div", a);
|
|
778
783
|
return t.classList.add("top-tagSelector"), e.useTopButton && t.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || t.classList.add("top-tagSelector-custom"), e.mode === "filter" && t.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && t.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && t.classList.add("top-tagSelector-setter_several"), t.onclick = (r) => {
|
|
779
784
|
r.preventDefault(), r.stopPropagation(), t.onclick = null;
|
|
780
785
|
const l = K(e.modelValue), n = {
|
|
@@ -811,10 +816,10 @@ const mt = /* @__PURE__ */ R({
|
|
|
811
816
|
}
|
|
812
817
|
t.forEach((r) => {
|
|
813
818
|
const l = Te({
|
|
814
|
-
id:
|
|
819
|
+
id: X(r),
|
|
815
820
|
colorId: ie(r, a.tags)?.color_id ?? "",
|
|
816
821
|
name: ie(r, a.tags)?.name ?? "",
|
|
817
|
-
state:
|
|
822
|
+
state: X(r) === r ? "selected" : "excluded"
|
|
818
823
|
});
|
|
819
824
|
e.append(l);
|
|
820
825
|
});
|
|
@@ -882,7 +887,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
882
887
|
},
|
|
883
888
|
setup(e) {
|
|
884
889
|
return (a, o) => (h(), A("div", {
|
|
885
|
-
class:
|
|
890
|
+
class: Z({
|
|
886
891
|
"top-tagSelector_tagIcon": !0,
|
|
887
892
|
"top-tagSelector-active": !!e.state,
|
|
888
893
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
@@ -927,7 +932,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
927
932
|
o.canExclude && (m.ctrlKey || m.metaKey) && (d = "excluded"), o.state == d && (d = ""), d === "" && t("unselect"), d === "selected" && t("select"), d === "excluded" && t("exclude");
|
|
928
933
|
};
|
|
929
934
|
return (m, d) => (h(), C(ve, {
|
|
930
|
-
class:
|
|
935
|
+
class: Z({
|
|
931
936
|
"top-tagSelector_tagListItem": !0,
|
|
932
937
|
"top-tagSelector_tagListItem-inEdit": u.value,
|
|
933
938
|
"top-tagSelector_tagListItem-disabled": e.disabled,
|
|
@@ -955,7 +960,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
955
960
|
Ie(U(x, ["stop"]), ["esc"])
|
|
956
961
|
]
|
|
957
962
|
}), b(r.value), 17, Bt),
|
|
958
|
-
e.editable ? (h(), A(
|
|
963
|
+
e.editable ? (h(), A(Q, { key: 0 }, [
|
|
959
964
|
u.value ? (h(), A("span", {
|
|
960
965
|
key: 1,
|
|
961
966
|
"data-top-icon": "",
|
|
@@ -993,7 +998,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
993
998
|
}),
|
|
994
999
|
emits: ["update:modelValue"],
|
|
995
1000
|
setup(e) {
|
|
996
|
-
const a = e, o = T(e, "modelValue"), t = a.useTopButton ?
|
|
1001
|
+
const a = e, o = T(e, "modelValue"), t = a.useTopButton ? H : "div", r = a.useTopButton ? "html" : "default", l = {
|
|
997
1002
|
model: o,
|
|
998
1003
|
mode: a.mode,
|
|
999
1004
|
targetId: a.targetId,
|
|
@@ -1029,11 +1034,11 @@ const mt = /* @__PURE__ */ R({
|
|
|
1029
1034
|
}, null, 8, ["name"])) : O("", !0),
|
|
1030
1035
|
e.mode === "setter" && e.filters ? (h(), A("div", Tt, [
|
|
1031
1036
|
De(n.$slots, "default")
|
|
1032
|
-
])) : (h(!0), A(
|
|
1033
|
-
id: v(
|
|
1037
|
+
])) : (h(!0), A(Q, { key: 2 }, me(o.value, (c) => (h(), C(fe, {
|
|
1038
|
+
id: v(X)(c),
|
|
1034
1039
|
colorId: v(ie)(c, e.tags)?.color_id ?? "",
|
|
1035
1040
|
name: v(ie)(c, e.tags)?.name ?? "",
|
|
1036
|
-
state: v(
|
|
1041
|
+
state: v(X)(c) === c ? "selected" : "excluded"
|
|
1037
1042
|
}, null, 8, ["id", "colorId", "name", "state"]))), 256))
|
|
1038
1043
|
]),
|
|
1039
1044
|
_: 2
|
|
@@ -1113,7 +1118,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
1113
1118
|
}, g = M(() => {
|
|
1114
1119
|
let p = "top-tagSelector_popup";
|
|
1115
1120
|
return i.value.mode === "filter" && (p += " top-tagSelector_popup-filter"), i.value.mode === "setter" && (p += " top-tagSelector_popup-setter"), p;
|
|
1116
|
-
}),
|
|
1121
|
+
}), _ = () => {
|
|
1117
1122
|
const p = prompt("", "New tag");
|
|
1118
1123
|
if (!p || p === "New tag") return;
|
|
1119
1124
|
const I = l.value.length + 1;
|
|
@@ -1151,7 +1156,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
1151
1156
|
}, je = (p) => {
|
|
1152
1157
|
z.$?.ui.sortable && $(p.elPopup).data("ui-sortable") && $(p.elPopup).sortable("destroy");
|
|
1153
1158
|
};
|
|
1154
|
-
return (p, I) => (h(), A(
|
|
1159
|
+
return (p, I) => (h(), A(Q, null, [
|
|
1155
1160
|
P(At, {
|
|
1156
1161
|
modelValue: r.value,
|
|
1157
1162
|
"onUpdate:modelValue": I[0] || (I[0] = (S) => r.value = S),
|
|
@@ -1163,7 +1168,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
1163
1168
|
}, null, 8, ["modelValue", "id", "tags", "styling", "useTopButton"]),
|
|
1164
1169
|
P(we, {
|
|
1165
1170
|
id: v(f),
|
|
1166
|
-
class:
|
|
1171
|
+
class: Z(g.value),
|
|
1167
1172
|
onOpen: I[4] || (I[4] = (S) => N(S)),
|
|
1168
1173
|
onClose: I[5] || (I[5] = (S) => je(S)),
|
|
1169
1174
|
"transition-duration": 50
|
|
@@ -1177,7 +1182,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
1177
1182
|
state: v(i).model.value.length ? "" : "selected",
|
|
1178
1183
|
onSelect: I[3] || (I[3] = (S) => v(i).model.value = [])
|
|
1179
1184
|
}, null, 8, ["name", "state"])) : O("", !0),
|
|
1180
|
-
(h(!0), A(
|
|
1185
|
+
(h(!0), A(Q, null, me(l.value, (S) => (h(), C(Ae, {
|
|
1181
1186
|
key: S.id,
|
|
1182
1187
|
id: S.id,
|
|
1183
1188
|
colorId: S.color_id,
|
|
@@ -1196,7 +1201,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
1196
1201
|
e.tagsEditable && l.value.length < e.tagsMax && l.value.length < 20 ? (h(), C(ve, {
|
|
1197
1202
|
key: 1,
|
|
1198
1203
|
"data-top-icon": "",
|
|
1199
|
-
onClick: U(
|
|
1204
|
+
onClick: U(_, ["stop"])
|
|
1200
1205
|
}, {
|
|
1201
1206
|
default: B(() => [
|
|
1202
1207
|
J(b(p.$i18n.Common.Add), 1)
|
|
@@ -1220,13 +1225,13 @@ const mt = /* @__PURE__ */ R({
|
|
|
1220
1225
|
v(i).mode === "setter" && v(i).filters ? {
|
|
1221
1226
|
name: "footer",
|
|
1222
1227
|
fn: B(() => [
|
|
1223
|
-
P(
|
|
1228
|
+
P(H, { color: "theme" }, {
|
|
1224
1229
|
default: B(() => [
|
|
1225
1230
|
J(b(p.$i18n.Common.Cancel), 1)
|
|
1226
1231
|
]),
|
|
1227
1232
|
_: 1
|
|
1228
1233
|
}),
|
|
1229
|
-
P(
|
|
1234
|
+
P(H, {
|
|
1230
1235
|
onClick: I[2] || (I[2] = (S) => v(u)("setter", {
|
|
1231
1236
|
tagsIds: v(i).model.value,
|
|
1232
1237
|
filters: v(i).filters,
|