{"version":3,"file":"bubble-chart.mjs","sources":["../../../../../../packages/components/chart/src/bubble-chart.vue"],"sourcesContent":["<template>\n  <Bubble\n    :options=\"computedChartOptions\"\n    :data=\"chartData\"\n    :chart-id=\"chartId\"\n    :dataset-id-key=\"datasetIdKey\"\n    :plugins=\"plugins\"\n    :width=\"width\"\n    :height=\"height\"\n    data-test-name=\"bubble-chart\"\n    data-test-variant=\"\"\n    data-test-state=\"\"\n  />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { Bubble } from 'vue-chartjs'\n\nimport * as ChartJS from 'chart.js'\nimport { cloneDeep, merge } from 'lodash-unified'\nimport { getChartDefaultOptions } from './utils'\nimport type { PropType } from 'vue'\nimport type { BubbleDataPoint, ChartData, ChartOptions, Plugin } from 'chart.js'\n\nconst { Chart, Legend, LinearScale, PointElement, Title, Tooltip } = ChartJS\nChart.register(Title, Tooltip, Legend, PointElement, LinearScale)\n\ndefineOptions({ name: 'BBubbleChart' })\n\nconst props = defineProps({\n  chartId: {\n    type: String,\n    default: 'bubble-chart',\n  },\n  datasetIdKey: {\n    type: String,\n    default: 'label',\n  },\n  width: {\n    type: Number,\n    default: 480,\n  },\n  height: {\n    type: Number,\n    default: 240,\n  },\n  plugins: {\n    type: Array as PropType<Plugin<'bubble'>[]>,\n    default: () => [],\n  },\n  chartData: {\n    type: Object as PropType<ChartData<'bubble', BubbleDataPoint[], unknown>>,\n    default: () => ({ datasets: [] }),\n  },\n  chartOptions: {\n    type: Object as PropType<ChartOptions<'bubble'>>,\n    default: () => ({ responsive: true, maintainAspectRatio: true }),\n  },\n})\n\nconst defaultOptions = cloneDeep(\n  getChartDefaultOptions('bubble')\n) as ChartOptions<'bubble'>\n\nconst computedChartOptions = computed(() =>\n  merge(defaultOptions, props.chartOptions)\n)\n</script>\n"],"names":[],"mappings":";;;;;;;oCA4Bc,EAAE,IAAA,EAAM,gBAAe,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAHrC,IAAA,MAAM,EAAE,KAAO,EAAA,MAAA,EAAQ,aAAa,YAAc,EAAA,KAAA,EAAO,SAAY,GAAA,OAAA,CAAA;AACrE,IAAA,KAAA,CAAM,QAAS,CAAA,KAAA,EAAO,OAAS,EAAA,MAAA,EAAQ,cAAc,WAAW,CAAA,CAAA;AAmChE,IAAA,MAAM,cAAiB,GAAA,SAAA;AAAA,MACrB,uBAAuB,QAAQ,CAAA;AAAA,KACjC,CAAA;AAEA,IAAA,MAAM,oBAAuB,GAAA,QAAA;AAAA,MAAS,MACpC,KAAA,CAAM,cAAgB,EAAA,KAAA,CAAM,YAAY,CAAA;AAAA,KAC1C,CAAA;;;;;;;;;;;;;;;;;;;;;"}