eurostat-map 4.6.0 → 4.6.2

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,87 +1,87 @@
1
- {
2
- "name": "eurostat-map",
3
- "version": "4.6.0",
4
- "description": "Reusable library to quickly create and customise web maps showing Eurostat data directly retrieved from Eurostat database.",
5
- "keywords": [
6
- "eurostat",
7
- "statistics",
8
- "europe",
9
- "SVG",
10
- "NUTS",
11
- "map",
12
- "D3",
13
- "cartography",
14
- "thematic",
15
- "mapping",
16
- "eurostat-map",
17
- "dataviz",
18
- "data visualization"
19
- ],
20
- "homepage": "https://github.com/eurostat/eurostat-map",
21
- "author": "",
22
- "license": "EUPL-1.2",
23
- "repository": {
24
- "type": "git",
25
- "url": "https://github.com/eurostat/eurostat-map.git"
26
- },
27
- "main": "build/eurostatmap.min.js",
28
- "unpkg": "build/eurostatmap.min.js",
29
- "module": "build/eurostatmap.js",
30
- "types": "build/types/index.d.ts",
31
- "typings": "build/types/index.d.ts",
32
- "files": [
33
- "build"
34
- ],
35
- "scripts": {
36
- "start": "webpack --config webpack/webpack.config.dev.js",
37
- "server": "webpack-dev-server --open --watch",
38
- "build-types": "tsc --project tsconfig.json",
39
- "build-prod": "npm run build-types && webpack --config webpack/webpack.config.prod.js",
40
- "build-prod-debug": "webpack --config webpack/webpack.config.debug-size.js",
41
- "format": "prettier --write .",
42
- "test": "jest",
43
- "type-check": "tsc --noEmit"
44
- },
45
- "dependencies": {
46
- "d3-array": "^3.2.4",
47
- "d3-axis": "^3.0.0",
48
- "d3-ease": "^3.0.1",
49
- "d3-fetch": "^3.0.1",
50
- "d3-force": "^3.0.0",
51
- "d3-format": "^3.1.0",
52
- "d3-geo": "^3.1.1",
53
- "d3-geo-projection": "^3.0.0",
54
- "d3-interpolate": "^3.0.1",
55
- "d3-scale": "^4.0.2",
56
- "d3-scale-chromatic": "^3.1.0",
57
- "d3-selection": "^3.0.0",
58
- "d3-shape": "^3.2.0",
59
- "d3-svg-annotation": "^2.5.1",
60
- "d3-zoom": "^3.0.0",
61
- "idb-keyval": "^6.2.2",
62
- "jsonstat-toolkit": "^1.0.8",
63
- "proj4": "^2.17.0",
64
- "simple-statistics": "^7.8.8",
65
- "topojson-client": "^3.1.0"
66
- },
67
- "overrides": {
68
- "d3-color": "3.1.0"
69
- },
70
- "devDependencies": {
71
- "@babel/core": "^7.22.6",
72
- "@babel/plugin-transform-runtime": "^7.22.6",
73
- "@babel/preset-env": "^7.22.6",
74
- "@babel/runtime": "^7.12.1",
75
- "babel-loader": "^9.1.2",
76
- "css-loader": "^7.1.2",
77
- "prettier": "^3.4.1",
78
- "style-loader": "^4.0.0",
79
- "ts-loader": "^9.5.4",
80
- "typescript": "^5.9.3",
81
- "webpack": "^5.88.1",
82
- "webpack-bundle-analyzer": "^4.10.2",
83
- "webpack-cli": "^5.0.0",
84
- "webpack-dev-server": "^5.2.2",
85
- "webpack-livereload-plugin": "^3.0.2"
86
- }
87
- }
1
+ {
2
+ "name": "eurostat-map",
3
+ "version": "4.6.2",
4
+ "description": "Reusable library to quickly create and customise web maps showing Eurostat data directly retrieved from Eurostat database.",
5
+ "keywords": [
6
+ "eurostat",
7
+ "statistics",
8
+ "europe",
9
+ "SVG",
10
+ "NUTS",
11
+ "map",
12
+ "D3",
13
+ "cartography",
14
+ "thematic",
15
+ "mapping",
16
+ "eurostat-map",
17
+ "dataviz",
18
+ "data visualization"
19
+ ],
20
+ "homepage": "https://github.com/eurostat/eurostat-map",
21
+ "author": "",
22
+ "license": "EUPL-1.2",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/eurostat/eurostat-map.git"
26
+ },
27
+ "main": "build/eurostatmap.min.js",
28
+ "unpkg": "build/eurostatmap.min.js",
29
+ "module": "build/eurostatmap.js",
30
+ "types": "build/types/index.d.ts",
31
+ "typings": "build/types/index.d.ts",
32
+ "files": [
33
+ "build"
34
+ ],
35
+ "scripts": {
36
+ "start": "webpack --config webpack/webpack.config.dev.js",
37
+ "server": "webpack-dev-server --open --watch",
38
+ "build-types": "tsc --project tsconfig.json",
39
+ "build-prod": "npm run build-types && webpack --config webpack/webpack.config.prod.js",
40
+ "build-prod-debug": "webpack --config webpack/webpack.config.debug-size.js",
41
+ "format": "prettier --write .",
42
+ "test": "jest",
43
+ "type-check": "tsc --noEmit"
44
+ },
45
+ "dependencies": {
46
+ "d3-array": "^3.2.4",
47
+ "d3-axis": "^3.0.0",
48
+ "d3-ease": "^3.0.1",
49
+ "d3-fetch": "^3.0.1",
50
+ "d3-force": "^3.0.0",
51
+ "d3-format": "^3.1.0",
52
+ "d3-geo": "^3.1.1",
53
+ "d3-geo-projection": "^3.0.0",
54
+ "d3-interpolate": "^3.0.1",
55
+ "d3-scale": "^4.0.2",
56
+ "d3-scale-chromatic": "^3.1.0",
57
+ "d3-selection": "^3.0.0",
58
+ "d3-shape": "^3.2.0",
59
+ "d3-svg-annotation": "^2.5.1",
60
+ "d3-zoom": "^3.0.0",
61
+ "idb-keyval": "^6.2.2",
62
+ "jsonstat-toolkit": "^1.0.8",
63
+ "proj4": "^2.17.0",
64
+ "simple-statistics": "^7.8.8",
65
+ "topojson-client": "^3.1.0"
66
+ },
67
+ "overrides": {
68
+ "d3-color": "3.1.0"
69
+ },
70
+ "devDependencies": {
71
+ "@babel/core": "^7.22.6",
72
+ "@babel/plugin-transform-runtime": "^7.22.6",
73
+ "@babel/preset-env": "^7.22.6",
74
+ "@babel/runtime": "^7.12.1",
75
+ "babel-loader": "^9.1.2",
76
+ "css-loader": "^7.1.2",
77
+ "prettier": "^3.4.1",
78
+ "style-loader": "^4.0.0",
79
+ "ts-loader": "^9.5.4",
80
+ "typescript": "^5.9.3",
81
+ "webpack": "^5.88.1",
82
+ "webpack-bundle-analyzer": "^4.10.2",
83
+ "webpack-cli": "^5.0.0",
84
+ "webpack-dev-server": "^5.2.2",
85
+ "webpack-livereload-plugin": "^3.0.2"
86
+ }
87
+ }
@@ -76,8 +76,8 @@ export interface MapConfig {
76
76
  /** Tooltip configuration. */
77
77
  tooltip?: TooltipConfig
78
78
 
79
- /** Insets (small additional maps). */
80
- insets?: InsetConfig[]
79
+ /** Insets (small additional maps). true is an alias for 'default'. */
80
+ insets?: InsetConfig[] | 'default' | true | false
81
81
 
82
82
  /** Zoom and pan settings. */
83
83
  zoomExtent?: [number, number]
@@ -120,7 +120,10 @@ export interface MapConfig {
120
120
  /** Show/hide zoom +/- buttons. */
121
121
  zoomButtons?: boolean
122
122
 
123
- /** Show/hide inset map toggle button. */
123
+ /**
124
+ * Show/hide inset map toggle button.
125
+ * When true and no insets are configured, the map automatically uses insets('default').
126
+ */
124
127
  insetsButton?: boolean
125
128
 
126
129
  /** Show/hide legend toggle button. */
@@ -230,12 +230,14 @@ export interface MapInstance {
230
230
 
231
231
  /**
232
232
  * Inset map configurations. Pass 'default' for the standard
233
- * eurostat overseas territory insets, false to disable.
233
+ * eurostat overseas territory insets. Passing true is an alias for 'default'.
234
+ * Pass false to disable.
234
235
  * @example map.insets('default')
236
+ * @example map.insets(true)
235
237
  * @example map.insets([{ geo: 'MT' }, { geo: 'LI' }])
236
238
  */
237
239
  insets(): InsetConfig[] | 'default' | false
238
- insets(config: InsetConfig[] | 'default' | false): this
240
+ insets(config: InsetConfig[] | 'default' | true | false): this
239
241
 
240
242
  /** Decoration. */
241
243
 
@@ -323,7 +325,10 @@ export interface MapInstance {
323
325
  minimap(): any
324
326
  minimap(config: any): this
325
327
 
326
- /** Show/hide inset map toggle button. */
328
+ /**
329
+ * Show/hide inset map toggle button.
330
+ * When enabled and no insets are configured, the map automatically uses insets('default').
331
+ */
327
332
  insetsButton(): boolean
328
333
  insetsButton(show: boolean): this
329
334
 
@@ -157,14 +157,7 @@ export type { SparkMapConfig, SparkMap, SparkStatConfig }
157
157
 
158
158
  // Flow map types
159
159
  export type { FlowMapConfig, FlowMap }
160
- export type {
161
- FlowNode,
162
- FlowLink,
163
- FlowGraph,
164
- FlowCurvatureSettings,
165
- FlowWidthGradientSettings,
166
- FlowBundleSettings,
167
- } from './layers/flow/FlowMapConfig'
160
+ export type { FlowNode, FlowLink, FlowGraph, FlowCurvatureSettings, FlowWidthGradientSettings, FlowBundleSettings } from './layers/flow/FlowMapConfig'
168
161
 
169
162
  // ==================== Pattern Fill Options ====================
170
163
 
@@ -223,6 +216,13 @@ export function map(type: 'sparkline' | 'spark' | 'sparklines', config?: SparkMa
223
216
  export function map(type: 'flow' | 'flowmap', config?: FlowMapConfig): FlowMap
224
217
  export function map(type: MapType, config?: MapConfig): MapInstance
225
218
 
219
+ /**
220
+ * Enable or disable strict API guard for map chaining.
221
+ * When enabled, unknown method calls throw descriptive errors.
222
+ *
223
+ * @param enabled - True to enable strict API checks
224
+ * @returns Current strict API state
225
+ */
226
226
  // ==================== Utility Functions ====================
227
227
 
228
228
  /**
@@ -63,7 +63,7 @@ export interface ChoroplethLegendConfig extends LegendConfig {
63
63
  /** Explicit tick labels for continuous legends. */
64
64
  tickLabels?: Array<string | number>
65
65
 
66
- /** Pixel tolerance used when hovering continuous legends to highlight nearby regions. @default 10 */
66
+ /** Total data-value span highlighted when hovering continuous legends. @default 10 */
67
67
  highlightTolerance?: number
68
68
 
69
69
  /** Whether to show dataset min/max labels where supported. @default true */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eurostat-map",
3
- "version": "4.6.0",
3
+ "version": "4.6.2",
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
  "cartography",