eurostat-map 4.6.1 → 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.1",
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eurostat-map",
3
- "version": "4.6.1",
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",