@unovis/ts 1.0.1-beta.1 → 1.0.1-beta.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.
- package/components/brush/config.d.ts +4 -4
- package/components/brush/config.js.map +1 -1
- package/components/free-brush/config.d.ts +4 -4
- package/components/free-brush/config.js.map +1 -1
- package/components/leaflet-map/types.d.ts +3 -2
- package/components/leaflet-map/types.js.map +1 -1
- package/components/sankey/config.d.ts +1 -1
- package/components/sankey/config.js.map +1 -1
- package/components/topojson-map/config.d.ts +1 -1
- package/components/topojson-map/config.js.map +1 -1
- package/core/xy-component/config.d.ts +1 -1
- package/core/xy-component/config.js.map +1 -1
- package/package.json +1 -3
|
@@ -30,10 +30,10 @@ export interface BrushConfigInterface<Datum> extends Partial<XYComponentConfigIn
|
|
|
30
30
|
selectionMinLength?: number;
|
|
31
31
|
}
|
|
32
32
|
export declare class BrushConfig<Datum> extends XYComponentConfig<Datum> implements BrushConfigInterface<Datum> {
|
|
33
|
-
onBrush: (s: [number, number], e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
34
|
-
onBrushStart: (s: [number, number], e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
35
|
-
onBrushMove: (s: [number, number], e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
36
|
-
onBrushEnd: (s: [number, number], e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
33
|
+
onBrush: (s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
34
|
+
onBrushStart: (s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
35
|
+
onBrushMove: (s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
36
|
+
onBrushEnd: (s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
37
37
|
handleWidth: number;
|
|
38
38
|
selection: any;
|
|
39
39
|
draggable: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/components/brush/config.ts"],"sourcesContent":["import { D3BrushEvent } from 'd3-brush'\nimport { XYComponentConfigInterface, XYComponentConfig } from 'core/xy-component/config'\n\n// Types\nimport { Arrangement } from 'types/position'\n\n// We extend partial XY config interface because x and y properties are optional for Brush\nexport interface BrushConfigInterface<Datum> extends Partial<XYComponentConfigInterface<Datum>> {\n /** Callback function to be called on any Brush event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrush?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush start event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushStart?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush move event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushMove?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush end event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushEnd?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Width of the Brush handle. Default: `1` */\n handleWidth?: number;\n /** Brush selection in the data space coordinates, can be used to control the selection. Default: `undefined` */\n selection?: [number, number] | null;\n /** Allow dragging the selected area as a whole in order to change the selected range. Default: `false` */\n draggable?: boolean;\n /** Position of the handle: `Arrangement.Inside` or `Arrangement.Outside`. Default: `Arrangement.Inside` */\n handlePosition?: Arrangement | string;\n /** Constraint Brush selection to a minimal length in data units. Default: `undefined` */\n selectionMinLength?: number;\n}\n\nexport class BrushConfig<Datum> extends XYComponentConfig<Datum> implements BrushConfigInterface<Datum> {\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrush = (s: [number, number], e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushStart = (s: [number, number], e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushMove = (s: [number, number], e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushEnd = (s: [number, number], e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n handleWidth = 9\n selection = null\n draggable = false\n handlePosition: Arrangement | string = Arrangement.Inside\n selectionMinLength = undefined\n}\n"],"names":[],"mappings":";;;AAoCM,MAAO,WAAmB,SAAQ,iBAAwB,CAAA;AAAhE,IAAA,WAAA,GAAA;;;QAEE,IAAO,CAAA,OAAA,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../src/components/brush/config.ts"],"sourcesContent":["import { D3BrushEvent } from 'd3-brush'\nimport { XYComponentConfigInterface, XYComponentConfig } from 'core/xy-component/config'\n\n// Types\nimport { Arrangement } from 'types/position'\n\n// We extend partial XY config interface because x and y properties are optional for Brush\nexport interface BrushConfigInterface<Datum> extends Partial<XYComponentConfigInterface<Datum>> {\n /** Callback function to be called on any Brush event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrush?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush start event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushStart?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush move event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushMove?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush end event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushEnd?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Width of the Brush handle. Default: `1` */\n handleWidth?: number;\n /** Brush selection in the data space coordinates, can be used to control the selection. Default: `undefined` */\n selection?: [number, number] | null;\n /** Allow dragging the selected area as a whole in order to change the selected range. Default: `false` */\n draggable?: boolean;\n /** Position of the handle: `Arrangement.Inside` or `Arrangement.Outside`. Default: `Arrangement.Inside` */\n handlePosition?: Arrangement | string;\n /** Constraint Brush selection to a minimal length in data units. Default: `undefined` */\n selectionMinLength?: number;\n}\n\nexport class BrushConfig<Datum> extends XYComponentConfig<Datum> implements BrushConfigInterface<Datum> {\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrush = (s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushStart = (s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushMove = (s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushEnd = (s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n handleWidth = 9\n selection = null\n draggable = false\n handlePosition: Arrangement | string = Arrangement.Inside\n selectionMinLength = undefined\n}\n"],"names":[],"mappings":";;;AAoCM,MAAO,WAAmB,SAAQ,iBAAwB,CAAA;AAAhE,IAAA,WAAA,GAAA;;;QAEE,IAAO,CAAA,OAAA,GAAG,CAAC,CAA+B,EAAE,CAAsB,EAAE,UAAmB,KAAY,GAAC,CAAA;;QAEpG,IAAY,CAAA,YAAA,GAAG,CAAC,CAA+B,EAAE,CAAsB,EAAE,UAAmB,KAAY,GAAC,CAAA;;QAEzG,IAAW,CAAA,WAAA,GAAG,CAAC,CAA+B,EAAE,CAAsB,EAAE,UAAmB,KAAY,GAAC,CAAA;;QAExG,IAAU,CAAA,UAAA,GAAG,CAAC,CAA+B,EAAE,CAAsB,EAAE,UAAmB,KAAY,GAAC,CAAA;QACvG,IAAW,CAAA,WAAA,GAAG,CAAC,CAAA;QACf,IAAS,CAAA,SAAA,GAAG,IAAI,CAAA;QAChB,IAAS,CAAA,SAAA,GAAG,KAAK,CAAA;AACjB,QAAA,IAAA,CAAA,cAAc,GAAyB,WAAW,CAAC,MAAM,CAAA;QACzD,IAAkB,CAAA,kBAAA,GAAG,SAAS,CAAA;KAC/B;AAAA;;;;"}
|
|
@@ -33,10 +33,10 @@ export interface FreeBrushConfigInterface<Datum> extends Partial<XYComponentConf
|
|
|
33
33
|
autoHide?: boolean;
|
|
34
34
|
}
|
|
35
35
|
export declare class FreeBrushConfig<Datum> extends XYComponentConfig<Datum> implements FreeBrushConfigInterface<Datum> {
|
|
36
|
-
onBrush: (s: FreeBrushSelection, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
37
|
-
onBrushStart: (s: FreeBrushSelection, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
38
|
-
onBrushMove: (s: FreeBrushSelection, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
39
|
-
onBrushEnd: (s: FreeBrushSelection, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
36
|
+
onBrush: (s: FreeBrushSelection | undefined, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
37
|
+
onBrushStart: (s: FreeBrushSelection | undefined, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
38
|
+
onBrushMove: (s: FreeBrushSelection | undefined, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
39
|
+
onBrushEnd: (s: FreeBrushSelection | undefined, e: D3BrushEvent<Datum>, userDriven: boolean) => void;
|
|
40
40
|
handleWidth: number;
|
|
41
41
|
selection: FreeBrushSelection;
|
|
42
42
|
selectionMinLength: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/components/free-brush/config.ts"],"sourcesContent":["import { D3BrushEvent } from 'd3-brush'\nimport { XYComponentConfigInterface, XYComponentConfig } from 'core/xy-component/config'\n\n// Types\nimport { FreeBrushMode, FreeBrushSelection } from './types'\n\n// We extend partial XY config interface because x and y properties are optional for FreeBrush\nexport interface FreeBrushConfigInterface<Datum> extends Partial<XYComponentConfigInterface<Datum>> {\n /** Brush selection mode. X - horizontal, Y - vertical, XY - both. Default: `FreeBrushMode.X` */\n mode?: FreeBrushMode;\n /** Callback function to be called on any Brush event.\n * Default: `(selection: FreeBrushSelection, event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrush?: ((selection?: FreeBrushSelection, event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush start event.\n * Default: `(selection: FreeBrushSelection, event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushStart?: ((selection?: FreeBrushSelection, event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush move event.\n * Default: `(selection: FreeBrushSelection, event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushMove?: ((selection?: FreeBrushSelection, event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush end event.\n * Default: `(selection: FreeBrushSelection, event: D3BrushEvent<Datum>, userDriven: boolean)L void => {}`\n */\n onBrushEnd?: ((selection?: FreeBrushSelection, event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Width of the Brush handle. Default: `1` */\n handleWidth?: number;\n /** Brush selection in data space, can be used to force set the selection from outside.\n * In case of two dimensional mode, the selection has the following format: `[[xMin, xMax], [yMin, yMax]]`.\n * This config property gets updated on internal brush events. Default: `undefined`\n */\n selection?: FreeBrushSelection | null;\n /** Constraint Brush selection to a minimal length in data units. Default: `undefined` */\n selectionMinLength?: number | [number, number];\n /** Automatically hide the brush after selection. Default: `true` */\n autoHide?: boolean;\n}\n\nexport class FreeBrushConfig<Datum> extends XYComponentConfig<Datum> implements FreeBrushConfigInterface<Datum> {\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrush = (s: FreeBrushSelection, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushStart = (s: FreeBrushSelection, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushMove = (s: FreeBrushSelection, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushEnd = (s: FreeBrushSelection, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n handleWidth = 1\n selection: FreeBrushSelection = undefined\n selectionMinLength = undefined\n mode: FreeBrushMode = FreeBrushMode.X\n autoHide = true\n}\n"],"names":[],"mappings":";;;AAuCM,MAAO,eAAuB,SAAQ,iBAAwB,CAAA;AAApE,IAAA,WAAA,GAAA;;;QAEE,IAAO,CAAA,OAAA,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../src/components/free-brush/config.ts"],"sourcesContent":["import { D3BrushEvent } from 'd3-brush'\nimport { XYComponentConfigInterface, XYComponentConfig } from 'core/xy-component/config'\n\n// Types\nimport { FreeBrushMode, FreeBrushSelection } from './types'\n\n// We extend partial XY config interface because x and y properties are optional for FreeBrush\nexport interface FreeBrushConfigInterface<Datum> extends Partial<XYComponentConfigInterface<Datum>> {\n /** Brush selection mode. X - horizontal, Y - vertical, XY - both. Default: `FreeBrushMode.X` */\n mode?: FreeBrushMode;\n /** Callback function to be called on any Brush event.\n * Default: `(selection: FreeBrushSelection, event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrush?: ((selection?: FreeBrushSelection, event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush start event.\n * Default: `(selection: FreeBrushSelection, event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushStart?: ((selection?: FreeBrushSelection, event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush move event.\n * Default: `(selection: FreeBrushSelection, event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushMove?: ((selection?: FreeBrushSelection, event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Callback function to be called on the Brush end event.\n * Default: `(selection: FreeBrushSelection, event: D3BrushEvent<Datum>, userDriven: boolean)L void => {}`\n */\n onBrushEnd?: ((selection?: FreeBrushSelection, event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);\n /** Width of the Brush handle. Default: `1` */\n handleWidth?: number;\n /** Brush selection in data space, can be used to force set the selection from outside.\n * In case of two dimensional mode, the selection has the following format: `[[xMin, xMax], [yMin, yMax]]`.\n * This config property gets updated on internal brush events. Default: `undefined`\n */\n selection?: FreeBrushSelection | null;\n /** Constraint Brush selection to a minimal length in data units. Default: `undefined` */\n selectionMinLength?: number | [number, number];\n /** Automatically hide the brush after selection. Default: `true` */\n autoHide?: boolean;\n}\n\nexport class FreeBrushConfig<Datum> extends XYComponentConfig<Datum> implements FreeBrushConfigInterface<Datum> {\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrush = (s: FreeBrushSelection | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushStart = (s: FreeBrushSelection | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushMove = (s: FreeBrushSelection | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushEnd = (s: FreeBrushSelection | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {}\n handleWidth = 1\n selection: FreeBrushSelection = undefined\n selectionMinLength = undefined\n mode: FreeBrushMode = FreeBrushMode.X\n autoHide = true\n}\n"],"names":[],"mappings":";;;AAuCM,MAAO,eAAuB,SAAQ,iBAAwB,CAAA;AAApE,IAAA,WAAA,GAAA;;;QAEE,IAAO,CAAA,OAAA,GAAG,CAAC,CAAiC,EAAE,CAAsB,EAAE,UAAmB,KAAY,GAAC,CAAA;;QAEtG,IAAY,CAAA,YAAA,GAAG,CAAC,CAAiC,EAAE,CAAsB,EAAE,UAAmB,KAAY,GAAC,CAAA;;QAE3G,IAAW,CAAA,WAAA,GAAG,CAAC,CAAiC,EAAE,CAAsB,EAAE,UAAmB,KAAY,GAAC,CAAA;;QAE1G,IAAU,CAAA,UAAA,GAAG,CAAC,CAAiC,EAAE,CAAsB,EAAE,UAAmB,KAAY,GAAC,CAAA;QACzG,IAAW,CAAA,WAAA,GAAG,CAAC,CAAA;QACf,IAAS,CAAA,SAAA,GAAuB,SAAS,CAAA;QACzC,IAAkB,CAAA,kBAAA,GAAG,SAAS,CAAA;AAC9B,QAAA,IAAA,CAAA,IAAI,GAAkB,aAAa,CAAC,CAAC,CAAA;QACrC,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAA;KAChB;AAAA;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LatLng } from 'leaflet';
|
|
2
2
|
import Supercluster, { ClusterProperties } from 'supercluster';
|
|
3
|
+
import { GeoJsonProperties } from 'geojson';
|
|
3
4
|
export declare enum LeafletMapRenderer {
|
|
4
5
|
Raster = "raster",
|
|
5
6
|
MapLibre = "maplibre"
|
|
@@ -29,11 +30,11 @@ export declare type PointExpandedClusterProperties<D> = {
|
|
|
29
30
|
dx?: number;
|
|
30
31
|
dy?: number;
|
|
31
32
|
};
|
|
32
|
-
export declare type LeafletMapClusterDatum<D> = Partial<D> & ClusterProperties & {
|
|
33
|
+
export declare type LeafletMapClusterDatum<D extends GeoJsonProperties> = Partial<D> & ClusterProperties & {
|
|
33
34
|
clusterIndex?: Supercluster<D>;
|
|
34
35
|
clusterPoints?: D[];
|
|
35
36
|
};
|
|
36
|
-
export declare type LeafletMapPointDatum<D> = D & PointExpandedClusterProperties<D> & {
|
|
37
|
+
export declare type LeafletMapPointDatum<D extends GeoJsonProperties> = D & PointExpandedClusterProperties<D> & {
|
|
37
38
|
id: string | number;
|
|
38
39
|
shape: LeafletMapPointShape;
|
|
39
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/components/leaflet-map/types.ts"],"sourcesContent":["import { LatLng } from 'leaflet'\nimport Supercluster, { ClusterProperties } from 'supercluster'\n\nexport enum LeafletMapRenderer {\n Raster = 'raster',\n MapLibre = 'maplibre',\n}\n\nexport enum LeafletMapPointShape {\n Square = 'square',\n Circle = 'circle',\n Triangle = 'triangle',\n Ring = 'ring',\n}\n\nexport type LeafletMapPieDatum = {\n value: number;\n name: string;\n color: string;\n className?: string;\n}\n\nexport interface LeafletMapPointStyle {\n color: string;\n className?: string;\n}\n\nexport type LeafletMapPointStyles<D> = { [key in keyof D]?: LeafletMapPointStyle }\n\nexport type PointExpandedClusterProperties<D> = {\n // Expanded cluster related data:\n // eslint-disable-next-line no-use-before-define\n expandedClusterPoint?: LeafletMapPoint<D>;\n r?: number;\n dx?: number;\n dy?: number;\n}\n\nexport type LeafletMapClusterDatum<D> = Partial<D> & ClusterProperties & {\n clusterIndex?: Supercluster<D>;\n clusterPoints?: D[];\n}\n\nexport type LeafletMapPointDatum<D> = D & PointExpandedClusterProperties<D> & {\n id: string | number;\n shape: LeafletMapPointShape;\n};\n\nexport type LeafletMapPoint<D> = {\n geometry: GeoJSON.Point;\n bbox: { x1: number; x2: number; y1: number; y2: number };\n radius: number;\n path: string;\n color: string;\n id: number | string;\n properties: LeafletMapPointDatum<D> | LeafletMapClusterDatum<D>;\n donutData: LeafletMapPieDatum[];\n isCluster: boolean;\n clusterIndex: Supercluster<D, Supercluster.AnyProps>;\n clusterPoints?: D[];\n _zIndex: number;\n}\n\nexport type Bounds = {\n northEast: { lat: number; lng: number };\n southWest: { lat: number; lng: number };\n}\n\nexport type MapZoomState = {\n mapCenter: LatLng;\n zoomLevel: number;\n bounds: Bounds;\n userDriven: boolean;\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/components/leaflet-map/types.ts"],"sourcesContent":["import { LatLng } from 'leaflet'\nimport Supercluster, { ClusterProperties } from 'supercluster'\nimport { GeoJsonProperties } from 'geojson'\n\nexport enum LeafletMapRenderer {\n Raster = 'raster',\n MapLibre = 'maplibre',\n}\n\nexport enum LeafletMapPointShape {\n Square = 'square',\n Circle = 'circle',\n Triangle = 'triangle',\n Ring = 'ring',\n}\n\nexport type LeafletMapPieDatum = {\n value: number;\n name: string;\n color: string;\n className?: string;\n}\n\nexport interface LeafletMapPointStyle {\n color: string;\n className?: string;\n}\n\nexport type LeafletMapPointStyles<D> = { [key in keyof D]?: LeafletMapPointStyle }\n\nexport type PointExpandedClusterProperties<D> = {\n // Expanded cluster related data:\n // eslint-disable-next-line no-use-before-define\n expandedClusterPoint?: LeafletMapPoint<D>;\n r?: number;\n dx?: number;\n dy?: number;\n}\n\nexport type LeafletMapClusterDatum<D extends GeoJsonProperties> = Partial<D> & ClusterProperties & {\n clusterIndex?: Supercluster<D>;\n clusterPoints?: D[];\n}\n\nexport type LeafletMapPointDatum<D extends GeoJsonProperties> = D & PointExpandedClusterProperties<D> & {\n id: string | number;\n shape: LeafletMapPointShape;\n};\n\nexport type LeafletMapPoint<D> = {\n geometry: GeoJSON.Point;\n bbox: { x1: number; x2: number; y1: number; y2: number };\n radius: number;\n path: string;\n color: string;\n id: number | string;\n properties: LeafletMapPointDatum<D> | LeafletMapClusterDatum<D>;\n donutData: LeafletMapPieDatum[];\n isCluster: boolean;\n clusterIndex: Supercluster<D, Supercluster.AnyProps>;\n clusterPoints?: D[];\n _zIndex: number;\n}\n\nexport type Bounds = {\n northEast: { lat: number; lng: number };\n southWest: { lat: number; lng: number };\n}\n\nexport type MapZoomState = {\n mapCenter: LatLng;\n zoomLevel: number;\n bounds: Bounds;\n userDriven: boolean;\n}\n"],"names":[],"mappings":"IAIY,mBAGX;AAHD,CAAA,UAAY,kBAAkB,EAAA;AAC5B,IAAA,kBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,kBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACvB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,GAG7B,EAAA,CAAA,CAAA,CAAA;IAEW,qBAKX;AALD,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,oBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,oBAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACf,CAAC,EALW,oBAAoB,KAApB,oBAAoB,GAK/B,EAAA,CAAA,CAAA;;;;"}
|
|
@@ -5,7 +5,7 @@ import { Position } from "../../types/position";
|
|
|
5
5
|
import { SankeyInputLink, SankeyInputNode, SankeyNodeAlign, SankeySubLabelPlacement, SankeyExitTransitionType, SankeyEnterTransitionType, SankeyLink, SankeyNode } from './types';
|
|
6
6
|
export interface SankeyConfigInterface<N extends SankeyInputNode, L extends SankeyInputLink> extends ComponentConfigInterface {
|
|
7
7
|
/** Node / Link id accessor function. Used for mapping of data updates to corresponding SVG objects. Default: `(d, i) => d.id ?? i.toString()` */
|
|
8
|
-
id?: (d: SankeyInputNode | SankeyInputLink, i
|
|
8
|
+
id?: (d: SankeyInputNode | SankeyInputLink, i: number, ...any: any[]) => string;
|
|
9
9
|
/** Coefficient to scale the height of the diagram when the amount of links is low: `C * links.length`, clamped to `[height / 2, height]`. Default: `1/16` */
|
|
10
10
|
heightNormalizationCoeff?: number;
|
|
11
11
|
/** Type of animation on removing nodes. Default: `ExitTransitionType.Default` */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/components/sankey/config.ts"],"sourcesContent":["/* eslint-disable dot-notation */\n\n// Config\nimport { ComponentConfigInterface, ComponentConfig } from 'core/component/config'\n\n// Utils\nimport { getNumber } from 'utils/data'\n\n// Types\nimport { ColorAccessor, GenericAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\nimport { TrimMode, VerticalAlign, FitMode } from 'types/text'\nimport { Position } from 'types/position'\nimport {\n SankeyInputLink,\n SankeyInputNode,\n SankeyNodeAlign,\n SankeySubLabelPlacement,\n SankeyExitTransitionType,\n SankeyEnterTransitionType,\n SankeyLink,\n SankeyNode,\n} from './types'\n\nexport interface SankeyConfigInterface<N extends SankeyInputNode, L extends SankeyInputLink> extends ComponentConfigInterface {\n // General\n /** Node / Link id accessor function. Used for mapping of data updates to corresponding SVG objects. Default: `(d, i) => d.id ?? i.toString()` */\n id?: (d: SankeyInputNode | SankeyInputLink, i?: number, ...any) => string;\n /** Coefficient to scale the height of the diagram when the amount of links is low: `C * links.length`, clamped to `[height / 2, height]`. Default: `1/16` */\n heightNormalizationCoeff?: number;\n /** Type of animation on removing nodes. Default: `ExitTransitionType.Default` */\n exitTransitionType?: SankeyExitTransitionType;\n /** Type of animation on creating nodes. Default: `EnterTransitionType.Default` */\n enterTransitionType?: SankeyEnterTransitionType;\n /** Highlight the corresponding subtree on node / link hover. Default: `false` */\n highlightSubtreeOnHover?: boolean;\n /** Highlight animation duration, ms. Default: `400` */\n highlightDuration?: number;\n /** Highlight delay, ms. Default: `1000` */\n highlightDelay?: number;\n /** Sankey algorithm iterations. Default: `32` */\n iterations?: number;\n\n // Sorting\n /** Sankey node sorting function. Default: `undefined`.\n * Node sorting is applied to nodes in one layer (column). Layer by layer.\n * Options: `undefined` - the order is determined by the layout;\n * `null` - the order is fixed by the input;\n * sort function - the order is determined by the function.\n */\n nodeSort?: ((node1: N, node2: N) => number) | null | undefined;\n /** Sankey link sorting function. Default: `(link2, link1) => link1.value - link2.value`.\n * Link sorting is applied to the source (exiting) links within one node.\n * Options: `undefined` - the order is determined by the layout;\n * `null` - the order is fixed by the input;\n * sort function - the order is determined by the function.\n */\n linkSort?: ((link1: L, link2: L) => number) | null | undefined;\n\n // Nodes\n /** Sankey node width in pixels */\n nodeWidth?: number;\n /** Sankey node alignment method */\n nodeAlign?: SankeyNodeAlign;\n /** Horizontal space between the nodes. Extended Sizing property only. Default: `150` */\n nodeHorizontalSpacing?: number;\n /** Minimum node height. Extended Sizing property only. Default: `20` */\n nodeMinHeight?: number;\n /** Maximum node height. Extended Sizing property only. Default: `100` */\n nodeMaxHeight?: number;\n /** Sankey vertical separation between nodes in pixels. Default: `2` */\n nodePadding?: number;\n /** Display the graph when data has just one element */\n showSingleNode?: boolean;\n /** Node cursor on hover. Default: `undefined` */\n nodeCursor?: StringAccessor<SankeyNode<N, L>>;\n /** Node icon accessor function or value. Default: `undefined` */\n nodeIcon?: StringAccessor<SankeyNode<N, L>>;\n /** Node color accessor function or value. Default: `undefined` */\n nodeColor?: ColorAccessor<SankeyNode<N, L>>;\n /** Node `fixedValue` accessor function or constant. It defines the node value that will be used to calculate\n * the height of the nodes by d3-sankey (by default the height will be based on aggregated `linkValue`).\n * Default: `n => n.fixedValue`\n */\n nodeFixedValue?: NumericAccessor<N>;\n /** Icon color accessor function or value. Default: `undefined` */\n nodeIconColor?: ColorAccessor<SankeyNode<N, L>>;\n\n // Links\n /** Link color accessor function or value. Default: `l => l.color` */\n linkColor?: StringAccessor<SankeyLink<N, L>>;\n /** Link flow accessor function or value. Default: `l => l.value` */\n linkValue?: NumericAccessor<L>;\n /** Link cursor on hover. Default: `undefined` */\n linkCursor?: StringAccessor<SankeyLink<N, L>>;\n\n // Labels\n /** Node label accessor function or value. Default: `n => n.label` */\n label?: StringAccessor<SankeyNode<N, L>>;\n /** Node sub-label accessor function or value. Default: `undefined` */\n subLabel?: StringAccessor<SankeyNode<N, L>>;\n /** Label position relative to the Node. Default: `Position.AUTO` */\n labelPosition?: GenericAccessor<Position.Auto | Position.Left | Position.Right | string, SankeyNode<N, L>>;\n /** Label vertical alignment */\n labelVerticalAlign?: VerticalAlign | string;\n /** Label background */\n labelBackground?: boolean;\n /** Label fit mode (wrap or trim). Default: `FitMode.TRIM` **/\n labelFit?: FitMode;\n /** Maximum label with in pixels. Default: `70` */\n labelMaxWidth?: number;\n /** Expand trimmed label on hover. Default: `true` */\n labelExpandTrimmedOnHover?: boolean;\n /** Label trimming mode. Default: `TrimMode.MIDDLE` */\n labelTrimMode?: TrimMode;\n /** Label font size in pixels. If not provided, the value of CSS variable `--vis-sankey-node-label-font-size` will be used. Default: `undefined` */\n labelFontSize?: number;\n /** Label text separators for wrapping. Default: `[' ', '-']` */\n labelTextSeparator?: string[];\n /** Force break words to fit long labels. Default: `true` */\n labelForceWordBreak?: boolean;\n /** Label color. Default: `undefined` */\n labelColor?: ColorAccessor<SankeyNode<N, L>>;\n /** Label cursor on hover. Default: `undefined` */\n labelCursor?: StringAccessor<SankeyNode<N, L>>;\n /** Custom function to set the label visibility. Default: `undefined` */\n labelVisibility?: ((d: SankeyNode<N, L>, bbox: { x: number; y: number; width: number; height: number }, hovered: boolean) => boolean) | undefined;\n /** Sub-label font size in pixels. If not provided, the value of CSS variable `--vis-sankey-node-sublabel-font-size` will be used. Default: `undefined` */\n subLabelFontSize?: number;\n /** Sub-label color. Default: `undefined` */\n subLabelColor?: ColorAccessor<SankeyNode<N, L>>;\n /** Sub-label position. Default: `SankeySubLabelPlacement.Below` */\n subLabelPlacement?: SankeySubLabelPlacement | string;\n /**\n * Sub-label to label width ratio when `subLabelPlacement` is set to `SankeySubLabelPlacement.Inline`\n * Default: `0.4`, which means that 40% of `labelMaxWidth` will be given to sub-label, and 60% to the main label.\n */\n subLabelToLabelInlineWidthRatio?: number;\n}\n\nexport class SankeyConfig<N extends SankeyInputNode, L extends SankeyInputLink> extends ComponentConfig implements SankeyConfigInterface<N, L> {\n // General\n heightNormalizationCoeff = 1 / 16\n exitTransitionType = SankeyExitTransitionType.Default\n enterTransitionType = SankeyEnterTransitionType.Default\n // eslint-disable-next-line dot-notation\n id = (d: SankeyInputNode | SankeyInputLink, i: number): string => d['_id'] ?? `${i}`\n highlightSubtreeOnHover = false\n highlightDuration = 300\n highlightDelay = 1000\n iterations = 32\n\n // Sorting\n linkSort = (link2: L, link1: L): number => getNumber(link1, this.linkValue) - getNumber(link2, this.linkValue)\n nodeSort = undefined\n\n // Nodes\n nodeWidth = 25\n nodeAlign = SankeyNodeAlign.Justify\n nodeHorizontalSpacing = 150\n nodeMinHeight = 20\n nodeMaxHeight = 100\n nodePadding = 2\n nodeColor = (d: SankeyNode<N, L>): string => d['color']\n nodeFixedValue = (d: N): number => d['fixedValue']\n showSingleNode = true\n nodeCursor = undefined\n nodeIcon = undefined\n nodeIconColor = undefined\n\n // Labels\n label = (d: SankeyNode<N, L>): string => d['label']\n labelPosition = Position.Auto\n labelVerticalAlign = VerticalAlign.Middle\n labelBackground = false\n labelTextSeparator = [' ', '-']\n labelFit = FitMode.Trim\n labelTrimMode = TrimMode.Middle\n labelForceWordBreak = true\n labelFontSize = undefined\n labelCursor = undefined\n labelColor = undefined\n labelMaxWidth = 70\n labelExpandTrimmedOnHover = true\n labelVisibility = undefined\n subLabel = undefined\n subLabelFontSize = undefined\n subLabelColor = undefined\n subLabelPlacement = SankeySubLabelPlacement.Below\n subLabelToLabelInlineWidthRatio = 0.4\n\n // Links\n linkValue = (d: L): number => d['value']\n linkColor = (d: SankeyLink<N, L>): string => d['color']\n linkCursor = undefined\n}\n"],"names":[],"mappings":";;;;;;AAAA;AA2IM,MAAO,YAAmE,SAAQ,eAAe,CAAA;AAAvG,IAAA,WAAA,GAAA;;;AAEE,QAAA,IAAA,CAAA,wBAAwB,GAAG,CAAC,GAAG,EAAE,CAAA;AACjC,QAAA,IAAA,CAAA,kBAAkB,GAAG,wBAAwB,CAAC,OAAO,CAAA;AACrD,QAAA,IAAA,CAAA,mBAAmB,GAAG,yBAAyB,CAAC,OAAO,CAAA;;QAEvD,IAAE,CAAA,EAAA,GAAG,CAAC,CAAoC,EAAE,CAAS,eAAa,OAAA,CAAA,EAAA,GAAA,CAAC,CAAC,KAAK,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,CAAA,EAAG,CAAC,CAAE,CAAA,CAAA,EAAA,CAAA;QACpF,IAAuB,CAAA,uBAAA,GAAG,KAAK,CAAA;QAC/B,IAAiB,CAAA,iBAAA,GAAG,GAAG,CAAA;QACvB,IAAc,CAAA,cAAA,GAAG,IAAI,CAAA;QACrB,IAAU,CAAA,UAAA,GAAG,EAAE,CAAA;;QAGf,IAAQ,CAAA,QAAA,GAAG,CAAC,KAAQ,EAAE,KAAQ,KAAa,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;QAC9G,IAAQ,CAAA,QAAA,GAAG,SAAS,CAAA;;QAGpB,IAAS,CAAA,SAAA,GAAG,EAAE,CAAA;AACd,QAAA,IAAA,CAAA,SAAS,GAAG,eAAe,CAAC,OAAO,CAAA;QACnC,IAAqB,CAAA,qBAAA,GAAG,GAAG,CAAA;QAC3B,IAAa,CAAA,aAAA,GAAG,EAAE,CAAA;QAClB,IAAa,CAAA,aAAA,GAAG,GAAG,CAAA;QACnB,IAAW,CAAA,WAAA,GAAG,CAAC,CAAA;QACf,IAAS,CAAA,SAAA,GAAG,CAAC,CAAmB,KAAa,CAAC,CAAC,OAAO,CAAC,CAAA;QACvD,IAAc,CAAA,cAAA,GAAG,CAAC,CAAI,KAAa,CAAC,CAAC,YAAY,CAAC,CAAA;QAClD,IAAc,CAAA,cAAA,GAAG,IAAI,CAAA;QACrB,IAAU,CAAA,UAAA,GAAG,SAAS,CAAA;QACtB,IAAQ,CAAA,QAAA,GAAG,SAAS,CAAA;QACpB,IAAa,CAAA,aAAA,GAAG,SAAS,CAAA;;QAGzB,IAAK,CAAA,KAAA,GAAG,CAAC,CAAmB,KAAa,CAAC,CAAC,OAAO,CAAC,CAAA;AACnD,QAAA,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAA;AAC7B,QAAA,IAAA,CAAA,kBAAkB,GAAG,aAAa,CAAC,MAAM,CAAA;QACzC,IAAe,CAAA,eAAA,GAAG,KAAK,CAAA;AACvB,QAAA,IAAA,CAAA,kBAAkB,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AAC/B,QAAA,IAAA,CAAA,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAA;AACvB,QAAA,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAA;QAC/B,IAAmB,CAAA,mBAAA,GAAG,IAAI,CAAA;QAC1B,IAAa,CAAA,aAAA,GAAG,SAAS,CAAA;QACzB,IAAW,CAAA,WAAA,GAAG,SAAS,CAAA;QACvB,IAAU,CAAA,UAAA,GAAG,SAAS,CAAA;QACtB,IAAa,CAAA,aAAA,GAAG,EAAE,CAAA;QAClB,IAAyB,CAAA,yBAAA,GAAG,IAAI,CAAA;QAChC,IAAe,CAAA,eAAA,GAAG,SAAS,CAAA;QAC3B,IAAQ,CAAA,QAAA,GAAG,SAAS,CAAA;QACpB,IAAgB,CAAA,gBAAA,GAAG,SAAS,CAAA;QAC5B,IAAa,CAAA,aAAA,GAAG,SAAS,CAAA;AACzB,QAAA,IAAA,CAAA,iBAAiB,GAAG,uBAAuB,CAAC,KAAK,CAAA;QACjD,IAA+B,CAAA,+BAAA,GAAG,GAAG,CAAA;;QAGrC,IAAS,CAAA,SAAA,GAAG,CAAC,CAAI,KAAa,CAAC,CAAC,OAAO,CAAC,CAAA;QACxC,IAAS,CAAA,SAAA,GAAG,CAAC,CAAmB,KAAa,CAAC,CAAC,OAAO,CAAC,CAAA;QACvD,IAAU,CAAA,UAAA,GAAG,SAAS,CAAA;KACvB;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../src/components/sankey/config.ts"],"sourcesContent":["/* eslint-disable dot-notation */\n\n// Config\nimport { ComponentConfigInterface, ComponentConfig } from 'core/component/config'\n\n// Utils\nimport { getNumber } from 'utils/data'\n\n// Types\nimport { ColorAccessor, GenericAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\nimport { TrimMode, VerticalAlign, FitMode } from 'types/text'\nimport { Position } from 'types/position'\nimport {\n SankeyInputLink,\n SankeyInputNode,\n SankeyNodeAlign,\n SankeySubLabelPlacement,\n SankeyExitTransitionType,\n SankeyEnterTransitionType,\n SankeyLink,\n SankeyNode,\n} from './types'\n\nexport interface SankeyConfigInterface<N extends SankeyInputNode, L extends SankeyInputLink> extends ComponentConfigInterface {\n // General\n /** Node / Link id accessor function. Used for mapping of data updates to corresponding SVG objects. Default: `(d, i) => d.id ?? i.toString()` */\n id?: (d: SankeyInputNode | SankeyInputLink, i: number, ...any) => string;\n /** Coefficient to scale the height of the diagram when the amount of links is low: `C * links.length`, clamped to `[height / 2, height]`. Default: `1/16` */\n heightNormalizationCoeff?: number;\n /** Type of animation on removing nodes. Default: `ExitTransitionType.Default` */\n exitTransitionType?: SankeyExitTransitionType;\n /** Type of animation on creating nodes. Default: `EnterTransitionType.Default` */\n enterTransitionType?: SankeyEnterTransitionType;\n /** Highlight the corresponding subtree on node / link hover. Default: `false` */\n highlightSubtreeOnHover?: boolean;\n /** Highlight animation duration, ms. Default: `400` */\n highlightDuration?: number;\n /** Highlight delay, ms. Default: `1000` */\n highlightDelay?: number;\n /** Sankey algorithm iterations. Default: `32` */\n iterations?: number;\n\n // Sorting\n /** Sankey node sorting function. Default: `undefined`.\n * Node sorting is applied to nodes in one layer (column). Layer by layer.\n * Options: `undefined` - the order is determined by the layout;\n * `null` - the order is fixed by the input;\n * sort function - the order is determined by the function.\n */\n nodeSort?: ((node1: N, node2: N) => number) | null | undefined;\n /** Sankey link sorting function. Default: `(link2, link1) => link1.value - link2.value`.\n * Link sorting is applied to the source (exiting) links within one node.\n * Options: `undefined` - the order is determined by the layout;\n * `null` - the order is fixed by the input;\n * sort function - the order is determined by the function.\n */\n linkSort?: ((link1: L, link2: L) => number) | null | undefined;\n\n // Nodes\n /** Sankey node width in pixels */\n nodeWidth?: number;\n /** Sankey node alignment method */\n nodeAlign?: SankeyNodeAlign;\n /** Horizontal space between the nodes. Extended Sizing property only. Default: `150` */\n nodeHorizontalSpacing?: number;\n /** Minimum node height. Extended Sizing property only. Default: `20` */\n nodeMinHeight?: number;\n /** Maximum node height. Extended Sizing property only. Default: `100` */\n nodeMaxHeight?: number;\n /** Sankey vertical separation between nodes in pixels. Default: `2` */\n nodePadding?: number;\n /** Display the graph when data has just one element */\n showSingleNode?: boolean;\n /** Node cursor on hover. Default: `undefined` */\n nodeCursor?: StringAccessor<SankeyNode<N, L>>;\n /** Node icon accessor function or value. Default: `undefined` */\n nodeIcon?: StringAccessor<SankeyNode<N, L>>;\n /** Node color accessor function or value. Default: `undefined` */\n nodeColor?: ColorAccessor<SankeyNode<N, L>>;\n /** Node `fixedValue` accessor function or constant. It defines the node value that will be used to calculate\n * the height of the nodes by d3-sankey (by default the height will be based on aggregated `linkValue`).\n * Default: `n => n.fixedValue`\n */\n nodeFixedValue?: NumericAccessor<N>;\n /** Icon color accessor function or value. Default: `undefined` */\n nodeIconColor?: ColorAccessor<SankeyNode<N, L>>;\n\n // Links\n /** Link color accessor function or value. Default: `l => l.color` */\n linkColor?: StringAccessor<SankeyLink<N, L>>;\n /** Link flow accessor function or value. Default: `l => l.value` */\n linkValue?: NumericAccessor<L>;\n /** Link cursor on hover. Default: `undefined` */\n linkCursor?: StringAccessor<SankeyLink<N, L>>;\n\n // Labels\n /** Node label accessor function or value. Default: `n => n.label` */\n label?: StringAccessor<SankeyNode<N, L>>;\n /** Node sub-label accessor function or value. Default: `undefined` */\n subLabel?: StringAccessor<SankeyNode<N, L>>;\n /** Label position relative to the Node. Default: `Position.AUTO` */\n labelPosition?: GenericAccessor<Position.Auto | Position.Left | Position.Right | string, SankeyNode<N, L>>;\n /** Label vertical alignment */\n labelVerticalAlign?: VerticalAlign | string;\n /** Label background */\n labelBackground?: boolean;\n /** Label fit mode (wrap or trim). Default: `FitMode.TRIM` **/\n labelFit?: FitMode;\n /** Maximum label with in pixels. Default: `70` */\n labelMaxWidth?: number;\n /** Expand trimmed label on hover. Default: `true` */\n labelExpandTrimmedOnHover?: boolean;\n /** Label trimming mode. Default: `TrimMode.MIDDLE` */\n labelTrimMode?: TrimMode;\n /** Label font size in pixels. If not provided, the value of CSS variable `--vis-sankey-node-label-font-size` will be used. Default: `undefined` */\n labelFontSize?: number;\n /** Label text separators for wrapping. Default: `[' ', '-']` */\n labelTextSeparator?: string[];\n /** Force break words to fit long labels. Default: `true` */\n labelForceWordBreak?: boolean;\n /** Label color. Default: `undefined` */\n labelColor?: ColorAccessor<SankeyNode<N, L>>;\n /** Label cursor on hover. Default: `undefined` */\n labelCursor?: StringAccessor<SankeyNode<N, L>>;\n /** Custom function to set the label visibility. Default: `undefined` */\n labelVisibility?: ((d: SankeyNode<N, L>, bbox: { x: number; y: number; width: number; height: number }, hovered: boolean) => boolean) | undefined;\n /** Sub-label font size in pixels. If not provided, the value of CSS variable `--vis-sankey-node-sublabel-font-size` will be used. Default: `undefined` */\n subLabelFontSize?: number;\n /** Sub-label color. Default: `undefined` */\n subLabelColor?: ColorAccessor<SankeyNode<N, L>>;\n /** Sub-label position. Default: `SankeySubLabelPlacement.Below` */\n subLabelPlacement?: SankeySubLabelPlacement | string;\n /**\n * Sub-label to label width ratio when `subLabelPlacement` is set to `SankeySubLabelPlacement.Inline`\n * Default: `0.4`, which means that 40% of `labelMaxWidth` will be given to sub-label, and 60% to the main label.\n */\n subLabelToLabelInlineWidthRatio?: number;\n}\n\nexport class SankeyConfig<N extends SankeyInputNode, L extends SankeyInputLink> extends ComponentConfig implements SankeyConfigInterface<N, L> {\n // General\n heightNormalizationCoeff = 1 / 16\n exitTransitionType = SankeyExitTransitionType.Default\n enterTransitionType = SankeyEnterTransitionType.Default\n // eslint-disable-next-line dot-notation\n id = (d: SankeyInputNode | SankeyInputLink, i: number): string => d['_id'] ?? `${i}`\n highlightSubtreeOnHover = false\n highlightDuration = 300\n highlightDelay = 1000\n iterations = 32\n\n // Sorting\n linkSort = (link2: L, link1: L): number => getNumber(link1, this.linkValue) - getNumber(link2, this.linkValue)\n nodeSort = undefined\n\n // Nodes\n nodeWidth = 25\n nodeAlign = SankeyNodeAlign.Justify\n nodeHorizontalSpacing = 150\n nodeMinHeight = 20\n nodeMaxHeight = 100\n nodePadding = 2\n nodeColor = (d: SankeyNode<N, L>): string => d['color']\n nodeFixedValue = (d: N): number => d['fixedValue']\n showSingleNode = true\n nodeCursor = undefined\n nodeIcon = undefined\n nodeIconColor = undefined\n\n // Labels\n label = (d: SankeyNode<N, L>): string => d['label']\n labelPosition = Position.Auto\n labelVerticalAlign = VerticalAlign.Middle\n labelBackground = false\n labelTextSeparator = [' ', '-']\n labelFit = FitMode.Trim\n labelTrimMode = TrimMode.Middle\n labelForceWordBreak = true\n labelFontSize = undefined\n labelCursor = undefined\n labelColor = undefined\n labelMaxWidth = 70\n labelExpandTrimmedOnHover = true\n labelVisibility = undefined\n subLabel = undefined\n subLabelFontSize = undefined\n subLabelColor = undefined\n subLabelPlacement = SankeySubLabelPlacement.Below\n subLabelToLabelInlineWidthRatio = 0.4\n\n // Links\n linkValue = (d: L): number => d['value']\n linkColor = (d: SankeyLink<N, L>): string => d['color']\n linkCursor = undefined\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -77,7 +77,7 @@ export declare class TopoJSONMapConfig<AreaDatum, PointDatum = unknown, LinkDatu
|
|
|
77
77
|
linkWidth: (d: LinkDatum) => number;
|
|
78
78
|
linkColor: (d: LinkDatum) => string;
|
|
79
79
|
linkCursor: any;
|
|
80
|
-
linkId: (d: LinkDatum, i: number) => string;
|
|
80
|
+
linkId: (d: LinkDatum, i: number | undefined) => string;
|
|
81
81
|
linkSource: (d: LinkDatum) => (number | string | PointDatum);
|
|
82
82
|
linkTarget: (d: LinkDatum) => (number | string | PointDatum);
|
|
83
83
|
areaId: (d: AreaDatum) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/components/topojson-map/config.ts"],"sourcesContent":["/* eslint-disable dot-notation */\nimport { GeoProjection } from 'd3-geo'\nimport { ComponentConfigInterface, ComponentConfig } from 'core/component/config'\n\n// Types\nimport { ColorAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\n\n// Local Types\nimport { MapProjection, 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<AreaDatum>;\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<AreaDatum>;\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 class TopoJSONMapConfig<\n AreaDatum,\n PointDatum = unknown,\n LinkDatum = unknown,\n> extends ComponentConfig implements TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum> {\n projection = MapProjection.Kavrayskiy7()\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: LinkDatum): number => d['width'] ?? 1\n linkColor = (d: LinkDatum): string => d['color'] ?? null\n linkCursor = null\n linkId = (d: LinkDatum, i: number): string => `${d['id'] ?? i}`\n linkSource = (d: LinkDatum): (number | string | PointDatum) => d['source']\n linkTarget = (d: LinkDatum): (number | string | PointDatum) => d['target']\n\n areaId = (d: AreaDatum): string => d['id'] ?? ''\n areaColor = (d: AreaDatum): string => d['color'] ?? null\n areaCursor = null\n\n longitude = (d: PointDatum): number => d['longitude']\n latitude = (d: PointDatum): number => d['latitude']\n pointColor = (d: PointDatum): string => d['color'] ?? null\n pointRadius = (d: PointDatum): number => d['radius'] ?? 8\n pointStrokeWidth = (d: PointDatum): number => d['strokeWidth'] ?? 0\n pointCursor = null\n pointLabel = undefined\n pointLabelPosition = MapPointLabelPosition.Bottom\n pointLabelTextBrightnessRatio = 0.65\n pointId = (d: PointDatum): string => d['id']\n\n heatmapMode = false\n heatmapModeBlurStdDeviation = 8\n heatmapModeZoomLevelThreshold = 2.5\n}\n"],"names":[],"mappings":";;;AAkFM,MAAO,iBAIX,SAAQ,eAAe,CAAA;AAJzB,IAAA,WAAA,GAAA;;AAKE,QAAA,IAAA,CAAA,UAAU,GAAG,aAAa,CAAC,WAAW,EAAE,CAAA;QACxC,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAA;QACf,IAAQ,CAAA,QAAA,GAAG,SAAS,CAAA;QACpB,IAAc,CAAA,cAAA,GAAG,WAAW,CAAA;QAC5B,IAAc,CAAA,cAAA,GAAG,KAAK,CAAA;AAEtB,QAAA,IAAA,CAAA,UAAU,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QACrB,IAAY,CAAA,YAAA,GAAG,GAAG,CAAA;QAClB,IAAW,CAAA,WAAA,GAAG,KAAK,CAAA;QACnB,IAAU,CAAA,UAAA,GAAG,SAAS,CAAA;AAEtB,QAAA,IAAA,CAAA,SAAS,GAAG,CAAC,CAAY,eAAa,OAAA,CAAA,EAAA,GAAA,CAAC,CAAC,OAAO,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,CAAC,CAAA,EAAA,CAAA;AACrD,QAAA,IAAA,CAAA,SAAS,GAAG,CAAC,CAAY,eAAa,OAAA,CAAA,EAAA,GAAA,CAAC,CAAC,OAAO,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,IAAI,CAAA,EAAA,CAAA;QACxD,IAAU,CAAA,UAAA,GAAG,IAAI,CAAA;QACjB,IAAM,CAAA,MAAA,GAAG,CAAC,CAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../src/components/topojson-map/config.ts"],"sourcesContent":["/* eslint-disable dot-notation */\nimport { GeoProjection } from 'd3-geo'\nimport { ComponentConfigInterface, ComponentConfig } from 'core/component/config'\n\n// Types\nimport { ColorAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\n\n// Local Types\nimport { MapProjection, 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<AreaDatum>;\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<AreaDatum>;\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 class TopoJSONMapConfig<\n AreaDatum,\n PointDatum = unknown,\n LinkDatum = unknown,\n> extends ComponentConfig implements TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum> {\n projection = MapProjection.Kavrayskiy7()\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: LinkDatum): number => d['width'] ?? 1\n linkColor = (d: LinkDatum): string => d['color'] ?? null\n linkCursor = null\n linkId = (d: LinkDatum, i: number | undefined): string => `${d['id'] ?? i}`\n linkSource = (d: LinkDatum): (number | string | PointDatum) => d['source']\n linkTarget = (d: LinkDatum): (number | string | PointDatum) => d['target']\n\n areaId = (d: AreaDatum): string => d['id'] ?? ''\n areaColor = (d: AreaDatum): string => d['color'] ?? null\n areaCursor = null\n\n longitude = (d: PointDatum): number => d['longitude']\n latitude = (d: PointDatum): number => d['latitude']\n pointColor = (d: PointDatum): string => d['color'] ?? null\n pointRadius = (d: PointDatum): number => d['radius'] ?? 8\n pointStrokeWidth = (d: PointDatum): number => d['strokeWidth'] ?? 0\n pointCursor = null\n pointLabel = undefined\n pointLabelPosition = MapPointLabelPosition.Bottom\n pointLabelTextBrightnessRatio = 0.65\n pointId = (d: PointDatum): string => d['id']\n\n heatmapMode = false\n heatmapModeBlurStdDeviation = 8\n heatmapModeZoomLevelThreshold = 2.5\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -7,7 +7,7 @@ export interface XYComponentConfigInterface<Datum> extends ComponentConfigInterf
|
|
|
7
7
|
/** A single of multiple accessor functions for getting the values along the Y axis. Default: `undefined` */
|
|
8
8
|
y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
|
|
9
9
|
/** Accessor function for getting the unique data record id. Used for more persistent data updates. Default: `(d, i) => d.id ?? i` */
|
|
10
|
-
id?: ((d: Datum, i
|
|
10
|
+
id?: ((d: Datum, i: number, ...any: any[]) => string);
|
|
11
11
|
/** Component color accessor function. Default: `d => d.color` */
|
|
12
12
|
color?: ColorAccessor<Datum> | ColorAccessor<Datum[]>;
|
|
13
13
|
/** Scale for X dimension, e.g. Scale.scaleLinear(). If you set xScale you'll be responsible for setting it's `domain` and `range` as well.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/core/xy-component/config.ts"],"sourcesContent":["import { ContinuousScale } from 'types/scale'\n\n// Types\nimport { ColorAccessor, NumericAccessor } from 'types/accessor'\n\n// Config\nimport { ComponentConfig, ComponentConfigInterface } from '../component/config'\n\nexport interface XYComponentConfigInterface<Datum> extends ComponentConfigInterface {\n /** Accessor function for getting the values along the X axis. Default: `undefined` */\n x: NumericAccessor<Datum>;\n /** A single of multiple accessor functions for getting the values along the Y axis. Default: `undefined` */\n y: NumericAccessor<Datum> | NumericAccessor<Datum>[];\n /** Accessor function for getting the unique data record id. Used for more persistent data updates. Default: `(d, i) => d.id ?? i` */\n id?: ((d: Datum, i
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../src/core/xy-component/config.ts"],"sourcesContent":["import { ContinuousScale } from 'types/scale'\n\n// Types\nimport { ColorAccessor, NumericAccessor } from 'types/accessor'\n\n// Config\nimport { ComponentConfig, ComponentConfigInterface } from '../component/config'\n\nexport interface XYComponentConfigInterface<Datum> extends ComponentConfigInterface {\n /** Accessor function for getting the values along the X axis. Default: `undefined` */\n x: NumericAccessor<Datum>;\n /** A single of multiple accessor functions for getting the values along the Y axis. Default: `undefined` */\n y: NumericAccessor<Datum> | NumericAccessor<Datum>[];\n /** Accessor function for getting the unique data record id. Used for more persistent data updates. Default: `(d, i) => d.id ?? i` */\n id?: ((d: Datum, i: number, ...any: any[]) => string);\n /** Component color accessor function. Default: `d => d.color` */\n color?: ColorAccessor<Datum> | ColorAccessor<Datum[]>;\n /** Scale for X dimension, e.g. Scale.scaleLinear(). If you set xScale you'll be responsible for setting it's `domain` and `range` as well.\n * Only continuous scales are supported.\n * Default: `undefined`\n */\n xScale?: ContinuousScale;\n /** Scale for Y dimension, e.g. Scale.scaleLinear(). If you set yScale you'll be responsible for setting it's `domain` and `range` as well.\n * Only continuous scales are supported.\n * Default: `undefined`\n */\n yScale?: ContinuousScale;\n /** Identifies whether the component should be excluded from overall X and Y domain calculations or not.\n * This property can be useful when you want pass individual data to a component and you don't want it to affect\n * the scales of the chart.\n * Default: `false`\n */\n excludeFromDomainCalculation?: boolean;\n}\n\nexport class XYComponentConfig<Datum> extends ComponentConfig implements XYComponentConfigInterface<Datum> {\n x = undefined\n y = undefined\n // eslint-disable-next-line dot-notation\n id = (d: Datum, i: number): string => d['id'] ?? `${i}`\n // eslint-disable-next-line dot-notation\n color = (d: Datum | Datum[]): string => d['color']\n xScale = undefined\n yScale = undefined\n excludeFromDomainCalculation = false\n}\n"],"names":[],"mappings":";;AAKA;AA8BM,MAAO,iBAAyB,SAAQ,eAAe,CAAA;AAA7D,IAAA,WAAA,GAAA;;QACE,IAAC,CAAA,CAAA,GAAG,SAAS,CAAA;QACb,IAAC,CAAA,CAAA,GAAG,SAAS,CAAA;;QAEb,IAAE,CAAA,EAAA,GAAG,CAAC,CAAQ,EAAE,CAAS,eAAa,OAAA,CAAA,EAAA,GAAA,CAAC,CAAC,IAAI,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,CAAA,EAAG,CAAC,CAAE,CAAA,CAAA,EAAA,CAAA;;QAEvD,IAAK,CAAA,KAAA,GAAG,CAAC,CAAkB,KAAa,CAAC,CAAC,OAAO,CAAC,CAAA;QAClD,IAAM,CAAA,MAAA,GAAG,SAAS,CAAA;QAClB,IAAM,CAAA,MAAA,GAAG,SAAS,CAAA;QAClB,IAA4B,CAAA,4BAAA,GAAG,KAAK,CAAA;KACrC;AAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unovis/ts",
|
|
3
3
|
"description": "Modular data visualization framework for React, Angular, Svelte, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.0.1-beta.
|
|
4
|
+
"version": "1.0.1-beta.3",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/f5/unovis.git",
|
|
@@ -53,14 +53,12 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@emotion/css": "^11.7.1",
|
|
55
55
|
"@juggle/resize-observer": "^3.3.1",
|
|
56
|
-
"@maplibre/maplibre-gl-leaflet": "0.0.15",
|
|
57
56
|
"@types/d3": "^7.4.0",
|
|
58
57
|
"@types/d3-collection": "^1.0.10",
|
|
59
58
|
"@types/d3-sankey": "^0.11.2",
|
|
60
59
|
"@types/geojson": "^7946.0.8",
|
|
61
60
|
"@types/leaflet": "1.7.6",
|
|
62
61
|
"@types/lodash-es": "^4.17.6",
|
|
63
|
-
"@types/mapbox-gl-leaflet": "^0.0.1",
|
|
64
62
|
"@types/supercluster": "^5.0.2",
|
|
65
63
|
"@types/three": "^0.135.0",
|
|
66
64
|
"@types/topojson": "^3.2.3",
|