@opendata-ai/openchart-vue 7.11.0 → 8.0.0-rc.10
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.
- package/dist/index.d.ts +158 -5
- package/dist/index.js +364 -90
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2 -1
- package/dist/styles.css.map +1 -0
- package/package.json +4 -4
- package/src/Chart.ts +7 -1
- package/src/ChartStory.ts +184 -0
- package/src/Map.ts +158 -0
- package/src/Visualization.ts +5 -0
- package/src/__tests__/ChartStory.test.ts +70 -0
- package/src/index.ts +7 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { BarListSpec, ThemeConfig, DarkMode, ChartSpec, LayerSpec, GraphSpec, ElementRef, MarkEvent, Annotation, TextAnnotation, AnnotationOffset, ElementEdit, ChartLayout, TableSpec, SortState, SankeySpec, TileMapSpec, VizSpec } from '@opendata-ai/openchart-core';
|
|
1
|
+
import { BarListSpec, ThemeConfig, DarkMode, ChartSpec, LayerSpec, GraphSpec, ElementRef, MarkEvent, Annotation, TextAnnotation, AnnotationOffset, ElementEdit, MapSpec, ChartLayout, TableSpec, SortState, SankeySpec, TileMapSpec, VizSpec } from '@opendata-ai/openchart-core';
|
|
2
2
|
export * from '@opendata-ai/openchart-core';
|
|
3
|
-
import { MountOptions, ChartInstance, GraphInstance, TableInstance, TableState, TableMountOptions } from '@opendata-ai/openchart-vanilla';
|
|
3
|
+
import { MountOptions, ChartInstance, GraphInstance, TableInstance, TableState, TableMountOptions, MapMarkEvent } from '@opendata-ai/openchart-vanilla';
|
|
4
4
|
export { JPGExportOptions, PNGExportOptions, exportCSV, exportJPG, exportPNG, exportSVG } from '@opendata-ai/openchart-vanilla';
|
|
5
|
-
export { ChartRenderer, CompileResult, CompiledGraphEdge, CompiledGraphNode, GraphCompilation, NormalizedBarListSpec, NormalizedChartSpec, NormalizedChrome, NormalizedGraphSpec, NormalizedSankeySpec, NormalizedSpec, NormalizedTableSpec, SimulationConfig, ValidationError, ValidationErrorCode, ValidationResult, clearRenderers, compile, compileBarList, compileChart, compileGraph, compileSankey, compileTable, getChartRenderer, normalizeSpec, registerChartRenderer, validateSpec } from '@opendata-ai/openchart-engine';
|
|
5
|
+
export { ChartRenderer, CompileResult, CompiledGraphEdge, CompiledGraphNode, GraphCompilation, NormalizedBarListSpec, NormalizedChartSpec, NormalizedChrome, NormalizedGraphSpec, NormalizedMapSpec, NormalizedSankeySpec, NormalizedSpec, NormalizedTableSpec, SimulationConfig, ValidationError, ValidationErrorCode, ValidationResult, clearRenderers, compile, compileBarList, compileChart, compileGraph, compileMap, compileSankey, compileTable, getChartRenderer, normalizeSpec, registerChartRenderer, validateSpec } from '@opendata-ai/openchart-engine';
|
|
6
6
|
import * as vue from 'vue';
|
|
7
|
-
import { PropType, CSSProperties, Ref, ShallowRef, InjectionKey, ComputedRef } from 'vue';
|
|
7
|
+
import { PropType, CSSProperties, VNode, Ref, ShallowRef, InjectionKey, ComputedRef } from 'vue';
|
|
8
|
+
import { ChartStoryOptions } from '@opendata-ai/openchart-vanilla/story';
|
|
8
9
|
|
|
9
10
|
interface BarListRowEvent {
|
|
10
11
|
label: string;
|
|
@@ -111,6 +112,10 @@ declare const Chart: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
111
112
|
type: PropType<string[] | null>;
|
|
112
113
|
default: undefined;
|
|
113
114
|
};
|
|
115
|
+
editable: {
|
|
116
|
+
type: PropType<boolean>;
|
|
117
|
+
default: undefined;
|
|
118
|
+
};
|
|
114
119
|
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
115
120
|
[key: string]: any;
|
|
116
121
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
@@ -154,6 +159,10 @@ declare const Chart: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
154
159
|
type: PropType<string[] | null>;
|
|
155
160
|
default: undefined;
|
|
156
161
|
};
|
|
162
|
+
editable: {
|
|
163
|
+
type: PropType<boolean>;
|
|
164
|
+
default: undefined;
|
|
165
|
+
};
|
|
157
166
|
}>> & Readonly<{
|
|
158
167
|
onSelect?: ((_element: ElementRef) => any) | undefined;
|
|
159
168
|
"onMark-click"?: ((_event: MarkEvent) => any) | undefined;
|
|
@@ -173,6 +182,86 @@ declare const Chart: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
173
182
|
style: string | CSSProperties;
|
|
174
183
|
selectedElement: ElementRef;
|
|
175
184
|
highlight: string[] | null;
|
|
185
|
+
editable: boolean;
|
|
186
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
187
|
+
|
|
188
|
+
interface ChartStoryProps {
|
|
189
|
+
spec: ChartSpec | LayerSpec | GraphSpec | MapSpec;
|
|
190
|
+
steps: ChartStoryOptions['steps'];
|
|
191
|
+
narrative?: VNode[];
|
|
192
|
+
step?: number;
|
|
193
|
+
triggerPosition?: number;
|
|
194
|
+
cameraMode?: 'step' | 'scrub';
|
|
195
|
+
mountOptions?: MountOptions;
|
|
196
|
+
}
|
|
197
|
+
declare const ChartStory: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
198
|
+
spec: {
|
|
199
|
+
type: PropType<ChartSpec | LayerSpec | GraphSpec | MapSpec>;
|
|
200
|
+
required: true;
|
|
201
|
+
};
|
|
202
|
+
steps: {
|
|
203
|
+
type: PropType<ChartStoryOptions["steps"]>;
|
|
204
|
+
required: true;
|
|
205
|
+
};
|
|
206
|
+
narrative: {
|
|
207
|
+
type: PropType<VNode[]>;
|
|
208
|
+
default: undefined;
|
|
209
|
+
};
|
|
210
|
+
step: {
|
|
211
|
+
type: NumberConstructor;
|
|
212
|
+
default: undefined;
|
|
213
|
+
};
|
|
214
|
+
triggerPosition: {
|
|
215
|
+
type: NumberConstructor;
|
|
216
|
+
default: undefined;
|
|
217
|
+
};
|
|
218
|
+
cameraMode: {
|
|
219
|
+
type: PropType<"step" | "scrub">;
|
|
220
|
+
default: undefined;
|
|
221
|
+
};
|
|
222
|
+
mountOptions: {
|
|
223
|
+
type: PropType<MountOptions>;
|
|
224
|
+
default: undefined;
|
|
225
|
+
};
|
|
226
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
227
|
+
[key: string]: any;
|
|
228
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
229
|
+
spec: {
|
|
230
|
+
type: PropType<ChartSpec | LayerSpec | GraphSpec | MapSpec>;
|
|
231
|
+
required: true;
|
|
232
|
+
};
|
|
233
|
+
steps: {
|
|
234
|
+
type: PropType<ChartStoryOptions["steps"]>;
|
|
235
|
+
required: true;
|
|
236
|
+
};
|
|
237
|
+
narrative: {
|
|
238
|
+
type: PropType<VNode[]>;
|
|
239
|
+
default: undefined;
|
|
240
|
+
};
|
|
241
|
+
step: {
|
|
242
|
+
type: NumberConstructor;
|
|
243
|
+
default: undefined;
|
|
244
|
+
};
|
|
245
|
+
triggerPosition: {
|
|
246
|
+
type: NumberConstructor;
|
|
247
|
+
default: undefined;
|
|
248
|
+
};
|
|
249
|
+
cameraMode: {
|
|
250
|
+
type: PropType<"step" | "scrub">;
|
|
251
|
+
default: undefined;
|
|
252
|
+
};
|
|
253
|
+
mountOptions: {
|
|
254
|
+
type: PropType<MountOptions>;
|
|
255
|
+
default: undefined;
|
|
256
|
+
};
|
|
257
|
+
}>> & Readonly<{}>, {
|
|
258
|
+
step: number;
|
|
259
|
+
narrative: VNode<vue.RendererNode, vue.RendererElement, {
|
|
260
|
+
[key: string]: any;
|
|
261
|
+
}>[];
|
|
262
|
+
triggerPosition: number;
|
|
263
|
+
cameraMode: "step" | "scrub";
|
|
264
|
+
mountOptions: MountOptions;
|
|
176
265
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
177
266
|
|
|
178
267
|
/**
|
|
@@ -526,6 +615,70 @@ declare const Graph: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
526
615
|
style: string | CSSProperties;
|
|
527
616
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
528
617
|
|
|
618
|
+
interface MapProps {
|
|
619
|
+
spec: MapSpec;
|
|
620
|
+
theme?: ThemeConfig;
|
|
621
|
+
darkMode?: DarkMode;
|
|
622
|
+
class?: string;
|
|
623
|
+
style?: string | CSSProperties;
|
|
624
|
+
}
|
|
625
|
+
declare const GeoMap: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
626
|
+
spec: {
|
|
627
|
+
type: PropType<MapSpec>;
|
|
628
|
+
required: true;
|
|
629
|
+
};
|
|
630
|
+
theme: {
|
|
631
|
+
type: PropType<ThemeConfig>;
|
|
632
|
+
default: undefined;
|
|
633
|
+
};
|
|
634
|
+
darkMode: {
|
|
635
|
+
type: PropType<DarkMode>;
|
|
636
|
+
default: undefined;
|
|
637
|
+
};
|
|
638
|
+
class: {
|
|
639
|
+
type: StringConstructor;
|
|
640
|
+
default: undefined;
|
|
641
|
+
};
|
|
642
|
+
style: {
|
|
643
|
+
type: PropType<string | CSSProperties>;
|
|
644
|
+
default: undefined;
|
|
645
|
+
};
|
|
646
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
647
|
+
[key: string]: any;
|
|
648
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
649
|
+
'mark-click': (_event: MapMarkEvent) => true;
|
|
650
|
+
'mark-hover': (_event: MapMarkEvent | null) => true;
|
|
651
|
+
}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
652
|
+
spec: {
|
|
653
|
+
type: PropType<MapSpec>;
|
|
654
|
+
required: true;
|
|
655
|
+
};
|
|
656
|
+
theme: {
|
|
657
|
+
type: PropType<ThemeConfig>;
|
|
658
|
+
default: undefined;
|
|
659
|
+
};
|
|
660
|
+
darkMode: {
|
|
661
|
+
type: PropType<DarkMode>;
|
|
662
|
+
default: undefined;
|
|
663
|
+
};
|
|
664
|
+
class: {
|
|
665
|
+
type: StringConstructor;
|
|
666
|
+
default: undefined;
|
|
667
|
+
};
|
|
668
|
+
style: {
|
|
669
|
+
type: PropType<string | CSSProperties>;
|
|
670
|
+
default: undefined;
|
|
671
|
+
};
|
|
672
|
+
}>> & Readonly<{
|
|
673
|
+
"onMark-click"?: ((_event: MapMarkEvent) => any) | undefined;
|
|
674
|
+
"onMark-hover"?: ((_event: MapMarkEvent | null) => any) | undefined;
|
|
675
|
+
}>, {
|
|
676
|
+
theme: ThemeConfig;
|
|
677
|
+
darkMode: DarkMode;
|
|
678
|
+
class: string;
|
|
679
|
+
style: string | CSSProperties;
|
|
680
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
681
|
+
|
|
529
682
|
interface SankeyProps {
|
|
530
683
|
spec: SankeySpec;
|
|
531
684
|
theme?: ThemeConfig;
|
|
@@ -751,4 +904,4 @@ declare const Visualization: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
751
904
|
style: string | CSSProperties;
|
|
752
905
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
753
906
|
|
|
754
|
-
export { BarList, type BarListProps, type BarListRowEvent, Chart, type ChartProps, DataTable, type DataTableProps, Graph, type GraphHandle, type GraphProps, Sankey, type SankeyProps, TileMap, type TileMapProps, type UseChartOptions, type UseChartReturn, type UseGraphReturn, type UseTableReturn, type UseTableStateOptions, type UseTableStateReturn, Visualization, type VisualizationProps, VizDarkModeKey, VizThemeKey, VizThemeProvider, type VizThemeProviderProps, useChart, useDarkMode, useGraph, useTable, useTableState, useVizDarkMode, useVizTheme };
|
|
907
|
+
export { BarList, type BarListProps, type BarListRowEvent, Chart, type ChartProps, ChartStory, type ChartStoryProps, DataTable, type DataTableProps, GeoMap, Graph, type GraphHandle, type GraphProps, type MapProps, Sankey, type SankeyProps, TileMap, type TileMapProps, type UseChartOptions, type UseChartReturn, type UseGraphReturn, type UseTableReturn, type UseTableStateOptions, type UseTableStateReturn, Visualization, type VisualizationProps, VizDarkModeKey, VizThemeKey, VizThemeProvider, type VizThemeProviderProps, useChart, useDarkMode, useGraph, useTable, useTableState, useVizDarkMode, useVizTheme };
|