@pega/lists-react 8.0.0-build.27.14

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 (720) hide show
  1. package/LICENSE +185 -0
  2. package/README.md +219 -0
  3. package/SECURITY.md +11 -0
  4. package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts +23 -0
  5. package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts.map +1 -0
  6. package/lib/Core/Components/A11y/RepeatingStructureA11y.js +30 -0
  7. package/lib/Core/Components/A11y/RepeatingStructureA11y.js.map +1 -0
  8. package/lib/Core/Components/AggregateMenu.d.ts +23 -0
  9. package/lib/Core/Components/AggregateMenu.d.ts.map +1 -0
  10. package/lib/Core/Components/AggregateMenu.js +73 -0
  11. package/lib/Core/Components/AggregateMenu.js.map +1 -0
  12. package/lib/Core/Components/AggregatorCell.d.ts +23 -0
  13. package/lib/Core/Components/AggregatorCell.d.ts.map +1 -0
  14. package/lib/Core/Components/AggregatorCell.js +29 -0
  15. package/lib/Core/Components/AggregatorCell.js.map +1 -0
  16. package/lib/Core/Components/ColumnResizer.d.ts +13 -0
  17. package/lib/Core/Components/ColumnResizer.d.ts.map +1 -0
  18. package/lib/Core/Components/ColumnResizer.js +12 -0
  19. package/lib/Core/Components/ColumnResizer.js.map +1 -0
  20. package/lib/Core/Components/ConfirmationModal.d.ts +27 -0
  21. package/lib/Core/Components/ConfirmationModal.d.ts.map +1 -0
  22. package/lib/Core/Components/ConfirmationModal.js +36 -0
  23. package/lib/Core/Components/ConfirmationModal.js.map +1 -0
  24. package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts +17 -0
  25. package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts.map +1 -0
  26. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js +209 -0
  27. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js.map +1 -0
  28. package/lib/Core/Components/ContextMenu/CopyPaste.d.ts +3 -0
  29. package/lib/Core/Components/ContextMenu/CopyPaste.d.ts.map +1 -0
  30. package/lib/Core/Components/ContextMenu/CopyPaste.js +22 -0
  31. package/lib/Core/Components/ContextMenu/CopyPaste.js.map +1 -0
  32. package/lib/Core/Components/ContextMenu/QuickFilter.d.ts +4 -0
  33. package/lib/Core/Components/ContextMenu/QuickFilter.d.ts.map +1 -0
  34. package/lib/Core/Components/ContextMenu/QuickFilter.js +82 -0
  35. package/lib/Core/Components/ContextMenu/QuickFilter.js.map +1 -0
  36. package/lib/Core/Components/DateValueDisplay.d.ts +13 -0
  37. package/lib/Core/Components/DateValueDisplay.d.ts.map +1 -0
  38. package/lib/Core/Components/DateValueDisplay.js +71 -0
  39. package/lib/Core/Components/DateValueDisplay.js.map +1 -0
  40. package/lib/Core/Components/DefaultComponents/Badge.d.ts +14 -0
  41. package/lib/Core/Components/DefaultComponents/Badge.d.ts.map +1 -0
  42. package/lib/Core/Components/DefaultComponents/Badge.js +15 -0
  43. package/lib/Core/Components/DefaultComponents/Badge.js.map +1 -0
  44. package/lib/Core/Components/DefaultComponents/CardItem.d.ts +3 -0
  45. package/lib/Core/Components/DefaultComponents/CardItem.d.ts.map +1 -0
  46. package/lib/Core/Components/DefaultComponents/CardItem.js +78 -0
  47. package/lib/Core/Components/DefaultComponents/CardItem.js.map +1 -0
  48. package/lib/Core/Components/DefaultComponents/CellRenderers/Cell.d.ts +15 -0
  49. package/lib/Core/Components/DefaultComponents/CellRenderers/Cell.d.ts.map +1 -0
  50. package/lib/Core/Components/DefaultComponents/CellRenderers/Cell.js +18 -0
  51. package/lib/Core/Components/DefaultComponents/CellRenderers/Cell.js.map +1 -0
  52. package/lib/Core/Components/DefaultComponents/CellRenderers/CheckCross.d.ts +5 -0
  53. package/lib/Core/Components/DefaultComponents/CellRenderers/CheckCross.d.ts.map +1 -0
  54. package/lib/Core/Components/DefaultComponents/CellRenderers/CheckCross.js +25 -0
  55. package/lib/Core/Components/DefaultComponents/CellRenderers/CheckCross.js.map +1 -0
  56. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/Comma.d.ts +13 -0
  57. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/Comma.d.ts.map +1 -0
  58. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/Comma.js +11 -0
  59. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/Comma.js.map +1 -0
  60. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts +3 -0
  61. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts.map +1 -0
  62. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.js +10 -0
  63. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.js.map +1 -0
  64. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/ForwardSlash.d.ts +13 -0
  65. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/ForwardSlash.d.ts.map +1 -0
  66. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/ForwardSlash.js +11 -0
  67. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/ForwardSlash.js.map +1 -0
  68. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/MultiLine.d.ts +13 -0
  69. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/MultiLine.d.ts.map +1 -0
  70. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/MultiLine.js +15 -0
  71. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/MultiLine.js.map +1 -0
  72. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/Space.d.ts +13 -0
  73. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/Space.d.ts.map +1 -0
  74. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/Space.js +11 -0
  75. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/Space.js.map +1 -0
  76. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/index.d.ts +12 -0
  77. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/index.d.ts.map +1 -0
  78. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/index.js +11 -0
  79. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/index.js.map +1 -0
  80. package/lib/Core/Components/DefaultComponents/CellRenderers/CustomCell.d.ts +18 -0
  81. package/lib/Core/Components/DefaultComponents/CellRenderers/CustomCell.d.ts.map +1 -0
  82. package/lib/Core/Components/DefaultComponents/CellRenderers/CustomCell.js +51 -0
  83. package/lib/Core/Components/DefaultComponents/CellRenderers/CustomCell.js.map +1 -0
  84. package/lib/Core/Components/DefaultComponents/CellRenderers/DefaultTextRenderer.d.ts +13 -0
  85. package/lib/Core/Components/DefaultComponents/CellRenderers/DefaultTextRenderer.d.ts.map +1 -0
  86. package/lib/Core/Components/DefaultComponents/CellRenderers/DefaultTextRenderer.js +25 -0
  87. package/lib/Core/Components/DefaultComponents/CellRenderers/DefaultTextRenderer.js.map +1 -0
  88. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts +12 -0
  89. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts.map +1 -0
  90. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js +35 -0
  91. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js.map +1 -0
  92. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts +15 -0
  93. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts.map +1 -0
  94. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js +49 -0
  95. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js.map +1 -0
  96. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts +12 -0
  97. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts.map +1 -0
  98. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js +44 -0
  99. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js.map +1 -0
  100. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts +16 -0
  101. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts.map +1 -0
  102. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js +64 -0
  103. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js.map +1 -0
  104. package/lib/Core/Components/DefaultComponents/CellRenderers/Link.d.ts +7 -0
  105. package/lib/Core/Components/DefaultComponents/CellRenderers/Link.d.ts.map +1 -0
  106. package/lib/Core/Components/DefaultComponents/CellRenderers/Link.js +23 -0
  107. package/lib/Core/Components/DefaultComponents/CellRenderers/Link.js.map +1 -0
  108. package/lib/Core/Components/DefaultComponents/CellRenderers/Operator.d.ts +19 -0
  109. package/lib/Core/Components/DefaultComponents/CellRenderers/Operator.d.ts.map +1 -0
  110. package/lib/Core/Components/DefaultComponents/CellRenderers/Operator.js +37 -0
  111. package/lib/Core/Components/DefaultComponents/CellRenderers/Operator.js.map +1 -0
  112. package/lib/Core/Components/DefaultComponents/CellRenderers/RichText.d.ts +17 -0
  113. package/lib/Core/Components/DefaultComponents/CellRenderers/RichText.d.ts.map +1 -0
  114. package/lib/Core/Components/DefaultComponents/CellRenderers/RichText.js +50 -0
  115. package/lib/Core/Components/DefaultComponents/CellRenderers/RichText.js.map +1 -0
  116. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts +13 -0
  117. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts.map +1 -0
  118. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js +67 -0
  119. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js.map +1 -0
  120. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts +11 -0
  121. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts.map +1 -0
  122. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js +11 -0
  123. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js.map +1 -0
  124. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts +11 -0
  125. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts.map +1 -0
  126. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js +13 -0
  127. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js.map +1 -0
  128. package/lib/Core/Components/DefaultComponents/CellRenderers/RowSelectHandle.d.ts +15 -0
  129. package/lib/Core/Components/DefaultComponents/CellRenderers/RowSelectHandle.d.ts.map +1 -0
  130. package/lib/Core/Components/DefaultComponents/CellRenderers/RowSelectHandle.js +57 -0
  131. package/lib/Core/Components/DefaultComponents/CellRenderers/RowSelectHandle.js.map +1 -0
  132. package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts +52 -0
  133. package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts.map +1 -0
  134. package/lib/Core/Components/DefaultComponents/CellRenderers/index.js +29 -0
  135. package/lib/Core/Components/DefaultComponents/CellRenderers/index.js.map +1 -0
  136. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts +3 -0
  137. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts.map +1 -0
  138. package/lib/Core/Components/DefaultComponents/EmptyContainer.js +25 -0
  139. package/lib/Core/Components/DefaultComponents/EmptyContainer.js.map +1 -0
  140. package/lib/Core/Components/DefaultComponents/Filter.d.ts +15 -0
  141. package/lib/Core/Components/DefaultComponents/Filter.d.ts.map +1 -0
  142. package/lib/Core/Components/DefaultComponents/Filter.js +18 -0
  143. package/lib/Core/Components/DefaultComponents/Filter.js.map +1 -0
  144. package/lib/Core/Components/DefaultComponents/HeaderCell.d.ts +17 -0
  145. package/lib/Core/Components/DefaultComponents/HeaderCell.d.ts.map +1 -0
  146. package/lib/Core/Components/DefaultComponents/HeaderCell.js +21 -0
  147. package/lib/Core/Components/DefaultComponents/HeaderCell.js.map +1 -0
  148. package/lib/Core/Components/DefaultComponents/LoadingIndicator.d.ts +3 -0
  149. package/lib/Core/Components/DefaultComponents/LoadingIndicator.d.ts.map +1 -0
  150. package/lib/Core/Components/DefaultComponents/LoadingIndicator.js +9 -0
  151. package/lib/Core/Components/DefaultComponents/LoadingIndicator.js.map +1 -0
  152. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts +24 -0
  153. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts.map +1 -0
  154. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js +102 -0
  155. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js.map +1 -0
  156. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.d.ts +16 -0
  157. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.d.ts.map +1 -0
  158. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js +26 -0
  159. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js.map +1 -0
  160. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts +25 -0
  161. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts.map +1 -0
  162. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js +85 -0
  163. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js.map +1 -0
  164. package/lib/Core/Components/DefaultComponents/PersonalizationUnsavedWarning.d.ts +16 -0
  165. package/lib/Core/Components/DefaultComponents/PersonalizationUnsavedWarning.d.ts.map +1 -0
  166. package/lib/Core/Components/DefaultComponents/PersonalizationUnsavedWarning.js +26 -0
  167. package/lib/Core/Components/DefaultComponents/PersonalizationUnsavedWarning.js.map +1 -0
  168. package/lib/Core/Components/DefaultComponents/RowHeight.d.ts +13 -0
  169. package/lib/Core/Components/DefaultComponents/RowHeight.d.ts.map +1 -0
  170. package/lib/Core/Components/DefaultComponents/RowHeight.js +20 -0
  171. package/lib/Core/Components/DefaultComponents/RowHeight.js.map +1 -0
  172. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.d.ts +15 -0
  173. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.d.ts.map +1 -0
  174. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js +40 -0
  175. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js.map +1 -0
  176. package/lib/Core/Components/DefaultComponents/Sort.d.ts +15 -0
  177. package/lib/Core/Components/DefaultComponents/Sort.d.ts.map +1 -0
  178. package/lib/Core/Components/DefaultComponents/Sort.js +21 -0
  179. package/lib/Core/Components/DefaultComponents/Sort.js.map +1 -0
  180. package/lib/Core/Components/DefaultComponents/index.d.ts +96 -0
  181. package/lib/Core/Components/DefaultComponents/index.d.ts.map +1 -0
  182. package/lib/Core/Components/DefaultComponents/index.js +53 -0
  183. package/lib/Core/Components/DefaultComponents/index.js.map +1 -0
  184. package/lib/Core/Components/DynamicFieldConfiguration.d.ts +23 -0
  185. package/lib/Core/Components/DynamicFieldConfiguration.d.ts.map +1 -0
  186. package/lib/Core/Components/DynamicFieldConfiguration.js +92 -0
  187. package/lib/Core/Components/DynamicFieldConfiguration.js.map +1 -0
  188. package/lib/Core/Components/EmptyContainer.d.ts +5 -0
  189. package/lib/Core/Components/EmptyContainer.d.ts.map +1 -0
  190. package/lib/Core/Components/EmptyContainer.js +12 -0
  191. package/lib/Core/Components/EmptyContainer.js.map +1 -0
  192. package/lib/Core/Components/FieldTypeIcon.d.ts +13 -0
  193. package/lib/Core/Components/FieldTypeIcon.d.ts.map +1 -0
  194. package/lib/Core/Components/FieldTypeIcon.js +17 -0
  195. package/lib/Core/Components/FieldTypeIcon.js.map +1 -0
  196. package/lib/Core/Components/Filters/AdvanceFilter.d.ts +16 -0
  197. package/lib/Core/Components/Filters/AdvanceFilter.d.ts.map +1 -0
  198. package/lib/Core/Components/Filters/AdvanceFilter.js +29 -0
  199. package/lib/Core/Components/Filters/AdvanceFilter.js.map +1 -0
  200. package/lib/Core/Components/Filters/BooleanFilter.d.ts +17 -0
  201. package/lib/Core/Components/Filters/BooleanFilter.d.ts.map +1 -0
  202. package/lib/Core/Components/Filters/BooleanFilter.js +43 -0
  203. package/lib/Core/Components/Filters/BooleanFilter.js.map +1 -0
  204. package/lib/Core/Components/Filters/CommonFilter.d.ts +17 -0
  205. package/lib/Core/Components/Filters/CommonFilter.d.ts.map +1 -0
  206. package/lib/Core/Components/Filters/CommonFilter.js +67 -0
  207. package/lib/Core/Components/Filters/CommonFilter.js.map +1 -0
  208. package/lib/Core/Components/Filters/Filter.d.ts +18 -0
  209. package/lib/Core/Components/Filters/Filter.d.ts.map +1 -0
  210. package/lib/Core/Components/Filters/Filter.js +20 -0
  211. package/lib/Core/Components/Filters/Filter.js.map +1 -0
  212. package/lib/Core/Components/Filters/FilterMenu.d.ts +15 -0
  213. package/lib/Core/Components/Filters/FilterMenu.d.ts.map +1 -0
  214. package/lib/Core/Components/Filters/FilterMenu.js +32 -0
  215. package/lib/Core/Components/Filters/FilterMenu.js.map +1 -0
  216. package/lib/Core/Components/Filters/FilterType.d.ts +18 -0
  217. package/lib/Core/Components/Filters/FilterType.d.ts.map +1 -0
  218. package/lib/Core/Components/Filters/FilterType.js +35 -0
  219. package/lib/Core/Components/Filters/FilterType.js.map +1 -0
  220. package/lib/Core/Components/Filters/Hooks/useFilterSubmit.d.ts +5 -0
  221. package/lib/Core/Components/Filters/Hooks/useFilterSubmit.d.ts.map +1 -0
  222. package/lib/Core/Components/Filters/Hooks/useFilterSubmit.js +10 -0
  223. package/lib/Core/Components/Filters/Hooks/useFilterSubmit.js.map +1 -0
  224. package/lib/Core/Components/Filters/Hooks/useValidRhsTypes.d.ts +2 -0
  225. package/lib/Core/Components/Filters/Hooks/useValidRhsTypes.d.ts.map +1 -0
  226. package/lib/Core/Components/Filters/Hooks/useValidRhsTypes.js +14 -0
  227. package/lib/Core/Components/Filters/Hooks/useValidRhsTypes.js.map +1 -0
  228. package/lib/Core/Components/Filters/InputWrapper.d.ts +28 -0
  229. package/lib/Core/Components/Filters/InputWrapper.d.ts.map +1 -0
  230. package/lib/Core/Components/Filters/InputWrapper.js +40 -0
  231. package/lib/Core/Components/Filters/InputWrapper.js.map +1 -0
  232. package/lib/Core/Components/Filters/SelectFilter.d.ts +17 -0
  233. package/lib/Core/Components/Filters/SelectFilter.d.ts.map +1 -0
  234. package/lib/Core/Components/Filters/SelectFilter.js +116 -0
  235. package/lib/Core/Components/Filters/SelectFilter.js.map +1 -0
  236. package/lib/Core/Components/Filters/SimpleFilter.d.ts +17 -0
  237. package/lib/Core/Components/Filters/SimpleFilter.d.ts.map +1 -0
  238. package/lib/Core/Components/Filters/SimpleFilter.js +38 -0
  239. package/lib/Core/Components/Filters/SimpleFilter.js.map +1 -0
  240. package/lib/Core/Components/Filters/config.d.ts +75 -0
  241. package/lib/Core/Components/Filters/config.d.ts.map +1 -0
  242. package/lib/Core/Components/Filters/config.js +244 -0
  243. package/lib/Core/Components/Filters/config.js.map +1 -0
  244. package/lib/Core/Components/Filters/styles.d.ts +3 -0
  245. package/lib/Core/Components/Filters/styles.d.ts.map +1 -0
  246. package/lib/Core/Components/Filters/styles.js +30 -0
  247. package/lib/Core/Components/Filters/styles.js.map +1 -0
  248. package/lib/Core/Components/Footer.d.ts +13 -0
  249. package/lib/Core/Components/Footer.d.ts.map +1 -0
  250. package/lib/Core/Components/Footer.js +22 -0
  251. package/lib/Core/Components/Footer.js.map +1 -0
  252. package/lib/Core/Components/FooterAggregators.d.ts +16 -0
  253. package/lib/Core/Components/FooterAggregators.d.ts.map +1 -0
  254. package/lib/Core/Components/FooterAggregators.js +29 -0
  255. package/lib/Core/Components/FooterAggregators.js.map +1 -0
  256. package/lib/Core/Components/FreezeLine.d.ts +13 -0
  257. package/lib/Core/Components/FreezeLine.d.ts.map +1 -0
  258. package/lib/Core/Components/FreezeLine.js +13 -0
  259. package/lib/Core/Components/FreezeLine.js.map +1 -0
  260. package/lib/Core/Components/GroupRenderer.d.ts +15 -0
  261. package/lib/Core/Components/GroupRenderer.d.ts.map +1 -0
  262. package/lib/Core/Components/GroupRenderer.js +212 -0
  263. package/lib/Core/Components/GroupRenderer.js.map +1 -0
  264. package/lib/Core/Components/Grouping/GroupingMenu.d.ts +15 -0
  265. package/lib/Core/Components/Grouping/GroupingMenu.d.ts.map +1 -0
  266. package/lib/Core/Components/Grouping/GroupingMenu.js +66 -0
  267. package/lib/Core/Components/Grouping/GroupingMenu.js.map +1 -0
  268. package/lib/Core/Components/HeaderCell.d.ts +17 -0
  269. package/lib/Core/Components/HeaderCell.d.ts.map +1 -0
  270. package/lib/Core/Components/HeaderCell.js +30 -0
  271. package/lib/Core/Components/HeaderCell.js.map +1 -0
  272. package/lib/Core/Components/HeaderMenu/actions.d.ts +15 -0
  273. package/lib/Core/Components/HeaderMenu/actions.d.ts.map +1 -0
  274. package/lib/Core/Components/HeaderMenu/actions.js +211 -0
  275. package/lib/Core/Components/HeaderMenu/actions.js.map +1 -0
  276. package/lib/Core/Components/HeaderMenu/index.d.ts +23 -0
  277. package/lib/Core/Components/HeaderMenu/index.d.ts.map +1 -0
  278. package/lib/Core/Components/HeaderMenu/index.js +187 -0
  279. package/lib/Core/Components/HeaderMenu/index.js.map +1 -0
  280. package/lib/Core/Components/HierarchicalCell.d.ts +23 -0
  281. package/lib/Core/Components/HierarchicalCell.d.ts.map +1 -0
  282. package/lib/Core/Components/HierarchicalCell.js +30 -0
  283. package/lib/Core/Components/HierarchicalCell.js.map +1 -0
  284. package/lib/Core/Components/HierarchicalGroupFooters.d.ts +32 -0
  285. package/lib/Core/Components/HierarchicalGroupFooters.d.ts.map +1 -0
  286. package/lib/Core/Components/HierarchicalGroupFooters.js +58 -0
  287. package/lib/Core/Components/HierarchicalGroupFooters.js.map +1 -0
  288. package/lib/Core/Components/HierarchicalGroupRenderer.d.ts +31 -0
  289. package/lib/Core/Components/HierarchicalGroupRenderer.d.ts.map +1 -0
  290. package/lib/Core/Components/HierarchicalGroupRenderer.js +230 -0
  291. package/lib/Core/Components/HierarchicalGroupRenderer.js.map +1 -0
  292. package/lib/Core/Components/LoadingIndicator.d.ts +15 -0
  293. package/lib/Core/Components/LoadingIndicator.d.ts.map +1 -0
  294. package/lib/Core/Components/LoadingIndicator.js +15 -0
  295. package/lib/Core/Components/LoadingIndicator.js.map +1 -0
  296. package/lib/Core/Components/NotificationManager.d.ts +13 -0
  297. package/lib/Core/Components/NotificationManager.d.ts.map +1 -0
  298. package/lib/Core/Components/NotificationManager.js +44 -0
  299. package/lib/Core/Components/NotificationManager.js.map +1 -0
  300. package/lib/Core/Components/RFColumnConfigurator.d.ts +19 -0
  301. package/lib/Core/Components/RFColumnConfigurator.d.ts.map +1 -0
  302. package/lib/Core/Components/RFColumnConfigurator.js +90 -0
  303. package/lib/Core/Components/RFColumnConfigurator.js.map +1 -0
  304. package/lib/Core/Components/RSWrapper/HeaderBarGadget.d.ts +13 -0
  305. package/lib/Core/Components/RSWrapper/HeaderBarGadget.d.ts.map +1 -0
  306. package/lib/Core/Components/RSWrapper/HeaderBarGadget.js +52 -0
  307. package/lib/Core/Components/RSWrapper/HeaderBarGadget.js.map +1 -0
  308. package/lib/Core/Components/RSWrapper/Personalization.d.ts +13 -0
  309. package/lib/Core/Components/RSWrapper/Personalization.d.ts.map +1 -0
  310. package/lib/Core/Components/RSWrapper/Personalization.js +61 -0
  311. package/lib/Core/Components/RSWrapper/Personalization.js.map +1 -0
  312. package/lib/Core/Components/RSWrapper/__mocks__/uuid.d.ts +2 -0
  313. package/lib/Core/Components/RSWrapper/__mocks__/uuid.d.ts.map +1 -0
  314. package/lib/Core/Components/RSWrapper/__mocks__/uuid.js +4 -0
  315. package/lib/Core/Components/RSWrapper/__mocks__/uuid.js.map +1 -0
  316. package/lib/Core/Components/RSWrapper/index.d.ts +6 -0
  317. package/lib/Core/Components/RSWrapper/index.d.ts.map +1 -0
  318. package/lib/Core/Components/RSWrapper/index.js +83 -0
  319. package/lib/Core/Components/RSWrapper/index.js.map +1 -0
  320. package/lib/Core/Components/RenderingEngine/ComponentResolverFactory.d.ts +3 -0
  321. package/lib/Core/Components/RenderingEngine/ComponentResolverFactory.d.ts.map +1 -0
  322. package/lib/Core/Components/RenderingEngine/ComponentResolverFactory.js +65 -0
  323. package/lib/Core/Components/RenderingEngine/ComponentResolverFactory.js.map +1 -0
  324. package/lib/Core/Components/RenderingEngine/ErrorHandler.d.ts +2 -0
  325. package/lib/Core/Components/RenderingEngine/ErrorHandler.d.ts.map +1 -0
  326. package/lib/Core/Components/RenderingEngine/ErrorHandler.js +2 -0
  327. package/lib/Core/Components/RenderingEngine/ErrorHandler.js.map +1 -0
  328. package/lib/Core/Components/RenderingEngine/ExpresssionEvaluator.d.ts +2 -0
  329. package/lib/Core/Components/RenderingEngine/ExpresssionEvaluator.d.ts.map +1 -0
  330. package/lib/Core/Components/RenderingEngine/ExpresssionEvaluator.js +2 -0
  331. package/lib/Core/Components/RenderingEngine/ExpresssionEvaluator.js.map +1 -0
  332. package/lib/Core/Components/RenderingEngine/Flasher.d.ts +2 -0
  333. package/lib/Core/Components/RenderingEngine/Flasher.d.ts.map +1 -0
  334. package/lib/Core/Components/RenderingEngine/Flasher.js +2 -0
  335. package/lib/Core/Components/RenderingEngine/Flasher.js.map +1 -0
  336. package/lib/Core/Components/RenderingEngine/Formatter.d.ts +2 -0
  337. package/lib/Core/Components/RenderingEngine/Formatter.d.ts.map +1 -0
  338. package/lib/Core/Components/RenderingEngine/Formatter.js +24 -0
  339. package/lib/Core/Components/RenderingEngine/Formatter.js.map +1 -0
  340. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts +16 -0
  341. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts.map +1 -0
  342. package/lib/Core/Components/RenderingEngine/RenderCell.js +48 -0
  343. package/lib/Core/Components/RenderingEngine/RenderCell.js.map +1 -0
  344. package/lib/Core/Components/RenderingEngine/RenderView.d.ts +8 -0
  345. package/lib/Core/Components/RenderingEngine/RenderView.d.ts.map +1 -0
  346. package/lib/Core/Components/RenderingEngine/RenderView.js +25 -0
  347. package/lib/Core/Components/RenderingEngine/RenderView.js.map +1 -0
  348. package/lib/Core/Components/RenderingEngine/Util.d.ts +2 -0
  349. package/lib/Core/Components/RenderingEngine/Util.d.ts.map +1 -0
  350. package/lib/Core/Components/RenderingEngine/Util.js +36 -0
  351. package/lib/Core/Components/RenderingEngine/Util.js.map +1 -0
  352. package/lib/Core/Components/RenderingEngine/ValueRenderer.d.ts +14 -0
  353. package/lib/Core/Components/RenderingEngine/ValueRenderer.d.ts.map +1 -0
  354. package/lib/Core/Components/RenderingEngine/ValueRenderer.js +12 -0
  355. package/lib/Core/Components/RenderingEngine/ValueRenderer.js.map +1 -0
  356. package/lib/Core/Components/RenderingEngine/useHighlighter.d.ts +5 -0
  357. package/lib/Core/Components/RenderingEngine/useHighlighter.d.ts.map +1 -0
  358. package/lib/Core/Components/RenderingEngine/useHighlighter.js +52 -0
  359. package/lib/Core/Components/RenderingEngine/useHighlighter.js.map +1 -0
  360. package/lib/Core/Components/TestIdConstants.d.ts +15 -0
  361. package/lib/Core/Components/TestIdConstants.d.ts.map +1 -0
  362. package/lib/Core/Components/TestIdConstants.js +14 -0
  363. package/lib/Core/Components/TestIdConstants.js.map +1 -0
  364. package/lib/Core/Components/Toolbar/ActionsMenu.d.ts +15 -0
  365. package/lib/Core/Components/Toolbar/ActionsMenu.d.ts.map +1 -0
  366. package/lib/Core/Components/Toolbar/ActionsMenu.js +58 -0
  367. package/lib/Core/Components/Toolbar/ActionsMenu.js.map +1 -0
  368. package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts +14 -0
  369. package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts.map +1 -0
  370. package/lib/Core/Components/Toolbar/AdvanceToolbar.js +59 -0
  371. package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -0
  372. package/lib/Core/Components/Toolbar/AnnounceRowsCount.d.ts +20 -0
  373. package/lib/Core/Components/Toolbar/AnnounceRowsCount.d.ts.map +1 -0
  374. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js +14 -0
  375. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js.map +1 -0
  376. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts +35 -0
  377. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts.map +1 -0
  378. package/lib/Core/Components/Toolbar/ColumnSelector.js +141 -0
  379. package/lib/Core/Components/Toolbar/ColumnSelector.js.map +1 -0
  380. package/lib/Core/Components/Toolbar/DebugInfo.d.ts +14 -0
  381. package/lib/Core/Components/Toolbar/DebugInfo.d.ts.map +1 -0
  382. package/lib/Core/Components/Toolbar/DebugInfo.js +48 -0
  383. package/lib/Core/Components/Toolbar/DebugInfo.js.map +1 -0
  384. package/lib/Core/Components/Toolbar/FieldSelector.d.ts +19 -0
  385. package/lib/Core/Components/Toolbar/FieldSelector.d.ts.map +1 -0
  386. package/lib/Core/Components/Toolbar/FieldSelector.js +53 -0
  387. package/lib/Core/Components/Toolbar/FieldSelector.js.map +1 -0
  388. package/lib/Core/Components/Toolbar/Grouping.types.d.ts +22 -0
  389. package/lib/Core/Components/Toolbar/Grouping.types.d.ts.map +1 -0
  390. package/lib/Core/Components/Toolbar/Grouping.types.js +2 -0
  391. package/lib/Core/Components/Toolbar/Grouping.types.js.map +1 -0
  392. package/lib/Core/Components/Toolbar/Map/MapToolbar.d.ts +9 -0
  393. package/lib/Core/Components/Toolbar/Map/MapToolbar.d.ts.map +1 -0
  394. package/lib/Core/Components/Toolbar/Map/MapToolbar.js +27 -0
  395. package/lib/Core/Components/Toolbar/Map/MapToolbar.js.map +1 -0
  396. package/lib/Core/Components/Toolbar/RefreshBanner.d.ts +15 -0
  397. package/lib/Core/Components/Toolbar/RefreshBanner.d.ts.map +1 -0
  398. package/lib/Core/Components/Toolbar/RefreshBanner.js +28 -0
  399. package/lib/Core/Components/Toolbar/RefreshBanner.js.map +1 -0
  400. package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts +14 -0
  401. package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -0
  402. package/lib/Core/Components/Toolbar/SimpleToolbar.js +22 -0
  403. package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -0
  404. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts +8 -0
  405. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts.map +1 -0
  406. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js +61 -0
  407. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js.map +1 -0
  408. package/lib/Core/Components/Toolbar/ToolbarActions.d.ts +20 -0
  409. package/lib/Core/Components/Toolbar/ToolbarActions.d.ts.map +1 -0
  410. package/lib/Core/Components/Toolbar/ToolbarActions.js +28 -0
  411. package/lib/Core/Components/Toolbar/ToolbarActions.js.map +1 -0
  412. package/lib/Core/Components/Toolbar/ValidateMessage.d.ts +17 -0
  413. package/lib/Core/Components/Toolbar/ValidateMessage.d.ts.map +1 -0
  414. package/lib/Core/Components/Toolbar/ValidateMessage.js +44 -0
  415. package/lib/Core/Components/Toolbar/ValidateMessage.js.map +1 -0
  416. package/lib/Core/Components/Toolbar/hooks/useAnnounceRowsCount.d.ts +3 -0
  417. package/lib/Core/Components/Toolbar/hooks/useAnnounceRowsCount.d.ts.map +1 -0
  418. package/lib/Core/Components/Toolbar/hooks/useAnnounceRowsCount.js +37 -0
  419. package/lib/Core/Components/Toolbar/hooks/useAnnounceRowsCount.js.map +1 -0
  420. package/lib/Core/Components/Toolbar/hooks/useFilter.d.ts +10 -0
  421. package/lib/Core/Components/Toolbar/hooks/useFilter.d.ts.map +1 -0
  422. package/lib/Core/Components/Toolbar/hooks/useFilter.js +43 -0
  423. package/lib/Core/Components/Toolbar/hooks/useFilter.js.map +1 -0
  424. package/lib/Core/Components/Toolbar/hooks/useFormControlProps.d.ts +5 -0
  425. package/lib/Core/Components/Toolbar/hooks/useFormControlProps.d.ts.map +1 -0
  426. package/lib/Core/Components/Toolbar/hooks/useFormControlProps.js +18 -0
  427. package/lib/Core/Components/Toolbar/hooks/useFormControlProps.js.map +1 -0
  428. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts +24 -0
  429. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts.map +1 -0
  430. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js +58 -0
  431. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js.map +1 -0
  432. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts +16 -0
  433. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts.map +1 -0
  434. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js +110 -0
  435. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js.map +1 -0
  436. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.d.ts +11 -0
  437. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.d.ts.map +1 -0
  438. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js +75 -0
  439. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js.map +1 -0
  440. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts +11 -0
  441. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts.map +1 -0
  442. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js +61 -0
  443. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js.map +1 -0
  444. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts +9 -0
  445. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts.map +1 -0
  446. package/lib/Core/Components/Toolbar/hooks/useMore.js +317 -0
  447. package/lib/Core/Components/Toolbar/hooks/useMore.js.map +1 -0
  448. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts +13 -0
  449. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts.map +1 -0
  450. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js +17 -0
  451. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js.map +1 -0
  452. package/lib/Core/Components/Toolbar/hooks/useRowFocus.d.ts +6 -0
  453. package/lib/Core/Components/Toolbar/hooks/useRowFocus.d.ts.map +1 -0
  454. package/lib/Core/Components/Toolbar/hooks/useRowFocus.js +13 -0
  455. package/lib/Core/Components/Toolbar/hooks/useRowFocus.js.map +1 -0
  456. package/lib/Core/Components/Toolbar/hooks/useSearch.d.ts +11 -0
  457. package/lib/Core/Components/Toolbar/hooks/useSearch.d.ts.map +1 -0
  458. package/lib/Core/Components/Toolbar/hooks/useSearch.js +38 -0
  459. package/lib/Core/Components/Toolbar/hooks/useSearch.js.map +1 -0
  460. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts +44 -0
  461. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts.map +1 -0
  462. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js +54 -0
  463. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js.map +1 -0
  464. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts +13 -0
  465. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts.map +1 -0
  466. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js +81 -0
  467. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js.map +1 -0
  468. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.d.ts +11 -0
  469. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.d.ts.map +1 -0
  470. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js +41 -0
  471. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js.map +1 -0
  472. package/lib/Core/Components/Toolbar/hooks/useSort/utils.d.ts +8 -0
  473. package/lib/Core/Components/Toolbar/hooks/useSort/utils.d.ts.map +1 -0
  474. package/lib/Core/Components/Toolbar/hooks/useSort/utils.js +19 -0
  475. package/lib/Core/Components/Toolbar/hooks/useSort/utils.js.map +1 -0
  476. package/lib/Core/Components/Toolbar/index.d.ts +14 -0
  477. package/lib/Core/Components/Toolbar/index.d.ts.map +1 -0
  478. package/lib/Core/Components/Toolbar/index.js +13 -0
  479. package/lib/Core/Components/Toolbar/index.js.map +1 -0
  480. package/lib/Core/Components/Toolbar/utils/getCount.d.ts +9 -0
  481. package/lib/Core/Components/Toolbar/utils/getCount.d.ts.map +1 -0
  482. package/lib/Core/Components/Toolbar/utils/getCount.js +22 -0
  483. package/lib/Core/Components/Toolbar/utils/getCount.js.map +1 -0
  484. package/lib/Core/Components/Toolbar/utils/utils.d.ts +51 -0
  485. package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -0
  486. package/lib/Core/Components/Toolbar/utils/utils.js +100 -0
  487. package/lib/Core/Components/Toolbar/utils/utils.js.map +1 -0
  488. package/lib/Core/Components/Virtualise/Pagination.d.ts +13 -0
  489. package/lib/Core/Components/Virtualise/Pagination.d.ts.map +1 -0
  490. package/lib/Core/Components/Virtualise/Pagination.js +228 -0
  491. package/lib/Core/Components/Virtualise/Pagination.js.map +1 -0
  492. package/lib/Core/Components/Virtualise/UseResizeObserver.d.ts +2 -0
  493. package/lib/Core/Components/Virtualise/UseResizeObserver.d.ts.map +1 -0
  494. package/lib/Core/Components/Virtualise/UseResizeObserver.js +18 -0
  495. package/lib/Core/Components/Virtualise/UseResizeObserver.js.map +1 -0
  496. package/lib/Core/Components/Virtualise/UseScroll.d.ts +3 -0
  497. package/lib/Core/Components/Virtualise/UseScroll.d.ts.map +1 -0
  498. package/lib/Core/Components/Virtualise/UseScroll.js +92 -0
  499. package/lib/Core/Components/Virtualise/UseScroll.js.map +1 -0
  500. package/lib/Core/Components/Virtualise/VirtualizeInfinite.d.ts +3 -0
  501. package/lib/Core/Components/Virtualise/VirtualizeInfinite.d.ts.map +1 -0
  502. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js +328 -0
  503. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -0
  504. package/lib/Core/Components/Virtualise/index.d.ts +3 -0
  505. package/lib/Core/Components/Virtualise/index.d.ts.map +1 -0
  506. package/lib/Core/Components/Virtualise/index.js +313 -0
  507. package/lib/Core/Components/Virtualise/index.js.map +1 -0
  508. package/lib/Core/Components/Virtualise/utility.d.ts +63 -0
  509. package/lib/Core/Components/Virtualise/utility.d.ts.map +1 -0
  510. package/lib/Core/Components/Virtualise/utility.js +209 -0
  511. package/lib/Core/Components/Virtualise/utility.js.map +1 -0
  512. package/lib/Core/Context/GlobalContext.d.ts +8 -0
  513. package/lib/Core/Context/GlobalContext.d.ts.map +1 -0
  514. package/lib/Core/Context/GlobalContext.js +7 -0
  515. package/lib/Core/Context/GlobalContext.js.map +1 -0
  516. package/lib/Core/Context/LocalizationContext.d.ts +13 -0
  517. package/lib/Core/Context/LocalizationContext.d.ts.map +1 -0
  518. package/lib/Core/Context/LocalizationContext.js +16 -0
  519. package/lib/Core/Context/LocalizationContext.js.map +1 -0
  520. package/lib/Core/Context/ToolbarContext.d.ts +8 -0
  521. package/lib/Core/Context/ToolbarContext.d.ts.map +1 -0
  522. package/lib/Core/Context/ToolbarContext.js +7 -0
  523. package/lib/Core/Context/ToolbarContext.js.map +1 -0
  524. package/lib/Core/Hooks/UseDebounce.d.ts +2 -0
  525. package/lib/Core/Hooks/UseDebounce.d.ts.map +1 -0
  526. package/lib/Core/Hooks/UseDebounce.js +15 -0
  527. package/lib/Core/Hooks/UseDebounce.js.map +1 -0
  528. package/lib/Core/Hooks/UseOuterEvent.d.ts +2 -0
  529. package/lib/Core/Hooks/UseOuterEvent.d.ts.map +1 -0
  530. package/lib/Core/Hooks/UseOuterEvent.js +30 -0
  531. package/lib/Core/Hooks/UseOuterEvent.js.map +1 -0
  532. package/lib/Core/Hooks/UseReactToProps.d.ts +2 -0
  533. package/lib/Core/Hooks/UseReactToProps.d.ts.map +1 -0
  534. package/lib/Core/Hooks/UseReactToProps.js +8 -0
  535. package/lib/Core/Hooks/UseReactToProps.js.map +1 -0
  536. package/lib/Core/Hooks/UseScrollAway.d.ts +2 -0
  537. package/lib/Core/Hooks/UseScrollAway.d.ts.map +1 -0
  538. package/lib/Core/Hooks/UseScrollAway.js +30 -0
  539. package/lib/Core/Hooks/UseScrollAway.js.map +1 -0
  540. package/lib/Core/Hooks/UseSelect.d.ts +2 -0
  541. package/lib/Core/Hooks/UseSelect.d.ts.map +1 -0
  542. package/lib/Core/Hooks/UseSelect.js +17 -0
  543. package/lib/Core/Hooks/UseSelect.js.map +1 -0
  544. package/lib/Core/Hooks/UseThrottle.d.ts +2 -0
  545. package/lib/Core/Hooks/UseThrottle.d.ts.map +1 -0
  546. package/lib/Core/Hooks/UseThrottle.js +14 -0
  547. package/lib/Core/Hooks/UseThrottle.js.map +1 -0
  548. package/lib/Core/Hooks/UseThunkReducer.d.ts +3 -0
  549. package/lib/Core/Hooks/UseThunkReducer.d.ts.map +1 -0
  550. package/lib/Core/Hooks/UseThunkReducer.js +15 -0
  551. package/lib/Core/Hooks/UseThunkReducer.js.map +1 -0
  552. package/lib/Core/Hooks/a11y/index.d.ts +3 -0
  553. package/lib/Core/Hooks/a11y/index.d.ts.map +1 -0
  554. package/lib/Core/Hooks/a11y/index.js +4 -0
  555. package/lib/Core/Hooks/a11y/index.js.map +1 -0
  556. package/lib/Core/Hooks/a11y/useAnnounceGroup.d.ts +3 -0
  557. package/lib/Core/Hooks/a11y/useAnnounceGroup.d.ts.map +1 -0
  558. package/lib/Core/Hooks/a11y/useAnnounceGroup.js +45 -0
  559. package/lib/Core/Hooks/a11y/useAnnounceGroup.js.map +1 -0
  560. package/lib/Core/Hooks/a11y/useKeyboardA11y.d.ts +16 -0
  561. package/lib/Core/Hooks/a11y/useKeyboardA11y.d.ts.map +1 -0
  562. package/lib/Core/Hooks/a11y/useKeyboardA11y.js +147 -0
  563. package/lib/Core/Hooks/a11y/useKeyboardA11y.js.map +1 -0
  564. package/lib/Core/Hooks/useConfirmationModal.d.ts +5 -0
  565. package/lib/Core/Hooks/useConfirmationModal.d.ts.map +1 -0
  566. package/lib/Core/Hooks/useConfirmationModal.js +42 -0
  567. package/lib/Core/Hooks/useConfirmationModal.js.map +1 -0
  568. package/lib/Core/Hooks/useDragDrop.d.ts +25 -0
  569. package/lib/Core/Hooks/useDragDrop.d.ts.map +1 -0
  570. package/lib/Core/Hooks/useDragDrop.js +217 -0
  571. package/lib/Core/Hooks/useDragDrop.js.map +1 -0
  572. package/lib/Core/Hooks/useRepeat.d.ts +18 -0
  573. package/lib/Core/Hooks/useRepeat.d.ts.map +1 -0
  574. package/lib/Core/Hooks/useRepeat.js +174 -0
  575. package/lib/Core/Hooks/useRepeat.js.map +1 -0
  576. package/lib/Core/Hooks/useSingleClick.d.ts +2 -0
  577. package/lib/Core/Hooks/useSingleClick.d.ts.map +1 -0
  578. package/lib/Core/Hooks/useSingleClick.js +17 -0
  579. package/lib/Core/Hooks/useSingleClick.js.map +1 -0
  580. package/lib/Core/Hooks/useSmallScreen.d.ts +4 -0
  581. package/lib/Core/Hooks/useSmallScreen.d.ts.map +1 -0
  582. package/lib/Core/Hooks/useSmallScreen.js +11 -0
  583. package/lib/Core/Hooks/useSmallScreen.js.map +1 -0
  584. package/lib/Core/Hooks/useTranslate.d.ts +2 -0
  585. package/lib/Core/Hooks/useTranslate.d.ts.map +1 -0
  586. package/lib/Core/Hooks/useTranslate.js +7 -0
  587. package/lib/Core/Hooks/useTranslate.js.map +1 -0
  588. package/lib/Core/Localization/defaultTranslations.d.ts +144 -0
  589. package/lib/Core/Localization/defaultTranslations.d.ts.map +1 -0
  590. package/lib/Core/Localization/defaultTranslations.js +145 -0
  591. package/lib/Core/Localization/defaultTranslations.js.map +1 -0
  592. package/lib/Core/Localization/translateCosmosLiteralsUtils.d.ts +6 -0
  593. package/lib/Core/Localization/translateCosmosLiteralsUtils.d.ts.map +1 -0
  594. package/lib/Core/Localization/translateCosmosLiteralsUtils.js +15 -0
  595. package/lib/Core/Localization/translateCosmosLiteralsUtils.js.map +1 -0
  596. package/lib/Core/Test/JUnitMocks.d.ts +1015 -0
  597. package/lib/Core/Test/JUnitMocks.d.ts.map +1 -0
  598. package/lib/Core/Test/JUnitMocks.js +619 -0
  599. package/lib/Core/Test/JUnitMocks.js.map +1 -0
  600. package/lib/Core/Test/TestUtils.d.ts +9 -0
  601. package/lib/Core/Test/TestUtils.d.ts.map +1 -0
  602. package/lib/Core/Test/TestUtils.js +25 -0
  603. package/lib/Core/Test/TestUtils.js.map +1 -0
  604. package/lib/Core/Utils/index.d.ts +19 -0
  605. package/lib/Core/Utils/index.d.ts.map +1 -0
  606. package/lib/Core/Utils/index.js +93 -0
  607. package/lib/Core/Utils/index.js.map +1 -0
  608. package/lib/Core/Views/Gallery/GalleryA11y.d.ts +13 -0
  609. package/lib/Core/Views/Gallery/GalleryA11y.d.ts.map +1 -0
  610. package/lib/Core/Views/Gallery/GalleryA11y.js +57 -0
  611. package/lib/Core/Views/Gallery/GalleryA11y.js.map +1 -0
  612. package/lib/Core/Views/Gallery/ItemWrapper.d.ts +19 -0
  613. package/lib/Core/Views/Gallery/ItemWrapper.d.ts.map +1 -0
  614. package/lib/Core/Views/Gallery/ItemWrapper.js +29 -0
  615. package/lib/Core/Views/Gallery/ItemWrapper.js.map +1 -0
  616. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts +3 -0
  617. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts.map +1 -0
  618. package/lib/Core/Views/Gallery/StyledGalleryContainer.js +60 -0
  619. package/lib/Core/Views/Gallery/StyledGalleryContainer.js.map +1 -0
  620. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.d.ts +2 -0
  621. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.d.ts.map +1 -0
  622. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js +8 -0
  623. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js.map +1 -0
  624. package/lib/Core/Views/Gallery/index.d.ts +13 -0
  625. package/lib/Core/Views/Gallery/index.d.ts.map +1 -0
  626. package/lib/Core/Views/Gallery/index.js +82 -0
  627. package/lib/Core/Views/Gallery/index.js.map +1 -0
  628. package/lib/Core/Views/Map/Map.styles.d.ts +12 -0
  629. package/lib/Core/Views/Map/Map.styles.d.ts.map +1 -0
  630. package/lib/Core/Views/Map/Map.styles.js +47 -0
  631. package/lib/Core/Views/Map/Map.styles.js.map +1 -0
  632. package/lib/Core/Views/Map/MapItem.d.ts +10 -0
  633. package/lib/Core/Views/Map/MapItem.d.ts.map +1 -0
  634. package/lib/Core/Views/Map/MapItem.js +12 -0
  635. package/lib/Core/Views/Map/MapItem.js.map +1 -0
  636. package/lib/Core/Views/Map/index.d.ts +7 -0
  637. package/lib/Core/Views/Map/index.d.ts.map +1 -0
  638. package/lib/Core/Views/Map/index.js +50 -0
  639. package/lib/Core/Views/Map/index.js.map +1 -0
  640. package/lib/Core/Views/Map/utils.d.ts +14 -0
  641. package/lib/Core/Views/Map/utils.d.ts.map +1 -0
  642. package/lib/Core/Views/Map/utils.js +31 -0
  643. package/lib/Core/Views/Map/utils.js.map +1 -0
  644. package/lib/Core/Views/Table/Body.d.ts +23 -0
  645. package/lib/Core/Views/Table/Body.d.ts.map +1 -0
  646. package/lib/Core/Views/Table/Body.js +44 -0
  647. package/lib/Core/Views/Table/Body.js.map +1 -0
  648. package/lib/Core/Views/Table/CellWrapper.d.ts +23 -0
  649. package/lib/Core/Views/Table/CellWrapper.d.ts.map +1 -0
  650. package/lib/Core/Views/Table/CellWrapper.js +75 -0
  651. package/lib/Core/Views/Table/CellWrapper.js.map +1 -0
  652. package/lib/Core/Views/Table/GroupingHeaderCell.d.ts +22 -0
  653. package/lib/Core/Views/Table/GroupingHeaderCell.d.ts.map +1 -0
  654. package/lib/Core/Views/Table/GroupingHeaderCell.js +26 -0
  655. package/lib/Core/Views/Table/GroupingHeaderCell.js.map +1 -0
  656. package/lib/Core/Views/Table/HeaderWrapper.d.ts +13 -0
  657. package/lib/Core/Views/Table/HeaderWrapper.d.ts.map +1 -0
  658. package/lib/Core/Views/Table/HeaderWrapper.js +33 -0
  659. package/lib/Core/Views/Table/HeaderWrapper.js.map +1 -0
  660. package/lib/Core/Views/Table/Headers.d.ts +3 -0
  661. package/lib/Core/Views/Table/Headers.d.ts.map +1 -0
  662. package/lib/Core/Views/Table/Headers.js +24 -0
  663. package/lib/Core/Views/Table/Headers.js.map +1 -0
  664. package/lib/Core/Views/Table/Row.d.ts +26 -0
  665. package/lib/Core/Views/Table/Row.d.ts.map +1 -0
  666. package/lib/Core/Views/Table/Row.js +24 -0
  667. package/lib/Core/Views/Table/Row.js.map +1 -0
  668. package/lib/Core/Views/Table/Samples/a11ySampleWithErrors.d.ts +8 -0
  669. package/lib/Core/Views/Table/Samples/a11ySampleWithErrors.d.ts.map +1 -0
  670. package/lib/Core/Views/Table/Samples/a11ySampleWithErrors.js +333 -0
  671. package/lib/Core/Views/Table/Samples/a11ySampleWithErrors.js.map +1 -0
  672. package/lib/Core/Views/Table/StyledTableContainer.d.ts +3 -0
  673. package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -0
  674. package/lib/Core/Views/Table/StyledTableContainer.js +861 -0
  675. package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -0
  676. package/lib/Core/Views/Table/TableA11y.d.ts +48 -0
  677. package/lib/Core/Views/Table/TableA11y.d.ts.map +1 -0
  678. package/lib/Core/Views/Table/TableA11y.js +638 -0
  679. package/lib/Core/Views/Table/TableA11y.js.map +1 -0
  680. package/lib/Core/Views/Table/UseSort.d.ts +2 -0
  681. package/lib/Core/Views/Table/UseSort.d.ts.map +1 -0
  682. package/lib/Core/Views/Table/UseSort.js +37 -0
  683. package/lib/Core/Views/Table/UseSort.js.map +1 -0
  684. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +31 -0
  685. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -0
  686. package/lib/Core/Views/Table/VirtualizeWrapper.js +39 -0
  687. package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -0
  688. package/lib/Core/Views/Table/index.d.ts +13 -0
  689. package/lib/Core/Views/Table/index.d.ts.map +1 -0
  690. package/lib/Core/Views/Table/index.js +91 -0
  691. package/lib/Core/Views/Table/index.js.map +1 -0
  692. package/lib/Core/Views/Timeline/index.d.ts +7 -0
  693. package/lib/Core/Views/Timeline/index.d.ts.map +1 -0
  694. package/lib/Core/Views/Timeline/index.js +81 -0
  695. package/lib/Core/Views/Timeline/index.js.map +1 -0
  696. package/lib/Core/Views/Timeline/utility.d.ts +8 -0
  697. package/lib/Core/Views/Timeline/utility.d.ts.map +1 -0
  698. package/lib/Core/Views/Timeline/utility.js +120 -0
  699. package/lib/Core/Views/Timeline/utility.js.map +1 -0
  700. package/lib/Core/Views/rs-styles.d.ts +3 -0
  701. package/lib/Core/Views/rs-styles.d.ts.map +1 -0
  702. package/lib/Core/Views/rs-styles.js +10 -0
  703. package/lib/Core/Views/rs-styles.js.map +1 -0
  704. package/lib/Core/constants.d.ts +73 -0
  705. package/lib/Core/constants.d.ts.map +1 -0
  706. package/lib/Core/constants.js +86 -0
  707. package/lib/Core/constants.js.map +1 -0
  708. package/lib/Core/index.d.ts +5 -0
  709. package/lib/Core/index.d.ts.map +1 -0
  710. package/lib/Core/index.js +40 -0
  711. package/lib/Core/index.js.map +1 -0
  712. package/lib/index.d.ts +6 -0
  713. package/lib/index.d.ts.map +1 -0
  714. package/lib/index.js +7 -0
  715. package/lib/index.js.map +1 -0
  716. package/lib/types.d.ts +231 -0
  717. package/lib/types.d.ts.map +1 -0
  718. package/lib/types.js +2 -0
  719. package/lib/types.js.map +1 -0
  720. package/package.json +51 -0
@@ -0,0 +1,147 @@
1
+ /* istanbul ignore file */
2
+ import { useCallback, useEffect, useRef } from 'react';
3
+ const keys = {
4
+ TAB: 9,
5
+ ENTER: 13,
6
+ SPACE: 32,
7
+ ESCAPE: 27
8
+ };
9
+ function noOp() { }
10
+ function useKeyboardA11y({ originatorRef = {}, container,
11
+ // [tabindex]:not([tabindex="-1"] not including due to
12
+ // more action menu in header needs to be focused on first option
13
+ selectors = 'button, [href], input, select, textarea', circularNavigation, onEscape = noOp, onSpace = noOp, onEnter = noOp, mutationFocusSelector, mutationContainerClass }) {
14
+ const elements = useRef([]);
15
+ /**
16
+ * cache the elements and store in elements ref
17
+ * @returns {undefined} returns nothing
18
+ */
19
+ const cacheElements = useCallback(() => {
20
+ if (container) {
21
+ elements.current.length = 0;
22
+ Array.prototype.push.call(elements.current, ...container.querySelectorAll(selectors));
23
+ }
24
+ }, [container, selectors]);
25
+ /**
26
+ * getter for cached focusable elements
27
+ * @returns {NodeList} returns focusable elements
28
+ */
29
+ const getFocusableElements = useCallback(() => {
30
+ return elements.current;
31
+ }, [elements.current]);
32
+ /**
33
+ * focus at given index for focusable elements
34
+ * @param {number} index index to focus
35
+ * @param {Event} [event] event to preventDefault for circular navigation support
36
+ */
37
+ const setFocusAt = useCallback((index, event) => {
38
+ if (index !== null && index !== undefined) {
39
+ const focusableElements = getFocusableElements();
40
+ focusableElements[index]?.focus();
41
+ if (event) {
42
+ event.preventDefault();
43
+ }
44
+ }
45
+ }, [getFocusableElements]);
46
+ /**
47
+ * key down handler for the container element
48
+ * @param {Event} event event is needed for getting the info such as keyCode
49
+ */
50
+ const onKeyDown = useCallback(event => {
51
+ const focusableElements = getFocusableElements();
52
+ const elementsCount = focusableElements.length;
53
+ /* eslint-disable default-case */
54
+ switch (event.keyCode) {
55
+ case keys.TAB:
56
+ if (circularNavigation) {
57
+ const { activeElement } = document;
58
+ let focusIndex = null;
59
+ if (event.shiftKey && activeElement === focusableElements[0]) {
60
+ focusIndex = elementsCount - 1;
61
+ }
62
+ else if (!event.shiftKey && activeElement === focusableElements[elementsCount - 1]) {
63
+ focusIndex = 0;
64
+ }
65
+ setFocusAt(focusIndex, event);
66
+ }
67
+ break;
68
+ case keys.ENTER:
69
+ onEnter(event);
70
+ break;
71
+ case keys.SPACE:
72
+ onSpace(event);
73
+ break;
74
+ case keys.ESCAPE:
75
+ onEscape(event);
76
+ if (originatorRef.current)
77
+ originatorRef.current.focus();
78
+ break;
79
+ }
80
+ }, [
81
+ originatorRef,
82
+ getFocusableElements,
83
+ setFocusAt,
84
+ circularNavigation,
85
+ onEnter,
86
+ onSpace,
87
+ onEscape
88
+ ]);
89
+ useEffect(() => {
90
+ cacheElements();
91
+ });
92
+ useEffect(() => {
93
+ let popperObserver;
94
+ let childrenObserver;
95
+ if (container && container.offsetHeight > 0) {
96
+ // popover takes time to adjust so using observer for tracking style changes
97
+ const popper = container.closest('.popper');
98
+ if (popper) {
99
+ popperObserver = new MutationObserver(() => {
100
+ setFocusAt(0);
101
+ popperObserver.disconnect();
102
+ });
103
+ popperObserver.observe(popper, {
104
+ attributes: true,
105
+ attributeFilter: ['style']
106
+ });
107
+ }
108
+ if (mutationContainerClass && mutationFocusSelector) {
109
+ childrenObserver = new MutationObserver(mutationRecords => {
110
+ const mutation = mutationRecords.pop(); // get most recent mutation
111
+ const addedNodesCount = mutation.addedNodes.length;
112
+ const element = addedNodesCount
113
+ ? mutation.addedNodes[addedNodesCount - 1]
114
+ : mutation.previousSibling || mutation.nextSibling;
115
+ if (element?.classList.contains(mutationContainerClass)) {
116
+ element.querySelector(mutationFocusSelector)?.focus();
117
+ }
118
+ });
119
+ childrenObserver.observe(container, {
120
+ childList: true,
121
+ subtree: true
122
+ });
123
+ }
124
+ container.addEventListener('keydown', onKeyDown);
125
+ }
126
+ return () => {
127
+ elements.current.length = 0;
128
+ if (container) {
129
+ popperObserver?.disconnect();
130
+ childrenObserver?.disconnect();
131
+ container.removeEventListener('keydown', onKeyDown);
132
+ }
133
+ };
134
+ }, [
135
+ container,
136
+ elements.current,
137
+ onKeyDown,
138
+ setFocusAt,
139
+ mutationFocusSelector,
140
+ mutationContainerClass
141
+ ]);
142
+ return {
143
+ getFocusableElements
144
+ };
145
+ }
146
+ export default useKeyboardA11y;
147
+ //# sourceMappingURL=useKeyboardA11y.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useKeyboardA11y.js","sourceRoot":"","sources":["../../../../Core/Hooks/a11y/useKeyboardA11y.js"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,IAAI,GAAG;IACX,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;CACX,CAAC;AACF,SAAS,IAAI,KAAI,CAAC;AAClB,SAAS,eAAe,CAAC,EACvB,aAAa,GAAG,EAAE,EAClB,SAAS;AACT,sDAAsD;AACtD,iEAAiE;AACjE,SAAS,GAAG,yCAAyC,EACrD,kBAAkB,EAClB,QAAQ,GAAG,IAAI,EACf,OAAO,GAAG,IAAI,EACd,OAAO,GAAG,IAAI,EACd,qBAAqB,EACrB,sBAAsB,EACvB;IACC,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;IAE5B;;;OAGG;IACH,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE;QACrC,IAAI,SAAS,EAAE,CAAC;YACd,QAAQ,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;YAC5B,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,gBAAgB,CAAC,SAAS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,CAAC;AAED,eAAe,eAAe,CAAC","sourcesContent":["/* istanbul ignore file */\nimport { useCallback, useEffect, useRef } from 'react';\n\nconst keys = {\n TAB: 9,\n ENTER: 13,\n SPACE: 32,\n ESCAPE: 27\n};\nfunction noOp() {}\nfunction useKeyboardA11y({\n originatorRef = {},\n container,\n // [tabindex]:not([tabindex=\"-1\"] not including due to\n // more action menu in header needs to be focused on first option\n selectors = 'button, [href], input, select, textarea',\n circularNavigation,\n onEscape = noOp,\n onSpace = noOp,\n onEnter = noOp,\n mutationFocusSelector,\n mutationContainerClass\n}) {\n const elements = useRef([]);\n\n /**\n * cache the elements and store in elements ref\n * @returns {undefined} returns nothing\n */\n const cacheElements = useCallback(() => {\n if (container) {\n elements.current.length = 0;\n Array.prototype.push.call(elements.current, ...container.querySelectorAll(selectors));\n }\n }, [container, selectors]);\n\n /**\n * getter for cached focusable elements\n * @returns {NodeList} returns focusable elements\n */\n const getFocusableElements = useCallback(() => {\n return elements.current;\n }, [elements.current]);\n\n /**\n * focus at given index for focusable elements\n * @param {number} index index to focus\n * @param {Event} [event] event to preventDefault for circular navigation support\n */\n const setFocusAt = useCallback(\n (index, event) => {\n if (index !== null && index !== undefined) {\n const focusableElements = getFocusableElements();\n focusableElements[index]?.focus();\n if (event) {\n event.preventDefault();\n }\n }\n },\n [getFocusableElements]\n );\n\n /**\n * key down handler for the container element\n * @param {Event} event event is needed for getting the info such as keyCode\n */\n const onKeyDown = useCallback(\n event => {\n const focusableElements = getFocusableElements();\n const elementsCount = focusableElements.length;\n /* eslint-disable default-case */\n switch (event.keyCode) {\n case keys.TAB:\n if (circularNavigation) {\n const { activeElement } = document;\n let focusIndex = null;\n if (event.shiftKey && activeElement === focusableElements[0]) {\n focusIndex = elementsCount - 1;\n } else if (!event.shiftKey && activeElement === focusableElements[elementsCount - 1]) {\n focusIndex = 0;\n }\n setFocusAt(focusIndex, event);\n }\n break;\n case keys.ENTER:\n onEnter(event);\n break;\n case keys.SPACE:\n onSpace(event);\n break;\n case keys.ESCAPE:\n onEscape(event);\n if (originatorRef.current) originatorRef.current.focus();\n break;\n }\n },\n [\n originatorRef,\n getFocusableElements,\n setFocusAt,\n circularNavigation,\n onEnter,\n onSpace,\n onEscape\n ]\n );\n\n useEffect(() => {\n cacheElements();\n });\n\n useEffect(() => {\n let popperObserver;\n let childrenObserver;\n if (container && container.offsetHeight > 0) {\n // popover takes time to adjust so using observer for tracking style changes\n const popper = container.closest('.popper');\n if (popper) {\n popperObserver = new MutationObserver(() => {\n setFocusAt(0);\n popperObserver.disconnect();\n });\n popperObserver.observe(popper, {\n attributes: true,\n attributeFilter: ['style']\n });\n }\n if (mutationContainerClass && mutationFocusSelector) {\n childrenObserver = new MutationObserver(mutationRecords => {\n const mutation = mutationRecords.pop(); // get most recent mutation\n const addedNodesCount = mutation.addedNodes.length;\n const element = addedNodesCount\n ? mutation.addedNodes[addedNodesCount - 1]\n : mutation.previousSibling || mutation.nextSibling;\n if (element?.classList.contains(mutationContainerClass)) {\n element.querySelector(mutationFocusSelector)?.focus();\n }\n });\n childrenObserver.observe(container, {\n childList: true,\n subtree: true\n });\n }\n container.addEventListener('keydown', onKeyDown);\n }\n return () => {\n elements.current.length = 0;\n if (container) {\n popperObserver?.disconnect();\n childrenObserver?.disconnect();\n container.removeEventListener('keydown', onKeyDown);\n }\n };\n }, [\n container,\n elements.current,\n onKeyDown,\n setFocusAt,\n mutationFocusSelector,\n mutationContainerClass\n ]);\n return {\n getFocusableElements\n };\n}\n\nexport default useKeyboardA11y;\n"]}
@@ -0,0 +1,5 @@
1
+ export default useConfirmationModal;
2
+ declare function useConfirmationModal({ view }: {
3
+ view: any;
4
+ }): void;
5
+ //# sourceMappingURL=useConfirmationModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConfirmationModal.d.ts","sourceRoot":"","sources":["../../../Core/Hooks/useConfirmationModal.js"],"names":[],"mappings":";AAQA;;SAwCC"}
@@ -0,0 +1,42 @@
1
+ import { useEffect, useRef } from 'react';
2
+ import { useModalManager } from '@pega/cosmos-react-core';
3
+ import ConfirmationModal from '../Components/ConfirmationModal';
4
+ import useTranslate from './useTranslate';
5
+ const useConfirmationModal = ({ view }) => {
6
+ const { confirmationActionDetails = {} } = view;
7
+ const [translate] = useTranslate();
8
+ const { create } = useModalManager();
9
+ /**
10
+ * ref is needed to store the reference to the open modal to check if a modal is already open or not.
11
+ * Due to state changes if view change, we don't want to create another model on top of previous one.
12
+ */
13
+ const confirmationModalRef = useRef();
14
+ useEffect(() => {
15
+ if (confirmationActionDetails.showConfirmationAction && !confirmationModalRef.current) {
16
+ const { heading, description, cancelButtonLabel, submitButtonLabel } = confirmationActionDetails.labels;
17
+ const modalRef = create(ConfirmationModal, {
18
+ onSubmit: () => {
19
+ if (confirmationActionDetails.onSubmit) {
20
+ confirmationActionDetails.onSubmit();
21
+ }
22
+ view.type.completeConfirmationAction();
23
+ confirmationModalRef.current = null;
24
+ },
25
+ onCancel: () => {
26
+ if (confirmationActionDetails.onCancel) {
27
+ confirmationActionDetails.onCancel();
28
+ }
29
+ view.type.completeConfirmationAction();
30
+ confirmationModalRef.current = null;
31
+ },
32
+ heading: translate(heading),
33
+ description: translate(description),
34
+ cancelButtonLabel: translate(cancelButtonLabel),
35
+ submitButtonLabel: translate(submitButtonLabel)
36
+ });
37
+ confirmationModalRef.current = modalRef;
38
+ }
39
+ }, [confirmationActionDetails, create, translate, view.type]);
40
+ };
41
+ export default useConfirmationModal;
42
+ //# sourceMappingURL=useConfirmationModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConfirmationModal.js","sourceRoot":"","sources":["../../../Core/Hooks/useConfirmationModal.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAEhE,OAAO,YAAY,MAAM,gBAAgB,CA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ChD,CAAC,CAAC;YAEH,oBAAoB,CAAC,OAAO,GAAG,QAAQ,CAAC;QAC1C,CAAC;IACH,CAAC,EAAE,CAAC,yBAAyB,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport { useModalManager } from '@pega/cosmos-react-core';\n\nimport ConfirmationModal from '../Components/ConfirmationModal';\n\nimport useTranslate from './useTranslate';\n\nconst useConfirmationModal = ({ view }) => {\n const { confirmationActionDetails = {} } = view;\n\n const [translate] = useTranslate();\n const { create } = useModalManager();\n /**\n * ref is needed to store the reference to the open modal to check if a modal is already open or not.\n * Due to state changes if view change, we don't want to create another model on top of previous one.\n */\n const confirmationModalRef = useRef();\n\n useEffect(() => {\n if (confirmationActionDetails.showConfirmationAction && !confirmationModalRef.current) {\n const { heading, description, cancelButtonLabel, submitButtonLabel } =\n confirmationActionDetails.labels;\n\n const modalRef = create(ConfirmationModal, {\n onSubmit: () => {\n if (confirmationActionDetails.onSubmit) {\n confirmationActionDetails.onSubmit();\n }\n view.type.completeConfirmationAction();\n confirmationModalRef.current = null;\n },\n onCancel: () => {\n if (confirmationActionDetails.onCancel) {\n confirmationActionDetails.onCancel();\n }\n view.type.completeConfirmationAction();\n confirmationModalRef.current = null;\n },\n heading: translate(heading),\n description: translate(description),\n cancelButtonLabel: translate(cancelButtonLabel),\n submitButtonLabel: translate(submitButtonLabel)\n });\n\n confirmationModalRef.current = modalRef;\n }\n }, [confirmationActionDetails, create, translate, view.type]);\n};\n\nexport default useConfirmationModal;\n"]}
@@ -0,0 +1,25 @@
1
+ export default function useDragDrop({ context, onDragStart, onDragEnd, onDragEnter, onDragLeave, onDrop, defaultAnimation, getAnimationSelector, defaultGhostImage, getGhostImageSelector, getDraggedObject }: {
2
+ context: any;
3
+ onDragStart?: undefined;
4
+ onDragEnd?: undefined;
5
+ onDragEnter?: undefined;
6
+ onDragLeave?: undefined;
7
+ onDrop: any;
8
+ defaultAnimation?: boolean | undefined;
9
+ getAnimationSelector: any;
10
+ defaultGhostImage?: boolean | undefined;
11
+ getGhostImageSelector: any;
12
+ getDraggedObject: any;
13
+ }): {
14
+ dragProps: {
15
+ draggable: boolean;
16
+ onDragStart: (ev: any) => void;
17
+ onDragEnd: (ev: any) => void;
18
+ };
19
+ dropProps: {
20
+ onDragEnter: (ev: any) => void;
21
+ onDragLeave: (ev: any) => void;
22
+ 'data-drop': string;
23
+ };
24
+ };
25
+ //# sourceMappingURL=useDragDrop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDragDrop.d.ts","sourceRoot":"","sources":["../../../Core/Hooks/useDragDrop.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;EAuSC"}
@@ -0,0 +1,217 @@
1
+ import { useCallback, useMemo, useRef } from 'react';
2
+ export default function useDragDrop({ context, onDragStart = undefined, onDragEnd = undefined, onDragEnter = undefined, onDragLeave = undefined, onDrop, defaultAnimation = true, getAnimationSelector, defaultGhostImage = true, getGhostImageSelector, getDraggedObject }) {
3
+ // A way to fire dragleave when we actually come out of drop target not only a child of that.
4
+ const ref = useRef({
5
+ dropTarget: [],
6
+ dropTargetCoord: null,
7
+ dragTarget: undefined
8
+ }).current;
9
+ const addDragEffect = useCallback(target => {
10
+ if (defaultAnimation) {
11
+ const t = getAnimationSelector ? getAnimationSelector(target) : target;
12
+ const elms = Array.isArray(t) ? t : [t];
13
+ elms.forEach(elm => {
14
+ elm.style.opacity = '0.5';
15
+ });
16
+ }
17
+ }, [defaultAnimation, getAnimationSelector]);
18
+ const removeDragEffect = useCallback(target => {
19
+ if (defaultAnimation) {
20
+ const t = getAnimationSelector ? getAnimationSelector(target) : target;
21
+ const elms = Array.isArray(t) ? t : [t];
22
+ elms.forEach(elm => {
23
+ elm.style.opacity = '1';
24
+ });
25
+ }
26
+ }, [defaultAnimation, getAnimationSelector]);
27
+ const setGhostImage = useCallback(e => {
28
+ if (defaultGhostImage) {
29
+ const elem = getGhostImageSelector
30
+ ? getGhostImageSelector(e.currentTarget)
31
+ : e.currentTarget;
32
+ const crt = elem.cloneNode(true);
33
+ crt.style.height = `${elem.style.height}px`;
34
+ crt.style.width = `${elem.style.width}px`;
35
+ crt.style.position = 'absolute';
36
+ crt.style.top = '-1000000px';
37
+ crt.style.left = '-10000000px';
38
+ crt.style.zIndex = '-1';
39
+ context.current.appendChild(crt);
40
+ e.dataTransfer.setDragImage(crt, 0, 0);
41
+ setTimeout(() => {
42
+ crt.parentNode.removeChild(crt);
43
+ }, 1000);
44
+ }
45
+ }, [getGhostImageSelector, context, defaultGhostImage]);
46
+ const isColliding = useCallback((x, y, coord) => {
47
+ const smallBuffer = 2;
48
+ return !(x < coord.left - smallBuffer ||
49
+ x > coord.right + smallBuffer ||
50
+ y > coord.bottom + smallBuffer ||
51
+ y < coord.top - smallBuffer);
52
+ }, []);
53
+ const addDropEffect = useCallback(target => {
54
+ if (defaultAnimation) {
55
+ const t = getAnimationSelector ? getAnimationSelector(target) : target;
56
+ const elms = Array.isArray(t) ? t : [t];
57
+ elms.forEach(elm => {
58
+ // Need to handle this in better way.TODO: need clean up as well.
59
+ elm.style.transition = 'transform 0.25s';
60
+ elm.style.transform = 'translate(20px)';
61
+ });
62
+ }
63
+ }, [defaultAnimation, getAnimationSelector]);
64
+ const removeDropEffect = useCallback(target => {
65
+ if (defaultAnimation) {
66
+ const t = getAnimationSelector ? getAnimationSelector(target) : target;
67
+ const elms = Array.isArray(t) ? t : [t];
68
+ elms.forEach(elm => {
69
+ elm.style.transform = 'translate(0px)';
70
+ });
71
+ }
72
+ }, [defaultAnimation, getAnimationSelector]);
73
+ const contextDragOverCb = useCallback(e => {
74
+ e.stopPropagation();
75
+ e.preventDefault();
76
+ if (ref.dragLeaveSkipped &&
77
+ ref.dropTarget &&
78
+ ref.dropTarget[ref.dropTarget.length - 1] &&
79
+ !isColliding(e.clientX, e.clientY, ref.dropTargetCoord)) {
80
+ ref.forcedDragLeave = true;
81
+ ref.dragLeaveSkipped = false;
82
+ const elm = ref.dropTarget.shift();
83
+ ref.dropTarget = [...ref.dropTarget];
84
+ elm.dispatchEvent(new MouseEvent('dragleave', {
85
+ bubbles: true,
86
+ cancelable: true,
87
+ view: window
88
+ }));
89
+ }
90
+ }, [isColliding, ref]);
91
+ const contextDropCb = useCallback(ev => {
92
+ ev.stopPropagation();
93
+ ev.preventDefault();
94
+ const elm = ref.dropTarget[ref.dropTarget.length - 1];
95
+ if (ref.dropTargetCoord &&
96
+ elm !== ref.dragTarget &&
97
+ isColliding(ev.clientX, ev.clientY, ref.dropTargetCoord)) {
98
+ removeDropEffect(elm);
99
+ elm.classList.remove('dragEnter');
100
+ if (onDrop)
101
+ onDrop(elm, ref.dragTarget);
102
+ ref.dragTarget = undefined;
103
+ ref.dropTargetCoord = null;
104
+ ref.dropTarget = [];
105
+ }
106
+ }, [ref, isColliding, removeDropEffect, onDrop]);
107
+ const dragStartCb = useCallback(ev => {
108
+ document.addEventListener('dragover', contextDragOverCb);
109
+ context.current.addEventListener('drop', contextDropCb);
110
+ // clear the drag operation's data store when drag starts as its the only time when drag data is writable
111
+ if (ev.dataTransfer)
112
+ ev.dataTransfer.clearData();
113
+ // We have to keep event handler in reference so that we can remove right handler when drag ends.
114
+ // Handler might change in between because of deps.
115
+ ref.contextDropCb = contextDropCb;
116
+ ref.contextDragOverCb = contextDragOverCb;
117
+ setGhostImage(ev);
118
+ ev.dataTransfer.effectAllowed = 'move';
119
+ // fail safe reset drag target.
120
+ if (ref.dragTarget)
121
+ ref.dragTarget = undefined;
122
+ ref.dragTarget = getDraggedObject ? getDraggedObject(ev.currentTarget) : ev.currentTarget;
123
+ ev.currentTarget.classList.add('dragStart');
124
+ addDragEffect(ev.currentTarget);
125
+ if (onDragStart)
126
+ onDragStart(ev);
127
+ }, [
128
+ contextDragOverCb,
129
+ context,
130
+ contextDropCb,
131
+ setGhostImage,
132
+ ref,
133
+ getDraggedObject,
134
+ addDragEffect,
135
+ onDragStart
136
+ ]);
137
+ const dragEndCb = useCallback(ev => {
138
+ document.removeEventListener('dragover', ref.contextDragOverCb);
139
+ context.current.removeEventListener('drop', ref.contextDropCb);
140
+ ref.dropTarget = [];
141
+ ref.dropTargetCoord = null;
142
+ ref.forcedDragLeave = false;
143
+ ref.dragLeaveSkipped = false;
144
+ ev.currentTarget.classList.remove('dragStart');
145
+ removeDragEffect(ev.currentTarget);
146
+ if (onDragEnd)
147
+ onDragEnd(ev);
148
+ }, [onDragEnd, removeDragEffect, context, ref]);
149
+ const isValidDragEnter = useCallback(e => {
150
+ let isValid = true;
151
+ if (ref.dragTarget === e.currentTarget)
152
+ isValid = false;
153
+ else if (ref.dropTarget[ref.dropTarget.length - 1] === e.currentTarget)
154
+ isValid = false;
155
+ else if (ref.dropTarget[ref.dropTarget.length - 1] &&
156
+ ref.dropTarget[ref.dropTarget.length - 1] !== e.currentTarget) {
157
+ const currentTargetCoord = e.currentTarget.getBoundingClientRect();
158
+ const dropTargetCoord = ref.dropTarget[ref.dropTarget.length - 1].getBoundingClientRect();
159
+ if (!isColliding(e.clientX, e.clientY, currentTargetCoord) &&
160
+ isColliding(e.clientX, e.clientY, dropTargetCoord))
161
+ isValid = false;
162
+ }
163
+ return isValid;
164
+ }, [ref, isColliding]);
165
+ const dragEnterCb = useCallback(ev => {
166
+ ev.stopPropagation();
167
+ if (isValidDragEnter(ev)) {
168
+ ref.dropTarget = ref.dropTarget.length ? [...ref.dropTarget] : [];
169
+ ref.dropTarget.push(ev.currentTarget);
170
+ ev.currentTarget.classList.add('dragEnter');
171
+ ev.dataTransfer.dropEffect = 'move';
172
+ ref.dropTargetCoord = ev.currentTarget.getBoundingClientRect();
173
+ addDropEffect(ev.currentTarget);
174
+ if (onDragEnter)
175
+ onDragEnter(ev);
176
+ if (ref.dropTarget.length > 1) {
177
+ const elm = ref.dropTarget.shift();
178
+ ref.dropTarget = [...ref.dropTarget];
179
+ ref.forcedDragLeave = true;
180
+ elm.dispatchEvent(new MouseEvent('dragleave', {
181
+ bubbles: true,
182
+ cancelable: true,
183
+ view: window
184
+ }));
185
+ }
186
+ }
187
+ }, [onDragEnter, addDropEffect, ref, isValidDragEnter]);
188
+ const dragLeaveCb = useCallback(ev => {
189
+ ev.stopPropagation();
190
+ if (ref.forcedDragLeave) {
191
+ ref.forcedDragLeave = false;
192
+ ev.currentTarget.classList.remove('dragEnter');
193
+ removeDropEffect(ev.currentTarget);
194
+ if (onDragLeave)
195
+ onDragLeave(ev);
196
+ }
197
+ else if (!ev.currentTarget.contains(ev.relatedTarget) &&
198
+ ref.dragTarget !== ev.currentTarget) {
199
+ ref.dragLeaveSkipped = true;
200
+ }
201
+ }, [ref, removeDropEffect, onDragLeave]);
202
+ const dragProps = useMemo(() => ({
203
+ draggable: true,
204
+ onDragStart: dragStartCb,
205
+ onDragEnd: dragEndCb
206
+ }), [dragStartCb, dragEndCb]);
207
+ const dropProps = useMemo(() => ({
208
+ onDragEnter: dragEnterCb,
209
+ onDragLeave: dragLeaveCb,
210
+ 'data-drop': 'dropzone'
211
+ }), [dragEnterCb, dragLeaveCb]);
212
+ return {
213
+ dragProps,
214
+ dropProps
215
+ };
216
+ }
217
+ //# sourceMappingURL=useDragDrop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDragDrop.js","sourceRoot":"","sources":["../../../Core/Hooks/useDragDrop.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,OAAO,EACP,WAAW,GAAG,SAAS,EACvB,SAAS,GAAG,SAAS,EACrB,WAAW,GAAG,SAAS,EACvB,WAAW,GAAG,SAAS,EACvB,MAAM,EACN,gBAAgB,GAAG,IAAI,EACvB,oBAAoB,EACpB,iBAAiB,GAAG,IAAI,EACxB,qBAAqB,EACrB,gBAAg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B,EAAE,WAAW,CAAC,CACrC,CAAC;IAEF,MAAM,SAAS,GAAG,OAAO,CACvB,GAAG,EAAE,CAAC,CAAC;QACL,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,WAAW;QACxB,SAAS,EAAE,SAAS;KACrB,CAAC,EACF,CAAC,WAAW,EAAE,SAAS,CAAC,CACzB,CAAC;IAEF,MAAM,SAAS,GAAG,OAAO,CACvB,GAAG,EAAE,CAAC,CAAC;QACL,WAAW,EAAE,WAAW;QACxB,WAAW,EAAE,WAAW;QACxB,WAAW,EAAE,UAAU;KACxB,CAAC,EACF,CAAC,WAAW,EAAE,WAAW,CAAC,CAC3B,CAAC;IAEF,OAAO;QACL,SAAS;QACT,SAAS;KACV,CAAC;AACJ,CAAC","sourcesContent":["import { useCallback, useMemo, useRef } from 'react';\n\nexport default function useDragDrop({\n context,\n onDragStart = undefined,\n onDragEnd = undefined,\n onDragEnter = undefined,\n onDragLeave = undefined,\n onDrop,\n defaultAnimation = true,\n getAnimationSelector,\n defaultGhostImage = true,\n getGhostImageSelector,\n getDraggedObject\n}) {\n // A way to fire dragleave when we actually come out of drop target not only a child of that.\n const ref = useRef({\n dropTarget: [],\n dropTargetCoord: null,\n dragTarget: undefined\n }).current;\n\n const addDragEffect = useCallback(\n target => {\n if (defaultAnimation) {\n const t = getAnimationSelector ? getAnimationSelector(target) : target;\n const elms = Array.isArray(t) ? t : [t];\n elms.forEach(elm => {\n elm.style.opacity = '0.5';\n });\n }\n },\n [defaultAnimation, getAnimationSelector]\n );\n\n const removeDragEffect = useCallback(\n target => {\n if (defaultAnimation) {\n const t = getAnimationSelector ? getAnimationSelector(target) : target;\n const elms = Array.isArray(t) ? t : [t];\n elms.forEach(elm => {\n elm.style.opacity = '1';\n });\n }\n },\n [defaultAnimation, getAnimationSelector]\n );\n\n const setGhostImage = useCallback(\n e => {\n if (defaultGhostImage) {\n const elem = getGhostImageSelector\n ? getGhostImageSelector(e.currentTarget)\n : e.currentTarget;\n const crt = elem.cloneNode(true);\n crt.style.height = `${elem.style.height}px`;\n crt.style.width = `${elem.style.width}px`;\n crt.style.position = 'absolute';\n crt.style.top = '-1000000px';\n crt.style.left = '-10000000px';\n crt.style.zIndex = '-1';\n context.current.appendChild(crt);\n e.dataTransfer.setDragImage(crt, 0, 0);\n\n setTimeout(() => {\n crt.parentNode.removeChild(crt);\n }, 1000);\n }\n },\n [getGhostImageSelector, context, defaultGhostImage]\n );\n\n const isColliding = useCallback((x, y, coord) => {\n const smallBuffer = 2;\n return !(\n x < coord.left - smallBuffer ||\n x > coord.right + smallBuffer ||\n y > coord.bottom + smallBuffer ||\n y < coord.top - smallBuffer\n );\n }, []);\n\n const addDropEffect = useCallback(\n target => {\n if (defaultAnimation) {\n const t = getAnimationSelector ? getAnimationSelector(target) : target;\n const elms = Array.isArray(t) ? t : [t];\n elms.forEach(elm => {\n // Need to handle this in better way.TODO: need clean up as well.\n elm.style.transition = 'transform 0.25s';\n elm.style.transform = 'translate(20px)';\n });\n }\n },\n [defaultAnimation, getAnimationSelector]\n );\n\n const removeDropEffect = useCallback(\n target => {\n if (defaultAnimation) {\n const t = getAnimationSelector ? getAnimationSelector(target) : target;\n const elms = Array.isArray(t) ? t : [t];\n elms.forEach(elm => {\n elm.style.transform = 'translate(0px)';\n });\n }\n },\n [defaultAnimation, getAnimationSelector]\n );\n\n const contextDragOverCb = useCallback(\n e => {\n e.stopPropagation();\n e.preventDefault();\n if (\n ref.dragLeaveSkipped &&\n ref.dropTarget &&\n ref.dropTarget[ref.dropTarget.length - 1] &&\n !isColliding(e.clientX, e.clientY, ref.dropTargetCoord)\n ) {\n ref.forcedDragLeave = true;\n ref.dragLeaveSkipped = false;\n const elm = ref.dropTarget.shift();\n ref.dropTarget = [...ref.dropTarget];\n elm.dispatchEvent(\n new MouseEvent('dragleave', {\n bubbles: true,\n cancelable: true,\n view: window\n })\n );\n }\n },\n [isColliding, ref]\n );\n\n const contextDropCb = useCallback(\n ev => {\n ev.stopPropagation();\n ev.preventDefault();\n const elm = ref.dropTarget[ref.dropTarget.length - 1];\n if (\n ref.dropTargetCoord &&\n elm !== ref.dragTarget &&\n isColliding(ev.clientX, ev.clientY, ref.dropTargetCoord)\n ) {\n removeDropEffect(elm);\n elm.classList.remove('dragEnter');\n if (onDrop) onDrop(elm, ref.dragTarget);\n ref.dragTarget = undefined;\n ref.dropTargetCoord = null;\n ref.dropTarget = [];\n }\n },\n [ref, isColliding, removeDropEffect, onDrop]\n );\n\n const dragStartCb = useCallback(\n ev => {\n document.addEventListener('dragover', contextDragOverCb);\n context.current.addEventListener('drop', contextDropCb);\n\n // clear the drag operation's data store when drag starts as its the only time when drag data is writable\n if (ev.dataTransfer) ev.dataTransfer.clearData();\n\n // We have to keep event handler in reference so that we can remove right handler when drag ends.\n // Handler might change in between because of deps.\n ref.contextDropCb = contextDropCb;\n ref.contextDragOverCb = contextDragOverCb;\n\n setGhostImage(ev);\n ev.dataTransfer.effectAllowed = 'move';\n // fail safe reset drag target.\n if (ref.dragTarget) ref.dragTarget = undefined;\n ref.dragTarget = getDraggedObject ? getDraggedObject(ev.currentTarget) : ev.currentTarget;\n ev.currentTarget.classList.add('dragStart');\n addDragEffect(ev.currentTarget);\n if (onDragStart) onDragStart(ev);\n },\n [\n contextDragOverCb,\n context,\n contextDropCb,\n setGhostImage,\n ref,\n getDraggedObject,\n addDragEffect,\n onDragStart\n ]\n );\n\n const dragEndCb = useCallback(\n ev => {\n document.removeEventListener('dragover', ref.contextDragOverCb);\n context.current.removeEventListener('drop', ref.contextDropCb);\n ref.dropTarget = [];\n ref.dropTargetCoord = null;\n ref.forcedDragLeave = false;\n ref.dragLeaveSkipped = false;\n ev.currentTarget.classList.remove('dragStart');\n removeDragEffect(ev.currentTarget);\n if (onDragEnd) onDragEnd(ev);\n },\n [onDragEnd, removeDragEffect, context, ref]\n );\n\n const isValidDragEnter = useCallback(\n e => {\n let isValid = true;\n if (ref.dragTarget === e.currentTarget) isValid = false;\n else if (ref.dropTarget[ref.dropTarget.length - 1] === e.currentTarget) isValid = false;\n else if (\n ref.dropTarget[ref.dropTarget.length - 1] &&\n ref.dropTarget[ref.dropTarget.length - 1] !== e.currentTarget\n ) {\n const currentTargetCoord = e.currentTarget.getBoundingClientRect();\n const dropTargetCoord = ref.dropTarget[ref.dropTarget.length - 1].getBoundingClientRect();\n if (\n !isColliding(e.clientX, e.clientY, currentTargetCoord) &&\n isColliding(e.clientX, e.clientY, dropTargetCoord)\n )\n isValid = false;\n }\n return isValid;\n },\n [ref, isColliding]\n );\n\n const dragEnterCb = useCallback(\n ev => {\n ev.stopPropagation();\n if (isValidDragEnter(ev)) {\n ref.dropTarget = ref.dropTarget.length ? [...ref.dropTarget] : [];\n ref.dropTarget.push(ev.currentTarget);\n ev.currentTarget.classList.add('dragEnter');\n ev.dataTransfer.dropEffect = 'move';\n ref.dropTargetCoord = ev.currentTarget.getBoundingClientRect();\n addDropEffect(ev.currentTarget);\n if (onDragEnter) onDragEnter(ev);\n\n if (ref.dropTarget.length > 1) {\n const elm = ref.dropTarget.shift();\n ref.dropTarget = [...ref.dropTarget];\n ref.forcedDragLeave = true;\n elm.dispatchEvent(\n new MouseEvent('dragleave', {\n bubbles: true,\n cancelable: true,\n view: window\n })\n );\n }\n }\n },\n [onDragEnter, addDropEffect, ref, isValidDragEnter]\n );\n\n const dragLeaveCb = useCallback(\n ev => {\n ev.stopPropagation();\n if (ref.forcedDragLeave) {\n ref.forcedDragLeave = false;\n ev.currentTarget.classList.remove('dragEnter');\n removeDropEffect(ev.currentTarget);\n if (onDragLeave) onDragLeave(ev);\n } else if (\n !ev.currentTarget.contains(ev.relatedTarget) &&\n ref.dragTarget !== ev.currentTarget\n ) {\n ref.dragLeaveSkipped = true;\n }\n },\n [ref, removeDropEffect, onDragLeave]\n );\n\n const dragProps = useMemo(\n () => ({\n draggable: true,\n onDragStart: dragStartCb,\n onDragEnd: dragEndCb\n }),\n [dragStartCb, dragEndCb]\n );\n\n const dropProps = useMemo(\n () => ({\n onDragEnter: dragEnterCb,\n onDragLeave: dragLeaveCb,\n 'data-drop': 'dropzone'\n }),\n [dragEnterCb, dragLeaveCb]\n );\n\n return {\n dragProps,\n dropProps\n };\n}\n"]}
@@ -0,0 +1,18 @@
1
+ export default function useRepeat({ meta, apiContext, presets, persistedInfo, onRowClickAction, renderFactory, renderFormatterTypeMap, formatters, onViewReady, mode, toolBarOptions, styleFormats, repeatComponentInstance }: {
2
+ meta: any;
3
+ apiContext: any;
4
+ presets?: any[] | undefined;
5
+ persistedInfo: any;
6
+ onRowClickAction: any;
7
+ renderFactory?: (() => void) | undefined;
8
+ renderFormatterTypeMap: any;
9
+ formatters: any;
10
+ onViewReady?: (() => void) | undefined;
11
+ mode?: string | undefined;
12
+ toolBarOptions: any;
13
+ styleFormats: any;
14
+ repeatComponentInstance: any;
15
+ }): {
16
+ rsID: string;
17
+ };
18
+ //# sourceMappingURL=useRepeat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRepeat.d.ts","sourceRoot":"","sources":["../../../Core/Hooks/useRepeat.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;EAkPC"}