@sis-cc/dotstatsuite-visions 10.10.0 → 10.11.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.
|
@@ -54,18 +54,18 @@ export var getDeprecatedIds = function getDeprecatedIds(ids, items, selectedIds)
|
|
|
54
54
|
|
|
55
55
|
var deprecatedParents = R.reduce(function (acc, id) {
|
|
56
56
|
var _item = R.prop(id, indexedItemsById);
|
|
57
|
-
if (!isItemSelected(selectedIds)(_item)) {
|
|
58
|
-
return acc;
|
|
59
|
-
}
|
|
60
57
|
var _itemsIds = R.has('hierarchicalId', _item) ? R.pipe(R.values, R.filter(R.propEq('id', _item.id)), R.map(getHierarchicalId))(indexedItemsById) : [id];
|
|
61
58
|
|
|
62
|
-
if (R.propOr(true, 'isEnabled', _item)) {
|
|
63
|
-
return acc;
|
|
64
|
-
}
|
|
65
59
|
var children = R.pipe(R.props(_itemsIds), R.unnest)(groupedItemsByParentId);
|
|
66
60
|
var selectedChild = R.find(function (child) {
|
|
67
61
|
return !R.includes(getHierarchicalId(child), _ids) && isItemSelected(selectedIds)(child);
|
|
68
62
|
}, children);
|
|
63
|
+
if (!isItemSelected(selectedIds)(_item) && R.isNil(selectedChild)) {
|
|
64
|
+
return R.concat(reccurse([id]), acc);
|
|
65
|
+
}
|
|
66
|
+
if (!R.propOr(false, 'isGreyed', _item)) {
|
|
67
|
+
return acc;
|
|
68
|
+
}
|
|
69
69
|
if (R.isNil(selectedChild)) {
|
|
70
70
|
return R.concat(acc, _itemsIds);
|
|
71
71
|
}
|
|
@@ -63,18 +63,18 @@ var getDeprecatedIds = exports.getDeprecatedIds = function getDeprecatedIds(ids,
|
|
|
63
63
|
|
|
64
64
|
var deprecatedParents = R.reduce(function (acc, id) {
|
|
65
65
|
var _item = R.prop(id, indexedItemsById);
|
|
66
|
-
if (!isItemSelected(selectedIds)(_item)) {
|
|
67
|
-
return acc;
|
|
68
|
-
}
|
|
69
66
|
var _itemsIds = R.has('hierarchicalId', _item) ? R.pipe(R.values, R.filter(R.propEq('id', _item.id)), R.map(getHierarchicalId))(indexedItemsById) : [id];
|
|
70
67
|
|
|
71
|
-
if (R.propOr(true, 'isEnabled', _item)) {
|
|
72
|
-
return acc;
|
|
73
|
-
}
|
|
74
68
|
var children = R.pipe(R.props(_itemsIds), R.unnest)(groupedItemsByParentId);
|
|
75
69
|
var selectedChild = R.find(function (child) {
|
|
76
70
|
return !R.includes(getHierarchicalId(child), _ids) && isItemSelected(selectedIds)(child);
|
|
77
71
|
}, children);
|
|
72
|
+
if (!isItemSelected(selectedIds)(_item) && R.isNil(selectedChild)) {
|
|
73
|
+
return R.concat(reccurse([id]), acc);
|
|
74
|
+
}
|
|
75
|
+
if (!R.propOr(false, 'isGreyed', _item)) {
|
|
76
|
+
return acc;
|
|
77
|
+
}
|
|
78
78
|
if (R.isNil(selectedChild)) {
|
|
79
79
|
return R.concat(acc, _itemsIds);
|
|
80
80
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @sis-cc/dotstatsuite-visions v10.
|
|
2
|
+
* @sis-cc/dotstatsuite-visions v10.11.0 - https://visions-qa.siscc.org/#o
|
|
3
3
|
* MIT Licensed
|
|
4
4
|
*/
|
|
5
5
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -6699,7 +6699,7 @@ function removeClassName(el
|
|
|
6699
6699
|
/* 121 */
|
|
6700
6700
|
/***/ (function(module) {
|
|
6701
6701
|
|
|
6702
|
-
module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"10.
|
|
6702
|
+
module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"10.11.0","description":"Library of visual components","author":"OECD","homepage":"https://visions-qa.siscc.org/#o","license":"MIT","repository":"https://gitlab.com/sis-cc/.stat-suite/dotstatsuite-visions","main":"lib/index.js","module":"es/index.js","engines":{"node":">=14"},"files":["css","es","lib","umd"],"scripts":{"build":"nwb build-react-component --copy-files --no-demo && node scripts/doc && nwb build-demo","build:dev":"nwb build-react-component --copy-files --no-demo","clean":"nwb clean-module && nwb clean-demo","prepublishOnly":"npm run build","start":"nwb serve-react-demo","test":"jest","test:watch":"jest --watch --no-cache","lint":"eslint src/ --color","precommit":"lint-staged"},"dependencies":{"@react-hook/size":"^2.1.1","classnames":"^2.2.6","date-fns":"^1.30.1","isemail":"^3.2.0","numeral":"^2.0.6","prop-types":"^15.7.2","ramda":"^0.27.0","react-beautiful-dnd":"^13.0.0","react-draggable":"^4.4.5","react-error-boundary":"^4.0.10","react-virtualized":"^9.21.2"},"peerDependencies":{"@material-ui/core":"^4","@material-ui/icons":"^4","@sis-cc/dotstatsuite-sdmxjs":"^8.x","react":"^18","react-dom":"^18"},"devDependencies":{"@babel/eslint-parser":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@cfaester/enzyme-adapter-react-18":"^0.7.0","@material-ui/core":"^4","@material-ui/icons":"^4","@sis-cc/dotstatsuite-sdmxjs":"*","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^14.0.0","babel-jest":"^24.8.0","babel-preset-react-app":"^9.0.0","dox":"^0.9.0","eslint":"^8.39.0","eslint-plugin-import":"^2.27.5","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.32.2","eslint-plugin-react-hooks":"^4.6.0","husky":"^2.7.0","identity-obj-proxy":"^3.0.0","jest":"^24.8.0","jss":"^10.10.0","jss-rtl":"^0.2.3","lint-staged":"^8.2.1","mutationobserver-shim":"^0.3.7","nwb":"0.23.0","prettier":"^2.8.8","pretty-quick":"^3.1.3","react":"^18","react-a11y":"^1.1.0","react-dom":"^18","react-helmet":"^5.2.1","react-scrollable-anchor":"^0.6.1","react-syntax-highlighter":"^10.2.1","sanitize-html":"2.7.0","webpack":"^5.68.0","webpack-cli":"^4.9.2","webpack-dev-server":"^4.7.4"},"jest":{"verbose":true,"coverageDirectory":"coverage","collectCoverageFrom":["src/**/*.{js,jsx,ts,tsx}","!src/ScopeList/*.{js,jsx,ts,tsx}","!src/**/*.d.ts"],"setupFilesAfterEnv":["<rootDir>/tests/setup.js"],"testMatch":["**/tests/**/*.{spec,test}.{js,jsx,ts,tsx}","!**/tests/ScopeList.test.js"],"testEnvironment":"jsdom","transform":{"^.+\\.(js|jsx|ts|tsx)$":"<rootDir>/node_modules/babel-jest"},"transformIgnorePatterns":["[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$","^.+\\.module\\.(css|sass|scss)$"],"modulePaths":[],"moduleNameMapper":{"^react-native$":"react-native-web","^.+\\.module\\.(css|sass|scss)$":"identity-obj-proxy","\\.(jpg|jpeg|png)$":"identity-obj-proxy"},"moduleFileExtensions":["web.js","js","web.ts","ts","web.tsx","tsx","json","web.jsx","jsx","node"]},"babel":{"presets":["react-app"],"plugins":["@babel/plugin-syntax-dynamic-import"]},"eslintConfig":{"env":{"browser":true,"jest":true,"node":true,"es6":true},"extends":["eslint:recommended","plugin:react/recommended","plugin:jsx-a11y/recommended"],"parser":"@babel/eslint-parser","parserOptions":{"babelOptions":{"presets":[["babel-preset-react-app",false],"babel-preset-react-app/test"]},"ecmaFeatures":{"experimentalObjectRestSpread":true,"jsx":true},"sourceType":"module"},"plugins":["prettier","react","import","react-hooks","jsx-a11y"],"rules":{"no-console":"warn","no-unused-vars":"error","react/display-name":"off","react-hooks/rules-of-hooks":"error","react-hooks/exhaustive-deps":"warn","no-use-before-define":"error"}},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"src/**/*.{js,css}":["prettier --write","git add","yarn lint"]},"prettier":{"endOfLine":"lf","useTabs":false,"printWidth":100,"tabWidth":2,"singleQuote":true,"trailingComma":"all","bracketSameLine":false,"bracketSpacing":true,"parser":"babel","semi":true,"arrowParens":"avoid"}};
|
|
6703
6703
|
|
|
6704
6704
|
/***/ }),
|
|
6705
6705
|
/* 122 */
|
|
@@ -70942,18 +70942,18 @@ var utils_getDeprecatedIds = function getDeprecatedIds(ids, items, selectedIds)
|
|
|
70942
70942
|
|
|
70943
70943
|
var deprecatedParents = es_reduce(function (acc, id) {
|
|
70944
70944
|
var _item = es_prop(id, indexedItemsById);
|
|
70945
|
-
if (!utils_isItemSelected(selectedIds)(_item)) {
|
|
70946
|
-
return acc;
|
|
70947
|
-
}
|
|
70948
70945
|
var _itemsIds = es_has('hierarchicalId', _item) ? pipe(es_values, es_filter(es_propEq('id', _item.id)), es_map(utils_getHierarchicalId))(indexedItemsById) : [id];
|
|
70949
70946
|
|
|
70950
|
-
if (es_propOr(true, 'isEnabled', _item)) {
|
|
70951
|
-
return acc;
|
|
70952
|
-
}
|
|
70953
70947
|
var children = pipe(es_props(_itemsIds), es_unnest)(groupedItemsByParentId);
|
|
70954
70948
|
var selectedChild = es_find(function (child) {
|
|
70955
70949
|
return !es_includes(utils_getHierarchicalId(child), _ids) && utils_isItemSelected(selectedIds)(child);
|
|
70956
70950
|
}, children);
|
|
70951
|
+
if (!utils_isItemSelected(selectedIds)(_item) && es_isNil(selectedChild)) {
|
|
70952
|
+
return es_concat(reccurse([id]), acc);
|
|
70953
|
+
}
|
|
70954
|
+
if (!es_propOr(false, 'isGreyed', _item)) {
|
|
70955
|
+
return acc;
|
|
70956
|
+
}
|
|
70957
70957
|
if (es_isNil(selectedChild)) {
|
|
70958
70958
|
return es_concat(acc, _itemsIds);
|
|
70959
70959
|
}
|