@undp/data-viz 0.0.1 → 0.0.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/package.json CHANGED
@@ -1,173 +1,173 @@
1
- {
2
- "name": "@undp/data-viz",
3
- "version": "0.0.1",
4
- "main": "./dist/index.cjs",
5
- "module": "./dist/index.js",
6
- "browser": "./dist/index.umd.js",
7
- "types": "./dist/index.d.ts",
8
- "files": [
9
- "dist/index.js",
10
- "dist/index.cjs",
11
- "dist/index.umd.js",
12
- "dist/index.d.ts",
13
- "dist/style.css"
14
- ],
15
- "exports": {
16
- ".": {
17
- "require": "./dist/index.cjs",
18
- "import": "./dist/index.js"
19
- },
20
- "./dist/style.css": {
21
- "import": "./dist/style.css",
22
- "require": "./dist/style.css"
23
- }
24
- },
25
- "publishConfig": {
26
- "access": "public"
27
- },
28
- "type": "module",
29
- "description": "The open source graphing library build by UNDP",
30
- "private": false,
31
- "repository": {
32
- "type": "git",
33
- "url": "git+https://github.com/UNDP-Data/dv-visualization-starter-kit.git"
34
- },
35
- "author": "United Nations Development Programme",
36
- "license": "MIT",
37
- "bugs": {
38
- "url": "https://github.com/UNDP-Data/dv-visualization-starter-kit/issues"
39
- },
40
- "homepage": "https://orange-bay-04736e710.4.azurestaticapps.net/",
41
- "scripts": {
42
- "dev": "vite",
43
- "build": "tsc && vite build",
44
- "preview": "vite preview",
45
- "storybook": "storybook dev -p 6006",
46
- "build-storybook": "storybook build",
47
- "clean": "rimraf node_modules && rimraf dist"
48
- },
49
- "keywords": [
50
- "UNDP",
51
- "United Nations",
52
- "React",
53
- "visualization",
54
- "data visualization",
55
- "graphing",
56
- "plotting",
57
- "graphs",
58
- "maps"
59
- ],
60
- "dependencies": {
61
- "@dnd-kit/core": "^6.3.1",
62
- "@dnd-kit/modifiers": "^9.0.0",
63
- "@undp/design-system-react": "^0.0.1",
64
- "ajv": "^8.17.1",
65
- "d3-array": "^3.2.4",
66
- "d3-delaunay": "^6.0.4",
67
- "d3-force": "^3.0.0",
68
- "d3-format": "^3.1.0",
69
- "d3-geo": "^3.1.1",
70
- "d3-hierarchy": "^3.1.2",
71
- "d3-sankey": "^0.12.3",
72
- "d3-scale": "^4.0.2",
73
- "d3-selection": "^3.0.0",
74
- "d3-shape": "^3.2.0",
75
- "d3-zoom": "^3.0.0",
76
- "date-fns": "^4.1.0",
77
- "dom-to-svg": "^0.12.2",
78
- "fast-deep-equal": "^3.1.3",
79
- "file-saver": "^2.0.5",
80
- "handlebars": "^4.7.8",
81
- "html2canvas": "^1.4.1",
82
- "lodash.flattendeep": "^4.4.0",
83
- "lodash.groupby": "^4.6.0",
84
- "lodash.intersection": "^4.4.0",
85
- "lodash.max": "^4.0.1",
86
- "lodash.maxby": "^4.6.0",
87
- "lodash.min": "^4.0.1",
88
- "lodash.minby": "^4.6.0",
89
- "lodash.orderby": "^4.6.0",
90
- "lodash.sortby": "^4.7.0",
91
- "lodash.sum": "^4.0.2",
92
- "lodash.uniq": "^4.5.0",
93
- "lodash.uniqby": "^4.7.0",
94
- "marked": "^15.0.8",
95
- "math-expression-evaluator": "^2.0.6",
96
- "motion": "^12.7.4",
97
- "papaparse": "^5.5.2",
98
- "pmtiles": "^4.3.0",
99
- "react-csv": "^2.2.2",
100
- "simple-statistics": "^7.8.8",
101
- "xss": "^1.0.15"
102
- },
103
- "peerDependencies": {
104
- "maplibre-gl": "^5.3.1",
105
- "react": "^19.1.0",
106
- "react-dom": "^19.1.0",
107
- "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
108
- },
109
- "devDependencies": {
110
- "@chromatic-com/storybook": "^3.2.6",
111
- "@storybook/addon-essentials": "^8.6.11",
112
- "@storybook/addon-interactions": "^8.6.11",
113
- "@storybook/addon-onboarding": "^8.6.11",
114
- "@storybook/blocks": "^8.6.11",
115
- "@storybook/react": "^8.6.11",
116
- "@storybook/react-vite": "^8.6.11",
117
- "@storybook/test": "^8.6.12",
118
- "@types/d3-array": "^3.0.5",
119
- "@types/d3-delaunay": "^6.0.4",
120
- "@types/d3-force": "^3.0.10",
121
- "@types/d3-format": "^3.0.1",
122
- "@types/d3-geo": "^3.0.3",
123
- "@types/d3-hierarchy": "^3.1.7",
124
- "@types/d3-sankey": "^0.12.4",
125
- "@types/d3-scale": "^4.0.3",
126
- "@types/d3-selection": "^3.0.5",
127
- "@types/d3-shape": "^3.1.1",
128
- "@types/d3-zoom": "^3.0.3",
129
- "@types/dom-to-image": "^2.6.4",
130
- "@types/file-saver": "^2.0.5",
131
- "@types/lodash.flattendeep": "^4.4.9",
132
- "@types/lodash.groupby": "^4.6.9",
133
- "@types/lodash.intersection": "^4.4.9",
134
- "@types/lodash.isequal": "^4.5.8",
135
- "@types/lodash.max": "^4.0.7",
136
- "@types/lodash.maxby": "^4.6.7",
137
- "@types/lodash.min": "^4.0.7",
138
- "@types/lodash.minby": "^4.6.7",
139
- "@types/lodash.orderby": "^4.6.9",
140
- "@types/lodash.sortby": "^4.7.7",
141
- "@types/lodash.sum": "^4.0.7",
142
- "@types/lodash.uniq": "^4.5.9",
143
- "@types/lodash.uniqby": "^4.7.7",
144
- "@types/math-expression-evaluator": "^1.3.3",
145
- "@types/node": "^20.14.10",
146
- "@types/papaparse": "^5.3.14",
147
- "@types/react": "^18.0.27",
148
- "@types/react-csv": "^1.1.3",
149
- "@types/react-dom": "^18.0.10",
150
- "@typescript-eslint/eslint-plugin": "^8.30.1",
151
- "@typescript-eslint/parser": "^8.30.1",
152
- "@vitejs/plugin-react": "^4.4.0",
153
- "eslint": "^9.25.0",
154
- "eslint-config-love": "^119.0.0",
155
- "eslint-config-prettier": "^10.1.2",
156
- "eslint-plugin-import": "^2.31.0",
157
- "eslint-plugin-jsx-a11y": "^6.10.2",
158
- "eslint-plugin-n": "^17.17.0",
159
- "eslint-plugin-prettier": "^5.2.6",
160
- "eslint-plugin-promise": "^7.2.1",
161
- "eslint-plugin-react": "^7.37.5",
162
- "eslint-plugin-react-hooks": "^5.2.0",
163
- "eslint-plugin-storybook": "^0.12.0",
164
- "prettier": "^3.5.3",
165
- "react-docgen-typescript": "^2.2.2",
166
- "rimraf": "^6.0.1",
167
- "storybook": "^8.6.12",
168
- "typescript": "^5.7.3",
169
- "vite": "^6.3.2",
170
- "vite-plugin-dts": "^4.5.3",
171
- "vite-plugin-eslint": "^1.8.1"
172
- }
173
- }
1
+ {
2
+ "name": "@undp/data-viz",
3
+ "version": "0.0.3",
4
+ "main": "./dist/index.cjs",
5
+ "module": "./dist/index.js",
6
+ "browser": "./dist/index.umd.js",
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist/index.js",
10
+ "dist/index.cjs",
11
+ "dist/index.umd.js",
12
+ "dist/index.d.ts",
13
+ "dist/style.css"
14
+ ],
15
+ "exports": {
16
+ ".": {
17
+ "require": "./dist/index.cjs",
18
+ "import": "./dist/index.js"
19
+ },
20
+ "./dist/style.css": {
21
+ "import": "./dist/style.css",
22
+ "require": "./dist/style.css"
23
+ }
24
+ },
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "type": "module",
29
+ "description": "The open source graphing library build by UNDP",
30
+ "private": false,
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/UNDP-Data/undp-visualization-library.git"
34
+ },
35
+ "author": "United Nations Development Programme",
36
+ "license": "MIT",
37
+ "bugs": {
38
+ "url": "https://github.com/UNDP-Data/undp-visualization-library/issues"
39
+ },
40
+ "homepage": "https://jolly-field-038560703.6.azurestaticapps.net/",
41
+ "scripts": {
42
+ "dev": "vite",
43
+ "build": "tsc && vite build",
44
+ "preview": "vite preview",
45
+ "storybook": "storybook dev -p 6006",
46
+ "build-storybook": "storybook build",
47
+ "clean": "rimraf node_modules && rimraf dist && rimraf package-lock.json"
48
+ },
49
+ "keywords": [
50
+ "UNDP",
51
+ "United Nations",
52
+ "React",
53
+ "visualization",
54
+ "data visualization",
55
+ "graphing",
56
+ "plotting",
57
+ "graphs",
58
+ "maps"
59
+ ],
60
+ "dependencies": {
61
+ "@dnd-kit/core": "^6.3.1",
62
+ "@dnd-kit/modifiers": "^9.0.0",
63
+ "@undp/design-system-react": "^0.0.2",
64
+ "ajv": "^8.17.1",
65
+ "d3-array": "^3.2.4",
66
+ "d3-delaunay": "^6.0.4",
67
+ "d3-force": "^3.0.0",
68
+ "d3-format": "^3.1.0",
69
+ "d3-geo": "^3.1.1",
70
+ "d3-hierarchy": "^3.1.2",
71
+ "d3-sankey": "^0.12.3",
72
+ "d3-scale": "^4.0.2",
73
+ "d3-selection": "^3.0.0",
74
+ "d3-shape": "^3.2.0",
75
+ "d3-zoom": "^3.0.0",
76
+ "date-fns": "^4.1.0",
77
+ "dom-to-svg": "^0.12.2",
78
+ "fast-deep-equal": "^3.1.3",
79
+ "file-saver": "^2.0.5",
80
+ "handlebars": "^4.7.8",
81
+ "html2canvas": "^1.4.1",
82
+ "lodash.flattendeep": "^4.4.0",
83
+ "lodash.groupby": "^4.6.0",
84
+ "lodash.intersection": "^4.4.0",
85
+ "lodash.max": "^4.0.1",
86
+ "lodash.maxby": "^4.6.0",
87
+ "lodash.min": "^4.0.1",
88
+ "lodash.minby": "^4.6.0",
89
+ "lodash.orderby": "^4.6.0",
90
+ "lodash.sortby": "^4.7.0",
91
+ "lodash.sum": "^4.0.2",
92
+ "lodash.uniq": "^4.5.0",
93
+ "lodash.uniqby": "^4.7.0",
94
+ "marked": "^15.0.8",
95
+ "math-expression-evaluator": "^2.0.6",
96
+ "motion": "^12.7.4",
97
+ "papaparse": "^5.5.2",
98
+ "pmtiles": "^4.3.0",
99
+ "react-csv": "^2.2.2",
100
+ "simple-statistics": "^7.8.8",
101
+ "xss": "^1.0.15"
102
+ },
103
+ "peerDependencies": {
104
+ "maplibre-gl": "^5.3.1",
105
+ "react": "^19.1.0",
106
+ "react-dom": "^19.1.0",
107
+ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
108
+ },
109
+ "devDependencies": {
110
+ "@chromatic-com/storybook": "^3.2.6",
111
+ "@storybook/addon-essentials": "^8.6.11",
112
+ "@storybook/addon-interactions": "^8.6.11",
113
+ "@storybook/addon-onboarding": "^8.6.11",
114
+ "@storybook/blocks": "^8.6.11",
115
+ "@storybook/react": "^8.6.11",
116
+ "@storybook/react-vite": "^8.6.11",
117
+ "@storybook/test": "^8.6.12",
118
+ "@types/d3-array": "^3.0.5",
119
+ "@types/d3-delaunay": "^6.0.4",
120
+ "@types/d3-force": "^3.0.10",
121
+ "@types/d3-format": "^3.0.1",
122
+ "@types/d3-geo": "^3.0.3",
123
+ "@types/d3-hierarchy": "^3.1.7",
124
+ "@types/d3-sankey": "^0.12.4",
125
+ "@types/d3-scale": "^4.0.3",
126
+ "@types/d3-selection": "^3.0.5",
127
+ "@types/d3-shape": "^3.1.1",
128
+ "@types/d3-zoom": "^3.0.3",
129
+ "@types/dom-to-image": "^2.6.4",
130
+ "@types/file-saver": "^2.0.5",
131
+ "@types/lodash.flattendeep": "^4.4.9",
132
+ "@types/lodash.groupby": "^4.6.9",
133
+ "@types/lodash.intersection": "^4.4.9",
134
+ "@types/lodash.isequal": "^4.5.8",
135
+ "@types/lodash.max": "^4.0.7",
136
+ "@types/lodash.maxby": "^4.6.7",
137
+ "@types/lodash.min": "^4.0.7",
138
+ "@types/lodash.minby": "^4.6.7",
139
+ "@types/lodash.orderby": "^4.6.9",
140
+ "@types/lodash.sortby": "^4.7.7",
141
+ "@types/lodash.sum": "^4.0.7",
142
+ "@types/lodash.uniq": "^4.5.9",
143
+ "@types/lodash.uniqby": "^4.7.7",
144
+ "@types/math-expression-evaluator": "^1.3.3",
145
+ "@types/node": "^20.14.10",
146
+ "@types/papaparse": "^5.3.14",
147
+ "@types/react": "^18.0.27",
148
+ "@types/react-csv": "^1.1.3",
149
+ "@types/react-dom": "^18.0.10",
150
+ "@typescript-eslint/eslint-plugin": "^8.30.1",
151
+ "@typescript-eslint/parser": "^8.30.1",
152
+ "@vitejs/plugin-react": "^4.4.0",
153
+ "eslint": "^9.25.0",
154
+ "eslint-config-love": "^119.0.0",
155
+ "eslint-config-prettier": "^10.1.2",
156
+ "eslint-plugin-import": "^2.31.0",
157
+ "eslint-plugin-jsx-a11y": "^6.10.2",
158
+ "eslint-plugin-n": "^17.17.0",
159
+ "eslint-plugin-prettier": "^5.2.6",
160
+ "eslint-plugin-promise": "^7.2.1",
161
+ "eslint-plugin-react": "^7.37.5",
162
+ "eslint-plugin-react-hooks": "^5.2.0",
163
+ "eslint-plugin-storybook": "^0.12.0",
164
+ "prettier": "^3.5.3",
165
+ "react-docgen-typescript": "^2.2.2",
166
+ "rimraf": "^6.0.1",
167
+ "storybook": "^8.6.12",
168
+ "typescript": "^5.7.3",
169
+ "vite": "^6.3.2",
170
+ "vite-plugin-dts": "^4.5.3",
171
+ "vite-plugin-eslint": "^1.8.1"
172
+ }
173
+ }
package/readme.md CHANGED
@@ -1,33 +1,35 @@
1
1
  # Getting Started
2
2
 
3
- UNDP visualization library is dedicated to providing a good development experience for data visualization specialists. Before starting, it is recommended to learn React first, and correctly install and configure Node.js v16 or above.
3
+ UNDP visualization library is dedicated to providing a good development experience for data visualization specialists. Before starting, it is recommended to learn React first, and correctly install and configure Node.js v18 or above.
4
4
 
5
5
  We also assumes that you have intermediate knowledge about HTML, CSS, and JavaScript/TypeScript, and React. Starting out is straightforward.
6
6
 
7
- Detailed documentation can be found [here](https://orange-bay-04736e710.4.azurestaticapps.net/).
7
+ __Note: The library uses react v19__
8
+
9
+ Detailed documentation can be found [here](https://jolly-field-038560703.6.azurestaticapps.net/).
8
10
 
9
11
  ### Installation
10
12
  __Using npm__
11
13
  ```
12
- npm i @undp-data/undp-visualization-library
14
+ npm i @undp/data-viz
13
15
  ```
14
16
 
15
17
 
16
18
  __Using yarn__
17
19
  ```
18
- yarn add @undp-data/undp-visualization-library
20
+ yarn add @undp/data-viz
19
21
  ```
20
22
 
21
23
  ### Import
22
24
  It is recommended to import what you need and the use it. For example, import the `HorizontalBarGraph` like this:
23
25
  ```
24
- import { HorizontalBarGraph } from '@undp-data/undp-visualization-library'
26
+ import { HorizontalBarGraph } from '@undp/data-viz'
25
27
  ```
26
28
 
27
29
 
28
30
  It is also recommended to import the css because some setting expect the CSS to be imported to look good. You can import the css file like this:
29
31
  ```
30
- import '@undp-data/undp-visualization-library/dist/style.css';
32
+ import '@undp/data-viz/dist/style.css';
31
33
  ```
32
34
 
33
35
  ### TypeScript
@@ -49,7 +51,6 @@ The dependencies that are pre-installed wit the library:
49
51
  * Various Lodash libraries - For array and data manipulation
50
52
  * lodash.flattendeep
51
53
  * lodash.intersection
52
- * lodash.isequal
53
54
  * lodash.max
54
55
  * lodash.maxby
55
56
  * lodash.min
@@ -59,11 +60,11 @@ The dependencies that are pre-installed wit the library:
59
60
  * lodash.sum
60
61
  * lodash.uniq
61
62
  * lodash.uniqby
62
- * maplibre-gl - For Maplibre maps
63
+ * maplibre-gl - For Maplibre maps (Peer dependency)
63
64
  * pmtiles - For adding pmtiles to Maplibre maps
64
65
  * papaparse - For loading and parsing csv from links
65
- * framer-motion - For creating animations in the animated graphs
66
- * react-draggable - For creating comparison maps
66
+ * motion - For creating animations in the animated graphs
67
+ * dnd-kit - For creating comparison maps
67
68
  * simple-statistics - For statistical functions
68
69
  * xss - For cleaning up cross scripting from user-submitted HTML
69
70
  * ajv - For schema validation
@@ -72,5 +73,5 @@ The dependencies that are pre-installed wit the library:
72
73
  * dom-to-svg - For downloading div as svg
73
74
  * file-saver - For downloading files
74
75
  * react-csv - For generating a csv file
75
- * xlsx - For generating a xlsx file
76
- * React (of course!)
76
+ * xlsx - For generating a xlsx file (Peer dependency)
77
+ * React (of course!) (Peer dependency)