@orbcharts/presets-basic 3.0.0-alpha.2 → 3.0.0-alpha.3

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 (49) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-presets-basic.es.js +196 -119
  3. package/dist/orbcharts-presets-basic.umd.js +1 -1
  4. package/dist/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING.d.ts +3 -0
  5. package/dist/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT.d.ts +3 -0
  6. package/dist/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT.d.ts +3 -0
  7. package/dist/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT.d.ts +3 -0
  8. package/dist/src/chartParamsFiles/CP_TOP_AND_NO_BOTTOM_PADDING.d.ts +3 -0
  9. package/dist/src/chartParamsFiles/index.d.ts +5 -0
  10. package/dist/src/index.d.ts +3 -0
  11. package/package.json +43 -43
  12. package/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING.ts +14 -0
  13. package/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT.ts +15 -0
  14. package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING.ts +13 -13
  15. package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT.ts +15 -0
  16. package/src/chartParamsFiles/CP_BOTTOM_PADDING.ts +13 -13
  17. package/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT.ts +14 -14
  18. package/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT.ts +15 -0
  19. package/src/chartParamsFiles/CP_LEFT_PADDING.ts +13 -13
  20. package/src/chartParamsFiles/CP_RIGHT_PADDING.ts +13 -13
  21. package/src/chartParamsFiles/CP_TOP_AND_NO_BOTTOM_PADDING.ts +14 -0
  22. package/src/chartParamsFiles/index.ts +9 -4
  23. package/src/createPreset.ts +87 -87
  24. package/src/gridDataFormatterFiles/DF_BOTTOM_VALUE_AXIS.ts +15 -15
  25. package/src/gridPluginParamsFiles/Bars/PP_BARS_ROUND.ts +14 -14
  26. package/src/gridPluginParamsFiles/Bars/PP_BARS_THIN.ts +14 -14
  27. package/src/gridPluginParamsFiles/Bars/index.ts +1 -1
  28. package/src/gridPluginParamsFiles/Dots/PP_DOTS_ONLY_SHOW_HIGHLIGHTED.ts +12 -14
  29. package/src/gridPluginParamsFiles/Dots/PP_DOTS_SOLID.ts +14 -14
  30. package/src/gridPluginParamsFiles/Dots/index.ts +1 -1
  31. package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM.ts +13 -13
  32. package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST.ts +14 -14
  33. package/src/gridPluginParamsFiles/GridLegend/index.ts +1 -1
  34. package/src/gridPluginParamsFiles/GroupAxis/PP_GROUP_AXIS_ROTATE_LABEL.ts +11 -11
  35. package/src/gridPluginParamsFiles/Lines/PP_LINES_CURVE.ts +12 -12
  36. package/src/gridPluginParamsFiles/index.ts +5 -5
  37. package/src/index.ts +124 -114
  38. package/src/seriesPluginParamsFiles/Bubbles/PP_BUBBLES_SCALING_BY_RADIUS.ts +11 -11
  39. package/src/seriesPluginParamsFiles/Pie/PP_PIE_DONUT.ts +12 -12
  40. package/src/seriesPluginParamsFiles/Pie/PP_PIE_HALF_DONUT.ts +14 -14
  41. package/src/seriesPluginParamsFiles/Pie/index.ts +1 -1
  42. package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_HALF_ANGLE.ts +13 -13
  43. package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_INNER.ts +13 -13
  44. package/src/seriesPluginParamsFiles/PieLabels/index.ts +1 -1
  45. package/src/seriesPluginParamsFiles/SeriesLegend/PP_SERIES_LEGEND_ROUND.ts +11 -11
  46. package/src/seriesPluginParamsFiles/index.ts +3 -3
  47. package/src/types.ts +58 -58
  48. package/tsconfig.json +13 -13
  49. package/vite.config.js +44 -44
package/src/types.ts CHANGED
@@ -1,58 +1,58 @@
1
- import type {
2
- ChartParamsPartial,
3
- DataFormatterPartialTypeMap,
4
- ChartType,
5
- Preset } from '@orbcharts/core'
6
- import * as chartParams from './chartParamsFiles'
7
- import * as seriesDataFormatters from './seriesDataFormatterFiles'
8
- import * as seriesPluginParams from './seriesPluginParamsFiles'
9
- import * as gridDataFormatters from './gridDataFormatterFiles'
10
- import * as gridPluginParams from './gridPluginParamsFiles'
11
- import * as multiGridDataFormatters from './multiGridDataFormatterFiles'
12
- import * as multiGridPluginParams from './multiGridPluginParamsFiles'
13
- import * as multiValueDataFormatters from './multiValueDataFormatterFiles'
14
- import * as multiValuePluginParams from './multiValuePluginParamsFiles'
15
- import * as relationshipDataFormatters from './relationshipDataFormatterFiles'
16
- import * as relationshipPluginParams from './relationshipPluginParamsFiles'
17
- import * as treeDataFormatters from './treeDataFormatterFiles'
18
- import * as treePluginParams from './treePluginParamsFiles'
19
-
20
- export interface ChartParamsFile {
21
- id: string
22
- description: string
23
- data: ChartParamsPartial
24
- }
25
-
26
- export interface DataFormatterFile<T extends ChartType> {
27
- id: string
28
- chartType: T
29
- description: string
30
- data: DataFormatterPartialTypeMap<T>
31
- }
32
-
33
- export interface PluginParamsFile<PluginParams> {
34
- id: string
35
- chartType: ChartType
36
- pluginName: string
37
- description: string
38
- data: Partial<PluginParams>
39
- }
40
-
41
- export interface PresetFile<T extends ChartType> {
42
- chartParamsId?: keyof typeof chartParams
43
- dataFormatterId?: T extends 'series' ? keyof typeof seriesDataFormatters
44
- : T extends 'grid' ? keyof typeof gridDataFormatters
45
- : T extends 'multiGrid' ? keyof typeof multiGridDataFormatters
46
- : T extends 'multiValue' ? keyof typeof multiValueDataFormatters
47
- : T extends 'relationship' ? keyof typeof relationshipDataFormatters
48
- : T extends 'tree' ? keyof typeof treeDataFormatters
49
- : undefined
50
- allPluginParamsIds?: T extends 'series' ? (keyof typeof seriesPluginParams)[]
51
- : T extends 'grid' ? (keyof typeof gridPluginParams)[]
52
- : T extends 'multiGrid' ? (keyof typeof multiGridPluginParams)[]
53
- : T extends 'multiValue' ? (keyof typeof multiValuePluginParams)[]
54
- : T extends 'relationship' ? (keyof typeof relationshipPluginParams)[]
55
- : T extends 'tree' ? (keyof typeof treePluginParams)[]
56
- : undefined,
57
- description: string
58
- }
1
+ import type {
2
+ ChartParamsPartial,
3
+ DataFormatterPartialTypeMap,
4
+ ChartType,
5
+ Preset } from '@orbcharts/core'
6
+ import * as chartParams from './chartParamsFiles'
7
+ import * as seriesDataFormatters from './seriesDataFormatterFiles'
8
+ import * as seriesPluginParams from './seriesPluginParamsFiles'
9
+ import * as gridDataFormatters from './gridDataFormatterFiles'
10
+ import * as gridPluginParams from './gridPluginParamsFiles'
11
+ import * as multiGridDataFormatters from './multiGridDataFormatterFiles'
12
+ import * as multiGridPluginParams from './multiGridPluginParamsFiles'
13
+ import * as multiValueDataFormatters from './multiValueDataFormatterFiles'
14
+ import * as multiValuePluginParams from './multiValuePluginParamsFiles'
15
+ import * as relationshipDataFormatters from './relationshipDataFormatterFiles'
16
+ import * as relationshipPluginParams from './relationshipPluginParamsFiles'
17
+ import * as treeDataFormatters from './treeDataFormatterFiles'
18
+ import * as treePluginParams from './treePluginParamsFiles'
19
+
20
+ export interface ChartParamsFile {
21
+ id: string
22
+ description: string
23
+ data: ChartParamsPartial
24
+ }
25
+
26
+ export interface DataFormatterFile<T extends ChartType> {
27
+ id: string
28
+ chartType: T
29
+ description: string
30
+ data: DataFormatterPartialTypeMap<T>
31
+ }
32
+
33
+ export interface PluginParamsFile<PluginParams> {
34
+ id: string
35
+ chartType: ChartType
36
+ pluginName: string
37
+ description: string
38
+ data: Partial<PluginParams>
39
+ }
40
+
41
+ export interface PresetFile<T extends ChartType> {
42
+ chartParamsId?: keyof typeof chartParams
43
+ dataFormatterId?: T extends 'series' ? keyof typeof seriesDataFormatters
44
+ : T extends 'grid' ? keyof typeof gridDataFormatters
45
+ : T extends 'multiGrid' ? keyof typeof multiGridDataFormatters
46
+ : T extends 'multiValue' ? keyof typeof multiValueDataFormatters
47
+ : T extends 'relationship' ? keyof typeof relationshipDataFormatters
48
+ : T extends 'tree' ? keyof typeof treeDataFormatters
49
+ : undefined
50
+ allPluginParamsIds?: T extends 'series' ? (keyof typeof seriesPluginParams)[]
51
+ : T extends 'grid' ? (keyof typeof gridPluginParams)[]
52
+ : T extends 'multiGrid' ? (keyof typeof multiGridPluginParams)[]
53
+ : T extends 'multiValue' ? (keyof typeof multiValuePluginParams)[]
54
+ : T extends 'relationship' ? (keyof typeof relationshipPluginParams)[]
55
+ : T extends 'tree' ? (keyof typeof treePluginParams)[]
56
+ : undefined,
57
+ description: string
58
+ }
package/tsconfig.json CHANGED
@@ -1,14 +1,14 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "./dist/",
4
- "sourceMap": true,
5
- "noImplicitAny": true,
6
- "module": "es6",
7
- "target": "es5",
8
- "jsx": "react",
9
- "allowJs": true,
10
- "moduleResolution": "node",
11
- "allowSyntheticDefaultImports" : true,
12
- "esModuleInterop" : true
13
- }
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "./dist/",
4
+ "sourceMap": true,
5
+ "noImplicitAny": true,
6
+ "module": "es6",
7
+ "target": "es5",
8
+ "jsx": "react",
9
+ "allowJs": true,
10
+ "moduleResolution": "node",
11
+ "allowSyntheticDefaultImports" : true,
12
+ "esModuleInterop" : true
13
+ }
14
14
  }
package/vite.config.js CHANGED
@@ -1,45 +1,45 @@
1
- // import { fileURLToPath, URL } from 'node:url'
2
-
3
- // import { resolve } from 'path'
4
- import { defineConfig } from 'vite'
5
- import dts from 'vite-plugin-dts'
6
-
7
- const releaseConfig = {
8
- plugins: [
9
- dts({
10
- insertTypesEntry: true
11
- })
12
- ],
13
- compilerOptions: {
14
- composite: true
15
- },
16
- build: {
17
- lib: {
18
- entry: "src/index.ts",
19
- name: 'orbcharts-presets-basic',
20
- formats: ["es", "umd"],
21
- fileName: format => `orbcharts-presets-basic.${format}.js`
22
- },
23
- // rollupOptions: {
24
- // input: {
25
- // main: resolve(__dirname, "src/index.ts")
26
- // },
27
- // external: ['vue'],
28
- // output: {
29
- // assetFileNames: 'my-library.css',
30
- // exports: "named",
31
- // globals: {
32
- // vue: 'Vue',
33
- // },
34
- // },
35
- // },
36
- }
37
- }
38
-
39
- export default defineConfig(({ command, mode }) => {
40
- if (mode === 'release') {
41
- return releaseConfig
42
- } else {
43
- return releaseConfig
44
- }
1
+ // import { fileURLToPath, URL } from 'node:url'
2
+
3
+ // import { resolve } from 'path'
4
+ import { defineConfig } from 'vite'
5
+ import dts from 'vite-plugin-dts'
6
+
7
+ const releaseConfig = {
8
+ plugins: [
9
+ dts({
10
+ insertTypesEntry: true
11
+ })
12
+ ],
13
+ compilerOptions: {
14
+ composite: true
15
+ },
16
+ build: {
17
+ lib: {
18
+ entry: "src/index.ts",
19
+ name: 'orbcharts-presets-basic',
20
+ formats: ["es", "umd"],
21
+ fileName: format => `orbcharts-presets-basic.${format}.js`
22
+ },
23
+ // rollupOptions: {
24
+ // input: {
25
+ // main: resolve(__dirname, "src/index.ts")
26
+ // },
27
+ // external: ['vue'],
28
+ // output: {
29
+ // assetFileNames: 'my-library.css',
30
+ // exports: "named",
31
+ // globals: {
32
+ // vue: 'Vue',
33
+ // },
34
+ // },
35
+ // },
36
+ }
37
+ }
38
+
39
+ export default defineConfig(({ command, mode }) => {
40
+ if (mode === 'release') {
41
+ return releaseConfig
42
+ } else {
43
+ return releaseConfig
44
+ }
45
45
  })