@xplortech/apollo-data 0.0.5 → 0.0.7
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/README.md +15 -91
- package/dist/apollo-data/apollo-data.esm.js +1 -1
- package/dist/apollo-data/p-4d3f0792.entry.js +1 -0
- package/dist/apollo-data/p-C2k3WBpi.js +11 -0
- package/dist/apollo-data/p-D64asVrg.js +2 -0
- package/dist/apollo-data/{p-b7471c12.entry.js → p-e2c3a317.entry.js} +1 -1
- package/dist/cjs/apollo-data-bar-chart_5.cjs.entry.js +1193 -0
- package/dist/cjs/{apollo-data-base-CxVQ-WVP.js → apollo-data-base-COGMOEqL.js} +7 -11
- package/dist/cjs/apollo-data-donut-chart.cjs.entry.js +3 -3
- package/dist/cjs/apollo-data.cjs.js +3 -3
- package/dist/cjs/{index-Cl7HgRm0.js → index-Bd5risOy.js} +116 -63
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/apollo-data-base.js +4 -8
- package/dist/collection/collection-manifest.json +5 -2
- package/dist/collection/components/apollo-data-bar/apollo-data-bar.js +10 -9
- package/dist/collection/components/apollo-data-bar/apollo-data-bar.stories.js +122 -0
- package/dist/collection/components/apollo-data-donut/apollo-data-donut.js +1 -1
- package/dist/collection/components/apollo-data-donut/apollo-data-donut.stories.js +132 -0
- package/dist/collection/components/apollo-data-heat-map/apollo-data-heat-map.js +208 -0
- package/dist/collection/components/apollo-data-heat-map/apollo-data-heat-map.stories.js +137 -0
- package/dist/collection/components/apollo-data-line/apollo-data-line.js +8 -6
- package/dist/collection/components/apollo-data-line/apollo-data-line.stories.js +122 -0
- package/dist/collection/components/apollo-data-scatter/apollo-data-scatter.js +1 -1
- package/dist/collection/components/apollo-data-scatter/apollo-data-scatter.stories.js +147 -0
- package/dist/collection/components/apollo-data-world-map/apollo-data-world-map.js +294 -0
- package/dist/collection/components/apollo-data-world-map/apollo-data-world-map.stories.js +126 -0
- package/dist/collection/examples/apollo-data-heat-map.examples.js +131 -0
- package/dist/collection/examples/apollo-data-world-map.examples.js +45 -0
- package/dist/collection/examples/index.js +2 -0
- package/dist/collection/utils/code-generator.js +1 -1
- package/dist/components/apollo-data-bar-chart.js +1 -1
- package/dist/components/apollo-data-donut-chart.js +1 -1
- package/dist/components/apollo-data-heat-map.d.ts +11 -0
- package/dist/components/apollo-data-heat-map.js +1 -0
- package/dist/components/apollo-data-line-chart.js +1 -1
- package/dist/components/apollo-data-scatter-chart.js +1 -1
- package/dist/components/apollo-data-world-map-chart.d.ts +11 -0
- package/dist/components/apollo-data-world-map-chart.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-CfbMSXKd.js +11 -0
- package/dist/components/p-gcjU8DVr.js +1 -0
- package/dist/esm/apollo-data-bar-chart_5.entry.js +1187 -0
- package/dist/esm/{apollo-data-base-BWkrM8dc.js → apollo-data-base-C2k3WBpi.js} +7 -11
- package/dist/esm/apollo-data-donut-chart.entry.js +3 -3
- package/dist/esm/apollo-data.js +4 -4
- package/dist/esm/{index-Bb2nY-Tf.js → index-D64asVrg.js} +116 -63
- package/dist/esm/loader.js +3 -3
- package/dist/types/apollo-data-base.d.ts +2 -2
- package/dist/types/components/apollo-data-bar/apollo-data-bar.stories.d.ts +5 -0
- package/dist/types/components/apollo-data-donut/apollo-data-donut.stories.d.ts +5 -0
- package/dist/types/components/apollo-data-heat-map/apollo-data-heat-map.d.ts +140 -0
- package/dist/types/components/apollo-data-heat-map/apollo-data-heat-map.stories.d.ts +5 -0
- package/dist/types/components/apollo-data-line/apollo-data-line.stories.d.ts +5 -0
- package/dist/types/components/apollo-data-scatter/apollo-data-scatter.d.ts +1 -3
- package/dist/types/components/apollo-data-scatter/apollo-data-scatter.stories.d.ts +5 -0
- package/dist/types/components/apollo-data-world-map/apollo-data-world-map.d.ts +281 -0
- package/dist/types/components/apollo-data-world-map/apollo-data-world-map.stories.d.ts +5 -0
- package/dist/types/components.d.ts +128 -8
- package/dist/types/examples/apollo-data-heat-map.examples.d.ts +11 -0
- package/dist/types/examples/apollo-data-scatter.examples.d.ts +1 -1
- package/dist/types/examples/apollo-data-world-map.examples.d.ts +11 -0
- package/dist/types/examples/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +23 -2
- package/dist/types/utils/code-generator.d.ts +1 -3
- package/package.json +8 -8
- package/src/examples/apollo-data-bar.examples.ts +157 -157
- package/src/examples/apollo-data-heat-map.examples.ts +147 -0
- package/src/examples/apollo-data-line.examples.ts +91 -91
- package/src/examples/apollo-data-scatter.examples.ts +1 -1
- package/src/examples/apollo-data-world-map.examples.ts +57 -0
- package/src/examples/index.ts +3 -1
- package/dist/apollo-data/p-2nuV5Vny.js +0 -1
- package/dist/apollo-data/p-4ac3c97c.entry.js +0 -1
- package/dist/apollo-data/p-BWkrM8dc.js +0 -11
- package/dist/apollo-data/p-Bb2nY-Tf.js +0 -2
- package/dist/apollo-data/p-e518baac.entry.js +0 -1
- package/dist/cjs/apollo-data-bar-chart.cjs.entry.js +0 -314
- package/dist/cjs/apollo-data-line-chart_2.cjs.entry.js +0 -534
- package/dist/cjs/constants-B3weDEpc.js +0 -5
- package/dist/components/p-7XF5Cax8.js +0 -11
- package/dist/components/p-Dws5s-Xe.js +0 -1
- package/dist/esm/apollo-data-bar-chart.entry.js +0 -312
- package/dist/esm/apollo-data-line-chart_2.entry.js +0 -531
- package/dist/esm/constants-2nuV5Vny.js +0 -3
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
+
import { ApolloBase } from '../../apollo-data-base';
|
|
3
|
+
export interface WorldMapDataItem {
|
|
4
|
+
lon: number;
|
|
5
|
+
lat: number;
|
|
6
|
+
value: number;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export interface WorldMapSpec {
|
|
10
|
+
pinColor?: string;
|
|
11
|
+
pinShape?: 'circle' | 'square' | 'triangle';
|
|
12
|
+
}
|
|
13
|
+
export declare class ApolloDataWorldMapChart extends ApolloBase<WorldMapDataItem[], WorldMapSpec> implements ComponentInterface {
|
|
14
|
+
el: HTMLElement;
|
|
15
|
+
/**
|
|
16
|
+
* Represents a single data point in the world map chart.
|
|
17
|
+
* @property {number} lon - Longitude coordinate used to position the point on the map.
|
|
18
|
+
* @property {number} lat - Latitude coordinate used to position the point on the map.
|
|
19
|
+
* @property {number} value - A numeric metric tied to the point.
|
|
20
|
+
* @property {string} label - Label displayed for the place or location represented by the point.
|
|
21
|
+
*/
|
|
22
|
+
adData: string | WorldMapDataItem[];
|
|
23
|
+
/**
|
|
24
|
+
* @property {string} pinColor - Color of the pin representing the point.
|
|
25
|
+
* @property {'circle' | 'square' | 'triangle'} pinShape - Shape of the pin representing the point.
|
|
26
|
+
*/
|
|
27
|
+
adSpec: string | WorldMapSpec;
|
|
28
|
+
componentDidRender(): Promise<void>;
|
|
29
|
+
protected getViewData(data: WorldMapDataItem[], spec?: WorldMapSpec): Promise<{
|
|
30
|
+
$schema: string;
|
|
31
|
+
description: string;
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
autosize: string;
|
|
35
|
+
background: string;
|
|
36
|
+
signals: ({
|
|
37
|
+
name: string;
|
|
38
|
+
value: number;
|
|
39
|
+
on: {
|
|
40
|
+
events: {
|
|
41
|
+
type: string;
|
|
42
|
+
consume: boolean;
|
|
43
|
+
};
|
|
44
|
+
update: string;
|
|
45
|
+
}[];
|
|
46
|
+
} | {
|
|
47
|
+
name: string;
|
|
48
|
+
value: number;
|
|
49
|
+
on: {
|
|
50
|
+
events: string;
|
|
51
|
+
update: string;
|
|
52
|
+
}[];
|
|
53
|
+
})[];
|
|
54
|
+
projections: {
|
|
55
|
+
name: string;
|
|
56
|
+
type: string;
|
|
57
|
+
scale: {
|
|
58
|
+
signal: string;
|
|
59
|
+
};
|
|
60
|
+
rotate: (number | {
|
|
61
|
+
signal: string;
|
|
62
|
+
})[];
|
|
63
|
+
center: number[];
|
|
64
|
+
translate: {
|
|
65
|
+
signal: string;
|
|
66
|
+
}[];
|
|
67
|
+
}[];
|
|
68
|
+
data: ({
|
|
69
|
+
name: string;
|
|
70
|
+
url: string;
|
|
71
|
+
format: {
|
|
72
|
+
type: string;
|
|
73
|
+
feature?: undefined;
|
|
74
|
+
};
|
|
75
|
+
transform: {
|
|
76
|
+
type: string;
|
|
77
|
+
as: string;
|
|
78
|
+
expr: string;
|
|
79
|
+
}[];
|
|
80
|
+
values?: undefined;
|
|
81
|
+
source?: undefined;
|
|
82
|
+
} | {
|
|
83
|
+
name: string;
|
|
84
|
+
values: WorldMapDataItem[];
|
|
85
|
+
url?: undefined;
|
|
86
|
+
format?: undefined;
|
|
87
|
+
transform?: undefined;
|
|
88
|
+
source?: undefined;
|
|
89
|
+
} | {
|
|
90
|
+
name: string;
|
|
91
|
+
url: string;
|
|
92
|
+
format: {
|
|
93
|
+
type: string;
|
|
94
|
+
feature: string;
|
|
95
|
+
};
|
|
96
|
+
transform: ({
|
|
97
|
+
type: string;
|
|
98
|
+
from: string;
|
|
99
|
+
key: string;
|
|
100
|
+
fields: string[];
|
|
101
|
+
values: string[];
|
|
102
|
+
as: string[];
|
|
103
|
+
expr?: undefined;
|
|
104
|
+
} | {
|
|
105
|
+
type: string;
|
|
106
|
+
expr: string;
|
|
107
|
+
from?: undefined;
|
|
108
|
+
key?: undefined;
|
|
109
|
+
fields?: undefined;
|
|
110
|
+
values?: undefined;
|
|
111
|
+
as?: undefined;
|
|
112
|
+
})[];
|
|
113
|
+
values?: undefined;
|
|
114
|
+
source?: undefined;
|
|
115
|
+
} | {
|
|
116
|
+
name: string;
|
|
117
|
+
source: string;
|
|
118
|
+
transform: ({
|
|
119
|
+
type: string;
|
|
120
|
+
expr: string;
|
|
121
|
+
projection?: undefined;
|
|
122
|
+
fields?: undefined;
|
|
123
|
+
as?: undefined;
|
|
124
|
+
} | {
|
|
125
|
+
type: string;
|
|
126
|
+
projection: string;
|
|
127
|
+
fields: string[];
|
|
128
|
+
as: string[];
|
|
129
|
+
expr?: undefined;
|
|
130
|
+
})[];
|
|
131
|
+
url?: undefined;
|
|
132
|
+
format?: undefined;
|
|
133
|
+
values?: undefined;
|
|
134
|
+
} | {
|
|
135
|
+
name: string;
|
|
136
|
+
values: {
|
|
137
|
+
name: string;
|
|
138
|
+
lon: number;
|
|
139
|
+
lat: number;
|
|
140
|
+
}[];
|
|
141
|
+
transform: {
|
|
142
|
+
type: string;
|
|
143
|
+
projection: string;
|
|
144
|
+
fields: string[];
|
|
145
|
+
as: string[];
|
|
146
|
+
}[];
|
|
147
|
+
url?: undefined;
|
|
148
|
+
format?: undefined;
|
|
149
|
+
source?: undefined;
|
|
150
|
+
})[];
|
|
151
|
+
marks: ({
|
|
152
|
+
type: string;
|
|
153
|
+
from: {
|
|
154
|
+
data: string;
|
|
155
|
+
};
|
|
156
|
+
transform: {
|
|
157
|
+
type: string;
|
|
158
|
+
projection: string;
|
|
159
|
+
}[];
|
|
160
|
+
encode: {
|
|
161
|
+
update: {
|
|
162
|
+
fill: {
|
|
163
|
+
value: string;
|
|
164
|
+
};
|
|
165
|
+
stroke: {
|
|
166
|
+
value: string;
|
|
167
|
+
};
|
|
168
|
+
strokeWidth: {
|
|
169
|
+
value: number;
|
|
170
|
+
};
|
|
171
|
+
tooltip: {
|
|
172
|
+
signal: string;
|
|
173
|
+
};
|
|
174
|
+
x?: undefined;
|
|
175
|
+
y?: undefined;
|
|
176
|
+
size?: undefined;
|
|
177
|
+
shape?: undefined;
|
|
178
|
+
text?: undefined;
|
|
179
|
+
align?: undefined;
|
|
180
|
+
baseline?: undefined;
|
|
181
|
+
fontSize?: undefined;
|
|
182
|
+
fontWeight?: undefined;
|
|
183
|
+
fillOpacity?: undefined;
|
|
184
|
+
};
|
|
185
|
+
hover: {
|
|
186
|
+
stroke: {
|
|
187
|
+
value: string;
|
|
188
|
+
};
|
|
189
|
+
strokeWidth: {
|
|
190
|
+
value: number;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
} | {
|
|
195
|
+
type: string;
|
|
196
|
+
from: {
|
|
197
|
+
data: string;
|
|
198
|
+
};
|
|
199
|
+
encode: {
|
|
200
|
+
update: {
|
|
201
|
+
x: {
|
|
202
|
+
field: string;
|
|
203
|
+
};
|
|
204
|
+
y: {
|
|
205
|
+
field: string;
|
|
206
|
+
};
|
|
207
|
+
size: {
|
|
208
|
+
value: number;
|
|
209
|
+
};
|
|
210
|
+
fill: {
|
|
211
|
+
value: string;
|
|
212
|
+
};
|
|
213
|
+
stroke: {
|
|
214
|
+
value: string;
|
|
215
|
+
};
|
|
216
|
+
shape: {
|
|
217
|
+
value: "square" | "circle" | "triangle";
|
|
218
|
+
};
|
|
219
|
+
strokeWidth: {
|
|
220
|
+
value: number;
|
|
221
|
+
};
|
|
222
|
+
tooltip: {
|
|
223
|
+
signal: string;
|
|
224
|
+
};
|
|
225
|
+
text?: undefined;
|
|
226
|
+
align?: undefined;
|
|
227
|
+
baseline?: undefined;
|
|
228
|
+
fontSize?: undefined;
|
|
229
|
+
fontWeight?: undefined;
|
|
230
|
+
fillOpacity?: undefined;
|
|
231
|
+
};
|
|
232
|
+
hover?: undefined;
|
|
233
|
+
};
|
|
234
|
+
transform?: undefined;
|
|
235
|
+
} | {
|
|
236
|
+
type: string;
|
|
237
|
+
from: {
|
|
238
|
+
data: string;
|
|
239
|
+
};
|
|
240
|
+
encode: {
|
|
241
|
+
update: {
|
|
242
|
+
x: {
|
|
243
|
+
field: string;
|
|
244
|
+
};
|
|
245
|
+
y: {
|
|
246
|
+
field: string;
|
|
247
|
+
};
|
|
248
|
+
text: {
|
|
249
|
+
field: string;
|
|
250
|
+
};
|
|
251
|
+
align: {
|
|
252
|
+
value: string;
|
|
253
|
+
};
|
|
254
|
+
baseline: {
|
|
255
|
+
value: string;
|
|
256
|
+
};
|
|
257
|
+
fontSize: {
|
|
258
|
+
value: number;
|
|
259
|
+
};
|
|
260
|
+
fontWeight: {
|
|
261
|
+
value: string;
|
|
262
|
+
};
|
|
263
|
+
fill: {
|
|
264
|
+
value: string;
|
|
265
|
+
};
|
|
266
|
+
fillOpacity: {
|
|
267
|
+
value: number;
|
|
268
|
+
};
|
|
269
|
+
stroke?: undefined;
|
|
270
|
+
strokeWidth?: undefined;
|
|
271
|
+
tooltip?: undefined;
|
|
272
|
+
size?: undefined;
|
|
273
|
+
shape?: undefined;
|
|
274
|
+
};
|
|
275
|
+
hover?: undefined;
|
|
276
|
+
};
|
|
277
|
+
transform?: undefined;
|
|
278
|
+
})[];
|
|
279
|
+
}>;
|
|
280
|
+
render(): any;
|
|
281
|
+
}
|
|
@@ -7,12 +7,16 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { BarDataItem, BarSpec } from "./components/apollo-data-bar/apollo-data-bar";
|
|
9
9
|
import { DonutDataItem, DonutSpec } from "./components/apollo-data-donut/apollo-data-donut";
|
|
10
|
+
import { HeatMapDataItem, HeatMapSpec } from "./components/apollo-data-heat-map/apollo-data-heat-map";
|
|
10
11
|
import { LineDataItem, LineSpec } from "./components/apollo-data-line/apollo-data-line";
|
|
11
12
|
import { ScatterDataItem, ScatterSpec } from "./components/apollo-data-scatter/apollo-data-scatter";
|
|
13
|
+
import { WorldMapDataItem, WorldMapSpec } from "./components/apollo-data-world-map/apollo-data-world-map";
|
|
12
14
|
export { BarDataItem, BarSpec } from "./components/apollo-data-bar/apollo-data-bar";
|
|
13
15
|
export { DonutDataItem, DonutSpec } from "./components/apollo-data-donut/apollo-data-donut";
|
|
16
|
+
export { HeatMapDataItem, HeatMapSpec } from "./components/apollo-data-heat-map/apollo-data-heat-map";
|
|
14
17
|
export { LineDataItem, LineSpec } from "./components/apollo-data-line/apollo-data-line";
|
|
15
18
|
export { ScatterDataItem, ScatterSpec } from "./components/apollo-data-scatter/apollo-data-scatter";
|
|
19
|
+
export { WorldMapDataItem, WorldMapSpec } from "./components/apollo-data-world-map/apollo-data-world-map";
|
|
16
20
|
export namespace Components {
|
|
17
21
|
interface ApolloDataBarChart {
|
|
18
22
|
/**
|
|
@@ -42,6 +46,25 @@ export namespace Components {
|
|
|
42
46
|
*/
|
|
43
47
|
"adSpec": string | DonutSpec;
|
|
44
48
|
}
|
|
49
|
+
interface ApolloDataHeatMap {
|
|
50
|
+
/**
|
|
51
|
+
* Data for the heat map. Each item defines a cell by xLabel, yLabel, and value.
|
|
52
|
+
* @property {string} xLabel - Label for the X-axis (horizontal).
|
|
53
|
+
* @property {string} yLabel - Label for the Y-axis (vertical).
|
|
54
|
+
* @property {number} value - Numeric value encoded as color.
|
|
55
|
+
* @default []
|
|
56
|
+
*/
|
|
57
|
+
"adData": string | HeatMapDataItem[];
|
|
58
|
+
/**
|
|
59
|
+
* Optional specification for axis titles, color range, and tooltip behavior.
|
|
60
|
+
* @property {string} [xAxisTitle] - Label for the X-axis.
|
|
61
|
+
* @property {string} [yAxisTitle] - Label for the Y-axis.
|
|
62
|
+
* @property {string[]} [colorRange] - Two or more colors for the value scale (Vega interpolates between them).
|
|
63
|
+
* @property {'auto' | 'none'} [tooltip] - Tooltip behavior.
|
|
64
|
+
* @default {}
|
|
65
|
+
*/
|
|
66
|
+
"adSpec": string | HeatMapSpec;
|
|
67
|
+
}
|
|
45
68
|
interface ApolloDataLineChart {
|
|
46
69
|
/**
|
|
47
70
|
* @default []
|
|
@@ -74,6 +97,23 @@ export namespace Components {
|
|
|
74
97
|
*/
|
|
75
98
|
"adSpec": string | ScatterSpec;
|
|
76
99
|
}
|
|
100
|
+
interface ApolloDataWorldMapChart {
|
|
101
|
+
/**
|
|
102
|
+
* Represents a single data point in the world map chart.
|
|
103
|
+
* @property {number} lon - Longitude coordinate used to position the point on the map.
|
|
104
|
+
* @property {number} lat - Latitude coordinate used to position the point on the map.
|
|
105
|
+
* @property {number} value - A numeric metric tied to the point.
|
|
106
|
+
* @property {string} label - Label displayed for the place or location represented by the point.
|
|
107
|
+
* @default []
|
|
108
|
+
*/
|
|
109
|
+
"adData": string | WorldMapDataItem[];
|
|
110
|
+
/**
|
|
111
|
+
* @property {string} pinColor - Color of the pin representing the point.
|
|
112
|
+
* @property {'circle' | 'square' | 'triangle'} pinShape - Shape of the pin representing the point.
|
|
113
|
+
* @default {}
|
|
114
|
+
*/
|
|
115
|
+
"adSpec": string | WorldMapSpec;
|
|
116
|
+
}
|
|
77
117
|
}
|
|
78
118
|
declare global {
|
|
79
119
|
interface HTMLApolloDataBarChartElement extends Components.ApolloDataBarChart, HTMLStencilElement {
|
|
@@ -88,6 +128,12 @@ declare global {
|
|
|
88
128
|
prototype: HTMLApolloDataDonutChartElement;
|
|
89
129
|
new (): HTMLApolloDataDonutChartElement;
|
|
90
130
|
};
|
|
131
|
+
interface HTMLApolloDataHeatMapElement extends Components.ApolloDataHeatMap, HTMLStencilElement {
|
|
132
|
+
}
|
|
133
|
+
var HTMLApolloDataHeatMapElement: {
|
|
134
|
+
prototype: HTMLApolloDataHeatMapElement;
|
|
135
|
+
new (): HTMLApolloDataHeatMapElement;
|
|
136
|
+
};
|
|
91
137
|
interface HTMLApolloDataLineChartElement extends Components.ApolloDataLineChart, HTMLStencilElement {
|
|
92
138
|
}
|
|
93
139
|
var HTMLApolloDataLineChartElement: {
|
|
@@ -100,11 +146,19 @@ declare global {
|
|
|
100
146
|
prototype: HTMLApolloDataScatterChartElement;
|
|
101
147
|
new (): HTMLApolloDataScatterChartElement;
|
|
102
148
|
};
|
|
149
|
+
interface HTMLApolloDataWorldMapChartElement extends Components.ApolloDataWorldMapChart, HTMLStencilElement {
|
|
150
|
+
}
|
|
151
|
+
var HTMLApolloDataWorldMapChartElement: {
|
|
152
|
+
prototype: HTMLApolloDataWorldMapChartElement;
|
|
153
|
+
new (): HTMLApolloDataWorldMapChartElement;
|
|
154
|
+
};
|
|
103
155
|
interface HTMLElementTagNameMap {
|
|
104
156
|
"apollo-data-bar-chart": HTMLApolloDataBarChartElement;
|
|
105
157
|
"apollo-data-donut-chart": HTMLApolloDataDonutChartElement;
|
|
158
|
+
"apollo-data-heat-map": HTMLApolloDataHeatMapElement;
|
|
106
159
|
"apollo-data-line-chart": HTMLApolloDataLineChartElement;
|
|
107
160
|
"apollo-data-scatter-chart": HTMLApolloDataScatterChartElement;
|
|
161
|
+
"apollo-data-world-map-chart": HTMLApolloDataWorldMapChartElement;
|
|
108
162
|
}
|
|
109
163
|
}
|
|
110
164
|
declare namespace LocalJSX {
|
|
@@ -136,6 +190,25 @@ declare namespace LocalJSX {
|
|
|
136
190
|
*/
|
|
137
191
|
"adSpec"?: string | DonutSpec;
|
|
138
192
|
}
|
|
193
|
+
interface ApolloDataHeatMap {
|
|
194
|
+
/**
|
|
195
|
+
* Data for the heat map. Each item defines a cell by xLabel, yLabel, and value.
|
|
196
|
+
* @property {string} xLabel - Label for the X-axis (horizontal).
|
|
197
|
+
* @property {string} yLabel - Label for the Y-axis (vertical).
|
|
198
|
+
* @property {number} value - Numeric value encoded as color.
|
|
199
|
+
* @default []
|
|
200
|
+
*/
|
|
201
|
+
"adData"?: string | HeatMapDataItem[];
|
|
202
|
+
/**
|
|
203
|
+
* Optional specification for axis titles, color range, and tooltip behavior.
|
|
204
|
+
* @property {string} [xAxisTitle] - Label for the X-axis.
|
|
205
|
+
* @property {string} [yAxisTitle] - Label for the Y-axis.
|
|
206
|
+
* @property {string[]} [colorRange] - Two or more colors for the value scale (Vega interpolates between them).
|
|
207
|
+
* @property {'auto' | 'none'} [tooltip] - Tooltip behavior.
|
|
208
|
+
* @default {}
|
|
209
|
+
*/
|
|
210
|
+
"adSpec"?: string | HeatMapSpec;
|
|
211
|
+
}
|
|
139
212
|
interface ApolloDataLineChart {
|
|
140
213
|
/**
|
|
141
214
|
* @default []
|
|
@@ -168,21 +241,68 @@ declare namespace LocalJSX {
|
|
|
168
241
|
*/
|
|
169
242
|
"adSpec"?: string | ScatterSpec;
|
|
170
243
|
}
|
|
244
|
+
interface ApolloDataWorldMapChart {
|
|
245
|
+
/**
|
|
246
|
+
* Represents a single data point in the world map chart.
|
|
247
|
+
* @property {number} lon - Longitude coordinate used to position the point on the map.
|
|
248
|
+
* @property {number} lat - Latitude coordinate used to position the point on the map.
|
|
249
|
+
* @property {number} value - A numeric metric tied to the point.
|
|
250
|
+
* @property {string} label - Label displayed for the place or location represented by the point.
|
|
251
|
+
* @default []
|
|
252
|
+
*/
|
|
253
|
+
"adData"?: string | WorldMapDataItem[];
|
|
254
|
+
/**
|
|
255
|
+
* @property {string} pinColor - Color of the pin representing the point.
|
|
256
|
+
* @property {'circle' | 'square' | 'triangle'} pinShape - Shape of the pin representing the point.
|
|
257
|
+
* @default {}
|
|
258
|
+
*/
|
|
259
|
+
"adSpec"?: string | WorldMapSpec;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
interface ApolloDataBarChartAttributes {
|
|
263
|
+
"adData": string | BarDataItem[];
|
|
264
|
+
"adSpec": string | BarSpec;
|
|
265
|
+
}
|
|
266
|
+
interface ApolloDataDonutChartAttributes {
|
|
267
|
+
"adData": string | DonutDataItem[];
|
|
268
|
+
"adSpec": string | DonutSpec;
|
|
269
|
+
}
|
|
270
|
+
interface ApolloDataHeatMapAttributes {
|
|
271
|
+
"adData": string | HeatMapDataItem[];
|
|
272
|
+
"adSpec": string | HeatMapSpec;
|
|
273
|
+
}
|
|
274
|
+
interface ApolloDataLineChartAttributes {
|
|
275
|
+
"adData": string | LineDataItem[];
|
|
276
|
+
"adSpec": string | LineSpec;
|
|
277
|
+
}
|
|
278
|
+
interface ApolloDataScatterChartAttributes {
|
|
279
|
+
"adData": string | ScatterDataItem[];
|
|
280
|
+
"adSpec": string | ScatterSpec;
|
|
281
|
+
}
|
|
282
|
+
interface ApolloDataWorldMapChartAttributes {
|
|
283
|
+
"adData": string | WorldMapDataItem[];
|
|
284
|
+
"adSpec": string | WorldMapSpec;
|
|
285
|
+
}
|
|
286
|
+
|
|
171
287
|
interface IntrinsicElements {
|
|
172
|
-
"apollo-data-bar-chart": ApolloDataBarChart;
|
|
173
|
-
"apollo-data-donut-chart": ApolloDataDonutChart;
|
|
174
|
-
"apollo-data-
|
|
175
|
-
"apollo-data-
|
|
288
|
+
"apollo-data-bar-chart": Omit<ApolloDataBarChart, keyof ApolloDataBarChartAttributes> & { [K in keyof ApolloDataBarChart & keyof ApolloDataBarChartAttributes]?: ApolloDataBarChart[K] } & { [K in keyof ApolloDataBarChart & keyof ApolloDataBarChartAttributes as `attr:${K}`]?: ApolloDataBarChartAttributes[K] } & { [K in keyof ApolloDataBarChart & keyof ApolloDataBarChartAttributes as `prop:${K}`]?: ApolloDataBarChart[K] };
|
|
289
|
+
"apollo-data-donut-chart": Omit<ApolloDataDonutChart, keyof ApolloDataDonutChartAttributes> & { [K in keyof ApolloDataDonutChart & keyof ApolloDataDonutChartAttributes]?: ApolloDataDonutChart[K] } & { [K in keyof ApolloDataDonutChart & keyof ApolloDataDonutChartAttributes as `attr:${K}`]?: ApolloDataDonutChartAttributes[K] } & { [K in keyof ApolloDataDonutChart & keyof ApolloDataDonutChartAttributes as `prop:${K}`]?: ApolloDataDonutChart[K] };
|
|
290
|
+
"apollo-data-heat-map": Omit<ApolloDataHeatMap, keyof ApolloDataHeatMapAttributes> & { [K in keyof ApolloDataHeatMap & keyof ApolloDataHeatMapAttributes]?: ApolloDataHeatMap[K] } & { [K in keyof ApolloDataHeatMap & keyof ApolloDataHeatMapAttributes as `attr:${K}`]?: ApolloDataHeatMapAttributes[K] } & { [K in keyof ApolloDataHeatMap & keyof ApolloDataHeatMapAttributes as `prop:${K}`]?: ApolloDataHeatMap[K] };
|
|
291
|
+
"apollo-data-line-chart": Omit<ApolloDataLineChart, keyof ApolloDataLineChartAttributes> & { [K in keyof ApolloDataLineChart & keyof ApolloDataLineChartAttributes]?: ApolloDataLineChart[K] } & { [K in keyof ApolloDataLineChart & keyof ApolloDataLineChartAttributes as `attr:${K}`]?: ApolloDataLineChartAttributes[K] } & { [K in keyof ApolloDataLineChart & keyof ApolloDataLineChartAttributes as `prop:${K}`]?: ApolloDataLineChart[K] };
|
|
292
|
+
"apollo-data-scatter-chart": Omit<ApolloDataScatterChart, keyof ApolloDataScatterChartAttributes> & { [K in keyof ApolloDataScatterChart & keyof ApolloDataScatterChartAttributes]?: ApolloDataScatterChart[K] } & { [K in keyof ApolloDataScatterChart & keyof ApolloDataScatterChartAttributes as `attr:${K}`]?: ApolloDataScatterChartAttributes[K] } & { [K in keyof ApolloDataScatterChart & keyof ApolloDataScatterChartAttributes as `prop:${K}`]?: ApolloDataScatterChart[K] };
|
|
293
|
+
"apollo-data-world-map-chart": Omit<ApolloDataWorldMapChart, keyof ApolloDataWorldMapChartAttributes> & { [K in keyof ApolloDataWorldMapChart & keyof ApolloDataWorldMapChartAttributes]?: ApolloDataWorldMapChart[K] } & { [K in keyof ApolloDataWorldMapChart & keyof ApolloDataWorldMapChartAttributes as `attr:${K}`]?: ApolloDataWorldMapChartAttributes[K] } & { [K in keyof ApolloDataWorldMapChart & keyof ApolloDataWorldMapChartAttributes as `prop:${K}`]?: ApolloDataWorldMapChart[K] };
|
|
176
294
|
}
|
|
177
295
|
}
|
|
178
296
|
export { LocalJSX as JSX };
|
|
179
297
|
declare module "@stencil/core" {
|
|
180
298
|
export namespace JSX {
|
|
181
299
|
interface IntrinsicElements {
|
|
182
|
-
"apollo-data-bar-chart": LocalJSX.
|
|
183
|
-
"apollo-data-donut-chart": LocalJSX.
|
|
184
|
-
"apollo-data-
|
|
185
|
-
"apollo-data-
|
|
300
|
+
"apollo-data-bar-chart": LocalJSX.IntrinsicElements["apollo-data-bar-chart"] & JSXBase.HTMLAttributes<HTMLApolloDataBarChartElement>;
|
|
301
|
+
"apollo-data-donut-chart": LocalJSX.IntrinsicElements["apollo-data-donut-chart"] & JSXBase.HTMLAttributes<HTMLApolloDataDonutChartElement>;
|
|
302
|
+
"apollo-data-heat-map": LocalJSX.IntrinsicElements["apollo-data-heat-map"] & JSXBase.HTMLAttributes<HTMLApolloDataHeatMapElement>;
|
|
303
|
+
"apollo-data-line-chart": LocalJSX.IntrinsicElements["apollo-data-line-chart"] & JSXBase.HTMLAttributes<HTMLApolloDataLineChartElement>;
|
|
304
|
+
"apollo-data-scatter-chart": LocalJSX.IntrinsicElements["apollo-data-scatter-chart"] & JSXBase.HTMLAttributes<HTMLApolloDataScatterChartElement>;
|
|
305
|
+
"apollo-data-world-map-chart": LocalJSX.IntrinsicElements["apollo-data-world-map-chart"] & JSXBase.HTMLAttributes<HTMLApolloDataWorldMapChartElement>;
|
|
186
306
|
}
|
|
187
307
|
}
|
|
188
308
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HeatMapDataItem, HeatMapSpec } from '../components/apollo-data-heat-map/apollo-data-heat-map';
|
|
2
|
+
export interface HeatMapExamples {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
props: {
|
|
6
|
+
adData: HeatMapDataItem[];
|
|
7
|
+
adSpec?: HeatMapSpec;
|
|
8
|
+
};
|
|
9
|
+
notes?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const heatMapExamples: HeatMapExamples[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WorldMapDataItem, WorldMapSpec } from '../components/apollo-data-world-map/apollo-data-world-map';
|
|
2
|
+
export interface WorldMapExample {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
props: {
|
|
6
|
+
adData: WorldMapDataItem[];
|
|
7
|
+
adSpec?: WorldMapSpec;
|
|
8
|
+
};
|
|
9
|
+
notes?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const worldMapExamples: WorldMapExample[];
|
|
@@ -125,8 +125,27 @@ export interface EventOptions {
|
|
|
125
125
|
*/
|
|
126
126
|
composed?: boolean;
|
|
127
127
|
}
|
|
128
|
+
export interface AttachInternalsOptions {
|
|
129
|
+
/**
|
|
130
|
+
* Initial custom states to set on the ElementInternals.states CustomStateSet.
|
|
131
|
+
* Each key is the state name and the value is the initial boolean state.
|
|
132
|
+
*
|
|
133
|
+
* These states can be targeted with the CSS `:state()` pseudo-class.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* @AttachInternals({ states: { open: true, active: false } })
|
|
138
|
+
* internals: ElementInternals;
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
|
|
142
|
+
*/
|
|
143
|
+
states?: {
|
|
144
|
+
[stateName: string]: boolean;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
128
147
|
export interface AttachInternalsDecorator {
|
|
129
|
-
(): PropertyDecorator;
|
|
148
|
+
(opts?: AttachInternalsOptions): PropertyDecorator;
|
|
130
149
|
}
|
|
131
150
|
export interface ListenDecorator {
|
|
132
151
|
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
|
|
@@ -660,6 +679,7 @@ export declare namespace h {
|
|
|
660
679
|
function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
661
680
|
function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
662
681
|
function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
682
|
+
function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
|
|
663
683
|
namespace JSX {
|
|
664
684
|
interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements {
|
|
665
685
|
[tagName: string]: any;
|
|
@@ -673,6 +693,8 @@ export declare function h(sel: any, text: string): VNode;
|
|
|
673
693
|
export declare function h(sel: any, children: Array<VNode | undefined | null>): VNode;
|
|
674
694
|
export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
675
695
|
export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
696
|
+
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
697
|
+
export declare function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
|
|
676
698
|
/**
|
|
677
699
|
* Automatic JSX runtime functions for TypeScript's react-jsx mode.
|
|
678
700
|
* These functions are called automatically by TypeScript when using "jsx": "react-jsx".
|
|
@@ -702,7 +724,6 @@ export declare function jsxs(type: any, props: any, key?: string): VNode;
|
|
|
702
724
|
* @returns a jsx vnode
|
|
703
725
|
*/
|
|
704
726
|
export declare function jsxDEV(type: any, props: any, key?: string | number, isStaticChildren?: boolean, source?: any, self?: any): VNode;
|
|
705
|
-
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
706
727
|
/**
|
|
707
728
|
* A virtual DOM node
|
|
708
729
|
*/
|
|
@@ -3,9 +3,7 @@ export interface PropValue {
|
|
|
3
3
|
isFunction?: boolean;
|
|
4
4
|
functionBody?: string;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}
|
|
6
|
+
export type ComponentProps = Record<string, any>;
|
|
9
7
|
export declare function generateInstallationDocs(framework?: string, componentName?: string): string;
|
|
10
8
|
export declare function generateReactCode(componentName: string, props: ComponentProps): string;
|
|
11
9
|
export declare function generateVueCode(componentName: string, props: ComponentProps): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xplortech/apollo-data",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Apollo Data",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -64,21 +64,21 @@
|
|
|
64
64
|
"start": "stencil build --dev --watch --serve",
|
|
65
65
|
"test": "stencil test --spec --e2e",
|
|
66
66
|
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
67
|
-
"generate": "stencil generate"
|
|
67
|
+
"generate": "stencil generate",
|
|
68
|
+
"lint:js": "prettier --check \"src/**/*.{js,ts,json,md}\"",
|
|
69
|
+
"lint:css": "stylelint 'src/**/*.css'",
|
|
70
|
+
"lint:ts": "eslint \"src/**/*.{ts,tsx}\" --ignore-pattern 'src/components/**/test/**' --no-warn-ignored",
|
|
71
|
+
"lint": "npm-run-all lint:ts lint:css lint:js",
|
|
72
|
+
"format": "npm run lint:ts -- --fix && npm run lint:css -- --fix && prettier --write \"src/**/*.{js,ts,json,md}\""
|
|
68
73
|
},
|
|
69
74
|
"devDependencies": {
|
|
70
|
-
"@kesills/eslint-config-airbnb-typescript": "^20.0.0",
|
|
71
75
|
"@stencil/core": "^4.38.2",
|
|
72
76
|
"@stencil/react-output-target": "^1.2.0",
|
|
73
77
|
"@stencil/vue-output-target": "^0.11.8",
|
|
74
78
|
"@testing-library/dom": "^10.4.0",
|
|
75
79
|
"@testing-library/jest-dom": "^6.6.3",
|
|
76
|
-
"eslint": "^8.57.1",
|
|
77
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
78
|
-
"eslint-config-prettier": "^10.1.1",
|
|
79
|
-
"eslint-plugin-prettier": "^5.2.5",
|
|
80
|
-
"eslint-plugin-testing-library": "^7.1.1",
|
|
81
80
|
"happy-dom": "^17.4.4",
|
|
81
|
+
"lit-html": "^3.3.2",
|
|
82
82
|
"npm-run-all": "^4.1.5",
|
|
83
83
|
"prettier": "^3.5.3",
|
|
84
84
|
"typescript": "^5.5.3",
|