├── .browserslistrc ├── .gitignore ├── LICENSE ├── README.md ├── jest.config.js ├── package.json ├── rollup.config.mjs ├── src ├── CChart.ts ├── __tests__ │ └── CChart.spec.ts └── index.ts └── tsconfig.json /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not ie <= 8 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Folders to ignore 2 | .DS_Store 3 | coverage/ 4 | dist/ 5 | node_modules/ 6 | yarn.lock 7 | 8 | # local env files 9 | .env.local 10 | .env.*.local 11 | 12 | # Log files 13 | npm-debug.log* 14 | yarn-debug.log* 15 | yarn-error.log* 16 | 17 | # Editor directories and files 18 | .idea 19 | .vscode 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw* 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 creativeLabs Łukasz Holeczek 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | CoreUI logo 8 | 9 |

10 | 11 |

CoreUI Vue.js wrapper for Chart.js

12 | 13 |

14 | Explore @coreui/vue-chartjs docs & examples » 15 |
16 |
17 | Report bug 18 | · 19 | Request feature 20 | · 21 | Blog 22 |

23 | 24 | ## Status 25 | 26 | [![npm package][npm-badge]][npm] 27 | [![NPM downloads][npm-download]][npm] 28 | 29 | [npm-badge]: https://img.shields.io/npm/v/@coreui/vue-chartjs/latest?style=flat-square 30 | [npm]: https://www.npmjs.com/package/@coreui/vue-chartjs 31 | [npm-download]: https://img.shields.io/npm/dm/@coreui/vue-chartjs.svg?style=flat-square 32 | 33 | ##### install: 34 | 35 | ```bash 36 | npm install @coreui/vue-chartjs 37 | 38 | # or 39 | 40 | yarn add @coreui/vue-chartjs 41 | ``` 42 | 43 | ##### import: 44 | 45 | ```jsx 46 | import { CChart } from '@coreui/vue-chartjs' 47 | ``` 48 | 49 | or 50 | 51 | ```js 52 | import { 53 | CChart, 54 | CChartBar, 55 | CChartHorizontalBar, 56 | CChartLine, 57 | CChartDoughnut, 58 | CChartRadar, 59 | CChartPie, 60 | CChartPolarArea, 61 | } from '@coreui/vue-chartjs' 62 | ``` 63 | 64 | ##### props: 65 | 66 | ```js 67 | /** 68 | * Enables custom html based tooltips instead of standard tooltips. 69 | * 70 | * @default true 71 | */ 72 | customTooltips: { 73 | type: Boolean, 74 | default: true, 75 | required: false, 76 | }, 77 | /** 78 | * The data object that is passed into the Chart.js chart (more info). 79 | */ 80 | data: { 81 | type: [Object, Function] as PropType ChartData)>, 82 | required: true, 83 | }, 84 | /** 85 | * Height attribute applied to the rendered canvas. 86 | * 87 | * @default 150 88 | */ 89 | height: { 90 | type: Number, 91 | default: 150, 92 | required: false, 93 | }, 94 | /** 95 | * ID attribute applied to the rendered canvas. 96 | */ 97 | id: { 98 | type: String, 99 | default: undefined, 100 | required: false, 101 | }, 102 | /** 103 | * The options object that is passed into the Chart.js chart. 104 | * 105 | * {@link https://www.chartjs.org/docs/latest/general/options.html More Info} 106 | */ 107 | options: { 108 | type: Object as PropType, 109 | default: undefined, 110 | required: false, 111 | }, 112 | /** 113 | * The plugins array that is passed into the Chart.js chart (more info) 114 | * 115 | * {@link https://www.chartjs.org/docs/latest/developers/plugins.html More Info} 116 | */ 117 | plugins: { 118 | type: Array as PropType, 119 | default: undefined, 120 | }, 121 | /** 122 | * If true, will tear down and redraw chart on all updates. 123 | */ 124 | redraw: Boolean, 125 | /** 126 | * Chart.js chart type. 127 | * 128 | * @type {'line' | 'bar' | 'radar' | 'doughnut' | 'polarArea' | 'bubble' | 'pie' | 'scatter'} 129 | */ 130 | type: { 131 | type: String as PropType, 132 | default: 'bar', 133 | required: false, 134 | }, 135 | /** 136 | * Width attribute applied to the rendered canvas. 137 | * 138 | * @default 300 139 | */ 140 | width: { 141 | type: Number, 142 | default: 300, 143 | required: false, 144 | }, 145 | /** 146 | * Put the chart into the wrapper div element. 147 | * 148 | * @default true 149 | */ 150 | wrapper: { 151 | type: Boolean, 152 | default: true, 153 | required: false, 154 | }, 155 | ``` 156 | 157 | ##### usage: 158 | 159 | ```vue 160 | 184 | ``` -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2013-present, creativeLabs Lukasz Holeczek. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict' 9 | 10 | module.exports = { 11 | moduleFileExtensions: ['tsx', 'js', 'ts', 'json', 'vue'], 12 | preset: 'ts-jest', 13 | setupFiles: ['jest-canvas-mock'], 14 | testEnvironment: 'jsdom', 15 | testEnvironmentOptions: { 16 | customExportConditions: ['node', 'node-addons'], 17 | }, 18 | testPathIgnorePatterns: ['dist/'], 19 | transform: { 20 | '.*\\.(ts)$': 'ts-jest', 21 | '.*\\.(vue)$': '@vue/vue3-jest', 22 | }, 23 | } 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@coreui/vue-chartjs", 3 | "version": "3.0.0", 4 | "description": "Vue component wrapper for Chart.js", 5 | "keywords": [ 6 | "coreui", 7 | "chart.js", 8 | "vue chart.js", 9 | "coreui-vue", 10 | "vue charts", 11 | "vue chart components", 12 | "layout", 13 | "charts", 14 | "vue chart.js implementation", 15 | "component" 16 | ], 17 | "homepage": "https://coreui.io/vue/", 18 | "bugs": { 19 | "url": "https://github.com/coreui/coreui-vue/issues" 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "url": "https://github.com/coreui/coreui-vue.git" 24 | }, 25 | "license": "MIT", 26 | "author": "The CoreUI Team (https://github.com/orgs/coreui/people)", 27 | "main": "dist/cjs/index.js", 28 | "module": "dist/esm/index.js", 29 | "jsnext:main": "dist/esm/index.js", 30 | "types": "dist/esm/index.d.ts", 31 | "files": [ 32 | "dist/", 33 | "src/" 34 | ], 35 | "scripts": { 36 | "build": "rollup --config", 37 | "test": "jest --coverage", 38 | "test:clear": "jest --clearCache", 39 | "test:update": "jest --coverage --updateSnapshot" 40 | }, 41 | "dependencies": { 42 | "@coreui/chartjs": "^4.0.0", 43 | "chart.js": "^4.4.4" 44 | }, 45 | "devDependencies": { 46 | "@rollup/plugin-commonjs": "^26.0.1", 47 | "@rollup/plugin-node-resolve": "^15.2.3", 48 | "@rollup/plugin-typescript": "^11.1.6", 49 | "@types/lodash": "^4.17.7", 50 | "@types/jest": "^29.5.13", 51 | "@vue/test-utils": "^2.4.6", 52 | "@vue/vue3-jest": "29.2.6", 53 | "jest": "^29.7.0", 54 | "jest-canvas-mock": "^2.5.2", 55 | "jest-environment-jsdom": "^29.7.0", 56 | "lodash": "^4.17.21", 57 | "rollup": "^4.21.3", 58 | "rollup-plugin-vue": "^6.0.0", 59 | "ts-jest": "^29.2.5", 60 | "tslib": "^2.7.0", 61 | "typescript": "^5.6.2", 62 | "vue": "^3.5.5", 63 | "vue-types": "^5.1.3" 64 | }, 65 | "peerDependencies": { 66 | "vue": "^3.2.21" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import commonjs from '@rollup/plugin-commonjs' 2 | import typescript from '@rollup/plugin-typescript' 3 | import resolve from '@rollup/plugin-node-resolve' 4 | import vue from 'rollup-plugin-vue' 5 | import { readFileSync } from 'node:fs' 6 | 7 | const pkg = JSON.parse(readFileSync(new URL('package.json', import.meta.url))) 8 | 9 | const plugins = [ 10 | resolve({ 11 | dedupe: ['vue'], 12 | extensions: ['.js', '.ts', '.json', '.vue'], 13 | }), 14 | typescript({ 15 | exclude: ['**/__tests__/**'], 16 | tsconfig: './tsconfig.json', 17 | }), 18 | commonjs({ 19 | include: ['../../node_modules/**'], 20 | }), 21 | ] 22 | 23 | export default [ 24 | // ESM build to be used with webpack/rollup. 25 | { 26 | input: 'src/index.ts', 27 | output: { 28 | format: 'es', 29 | file: pkg.module, 30 | exports: 'named', 31 | sourcemap: true, 32 | }, 33 | external: ['chart.js', 'vue'], 34 | plugins: [...plugins, vue()], 35 | }, 36 | // SSR build. 37 | { 38 | input: 'src/index.ts', 39 | output: { 40 | format: 'cjs', 41 | file: pkg.main, 42 | exports: 'named', 43 | sourcemap: true, 44 | }, 45 | external: ['chart.js', 'vue'], 46 | plugins: [...plugins, vue({ template: { optimizeSSR: true } })], 47 | }, 48 | ] 49 | -------------------------------------------------------------------------------- /src/CChart.ts: -------------------------------------------------------------------------------- 1 | import { 2 | computed, 3 | defineComponent, 4 | h, 5 | onMounted, 6 | onUnmounted, 7 | onUpdated, 8 | PropType, 9 | ref, 10 | Ref, 11 | shallowRef, 12 | } from 'vue' 13 | 14 | import Chart, { ChartData, ChartOptions, ChartType, Plugin } from 'chart.js/auto' 15 | import { customTooltips as cuiCustomTooltips } from '@coreui/chartjs' 16 | 17 | import assign from 'lodash/assign' 18 | import find from 'lodash/find' 19 | import merge from 'lodash/merge' 20 | 21 | const CChart = defineComponent({ 22 | name: 'CChart', 23 | props: { 24 | /** 25 | * Enables custom html based tooltips instead of standard tooltips. 26 | * 27 | * @default true 28 | */ 29 | customTooltips: { 30 | type: Boolean, 31 | default: true, 32 | }, 33 | /** 34 | * The data object that is passed into the Chart.js chart (more info). 35 | */ 36 | data: { 37 | type: [Object, Function] as PropType ChartData)>, 38 | required: true, 39 | }, 40 | /** 41 | * Height attribute applied to the rendered canvas. 42 | * 43 | * @default 150 44 | */ 45 | height: { 46 | type: Number, 47 | default: 150, 48 | }, 49 | /** 50 | * ID attribute applied to the rendered canvas. 51 | */ 52 | id: { 53 | type: String, 54 | }, 55 | /** 56 | * The options object that is passed into the Chart.js chartRef.value. 57 | * 58 | * {@link https://www.chartjs.org/docs/latest/general/options.html More Info} 59 | */ 60 | options: { 61 | type: Object as PropType, 62 | }, 63 | /** 64 | * The plugins array that is passed into the Chart.js chart (more info) 65 | * 66 | * {@link https://www.chartjs.org/docs/latest/developers/plugins.html More Info} 67 | */ 68 | plugins: { 69 | type: Array as PropType, 70 | }, 71 | /** 72 | * If true, will tear down and redraw chart on all updates. 73 | */ 74 | redraw: Boolean, 75 | /** 76 | * Chart.js chart type. 77 | * 78 | * @type 'line' | 'bar' | 'radar' | 'doughnut' | 'polarArea' | 'bubble' | 'pie' | 'scatter' 79 | */ 80 | type: { 81 | type: String as PropType, 82 | default: 'bar', 83 | }, 84 | /** 85 | * Width attribute applied to the rendered canvas. 86 | * 87 | * @default 300 88 | */ 89 | width: { 90 | type: Number, 91 | default: 300, 92 | }, 93 | /** 94 | * Put the chart into the wrapper div element. 95 | * 96 | * @default true 97 | */ 98 | wrapper: { 99 | type: Boolean, 100 | default: true, 101 | }, 102 | }, 103 | emits: [ 104 | /** 105 | * Proxy for Chart.js getDatasetAtEvent. Calls with dataset and triggering event. 106 | */ 107 | 'getDatasetAtEvent', 108 | /** 109 | * Proxy for Chart.js getElementAtEvent. Calls with single element array and triggering event. 110 | */ 111 | 'getElementAtEvent', 112 | /** 113 | * Proxy for Chart.js getElementsAtEvent. Calls with element array and triggering event. 114 | */ 115 | 'getElementsAtEvent', 116 | ], 117 | setup(props, { expose, emit, slots }) { 118 | const canvasRef = ref(null) 119 | const chartRef = shallowRef(null) 120 | 121 | const computedData = computed(() => 122 | typeof props.data === 'function' 123 | ? canvasRef.value 124 | ? props.data(canvasRef.value) 125 | : { datasets: [] } 126 | : merge({}, props.data), 127 | ) 128 | 129 | const computedOptions = computed(() => 130 | props.customTooltips 131 | ? merge({}, props.options, { 132 | plugins: { 133 | tooltip: { 134 | enabled: false, 135 | mode: 'index', 136 | position: 'nearest', 137 | external: cuiCustomTooltips, 138 | }, 139 | }, 140 | }) 141 | : props.options, 142 | ) 143 | 144 | const renderChart = () => { 145 | if (!canvasRef.value) return 146 | 147 | chartRef.value = new Chart(canvasRef.value, { 148 | type: props.type, 149 | data: computedData.value, 150 | options: computedOptions.value, 151 | plugins: props.plugins, 152 | }) 153 | } 154 | 155 | const handleOnClick = (e: Event) => { 156 | if (!chartRef.value) return 157 | 158 | emit( 159 | 'getDatasetAtEvent', 160 | chartRef.value.getElementsAtEventForMode(e, 'dataset', { intersect: true }, false), 161 | e, 162 | ) 163 | emit( 164 | 'getElementAtEvent', 165 | chartRef.value.getElementsAtEventForMode(e, 'nearest', { intersect: true }, false), 166 | e, 167 | ) 168 | emit( 169 | 'getElementsAtEvent', 170 | chartRef.value.getElementsAtEventForMode(e, 'index', { intersect: true }, false), 171 | e, 172 | ) 173 | } 174 | 175 | const updateChart = () => { 176 | if (!chartRef.value) return 177 | 178 | if (props.options) { 179 | chartRef.value.options = { ...props.options } 180 | } 181 | 182 | if (!chartRef.value.config.data) { 183 | chartRef.value.config.data = computedData.value 184 | chartRef.value.update() 185 | return 186 | } 187 | 188 | const { datasets: newDataSets = [], ...newChartData } = computedData.value 189 | const { datasets: currentDataSets = [] } = chartRef.value.config.data 190 | 191 | // copy values 192 | assign(chartRef.value.config.data, newChartData) 193 | chartRef.value.config.data.datasets = newDataSets.map((newDataSet: any) => { 194 | // given the new set, find it's current match 195 | const currentDataSet = find( 196 | currentDataSets, 197 | (d: any) => d.label === newDataSet.label && d.type === newDataSet.type, 198 | ) 199 | 200 | // There is no original to update, so simply add new one 201 | if (!currentDataSet || !newDataSet.data) return newDataSet 202 | 203 | if (!currentDataSet.data) { 204 | currentDataSet.data = [] 205 | } else { 206 | currentDataSet.data.length = newDataSet.data.length 207 | } 208 | 209 | // copy in values 210 | assign(currentDataSet.data, newDataSet.data) 211 | 212 | // apply dataset changes, but keep copied data 213 | return { 214 | ...currentDataSet, 215 | ...newDataSet, 216 | data: currentDataSet.data, 217 | } 218 | }) 219 | 220 | chartRef.value && chartRef.value.update() 221 | } 222 | 223 | const destroyChart = () => { 224 | if (chartRef.value) chartRef.value.destroy() 225 | } 226 | 227 | onMounted(() => { 228 | renderChart() 229 | }) 230 | 231 | onUnmounted(() => { 232 | destroyChart() 233 | }) 234 | 235 | onUpdated(() => { 236 | if (props.redraw) { 237 | destroyChart() 238 | setTimeout(() => { 239 | renderChart() 240 | }, 0) 241 | } else { 242 | updateChart() 243 | } 244 | }) 245 | 246 | const canvas = (ref: Ref) => 247 | h( 248 | 'canvas', 249 | { 250 | id: props.id, 251 | height: props.height, 252 | width: props.width, 253 | onClick: (e: Event) => handleOnClick(e), 254 | role: 'img', 255 | ref: ref, 256 | }, 257 | { 258 | fallbackContent: () => slots.fallback && slots.fallback(), 259 | }, 260 | ) 261 | 262 | expose({ chart: chartRef }) 263 | 264 | return () => 265 | props.wrapper ? h('div', { class: 'chart-wrapper' }, canvas(canvasRef)) : canvas(canvasRef) 266 | }, 267 | }) 268 | 269 | export default CChart 270 | -------------------------------------------------------------------------------- /src/__tests__/CChart.spec.ts: -------------------------------------------------------------------------------- 1 | import { mount } from '@vue/test-utils' 2 | import Chart from 'chart.js/auto' 3 | import CChart from './../index' 4 | 5 | class ResizeObserver { 6 | // eslint-disable-next-line @typescript-eslint/no-empty-function 7 | observe() {} 8 | // eslint-disable-next-line @typescript-eslint/no-empty-function 9 | unobserve() {} 10 | // eslint-disable-next-line @typescript-eslint/no-empty-function 11 | disconnect() {} 12 | } 13 | 14 | window.ResizeObserver = ResizeObserver 15 | 16 | describe('', () => { 17 | const data = { 18 | labels: ['red', 'blue'], 19 | datasets: [{ label: 'colors', data: [1, 2] }], 20 | } 21 | 22 | const options = { 23 | responsive: false, 24 | } 25 | 26 | let chart: any, update: any, destroy: any 27 | const ref = (el: Chart | null): void => { 28 | chart = el 29 | 30 | if (chart) { 31 | update = jest.spyOn(chart, 'update') 32 | destroy = jest.spyOn(chart, 'destroy') 33 | } 34 | } 35 | 36 | beforeEach(() => { 37 | chart = null 38 | }) 39 | 40 | afterEach(() => { 41 | if (chart) chart.destroy() 42 | if (update) update.mockClear() 43 | if (destroy) destroy.mockClear() 44 | }) 45 | 46 | it('should not pollute props', () => { 47 | mount(CChart, { 48 | propsData: { 49 | data: data, 50 | options: options, 51 | wrapper: false, 52 | }, 53 | attrs: { 54 | ref: ref, 55 | } 56 | }) 57 | 58 | expect(data).toStrictEqual({ 59 | labels: ['red', 'blue'], 60 | datasets: [{ label: 'colors', data: [1, 2] }], 61 | }) 62 | }) 63 | }) 64 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable vue/one-component-per-file */ 2 | import { App, defineComponent, h } from 'vue' 3 | import CChart from './CChart' 4 | 5 | const CChartBar = defineComponent({ 6 | name: 'CChartBar', 7 | extends: CChart, 8 | setup(props) { 9 | return () => h(CChart, { ...props, type: 'bar' }) 10 | }, 11 | }) 12 | 13 | const CChartBubble = defineComponent({ 14 | name: 'CChartBubble', 15 | extends: CChart, 16 | setup(props) { 17 | return () => h(CChart, { ...props, type: 'bubble' }) 18 | }, 19 | }) 20 | 21 | const CChartDoughnut = defineComponent({ 22 | name: 'CChartDoughnut', 23 | extends: CChart, 24 | setup(props) { 25 | return () => h(CChart, { ...props, type: 'doughnut' }) 26 | }, 27 | }) 28 | 29 | const CChartLine = defineComponent({ 30 | name: 'CChartLine', 31 | extends: CChart, 32 | setup(props) { 33 | return () => h(CChart, { ...props, type: 'line' }) 34 | }, 35 | }) 36 | 37 | const CChartPie = defineComponent({ 38 | name: 'CChartPie', 39 | extends: CChart, 40 | setup(props) { 41 | return () => h(CChart, { ...props, type: 'pie' }) 42 | }, 43 | }) 44 | 45 | const CChartPolarArea = defineComponent({ 46 | name: 'CChartPolarArea', 47 | extends: CChart, 48 | setup(props) { 49 | return () => h(CChart, { ...props, type: 'polarArea' }) 50 | }, 51 | }) 52 | 53 | const CChartRadar = defineComponent({ 54 | name: 'CChartRadar', 55 | extends: CChart, 56 | setup(props) { 57 | return () => h(CChart, { ...props, type: 'radar' }) 58 | }, 59 | }) 60 | 61 | const CChartScatter = defineComponent({ 62 | name: 'CChartScatter', 63 | extends: CChart, 64 | setup(props) { 65 | return () => h(CChart, { ...props, type: 'scatter' }) 66 | }, 67 | }) 68 | 69 | const CChartPlugin = { 70 | install: (app: App): void => { 71 | app.component('CChart', CChart) 72 | app.component('CChartBar', CChartBar) 73 | app.component('CChartBubble', CChartBubble) 74 | app.component('CChartDoughnut', CChartDoughnut) 75 | app.component('CChartLine', CChartLine) 76 | app.component('CChartPie', CChartPie) 77 | app.component('CChartPolarArea', CChartPolarArea) 78 | app.component('CChartRadar', CChartRadar) 79 | app.component('CChartScatter', CChartScatter) 80 | }, 81 | } 82 | 83 | export default CChartPlugin 84 | 85 | export { 86 | CChart, 87 | CChartBar, 88 | CChartBubble, 89 | CChartDoughnut, 90 | CChartLine, 91 | CChartPie, 92 | CChartPolarArea, 93 | CChartRadar, 94 | CChartScatter, 95 | } 96 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "jsx": "preserve", 4 | "outDir": "dist", 5 | "module": "esnext", 6 | "target": "esnext", 7 | "strict": true, 8 | "lib": ["es6", "dom", "es2016", "es2017"], 9 | "sourceMap": true, 10 | "allowJs": false, 11 | "declaration": true, 12 | "declarationDir": ".", 13 | "moduleResolution": "node", 14 | "forceConsistentCasingInFileNames": true, 15 | "noImplicitReturns": true, 16 | "noImplicitThis": true, 17 | "noImplicitAny": true, 18 | "strictNullChecks": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "esModuleInterop": true, 22 | "resolveJsonModule": true, 23 | "paths": { 24 | "@coreui/vue": ["./packages/coreui-vue/src"], 25 | "@coreui/vue/*": ["./packages/coreui-vue/src/*"], 26 | "@coreui/vue-chartjs": ["./packages/coreui-vue-chartjs/src"], 27 | "@coreui/vue-chartjs/*": ["./packages/coreui-vue-chartjs/src/*"] 28 | } 29 | }, 30 | "exclude": ["**/node_modules", "**/dist"], 31 | "include": ["src/**/*"] 32 | } --------------------------------------------------------------------------------