@qxs-bns/components 0.0.51 → 0.0.52

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.
Files changed (35) hide show
  1. package/es/index.mjs +1 -1
  2. package/es/index.mjs.map +1 -1
  3. package/es/package.json.mjs +1 -1
  4. package/es/src/components.mjs +1 -1
  5. package/es/src/data-chart/index.mjs +1 -1
  6. package/es/src/data-chart/index.mjs.map +1 -1
  7. package/es/src/data-chart/src/analyze.mjs +1 -1
  8. package/es/src/data-chart/src/analyze.mjs.map +1 -1
  9. package/es/src/data-chart/src/components/bar.vue.mjs +1 -1
  10. package/es/src/data-chart/src/components/bar.vue.mjs.map +1 -1
  11. package/es/src/data-chart/src/data-chart.vue.mjs +1 -1
  12. package/es/src/data-chart/src/data-chart.vue.mjs.map +1 -1
  13. package/es/src/data-chart/src/utils/types.mjs +2 -0
  14. package/es/src/data-chart/src/utils/types.mjs.map +1 -0
  15. package/lib/index.cjs +1 -1
  16. package/lib/index.cjs.map +1 -1
  17. package/lib/package.json.cjs +1 -1
  18. package/lib/src/components.cjs +1 -1
  19. package/lib/src/data-chart/index.cjs +1 -1
  20. package/lib/src/data-chart/index.cjs.map +1 -1
  21. package/lib/src/data-chart/src/analyze.cjs +1 -1
  22. package/lib/src/data-chart/src/analyze.cjs.map +1 -1
  23. package/lib/src/data-chart/src/components/bar.vue.cjs +1 -1
  24. package/lib/src/data-chart/src/components/bar.vue.cjs.map +1 -1
  25. package/lib/src/data-chart/src/data-chart.vue.cjs +1 -1
  26. package/lib/src/data-chart/src/data-chart.vue.cjs.map +1 -1
  27. package/lib/src/data-chart/src/utils/types.cjs +2 -0
  28. package/lib/src/data-chart/src/utils/types.cjs.map +1 -0
  29. package/package.json +5 -5
  30. package/types/src/data-chart/index.d.ts +9 -7
  31. package/types/src/data-chart/index.d.ts.map +1 -1
  32. package/types/src/data-chart/src/components/bar.vue.d.ts.map +1 -1
  33. package/types/src/data-chart/src/data-chart.vue.d.ts +9 -2
  34. package/types/src/data-chart/src/data-chart.vue.d.ts.map +1 -1
  35. package/types/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"bar.vue.cjs","sources":["../../../../../../../packages/components/src/data-chart/src/components/bar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { LegendComponentOption, XAXisComponentOption, YAXisComponentOption } from 'echarts'\nimport type {\n EChartData,\n EChartsOption,\n IFormatPublicData,\n SeriesOption,\n} from '../utils/types'\nimport { uniq } from 'lodash-es'\nimport { InjectionChartMerge } from '../utils/injectionKeys'\nimport { useCharts } from '../utils/useCharts'\n\n// 定义组件名称\ndefineOptions({\n name: 'DataChartBar',\n})\n\n// 定义组件属性\nconst {\n chartOptions,\n chartData,\n subShowType = 'bar-simple',\n} = defineProps<{\n chartData: IFormatPublicData\n subShowType: string\n chartOptions: EChartsOption\n}>()\n\n// 注入合并函数,并明确类型\nconst merge = inject(InjectionChartMerge, (v: any) => v, true) as (config: EChartsOption, chartOptions: EChartsOption) => EChartsOption\nconst dataChartBar = ref<HTMLElement | null>(null)\n\n// 计算图表选项\nconst barChartOptions = computed<EChartsOption>(() => {\n const { colDesc, xGroupByDesc, groupByDesc, data = [], modelName } = chartData\n\n const axisData = Array.from(new Set(data.map(item => item[xGroupByDesc.colDesc || '']))).filter(item => item !== undefined && item !== null) || []\n const yGroupByDesc: EChartData['desc']['groupByDesc'][0] = groupByDesc.find(item => !item.xAxis) || {\n groupByDesc: null,\n groupByValues: [],\n colDesc: '',\n xAxis: false,\n }\n\n yGroupByDesc.groupByValues = uniq(data.map(item => yGroupByDesc.colDesc ? String(item[yGroupByDesc.colDesc]) : ''))\n if (xGroupByDesc && xGroupByDesc.groupByValues) {\n xGroupByDesc.groupByValues = uniq(data.map(item => xGroupByDesc.colDesc ? String(item[xGroupByDesc.colDesc]) : ''))\n }\n\n const config: EChartsOption = {\n title: {\n text: modelName,\n },\n xAxis: {\n name: '',\n type: 'category',\n axisLabel: {\n interval: 0, // 强制显示所有标签\n formatter(value: string) {\n const screenshotLength = 5\n return value.length > screenshotLength ? `${value.substring(0, screenshotLength)}...` : value // 截取前5个字符并添加省略号\n },\n },\n data: axisData,\n },\n yAxis: {\n type: 'value',\n },\n legend: {\n data: [],\n },\n dataZoom: [{\n type: 'inside',\n disabled: axisData.length < 15,\n }],\n }\n\n // 堆叠图\n if (groupByDesc.length === 1) {\n config.series = colDesc.map((yItem) => {\n return {\n name: yItem,\n data: data.map(item => item[yItem]),\n type: 'bar',\n emphasis: {\n focus: 'series',\n },\n label: {\n show: true,\n position: 'inside',\n },\n }\n });\n (config.legend as LegendComponentOption).data = colDesc\n }\n else if (groupByDesc.length === 2) {\n const arr = colDesc.map((colDescItem) => {\n return yGroupByDesc.groupByValues?.map((yGroupByDescItem) => {\n const obj: SeriesOption = {\n name: `${yGroupByDescItem || '/'}-${colDescItem}`,\n type: 'bar',\n stack: colDescItem,\n emphasis: {\n focus: 'series',\n },\n data: [],\n label: {\n show: true,\n position: 'inside',\n },\n }\n obj.data = (xGroupByDesc.groupByValues || []).map((xGroupByDescItem) => {\n let targetVal: number | string | null = null\n data.forEach((item) => {\n if (yGroupByDesc.colDesc && item[yGroupByDesc.colDesc] === yGroupByDescItem && xGroupByDesc.colDesc && item[xGroupByDesc.colDesc] === xGroupByDescItem) {\n if (obj.stack) {\n targetVal = item[obj.stack] ?? null\n }\n }\n })\n return targetVal || ''\n }).filter(v => v !== '')\n return obj\n }) || []\n }).flat()\n\n config.series = arr\n delete config.legend\n }\n\n // 1. 定义轴类型\n type CategoryAxisOption = XAXisComponentOption & {\n type: 'category'\n data: (string | number)[]\n }\n\n // 2. 创建配置轴的辅助函数\n function configureAxis(\n axis: XAXisComponentOption | XAXisComponentOption[] | YAXisComponentOption | YAXisComponentOption[] | undefined,\n type: 'category' | 'value',\n data?: (string | number)[],\n name?: string,\n ) {\n if (Array.isArray(axis)) {\n axis.forEach((item) => {\n if (item) {\n item.type = type\n if (type === 'category') {\n (item as CategoryAxisOption).data = data || []\n item.name = name || ''\n }\n }\n })\n }\n else if (axis) {\n axis.type = type\n if (type === 'category') {\n (axis as CategoryAxisOption).data = data || []\n axis.name = name || ''\n }\n }\n }\n\n // 3. 使用配置函数\n switch (subShowType) {\n case 'bar-simple':\n case 'default':\n configureAxis(config.xAxis, 'category', axisData, xGroupByDesc?.colDesc || '')\n configureAxis(config.yAxis, 'value')\n break\n\n case 'bar-y-category':\n configureAxis(config.xAxis, 'value')\n configureAxis(config.yAxis, 'category', axisData, xGroupByDesc?.colDesc || '')\n break\n }\n\n return merge(config, chartOptions)\n})\n\nuseCharts({ chartDOM: dataChartBar, chartOptions: barChartOptions, chartData: computed(() => chartData) })\n</script>\n\n<template>\n <div\n ref=\"dataChartBar\"\n class=\"data-chart-bar\"\n />\n</template>\n"],"names":["merge","inject","InjectionChartMerge","v","dataChartBar","ref","barChartOptions","computed","colDesc","xGroupByDesc","groupByDesc","data","modelName","__props","chartData","axisData","Array","from","Set","map","item","filter","yGroupByDesc","find","xAxis","groupByValues","uniq","String","config","title","text","name","type","axisLabel","interval","formatter","value","length","substring","yAxis","legend","dataZoom","disabled","series","yItem","emphasis","focus","label","show","position","arr","colDescItem","yGroupByDescItem","obj","stack","xGroupByDescItem","targetVal","forEach","flat","configureAxis","axis","isArray","subShowType","chartOptions","useCharts","chartDOM"],"mappings":"uYA6BA,MAAMA,EAAQC,EAAAA,OAAOC,EAAAA,qBAAsBC,GAAWA,IAAG,GACnDC,EAAeC,MAAwB,MAGvCC,EAAkBC,EAAAA,UAAwB,KACxC,MAAAC,QAAEA,eAASC,EAAcC,YAAAA,EAAAC,KAAaA,EAAO,GAACC,UAAGA,GAAcC,EAAAC,UAE/DC,EAAWC,MAAMC,KAAK,IAAIC,IAAIP,EAAKQ,KAAYC,GAAAA,EAAKX,EAAaD,SAAW,QAAOa,QAAOD,GAAQA,WAAwC,GAC1IE,EAAqDZ,EAAYa,UAAcH,EAAKI,SAAU,CAElGC,cAAe,GACfjB,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,WAAa+C,GAChIF,EAAIC,QACME,EAAApC,EAAKiC,EAAIC,QAAU,KACjC,IAGGE,GAAa,EAAA,IACnBnC,QAAOlB,GAAW,KAANA,IACRkD,CAAA,KACH,KACLK,OAEH9B,EAAOe,OAASO,SACTtB,EAAOY,MAAA,CAUhB,SAASmB,EACPC,EACA5B,EACArB,EACAoB,GAEIf,MAAM6C,QAAQD,GACXA,EAAAH,SAASrC,IACRA,IACFA,EAAKY,KAAOA,EACC,aAATA,IACDZ,EAA4BT,KAAOA,GAAQ,GAC5CS,EAAKW,KAAOA,GAAQ,IACtB,IAIG6B,IACPA,EAAK5B,KAAOA,EACC,aAATA,IACD4B,EAA4BjD,KAAOA,GAAQ,GAC5CiD,EAAK7B,KAAOA,GAAQ,IAExB,CAIF,OAAQlB,EAAWiD,aACjB,IAAK,aACL,IAAK,UACHH,EAAc/B,EAAOJ,MAAO,WAAYT,EAAUN,GAAcD,SAAW,IAC7DmD,EAAA/B,EAAOW,MAAO,SAC5B,MAEF,IAAK,iBACWoB,EAAA/B,EAAOJ,MAAO,SAC5BmC,EAAc/B,EAAOW,MAAO,WAAYxB,EAAUN,GAAcD,SAAW,IAIxE,OAAAR,EAAM4B,EAAQf,EAAYkD,aAAA,WAGzBC,EAAAA,UAAA,CAAEC,SAAU7D,EAAc2D,aAAczD,EAAiBQ,UAAWP,YAAS,IAAMM,EAAAC"}
1
+ {"version":3,"file":"bar.vue.cjs","sources":["../../../../../../../packages/components/src/data-chart/src/components/bar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { LegendComponentOption, XAXisComponentOption, YAXisComponentOption } from 'echarts'\nimport type {\n EChartsOption,\n IFormatPublicData,\n SeriesOption,\n} from '../utils/types'\nimport { uniq } from 'lodash-es'\nimport { InjectionChartMerge } from '../utils/injectionKeys'\nimport { useCharts } from '../utils/useCharts'\n\n// 定义组件名称\ndefineOptions({\n name: 'DataChartBar',\n})\n\n// 定义组件属性\nconst {\n chartOptions,\n chartData,\n subShowType = 'bar-simple',\n} = defineProps<{\n chartData: IFormatPublicData\n subShowType: string\n chartOptions: EChartsOption\n}>()\n\n// 注入合并函数,并明确类型\nconst merge = inject(InjectionChartMerge, (v: any) => v, true) as (config: EChartsOption, chartOptions: EChartsOption) => EChartsOption\nconst dataChartBar = ref<HTMLElement | null>(null)\n\n// 计算图表选项\nconst barChartOptions = computed<EChartsOption>(() => {\n const { colDesc, xGroupByDesc, groupByDesc, data = [], modelName } = chartData\n\n const axisData = Array.from(new Set(data.map(item => item[xGroupByDesc.colDesc || '']))).filter(item => item !== undefined && item !== null) || []\n\n // 创建新的对象而不是修改原对象\n const yGroupByDesc = {\n ...groupByDesc.find(item => !item.xAxis) || {\n groupByDesc: null,\n groupByValues: [],\n colDesc: '',\n xAxis: false,\n },\n groupByValues: uniq(data.map(item => groupByDesc.find(item => !item.xAxis)?.colDesc ? String(item[groupByDesc.find(item => !item.xAxis)?.colDesc || '']) : '')),\n }\n\n // 创建新的 xGroupByDesc 对象\n const newXGroupByDesc = xGroupByDesc\n ? {\n ...xGroupByDesc,\n groupByValues: uniq(data.map(item => xGroupByDesc.colDesc ? String(item[xGroupByDesc.colDesc]) : '')),\n }\n : xGroupByDesc\n\n const config: EChartsOption = {\n title: {\n text: modelName,\n },\n xAxis: {\n name: '',\n type: 'category',\n axisLabel: {\n interval: 0, // 强制显示所有标签\n formatter(value: string) {\n const screenshotLength = 5\n return value.length > screenshotLength ? `${value.substring(0, screenshotLength)}...` : value // 截取前5个字符并添加省略号\n },\n },\n data: axisData,\n },\n yAxis: {\n type: 'value',\n },\n legend: {\n data: [],\n },\n dataZoom: [{\n type: 'inside',\n disabled: axisData.length < 15,\n }],\n }\n\n // 堆叠图\n if (groupByDesc.length === 1) {\n config.series = colDesc.map((yItem) => {\n return {\n name: yItem,\n data: data.map(item => item[yItem]),\n type: 'bar',\n emphasis: {\n focus: 'series',\n },\n label: {\n show: true,\n position: 'inside',\n },\n }\n });\n (config.legend as LegendComponentOption).data = colDesc\n }\n else if (groupByDesc.length === 2) {\n const arr = colDesc.map((colDescItem) => {\n return yGroupByDesc.groupByValues?.map((yGroupByDescItem) => {\n const obj: SeriesOption = {\n name: `${yGroupByDescItem || '/'}-${colDescItem}`,\n type: 'bar',\n stack: colDescItem,\n emphasis: {\n focus: 'series',\n },\n data: [],\n label: {\n show: true,\n position: 'inside',\n },\n }\n obj.data = (newXGroupByDesc?.groupByValues || []).map((xGroupByDescItem) => {\n let targetVal: number | string | null = null\n data.forEach((item) => {\n if (yGroupByDesc.colDesc && item[yGroupByDesc.colDesc] === yGroupByDescItem && newXGroupByDesc?.colDesc && item[newXGroupByDesc.colDesc] === xGroupByDescItem) {\n if (obj.stack) {\n targetVal = item[obj.stack] ?? null\n }\n }\n })\n return targetVal || ''\n }).filter(v => v !== '')\n return obj\n }) || []\n }).flat()\n\n config.series = arr\n delete config.legend\n }\n\n // 1. 定义轴类型\n type CategoryAxisOption = XAXisComponentOption & {\n type: 'category'\n data: (string | number)[]\n }\n\n // 2. 创建配置轴的辅助函数\n function configureAxis(\n axis: XAXisComponentOption | XAXisComponentOption[] | YAXisComponentOption | YAXisComponentOption[] | undefined,\n type: 'category' | 'value',\n data?: (string | number)[],\n name?: string,\n ) {\n if (Array.isArray(axis)) {\n axis.forEach((item) => {\n if (item) {\n item.type = type\n if (type === 'category') {\n (item as CategoryAxisOption).data = data || []\n item.name = name || ''\n }\n }\n })\n }\n else if (axis) {\n axis.type = type\n if (type === 'category') {\n (axis as CategoryAxisOption).data = data || []\n axis.name = name || ''\n }\n }\n }\n\n // 3. 使用配置函数\n switch (subShowType) {\n case 'bar-simple':\n case 'default':\n configureAxis(config.xAxis, 'category', axisData, xGroupByDesc?.colDesc || '')\n configureAxis(config.yAxis, 'value')\n break\n\n case 'bar-y-category':\n configureAxis(config.xAxis, 'value')\n configureAxis(config.yAxis, 'category', axisData, xGroupByDesc?.colDesc || '')\n break\n }\n\n return merge(config, chartOptions)\n})\n\nuseCharts({ chartDOM: dataChartBar, chartOptions: barChartOptions, chartData: computed(() => chartData) })\n</script>\n\n<template>\n <div\n ref=\"dataChartBar\"\n class=\"data-chart-bar\"\n />\n</template>\n"],"names":["merge","inject","InjectionChartMerge","v","dataChartBar","ref","barChartOptions","computed","colDesc","xGroupByDesc","groupByDesc","data","modelName","__props","chartData","axisData","Array","from","Set","map","item","filter","yGroupByDesc","find","xAxis","groupByValues","uniq","String","newXGroupByDesc","config","title","text","name","type","axisLabel","interval","formatter","value","length","substring","yAxis","legend","dataZoom","disabled","series","yItem","emphasis","focus","label","show","position","arr","colDescItem","yGroupByDescItem","obj","stack","xGroupByDescItem","targetVal","forEach","flat","configureAxis","axis","isArray","subShowType","chartOptions","useCharts","chartDOM"],"mappings":"uYA4BA,MAAMA,EAAQC,EAAAA,OAAOC,EAAAA,qBAAsBC,GAAWA,IAAG,GACnDC,EAAeC,MAAwB,MAGvCC,EAAkBC,EAAAA,UAAwB,KACxC,MAAAC,QAAEA,eAASC,EAAcC,YAAAA,EAAAC,KAAaA,EAAO,GAACC,UAAGA,GAAcC,EAAAC,UAE/DC,EAAWC,MAAMC,KAAK,IAAIC,IAAIP,EAAKQ,KAAYC,GAAAA,EAAKX,EAAaD,SAAW,QAAOa,QAAOD,GAAQA,WAAwC,GAG1IE,EAAe,IAChBZ,EAAYa,UAAcH,EAAKI,SAAU,CAC1Cd,YAAa,KACbe,cAAe,GACfjB,QAAS,GACTgB,OAAO,GAETC,cAAeC,EAAAA,KAAKf,EAAKQ,KAAYC,GAAAV,EAAYa,MAAKH,IAASA,EAAKI,SAAQhB,QAAUmB,OAAOP,EAAKV,EAAYa,MAAKH,IAASA,EAAKI,SAAQhB,SAAW,KAAO,OAIvJoB,EAAkBnB,EACpB,IACKA,EACHgB,cAAeC,EAAAA,KAAKf,EAAKQ,QAAYV,EAAaD,QAAUmB,OAAOP,EAAKX,EAAaD,UAAY,OAEnGC,EAEEoB,EAAwB,CAC5BC,MAAO,CACLC,KAAMnB,GAERY,MAAO,CACLQ,KAAM,G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C,aAATA,IACDb,EAA4BT,KAAOA,GAAQ,GAC5CS,EAAKY,KAAOA,GAAQ,IACtB,IAIG6B,IACPA,EAAK5B,KAAOA,EACC,aAATA,IACD4B,EAA4BlD,KAAOA,GAAQ,GAC5CkD,EAAK7B,KAAOA,GAAQ,IAExB,CAIF,OAAQnB,EAAWkD,aACjB,IAAK,aACL,IAAK,UACHH,EAAc/B,EAAOL,MAAO,WAAYT,EAAUN,GAAcD,SAAW,IAC7DoD,EAAA/B,EAAOW,MAAO,SAC5B,MAEF,IAAK,iBACWoB,EAAA/B,EAAOL,MAAO,SAC5BoC,EAAc/B,EAAOW,MAAO,WAAYzB,EAAUN,GAAcD,SAAW,IAIxE,OAAAR,EAAM6B,EAAQhB,EAAYmD,aAAA,WAGzBC,EAAAA,UAAA,CAAEC,SAAU9D,EAAc4D,aAAc1D,EAAiBQ,UAAWP,YAAS,IAAMM,EAAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("@qxs-bns/hooks"),r=require("@qxs-bns/utils"),s=require("lodash-es"),a=require("./components/area.vue.cjs"),o=require("./components/bar.vue.cjs"),u=require("./components/card.vue.cjs"),c=require("./components/funnel.vue.cjs"),n=require("./components/line.vue.cjs"),l=require("./components/pie.vue.cjs"),p=require("./components/radar.vue.cjs"),i=require("./components/scatter-simple.vue.cjs"),d=require("./components/scatter.vue.cjs"),m=require("./components/table.vue.cjs"),f=require("./utils/config.cjs"),h=require("./utils/injectionKeys.cjs"),y=require("./utils/safe-eval.cjs"),q=require("./utils/useCharts.cjs"),j=e.defineComponent({name:"QxsDataChart",__name:"data-chart",props:{modelName:{type:String,required:!1,default:""},showTypeName:{type:String,required:!1,default:"table"},subShowType:{type:String,required:!1},data:{type:Object,required:!1,default:()=>({data:[],desc:{colDesc:[],showDesc:{showType:0,chartOptions:"{}",jsCodeSnippet:""},groupByDesc:[]}})},chartOptions:{type:null,required:!1,default:()=>({})},jsCodeSnippet:{type:String,required:!1,default:""}},setup(j,{expose:v}){const b=t.useNamespace("data-chart"),g={table:m.default,bar:o.default,line:n.default,pie:l.default,radar:p.default,scatter:d.default,funnel:c.default,area:a.default,card:u.default,"scatter-simple":i.default},x=e.computed((()=>s.cloneDeep(f.defaultChartOption[j.showTypeName]))),D=e.computed((()=>{const{desc:{colDesc:e=[],groupByDesc:t=[]}={},data:r=[]}=j.data;let s=[],a=null;s=t?.map((e=>(e.xAxis&&(a=e),e)));const o=a?r.filter((e=>e&&e[a.colDesc])):r;return{colDesc:e||[],modelName:j.modelName,subShowType:j.subShowType,xGroupByDesc:a||{colDesc:"",groupByDesc:"",groupByValues:[],xAxis:!1},groupByDesc:s,data:o}}));return v({exportExal:function(){if(0===j.data.data.length)return void console.log("暂无数据");const e=q.useDataToExcelJson(j.data);r.JsonToExcel(j.modelName,e)}}),e.provide(h.InjectionChartMerge,(function(e,t){let r=s.merge({},x.value,e,t)||{};if(j.jsCodeSnippet)try{r=y.safeEvalConfig(j.jsCodeSnippet,r)}catch(e){console.error("代码执行失败:",e)}return r})),(t,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g[t.showTypeName]),{key:t.showTypeName,class:e.normalizeClass([e.unref(b).e("wrapper")]),"sub-show-type":t.subShowType,"chart-data":e.unref(D),"chart-options":t.chartOptions},null,8,["class","sub-show-type","chart-data","chart-options"]))}});exports.default=j;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("@qxs-bns/hooks"),r=require("@qxs-bns/utils"),s=require("lodash-es"),a=require("./analyze.cjs"),o=require("./components/area.vue.cjs"),u=require("./components/bar.vue.cjs"),c=require("./components/card.vue.cjs"),n=require("./components/funnel.vue.cjs"),l=require("./components/line.vue.cjs"),i=require("./components/pie.vue.cjs"),p=require("./components/radar.vue.cjs"),d=require("./components/scatter-simple.vue.cjs"),m=require("./components/scatter.vue.cjs"),f=require("./components/table.vue.cjs"),y=require("./utils/config.cjs"),h=require("./utils/injectionKeys.cjs"),q=require("./utils/safe-eval.cjs"),j=require("./utils/types.cjs"),v=require("./utils/useCharts.cjs"),g=e.defineComponent({name:"QxsDataChart",__name:"data-chart",props:{modelName:{type:String,required:!1,default:""},showTypeName:{type:String,required:!1,default:"table"},subShowType:{type:String,required:!1},data:{type:Object,required:!1,default:()=>({data:[],desc:{colDesc:[],showDesc:{showType:0,chartOptions:"{}",jsCodeSnippet:""},groupByDesc:[]}})},chartOptions:{type:null,required:!1,default:()=>({})},jsCodeSnippet:{type:String,required:!1,default:""}},setup(g,{expose:x}){const D=t.useNamespace("data-chart"),b={analyze:a,config:y,types:j},C={table:f.default,bar:u.default,line:l.default,pie:i.default,radar:p.default,scatter:m.default,funnel:n.default,area:o.default,card:c.default,"scatter-simple":d.default},w=e.computed((()=>s.cloneDeep(y.defaultChartOption[g.showTypeName]))),S=e.computed((()=>{const{desc:{colDesc:e=[],groupByDesc:t=[]}={},data:r=[]}=g.data;let s=[],a=null;s=t?.map((e=>(e.xAxis&&(a=e),e)));const o=a?r.filter((e=>e&&e[a.colDesc])):r;return{colDesc:e||[],modelName:g.modelName,subShowType:g.subShowType,xGroupByDesc:a||{colDesc:"",groupByDesc:"",groupByValues:[],xAxis:!1},groupByDesc:s,data:o}}));return x({exportExal:function(){if(0===g.data.data.length)return void console.log("暂无数据");const e=v.useDataToExcelJson(g.data);r.JsonToExcel(g.modelName,e)},QxsDataChartConfig:b}),e.provide(h.InjectionChartMerge,(function(e,t){let r=s.merge({},w.value,e,t)||{};if(g.jsCodeSnippet)try{r=q.safeEvalConfig(g.jsCodeSnippet,r)}catch(e){console.error("代码执行失败:",e)}return r})),(t,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C[t.showTypeName]),{key:t.showTypeName,class:e.normalizeClass([e.unref(D).e("wrapper")]),"sub-show-type":t.subShowType,"chart-data":e.unref(S),"chart-options":t.chartOptions},null,8,["class","sub-show-type","chart-data","chart-options"]))}});exports.default=g;
2
2
  //# sourceMappingURL=data-chart.vue.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-chart.vue.cjs","sources":["../../../../../../packages/components/src/data-chart/src/data-chart.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { EChartData, EChartsOption, IFormatPublicData } from './utils/types'\nimport type { IconRow } from './utils/types'\nimport { useNamespace } from '@qxs-bns/hooks'\nimport { JsonToExcel } from '@qxs-bns/utils'\nimport { cloneDeep, merge as lodashMerge } from 'lodash-es'\nimport Area from './components/area.vue'\nimport Bar from './components/bar.vue'\nimport Card from './components/card.vue'\nimport Funnel from './components/funnel.vue'\nimport Line from './components/line.vue'\nimport Pie from './components/pie.vue'\nimport Radar from './components/radar.vue'\nimport ScatterSimple from './components/scatter-simple.vue'\nimport Scatter from './components/scatter.vue'\nimport Table from './components/table.vue'\nimport { defaultChartOption } from './utils/config'\nimport { InjectionChartMerge } from './utils/injectionKeys'\nimport { safeEvalConfig } from './utils/safe-eval'\nimport { useDataToExcelJson } from './utils/useCharts'\n\ndefineOptions({\n name: 'QxsDataChart',\n})\n\nconst {\n showTypeName = 'table',\n subShowType,\n modelName = '',\n data: propData = {\n data: [],\n desc: {\n colDesc: [],\n showDesc: {\n showType: 0,\n chartOptions: '{}',\n jsCodeSnippet: '',\n },\n groupByDesc: [],\n },\n },\n chartOptions = {},\n jsCodeSnippet = '',\n} = defineProps<{\n modelName?: string\n showTypeName?: IconRow['showTypeName']\n subShowType?: string\n data?: EChartData\n chartOptions?: EChartsOption\n jsCodeSnippet?: string\n}>()\n\nconst ns = useNamespace('data-chart')\n\nconst coms: {\n [key: string]: any\n} = {\n 'table': Table,\n 'bar': Bar,\n 'line': Line,\n 'pie': Pie,\n 'radar': Radar,\n 'scatter': Scatter,\n 'funnel': Funnel,\n 'area': Area,\n 'card': Card,\n 'scatter-simple': ScatterSimple,\n}\n\nconst defaultChartOptionCopy = computed(() => {\n return cloneDeep(defaultChartOption[showTypeName])\n})\n\nconst formatPublicData = computed<IFormatPublicData>(() => {\n const { desc: { colDesc = [], groupByDesc = [] } = {}, data = [] } = propData\n\n // 处理 X 轴数据\n let xValue = []\n\n let xGroupByDesc: EChartData['desc']['groupByDesc'][0] | null = null\n xValue = groupByDesc?.map((groupByDescItem) => {\n // if (groupByDescItem.colValues) {\n // groupByDescItem.colValuesDesc = {}\n // groupByDescItem.colValues.split(',')?.forEach((item) => {\n // const [key, value] = item.split(':')\n // groupByDescItem.colValuesDesc[key] = value\n // })\n // }\n if (groupByDescItem.xAxis) {\n xGroupByDesc = groupByDescItem\n }\n return groupByDescItem\n })\n\n const dataValue = xGroupByDesc ? data.filter(item => item && item[xGroupByDesc!.colDesc!]) : data\n\n // if (xGroupByDesc && xGroupByDesc.colValuesDesc && Object.keys(xGroupByDesc.colValuesDesc).length) {\n // const { colDesc: colDescItem, colValuesDesc } = xGroupByDesc\n // console.log('colDesc: colDescItem, colValuesDesc: ', colDescItem, colValuesDesc)\n // dataValue = dataValue.map((item) => {\n // if (typeof item[colDescItem] === 'number') {\n // item[colDescItem] = colValuesDesc[item[colDescItem]]\n // }\n // return item\n // })\n // }\n\n const mergeConfig = {\n colDesc: colDesc || [],\n modelName,\n subShowType,\n xGroupByDesc: xGroupByDesc || {\n colDesc: '',\n groupByDesc: '',\n groupByValues: [],\n xAxis: false,\n },\n groupByDesc: xValue,\n data: dataValue,\n }\n return mergeConfig\n})\n\n// 导出数据\nfunction exportExal() {\n if (propData.data.length === 0) {\n // useMessage.error('暂无数据')\n console.log('暂无数据')\n return\n }\n const arr = useDataToExcelJson(propData)\n JsonToExcel(modelName, arr)\n}\nfunction merge(config: EChartsOption, defaultConfig: EChartsOption) {\n const mergeOpt = lodashMerge({}, defaultChartOptionCopy.value, config, defaultConfig)\n let conf = mergeOpt || {}\n\n if (jsCodeSnippet) {\n try {\n // 使用安全的配置处理函数\n conf = safeEvalConfig(jsCodeSnippet, conf)\n }\n catch (error) {\n console.error('代码执行失败:', error)\n }\n }\n\n return conf\n}\n\ndefineExpose({\n exportExal,\n})\nprovide(InjectionChartMerge, merge)\n</script>\n\n<template>\n <component\n :is=\"coms[showTypeName]\"\n :key=\"showTypeName\"\n :class=\"[ns.e('wrapper')]\"\n :sub-show-type=\"subShowType\"\n :chart-data=\"formatPublicData\"\n :chart-options=\"chartOptions\"\n />\n</template>\n"],"names":["ns","useNamespace","coms","table","Table","default","bar","Bar","line","Line","pie","Pie","radar","Radar","scatter","Scatter","funnel","Funnel","area","Area","card","Card","ScatterSimple","defaultChartOptionCopy","computed","cloneDeep","defaultChartOption","__props","formatPublicData","desc","colDesc","groupByDesc","data","xValue","xGroupByDesc","map","groupByDescItem","xAxis","dataValue","filter","item","modelName","subShowType","groupByValues","__expose","exportExal","length","console","log","arr","useDataToExcelJson","JsonToExcel","provide","InjectionChartMerge","config","defaultConfig","conf","lodashMerge","value","jsCodeSnippet","safeEvalConfig","error"],"mappings":"yqCAoDM,MAAAA,EAAKC,eAAa,cAElBC,EAEF,CACFC,MAASC,EAAAC,QACTC,IAAOC,EAAAF,QACPG,KAAQC,EAAAJ,QACRK,IAAOC,EAAAN,QACPO,MAASC,EAAAR,QACTS,QAAWC,EAAAV,QACXW,OAAUC,EAAAZ,QACVa,KAAQC,EAAAd,QACRe,KAAQC,EAAAhB,QACR,iBAAkBiB,EAAAA,SAGdC,EAAyBC,EAAAA,UAAS,IAC/BC,YAAUC,EAAAA,mBAAmBC,mBAGhCC,EAAmBJ,EAAAA,UAA4B,KACnD,MAAQK,MAAMC,QAAEA,EAAU,eAAIC,EAAc,IAAO,CAAI,EAAAC,KAAAA,EAAO,IAAOL,EAAAK,KAGrE,IAAIC,EAAS,GAETC,EAA4D,KACvDD,EAAAF,GAAaI,KAAKC,IAQrBA,EAAgBC,QACHH,EAAAE,GAEVA,KAGH,MAAAE,EAAYJ,EAAeF,EAAKO,QAAOC,GAAQA,GAAQA,EAAKN,EAAcJ,WAAaE,EA0BtF,MAba,CAClBF,QAASA,GAAW,GACpBW,UAASd,EAAAc,UACTC,YAAWf,EAAAe,YACXR,aAAcA,GAAgB,CAC5BJ,QAAS,GACTC,YAAa,GACbY,cAAe,GACfN,OAAO,GAETN,YAAaE,EACbD,KAAMM,EAED,WA8BIM,EAAA,CACXC,WA3BF,WACE,GAA6B,IAAzBlB,OAASK,KAAKc,OAGhB,YADAC,QAAQC,IAAI,QAGR,MAAAC,EAAMC,EAAAA,mBAAmBvB,EAAQK,MAC3BmB,cAAAxB,EAAAc,UAAWQ,EAAG,IAsB5BG,EAAAA,QAAQC,uBApBC,SAAMC,EAAuBC,GAEhC,IAAAC,EADaC,EAAAA,MAAY,GAAIlC,EAAuBmC,MAAOJ,EAAQC,IAChD,CAAC,EAExB,GAAI5B,EAAAgC,cACE,IAEKH,EAAAI,EAAAA,eAAejC,gBAAe6B,SAEhCK,GACGd,QAAAc,MAAM,UAAWA,EAAK,CAI3B,OAAAL,CAAA"}
1
+ {"version":3,"file":"data-chart.vue.cjs","sources":["../../../../../../packages/components/src/data-chart/src/data-chart.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { EChartData, EChartsOption, IconRow, IFormatPublicData } from './utils/types'\nimport { useNamespace } from '@qxs-bns/hooks'\nimport { JsonToExcel } from '@qxs-bns/utils'\nimport { cloneDeep, merge as lodashMerge } from 'lodash-es'\nimport * as analyze from './analyze'\nimport Area from './components/area.vue'\nimport Bar from './components/bar.vue'\nimport Card from './components/card.vue'\nimport Funnel from './components/funnel.vue'\nimport Line from './components/line.vue'\nimport Pie from './components/pie.vue'\nimport Radar from './components/radar.vue'\nimport ScatterSimple from './components/scatter-simple.vue'\nimport Scatter from './components/scatter.vue'\nimport Table from './components/table.vue'\nimport * as config from './utils/config'\nimport { defaultChartOption } from './utils/config'\nimport { InjectionChartMerge } from './utils/injectionKeys'\nimport { safeEvalConfig } from './utils/safe-eval'\nimport * as types from './utils/types'\nimport { useDataToExcelJson } from './utils/useCharts'\n\ndefineOptions({\n name: 'QxsDataChart',\n})\nconst {\n showTypeName = 'table',\n subShowType,\n modelName = '',\n data: propData = {\n data: [],\n desc: {\n colDesc: [],\n showDesc: {\n showType: 0,\n chartOptions: '{}',\n jsCodeSnippet: '',\n },\n groupByDesc: [],\n },\n },\n chartOptions = {},\n jsCodeSnippet = '',\n} = defineProps<{\n modelName?: string\n showTypeName?: IconRow['showTypeName']\n subShowType?: string\n data?: EChartData\n chartOptions?: EChartsOption\n jsCodeSnippet?: string\n}>()\n\nconst ns = useNamespace('data-chart')\n\nconst QxsDataChartConfig = {\n analyze,\n config,\n types,\n}\nconst coms: {\n [key: string]: any\n} = {\n 'table': Table,\n 'bar': Bar,\n 'line': Line,\n 'pie': Pie,\n 'radar': Radar,\n 'scatter': Scatter,\n 'funnel': Funnel,\n 'area': Area,\n 'card': Card,\n 'scatter-simple': ScatterSimple,\n}\n\nconst defaultChartOptionCopy = computed(() => {\n return cloneDeep(defaultChartOption[showTypeName])\n})\n\nconst formatPublicData = computed<IFormatPublicData>(() => {\n const { desc: { colDesc = [], groupByDesc = [] } = {}, data = [] } = propData\n\n // 处理 X 轴数据\n let xValue = []\n\n let xGroupByDesc: EChartData['desc']['groupByDesc'][0] | null = null\n xValue = groupByDesc?.map((groupByDescItem) => {\n // if (groupByDescItem.colValues) {\n // groupByDescItem.colValuesDesc = {}\n // groupByDescItem.colValues.split(',')?.forEach((item) => {\n // const [key, value] = item.split(':')\n // groupByDescItem.colValuesDesc[key] = value\n // })\n // }\n if (groupByDescItem.xAxis) {\n xGroupByDesc = groupByDescItem\n }\n return groupByDescItem\n })\n\n const dataValue = xGroupByDesc ? data.filter(item => item && item[xGroupByDesc!.colDesc!]) : data\n\n // if (xGroupByDesc && xGroupByDesc.colValuesDesc && Object.keys(xGroupByDesc.colValuesDesc).length) {\n // const { colDesc: colDescItem, colValuesDesc } = xGroupByDesc\n // console.log('colDesc: colDescItem, colValuesDesc: ', colDescItem, colValuesDesc)\n // dataValue = dataValue.map((item) => {\n // if (typeof item[colDescItem] === 'number') {\n // item[colDescItem] = colValuesDesc[item[colDescItem]]\n // }\n // return item\n // })\n // }\n\n const mergeConfig = {\n colDesc: colDesc || [],\n modelName,\n subShowType,\n xGroupByDesc: xGroupByDesc || {\n colDesc: '',\n groupByDesc: '',\n groupByValues: [],\n xAxis: false,\n },\n groupByDesc: xValue,\n data: dataValue,\n }\n return mergeConfig\n})\n\n// 导出数据\nfunction exportExal() {\n if (propData.data.length === 0) {\n // useMessage.error('暂无数据')\n console.log('暂无数据')\n return\n }\n const arr = useDataToExcelJson(propData)\n JsonToExcel(modelName, arr)\n}\nfunction merge(config: EChartsOption, defaultConfig: EChartsOption) {\n const mergeOpt = lodashMerge({}, defaultChartOptionCopy.value, config, defaultConfig)\n let conf = mergeOpt || {}\n\n if (jsCodeSnippet) {\n try {\n // 使用安全的配置处理函数\n conf = safeEvalConfig(jsCodeSnippet, conf)\n }\n catch (error) {\n console.error('代码执行失败:', error)\n }\n }\n\n return conf\n}\n\ndefineExpose({\n exportExal,\n QxsDataChartConfig,\n})\nprovide(InjectionChartMerge, merge)\n</script>\n\n<template>\n <component\n :is=\"coms[showTypeName]\"\n :key=\"showTypeName\"\n :class=\"[ns.e('wrapper')]\"\n :sub-show-type=\"subShowType\"\n :chart-data=\"formatPublicData\"\n :chart-options=\"chartOptions\"\n />\n</template>\n"],"names":["ns","useNamespace","QxsDataChartConfig","analyze","config","types","coms","table","Table","default","bar","Bar","line","Line","pie","Pie","radar","Radar","scatter","Scatter","funnel","Funnel","area","Area","card","Card","ScatterSimple","defaultChartOptionCopy","computed","cloneDeep","defaultChartOption","__props","formatPublicData","desc","colDesc","groupByDesc","data","xValue","xGroupByDesc","map","groupByDescItem","xAxis","dataValue","filter","item","modelName","subShowType","groupByValues","__expose","exportExal","length","console","log","arr","useDataToExcelJson","JsonToExcel","provide","InjectionChartMerge","defaultConfig","conf","lodashMerge","value","jsCodeSnippet","safeEvalConfig","error"],"mappings":"muCAqDM,MAAAA,EAAKC,eAAa,cAElBC,EAAqB,CACzBC,UACAC,SACAC,SAEIC,EAEF,CACFC,MAASC,EA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L=types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qxs-bns/components",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.52",
5
5
  "description": "Vue 3 Component Library",
6
6
  "license": "MIT",
7
7
  "homepage": "https://trry-hub.github.io/qxs-bns/",
@@ -19,7 +19,7 @@
19
19
  "vue3"
20
20
  ],
21
21
  "sideEffects": false,
22
- "main": "./es/index.mjs",
22
+ "main": "./lib/index.cjs",
23
23
  "module": "./es/index.mjs",
24
24
  "files": [
25
25
  "es",
@@ -41,9 +41,9 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@amap/amap-jsapi-loader": "^1.0.1",
44
- "@qxs-bns/directives": "0.0.17",
45
- "@qxs-bns/hooks": "0.0.2",
46
- "@qxs-bns/utils": "0.0.21",
44
+ "@qxs-bns/directives": "0.0.18",
45
+ "@qxs-bns/hooks": "0.0.4",
46
+ "@qxs-bns/utils": "0.0.24",
47
47
  "@vueuse/core": "^11.3.0",
48
48
  "echarts": "^5.5.1",
49
49
  "lodash-es": "^4.17.21",
@@ -1,20 +1,22 @@
1
- export * from './src/analyze';
2
- export * from './src/utils/types';
3
- export * from './src/utils/config';
4
1
  declare const QxsDataChart: import("../withInstall").SFCWithInstall<import("vue").DefineComponent<{
5
2
  modelName?: string;
6
- showTypeName?: import("./index.ts").IconRow["showTypeName"];
3
+ showTypeName?: import("./src/utils/types.ts").IconRow["showTypeName"];
7
4
  subShowType?: string;
8
- data?: import("./index.ts").EChartData;
5
+ data?: import("./src/utils/types.ts").EChartData;
9
6
  chartOptions?: import("echarts").EChartsOption;
10
7
  jsCodeSnippet?: string;
11
8
  }, {
12
9
  exportExal: () => void;
10
+ QxsDataChartConfig: {
11
+ analyze: typeof import("./src/analyze.ts");
12
+ config: typeof import("./src/utils/config.ts");
13
+ types: typeof import("./src/utils/types.ts");
14
+ };
13
15
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
14
16
  modelName?: string;
15
- showTypeName?: import("./index.ts").IconRow["showTypeName"];
17
+ showTypeName?: import("./src/utils/types.ts").IconRow["showTypeName"];
16
18
  subShowType?: string;
17
- data?: import("./index.ts").EChartData;
19
+ data?: import("./src/utils/types.ts").EChartData;
18
20
  chartOptions?: import("echarts").EChartsOption;
19
21
  jsCodeSnippet?: string;
20
22
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>> & Record<string, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/components/src/data-chart/index.ts"],"names":[],"mappings":"AAGA,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAElC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;wHAAyB,CAAA;AAE3C,OAAO,EACL,YAAY,GACb,CAAA;AACD,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/components/src/data-chart/index.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;wHAAyB,CAAA;AAE3C,OAAO,EACL,YAAY,GACb,CAAA;AACD,eAAe,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"bar.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/data-chart/src/components/bar.vue"],"names":[],"mappings":"AAgMA,OAAO,KAAK,EAEV,aAAa,EACb,iBAAiB,EAElB,MAAM,gBAAgB,CAAA;AAWvB,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,iBAAiB,CAAA;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,aAAa,CAAA;CAC5B,CAAC;;AAoMF,wBAMG"}
1
+ {"version":3,"file":"bar.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/data-chart/src/components/bar.vue"],"names":[],"mappings":"AAuMA,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EAElB,MAAM,gBAAgB,CAAA;AAWvB,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,iBAAiB,CAAA;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,aAAa,CAAA;CAC5B,CAAC;;AA4MF,wBAMG"}
@@ -1,5 +1,7 @@
1
- import type { EChartData, EChartsOption } from './utils/types';
2
- import type { IconRow } from './utils/types';
1
+ import type { EChartData, EChartsOption, IconRow } from './utils/types';
2
+ import * as analyze from './analyze';
3
+ import * as config from './utils/config';
4
+ import * as types from './utils/types';
3
5
  type __VLS_Props = {
4
6
  modelName?: string;
5
7
  showTypeName?: IconRow['showTypeName'];
@@ -11,6 +13,11 @@ type __VLS_Props = {
11
13
  declare function exportExal(): void;
12
14
  declare const _default: import("vue").DefineComponent<__VLS_Props, {
13
15
  exportExal: typeof exportExal;
16
+ QxsDataChartConfig: {
17
+ analyze: typeof analyze;
18
+ config: typeof config;
19
+ types: typeof types;
20
+ };
14
21
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
22
  export default _default;
16
23
  //# sourceMappingURL=data-chart.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-chart.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/data-chart/src/data-chart.vue"],"names":[],"mappings":"AAAA,OAwKO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAqB,MAAM,eAAe,CAAA;AACjF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAuB5C,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,YAAY,CAAC,EAAE,aAAa,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAC;AA6FF,iBAAS,UAAU,SAQlB;;;;AAwED,wBAOG"}
1
+ {"version":3,"file":"data-chart.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/data-chart/src/data-chart.vue"],"names":[],"mappings":"AAAA,OA+KO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAqB,MAAM,eAAe,CAAA;AAI1F,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AAWpC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAIxC,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAMtC,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,YAAY,CAAC,EAAE,aAAa,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAC;AAkGF,iBAAS,UAAU,SAQlB;;;;;;;;;AAyED,wBAOG"}