@sis-cc/dotstatsuite-visions 10.8.0 → 10.10.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.
- package/es/Chips/CustomChip.js +5 -3
- package/es/Chips/GroupedChips.js +3 -1
- package/es/HierarchicalFilter/HierarchicalFilter.js +7 -3
- package/es/TableHtml5/TableHtml5.js +11 -6
- package/es/TableHtml5/header.js +3 -3
- package/es/TableHtml5/section.js +9 -7
- package/es/VirtualizedTree/Item.js +13 -17
- package/es/VirtualizedTree/VirtualizedTree.js +41 -32
- package/lib/Chips/CustomChip.js +5 -3
- package/lib/Chips/GroupedChips.js +3 -1
- package/lib/HierarchicalFilter/HierarchicalFilter.js +7 -3
- package/lib/TableHtml5/TableHtml5.js +11 -6
- package/lib/TableHtml5/header.js +3 -3
- package/lib/TableHtml5/section.js +9 -7
- package/lib/VirtualizedTree/Item.js +13 -17
- package/lib/VirtualizedTree/VirtualizedTree.js +41 -32
- package/package.json +1 -1
- package/umd/@sis-cc/dotstatsuite-visions.js +127 -107
- package/umd/@sis-cc/dotstatsuite-visions.min.js +3 -3
- package/umd/@sis-cc/dotstatsuite-visions.min.js.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @sis-cc/dotstatsuite-visions v10.
|
|
2
|
+
* @sis-cc/dotstatsuite-visions v10.10.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.10.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 */
|
|
@@ -40415,6 +40415,37 @@ _curry2(function gte(a, b) {
|
|
|
40415
40415
|
}
|
|
40416
40416
|
};
|
|
40417
40417
|
});
|
|
40418
|
+
// CONCATENATED MODULE: ./node_modules/ramda/es/append.js
|
|
40419
|
+
|
|
40420
|
+
|
|
40421
|
+
/**
|
|
40422
|
+
* Returns a new list containing the contents of the given list, followed by
|
|
40423
|
+
* the given element.
|
|
40424
|
+
*
|
|
40425
|
+
* @func
|
|
40426
|
+
* @memberOf R
|
|
40427
|
+
* @since v0.1.0
|
|
40428
|
+
* @category List
|
|
40429
|
+
* @sig a -> [a] -> [a]
|
|
40430
|
+
* @param {*} el The element to add to the end of the new list.
|
|
40431
|
+
* @param {Array} list The list of elements to add a new item to.
|
|
40432
|
+
* list.
|
|
40433
|
+
* @return {Array} A new list containing the elements of the old list followed by `el`.
|
|
40434
|
+
* @see R.prepend
|
|
40435
|
+
* @example
|
|
40436
|
+
*
|
|
40437
|
+
* R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests']
|
|
40438
|
+
* R.append('tests', []); //=> ['tests']
|
|
40439
|
+
* R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']]
|
|
40440
|
+
*/
|
|
40441
|
+
|
|
40442
|
+
var append_append =
|
|
40443
|
+
/*#__PURE__*/
|
|
40444
|
+
_curry2(function append(el, list) {
|
|
40445
|
+
return _concat(list, [el]);
|
|
40446
|
+
});
|
|
40447
|
+
|
|
40448
|
+
/* harmony default export */ var es_append = (append_append);
|
|
40418
40449
|
// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/svg-icons/Cancel.js
|
|
40419
40450
|
|
|
40420
40451
|
|
|
@@ -42154,14 +42185,15 @@ var CustomChip_CustomChip = function CustomChip(_ref) {
|
|
|
42154
42185
|
_ref$testId = _ref.testId,
|
|
42155
42186
|
testId = _ref$testId === undefined ? 'deleteChip-test-id' : _ref$testId,
|
|
42156
42187
|
_ref$labelRenderer = _ref.labelRenderer,
|
|
42157
|
-
labelRenderer = _ref$labelRenderer === undefined ? es_prop('label') : _ref$labelRenderer
|
|
42188
|
+
labelRenderer = _ref$labelRenderer === undefined ? es_prop('label') : _ref$labelRenderer,
|
|
42189
|
+
deprecated = _ref.deprecated;
|
|
42158
42190
|
|
|
42159
42191
|
var theme = useTheme_useTheme();
|
|
42160
42192
|
var isRtl = utils_getIsRtl(theme);
|
|
42161
42193
|
var classes = CustomChip_useStyles();
|
|
42162
42194
|
var mapIndexed = es_addIndex(es_map);
|
|
42163
42195
|
var onChange = es_is(Function)(onDelete) ? function () {
|
|
42164
|
-
return onDelete(parentId, es_isNil(id) ? [] : [
|
|
42196
|
+
return onDelete(parentId, es_isNil(id) ? [] : es_append(id, deprecated || []));
|
|
42165
42197
|
} : null;
|
|
42166
42198
|
var hasTooltip = shownTooltip(items);
|
|
42167
42199
|
var hasMultiLinedTooltip = showMultiLinedTooltip(items);
|
|
@@ -42228,7 +42260,8 @@ CustomChip_CustomChip.propTypes = {
|
|
|
42228
42260
|
labelClasses: prop_types_default.a.string,
|
|
42229
42261
|
ariaLabel: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.element]),
|
|
42230
42262
|
items: prop_types_default.a.array,
|
|
42231
|
-
labelRenderer: prop_types_default.a.func
|
|
42263
|
+
labelRenderer: prop_types_default.a.func,
|
|
42264
|
+
deprecated: prop_types_default.a.array
|
|
42232
42265
|
};
|
|
42233
42266
|
|
|
42234
42267
|
/* harmony default export */ var Chips_CustomChip = (CustomChip_CustomChip);
|
|
@@ -42290,10 +42323,12 @@ var GroupedChips_GroupedChips = function GroupedChips(_ref) {
|
|
|
42290
42323
|
}) : es_map(function (items) {
|
|
42291
42324
|
var lastItem = es_last(items);
|
|
42292
42325
|
var id = lastItem.id,
|
|
42293
|
-
isNotRemovable = lastItem.isNotRemovable
|
|
42326
|
+
isNotRemovable = lastItem.isNotRemovable,
|
|
42327
|
+
deprecated = lastItem.deprecated;
|
|
42294
42328
|
|
|
42295
42329
|
|
|
42296
42330
|
return react_default.a.createElement(Chips_CustomChip, {
|
|
42331
|
+
deprecated: deprecated,
|
|
42297
42332
|
key: id,
|
|
42298
42333
|
id: id,
|
|
42299
42334
|
items: pipe(es_length, es_gte(2)) ? items : null,
|
|
@@ -50119,7 +50154,7 @@ _curry1(function lensIndex(n) {
|
|
|
50119
50154
|
* const greet = R.replace('{name}', R.__, 'Hello, {name}!');
|
|
50120
50155
|
* greet('Alice'); //=> 'Hello, Alice!'
|
|
50121
50156
|
*/
|
|
50122
|
-
/* harmony default export */ var
|
|
50157
|
+
/* harmony default export */ var es_ = ({
|
|
50123
50158
|
'@@functional/placeholder': true
|
|
50124
50159
|
});
|
|
50125
50160
|
// CONCATENATED MODULE: ./node_modules/ramda/es/times.js
|
|
@@ -50855,37 +50890,6 @@ var includes =
|
|
|
50855
50890
|
_curry2(_includes);
|
|
50856
50891
|
|
|
50857
50892
|
/* harmony default export */ var es_includes = (includes);
|
|
50858
|
-
// CONCATENATED MODULE: ./node_modules/ramda/es/append.js
|
|
50859
|
-
|
|
50860
|
-
|
|
50861
|
-
/**
|
|
50862
|
-
* Returns a new list containing the contents of the given list, followed by
|
|
50863
|
-
* the given element.
|
|
50864
|
-
*
|
|
50865
|
-
* @func
|
|
50866
|
-
* @memberOf R
|
|
50867
|
-
* @since v0.1.0
|
|
50868
|
-
* @category List
|
|
50869
|
-
* @sig a -> [a] -> [a]
|
|
50870
|
-
* @param {*} el The element to add to the end of the new list.
|
|
50871
|
-
* @param {Array} list The list of elements to add a new item to.
|
|
50872
|
-
* list.
|
|
50873
|
-
* @return {Array} A new list containing the elements of the old list followed by `el`.
|
|
50874
|
-
* @see R.prepend
|
|
50875
|
-
* @example
|
|
50876
|
-
*
|
|
50877
|
-
* R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests']
|
|
50878
|
-
* R.append('tests', []); //=> ['tests']
|
|
50879
|
-
* R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']]
|
|
50880
|
-
*/
|
|
50881
|
-
|
|
50882
|
-
var append_append =
|
|
50883
|
-
/*#__PURE__*/
|
|
50884
|
-
_curry2(function append(el, list) {
|
|
50885
|
-
return _concat(list, [el]);
|
|
50886
|
-
});
|
|
50887
|
-
|
|
50888
|
-
/* harmony default export */ var es_append = (append_append);
|
|
50889
50893
|
// CONCATENATED MODULE: ./node_modules/ramda/es/zip.js
|
|
50890
50894
|
|
|
50891
50895
|
/**
|
|
@@ -51446,7 +51450,7 @@ var PeriodPicker_Period = function Period(_ref) {
|
|
|
51446
51450
|
var fn = es_prop(getter)({ start: es_head, end: es_last });
|
|
51447
51451
|
var lensIndex = es_prop(getter)({ start: es_lensIndex(0), end: es_lensIndex(1) });
|
|
51448
51452
|
var dateValue = getPeriodValue(fn(destructuringDates));
|
|
51449
|
-
var selectedValue = es_ifElse(isValidNumber, es_assoc(id,
|
|
51453
|
+
var selectedValue = es_ifElse(isValidNumber, es_assoc(id, es_, {}), es_always(undefined))(Number(value));
|
|
51450
51454
|
var newDate = lib_getDate(frequency, dateValue, selectedValue, getter === 'end');
|
|
51451
51455
|
if (es_is(Function, changePeriod)) {
|
|
51452
51456
|
return changePeriod(pipe(es_set(lensIndex, newDate), function (_ref2) {
|
|
@@ -53722,7 +53726,7 @@ var header_Header = function Header(_ref) {
|
|
|
53722
53726
|
react_default.a.createElement(
|
|
53723
53727
|
esm_Typography_Typography,
|
|
53724
53728
|
{ variant: 'body1', className: classes.cellLabelHeader },
|
|
53725
|
-
pipe(es_path([
|
|
53729
|
+
pipe(es_path([-1, 'data', index, 'dimension']), labelAccessor)(headerData),
|
|
53726
53730
|
react_default.a.createElement(TableHtml5_flags, {
|
|
53727
53731
|
HTMLRenderer: HTMLRenderer,
|
|
53728
53732
|
flags: flags,
|
|
@@ -53735,7 +53739,7 @@ var header_Header = function Header(_ref) {
|
|
|
53735
53739
|
header_mapIndexed(function (headerItem, idx) {
|
|
53736
53740
|
var _cx;
|
|
53737
53741
|
|
|
53738
|
-
var value = TableHtml5_utils_getValue(labelAccessor)(headerItem);
|
|
53742
|
+
var value = headerItem.isEmpty ? { label: '' } : TableHtml5_utils_getValue(labelAccessor)(headerItem);
|
|
53739
53743
|
var flags = es_propOr([], 'flags', value);
|
|
53740
53744
|
var hierarchySpace = pipe(es_propOr([], 'parents'), es_length, es_times(function () {
|
|
53741
53745
|
return '·';
|
|
@@ -53783,7 +53787,7 @@ var header_Header = function Header(_ref) {
|
|
|
53783
53787
|
);
|
|
53784
53788
|
}, es_nth(index, valuesHeaderData))
|
|
53785
53789
|
);
|
|
53786
|
-
}, compose(es_length, es_pathOr([], [
|
|
53790
|
+
}, compose(es_length, es_pathOr([], [-1, 'data']))(headerData));
|
|
53787
53791
|
};
|
|
53788
53792
|
|
|
53789
53793
|
header_Header.propTypes = {
|
|
@@ -54397,7 +54401,7 @@ var section_Section = function Section(_ref) {
|
|
|
54397
54401
|
HTMLRenderer: HTMLRenderer,
|
|
54398
54402
|
labelAccessor: labelAccessor
|
|
54399
54403
|
}),
|
|
54400
|
-
|
|
54404
|
+
section_mapIndexed(function (sectionbody, rowIndex) {
|
|
54401
54405
|
var _cx2;
|
|
54402
54406
|
|
|
54403
54407
|
var rowId = sectionbody.key + '_' + sectionIndex + '_' + rowIndex;
|
|
@@ -54407,11 +54411,12 @@ var section_Section = function Section(_ref) {
|
|
|
54407
54411
|
return react_default.a.createElement(
|
|
54408
54412
|
esm_TableRow_TableRow,
|
|
54409
54413
|
{ key: rowId },
|
|
54410
|
-
|
|
54414
|
+
es_times(function (index) {
|
|
54411
54415
|
var _cx;
|
|
54412
54416
|
|
|
54413
|
-
var
|
|
54414
|
-
var
|
|
54417
|
+
var cell = es_path(['data', index], sectionbody);
|
|
54418
|
+
var value = es_isNil(cell) ? { label: '' } : TableHtml5_utils_getValue(labelAccessor)(cell);
|
|
54419
|
+
var flags = es_propOr([], 'flags', value);
|
|
54415
54420
|
var id = rowIndex + '_' + rowId + '_' + index;
|
|
54416
54421
|
|
|
54417
54422
|
// special space is used for hierarchy U+2007    
|
|
@@ -54425,7 +54430,7 @@ var section_Section = function Section(_ref) {
|
|
|
54425
54430
|
esm_TableCell_TableCell,
|
|
54426
54431
|
{
|
|
54427
54432
|
key: id,
|
|
54428
|
-
className: classnames_default()(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.highlight] = es_prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = es_is(Function, isNoWrap) && isNoWrap(
|
|
54433
|
+
className: classnames_default()(classes.rowTitle, classes.stickyHeader, (_cx = {}, _cx[classes.highlight] = es_prop(rowId)(activeCellIds), _cx[classes.timePeriodCells] = es_is(Function, isNoWrap) && isNoWrap(es_propOr({}, 'dimension', cell)), _cx)),
|
|
54429
54434
|
id: id,
|
|
54430
54435
|
headers: 'subHeader_' + index + ' ' + currentSection,
|
|
54431
54436
|
component: 'th',
|
|
@@ -54451,7 +54456,7 @@ var section_Section = function Section(_ref) {
|
|
|
54451
54456
|
)
|
|
54452
54457
|
)
|
|
54453
54458
|
);
|
|
54454
|
-
},
|
|
54459
|
+
}, xLayoutDataLength /*R.prop('data', sectionbody)*/),
|
|
54455
54460
|
react_default.a.createElement(
|
|
54456
54461
|
esm_TableCell_TableCell,
|
|
54457
54462
|
{
|
|
@@ -54477,8 +54482,9 @@ var section_Section = function Section(_ref) {
|
|
|
54477
54482
|
|
|
54478
54483
|
var intersectionCellId = rowId + '/' + columnIndex;
|
|
54479
54484
|
var isActive = pipe(es_propOr({}, 'intersectionCellId'), es_equals(intersectionCellId))(activeCellIds);
|
|
54485
|
+
var missingValLabel = item.isEmpty || sectionbody.isEmpty ? '' : '..';
|
|
54480
54486
|
return react_default.a.createElement(TableHtml5_cell, section_extends({}, pipe(es_pathOr({ value: null }, [item.key, currentSection, sectionbody.key, 0]), es_over(es_lensProp('value'), function (val) {
|
|
54481
|
-
return es_isNil(val) ?
|
|
54487
|
+
return es_isNil(val) ? missingValLabel : cellValueAccessor(val);
|
|
54482
54488
|
}))(cells), {
|
|
54483
54489
|
key: intersectionCellId,
|
|
54484
54490
|
headers: rowIds + ' ' + columnIds + ' ' + currentSection,
|
|
@@ -54565,12 +54571,13 @@ var TableHtml5_useStyles = styles_makeStyles(function (theme) {
|
|
|
54565
54571
|
var TableHtml5_mapIndexed = es_addIndex(es_map);
|
|
54566
54572
|
|
|
54567
54573
|
var TableHtml5_getEnhancedValuesHeaderData = function getEnhancedValuesHeaderData(data) {
|
|
54568
|
-
var colLength = pipe(
|
|
54574
|
+
var colLength = pipe(es_last, es_propOr([], 'data'), es_length)(data);
|
|
54569
54575
|
return pipe(es_pluck('data'),
|
|
54570
54576
|
// mix merge and transpose for performance
|
|
54571
54577
|
es_reduce(function (acc, cells) {
|
|
54572
|
-
es_addIndex(es_forEach)(function (
|
|
54573
|
-
var
|
|
54578
|
+
es_addIndex(es_forEach)(function (_, rowIndex) {
|
|
54579
|
+
var cell = es_nth(rowIndex, cells) || {};
|
|
54580
|
+
var cellId = es_has('values', cell) ? pipe(es_prop('values'), es_pluck('id'), es_join(','))(cell) : es_pathOr('missing' + rowIndex, ['value', 'id'], cell);
|
|
54574
54581
|
var topCell = rowIndex > 0 ? pipe(es_nth(rowIndex - 1), es_last)(acc) : null;
|
|
54575
54582
|
var cellKey = es_isNil(topCell) ? cellId : topCell.key + '-' + cellId;
|
|
54576
54583
|
|
|
@@ -54578,9 +54585,13 @@ var TableHtml5_getEnhancedValuesHeaderData = function getEnhancedValuesHeaderDat
|
|
|
54578
54585
|
if (es_prop('key', leftCell) === cellKey && rowIndex !== colLength - 1) {
|
|
54579
54586
|
acc = es_over(es_lensIndex(rowIndex), es_over(es_lensIndex(-1), es_evolve({ spanCount: es_add(1) })))(acc);
|
|
54580
54587
|
} else {
|
|
54581
|
-
acc = es_over(es_lensIndex(rowIndex), es_append(TableHtml5_extends({}, es_pick(['value', 'values'], cell), {
|
|
54588
|
+
acc = es_over(es_lensIndex(rowIndex), es_append(TableHtml5_extends({}, es_pick(['value', 'values'], cell), {
|
|
54589
|
+
key: cellKey,
|
|
54590
|
+
spanCount: 1,
|
|
54591
|
+
isEmpty: es_isEmpty(cell)
|
|
54592
|
+
})))(acc);
|
|
54582
54593
|
}
|
|
54583
|
-
})(
|
|
54594
|
+
})(acc);
|
|
54584
54595
|
return acc;
|
|
54585
54596
|
}, es_times(es_always([]), colLength)))(data);
|
|
54586
54597
|
};
|
|
@@ -54645,7 +54656,7 @@ var TableHtml5_TableHtml5 = function TableHtml5(_ref) {
|
|
|
54645
54656
|
};
|
|
54646
54657
|
}, []);
|
|
54647
54658
|
|
|
54648
|
-
var xLayoutData = es_pathOr([], [0, 1,
|
|
54659
|
+
var xLayoutData = es_pathOr([], [0, 1, -1, 'data'], sectionsData);
|
|
54649
54660
|
var xLayoutDataLength = es_length(xLayoutData);
|
|
54650
54661
|
|
|
54651
54662
|
var _useMemo = Object(react["useMemo"])(function () {
|
|
@@ -70572,19 +70583,17 @@ var VirtualizedTree_Item_Item = function Item(_ref) {
|
|
|
70572
70583
|
style = _ref.style,
|
|
70573
70584
|
isRtl = _ref.isRtl,
|
|
70574
70585
|
accessibility = _ref.accessibility,
|
|
70575
|
-
index = _ref.index,
|
|
70576
70586
|
HTMLRenderer = _ref.HTMLRenderer,
|
|
70577
70587
|
hierarchicalId = _ref.hierarchicalId,
|
|
70578
70588
|
labels = _ref.labels,
|
|
70579
70589
|
_ref$depth = _ref.depth,
|
|
70580
70590
|
depth = _ref$depth === undefined ? 0 : _ref$depth,
|
|
70581
|
-
|
|
70591
|
+
eventsListeners = _ref.eventsListeners;
|
|
70582
70592
|
|
|
70583
70593
|
var _React$useState = react_default.a.useState(false),
|
|
70584
70594
|
isTooltipShown = _React$useState[0],
|
|
70585
70595
|
setIsTooltipShown = _React$useState[1];
|
|
70586
70596
|
|
|
70587
|
-
var callbacks = eventsCallbacks(hierarchicalId || id, index);
|
|
70588
70597
|
var padding = depth * 30 + (depth > 0 && !hasChildrenOnLevel ? 30 : 0) + (!hasChild && hasChildrenOnLevel ? 30 : 0);
|
|
70589
70598
|
return react_default.a.createElement(
|
|
70590
70599
|
esm_ListItem_ListItem,
|
|
@@ -70614,23 +70623,21 @@ var VirtualizedTree_Item_Item = function Item(_ref) {
|
|
|
70614
70623
|
},
|
|
70615
70624
|
react_default.a.createElement(NavigateIcon, null)
|
|
70616
70625
|
),
|
|
70617
|
-
react_default.a.createElement(esm_ListItemText_ListItemText,
|
|
70626
|
+
react_default.a.createElement(esm_ListItemText_ListItemText, {
|
|
70618
70627
|
'data-testid': 'value_' + id,
|
|
70619
70628
|
tabIndex: 0,
|
|
70620
|
-
'aria-label':
|
|
70629
|
+
'aria-label': isGreyed ? es_propOr('', 'disableItemLabel')(labels) + ' ' + label : label,
|
|
70621
70630
|
'aria-pressed': isSelected,
|
|
70622
70631
|
'aria-disabled': isDisabled,
|
|
70623
70632
|
primaryTypographyProps: { noWrap: true, color: 'inherit' },
|
|
70624
70633
|
secondaryTypographyProps: { color: 'inherit' },
|
|
70625
70634
|
classes: { root: classes.listItem },
|
|
70626
|
-
className: classnames_default()((_cx = {}, _cx[classes.accessibilityItemHover] = accessibility, _cx[classes.listItemSelected] = isSelected
|
|
70627
|
-
onClick: isDisabled ? null :
|
|
70628
|
-
onMouseDown: isDisabled || isTooltipShown ? null :
|
|
70629
|
-
|
|
70630
|
-
|
|
70631
|
-
|
|
70632
|
-
title: isDisabled ? es_propOr('', 'disableItemLabel')(labels) + ' ' + label : label,
|
|
70633
|
-
style: { opacity: isDisabled ? '0.5' : '1' },
|
|
70635
|
+
className: classnames_default()((_cx = {}, _cx[classes.accessibilityItemHover] = accessibility, _cx[classes.listItemSelected] = isSelected, _cx[classes.listItemHover] = !isDisabled, _cx)),
|
|
70636
|
+
onClick: isDisabled ? null : eventsListeners.onClick,
|
|
70637
|
+
onMouseDown: isDisabled || isTooltipShown ? null : eventsListeners.onMouseDown,
|
|
70638
|
+
onMouseEnter: isDisabled || isTooltipShown ? null : eventsListeners.onMouseEnter,
|
|
70639
|
+
title: isGreyed ? es_propOr('', 'disableItemLabel')(labels) + ' ' + label : label,
|
|
70640
|
+
style: { opacity: isDisabled && isGreyed ? '0.5' : '1' },
|
|
70634
70641
|
primary: react_default.a.createElement(
|
|
70635
70642
|
'div',
|
|
70636
70643
|
{
|
|
@@ -70641,7 +70648,8 @@ var VirtualizedTree_Item_Item = function Item(_ref) {
|
|
|
70641
70648
|
SvgIcon["a" /* default */],
|
|
70642
70649
|
{
|
|
70643
70650
|
color: 'primary',
|
|
70644
|
-
className: classnames_default()(classes.labelIcon, (_cx3 = {}, _cx3[classes.disabledLabel] = isDisabled, _cx3))
|
|
70651
|
+
className: classnames_default()(classes.labelIcon, (_cx3 = {}, _cx3[classes.disabledLabel] = isDisabled, _cx3)),
|
|
70652
|
+
style: { opacity: isDisabled ? '0.5' : '1' }
|
|
70645
70653
|
},
|
|
70646
70654
|
isSelected ? react_default.a.createElement(CheckBoxOutlined_default.a, null) : react_default.a.createElement(CheckBoxOutlineBlankOutlined_default.a, null)
|
|
70647
70655
|
),
|
|
@@ -70691,7 +70699,7 @@ var VirtualizedTree_Item_Item = function Item(_ref) {
|
|
|
70691
70699
|
')'
|
|
70692
70700
|
)
|
|
70693
70701
|
)
|
|
70694
|
-
})
|
|
70702
|
+
})
|
|
70695
70703
|
);
|
|
70696
70704
|
};
|
|
70697
70705
|
|
|
@@ -70715,13 +70723,12 @@ VirtualizedTree_Item_Item.propTypes = {
|
|
|
70715
70723
|
style: prop_types_default.a.object,
|
|
70716
70724
|
isRtl: prop_types_default.a.bool,
|
|
70717
70725
|
accessibility: prop_types_default.a.bool,
|
|
70718
|
-
index: prop_types_default.a.number,
|
|
70719
70726
|
labelRenderer: prop_types_default.a.func,
|
|
70720
70727
|
HTMLRenderer: prop_types_default.a.func,
|
|
70721
70728
|
hierarchicalId: prop_types_default.a.string,
|
|
70722
70729
|
labels: prop_types_default.a.object,
|
|
70723
70730
|
depth: prop_types_default.a.number,
|
|
70724
|
-
|
|
70731
|
+
eventsListeners: prop_types_default.a.object,
|
|
70725
70732
|
isGreyed: prop_types_default.a.bool
|
|
70726
70733
|
};
|
|
70727
70734
|
|
|
@@ -71109,7 +71116,9 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
|
|
|
71109
71116
|
_props$scopeGetter = props.scopeGetter,
|
|
71110
71117
|
scopeGetter = _props$scopeGetter === undefined ? singleScopeGetter : _props$scopeGetter,
|
|
71111
71118
|
_props$treeHeight = props.treeHeight,
|
|
71112
|
-
treeHeight = _props$treeHeight === undefined ? 0 : _props$treeHeight
|
|
71119
|
+
treeHeight = _props$treeHeight === undefined ? 0 : _props$treeHeight,
|
|
71120
|
+
_props$simpleSelectio = props.simpleSelectionMode,
|
|
71121
|
+
simpleSelectionMode = _props$simpleSelectio === undefined ? false : _props$simpleSelectio;
|
|
71113
71122
|
|
|
71114
71123
|
var theme = useTheme_useTheme();
|
|
71115
71124
|
|
|
@@ -71225,56 +71234,63 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
|
|
|
71225
71234
|
setIsMouseDown(false);
|
|
71226
71235
|
}
|
|
71227
71236
|
};
|
|
71228
|
-
|
|
71237
|
+
|
|
71238
|
+
var onMouseUp = function onMouseUp(e) {
|
|
71239
|
+
if (!isMouseDown) {
|
|
71240
|
+
return;
|
|
71241
|
+
}
|
|
71242
|
+
e.preventDefault();
|
|
71243
|
+
apply();
|
|
71244
|
+
setIsMouseDown(false);
|
|
71245
|
+
};
|
|
71246
|
+
|
|
71247
|
+
var onMouseLeave = function onMouseLeave() {
|
|
71248
|
+
if (isMouseDown) {
|
|
71249
|
+
apply();
|
|
71250
|
+
}
|
|
71251
|
+
};
|
|
71252
|
+
|
|
71253
|
+
var onKeyUp = function onKeyUp(e) {
|
|
71254
|
+
e.preventDefault();
|
|
71255
|
+
if (e.key === 'Shift' && !es_isEmpty(shiftIndexes)) {
|
|
71256
|
+
apply();
|
|
71257
|
+
} else if (e.key === 'Control' && !es_isEmpty(selectIds)) {
|
|
71258
|
+
apply();
|
|
71259
|
+
}
|
|
71260
|
+
};
|
|
71261
|
+
|
|
71262
|
+
var itemEventsListeners = function itemEventsListeners(id, index) {
|
|
71229
71263
|
return {
|
|
71230
|
-
onMouseUp: isMouseDown ? function (e) {
|
|
71231
|
-
e.preventDefault();
|
|
71232
|
-
apply();
|
|
71233
|
-
if (!es_isEmpty(selectIds)) {
|
|
71234
|
-
setLastItemId(id);
|
|
71235
|
-
}
|
|
71236
|
-
setIsMouseDown(false);
|
|
71237
|
-
} : null,
|
|
71238
71264
|
onMouseDown: function onMouseDown(e) {
|
|
71239
|
-
e.
|
|
71240
|
-
if (e.ctrlKey || e.shiftKey) {
|
|
71265
|
+
if (!simpleSelectionMode && (e.ctrlKey || e.shiftKey)) {
|
|
71241
71266
|
return;
|
|
71242
71267
|
}
|
|
71243
71268
|
setIsMouseDown(true);
|
|
71244
71269
|
multiSelect(id);
|
|
71245
71270
|
},
|
|
71246
|
-
onMouseEnter:
|
|
71271
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
71247
71272
|
e.preventDefault();
|
|
71248
|
-
if (e.ctrlKey || e.shiftKey) {
|
|
71273
|
+
if (!isMouseDown || simpleSelectionMode || e.ctrlKey || e.shiftKey) {
|
|
71249
71274
|
return;
|
|
71250
71275
|
}
|
|
71251
71276
|
multiSelect(id);
|
|
71252
|
-
|
|
71277
|
+
setLastItemId(id);
|
|
71278
|
+
},
|
|
71253
71279
|
onClick: function onClick(e) {
|
|
71254
71280
|
e.preventDefault();
|
|
71255
|
-
|
|
71256
|
-
if (e.ctrlKey) {
|
|
71281
|
+
if (e.ctrlKey && !simpleSelectionMode) {
|
|
71257
71282
|
multiSelect(id);
|
|
71258
|
-
} else if (e.shiftKey) {
|
|
71283
|
+
} else if (e.shiftKey && !simpleSelectionMode) {
|
|
71259
71284
|
shiftSelect(index);
|
|
71260
71285
|
} else {
|
|
71261
71286
|
setIsMouseDown(false);
|
|
71262
71287
|
setLastItemId(id);
|
|
71263
71288
|
}
|
|
71264
71289
|
}
|
|
71265
|
-
// ondblclick: () => null
|
|
71266
71290
|
};
|
|
71267
71291
|
};
|
|
71268
|
-
var onKeyUp = function onKeyUp(e) {
|
|
71269
|
-
if (e.key === 'Shift' && !es_isEmpty(shiftIndexes)) {
|
|
71270
|
-
apply();
|
|
71271
|
-
} else if (e.key === 'Control' && !es_isEmpty(selectIds)) {
|
|
71272
|
-
apply();
|
|
71273
|
-
}
|
|
71274
|
-
};
|
|
71275
71292
|
var ref = Object(react["useRef"])();
|
|
71276
71293
|
var classes = ScopeList_styles_useStyles();
|
|
71277
|
-
|
|
71278
71294
|
Object(react["useEffect"])(function () {
|
|
71279
71295
|
var current = ref.current;
|
|
71280
71296
|
var handler = function handler(event) {
|
|
@@ -71297,7 +71313,6 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
|
|
|
71297
71313
|
setScrollTop(undefined);
|
|
71298
71314
|
}
|
|
71299
71315
|
if (es_isNil(current)) return;
|
|
71300
|
-
|
|
71301
71316
|
current.addEventListener('wheel', handler, { passive: false });
|
|
71302
71317
|
return function () {
|
|
71303
71318
|
current.removeEventListener('wheel', handler, { passive: false });
|
|
@@ -71315,7 +71330,8 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
|
|
|
71315
71330
|
disablePadding: true,
|
|
71316
71331
|
style: { height: maxHeight + 2 },
|
|
71317
71332
|
onKeyUp: onKeyUp,
|
|
71318
|
-
|
|
71333
|
+
onMouseUp: onMouseUp,
|
|
71334
|
+
onMouseLeave: onMouseLeave,
|
|
71319
71335
|
ref: ref
|
|
71320
71336
|
},
|
|
71321
71337
|
react_default.a.createElement(
|
|
@@ -71352,11 +71368,10 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
|
|
|
71352
71368
|
},
|
|
71353
71369
|
NavigateIcon: es_has(itemId, expandedIds) ? ExpandLess_default.a : ExpandMore_default.a,
|
|
71354
71370
|
isRtl: isRtl,
|
|
71355
|
-
|
|
71371
|
+
eventsListeners: itemEventsListeners(utils_getHierarchicalId(item), index),
|
|
71356
71372
|
HTMLRenderer: HTMLRenderer,
|
|
71357
71373
|
classes: classes,
|
|
71358
71374
|
labels: labels,
|
|
71359
|
-
index: index,
|
|
71360
71375
|
style: style,
|
|
71361
71376
|
accessibility: accessibility,
|
|
71362
71377
|
ariaLabel: es_prop('navigateNext')(labels),
|
|
@@ -71388,7 +71403,8 @@ VirtualizedTree_VirtualizedTree.propTypes = {
|
|
|
71388
71403
|
collapse: prop_types_default.a.func,
|
|
71389
71404
|
treeHeight: prop_types_default.a.number,
|
|
71390
71405
|
isGreyed: prop_types_default.a.func,
|
|
71391
|
-
scopeGetter: prop_types_default.a.func
|
|
71406
|
+
scopeGetter: prop_types_default.a.func,
|
|
71407
|
+
simpleSelectionMode: prop_types_default.a.bool
|
|
71392
71408
|
};
|
|
71393
71409
|
|
|
71394
71410
|
/* harmony default export */ var src_VirtualizedTree_VirtualizedTree = (VirtualizedTree_VirtualizedTree);
|
|
@@ -72401,14 +72417,17 @@ var HierarchicalFilter_HierarchicalFilter = function HierarchicalFilter(props) {
|
|
|
72401
72417
|
hasSpotlight = props.hasSpotlight,
|
|
72402
72418
|
_props$disableAccesso = props.disableAccessor,
|
|
72403
72419
|
disableAccessor = _props$disableAccesso === undefined ? es_always(false) : _props$disableAccesso,
|
|
72404
|
-
allItems = props.allItems
|
|
72420
|
+
allItems = props.allItems,
|
|
72421
|
+
_props$simpleSelectio = props.simpleSelectionMode,
|
|
72422
|
+
simpleSelectionMode = _props$simpleSelectio === undefined ? false : _props$simpleSelectio;
|
|
72405
72423
|
|
|
72406
72424
|
var classes = ScopeList_styles_useStyles({ accessibility: accessibility });
|
|
72407
72425
|
var theme = useTheme_useTheme();
|
|
72408
72426
|
var isRtl = utils_getIsRtl(theme);
|
|
72409
72427
|
var Chip = es_isNil(Tag) ? src_Tag_Tag : Tag;
|
|
72410
72428
|
var _allGroupedItems = es_groupBy(es_propOr('#ROOT', 'parentId'), allItems);
|
|
72411
|
-
var _disableAccessor = utils_getEvolvedDisableAccessor(_allGroupedItems, disableAccessor, es_always(false));
|
|
72429
|
+
var _disableAccessor = simpleSelectionMode ? disableAccessor : utils_getEvolvedDisableAccessor(_allGroupedItems, disableAccessor, es_always(false));
|
|
72430
|
+
|
|
72412
72431
|
var tagValue = HierarchicalFilter_getCounter(items, _disableAccessor, tagAccessor);
|
|
72413
72432
|
var isDisabled = function isDisabled(item) {
|
|
72414
72433
|
return es_is(Function, disableAccessor) ? disableAccessor(item) : false;
|
|
@@ -72507,7 +72526,8 @@ HierarchicalFilter_HierarchicalFilter.propTypes = {
|
|
|
72507
72526
|
spotlight: prop_types_default.a.object,
|
|
72508
72527
|
setSpotlight: prop_types_default.a.func,
|
|
72509
72528
|
hasSpotlight: prop_types_default.a.bool,
|
|
72510
|
-
allItems: prop_types_default.a.array
|
|
72529
|
+
allItems: prop_types_default.a.array,
|
|
72530
|
+
simpleSelectionMode: prop_types_default.a.bool
|
|
72511
72531
|
};
|
|
72512
72532
|
|
|
72513
72533
|
/* harmony default export */ var src_HierarchicalFilter_HierarchicalFilter = (withSpotlight_withSpotlight(withExpansionTree_withExpansionTree(HierarchicalFilter_HierarchicalFilter)));
|