@sis-cc/dotstatsuite-visions 10.9.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @sis-cc/dotstatsuite-visions v10.9.0 - https://visions-qa.siscc.org/#o
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.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"}};
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) ? [] : [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,
@@ -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
  /**
@@ -70579,19 +70583,17 @@ var VirtualizedTree_Item_Item = function Item(_ref) {
70579
70583
  style = _ref.style,
70580
70584
  isRtl = _ref.isRtl,
70581
70585
  accessibility = _ref.accessibility,
70582
- index = _ref.index,
70583
70586
  HTMLRenderer = _ref.HTMLRenderer,
70584
70587
  hierarchicalId = _ref.hierarchicalId,
70585
70588
  labels = _ref.labels,
70586
70589
  _ref$depth = _ref.depth,
70587
70590
  depth = _ref$depth === undefined ? 0 : _ref$depth,
70588
- eventsCallbacks = _ref.eventsCallbacks;
70591
+ eventsListeners = _ref.eventsListeners;
70589
70592
 
70590
70593
  var _React$useState = react_default.a.useState(false),
70591
70594
  isTooltipShown = _React$useState[0],
70592
70595
  setIsTooltipShown = _React$useState[1];
70593
70596
 
70594
- var callbacks = eventsCallbacks(hierarchicalId || id, index);
70595
70597
  var padding = depth * 30 + (depth > 0 && !hasChildrenOnLevel ? 30 : 0) + (!hasChild && hasChildrenOnLevel ? 30 : 0);
70596
70598
  return react_default.a.createElement(
70597
70599
  esm_ListItem_ListItem,
@@ -70621,23 +70623,21 @@ var VirtualizedTree_Item_Item = function Item(_ref) {
70621
70623
  },
70622
70624
  react_default.a.createElement(NavigateIcon, null)
70623
70625
  ),
70624
- react_default.a.createElement(esm_ListItemText_ListItemText, VirtualizedTree_Item_extends({
70626
+ react_default.a.createElement(esm_ListItemText_ListItemText, {
70625
70627
  'data-testid': 'value_' + id,
70626
70628
  tabIndex: 0,
70627
- 'aria-label': isDisabled ? es_propOr('', 'disableItemLabel')(labels) + ' ' + label : label,
70629
+ 'aria-label': isGreyed ? es_propOr('', 'disableItemLabel')(labels) + ' ' + label : label,
70628
70630
  'aria-pressed': isSelected,
70629
70631
  'aria-disabled': isDisabled,
70630
70632
  primaryTypographyProps: { noWrap: true, color: 'inherit' },
70631
70633
  secondaryTypographyProps: { color: 'inherit' },
70632
70634
  classes: { root: classes.listItem },
70633
- className: classnames_default()((_cx = {}, _cx[classes.accessibilityItemHover] = accessibility, _cx[classes.listItemSelected] = isSelected && (!isDisabled || !isGreyed), _cx[classes.listItemHover] = !isDisabled || !isGreyed, _cx)),
70634
- onClick: isDisabled ? null : callbacks.onClick,
70635
- onMouseDown: isDisabled || isTooltipShown ? null : callbacks.onMouseDown,
70636
- onMouseUp: isDisabled || isTooltipShown ? null : callbacks.onMouseUp,
70637
- onMouseEnter: isDisabled || isTooltipShown ? null : callbacks.onMouseEnter
70638
- }, es_pick(['onKeyPress'], callbacks), {
70639
- title: isDisabled ? es_propOr('', 'disableItemLabel')(labels) + ' ' + label : label,
70640
- 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' },
70641
70641
  primary: react_default.a.createElement(
70642
70642
  'div',
70643
70643
  {
@@ -70648,7 +70648,8 @@ var VirtualizedTree_Item_Item = function Item(_ref) {
70648
70648
  SvgIcon["a" /* default */],
70649
70649
  {
70650
70650
  color: 'primary',
70651
- 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' }
70652
70653
  },
70653
70654
  isSelected ? react_default.a.createElement(CheckBoxOutlined_default.a, null) : react_default.a.createElement(CheckBoxOutlineBlankOutlined_default.a, null)
70654
70655
  ),
@@ -70698,7 +70699,7 @@ var VirtualizedTree_Item_Item = function Item(_ref) {
70698
70699
  ')'
70699
70700
  )
70700
70701
  )
70701
- }))
70702
+ })
70702
70703
  );
70703
70704
  };
70704
70705
 
@@ -70722,13 +70723,12 @@ VirtualizedTree_Item_Item.propTypes = {
70722
70723
  style: prop_types_default.a.object,
70723
70724
  isRtl: prop_types_default.a.bool,
70724
70725
  accessibility: prop_types_default.a.bool,
70725
- index: prop_types_default.a.number,
70726
70726
  labelRenderer: prop_types_default.a.func,
70727
70727
  HTMLRenderer: prop_types_default.a.func,
70728
70728
  hierarchicalId: prop_types_default.a.string,
70729
70729
  labels: prop_types_default.a.object,
70730
70730
  depth: prop_types_default.a.number,
70731
- eventsCallbacks: prop_types_default.a.func,
70731
+ eventsListeners: prop_types_default.a.object,
70732
70732
  isGreyed: prop_types_default.a.bool
70733
70733
  };
70734
70734
 
@@ -71116,7 +71116,9 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
71116
71116
  _props$scopeGetter = props.scopeGetter,
71117
71117
  scopeGetter = _props$scopeGetter === undefined ? singleScopeGetter : _props$scopeGetter,
71118
71118
  _props$treeHeight = props.treeHeight,
71119
- 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;
71120
71122
 
71121
71123
  var theme = useTheme_useTheme();
71122
71124
 
@@ -71232,56 +71234,63 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
71232
71234
  setIsMouseDown(false);
71233
71235
  }
71234
71236
  };
71235
- var eventsCallbacks = function eventsCallbacks(id, index) {
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) {
71236
71263
  return {
71237
- onMouseUp: isMouseDown ? function (e) {
71238
- e.preventDefault();
71239
- apply();
71240
- if (!es_isEmpty(selectIds)) {
71241
- setLastItemId(id);
71242
- }
71243
- setIsMouseDown(false);
71244
- } : null,
71245
71264
  onMouseDown: function onMouseDown(e) {
71246
- e.preventDefault();
71247
- if (e.ctrlKey || e.shiftKey) {
71265
+ if (!simpleSelectionMode && (e.ctrlKey || e.shiftKey)) {
71248
71266
  return;
71249
71267
  }
71250
71268
  setIsMouseDown(true);
71251
71269
  multiSelect(id);
71252
71270
  },
71253
- onMouseEnter: isMouseDown ? function (e) {
71271
+ onMouseEnter: function onMouseEnter(e) {
71254
71272
  e.preventDefault();
71255
- if (e.ctrlKey || e.shiftKey) {
71273
+ if (!isMouseDown || simpleSelectionMode || e.ctrlKey || e.shiftKey) {
71256
71274
  return;
71257
71275
  }
71258
71276
  multiSelect(id);
71259
- } : null,
71277
+ setLastItemId(id);
71278
+ },
71260
71279
  onClick: function onClick(e) {
71261
71280
  e.preventDefault();
71262
-
71263
- if (e.ctrlKey) {
71281
+ if (e.ctrlKey && !simpleSelectionMode) {
71264
71282
  multiSelect(id);
71265
- } else if (e.shiftKey) {
71283
+ } else if (e.shiftKey && !simpleSelectionMode) {
71266
71284
  shiftSelect(index);
71267
71285
  } else {
71268
71286
  setIsMouseDown(false);
71269
71287
  setLastItemId(id);
71270
71288
  }
71271
71289
  }
71272
- // ondblclick: () => null
71273
71290
  };
71274
71291
  };
71275
- var onKeyUp = function onKeyUp(e) {
71276
- if (e.key === 'Shift' && !es_isEmpty(shiftIndexes)) {
71277
- apply();
71278
- } else if (e.key === 'Control' && !es_isEmpty(selectIds)) {
71279
- apply();
71280
- }
71281
- };
71282
71292
  var ref = Object(react["useRef"])();
71283
71293
  var classes = ScopeList_styles_useStyles();
71284
-
71285
71294
  Object(react["useEffect"])(function () {
71286
71295
  var current = ref.current;
71287
71296
  var handler = function handler(event) {
@@ -71304,7 +71313,6 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
71304
71313
  setScrollTop(undefined);
71305
71314
  }
71306
71315
  if (es_isNil(current)) return;
71307
-
71308
71316
  current.addEventListener('wheel', handler, { passive: false });
71309
71317
  return function () {
71310
71318
  current.removeEventListener('wheel', handler, { passive: false });
@@ -71322,7 +71330,8 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
71322
71330
  disablePadding: true,
71323
71331
  style: { height: maxHeight + 2 },
71324
71332
  onKeyUp: onKeyUp,
71325
- onMouseLeave: isMouseDown ? apply : null,
71333
+ onMouseUp: onMouseUp,
71334
+ onMouseLeave: onMouseLeave,
71326
71335
  ref: ref
71327
71336
  },
71328
71337
  react_default.a.createElement(
@@ -71359,11 +71368,10 @@ var VirtualizedTree_VirtualizedTree = function VirtualizedTree(props) {
71359
71368
  },
71360
71369
  NavigateIcon: es_has(itemId, expandedIds) ? ExpandLess_default.a : ExpandMore_default.a,
71361
71370
  isRtl: isRtl,
71362
- eventsCallbacks: eventsCallbacks,
71371
+ eventsListeners: itemEventsListeners(utils_getHierarchicalId(item), index),
71363
71372
  HTMLRenderer: HTMLRenderer,
71364
71373
  classes: classes,
71365
71374
  labels: labels,
71366
- index: index,
71367
71375
  style: style,
71368
71376
  accessibility: accessibility,
71369
71377
  ariaLabel: es_prop('navigateNext')(labels),
@@ -71395,7 +71403,8 @@ VirtualizedTree_VirtualizedTree.propTypes = {
71395
71403
  collapse: prop_types_default.a.func,
71396
71404
  treeHeight: prop_types_default.a.number,
71397
71405
  isGreyed: prop_types_default.a.func,
71398
- scopeGetter: prop_types_default.a.func
71406
+ scopeGetter: prop_types_default.a.func,
71407
+ simpleSelectionMode: prop_types_default.a.bool
71399
71408
  };
71400
71409
 
71401
71410
  /* harmony default export */ var src_VirtualizedTree_VirtualizedTree = (VirtualizedTree_VirtualizedTree);
@@ -72408,14 +72417,17 @@ var HierarchicalFilter_HierarchicalFilter = function HierarchicalFilter(props) {
72408
72417
  hasSpotlight = props.hasSpotlight,
72409
72418
  _props$disableAccesso = props.disableAccessor,
72410
72419
  disableAccessor = _props$disableAccesso === undefined ? es_always(false) : _props$disableAccesso,
72411
- allItems = props.allItems;
72420
+ allItems = props.allItems,
72421
+ _props$simpleSelectio = props.simpleSelectionMode,
72422
+ simpleSelectionMode = _props$simpleSelectio === undefined ? false : _props$simpleSelectio;
72412
72423
 
72413
72424
  var classes = ScopeList_styles_useStyles({ accessibility: accessibility });
72414
72425
  var theme = useTheme_useTheme();
72415
72426
  var isRtl = utils_getIsRtl(theme);
72416
72427
  var Chip = es_isNil(Tag) ? src_Tag_Tag : Tag;
72417
72428
  var _allGroupedItems = es_groupBy(es_propOr('#ROOT', 'parentId'), allItems);
72418
- var _disableAccessor = utils_getEvolvedDisableAccessor(_allGroupedItems, disableAccessor, es_always(false));
72429
+ var _disableAccessor = simpleSelectionMode ? disableAccessor : utils_getEvolvedDisableAccessor(_allGroupedItems, disableAccessor, es_always(false));
72430
+
72419
72431
  var tagValue = HierarchicalFilter_getCounter(items, _disableAccessor, tagAccessor);
72420
72432
  var isDisabled = function isDisabled(item) {
72421
72433
  return es_is(Function, disableAccessor) ? disableAccessor(item) : false;
@@ -72514,7 +72526,8 @@ HierarchicalFilter_HierarchicalFilter.propTypes = {
72514
72526
  spotlight: prop_types_default.a.object,
72515
72527
  setSpotlight: prop_types_default.a.func,
72516
72528
  hasSpotlight: prop_types_default.a.bool,
72517
- allItems: prop_types_default.a.array
72529
+ allItems: prop_types_default.a.array,
72530
+ simpleSelectionMode: prop_types_default.a.bool
72518
72531
  };
72519
72532
 
72520
72533
  /* harmony default export */ var src_HierarchicalFilter_HierarchicalFilter = (withSpotlight_withSpotlight(withExpansionTree_withExpansionTree(HierarchicalFilter_HierarchicalFilter)));