@sis-cc/dotstatsuite-visions 12.11.0 → 12.13.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.
@@ -43,18 +43,24 @@ export var spotlightFilter = function spotlightFilter(term) {
43
43
 
44
44
  var recurse = function recurse(item) {
45
45
  var label = labelRenderer(item);
46
- var isValidItem = R.includes(R.toLower(term), R.toLower(label));
46
+ var isValidItem = function isValidItem(item) {
47
+ return R.includes(R.toLower(term), R.toLower(item));
48
+ };
47
49
 
48
50
  var result = [];
49
51
 
50
- if (isValidItem) {
52
+ if (isValidItem(label)) {
51
53
  var highlightedLabel = highlightLabel(label);
52
54
  var parents = findParents(item);
53
55
  result = [].concat(parents, [_extends({}, item, { highlightedLabel: highlightedLabel })]);
54
56
 
55
57
  if (displayChildren) {
56
58
  var children = getDescendants(getHierarchicalId(item), groupedItemsByParentId);
57
- return [].concat(parents, [_extends({}, item, { highlightedLabel: highlightedLabel })], children);
59
+ var highlightedChildren = R.map(function (child) {
60
+ var labelChild = labelRenderer(child);
61
+ return isValidItem(labelChild) ? _extends({}, child, { highlightedLabel: highlightLabel(labelChild) }) : child;
62
+ })(children);
63
+ return [].concat(parents, [_extends({}, item, { highlightedLabel: highlightedLabel })], highlightedChildren);
58
64
  }
59
65
  }
60
66
 
package/es/theme.js CHANGED
@@ -341,8 +341,7 @@ export var sisccTheme = function sisccTheme(_ref) {
341
341
  share: {
342
342
  title: {
343
343
  fontWeight: 400,
344
- fontFamily: "'Roboto Slab', serif",
345
- fontSize: 18
344
+ fontFamily: "'Roboto Slab', serif"
346
345
  }
347
346
  },
348
347
  spotlight: {
@@ -58,18 +58,24 @@ var spotlightFilter = exports.spotlightFilter = function spotlightFilter(term) {
58
58
 
59
59
  var recurse = function recurse(item) {
60
60
  var label = labelRenderer(item);
61
- var isValidItem = R.includes(R.toLower(term), R.toLower(label));
61
+ var isValidItem = function isValidItem(item) {
62
+ return R.includes(R.toLower(term), R.toLower(item));
63
+ };
62
64
 
63
65
  var result = [];
64
66
 
65
- if (isValidItem) {
67
+ if (isValidItem(label)) {
66
68
  var highlightedLabel = highlightLabel(label);
67
69
  var parents = findParents(item);
68
70
  result = [].concat(parents, [_extends({}, item, { highlightedLabel: highlightedLabel })]);
69
71
 
70
72
  if (displayChildren) {
71
73
  var children = (0, _utils.getDescendants)((0, _utils.getHierarchicalId)(item), groupedItemsByParentId);
72
- return [].concat(parents, [_extends({}, item, { highlightedLabel: highlightedLabel })], children);
74
+ var highlightedChildren = R.map(function (child) {
75
+ var labelChild = labelRenderer(child);
76
+ return isValidItem(labelChild) ? _extends({}, child, { highlightedLabel: highlightLabel(labelChild) }) : child;
77
+ })(children);
78
+ return [].concat(parents, [_extends({}, item, { highlightedLabel: highlightedLabel })], highlightedChildren);
73
79
  }
74
80
  }
75
81
 
package/lib/theme.js CHANGED
@@ -345,8 +345,7 @@ var sisccTheme = exports.sisccTheme = function sisccTheme(_ref) {
345
345
  share: {
346
346
  title: {
347
347
  fontWeight: 400,
348
- fontFamily: "'Roboto Slab', serif",
349
- fontSize: 18
348
+ fontFamily: "'Roboto Slab', serif"
350
349
  }
351
350
  },
352
351
  spotlight: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-visions",
3
- "version": "12.11.0",
3
+ "version": "12.13.0",
4
4
  "description": "Library of visual components",
5
5
  "author": "OECD",
6
6
  "homepage": "https://visions-qa.siscc.org/#o",
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @sis-cc/dotstatsuite-visions v12.11.0 - https://visions-qa.siscc.org/#o
2
+ * @sis-cc/dotstatsuite-visions v12.13.0 - https://visions-qa.siscc.org/#o
3
3
  * MIT Licensed
4
4
  */
5
5
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -9187,7 +9187,7 @@ if (true) {
9187
9187
  /* 166 */
9188
9188
  /***/ (function(module) {
9189
9189
 
9190
- module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"12.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":{"@emotion/react":"^11.13.0","@emotion/styled":"^11.13.0","@hello-pangea/dnd":"^16.6.0","@mui/icons-material":"^5.16.5","@mui/material":"^5.16.5","@mui/styles":"^5.16.5","@react-hook/size":"^2.1.1","classnames":"^2.2.6","cross-env":"^7.0.3","date-fns":"^1.30.1","isemail":"^3.2.0","numeral":"^2.0.6","prop-types":"^15.7.2","ramda":"^0.27.0","react-draggable":"^4.4.5","react-error-boundary":"^4.0.10","react-virtualized":"^9.21.2"},"peerDependencies":{"@mui/icons-material":"^5.16.5","@mui/material":"^5.16.5","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","@mui/icons-material":"^5.16.5","@mui/material":"^5.16.5","@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"}};
9190
+ module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"12.13.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":{"@emotion/react":"^11.13.0","@emotion/styled":"^11.13.0","@hello-pangea/dnd":"^16.6.0","@mui/icons-material":"^5.16.5","@mui/material":"^5.16.5","@mui/styles":"^5.16.5","@react-hook/size":"^2.1.1","classnames":"^2.2.6","cross-env":"^7.0.3","date-fns":"^1.30.1","isemail":"^3.2.0","numeral":"^2.0.6","prop-types":"^15.7.2","ramda":"^0.27.0","react-draggable":"^4.4.5","react-error-boundary":"^4.0.10","react-virtualized":"^9.21.2"},"peerDependencies":{"@mui/icons-material":"^5.16.5","@mui/material":"^5.16.5","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","@mui/icons-material":"^5.16.5","@mui/material":"^5.16.5","@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"}};
9191
9191
 
9192
9192
  /***/ }),
9193
9193
  /* 167 */
@@ -56476,8 +56476,7 @@ var sisccTheme = function sisccTheme(_ref) {
56476
56476
  share: {
56477
56477
  title: {
56478
56478
  fontWeight: 400,
56479
- fontFamily: "'Roboto Slab', serif",
56480
- fontSize: 18
56479
+ fontFamily: "'Roboto Slab', serif"
56481
56480
  }
56482
56481
  },
56483
56482
  spotlight: {
@@ -80798,18 +80797,24 @@ var withSpotlight_spotlightFilter = function spotlightFilter(term) {
80798
80797
 
80799
80798
  var recurse = function recurse(item) {
80800
80799
  var label = labelRenderer(item);
80801
- var isValidItem = es_includes(es_toLower(term), es_toLower(label));
80800
+ var isValidItem = function isValidItem(item) {
80801
+ return es_includes(es_toLower(term), es_toLower(item));
80802
+ };
80802
80803
 
80803
80804
  var result = [];
80804
80805
 
80805
- if (isValidItem) {
80806
+ if (isValidItem(label)) {
80806
80807
  var highlightedLabel = highlightLabel(label);
80807
80808
  var parents = findParents(item);
80808
80809
  result = [].concat(parents, [withSpotlight_extends({}, item, { highlightedLabel: highlightedLabel })]);
80809
80810
 
80810
80811
  if (displayChildren) {
80811
80812
  var children = utils_getDescendants(utils_getHierarchicalId(item), groupedItemsByParentId);
80812
- return [].concat(parents, [withSpotlight_extends({}, item, { highlightedLabel: highlightedLabel })], children);
80813
+ var highlightedChildren = es_map(function (child) {
80814
+ var labelChild = labelRenderer(child);
80815
+ return isValidItem(labelChild) ? withSpotlight_extends({}, child, { highlightedLabel: highlightLabel(labelChild) }) : child;
80816
+ })(children);
80817
+ return [].concat(parents, [withSpotlight_extends({}, item, { highlightedLabel: highlightedLabel })], highlightedChildren);
80813
80818
  }
80814
80819
  }
80815
80820