@unovis/ts 1.6.4 → 1.6.5-topojson.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.
- package/components/topojson-map/config.d.ts +88 -3
- package/components/topojson-map/config.js +6 -2
- package/components/topojson-map/config.js.map +1 -1
- package/components/topojson-map/index.d.ts +33 -0
- package/components/topojson-map/index.js +932 -39
- package/components/topojson-map/index.js.map +1 -1
- package/components/topojson-map/modules/donut.d.ts +3 -0
- package/components/topojson-map/modules/donut.js +29 -0
- package/components/topojson-map/modules/donut.js.map +1 -0
- package/components/topojson-map/style.d.ts +12 -1
- package/components/topojson-map/style.js +118 -4
- package/components/topojson-map/style.js.map +1 -1
- package/components/topojson-map/types.d.ts +63 -0
- package/components/topojson-map/types.js +8 -1
- package/components/topojson-map/types.js.map +1 -1
- package/components/topojson-map/utils.d.ts +22 -0
- package/components/topojson-map/utils.js +211 -2
- package/components/topojson-map/utils.js.map +1 -1
- package/components.d.ts +1 -0
- package/components.js.map +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/types.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GeoProjection } from 'd3-geo';
|
|
2
2
|
import { ComponentConfigInterface } from "../../core/component/config";
|
|
3
3
|
import { ColorAccessor, NumericAccessor, StringAccessor } from "../../types/accessor";
|
|
4
|
-
import { MapPointLabelPosition } from './types';
|
|
4
|
+
import { MapPointLabelPosition, TopoJSONMapClusterDatum, TopoJSONMapPointStyles } from './types';
|
|
5
5
|
export interface TopoJSONMapConfigInterface<AreaDatum, PointDatum = unknown, LinkDatum = unknown> extends ComponentConfigInterface {
|
|
6
6
|
/** MapProjection (aka D3's GeoProjection) instance. Default: `MapProjection.Kavrayskiy7()` */
|
|
7
7
|
projection?: GeoProjection;
|
|
@@ -31,37 +31,122 @@ export interface TopoJSONMapConfigInterface<AreaDatum, PointDatum = unknown, Lin
|
|
|
31
31
|
linkSource?: ((l: LinkDatum) => number | string | PointDatum);
|
|
32
32
|
/** Link target accessor function. Default: `d => d.target` */
|
|
33
33
|
linkTarget?: ((l: LinkDatum) => number | string | PointDatum);
|
|
34
|
+
/** Flow source point longitude accessor function or value. Default: `f => f.sourceLongitude` */
|
|
35
|
+
sourceLongitude?: NumericAccessor<LinkDatum>;
|
|
36
|
+
/** Flow source point latitude accessor function or value. Default: `f => f.sourceLatitude` */
|
|
37
|
+
sourceLatitude?: NumericAccessor<LinkDatum>;
|
|
38
|
+
/** Flow target point longitude accessor function or value. Default: `f => f.targetLongitude` */
|
|
39
|
+
targetLongitude?: NumericAccessor<LinkDatum>;
|
|
40
|
+
/** Flow target point latitude accessor function or value. Default: `f => f.targetLatitude` */
|
|
41
|
+
targetLatitude?: NumericAccessor<LinkDatum>;
|
|
42
|
+
/** Flow source point radius accessor function or value. Default: `3` */
|
|
43
|
+
sourcePointRadius?: NumericAccessor<LinkDatum>;
|
|
44
|
+
/** Source point color accessor function or value. Default: `'#88919f'` */
|
|
45
|
+
sourcePointColor?: ColorAccessor<LinkDatum>;
|
|
46
|
+
/** Flow particle color accessor function or value. Default: `'#949dad'` */
|
|
47
|
+
flowParticleColor?: ColorAccessor<LinkDatum>;
|
|
48
|
+
/** Flow particle radius accessor function or value. Default: `1.1` */
|
|
49
|
+
flowParticleRadius?: NumericAccessor<LinkDatum>;
|
|
50
|
+
/** Flow particle speed accessor function or value. The unit is arbitrary, recommended range is 0 – 0.2. Default: `0.07` */
|
|
51
|
+
flowParticleSpeed?: NumericAccessor<LinkDatum>;
|
|
52
|
+
/** Flow particle density accessor function or value on the range of [0, 1]. Default: `0.6` */
|
|
53
|
+
flowParticleDensity?: NumericAccessor<LinkDatum>;
|
|
54
|
+
/** Enable flow animations. When true, shows animated particles along links. Default: `false` */
|
|
55
|
+
enableFlowAnimation?: boolean;
|
|
56
|
+
/** Flow source point click callback function. Default: `undefined` */
|
|
57
|
+
onSourcePointClick?: (f: LinkDatum, x: number, y: number, event: MouseEvent) => void;
|
|
58
|
+
/** Flow source point mouse over callback function. Default: `undefined` */
|
|
59
|
+
onSourcePointMouseEnter?: (f: LinkDatum, x: number, y: number, event: MouseEvent) => void;
|
|
60
|
+
/** Flow source point mouse leave callback function. Default: `undefined` */
|
|
61
|
+
onSourcePointMouseLeave?: (f: LinkDatum, event: MouseEvent) => void;
|
|
34
62
|
/** Area id accessor function corresponding to the feature id from TopoJSON. Default: `d => d.id ?? ''` */
|
|
35
63
|
areaId?: StringAccessor<AreaDatum>;
|
|
36
64
|
/** Area color value or accessor function. Default: `d => d.color ?? null` */
|
|
37
65
|
areaColor?: ColorAccessor<AreaDatum>;
|
|
38
66
|
/** Area cursor value or accessor function. Default: `null` */
|
|
39
67
|
areaCursor?: StringAccessor<AreaDatum>;
|
|
68
|
+
/** Area label accessor function. Default: `undefined` */
|
|
69
|
+
areaLabel?: StringAccessor<AreaDatum>;
|
|
40
70
|
/** Point color accessor. Default: `d => d.color ?? null` */
|
|
41
71
|
pointColor?: ColorAccessor<PointDatum>;
|
|
42
72
|
/** Point radius accessor. Default: `d => d.radius ?? 8` */
|
|
43
73
|
pointRadius?: NumericAccessor<PointDatum>;
|
|
44
74
|
/** Point stroke width accessor. Default: `d => d.strokeWidth ?? null` */
|
|
45
75
|
pointStrokeWidth?: NumericAccessor<PointDatum>;
|
|
76
|
+
/** Point shape accessor. Default: `TopoJSONMapPointShape.Circle` */
|
|
77
|
+
pointShape?: StringAccessor<PointDatum>;
|
|
78
|
+
/** Point ring width for ring-shaped points. Default: `2` */
|
|
79
|
+
pointRingWidth?: NumericAccessor<PointDatum>;
|
|
46
80
|
/** Point cursor constant value or accessor function. Default: `null` */
|
|
47
81
|
pointCursor?: StringAccessor<PointDatum>;
|
|
48
82
|
/** Point longitude accessor function. Default: `d => d.longitude ?? null` */
|
|
49
83
|
longitude?: NumericAccessor<PointDatum>;
|
|
50
84
|
/** Point latitude accessor function. Default: `d => d.latitude ?? null` */
|
|
51
85
|
latitude?: NumericAccessor<PointDatum>;
|
|
52
|
-
/** Point label accessor function. Default: `undefined`
|
|
86
|
+
/** Point inner label accessor function. Default: `undefined` */
|
|
53
87
|
pointLabel?: StringAccessor<PointDatum>;
|
|
54
|
-
/** Point label
|
|
88
|
+
/** Point inner label color accessor function or constant value.
|
|
89
|
+
* By default, the label color will be set, depending on the point brightness, either to
|
|
90
|
+
* `--vis-map-point-label-text-color-dark` or to `--vis-map-point-label-text-color-light` CSS variable.
|
|
91
|
+
* Default: `undefined`
|
|
92
|
+
*/
|
|
93
|
+
pointLabelColor?: ColorAccessor<PointDatum>;
|
|
94
|
+
/** Point label position. Default: `MapPointLabelPosition.Center`
|
|
95
|
+
* @deprecated Point labels are now always centered within points. Use pointBottomLabel for labels below points.
|
|
96
|
+
*/
|
|
55
97
|
pointLabelPosition?: MapPointLabelPosition;
|
|
98
|
+
/** Point bottom label accessor function. Default: `undefined` */
|
|
99
|
+
pointBottomLabel?: StringAccessor<PointDatum>;
|
|
56
100
|
/** Point color brightness ratio for switching between dark and light text label color. Default: `0.65` */
|
|
57
101
|
pointLabelTextBrightnessRatio?: number;
|
|
58
102
|
/** Point id accessor function. Default: `d => d.id` */
|
|
59
103
|
pointId?: ((d: PointDatum, i: number) => string);
|
|
104
|
+
/** Cluster color accessor function or constant value. Default: `undefined` */
|
|
105
|
+
clusterColor?: ColorAccessor<TopoJSONMapClusterDatum<PointDatum>>;
|
|
106
|
+
/** Cluster radius accessor function or constant value. Default: `undefined` */
|
|
107
|
+
clusterRadius?: NumericAccessor<TopoJSONMapClusterDatum<PointDatum>>;
|
|
108
|
+
/** Cluster inner label accessor function. Default: `d => d.pointCount` */
|
|
109
|
+
clusterLabel?: StringAccessor<TopoJSONMapClusterDatum<PointDatum>>;
|
|
110
|
+
/** Cluster inner label color accessor function or constant value. Default: `undefined` */
|
|
111
|
+
clusterLabelColor?: StringAccessor<TopoJSONMapClusterDatum<PointDatum>>;
|
|
112
|
+
/** Cluster bottom label accessor function. Default: `''` */
|
|
113
|
+
clusterBottomLabel?: StringAccessor<TopoJSONMapClusterDatum<PointDatum>>;
|
|
114
|
+
/** The width of the cluster point ring. Default: `2` */
|
|
115
|
+
clusterRingWidth?: number;
|
|
116
|
+
/** When cluster is expanded, show a background circle to better separate points from the base map. Default: `true` */
|
|
117
|
+
clusterBackground?: boolean;
|
|
118
|
+
/** Defines whether the cluster should expand on click or not. Default: `true` */
|
|
119
|
+
clusterExpandOnClick?: boolean;
|
|
120
|
+
/** Clustering distance in pixels. Default: `55` */
|
|
121
|
+
clusteringDistance?: number;
|
|
122
|
+
/** Enable point clustering. Default: `false` */
|
|
123
|
+
clustering?: boolean;
|
|
60
124
|
/** Enables blur and blending between neighbouring points. Default: `false` */
|
|
61
125
|
heatmapMode?: boolean;
|
|
62
126
|
/** Heatmap blur filter stdDeviation value. Default: `10` */
|
|
63
127
|
heatmapModeBlurStdDeviation?: number;
|
|
64
128
|
/** Zoom level at which the heatmap mode will be disabled. Default: `2.5` */
|
|
65
129
|
heatmapModeZoomLevelThreshold?: number;
|
|
130
|
+
/** A single map point can have multiple properties displayed as a small pie chart.
|
|
131
|
+
* By setting the colorMap configuration you can specify data properties that should be mapped to various pie / donut segments.
|
|
132
|
+
*
|
|
133
|
+
* ```
|
|
134
|
+
* {
|
|
135
|
+
* [key in keyof PointDatum]?: { color: string, className?: string }
|
|
136
|
+
* }
|
|
137
|
+
* ```
|
|
138
|
+
* e.g.:
|
|
139
|
+
* ```
|
|
140
|
+
* {
|
|
141
|
+
* healthy: { color: 'green' },
|
|
142
|
+
* warning: { color: 'orange' },
|
|
143
|
+
* critical: { color: 'red' }
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
* where every data point has the `healthy`, `warning` and `critical` numerical or boolean property.
|
|
147
|
+
* Note: Properties with 0 or falsy values will not be displayed in the pie chart.
|
|
148
|
+
* Default: `{}`
|
|
149
|
+
*/
|
|
150
|
+
colorMap?: TopoJSONMapPointStyles<PointDatum>;
|
|
66
151
|
}
|
|
67
152
|
export declare const TopoJSONMapDefaultConfig: TopoJSONMapConfigInterface<unknown, unknown, unknown>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ComponentDefaultConfig } from '../../core/component/config.js';
|
|
2
|
-
import { MapPointLabelPosition } from './types.js';
|
|
2
|
+
import { TopoJSONMapPointShape, MapPointLabelPosition } from './types.js';
|
|
3
3
|
|
|
4
|
-
const TopoJSONMapDefaultConfig = Object.assign(Object.assign({}, ComponentDefaultConfig), { projection: undefined, duration: 1500, topojson: undefined, mapFeatureName: 'countries', mapFitToPoints: false, zoomExtent: [0.5,
|
|
4
|
+
const TopoJSONMapDefaultConfig = Object.assign(Object.assign({}, ComponentDefaultConfig), { projection: undefined, duration: 1500, topojson: undefined, mapFeatureName: 'countries', mapFitToPoints: false, zoomExtent: [0.5, 12], zoomDuration: 400, disableZoom: false, zoomFactor: undefined, linkWidth: (d) => { var _a; return (_a = d.width) !== null && _a !== void 0 ? _a : 1; }, linkColor: (d) => { var _a; return (_a = d.color) !== null && _a !== void 0 ? _a : null; }, linkCursor: null, linkId: (d, i) => { var _a; return `${(_a = d.id) !== null && _a !== void 0 ? _a : i}`; }, linkSource: (d) => d.source, linkTarget: (d) => d.target,
|
|
5
|
+
// Flow defaults
|
|
6
|
+
sourceLongitude: (f) => f.sourceLongitude, sourceLatitude: (f) => f.sourceLatitude, targetLongitude: (f) => f.targetLongitude, targetLatitude: (f) => f.targetLatitude, sourcePointRadius: 3, sourcePointColor: '#88919f', flowParticleColor: '#949dad', flowParticleRadius: 1.1, flowParticleSpeed: 0.07, flowParticleDensity: 0.6, enableFlowAnimation: false, onSourcePointClick: undefined, onSourcePointMouseEnter: undefined, onSourcePointMouseLeave: undefined, areaId: (d) => { var _a; return (_a = d.id) !== null && _a !== void 0 ? _a : ''; }, areaColor: (d) => { var _a; return (_a = d.color) !== null && _a !== void 0 ? _a : null; }, areaCursor: null, areaLabel: undefined, longitude: (d) => d.longitude, latitude: (d) => d.latitude, pointColor: (d) => { var _a; return (_a = d.color) !== null && _a !== void 0 ? _a : null; }, pointRadius: (d) => { var _a; return (_a = d.radius) !== null && _a !== void 0 ? _a : 8; }, pointStrokeWidth: (d) => { var _a; return (_a = d.strokeWidth) !== null && _a !== void 0 ? _a : 0; }, pointShape: () => TopoJSONMapPointShape.Circle, pointRingWidth: (d) => { var _a; return (_a = d.ringWidth) !== null && _a !== void 0 ? _a : 2; }, pointCursor: null, pointLabel: undefined, pointLabelColor: undefined, pointLabelPosition: MapPointLabelPosition.Center, pointBottomLabel: undefined, pointLabelTextBrightnessRatio: 0.65, pointId: (d) => d.id,
|
|
7
|
+
// Cluster
|
|
8
|
+
clusterColor: undefined, clusterRadius: undefined, clusterLabel: (d) => `${d.pointCount}`, clusterLabelColor: undefined, clusterBottomLabel: '', clusterRingWidth: 2, clusterBackground: true, clusterExpandOnClick: true, clusteringDistance: 55, clustering: false, heatmapMode: false, heatmapModeBlurStdDeviation: 8, heatmapModeZoomLevelThreshold: 2.5, colorMap: {} });
|
|
5
9
|
|
|
6
10
|
export { TopoJSONMapDefaultConfig };
|
|
7
11
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/components/topojson-map/config.ts"],"sourcesContent":["import { GeoProjection } from 'd3-geo'\nimport { ComponentConfigInterface, ComponentDefaultConfig } from 'core/component/config'\n\n// Types\nimport { ColorAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\n\n// Local Types\nimport { MapPointLabelPosition } from './types'\n\nexport interface TopoJSONMapConfigInterface<\n AreaDatum,\n PointDatum = unknown,\n LinkDatum = unknown,\n> extends ComponentConfigInterface {\n // General\n /** MapProjection (aka D3's GeoProjection) instance. Default: `MapProjection.Kavrayskiy7()` */\n projection?: GeoProjection;\n /** Map data in the TopoJSON topology format. Default: `undefined` */\n topojson?: TopoJSON.Topology;\n /** Name of the map features to be displayed, e.g. 'countries' or 'counties'. Default: `countries` */\n mapFeatureName?: string;\n /** Set initial map fit to points instead of topojson features. Default: `false` */\n mapFitToPoints?: boolean;\n /** Initial zoom level. Default: `undefined` */\n zoomFactor?: number;\n /** Disable pan / zoom interactions. Default: `false` */\n disableZoom?: boolean;\n /** Zoom extent. Default: `[0.5, 6]` */\n zoomExtent?: number[];\n /** Zoom animation duration. Default: `400` */\n zoomDuration?: number;\n\n /** Link width value or accessor function. Default: `d => d.width ?? 1` */\n linkWidth?: NumericAccessor<LinkDatum>;\n /** Link color value or accessor function. Default: `d => d.color ?? null` */\n linkColor?: ColorAccessor<LinkDatum>;\n /** Link cursor value or accessor function. Default: `null` */\n linkCursor?: StringAccessor<LinkDatum>;\n /** Link id accessor function. Default: `d => d.id` */\n linkId?: StringAccessor<LinkDatum>;\n /** Link source accessor function. Default: `d => d.source` */\n linkSource?: ((l: LinkDatum) => number | string | PointDatum);\n /** Link target accessor function. Default: `d => d.target` */\n linkTarget?: ((l: LinkDatum) => number | string | PointDatum);\n\n /** Area id accessor function corresponding to the feature id from TopoJSON. Default: `d => d.id ?? ''` */\n areaId?: StringAccessor<AreaDatum>;\n /** Area color value or accessor function. Default: `d => d.color ?? null` */\n areaColor?: ColorAccessor<AreaDatum>;\n /** Area cursor value or accessor function. Default: `null` */\n areaCursor?: StringAccessor<AreaDatum>;\n\n /** Point color accessor. Default: `d => d.color ?? null` */\n pointColor?: ColorAccessor<PointDatum>;\n /** Point radius accessor. Default: `d => d.radius ?? 8` */\n pointRadius?: NumericAccessor<PointDatum>;\n /** Point stroke width accessor. Default: `d => d.strokeWidth ?? null` */\n pointStrokeWidth?: NumericAccessor<PointDatum>;\n /** Point cursor constant value or accessor function. Default: `null` */\n pointCursor?: StringAccessor<PointDatum>;\n /** Point longitude accessor function. Default: `d => d.longitude ?? null` */\n longitude?: NumericAccessor<PointDatum>;\n /** Point latitude accessor function. Default: `d => d.latitude ?? null` */\n latitude?: NumericAccessor<PointDatum>;\n /** Point label accessor function. Default: `undefined` */\n pointLabel?: StringAccessor<PointDatum>;\n /** Point label position. Default: `Position.Bottom` */\n pointLabelPosition?: MapPointLabelPosition;\n /** Point color brightness ratio for switching between dark and light text label color. Default: `0.65` */\n pointLabelTextBrightnessRatio?: number;\n /** Point id accessor function. Default: `d => d.id` */\n pointId?: ((d: PointDatum, i: number) => string);\n\n /** Enables blur and blending between neighbouring points. Default: `false` */\n heatmapMode?: boolean;\n /** Heatmap blur filter stdDeviation value. Default: `10` */\n heatmapModeBlurStdDeviation?: number;\n /** Zoom level at which the heatmap mode will be disabled. Default: `2.5` */\n heatmapModeZoomLevelThreshold?: number;\n}\n\nexport const TopoJSONMapDefaultConfig: TopoJSONMapConfigInterface<unknown, unknown, unknown> = {\n ...ComponentDefaultConfig,\n projection: undefined,\n duration: 1500,\n topojson: undefined,\n mapFeatureName: 'countries',\n mapFitToPoints: false,\n\n zoomExtent: [0.5, 6],\n zoomDuration: 400,\n disableZoom: false,\n zoomFactor: undefined,\n\n linkWidth: (d: unknown): number => (d as { width: number }).width ?? 1,\n linkColor: (d: unknown): string => (d as { color: string }).color ?? null,\n linkCursor: null,\n linkId: (d: unknown, i: number | undefined): string => `${(d as { id: string }).id ?? i}`,\n linkSource: (d: unknown): (number | string | unknown) => (d as { source: string }).source,\n linkTarget: (d: unknown): (number | string | unknown) => (d as { target: string }).target,\n\n areaId: (d: unknown): string => (d as { id: string }).id ?? '',\n areaColor: (d: unknown): string => (d as { color: string }).color ?? null,\n areaCursor: null,\n\n longitude: (d: unknown): number => (d as { longitude: number }).longitude,\n latitude: (d: unknown): number => (d as { latitude: number }).latitude,\n pointColor: (d: unknown): string => (d as { color: string }).color ?? null,\n pointRadius: (d: unknown): number => (d as { radius: number }).radius ?? 8,\n pointStrokeWidth: (d: unknown): number => (d as { strokeWidth: number }).strokeWidth ?? 0,\n pointCursor: null,\n pointLabel: undefined,\n pointLabelPosition: MapPointLabelPosition.Bottom,\n pointLabelTextBrightnessRatio: 0.65,\n pointId: (d: unknown): string => (d as { id: string }).id,\n\n heatmapMode: false,\n heatmapModeBlurStdDeviation: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","sources":["../../../src/components/topojson-map/config.ts"],"sourcesContent":["import { GeoProjection } from 'd3-geo'\nimport { ComponentConfigInterface, ComponentDefaultConfig } from 'core/component/config'\n\n// Types\nimport { ColorAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\n// Local Types\nimport { MapPointLabelPosition, TopoJSONMapClusterDatum, TopoJSONMapPointShape, TopoJSONMapPointStyles } from './types'\n\nexport interface TopoJSONMapConfigInterface<\n AreaDatum,\n PointDatum = unknown,\n LinkDatum = unknown,\n> extends ComponentConfigInterface {\n // General\n /** MapProjection (aka D3's GeoProjection) instance. Default: `MapProjection.Kavrayskiy7()` */\n projection?: GeoProjection;\n /** Map data in the TopoJSON topology format. Default: `undefined` */\n topojson?: TopoJSON.Topology;\n /** Name of the map features to be displayed, e.g. 'countries' or 'counties'. Default: `countries` */\n mapFeatureName?: string;\n /** Set initial map fit to points instead of topojson features. Default: `false` */\n mapFitToPoints?: boolean;\n /** Initial zoom level. Default: `undefined` */\n zoomFactor?: number;\n /** Disable pan / zoom interactions. Default: `false` */\n disableZoom?: boolean;\n /** Zoom extent. Default: `[0.5, 6]` */\n zoomExtent?: number[];\n /** Zoom animation duration. Default: `400` */\n zoomDuration?: number;\n\n /** Link width value or accessor function. Default: `d => d.width ?? 1` */\n linkWidth?: NumericAccessor<LinkDatum>;\n /** Link color value or accessor function. Default: `d => d.color ?? null` */\n linkColor?: ColorAccessor<LinkDatum>;\n /** Link cursor value or accessor function. Default: `null` */\n linkCursor?: StringAccessor<LinkDatum>;\n /** Link id accessor function. Default: `d => d.id` */\n linkId?: StringAccessor<LinkDatum>;\n /** Link source accessor function. Default: `d => d.source` */\n linkSource?: ((l: LinkDatum) => number | string | PointDatum);\n /** Link target accessor function. Default: `d => d.target` */\n linkTarget?: ((l: LinkDatum) => number | string | PointDatum);\n\n // Flow features (can reuse existing linkSource/linkTarget for flow endpoints)\n /** Flow source point longitude accessor function or value. Default: `f => f.sourceLongitude` */\n sourceLongitude?: NumericAccessor<LinkDatum>;\n /** Flow source point latitude accessor function or value. Default: `f => f.sourceLatitude` */\n sourceLatitude?: NumericAccessor<LinkDatum>;\n /** Flow target point longitude accessor function or value. Default: `f => f.targetLongitude` */\n targetLongitude?: NumericAccessor<LinkDatum>;\n /** Flow target point latitude accessor function or value. Default: `f => f.targetLatitude` */\n targetLatitude?: NumericAccessor<LinkDatum>;\n /** Flow source point radius accessor function or value. Default: `3` */\n sourcePointRadius?: NumericAccessor<LinkDatum>;\n /** Source point color accessor function or value. Default: `'#88919f'` */\n sourcePointColor?: ColorAccessor<LinkDatum>;\n /** Flow particle color accessor function or value. Default: `'#949dad'` */\n flowParticleColor?: ColorAccessor<LinkDatum>;\n /** Flow particle radius accessor function or value. Default: `1.1` */\n flowParticleRadius?: NumericAccessor<LinkDatum>;\n /** Flow particle speed accessor function or value. The unit is arbitrary, recommended range is 0 – 0.2. Default: `0.07` */\n flowParticleSpeed?: NumericAccessor<LinkDatum>;\n /** Flow particle density accessor function or value on the range of [0, 1]. Default: `0.6` */\n flowParticleDensity?: NumericAccessor<LinkDatum>;\n /** Enable flow animations. When true, shows animated particles along links. Default: `false` */\n enableFlowAnimation?: boolean;\n\n // Flow Events\n /** Flow source point click callback function. Default: `undefined` */\n onSourcePointClick?: (f: LinkDatum, x: number, y: number, event: MouseEvent) => void;\n /** Flow source point mouse over callback function. Default: `undefined` */\n onSourcePointMouseEnter?: (f: LinkDatum, x: number, y: number, event: MouseEvent) => void;\n /** Flow source point mouse leave callback function. Default: `undefined` */\n onSourcePointMouseLeave?: (f: LinkDatum, event: MouseEvent) => void;\n\n /** Area id accessor function corresponding to the feature id from TopoJSON. Default: `d => d.id ?? ''` */\n areaId?: StringAccessor<AreaDatum>;\n /** Area color value or accessor function. Default: `d => d.color ?? null` */\n areaColor?: ColorAccessor<AreaDatum>;\n /** Area cursor value or accessor function. Default: `null` */\n areaCursor?: StringAccessor<AreaDatum>;\n /** Area label accessor function. Default: `undefined` */\n areaLabel?: StringAccessor<AreaDatum>;\n\n /** Point color accessor. Default: `d => d.color ?? null` */\n pointColor?: ColorAccessor<PointDatum>;\n /** Point radius accessor. Default: `d => d.radius ?? 8` */\n pointRadius?: NumericAccessor<PointDatum>;\n /** Point stroke width accessor. Default: `d => d.strokeWidth ?? null` */\n pointStrokeWidth?: NumericAccessor<PointDatum>;\n /** Point shape accessor. Default: `TopoJSONMapPointShape.Circle` */\n pointShape?: StringAccessor<PointDatum>;\n /** Point ring width for ring-shaped points. Default: `2` */\n pointRingWidth?: NumericAccessor<PointDatum>;\n /** Point cursor constant value or accessor function. Default: `null` */\n pointCursor?: StringAccessor<PointDatum>;\n /** Point longitude accessor function. Default: `d => d.longitude ?? null` */\n longitude?: NumericAccessor<PointDatum>;\n /** Point latitude accessor function. Default: `d => d.latitude ?? null` */\n latitude?: NumericAccessor<PointDatum>;\n /** Point inner label accessor function. Default: `undefined` */\n pointLabel?: StringAccessor<PointDatum>;\n /** Point inner label color accessor function or constant value.\n * By default, the label color will be set, depending on the point brightness, either to\n * `--vis-map-point-label-text-color-dark` or to `--vis-map-point-label-text-color-light` CSS variable.\n * Default: `undefined`\n */\n pointLabelColor?: ColorAccessor<PointDatum>;\n /** Point label position. Default: `MapPointLabelPosition.Center`\n * @deprecated Point labels are now always centered within points. Use pointBottomLabel for labels below points.\n */\n pointLabelPosition?: MapPointLabelPosition;\n /** Point bottom label accessor function. Default: `undefined` */\n pointBottomLabel?: StringAccessor<PointDatum>;\n /** Point color brightness ratio for switching between dark and light text label color. Default: `0.65` */\n pointLabelTextBrightnessRatio?: number;\n /** Point id accessor function. Default: `d => d.id` */\n pointId?: ((d: PointDatum, i: number) => string);\n\n // Cluster\n /** Cluster color accessor function or constant value. Default: `undefined` */\n clusterColor?: ColorAccessor<TopoJSONMapClusterDatum<PointDatum>>;\n /** Cluster radius accessor function or constant value. Default: `undefined` */\n clusterRadius?: NumericAccessor<TopoJSONMapClusterDatum<PointDatum>>;\n /** Cluster inner label accessor function. Default: `d => d.pointCount` */\n clusterLabel?: StringAccessor<TopoJSONMapClusterDatum<PointDatum>>;\n /** Cluster inner label color accessor function or constant value. Default: `undefined` */\n clusterLabelColor?: StringAccessor<TopoJSONMapClusterDatum<PointDatum>>;\n /** Cluster bottom label accessor function. Default: `''` */\n clusterBottomLabel?: StringAccessor<TopoJSONMapClusterDatum<PointDatum>>;\n /** The width of the cluster point ring. Default: `2` */\n clusterRingWidth?: number;\n /** When cluster is expanded, show a background circle to better separate points from the base map. Default: `true` */\n clusterBackground?: boolean;\n /** Defines whether the cluster should expand on click or not. Default: `true` */\n clusterExpandOnClick?: boolean;\n /** Clustering distance in pixels. Default: `55` */\n clusteringDistance?: number;\n /** Enable point clustering. Default: `false` */\n clustering?: boolean;\n\n /** Enables blur and blending between neighbouring points. Default: `false` */\n heatmapMode?: boolean;\n /** Heatmap blur filter stdDeviation value. Default: `10` */\n heatmapModeBlurStdDeviation?: number;\n /** Zoom level at which the heatmap mode will be disabled. Default: `2.5` */\n heatmapModeZoomLevelThreshold?: number;\n /** A single map point can have multiple properties displayed as a small pie chart.\n * By setting the colorMap configuration you can specify data properties that should be mapped to various pie / donut segments.\n *\n * ```\n * {\n * [key in keyof PointDatum]?: { color: string, className?: string }\n * }\n * ```\n * e.g.:\n * ```\n * {\n * healthy: { color: 'green' },\n * warning: { color: 'orange' },\n * critical: { color: 'red' }\n * }\n * ```\n * where every data point has the `healthy`, `warning` and `critical` numerical or boolean property.\n * Note: Properties with 0 or falsy values will not be displayed in the pie chart.\n * Default: `{}`\n */\n colorMap?: TopoJSONMapPointStyles<PointDatum>;\n\n}\n\nexport const TopoJSONMapDefaultConfig: TopoJSONMapConfigInterface<unknown, unknown, unknown> = {\n ...ComponentDefaultConfig,\n projection: undefined,\n duration: 1500,\n topojson: undefined,\n mapFeatureName: 'countries',\n mapFitToPoints: false,\n\n zoomExtent: [0.5, 12],\n zoomDuration: 400,\n disableZoom: false,\n zoomFactor: undefined,\n\n linkWidth: (d: unknown): number => (d as { width: number }).width ?? 1,\n linkColor: (d: unknown): string => (d as { color: string }).color ?? null,\n linkCursor: null,\n linkId: (d: unknown, i: number | undefined): string => `${(d as { id: string }).id ?? i}`,\n linkSource: (d: unknown): number | string | unknown => (d as { source: number | string | unknown }).source,\n linkTarget: (d: unknown): number | string | unknown => (d as { target: number | string | unknown }).target,\n\n // Flow defaults\n sourceLongitude: (f: unknown): number => (f as { sourceLongitude: number }).sourceLongitude as number,\n sourceLatitude: (f: unknown): number => (f as { sourceLatitude: number }).sourceLatitude as number,\n targetLongitude: (f: unknown): number => (f as { targetLongitude: number }).targetLongitude as number,\n targetLatitude: (f: unknown): number => (f as { targetLatitude: number }).targetLatitude as number,\n sourcePointRadius: 3,\n sourcePointColor: '#88919f',\n flowParticleColor: '#949dad',\n flowParticleRadius: 1.1,\n flowParticleSpeed: 0.07,\n flowParticleDensity: 0.6,\n enableFlowAnimation: false,\n onSourcePointClick: undefined,\n onSourcePointMouseEnter: undefined,\n onSourcePointMouseLeave: undefined,\n\n areaId: (d: unknown): string => (d as { id: string }).id ?? '',\n areaColor: (d: unknown): string => (d as { color: string }).color ?? null,\n areaCursor: null,\n areaLabel: undefined,\n\n longitude: (d: unknown): number => (d as { longitude: number }).longitude,\n latitude: (d: unknown): number => (d as { latitude: number }).latitude,\n pointColor: (d: unknown): string => (d as { color: string }).color ?? null,\n pointRadius: (d: unknown): number => (d as { radius: number }).radius ?? 8,\n pointStrokeWidth: (d: unknown): number => (d as { strokeWidth: number }).strokeWidth ?? 0,\n pointShape: (): string => TopoJSONMapPointShape.Circle,\n pointRingWidth: (d: unknown): number => (d as { ringWidth: number }).ringWidth ?? 2,\n pointCursor: null,\n pointLabel: undefined,\n pointLabelColor: undefined,\n pointLabelPosition: MapPointLabelPosition.Center,\n pointBottomLabel: undefined,\n pointLabelTextBrightnessRatio: 0.65,\n pointId: (d: unknown): string => (d as { id: string }).id,\n\n // Cluster\n clusterColor: undefined,\n clusterRadius: undefined,\n clusterLabel: (d: TopoJSONMapClusterDatum<unknown>): string => `${d.pointCount}`,\n clusterLabelColor: undefined,\n clusterBottomLabel: '',\n clusterRingWidth: 2,\n clusterBackground: true,\n clusterExpandOnClick: true,\n clusteringDistance: 55,\n clustering: false,\n\n heatmapMode: false,\n heatmapModeBlurStdDeviation: 8,\n heatmapModeZoomLevelThreshold: 2.5,\n\n colorMap: {},\n}\n\n"],"names":[],"mappings":";;;AA4KO,MAAM,wBAAwB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAChC,sBAAsB,CAAA,EAAA,EACzB,UAAU,EAAE,SAAS,EACrB,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,SAAS,EACnB,cAAc,EAAE,WAAW,EAC3B,cAAc,EAAE,KAAK,EAErB,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EACrB,YAAY,EAAE,GAAG,EACjB,WAAW,EAAE,KAAK,EAClB,UAAU,EAAE,SAAS,EAErB,SAAS,EAAE,CAAC,CAAU,KAAa,EAAA,IAAA,EAAA,CAAA,CAAA,OAAA,CAAC,EAAA,GAAA,CAAuB,CAAC,KAAK,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,CAAC,CAAA,EAAA,EACtE,SAAS,EAAE,CAAC,CAAU,KAAY,EAAA,IAAA,EAAA,CAAA,CAAC,OAAA,CAAA,EAAA,GAAC,CAAuB,CAAC,KAAK,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,IAAI,CAAA,EAAA,EACzE,UAAU,EAAE,IAAI,EAChB,MAAM,EAAE,CAAC,CAAU,EAAE,CAAqB,KAAa,EAAA,IAAA,EAAA,CAAA,CAAA,OAAA,CAAG,EAAA,CAAA,EAAA,GAAC,CAAoB,CAAC,EAAE,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,CAAC,CAAA,CAAE,CAAA,EAAA,EACzF,UAAU,EAAE,CAAC,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,EAAE,CAAC,EAC9B,6BAA6B,EAAE,GAAG,EAElC,QAAQ,EAAE,EAAE;;;;"}
|
|
@@ -22,12 +22,27 @@ export declare class TopoJSONMap<AreaDatum, PointDatum = unknown, LinkDatum = un
|
|
|
22
22
|
private _prevWidth;
|
|
23
23
|
private _prevHeight;
|
|
24
24
|
private _animFrameId;
|
|
25
|
+
private _isZooming;
|
|
26
|
+
private _zoomEndTimeoutId;
|
|
27
|
+
private _collisionDetectionAnimFrameId;
|
|
28
|
+
private _clusterIndex;
|
|
29
|
+
private _expandedCluster;
|
|
30
|
+
private _collapsedCluster;
|
|
31
|
+
private _collapsedClusterPointIds;
|
|
32
|
+
private _eventInitiatedByComponent;
|
|
25
33
|
private _featureCollection;
|
|
26
34
|
private _zoomBehavior;
|
|
27
35
|
private _backgroundRect;
|
|
28
36
|
private _featuresGroup;
|
|
37
|
+
private _areaLabelsGroup;
|
|
29
38
|
private _linksGroup;
|
|
39
|
+
private _clusterBackgroundGroup;
|
|
30
40
|
private _pointsGroup;
|
|
41
|
+
private _flowParticlesGroup;
|
|
42
|
+
private _sourcePointsGroup;
|
|
43
|
+
private _flowParticles;
|
|
44
|
+
private _sourcePoints;
|
|
45
|
+
private _animationId;
|
|
31
46
|
events: {
|
|
32
47
|
[x: string]: {};
|
|
33
48
|
};
|
|
@@ -38,16 +53,34 @@ export declare class TopoJSONMap<AreaDatum, PointDatum = unknown, LinkDatum = un
|
|
|
38
53
|
_renderBackground(): void;
|
|
39
54
|
_renderGroups(duration: number): void;
|
|
40
55
|
_renderMap(duration: number): void;
|
|
56
|
+
_renderAreaLabels(duration: number): void;
|
|
57
|
+
_renderClusterBackground(duration: number): void;
|
|
41
58
|
_renderLinks(duration: number): void;
|
|
59
|
+
private _getPointData;
|
|
42
60
|
_renderPoints(duration: number): void;
|
|
43
61
|
_fitToPoints(points?: PointDatum[], pad?: number): void;
|
|
44
62
|
_applyZoom(): void;
|
|
45
63
|
_onResize(): void;
|
|
46
64
|
_onZoom(event: D3ZoomEvent<any, any>): void;
|
|
65
|
+
_onZoomEnd(): void;
|
|
66
|
+
private _runCollisionDetection;
|
|
47
67
|
_onZoomHandler(transform: ZoomTransform, isMouseEvent: boolean, isExternalEvent: boolean): void;
|
|
48
68
|
zoomIn(increment?: number): void;
|
|
49
69
|
zoomOut(increment?: number): void;
|
|
50
70
|
setZoom(zoomLevel: number): void;
|
|
51
71
|
fitView(): void;
|
|
72
|
+
private _initFlowFeatures;
|
|
73
|
+
private _renderSourcePoints;
|
|
74
|
+
private _renderFlowParticles;
|
|
75
|
+
private _startFlowAnimation;
|
|
76
|
+
private _animateFlow;
|
|
77
|
+
private _stopFlowAnimation;
|
|
78
|
+
private _updateFlowParticles;
|
|
79
|
+
private _onPointClick;
|
|
80
|
+
private _expandCluster;
|
|
81
|
+
private _zoomToExpandedCluster;
|
|
82
|
+
private _zoomToLocation;
|
|
83
|
+
private _collapseExpandedCluster;
|
|
84
|
+
private _resetExpandedCluster;
|
|
52
85
|
destroy(): void;
|
|
53
86
|
}
|