@visuallyjs/browser-ui-vue 1.0.0

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.
@@ -0,0 +1,14 @@
1
+ import { Surface, BrowserUIModel, SurfaceOptions, ModelOptions } from "@visuallyjs/browser-ui";
2
+ /**
3
+ * VisuallyJsModel instance for use with Vue integration.
4
+ * @group Classes
5
+ */
6
+ export declare class BrowserUIVueModel extends BrowserUIModel {
7
+ render(container: Element, options?: SurfaceOptions): Surface;
8
+ }
9
+ /**
10
+ * Create a new instance of VisuallyJsModel to use with the Vue integration.
11
+ * @param options - Options for the VisuallyJsModel instance.
12
+ * @internal
13
+ */
14
+ export declare function newInstance(options?: ModelOptions): BrowserUIVueModel;
package/chart.d.ts ADDED
@@ -0,0 +1,196 @@
1
+ import { PropType } from "vue";
2
+ import { ObjectData, SankeyOptions, VisuallyJsDefaultJSON } from "@visuallyjs/browser-ui";
3
+ /**
4
+ * Provides a component that renders a column chart.
5
+ * @group Components
6
+ */
7
+ export declare const ColumnChartComponent: {
8
+ name: string;
9
+ props: any;
10
+ watch: any;
11
+ mounted(): void;
12
+ setup(): {
13
+ service: unknown;
14
+ };
15
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
16
+ [key: string]: any;
17
+ }>;
18
+ };
19
+ /**
20
+ * Provides a component that renders a bar chart.
21
+ * @group Components
22
+ */
23
+ export declare const BarChartComponent: {
24
+ name: string;
25
+ props: any;
26
+ watch: any;
27
+ mounted(): void;
28
+ setup(): {
29
+ service: unknown;
30
+ };
31
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
32
+ [key: string]: any;
33
+ }>;
34
+ };
35
+ /**
36
+ * Provides a component that renders an XY chart.
37
+ * @group Components
38
+ */
39
+ export declare const XYChartComponent: {
40
+ name: string;
41
+ props: any;
42
+ watch: any;
43
+ mounted(): void;
44
+ setup(): {
45
+ service: unknown;
46
+ };
47
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
48
+ [key: string]: any;
49
+ }>;
50
+ };
51
+ /**
52
+ * Provides a component that renders a pie chart.
53
+ * @group Components
54
+ */
55
+ export declare const PieChartComponent: {
56
+ name: string;
57
+ props: any;
58
+ watch: any;
59
+ mounted(): void;
60
+ setup(): {
61
+ service: unknown;
62
+ };
63
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
64
+ [key: string]: any;
65
+ }>;
66
+ };
67
+ /**
68
+ * Provides a component that renders a line chart.
69
+ * @group Components
70
+ */
71
+ export declare const LineChartComponent: {
72
+ name: string;
73
+ props: any;
74
+ watch: any;
75
+ mounted(): void;
76
+ setup(): {
77
+ service: unknown;
78
+ };
79
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
80
+ [key: string]: any;
81
+ }>;
82
+ };
83
+ /**
84
+ * Provides a component that renders an area chart.
85
+ * @group Components
86
+ */
87
+ export declare const AreaChartComponent: {
88
+ name: string;
89
+ props: any;
90
+ watch: any;
91
+ mounted(): void;
92
+ setup(): {
93
+ service: unknown;
94
+ };
95
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
96
+ [key: string]: any;
97
+ }>;
98
+ };
99
+ /**
100
+ * Provides a component that renders a scatter chart.
101
+ * @group Components
102
+ */
103
+ export declare const ScatterChartComponent: {
104
+ name: string;
105
+ props: any;
106
+ watch: any;
107
+ mounted(): void;
108
+ setup(): {
109
+ service: unknown;
110
+ };
111
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
112
+ [key: string]: any;
113
+ }>;
114
+ };
115
+ /**
116
+ * Provides a component that renders a bubble chart.
117
+ * @group Components
118
+ */
119
+ export declare const BubbleChartComponent: {
120
+ name: string;
121
+ props: any;
122
+ watch: any;
123
+ mounted(): void;
124
+ setup(): {
125
+ service: unknown;
126
+ };
127
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
128
+ [key: string]: any;
129
+ }>;
130
+ };
131
+ /**
132
+ * Provides a component that renders a gauge chart.
133
+ * @group Components
134
+ */
135
+ export declare const GaugeChartComponent: {
136
+ name: string;
137
+ props: any;
138
+ watch: any;
139
+ mounted(): void;
140
+ setup(): {
141
+ service: unknown;
142
+ };
143
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
144
+ [key: string]: any;
145
+ }>;
146
+ };
147
+ /**
148
+ * Provides a component that renders a sankey chart.
149
+ * @group Components
150
+ */
151
+ export declare const SankeyChartComponent: {
152
+ name: string;
153
+ props: {
154
+ csvData: {
155
+ type: StringConstructor;
156
+ };
157
+ jsonData: {
158
+ type: PropType<VisuallyJsDefaultJSON>;
159
+ };
160
+ interactive: {
161
+ type: BooleanConstructor;
162
+ };
163
+ pivot: {
164
+ type: StringConstructor;
165
+ };
166
+ options: {
167
+ type: PropType<Omit<SankeyOptions, "data" | "url" | "dataSource" | "dataSourceFilter">>;
168
+ };
169
+ className: {
170
+ type: StringConstructor;
171
+ };
172
+ data: {
173
+ type: PropType<Array<ObjectData>>;
174
+ };
175
+ url: {
176
+ type: StringConstructor;
177
+ };
178
+ /**
179
+ * when present, instructs the chart to source its data from a VisuallyJs model in scope
180
+ */
181
+ useModel: {
182
+ type: BooleanConstructor;
183
+ default: boolean;
184
+ };
185
+ };
186
+ mounted(): void;
187
+ watch: {
188
+ pivot(newVal: string): void;
189
+ };
190
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
191
+ [key: string]: any;
192
+ }>;
193
+ setup(): {
194
+ service: unknown;
195
+ };
196
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Provides a component that offers the ability to pick a color, and which maintains a list
3
+ * of recent colors.
4
+ */
5
+ export declare const ColorPickerComponent: {
6
+ render(): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
7
+ [key: string]: any;
8
+ }>;
9
+ props: {
10
+ /**
11
+ * The property name in the data that this component manages. Required.
12
+ */
13
+ propertyName: StringConstructor;
14
+ /**
15
+ * Maximum number of color swatches to show, defaults to 10
16
+ */
17
+ maxColors: {
18
+ type: NumberConstructor;
19
+ default: number;
20
+ };
21
+ };
22
+ data: () => {
23
+ CLASS_COLOR_PICKER: string;
24
+ CLASS_COLOR_PICKER_SWATCHES: string;
25
+ CLASS_COLOR_PICKER_SWATCH: string;
26
+ colorInput: HTMLInputElement;
27
+ swatches: Array<string>;
28
+ };
29
+ mounted(): void;
30
+ methods: {
31
+ addColor: (v: string) => void;
32
+ colorPicked: () => void;
33
+ selectSwatch: (c: string) => void;
34
+ setCurrentColor: () => void;
35
+ };
36
+ };
@@ -0,0 +1,63 @@
1
+ import { ControlsComponentProps } from "./definitions";
2
+ export declare const ControlsComponent: {
3
+ setup(props: ControlsComponentProps): {
4
+ service: unknown;
5
+ };
6
+ name: string;
7
+ props: {
8
+ clear: {
9
+ type: BooleanConstructor;
10
+ default: boolean;
11
+ };
12
+ surfaceId: {
13
+ type: StringConstructor;
14
+ };
15
+ undoRedo: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
19
+ orientation: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ zoomToExtents: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ zoomButtons: {
28
+ type: BooleanConstructor;
29
+ default: boolean;
30
+ };
31
+ clearMessage: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ onMaybeClear: {
36
+ type: FunctionConstructor;
37
+ };
38
+ className: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ };
43
+ methods: {
44
+ panMode: () => void;
45
+ selectMode: () => void;
46
+ zoomToFit: () => void;
47
+ doClear: () => void;
48
+ undo: () => void;
49
+ redo: () => void;
50
+ zoomIn: () => void;
51
+ zoomOut: () => void;
52
+ resetSelection(): void;
53
+ updateSelectionState: () => void;
54
+ };
55
+ data: () => {
56
+ ready: boolean;
57
+ hasLasso: boolean;
58
+ };
59
+ render(): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
60
+ [key: string]: any;
61
+ }>;
62
+ mounted(): void;
63
+ };
@@ -0,0 +1,46 @@
1
+ import { PropType } from "vue";
2
+ import { FixedElementConstraints, PointXY, Surface } from "@visuallyjs/browser-ui";
3
+ /**
4
+ * Props for the Decorator component.
5
+ * @group Props
6
+ */
7
+ export interface DecoratorComponentProps {
8
+ /**
9
+ * Whether to float the element over the UI, so that it does not move with the content (floating), or to place the element onto the canvas, so that it moves/zooms with the content (fixed). Floating is the default.
10
+ */
11
+ placement?: 'fixed' | 'floating';
12
+ /**
13
+ * For floating placement, this is a point relative to the viewport origin. for fixed placement, this is a point relative to the canvas origin. Defaults to 0,0.
14
+ */
15
+ position?: PointXY;
16
+ /**
17
+ * Optional constraints when using fixed placement: you can instruct the UI to restrict movement in one or both axes.
18
+ */
19
+ constraints?: FixedElementConstraints;
20
+ }
21
+ declare const DecoratorComponent: {
22
+ props: {
23
+ placement: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ position: {
28
+ type: PropType<PointXY>;
29
+ };
30
+ constraints: {
31
+ type: PropType<FixedElementConstraints>;
32
+ };
33
+ };
34
+ data: () => {
35
+ mounted: boolean;
36
+ surface: Surface;
37
+ };
38
+ setup(props: DecoratorComponentProps): {
39
+ service: unknown;
40
+ };
41
+ mounted(): void;
42
+ render(): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
43
+ [key: string]: any;
44
+ }>;
45
+ };
46
+ export { DecoratorComponent };