@sis-cc/dotstatsuite-visions 10.22.1 → 10.24.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.
@@ -188,6 +188,14 @@ var AdvancedFilterDialog = function AdvancedFilterDialog(props) {
188
188
  height = _useState3[0],
189
189
  setHeight = _useState3[1];
190
190
 
191
+ var getTotal = function getTotal(items, spotlightAcc) {
192
+ var itemsIds = R.pluck('id', items);
193
+ var total = R.pipe(R.uniq, R.length)(itemsIds);
194
+ if (R.is(Function, spotlightAcc)) {
195
+ return spotlightAcc(total);
196
+ }
197
+ return total;
198
+ };
191
199
  var measureRef = React.useCallback(function (node) {
192
200
  if (node !== null) {
193
201
  setHeight(node.getBoundingClientRect().height * 75 / 100);
@@ -398,7 +406,7 @@ var AdvancedFilterDialog = function AdvancedFilterDialog(props) {
398
406
  { className: isNarrow ? classes.narrowSpotlight : classes.spotlight },
399
407
  React.createElement(Spotlight, {
400
408
  hasClearAll: true,
401
- placeholder: R.prop('placeholder', labels),
409
+ placeholder: getTotal(items, R.prop('placeholder', labels)),
402
410
  term: spotlight.term,
403
411
  hasCommit: false,
404
412
  spotlight: { fields: {} },
@@ -28,7 +28,14 @@ var getCounter = function getCounter(items, disableAccessor, tagAccessor) {
28
28
  }
29
29
  return count + '/' + total;
30
30
  };
31
-
31
+ var getTotal = function getTotal(items, spotlightAcc) {
32
+ var itemsIds = R.pluck('id', items);
33
+ var total = R.pipe(R.uniq, R.length)(itemsIds);
34
+ if (R.is(Function, spotlightAcc)) {
35
+ return spotlightAcc(total);
36
+ }
37
+ return total;
38
+ };
32
39
  var HierarchicalFilter = function HierarchicalFilter(props) {
33
40
  var id = props.id,
34
41
  items = props.items,
@@ -97,7 +104,7 @@ var HierarchicalFilter = function HierarchicalFilter(props) {
97
104
  className: { container: classes.middle },
98
105
  fullWidth: true,
99
106
  hasClearAll: true,
100
- placeholder: R.prop('placeholder', labels),
107
+ placeholder: getTotal(items, R.prop('placeholder', labels)),
101
108
  term: spotlight.term,
102
109
  hasCommit: false,
103
110
  spotlight: { fields: {} },
@@ -288,17 +288,18 @@ var VirtualizedTree = function VirtualizedTree(props) {
288
288
  },
289
289
  React.createElement(
290
290
  AutoSizer,
291
- null,
291
+ { disableWidth: true },
292
292
  function (_ref) {
293
- var height = _ref.height,
294
- width = _ref.width;
293
+ var height = _ref.height;
295
294
  return React.createElement(VirtualizedList, {
296
295
  containerRole: 'list',
297
296
  role: 'presentation',
298
297
  overscan: 10,
299
298
  tabIndex: -1,
299
+ containerStyle: { width: '100%', maxWidth: '100%' },
300
300
  height: height + 2,
301
- width: width,
301
+ width: 1,
302
+ style: { width: '100%' },
302
303
  scrollTop: scrollTop // control scroll position with ctrl or shift key
303
304
  , rowCount: R.length(list),
304
305
  rowHeight: R.add(1)(rowHeight) // 1 is space between elements
@@ -258,6 +258,14 @@ var AdvancedFilterDialog = function AdvancedFilterDialog(props) {
258
258
  height = _useState3[0],
259
259
  setHeight = _useState3[1];
260
260
 
261
+ var getTotal = function getTotal(items, spotlightAcc) {
262
+ var itemsIds = R.pluck('id', items);
263
+ var total = R.pipe(R.uniq, R.length)(itemsIds);
264
+ if (R.is(Function, spotlightAcc)) {
265
+ return spotlightAcc(total);
266
+ }
267
+ return total;
268
+ };
261
269
  var measureRef = _react2.default.useCallback(function (node) {
262
270
  if (node !== null) {
263
271
  setHeight(node.getBoundingClientRect().height * 75 / 100);
@@ -468,7 +476,7 @@ var AdvancedFilterDialog = function AdvancedFilterDialog(props) {
468
476
  { className: isNarrow ? classes.narrowSpotlight : classes.spotlight },
469
477
  _react2.default.createElement(_.Spotlight, {
470
478
  hasClearAll: true,
471
- placeholder: R.prop('placeholder', labels),
479
+ placeholder: getTotal(items, R.prop('placeholder', labels)),
472
480
  term: spotlight.term,
473
481
  hasCommit: false,
474
482
  spotlight: { fields: {} },
@@ -57,7 +57,14 @@ var getCounter = function getCounter(items, disableAccessor, tagAccessor) {
57
57
  }
58
58
  return count + '/' + total;
59
59
  };
60
-
60
+ var getTotal = function getTotal(items, spotlightAcc) {
61
+ var itemsIds = R.pluck('id', items);
62
+ var total = R.pipe(R.uniq, R.length)(itemsIds);
63
+ if (R.is(Function, spotlightAcc)) {
64
+ return spotlightAcc(total);
65
+ }
66
+ return total;
67
+ };
61
68
  var HierarchicalFilter = function HierarchicalFilter(props) {
62
69
  var id = props.id,
63
70
  items = props.items,
@@ -126,7 +133,7 @@ var HierarchicalFilter = function HierarchicalFilter(props) {
126
133
  className: { container: classes.middle },
127
134
  fullWidth: true,
128
135
  hasClearAll: true,
129
- placeholder: R.prop('placeholder', labels),
136
+ placeholder: getTotal(items, R.prop('placeholder', labels)),
130
137
  term: spotlight.term,
131
138
  hasCommit: false,
132
139
  spotlight: { fields: {} },
@@ -324,17 +324,18 @@ var VirtualizedTree = function VirtualizedTree(props) {
324
324
  },
325
325
  _react2.default.createElement(
326
326
  _AutoSizer2.default,
327
- null,
327
+ { disableWidth: true },
328
328
  function (_ref) {
329
- var height = _ref.height,
330
- width = _ref.width;
329
+ var height = _ref.height;
331
330
  return _react2.default.createElement(_List2.default, {
332
331
  containerRole: 'list',
333
332
  role: 'presentation',
334
333
  overscan: 10,
335
334
  tabIndex: -1,
335
+ containerStyle: { width: '100%', maxWidth: '100%' },
336
336
  height: height + 2,
337
- width: width,
337
+ width: 1,
338
+ style: { width: '100%' },
338
339
  scrollTop: scrollTop // control scroll position with ctrl or shift key
339
340
  , rowCount: R.length(list),
340
341
  rowHeight: R.add(1)(_styles.height) // 1 is space between elements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-visions",
3
- "version": "10.22.1",
3
+ "version": "10.24.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 v10.22.1 - https://visions-qa.siscc.org/#o
2
+ * @sis-cc/dotstatsuite-visions v10.24.0 - https://visions-qa.siscc.org/#o
3
3
  * MIT Licensed
4
4
  */
5
5
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -6697,7 +6697,7 @@ function removeClassName(el
6697
6697
  /* 119 */
6698
6698
  /***/ (function(module) {
6699
6699
 
6700
- module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"10.22.1","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"}};
6700
+ module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"10.24.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"}};
6701
6701
 
6702
6702
  /***/ }),
6703
6703
  /* 120 */
@@ -71493,17 +71493,18 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
71493
71493
  },
71494
71494
  react_default.a.createElement(
71495
71495
  AutoSizer_default.a,
71496
- null,
71496
+ { disableWidth: true },
71497
71497
  function (_ref) {
71498
- var height = _ref.height,
71499
- width = _ref.width;
71498
+ var height = _ref.height;
71500
71499
  return react_default.a.createElement(List_default.a, {
71501
71500
  containerRole: 'list',
71502
71501
  role: 'presentation',
71503
71502
  overscan: 10,
71504
71503
  tabIndex: -1,
71504
+ containerStyle: { width: '100%', maxWidth: '100%' },
71505
71505
  height: height + 2,
71506
- width: width,
71506
+ width: 1,
71507
+ style: { width: '100%' },
71507
71508
  scrollTop: scrollTop // control scroll position with ctrl or shift key
71508
71509
  , rowCount: es_length(list),
71509
71510
  rowHeight: es_add(1)(styles_height) // 1 is space between elements
@@ -72104,6 +72105,14 @@ var AdvancedFilterDialog_AdvancedFilterDialog = function AdvancedFilterDialog(pr
72104
72105
  height = _useState3[0],
72105
72106
  setHeight = _useState3[1];
72106
72107
 
72108
+ var getTotal = function getTotal(items, spotlightAcc) {
72109
+ var itemsIds = es_pluck('id', items);
72110
+ var total = pipe(es_uniq, es_length)(itemsIds);
72111
+ if (es_is(Function, spotlightAcc)) {
72112
+ return spotlightAcc(total);
72113
+ }
72114
+ return total;
72115
+ };
72107
72116
  var measureRef = react_default.a.useCallback(function (node) {
72108
72117
  if (node !== null) {
72109
72118
  setHeight(node.getBoundingClientRect().height * 75 / 100);
@@ -72314,7 +72323,7 @@ var AdvancedFilterDialog_AdvancedFilterDialog = function AdvancedFilterDialog(pr
72314
72323
  { className: isNarrow ? classes.narrowSpotlight : classes.spotlight },
72315
72324
  react_default.a.createElement(src_Spotlight_Spotlight, {
72316
72325
  hasClearAll: true,
72317
- placeholder: es_prop('placeholder', labels),
72326
+ placeholder: getTotal(items, es_prop('placeholder', labels)),
72318
72327
  term: spotlight.term,
72319
72328
  hasCommit: false,
72320
72329
  spotlight: { fields: {} },
@@ -72496,7 +72505,14 @@ var HierarchicalFilter_getCounter = function getCounter(items, disableAccessor,
72496
72505
  }
72497
72506
  return count + '/' + total;
72498
72507
  };
72499
-
72508
+ var HierarchicalFilter_getTotal = function getTotal(items, spotlightAcc) {
72509
+ var itemsIds = es_pluck('id', items);
72510
+ var total = pipe(es_uniq, es_length)(itemsIds);
72511
+ if (es_is(Function, spotlightAcc)) {
72512
+ return spotlightAcc(total);
72513
+ }
72514
+ return total;
72515
+ };
72500
72516
  var HierarchicalFilter_HierarchicalFilter = function HierarchicalFilter(props) {
72501
72517
  var id = props.id,
72502
72518
  items = props.items,
@@ -72565,7 +72581,7 @@ var HierarchicalFilter_HierarchicalFilter = function HierarchicalFilter(props) {
72565
72581
  className: { container: classes.middle },
72566
72582
  fullWidth: true,
72567
72583
  hasClearAll: true,
72568
- placeholder: es_prop('placeholder', labels),
72584
+ placeholder: HierarchicalFilter_getTotal(items, es_prop('placeholder', labels)),
72569
72585
  term: spotlight.term,
72570
72586
  hasCommit: false,
72571
72587
  spotlight: { fields: {} },