eurostat-map 4.4.1 → 4.4.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eurostat-map",
3
- "version": "4.3.58",
3
+ "version": "4.4.3",
4
4
  "description": "Reusable library to quickly create and customise web maps showing Eurostat data directly retrieved from Eurostat database.",
5
5
  "keywords": [
6
6
  "eurostat",
@@ -6,6 +6,7 @@ import type { MapInstance as EurostatMap } from './MapInstance'
6
6
  import type { CoastalMarginSettings } from './decoration/CoastalMarginSettings'
7
7
  import type { GridCartogramSettings } from './GridCartogramSettings'
8
8
  import type { DorlingSettings } from './DorlingSettings'
9
+ import type { ScalebarConfig } from './decoration/ScalebarConfig'
9
10
 
10
11
  /**
11
12
  * Base configuration for all map types. Each specific map type will extend this with its own properties, but these are the common ones that apply to all maps.
@@ -59,7 +60,7 @@ export interface MapConfig {
59
60
  stat?: StatConfig
60
61
 
61
62
  /** Legend configuration. */
62
- legend?: LegendConfig
63
+ legend?: LegendConfig | false
63
64
 
64
65
  /** Tooltip configuration. */
65
66
  tooltip?: TooltipConfig
@@ -90,6 +91,78 @@ export interface MapConfig {
90
91
  /** Fires once the map is built. */
91
92
  onBuild?: (map: EurostatMap) => void
92
93
 
94
+ /** Scalebar configuration. Can be boolean or configuration object. */
95
+ scalebar?: ScalebarConfig | boolean
96
+
97
+ /** Grid cartogram enabled or disabled. */
98
+ gridCartogram?: boolean
99
+
100
+ /** Custom geometry filtering function. */
101
+ filterGeometriesFunction?: (geometry: any) => boolean
102
+
103
+ /** Toggle background map rendering (sea, country boundaries, etc.). */
104
+ backgroundMap?: boolean
105
+
106
+ /** Minimap configuration. */
107
+ minimap?: any
108
+
109
+ /** Show/hide zoom +/- buttons. */
110
+ zoomButtons?: boolean
111
+
112
+ /** Show/hide inset map toggle button. */
113
+ insetsButton?: boolean
114
+
115
+ /** Show/hide placename labels. */
116
+ placenames?: boolean
117
+
118
+ /** Filter function for placename labels. */
119
+ placenamesFilter?: (name: any) => boolean
120
+
121
+ /** Use a separate header section for titles. */
122
+ header?: boolean
123
+
124
+ /** Use a separate footer section for footnotes. */
125
+ footer?: boolean
126
+
127
+ /** Padding between the map and footer in pixels. */
128
+ footerPadding?: number
129
+
130
+ /** Padding between the header and map in pixels. */
131
+ headerPadding?: number
132
+
133
+ /** Position adjustment for map title: [x, y] */
134
+ titlePosition?: [number, number]
135
+
136
+ /** Position adjustment for map subtitle: [x, y] */
137
+ subtitlePosition?: [number, number]
138
+
139
+ /** Position adjustment for footnote text: [x, y] */
140
+ footnotePosition?: [number, number]
141
+
142
+ /** Position adjustment for Eurostat logo: [x, y] */
143
+ logoPosition?: [number, number]
144
+
145
+ /** Position adjustment for ribbon banner: [x, y] */
146
+ ribbonPosition?: [number, number]
147
+
148
+ /** Position adjustment for zoom buttons: [x, y] */
149
+ zoomButtonsPosition?: [number, number]
150
+
151
+ /** Position adjustment for insets button: [x, y] */
152
+ insetsButtonPosition?: [number, number]
153
+
154
+ /** Pointer hover color for NUTS regions. */
155
+ hoverColor?: string
156
+
157
+ /** Base fill color for regions with no statistical data. */
158
+ noDataFillStyle?: string
159
+
160
+ /** Show the link to the remote Eurostat statistical dataset. */
161
+ showSourceLink?: boolean
162
+
163
+ /** Pattern fill configurations. */
164
+ patternFill?: any
165
+
93
166
  /** Allow additional properties for extensibility. */
94
167
  [key: string]: any
95
168
  }
@@ -6,6 +6,7 @@ import type { InsetConfig } from './InsetConfig'
6
6
  import type { CoastalMarginSettings } from './decoration/CoastalMarginSettings'
7
7
  import type { GridCartogramSettings } from './GridCartogramSettings'
8
8
  import type { DorlingSettings } from './DorlingSettings'
9
+ import type { ScalebarConfig } from './decoration/ScalebarConfig'
9
10
 
10
11
  /**
11
12
  * A eurostat-map instance. Created by eurostatmap.map() and extended
@@ -151,7 +152,7 @@ export interface MapInstance {
151
152
  * Get or set legend configuration. Pass false to remove the legend.
152
153
  * @example map.legend({ x: 10, y: 90, title: 'Density, people/km²' })
153
154
  */
154
- legend(): LegendConfig
155
+ legend(): LegendConfig | false
155
156
  legend(config: LegendConfig | false): this
156
157
 
157
158
  /** Force-update the legend after data or style changes. */
@@ -221,6 +222,10 @@ export interface MapInstance {
221
222
  stamp(): object | undefined
222
223
  stamp(config: { x: number; y: number; text: string; size?: number }): this
223
224
 
225
+ /** Scalebar configuration. */
226
+ scalebar(): ScalebarConfig | null
227
+ scalebar(config: ScalebarConfig | boolean): this
228
+
224
229
  /** Scalebar visibility. */
225
230
  showScalebar(): boolean
226
231
  showScalebar(show: boolean): this
@@ -237,6 +242,94 @@ export interface MapInstance {
237
242
  showEstatRibbon(): boolean
238
243
  showEstatRibbon(show: boolean): this
239
244
 
245
+ /** Returns the D3 selection of the SVG element. */
246
+ svg(): any
247
+ svg(s: any): this
248
+
249
+ /** Custom geometry filtering function. */
250
+ filterGeometriesFunction(): ((geometry: any) => boolean) | undefined
251
+ filterGeometriesFunction(fn: (geometry: any) => boolean): this
252
+
253
+ /** Grid cartogram enabled or disabled. */
254
+ gridCartogram(): boolean
255
+ gridCartogram(enable: boolean): this
256
+
257
+ /** Toggle background map rendering (sea, country boundaries, etc.). */
258
+ backgroundMap(): boolean
259
+ backgroundMap(show: boolean): this
260
+
261
+ /** Minimap configuration. */
262
+ minimap(): any
263
+ minimap(config: any): this
264
+
265
+ /** Show/hide inset map toggle button. */
266
+ insetsButton(): boolean
267
+ insetsButton(show: boolean): this
268
+
269
+ /** Filter function for placename labels. */
270
+ placenamesFilter(): ((name: any) => boolean) | undefined
271
+ placenamesFilter(fn: (name: any) => boolean): this
272
+
273
+ /** Use a separate header section for titles. */
274
+ header(): boolean
275
+ header(show: boolean): this
276
+
277
+ /** Use a separate footer section for footnotes. */
278
+ footer(): boolean
279
+ footer(show: boolean): this
280
+
281
+ /** Padding between the map and footer in pixels. */
282
+ footerPadding(): number | undefined
283
+ footerPadding(padding: number): this
284
+
285
+ /** Padding between the header and map in pixels. */
286
+ headerPadding(): number | undefined
287
+ headerPadding(padding: number): this
288
+
289
+ /** Position adjustment for map title: [x, y] */
290
+ titlePosition(): [number, number] | undefined
291
+ titlePosition(pos: [number, number]): this
292
+
293
+ /** Position adjustment for map subtitle: [x, y] */
294
+ subtitlePosition(): [number, number] | undefined
295
+ subtitlePosition(pos: [number, number]): this
296
+
297
+ /** Position adjustment for footnote text: [x, y] */
298
+ footnotePosition(): [number, number] | undefined
299
+ footnotePosition(pos: [number, number]): this
300
+
301
+ /** Position adjustment for Eurostat logo: [x, y] */
302
+ logoPosition(): [number, number] | undefined
303
+ logoPosition(pos: [number, number]): this
304
+
305
+ /** Position adjustment for ribbon banner: [x, y] */
306
+ ribbonPosition(): [number, number] | undefined
307
+ ribbonPosition(pos: [number, number]): this
308
+
309
+ /** Position adjustment for zoom buttons: [x, y] */
310
+ zoomButtonsPosition(): [number, number] | undefined
311
+ zoomButtonsPosition(pos: [number, number]): this
312
+
313
+ /** Position adjustment for insets button: [x, y] */
314
+ insetsButtonPosition(): [number, number] | undefined
315
+ insetsButtonPosition(pos: [number, number]): this
316
+
317
+ /** Pointer hover color for NUTS regions. */
318
+ hoverColor(): string
319
+ hoverColor(color: string): this
320
+
321
+ /** Base fill color for regions with no statistical data. */
322
+ noDataFillStyle(): string
323
+ noDataFillStyle(style: string): this
324
+
325
+ /** Show the link to the remote Eurostat statistical dataset. */
326
+ showSourceLink(): boolean
327
+ showSourceLink(show: boolean): this
328
+
329
+ /** Pattern fill configurations. */
330
+ patternFill(): any
331
+ patternFill(config: any): this
332
+
240
333
  /** Dorling. */
241
334
 
242
335
  /** Enable Dorling cartogram layout for proportional symbol maps. */
@@ -58,27 +58,40 @@ export type EurostatMap = MapInstance
58
58
  export type { TooltipConfig } from './core/TooltipConfig'
59
59
  export type { LegendConfig } from './legend/LegendConfig'
60
60
  export type { StatConfig } from './core/stat/StatConfig'
61
+ export type { StatData } from './core/stat/StatData'
61
62
  export type { InsetConfig } from './core/InsetConfig'
62
63
  export type { CoastalMarginSettings } from './core/decoration/CoastalMarginSettings'
64
+ export type { ScalebarConfig } from './core/decoration/ScalebarConfig'
65
+ export type { StampConfig } from './core/decoration/StampConfig'
63
66
  export type { GridCartogramSettings, GridCartogramMargins } from './core/GridCartogramSettings'
64
67
  export type { DorlingSettings, DorlingStrength } from './core/DorlingSettings'
68
+ export type { MinimapConfig } from './core/minimaps'
69
+ export type { LocationConfig } from './core/locations'
70
+ export type { GeometriesClass } from './core/geo/geometries'
65
71
 
66
72
  // ==================== Legend Configuration Type Exports ====================
67
73
 
68
74
  // Main legend types
69
75
  export type { CategoricalLegendConfig } from './legend/CategoricalLegendConfig'
70
76
  export type { MushroomLegendConfig } from './legend/MushroomLegendConfig'
77
+ export type { MushroomSizeLegendConfig, MushroomColorLegendConfig } from './legend/MushroomLegendConfig'
71
78
  export type { PatternFillLegendConfig } from './legend/PatternFillLegendConfig'
72
79
 
73
80
  // Choropleth legend types
81
+ export type { ChoroplethLegendConfig } from './legend/choropleth/ChoroplethLegendConfig'
74
82
  export type { BivariateLegendConfig } from './legend/choropleth/BivariateLegendConfig'
75
83
  export type { HistogramLegendConfig } from './legend/choropleth/HistogramLegendConfig'
84
+ export type { TrivariateLegendConfig } from './legend/choropleth/TrivariateLegendConfig'
76
85
 
77
86
  // Composition legend types
78
87
  export type { BarChartLegendConfig } from './legend/composition/BarChartLegendConfig'
88
+ export type { BarChartSizeLegendConfig, BarChartColorLegendConfig } from './legend/composition/BarChartLegendConfig'
79
89
  export type { CoxcombLegendConfig } from './legend/composition/CoxcombLegendConfig'
90
+ export type { CoxcombSizeLegendConfig, CoxcombColorLegendConfig, CoxcombTimeLegendConfig } from './legend/composition/CoxcombLegendConfig'
80
91
  export type { PieChartLegendConfig } from './legend/composition/PieChartLegendConfig'
92
+ export type { PieChartSizeLegendConfig, PieChartColorLegendConfig } from './legend/composition/PieChartLegendConfig'
81
93
  export type { WaffleLegendConfig } from './legend/composition/WaffleLegendConfig'
94
+ export type { WaffleSizeLegendConfig, WaffleColorLegendConfig } from './legend/composition/WaffleLegendConfig'
82
95
  export type { StripeCompositionLegendConfig } from './legend/composition/StripeCompositionLegendConfig'
83
96
  export type {
84
97
  SparklineLegendConfig,
@@ -89,9 +102,14 @@ export type {
89
102
 
90
103
  // Flow legend types
91
104
  export type { FlowMapLegendConfig } from './legend/flow/FlowMapLegendConfig'
105
+ export type { FlowWidthLegendConfig, NodeSizeLegendConfig, FlowColorLegendConfig, RegionColorLegendConfig } from './legend/flow/FlowMapLegendConfig'
92
106
 
93
107
  // Proportional symbol legend types
94
108
  export type { ProportionalSymbolsLegendConfig } from './legend/proportional-symbol/ProportionalSymbolsLegendConfig'
109
+ export type {
110
+ ProportionalSymbolSizeLegendConfig,
111
+ ProportionalSymbolColorLegendConfig,
112
+ } from './legend/proportional-symbol/ProportionalSymbolsLegendConfig'
95
113
 
96
114
  // ==================== Map Type Exports ====================
97
115
 
@@ -134,6 +152,14 @@ export type { SparkMapConfig, SparkMap, SparkStatConfig }
134
152
 
135
153
  // Flow map types
136
154
  export type { FlowMapConfig, FlowMap }
155
+ export type {
156
+ FlowNode,
157
+ FlowLink,
158
+ FlowGraph,
159
+ FlowCurvatureSettings,
160
+ FlowWidthGradientSettings,
161
+ FlowBundleSettings,
162
+ } from './map-types/flow/FlowMapConfig'
137
163
 
138
164
  // ==================== Pattern Fill Options ====================
139
165
 
@@ -204,7 +230,7 @@ export function getFillPatternDefinitionFunction(opts?: FillPatternOptions): (sv
204
230
  /**
205
231
  * Get default labels for the map
206
232
  */
207
- export function getDefaultLabels(): { [key: string]: string }
233
+ export function getDefaultLabels(): { [key: string]: any }
208
234
 
209
235
  /**
210
236
  * Project coordinates from map pixel space to geographic coordinates
@@ -238,8 +264,6 @@ declare const eurostatmap: {
238
264
  map: typeof map
239
265
  /** Get fill pattern definition function. */
240
266
  getFillPatternDefinitionFunction: typeof getFillPatternDefinitionFunction
241
- /** Get fill pattern definition fun. */
242
- getFillPatternDefinitionFun: typeof getFillPatternDefinitionFun
243
267
  /** Get default labels. */
244
268
  getDefaultLabels: typeof getDefaultLabels
245
269
  /** Project from map. */
@@ -13,12 +13,18 @@ export interface LegendConfig {
13
13
 
14
14
  /** Legend title text. */
15
15
  title?: string
16
+ /** Legend subtitle text. */
17
+ subtitle?: string
16
18
  /** Legend title font size in pixels. */
17
19
  titleFontSize?: number
18
20
 
19
21
  /** Box styling. */
20
22
  /** Inner spacing around legend content. */
21
23
  boxPadding?: number
24
+ /** Background opacity of the legend box. */
25
+ boxOpacity?: number
26
+ /** Padding between the title block and legend body. */
27
+ titlePadding?: number
22
28
 
23
29
  /** Shape styling (for proportional symbol legends). */
24
30
  /** Symbol swatch width in pixels. */
@@ -27,25 +33,36 @@ export interface LegendConfig {
27
33
  shapeHeight?: number
28
34
  /** Horizontal gap between shape and label. */
29
35
  shapePadding?: number
36
+ /** Length of separator lines in discrete legends. */
37
+ sepLineLength?: number
30
38
 
31
39
  /** Label styling. */
32
40
  /** Label font size in pixels. */
33
41
  labelFontSize?: number
34
- /** Pixel offset applied to labels. */
35
- labelOffset?: number
42
+ /** Pixel offsets applied to labels. */
43
+ labelOffsets?: { x: number; y: number }
44
+ /** Custom formatter for legend labels. */
45
+ labelFormatter?: ((value: number, index?: number) => string) | null
46
+ /** Number of decimal places for auto-formatted labels. */
47
+ decimals?: number
36
48
 
37
49
  /** Legend layout direction. */
38
50
  orientation?: 'vertical' | 'horizontal'
39
51
  /** Sort legend entries in ascending order when true. */
40
52
  ascending?: boolean
41
-
42
- /** Manual legend cell definitions. */
43
- cells?: any[]
44
-
45
53
  /** Whether to display the no-data legend item. */
46
54
  noData?: boolean
47
55
  /** Label used for no-data legend item. */
48
56
  noDataText?: string
57
+ /** Vertical gap before the no-data swatch in pixels. */
58
+ noDataPadding?: number
59
+ /** Width of the no-data swatch in pixels. */
60
+ noDataShapeWidth?: number
61
+ /** Height of the no-data swatch in pixels. */
62
+ noDataShapeHeight?: number
49
63
 
50
- [key: string]: any
64
+ /** Whether to show dataset min/max labels when supported. */
65
+ maxMin?: boolean
66
+ /** Text affixes for min/max labels as [minSuffix, maxSuffix]. */
67
+ maxMinLabels?: [string, string]
51
68
  }
@@ -0,0 +1,80 @@
1
+ import type { LegendConfig } from '../LegendConfig'
2
+ import type { HistogramLegendConfig } from './HistogramLegendConfig'
3
+
4
+ /**
5
+ * Configuration for choropleth map legends.
6
+ * Supports discrete, continuous, diverging, and histogram legend variants.
7
+ */
8
+ export interface ChoroplethLegendConfig extends LegendConfig {
9
+ /** Padding between the legend title and the legend body in pixels. @default 5 */
10
+ titlePadding?: number
11
+
12
+ /** Label style for discrete legends. @default 'thresholds' */
13
+ labelType?: 'thresholds' | 'ranges'
14
+
15
+ /** Length of the separator line in pixels for discrete legends. @default shapeWidth */
16
+ sepLineLength?: number
17
+
18
+ /** Length of threshold tick marks in pixels. @default 4 */
19
+ tickLength?: number
20
+
21
+ /** Number of decimal places for auto-formatted labels. Auto-detected when undefined. */
22
+ decimals?: number
23
+
24
+ /** Offset adjustments for labels. @default { x: 3, y: 0 } */
25
+ labelOffsets?: { x: number; y: number }
26
+
27
+ /** Custom formatter for legend labels. */
28
+ labelFormatter?: ((value: number, classIndex?: number) => string) | null
29
+
30
+ /** User-defined labels for classes in discrete legends. */
31
+ labels?: string[] | null
32
+
33
+ /** Histogram legend configuration. Set to null/undefined to disable histogram mode. */
34
+ histogram?: Partial<HistogramLegendConfig> | null
35
+
36
+ /** Label shown at the divergence point for diverging legends. */
37
+ pointOfDivergenceLabel?: string
38
+
39
+ /** Class index/value position used for diverging legends. */
40
+ pointOfDivergence?: number
41
+
42
+ /** Extra padding around the divergence marker in pixels. @default 7 */
43
+ pointOfDivergencePadding?: number
44
+
45
+ /** Explicit diverging guide line length in pixels. */
46
+ divergingLineLength?: number
47
+
48
+ /** Explicit diverging arrow length in pixels. */
49
+ divergingArrowLength?: number
50
+
51
+ /** Label shown at the low end of continuous legends. @default 'Low' */
52
+ lowLabel?: string
53
+
54
+ /** Label shown at the high end of continuous legends. @default 'High' */
55
+ highLabel?: string
56
+
57
+ /** Number of ticks to show on continuous legends. Use 0 to disable. @default 0 */
58
+ ticks?: number
59
+
60
+ /** Explicit tick values for continuous legends. */
61
+ tickValues?: number[]
62
+
63
+ /** Explicit tick labels for continuous legends. */
64
+ tickLabels?: Array<string | number>
65
+
66
+ /** Pixel tolerance used when hovering continuous legends to highlight nearby regions. @default 10 */
67
+ highlightTolerance?: number
68
+
69
+ /** Whether to show dataset min/max labels where supported. @default true */
70
+ maxMin?: boolean
71
+
72
+ /** Text affixes for min/max labels as [minSuffix, maxSuffix]. @default ['', ''] */
73
+ maxMinLabels?: [string, string]
74
+
75
+ /** Length of min/max tick marks in pixels. Defaults to tickLength when omitted. */
76
+ maxMinTickLength?: number
77
+
78
+ /** Whether to append region names to min/max labels. */
79
+ maxMinRegionLabels?: boolean
80
+ }
@@ -1,9 +1,13 @@
1
1
  import type { MapConfig } from '../../core/MapConfig'
2
+ import type { BivariateLegendConfig } from '../../legend/choropleth/BivariateLegendConfig'
2
3
 
3
4
  /**
4
5
  * Configuration for bivariate choropleth maps.
5
6
  */
6
7
  export interface BivariateChoroplethConfig extends MapConfig {
8
+ /** Bivariate choropleth legend configuration. */
9
+ legend?: BivariateLegendConfig | false
10
+
7
11
  /** Number of classes. */
8
12
  numberOfClasses?: number
9
13
  /** Breaks1. */
@@ -1,9 +1,13 @@
1
1
  import { MapConfig } from '../../core/MapConfig'
2
+ import type { ChoroplethLegendConfig } from '../../legend/choropleth/ChoroplethLegendConfig'
2
3
 
3
4
  /**
4
5
  * Configuration specific to choropleth maps
5
6
  */
6
7
  export interface ChoroplethConfig extends MapConfig {
8
+ /** Choropleth legend configuration. */
9
+ legend?: ChoroplethLegendConfig | false
10
+
7
11
  /** Classification. */
8
12
  numberOfClasses?: number
9
13
  /** Classification method. */
@@ -1,9 +1,13 @@
1
1
  import type { MapConfig } from '../../core/MapConfig'
2
+ import type { TrivariateLegendConfig } from '../../legend/choropleth/TrivariateLegendConfig'
2
3
 
3
4
  /**
4
5
  * Configuration for trivariate choropleth maps.
5
6
  */
6
7
  export interface TrivariateChoroplethConfig extends MapConfig {
8
+ /** Trivariate choropleth legend configuration. */
9
+ legend?: TrivariateLegendConfig | false
10
+
7
11
  /** Ternary codes. */
8
12
  ternaryCodes?: [string, string, string]
9
13
  /** No data fill style. */
@@ -6,7 +6,7 @@ import type { BarChartLegendConfig } from '../../../legend/composition/BarChartL
6
6
  * Bar map type.
7
7
  */
8
8
  export interface BarMap extends MapInstance {
9
- legend(): BarChartLegendConfig
9
+ legend(): BarChartLegendConfig | false
10
10
  legend(config: BarChartLegendConfig | false): this
11
11
 
12
12
  barType(): 'stacked' | 'grouped'
@@ -6,7 +6,7 @@ import type { CoxcombLegendConfig } from '../../../legend/composition/CoxcombLeg
6
6
  * Coxcomb map type.
7
7
  */
8
8
  export interface CoxcombMap extends MapInstance {
9
- legend(): CoxcombLegendConfig
9
+ legend(): CoxcombLegendConfig | false
10
10
  legend(config: CoxcombLegendConfig | false): this
11
11
 
12
12
  catColors(): any
@@ -6,7 +6,7 @@ import type { PieChartLegendConfig } from '../../../legend/composition/PieChartL
6
6
  * Pie map type.
7
7
  */
8
8
  export interface PieMap extends MapInstance {
9
- legend(): PieChartLegendConfig
9
+ legend(): PieChartLegendConfig | false
10
10
  legend(config: PieChartLegendConfig | false): this
11
11
 
12
12
  catColors(): any
@@ -6,7 +6,7 @@ import type { StripeCompositionLegendConfig } from '../../../legend/composition/
6
6
  * Stripe map type.
7
7
  */
8
8
  export interface StripeMap extends MapInstance {
9
- legend(): StripeCompositionLegendConfig
9
+ legend(): StripeCompositionLegendConfig | false
10
10
  legend(config: StripeCompositionLegendConfig | false): this
11
11
 
12
12
  stripeWidth(): number
@@ -6,7 +6,7 @@ import type { WaffleLegendConfig } from '../../../legend/composition/WaffleLegen
6
6
  * Waffle map type.
7
7
  */
8
8
  export interface WaffleMap extends MapInstance {
9
- legend(): WaffleLegendConfig
9
+ legend(): WaffleLegendConfig | false
10
10
  legend(config: WaffleLegendConfig | false): this
11
11
 
12
12
  catColors(): any
@@ -6,7 +6,7 @@ import type { SparklineLegendConfig } from '../../legend/composition/SparklineLe
6
6
  * Spark map type.
7
7
  */
8
8
  export interface SparkMap extends MapInstance {
9
- legend(): SparklineLegendConfig
9
+ legend(): SparklineLegendConfig | false
10
10
  legend(config: SparklineLegendConfig | false): this
11
11
 
12
12
  sparkLineColor(): any
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eurostat-map",
3
- "version": "4.4.1",
3
+ "version": "4.4.3",
4
4
  "description": "Reusable library to quickly create and customise web maps showing Eurostat data directly retrieved from Eurostat database.",
5
5
  "keywords": [
6
6
  "eurostat",
@@ -39,9 +39,13 @@
39
39
  "build-prod-debug": "webpack --config webpack/webpack.config.debug-size.js",
40
40
  "format": "prettier --write .",
41
41
  "copy-types": "copyfiles -u 2 \"src/types/**/*.d.ts\" build/types",
42
- "type-check": "tsc --noEmit && tsc --noEmit test/typescript-test.ts",
42
+ "check:types:legend-config-sync": "node test/scripts/check-legend-config-sync.js",
43
+ "type-check": "npm run check:types:legend-config-sync && tsc --noEmit && tsc --noEmit test/typescript-test.ts",
43
44
  "docs:api": "typedoc --options typedoc.json",
44
- "docs": "npm run docs:api"
45
+ "docs": "npm run docs:api",
46
+ "generate-previews": "node examples/scripts/generate-previews.js",
47
+ "update-examples-manifest": "node examples/scripts/update-examples-manifest.js",
48
+ "update-examples": "npm run update-examples-manifest && npm run generate-previews"
45
49
  },
46
50
  "dependencies": {
47
51
  "d3-array": "^3.2.4",
@@ -75,6 +79,7 @@
75
79
  "babel-loader": "^9.1.2",
76
80
  "copyfiles": "^2.4.1",
77
81
  "css-loader": "^7.1.2",
82
+ "playwright": "^1.60.0",
78
83
  "prettier": "^3.4.1",
79
84
  "style-loader": "^4.0.0",
80
85
  "ts-loader": "^9.5.4",