@sis-cc/dotstatsuite-visions 12.55.0 → 13.0.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 (498) hide show
  1. package/README.md +2 -34
  2. package/dist/Alert/Alert.js +185 -0
  3. package/dist/Alert/Alert.js.map +1 -0
  4. package/dist/ApiQueries/ApiQueries.js +163 -0
  5. package/dist/ApiQueries/ApiQueries.js.map +1 -0
  6. package/dist/AuthDialog/AuthDialog.js +114 -0
  7. package/dist/AuthDialog/AuthDialog.js.map +1 -0
  8. package/dist/Breadcrumbs/Breadcrumbs.js +51 -0
  9. package/dist/Breadcrumbs/Breadcrumbs.js.map +1 -0
  10. package/dist/Button/Button.js +50 -0
  11. package/dist/Button/Button.js.map +1 -0
  12. package/dist/ChartsConfig/ChartsConfig.js +507 -0
  13. package/dist/ChartsConfig/ChartsConfig.js.map +1 -0
  14. package/dist/CollapseButtons/CollapseButtons.js +320 -0
  15. package/dist/CollapseButtons/CollapseButtons.js.map +1 -0
  16. package/dist/CollapsibleTree/CollapsibleTree.js +199 -0
  17. package/dist/CollapsibleTree/CollapsibleTree.js.map +1 -0
  18. package/dist/Contact/Contact.js +439 -0
  19. package/dist/Contact/Contact.js.map +1 -0
  20. package/dist/DataFooter/DataFooter.js +106 -0
  21. package/dist/DataFooter/DataFooter.js.map +1 -0
  22. package/dist/DataHeader/DataHeader.js +341 -0
  23. package/dist/DataHeader/DataHeader.js.map +1 -0
  24. package/dist/Dataflow/Dataflow.js +325 -0
  25. package/dist/Dataflow/Dataflow.js.map +1 -0
  26. package/dist/DeleteAllChip/DeleteAllChip.js +24 -0
  27. package/dist/DeleteAllChip/DeleteAllChip.js.map +1 -0
  28. package/dist/DynamicDrawer/DynamicDrawer.js +875 -0
  29. package/dist/DynamicDrawer/DynamicDrawer.js.map +1 -0
  30. package/dist/ExpansionPanel/ExpansionPanel.js +199 -0
  31. package/dist/ExpansionPanel/ExpansionPanel.js.map +1 -0
  32. package/dist/GroupedChips/GroupedChips.js +78 -0
  33. package/dist/GroupedChips/GroupedChips.js.map +1 -0
  34. package/dist/HierarchicalFilter/HierarchicalFilter.js +144 -0
  35. package/dist/HierarchicalFilter/HierarchicalFilter.js.map +1 -0
  36. package/dist/Icons/AccessibilityFilled.js +8 -0
  37. package/dist/Icons/AccessibilityFilled.js.map +1 -0
  38. package/dist/Icons/AccessibilityOutlined.js +8 -0
  39. package/dist/Icons/AccessibilityOutlined.js.map +1 -0
  40. package/dist/Icons/AccountFilled.js +8 -0
  41. package/dist/Icons/AccountFilled.js.map +1 -0
  42. package/dist/Icons/AccountOutlined.js +8 -0
  43. package/dist/Icons/AccountOutlined.js.map +1 -0
  44. package/dist/Icons/Api.js +8 -0
  45. package/dist/Icons/Api.js.map +1 -0
  46. package/dist/Icons/Asterisk.js +8 -0
  47. package/dist/Icons/Asterisk.js.map +1 -0
  48. package/dist/Icons/Bar.js +8 -0
  49. package/dist/Icons/Bar.js.map +1 -0
  50. package/dist/Icons/CopyContent.js +8 -0
  51. package/dist/Icons/CopyContent.js.map +1 -0
  52. package/dist/Icons/Cross.js +8 -0
  53. package/dist/Icons/Cross.js.map +1 -0
  54. package/dist/Icons/HSymbol.js +8 -0
  55. package/dist/Icons/HSymbol.js.map +1 -0
  56. package/dist/Icons/Row.js +8 -0
  57. package/dist/Icons/Row.js.map +1 -0
  58. package/dist/Icons/Scatter.js +8 -0
  59. package/dist/Icons/Scatter.js.map +1 -0
  60. package/dist/Icons/StackedBar.js +8 -0
  61. package/dist/Icons/StackedBar.js.map +1 -0
  62. package/dist/Icons/StackedRow.js +8 -0
  63. package/dist/Icons/StackedRow.js.map +1 -0
  64. package/dist/Icons/Timeline.js +8 -0
  65. package/dist/Icons/Timeline.js.map +1 -0
  66. package/dist/Icons/VSymbol.js +8 -0
  67. package/dist/Icons/VSymbol.js.map +1 -0
  68. package/dist/Icons/Warning.js +18 -0
  69. package/dist/Icons/Warning.js.map +1 -0
  70. package/dist/Input/Input.js +72 -0
  71. package/dist/Input/Input.js.map +1 -0
  72. package/dist/InputNumber/InputNumber.js +86 -0
  73. package/dist/InputNumber/InputNumber.js.map +1 -0
  74. package/dist/LabelDivider/LabelDivider.js +35 -0
  75. package/dist/LabelDivider/LabelDivider.js.map +1 -0
  76. package/dist/Loading/Loading.js +72 -0
  77. package/dist/Loading/Loading.js.map +1 -0
  78. package/dist/Logo/Logo.js +38 -0
  79. package/dist/Logo/Logo.js.map +1 -0
  80. package/dist/Mode/Mode.js +90 -0
  81. package/dist/Mode/Mode.js.map +1 -0
  82. package/dist/NoData/NoData.js +27 -0
  83. package/dist/NoData/NoData.js.map +1 -0
  84. package/dist/Pagination/Pagination.js +142 -0
  85. package/dist/Pagination/Pagination.js.map +1 -0
  86. package/dist/PeriodPicker/PeriodPicker.js +550 -0
  87. package/dist/PeriodPicker/PeriodPicker.js.map +1 -0
  88. package/dist/Select/Select.js +125 -0
  89. package/dist/Select/Select.js.map +1 -0
  90. package/dist/Share/Share.js +292 -0
  91. package/dist/Share/Share.js.map +1 -0
  92. package/dist/ShortUrls/ShortUrls.js +106 -0
  93. package/dist/ShortUrls/ShortUrls.js.map +1 -0
  94. package/dist/SisccFooter/SisccFooter.js +65 -0
  95. package/dist/SisccFooter/SisccFooter.js.map +1 -0
  96. package/dist/Spotlight/Spotlight.js +349 -0
  97. package/dist/Spotlight/Spotlight.js.map +1 -0
  98. package/dist/TableFooter/TableFooter.js +42 -0
  99. package/dist/TableFooter/TableFooter.js.map +1 -0
  100. package/dist/TableHeader/TableHeader.js +35 -0
  101. package/dist/TableHeader/TableHeader.js.map +1 -0
  102. package/dist/TableHtml5/TableHtml5.js +1045 -0
  103. package/dist/TableHtml5/TableHtml5.js.map +1 -0
  104. package/dist/TableLayout/TableLayout.js +529 -0
  105. package/dist/TableLayout/TableLayout.js.map +1 -0
  106. package/dist/TablePreview/TablePreview.js +209 -0
  107. package/dist/TablePreview/TablePreview.js.map +1 -0
  108. package/dist/Tag/Tag.js +23 -0
  109. package/dist/Tag/Tag.js.map +1 -0
  110. package/dist/Tooltip/Tooltip.js +54 -0
  111. package/dist/Tooltip/Tooltip.js.map +1 -0
  112. package/dist/UserRightForm/UserRightForm.js +545 -0
  113. package/dist/UserRightForm/UserRightForm.js.map +1 -0
  114. package/dist/VerticalButton/VerticalButton.js +43 -0
  115. package/dist/VerticalButton/VerticalButton.js.map +1 -0
  116. package/dist/chunks/CustomChip-CMYCIorJ.js +181 -0
  117. package/dist/chunks/CustomChip-CMYCIorJ.js.map +1 -0
  118. package/dist/chunks/useKeybordEscapeHandler-DRsOrnwc.js +22 -0
  119. package/dist/chunks/useKeybordEscapeHandler-DRsOrnwc.js.map +1 -0
  120. package/dist/chunks/utils-BQc_rN44.js +15 -0
  121. package/dist/chunks/utils-BQc_rN44.js.map +1 -0
  122. package/dist/chunks/utils-kslX1mzh.js +20 -0
  123. package/dist/chunks/utils-kslX1mzh.js.map +1 -0
  124. package/dist/chunks/with-input-DRWNlMdA.js +35 -0
  125. package/dist/chunks/with-input-DRWNlMdA.js.map +1 -0
  126. package/dist/chunks/withSpotlight-CYQVWD78.js +903 -0
  127. package/dist/chunks/withSpotlight-CYQVWD78.js.map +1 -0
  128. package/{es → dist/theme}/theme.js +147 -149
  129. package/dist/theme/theme.js.map +1 -0
  130. package/package.json +55 -199
  131. package/es/AdvancedFilterDialog/AdvancedFilterDialog.js +0 -583
  132. package/es/AdvancedFilterDialog/SelectionModeMenu.js +0 -85
  133. package/es/AdvancedFilterDialog/images/all-selection.png +0 -0
  134. package/es/AdvancedFilterDialog/images/branch-selection.png +0 -0
  135. package/es/AdvancedFilterDialog/images/children-selection.png +0 -0
  136. package/es/AdvancedFilterDialog/images/level-selection.png +0 -0
  137. package/es/AdvancedFilterDialog/images/single-selection.png +0 -0
  138. package/es/AdvancedFilterDialog/images/small-all-selection.png +0 -0
  139. package/es/AdvancedFilterDialog/images/small-branch-selection.png +0 -0
  140. package/es/AdvancedFilterDialog/images/small-children-selection.png +0 -0
  141. package/es/AdvancedFilterDialog/images/small-level-selection.png +0 -0
  142. package/es/AdvancedFilterDialog/images/small-single-selection.png +0 -0
  143. package/es/AdvancedFilterDialog/index.js +0 -26
  144. package/es/Alert/Alert.js +0 -284
  145. package/es/Alert/index.js +0 -13
  146. package/es/ApiQueries/ApiQueries.js +0 -107
  147. package/es/ApiQueries/Query.js +0 -175
  148. package/es/ApiQueries/index.js +0 -45
  149. package/es/AuthDialog/index.js +0 -211
  150. package/es/Breadcrumbs/Breadcrumbs.js +0 -72
  151. package/es/Breadcrumbs/index.js +0 -30
  152. package/es/Button/Button.js +0 -63
  153. package/es/Button/index.js +0 -52
  154. package/es/ChartsConfig/ChartsConfig.js +0 -470
  155. package/es/ChartsConfig/Input.js +0 -152
  156. package/es/ChartsConfig/InputProxy.js +0 -57
  157. package/es/ChartsConfig/Proxy.js +0 -20
  158. package/es/ChartsConfig/Title.js +0 -37
  159. package/es/ChartsConfig/index.js +0 -213
  160. package/es/ChartsConfig/useAxisOptions.js +0 -9
  161. package/es/ChartsConfig/useDimensionOptions.js +0 -12
  162. package/es/ChartsConfig/useFocusOptions.js +0 -22
  163. package/es/ChartsConfig/utils.js +0 -6
  164. package/es/Chips/CustomChip.js +0 -139
  165. package/es/Chips/DeleteChip.js +0 -32
  166. package/es/Chips/GroupedChips.js +0 -106
  167. package/es/Chips/index.js +0 -69
  168. package/es/Chips/styles.js +0 -67
  169. package/es/Chips/utils.js +0 -21
  170. package/es/CollapseButtons/CollapseButtons.js +0 -159
  171. package/es/CollapseButtons/Item.js +0 -146
  172. package/es/CollapseButtons/Paper.js +0 -58
  173. package/es/CollapseButtons/index.js +0 -90
  174. package/es/CollapsibleTree/Collapse.js +0 -98
  175. package/es/CollapsibleTree/CollapsibleTree.js +0 -229
  176. package/es/CollapsibleTree/index.js +0 -49
  177. package/es/Contact/Contact.js +0 -360
  178. package/es/Contact/Input.js +0 -129
  179. package/es/Contact/Mode.js +0 -134
  180. package/es/Contact/index.js +0 -36
  181. package/es/DataEdit/DataEdit.js +0 -154
  182. package/es/DataEdit/Input.js +0 -151
  183. package/es/DataEdit/index.js +0 -70
  184. package/es/DataFooter/DataFooter.js +0 -178
  185. package/es/DataFooter/index.js +0 -33
  186. package/es/DataHeader/DataHeader.js +0 -314
  187. package/es/DataHeader/Flags.js +0 -42
  188. package/es/DataHeader/Title.js +0 -27
  189. package/es/DataHeader/TooltipHeader.js +0 -78
  190. package/es/DataHeader/index.js +0 -82
  191. package/es/DataHeader/utils.js +0 -19
  192. package/es/Dataflow/Dataflow.js +0 -441
  193. package/es/Dataflow/index.js +0 -62
  194. package/es/DynamicDrawer/AdvancedSelection.js +0 -503
  195. package/es/DynamicDrawer/DynamicDrawer.js +0 -418
  196. package/es/DynamicDrawer/SelectionModesMobile.js +0 -88
  197. package/es/DynamicDrawer/index.js +0 -44
  198. package/es/ExpansionPanel/ExpansionPanel.js +0 -151
  199. package/es/ExpansionPanel/index.js +0 -58
  200. package/es/ExpansionPanel/styles.js +0 -89
  201. package/es/HierarchicalFilter/HierarchicalFilter.js +0 -178
  202. package/es/HierarchicalFilter/index.js +0 -26
  203. package/es/Icons/AccessibilityFilled.js +0 -12
  204. package/es/Icons/AccessibilityOutlined.js +0 -12
  205. package/es/Icons/AccountFilled.js +0 -12
  206. package/es/Icons/AccountOutlined.js +0 -12
  207. package/es/Icons/Api.js +0 -12
  208. package/es/Icons/Asterisk.js +0 -12
  209. package/es/Icons/Bar.js +0 -12
  210. package/es/Icons/CopyContent.js +0 -12
  211. package/es/Icons/Cross.js +0 -12
  212. package/es/Icons/HSymbol.js +0 -12
  213. package/es/Icons/Row.js +0 -12
  214. package/es/Icons/Scatter.js +0 -12
  215. package/es/Icons/StackedBar.js +0 -12
  216. package/es/Icons/StackedRow.js +0 -12
  217. package/es/Icons/Timeline.js +0 -12
  218. package/es/Icons/VSymbol.js +0 -12
  219. package/es/Icons/Warning.js +0 -25
  220. package/es/Icons/index.js +0 -28
  221. package/es/Input/Input.js +0 -128
  222. package/es/Input/index.js +0 -26
  223. package/es/Input/with-input.js +0 -55
  224. package/es/InputNumber/InputNumber.js +0 -116
  225. package/es/InputNumber/index.js +0 -23
  226. package/es/LabelDivider/LabelDivider.js +0 -52
  227. package/es/LabelDivider/index.js +0 -32
  228. package/es/Loading/Loading.js +0 -84
  229. package/es/Loading/index.js +0 -24
  230. package/es/Logo/Logo.js +0 -55
  231. package/es/Logo/index.js +0 -18
  232. package/es/Mode/Mode.js +0 -135
  233. package/es/Mode/index.js +0 -24
  234. package/es/NoData/NoData.js +0 -48
  235. package/es/NoData/index.js +0 -15
  236. package/es/Pagination/Pagination.js +0 -207
  237. package/es/Pagination/index.js +0 -31
  238. package/es/PeriodPicker/PeriodPicker.js +0 -236
  239. package/es/PeriodPicker/constants.js +0 -39
  240. package/es/PeriodPicker/index.js +0 -26
  241. package/es/PeriodPicker/lib.js +0 -206
  242. package/es/PeriodPicker/styles.js +0 -23
  243. package/es/ScopeList/Header.js +0 -80
  244. package/es/ScopeList/Item.js +0 -245
  245. package/es/ScopeList/ScopeList.js +0 -323
  246. package/es/ScopeList/Selection.js +0 -129
  247. package/es/ScopeList/index.deprecated.js +0 -94
  248. package/es/ScopeList/index.js +0 -94
  249. package/es/ScopeList/styles.js +0 -143
  250. package/es/ScopeList/with-scope-list.js +0 -492
  251. package/es/Select/Select.js +0 -169
  252. package/es/Select/index.js +0 -33
  253. package/es/Share/Form.js +0 -164
  254. package/es/Share/Mode.js +0 -136
  255. package/es/Share/Share.js +0 -115
  256. package/es/Share/index.js +0 -64
  257. package/es/ShortUrls/ShortUrls.js +0 -136
  258. package/es/ShortUrls/index.js +0 -22
  259. package/es/SisccFooter/SisccFooter.js +0 -99
  260. package/es/SisccFooter/index.js +0 -27
  261. package/es/Spotlight/Fields.js +0 -100
  262. package/es/Spotlight/Spotlight.js +0 -157
  263. package/es/Spotlight/index.js +0 -75
  264. package/es/Spotlight/useSpotlight.js +0 -75
  265. package/es/Spotlight/useStyles.js +0 -77
  266. package/es/TableFooter/TableFooter.js +0 -100
  267. package/es/TableFooter/index.js +0 -33
  268. package/es/TableHeader/TableHeader.js +0 -63
  269. package/es/TableHeader/index.js +0 -17
  270. package/es/TableHtml5/TableHtml5.js +0 -213
  271. package/es/TableHtml5/cell.js +0 -130
  272. package/es/TableHtml5/flags.js +0 -138
  273. package/es/TableHtml5/header.js +0 -177
  274. package/es/TableHtml5/index.js +0 -62
  275. package/es/TableHtml5/section.js +0 -243
  276. package/es/TableHtml5/sectionHeader.js +0 -171
  277. package/es/TableHtml5/subHeader.js +0 -154
  278. package/es/TableHtml5/utils.js +0 -23
  279. package/es/TableLayout/Box.js +0 -123
  280. package/es/TableLayout/DnDItem.js +0 -142
  281. package/es/TableLayout/TableLayout.js +0 -427
  282. package/es/TableLayout/constants.js +0 -11
  283. package/es/TableLayout/index.js +0 -75
  284. package/es/TableLayout/lib.js +0 -31
  285. package/es/TablePreview/TablePreview.js +0 -244
  286. package/es/TablePreview/index.js +0 -44
  287. package/es/TablePreview/lib.js +0 -34
  288. package/es/TablePreview/styles.js +0 -71
  289. package/es/Tag/Tag.js +0 -44
  290. package/es/Tag/index.js +0 -30
  291. package/es/ToggleButton/ToggleButton.js +0 -79
  292. package/es/ToggleButton/index.js +0 -50
  293. package/es/Tooltip/Tooltip.js +0 -69
  294. package/es/Tooltip/index.js +0 -36
  295. package/es/UserRightForm/Input.js +0 -129
  296. package/es/UserRightForm/Permissions.js +0 -124
  297. package/es/UserRightForm/PermsissionsTabs.js +0 -107
  298. package/es/UserRightForm/UserRightForm.js +0 -445
  299. package/es/UserRightForm/index.js +0 -60
  300. package/es/VerticalButton/VerticalButton.js +0 -67
  301. package/es/VerticalButton/index.js +0 -27
  302. package/es/VirtualizedTree/Item.js +0 -200
  303. package/es/VirtualizedTree/VirtualizedTree.js +0 -366
  304. package/es/VirtualizedTree/index.js +0 -38
  305. package/es/VirtualizedTree/utils.js +0 -170
  306. package/es/VirtualizedTree/withExpansionTree.js +0 -65
  307. package/es/VirtualizedTree/withSpotlight.js +0 -113
  308. package/es/hooks/useKeybordEscapeHandler.js +0 -22
  309. package/es/index.js +0 -52
  310. package/es/utils.js +0 -78
  311. package/lib/AdvancedFilterDialog/AdvancedFilterDialog.js +0 -658
  312. package/lib/AdvancedFilterDialog/SelectionModeMenu.js +0 -118
  313. package/lib/AdvancedFilterDialog/images/all-selection.png +0 -0
  314. package/lib/AdvancedFilterDialog/images/branch-selection.png +0 -0
  315. package/lib/AdvancedFilterDialog/images/children-selection.png +0 -0
  316. package/lib/AdvancedFilterDialog/images/level-selection.png +0 -0
  317. package/lib/AdvancedFilterDialog/images/single-selection.png +0 -0
  318. package/lib/AdvancedFilterDialog/images/small-all-selection.png +0 -0
  319. package/lib/AdvancedFilterDialog/images/small-branch-selection.png +0 -0
  320. package/lib/AdvancedFilterDialog/images/small-children-selection.png +0 -0
  321. package/lib/AdvancedFilterDialog/images/small-level-selection.png +0 -0
  322. package/lib/AdvancedFilterDialog/images/small-single-selection.png +0 -0
  323. package/lib/AdvancedFilterDialog/index.js +0 -16
  324. package/lib/Alert/Alert.js +0 -325
  325. package/lib/Alert/index.js +0 -16
  326. package/lib/ApiQueries/ApiQueries.js +0 -139
  327. package/lib/ApiQueries/Query.js +0 -205
  328. package/lib/ApiQueries/index.js +0 -16
  329. package/lib/AuthDialog/index.js +0 -251
  330. package/lib/Breadcrumbs/Breadcrumbs.js +0 -107
  331. package/lib/Breadcrumbs/index.js +0 -16
  332. package/lib/Button/Button.js +0 -89
  333. package/lib/Button/index.js +0 -16
  334. package/lib/ChartsConfig/ChartsConfig.js +0 -533
  335. package/lib/ChartsConfig/Input.js +0 -187
  336. package/lib/ChartsConfig/InputProxy.js +0 -80
  337. package/lib/ChartsConfig/Proxy.js +0 -34
  338. package/lib/ChartsConfig/Title.js +0 -63
  339. package/lib/ChartsConfig/index.js +0 -16
  340. package/lib/ChartsConfig/useAxisOptions.js +0 -18
  341. package/lib/ChartsConfig/useDimensionOptions.js +0 -22
  342. package/lib/ChartsConfig/useFocusOptions.js +0 -32
  343. package/lib/ChartsConfig/utils.js +0 -15
  344. package/lib/Chips/CustomChip.js +0 -183
  345. package/lib/Chips/DeleteChip.js +0 -56
  346. package/lib/Chips/GroupedChips.js +0 -138
  347. package/lib/Chips/index.js +0 -23
  348. package/lib/Chips/styles.js +0 -77
  349. package/lib/Chips/utils.js +0 -30
  350. package/lib/CollapseButtons/CollapseButtons.js +0 -198
  351. package/lib/CollapseButtons/Item.js +0 -179
  352. package/lib/CollapseButtons/Paper.js +0 -82
  353. package/lib/CollapseButtons/index.js +0 -16
  354. package/lib/CollapsibleTree/Collapse.js +0 -130
  355. package/lib/CollapsibleTree/CollapsibleTree.js +0 -288
  356. package/lib/CollapsibleTree/index.js +0 -16
  357. package/lib/Contact/Contact.js +0 -409
  358. package/lib/Contact/Input.js +0 -165
  359. package/lib/Contact/Mode.js +0 -174
  360. package/lib/Contact/index.js +0 -16
  361. package/lib/DataEdit/DataEdit.js +0 -190
  362. package/lib/DataEdit/Input.js +0 -186
  363. package/lib/DataEdit/index.js +0 -16
  364. package/lib/DataFooter/DataFooter.js +0 -219
  365. package/lib/DataFooter/index.js +0 -16
  366. package/lib/DataHeader/DataHeader.js +0 -358
  367. package/lib/DataHeader/Flags.js +0 -61
  368. package/lib/DataHeader/Title.js +0 -40
  369. package/lib/DataHeader/TooltipHeader.js +0 -99
  370. package/lib/DataHeader/index.js +0 -16
  371. package/lib/DataHeader/utils.js +0 -29
  372. package/lib/Dataflow/Dataflow.js +0 -505
  373. package/lib/Dataflow/index.js +0 -16
  374. package/lib/DynamicDrawer/AdvancedSelection.js +0 -563
  375. package/lib/DynamicDrawer/DynamicDrawer.js +0 -466
  376. package/lib/DynamicDrawer/SelectionModesMobile.js +0 -119
  377. package/lib/DynamicDrawer/index.js +0 -16
  378. package/lib/ExpansionPanel/ExpansionPanel.js +0 -198
  379. package/lib/ExpansionPanel/index.js +0 -16
  380. package/lib/ExpansionPanel/styles.js +0 -103
  381. package/lib/HierarchicalFilter/HierarchicalFilter.js +0 -208
  382. package/lib/HierarchicalFilter/index.js +0 -16
  383. package/lib/Icons/AccessibilityFilled.js +0 -25
  384. package/lib/Icons/AccessibilityOutlined.js +0 -25
  385. package/lib/Icons/AccountFilled.js +0 -25
  386. package/lib/Icons/AccountOutlined.js +0 -25
  387. package/lib/Icons/Api.js +0 -25
  388. package/lib/Icons/Asterisk.js +0 -25
  389. package/lib/Icons/Bar.js +0 -25
  390. package/lib/Icons/CopyContent.js +0 -25
  391. package/lib/Icons/Cross.js +0 -25
  392. package/lib/Icons/HSymbol.js +0 -25
  393. package/lib/Icons/Row.js +0 -25
  394. package/lib/Icons/Scatter.js +0 -25
  395. package/lib/Icons/StackedBar.js +0 -25
  396. package/lib/Icons/StackedRow.js +0 -25
  397. package/lib/Icons/Timeline.js +0 -25
  398. package/lib/Icons/VSymbol.js +0 -25
  399. package/lib/Icons/Warning.js +0 -45
  400. package/lib/Icons/index.js +0 -155
  401. package/lib/Input/Input.js +0 -164
  402. package/lib/Input/index.js +0 -16
  403. package/lib/Input/with-input.js +0 -69
  404. package/lib/InputNumber/InputNumber.js +0 -152
  405. package/lib/InputNumber/index.js +0 -16
  406. package/lib/LabelDivider/LabelDivider.js +0 -78
  407. package/lib/LabelDivider/index.js +0 -16
  408. package/lib/Loading/Loading.js +0 -110
  409. package/lib/Loading/index.js +0 -16
  410. package/lib/Logo/Logo.js +0 -73
  411. package/lib/Logo/index.js +0 -16
  412. package/lib/Mode/Mode.js +0 -168
  413. package/lib/Mode/index.js +0 -16
  414. package/lib/NoData/NoData.js +0 -69
  415. package/lib/NoData/index.js +0 -16
  416. package/lib/Pagination/Pagination.js +0 -250
  417. package/lib/Pagination/index.js +0 -16
  418. package/lib/PeriodPicker/PeriodPicker.js +0 -266
  419. package/lib/PeriodPicker/constants.js +0 -43
  420. package/lib/PeriodPicker/index.js +0 -16
  421. package/lib/PeriodPicker/lib.js +0 -222
  422. package/lib/PeriodPicker/styles.js +0 -32
  423. package/lib/ScopeList/Header.js +0 -110
  424. package/lib/ScopeList/Item.js +0 -284
  425. package/lib/ScopeList/ScopeList.js +0 -377
  426. package/lib/ScopeList/Selection.js +0 -170
  427. package/lib/ScopeList/index.deprecated.js +0 -16
  428. package/lib/ScopeList/index.js +0 -16
  429. package/lib/ScopeList/styles.js +0 -153
  430. package/lib/ScopeList/with-scope-list.js +0 -507
  431. package/lib/Select/Select.js +0 -201
  432. package/lib/Select/index.js +0 -16
  433. package/lib/Share/Form.js +0 -201
  434. package/lib/Share/Mode.js +0 -176
  435. package/lib/Share/Share.js +0 -148
  436. package/lib/Share/index.js +0 -16
  437. package/lib/ShortUrls/ShortUrls.js +0 -181
  438. package/lib/ShortUrls/index.js +0 -16
  439. package/lib/SisccFooter/SisccFooter.js +0 -131
  440. package/lib/SisccFooter/index.js +0 -16
  441. package/lib/Spotlight/Fields.js +0 -132
  442. package/lib/Spotlight/Spotlight.js +0 -202
  443. package/lib/Spotlight/index.js +0 -16
  444. package/lib/Spotlight/useSpotlight.js +0 -85
  445. package/lib/Spotlight/useStyles.js +0 -91
  446. package/lib/TableFooter/TableFooter.js +0 -129
  447. package/lib/TableFooter/index.js +0 -16
  448. package/lib/TableHeader/TableHeader.js +0 -89
  449. package/lib/TableHeader/index.js +0 -16
  450. package/lib/TableHtml5/TableHtml5.js +0 -249
  451. package/lib/TableHtml5/cell.js +0 -164
  452. package/lib/TableHtml5/flags.js +0 -174
  453. package/lib/TableHtml5/header.js +0 -215
  454. package/lib/TableHtml5/index.js +0 -23
  455. package/lib/TableHtml5/section.js +0 -289
  456. package/lib/TableHtml5/sectionHeader.js +0 -212
  457. package/lib/TableHtml5/subHeader.js +0 -191
  458. package/lib/TableHtml5/utils.js +0 -32
  459. package/lib/TableLayout/Box.js +0 -159
  460. package/lib/TableLayout/DnDItem.js +0 -177
  461. package/lib/TableLayout/TableLayout.js +0 -487
  462. package/lib/TableLayout/constants.js +0 -14
  463. package/lib/TableLayout/index.js +0 -16
  464. package/lib/TableLayout/lib.js +0 -40
  465. package/lib/TablePreview/TablePreview.js +0 -279
  466. package/lib/TablePreview/index.js +0 -16
  467. package/lib/TablePreview/lib.js +0 -48
  468. package/lib/TablePreview/styles.js +0 -81
  469. package/lib/Tag/Tag.js +0 -67
  470. package/lib/Tag/index.js +0 -16
  471. package/lib/ToggleButton/ToggleButton.js +0 -111
  472. package/lib/ToggleButton/index.js +0 -16
  473. package/lib/Tooltip/Tooltip.js +0 -95
  474. package/lib/Tooltip/index.js +0 -16
  475. package/lib/UserRightForm/Input.js +0 -165
  476. package/lib/UserRightForm/Permissions.js +0 -159
  477. package/lib/UserRightForm/PermsissionsTabs.js +0 -145
  478. package/lib/UserRightForm/UserRightForm.js +0 -484
  479. package/lib/UserRightForm/index.js +0 -16
  480. package/lib/VerticalButton/VerticalButton.js +0 -88
  481. package/lib/VerticalButton/index.js +0 -16
  482. package/lib/VirtualizedTree/Item.js +0 -244
  483. package/lib/VirtualizedTree/VirtualizedTree.js +0 -402
  484. package/lib/VirtualizedTree/index.js +0 -16
  485. package/lib/VirtualizedTree/utils.js +0 -179
  486. package/lib/VirtualizedTree/withExpansionTree.js +0 -80
  487. package/lib/VirtualizedTree/withSpotlight.js +0 -129
  488. package/lib/hooks/useKeybordEscapeHandler.js +0 -28
  489. package/lib/index.js +0 -460
  490. package/lib/theme.js +0 -437
  491. package/lib/utils.js +0 -96
  492. package/umd/@sis-cc/dotstatsuite-visions.js +0 -82495
  493. package/umd/@sis-cc/dotstatsuite-visions.min.js +0 -222
  494. package/umd/@sis-cc/dotstatsuite-visions.min.js.map +0 -1
  495. package/umd/branch-selection.54dd3bc1.png +0 -0
  496. package/umd/children-selection.20d94242.png +0 -0
  497. package/umd/level-selection.df116629.png +0 -0
  498. package/umd/single-selection.a729a6c8.png +0 -0
@@ -0,0 +1,903 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useState, useMemo, useRef, useEffect, createElement } from 'react';
3
+ import * as R from 'ramda';
4
+ import _AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
5
+ import _VirtualizedList from 'react-virtualized/dist/commonjs/List';
6
+ import { CheckBoxOutlined, CheckBoxOutlineBlankOutlined, ExpandLess, ExpandMore } from '@mui/icons-material';
7
+ import ListItem from '@mui/material/ListItem';
8
+ import Typography from '@mui/material/Typography';
9
+ import ListItemText from '@mui/material/ListItemText';
10
+ import IconButton from '@mui/material/IconButton';
11
+ import SvgIcon from '@mui/material/SvgIcon';
12
+ import cx from 'classnames';
13
+ import { Tooltip } from '../Tooltip/Tooltip.js';
14
+ import { u as useKeyboardEscapeHandler } from './useKeybordEscapeHandler-DRsOrnwc.js';
15
+ import { useTheme } from '@mui/material';
16
+ import makeStyles from '@mui/styles/makeStyles';
17
+ import { g as getIsRtl, s as searchTerm, p as prepareTerm } from './utils-kslX1mzh.js';
18
+
19
+ const getHierarchicalId = item => R.prop('hierarchicalId', item) || R.prop('id', item);
20
+
21
+ const getDescendants = (id, groupedItems) => {
22
+ const reccurse = _id => {
23
+ const children = R.propOr([], _id, groupedItems);
24
+ return R.pipe(
25
+ R.map(item => {
26
+ const __id = getHierarchicalId(item);
27
+ const descendants = reccurse(__id);
28
+ return R.prepend(item, descendants);
29
+ }),
30
+ R.unnest,
31
+ )(children);
32
+ };
33
+
34
+ return reccurse(id);
35
+ };
36
+
37
+ const isItemSelected = selectIds => item => {
38
+ if (!R.isEmpty(selectIds) && R.has(getHierarchicalId(item), selectIds)) {
39
+ return !item.isSelected;
40
+ }
41
+ return !!item.isSelected;
42
+ };
43
+
44
+ const getDepth = indexedItems => item => {
45
+ if (R.isNil(item.parentId)) {
46
+ return 0;
47
+ }
48
+ const parent = R.prop(item.parentId, indexedItems);
49
+ if (R.isNil(parent)) {
50
+ return 0;
51
+ }
52
+ return getDepth(indexedItems)(parent) + 1;
53
+ };
54
+
55
+ const getDuplicates = (items, indexedItems) => {
56
+ const itemsIds = R.pluck('id', items);
57
+ const grouped = R.pipe(R.values, R.groupBy(R.prop('id')))(indexedItems);
58
+ return R.pipe(R.props(itemsIds), R.unnest)(grouped);
59
+ };
60
+
61
+ const getDeprecatedIds = (ids, items, selectedIds) => {
62
+ const { groupedItemsByParentId, indexedItemsById } = items;
63
+ let _ids = ids;
64
+ const reccurse = scopeIds => {
65
+ const scopeItems = R.props(scopeIds, indexedItemsById);
66
+ const grouped = R.groupBy(R.propOr('#ROOT', 'parentId'), scopeItems);
67
+ const refined = R.omit(R.append('#ROOT', _ids), grouped);
68
+
69
+ const deprecatedParents = R.reduce(
70
+ (acc, id) => {
71
+ const _item = R.prop(id, indexedItemsById);
72
+ if (R.isNil(_item)) {
73
+ return acc;
74
+ }
75
+ const _itemsIds = R.has('hierarchicalId', _item)
76
+ ? R.pipe(
77
+ R.values,
78
+ R.filter(R.propEq('id', _item.id)),
79
+ R.map(getHierarchicalId),
80
+ )(indexedItemsById)
81
+ : [id];
82
+
83
+ const children = R.pipe(R.props(_itemsIds), R.unnest)(groupedItemsByParentId);
84
+ const selectedChild = R.find(child => {
85
+ return !R.includes(getHierarchicalId(child), _ids) && isItemSelected(selectedIds)(child);
86
+ }, children);
87
+ if (!isItemSelected(selectedIds)(_item) && R.isNil(selectedChild)) {
88
+ return R.concat(reccurse([id]), acc);
89
+ }
90
+ if (!R.propOr(false, 'isGreyed', _item)) {
91
+ return acc;
92
+ }
93
+ if (R.isNil(selectedChild)) {
94
+ return R.concat(acc, _itemsIds);
95
+ }
96
+ return acc;
97
+ },
98
+ [],
99
+ R.keys(refined),
100
+ );
101
+
102
+ if (!R.isEmpty(deprecatedParents)) {
103
+ _ids = R.concat(_ids, deprecatedParents);
104
+ const deprecatedAncestors = reccurse(deprecatedParents);
105
+ return R.concat(deprecatedParents, deprecatedAncestors);
106
+ }
107
+
108
+ return deprecatedParents;
109
+ };
110
+
111
+ return reccurse(ids);
112
+ };
113
+
114
+ // evolved disableAccessor with hierarchical context and selection mode
115
+ const getEvolvedDisableAccessor =
116
+ (
117
+ groupedItems,
118
+ disableAccessor = R.always(false),
119
+ getIsChildInSelectionScope = R.always(true), //combine selection mode + spotlight
120
+ ) =>
121
+ (item, selectedIds) => {
122
+ const hierarchicalFinder = validator => parentId =>
123
+ R.find(
124
+ child => {
125
+ if (validator(child)) return true;
126
+ return !R.isNil(hierarchicalFinder(validator)(getHierarchicalId(child)));
127
+ },
128
+ R.propOr([], parentId, groupedItems),
129
+ );
130
+ // selected forcedItem isn't deselectable unless all selected descendants are in deselection scope
131
+ if (isItemSelected(selectedIds)(item) && R.propOr(false, 'isForced', item)) {
132
+ const outOfScopeSelectedDescendant = hierarchicalFinder(
133
+ child => isItemSelected(selectedIds)(child) && !getIsChildInSelectionScope(child, item),
134
+ )(getHierarchicalId(item));
135
+ return !R.isNil(outOfScopeSelectedDescendant);
136
+ }
137
+ // non selected invalid item is disabled unless some (valid) children are selected or selectable in scope
138
+ if (!isItemSelected(selectedIds)(item) && disableAccessor(item)) {
139
+ const validDescendant = hierarchicalFinder(
140
+ child =>
141
+ isItemSelected(selectedIds)(child) ||
142
+ (getIsChildInSelectionScope(child, item) && !disableAccessor(child)),
143
+ )(getHierarchicalId(item));
144
+ return R.isNil(validDescendant);
145
+ }
146
+ return false;
147
+ };
148
+
149
+ const getScopeGetters = {
150
+ single: () => item => [item],
151
+ children: items => item => {
152
+ const childItems = R.propOr([], getHierarchicalId(item), items.groupedItemsByParentId);
153
+ return R.reject(R.prop('isDisabled'), R.prepend(item, childItems));
154
+ },
155
+ branch: items => item => {
156
+ const descendants = getDescendants(getHierarchicalId(item), items.groupedItemsByParentId);
157
+ const res = R.reject(R.prop('isDisabled'), R.prepend(item, descendants));
158
+ return res;
159
+ },
160
+ level: items => item => {
161
+ const indexed = items.indexedItemsById;
162
+ const depth = getDepth(indexed)(item);
163
+ return R.filter(
164
+ it => !R.prop('isDisabled', it) && getDepth(indexed)(it) === depth,
165
+ R.values(indexed),
166
+ );
167
+ },
168
+ };
169
+
170
+ const getImposedItems = (selectIds, indexedItems) => selectedItems =>
171
+ R.reduce(
172
+ (acc, item) => {
173
+ const isSelected = isItemSelected(selectIds)(item);
174
+ if (!isSelected) {
175
+ const imposedIds = R.pipe(
176
+ R.filter(i => i.id === item.id),
177
+ R.map(R.propOr([], 'imposedIds')),
178
+ R.unnest,
179
+ )(R.values(indexedItems));
180
+ const imposedItems = R.props(imposedIds, indexedItems);
181
+ return R.concat(acc, R.append(item, imposedItems));
182
+ }
183
+ return R.append(item, acc);
184
+ },
185
+ [],
186
+ selectedItems,
187
+ );
188
+
189
+ const Item = ({
190
+ classes,
191
+ id,
192
+ label,
193
+ description = "",
194
+ isSelected,
195
+ isDisabled,
196
+ isGreyed,
197
+ changeList,
198
+ ariaLabel,
199
+ NavigateIcon,
200
+ hasChild,
201
+ hasChildrenOnLevel,
202
+ count,
203
+ svgPath,
204
+ style,
205
+ isRtl,
206
+ accessibility,
207
+ HTMLRenderer,
208
+ hierarchicalId,
209
+ labels,
210
+ depth = 0,
211
+ eventsListeners,
212
+ expanded,
213
+ highlightedLabel
214
+ }) => {
215
+ const { open, setOpen } = useKeyboardEscapeHandler();
216
+ const padding = depth * 30 + (depth > 0 && !hasChildrenOnLevel ? 30 : 0) + (!hasChild && hasChildrenOnLevel ? 30 : 0);
217
+ const formattedLabel = highlightedLabel ? /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: highlightedLabel } }) : label;
218
+ return /* @__PURE__ */ jsxs(
219
+ ListItem,
220
+ {
221
+ dense: true,
222
+ disableGutters: true,
223
+ classes: { disabled: classes.disabled },
224
+ className: cx(classes.listItemContainer, classes.disableSecondaryAction),
225
+ tabIndex: -1,
226
+ style: {
227
+ ...style,
228
+ flexDirection: isRtl ? "row-reverse" : "row",
229
+ [`${isRtl ? "paddingRight" : "paddingLeft"}`]: `${padding}px`
230
+ },
231
+ role: "listitem",
232
+ children: [
233
+ R.and(NavigateIcon, hasChild) && /* @__PURE__ */ jsx(
234
+ IconButton,
235
+ {
236
+ disableRipple: true,
237
+ disableFocusRipple: true,
238
+ className: classes.arrow,
239
+ "aria-label": ariaLabel,
240
+ tabIndex: 0,
241
+ size: "small",
242
+ color: "primary",
243
+ onClick: () => changeList(hierarchicalId || id),
244
+ "aria-expanded": expanded,
245
+ children: /* @__PURE__ */ jsx(NavigateIcon, {})
246
+ }
247
+ ),
248
+ /* @__PURE__ */ jsx(
249
+ ListItemText,
250
+ {
251
+ "data-testid": `value_${id}`,
252
+ tabIndex: 0,
253
+ role: "checkbox",
254
+ "aria-label": isGreyed ? `${R.propOr("", "disableItemLabel")(labels)} ${label}` : label,
255
+ "aria-checked": isSelected,
256
+ "aria-disabled": isDisabled,
257
+ primaryTypographyProps: { noWrap: true, color: "inherit" },
258
+ secondaryTypographyProps: { color: "inherit" },
259
+ classes: { root: classes.listItem },
260
+ className: cx({
261
+ [classes.accessibilityItemHover]: accessibility,
262
+ [classes.listItemSelected]: isSelected,
263
+ [classes.listItemHover]: !isDisabled
264
+ }),
265
+ onKeyDown: isDisabled ? null : eventsListeners.onKeyDown,
266
+ onClick: isDisabled ? null : eventsListeners.onClick,
267
+ onMouseDown: isDisabled || open ? null : eventsListeners.onMouseDown,
268
+ onMouseEnter: isDisabled || open ? null : eventsListeners.onMouseEnter,
269
+ title: isGreyed ? `${R.propOr("", "disableItemLabel")(labels)} ${label}` : label,
270
+ style: {
271
+ outline: accessibility ? void 0 : "none"
272
+ },
273
+ primary: /* @__PURE__ */ jsxs(
274
+ "div",
275
+ {
276
+ className: cx(classes.labelContainer, {
277
+ [classes.rtlLabelContainer]: isRtl
278
+ }),
279
+ children: [
280
+ /* @__PURE__ */ jsx(
281
+ SvgIcon,
282
+ {
283
+ color: "primary",
284
+ className: cx(classes.labelIcon, { [classes.disabledLabel]: isDisabled }),
285
+ children: isSelected ? /* @__PURE__ */ jsx(CheckBoxOutlined, {}) : /* @__PURE__ */ jsx(CheckBoxOutlineBlankOutlined, {})
286
+ }
287
+ ),
288
+ svgPath && /* @__PURE__ */ jsx(
289
+ SvgIcon,
290
+ {
291
+ color: "primary",
292
+ className: cx(classes.labelIcon, {
293
+ [classes.disabledLabel]: isDisabled
294
+ }),
295
+ children: /* @__PURE__ */ jsx("path", { d: svgPath })
296
+ }
297
+ ),
298
+ /* @__PURE__ */ jsx(
299
+ Tooltip,
300
+ {
301
+ title: R.or(R.isNil(HTMLRenderer), R.isEmpty(description)) ? description : /* @__PURE__ */ jsx(HTMLRenderer, { html: description, onClick: (e) => e.stopPropagation() }),
302
+ enterDelay: 400,
303
+ enterNextDelay: 400,
304
+ tabIndex: description ? 0 : -1,
305
+ "aria-label": description,
306
+ "aria-hidden": false,
307
+ placement: "top",
308
+ disableInteractive: Boolean(HTMLRenderer) === false,
309
+ onOpen: () => setOpen(true),
310
+ onClose: () => setOpen(false),
311
+ disableHoverListener: R.isEmpty(description),
312
+ open,
313
+ children: /* @__PURE__ */ jsx(
314
+ Typography,
315
+ {
316
+ color: "inherit",
317
+ variant: "body2",
318
+ className: cx(classes.label, {
319
+ [classes.disabledLabel]: isGreyed,
320
+ [classes.tooltipNotice]: !R.isEmpty(description)
321
+ }),
322
+ children: formattedLabel
323
+ }
324
+ )
325
+ }
326
+ ),
327
+ R.not(R.isNil(count)) && /* @__PURE__ */ jsxs(Typography, { variant: "body2", className: classes.count, children: [
328
+ "(",
329
+ count,
330
+ ")"
331
+ ] })
332
+ ]
333
+ }
334
+ )
335
+ }
336
+ )
337
+ ]
338
+ }
339
+ );
340
+ };
341
+
342
+ const height = 30;
343
+
344
+ const useStyles = makeStyles(theme => ({
345
+ middle: {
346
+ margin: 'auto 0',
347
+ },
348
+ selectionContainer: {
349
+ margin: theme.spacing(1),
350
+ },
351
+ containerHeader: {
352
+ borderBottom: `6px solid ${theme.palette.grey[100]}`,
353
+ marginBottom: '1px',
354
+ },
355
+ listItemContainer: {
356
+ height,
357
+ paddingRight: 36,
358
+ outline: 'none',
359
+ marginBottom: '1px',
360
+ },
361
+ listItem: {
362
+ height,
363
+ display: 'flex',
364
+ flexDirection: 'column-reverse',
365
+ justifyContent: 'center',
366
+ margin: 0,
367
+ userSelect: 'none',
368
+ cursor: 'pointer',
369
+ color: theme.palette.primary.main,
370
+ },
371
+ listItemHover: {
372
+ '&:hover': {
373
+ color: theme.palette.primary.main,
374
+ backgroundColor: theme.palette.action.hover,
375
+ },
376
+ },
377
+ accessibilityItemHover: {
378
+ '&:focus': {
379
+ backgroundColor: theme.palette.action.selected,
380
+ },
381
+ },
382
+ listItemSelected: {
383
+ backgroundColor: theme.palette.action.hover,
384
+ '&:hover': {
385
+ backgroundColor: theme.palette.action.selected,
386
+ },
387
+ },
388
+ disableSecondaryAction: {
389
+ paddingRight: '0 !important',
390
+ },
391
+ spaceHeader: {
392
+ margin: theme.spacing(1, 0),
393
+ lineHeight: 1,
394
+ },
395
+ spotlightContainer: {
396
+ display: 'flex',
397
+ },
398
+ labelContainer: {
399
+ width: '100%',
400
+ display: 'flex',
401
+ justifyContent: 'flex-start',
402
+ alignItems: 'baseline',
403
+ },
404
+ rtlLabelContainer: {
405
+ flexDirection: 'row-reverse',
406
+ },
407
+ count: {
408
+ color: theme.palette.grey[800],
409
+ margin: theme.spacing(0, 0.25),
410
+ fontSize: 11,
411
+ },
412
+ path: {
413
+ color: theme.palette.grey[600],
414
+ marginLeft: theme.spacing(1),
415
+ fontSize: 11,
416
+ },
417
+ label: {
418
+ overflow: 'hidden',
419
+ textOverflow: 'ellipsis',
420
+ marginLeft: theme.spacing(1),
421
+ },
422
+ labelIcon: {
423
+ fontSize: 16,
424
+ marginLeft: theme.spacing(0.5),
425
+ alignSelf: 'center',
426
+ },
427
+ disabled: {
428
+ pointerEvents: 'initial !important',
429
+ },
430
+ disabledLabel: {
431
+ color: theme.palette.grey[700],
432
+ },
433
+ ellipsis: {
434
+ whiteSpace: 'nowrap',
435
+ overflow: 'hidden',
436
+ textOverflow: 'ellipsis',
437
+ },
438
+ svg: {
439
+ verticalAlign: 'bottom',
440
+ fontSize: '1.25rem',
441
+ },
442
+ arrowHeader: {
443
+ color: theme.palette.grey[800],
444
+ },
445
+ headerItem: {
446
+ display: 'inline',
447
+ cursor: 'pointer',
448
+ userSelect: 'none',
449
+ height: 'unset',
450
+ minHeight: 25,
451
+ padding: theme.spacing(0.25, 0.5),
452
+ borderBottom: 'dotted 1px',
453
+ verticalAlign: 'text-bottom',
454
+ '&:hover, &:focus': {
455
+ backgroundColor: theme.palette.action.hover,
456
+ },
457
+ },
458
+ containerArrow: {
459
+ paddingLeft: 4,
460
+ borderLeft: `1px solid ${theme.palette.grey[800]}`,
461
+ color: theme.palette.primary.main,
462
+ height: '100%',
463
+ display: 'flex',
464
+ '&:hover, &:focus': {
465
+ backgroundColor: theme.palette.primary.main,
466
+ color: theme.palette.common.white,
467
+ },
468
+ },
469
+ arrow: {
470
+ marginTop: 2,
471
+ '&:hover': {
472
+ backgroundColor: 'transparent',
473
+ },
474
+ },
475
+ bulkSelectionIcon: {
476
+ minWidth: 50,
477
+ },
478
+ tooltipNotice: {
479
+ textDecoration: 'underline dotted',
480
+ },
481
+ }));
482
+
483
+ const AutoSizer = _AutoSizer.default || _AutoSizer;
484
+ const VirtualizedList = _VirtualizedList.default || _VirtualizedList;
485
+ const singleScopeGetter = () => (item) => [item];
486
+ const getDisplayedIds = (items, grouped, expanded) => R.pipe(
487
+ R.map((item) => {
488
+ const hierarchicalId = getHierarchicalId(item);
489
+ if (R.has(hierarchicalId, grouped) && R.has(hierarchicalId, expanded)) {
490
+ const children = getDisplayedIds(R.prop(hierarchicalId, grouped), grouped, expanded);
491
+ return R.prepend(hierarchicalId, children);
492
+ }
493
+ return [hierarchicalId];
494
+ }),
495
+ R.unnest
496
+ )(items);
497
+ const getHasChildrenOnLevel = (groupedItems) => (item) => {
498
+ if (R.has(getHierarchicalId(item), groupedItems)) {
499
+ return true;
500
+ }
501
+ return R.pipe(
502
+ R.prop(R.propOr("#ROOT", "parentId", item)),
503
+ R.find((it) => R.has(getHierarchicalId(it), groupedItems)),
504
+ R.complement(R.isNil)
505
+ )(groupedItems);
506
+ };
507
+ const VirtualizedTree = (props) => {
508
+ const {
509
+ accessibility,
510
+ changeSelection,
511
+ HTMLRenderer,
512
+ items,
513
+ labelRenderer,
514
+ labels,
515
+ disableAccessor = R.always(false),
516
+ isGreyed = R.always(false),
517
+ expandedIds,
518
+ expand,
519
+ collapse,
520
+ maxTreeHeight = 250,
521
+ scopeGetter = singleScopeGetter,
522
+ treeHeight = 0,
523
+ simpleSelectionMode = false
524
+ } = props;
525
+ const theme = useTheme();
526
+ const [scrollTop, setScrollTop] = useState(void 0);
527
+ const [shiftIndexes, setShiftIndexes] = useState([]);
528
+ const [isMouseDown, setIsMouseDown] = useState(false);
529
+ const [lastItemId, setLastItemId] = useState(null);
530
+ const [selectIds, setSelectIds] = useState({});
531
+ const { indexedItemsById, groupedItemsByParentId } = useMemo(() => {
532
+ const refinedItems = R.map(
533
+ (item) => ({
534
+ ...item,
535
+ isSelected: isItemSelected(selectIds)(item),
536
+ isGreyed: R.is(Function, isGreyed) ? isGreyed(item) : false,
537
+ isDisabled: R.is(Function, disableAccessor) ? disableAccessor(item, selectIds) : false
538
+ }),
539
+ items
540
+ );
541
+ const indexedItemsById2 = R.indexBy(getHierarchicalId, refinedItems);
542
+ const groupedItemsByParentId2 = R.groupBy(R.propOr("#ROOT", "parentId"), refinedItems);
543
+ return { indexedItemsById: indexedItemsById2, groupedItemsByParentId: groupedItemsByParentId2 };
544
+ }, [items, selectIds]);
545
+ const list = useMemo(
546
+ () => getDisplayedIds(
547
+ R.propOr([], "#ROOT", groupedItemsByParentId),
548
+ groupedItemsByParentId,
549
+ expandedIds
550
+ ),
551
+ [items, expandedIds]
552
+ );
553
+ const getItemScope = scopeGetter({ indexedItemsById, groupedItemsByParentId });
554
+ const isItemSelected$1 = isItemSelected(selectIds);
555
+ const multiSelect = (id) => {
556
+ const item = R.prop(id, indexedItemsById);
557
+ let ids = R.pipe(
558
+ getItemScope,
559
+ getImposedItems(selectIds, indexedItemsById),
560
+ R.filter((v) => v.isSelected === item.isSelected),
561
+ (items2) => getDuplicates(items2, indexedItemsById),
562
+ R.map(getHierarchicalId)
563
+ )(item);
564
+ if (isItemSelected$1(item)) {
565
+ const deprecatedIds = getDeprecatedIds(
566
+ ids,
567
+ { indexedItemsById, groupedItemsByParentId },
568
+ selectIds
569
+ );
570
+ ids = R.concat(ids, deprecatedIds);
571
+ }
572
+ if (R.has(id, selectIds)) {
573
+ setSelectIds(R.omit(ids, selectIds));
574
+ } else {
575
+ setSelectIds({ ...selectIds, ...R.indexBy(R.identity, ids) });
576
+ setLastItemId(id);
577
+ }
578
+ };
579
+ const shiftSelect = (index) => {
580
+ const selectRange = (indexes, isSelected) => {
581
+ const _selectIds = R.pipe(
582
+ R.slice(Math.min(...indexes), Math.max(...indexes) + 1),
583
+ (ids) => R.props(ids, indexedItemsById),
584
+ R.map(getItemScope),
585
+ R.unnest,
586
+ R.filter((v) => v.isSelected === isSelected),
587
+ R.map(getHierarchicalId),
588
+ R.indexBy(R.identity)
589
+ )(list);
590
+ setShiftIndexes(indexes);
591
+ setSelectIds(_selectIds);
592
+ };
593
+ if (R.isEmpty(shiftIndexes)) {
594
+ const item = R.pipe(R.nth(index), (id) => R.prop(id, indexedItemsById))(list);
595
+ if (!R.isNil(lastItemId)) {
596
+ const lastItem = R.prop(lastItemId, indexedItemsById);
597
+ const lastItemIndex = R.findIndex((v) => v === lastItem.id, list);
598
+ if (lastItem.isSelected !== item.isSelected && lastItemIndex !== -1) {
599
+ selectRange([lastItemIndex, index], item.isSelected);
600
+ return;
601
+ }
602
+ }
603
+ const ids = R.pipe(
604
+ getItemScope,
605
+ R.filter((v) => v.isSelected === item.isSelected),
606
+ R.map(getHierarchicalId),
607
+ R.indexBy(R.identity)
608
+ )(item);
609
+ setShiftIndexes(R.append(index, shiftIndexes));
610
+ setSelectIds(ids);
611
+ } else if (R.length(shiftIndexes) === 1 && index === R.head(shiftIndexes)) {
612
+ setShiftIndexes([]);
613
+ setSelectIds({});
614
+ } else {
615
+ const firstItem = R.pipe(R.nth(R.head(shiftIndexes)), (id) => R.prop(id, indexedItemsById))(
616
+ list
617
+ );
618
+ selectRange([R.head(shiftIndexes), index], firstItem.isSelected);
619
+ }
620
+ };
621
+ const apply = () => {
622
+ if (!R.isEmpty(selectIds)) {
623
+ const ids = R.values(selectIds);
624
+ const selection = R.pipe(R.props(ids), R.pluck("id"), R.uniq)(indexedItemsById);
625
+ changeSelection(selection);
626
+ setShiftIndexes([]);
627
+ setSelectIds({});
628
+ setIsMouseDown(false);
629
+ }
630
+ };
631
+ const onMouseUp = (e) => {
632
+ if (!isMouseDown) {
633
+ return;
634
+ }
635
+ e.preventDefault();
636
+ apply();
637
+ setIsMouseDown(false);
638
+ };
639
+ const onMouseLeave = () => {
640
+ if (isMouseDown) {
641
+ apply();
642
+ }
643
+ };
644
+ const onKeyUp = (e) => {
645
+ e.preventDefault();
646
+ if (e.key === "Shift" && !R.isEmpty(shiftIndexes)) {
647
+ apply();
648
+ } else if (e.key === "Control" && !R.isEmpty(selectIds)) {
649
+ apply();
650
+ } else if (e.key === "Enter" && !R.isNil(lastItemId)) {
651
+ apply();
652
+ }
653
+ };
654
+ const itemEventsListeners = (id, index) => ({
655
+ onMouseDown: (e) => {
656
+ if (!simpleSelectionMode && (e.ctrlKey || e.shiftKey)) {
657
+ return;
658
+ }
659
+ setIsMouseDown(true);
660
+ multiSelect(id);
661
+ },
662
+ onMouseEnter: (e) => {
663
+ e.preventDefault();
664
+ if (!isMouseDown || simpleSelectionMode || e.ctrlKey || e.shiftKey) {
665
+ return;
666
+ }
667
+ multiSelect(id);
668
+ setLastItemId(id);
669
+ },
670
+ onKeyDown: (e) => {
671
+ if (e.key === "Enter") {
672
+ multiSelect(id);
673
+ setLastItemId(id);
674
+ }
675
+ },
676
+ onClick: (e) => {
677
+ e.preventDefault();
678
+ if (e.ctrlKey && !simpleSelectionMode) {
679
+ multiSelect(id);
680
+ } else if (e.shiftKey && !simpleSelectionMode) {
681
+ shiftSelect(index);
682
+ } else {
683
+ setIsMouseDown(false);
684
+ setLastItemId(id);
685
+ }
686
+ }
687
+ });
688
+ const ref = useRef();
689
+ const classes = useStyles();
690
+ useEffect(() => {
691
+ const current = ref.current;
692
+ const handler = (event) => {
693
+ if (R.or(event.ctrlKey, event.shiftKey)) {
694
+ const scrollEl = R.path(["children", 0, "children", 0], current);
695
+ const isBottom = R.gte(
696
+ R.add(R.prop("scrollTop")(scrollEl), R.prop("clientHeight")(scrollEl)),
697
+ R.prop("scrollHeight")(scrollEl)
698
+ );
699
+ const nextpos = (scrollTop || scrollEl.scrollTop) + event.deltaY / 2;
700
+ if (R.or(event.deltaY < 0, event.deltaY > 0 && R.not(isBottom))) {
701
+ setScrollTop(nextpos < 0 ? 0 : nextpos);
702
+ }
703
+ event.preventDefault();
704
+ }
705
+ if (R.not(event.ctrlKey) && R.not(event.shiftKey)) {
706
+ setScrollTop(void 0);
707
+ }
708
+ };
709
+ if (scrollTop === 0) {
710
+ setScrollTop(void 0);
711
+ }
712
+ if (R.isNil(current)) return;
713
+ current.addEventListener("wheel", handler, { passive: false });
714
+ return () => {
715
+ current.removeEventListener("wheel", handler, { passive: false });
716
+ };
717
+ }, [scrollTop]);
718
+ const maxHeight = treeHeight === 0 ? R.pipe(
719
+ R.length,
720
+ R.multiply(height),
721
+ R.ifElse(R.gt(maxTreeHeight), R.add(10), R.always(maxTreeHeight))
722
+ )(list) : treeHeight;
723
+ if (R.isEmpty(list)) {
724
+ return null;
725
+ }
726
+ const isRtl = getIsRtl(theme);
727
+ return /* @__PURE__ */ jsx(
728
+ "div",
729
+ {
730
+ style: { height: maxHeight },
731
+ onKeyUp,
732
+ onMouseUp,
733
+ onMouseLeave,
734
+ ref,
735
+ role: "presentation",
736
+ children: /* @__PURE__ */ jsx(AutoSizer, { disableWidth: true, children: ({ height: height$1 }) => /* @__PURE__ */ jsx(
737
+ VirtualizedList,
738
+ {
739
+ containerRole: "list",
740
+ role: "presentation",
741
+ overscan: 10,
742
+ tabIndex: -1,
743
+ containerStyle: { width: "100%", maxWidth: "100%" },
744
+ height: height$1 + 2,
745
+ width: 1,
746
+ style: { width: "100%" },
747
+ scrollTop,
748
+ rowCount: R.length(list),
749
+ rowHeight: R.add(1)(height),
750
+ rowRenderer: ({ index, style }) => {
751
+ const itemId = R.nth(index, list);
752
+ const item = R.prop(itemId, indexedItemsById);
753
+ return /* @__PURE__ */ createElement(
754
+ Item,
755
+ {
756
+ ...item,
757
+ id: getHierarchicalId(item),
758
+ label: labelRenderer(item),
759
+ key: getHierarchicalId(item),
760
+ depth: getDepth(indexedItemsById)(item),
761
+ hasChild: R.has(itemId, groupedItemsByParentId),
762
+ hasChildrenOnLevel: getHasChildrenOnLevel(groupedItemsByParentId)(item),
763
+ changeList: R.has(itemId, expandedIds) ? () => collapse(getHierarchicalId(item)) : () => expand(getHierarchicalId(item)),
764
+ NavigateIcon: R.has(itemId, expandedIds) ? ExpandLess : ExpandMore,
765
+ expanded: R.has(itemId, expandedIds),
766
+ isRtl,
767
+ eventsListeners: itemEventsListeners(getHierarchicalId(item), index),
768
+ HTMLRenderer,
769
+ classes,
770
+ labels,
771
+ style,
772
+ accessibility,
773
+ ariaLabel: R.prop("navigateNext")(labels),
774
+ theme
775
+ }
776
+ );
777
+ }
778
+ }
779
+ ) })
780
+ }
781
+ );
782
+ };
783
+
784
+ const withExpansionTree = (Component) => ({ items, defaultExpandedIds, ...rest }) => {
785
+ const [expandedIds, setExpandedIds] = useState({});
786
+ const [itemsIds, setItemsIds] = useState([]);
787
+ useEffect(() => {
788
+ const ids = R.map(getHierarchicalId, items);
789
+ if (!R.isEmpty(R.symmetricDifference(ids, itemsIds))) setItemsIds(ids);
790
+ }, [items]);
791
+ useEffect(() => {
792
+ setExpandedIds(R.indexBy(R.identity, itemsIds));
793
+ }, [itemsIds]);
794
+ useEffect(() => {
795
+ if (!R.isNil(defaultExpandedIds)) {
796
+ setExpandedIds(defaultExpandedIds);
797
+ }
798
+ }, [defaultExpandedIds]);
799
+ const expand = (id) => {
800
+ setExpandedIds(R.assoc(id, id, expandedIds));
801
+ };
802
+ const collapse = (id) => {
803
+ setExpandedIds(R.dissoc(id, expandedIds));
804
+ };
805
+ const expandAll = () => {
806
+ setExpandedIds(R.indexBy(R.identity, itemsIds));
807
+ };
808
+ const collapseAll = () => {
809
+ setExpandedIds({});
810
+ };
811
+ return /* @__PURE__ */ jsx(
812
+ Component,
813
+ {
814
+ ...rest,
815
+ items,
816
+ expand,
817
+ collapse,
818
+ expandAll,
819
+ collapseAll,
820
+ expandedIds
821
+ }
822
+ );
823
+ };
824
+
825
+ const spotlightFilter = (term, labelRenderer = R.prop("label"), displayChildren = false) => (items) => {
826
+ if (R.isEmpty(term) || R.isNil(term)) {
827
+ return items;
828
+ }
829
+ const groupedItemsByParentId = R.groupBy(R.propOr("#ROOT", "parentId"), items);
830
+ const findParents = (item, acc = []) => {
831
+ const parentId = R.prop("parentId", item);
832
+ if (parentId && parentId !== "#ROOT") {
833
+ const parent = R.find(
834
+ R.either(R.propEq("id", parentId), R.propEq("hierarchicalId", parentId)),
835
+ items
836
+ );
837
+ if (parent) {
838
+ return findParents(parent, [parent, ...acc]);
839
+ }
840
+ }
841
+ return acc;
842
+ };
843
+ const highlightLabel = (label) => {
844
+ const i = prepareTerm(label).indexOf(prepareTerm(term));
845
+ const l = R.length(term);
846
+ const pre = label.slice(0, i);
847
+ const match = label.slice(i, i + l);
848
+ const post = label.slice(i + l);
849
+ return `${pre}<span style=background-color:yellow;border-bottom:2px solid #8CC841>${match}</span>${post}`;
850
+ };
851
+ const recurse = (item) => {
852
+ const label = labelRenderer(item);
853
+ const isValidItem = searchTerm(term);
854
+ let result = [];
855
+ if (isValidItem(label)) {
856
+ const highlightedLabel = highlightLabel(label);
857
+ const parents = findParents(item);
858
+ result = [...parents, { ...item, highlightedLabel }];
859
+ if (displayChildren) {
860
+ const children = getDescendants(getHierarchicalId(item), groupedItemsByParentId);
861
+ const highlightedChildren = R.map((child) => {
862
+ const labelChild = labelRenderer(child);
863
+ return isValidItem(labelChild) ? { ...child, highlightedLabel: highlightLabel(labelChild) } : child;
864
+ })(children);
865
+ return [...parents, { ...item, highlightedLabel }, ...highlightedChildren];
866
+ }
867
+ }
868
+ if (R.has(getHierarchicalId(item), groupedItemsByParentId)) {
869
+ const childItems = groupedItemsByParentId[getHierarchicalId(item)] || [];
870
+ const matchingChildren = R.chain(recurse, childItems);
871
+ return R.uniq([...result, ...matchingChildren]);
872
+ }
873
+ return result;
874
+ };
875
+ return R.uniqBy(getHierarchicalId)(R.chain(recurse, groupedItemsByParentId["#ROOT"] || []));
876
+ };
877
+ const withSpotlight = (Component) => ({ items, defaultSpotlight, labelRenderer, displayChildren, ...rest }) => {
878
+ const [{ term }, setSpotlight] = useState({ term: "" });
879
+ useEffect(() => {
880
+ if (!R.isNil(defaultSpotlight) && !R.isEmpty(defaultSpotlight)) {
881
+ setSpotlight(defaultSpotlight);
882
+ }
883
+ }, [defaultSpotlight]);
884
+ const filteredItems = useMemo(
885
+ () => spotlightFilter(term, labelRenderer, displayChildren)(items),
886
+ [term, items, labelRenderer]
887
+ );
888
+ return /* @__PURE__ */ jsx(
889
+ Component,
890
+ {
891
+ ...rest,
892
+ allItems: items,
893
+ items: filteredItems,
894
+ labelRenderer,
895
+ hasSpotlight: R.length(items) >= 8,
896
+ spotlight: { term },
897
+ setSpotlight
898
+ }
899
+ );
900
+ };
901
+
902
+ export { VirtualizedTree as V, withExpansionTree as a, getEvolvedDisableAccessor as b, getScopeGetters as c, getHierarchicalId as g, useStyles as u, withSpotlight as w };
903
+ //# sourceMappingURL=withSpotlight-CYQVWD78.js.map