-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor to typescript * Upgraded dev dependencies * Remove pnpm from action * Update version
- Loading branch information
Showing
30 changed files
with
6,313 additions
and
7,181 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { AnyObject } from 'chart.js/dist/types/basic'; | ||
import { Chart } from 'chart.js'; | ||
import { ChartData } from 'chart.js/dist/types'; | ||
import { ChartOptions } from 'chart.js/dist/types'; | ||
import { ChartType } from 'chart.js/dist/types'; | ||
import { ChartTypeRegistry } from 'chart.js'; | ||
import { ComponentOptionsMixin } from 'vue'; | ||
import { ComponentProvideOptions } from 'vue'; | ||
import { CoreChartOptions } from 'chart.js'; | ||
import { DatasetChartOptions } from 'chart.js'; | ||
import { _DeepPartialObject } from 'chart.js/dist/types/utils'; | ||
import { DefineComponent } from 'vue'; | ||
import { ElementChartOptions } from 'chart.js'; | ||
import { Plugin as Plugin_2 } from 'chart.js'; | ||
import { PluginChartOptions } from 'chart.js'; | ||
import { PublicProps } from 'vue'; | ||
import { ScaleChartOptions } from 'chart.js'; | ||
|
||
declare type __VLS_Props = { | ||
type: ChartType; | ||
height?: number; | ||
width?: number; | ||
data: ChartData; | ||
options?: ChartOptions; | ||
plugins?: Plugin_2[]; | ||
}; | ||
|
||
declare const _default: DefineComponent<__VLS_Props, { | ||
chartJSState: { | ||
chart: Chart | null; | ||
plugins: Plugin_2<keyof ChartTypeRegistry, AnyObject>[]; | ||
props: { | ||
type: ChartType; | ||
height: number; | ||
width: number; | ||
data: ChartData; | ||
options: _DeepPartialObject<CoreChartOptions<keyof ChartTypeRegistry> & ElementChartOptions<keyof ChartTypeRegistry> & PluginChartOptions<keyof ChartTypeRegistry> & DatasetChartOptions<keyof ChartTypeRegistry> & ScaleChartOptions<keyof ChartTypeRegistry>>; | ||
plugins: Plugin_2<keyof ChartTypeRegistry, AnyObject>[]; | ||
}; | ||
}; | ||
render: () => void; | ||
destroy: () => void; | ||
update: (mode?: UpdateMode) => void; | ||
resize: () => void; | ||
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, { | ||
plugins: Plugin_2[]; | ||
options: ChartOptions; | ||
}, {}, {}, {}, string, ComponentProvideOptions, false, { | ||
chartRef: HTMLCanvasElement; | ||
}, HTMLCanvasElement>; | ||
export default _default; | ||
|
||
declare type UpdateMode = 'resize' | 'reset' | 'default' | 'none' | 'hide' | 'show' | 'active'; | ||
|
||
export { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Chart, Plugin } from 'chart.js'; | ||
import { ChartType, ChartData, ChartOptions } from 'chart.js/dist/types'; | ||
type UpdateMode = 'resize' | 'reset' | 'default' | 'none' | 'hide' | 'show' | 'active'; | ||
type __VLS_Props = { | ||
type: ChartType; | ||
height?: number; | ||
width?: number; | ||
data: ChartData; | ||
options?: ChartOptions; | ||
plugins?: Plugin[]; | ||
}; | ||
declare const _default: import("vue").DefineComponent<__VLS_Props, { | ||
chartJSState: { | ||
chart: Chart | null; | ||
plugins: Plugin<keyof import("chart.js").ChartTypeRegistry, import("chart.js/dist/types/basic").AnyObject>[]; | ||
props: { | ||
type: ChartType; | ||
height: number; | ||
width: number; | ||
data: ChartData; | ||
options: import("chart.js/dist/types/utils")._DeepPartialObject<import("chart.js").CoreChartOptions<keyof import("chart.js").ChartTypeRegistry> & import("chart.js").ElementChartOptions<keyof import("chart.js").ChartTypeRegistry> & import("chart.js").PluginChartOptions<keyof import("chart.js").ChartTypeRegistry> & import("chart.js").DatasetChartOptions<keyof import("chart.js").ChartTypeRegistry> & import("chart.js").ScaleChartOptions<keyof import("chart.js").ChartTypeRegistry>>; | ||
plugins: Plugin<keyof import("chart.js").ChartTypeRegistry, import("chart.js/dist/types/basic").AnyObject>[]; | ||
}; | ||
}; | ||
render: () => void; | ||
destroy: () => void; | ||
update: (mode?: UpdateMode) => void; | ||
resize: () => void; | ||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, { | ||
plugins: Plugin[]; | ||
options: ChartOptions; | ||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, { | ||
chartRef: HTMLCanvasElement; | ||
}, HTMLCanvasElement>; | ||
export default _default; | ||
//# sourceMappingURL=Vue3ChartJs.vue.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Ref, VNodeRef, EmitFn } from 'vue'; | ||
declare const chartJsEventNames: string[]; | ||
interface EventObject { | ||
type: string; | ||
chartRef?: Ref<VNodeRef | null>; | ||
preventDefault: () => void; | ||
isDefaultPrevented: () => boolean; | ||
_defaultPrevented: boolean; | ||
} | ||
declare function generateEventObject(type: string, chartRef?: Ref<VNodeRef | null>): EventObject; | ||
declare function generateChartJsEventListener(emit: EmitFn, event: EventObject): { | ||
[x: string]: () => boolean; | ||
}; | ||
export { chartJsEventNames, generateEventObject, generateChartJsEventListener, }; | ||
//# sourceMappingURL=includes.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Vue3ChartJs from './Vue3ChartJs.vue'; | ||
export default Vue3ChartJs; | ||
//# sourceMappingURL=main.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// eslint.config.mjs | ||
import pluginVue from 'eslint-plugin-vue' | ||
import { | ||
defineConfigWithVueTs, | ||
vueTsConfigs, | ||
} from '@vue/eslint-config-typescript' | ||
|
||
export default defineConfigWithVueTs( | ||
pluginVue.configs['flat/essential'], | ||
vueTsConfigs.recommended, | ||
) |
Oops, something went wrong.