@topvisor/ui 1.0.26 → 1.0.27
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/dialog_selectorRegions-D9DQxYlD.amd.js +2 -0
- package/.chunks/dialog_selectorRegions-D9DQxYlD.amd.js.map +1 -0
- package/.chunks/dialog_selectorRegions-kjMlLJUX.es.js +186 -0
- package/.chunks/dialog_selectorRegions-kjMlLJUX.es.js.map +1 -0
- package/assets/project.css +1 -1
- package/icomoon/Topvisor icons.json +226 -41
- package/icomoon/demo.html +364 -252
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +9 -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 +29 -5
- package/package.json +7 -7
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +1 -1
- package/project/project.js.map +1 -1
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +9 -9
- package/utils/string.js.map +1 -1
- package/.chunks/dialog_selectorRegions-B09GIvNe.amd.js +0 -2
- package/.chunks/dialog_selectorRegions-B09GIvNe.amd.js.map +0 -1
- package/.chunks/dialog_selectorRegions-BgrX75Zl.es.js +0 -181
- package/.chunks/dialog_selectorRegions-BgrX75Zl.es.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(["require","exports","vue","./page.vue_vue_type_script_setup_true_lang-CQbcjBRq.amd","./utils-Kng8viAk.amd","../utils/string.amd","../utils/searchers.amd","./forms-CJ5N_pAq.amd","../require/css.amd!../assets/dialog_selectorRegions.css"],function(U,v,e,_,h,C,p,f){"use strict";if(typeof e>"u")var e=window.Vue;const V={class:"dialog_selectorRegions_header"},b=["data-top-icon"],N=["src","alt"],B={class:"dialog_selectorRegions_regionAreaName top-ellipsis"},I={key:1},R=["data-top-icon"],S=e.defineComponent({id:"selectorRegions",__name:"dialog_selectorRegions",props:{regions:{},regionsIndexes:{},"@update:regionsIndexes":{type:Function}},setup(L){const s=L,y=h.useTopDialogSelf(),r=e.ref([]),i=e.ref(null),u=e.reactive({searcher_key:-1,key:-1,name:-1}),k=e.computed({get(){return r.value.every(o=>o.selected)},set(o){r.value=r.value.map(l=>({...l,selected:o}))}}),g=o=>{u[o]=-u[o],r.value.sort((l,t)=>!l[o]||!t[o]?-1:l[o]>=t[o]?u[o]:-u[o])},w=()=>{var l;if(!r.value.some(t=>t.selected))return;const o=r.value.filter(t=>t.selected).map(t=>t.index);(l=s["@update:regionsIndexes"])==null||l.call(s,o),y.close()};e.watch([()=>s.regions,()=>s.regionsIndexes],()=>{if(r.value=[],!s.regions||!s.regionsIndexes)return;let o=[...s.regions];const l=new Map(s.regionsIndexes.map((t,a)=>[t,a]));o.sort((t,a)=>{const n=l.get(t.index)??Number.MAX_VALUE,c=l.get(a.index)??Number.MAX_VALUE;return n-c}),o.forEach(t=>{var x;let a=t.name;t.areaName&&(a+=` (${t.areaName})`);const n=((x=s.regionsIndexes)==null?void 0:x.includes(t.index))??!1,c=p.getSearcherGIcon(t.searcher_key),m=t.lang!==void 0?p.getLangLabel(t.searcher_key??999,t.lang):void 0,d=t.device!==void 0?p.getDeviceGIcon(t.device):void 0,T=t.countryCode!==void 0?C.genFlagLinkByCountryCode(t.countryCode):void 0,D={...t,selected:n,title:a,searcherIcon:c,langLabel:m,deviceIcon:d,flagLink:T};r.value.push(D)})});const E=()=>{var o;if(!((o=f.Core.$)!=null&&o.ui.sortable)){console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");return}i.value&&$(i.value).sortable({distance:10,stop:()=>{const l=[...i.value.children].map(t=>Number(t.getAttribute("data-region-index")));r.value.sort((t,a)=>l.indexOf(t.index)-l.indexOf(a.index))}})},A=()=>{var o;(o=f.Core.$)!=null&&o.ui.sortable&&i.value&&$(i.value).sortable("destroy")};return(o,l)=>{const t=e.resolveComponent("TopCheckbox"),a=e.resolveComponent("TopButton");return e.openBlock(),e.createBlock(e.unref(_._sfc_main),{id:e.unref(y).id,pageActive:"selectorRegions",class:"dialog_selectorRegions",height:"600px",width:"600px",onOpen:E,onClose:A},{default:e.withCtx(()=>[e.createVNode(e.unref(_._sfc_main$1),{name:"selectorRegions",order:0},{header:e.withCtx(()=>{var n,c,m;return[e.createElementVNode("div",V,[e.createVNode(t,{modelValue:k.value,"onUpdate:modelValue":l[0]||(l[0]=d=>k.value=d)},null,8,["modelValue"]),e.createVNode(a,{class:"dialog_selectorRegions_sortButton",color:"theme","data-top-icon":"",onClick:l[1]||(l[1]=d=>g("searcher_key")),title:(n=o.$i18n.Projects)==null?void 0:n.Sort_by_search_engine},null,8,["title"]),e.createVNode(a,{class:"dialog_selectorRegions_sortButton",color:"theme","data-top-icon":"",onClick:l[2]||(l[2]=d=>g("key")),title:(c=o.$i18n.Projects)==null?void 0:c.Sort_by_yande_region_code},null,8,["title"]),e.createVNode(a,{class:"dialog_selectorRegions_sortButton",color:"theme","data-top-icon":"",onClick:l[3]||(l[3]=d=>g("name")),title:(m=o.$i18n.Projects)==null?void 0:m.Sort_by_lphabetically},null,8,["title"])])]}),body:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"elRegions",ref:i},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,n=>(e.openBlock(),e.createBlock(t,{key:n.index,modelValue:n.selected,"onUpdate:modelValue":c=>n.selected=c,class:"dialog_selectorRegions_region","data-region-index":n.index},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog_selectorRegions_regionSearcherIcon","data-top-icon":n.searcherIcon},null,8,b),n.flagLink?(e.openBlock(),e.createElementBlock("img",{key:0,class:"top-flag",src:"//topvisor.dev"+n.flagLink,alt:n.countryCode},null,8,N)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.name)+" ",1),e.createElementVNode("div",B,e.toDisplayString(n.areaName),1),n.langLabel?(e.openBlock(),e.createElementBlock("div",I," ["+e.toDisplayString(n.langLabel)+"] ",1)):e.createCommentVNode("",!0),n.deviceIcon?(e.openBlock(),e.createElementBlock("div",{key:2,"data-top-icon":n.deviceIcon},null,8,R)):e.createCommentVNode("",!0)]),_:2},1032,["modelValue","onUpdate:modelValue","data-region-index"]))),128))],512)]),footer:e.withCtx(()=>[e.createVNode(a,{onClick:w},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=o.$i18n.Common)==null?void 0:n.Apply),1)]}),_:1})]),_:1})]),_:1},8,["id"])}}});v.default=S,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|
|
2
|
+
//# sourceMappingURL=dialog_selectorRegions-D9DQxYlD.amd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog_selectorRegions-D9DQxYlD.amd.js","sources":["../../src/components/project/selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, reactive, ref, watch } from 'vue';\nimport { TopDialog, TopDialogPage, useTopDialogSelf } from '@/components/dialog/dialog';\nimport { genFlagLinkByCountryCode } from '@/core/utils/string';\nimport type { Props, RegionRich } from './types';\nimport { getDeviceGIcon, getLangLabel, getSearcherGIcon } from '@/core/utils/searchers';\nimport Core from '@/core/core/core';\n\ndefineOptions({ id: 'selectorRegions' });\n\nconst props = defineProps<Partial<Props>>();\n\nconst dialog = useTopDialogSelf();\n\n/**\n * Список расширенных регионов для использования в компоненте\n */\nconst regionsRich = ref<RegionRich[]>([]);\n\n/**\n * Ссылка на элемент с регионами\n */\nconst elRegions = ref<null | HTMLElement>(null);\n\n/**\n * Направление сортировки по полю\n */\nconst sortedVectorByField = reactive({\n\tsearcher_key: -1,\n\tkey: -1,\n\tname: -1,\n});\n\n/**\n * Выбраны все регионы\n */\nconst isAllSelected = computed({\n\tget() {\n\t\treturn regionsRich.value.every(region => region.selected);\n\t},\n\n\tset(value) {\n\t\tregionsRich.value = regionsRich.value.map(region => ({ ...region, selected: value }));\n\t},\n});\n\n/**\n * Сортировать регионы по выбранному полю\n * @param sortedField - Поле для сортировки\n */\nconst sort = (sortedField: keyof typeof sortedVectorByField) => {\n\tsortedVectorByField[sortedField] = -sortedVectorByField[sortedField];\n\n\tregionsRich.value.sort((regionA, regionB) => {\n\t\tif (!regionA[sortedField] || !regionB[sortedField]) return -1;\n\n\t\treturn regionA[sortedField] >= regionB[sortedField] ? sortedVectorByField[sortedField] : -sortedVectorByField[sortedField];\n\t});\n};\n\n/**\n * Применить изменения\n *\n * Вызывает callback `props['@update:regionsIndexes']`\n */\nconst onSubmit = () => {\n\tif (!regionsRich.value.some(region => region.selected)) return;\n\n\tconst regionsIndexes = regionsRich.value\n\t\t.filter(region => region.selected)\n\t\t.map(region => region.index);\n\n\tprops['@update:regionsIndexes']?.(regionsIndexes);\n\n\tdialog.close();\n};\n\n// генерация регионов\nwatch([\n\t() => props.regions,\n\t() => props.regionsIndexes,\n], () => {\n\tregionsRich.value = [];\n\n\tif (!props.regions) return;\n\tif (!props.regionsIndexes) return;\n\n\tlet regions = [...props.regions];\n\n\t// отсортировать регионы по входным данным\n\tconst orderByRegionIndex = new Map(props.regionsIndexes.map((index, order) => [index, order]));\n\n\tregions.sort((regionA, regionB) => {\n\t\tconst orderA = orderByRegionIndex.get(regionA.index) ?? Number.MAX_VALUE;\n\t\tconst orderB = orderByRegionIndex.get(regionB.index) ?? Number.MAX_VALUE;\n\n\t\treturn orderA - orderB;\n\t});\n\n\tregions.forEach(region => {\n\t\tlet title = region.name;\n\t\tif (region.areaName) title += ` (${region.areaName})`;\n\n\t\tconst selected = props.regionsIndexes?.includes(region.index) ?? false;\n\t\tconst searcherIcon = getSearcherGIcon(region.searcher_key);\n\t\tconst langLabel = region.lang !== undefined ? getLangLabel(region.searcher_key ?? 999, region.lang) : undefined;\n\t\tconst deviceIcon = region.device !== undefined ? getDeviceGIcon(region.device) : undefined;\n\t\tconst flagLink = region.countryCode !== undefined ? genFlagLinkByCountryCode(region.countryCode) : undefined;\n\n\t\tconst regionRich = {\n\t\t\t...region,\n\t\t\tselected,\n\t\t\ttitle,\n\t\t\tsearcherIcon,\n\t\t\tlangLabel,\n\t\t\tdeviceIcon,\n\t\t\tflagLink,\n\t\t};\n\n\t\tregionsRich.value.push(regionRich);\n\t});\n});\n\n/**\n * Проверить на существование sortable\n */\nconst onOpen = () => {\n\tif (!Core.$?.ui['sortable']) {\n\t\tconsole.info('Для работы сортировки требуется глобальная загрузка jQuery UI Sortable');\n\n\t\treturn;\n\t}\n\n\tif (!elRegions.value) return;\n\n\t$(elRegions.value).sortable({\n\t\tdistance: 10,\n\n\t\tstop: () => {\n\t\t\t// Обновляем порядок регионов в массиве regionsRich после сортировки\n\t\t\tconst sortedIndexes = [...elRegions.value!.children].map(el => Number(el.getAttribute('data-region-index')));\n\t\t\tregionsRich.value.sort((a, b) => sortedIndexes.indexOf(a.index) - sortedIndexes.indexOf(b.index));\n\t\t},\n\t});\n};\n\n/**\n * Удаление sortable\n */\nconst onClose = () => {\n\tif (!Core.$?.ui['sortable']) return;\n\tif (!elRegions.value) return;\n\n\t$(elRegions.value).sortable('destroy');\n};\n\n</script>\n\n<template>\n\t<TopDialog\n\t\t:id=\"dialog.id\"\n\t\tpageActive=\"selectorRegions\"\n\t\tclass=\"dialog_selectorRegions\"\n\t\theight=\"600px\"\n\t\twidth=\"600px\"\n\t\t@open=\"onOpen\"\n\t\t@close=\"onClose\"\n\t>\n\t\t<TopDialogPage name=\"selectorRegions\" :order=\"0\">\n\t\t\t<template #header>\n\t\t\t\t<div class=\"dialog_selectorRegions_header\">\n\t\t\t\t\t<TopCheckbox v-model=\"isAllSelected\"></TopCheckbox>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tclass=\"dialog_selectorRegions_sortButton\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\t@click=\"sort('searcher_key')\"\n\t\t\t\t\t\t:title=\"$i18n.Projects?.Sort_by_search_engine\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tclass=\"dialog_selectorRegions_sortButton\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\t@click=\"sort('key')\"\n\t\t\t\t\t\t:title=\"$i18n.Projects?.Sort_by_yande_region_code\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tclass=\"dialog_selectorRegions_sortButton\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\t@click=\"sort('name')\"\n\t\t\t\t\t\t:title=\"$i18n.Projects?.Sort_by_lphabetically\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</template>\n\n\t\t\t<template #body>\n\t\t\t\t<div ref=\"elRegions\">\n\t\t\t\t\t<TopCheckbox\n\t\t\t\t\t\tv-for=\"region of regionsRich\"\n\t\t\t\t\t\t:key=\"region.index\"\n\t\t\t\t\t\tv-model=\"region.selected\"\n\t\t\t\t\t\tclass=\"dialog_selectorRegions_region\"\n\t\t\t\t\t\t:data-region-index=\"region.index\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"dialog_selectorRegions_regionSearcherIcon\"\n\t\t\t\t\t\t\t:data-top-icon=\"region.searcherIcon\"\n\t\t\t\t\t\t></div>\n\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tv-if=\"region.flagLink\"\n\t\t\t\t\t\t\tclass=\"top-flag\"\n\t\t\t\t\t\t\t:src=\"'//topvisor.dev' + region.flagLink\"\n\t\t\t\t\t\t\t:alt=\"region.countryCode\"\n\t\t\t\t\t\t>\n\n\t\t\t\t\t\t{{ region.name }}\n\n\t\t\t\t\t\t<div class=\"dialog_selectorRegions_regionAreaName top-ellipsis\">\n\t\t\t\t\t\t\t{{ region.areaName }}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div v-if=\"region.langLabel\">\n\t\t\t\t\t\t\t[{{ region.langLabel }}]\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tv-if=\"region.deviceIcon\"\n\t\t\t\t\t\t\t:data-top-icon=\"region.deviceIcon\"\n\t\t\t\t\t\t></div>\n\t\t\t\t\t</TopCheckbox>\n\t\t\t\t</div>\n\t\t\t</template>\n\n\t\t\t<template #footer>\n\t\t\t\t<TopButton @click=\"onSubmit\">\n\t\t\t\t\t{{ $i18n.Common?.Apply }}\n\t\t\t\t</TopButton>\n\t\t\t</template>\n\t\t</TopDialogPage>\n\t</TopDialog>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n"],"names":["dialog","utils","regionsRich","vue","elRegions","sortedVectorByField","isAllSelected","region","sort","sortedField","regionA","regionB","_a","props","regionsIndexes","orderA","orderByRegionIndex","orderB","regions","title","selected","deviceIcon","utils_searchers","flagLink","utils_string","searcherIcon","langLabel","regionRich","a","b","sortedIndexes"],"mappings":"wpBAYAA,EAAAC,EAAA,iBAAA,EAKAC,EAAAC,EAAA,IAAA,CAAA,CAAA,EAKAC,EAAAD,EAAA,IAAA,IAAA,EAKAE,EAAAF,EAAA,SAAA,wBAEM,KAAA,EACC,CAAA,EAMPG,EAAAH,EAAA,SAAA,CAA+B,KAAA,CAE7B,OAAAD,EAAA,MAAA,MAAAK,GAAAA,EAAA,QAAA,qDAIoF,CACrF,CAAA,EAODC,EAAAC,GAAA,gCAIE,CAAAC,EAAAD,CAAA,GAAA,CAAAE,EAAAF,CAAA,EAAA,wBAEyH,gBAU1H,GAAA,CAAAP,EAAA,MAAA,KAAAK,GAAAA,EAAA,QAAA,EAAA,8DAMAK,EAAAC,EAAA,4BAAA,MAAAD,EAAA,KAAAC,EAAAC,cAMDX,EAAA,MAAA,mCAEa,EAAA,IAAA,CAKZ,GAHAD,EAAA,MAAA,CAAA,EAEA,CAAAW,EAAA,SACA,CAAAA,EAAA,eAAA,+FAQC,MAAAE,EAAAC,EAAA,IAAAN,EAAA,KAAA,GAAA,OAAA,UACAO,EAAAD,EAAA,IAAAL,EAAA,KAAA,GAAA,OAAA,oBAEgB,CAAA,EAGjBO,EAAA,QAAAX,GAAA,OACC,IAAAY,EAAAZ,EAAA,KACAA,EAAA,WAAAY,GAAA,KAAAZ,EAAA,QAAA,KAEA,MAAAa,IAAAR,EAAAC,EAAA,iBAAA,YAAAD,EAAA,SAAAL,EAAA,SAAA,4GAGAc,EAAAd,EAAA,SAAA,OAAAe,EAAA,eAAAf,EAAA,MAAA,EAAA,OACAgB,EAAAhB,EAAA,cAAA,OAAAiB,EAAA,yBAAAjB,EAAA,WAAA,EAAA,UAEmB,GAAAA,EACf,SAAAa,EACH,MAAAD,EACA,aAAAM,EACA,UAAAC,EACA,WAAAL,cAKDnB,EAAA,MAAA,KAAAyB,CAAA,CAAiC,CAAA,CACjC,CAAA,8DAQA,QAAA,KAAA,wEAAA,QAEA,CAGDvB,EAAA,oIAQEF,EAAA,MAAA,KAAA,CAAA0B,EAAAC,IAAAC,EAAA,QAAAF,EAAA,KAAA,EAAAE,EAAA,QAAAD,EAAA,KAAA,CAAA,CAAgG,CACjG,CAAA,mDASDzB,EAAA"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { Core as j } from "../core/app.js";
|
|
2
|
+
import { defineComponent as P, ref as R, reactive as D, computed as M, watch as O, resolveComponent as S, createBlock as V, openBlock as d, unref as h, withCtx as u, createVNode as m, createTextVNode as L, toDisplayString as g, createElementVNode as v, createElementBlock as f, Fragment as G, renderList as X, createCommentVNode as k } from "vue";
|
|
3
|
+
import { _ as Q, a as q } from "./page.vue_vue_type_script_setup_true_lang-DqkGsz8-.es.js";
|
|
4
|
+
import { b as z } from "./utils-6pAQX17-.es.js";
|
|
5
|
+
import { genFlagLinkByCountryCode as H } from "../utils/string.js";
|
|
6
|
+
import { getSearcherGIcon as J, getLangLabel as K, getDeviceGIcon as W } from "../utils/searchers.js";
|
|
7
|
+
import { C as N } from "./forms-Dg0Huskq.es.js";
|
|
8
|
+
const w = ["../assets/dialog_selectorRegions.css"].map((y) => import.meta.resolve(y));
|
|
9
|
+
j.insertCSSLinkToPage(w, !0);
|
|
10
|
+
const Y = { class: "dialog_selectorRegions_header" }, Z = ["data-top-icon"], F = ["src", "alt"], ee = { class: "dialog_selectorRegions_regionAreaName top-ellipsis" }, oe = { key: 1 }, te = ["data-top-icon"], de = /* @__PURE__ */ P({
|
|
11
|
+
id: "selectorRegions",
|
|
12
|
+
__name: "dialog_selectorRegions",
|
|
13
|
+
props: {
|
|
14
|
+
regions: {},
|
|
15
|
+
regionsIndexes: {},
|
|
16
|
+
"@update:regionsIndexes": { type: Function }
|
|
17
|
+
},
|
|
18
|
+
setup(y) {
|
|
19
|
+
const a = y, C = z(), l = R([]), i = R(null), p = D({
|
|
20
|
+
searcher_key: -1,
|
|
21
|
+
key: -1,
|
|
22
|
+
name: -1
|
|
23
|
+
}), b = M({
|
|
24
|
+
get() {
|
|
25
|
+
return l.value.every((o) => o.selected);
|
|
26
|
+
},
|
|
27
|
+
set(o) {
|
|
28
|
+
l.value = l.value.map((n) => ({ ...n, selected: o }));
|
|
29
|
+
}
|
|
30
|
+
}), x = (o) => {
|
|
31
|
+
p[o] = -p[o], l.value.sort((n, e) => !n[o] || !e[o] ? -1 : n[o] >= e[o] ? p[o] : -p[o]);
|
|
32
|
+
}, B = () => {
|
|
33
|
+
var n;
|
|
34
|
+
if (!l.value.some((e) => e.selected)) return;
|
|
35
|
+
const o = l.value.filter((e) => e.selected).map((e) => e.index);
|
|
36
|
+
(n = a["@update:regionsIndexes"]) == null || n.call(a, o), C.close();
|
|
37
|
+
};
|
|
38
|
+
O([
|
|
39
|
+
() => a.regions,
|
|
40
|
+
() => a.regionsIndexes
|
|
41
|
+
], () => {
|
|
42
|
+
if (l.value = [], !a.regions || !a.regionsIndexes) return;
|
|
43
|
+
let o = [...a.regions];
|
|
44
|
+
const n = new Map(a.regionsIndexes.map((e, s) => [e, s]));
|
|
45
|
+
o.sort((e, s) => {
|
|
46
|
+
const t = n.get(e.index) ?? Number.MAX_VALUE, r = n.get(s.index) ?? Number.MAX_VALUE;
|
|
47
|
+
return t - r;
|
|
48
|
+
}), o.forEach((e) => {
|
|
49
|
+
var I;
|
|
50
|
+
let s = e.name;
|
|
51
|
+
e.areaName && (s += ` (${e.areaName})`);
|
|
52
|
+
const t = ((I = a.regionsIndexes) == null ? void 0 : I.includes(e.index)) ?? !1, r = J(e.searcher_key), _ = e.lang !== void 0 ? K(e.searcher_key ?? 999, e.lang) : void 0, c = e.device !== void 0 ? W(e.device) : void 0, U = e.countryCode !== void 0 ? H(e.countryCode) : void 0, E = {
|
|
53
|
+
...e,
|
|
54
|
+
selected: t,
|
|
55
|
+
title: s,
|
|
56
|
+
searcherIcon: r,
|
|
57
|
+
langLabel: _,
|
|
58
|
+
deviceIcon: c,
|
|
59
|
+
flagLink: U
|
|
60
|
+
};
|
|
61
|
+
l.value.push(E);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
const A = () => {
|
|
65
|
+
var o;
|
|
66
|
+
if (!((o = N.$) != null && o.ui.sortable)) {
|
|
67
|
+
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
i.value && $(i.value).sortable({
|
|
71
|
+
distance: 10,
|
|
72
|
+
stop: () => {
|
|
73
|
+
const n = [...i.value.children].map((e) => Number(e.getAttribute("data-region-index")));
|
|
74
|
+
l.value.sort((e, s) => n.indexOf(e.index) - n.indexOf(s.index));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}, T = () => {
|
|
78
|
+
var o;
|
|
79
|
+
(o = N.$) != null && o.ui.sortable && i.value && $(i.value).sortable("destroy");
|
|
80
|
+
};
|
|
81
|
+
return (o, n) => {
|
|
82
|
+
const e = S("TopCheckbox"), s = S("TopButton");
|
|
83
|
+
return d(), V(h(Q), {
|
|
84
|
+
id: h(C).id,
|
|
85
|
+
pageActive: "selectorRegions",
|
|
86
|
+
class: "dialog_selectorRegions",
|
|
87
|
+
height: "600px",
|
|
88
|
+
width: "600px",
|
|
89
|
+
onOpen: A,
|
|
90
|
+
onClose: T
|
|
91
|
+
}, {
|
|
92
|
+
default: u(() => [
|
|
93
|
+
m(h(q), {
|
|
94
|
+
name: "selectorRegions",
|
|
95
|
+
order: 0
|
|
96
|
+
}, {
|
|
97
|
+
header: u(() => {
|
|
98
|
+
var t, r, _;
|
|
99
|
+
return [
|
|
100
|
+
v("div", Y, [
|
|
101
|
+
m(e, {
|
|
102
|
+
modelValue: b.value,
|
|
103
|
+
"onUpdate:modelValue": n[0] || (n[0] = (c) => b.value = c)
|
|
104
|
+
}, null, 8, ["modelValue"]),
|
|
105
|
+
m(s, {
|
|
106
|
+
class: "dialog_selectorRegions_sortButton",
|
|
107
|
+
color: "theme",
|
|
108
|
+
"data-top-icon": "",
|
|
109
|
+
onClick: n[1] || (n[1] = (c) => x("searcher_key")),
|
|
110
|
+
title: (t = o.$i18n.Projects) == null ? void 0 : t.Sort_by_search_engine
|
|
111
|
+
}, null, 8, ["title"]),
|
|
112
|
+
m(s, {
|
|
113
|
+
class: "dialog_selectorRegions_sortButton",
|
|
114
|
+
color: "theme",
|
|
115
|
+
"data-top-icon": "",
|
|
116
|
+
onClick: n[2] || (n[2] = (c) => x("key")),
|
|
117
|
+
title: (r = o.$i18n.Projects) == null ? void 0 : r.Sort_by_yande_region_code
|
|
118
|
+
}, null, 8, ["title"]),
|
|
119
|
+
m(s, {
|
|
120
|
+
class: "dialog_selectorRegions_sortButton",
|
|
121
|
+
color: "theme",
|
|
122
|
+
"data-top-icon": "",
|
|
123
|
+
onClick: n[3] || (n[3] = (c) => x("name")),
|
|
124
|
+
title: (_ = o.$i18n.Projects) == null ? void 0 : _.Sort_by_lphabetically
|
|
125
|
+
}, null, 8, ["title"])
|
|
126
|
+
])
|
|
127
|
+
];
|
|
128
|
+
}),
|
|
129
|
+
body: u(() => [
|
|
130
|
+
v("div", {
|
|
131
|
+
ref_key: "elRegions",
|
|
132
|
+
ref: i
|
|
133
|
+
}, [
|
|
134
|
+
(d(!0), f(G, null, X(l.value, (t) => (d(), V(e, {
|
|
135
|
+
key: t.index,
|
|
136
|
+
modelValue: t.selected,
|
|
137
|
+
"onUpdate:modelValue": (r) => t.selected = r,
|
|
138
|
+
class: "dialog_selectorRegions_region",
|
|
139
|
+
"data-region-index": t.index
|
|
140
|
+
}, {
|
|
141
|
+
default: u(() => [
|
|
142
|
+
v("div", {
|
|
143
|
+
class: "dialog_selectorRegions_regionSearcherIcon",
|
|
144
|
+
"data-top-icon": t.searcherIcon
|
|
145
|
+
}, null, 8, Z),
|
|
146
|
+
t.flagLink ? (d(), f("img", {
|
|
147
|
+
key: 0,
|
|
148
|
+
class: "top-flag",
|
|
149
|
+
src: "//topvisor.dev" + t.flagLink,
|
|
150
|
+
alt: t.countryCode
|
|
151
|
+
}, null, 8, F)) : k("", !0),
|
|
152
|
+
L(" " + g(t.name) + " ", 1),
|
|
153
|
+
v("div", ee, g(t.areaName), 1),
|
|
154
|
+
t.langLabel ? (d(), f("div", oe, " [" + g(t.langLabel) + "] ", 1)) : k("", !0),
|
|
155
|
+
t.deviceIcon ? (d(), f("div", {
|
|
156
|
+
key: 2,
|
|
157
|
+
"data-top-icon": t.deviceIcon
|
|
158
|
+
}, null, 8, te)) : k("", !0)
|
|
159
|
+
]),
|
|
160
|
+
_: 2
|
|
161
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "data-region-index"]))), 128))
|
|
162
|
+
], 512)
|
|
163
|
+
]),
|
|
164
|
+
footer: u(() => [
|
|
165
|
+
m(s, { onClick: B }, {
|
|
166
|
+
default: u(() => {
|
|
167
|
+
var t;
|
|
168
|
+
return [
|
|
169
|
+
L(g((t = o.$i18n.Common) == null ? void 0 : t.Apply), 1)
|
|
170
|
+
];
|
|
171
|
+
}),
|
|
172
|
+
_: 1
|
|
173
|
+
})
|
|
174
|
+
]),
|
|
175
|
+
_: 1
|
|
176
|
+
})
|
|
177
|
+
]),
|
|
178
|
+
_: 1
|
|
179
|
+
}, 8, ["id"]);
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
export {
|
|
184
|
+
de as default
|
|
185
|
+
};
|
|
186
|
+
//# sourceMappingURL=dialog_selectorRegions-kjMlLJUX.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog_selectorRegions-kjMlLJUX.es.js","sources":["../../src/components/project/selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, reactive, ref, watch } from 'vue';\nimport { TopDialog, TopDialogPage, useTopDialogSelf } from '@/components/dialog/dialog';\nimport { genFlagLinkByCountryCode } from '@/core/utils/string';\nimport type { Props, RegionRich } from './types';\nimport { getDeviceGIcon, getLangLabel, getSearcherGIcon } from '@/core/utils/searchers';\nimport Core from '@/core/core/core';\n\ndefineOptions({ id: 'selectorRegions' });\n\nconst props = defineProps<Partial<Props>>();\n\nconst dialog = useTopDialogSelf();\n\n/**\n * Список расширенных регионов для использования в компоненте\n */\nconst regionsRich = ref<RegionRich[]>([]);\n\n/**\n * Ссылка на элемент с регионами\n */\nconst elRegions = ref<null | HTMLElement>(null);\n\n/**\n * Направление сортировки по полю\n */\nconst sortedVectorByField = reactive({\n\tsearcher_key: -1,\n\tkey: -1,\n\tname: -1,\n});\n\n/**\n * Выбраны все регионы\n */\nconst isAllSelected = computed({\n\tget() {\n\t\treturn regionsRich.value.every(region => region.selected);\n\t},\n\n\tset(value) {\n\t\tregionsRich.value = regionsRich.value.map(region => ({ ...region, selected: value }));\n\t},\n});\n\n/**\n * Сортировать регионы по выбранному полю\n * @param sortedField - Поле для сортировки\n */\nconst sort = (sortedField: keyof typeof sortedVectorByField) => {\n\tsortedVectorByField[sortedField] = -sortedVectorByField[sortedField];\n\n\tregionsRich.value.sort((regionA, regionB) => {\n\t\tif (!regionA[sortedField] || !regionB[sortedField]) return -1;\n\n\t\treturn regionA[sortedField] >= regionB[sortedField] ? sortedVectorByField[sortedField] : -sortedVectorByField[sortedField];\n\t});\n};\n\n/**\n * Применить изменения\n *\n * Вызывает callback `props['@update:regionsIndexes']`\n */\nconst onSubmit = () => {\n\tif (!regionsRich.value.some(region => region.selected)) return;\n\n\tconst regionsIndexes = regionsRich.value\n\t\t.filter(region => region.selected)\n\t\t.map(region => region.index);\n\n\tprops['@update:regionsIndexes']?.(regionsIndexes);\n\n\tdialog.close();\n};\n\n// генерация регионов\nwatch([\n\t() => props.regions,\n\t() => props.regionsIndexes,\n], () => {\n\tregionsRich.value = [];\n\n\tif (!props.regions) return;\n\tif (!props.regionsIndexes) return;\n\n\tlet regions = [...props.regions];\n\n\t// отсортировать регионы по входным данным\n\tconst orderByRegionIndex = new Map(props.regionsIndexes.map((index, order) => [index, order]));\n\n\tregions.sort((regionA, regionB) => {\n\t\tconst orderA = orderByRegionIndex.get(regionA.index) ?? Number.MAX_VALUE;\n\t\tconst orderB = orderByRegionIndex.get(regionB.index) ?? Number.MAX_VALUE;\n\n\t\treturn orderA - orderB;\n\t});\n\n\tregions.forEach(region => {\n\t\tlet title = region.name;\n\t\tif (region.areaName) title += ` (${region.areaName})`;\n\n\t\tconst selected = props.regionsIndexes?.includes(region.index) ?? false;\n\t\tconst searcherIcon = getSearcherGIcon(region.searcher_key);\n\t\tconst langLabel = region.lang !== undefined ? getLangLabel(region.searcher_key ?? 999, region.lang) : undefined;\n\t\tconst deviceIcon = region.device !== undefined ? getDeviceGIcon(region.device) : undefined;\n\t\tconst flagLink = region.countryCode !== undefined ? genFlagLinkByCountryCode(region.countryCode) : undefined;\n\n\t\tconst regionRich = {\n\t\t\t...region,\n\t\t\tselected,\n\t\t\ttitle,\n\t\t\tsearcherIcon,\n\t\t\tlangLabel,\n\t\t\tdeviceIcon,\n\t\t\tflagLink,\n\t\t};\n\n\t\tregionsRich.value.push(regionRich);\n\t});\n});\n\n/**\n * Проверить на существование sortable\n */\nconst onOpen = () => {\n\tif (!Core.$?.ui['sortable']) {\n\t\tconsole.info('Для работы сортировки требуется глобальная загрузка jQuery UI Sortable');\n\n\t\treturn;\n\t}\n\n\tif (!elRegions.value) return;\n\n\t$(elRegions.value).sortable({\n\t\tdistance: 10,\n\n\t\tstop: () => {\n\t\t\t// Обновляем порядок регионов в массиве regionsRich после сортировки\n\t\t\tconst sortedIndexes = [...elRegions.value!.children].map(el => Number(el.getAttribute('data-region-index')));\n\t\t\tregionsRich.value.sort((a, b) => sortedIndexes.indexOf(a.index) - sortedIndexes.indexOf(b.index));\n\t\t},\n\t});\n};\n\n/**\n * Удаление sortable\n */\nconst onClose = () => {\n\tif (!Core.$?.ui['sortable']) return;\n\tif (!elRegions.value) return;\n\n\t$(elRegions.value).sortable('destroy');\n};\n\n</script>\n\n<template>\n\t<TopDialog\n\t\t:id=\"dialog.id\"\n\t\tpageActive=\"selectorRegions\"\n\t\tclass=\"dialog_selectorRegions\"\n\t\theight=\"600px\"\n\t\twidth=\"600px\"\n\t\t@open=\"onOpen\"\n\t\t@close=\"onClose\"\n\t>\n\t\t<TopDialogPage name=\"selectorRegions\" :order=\"0\">\n\t\t\t<template #header>\n\t\t\t\t<div class=\"dialog_selectorRegions_header\">\n\t\t\t\t\t<TopCheckbox v-model=\"isAllSelected\"></TopCheckbox>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tclass=\"dialog_selectorRegions_sortButton\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\t@click=\"sort('searcher_key')\"\n\t\t\t\t\t\t:title=\"$i18n.Projects?.Sort_by_search_engine\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tclass=\"dialog_selectorRegions_sortButton\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\t@click=\"sort('key')\"\n\t\t\t\t\t\t:title=\"$i18n.Projects?.Sort_by_yande_region_code\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tclass=\"dialog_selectorRegions_sortButton\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\t@click=\"sort('name')\"\n\t\t\t\t\t\t:title=\"$i18n.Projects?.Sort_by_lphabetically\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</template>\n\n\t\t\t<template #body>\n\t\t\t\t<div ref=\"elRegions\">\n\t\t\t\t\t<TopCheckbox\n\t\t\t\t\t\tv-for=\"region of regionsRich\"\n\t\t\t\t\t\t:key=\"region.index\"\n\t\t\t\t\t\tv-model=\"region.selected\"\n\t\t\t\t\t\tclass=\"dialog_selectorRegions_region\"\n\t\t\t\t\t\t:data-region-index=\"region.index\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"dialog_selectorRegions_regionSearcherIcon\"\n\t\t\t\t\t\t\t:data-top-icon=\"region.searcherIcon\"\n\t\t\t\t\t\t></div>\n\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tv-if=\"region.flagLink\"\n\t\t\t\t\t\t\tclass=\"top-flag\"\n\t\t\t\t\t\t\t:src=\"'//topvisor.dev' + region.flagLink\"\n\t\t\t\t\t\t\t:alt=\"region.countryCode\"\n\t\t\t\t\t\t>\n\n\t\t\t\t\t\t{{ region.name }}\n\n\t\t\t\t\t\t<div class=\"dialog_selectorRegions_regionAreaName top-ellipsis\">\n\t\t\t\t\t\t\t{{ region.areaName }}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div v-if=\"region.langLabel\">\n\t\t\t\t\t\t\t[{{ region.langLabel }}]\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tv-if=\"region.deviceIcon\"\n\t\t\t\t\t\t\t:data-top-icon=\"region.deviceIcon\"\n\t\t\t\t\t\t></div>\n\t\t\t\t\t</TopCheckbox>\n\t\t\t\t</div>\n\t\t\t</template>\n\n\t\t\t<template #footer>\n\t\t\t\t<TopButton @click=\"onSubmit\">\n\t\t\t\t\t{{ $i18n.Common?.Apply }}\n\t\t\t\t</TopButton>\n\t\t\t</template>\n\t\t</TopDialogPage>\n\t</TopDialog>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n"],"names":["props","__props","dialog","useTopDialogSelf","regionsRich","ref","elRegions","sortedVectorByField","reactive","isAllSelected","computed","region","value","sort","sortedField","regionA","regionB","onSubmit","regionsIndexes","_a","watch","regions","orderByRegionIndex","index","order","orderA","orderB","title","selected","searcherIcon","getSearcherGIcon","langLabel","getLangLabel","deviceIcon","getDeviceGIcon","flagLink","genFlagLinkByCountryCode","regionRich","onOpen","Core","sortedIndexes","el","a","b","onClose"],"mappings":"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"}
|
package/assets/project.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.top-selectorCompetitors_opener.top-button{width:100%}.top-select-searcher_key[data-value="0"]:after,.top-select-searcher_key[data-value="20"]:after,.top-select-searcher_key[data-value="21"]:after{color:red}.top-select-searcher_key[data-value="1"]:after{color:var(--color-bg-primary-2)}.top-select-searcher_key[data-value="2"]:after{color:#005ff9}.top-select-searcher_key[data-value="3"]:after{color:#01509b}.top-select-searcher_key[data-value="4"]:after{color:red}.top-select-searcher_key[data-value="5"]:after{color:#008373}.top-select-searcher_key[data-value="6"]:after{color:#4800b5}.top-select-searcher_key[data-value="7"]:after{color:#c00}.top-select-searcher_key[data-value="8"]:after{color:#1badf8}.top-select-searcher_key[data-value="9"]:after{color:#00ceff}.top-selectorRegion{width:
|
|
1
|
+
.top-selectorCompetitors_opener.top-button{width:100%}.top-select-searcher_key[data-value="0"]:after,.top-select-searcher_key[data-value="20"]:after,.top-select-searcher_key[data-value="21"]:after{color:red}.top-select-searcher_key[data-value="1"]:after{color:var(--color-bg-primary-2)}.top-select-searcher_key[data-value="2"]:after{color:#005ff9}.top-select-searcher_key[data-value="3"]:after{color:#01509b}.top-select-searcher_key[data-value="4"]:after{color:red}.top-select-searcher_key[data-value="5"]:after{color:#008373}.top-select-searcher_key[data-value="6"]:after{color:#4800b5}.top-select-searcher_key[data-value="7"]:after{color:#c00}.top-select-searcher_key[data-value="8"]:after{color:#1badf8}.top-select-searcher_key[data-value="9"]:after{color:#00ceff}.top-selectorRegion{width:340px;display:inline-flex;vertical-align:middle}.top-selectorRegion>.top-select{flex-grow:1}.top-selectorRegion>.top-select:focus-within{z-index:4}.top-selectorRegion>.top-select>.top-select_select:hover,.top-selectorRegion>.top-select>.top-select_select.top-error{z-index:1}.top-selectorRegion>.top-select-searcher_key{width:140px;max-width:160px;margin-right:-1px}.top-selectorRegion>.top-select-region>select{border-top-left-radius:0;border-bottom-left-radius:0}.top-selectorRegion>.top-select-region{--top-icon-size: 20px;--top-icon-color: var(--color-text-primary-1);--top-icon2-size: 20px;--top-icon2-color: var(--color-text-primary-1)}.top-selectorRegion>.top-select-region[data-top-icon][data-top-icon2]{--top-icon2-size: 16px}.top-selectorRegion>.top-select-region[data-top-icon][data-top-icon2]:after{text-indent:-4px}.top-selectorRegion>[name=compare]{border-top-left-radius:0;border-bottom-left-radius:0;flex-grow:1}.top-selectorRegion>[name=compare]:after{content:"(" attr(data-count-compare-regions-indexes) ")";margin:0 0 0 6px}.top-selectorRegion:not(.top-selectorRegion-onlySearcher)>.top-select-searcher_key>select{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0}.top-selectorRegion:not(.top-selectorRegion-onlySearcher)>.top-select-searcher_key[data-value="-1"]>select{border-right:none}.top-selectorRegion-onlySearcher{width:140px}[data-tag_id]{display:inline-flex;gap:var(--top-gap-2);align-items:center}[data-tag_id=""]{border-color:#bdc3c7!important;color:#55555f!important}[data-tag_color_id="1"]{border-color:var(--color-tag-1)!important;color:#55555f!important}[data-tag_color_id="2"]{border-color:var(--color-tag-2)!important;color:var(--color-tag-2)!important}[data-tag_color_id="3"]{border-color:var(--color-tag-3)!important;color:var(--color-tag-3)!important}[data-tag_color_id="4"]{border-color:var(--color-tag-4)!important;color:var(--color-tag-4)!important}[data-tag_color_id="5"]{border-color:var(--color-tag-5)!important;color:var(--color-tag-5)!important}[data-tag_color_id="6"]{border-color:var(--color-tag-6)!important;color:var(--color-tag-6)!important}[data-tag_color_id="7"]{border-color:var(--color-tag-7)!important;color:var(--color-tag-7)!important}[data-tag_color_id="8"]{border-color:var(--color-tag-8)!important;color:var(--color-tag-8)!important}[data-tag_color_id="9"]{border-color:var(--color-tag-9)!important;color:var(--color-tag-9)!important}[data-tag_color_id="10"]{border-color:var(--color-tag-10)!important;color:var(--color-tag-10)!important}[data-tag_id=""].top-tagSelector-active{background:#bdc3c7!important}[data-tag_color_id="1"].top-tagSelector-active{background:var(--color-tag-1)!important}[data-tag_color_id="2"].top-tagSelector-active{background:var(--color-tag-2)!important}[data-tag_color_id="3"].top-tagSelector-active{background:var(--color-tag-3)!important}[data-tag_color_id="4"].top-tagSelector-active{background:var(--color-tag-4)!important}[data-tag_color_id="5"].top-tagSelector-active{background:var(--color-tag-5)!important}[data-tag_color_id="6"].top-tagSelector-active{background:var(--color-tag-6)!important}[data-tag_color_id="7"].top-tagSelector-active{background:var(--color-tag-7)!important}[data-tag_color_id="8"].top-tagSelector-active{background:var(--color-tag-8)!important}[data-tag_color_id="9"].top-tagSelector-active{background:var(--color-tag-9)!important}[data-tag_color_id="10"].top-tagSelector-active{background:var(--color-tag-10)!important}[data-tag_id=all]{border-color:var(--color-tag-all)!important;background:var(--color-tag-all)!important;color:var(--color-text-2);margin-left:4px}[data-tag_id=all]:before{content:"";border-radius:100%;background:var(--color-tag-all);border:2px solid var(--color-layout-front-1);min-width:calc(100% + 4px);height:calc(100% + 4px);margin-left:-10px;transition:.1s border-color}.top-tagSelector-filter [data-tag_id],.top-tagSelector_popup [data-tag_id]{--top-tag-selector-size: 10px;box-sizing:content-box;border-radius:100%;border:2px solid var(--color-layout-front-1);background:var(--color-layout-front-1);width:var(--top-tag-selector-size);height:var(--top-tag-selector-size);font-size:calc(var(--top-tag-selector-size) + 4px)}.top-body-press_ctrl .top-tagSelector_tagListItem-canExclude:hover [data-tag_id],[data-tag_id].top-tagSelector-excluded{position:relative}.top-body-press_ctrl .top-tagSelector_tagListItem-canExclude:hover [data-tag_id]:before,[data-tag_id].top-tagSelector-excluded:before{content:"";width:calc(var(--top-tag-selector-size) * 2);height:1px;background:inherit;transform:rotate(-45deg);filter:brightness(80%);display:block;position:absolute;top:calc(var(--top-tag-selector-size) / 2);left:calc(0px - var(--top-tag-selector-size) / 2)}.top-body-press_ctrl .top-tagSelector_tagListItem-canExclude:hover [data-tag_id]:not([data-tag_id=all]):not(.top-tagSelector-active):before{background:#aaa}[data-tag_id].top-tagSelector-excluded:after,[data-tag_id].top-tagSelector-excluded~.top-tagSelector_tagListItemName{text-decoration:line-through}.top-popup_listItem.top-tagSelector-active{background:var(--top-popup-background-color-active)!important}.top-popup_listItem:hover [data-tag_id=all]:before{border-color:var(--top-popup-background-color-hover)}.top-popup_listItem.top-tagSelector-active [data-tag_id=all]:before,.top-popup_listItem.top-active [data-tag_id=all]:before{border-color:var(--top-popup-background-color-active)}.top-tagSelector_tagListItem.top-popup_listItem{padding-top:var(--top-padding-2)!important;padding-bottom:var(--top-padding-2)!important;gap:10px}.top-tagSelector_tagListItemName{border-radius:var(--top-radius-1);width:120px;padding:4px 2px;margin:-4px -2px;text-overflow:ellipsis;overflow:hidden;flex-grow:1}.top-tagSelector_edit{--top-icon-size: 18px;--top-icon-color: var(--color-text-3);width:20px;flex-grow:0}.top-tagSelector_edit:before{line-height:0}.top-tagSelector_edit{opacity:0}.top-tagSelector_edit:hover{--top-icon-color: var(--color-text-primary)}.top-tagSelector_tagListItem:hover .top-tagSelector_edit,.top-tagSelector_tagListItem-inEdit .top-tagSelector_edit{cursor:pointer;opacity:1}.top-tagSelector_tagListItem-inEdit{background:var(--color-layout-front-3)!important;outline:1px dashed var(--color-line-2);outline-offset:-1px}.top-tagSelector_tagListItem-inEdit .top-tagSelector_tagListItemName{cursor:text;background:var(--color-layout-front-1)}.top-tagSelector_tagListItem-disabled{cursor:not-allowed!important;opacity:.85}.top-tagSelector_tagListItem-disabled:hover{background:inherit}.top-tagSelector_tagListItem-disabled [data-tag_id]{opacity:.6}.top-tagSelector{cursor:pointer;min-width:0;white-space:nowrap;justify-content:left}.top-tagSelector.top-button{width:112px;vertical-align:middle}.top-tagSelector.top-button.top-select_arrow{width:132px}.top-tagSelector-filter{gap:var(--top-gap-1)}.top-tagSelector-filter [data-tag_id=all]{margin-left:0}.top-tagSelector-filter [data-tag_id=all]:before{border:none;margin-left:3px;opacity:.5}.top-tagSelector-filter.top-tagSelector-selectedOne [data-tag_id]:after{content:attr(title);margin-left:20px;min-width:74px;text-align:left;line-height:1.2;text-overflow:ellipsis;overflow:hidden}.top-tagSelector-filter.top-tagSelector-selectedOne [data-tag_id=all]:after{margin-left:0}.top-button.top-tagSelector-filter.top-tagSelector-toTwoLine{flex-wrap:wrap;align-content:center}.top-button.top-tagSelector-filter.top-tagSelector-toTwoLine [data-tag_id]{--top-tag-selector-size: 8px}.top-button.top-tagSelector-filter.top-tagSelector-toTwoLine [data-tag_id]:nth-child(5){margin-right:5px}.top-tagSelector-setter_single{position:relative;display:flex!important;flex-direction:column;flex-wrap:wrap;align-items:stretch!important}.top-tagSelector-setter_single [data-tag_id]{width:auto;min-height:20%;min-width:50%;flex:1 1 auto}.top-tagSelector_popup .top-popup{-webkit-user-select:none;user-select:none;min-width:220px!important;text-align:left}.top-tagSelector_popup .top-popup_header .top-select{flex-grow:1}
|