@sis-cc/dotstatsuite-visions 10.7.0 → 10.9.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/AdvancedFilterDialog/AdvancedFilterDialog.js +18 -3
- package/es/HierarchicalFilter/HierarchicalFilter.js +2 -2
- 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 +3 -3
- package/es/VirtualizedTree/VirtualizedTree.js +2 -2
- package/es/VirtualizedTree/utils.js +41 -25
- package/lib/AdvancedFilterDialog/AdvancedFilterDialog.js +17 -2
- package/lib/HierarchicalFilter/HierarchicalFilter.js +1 -1
- 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 +3 -3
- package/lib/VirtualizedTree/VirtualizedTree.js +1 -1
- package/lib/VirtualizedTree/utils.js +42 -26
- package/package.json +1 -1
- package/umd/@sis-cc/dotstatsuite-visions.js +90 -52
- 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.9.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.9.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 */
|
|
@@ -50119,7 +50119,7 @@ _curry1(function lensIndex(n) {
|
|
|
50119
50119
|
* const greet = R.replace('{name}', R.__, 'Hello, {name}!');
|
|
50120
50120
|
* greet('Alice'); //=> 'Hello, Alice!'
|
|
50121
50121
|
*/
|
|
50122
|
-
/* harmony default export */ var
|
|
50122
|
+
/* harmony default export */ var es_ = ({
|
|
50123
50123
|
'@@functional/placeholder': true
|
|
50124
50124
|
});
|
|
50125
50125
|
// CONCATENATED MODULE: ./node_modules/ramda/es/times.js
|
|
@@ -51446,7 +51446,7 @@ var PeriodPicker_Period = function Period(_ref) {
|
|
|
51446
51446
|
var fn = es_prop(getter)({ start: es_head, end: es_last });
|
|
51447
51447
|
var lensIndex = es_prop(getter)({ start: es_lensIndex(0), end: es_lensIndex(1) });
|
|
51448
51448
|
var dateValue = getPeriodValue(fn(destructuringDates));
|
|
51449
|
-
var selectedValue = es_ifElse(isValidNumber, es_assoc(id,
|
|
51449
|
+
var selectedValue = es_ifElse(isValidNumber, es_assoc(id, es_, {}), es_always(undefined))(Number(value));
|
|
51450
51450
|
var newDate = lib_getDate(frequency, dateValue, selectedValue, getter === 'end');
|
|
51451
51451
|
if (es_is(Function, changePeriod)) {
|
|
51452
51452
|
return changePeriod(pipe(es_set(lensIndex, newDate), function (_ref2) {
|
|
@@ -53722,7 +53722,7 @@ var header_Header = function Header(_ref) {
|
|
|
53722
53722
|
react_default.a.createElement(
|
|
53723
53723
|
esm_Typography_Typography,
|
|
53724
53724
|
{ variant: 'body1', className: classes.cellLabelHeader },
|
|
53725
|
-
pipe(es_path([
|
|
53725
|
+
pipe(es_path([-1, 'data', index, 'dimension']), labelAccessor)(headerData),
|
|
53726
53726
|
react_default.a.createElement(TableHtml5_flags, {
|
|
53727
53727
|
HTMLRenderer: HTMLRenderer,
|
|
53728
53728
|
flags: flags,
|
|
@@ -53735,7 +53735,7 @@ var header_Header = function Header(_ref) {
|
|
|
53735
53735
|
header_mapIndexed(function (headerItem, idx) {
|
|
53736
53736
|
var _cx;
|
|
53737
53737
|
|
|
53738
|
-
var value = TableHtml5_utils_getValue(labelAccessor)(headerItem);
|
|
53738
|
+
var value = headerItem.isEmpty ? { label: '' } : TableHtml5_utils_getValue(labelAccessor)(headerItem);
|
|
53739
53739
|
var flags = es_propOr([], 'flags', value);
|
|
53740
53740
|
var hierarchySpace = pipe(es_propOr([], 'parents'), es_length, es_times(function () {
|
|
53741
53741
|
return '·';
|
|
@@ -53783,7 +53783,7 @@ var header_Header = function Header(_ref) {
|
|
|
53783
53783
|
);
|
|
53784
53784
|
}, es_nth(index, valuesHeaderData))
|
|
53785
53785
|
);
|
|
53786
|
-
}, compose(es_length, es_pathOr([], [
|
|
53786
|
+
}, compose(es_length, es_pathOr([], [-1, 'data']))(headerData));
|
|
53787
53787
|
};
|
|
53788
53788
|
|
|
53789
53789
|
header_Header.propTypes = {
|
|
@@ -54397,7 +54397,7 @@ var section_Section = function Section(_ref) {
|
|
|
54397
54397
|
HTMLRenderer: HTMLRenderer,
|
|
54398
54398
|
labelAccessor: labelAccessor
|
|
54399
54399
|
}),
|
|
54400
|
-
|
|
54400
|
+
section_mapIndexed(function (sectionbody, rowIndex) {
|
|
54401
54401
|
var _cx2;
|
|
54402
54402
|
|
|
54403
54403
|
var rowId = sectionbody.key + '_' + sectionIndex + '_' + rowIndex;
|
|
@@ -54407,11 +54407,12 @@ var section_Section = function Section(_ref) {
|
|
|
54407
54407
|
return react_default.a.createElement(
|
|
54408
54408
|
esm_TableRow_TableRow,
|
|
54409
54409
|
{ key: rowId },
|
|
54410
|
-
|
|
54410
|
+
es_times(function (index) {
|
|
54411
54411
|
var _cx;
|
|
54412
54412
|
|
|
54413
|
-
var
|
|
54414
|
-
var
|
|
54413
|
+
var cell = es_path(['data', index], sectionbody);
|
|
54414
|
+
var value = es_isNil(cell) ? { label: '' } : TableHtml5_utils_getValue(labelAccessor)(cell);
|
|
54415
|
+
var flags = es_propOr([], 'flags', value);
|
|
54415
54416
|
var id = rowIndex + '_' + rowId + '_' + index;
|
|
54416
54417
|
|
|
54417
54418
|
// special space is used for hierarchy U+2007    
|
|
@@ -54425,7 +54426,7 @@ var section_Section = function Section(_ref) {
|
|
|
54425
54426
|
esm_TableCell_TableCell,
|
|
54426
54427
|
{
|
|
54427
54428
|
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(
|
|
54429
|
+
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
54430
|
id: id,
|
|
54430
54431
|
headers: 'subHeader_' + index + ' ' + currentSection,
|
|
54431
54432
|
component: 'th',
|
|
@@ -54451,7 +54452,7 @@ var section_Section = function Section(_ref) {
|
|
|
54451
54452
|
)
|
|
54452
54453
|
)
|
|
54453
54454
|
);
|
|
54454
|
-
},
|
|
54455
|
+
}, xLayoutDataLength /*R.prop('data', sectionbody)*/),
|
|
54455
54456
|
react_default.a.createElement(
|
|
54456
54457
|
esm_TableCell_TableCell,
|
|
54457
54458
|
{
|
|
@@ -54477,8 +54478,9 @@ var section_Section = function Section(_ref) {
|
|
|
54477
54478
|
|
|
54478
54479
|
var intersectionCellId = rowId + '/' + columnIndex;
|
|
54479
54480
|
var isActive = pipe(es_propOr({}, 'intersectionCellId'), es_equals(intersectionCellId))(activeCellIds);
|
|
54481
|
+
var missingValLabel = item.isEmpty || sectionbody.isEmpty ? '' : '..';
|
|
54480
54482
|
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) ?
|
|
54483
|
+
return es_isNil(val) ? missingValLabel : cellValueAccessor(val);
|
|
54482
54484
|
}))(cells), {
|
|
54483
54485
|
key: intersectionCellId,
|
|
54484
54486
|
headers: rowIds + ' ' + columnIds + ' ' + currentSection,
|
|
@@ -54565,12 +54567,13 @@ var TableHtml5_useStyles = styles_makeStyles(function (theme) {
|
|
|
54565
54567
|
var TableHtml5_mapIndexed = es_addIndex(es_map);
|
|
54566
54568
|
|
|
54567
54569
|
var TableHtml5_getEnhancedValuesHeaderData = function getEnhancedValuesHeaderData(data) {
|
|
54568
|
-
var colLength = pipe(
|
|
54570
|
+
var colLength = pipe(es_last, es_propOr([], 'data'), es_length)(data);
|
|
54569
54571
|
return pipe(es_pluck('data'),
|
|
54570
54572
|
// mix merge and transpose for performance
|
|
54571
54573
|
es_reduce(function (acc, cells) {
|
|
54572
|
-
es_addIndex(es_forEach)(function (
|
|
54573
|
-
var
|
|
54574
|
+
es_addIndex(es_forEach)(function (_, rowIndex) {
|
|
54575
|
+
var cell = es_nth(rowIndex, cells) || {};
|
|
54576
|
+
var cellId = es_has('values', cell) ? pipe(es_prop('values'), es_pluck('id'), es_join(','))(cell) : es_pathOr('missing' + rowIndex, ['value', 'id'], cell);
|
|
54574
54577
|
var topCell = rowIndex > 0 ? pipe(es_nth(rowIndex - 1), es_last)(acc) : null;
|
|
54575
54578
|
var cellKey = es_isNil(topCell) ? cellId : topCell.key + '-' + cellId;
|
|
54576
54579
|
|
|
@@ -54578,9 +54581,13 @@ var TableHtml5_getEnhancedValuesHeaderData = function getEnhancedValuesHeaderDat
|
|
|
54578
54581
|
if (es_prop('key', leftCell) === cellKey && rowIndex !== colLength - 1) {
|
|
54579
54582
|
acc = es_over(es_lensIndex(rowIndex), es_over(es_lensIndex(-1), es_evolve({ spanCount: es_add(1) })))(acc);
|
|
54580
54583
|
} else {
|
|
54581
|
-
acc = es_over(es_lensIndex(rowIndex), es_append(TableHtml5_extends({}, es_pick(['value', 'values'], cell), {
|
|
54584
|
+
acc = es_over(es_lensIndex(rowIndex), es_append(TableHtml5_extends({}, es_pick(['value', 'values'], cell), {
|
|
54585
|
+
key: cellKey,
|
|
54586
|
+
spanCount: 1,
|
|
54587
|
+
isEmpty: es_isEmpty(cell)
|
|
54588
|
+
})))(acc);
|
|
54582
54589
|
}
|
|
54583
|
-
})(
|
|
54590
|
+
})(acc);
|
|
54584
54591
|
return acc;
|
|
54585
54592
|
}, es_times(es_always([]), colLength)))(data);
|
|
54586
54593
|
};
|
|
@@ -54645,7 +54652,7 @@ var TableHtml5_TableHtml5 = function TableHtml5(_ref) {
|
|
|
54645
54652
|
};
|
|
54646
54653
|
}, []);
|
|
54647
54654
|
|
|
54648
|
-
var xLayoutData = es_pathOr([], [0, 1,
|
|
54655
|
+
var xLayoutData = es_pathOr([], [0, 1, -1, 'data'], sectionsData);
|
|
54649
54656
|
var xLayoutDataLength = es_length(xLayoutData);
|
|
54650
54657
|
|
|
54651
54658
|
var _useMemo = Object(react["useMemo"])(function () {
|
|
@@ -70623,7 +70630,7 @@ var VirtualizedTree_Item_Item = function Item(_ref) {
|
|
|
70623
70630
|
primaryTypographyProps: { noWrap: true, color: 'inherit' },
|
|
70624
70631
|
secondaryTypographyProps: { color: 'inherit' },
|
|
70625
70632
|
classes: { root: classes.listItem },
|
|
70626
|
-
className: classnames_default()((_cx = {}, _cx[classes.accessibilityItemHover] = accessibility, _cx[classes.listItemSelected] =
|
|
70633
|
+
className: classnames_default()((_cx = {}, _cx[classes.accessibilityItemHover] = accessibility, _cx[classes.listItemSelected] = isSelected && (!isDisabled || !isGreyed), _cx[classes.listItemHover] = !isDisabled || !isGreyed, _cx)),
|
|
70627
70634
|
onClick: isDisabled ? null : callbacks.onClick,
|
|
70628
70635
|
onMouseDown: isDisabled || isTooltipShown ? null : callbacks.onMouseDown,
|
|
70629
70636
|
onMouseUp: isDisabled || isTooltipShown ? null : callbacks.onMouseUp,
|
|
@@ -70649,7 +70656,7 @@ var VirtualizedTree_Item_Item = function Item(_ref) {
|
|
|
70649
70656
|
SvgIcon["a" /* default */],
|
|
70650
70657
|
{
|
|
70651
70658
|
color: 'primary',
|
|
70652
|
-
className: classnames_default()(classes.labelIcon, (_cx4 = {}, _cx4[classes.disabledLabel] =
|
|
70659
|
+
className: classnames_default()(classes.labelIcon, (_cx4 = {}, _cx4[classes.disabledLabel] = isDisabled, _cx4))
|
|
70653
70660
|
},
|
|
70654
70661
|
react_default.a.createElement('path', { d: svgPath })
|
|
70655
70662
|
),
|
|
@@ -70678,7 +70685,7 @@ var VirtualizedTree_Item_Item = function Item(_ref) {
|
|
|
70678
70685
|
{
|
|
70679
70686
|
color: 'inherit',
|
|
70680
70687
|
variant: 'body2',
|
|
70681
|
-
className: classnames_default()(classes.label, (_cx5 = {}, _cx5[classes.disabledLabel] = isGreyed
|
|
70688
|
+
className: classnames_default()(classes.label, (_cx5 = {}, _cx5[classes.disabledLabel] = isGreyed, _cx5[classes.tooltipNotice] = !es_isEmpty(description), _cx5))
|
|
70682
70689
|
},
|
|
70683
70690
|
label
|
|
70684
70691
|
)
|
|
@@ -70965,34 +70972,37 @@ var utils_getDeprecatedIds = function getDeprecatedIds(ids, items, selectedIds)
|
|
|
70965
70972
|
return reccurse(ids);
|
|
70966
70973
|
};
|
|
70967
70974
|
|
|
70968
|
-
|
|
70969
|
-
|
|
70970
|
-
|
|
70971
|
-
|
|
70972
|
-
|
|
70973
|
-
|
|
70974
|
-
|
|
70975
|
-
|
|
70976
|
-
|
|
70977
|
-
|
|
70978
|
-
|
|
70979
|
-
|
|
70980
|
-
|
|
70981
|
-
|
|
70982
|
-
|
|
70983
|
-
|
|
70984
|
-
|
|
70985
|
-
|
|
70986
|
-
|
|
70987
|
-
|
|
70988
|
-
|
|
70989
|
-
|
|
70975
|
+
// evolved disableAccessor with hierarchical context and selection mode
|
|
70976
|
+
var utils_getEvolvedDisableAccessor = function getEvolvedDisableAccessor(groupedItems) {
|
|
70977
|
+
var disableAccessor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : es_always(false);
|
|
70978
|
+
var getIsChildInSelectionScope = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : es_always(true);
|
|
70979
|
+
return (//combine selection mode + spotlight
|
|
70980
|
+
function (item, selectedIds) {
|
|
70981
|
+
var hierarchicalFinder = function hierarchicalFinder(validator) {
|
|
70982
|
+
return function (parentId) {
|
|
70983
|
+
return es_find(function (child) {
|
|
70984
|
+
if (validator(child)) return true;
|
|
70985
|
+
return !es_isNil(hierarchicalFinder(validator)(utils_getHierarchicalId(child)));
|
|
70986
|
+
}, es_propOr([], parentId, groupedItems));
|
|
70987
|
+
};
|
|
70988
|
+
};
|
|
70989
|
+
// selected forcedItem isn't deselectable unless all selected descendants are in deselection scope
|
|
70990
|
+
if (utils_isItemSelected(selectedIds)(item) && es_propOr(false, 'isForced', item)) {
|
|
70991
|
+
var outOfScopeSelectedDescendant = hierarchicalFinder(function (child) {
|
|
70992
|
+
return utils_isItemSelected(selectedIds)(child) && !getIsChildInSelectionScope(child, item);
|
|
70993
|
+
})(utils_getHierarchicalId(item));
|
|
70994
|
+
return !es_isNil(outOfScopeSelectedDescendant);
|
|
70995
|
+
}
|
|
70996
|
+
// non selected invalid item is disabled unless some (valid) children are selected or selectable in scope
|
|
70997
|
+
if (!utils_isItemSelected(selectedIds)(item) && disableAccessor(item)) {
|
|
70998
|
+
var validDescendant = hierarchicalFinder(function (child) {
|
|
70999
|
+
return utils_isItemSelected(selectedIds)(child) || getIsChildInSelectionScope(child, item) && !disableAccessor(child);
|
|
71000
|
+
})(utils_getHierarchicalId(item));
|
|
70990
71001
|
return es_isNil(validDescendant);
|
|
70991
71002
|
}
|
|
71003
|
+
return false;
|
|
70992
71004
|
}
|
|
70993
|
-
|
|
70994
|
-
};
|
|
70995
|
-
return accessor;
|
|
71005
|
+
);
|
|
70996
71006
|
};
|
|
70997
71007
|
|
|
70998
71008
|
var getScopeGetters = {
|
|
@@ -71029,6 +71039,19 @@ var getScopeGetters = {
|
|
|
71029
71039
|
};
|
|
71030
71040
|
}
|
|
71031
71041
|
};
|
|
71042
|
+
|
|
71043
|
+
var utils_getImposedItems = function getImposedItems(selectIds, indexedItems) {
|
|
71044
|
+
return function (selectedItems) {
|
|
71045
|
+
return es_reduce(function (acc, item) {
|
|
71046
|
+
var isSelected = utils_isItemSelected(selectIds)(item);
|
|
71047
|
+
if (!isSelected) {
|
|
71048
|
+
var imposedItems = es_props(es_propOr([], 'imposedIds', item), indexedItems);
|
|
71049
|
+
return es_concat(acc, es_append(item, imposedItems));
|
|
71050
|
+
}
|
|
71051
|
+
return es_append(item, acc);
|
|
71052
|
+
}, [], selectedItems);
|
|
71053
|
+
};
|
|
71054
|
+
};
|
|
71032
71055
|
// CONCATENATED MODULE: ./src/VirtualizedTree/VirtualizedTree.js
|
|
71033
71056
|
var VirtualizedTree_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
71034
71057
|
|
|
@@ -71142,7 +71165,7 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
|
|
|
71142
71165
|
|
|
71143
71166
|
var multiSelect = function multiSelect(id) {
|
|
71144
71167
|
var item = es_prop(id, indexedItemsById);
|
|
71145
|
-
var ids = pipe(getItemScope, es_filter(function (v) {
|
|
71168
|
+
var ids = pipe(getItemScope, utils_getImposedItems(selectIds, indexedItemsById), es_filter(function (v) {
|
|
71146
71169
|
return v.isSelected === item.isSelected;
|
|
71147
71170
|
}), function (items) {
|
|
71148
71171
|
return utils_getDuplicates(items, indexedItemsById);
|
|
@@ -72041,7 +72064,7 @@ var AdvancedFilterDialog_AdvancedFilterDialog = function AdvancedFilterDialog(pr
|
|
|
72041
72064
|
isSelected: es_has(item.id, selection) ? !item.isSelected : !!item.isSelected
|
|
72042
72065
|
});
|
|
72043
72066
|
}, items);
|
|
72044
|
-
var
|
|
72067
|
+
var indexedFilteredItems = es_indexBy(utils_getHierarchicalId, selectionItems);
|
|
72045
72068
|
|
|
72046
72069
|
var selectionOptions = [{
|
|
72047
72070
|
value: 'single',
|
|
@@ -72070,7 +72093,22 @@ var AdvancedFilterDialog_AdvancedFilterDialog = function AdvancedFilterDialog(pr
|
|
|
72070
72093
|
isSelected: es_has(item.id, selection) ? !item.isSelected : !!item.isSelected
|
|
72071
72094
|
});
|
|
72072
72095
|
}), es_groupBy(es_propOr('#ROOT', 'parentId')))(allItems);
|
|
72073
|
-
|
|
72096
|
+
|
|
72097
|
+
var isChildInSelectionScope = function isChildInSelectionScope(child, ancestor) {
|
|
72098
|
+
if (!es_has(utils_getHierarchicalId(child), indexedFilteredItems)) {
|
|
72099
|
+
return false;
|
|
72100
|
+
}
|
|
72101
|
+
if (selectionMode === 'single' || selectionMode === 'level') {
|
|
72102
|
+
return false;
|
|
72103
|
+
}
|
|
72104
|
+
if (selectionMode === 'children') {
|
|
72105
|
+
return child.parentId === utils_getHierarchicalId(ancestor);
|
|
72106
|
+
}
|
|
72107
|
+
return true;
|
|
72108
|
+
};
|
|
72109
|
+
|
|
72110
|
+
var _disableAccessor = utils_getEvolvedDisableAccessor(_allGroupedItems, disableAccessor, isChildInSelectionScope);
|
|
72111
|
+
|
|
72074
72112
|
var isDisabled = function isDisabled(item) {
|
|
72075
72113
|
return es_is(Function, disableAccessor) ? disableAccessor(item) : false;
|
|
72076
72114
|
};
|
|
@@ -72377,7 +72415,7 @@ var HierarchicalFilter_HierarchicalFilter = function HierarchicalFilter(props) {
|
|
|
72377
72415
|
var isRtl = utils_getIsRtl(theme);
|
|
72378
72416
|
var Chip = es_isNil(Tag) ? src_Tag_Tag : Tag;
|
|
72379
72417
|
var _allGroupedItems = es_groupBy(es_propOr('#ROOT', 'parentId'), allItems);
|
|
72380
|
-
var _disableAccessor =
|
|
72418
|
+
var _disableAccessor = utils_getEvolvedDisableAccessor(_allGroupedItems, disableAccessor, es_always(false));
|
|
72381
72419
|
var tagValue = HierarchicalFilter_getCounter(items, _disableAccessor, tagAccessor);
|
|
72382
72420
|
var isDisabled = function isDisabled(item) {
|
|
72383
72421
|
return es_is(Function, disableAccessor) ? disableAccessor(item) : false;
|