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