@sis-cc/dotstatsuite-visions 6.6.0 → 6.6.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.
Files changed (293) hide show
  1. package/es/Alert/Alert.js +135 -66
  2. package/es/Alert/index.js +1 -0
  3. package/es/ApiQueries/ApiQueries.js +79 -45
  4. package/es/ApiQueries/Query.js +105 -65
  5. package/es/ApiQueries/index.js +1 -0
  6. package/es/AuthDialog/index.js +103 -62
  7. package/es/Breadcrumbs/Breadcrumbs.js +38 -21
  8. package/es/Breadcrumbs/index.js +1 -0
  9. package/es/Button/Button.js +28 -11
  10. package/es/Button/index.js +1 -0
  11. package/es/ChartsConfig/Axis.js +76 -72
  12. package/es/ChartsConfig/ButtonGroup.js +51 -29
  13. package/es/ChartsConfig/ChartsConfig.js +187 -87
  14. package/es/ChartsConfig/ContainerTitle.js +36 -15
  15. package/es/ChartsConfig/Focus.js +48 -37
  16. package/es/ChartsConfig/Frequency.js +36 -24
  17. package/es/ChartsConfig/Series.js +43 -28
  18. package/es/ChartsConfig/Size.js +50 -36
  19. package/es/ChartsConfig/index.js +1 -0
  20. package/es/ChartsConfig/styles.js +4 -4
  21. package/es/ChartsConfig/utils.js +5 -1
  22. package/es/Chips/Chips.js +154 -99
  23. package/es/Chips/index.js +1 -0
  24. package/es/CollapseButtons/CollapseButtons.js +101 -61
  25. package/es/CollapseButtons/Item.js +70 -45
  26. package/es/CollapseButtons/Paper.js +21 -7
  27. package/es/CollapseButtons/index.js +1 -0
  28. package/es/DataEdit/DataEdit.js +124 -67
  29. package/es/DataEdit/Input.js +58 -27
  30. package/es/DataEdit/index.js +1 -0
  31. package/es/DataFooter/DataFooter.js +115 -68
  32. package/es/DataFooter/index.js +1 -0
  33. package/es/DataHeader/DataHeader.js +113 -75
  34. package/es/DataHeader/Flags.js +21 -8
  35. package/es/DataHeader/Title.js +15 -2
  36. package/es/DataHeader/TooltipHeader.js +63 -33
  37. package/es/DataHeader/index.js +1 -0
  38. package/es/DataHeader/utils.js +8 -8
  39. package/es/Dataflow/Dataflow.js +226 -132
  40. package/es/Dataflow/index.js +1 -0
  41. package/es/ExpansionPanel/ExpansionPanel.js +79 -42
  42. package/es/ExpansionPanel/index.js +1 -0
  43. package/es/ExpansionPanel/styles.js +5 -3
  44. package/es/Icons/AccessibilityFilled.js +8 -6
  45. package/es/Icons/AccessibilityOutlined.js +8 -6
  46. package/es/Icons/AccountFilled.js +8 -6
  47. package/es/Icons/AccountOutlined.js +8 -6
  48. package/es/Icons/Api.js +8 -6
  49. package/es/Icons/Asterisk.js +8 -6
  50. package/es/Icons/Bar.js +8 -6
  51. package/es/Icons/CopyContent.js +8 -6
  52. package/es/Icons/Cross.js +8 -6
  53. package/es/Icons/HSymbol.js +8 -6
  54. package/es/Icons/Row.js +8 -6
  55. package/es/Icons/Scatter.js +8 -6
  56. package/es/Icons/StackedBar.js +8 -6
  57. package/es/Icons/StackedRow.js +8 -6
  58. package/es/Icons/Timeline.js +8 -6
  59. package/es/Icons/VSymbol.js +8 -6
  60. package/es/Icons/Warning.js +14 -11
  61. package/es/Icons/index.js +1 -0
  62. package/es/Input/Input.js +56 -26
  63. package/es/Input/index.js +1 -0
  64. package/es/Input/with-input.js +25 -30
  65. package/es/InputNumber/InputNumber.js +51 -31
  66. package/es/InputNumber/index.js +1 -0
  67. package/es/LabelDivider/LabelDivider.js +18 -7
  68. package/es/LabelDivider/index.js +1 -0
  69. package/es/Loading/Loading.js +18 -9
  70. package/es/Loading/index.js +1 -0
  71. package/es/Logo/Logo.js +17 -11
  72. package/es/Logo/index.js +1 -0
  73. package/es/NoData/NoData.js +25 -17
  74. package/es/NoData/index.js +1 -0
  75. package/es/Pagination/Pagination.js +114 -70
  76. package/es/Pagination/index.js +1 -0
  77. package/es/PeriodPicker/PeriodPicker.js +124 -101
  78. package/es/PeriodPicker/constants.js +13 -78
  79. package/es/PeriodPicker/index.js +1 -0
  80. package/es/PeriodPicker/lib.js +23 -37
  81. package/es/PeriodPicker/styles.js +1 -0
  82. package/es/ScopeList/Header.js +60 -41
  83. package/es/ScopeList/Item.js +144 -98
  84. package/es/ScopeList/ScopeList.js +184 -132
  85. package/es/ScopeList/Selection.js +93 -51
  86. package/es/ScopeList/index.js +1 -0
  87. package/es/ScopeList/styles.js +3 -2
  88. package/es/ScopeList/with-scope-list.js +88 -151
  89. package/es/Select/Select.js +60 -44
  90. package/es/Select/index.js +1 -0
  91. package/es/Share/Form.js +88 -58
  92. package/es/Share/Mode.js +46 -30
  93. package/es/Share/Share.js +64 -41
  94. package/es/Share/index.js +1 -0
  95. package/es/SisccFooter/SisccFooter.js +36 -29
  96. package/es/SisccFooter/index.js +1 -0
  97. package/es/Spotlight/Fields.js +71 -37
  98. package/es/Spotlight/Spotlight.js +92 -51
  99. package/es/Spotlight/index.js +1 -0
  100. package/es/Spotlight/useSpotlight.js +13 -33
  101. package/es/Spotlight/useStyles.js +4 -2
  102. package/es/Table/Table.js +71 -50
  103. package/es/Table/header.js +50 -36
  104. package/es/Table/index.js +1 -0
  105. package/es/Table/itemCell.js +25 -13
  106. package/es/Table/row-header.js +50 -31
  107. package/es/Table/section-header.js +55 -30
  108. package/es/Table/section-rows.js +62 -38
  109. package/es/Table/styles.js +8 -2
  110. package/es/Table/tableCell.js +17 -7
  111. package/es/Table/tooltip.js +41 -21
  112. package/es/Table/useStyles.js +3 -2
  113. package/es/Table/valueCell.js +41 -26
  114. package/es/TableFooter/TableFooter.js +70 -42
  115. package/es/TableFooter/index.js +1 -0
  116. package/es/TableHeader/TableHeader.js +36 -18
  117. package/es/TableHeader/index.js +1 -0
  118. package/es/TableHtml5/TableHtml5.js +72 -60
  119. package/es/TableHtml5/cell.js +55 -35
  120. package/es/TableHtml5/flags.js +58 -29
  121. package/es/TableHtml5/header.js +67 -48
  122. package/es/TableHtml5/index.js +1 -0
  123. package/es/TableHtml5/section.js +121 -83
  124. package/es/TableHtml5/sectionHeader.js +72 -45
  125. package/es/TableHtml5/subHeader.js +63 -44
  126. package/es/TableLayout/Box.js +66 -33
  127. package/es/TableLayout/DnDItem.js +68 -37
  128. package/es/TableLayout/TableLayout.js +177 -105
  129. package/es/TableLayout/constants.js +2 -0
  130. package/es/TableLayout/index.js +1 -0
  131. package/es/TableLayout/lib.js +3 -1
  132. package/es/TablePreview/TablePreview.js +176 -99
  133. package/es/TablePreview/index.js +1 -0
  134. package/es/TablePreview/lib.js +4 -5
  135. package/es/TablePreview/styles.js +1 -0
  136. package/es/Tag/Tag.js +21 -5
  137. package/es/Tag/index.js +1 -0
  138. package/es/ToggleButton/ToggleButton.js +29 -17
  139. package/es/ToggleButton/index.js +1 -0
  140. package/es/Tooltip/Tooltip.js +32 -20
  141. package/es/Tooltip/index.js +1 -0
  142. package/es/VerticalButton/VerticalButton.js +22 -17
  143. package/es/VerticalButton/index.js +1 -0
  144. package/es/index.js +4 -2
  145. package/es/theme.js +14 -22
  146. package/es/utils.js +14 -16
  147. package/lib/Alert/Alert.js +168 -87
  148. package/lib/Alert/index.js +12 -7
  149. package/lib/ApiQueries/ApiQueries.js +105 -61
  150. package/lib/ApiQueries/Query.js +132 -85
  151. package/lib/ApiQueries/index.js +12 -7
  152. package/lib/AuthDialog/index.js +137 -82
  153. package/lib/Breadcrumbs/Breadcrumbs.js +68 -39
  154. package/lib/Breadcrumbs/index.js +12 -7
  155. package/lib/Button/Button.js +47 -28
  156. package/lib/Button/index.js +12 -7
  157. package/lib/ChartsConfig/Axis.js +100 -88
  158. package/lib/ChartsConfig/ButtonGroup.js +74 -43
  159. package/lib/ChartsConfig/ChartsConfig.js +236 -113
  160. package/lib/ChartsConfig/ContainerTitle.js +59 -30
  161. package/lib/ChartsConfig/Focus.js +71 -53
  162. package/lib/ChartsConfig/Frequency.js +59 -39
  163. package/lib/ChartsConfig/Series.js +70 -45
  164. package/lib/ChartsConfig/Size.js +77 -53
  165. package/lib/ChartsConfig/index.js +12 -7
  166. package/lib/ChartsConfig/styles.js +11 -16
  167. package/lib/ChartsConfig/utils.js +13 -14
  168. package/lib/Chips/Chips.js +192 -122
  169. package/lib/Chips/index.js +12 -7
  170. package/lib/CollapseButtons/CollapseButtons.js +134 -84
  171. package/lib/CollapseButtons/Item.js +98 -64
  172. package/lib/CollapseButtons/Paper.js +41 -19
  173. package/lib/CollapseButtons/index.js +12 -7
  174. package/lib/DataEdit/DataEdit.js +156 -88
  175. package/lib/DataEdit/Input.js +82 -42
  176. package/lib/DataEdit/index.js +12 -7
  177. package/lib/DataFooter/DataFooter.js +144 -88
  178. package/lib/DataFooter/index.js +12 -7
  179. package/lib/DataHeader/DataHeader.js +158 -106
  180. package/lib/DataHeader/Flags.js +34 -18
  181. package/lib/DataHeader/Title.js +27 -11
  182. package/lib/DataHeader/TooltipHeader.js +79 -48
  183. package/lib/DataHeader/index.js +12 -7
  184. package/lib/DataHeader/utils.js +10 -16
  185. package/lib/Dataflow/Dataflow.js +277 -159
  186. package/lib/Dataflow/index.js +12 -7
  187. package/lib/ExpansionPanel/ExpansionPanel.js +116 -63
  188. package/lib/ExpansionPanel/index.js +12 -7
  189. package/lib/ExpansionPanel/styles.js +12 -15
  190. package/lib/Icons/AccessibilityFilled.js +17 -15
  191. package/lib/Icons/AccessibilityOutlined.js +17 -15
  192. package/lib/Icons/AccountFilled.js +17 -15
  193. package/lib/Icons/AccountOutlined.js +17 -15
  194. package/lib/Icons/Api.js +17 -15
  195. package/lib/Icons/Asterisk.js +17 -15
  196. package/lib/Icons/Bar.js +17 -15
  197. package/lib/Icons/CopyContent.js +17 -15
  198. package/lib/Icons/Cross.js +17 -15
  199. package/lib/Icons/HSymbol.js +17 -15
  200. package/lib/Icons/Row.js +17 -15
  201. package/lib/Icons/Scatter.js +17 -15
  202. package/lib/Icons/StackedBar.js +17 -15
  203. package/lib/Icons/StackedRow.js +17 -15
  204. package/lib/Icons/Timeline.js +17 -15
  205. package/lib/Icons/VSymbol.js +17 -15
  206. package/lib/Icons/Warning.js +31 -27
  207. package/lib/Icons/index.js +152 -68
  208. package/lib/Input/Input.js +85 -47
  209. package/lib/Input/index.js +12 -7
  210. package/lib/Input/with-input.js +35 -38
  211. package/lib/InputNumber/InputNumber.js +80 -50
  212. package/lib/InputNumber/index.js +12 -7
  213. package/lib/LabelDivider/LabelDivider.js +37 -23
  214. package/lib/LabelDivider/index.js +12 -7
  215. package/lib/Loading/Loading.js +35 -20
  216. package/lib/Loading/index.js +12 -7
  217. package/lib/Logo/Logo.js +28 -20
  218. package/lib/Logo/index.js +12 -7
  219. package/lib/NoData/NoData.js +42 -28
  220. package/lib/NoData/index.js +12 -7
  221. package/lib/Pagination/Pagination.js +150 -91
  222. package/lib/Pagination/index.js +12 -7
  223. package/lib/PeriodPicker/PeriodPicker.js +150 -121
  224. package/lib/PeriodPicker/constants.js +37 -126
  225. package/lib/PeriodPicker/index.js +12 -7
  226. package/lib/PeriodPicker/lib.js +61 -99
  227. package/lib/PeriodPicker/styles.js +4 -7
  228. package/lib/ScopeList/Header.js +88 -58
  229. package/lib/ScopeList/Item.js +177 -116
  230. package/lib/ScopeList/ScopeList.js +234 -160
  231. package/lib/ScopeList/Selection.js +131 -70
  232. package/lib/ScopeList/index.js +12 -7
  233. package/lib/ScopeList/styles.js +9 -10
  234. package/lib/ScopeList/with-scope-list.js +108 -199
  235. package/lib/Select/Select.js +80 -59
  236. package/lib/Select/index.js +12 -7
  237. package/lib/Share/Form.js +119 -77
  238. package/lib/Share/Mode.js +78 -49
  239. package/lib/Share/Share.js +91 -59
  240. package/lib/Share/index.js +12 -7
  241. package/lib/SisccFooter/SisccFooter.js +63 -44
  242. package/lib/SisccFooter/index.js +12 -7
  243. package/lib/Spotlight/Fields.js +100 -54
  244. package/lib/Spotlight/Spotlight.js +136 -75
  245. package/lib/Spotlight/index.js +12 -7
  246. package/lib/Spotlight/useSpotlight.js +20 -44
  247. package/lib/Spotlight/useStyles.js +12 -15
  248. package/lib/Table/Table.js +102 -69
  249. package/lib/Table/header.js +70 -51
  250. package/lib/Table/index.js +12 -7
  251. package/lib/Table/itemCell.js +41 -25
  252. package/lib/Table/row-header.js +75 -49
  253. package/lib/Table/section-header.js +82 -50
  254. package/lib/Table/section-rows.js +94 -60
  255. package/lib/Table/styles.js +25 -23
  256. package/lib/Table/tableCell.js +37 -19
  257. package/lib/Table/tooltip.js +54 -36
  258. package/lib/Table/useStyles.js +8 -11
  259. package/lib/Table/valueCell.js +59 -39
  260. package/lib/TableFooter/TableFooter.js +93 -57
  261. package/lib/TableFooter/index.js +12 -7
  262. package/lib/TableHeader/TableHeader.js +56 -32
  263. package/lib/TableHeader/index.js +12 -7
  264. package/lib/TableHtml5/TableHtml5.js +100 -78
  265. package/lib/TableHtml5/cell.js +84 -52
  266. package/lib/TableHtml5/flags.js +82 -48
  267. package/lib/TableHtml5/header.js +97 -66
  268. package/lib/TableHtml5/index.js +17 -8
  269. package/lib/TableHtml5/section.js +163 -108
  270. package/lib/TableHtml5/sectionHeader.js +102 -64
  271. package/lib/TableHtml5/subHeader.js +93 -64
  272. package/lib/TableLayout/Box.js +97 -54
  273. package/lib/TableLayout/DnDItem.js +98 -58
  274. package/lib/TableLayout/TableLayout.js +232 -140
  275. package/lib/TableLayout/constants.js +6 -8
  276. package/lib/TableLayout/index.js +12 -7
  277. package/lib/TableLayout/lib.js +9 -14
  278. package/lib/TablePreview/TablePreview.js +205 -118
  279. package/lib/TablePreview/index.js +12 -7
  280. package/lib/TablePreview/lib.js +19 -30
  281. package/lib/TablePreview/styles.js +6 -7
  282. package/lib/Tag/Tag.js +38 -19
  283. package/lib/Tag/index.js +12 -7
  284. package/lib/ToggleButton/ToggleButton.js +55 -33
  285. package/lib/ToggleButton/index.js +12 -7
  286. package/lib/Tooltip/Tooltip.js +50 -34
  287. package/lib/Tooltip/index.js +12 -7
  288. package/lib/VerticalButton/VerticalButton.js +46 -40
  289. package/lib/VerticalButton/index.js +12 -7
  290. package/lib/index.js +304 -137
  291. package/lib/theme.js +17 -31
  292. package/lib/utils.js +31 -46
  293. package/package.json +10 -2
@@ -1,9 +1,12 @@
1
- import _assertThisInitialized from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized";
2
- import _inheritsLoose from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inheritsLoose";
3
- import _defineProperty from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/defineProperty";
4
- import _objectWithoutPropertiesLoose from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- import _extends from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends";
6
- var _excluded = ["id", "isSelected"];
1
+ var _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; };
2
+
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
+
5
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
6
+
7
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
8
+
9
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
7
10
 
8
11
  /* eslint react/prop-types: 0 */
9
12
  import React from 'react';
@@ -18,19 +21,18 @@ var range = function range(tab) {
18
21
  var getCounter = function getCounter(items, displayAccessor, tagAccessor) {
19
22
  var count = R.pipe(R.filter(R.prop('isSelected')), R.length)(items);
20
23
  var total = R.pipe(R.when(R.always(R.is(Function, displayAccessor)), R.filter(displayAccessor)), R.length)(items);
21
-
22
24
  if (R.is(Function, tagAccessor)) {
23
25
  return tagAccessor(count, total);
24
26
  }
25
-
26
- return count + "/" + total;
27
+ return count + '/' + total;
27
28
  };
28
29
 
29
30
  export var getIsBlank = function getIsBlank(items, displayAccessor, limitDisplay) {
30
31
  if (R.not(R.is(Function)(displayAccessor))) return R.pipe(R.length, R.gte(limitDisplay))(items);
31
32
  return R.pipe(R.filter(displayAccessor), R.length, R.gte(limitDisplay))(items);
32
- }; //----------------------------------------------------------------------------------DisplayOrDisable
33
+ };
33
34
 
35
+ //----------------------------------------------------------------------------------DisplayOrDisable
34
36
  var addDisableProps = function addDisableProps(displayAccessor) {
35
37
  return function (list) {
36
38
  if (R.not(R.is(Function)(displayAccessor))) return list;
@@ -41,22 +43,21 @@ var addDisableProps = function addDisableProps(displayAccessor) {
41
43
  };
42
44
 
43
45
  var indexByParentId = R.indexBy(R.prop('parentId'));
44
-
45
46
  var indexByParentIdWithHasData = function indexByParentIdWithHasData(displayAccessor) {
46
47
  return R.indexBy(R.ifElse(displayAccessor, R.prop('parentId'), R.always(undefined)));
47
48
  };
48
-
49
49
  export var getItemsIndexedByParentId = function getItemsIndexedByParentId(displayAccessor) {
50
50
  return function (items) {
51
51
  if (R.not(R.is(Function)(displayAccessor))) return indexByParentId(items);
52
52
  return R.converge(R.mergeRight, [indexByParentId, indexByParentIdWithHasData(displayAccessor)])(items);
53
53
  };
54
- }; //-----------------------------------------------------------------------------------------Spotlight
54
+ };
55
55
 
56
+ //-----------------------------------------------------------------------------------------Spotlight
56
57
  var getSpotlightedList = function getSpotlightedList(_ref) {
57
58
  var topElementProps = _ref.topElementProps,
58
59
  _ref$term = _ref.term,
59
- term = _ref$term === void 0 ? '' : _ref$term,
60
+ term = _ref$term === undefined ? '' : _ref$term,
60
61
  items = _ref.items,
61
62
  itemsById = _ref.itemsById,
62
63
  noPath = _ref.noPath,
@@ -72,15 +73,16 @@ var getSpotlightedList = function getSpotlightedList(_ref) {
72
73
 
73
74
  export var getPlaceholder = function getPlaceholder(_ref2) {
74
75
  var _ref2$placeholder = _ref2.placeholder,
75
- placeholder = _ref2$placeholder === void 0 ? '' : _ref2$placeholder,
76
+ placeholder = _ref2$placeholder === undefined ? '' : _ref2$placeholder,
76
77
  mainPlaceholder = _ref2.mainPlaceholder,
77
78
  secondaryPlaceholder = _ref2.secondaryPlaceholder,
78
79
  currentItem = _ref2.currentItem;
80
+
79
81
  if (R.and(R.isNil(mainPlaceholder), R.isNil(secondaryPlaceholder))) return placeholder;
80
82
  if (R.isNil(currentItem)) return mainPlaceholder;
81
83
  return secondaryPlaceholder;
82
- }; //----------------------------------------------------------------------------------------------List
83
-
84
+ };
85
+ //----------------------------------------------------------------------------------------------List
84
86
  export var withHasChild = function withHasChild(itemsByParentId) {
85
87
  return function (item) {
86
88
  return R.assoc('hasChild', R.pipe(R.prop(item.id), R.isNil, R.not)(itemsByParentId))(item);
@@ -94,7 +96,6 @@ export var getCurrentList = function getCurrentList(_ref3) {
94
96
  if (R.equals(currentItemId, item.parentId)) {
95
97
  return [].concat(acc, [withHasChild(itemsByParentId)(item)]);
96
98
  }
97
-
98
99
  return acc;
99
100
  }, [])(items);
100
101
  };
@@ -108,35 +109,20 @@ export var getList = function getList(_ref4) {
108
109
  term = _ref4.term,
109
110
  hasPath = _ref4.hasPath,
110
111
  displayAccessor = _ref4.displayAccessor;
111
- var currentItemId = currentItem ? R.prop('id')(currentItem) : null;
112
112
 
113
+ var currentItemId = currentItem ? R.prop('id')(currentItem) : null;
113
114
  if (R.or(R.isEmpty(term), R.isNil(R.prop('defaultSpotlight')(topElementProps)))) {
114
115
  var itemsByParentIdDisplayed = getItemsIndexedByParentId(displayAccessor)(items);
115
116
  if (R.isNil(currentItemId)) return R.pipe(getMainList, R.map(function (item) {
116
117
  return withHasChild(itemsByParentIdDisplayed)(item);
117
118
  }))(items);
118
- return getCurrentList({
119
- currentItemId: currentItemId,
120
- itemsByParentId: itemsByParentIdDisplayed,
121
- items: items
122
- });
119
+ return getCurrentList({ currentItemId: currentItemId, itemsByParentId: itemsByParentIdDisplayed, items: items });
123
120
  }
124
-
125
- if (R.isNil(currentItemId)) return getSpotlightedList({
126
- topElementProps: topElementProps,
127
- term: term,
128
- items: items,
129
- itemsById: itemsById,
130
- hasPath: hasPath
131
- });
121
+ if (R.isNil(currentItemId)) return getSpotlightedList({ topElementProps: topElementProps, term: term, items: items, itemsById: itemsById, hasPath: hasPath });
132
122
  return getSpotlightedList({
133
123
  topElementProps: topElementProps,
134
124
  term: term,
135
- items: getCurrentList({
136
- currentItemId: currentItemId,
137
- itemsByParentId: itemsByParentId,
138
- items: items
139
- }),
125
+ items: getCurrentList({ currentItemId: currentItemId, itemsByParentId: itemsByParentId, items: items }),
140
126
  noPath: true,
141
127
  hasPath: hasPath
142
128
  });
@@ -151,6 +137,7 @@ export var getScopeList = function getScopeList(_ref5) {
151
137
  currentItem = _ref5.currentItem,
152
138
  term = _ref5.term,
153
139
  hasPath = _ref5.hasPath;
140
+
154
141
  if (R.not(isActivePanel)) return [];
155
142
  return R.pipe(getList, addDisableProps(displayAccessor))({
156
143
  items: items,
@@ -162,8 +149,8 @@ export var getScopeList = function getScopeList(_ref5) {
162
149
  hasPath: hasPath,
163
150
  displayAccessor: displayAccessor
164
151
  });
165
- }; //----------------------------------------------------------------------------------------------Node
166
-
152
+ };
153
+ //----------------------------------------------------------------------------------------------Node
167
154
  export var getEnhancedNode = function getEnhancedNode(currentItem, items, itemsById, hasPath) {
168
155
  if (R.isNil(currentItem)) return currentItem;
169
156
  var id = R.prop('id')(currentItem);
@@ -178,13 +165,14 @@ var getCurrentItem = function getCurrentItem(_ref6) {
178
165
  items = _ref6.items,
179
166
  itemsById = _ref6.itemsById,
180
167
  hasPath = _ref6.hasPath;
168
+
181
169
  if (R.not(isActivePanel)) return null;
182
170
  return getEnhancedNode(currentItem, items, itemsById, hasPath);
183
- }; //---------------------------------------------------------------------------------------------Multi
184
-
185
-
171
+ };
172
+ //---------------------------------------------------------------------------------------------Multi
186
173
  export var getItemsIds = R.curry(function (disableAccessor, _ref7, items) {
187
174
  var isSelected = _ref7.isSelected;
175
+
188
176
  return R.reduce(function (acc, item) {
189
177
  if (disableAccessor(item)) return acc;
190
178
  if (R.equals(R.not(R.prop('isSelected', item)), isSelected)) return acc;
@@ -196,7 +184,7 @@ var updateIndexSelected = function updateIndexSelected(index) {
196
184
  return R.ifElse(R.isEmpty, R.always([index, index]), R.update(1, index));
197
185
  };
198
186
 
199
- export var getItemsGroupByLevel = function getItemsGroupByLevel(disableAccessor) {
187
+ var getItemsGroupByLevel = function getItemsGroupByLevel(disableAccessor) {
200
188
  return function (itemsById) {
201
189
  return R.pipe(R.reduce(function (acc, item) {
202
190
  if (disableAccessor(item)) return acc;
@@ -204,15 +192,14 @@ export var getItemsGroupByLevel = function getItemsGroupByLevel(disableAccessor)
204
192
  }, []), R.reduceBy(function (acc, _ref8) {
205
193
  var id = _ref8.id,
206
194
  isSelected = _ref8.isSelected,
207
- rest = _objectWithoutPropertiesLoose(_ref8, _excluded);
195
+ rest = _objectWithoutProperties(_ref8, ['id', 'isSelected']);
208
196
 
209
- return R.append(_extends({}, rest, {
210
- id: id,
211
- isSelected: isSelected
212
- }), acc);
197
+ return R.append(_extends({}, rest, { id: id, isSelected: isSelected }), acc);
213
198
  }, [], R.prop('level')));
214
199
  };
215
200
  };
201
+
202
+ export { getItemsGroupByLevel };
216
203
  export var getIsAllSelected = function getIsAllSelected(disableAccessor) {
217
204
  return R.pipe(R.reject(disableAccessor), R.all(R.prop('isSelected')));
218
205
  };
@@ -221,57 +208,60 @@ export var setAllTo = function setAllTo(list) {
221
208
  return R.nth(index, list);
222
209
  }), R.head, R.prop('isSelected'));
223
210
  };
211
+
224
212
  var setPreviewSelectedList = R.curry(function (indexes, setValue, list) {
225
213
  return R.reduce(function (acc, index) {
226
214
  return R.over(R.lensIndex(index), R.over(R.lensProp('isSelected'), setValue))(acc);
227
215
  })(list, indexes);
228
216
  });
217
+
229
218
  var getRangeIndexes = R.pipe(R.sort(function (a, b) {
230
219
  return a - b;
231
220
  }), R.over(R.lensIndex(1), R.add(1)), range);
221
+
232
222
  export var setSelection = function setSelection(_ref9, list) {
233
223
  var isBulkSelection = _ref9.isBulkSelection,
234
224
  isDiscrete = _ref9.isDiscrete,
235
225
  _ref9$items = _ref9.items,
236
- items = _ref9$items === void 0 ? [] : _ref9$items;
226
+ items = _ref9$items === undefined ? [] : _ref9$items;
237
227
  var _items$ = items[0],
238
- indexes = _items$ === void 0 ? [] : _items$,
228
+ indexes = _items$ === undefined ? [] : _items$,
239
229
  _items$2 = items[1],
240
- applyToSelected = _items$2 === void 0 ? R.identity : _items$2;
241
- if (R.or(R.isEmpty(indexes), isBulkSelection)) return list;
230
+ applyToSelected = _items$2 === undefined ? R.identity : _items$2;
242
231
 
232
+ if (R.or(R.isEmpty(indexes), isBulkSelection)) return list;
243
233
  if (isDiscrete) {
244
234
  return setPreviewSelectedList(indexes, R.not)(list);
245
235
  }
246
-
247
236
  var isSelected = R.pipe(setAllTo(list), applyToSelected)(indexes);
248
237
  return setPreviewSelectedList(getRangeIndexes(indexes), R.always(isSelected))(list);
249
238
  };
239
+
250
240
  var getPropByIndex = R.curry(function (fn, indexes, list) {
251
241
  return R.map(R.pipe(R.nth(R.__, list), fn))(indexes);
252
242
  });
253
243
 
254
244
  var allEquals = function allEquals(list) {
255
245
  return R.all(R.equals(R.head(list)))(list);
256
- }; //-----------------------------------------------------------------------------------------------Hoc
257
-
246
+ };
258
247
 
248
+ //-----------------------------------------------------------------------------------------------Hoc
259
249
  export var withScopeList = function withScopeList(Component) {
260
- var _class, _temp;
250
+ var _class, _temp2;
261
251
 
262
- return _temp = _class = /*#__PURE__*/function (_React$Component) {
263
- _inheritsLoose(_class, _React$Component);
252
+ return _temp2 = _class = function (_React$Component) {
253
+ _inherits(_class, _React$Component);
264
254
 
265
255
  function _class() {
266
- var _this;
256
+ var _temp, _this, _ret;
267
257
 
268
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
258
+ _classCallCheck(this, _class);
259
+
260
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
269
261
  args[_key] = arguments[_key];
270
262
  }
271
263
 
272
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
273
-
274
- _defineProperty(_assertThisInitialized(_this), "state", {
264
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
275
265
  term: R.propOr('', 'term')(_this.props),
276
266
  levels: [],
277
267
  shiftSelection: [],
@@ -279,164 +269,120 @@ export var withScopeList = function withScopeList(Component) {
279
269
  mouseSelection: [],
280
270
  isMousePreSelection: false,
281
271
  applyToShiftSelected: R.identity
282
- });
283
-
284
- _defineProperty(_assertThisInitialized(_this), "changeList", function (id) {
285
- return _this.setState({
286
- currentItem: R.prop(id)(_this.state.itemsById),
287
- term: ''
288
- });
289
- });
290
-
291
- _defineProperty(_assertThisInitialized(_this), "changeSelection", function (panelId) {
272
+ }, _this.changeList = function (id) {
273
+ return _this.setState({ currentItem: R.prop(id)(_this.state.itemsById), term: '' });
274
+ }, _this.changeSelection = function (panelId) {
292
275
  return function (id) {
293
276
  return function (event) {
294
277
  event.preventDefault();
295
-
296
278
  if (R.is(Function, _this.props.changeSelection)) {
297
279
  return _this.props.changeSelection(panelId, [id]);
298
280
  }
299
281
  };
300
282
  };
301
- });
302
-
303
- _defineProperty(_assertThisInitialized(_this), "changeSpotlight", function (spotlight) {
304
- return _this.setState({
305
- term: R.propOr('', 'term')(spotlight)
306
- });
307
- });
308
-
309
- _defineProperty(_assertThisInitialized(_this), "changeMutliSelection", function (panelId) {
283
+ }, _this.changeSpotlight = function (spotlight) {
284
+ return _this.setState({ term: R.propOr('', 'term')(spotlight) });
285
+ }, _this.changeMutliSelection = function (panelId) {
310
286
  return function (ids) {
311
287
  return function (event) {
312
288
  event.preventDefault();
313
289
  if (R.isEmpty(ids)) return;
314
-
315
290
  if (R.is(Function, _this.props.changeSelection)) {
316
291
  return _this.props.changeSelection(panelId, ids);
317
292
  }
318
-
319
293
  return null;
320
294
  };
321
295
  };
322
- });
323
-
324
- _defineProperty(_assertThisInitialized(_this), "changeLevelSelection", function (panelId, disableAccessor) {
296
+ }, _this.changeLevelSelection = function (panelId, disableAccessor) {
325
297
  return function (itemsGroupByLevel) {
326
298
  return function (level, isSelected) {
327
299
  return function (event) {
328
300
  event.preventDefault();
329
-
330
301
  if (R.is(Function, _this.props.changeSelection)) {
331
302
  return _this.props.changeSelection(panelId, R.pipe(R.prop(level), function (items) {
332
- return getItemsIds(disableAccessor)({
333
- isSelected: isSelected
334
- }, items);
303
+ return getItemsIds(disableAccessor)({ isSelected: isSelected }, items);
335
304
  })(itemsGroupByLevel));
336
305
  }
337
-
338
306
  return;
339
307
  };
340
308
  };
341
309
  };
342
- });
343
-
344
- _defineProperty(_assertThisInitialized(_this), "changeBulkPreSelections", function (id, index) {
310
+ }, _this.changeBulkPreSelections = function (id, index) {
345
311
  return function (event) {
346
312
  event.preventDefault();
347
-
348
313
  if (event.shiftKey && !R.isEmpty(_this.state.shiftSelection)) {
349
314
  return _this.setState({
350
315
  shiftSelection: updateIndexSelected(index)(_this.state.shiftSelection)
351
316
  });
352
317
  }
353
-
354
318
  if (event.shiftKey && R.isEmpty(_this.state.shiftSelection)) {
355
319
  _this.setState({
356
320
  shiftSelection: [index, index],
357
321
  applyToShiftSelected: R.not
358
322
  });
359
323
  }
360
-
361
324
  if (event.ctrlKey) {
362
325
  return _this.setState({
363
326
  ctrlSelection: R.ifElse(R.includes(index), R.without([index]), R.append(index))(_this.state.ctrlSelection)
364
327
  });
365
328
  }
366
329
  };
367
- });
368
-
369
- _defineProperty(_assertThisInitialized(_this), "changeMultiSelectionKeyUp", function (disableAccessor) {
330
+ }, _this.changeMultiSelectionKeyUp = function (disableAccessor) {
370
331
  return function (_ref10) {
371
332
  var list = _ref10.list,
372
333
  id = _ref10.id;
373
334
  return function (e) {
374
335
  var shiftSelection = _this.state.shiftSelection;
375
- var ctrlSelection = _this.state.ctrlSelection; // e.shiftKey doesn't work
336
+ var ctrlSelection = _this.state.ctrlSelection;
376
337
 
338
+ // e.shiftKey doesn't work
377
339
  if (R.and(e.key === 'Shift', R.not(R.isEmpty(shiftSelection)))) {
378
340
  if (allEquals(shiftSelection)) return;
379
341
  var items = R.pipe(getPropByIndex(R.identity), R.reject(disableAccessor))(getRangeIndexes(shiftSelection), list);
380
342
  var indexFirstElement = R.head(shiftSelection);
381
-
382
343
  _this.changeMutliSelection(id)(getItemsIds(disableAccessor)({
383
344
  isSelected: !R.pipe(R.nth(indexFirstElement), R.prop('isSelected'), _this.state.applyToShiftSelected)(list)
384
345
  })(items))(e);
385
-
386
346
  return _this.setState({
387
347
  shiftSelection: [R.last(shiftSelection), R.last(shiftSelection)],
388
348
  applyToShiftSelected: R.identity
389
349
  });
390
- } // e.ctrlKey doesn't work
391
-
392
-
350
+ }
351
+ // e.ctrlKey doesn't work
393
352
  if (R.and(e.key === 'Control', R.not(R.isEmpty(ctrlSelection)))) {
394
353
  _this.changeMutliSelection(id)(getPropByIndex(R.prop('id'), ctrlSelection, list))(e);
395
-
396
354
  return _this.setState({
397
355
  ctrlSelection: [],
398
356
  shiftSelection: [R.last(ctrlSelection), R.last(ctrlSelection)]
399
357
  });
400
358
  }
401
-
402
359
  return;
403
360
  };
404
361
  };
405
- });
406
-
407
- _defineProperty(_assertThisInitialized(_this), "changeMouseSelection", function (disableAccessor) {
362
+ }, _this.changeMouseSelection = function (disableAccessor) {
408
363
  return function (_ref11) {
409
364
  var list = _ref11.list,
410
365
  id = _ref11.id;
411
366
  return function (index, mouseAction) {
412
367
  return function (e) {
413
- if (R.or(e.ctrlKey, e.shiftKey)) return _this.setState({
414
- mouseSelection: []
415
- });
368
+ if (R.or(e.ctrlKey, e.shiftKey)) return _this.setState({ mouseSelection: [] });
416
369
  var mouseSelection = _this.state.mouseSelection;
417
370
  var isMousePreSelection = _this.state.isMousePreSelection;
418
-
419
371
  if (R.prop('isDown')(mouseAction)) {
420
372
  return _this.setState({
421
373
  mouseSelection: updateIndexSelected(index)(mouseSelection),
422
374
  isMousePreSelection: true
423
375
  });
424
- } // if (R.isEmpty(mouseSelection)) return;
425
-
426
-
376
+ }
377
+ // if (R.isEmpty(mouseSelection)) return;
427
378
  if (R.and(R.prop('isOver')(mouseAction), isMousePreSelection)) {
428
379
  return _this.setState({
429
380
  mouseSelection: updateIndexSelected(index)(mouseSelection)
430
381
  });
431
382
  }
432
-
433
383
  if (R.prop('isUp')(mouseAction) && isMousePreSelection) {
434
384
  var items = R.pipe(getPropByIndex(R.identity), R.reject(disableAccessor))(getRangeIndexes(mouseSelection), list);
435
-
436
- _this.changeMutliSelection(id)(getItemsIds(disableAccessor)({
437
- isSelected: R.prop('isSelected', R.head(items))
438
- })(items))(e);
439
-
385
+ _this.changeMutliSelection(id)(getItemsIds(disableAccessor)({ isSelected: R.prop('isSelected', R.head(items)) })(items))(e);
440
386
  return _this.setState({
441
387
  mouseSelection: [],
442
388
  isMousePreSelection: false,
@@ -446,26 +392,24 @@ export var withScopeList = function withScopeList(Component) {
446
392
  };
447
393
  };
448
394
  };
449
- });
450
-
451
- _defineProperty(_assertThisInitialized(_this), "render", function () {
395
+ }, _this.render = function () {
452
396
  // "items", "itemsByParentId", "itemsById" are the same collection,
453
397
  // but only "items" is updated by the selection (on hold the selection): { isSelected: true/false }
454
398
  var _this$props = _this.props,
455
399
  displayAccessor = _this$props.displayAccessor,
456
400
  _this$props$disableAc = _this$props.disableAccessor,
457
- disableAccessor = _this$props$disableAc === void 0 ? R.prop('isDisabled') : _this$props$disableAc,
401
+ disableAccessor = _this$props$disableAc === undefined ? R.prop('isDisabled') : _this$props$disableAc,
458
402
  tagAccessor = _this$props.tagAccessor,
459
403
  items = _this$props.items,
460
404
  _this$props$topElemen = _this$props.topElementProps,
461
- topElementProps = _this$props$topElemen === void 0 ? {} : _this$props$topElemen,
405
+ topElementProps = _this$props$topElemen === undefined ? {} : _this$props$topElemen,
462
406
  activePanelId = _this$props.activePanelId,
463
407
  id = _this$props.id,
464
408
  hasPath = _this$props.hasPath,
465
409
  _this$props$testId = _this$props.testId,
466
- testId = _this$props$testId === void 0 ? 'scopeList' : _this$props$testId,
410
+ testId = _this$props$testId === undefined ? 'scopeList' : _this$props$testId,
467
411
  _this$props$limitDisp = _this$props.limitDisplay,
468
- limitDisplay = _this$props$limitDisp === void 0 ? 0 : _this$props$limitDisp,
412
+ limitDisplay = _this$props$limitDisp === undefined ? 0 : _this$props$limitDisp,
469
413
  bulkSelection = _this$props.bulkSelection;
470
414
  var _this$state = _this.state,
471
415
  currentItem = _this$state.currentItem,
@@ -476,6 +420,7 @@ export var withScopeList = function withScopeList(Component) {
476
420
  ctrlSelection = _this$state.ctrlSelection,
477
421
  mouseSelection = _this$state.mouseSelection,
478
422
  applyToShiftSelected = _this$state.applyToShiftSelected;
423
+
479
424
  var isActivePanel = R.equals(activePanelId, id);
480
425
  var list = getScopeList({
481
426
  items: items,
@@ -489,7 +434,7 @@ export var withScopeList = function withScopeList(Component) {
489
434
  displayAccessor: displayAccessor,
490
435
  disableAccessor: disableAccessor
491
436
  });
492
- return /*#__PURE__*/React.createElement(Component, _extends({}, _this.props, {
437
+ return React.createElement(Component, _extends({}, _this.props, {
493
438
  disableAccessor: disableAccessor,
494
439
  itemsById: itemsById,
495
440
  items: items,
@@ -519,31 +464,23 @@ export var withScopeList = function withScopeList(Component) {
519
464
  })([[ctrlSelection], [mouseSelection, R.not], [shiftSelection, applyToShiftSelected]])
520
465
  }, list) : list,
521
466
  changeSelection: bulkSelection ? _this.changeBulkPreSelections : _this.changeSelection(id),
522
- changeMutliSelection: bulkSelection ? _this.changeMutliSelection(id)(getItemsIds(disableAccessor)({
523
- isSelected: getIsAllSelected(disableAccessor)(list)
524
- }, list)) : null,
467
+ changeMutliSelection: bulkSelection ? _this.changeMutliSelection(id)(getItemsIds(disableAccessor)({ isSelected: getIsAllSelected(disableAccessor)(list) }, list)) : null,
525
468
  changeLevelSelection: bulkSelection ? _this.changeLevelSelection(id, disableAccessor) : null,
526
469
  isCurrentListAllSelected: bulkSelection ? getIsAllSelected(disableAccessor)(list) : null,
527
- changeMultiSelectionKeyUp: bulkSelection ? _this.changeMultiSelectionKeyUp(disableAccessor)({
528
- list: list,
529
- id: id
530
- }) : null,
531
- changeMouseSelection: bulkSelection ? _this.changeMouseSelection(disableAccessor)({
532
- list: list,
533
- id: id
534
- }) : null
470
+ changeMultiSelectionKeyUp: bulkSelection ? _this.changeMultiSelectionKeyUp(disableAccessor)({ list: list, id: id }) : null,
471
+ changeMouseSelection: bulkSelection ? _this.changeMouseSelection(disableAccessor)({ list: list, id: id }) : null
535
472
  }));
536
- });
537
-
538
- return _this;
473
+ }, _temp), _possibleConstructorReturn(_this, _ret);
539
474
  }
540
475
 
476
+ //---------------------------------------------------------------------------------bulkSelection
477
+
478
+
541
479
  return _class;
542
- }(React.Component), _defineProperty(_class, "getDerivedStateFromProps", function (props, state) {
480
+ }(React.Component), _class.getDerivedStateFromProps = function (props, state) {
543
481
  return _extends({}, state, {
544
482
  itemsById: R.indexBy(R.prop('id'), props.items),
545
483
  itemsByParentId: getItemsIndexedByParentId(props.displayAccessor)(props.items) // only use for hasChild, same keys are overide
546
-
547
484
  });
548
- }), _temp;
485
+ }, _temp2;
549
486
  };