@sis-cc/dotstatsuite-visions 10.23.0 → 10.24.1
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/es/AdvancedFilterDialog/AdvancedFilterDialog.js +20 -4
- package/es/HierarchicalFilter/HierarchicalFilter.js +9 -2
- package/lib/AdvancedFilterDialog/AdvancedFilterDialog.js +20 -4
- package/lib/HierarchicalFilter/HierarchicalFilter.js +9 -2
- package/package.json +1 -1
- package/umd/@sis-cc/dotstatsuite-visions.js +31 -8
- package/umd/@sis-cc/dotstatsuite-visions.min.js +3 -3
- package/umd/@sis-cc/dotstatsuite-visions.min.js.map +1 -1
|
@@ -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);
|
|
@@ -258,17 +266,21 @@ var AdvancedFilterDialog = function AdvancedFilterDialog(props) {
|
|
|
258
266
|
setSpotlight({ term: '' });
|
|
259
267
|
};
|
|
260
268
|
var rejectonlyDisabledItems = function rejectonlyDisabledItems(item) {
|
|
261
|
-
return
|
|
269
|
+
return _disableAccessor(item);
|
|
262
270
|
};
|
|
263
271
|
var getSelectedItems = function getSelectedItems(item) {
|
|
264
272
|
return R.propOr(false, 'isSelected')(item);
|
|
265
273
|
};
|
|
266
274
|
|
|
267
275
|
var selectAll = function selectAll() {
|
|
276
|
+
var imposedIds = R.reduce(function (acc, item) {
|
|
277
|
+
return R.uniq(R.concat(R.propOr([], 'imposedIds', item), acc));
|
|
278
|
+
}, [])(items);
|
|
268
279
|
var ids = R.pluck('id', R.reject(getSelectedItems, R.reject(rejectonlyDisabledItems, items)));
|
|
280
|
+
var allIds = R.concat(imposedIds, ids);
|
|
269
281
|
var nextSelection = R.reduce(function (acc, id) {
|
|
270
282
|
return R.has(id, acc) ? acc : R.assoc(id, id, acc);
|
|
271
|
-
}, {},
|
|
283
|
+
}, {}, allIds);
|
|
272
284
|
setSelectionMode('selectAll');
|
|
273
285
|
setSelection(nextSelection);
|
|
274
286
|
};
|
|
@@ -371,7 +383,11 @@ var AdvancedFilterDialog = function AdvancedFilterDialog(props) {
|
|
|
371
383
|
)
|
|
372
384
|
)
|
|
373
385
|
);
|
|
374
|
-
}, selectionOptions)
|
|
386
|
+
}, selectionOptions)
|
|
387
|
+
),
|
|
388
|
+
React.createElement(
|
|
389
|
+
'div',
|
|
390
|
+
null,
|
|
375
391
|
onClose && React.createElement(
|
|
376
392
|
IconButton,
|
|
377
393
|
{
|
|
@@ -398,7 +414,7 @@ var AdvancedFilterDialog = function AdvancedFilterDialog(props) {
|
|
|
398
414
|
{ className: isNarrow ? classes.narrowSpotlight : classes.spotlight },
|
|
399
415
|
React.createElement(Spotlight, {
|
|
400
416
|
hasClearAll: true,
|
|
401
|
-
placeholder: R.prop('placeholder', labels),
|
|
417
|
+
placeholder: getTotal(items, R.prop('placeholder', labels)),
|
|
402
418
|
term: spotlight.term,
|
|
403
419
|
hasCommit: false,
|
|
404
420
|
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: {} },
|
|
@@ -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);
|
|
@@ -328,17 +336,21 @@ var AdvancedFilterDialog = function AdvancedFilterDialog(props) {
|
|
|
328
336
|
setSpotlight({ term: '' });
|
|
329
337
|
};
|
|
330
338
|
var rejectonlyDisabledItems = function rejectonlyDisabledItems(item) {
|
|
331
|
-
return
|
|
339
|
+
return _disableAccessor(item);
|
|
332
340
|
};
|
|
333
341
|
var getSelectedItems = function getSelectedItems(item) {
|
|
334
342
|
return R.propOr(false, 'isSelected')(item);
|
|
335
343
|
};
|
|
336
344
|
|
|
337
345
|
var selectAll = function selectAll() {
|
|
346
|
+
var imposedIds = R.reduce(function (acc, item) {
|
|
347
|
+
return R.uniq(R.concat(R.propOr([], 'imposedIds', item), acc));
|
|
348
|
+
}, [])(items);
|
|
338
349
|
var ids = R.pluck('id', R.reject(getSelectedItems, R.reject(rejectonlyDisabledItems, items)));
|
|
350
|
+
var allIds = R.concat(imposedIds, ids);
|
|
339
351
|
var nextSelection = R.reduce(function (acc, id) {
|
|
340
352
|
return R.has(id, acc) ? acc : R.assoc(id, id, acc);
|
|
341
|
-
}, {},
|
|
353
|
+
}, {}, allIds);
|
|
342
354
|
setSelectionMode('selectAll');
|
|
343
355
|
setSelection(nextSelection);
|
|
344
356
|
};
|
|
@@ -441,7 +453,11 @@ var AdvancedFilterDialog = function AdvancedFilterDialog(props) {
|
|
|
441
453
|
)
|
|
442
454
|
)
|
|
443
455
|
);
|
|
444
|
-
}, selectionOptions)
|
|
456
|
+
}, selectionOptions)
|
|
457
|
+
),
|
|
458
|
+
_react2.default.createElement(
|
|
459
|
+
'div',
|
|
460
|
+
null,
|
|
445
461
|
onClose && _react2.default.createElement(
|
|
446
462
|
_Button2.default,
|
|
447
463
|
{
|
|
@@ -468,7 +484,7 @@ var AdvancedFilterDialog = function AdvancedFilterDialog(props) {
|
|
|
468
484
|
{ className: isNarrow ? classes.narrowSpotlight : classes.spotlight },
|
|
469
485
|
_react2.default.createElement(_.Spotlight, {
|
|
470
486
|
hasClearAll: true,
|
|
471
|
-
placeholder: R.prop('placeholder', labels),
|
|
487
|
+
placeholder: getTotal(items, R.prop('placeholder', labels)),
|
|
472
488
|
term: spotlight.term,
|
|
473
489
|
hasCommit: false,
|
|
474
490
|
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: {} },
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @sis-cc/dotstatsuite-visions v10.
|
|
2
|
+
* @sis-cc/dotstatsuite-visions v10.24.1 - 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.
|
|
6700
|
+
module.exports = {"name":"@sis-cc/dotstatsuite-visions","version":"10.24.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"}};
|
|
6701
6701
|
|
|
6702
6702
|
/***/ }),
|
|
6703
6703
|
/* 120 */
|
|
@@ -72105,6 +72105,14 @@ var AdvancedFilterDialog_AdvancedFilterDialog = function AdvancedFilterDialog(pr
|
|
|
72105
72105
|
height = _useState3[0],
|
|
72106
72106
|
setHeight = _useState3[1];
|
|
72107
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
|
+
};
|
|
72108
72116
|
var measureRef = react_default.a.useCallback(function (node) {
|
|
72109
72117
|
if (node !== null) {
|
|
72110
72118
|
setHeight(node.getBoundingClientRect().height * 75 / 100);
|
|
@@ -72175,17 +72183,21 @@ var AdvancedFilterDialog_AdvancedFilterDialog = function AdvancedFilterDialog(pr
|
|
|
72175
72183
|
setSpotlight({ term: '' });
|
|
72176
72184
|
};
|
|
72177
72185
|
var rejectonlyDisabledItems = function rejectonlyDisabledItems(item) {
|
|
72178
|
-
return
|
|
72186
|
+
return _disableAccessor(item);
|
|
72179
72187
|
};
|
|
72180
72188
|
var getSelectedItems = function getSelectedItems(item) {
|
|
72181
72189
|
return es_propOr(false, 'isSelected')(item);
|
|
72182
72190
|
};
|
|
72183
72191
|
|
|
72184
72192
|
var selectAll = function selectAll() {
|
|
72193
|
+
var imposedIds = es_reduce(function (acc, item) {
|
|
72194
|
+
return es_uniq(es_concat(es_propOr([], 'imposedIds', item), acc));
|
|
72195
|
+
}, [])(items);
|
|
72185
72196
|
var ids = es_pluck('id', es_reject(getSelectedItems, es_reject(rejectonlyDisabledItems, items)));
|
|
72197
|
+
var allIds = es_concat(imposedIds, ids);
|
|
72186
72198
|
var nextSelection = es_reduce(function (acc, id) {
|
|
72187
72199
|
return es_has(id, acc) ? acc : es_assoc(id, id, acc);
|
|
72188
|
-
}, {},
|
|
72200
|
+
}, {}, allIds);
|
|
72189
72201
|
setSelectionMode('selectAll');
|
|
72190
72202
|
setSelection(nextSelection);
|
|
72191
72203
|
};
|
|
@@ -72288,7 +72300,11 @@ var AdvancedFilterDialog_AdvancedFilterDialog = function AdvancedFilterDialog(pr
|
|
|
72288
72300
|
)
|
|
72289
72301
|
)
|
|
72290
72302
|
);
|
|
72291
|
-
}, selectionOptions)
|
|
72303
|
+
}, selectionOptions)
|
|
72304
|
+
),
|
|
72305
|
+
react_default.a.createElement(
|
|
72306
|
+
'div',
|
|
72307
|
+
null,
|
|
72292
72308
|
onClose && react_default.a.createElement(
|
|
72293
72309
|
esm_Button_Button,
|
|
72294
72310
|
{
|
|
@@ -72315,7 +72331,7 @@ var AdvancedFilterDialog_AdvancedFilterDialog = function AdvancedFilterDialog(pr
|
|
|
72315
72331
|
{ className: isNarrow ? classes.narrowSpotlight : classes.spotlight },
|
|
72316
72332
|
react_default.a.createElement(src_Spotlight_Spotlight, {
|
|
72317
72333
|
hasClearAll: true,
|
|
72318
|
-
placeholder: es_prop('placeholder', labels),
|
|
72334
|
+
placeholder: getTotal(items, es_prop('placeholder', labels)),
|
|
72319
72335
|
term: spotlight.term,
|
|
72320
72336
|
hasCommit: false,
|
|
72321
72337
|
spotlight: { fields: {} },
|
|
@@ -72497,7 +72513,14 @@ var HierarchicalFilter_getCounter = function getCounter(items, disableAccessor,
|
|
|
72497
72513
|
}
|
|
72498
72514
|
return count + '/' + total;
|
|
72499
72515
|
};
|
|
72500
|
-
|
|
72516
|
+
var HierarchicalFilter_getTotal = function getTotal(items, spotlightAcc) {
|
|
72517
|
+
var itemsIds = es_pluck('id', items);
|
|
72518
|
+
var total = pipe(es_uniq, es_length)(itemsIds);
|
|
72519
|
+
if (es_is(Function, spotlightAcc)) {
|
|
72520
|
+
return spotlightAcc(total);
|
|
72521
|
+
}
|
|
72522
|
+
return total;
|
|
72523
|
+
};
|
|
72501
72524
|
var HierarchicalFilter_HierarchicalFilter = function HierarchicalFilter(props) {
|
|
72502
72525
|
var id = props.id,
|
|
72503
72526
|
items = props.items,
|
|
@@ -72566,7 +72589,7 @@ var HierarchicalFilter_HierarchicalFilter = function HierarchicalFilter(props) {
|
|
|
72566
72589
|
className: { container: classes.middle },
|
|
72567
72590
|
fullWidth: true,
|
|
72568
72591
|
hasClearAll: true,
|
|
72569
|
-
placeholder: es_prop('placeholder', labels),
|
|
72592
|
+
placeholder: HierarchicalFilter_getTotal(items, es_prop('placeholder', labels)),
|
|
72570
72593
|
term: spotlight.term,
|
|
72571
72594
|
hasCommit: false,
|
|
72572
72595
|
spotlight: { fields: {} },
|