@sis-cc/dotstatsuite-visions 12.25.0 → 12.27.0

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.
@@ -32,6 +32,9 @@ export var getDepth = function getDepth(indexedItems) {
32
32
  return 0;
33
33
  }
34
34
  var parent = R.prop(item.parentId, indexedItems);
35
+ if (R.isNil(parent)) {
36
+ return 0;
37
+ }
35
38
  return getDepth(indexedItems)(parent) + 1;
36
39
  };
37
40
  };
@@ -54,6 +57,9 @@ export var getDeprecatedIds = function getDeprecatedIds(ids, items, selectedIds)
54
57
 
55
58
  var deprecatedParents = R.reduce(function (acc, id) {
56
59
  var _item = R.prop(id, indexedItemsById);
60
+ if (R.isNil(_item)) {
61
+ return acc;
62
+ }
57
63
  var _itemsIds = R.has('hierarchicalId', _item) ? R.pipe(R.values, R.filter(R.propEq('id', _item.id)), R.map(getHierarchicalId))(indexedItemsById) : [id];
58
64
 
59
65
  var children = R.pipe(R.props(_itemsIds), R.unnest)(groupedItemsByParentId);
@@ -41,6 +41,9 @@ var getDepth = exports.getDepth = function getDepth(indexedItems) {
41
41
  return 0;
42
42
  }
43
43
  var parent = R.prop(item.parentId, indexedItems);
44
+ if (R.isNil(parent)) {
45
+ return 0;
46
+ }
44
47
  return getDepth(indexedItems)(parent) + 1;
45
48
  };
46
49
  };
@@ -63,6 +66,9 @@ var getDeprecatedIds = exports.getDeprecatedIds = function getDeprecatedIds(ids,
63
66
 
64
67
  var deprecatedParents = R.reduce(function (acc, id) {
65
68
  var _item = R.prop(id, indexedItemsById);
69
+ if (R.isNil(_item)) {
70
+ return acc;
71
+ }
66
72
  var _itemsIds = R.has('hierarchicalId', _item) ? R.pipe(R.values, R.filter(R.propEq('id', _item.id)), R.map(getHierarchicalId))(indexedItemsById) : [id];
67
73
 
68
74
  var children = R.pipe(R.props(_itemsIds), R.unnest)(groupedItemsByParentId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-visions",
3
- "version": "12.25.0",
3
+ "version": "12.27.0",
4
4
  "description": "Library of visual components",
5
5
  "author": "OECD",
6
6
  "homepage": "https://visions-qa.siscc.org/#o",
@@ -9,7 +9,7 @@
9
9
  "main": "lib/index.js",
10
10
  "module": "es/index.js",
11
11
  "engines": {
12
- "node": ">=14"
12
+ "node": ">=18"
13
13
  },
14
14
  "files": [
15
15
  "css",
@@ -18,37 +18,36 @@
18
18
  "umd"
19
19
  ],
20
20
  "scripts": {
21
- "build": "nwb build-react-component --copy-files --no-demo && node scripts/doc && nwb build-demo",
22
- "build:dev": "nwb build-react-component --copy-files --no-demo",
21
+ "peers": "install-peers --force-run",
22
+ "build": "cross-env NODE_OPTIONS=--openssl-legacy-provider nwb build-react-component --copy-files --no-demo && node scripts/doc && cross-env NODE_OPTIONS=--openssl-legacy-provider nwb build-demo",
23
+ "build:dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider nwb build-react-component --copy-files --no-demo",
23
24
  "clean": "nwb clean-module && nwb clean-demo",
24
25
  "prepublishOnly": "npm run build",
25
- "start": "nwb serve-react-demo",
26
+ "start": "cross-env NODE_OPTIONS=--openssl-legacy-provider nwb serve-react-demo",
26
27
  "test": "jest",
27
28
  "test:watch": "jest --watch --no-cache",
28
29
  "lint": "eslint src/ --color",
29
30
  "precommit": "lint-staged"
30
31
  },
31
32
  "dependencies": {
32
- "@emotion/react": "^11.13.0",
33
- "@emotion/styled": "^11.13.0",
34
33
  "@hello-pangea/dnd": "^16.6.0",
35
- "@mui/icons-material": "^5.16.5",
36
- "@mui/material": "^5.16.5",
37
- "@mui/styles": "^5.16.5",
38
34
  "@react-hook/size": "^2.1.1",
39
35
  "classnames": "^2.2.6",
40
- "date-fns": "^1.30.1",
41
36
  "isemail": "^3.2.0",
42
- "numeral": "^2.0.6",
43
37
  "prop-types": "^15.7.2",
44
38
  "ramda": "^0.27.0",
45
- "react-draggable": "^4.4.5",
39
+ "react-draggable": "4.4.5",
46
40
  "react-error-boundary": "^4.0.10",
47
41
  "react-virtualized": "^9.21.2"
48
42
  },
49
43
  "peerDependencies": {
50
- "@mui/icons-material": "^5.16.5",
51
- "@mui/material": "^5.16.5",
44
+ "@emotion/react": "^11",
45
+ "@emotion/styled": "^11",
46
+ "@mui/icons-material": "^5",
47
+ "@mui/material": "^5",
48
+ "@mui/styles": "^5",
49
+ "date-fns": "^1.30.1",
50
+ "numeral": "^2.0.6",
52
51
  "react": "^18",
53
52
  "react-dom": "^18"
54
53
  },
@@ -56,12 +55,11 @@
56
55
  "@babel/eslint-parser": "^7.5.4",
57
56
  "@babel/plugin-syntax-dynamic-import": "^7.2.0",
58
57
  "@cfaester/enzyme-adapter-react-18": "^0.7.0",
59
- "@mui/icons-material": "^5.16.5",
60
- "@mui/material": "^5.16.5",
61
58
  "@testing-library/jest-dom": "^5.16.5",
62
59
  "@testing-library/react": "^14.0.0",
63
60
  "babel-jest": "^24.8.0",
64
61
  "babel-preset-react-app": "^9.0.0",
62
+ "cross-env": "^7.0.3",
65
63
  "dox": "^0.9.0",
66
64
  "eslint": "^8.39.0",
67
65
  "eslint-plugin-import": "^2.27.5",
@@ -71,6 +69,7 @@
71
69
  "eslint-plugin-react-hooks": "^4.6.0",
72
70
  "husky": "^2.7.0",
73
71
  "identity-obj-proxy": "^3.0.0",
72
+ "install-peers-cli": "^2.2.0",
74
73
  "jest": "^24.8.0",
75
74
  "jss": "^10.10.0",
76
75
  "jss-rtl": "^0.2.3",
@@ -79,9 +78,7 @@
79
78
  "nwb": "0.23.0",
80
79
  "prettier": "^2.8.8",
81
80
  "pretty-quick": "^3.1.3",
82
- "react": "^18",
83
81
  "react-a11y": "^1.1.0",
84
- "react-dom": "^18",
85
82
  "react-helmet": "^5.2.1",
86
83
  "react-scrollable-anchor": "^0.6.1",
87
84
  "react-syntax-highlighter": "^10.2.1",