@topvisor/ui 1.0.8 → 1.0.9
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/datepicker-Cs3C14z5.amd.js +248 -0
- package/.chunks/datepicker-Cs3C14z5.amd.js.map +1 -0
- package/.chunks/datepicker-LNkS97nF.es.js +290 -0
- package/.chunks/datepicker-LNkS97nF.es.js.map +1 -0
- package/.chunks/forms-BydHEF-k.es.js +1928 -0
- package/.chunks/forms-BydHEF-k.es.js.map +1 -0
- package/.chunks/forms-Cq5zFLsO.amd.js +3 -0
- package/.chunks/forms-Cq5zFLsO.amd.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-B0xTxYZR.amd.js +2 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-B0xTxYZR.amd.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-DinMn3Ud.es.js +174 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-DinMn3Ud.es.js.map +1 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-BT-PgdJ5.amd.js +2 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-BT-PgdJ5.amd.js.map +1 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-C585WUlJ.es.js +109 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-C585WUlJ.es.js.map +1 -0
- package/.chunks/{popup-D-G2sXks.es.js → popup-B7AaTfNZ.es.js} +494 -493
- package/.chunks/popup-B7AaTfNZ.es.js.map +1 -0
- package/.chunks/popup-D22VHVHf.amd.js +448 -0
- package/.chunks/popup-D22VHVHf.amd.js.map +1 -0
- package/.chunks/store-CX_6ZXhO.es.js.map +1 -1
- package/.chunks/store-esTid5oI.amd.js.map +1 -1
- package/README.md +86 -86
- package/assets/charts.css +1 -0
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/project.css +1 -1
- package/assets/tabsView.css +1 -1
- package/assets/themes/dark.css +1 -1
- package/assets/themes/light.css +1 -1
- package/charts/charts.amd.js +2 -0
- package/charts/charts.amd.js.map +1 -0
- package/charts/charts.d.ts +2 -0
- package/charts/charts.js +120 -0
- package/charts/charts.js.map +1 -0
- package/components/charts/charts.d.ts +3 -0
- package/components/charts/miniChart/miniChart.d.ts +80 -0
- package/components/charts/miniChart/miniChart.vue.d.ts +15 -0
- package/components/charts/miniChart/stories/dummy.d.ts +13 -0
- package/components/charts/miniChart/utils/consts.d.ts +8 -0
- package/components/formsExt/selector2/selector2.vue.d.ts +16 -20
- package/components/popup/alert/alert.vue.d.ts +8 -7
- package/components/popup/confirm/confirm.d.ts +1 -1
- package/components/popup/confirm/confirm.vue.d.ts +8 -7
- package/components/popup/lib/popup.d.ts +1 -1
- package/components/popup/popup/popup.d.ts +8 -4
- package/components/popup/popup/popup.vue.d.ts +8 -8
- package/components/popup/prompt/prompt.d.ts +1 -1
- package/components/popup/prompt/prompt.vue.d.ts +8 -7
- package/components/project/project.d.ts +9 -0
- package/components/project/tagSelector/popupListItem/tagPopupListItem.vue.d.ts +18 -0
- package/components/project/tagSelector/popupListItem/types.d.ts +33 -0
- package/components/project/tagSelector/popupOpener/popupOpener.vue.d.ts +26 -0
- package/components/project/tagSelector/popupOpener/types.d.ts +62 -0
- package/components/project/tagSelector/tagIcon/tagIcon.vue.d.ts +4 -0
- package/components/project/tagSelector/tagIcon/types.d.ts +21 -0
- package/components/project/tagSelector/tagSelector.vue.d.ts +37 -0
- package/components/project/tagSelector/tagsDefaults.d.ts +3 -0
- package/components/project/tagSelector/types.d.ts +138 -0
- package/components/project/tagSelector/utils/el.d.ts +19 -0
- package/components/project/tagSelector/utils/utils.d.ts +14 -0
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +52 -45
- package/core/app.js.map +1 -1
- package/core/core/core.d.ts +4 -0
- package/core/directives/data.d.ts +10 -0
- package/core/utils/route.d.ts +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +5 -5
- package/forms/helpers.amd.js.map +1 -1
- package/forms/helpers.js.map +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +121 -166
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/Read Me.txt +7 -7
- package/icomoon/Topvisor icons.json +5845 -5845
- package/icomoon/demo-files/demo.css +161 -161
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +3379 -3379
- package/icomoon/fonts/Topvisor-2.svg +263 -263
- package/icomoon/style.css +740 -740
- package/package.json +37 -37
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +103 -108
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +2 -2
- package/popup/worker.js.map +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +814 -262
- package/project/project.js.map +1 -1
- package/require/css.amd.js +12 -12
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.amd.js.map +1 -1
- package/tabs/tabs.js +41 -59
- package/tabs/tabs.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +144 -183
- package/tabsView/tabsView.js.map +1 -1
- package/utils/check.amd.js +1 -1
- package/utils/check.amd.js.map +1 -1
- package/utils/check.js +1 -1
- package/utils/check.js.map +1 -1
- package/utils/clipboard.amd.js.map +1 -1
- package/utils/clipboard.js.map +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/utils/image.amd.js.map +1 -1
- package/utils/image.js.map +1 -1
- package/utils/keyboard.amd.js.map +1 -1
- package/utils/keyboard.js.map +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +5 -5
- package/utils/number.amd.js.map +1 -1
- package/utils/number.js.map +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/price.js.map +1 -1
- package/utils/route.amd.js +1 -1
- package/utils/route.amd.js.map +1 -1
- package/utils/route.js +15 -15
- package/utils/route.js.map +1 -1
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.js.map +1 -1
- package/utils/searchers.amd.js.map +1 -1
- package/utils/searchers.js.map +1 -1
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +1 -1
- package/utils/string.js.map +1 -1
- package/utils/system.amd.js.map +1 -1
- package/utils/system.js.map +1 -1
- package/utils/url.amd.js.map +1 -1
- package/utils/url.js.map +1 -1
- package/web-types.json +89 -72
- package/.chunks/datepicker-CRfiJCmp.amd.js +0 -248
- package/.chunks/datepicker-CRfiJCmp.amd.js.map +0 -1
- package/.chunks/datepicker-CugKFVIH.es.js +0 -290
- package/.chunks/datepicker-CugKFVIH.es.js.map +0 -1
- package/.chunks/forms-CHiMZ8vg.es.js +0 -2015
- package/.chunks/forms-CHiMZ8vg.es.js.map +0 -1
- package/.chunks/forms-CjYoXTEQ.amd.js +0 -3
- package/.chunks/forms-CjYoXTEQ.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Bb7B8CTJ.es.js +0 -174
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Bb7B8CTJ.es.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CEF3WDJ_.amd.js +0 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CEF3WDJ_.amd.js.map +0 -1
- package/.chunks/menu-CHeV29rC.es.js +0 -118
- package/.chunks/menu-CHeV29rC.es.js.map +0 -1
- package/.chunks/menu-D1lnYuWU.amd.js +0 -2
- package/.chunks/menu-D1lnYuWU.amd.js.map +0 -1
- package/.chunks/popup-C4Tne4qA.amd.js +0 -447
- package/.chunks/popup-C4Tne4qA.amd.js.map +0 -1
- package/.chunks/popup-D-G2sXks.es.js.map +0 -1
- package/.chunks/utils-BOlUthaH.es.js +0 -91
- package/.chunks/utils-BOlUthaH.es.js.map +0 -1
- package/.chunks/utils-x88W55mf.amd.js +0 -2
- package/.chunks/utils-x88W55mf.amd.js.map +0 -1
- package/components/project/utils.d.ts +0 -1
- package/core/core.amd.js +0 -2
- package/core/core.amd.js.map +0 -1
- package/core/core.d.ts +0 -4
- package/core/core.js +0 -6
- package/core/core.js.map +0 -1
- package/project/utils.amd.js +0 -2
- package/project/utils.amd.js.map +0 -1
- package/project/utils.d.ts +0 -2
- package/project/utils.js +0 -6
- package/project/utils.js.map +0 -1
- package/test/themes/themes/dark-positions.amd.js +0 -2
- package/test/themes/themes/dark-positions.amd.js.map +0 -1
- package/test/themes/themes/dark-positions.d.ts +0 -1
- package/test/themes/themes/dark-positions.js +0 -2
- package/test/themes/themes/dark-positions.js.map +0 -1
- package/test/themes/themes/dark.amd.js +0 -2
- package/test/themes/themes/dark.amd.js.map +0 -1
- package/test/themes/themes/dark.d.ts +0 -1
- package/test/themes/themes/dark.js +0 -4
- package/test/themes/themes/dark.js.map +0 -1
- package/test/themes/themes/light-positions.amd.js +0 -2
- package/test/themes/themes/light-positions.amd.js.map +0 -1
- package/test/themes/themes/light-positions.d.ts +0 -1
- package/test/themes/themes/light-positions.js +0 -2
- package/test/themes/themes/light-positions.js.map +0 -1
- package/test/themes/themes/light.amd.js +0 -2
- package/test/themes/themes/light.amd.js.map +0 -1
- package/test/themes/themes/light.d.ts +0 -1
- package/test/themes/themes/light.js +0 -4
- package/test/themes/themes/light.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(["require","exports","vue","../.chunks/forms-Cq5zFLsO.amd","../utils/number.amd","../require/css.amd!../assets/charts.css"],function(H,l,e,s,c){"use strict";if(typeof e>"u")var e=window.Vue;const h=90,d=10,C=["data-top-icon"],v={class:"top-miniChart_chart"},_=["onMouseenter"],y={class:"top-miniChart_data"},f={class:"top-miniChart_dataValue"},g=["innerHTML"],M=e.defineComponent({__name:"miniChart",props:e.mergeModels({title:{},gIcon:{},color:{default:"blue"},dates:{},values:{},activeDates:{},keysForDyn:{},isInvert:{type:Boolean},numberCols:{default:h},additionalHTML:{},modelValue:{},valueSuffix:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(u){const o=u,m=e.useModel(u,"modelValue"),k=t=>{let n=B.value;o.isInvert&&(t-=1,n-=1);let a=n>0?Math.round(t/n*(100-d)):0;return o.isInvert?100-a:a+d},E=t=>o.activeDates.includes(t),B=e.computed(()=>Math.max(...o.values)),b=e.computed(()=>o.dates.slice().reverse()),N=e.computed(()=>o.dates.length?o.numberCols-o.dates.length:0),p=()=>{m.value=null},G=(t,n,a)=>{m.value={elCol:t.target,date:s.dateFormat(n),value:a===null?"--":a+(o.valueSuffix??"")}},i=e.computed(()=>{const t=o.values[o.keysForDyn.start],a=o.values[o.keysForDyn.end]-t;return(a<0?-1:1)*c.percentOfNumber(Math.abs(a))}),S=e.computed(()=>{let t="stay";return o.isInvert?(i.value>0&&(t="down"),i.value<0&&(t="up")):(i.value>0&&(t="up"),i.value<0&&(t="down")),t});return(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-miniChart":!0,[`top-color_${t.color}`]:!0})},[e.createElementVNode("div",{class:"top-miniChart_title","data-top-icon":t.gIcon},e.toDisplayString(t.title),9,C),e.createElementVNode("div",v,[e.createElementVNode("div",{class:"top-miniChart_chartGrid",onMouseleave:n[1]||(n[1]=a=>p())},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:e.normalizeClass({"top-miniChart_chartGridCol":!0,"top-active":E(a)}),onMouseenter:T=>G(T,a,t.values[t.values.length-r-1])},[e.createElementVNode("div",{style:e.normalizeStyle("height:"+k(t.values[t.values.length-r-1])+"%")},null,4)],42,_))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,()=>(e.openBlock(),e.createElementBlock("div",{class:"top-miniChart_chartGridCol top-miniChart_chartGridCol-none",onMouseenter:n[0]||(n[0]=a=>p())},n[2]||(n[2]=[e.createElementVNode("div",null,null,-1)]),32))),256))],32)]),e.createElementVNode("div",y,[e.createElementVNode("span",{class:e.normalizeClass({"top-miniChart_dataDynamic":!0,[`top-miniChart_dataDynamic-direction_${S.value}`]:!0})},e.toDisplayString(Math.abs(i.value)||""),3),e.createElementVNode("span",f,e.toDisplayString(e.unref(c.percentOfNumber)(t.values[t.values.length-1])||0),1)]),t.additionalHTML?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.additionalHTML},null,8,g)):e.createCommentVNode("",!0)],2))}}),D={$style:{"top-miniChart":"top-miniChart","top-miniChart_title":"top-miniChart_title","top-color_orange":"top-color_orange","top-color_pink":"top-color_pink","top-color_blue":"top-color_blue","top-miniChart_data":"top-miniChart_data","top-miniChart_dataDynamic":"top-miniChart_dataDynamic","top-miniChart_dataDynamic-direction_up":"top-miniChart_dataDynamic-direction_up","top-miniChart_dataDynamic-direction_stay":"top-miniChart_dataDynamic-direction_stay","top-miniChart_dataDynamic-direction_down":"top-miniChart_dataDynamic-direction_down","top-miniChart_chartGrid":"top-miniChart_chartGrid","top-miniChart_chartGridCol":"top-miniChart_chartGridCol","top-active":"top-active","top-miniChart_chartGridCol-none":"top-miniChart_chartGridCol-none","top-miniChart_chart":"top-miniChart_chart"}},V=s._export_sfc(M,[["__cssModules",D]]);l.TopMiniChart=V,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|
|
2
|
+
//# sourceMappingURL=charts.amd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charts.amd.js","sources":["../../src/components/charts/miniChart/miniChart.vue","../../src/components/charts/charts.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Props } from './miniChart';\nimport { computed } from 'vue';\nimport { dateFormat } from '@/core/utils/date';\nimport { percentOfNumber } from '@/core/utils/number';\nimport { defaultNumberCols, minHeight } from './utils/consts';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tcolor: 'blue',\n\tnumberCols: defaultNumberCols,\n});\nconst model = defineModel<Props['modelValue']>();\n\n/**\n * Расчет высоты колонки (в процентах)\n */\nconst genColHeight = (value: number): number => {\n\tlet maximumValue = maxValue.value;\n\n\t// для графиков средней и медианной делаем максимум 1\n\tif (props.isInvert) {\n\t\tvalue -= 1;\n\t\tmaximumValue -= 1;\n\t}\n\n\tlet height = maximumValue > 0 ? Math.round((value / maximumValue) * (100 - minHeight)) : 0;\n\tif (props.isInvert) return 100 - height;\n\n\treturn height + minHeight;\n};\n\nconst isActiveDate = (date: string) => props.activeDates.includes(date);\n\nconst maxValue = computed(() => Math.max(...props.values));\n\n/**\n * Из-за стиля .top-miniChart_chartGrid - direction: rtl\n */\nconst reversedDates = computed(() => props.dates.slice().reverse());\n\n/**\n * Кол-во пустых колонок\n */\nconst numOfEmptyCols = computed(() => {\n\tif (!props.dates.length) return 0;\n\n\treturn props.numberCols - props.dates.length;\n});\n\nconst resetModel = () => {\n\tmodel.value = null;\n};\n\nconst setModel = (e: Event, date: string, value: number | null) => {\n\tmodel.value = {\n\t\telCol: e.target,\n\t\tdate: dateFormat(date),\n\t\tvalue: value === null ? '--' : value + (props.valueSuffix ?? ''),\n\t};\n};\n\n/**\n * Возвращает численный показатель динамики графика\n */\nconst dynamic = computed(() => {\n\tconst prevPeriodValue = props.values[props.keysForDyn.start];\n\tconst currentValue = props.values[props.keysForDyn.end];\n\tconst dynValue = currentValue - prevPeriodValue;\n\tconst sign = dynValue < 0 ? -1 : 1;\n\n\treturn sign * (percentOfNumber(Math.abs(dynValue)) as number);\n});\n\nconst dynamicDirection = computed(() => {\n\tlet direction: 'up' | 'stay' | 'down' = 'stay';\n\n\tif (!props.isInvert) {\n\t\tif (dynamic.value > 0) direction = 'up';\n\t\tif (dynamic.value < 0) direction = 'down';\n\t} else {\n\t\tif (dynamic.value > 0) direction = 'down';\n\t\tif (dynamic.value < 0) direction = 'up';\n\t}\n\n\treturn direction;\n});\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t['top-miniChart']: true,\n\t\t\t[`top-color_${color}`]: true,\n\t\t}\"\n\t>\n\t\t<div\n\t\t\tclass=\"top-miniChart_title\"\n\t\t\t:data-top-icon=\"gIcon\"\n\t\t>\n\t\t\t{{ title }}\n\t\t</div>\n\n\t\t<div class=\"top-miniChart_chart\">\n\t\t\t<div\n\t\t\t\tclass=\"top-miniChart_chartGrid\"\n\t\t\t\t@mouseleave=\"resetModel()\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tv-for=\"(date, i) in reversedDates\"\n\t\t\t\t\t:key=\"i\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t['top-miniChart_chartGridCol']: true,\n\t\t\t\t\t\t['top-active']: isActiveDate(date)\n\t\t\t\t\t}\"\n\t\t\t\t\t@mouseenter=\"setModel($event, date, values[values.length - i - 1])\"\n\t\t\t\t>\n\t\t\t\t\t<div :style=\"'height:' + genColHeight(values[values.length - i - 1]) + '%'\"/>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tv-for=\"() in numOfEmptyCols\"\n\t\t\t\t\tclass=\"top-miniChart_chartGridCol top-miniChart_chartGridCol-none\"\n\t\t\t\t\t@mouseenter=\"resetModel()\"\n\t\t\t\t>\n\t\t\t\t\t<div></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"top-miniChart_data\">\n\t\t\t<span :class=\"{\n\t\t\t\t['top-miniChart_dataDynamic']: true,\n\t\t\t\t[`top-miniChart_dataDynamic-direction_${dynamicDirection}`]: true,\n\t\t\t}\">\n\t\t\t\t{{ Math.abs(dynamic) || '' }}\n\t\t\t</span>\n\t\t\t<span class=\"top-miniChart_dataValue\">\n\t\t\t\t{{ percentOfNumber(values[values.length - 1]) || 0 }}\n\t\t\t</span>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"additionalHTML\"\n\t\t\tv-html=\"additionalHTML\"\n\t\t/>\n\t</div>\n\n</template>\n<style module src=\"./styles/miniChart.css\"></style>\n","import type { ComponentCustomProps } from 'vue';\n\nimport MiniChart from './miniChart/miniChart.vue';\n\nexport const TopMiniChart = MiniChart as typeof MiniChart & ComponentCustomProps"],"names":["props","__props","genColHeight","value","maximumValue","maxValue","height","minHeight","isActiveDate","date","vue","reversedDates","numOfEmptyCols","model","e","forms","dynamic","prevPeriodValue","dynValue","utils_number","dynamicDirection","direction","TopMiniChart"],"mappings":"4qBAOA,MAAAA,EAAAC,+BASAC,EAAAC,GAAA,CACC,IAAAC,EAAAC,EAAA,MAGAL,EAAA,kFAQAM,EAAAC,CAAgB,EAGjBC,EAAAC,GAAAT,EAAA,YAAA,SAAAS,CAAA,EAEAJ,EAAAK,EAAA,SAAA,IAAA,KAAA,IAAA,GAAAV,EAAA,MAAA,CAAA,EAKAW,EAAAD,EAAA,SAAA,IAAAV,EAAA,MAAA,MAAA,EAAA,QAAA,CAAA,EAKAY,EAAAF,EAAA,SAAA,gDAGuC,SAItCG,EAAA,MAAA,IAAc,uBAIA,MAAAC,EAAA,OACJ,KAAAC,EAAA,WAAAN,CAAA,EACY,MAAAN,IAAA,KAAA,KAAAA,GAAAH,EAAA,aAAA,GACwC,CAC9D,EAMDgB,EAAAN,EAAA,SAAA,IAAA,CACC,MAAAO,EAAAjB,EAAA,OAAAA,EAAA,WAAA,KAAA,EAEAkB,EADAlB,EAAA,OAAAA,EAAA,WAAA,GAAA,EACAiB,EAGA,iBAAAE,EAAA,gBAAA,KAAA,IAAAD,CAAA,CAAA,CAAiD,CAAA,EAGlDE,EAAAV,EAAA,SAAA,IAAA,CACC,IAAAW,EAAA,OAEA,OAAArB,EAAA,kGAQO,CAAA,8wEChFDsB"}
|
package/charts/charts.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Core as S } from "../core/app.js";
|
|
2
|
+
import { defineComponent as L, mergeModels as T, useModel as I, computed as l, openBlock as n, createElementBlock as r, normalizeClass as m, createElementVNode as i, toDisplayString as c, Fragment as C, renderList as v, normalizeStyle as F, unref as N, createCommentVNode as $ } from "vue";
|
|
3
|
+
import { d as w, b as B } from "../.chunks/forms-BydHEF-k.es.js";
|
|
4
|
+
import { percentOfNumber as _ } from "../utils/number.js";
|
|
5
|
+
const H = ["../assets/charts.css"].map((d) => import.meta.resolve(d));
|
|
6
|
+
S.insertCSSLinkToPage(H, !0);
|
|
7
|
+
const E = 90, y = 10, z = ["data-top-icon"], O = { class: "top-miniChart_chart" }, P = ["onMouseenter"], A = { class: "top-miniChart_data" }, j = { class: "top-miniChart_dataValue" }, q = ["innerHTML"], J = /* @__PURE__ */ L({
|
|
8
|
+
__name: "miniChart",
|
|
9
|
+
props: /* @__PURE__ */ T({
|
|
10
|
+
title: {},
|
|
11
|
+
gIcon: {},
|
|
12
|
+
color: { default: "blue" },
|
|
13
|
+
dates: {},
|
|
14
|
+
values: {},
|
|
15
|
+
activeDates: {},
|
|
16
|
+
keysForDyn: {},
|
|
17
|
+
isInvert: { type: Boolean },
|
|
18
|
+
numberCols: { default: E },
|
|
19
|
+
additionalHTML: {},
|
|
20
|
+
modelValue: {},
|
|
21
|
+
valueSuffix: {}
|
|
22
|
+
}, {
|
|
23
|
+
modelValue: {},
|
|
24
|
+
modelModifiers: {}
|
|
25
|
+
}),
|
|
26
|
+
emits: ["update:modelValue"],
|
|
27
|
+
setup(d) {
|
|
28
|
+
const e = d, p = I(d, "modelValue"), f = (t) => {
|
|
29
|
+
let a = g.value;
|
|
30
|
+
e.isInvert && (t -= 1, a -= 1);
|
|
31
|
+
let o = a > 0 ? Math.round(t / a * (100 - y)) : 0;
|
|
32
|
+
return e.isInvert ? 100 - o : o + y;
|
|
33
|
+
}, M = (t) => e.activeDates.includes(t), g = l(() => Math.max(...e.values)), D = l(() => e.dates.slice().reverse()), V = l(() => e.dates.length ? e.numberCols - e.dates.length : 0), h = () => {
|
|
34
|
+
p.value = null;
|
|
35
|
+
}, b = (t, a, o) => {
|
|
36
|
+
p.value = {
|
|
37
|
+
elCol: t.target,
|
|
38
|
+
date: w(a),
|
|
39
|
+
value: o === null ? "--" : o + (e.valueSuffix ?? "")
|
|
40
|
+
};
|
|
41
|
+
}, s = l(() => {
|
|
42
|
+
const t = e.values[e.keysForDyn.start], o = e.values[e.keysForDyn.end] - t;
|
|
43
|
+
return (o < 0 ? -1 : 1) * _(Math.abs(o));
|
|
44
|
+
}), k = l(() => {
|
|
45
|
+
let t = "stay";
|
|
46
|
+
return e.isInvert ? (s.value > 0 && (t = "down"), s.value < 0 && (t = "up")) : (s.value > 0 && (t = "up"), s.value < 0 && (t = "down")), t;
|
|
47
|
+
});
|
|
48
|
+
return (t, a) => (n(), r("div", {
|
|
49
|
+
class: m({
|
|
50
|
+
"top-miniChart": !0,
|
|
51
|
+
[`top-color_${t.color}`]: !0
|
|
52
|
+
})
|
|
53
|
+
}, [
|
|
54
|
+
i("div", {
|
|
55
|
+
class: "top-miniChart_title",
|
|
56
|
+
"data-top-icon": t.gIcon
|
|
57
|
+
}, c(t.title), 9, z),
|
|
58
|
+
i("div", O, [
|
|
59
|
+
i("div", {
|
|
60
|
+
class: "top-miniChart_chartGrid",
|
|
61
|
+
onMouseleave: a[1] || (a[1] = (o) => h())
|
|
62
|
+
}, [
|
|
63
|
+
(n(!0), r(C, null, v(D.value, (o, u) => (n(), r("div", {
|
|
64
|
+
key: u,
|
|
65
|
+
class: m({
|
|
66
|
+
"top-miniChart_chartGridCol": !0,
|
|
67
|
+
"top-active": M(o)
|
|
68
|
+
}),
|
|
69
|
+
onMouseenter: (G) => b(G, o, t.values[t.values.length - u - 1])
|
|
70
|
+
}, [
|
|
71
|
+
i("div", {
|
|
72
|
+
style: F("height:" + f(t.values[t.values.length - u - 1]) + "%")
|
|
73
|
+
}, null, 4)
|
|
74
|
+
], 42, P))), 128)),
|
|
75
|
+
(n(!0), r(C, null, v(V.value, () => (n(), r("div", {
|
|
76
|
+
class: "top-miniChart_chartGridCol top-miniChart_chartGridCol-none",
|
|
77
|
+
onMouseenter: a[0] || (a[0] = (o) => h())
|
|
78
|
+
}, a[2] || (a[2] = [
|
|
79
|
+
i("div", null, null, -1)
|
|
80
|
+
]), 32))), 256))
|
|
81
|
+
], 32)
|
|
82
|
+
]),
|
|
83
|
+
i("div", A, [
|
|
84
|
+
i("span", {
|
|
85
|
+
class: m({
|
|
86
|
+
"top-miniChart_dataDynamic": !0,
|
|
87
|
+
[`top-miniChart_dataDynamic-direction_${k.value}`]: !0
|
|
88
|
+
})
|
|
89
|
+
}, c(Math.abs(s.value) || ""), 3),
|
|
90
|
+
i("span", j, c(N(_)(t.values[t.values.length - 1]) || 0), 1)
|
|
91
|
+
]),
|
|
92
|
+
t.additionalHTML ? (n(), r("div", {
|
|
93
|
+
key: 0,
|
|
94
|
+
innerHTML: t.additionalHTML
|
|
95
|
+
}, null, 8, q)) : $("", !0)
|
|
96
|
+
], 2));
|
|
97
|
+
}
|
|
98
|
+
}), K = {
|
|
99
|
+
"top-miniChart": "top-miniChart",
|
|
100
|
+
"top-miniChart_title": "top-miniChart_title",
|
|
101
|
+
"top-color_orange": "top-color_orange",
|
|
102
|
+
"top-color_pink": "top-color_pink",
|
|
103
|
+
"top-color_blue": "top-color_blue",
|
|
104
|
+
"top-miniChart_data": "top-miniChart_data",
|
|
105
|
+
"top-miniChart_dataDynamic": "top-miniChart_dataDynamic",
|
|
106
|
+
"top-miniChart_dataDynamic-direction_up": "top-miniChart_dataDynamic-direction_up",
|
|
107
|
+
"top-miniChart_dataDynamic-direction_stay": "top-miniChart_dataDynamic-direction_stay",
|
|
108
|
+
"top-miniChart_dataDynamic-direction_down": "top-miniChart_dataDynamic-direction_down",
|
|
109
|
+
"top-miniChart_chartGrid": "top-miniChart_chartGrid",
|
|
110
|
+
"top-miniChart_chartGridCol": "top-miniChart_chartGridCol",
|
|
111
|
+
"top-active": "top-active",
|
|
112
|
+
"top-miniChart_chartGridCol-none": "top-miniChart_chartGridCol-none",
|
|
113
|
+
"top-miniChart_chart": "top-miniChart_chart"
|
|
114
|
+
}, Q = {
|
|
115
|
+
$style: K
|
|
116
|
+
}, R = /* @__PURE__ */ B(J, [["__cssModules", Q]]), Z = R;
|
|
117
|
+
export {
|
|
118
|
+
Z as TopMiniChart
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=charts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charts.js","sources":["../../src/components/charts/miniChart/utils/consts.ts","../../src/components/charts/miniChart/miniChart.vue","../../src/components/charts/charts.ts"],"sourcesContent":["/**\n * Кол-во столбцов по умолчанию\n */\nexport const defaultNumberCols = 90;\n\n/**\n * Минимальная высота колонки (в процентах)\n */\nexport const minHeight = 10; // %","<script setup lang=\"ts\">\nimport type { Props } from './miniChart';\nimport { computed } from 'vue';\nimport { dateFormat } from '@/core/utils/date';\nimport { percentOfNumber } from '@/core/utils/number';\nimport { defaultNumberCols, minHeight } from './utils/consts';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tcolor: 'blue',\n\tnumberCols: defaultNumberCols,\n});\nconst model = defineModel<Props['modelValue']>();\n\n/**\n * Расчет высоты колонки (в процентах)\n */\nconst genColHeight = (value: number): number => {\n\tlet maximumValue = maxValue.value;\n\n\t// для графиков средней и медианной делаем максимум 1\n\tif (props.isInvert) {\n\t\tvalue -= 1;\n\t\tmaximumValue -= 1;\n\t}\n\n\tlet height = maximumValue > 0 ? Math.round((value / maximumValue) * (100 - minHeight)) : 0;\n\tif (props.isInvert) return 100 - height;\n\n\treturn height + minHeight;\n};\n\nconst isActiveDate = (date: string) => props.activeDates.includes(date);\n\nconst maxValue = computed(() => Math.max(...props.values));\n\n/**\n * Из-за стиля .top-miniChart_chartGrid - direction: rtl\n */\nconst reversedDates = computed(() => props.dates.slice().reverse());\n\n/**\n * Кол-во пустых колонок\n */\nconst numOfEmptyCols = computed(() => {\n\tif (!props.dates.length) return 0;\n\n\treturn props.numberCols - props.dates.length;\n});\n\nconst resetModel = () => {\n\tmodel.value = null;\n};\n\nconst setModel = (e: Event, date: string, value: number | null) => {\n\tmodel.value = {\n\t\telCol: e.target,\n\t\tdate: dateFormat(date),\n\t\tvalue: value === null ? '--' : value + (props.valueSuffix ?? ''),\n\t};\n};\n\n/**\n * Возвращает численный показатель динамики графика\n */\nconst dynamic = computed(() => {\n\tconst prevPeriodValue = props.values[props.keysForDyn.start];\n\tconst currentValue = props.values[props.keysForDyn.end];\n\tconst dynValue = currentValue - prevPeriodValue;\n\tconst sign = dynValue < 0 ? -1 : 1;\n\n\treturn sign * (percentOfNumber(Math.abs(dynValue)) as number);\n});\n\nconst dynamicDirection = computed(() => {\n\tlet direction: 'up' | 'stay' | 'down' = 'stay';\n\n\tif (!props.isInvert) {\n\t\tif (dynamic.value > 0) direction = 'up';\n\t\tif (dynamic.value < 0) direction = 'down';\n\t} else {\n\t\tif (dynamic.value > 0) direction = 'down';\n\t\tif (dynamic.value < 0) direction = 'up';\n\t}\n\n\treturn direction;\n});\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t['top-miniChart']: true,\n\t\t\t[`top-color_${color}`]: true,\n\t\t}\"\n\t>\n\t\t<div\n\t\t\tclass=\"top-miniChart_title\"\n\t\t\t:data-top-icon=\"gIcon\"\n\t\t>\n\t\t\t{{ title }}\n\t\t</div>\n\n\t\t<div class=\"top-miniChart_chart\">\n\t\t\t<div\n\t\t\t\tclass=\"top-miniChart_chartGrid\"\n\t\t\t\t@mouseleave=\"resetModel()\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tv-for=\"(date, i) in reversedDates\"\n\t\t\t\t\t:key=\"i\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t['top-miniChart_chartGridCol']: true,\n\t\t\t\t\t\t['top-active']: isActiveDate(date)\n\t\t\t\t\t}\"\n\t\t\t\t\t@mouseenter=\"setModel($event, date, values[values.length - i - 1])\"\n\t\t\t\t>\n\t\t\t\t\t<div :style=\"'height:' + genColHeight(values[values.length - i - 1]) + '%'\"/>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tv-for=\"() in numOfEmptyCols\"\n\t\t\t\t\tclass=\"top-miniChart_chartGridCol top-miniChart_chartGridCol-none\"\n\t\t\t\t\t@mouseenter=\"resetModel()\"\n\t\t\t\t>\n\t\t\t\t\t<div></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"top-miniChart_data\">\n\t\t\t<span :class=\"{\n\t\t\t\t['top-miniChart_dataDynamic']: true,\n\t\t\t\t[`top-miniChart_dataDynamic-direction_${dynamicDirection}`]: true,\n\t\t\t}\">\n\t\t\t\t{{ Math.abs(dynamic) || '' }}\n\t\t\t</span>\n\t\t\t<span class=\"top-miniChart_dataValue\">\n\t\t\t\t{{ percentOfNumber(values[values.length - 1]) || 0 }}\n\t\t\t</span>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"additionalHTML\"\n\t\t\tv-html=\"additionalHTML\"\n\t\t/>\n\t</div>\n\n</template>\n<style module src=\"./styles/miniChart.css\"></style>\n","import type { ComponentCustomProps } from 'vue';\n\nimport MiniChart from './miniChart/miniChart.vue';\n\nexport const TopMiniChart = MiniChart as typeof MiniChart & ComponentCustomProps"],"names":["defaultNumberCols","minHeight","props","__props","model","useModel","genColHeight","value","maximumValue","maxValue","height","isActiveDate","date","computed","reversedDates","numOfEmptyCols","resetModel","setModel","e","dateFormat","dynamic","prevPeriodValue","dynValue","percentOfNumber","dynamicDirection","direction","TopMiniChart","MiniChart"],"mappings":";;;;;;AAGO,MAAAA,IAAA,IAKAC,IAAA;;;;;;;;;;;;;;;;;;;;;ACDP,UAAAC,IAAAC,GAIAC,IAAAC,EAAAF,GAAA,YAAA,GAKAG,IAAA,CAAAC,MAAA;AACC,UAAAC,IAAAC,EAAA;AAGA,MAAAP,EAAA,aACCK,KAAA,GACAC,KAAA;AAGD,UAAAE,IAAAF,IAAA,IAAA,KAAA,MAAAD,IAAAC,KAAA,MAAAP,EAAA,IAAA;AACA,aAAAC,EAAA,WAAA,MAAAQ,IAEAA,IAAAT;AAAA,IAAgB,GAGjBU,IAAA,CAAAC,MAAAV,EAAA,YAAA,SAAAU,CAAA,GAEAH,IAAAI,EAAA,MAAA,KAAA,IAAA,GAAAX,EAAA,MAAA,CAAA,GAKAY,IAAAD,EAAA,MAAAX,EAAA,MAAA,MAAA,EAAA,QAAA,CAAA,GAKAa,IAAAF,EAAA,MACCX,EAAA,MAAA,SAEAA,EAAA,aAAAA,EAAA,MAAA,SAFA,CAEsC,GAGvCc,IAAA,MAAA;AACC,MAAAZ,EAAA,QAAA;AAAA,IAAc,GAGfa,IAAA,CAAAC,GAAAN,GAAAL,MAAA;AACC,MAAAH,EAAA,QAAA;AAAA,QAAc,OAAAc,EAAA;AAAA,QACJ,MAAAC,EAAAP,CAAA;AAAA,QACY,OAAAL,MAAA,OAAA,OAAAA,KAAAL,EAAA,eAAA;AAAA,MACwC;AAAA,IAC9D,GAMDkB,IAAAP,EAAA,MAAA;AACC,YAAAQ,IAAAnB,EAAA,OAAAA,EAAA,WAAA,KAAA,GAEAoB,IADApB,EAAA,OAAAA,EAAA,WAAA,GAAA,IACAmB;AAGA,cAFAC,IAAA,IAAA,KAAA,KAEAC,EAAA,KAAA,IAAAD,CAAA,CAAA;AAAA,IAAiD,CAAA,GAGlDE,IAAAX,EAAA,MAAA;AACC,UAAAY,IAAA;AAEA,aAAAvB,EAAA,YAICkB,EAAA,QAAA,MAAAK,IAAA,SACAL,EAAA,QAAA,MAAAK,IAAA,UAJAL,EAAA,QAAA,MAAAK,IAAA,OACAL,EAAA,QAAA,MAAAK,IAAA,UAMDA;AAAA,IAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDChFDC,IAAAC;"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export interface Props {
|
|
2
|
+
/**
|
|
3
|
+
* Имя графика
|
|
4
|
+
*/
|
|
5
|
+
title?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Иконка графика
|
|
8
|
+
*/
|
|
9
|
+
gIcon?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Цвет графика и иконки
|
|
12
|
+
*/
|
|
13
|
+
color?: Color;
|
|
14
|
+
/**
|
|
15
|
+
* Список дат всех проверок (пример даты: 2020-01-01)
|
|
16
|
+
*/
|
|
17
|
+
dates: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Список значений параметра для каждой проверки (порядок соответсвует списку дат)
|
|
20
|
+
*/
|
|
21
|
+
values: number[];
|
|
22
|
+
/**
|
|
23
|
+
* Список активных дат (пример даты: 2020-01-01)
|
|
24
|
+
*/
|
|
25
|
+
activeDates: string[];
|
|
26
|
+
/**
|
|
27
|
+
* Индексы для получения значений из props.values.
|
|
28
|
+
* Полученные значения используются для рассчета динамики изменения.
|
|
29
|
+
*
|
|
30
|
+
* - start - индекс для получения значения в начале периода
|
|
31
|
+
* - end - индекс для полученя значения в конце периода
|
|
32
|
+
*/
|
|
33
|
+
keysForDyn: {
|
|
34
|
+
start: number;
|
|
35
|
+
end: number;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Необходимо ли инвертировать значения ячеек графика
|
|
39
|
+
*/
|
|
40
|
+
isInvert?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Кол-во столбцов всего
|
|
43
|
+
*/
|
|
44
|
+
numberCols?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Html для футера
|
|
47
|
+
*/
|
|
48
|
+
additionalHTML?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Выбранная проверка (колонка)
|
|
51
|
+
*/
|
|
52
|
+
modelValue?: Item | null;
|
|
53
|
+
/**
|
|
54
|
+
* Суффикс для значения
|
|
55
|
+
*/
|
|
56
|
+
valueSuffix?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Интерфейс проверки (используется для передачи данных о выбранной проверке через v-model)
|
|
60
|
+
*/
|
|
61
|
+
export interface Item {
|
|
62
|
+
/**
|
|
63
|
+
* Эл-т колонки выбранной проверки
|
|
64
|
+
*/
|
|
65
|
+
elCol: EventTarget | null;
|
|
66
|
+
/**
|
|
67
|
+
* Дата/время проверки
|
|
68
|
+
*/
|
|
69
|
+
date?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Значение параметра проверки
|
|
72
|
+
*/
|
|
73
|
+
value?: string;
|
|
74
|
+
}
|
|
75
|
+
export declare const colors: {
|
|
76
|
+
readonly blue: "blue";
|
|
77
|
+
readonly orange: "orange";
|
|
78
|
+
readonly pink: "pink";
|
|
79
|
+
};
|
|
80
|
+
export type Color = typeof colors[keyof typeof colors];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Props, Item, Color } from './miniChart';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare let __VLS_typeProps: Props;
|
|
4
|
+
type __VLS_PublicProps = {
|
|
5
|
+
modelValue?: Props['modelValue'];
|
|
6
|
+
} & typeof __VLS_typeProps;
|
|
7
|
+
declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (modelValue: Item | null | undefined) => any;
|
|
9
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((modelValue: Item | null | undefined) => any) | undefined;
|
|
11
|
+
}>, {
|
|
12
|
+
color: Color;
|
|
13
|
+
numberCols: number;
|
|
14
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Список дат всех проверок
|
|
3
|
+
*/
|
|
4
|
+
export declare const dates: string[];
|
|
5
|
+
/**
|
|
6
|
+
* Список активных дат
|
|
7
|
+
*/
|
|
8
|
+
export declare const activeDates: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Список значений видимости
|
|
11
|
+
*/
|
|
12
|
+
declare const visibilities: number[];
|
|
13
|
+
export { visibilities };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as PopupClass } from '../../popup/lib/popup';
|
|
2
2
|
import { Item, Props, Slots } from './selector2';
|
|
3
3
|
import { ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, PublicProps } from 'vue';
|
|
4
|
-
import { Props } from '../../popup/popup/popup';
|
|
4
|
+
import { PopupEvent, Props } from '../../popup/popup/popup';
|
|
5
5
|
import { OnCleanup } from '@vue/reactivity';
|
|
6
6
|
import { Size } from '../../forms/helpers';
|
|
7
7
|
declare let __VLS_typeProps: Props;
|
|
@@ -23,14 +23,10 @@ declare function __VLS_template(): {
|
|
|
23
23
|
readonly notch?: boolean | undefined;
|
|
24
24
|
readonly openByHover?: boolean | undefined;
|
|
25
25
|
readonly posBy?: ("fixed" | "left" | "right") | undefined;
|
|
26
|
-
readonly onClose?: (() => any) | undefined;
|
|
27
|
-
readonly onOpen?: (() => any) | undefined;
|
|
28
|
-
readonly onScrollContentList?: ((
|
|
29
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps
|
|
30
|
-
onClose?: (() => any) | undefined;
|
|
31
|
-
onOpen?: (() => any) | undefined;
|
|
32
|
-
onScrollContentList?: ((value: Event) => any) | undefined;
|
|
33
|
-
}>;
|
|
26
|
+
readonly onClose?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
27
|
+
readonly onOpen?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
28
|
+
readonly onScrollContentList?: ((e: Event) => any) | undefined;
|
|
29
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
34
30
|
$attrs: {
|
|
35
31
|
[x: string]: unknown;
|
|
36
32
|
};
|
|
@@ -43,18 +39,18 @@ declare function __VLS_template(): {
|
|
|
43
39
|
$root: ComponentPublicInstance | null;
|
|
44
40
|
$parent: ComponentPublicInstance | null;
|
|
45
41
|
$host: Element | null;
|
|
46
|
-
$emit: ((event: "close") => void) & ((event: "open") => void) & ((event: "scrollContentList",
|
|
42
|
+
$emit: ((event: "close", popupEvent: PopupEvent) => void) & ((event: "open", popupEvent: PopupEvent) => void) & ((event: "scrollContentList", e: Event) => void);
|
|
47
43
|
$el: any;
|
|
48
44
|
$options: ComponentOptionsBase<Readonly< Props> & Readonly<{
|
|
49
|
-
onClose?: (() => any) | undefined;
|
|
50
|
-
onOpen?: (() => any) | undefined;
|
|
51
|
-
onScrollContentList?: ((
|
|
45
|
+
onClose?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
46
|
+
onOpen?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
47
|
+
onScrollContentList?: ((e: Event) => any) | undefined;
|
|
52
48
|
}>, {
|
|
53
49
|
popup: PopupClass | undefined;
|
|
54
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
55
|
-
close: () => any;
|
|
56
|
-
open: () => any;
|
|
57
|
-
scrollContentList: (
|
|
50
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
51
|
+
close: (popupEvent: PopupEvent) => any;
|
|
52
|
+
open: (popupEvent: PopupEvent) => any;
|
|
53
|
+
scrollContentList: (e: Event) => any;
|
|
58
54
|
}, string, {
|
|
59
55
|
posBy: "fixed" | "left" | "right";
|
|
60
56
|
id: string;
|
|
@@ -86,9 +82,9 @@ declare function __VLS_template(): {
|
|
|
86
82
|
pos: "0" | "1" | "2" | "3" | "4";
|
|
87
83
|
notch: boolean;
|
|
88
84
|
}> & Omit<Readonly< Props> & Readonly<{
|
|
89
|
-
onClose?: (() => any) | undefined;
|
|
90
|
-
onOpen?: (() => any) | undefined;
|
|
91
|
-
onScrollContentList?: ((
|
|
85
|
+
onClose?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
86
|
+
onOpen?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
87
|
+
onScrollContentList?: ((e: Event) => any) | undefined;
|
|
92
88
|
}>, ("posBy" | "id" | "pos" | "notch") | "popup"> & ShallowUnwrapRef<{
|
|
93
89
|
popup: PopupClass | undefined;
|
|
94
90
|
}> & {} & ComponentCustomProperties & {} & {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Props } from './alert';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { PopupEvent } from '../popup/popup';
|
|
3
4
|
declare function __VLS_template(): {
|
|
4
5
|
slots: {
|
|
5
6
|
opener?(_: {}): any;
|
|
@@ -11,14 +12,14 @@ declare function __VLS_template(): {
|
|
|
11
12
|
attrs: Partial<{}>;
|
|
12
13
|
};
|
|
13
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
15
|
-
close: () => any;
|
|
16
|
-
open: () => any;
|
|
17
|
-
scrollContentList: (
|
|
15
|
+
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
16
|
+
close: (popupEvent: PopupEvent) => any;
|
|
17
|
+
open: (popupEvent: PopupEvent) => any;
|
|
18
|
+
scrollContentList: (e: Event) => any;
|
|
18
19
|
}, string, PublicProps, Readonly<Props> & Readonly<{
|
|
19
|
-
onClose?: (() => any) | undefined;
|
|
20
|
-
onOpen?: (() => any) | undefined;
|
|
21
|
-
onScrollContentList?: ((
|
|
20
|
+
onClose?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
21
|
+
onOpen?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
22
|
+
onScrollContentList?: ((e: Event) => any) | undefined;
|
|
22
23
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
23
24
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
25
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PopupEvent } from '../popup/popup';
|
|
1
2
|
import { Props } from './confirm';
|
|
2
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
4
|
declare function __VLS_template(): {
|
|
@@ -11,16 +12,16 @@ declare function __VLS_template(): {
|
|
|
11
12
|
attrs: Partial<{}>;
|
|
12
13
|
};
|
|
13
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
15
|
-
close: () => any;
|
|
16
|
-
open: () => any;
|
|
15
|
+
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
16
|
+
close: (popupEvent: PopupEvent) => any;
|
|
17
|
+
open: (popupEvent: PopupEvent) => any;
|
|
17
18
|
submit: () => any;
|
|
18
|
-
scrollContentList: (
|
|
19
|
+
scrollContentList: (e: Event) => any;
|
|
19
20
|
}, string, PublicProps, Readonly<Props> & Readonly<{
|
|
20
|
-
onClose?: (() => any) | undefined;
|
|
21
|
-
onOpen?: (() => any) | undefined;
|
|
21
|
+
onClose?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
22
|
+
onOpen?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
22
23
|
onSubmit?: (() => any) | undefined;
|
|
23
|
-
onScrollContentList?: ((
|
|
24
|
+
onScrollContentList?: ((e: Event) => any) | undefined;
|
|
24
25
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
25
26
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
27
|
export default _default;
|
|
@@ -25,7 +25,7 @@ export declare class Popup extends Component {
|
|
|
25
25
|
static componentName: string;
|
|
26
26
|
el: HTMLElement;
|
|
27
27
|
elActiveByDefault: boolean | undefined;
|
|
28
|
-
elPopup: HTMLElement | undefined
|
|
28
|
+
elPopup: HTMLElement | undefined;
|
|
29
29
|
elPopupInner: HTMLElement | undefined;
|
|
30
30
|
elPopupHeader: HTMLElement | undefined | null;
|
|
31
31
|
elPopupWidget: HTMLElement | undefined | null;
|
|
@@ -23,19 +23,23 @@ export interface Props extends OpenerProps {
|
|
|
23
23
|
*/
|
|
24
24
|
footerSupportLink?: string;
|
|
25
25
|
}
|
|
26
|
+
export type PopupEvent = {
|
|
27
|
+
elPopup: HTMLElement;
|
|
28
|
+
elPopupOpener: HTMLElement;
|
|
29
|
+
};
|
|
26
30
|
export type Emits = {
|
|
27
31
|
/**
|
|
28
32
|
* Будет вызвано при открытии Popup
|
|
29
33
|
*/
|
|
30
|
-
|
|
34
|
+
open: [popupEvent: PopupEvent];
|
|
31
35
|
/**
|
|
32
|
-
* Будет вызвано после закрытия Popup
|
|
36
|
+
* Будет вызвано после закрытия Popup перед его удалением
|
|
33
37
|
*/
|
|
34
|
-
|
|
38
|
+
close: [popupEvent: PopupEvent];
|
|
35
39
|
/**
|
|
36
40
|
* Будет вызвано при скролле списка в Popup
|
|
37
41
|
*/
|
|
38
|
-
|
|
42
|
+
scrollContentList: [e: Event];
|
|
39
43
|
};
|
|
40
44
|
export interface OpenerProps {
|
|
41
45
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as PopupClass } from '../lib/popup';
|
|
2
|
-
import { Props } from './popup';
|
|
2
|
+
import { Props, PopupEvent } from './popup';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
slots: {
|
|
@@ -16,14 +16,14 @@ declare function __VLS_template(): {
|
|
|
16
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
17
|
declare const __VLS_component: DefineComponent<Props, {
|
|
18
18
|
popup: PopupClass | undefined;
|
|
19
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
20
|
-
close: () => any;
|
|
21
|
-
open: () => any;
|
|
22
|
-
scrollContentList: (
|
|
19
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
20
|
+
close: (popupEvent: PopupEvent) => any;
|
|
21
|
+
open: (popupEvent: PopupEvent) => any;
|
|
22
|
+
scrollContentList: (e: Event) => any;
|
|
23
23
|
}, string, PublicProps, Readonly<Props> & Readonly<{
|
|
24
|
-
onClose?: (() => any) | undefined;
|
|
25
|
-
onOpen?: (() => any) | undefined;
|
|
26
|
-
onScrollContentList?: ((
|
|
24
|
+
onClose?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
25
|
+
onOpen?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
26
|
+
onScrollContentList?: ((e: Event) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
28
|
posBy: "fixed" | "left" | "right";
|
|
29
29
|
id: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PopupEvent } from '../popup/popup';
|
|
1
2
|
import { Props } from './prompt';
|
|
2
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
4
|
declare function __VLS_template(): {
|
|
@@ -11,16 +12,16 @@ declare function __VLS_template(): {
|
|
|
11
12
|
attrs: Partial<{}>;
|
|
12
13
|
};
|
|
13
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
15
|
-
close: () => any;
|
|
16
|
-
open: () => any;
|
|
15
|
+
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
16
|
+
close: (popupEvent: PopupEvent) => any;
|
|
17
|
+
open: (popupEvent: PopupEvent) => any;
|
|
17
18
|
submit: (value: string) => any;
|
|
18
|
-
scrollContentList: (
|
|
19
|
+
scrollContentList: (e: Event) => any;
|
|
19
20
|
}, string, PublicProps, Readonly<Props> & Readonly<{
|
|
20
|
-
onClose?: (() => any) | undefined;
|
|
21
|
-
onOpen?: (() => any) | undefined;
|
|
21
|
+
onClose?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
22
|
+
onOpen?: ((popupEvent: PopupEvent) => any) | undefined;
|
|
22
23
|
onSubmit?: ((value: string) => any) | undefined;
|
|
23
|
-
onScrollContentList?: ((
|
|
24
|
+
onScrollContentList?: ((e: Event) => any) | undefined;
|
|
24
25
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
25
26
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
27
|
export default _default;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { ComponentCustomProps } from 'vue';
|
|
2
2
|
import { default as SelectorCompetitors } from './selectorCompetitors/selectorCompetitors.vue';
|
|
3
3
|
import { default as SelectorRegion } from './selectorRegion/selectorRegion.vue';
|
|
4
|
+
import { default as TagSelector } from './tagSelector/tagSelector.vue';
|
|
5
|
+
import { default as TagSelectorPopupOpener } from './tagSelector/popupOpener/popupOpener.vue';
|
|
6
|
+
import { default as TagSelectorTagIcon } from './tagSelector/tagIcon/tagIcon.vue';
|
|
4
7
|
export declare const TopSelectorCompetitors: typeof SelectorCompetitors & ComponentCustomProps;
|
|
8
|
+
export { findRegion, genSearcherByKey } from './selectorRegion/utils/utils';
|
|
5
9
|
export declare const TopSelectorRegion: typeof SelectorRegion & ComponentCustomProps;
|
|
10
|
+
export type { Emits as TopTagSelectorEmits, Tag, TagId, TagIdExclude } from './tagSelector/types';
|
|
11
|
+
export { genElPopupOpener as genElTopTagSelectorPopupOpener, renderElPopupOpener as renderElTopTagSelectorPopupOpener, } from './tagSelector/utils/el';
|
|
12
|
+
export declare const TopTagSelector: typeof TagSelector & ComponentCustomProps;
|
|
13
|
+
export declare const TopTagSelectorPopupOpener: typeof TagSelectorPopupOpener & ComponentCustomProps;
|
|
14
|
+
export declare const TopTagSelectorTagIcon: typeof TagSelectorTagIcon & ComponentCustomProps;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Props } from './types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare let __VLS_typeProps: Props;
|
|
4
|
+
type __VLS_PublicProps = {
|
|
5
|
+
'name': Props['name'];
|
|
6
|
+
} & typeof __VLS_typeProps;
|
|
7
|
+
declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
8
|
+
select: () => any;
|
|
9
|
+
exclude: () => any;
|
|
10
|
+
"update:name": (...args: unknown[]) => any;
|
|
11
|
+
unselect: () => any;
|
|
12
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
onSelect?: (() => any) | undefined;
|
|
14
|
+
onExclude?: (() => any) | undefined;
|
|
15
|
+
"onUpdate:name"?: ((...args: unknown[]) => any) | undefined;
|
|
16
|
+
onUnselect?: (() => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Props as TagIconProps } from '../tagIcon/types';
|
|
2
|
+
export interface Props extends TagIconProps {
|
|
3
|
+
/**
|
|
4
|
+
* Можно ли изментять тег
|
|
5
|
+
*/
|
|
6
|
+
editable?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Запретить выбор тега
|
|
9
|
+
*/
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Можно ли исключать
|
|
13
|
+
*/
|
|
14
|
+
canExclude?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type Emits = {
|
|
17
|
+
/**
|
|
18
|
+
* Изменить имя
|
|
19
|
+
*/
|
|
20
|
+
'update:name': [name: string];
|
|
21
|
+
/**
|
|
22
|
+
* Сбросить статус выбора тега
|
|
23
|
+
*/
|
|
24
|
+
unselect: [];
|
|
25
|
+
/**
|
|
26
|
+
* Исключить тег
|
|
27
|
+
*/
|
|
28
|
+
exclude: [];
|
|
29
|
+
/**
|
|
30
|
+
* Выбрать тег
|
|
31
|
+
*/
|
|
32
|
+
select: [];
|
|
33
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Props } from './types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare let __VLS_typeProps: Props;
|
|
4
|
+
type __VLS_PublicProps = {
|
|
5
|
+
modelValue: Props['modelValue'];
|
|
6
|
+
} & typeof __VLS_typeProps;
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (modelValue: ("1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-17" | "-18" | "-19" | "-20")[]) => any;
|
|
17
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((modelValue: ("1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-17" | "-18" | "-19" | "-20")[]) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|