@onewelcome/react-lib-components 12.1.0-alpha → 12.1.0-alpha.4

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 (668) hide show
  1. package/dist/components/Breadcrumbs/Breadcrumbs.cjs.js +1 -1
  2. package/dist/components/Breadcrumbs/Breadcrumbs.cjs.js.map +1 -1
  3. package/dist/components/Breadcrumbs/Breadcrumbs.es.js.map +1 -1
  4. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +2 -2
  5. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.es.js +5 -5
  6. package/dist/components/Button/BaseButton.cjs.js +1 -1
  7. package/dist/components/Button/BaseButton.cjs.js.map +1 -1
  8. package/dist/components/Button/BaseButton.es.js.map +1 -1
  9. package/dist/components/Button/BaseButton.module.scss.cjs.js +2 -2
  10. package/dist/components/Button/BaseButton.module.scss.es.js +4 -4
  11. package/dist/components/Button/Button.cjs.js +1 -1
  12. package/dist/components/Button/Button.cjs.js.map +1 -1
  13. package/dist/components/Button/Button.es.js.map +1 -1
  14. package/dist/components/Button/Button.module.scss.cjs.js +2 -2
  15. package/dist/components/Button/Button.module.scss.es.js +17 -17
  16. package/dist/components/Button/IconButton.cjs.js.map +1 -1
  17. package/dist/components/Button/IconButton.es.js.map +1 -1
  18. package/dist/components/Button/IconButton.module.scss.cjs.js +2 -2
  19. package/dist/components/Button/IconButton.module.scss.es.js +18 -18
  20. package/dist/components/Button/Spinner.cjs.js.map +1 -1
  21. package/dist/components/Button/Spinner.es.js.map +1 -1
  22. package/dist/components/ContextMenu/ContextMenu.cjs.js +1 -1
  23. package/dist/components/ContextMenu/ContextMenu.cjs.js.map +1 -1
  24. package/dist/components/ContextMenu/ContextMenu.es.js +28 -11
  25. package/dist/components/ContextMenu/ContextMenu.es.js.map +1 -1
  26. package/dist/components/ContextMenu/ContextMenu.module.scss.cjs.js +2 -2
  27. package/dist/components/ContextMenu/ContextMenu.module.scss.es.js +8 -5
  28. package/dist/components/ContextMenu/ContextMenu.module.scss.es.js.map +1 -1
  29. package/dist/components/ContextMenu/ContextMenuDivider.cjs.js.map +1 -1
  30. package/dist/components/ContextMenu/ContextMenuDivider.es.js.map +1 -1
  31. package/dist/components/ContextMenu/ContextMenuDivider.module.scss.cjs.js +2 -2
  32. package/dist/components/ContextMenu/ContextMenuDivider.module.scss.es.js +2 -2
  33. package/dist/components/ContextMenu/ContextMenuItem.cjs.js +1 -1
  34. package/dist/components/ContextMenu/ContextMenuItem.cjs.js.map +1 -1
  35. package/dist/components/ContextMenu/ContextMenuItem.es.js.map +1 -1
  36. package/dist/components/ContextMenu/ContextMenuItem.module.scss.cjs.js +2 -2
  37. package/dist/components/ContextMenu/ContextMenuItem.module.scss.es.js +3 -3
  38. package/dist/components/ContextMenu/ContextMenuService.cjs.js +1 -1
  39. package/dist/components/ContextMenu/ContextMenuService.cjs.js.map +1 -1
  40. package/dist/components/ContextMenu/ContextMenuService.es.js.map +1 -1
  41. package/dist/components/DataGrid/DataGrid.cjs.js +1 -1
  42. package/dist/components/DataGrid/DataGrid.cjs.js.map +1 -1
  43. package/dist/components/DataGrid/DataGrid.es.js.map +1 -1
  44. package/dist/components/DataGrid/DataGrid.module.scss.cjs.js +2 -2
  45. package/dist/components/DataGrid/DataGrid.module.scss.es.js +6 -6
  46. package/dist/components/DataGrid/DataGridActions/DataGridActions.cjs.js +1 -1
  47. package/dist/components/DataGrid/DataGridActions/DataGridActions.cjs.js.map +1 -1
  48. package/dist/components/DataGrid/DataGridActions/DataGridActions.es.js.map +1 -1
  49. package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +2 -2
  50. package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.es.js +6 -6
  51. package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.cjs.js +1 -1
  52. package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.cjs.js.map +1 -1
  53. package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.es.js.map +1 -1
  54. package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +2 -2
  55. package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.es.js +7 -7
  56. package/dist/components/DataGrid/DataGridBody/DataGridBody.cjs.js +1 -1
  57. package/dist/components/DataGrid/DataGridBody/DataGridBody.cjs.js.map +1 -1
  58. package/dist/components/DataGrid/DataGridBody/DataGridBody.es.js.map +1 -1
  59. package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +2 -2
  60. package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.es.js +2 -2
  61. package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js +1 -1
  62. package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js.map +1 -1
  63. package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.es.js.map +1 -1
  64. package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +2 -2
  65. package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.es.js +5 -5
  66. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.cjs.js +1 -1
  67. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.cjs.js.map +1 -1
  68. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.es.js.map +1 -1
  69. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +2 -2
  70. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.es.js +4 -4
  71. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.cjs.js +1 -1
  72. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.cjs.js.map +1 -1
  73. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.es.js.map +1 -1
  74. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +2 -2
  75. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.es.js +5 -5
  76. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js +1 -1
  77. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js.map +1 -1
  78. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js +2 -1
  79. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js.map +1 -1
  80. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +2 -2
  81. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.es.js +24 -24
  82. package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.cjs.js +1 -1
  83. package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.cjs.js.map +1 -1
  84. package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.es.js.map +1 -1
  85. package/dist/components/DataGrid/DataGridFilters/DataGridDateFilter.cjs.js.map +1 -1
  86. package/dist/components/DataGrid/DataGridFilters/DataGridDateFilter.es.js.map +1 -1
  87. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js +1 -1
  88. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js.map +1 -1
  89. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.es.js.map +1 -1
  90. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +2 -2
  91. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.es.js +9 -9
  92. package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js +1 -1
  93. package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js.map +1 -1
  94. package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.es.js.map +1 -1
  95. package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js +1 -1
  96. package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js.map +1 -1
  97. package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.es.js.map +1 -1
  98. package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js +1 -1
  99. package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js.map +1 -1
  100. package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.es.js.map +1 -1
  101. package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js +1 -1
  102. package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js.map +1 -1
  103. package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.es.js.map +1 -1
  104. package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js.map +1 -1
  105. package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.es.js.map +1 -1
  106. package/dist/components/DataGrid/DataGridFilters/DataGridSearchbar.cjs.js +1 -1
  107. package/dist/components/DataGrid/DataGridFilters/DataGridSearchbar.cjs.js.map +1 -1
  108. package/dist/components/DataGrid/DataGridFilters/DataGridSearchbar.es.js.map +1 -1
  109. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js +1 -1
  110. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js.map +1 -1
  111. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.es.js.map +1 -1
  112. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +2 -2
  113. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.es.js +8 -8
  114. package/dist/components/DataGrid/DataGridFilters/DataGridToolbarWrapper.cjs.js.map +1 -1
  115. package/dist/components/DataGrid/DataGridFilters/DataGridToolbarWrapper.es.js.map +1 -1
  116. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js +1 -1
  117. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js.map +1 -1
  118. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.es.js.map +1 -1
  119. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +2 -2
  120. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.es.js +17 -17
  121. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.cjs.js.map +1 -1
  122. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.es.js.map +1 -1
  123. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.cjs.js +1 -1
  124. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.cjs.js.map +1 -1
  125. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.es.js.map +1 -1
  126. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimeService.cjs.js.map +1 -1
  127. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimeService.es.js.map +1 -1
  128. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/SideMenu.cjs.js +1 -1
  129. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/SideMenu.cjs.js.map +1 -1
  130. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/SideMenu.es.js.map +1 -1
  131. package/dist/components/DataGrid/DataGridFilters/FilterKeyMapper.cjs.js +1 -1
  132. package/dist/components/DataGrid/DataGridFilters/FilterKeyMapper.cjs.js.map +1 -1
  133. package/dist/components/DataGrid/DataGridFilters/FilterKeyMapper.es.js.map +1 -1
  134. package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.cjs.js +1 -1
  135. package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.cjs.js.map +1 -1
  136. package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.es.js.map +1 -1
  137. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
  138. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
  139. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.es.js.map +1 -1
  140. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +2 -2
  141. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js +3 -3
  142. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.cjs.js +1 -1
  143. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.cjs.js.map +1 -1
  144. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.es.js.map +1 -1
  145. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +2 -2
  146. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js +7 -7
  147. package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
  148. package/dist/components/DatePicker/DatePicker.cjs.js.map +1 -1
  149. package/dist/components/DatePicker/DatePicker.es.js +1 -1
  150. package/dist/components/DatePicker/DatePicker.es.js.map +1 -1
  151. package/dist/components/DatePicker/DatePicker.module.scss.cjs.js +2 -2
  152. package/dist/components/DatePicker/DatePicker.module.scss.es.js +31 -31
  153. package/dist/components/Form/Checkbox/Checkbox.cjs.js +1 -1
  154. package/dist/components/Form/Checkbox/Checkbox.cjs.js.map +1 -1
  155. package/dist/components/Form/Checkbox/Checkbox.es.js +1 -0
  156. package/dist/components/Form/Checkbox/Checkbox.es.js.map +1 -1
  157. package/dist/components/Form/Checkbox/Checkbox.module.scss.cjs.js +2 -2
  158. package/dist/components/Form/Checkbox/Checkbox.module.scss.es.js +13 -13
  159. package/dist/components/Form/Fieldset/Fieldset.cjs.js +1 -1
  160. package/dist/components/Form/Fieldset/Fieldset.cjs.js.map +1 -1
  161. package/dist/components/Form/Fieldset/Fieldset.es.js.map +1 -1
  162. package/dist/components/Form/Fieldset/Fieldset.module.scss.cjs.js +2 -2
  163. package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js +5 -5
  164. package/dist/components/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
  165. package/dist/components/Form/FileUpload/FileItem/FileItem.cjs.js.map +1 -1
  166. package/dist/components/Form/FileUpload/FileItem/FileItem.es.js.map +1 -1
  167. package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +2 -2
  168. package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.es.js +18 -18
  169. package/dist/components/Form/FileUpload/FileUpload.cjs.js +1 -1
  170. package/dist/components/Form/FileUpload/FileUpload.cjs.js.map +1 -1
  171. package/dist/components/Form/FileUpload/FileUpload.es.js +18 -4
  172. package/dist/components/Form/FileUpload/FileUpload.es.js.map +1 -1
  173. package/dist/components/Form/FileUpload/FileUpload.module.scss.cjs.js +2 -2
  174. package/dist/components/Form/FileUpload/FileUpload.module.scss.es.js +16 -16
  175. package/dist/components/Form/Form.cjs.js +1 -1
  176. package/dist/components/Form/Form.cjs.js.map +1 -1
  177. package/dist/components/Form/Form.es.js.map +1 -1
  178. package/dist/components/Form/Form.module.scss.cjs.js +2 -2
  179. package/dist/components/Form/Form.module.scss.es.js +2 -2
  180. package/dist/components/Form/FormControl/FormControl.cjs.js +1 -1
  181. package/dist/components/Form/FormControl/FormControl.cjs.js.map +1 -1
  182. package/dist/components/Form/FormControl/FormControl.es.js.map +1 -1
  183. package/dist/components/Form/FormControl/FormControl.module.scss.cjs.js +2 -2
  184. package/dist/components/Form/FormControl/FormControl.module.scss.es.js +13 -13
  185. package/dist/components/Form/FormErrorText/FormErrorText.cjs.js.map +1 -1
  186. package/dist/components/Form/FormErrorText/FormErrorText.es.js.map +1 -1
  187. package/dist/components/Form/FormErrorText/FormErrorText.module.scss.cjs.js +2 -2
  188. package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js +5 -5
  189. package/dist/components/Form/FormGroup/FormGroup.cjs.js +1 -1
  190. package/dist/components/Form/FormGroup/FormGroup.cjs.js.map +1 -1
  191. package/dist/components/Form/FormGroup/FormGroup.es.js.map +1 -1
  192. package/dist/components/Form/FormGroup/FormGroup.module.scss.cjs.js +2 -2
  193. package/dist/components/Form/FormGroup/FormGroup.module.scss.es.js +3 -3
  194. package/dist/components/Form/FormHelperText/FormHelperText.cjs.js +1 -1
  195. package/dist/components/Form/FormHelperText/FormHelperText.cjs.js.map +1 -1
  196. package/dist/components/Form/FormHelperText/FormHelperText.es.js.map +1 -1
  197. package/dist/components/Form/FormHelperText/FormHelperText.module.scss.cjs.js +2 -2
  198. package/dist/components/Form/FormHelperText/FormHelperText.module.scss.es.js +4 -4
  199. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.cjs.js +1 -1
  200. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.cjs.js.map +1 -1
  201. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.es.js.map +1 -1
  202. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +2 -2
  203. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.es.js +6 -6
  204. package/dist/components/Form/FormStatusIndicator/FormStatusIndicator.cjs.js.map +1 -1
  205. package/dist/components/Form/FormStatusIndicator/FormStatusIndicator.es.js.map +1 -1
  206. package/dist/components/Form/Input/Input.cjs.js +1 -1
  207. package/dist/components/Form/Input/Input.cjs.js.map +1 -1
  208. package/dist/components/Form/Input/Input.es.js +1 -0
  209. package/dist/components/Form/Input/Input.es.js.map +1 -1
  210. package/dist/components/Form/Input/Input.module.scss.cjs.js +2 -2
  211. package/dist/components/Form/Input/Input.module.scss.es.js +9 -9
  212. package/dist/components/Form/Label/Label.cjs.js +1 -1
  213. package/dist/components/Form/Label/Label.cjs.js.map +1 -1
  214. package/dist/components/Form/Label/Label.es.js.map +1 -1
  215. package/dist/components/Form/Label/Label.module.scss.cjs.js +2 -2
  216. package/dist/components/Form/Label/Label.module.scss.es.js +2 -2
  217. package/dist/components/Form/Radio/Radio.cjs.js +1 -1
  218. package/dist/components/Form/Radio/Radio.cjs.js.map +1 -1
  219. package/dist/components/Form/Radio/Radio.es.js +1 -0
  220. package/dist/components/Form/Radio/Radio.es.js.map +1 -1
  221. package/dist/components/Form/Radio/Radio.module.scss.cjs.js +2 -2
  222. package/dist/components/Form/Radio/Radio.module.scss.es.js +11 -11
  223. package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js +1 -1
  224. package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js.map +1 -1
  225. package/dist/components/Form/Select/MultiSelect/MultiOption.es.js.map +1 -1
  226. package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js +1 -1
  227. package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js.map +1 -1
  228. package/dist/components/Form/Select/MultiSelect/MultiSelect.es.js.map +1 -1
  229. package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +2 -2
  230. package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js +15 -15
  231. package/dist/components/Form/Select/MultiSelect/SelectButton.cjs.js +1 -1
  232. package/dist/components/Form/Select/MultiSelect/SelectButton.cjs.js.map +1 -1
  233. package/dist/components/Form/Select/MultiSelect/SelectButton.es.js.map +1 -1
  234. package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +2 -2
  235. package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.es.js +2 -2
  236. package/dist/components/Form/Select/MultiSelect/SelectedOptions.cjs.js +1 -1
  237. package/dist/components/Form/Select/MultiSelect/SelectedOptions.cjs.js.map +1 -1
  238. package/dist/components/Form/Select/MultiSelect/SelectedOptions.es.js.map +1 -1
  239. package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +2 -2
  240. package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.es.js +4 -4
  241. package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js +1 -1
  242. package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js.map +1 -1
  243. package/dist/components/Form/Select/MultiSelect/useArrowNavigation.es.js.map +1 -1
  244. package/dist/components/Form/Select/MultiSelect/useMultiSelect.cjs.js +1 -1
  245. package/dist/components/Form/Select/MultiSelect/useMultiSelect.cjs.js.map +1 -1
  246. package/dist/components/Form/Select/MultiSelect/useMultiSelect.es.js.map +1 -1
  247. package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js +1 -1
  248. package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -1
  249. package/dist/components/Form/Select/MultiSelect/useSearch.es.js.map +1 -1
  250. package/dist/components/Form/Select/Select.interfaces.cjs.js.map +1 -1
  251. package/dist/components/Form/Select/Select.interfaces.es.js.map +1 -1
  252. package/dist/components/Form/Select/SingleSelect/Option.cjs.js +1 -1
  253. package/dist/components/Form/Select/SingleSelect/Option.cjs.js.map +1 -1
  254. package/dist/components/Form/Select/SingleSelect/Option.es.js.map +1 -1
  255. package/dist/components/Form/Select/SingleSelect/Select.cjs.js +1 -1
  256. package/dist/components/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
  257. package/dist/components/Form/Select/SingleSelect/Select.es.js.map +1 -1
  258. package/dist/components/Form/Select/SingleSelect/Select.module.scss.cjs.js +2 -2
  259. package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js +17 -17
  260. package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js +1 -1
  261. package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js.map +1 -1
  262. package/dist/components/Form/Select/SingleSelect/useArrowNavigation.es.js.map +1 -1
  263. package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js +1 -1
  264. package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js.map +1 -1
  265. package/dist/components/Form/Select/SingleSelect/useSearch.es.js.map +1 -1
  266. package/dist/components/Form/Select/useAddNewBtn.cjs.js +1 -1
  267. package/dist/components/Form/Select/useAddNewBtn.cjs.js.map +1 -1
  268. package/dist/components/Form/Select/useAddNewBtn.es.js.map +1 -1
  269. package/dist/components/Form/Select/useAddNewBtn.module.scss.cjs.js +2 -2
  270. package/dist/components/Form/Select/useAddNewBtn.module.scss.es.js +4 -4
  271. package/dist/components/Form/Select/useSelectPositionList.cjs.js +1 -1
  272. package/dist/components/Form/Select/useSelectPositionList.cjs.js.map +1 -1
  273. package/dist/components/Form/Select/useSelectPositionList.es.js.map +1 -1
  274. package/dist/components/Form/Textarea/Textarea.cjs.js +1 -1
  275. package/dist/components/Form/Textarea/Textarea.cjs.js.map +1 -1
  276. package/dist/components/Form/Textarea/Textarea.es.js +1 -0
  277. package/dist/components/Form/Textarea/Textarea.es.js.map +1 -1
  278. package/dist/components/Form/Textarea/Textarea.module.scss.cjs.js +2 -2
  279. package/dist/components/Form/Textarea/Textarea.module.scss.es.js +6 -6
  280. package/dist/components/Form/Toggle/Toggle.cjs.js +1 -1
  281. package/dist/components/Form/Toggle/Toggle.cjs.js.map +1 -1
  282. package/dist/components/Form/Toggle/Toggle.es.js.map +1 -1
  283. package/dist/components/Form/Toggle/Toggle.module.scss.cjs.js +2 -2
  284. package/dist/components/Form/Toggle/Toggle.module.scss.es.js +18 -18
  285. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.cjs.js +1 -1
  286. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.cjs.js.map +1 -1
  287. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.es.js.map +1 -1
  288. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +2 -2
  289. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.es.js +3 -3
  290. package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.cjs.js +1 -1
  291. package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.cjs.js.map +1 -1
  292. package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.es.js +9 -1
  293. package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.es.js.map +1 -1
  294. package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +2 -2
  295. package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.es.js +4 -4
  296. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.cjs.js +1 -1
  297. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.cjs.js.map +1 -1
  298. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.es.js +9 -1
  299. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.es.js.map +1 -1
  300. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +2 -2
  301. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.es.js +3 -3
  302. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.cjs.js +1 -1
  303. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.cjs.js.map +1 -1
  304. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.es.js.map +1 -1
  305. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +2 -2
  306. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.es.js +3 -3
  307. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.cjs.js +1 -1
  308. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.cjs.js.map +1 -1
  309. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.es.js +9 -1
  310. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.es.js.map +1 -1
  311. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +2 -2
  312. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.es.js +3 -3
  313. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js +1 -1
  314. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js.map +1 -1
  315. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js +10 -2
  316. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js.map +1 -1
  317. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +2 -2
  318. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.es.js +8 -8
  319. package/dist/components/Form/Wrapper/Wrapper/Wrapper.cjs.js +1 -1
  320. package/dist/components/Form/Wrapper/Wrapper/Wrapper.cjs.js.map +1 -1
  321. package/dist/components/Form/Wrapper/Wrapper/Wrapper.es.js.map +1 -1
  322. package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +2 -2
  323. package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.es.js +6 -6
  324. package/dist/components/Icon/Icon.cjs.js +1 -1
  325. package/dist/components/Icon/Icon.cjs.js.map +1 -1
  326. package/dist/components/Icon/Icon.es.js.map +1 -1
  327. package/dist/components/Icon/Icon.module.scss.cjs.js +2 -2
  328. package/dist/components/Icon/Icon.module.scss.es.js +107 -107
  329. package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.cjs.js +1 -1
  330. package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.cjs.js.map +1 -1
  331. package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.es.js +11 -9
  332. package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.es.js.map +1 -1
  333. package/dist/components/InlineEditing/InlineEditingContext.cjs.js +1 -1
  334. package/dist/components/InlineEditing/InlineEditingContext.cjs.js.map +1 -1
  335. package/dist/components/InlineEditing/InlineEditingContext.es.js +40 -2
  336. package/dist/components/InlineEditing/InlineEditingContext.es.js.map +1 -1
  337. package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.cjs.js +1 -1
  338. package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.cjs.js.map +1 -1
  339. package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.es.js +13 -10
  340. package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.es.js.map +1 -1
  341. package/dist/components/Layout/Card/Card.cjs.js.map +1 -1
  342. package/dist/components/Layout/Card/Card.es.js.map +1 -1
  343. package/dist/components/Layout/Card/Card.module.scss.cjs.js +2 -2
  344. package/dist/components/Layout/Card/Card.module.scss.es.js +12 -12
  345. package/dist/components/Layout/ContentHeader/ContentHeader.cjs.js +1 -1
  346. package/dist/components/Layout/ContentHeader/ContentHeader.cjs.js.map +1 -1
  347. package/dist/components/Layout/ContentHeader/ContentHeader.es.js.map +1 -1
  348. package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +2 -2
  349. package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.es.js +12 -12
  350. package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.cjs.js.map +1 -1
  351. package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.es.js.map +1 -1
  352. package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +2 -2
  353. package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.es.js +4 -4
  354. package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js +1 -1
  355. package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js.map +1 -1
  356. package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.es.js +1 -1
  357. package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.es.js.map +1 -1
  358. package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +2 -2
  359. package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.es.js +2 -2
  360. package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js.map +1 -1
  361. package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.es.js.map +1 -1
  362. package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +2 -2
  363. package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.es.js +3 -3
  364. package/dist/components/Link/Link.cjs.js +1 -1
  365. package/dist/components/Link/Link.cjs.js.map +1 -1
  366. package/dist/components/Link/Link.es.js.map +1 -1
  367. package/dist/components/Link/Link.module.scss.cjs.js +2 -2
  368. package/dist/components/Link/Link.module.scss.es.js +19 -16
  369. package/dist/components/Link/Link.module.scss.es.js.map +1 -1
  370. package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.cjs.js.map +1 -1
  371. package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.es.js.map +1 -1
  372. package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +2 -2
  373. package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.es.js +11 -11
  374. package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js +1 -1
  375. package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js.map +1 -1
  376. package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.es.js.map +1 -1
  377. package/dist/components/Notifications/Alert/AlertItem/AlertItem.cjs.js +1 -1
  378. package/dist/components/Notifications/Alert/AlertItem/AlertItem.cjs.js.map +1 -1
  379. package/dist/components/Notifications/Alert/AlertItem/AlertItem.es.js.map +1 -1
  380. package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +2 -2
  381. package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.es.js +22 -22
  382. package/dist/components/Notifications/Alert/AlertProvider/AlertContext.cjs.js.map +1 -1
  383. package/dist/components/Notifications/Alert/AlertProvider/AlertContext.es.js.map +1 -1
  384. package/dist/components/Notifications/Alert/AlertProvider/AlertProvider.cjs.js +1 -1
  385. package/dist/components/Notifications/Alert/AlertProvider/AlertProvider.cjs.js.map +1 -1
  386. package/dist/components/Notifications/Alert/AlertProvider/AlertProvider.es.js.map +1 -1
  387. package/dist/components/Notifications/Alert/useAlert.cjs.js.map +1 -1
  388. package/dist/components/Notifications/Alert/useAlert.es.js.map +1 -1
  389. package/dist/components/Notifications/Banner/Banner.cjs.js +1 -1
  390. package/dist/components/Notifications/Banner/Banner.cjs.js.map +1 -1
  391. package/dist/components/Notifications/Banner/Banner.es.js.map +1 -1
  392. package/dist/components/Notifications/Banner/Banner.module.scss.cjs.js +2 -2
  393. package/dist/components/Notifications/Banner/Banner.module.scss.es.js +9 -9
  394. package/dist/components/Notifications/BaseModal/BaseModal.cjs.js +1 -1
  395. package/dist/components/Notifications/BaseModal/BaseModal.cjs.js.map +1 -1
  396. package/dist/components/Notifications/BaseModal/BaseModal.es.js +1 -1
  397. package/dist/components/Notifications/BaseModal/BaseModal.es.js.map +1 -1
  398. package/dist/components/Notifications/BaseModal/BaseModal.module.scss.cjs.js +2 -2
  399. package/dist/components/Notifications/BaseModal/BaseModal.module.scss.es.js +5 -5
  400. package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.cjs.js +1 -1
  401. package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.cjs.js.map +1 -1
  402. package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.es.js.map +1 -1
  403. package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +2 -2
  404. package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.es.js +4 -4
  405. package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.cjs.js +1 -1
  406. package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.cjs.js.map +1 -1
  407. package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.es.js.map +1 -1
  408. package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +2 -2
  409. package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.es.js +2 -2
  410. package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.cjs.js +1 -1
  411. package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.cjs.js.map +1 -1
  412. package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.es.js.map +1 -1
  413. package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +2 -2
  414. package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.es.js +6 -6
  415. package/dist/components/Notifications/Dialog/Dialog.cjs.js +1 -1
  416. package/dist/components/Notifications/Dialog/Dialog.cjs.js.map +1 -1
  417. package/dist/components/Notifications/Dialog/Dialog.es.js +2 -2
  418. package/dist/components/Notifications/Dialog/Dialog.es.js.map +1 -1
  419. package/dist/components/Notifications/Dialog/Dialog.module.scss.cjs.js +2 -2
  420. package/dist/components/Notifications/Dialog/Dialog.module.scss.es.js +4 -4
  421. package/dist/components/Notifications/Dialog/DialogActions/DialogActions.cjs.js +1 -1
  422. package/dist/components/Notifications/Dialog/DialogActions/DialogActions.cjs.js.map +1 -1
  423. package/dist/components/Notifications/Dialog/DialogActions/DialogActions.es.js.map +1 -1
  424. package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +2 -2
  425. package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.es.js +3 -3
  426. package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.cjs.js +1 -1
  427. package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.cjs.js.map +1 -1
  428. package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.es.js.map +1 -1
  429. package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +2 -2
  430. package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.es.js +10 -10
  431. package/dist/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.cjs.js +1 -1
  432. package/dist/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.cjs.js.map +1 -1
  433. package/dist/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.es.js.map +1 -1
  434. package/dist/components/Notifications/DiscardChangesModal/DiscardChangesModal.cjs.js.map +1 -1
  435. package/dist/components/Notifications/DiscardChangesModal/DiscardChangesModal.es.js.map +1 -1
  436. package/dist/components/Notifications/NotificationProvider/NotificationContext.cjs.js +1 -1
  437. package/dist/components/Notifications/NotificationProvider/NotificationContext.cjs.js.map +1 -1
  438. package/dist/components/Notifications/NotificationProvider/NotificationContext.es.js +1 -1
  439. package/dist/components/Notifications/NotificationProvider/NotificationContext.es.js.map +1 -1
  440. package/dist/components/Notifications/NotificationProvider/NotificationService.es.js.map +1 -1
  441. package/dist/components/Notifications/SideSheet/SideSheet.cjs.js +1 -1
  442. package/dist/components/Notifications/SideSheet/SideSheet.cjs.js.map +1 -1
  443. package/dist/components/Notifications/SideSheet/SideSheet.es.js.map +1 -1
  444. package/dist/components/Notifications/SideSheet/SideSheet.module.scss.cjs.js +2 -2
  445. package/dist/components/Notifications/SideSheet/SideSheet.module.scss.es.js +13 -13
  446. package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.cjs.js.map +1 -1
  447. package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.es.js.map +1 -1
  448. package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +2 -2
  449. package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.es.js +2 -2
  450. package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.cjs.js.map +1 -1
  451. package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.es.js.map +1 -1
  452. package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +2 -2
  453. package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.es.js +2 -2
  454. package/dist/components/Notifications/SlideInModal/SlideInModal.cjs.js +1 -1
  455. package/dist/components/Notifications/SlideInModal/SlideInModal.cjs.js.map +1 -1
  456. package/dist/components/Notifications/SlideInModal/SlideInModal.es.js.map +1 -1
  457. package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +2 -2
  458. package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.es.js +10 -10
  459. package/dist/components/Pagination/Pagination.cjs.js +1 -1
  460. package/dist/components/Pagination/Pagination.cjs.js.map +1 -1
  461. package/dist/components/Pagination/Pagination.es.js.map +1 -1
  462. package/dist/components/Pagination/Pagination.module.scss.cjs.js +2 -2
  463. package/dist/components/Pagination/Pagination.module.scss.es.js +14 -14
  464. package/dist/components/Popover/Popover.cjs.js +1 -1
  465. package/dist/components/Popover/Popover.cjs.js.map +1 -1
  466. package/dist/components/Popover/Popover.es.js.map +1 -1
  467. package/dist/components/Popover/Popover.module.scss.cjs.js +2 -2
  468. package/dist/components/Popover/Popover.module.scss.es.js +3 -3
  469. package/dist/components/ProgressBar/ProgressBar.cjs.js +1 -1
  470. package/dist/components/ProgressBar/ProgressBar.cjs.js.map +1 -1
  471. package/dist/components/ProgressBar/ProgressBar.es.js.map +1 -1
  472. package/dist/components/ProgressBar/ProgressBar.module.scss.cjs.js +2 -2
  473. package/dist/components/ProgressBar/ProgressBar.module.scss.es.js +9 -9
  474. package/dist/components/RequiredSign/RequiredSign.cjs.js.map +1 -1
  475. package/dist/components/RequiredSign/RequiredSign.es.js.map +1 -1
  476. package/dist/components/Skeleton/Skeleton.cjs.js +1 -1
  477. package/dist/components/Skeleton/Skeleton.cjs.js.map +1 -1
  478. package/dist/components/Skeleton/Skeleton.es.js.map +1 -1
  479. package/dist/components/Skeleton/Skeleton.module.scss.cjs.js +2 -2
  480. package/dist/components/Skeleton/Skeleton.module.scss.es.js +5 -5
  481. package/dist/components/Spinner/Spinner.cjs.js.map +1 -1
  482. package/dist/components/Spinner/Spinner.es.js.map +1 -1
  483. package/dist/components/Spinner/Spinner.module.scss.cjs.js +2 -2
  484. package/dist/components/Spinner/Spinner.module.scss.es.js +3 -3
  485. package/dist/components/Stepper/Step.cjs.js.map +1 -1
  486. package/dist/components/Stepper/Step.es.js.map +1 -1
  487. package/dist/components/Stepper/Step.module.scss.cjs.js +2 -2
  488. package/dist/components/Stepper/Step.module.scss.es.js +22 -22
  489. package/dist/components/Stepper/Stepper.cjs.js +1 -1
  490. package/dist/components/Stepper/Stepper.cjs.js.map +1 -1
  491. package/dist/components/Stepper/Stepper.es.js.map +1 -1
  492. package/dist/components/Stepper/Stepper.module.scss.cjs.js +2 -2
  493. package/dist/components/Stepper/Stepper.module.scss.es.js +4 -4
  494. package/dist/components/Tabs/Tab.cjs.js.map +1 -1
  495. package/dist/components/Tabs/Tab.es.js.map +1 -1
  496. package/dist/components/Tabs/Tab.module.scss.cjs.js +2 -2
  497. package/dist/components/Tabs/Tab.module.scss.es.js +3 -3
  498. package/dist/components/Tabs/TabButton.cjs.js +1 -1
  499. package/dist/components/Tabs/TabButton.cjs.js.map +1 -1
  500. package/dist/components/Tabs/TabButton.es.js.map +1 -1
  501. package/dist/components/Tabs/TabButton.module.scss.cjs.js +2 -2
  502. package/dist/components/Tabs/TabButton.module.scss.es.js +12 -12
  503. package/dist/components/Tabs/Tabs.cjs.js +1 -1
  504. package/dist/components/Tabs/Tabs.cjs.js.map +1 -1
  505. package/dist/components/Tabs/Tabs.es.js +61 -36
  506. package/dist/components/Tabs/Tabs.es.js.map +1 -1
  507. package/dist/components/Tabs/Tabs.module.scss.cjs.js +2 -2
  508. package/dist/components/Tabs/Tabs.module.scss.es.js +10 -10
  509. package/dist/components/Tag/RemoveButton.cjs.js +1 -1
  510. package/dist/components/Tag/RemoveButton.cjs.js.map +1 -1
  511. package/dist/components/Tag/RemoveButton.es.js.map +1 -1
  512. package/dist/components/Tag/RemoveButton.module.scss.cjs.js +2 -2
  513. package/dist/components/Tag/RemoveButton.module.scss.es.js +3 -3
  514. package/dist/components/Tag/Tag.cjs.js +1 -1
  515. package/dist/components/Tag/Tag.cjs.js.map +1 -1
  516. package/dist/components/Tag/Tag.es.js.map +1 -1
  517. package/dist/components/Tag/Tag.module.scss.cjs.js +2 -2
  518. package/dist/components/Tag/Tag.module.scss.es.js +6 -6
  519. package/dist/components/TextEllipsis/TextEllipsis.cjs.js +1 -1
  520. package/dist/components/TextEllipsis/TextEllipsis.cjs.js.map +1 -1
  521. package/dist/components/TextEllipsis/TextEllipsis.es.js.map +1 -1
  522. package/dist/components/TextEllipsis/TextEllipsis.module.scss.cjs.js +2 -2
  523. package/dist/components/TextEllipsis/TextEllipsis.module.scss.es.js +3 -3
  524. package/dist/components/Tiles/Tile.cjs.js +1 -1
  525. package/dist/components/Tiles/Tile.cjs.js.map +1 -1
  526. package/dist/components/Tiles/Tile.es.js.map +1 -1
  527. package/dist/components/Tiles/Tile.module.scss.cjs.js +2 -2
  528. package/dist/components/Tiles/Tile.module.scss.es.js +8 -8
  529. package/dist/components/Tiles/Tiles.cjs.js +1 -1
  530. package/dist/components/Tiles/Tiles.cjs.js.map +1 -1
  531. package/dist/components/Tiles/Tiles.es.js.map +1 -1
  532. package/dist/components/Tiles/Tiles.module.scss.cjs.js +2 -2
  533. package/dist/components/Tiles/Tiles.module.scss.es.js +2 -2
  534. package/dist/components/Tooltip/Tooltip.cjs.js +1 -1
  535. package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
  536. package/dist/components/Tooltip/Tooltip.es.js +1 -1
  537. package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
  538. package/dist/components/Tooltip/Tooltip.module.scss.cjs.js +2 -2
  539. package/dist/components/Tooltip/Tooltip.module.scss.es.js +27 -27
  540. package/dist/components/Typography/Typography.cjs.js +1 -1
  541. package/dist/components/Typography/Typography.cjs.js.map +1 -1
  542. package/dist/components/Typography/Typography.es.js.map +1 -1
  543. package/dist/components/Typography/Typography.module.scss.cjs.js +2 -2
  544. package/dist/components/Typography/Typography.module.scss.es.js +13 -13
  545. package/dist/components/_BaseStyling_/BaseStyling.cjs.js +1 -1
  546. package/dist/components/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
  547. package/dist/components/_BaseStyling_/BaseStyling.es.js.map +1 -1
  548. package/dist/components/admin/layout/LeftNav/LeftNav.cjs.js +1 -1
  549. package/dist/components/admin/layout/LeftNav/LeftNav.cjs.js.map +1 -1
  550. package/dist/components/admin/layout/LeftNav/LeftNav.es.js +2 -0
  551. package/dist/components/admin/layout/LeftNav/LeftNav.es.js.map +1 -1
  552. package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.cjs.js +2 -2
  553. package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.es.js +5 -5
  554. package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.cjs.js +1 -1
  555. package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.cjs.js.map +1 -1
  556. package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.es.js +2 -0
  557. package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.es.js.map +1 -1
  558. package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.cjs.js +1 -1
  559. package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.cjs.js.map +1 -1
  560. package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.es.js.map +1 -1
  561. package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +2 -2
  562. package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.es.js +14 -14
  563. package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.cjs.js +1 -1
  564. package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.cjs.js.map +1 -1
  565. package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.es.js +90 -2
  566. package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.es.js.map +1 -1
  567. package/dist/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.cjs.js.map +1 -1
  568. package/dist/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.es.js.map +1 -1
  569. package/dist/components/admin/layout/LeftNav/useRefItems.cjs.js +1 -1
  570. package/dist/components/admin/layout/LeftNav/useRefItems.cjs.js.map +1 -1
  571. package/dist/components/admin/layout/LeftNav/useRefItems.es.js.map +1 -1
  572. package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.cjs.js +1 -1
  573. package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.cjs.js.map +1 -1
  574. package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.es.js +1 -1
  575. package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.es.js.map +1 -1
  576. package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +2 -2
  577. package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.es.js +3 -3
  578. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.cjs.js +2 -0
  579. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.cjs.js.map +1 -0
  580. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.es.js +33 -0
  581. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.es.js.map +1 -0
  582. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.cjs.js +3 -0
  583. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.cjs.js.map +1 -0
  584. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.es.js +25 -0
  585. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.es.js.map +1 -0
  586. package/dist/components/admin/layout/TopNavBar/TopNavBar.cjs.js +2 -0
  587. package/dist/components/admin/layout/TopNavBar/TopNavBar.cjs.js.map +1 -0
  588. package/dist/components/admin/layout/TopNavBar/TopNavBar.es.js +45 -0
  589. package/dist/components/admin/layout/TopNavBar/TopNavBar.es.js.map +1 -0
  590. package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.cjs.js +3 -0
  591. package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.cjs.js.map +1 -0
  592. package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.es.js +25 -0
  593. package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.es.js.map +1 -0
  594. package/dist/components/miscellaneous/IdentityProviderButton.cjs.js.map +1 -1
  595. package/dist/components/miscellaneous/IdentityProviderButton.es.js.map +1 -1
  596. package/dist/components/miscellaneous/IdentityProviderButton.module.scss.cjs.js +2 -2
  597. package/dist/components/miscellaneous/IdentityProviderButton.module.scss.es.js +3 -3
  598. package/dist/components/withReadOnly.cjs.js +1 -1
  599. package/dist/components/withReadOnly.cjs.js.map +1 -1
  600. package/dist/components/withReadOnly.es.js.map +1 -1
  601. package/dist/hooks/useAnimation.cjs.js +1 -1
  602. package/dist/hooks/useAnimation.cjs.js.map +1 -1
  603. package/dist/hooks/useAnimation.es.js.map +1 -1
  604. package/dist/hooks/useClickOutside.cjs.js +1 -1
  605. package/dist/hooks/useClickOutside.cjs.js.map +1 -1
  606. package/dist/hooks/useClickOutside.es.js.map +1 -1
  607. package/dist/hooks/useDebouncedCallback.cjs.js +1 -1
  608. package/dist/hooks/useDebouncedCallback.cjs.js.map +1 -1
  609. package/dist/hooks/useDebouncedCallback.es.js.map +1 -1
  610. package/dist/hooks/useDescribedBy.cjs.js +2 -0
  611. package/dist/hooks/useDescribedBy.cjs.js.map +1 -0
  612. package/dist/hooks/useDescribedBy.es.js +30 -0
  613. package/dist/hooks/useDescribedBy.es.js.map +1 -0
  614. package/dist/hooks/useDetermineStatusIcon.cjs.js.map +1 -1
  615. package/dist/hooks/useDetermineStatusIcon.es.js.map +1 -1
  616. package/dist/hooks/useFormSelector.cjs.js +1 -1
  617. package/dist/hooks/useFormSelector.cjs.js.map +1 -1
  618. package/dist/hooks/useFormSelector.es.js +11 -16
  619. package/dist/hooks/useFormSelector.es.js.map +1 -1
  620. package/dist/hooks/useFullHeightCollapse.cjs.js.map +1 -1
  621. package/dist/hooks/useFullHeightCollapse.es.js.map +1 -1
  622. package/dist/hooks/useGetDomRoot.cjs.js +1 -1
  623. package/dist/hooks/useGetDomRoot.cjs.js.map +1 -1
  624. package/dist/hooks/useGetDomRoot.es.js.map +1 -1
  625. package/dist/hooks/usePosition.cjs.js +1 -1
  626. package/dist/hooks/usePosition.cjs.js.map +1 -1
  627. package/dist/hooks/usePosition.es.js.map +1 -1
  628. package/dist/hooks/useRepeatFocus.cjs.js +1 -1
  629. package/dist/hooks/useRepeatFocus.cjs.js.map +1 -1
  630. package/dist/hooks/useRepeatFocus.es.js +6 -23
  631. package/dist/hooks/useRepeatFocus.es.js.map +1 -1
  632. package/dist/hooks/useRepeater.cjs.js +1 -1
  633. package/dist/hooks/useRepeater.cjs.js.map +1 -1
  634. package/dist/hooks/useRepeater.es.js.map +1 -1
  635. package/dist/hooks/useScreenSize.cjs.js +1 -1
  636. package/dist/hooks/useScreenSize.cjs.js.map +1 -1
  637. package/dist/hooks/useScreenSize.es.js.map +1 -1
  638. package/dist/hooks/useSpacing.cjs.js +1 -1
  639. package/dist/hooks/useSpacing.cjs.js.map +1 -1
  640. package/dist/hooks/useSpacing.es.js.map +1 -1
  641. package/dist/hooks/useUploadFile.cjs.js +1 -1
  642. package/dist/hooks/useUploadFile.cjs.js.map +1 -1
  643. package/dist/hooks/useUploadFile.es.js.map +1 -1
  644. package/dist/hooks/useWrapper.cjs.js.map +1 -1
  645. package/dist/hooks/useWrapper.es.js.map +1 -1
  646. package/dist/index.cjs.js +1 -1
  647. package/dist/index.d.ts +48 -4
  648. package/dist/index.es.js +6 -0
  649. package/dist/index.es.js.map +1 -1
  650. package/dist/node_modules/tabbable/dist/index.esm.cjs.js +2 -0
  651. package/dist/node_modules/tabbable/dist/index.esm.cjs.js.map +1 -0
  652. package/dist/node_modules/tabbable/dist/index.esm.es.js +322 -0
  653. package/dist/node_modules/tabbable/dist/index.esm.es.js.map +1 -0
  654. package/dist/readyclasses.module.scss.cjs.js +2 -2
  655. package/dist/readyclasses.module.scss.es.js +5 -5
  656. package/dist/util/helper.cjs.js +1 -1
  657. package/dist/util/helper.cjs.js.map +1 -1
  658. package/dist/util/helper.es.js +1 -1
  659. package/dist/util/helper.es.js.map +1 -1
  660. package/dist/utils/focusManagement.cjs.js +2 -0
  661. package/dist/utils/focusManagement.cjs.js.map +1 -0
  662. package/dist/utils/focusManagement.es.js +8 -0
  663. package/dist/utils/focusManagement.es.js.map +1 -0
  664. package/dist/utils/statusUtils.cjs.js.map +1 -1
  665. package/dist/utils/statusUtils.es.js.map +1 -1
  666. package/dist/variables.cjs.js.map +1 -1
  667. package/dist/variables.es.js.map +1 -1
  668. package/package.json +26 -21
@@ -1 +1 @@
1
- {"version":3,"file":"DataGridDrawerItem.cjs.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentPropsWithRef, ForwardRefRenderFunction } from \"react\";\nimport classes from \"./DataGridDrawerItem.module.scss\";\nimport { Typography } from \"../../../Typography/Typography\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n title?: string;\n description?: string;\n}\n\nconst DataGridDrawerItemComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n { children, title, description, ...rest }: Props,\n ref\n) => {\n return (\n <div {...rest} ref={ref} className={classes[\"item-wrapper\"]}>\n {title && (\n <Typography className={classes[\"item-title\"]} variant=\"body\" tag=\"span\">\n {title}\n </Typography>\n )}\n {description && (\n <Typography className={classes[\"item-description\"]} variant=\"body\" tag=\"span\">\n {description}\n </Typography>\n )}\n {children && <div className={classes[\"children-wrapper\"]}> {children}</div>}\n </div>\n );\n};\n\nexport const DataGridDrawerItem = React.forwardRef(DataGridDrawerItemComponent);\n"],"names":["DataGridDrawerItem","React","forwardRef","children","title","description","rest","ref","createElement","className","classes","Typography","variant","tag","default"],"mappings":"iNA8CaA,EAAqBC,EAAMC,YArB6C,EACjFC,WAAUC,QAAOC,iBAAgBC,GACnCC,IAGEN,EAAAO,cAAC,UAAQF,EAAMC,MAAUE,UAAWC,EAAAA,QAAQ,iBACzCN,mBACEO,EAAWA,WAAA,CAAAF,UAAWC,UAAQ,cAAeE,QAAQ,OAAOC,IAAI,QAC9DT,GAGJC,GACEJ,EAAAO,cAAAG,aAAA,CAAWF,UAAWC,EAAAA,QAAQ,oBAAqBE,QAAQ,OAAOC,IAAI,QACpER,GAGJF,GAAYF,EAAAO,cAAC,OAAIC,UAAWC,EAAAI,QAAQ,qBAAqB,IAAEX"}
1
+ {"version":3,"file":"DataGridDrawerItem.cjs.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentPropsWithRef, ForwardRefRenderFunction } from \"react\";\nimport classes from \"./DataGridDrawerItem.module.scss\";\nimport { Typography } from \"../../../Typography/Typography\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n title?: string;\n description?: string;\n}\n\nconst DataGridDrawerItemComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n { children, title, description, ...rest }: Props,\n ref\n) => {\n return (\n <div {...rest} ref={ref} className={classes[\"item-wrapper\"]}>\n {title && (\n <Typography className={classes[\"item-title\"]} variant=\"body\" tag=\"span\">\n {title}\n </Typography>\n )}\n {description && (\n <Typography className={classes[\"item-description\"]} variant=\"body\" tag=\"span\">\n {description}\n </Typography>\n )}\n {children && <div className={classes[\"children-wrapper\"]}> {children}</div>}\n </div>\n );\n};\n\nexport const DataGridDrawerItem = React.forwardRef(DataGridDrawerItemComponent);\n"],"names":["DataGridDrawerItem","React","forwardRef","children","title","description","rest","ref","createElement","className","classes","Typography","variant","tag"],"mappings":"iNA8CaA,EAAqBC,EAAMC,WArB6C,EACjFC,WAAUC,QAAOC,iBAAgBC,GACnCC,IAGEN,EAAAO,cAAC,UAAQF,EAAMC,MAAUE,UAAWC,EAAAA,QAAQ,iBACzCN,mBACEO,EAAAA,WAAA,CAAWF,UAAWC,EAAAA,QAAQ,cAAeE,QAAQ,OAAOC,IAAI,QAC9DT,GAGJC,GACCJ,EAAAO,cAACG,aAAA,CAAWF,UAAWC,EAAAA,QAAQ,oBAAqBE,QAAQ,OAAOC,IAAI,QACpER,GAGJF,GAAYF,EAAAO,cAAC,OAAIC,UAAWC,EAAAA,QAAQ,qBAAqB,IAAEP"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataGridDrawerItem.es.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentPropsWithRef, ForwardRefRenderFunction } from \"react\";\nimport classes from \"./DataGridDrawerItem.module.scss\";\nimport { Typography } from \"../../../Typography/Typography\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n title?: string;\n description?: string;\n}\n\nconst DataGridDrawerItemComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n { children, title, description, ...rest }: Props,\n ref\n) => {\n return (\n <div {...rest} ref={ref} className={classes[\"item-wrapper\"]}>\n {title && (\n <Typography className={classes[\"item-title\"]} variant=\"body\" tag=\"span\">\n {title}\n </Typography>\n )}\n {description && (\n <Typography className={classes[\"item-description\"]} variant=\"body\" tag=\"span\">\n {description}\n </Typography>\n )}\n {children && <div className={classes[\"children-wrapper\"]}> {children}</div>}\n </div>\n );\n};\n\nexport const DataGridDrawerItem = React.forwardRef(DataGridDrawerItemComponent);\n"],"names":[],"mappings":";;;AAyBA,MAAM,8BAA+E,CACnF,EAAE,UAAU,OAAO,aAAa,GAAG,KAAK,GACxC,QACG;AAED,SAAA,sBAAA,cAAC,SAAK,GAAG,MAAM,KAAU,WAAW,QAAQ,cAAc,EACvD,GAAA,6CACE,YAAW,EAAA,WAAW,QAAQ,YAAY,GAAG,SAAQ,QAAO,KAAI,UAC9D,KACH,GAED,eACE,sBAAA,cAAA,YAAA,EAAW,WAAW,QAAQ,kBAAkB,GAAG,SAAQ,QAAO,KAAI,OACpE,GAAA,WACH,GAED,YAAY,sBAAA,cAAC,SAAI,WAAW,QAAQ,kBAAkB,EAAG,GAAA,KAAE,QAAS,CACvE;AAEJ;AAEa,MAAA,qBAAqB,MAAM,WAAW,2BAA2B;"}
1
+ {"version":3,"file":"DataGridDrawerItem.es.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentPropsWithRef, ForwardRefRenderFunction } from \"react\";\nimport classes from \"./DataGridDrawerItem.module.scss\";\nimport { Typography } from \"../../../Typography/Typography\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n title?: string;\n description?: string;\n}\n\nconst DataGridDrawerItemComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n { children, title, description, ...rest }: Props,\n ref\n) => {\n return (\n <div {...rest} ref={ref} className={classes[\"item-wrapper\"]}>\n {title && (\n <Typography className={classes[\"item-title\"]} variant=\"body\" tag=\"span\">\n {title}\n </Typography>\n )}\n {description && (\n <Typography className={classes[\"item-description\"]} variant=\"body\" tag=\"span\">\n {description}\n </Typography>\n )}\n {children && <div className={classes[\"children-wrapper\"]}> {children}</div>}\n </div>\n );\n};\n\nexport const DataGridDrawerItem = React.forwardRef(DataGridDrawerItemComponent);\n"],"names":[],"mappings":";;;AAyBA,MAAM,8BAA+E,CACnF,EAAE,UAAU,OAAO,aAAa,GAAG,KAAA,GACnC,QACG;AACH,SACE,sBAAA,cAAC,SAAK,GAAG,MAAM,KAAU,WAAW,QAAQ,cAAc,EAAA,GACvD,6CACE,YAAA,EAAW,WAAW,QAAQ,YAAY,GAAG,SAAQ,QAAO,KAAI,UAC9D,KACH,GAED,eACC,sBAAA,cAAC,YAAA,EAAW,WAAW,QAAQ,kBAAkB,GAAG,SAAQ,QAAO,KAAI,OAAA,GACpE,WACH,GAED,YAAY,sBAAA,cAAC,SAAI,WAAW,QAAQ,kBAAkB,EAAA,GAAG,KAAE,QAAS,CACvE;AAEJ;AAEO,MAAM,qBAAqB,MAAM,WAAW,2BAA2B;"}
@@ -1,3 +1,3 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".DataGridDrawerItem_item-wrapper_7l1Pc{display:flex;flex-direction:column}.DataGridDrawerItem_item-title_7l1Pc{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);font-weight:700;margin:0}.DataGridDrawerItem_item-description_7l1Pc{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);margin:0}.DataGridDrawerItem_children-wrapper_7l1Pc{margin-top:.5rem}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"item-wrapper":"DataGridDrawerItem_item-wrapper_7l1Pc","item-title":"DataGridDrawerItem_item-title_7l1Pc","item-description":"DataGridDrawerItem_item-description_7l1Pc","children-wrapper":"DataGridDrawerItem_children-wrapper_7l1Pc"};
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".DataGridDrawerItem_item-wrapper_SI2V3{display:flex;flex-direction:column}.DataGridDrawerItem_item-title_SI2V3{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);font-weight:700;margin:0}.DataGridDrawerItem_item-description_SI2V3{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);margin:0}.DataGridDrawerItem_children-wrapper_SI2V3{margin-top:.5rem}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"item-wrapper":"DataGridDrawerItem_item-wrapper_SI2V3","item-title":"DataGridDrawerItem_item-title_SI2V3","item-description":"DataGridDrawerItem_item-description_SI2V3","children-wrapper":"DataGridDrawerItem_children-wrapper_SI2V3"};
3
3
  //# sourceMappingURL=DataGridDrawerItem.module.scss.cjs.js.map
@@ -1,9 +1,9 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".DataGridDrawerItem_item-wrapper_7l1Pc{display:flex;flex-direction:column}.DataGridDrawerItem_item-title_7l1Pc{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);font-weight:700;margin:0}.DataGridDrawerItem_item-description_7l1Pc{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);margin:0}.DataGridDrawerItem_children-wrapper_7l1Pc{margin-top:.5rem}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".DataGridDrawerItem_item-wrapper_SI2V3{display:flex;flex-direction:column}.DataGridDrawerItem_item-title_SI2V3{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);font-weight:700;margin:0}.DataGridDrawerItem_item-description_SI2V3{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);margin:0}.DataGridDrawerItem_children-wrapper_SI2V3{margin-top:.5rem}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
2
  const classes = {
3
- "item-wrapper": "DataGridDrawerItem_item-wrapper_7l1Pc",
4
- "item-title": "DataGridDrawerItem_item-title_7l1Pc",
5
- "item-description": "DataGridDrawerItem_item-description_7l1Pc",
6
- "children-wrapper": "DataGridDrawerItem_children-wrapper_7l1Pc"
3
+ "item-wrapper": "DataGridDrawerItem_item-wrapper_SI2V3",
4
+ "item-title": "DataGridDrawerItem_item-title_SI2V3",
5
+ "item-description": "DataGridDrawerItem_item-description_SI2V3",
6
+ "children-wrapper": "DataGridDrawerItem_children-wrapper_SI2V3"
7
7
  };
8
8
  export {
9
9
  classes as default
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),n=require("./DataGridRow.module.scss.cjs.js"),t=require("../../../Button/IconButton.cjs.js"),r=require("../../../Icon/Icon.cjs.js"),a=require("../DataGridCell/DataGridCell.cjs.js"),l=require("../DataGridDrawer/DataGridDrawer.cjs.js"),o=require("../../../../util/helper.cjs.js"),s=require("./useNestedRow.cjs.js"),d=e.forwardRef((({item:d,children:i,className:c,headers:u,searchValue:p,isLoading:m,spacing:w,expandableRowProps:h,disableContextMenuColumn:C,nestedRowProps:x,...I},b)=>{const{enableExpandableRow:g=!1,expandButtonId:E=`ID-${o.generateID()}`,expandButtonTitle:D="Expand row",drawerId:j=`ID-${o.generateID()}`,expandableRowContent:f,onExpand:R,onCollapse:N}=h||{},{indentationLevels:v,indentationLevel:q=0,nestedItemsKey:G,enableNestedRow:y,rowTemplate:B}=x||{},[L,S]=e.useState(!1),{renderNestedRowConnectors:$,renderNestedRow:M,getNestedChildSpacing:P,hasNestedChildren:T}=s.useNestedRow({indentationLevels:v,indentationLevel:q,item:d,nestedItemsKey:G,rowTemplate:B,isRowExpanded:L,enableNestedRow:y,rowProps:{searchValue:p,headers:u,spacing:w,disableContextMenuColumn:C}}),V=[n.default.row],k=y?n.default[`border-${q}`]:n.default.border;c&&V.push(c),g?!L&&V.push(n.default["border-drawer"]):V.push(k),m&&V.push(n.default.loading);const z=e.Children.map(i,((n,a)=>{const l=y?P(w,a):w,o=y&&0===a?e.createElement(e.Fragment,null,T?e.createElement(t.IconButton,{id:E,title:D,"aria-expanded":L,onClick:()=>{S(!L)}},e.createElement(r.Icon,{size:"0.75rem",icon:L?r.Icons.ChevronUp:r.Icons.ChevronDown})):null,$()):null;if(n){const t=e.cloneElement(n,{searchValue:p,spacing:l,cellIndex:a,columnLength:null==u?void 0:u.length,disableContextMenuColumn:C,prefixElement:o});return(!(u&&u.length>a)||!u[a].hidden)&&t}return null}));return e.createElement(e.Fragment,null,e.createElement("tr",{...I,ref:b,className:V.join(" ")},g&&e.createElement(a.DataGridCell,{className:n.default["expand-button-cell"],onClick:()=>{var e;null==(e=L?N:R)||e(d),S(!L)},style:{width:"1px"}},e.createElement(t.IconButton,{id:E,title:D,"aria-expanded":L,"aria-controls":j},e.createElement(r.Icon,{size:"0.75rem",icon:L?r.Icons.ChevronUp:r.Icons.ChevronDown}))),z),g&&e.createElement("tr",{className:`${n.default.row} ${L?n.default["border-drawer"]:""}`},e.createElement("td",{colSpan:z.length+1},e.createElement(l.DataGridDrawer,{id:j,role:"region","aria-labelledby":E,isExpanded:L},f))),y&&M())}));exports.DataGridRow=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),n=require("./DataGridRow.module.scss.cjs.js"),t=require("../../../Button/IconButton.cjs.js"),r=require("../../../Icon/Icon.cjs.js"),a=require("../DataGridCell/DataGridCell.cjs.js"),l=require("../DataGridDrawer/DataGridDrawer.cjs.js"),o=require("../../../../util/helper.cjs.js"),d=require("./useNestedRow.cjs.js"),s=e.forwardRef(({item:s,children:i,className:c,headers:u,searchValue:p,isLoading:m,spacing:w,expandableRowProps:h,disableContextMenuColumn:C,nestedRowProps:x,...I},g)=>{const{enableExpandableRow:b=!1,expandButtonId:E=`ID-${o.generateID()}`,expandButtonTitle:D="Expand row",drawerId:j=`ID-${o.generateID()}`,expandableRowContent:f,onExpand:R,onCollapse:N}=h||{},{indentationLevels:v,indentationLevel:q=0,nestedItemsKey:G,enableNestedRow:y,rowTemplate:B}=x||{},[L,S]=e.useState(!1),{renderNestedRowConnectors:$,renderNestedRow:M,getNestedChildSpacing:P,hasNestedChildren:T}=d.useNestedRow({indentationLevels:v,indentationLevel:q,item:s,nestedItemsKey:G,rowTemplate:B,isRowExpanded:L,enableNestedRow:y,rowProps:{searchValue:p,headers:u,spacing:w,disableContextMenuColumn:C}}),V=[n.default.row],k=y?n.default[`border-${q}`]:n.default.border;c&&V.push(c),b?!L&&V.push(n.default["border-drawer"]):V.push(k),m&&V.push(n.default.loading);const z=e.Children.map(i,(n,a)=>{const l=y?P(w,a):w,o=y&&0===a?e.createElement(e.Fragment,null,T?e.createElement(t.IconButton,{id:E,title:D,"aria-expanded":L,onClick:()=>{S(!L)}},e.createElement(r.Icon,{size:"0.75rem",icon:L?r.Icons.ChevronUp:r.Icons.ChevronDown})):null,$()):null;if(n){const t=e.cloneElement(n,{searchValue:p,spacing:l,cellIndex:a,columnLength:null==u?void 0:u.length,disableContextMenuColumn:C,prefixElement:o});return(!(u&&u.length>a)||!u[a].hidden)&&t}return null});return e.createElement(e.Fragment,null,e.createElement("tr",{...I,ref:g,className:V.join(" ")},b&&e.createElement(a.DataGridCell,{className:n.default["expand-button-cell"],onClick:()=>{var e;null==(e=L?N:R)||e(s),S(!L)},style:{width:"1px",padding:"0"}},e.createElement(t.IconButton,{id:E,title:D,"aria-expanded":L,"aria-controls":j},e.createElement(r.Icon,{size:"0.75rem",icon:L?r.Icons.ChevronUp:r.Icons.ChevronDown}))),z),b&&e.createElement("tr",{className:`${n.default.row} ${L?n.default["border-drawer"]:""}`},e.createElement("td",{colSpan:z.length+1},e.createElement(l.DataGridDrawer,{id:j,role:"region","aria-labelledby":E,isExpanded:L},f))),y&&M())});exports.DataGridRow=s;
2
2
  //# sourceMappingURL=DataGridRow.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataGridRow.cjs.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentPropsWithRef, useState, Fragment, Ref, ReactElement } from \"react\";\nimport { HeaderCell } from \"../../datagrid.interfaces\";\nimport classes from \"./DataGridRow.module.scss\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { DataGridCell } from \"../DataGridCell/DataGridCell\";\nimport { DataGridDrawer } from \"../DataGridDrawer/DataGridDrawer\";\nimport { generateID } from \"../../../../util/helper\";\nimport { useNestedRow } from \"./useNestedRow\";\n\nexport interface Props<T> extends ComponentPropsWithRef<\"tr\"> {\n item?: T;\n headers?: HeaderCell[];\n isLoading?: boolean;\n spacing?: React.CSSProperties;\n searchValue?: string;\n disableContextMenuColumn?: boolean;\n nestedRowProps?: {\n rowTemplate?: ({ item, index }: { item: T; index: number }) => ReactElement;\n indentationLevel?: number;\n indentationLevels?: { level: number; isLastChild: boolean }[];\n enableNestedRow?: boolean;\n nestedItemsKey?: keyof T;\n };\n expandableRowProps?: {\n enableExpandableRow: boolean;\n expandableRowContent: React.ReactNode;\n expandButtonTitle?: string;\n expandButtonId?: string;\n drawerId?: string;\n onExpand?: (item: T | undefined) => void;\n onCollapse?: (item: T | undefined) => void;\n };\n}\n\nconst DataGridRowComponent = <T,>(\n {\n item,\n children,\n className,\n headers,\n searchValue,\n isLoading,\n spacing,\n expandableRowProps,\n disableContextMenuColumn,\n nestedRowProps,\n ...rest\n }: Props<T>,\n ref: Ref<HTMLTableRowElement>\n) => {\n const {\n enableExpandableRow = false,\n expandButtonId = `ID-${generateID()}`,\n expandButtonTitle = \"Expand row\",\n drawerId = `ID-${generateID()}`,\n expandableRowContent,\n onExpand,\n onCollapse\n } = expandableRowProps || {};\n const {\n indentationLevels,\n indentationLevel = 0,\n nestedItemsKey,\n enableNestedRow,\n rowTemplate\n } = nestedRowProps || {};\n const [isRowExpanded, setIsRowExpanded] = useState(false);\n const { renderNestedRowConnectors, renderNestedRow, getNestedChildSpacing, hasNestedChildren } =\n useNestedRow({\n indentationLevels,\n indentationLevel,\n item,\n nestedItemsKey,\n rowTemplate,\n isRowExpanded,\n enableNestedRow,\n rowProps: {\n searchValue,\n headers,\n spacing,\n disableContextMenuColumn\n }\n });\n\n const classNames = [classes[\"row\"]];\n const rowBorderClass = enableNestedRow\n ? classes[`border-${indentationLevel}`]\n : classes[`border`];\n\n className && classNames.push(className);\n enableExpandableRow\n ? !isRowExpanded && classNames.push(classes[\"border-drawer\"])\n : classNames.push(rowBorderClass);\n isLoading && classNames.push(classes[\"loading\"]);\n\n const getPrefixButton = (hasNestedChildren: boolean) =>\n hasNestedChildren ? (\n <IconButton\n id={expandButtonId}\n title={expandButtonTitle}\n aria-expanded={isRowExpanded}\n onClick={() => {\n setIsRowExpanded(!isRowExpanded);\n }}\n >\n <Icon size=\"0.75rem\" icon={isRowExpanded ? Icons.ChevronUp : Icons.ChevronDown} />\n </IconButton>\n ) : null;\n\n const visibleCells = React.Children.map(children as React.ReactElement[], (child, index) => {\n const childSpacing = enableNestedRow ? getNestedChildSpacing(spacing, index) : spacing;\n\n const prefixElement =\n enableNestedRow && index === 0 ? (\n <>\n {getPrefixButton(!!hasNestedChildren)}\n {renderNestedRowConnectors()}\n </>\n ) : null;\n\n if (child) {\n const cellWithSpacing = React.cloneElement(child, {\n searchValue,\n spacing: childSpacing,\n cellIndex: index,\n columnLength: headers?.length,\n disableContextMenuColumn,\n prefixElement\n });\n\n const visible = headers && headers.length > index ? !headers[index].hidden : true;\n return visible && cellWithSpacing;\n }\n return null;\n });\n\n return (\n <Fragment>\n <tr {...rest} ref={ref} className={classNames.join(\" \")}>\n {enableExpandableRow && (\n <DataGridCell\n className={classes[\"expand-button-cell\"]}\n onClick={() => {\n (isRowExpanded ? onCollapse : onExpand)?.(item);\n setIsRowExpanded(!isRowExpanded);\n }}\n style={{\n width: \"1px\"\n }}\n >\n <IconButton\n id={expandButtonId}\n title={expandButtonTitle}\n aria-expanded={isRowExpanded}\n aria-controls={drawerId}\n >\n <Icon size=\"0.75rem\" icon={isRowExpanded ? Icons.ChevronUp : Icons.ChevronDown} />\n </IconButton>\n </DataGridCell>\n )}\n {visibleCells}\n </tr>\n {enableExpandableRow && (\n <tr className={`${classes[\"row\"]} ${isRowExpanded ? classes[\"border-drawer\"] : \"\"}`}>\n <td colSpan={visibleCells.length + 1}>\n <DataGridDrawer\n id={drawerId}\n role=\"region\"\n aria-labelledby={expandButtonId}\n isExpanded={isRowExpanded}\n >\n {expandableRowContent}\n </DataGridDrawer>\n </td>\n </tr>\n )}\n {enableNestedRow && renderNestedRow()}\n </Fragment>\n );\n};\n\nexport const DataGridRow = React.forwardRef(DataGridRowComponent) as <T extends object>(\n p: Props<T> & { ref?: Ref<HTMLTableRowElement> }\n) => ReactElement;\n"],"names":["DataGridRow","React","forwardRef","item","children","className","headers","searchValue","isLoading","spacing","expandableRowProps","disableContextMenuColumn","nestedRowProps","rest","ref","enableExpandableRow","expandButtonId","generateID","expandButtonTitle","drawerId","expandableRowContent","onExpand","onCollapse","indentationLevels","indentationLevel","nestedItemsKey","enableNestedRow","rowTemplate","isRowExpanded","setIsRowExpanded","useState","renderNestedRowConnectors","renderNestedRow","getNestedChildSpacing","hasNestedChildren","useNestedRow","rowProps","classNames","classes","rowBorderClass","default","push","visibleCells","Children","map","child","index","childSpacing","prefixElement","createElement","Fragment","IconButton","id","title","onClick","Icon","size","icon","Icons","ChevronUp","ChevronDown","cellWithSpacing","cloneElement","cellIndex","columnLength","length","hidden","join","DataGridCell","_a","style","width","colSpan","DataGridDrawer","role","isExpanded"],"mappings":"kaAsMaA,EAAcC,EAAMC,YAnJJ,EAEzBC,OACAC,WACAC,YACAC,UACAC,cACAC,YACAC,UACAC,qBACAC,2BACAC,oBACGC,GAELC,KAEM,MAAAC,oBACJA,GAAsB,EAAAC,eACtBA,EAAiB,MAAMC,EAAAA,eAAYC,kBACnCA,EAAoB,aAAAC,SACpBA,EAAW,MAAMF,EAAAA,eAAYG,qBAC7BA,EAAAC,SACAA,EAAAC,WACAA,GACEZ,GAAsB,CAAC,GACrBa,kBACJA,EAAAC,iBACAA,EAAmB,EAAAC,eACnBA,EAAAC,gBACAA,EAAAC,YACAA,GACEf,GAAkB,CAAC,GAChBgB,EAAeC,GAAoBC,EAAAA,UAAS,IAC7CC,0BAAEA,EAA2BC,gBAAAA,EAAAC,sBAAiBA,oBAAuBC,GACzEC,EAAAA,aAAa,CACXZ,oBACAC,mBACArB,OACAsB,iBACAE,cACAC,gBACAF,kBACAU,SAAU,CACR7B,cACAD,UACAG,UACAE,8BAIA0B,EAAa,CAACC,UAAa,KAC3BC,EAAiBb,EACnBY,EAAQE,QAAA,UAAUhB,KAClBc,EAAAA,QAAgB,OAEPjC,GAAAgC,EAAWI,KAAKpC,GAEzBU,GAACa,GAAiBS,EAAWI,KAAKH,EAAAA,QAAQ,kBAC1CD,EAAWI,KAAKF,GACpB/B,GAAa6B,EAAWI,KAAKH,EAAQE,QAAS,SAExC,MAcAE,EAAezC,EAAM0C,SAASC,IAAIxC,GAAkC,CAACyC,EAAOC,KAChF,MAAMC,EAAerB,EAAkBO,EAAsBxB,EAASqC,GAASrC,EAEzEuC,EACJtB,GAA6B,IAAVoB,EAEd7C,EAAAgD,cAAAhD,EAAAiD,SAAA,KAAkBhB,EAlBvBjC,EAAAgD,cAACE,EAAAA,WAAA,CACCC,GAAIpC,EACJqC,MAAOnC,EACP,gBAAeU,EACf0B,QAAS,KACPzB,GAAkBD,EAAa,GAGjC3B,EAAAgD,cAACM,QAAKC,KAAK,UAAUC,KAAM7B,EAAgB8B,EAAAA,MAAMC,UAAYD,EAAAA,MAAME,eAEnE,KASG7B,KAED,KAEN,GAAIc,EAAO,CACH,MAAAgB,EAAkB5D,EAAM6D,aAAajB,EAAO,CAChDtC,cACAE,QAASsC,EACTgB,UAAWjB,EACXkB,aAAuB,MAAT1D,OAAS,EAAAA,EAAA2D,OACvBtD,2BACAqC,kBAIF,SADgB1C,GAAWA,EAAQ2D,OAASnB,KAASxC,EAAQwC,GAAOoB,SAClDL,CAAA,CAEb,OAAA,IAAA,IAGT,SACGZ,cAAAC,EAAAA,SAAA,KACEjD,EAAAgD,cAAA,KAAA,IAAOpC,EAAMC,MAAUT,UAAWgC,EAAW8B,KAAK,MAChDpD,GACCd,EAAAgD,cAACmB,EAAAA,aAAA,CACC/D,UAAWiC,UAAQ,sBACnBgB,QAAS,WACN,OAAAe,EAAAzC,EAAgBN,EAAaD,IAAYgD,EAAAlE,GAC1C0B,GAAkBD,EAAa,EAEjC0C,MAAO,CACLC,MAAO,QAGTtE,EAAAgD,cAACE,EAAAA,WAAA,CACCC,GAAIpC,EACJqC,MAAOnC,EACP,gBAAeU,EACf,gBAAeT,GAEflB,EAAAgD,cAACM,QAAKC,KAAK,UAAUC,KAAM7B,EAAgB8B,EAAAA,MAAMC,UAAYD,EAAAA,MAAME,gBAIxElB,GAEF3B,mBACE,KAAG,CAAAV,UAAW,GAAGiC,EAAAE,QAAa,OAAKZ,EAAgBU,EAAAA,QAAQ,iBAAmB,sBAC5E,KAAG,CAAAkC,QAAS9B,EAAauB,OAAS,GACjChE,EAAAgD,cAACwB,EAAAA,eAAA,CACCrB,GAAIjC,EACJuD,KAAK,SACL,kBAAiB1D,EACjB2D,WAAY/C,GAEXR,KAKRM,GAAmBM,IACtB"}
1
+ {"version":3,"file":"DataGridRow.cjs.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentPropsWithRef, useState, Fragment, Ref, ReactElement } from \"react\";\nimport { HeaderCell } from \"../../datagrid.interfaces\";\nimport classes from \"./DataGridRow.module.scss\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { DataGridCell } from \"../DataGridCell/DataGridCell\";\nimport { DataGridDrawer } from \"../DataGridDrawer/DataGridDrawer\";\nimport { generateID } from \"../../../../util/helper\";\nimport { useNestedRow } from \"./useNestedRow\";\n\nexport interface Props<T> extends ComponentPropsWithRef<\"tr\"> {\n item?: T;\n headers?: HeaderCell[];\n isLoading?: boolean;\n spacing?: React.CSSProperties;\n searchValue?: string;\n disableContextMenuColumn?: boolean;\n nestedRowProps?: {\n rowTemplate?: ({ item, index }: { item: T; index: number }) => ReactElement;\n indentationLevel?: number;\n indentationLevels?: { level: number; isLastChild: boolean }[];\n enableNestedRow?: boolean;\n nestedItemsKey?: keyof T;\n };\n expandableRowProps?: {\n enableExpandableRow: boolean;\n expandableRowContent: React.ReactNode;\n expandButtonTitle?: string;\n expandButtonId?: string;\n drawerId?: string;\n onExpand?: (item: T | undefined) => void;\n onCollapse?: (item: T | undefined) => void;\n };\n}\n\nconst DataGridRowComponent = <T,>(\n {\n item,\n children,\n className,\n headers,\n searchValue,\n isLoading,\n spacing,\n expandableRowProps,\n disableContextMenuColumn,\n nestedRowProps,\n ...rest\n }: Props<T>,\n ref: Ref<HTMLTableRowElement>\n) => {\n const {\n enableExpandableRow = false,\n expandButtonId = `ID-${generateID()}`,\n expandButtonTitle = \"Expand row\",\n drawerId = `ID-${generateID()}`,\n expandableRowContent,\n onExpand,\n onCollapse\n } = expandableRowProps || {};\n const {\n indentationLevels,\n indentationLevel = 0,\n nestedItemsKey,\n enableNestedRow,\n rowTemplate\n } = nestedRowProps || {};\n const [isRowExpanded, setIsRowExpanded] = useState(false);\n const { renderNestedRowConnectors, renderNestedRow, getNestedChildSpacing, hasNestedChildren } =\n useNestedRow({\n indentationLevels,\n indentationLevel,\n item,\n nestedItemsKey,\n rowTemplate,\n isRowExpanded,\n enableNestedRow,\n rowProps: {\n searchValue,\n headers,\n spacing,\n disableContextMenuColumn\n }\n });\n\n const classNames = [classes[\"row\"]];\n const rowBorderClass = enableNestedRow\n ? classes[`border-${indentationLevel}`]\n : classes[`border`];\n\n className && classNames.push(className);\n enableExpandableRow\n ? !isRowExpanded && classNames.push(classes[\"border-drawer\"])\n : classNames.push(rowBorderClass);\n isLoading && classNames.push(classes[\"loading\"]);\n\n const getPrefixButton = (hasNestedChildren: boolean) =>\n hasNestedChildren ? (\n <IconButton\n id={expandButtonId}\n title={expandButtonTitle}\n aria-expanded={isRowExpanded}\n onClick={() => {\n setIsRowExpanded(!isRowExpanded);\n }}\n >\n <Icon size=\"0.75rem\" icon={isRowExpanded ? Icons.ChevronUp : Icons.ChevronDown} />\n </IconButton>\n ) : null;\n\n const visibleCells = React.Children.map(children as React.ReactElement[], (child, index) => {\n const childSpacing = enableNestedRow ? getNestedChildSpacing(spacing, index) : spacing;\n\n const prefixElement =\n enableNestedRow && index === 0 ? (\n <>\n {getPrefixButton(!!hasNestedChildren)}\n {renderNestedRowConnectors()}\n </>\n ) : null;\n\n if (child) {\n const cellWithSpacing = React.cloneElement(child, {\n searchValue,\n spacing: childSpacing,\n cellIndex: index,\n columnLength: headers?.length,\n disableContextMenuColumn,\n prefixElement\n });\n\n const visible = headers && headers.length > index ? !headers[index].hidden : true;\n return visible && cellWithSpacing;\n }\n return null;\n });\n\n return (\n <Fragment>\n <tr {...rest} ref={ref} className={classNames.join(\" \")}>\n {enableExpandableRow && (\n <DataGridCell\n className={classes[\"expand-button-cell\"]}\n onClick={() => {\n (isRowExpanded ? onCollapse : onExpand)?.(item);\n setIsRowExpanded(!isRowExpanded);\n }}\n style={{\n width: \"1px\",\n padding: \"0\"\n }}\n >\n <IconButton\n id={expandButtonId}\n title={expandButtonTitle}\n aria-expanded={isRowExpanded}\n aria-controls={drawerId}\n >\n <Icon size=\"0.75rem\" icon={isRowExpanded ? Icons.ChevronUp : Icons.ChevronDown} />\n </IconButton>\n </DataGridCell>\n )}\n {visibleCells}\n </tr>\n {enableExpandableRow && (\n <tr className={`${classes[\"row\"]} ${isRowExpanded ? classes[\"border-drawer\"] : \"\"}`}>\n <td colSpan={visibleCells.length + 1}>\n <DataGridDrawer\n id={drawerId}\n role=\"region\"\n aria-labelledby={expandButtonId}\n isExpanded={isRowExpanded}\n >\n {expandableRowContent}\n </DataGridDrawer>\n </td>\n </tr>\n )}\n {enableNestedRow && renderNestedRow()}\n </Fragment>\n );\n};\n\nexport const DataGridRow = React.forwardRef(DataGridRowComponent) as <T extends object>(\n p: Props<T> & { ref?: Ref<HTMLTableRowElement> }\n) => ReactElement;\n"],"names":["DataGridRow","React","forwardRef","item","children","className","headers","searchValue","isLoading","spacing","expandableRowProps","disableContextMenuColumn","nestedRowProps","rest","ref","enableExpandableRow","expandButtonId","generateID","expandButtonTitle","drawerId","expandableRowContent","onExpand","onCollapse","indentationLevels","indentationLevel","nestedItemsKey","enableNestedRow","rowTemplate","isRowExpanded","setIsRowExpanded","useState","renderNestedRowConnectors","renderNestedRow","getNestedChildSpacing","hasNestedChildren","useNestedRow","rowProps","classNames","classes","rowBorderClass","push","visibleCells","Children","map","child","index","childSpacing","prefixElement","createElement","Fragment","IconButton","id","title","onClick","Icon","size","icon","Icons","ChevronUp","ChevronDown","cellWithSpacing","cloneElement","cellIndex","columnLength","length","hidden","join","DataGridCell","_a","style","width","padding","colSpan","DataGridDrawer","role","isExpanded"],"mappings":"kaAuMaA,EAAcC,EAAMC,WApJJ,EAEzBC,OACAC,WACAC,YACAC,UACAC,cACAC,YACAC,UACAC,qBACAC,2BACAC,oBACGC,GAELC,KAEA,MAAMC,oBACJA,GAAsB,EAAAC,eACtBA,EAAiB,MAAMC,EAAAA,eAAYC,kBACnCA,EAAoB,aAAAC,SACpBA,EAAW,MAAMF,EAAAA,eAAYG,qBAC7BA,EAAAC,SACAA,EAAAC,WACAA,GACEZ,GAAsB,CAAA,GACpBa,kBACJA,EAAAC,iBACAA,EAAmB,EAAAC,eACnBA,EAAAC,gBACAA,EAAAC,YACAA,GACEf,GAAkB,CAAA,GACfgB,EAAeC,GAAoBC,EAAAA,UAAS,IAC7CC,0BAAEA,EAAAC,gBAA2BA,EAAAC,sBAAiBA,oBAAuBC,GACzEC,EAAAA,aAAa,CACXZ,oBACAC,mBACArB,OACAsB,iBACAE,cACAC,gBACAF,kBACAU,SAAU,CACR7B,cACAD,UACAG,UACAE,8BAIA0B,EAAa,CAACC,UAAa,KAC3BC,EAAiBb,EACnBY,EAAAA,QAAQ,UAAUd,KAClBc,EAAAA,QAAgB,OAEpBjC,GAAagC,EAAWG,KAAKnC,GAC7BU,GACKa,GAAiBS,EAAWG,KAAKF,EAAAA,QAAQ,kBAC1CD,EAAWG,KAAKD,GACpB/B,GAAa6B,EAAWG,KAAKF,EAAAA,QAAiB,SAE9C,MAcMG,EAAexC,EAAMyC,SAASC,IAAIvC,EAAkC,CAACwC,EAAOC,KAChF,MAAMC,EAAepB,EAAkBO,EAAsBxB,EAASoC,GAASpC,EAEzEsC,EACJrB,GAA6B,IAAVmB,EACjB5C,EAAA+C,cAAA/C,EAAAgD,SAAA,KACqBf,EAlBvBjC,EAAA+C,cAACE,EAAAA,WAAA,CACCC,GAAInC,EACJoC,MAAOlC,EACP,gBAAeU,EACfyB,QAAS,KACPxB,GAAkBD,KAGpB3B,EAAA+C,cAACM,QAAKC,KAAK,UAAUC,KAAM5B,EAAgB6B,EAAAA,MAAMC,UAAYD,EAAAA,MAAME,eAEnE,KASG5B,KAED,KAEN,GAAIa,EAAO,CACT,MAAMgB,EAAkB3D,EAAM4D,aAAajB,EAAO,CAChDrC,cACAE,QAASqC,EACTgB,UAAWjB,EACXkB,aAAc,MAAAzD,OAAA,EAAAA,EAAS0D,OACvBrD,2BACAoC,kBAIF,SADgBzC,GAAWA,EAAQ0D,OAASnB,KAASvC,EAAQuC,GAAOoB,SAClDL,CACpB,CACA,OAAO,OAGT,SACEZ,cAACC,EAAAA,SAAA,KACChD,EAAA+C,cAAC,KAAA,IAAOnC,EAAMC,MAAUT,UAAWgC,EAAW6B,KAAK,MAChDnD,GACCd,EAAA+C,cAACmB,EAAAA,aAAA,CACC9D,UAAWiC,EAAAA,QAAQ,sBACnBe,QAAS,WACN,OAAAe,EAAAxC,EAAgBN,EAAaD,IAA7B+C,EAAyCjE,GAC1C0B,GAAkBD,IAEpByC,MAAO,CACLC,MAAO,MACPC,QAAS,MAGXtE,EAAA+C,cAACE,EAAAA,WAAA,CACCC,GAAInC,EACJoC,MAAOlC,EACP,gBAAeU,EACf,gBAAeT,GAEflB,EAAA+C,cAACM,QAAKC,KAAK,UAAUC,KAAM5B,EAAgB6B,EAAAA,MAAMC,UAAYD,EAAAA,MAAME,gBAIxElB,GAEF1B,mBACE,KAAA,CAAGV,UAAW,GAAGiC,EAAAA,QAAa,OAAKV,EAAgBU,EAAAA,QAAQ,iBAAmB,sBAC5E,KAAA,CAAGkC,QAAS/B,EAAauB,OAAS,GACjC/D,EAAA+C,cAACyB,EAAAA,eAAA,CACCtB,GAAIhC,EACJuD,KAAK,SACL,kBAAiB1D,EACjB2D,WAAY/C,GAEXR,KAKRM,GAAmBM"}
@@ -95,7 +95,8 @@ const DataGridRowComponent = ({
95
95
  setIsRowExpanded(!isRowExpanded);
96
96
  },
97
97
  style: {
98
- width: "1px"
98
+ width: "1px",
99
+ padding: "0"
99
100
  }
100
101
  },
101
102
  /* @__PURE__ */ React.createElement(
@@ -1 +1 @@
1
- {"version":3,"file":"DataGridRow.es.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentPropsWithRef, useState, Fragment, Ref, ReactElement } from \"react\";\nimport { HeaderCell } from \"../../datagrid.interfaces\";\nimport classes from \"./DataGridRow.module.scss\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { DataGridCell } from \"../DataGridCell/DataGridCell\";\nimport { DataGridDrawer } from \"../DataGridDrawer/DataGridDrawer\";\nimport { generateID } from \"../../../../util/helper\";\nimport { useNestedRow } from \"./useNestedRow\";\n\nexport interface Props<T> extends ComponentPropsWithRef<\"tr\"> {\n item?: T;\n headers?: HeaderCell[];\n isLoading?: boolean;\n spacing?: React.CSSProperties;\n searchValue?: string;\n disableContextMenuColumn?: boolean;\n nestedRowProps?: {\n rowTemplate?: ({ item, index }: { item: T; index: number }) => ReactElement;\n indentationLevel?: number;\n indentationLevels?: { level: number; isLastChild: boolean }[];\n enableNestedRow?: boolean;\n nestedItemsKey?: keyof T;\n };\n expandableRowProps?: {\n enableExpandableRow: boolean;\n expandableRowContent: React.ReactNode;\n expandButtonTitle?: string;\n expandButtonId?: string;\n drawerId?: string;\n onExpand?: (item: T | undefined) => void;\n onCollapse?: (item: T | undefined) => void;\n };\n}\n\nconst DataGridRowComponent = <T,>(\n {\n item,\n children,\n className,\n headers,\n searchValue,\n isLoading,\n spacing,\n expandableRowProps,\n disableContextMenuColumn,\n nestedRowProps,\n ...rest\n }: Props<T>,\n ref: Ref<HTMLTableRowElement>\n) => {\n const {\n enableExpandableRow = false,\n expandButtonId = `ID-${generateID()}`,\n expandButtonTitle = \"Expand row\",\n drawerId = `ID-${generateID()}`,\n expandableRowContent,\n onExpand,\n onCollapse\n } = expandableRowProps || {};\n const {\n indentationLevels,\n indentationLevel = 0,\n nestedItemsKey,\n enableNestedRow,\n rowTemplate\n } = nestedRowProps || {};\n const [isRowExpanded, setIsRowExpanded] = useState(false);\n const { renderNestedRowConnectors, renderNestedRow, getNestedChildSpacing, hasNestedChildren } =\n useNestedRow({\n indentationLevels,\n indentationLevel,\n item,\n nestedItemsKey,\n rowTemplate,\n isRowExpanded,\n enableNestedRow,\n rowProps: {\n searchValue,\n headers,\n spacing,\n disableContextMenuColumn\n }\n });\n\n const classNames = [classes[\"row\"]];\n const rowBorderClass = enableNestedRow\n ? classes[`border-${indentationLevel}`]\n : classes[`border`];\n\n className && classNames.push(className);\n enableExpandableRow\n ? !isRowExpanded && classNames.push(classes[\"border-drawer\"])\n : classNames.push(rowBorderClass);\n isLoading && classNames.push(classes[\"loading\"]);\n\n const getPrefixButton = (hasNestedChildren: boolean) =>\n hasNestedChildren ? (\n <IconButton\n id={expandButtonId}\n title={expandButtonTitle}\n aria-expanded={isRowExpanded}\n onClick={() => {\n setIsRowExpanded(!isRowExpanded);\n }}\n >\n <Icon size=\"0.75rem\" icon={isRowExpanded ? Icons.ChevronUp : Icons.ChevronDown} />\n </IconButton>\n ) : null;\n\n const visibleCells = React.Children.map(children as React.ReactElement[], (child, index) => {\n const childSpacing = enableNestedRow ? getNestedChildSpacing(spacing, index) : spacing;\n\n const prefixElement =\n enableNestedRow && index === 0 ? (\n <>\n {getPrefixButton(!!hasNestedChildren)}\n {renderNestedRowConnectors()}\n </>\n ) : null;\n\n if (child) {\n const cellWithSpacing = React.cloneElement(child, {\n searchValue,\n spacing: childSpacing,\n cellIndex: index,\n columnLength: headers?.length,\n disableContextMenuColumn,\n prefixElement\n });\n\n const visible = headers && headers.length > index ? !headers[index].hidden : true;\n return visible && cellWithSpacing;\n }\n return null;\n });\n\n return (\n <Fragment>\n <tr {...rest} ref={ref} className={classNames.join(\" \")}>\n {enableExpandableRow && (\n <DataGridCell\n className={classes[\"expand-button-cell\"]}\n onClick={() => {\n (isRowExpanded ? onCollapse : onExpand)?.(item);\n setIsRowExpanded(!isRowExpanded);\n }}\n style={{\n width: \"1px\"\n }}\n >\n <IconButton\n id={expandButtonId}\n title={expandButtonTitle}\n aria-expanded={isRowExpanded}\n aria-controls={drawerId}\n >\n <Icon size=\"0.75rem\" icon={isRowExpanded ? Icons.ChevronUp : Icons.ChevronDown} />\n </IconButton>\n </DataGridCell>\n )}\n {visibleCells}\n </tr>\n {enableExpandableRow && (\n <tr className={`${classes[\"row\"]} ${isRowExpanded ? classes[\"border-drawer\"] : \"\"}`}>\n <td colSpan={visibleCells.length + 1}>\n <DataGridDrawer\n id={drawerId}\n role=\"region\"\n aria-labelledby={expandButtonId}\n isExpanded={isRowExpanded}\n >\n {expandableRowContent}\n </DataGridDrawer>\n </td>\n </tr>\n )}\n {enableNestedRow && renderNestedRow()}\n </Fragment>\n );\n};\n\nexport const DataGridRow = React.forwardRef(DataGridRowComponent) as <T extends object>(\n p: Props<T> & { ref?: Ref<HTMLTableRowElement> }\n) => ReactElement;\n"],"names":["hasNestedChildren"],"mappings":";;;;;;;;AAmDA,MAAM,uBAAuB,CAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,QACG;AACG,QAAA;AAAA,IACJ,sBAAsB;AAAA,IACtB,iBAAiB,MAAM,WAAA,CAAY;AAAA,IACnC,oBAAoB;AAAA,IACpB,WAAW,MAAM,WAAA,CAAY;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,sBAAsB,CAAC;AACrB,QAAA;AAAA,IACJ;AAAA,IACA,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,kBAAkB,CAAC;AACvB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAS,KAAK;AACxD,QAAM,EAAE,2BAA2B,iBAAiB,uBAAuB,kBAAA,IACzE,aAAa;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF,CACD;AAEH,QAAM,aAAa,CAAC,QAAQ,KAAK,CAAC;AAC5B,QAAA,iBAAiB,kBACnB,QAAQ,UAAU,gBAAgB,EAAE,IACpC,QAAQ,QAAQ;AAEP,eAAA,WAAW,KAAK,SAAS;AAElC,wBAAA,CAAC,iBAAiB,WAAW,KAAK,QAAQ,eAAe,CAAC,IAC1D,WAAW,KAAK,cAAc;AAClC,eAAa,WAAW,KAAK,QAAQ,SAAS,CAAC;AAEzC,QAAA,kBAAkB,CAACA,uBACvBA,qBACE,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,iBAAe;AAAA,MACf,SAAS,MAAM;AACb,yBAAiB,CAAC,aAAa;AAAA,MAAA;AAAA,IACjC;AAAA,IAEA,sBAAA,cAAC,QAAK,MAAK,WAAU,MAAM,gBAAgB,MAAM,YAAY,MAAM,YAAa,CAAA;AAAA,EAAA,IAEhF;AAEN,QAAM,eAAe,MAAM,SAAS,IAAI,UAAkC,CAAC,OAAO,UAAU;AAC1F,UAAM,eAAe,kBAAkB,sBAAsB,SAAS,KAAK,IAAI;AAE/E,UAAM,gBACJ,mBAAmB,UAAU,IAExB,sBAAA,cAAA,MAAA,UAAA,MAAA,gBAAgB,CAAC,CAAC,iBAAiB,GACnC,0BACH,CAAA,IACE;AAEN,QAAI,OAAO;AACH,YAAA,kBAAkB,MAAM,aAAa,OAAO;AAAA,QAChD;AAAA,QACA,SAAS;AAAA,QACT,WAAW;AAAA,QACX,cAAc,mCAAS;AAAA,QACvB;AAAA,QACA;AAAA,MAAA,CACD;AAEK,YAAA,UAAU,WAAW,QAAQ,SAAS,QAAQ,CAAC,QAAQ,KAAK,EAAE,SAAS;AAC7E,aAAO,WAAW;AAAA,IAAA;AAEb,WAAA;AAAA,EAAA,CACR;AAED,SACG,sBAAA,cAAA,UAAA,MACE,sBAAA,cAAA,MAAA,EAAI,GAAG,MAAM,KAAU,WAAW,WAAW,KAAK,GAAG,KACnD,uBACC,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,QAAQ,oBAAoB;AAAA,MACvC,SAAS,MAAM;;AACZ,SAAA,qBAAgB,aAAa,aAA7B,mBAAyC;AAC1C,yBAAiB,CAAC,aAAa;AAAA,MACjC;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEA,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,iBAAe;AAAA,QACf,iBAAe;AAAA,MAAA;AAAA,MAEf,sBAAA,cAAC,QAAK,MAAK,WAAU,MAAM,gBAAgB,MAAM,YAAY,MAAM,YAAa,CAAA;AAAA,IAAA;AAAA,EAEpF,GAED,YACH,GACC,2DACE,MAAG,EAAA,WAAW,GAAG,QAAQ,KAAK,CAAC,IAAI,gBAAgB,QAAQ,eAAe,IAAI,EAAE,0CAC9E,MAAG,EAAA,SAAS,aAAa,SAAS,EACjC,GAAA,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,MACJ,MAAK;AAAA,MACL,mBAAiB;AAAA,MACjB,YAAY;AAAA,IAAA;AAAA,IAEX;AAAA,EAAA,CAEL,CACF,GAED,mBAAmB,iBACtB;AAEJ;AAEa,MAAA,cAAc,MAAM,WAAW,oBAAoB;"}
1
+ {"version":3,"file":"DataGridRow.es.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentPropsWithRef, useState, Fragment, Ref, ReactElement } from \"react\";\nimport { HeaderCell } from \"../../datagrid.interfaces\";\nimport classes from \"./DataGridRow.module.scss\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { DataGridCell } from \"../DataGridCell/DataGridCell\";\nimport { DataGridDrawer } from \"../DataGridDrawer/DataGridDrawer\";\nimport { generateID } from \"../../../../util/helper\";\nimport { useNestedRow } from \"./useNestedRow\";\n\nexport interface Props<T> extends ComponentPropsWithRef<\"tr\"> {\n item?: T;\n headers?: HeaderCell[];\n isLoading?: boolean;\n spacing?: React.CSSProperties;\n searchValue?: string;\n disableContextMenuColumn?: boolean;\n nestedRowProps?: {\n rowTemplate?: ({ item, index }: { item: T; index: number }) => ReactElement;\n indentationLevel?: number;\n indentationLevels?: { level: number; isLastChild: boolean }[];\n enableNestedRow?: boolean;\n nestedItemsKey?: keyof T;\n };\n expandableRowProps?: {\n enableExpandableRow: boolean;\n expandableRowContent: React.ReactNode;\n expandButtonTitle?: string;\n expandButtonId?: string;\n drawerId?: string;\n onExpand?: (item: T | undefined) => void;\n onCollapse?: (item: T | undefined) => void;\n };\n}\n\nconst DataGridRowComponent = <T,>(\n {\n item,\n children,\n className,\n headers,\n searchValue,\n isLoading,\n spacing,\n expandableRowProps,\n disableContextMenuColumn,\n nestedRowProps,\n ...rest\n }: Props<T>,\n ref: Ref<HTMLTableRowElement>\n) => {\n const {\n enableExpandableRow = false,\n expandButtonId = `ID-${generateID()}`,\n expandButtonTitle = \"Expand row\",\n drawerId = `ID-${generateID()}`,\n expandableRowContent,\n onExpand,\n onCollapse\n } = expandableRowProps || {};\n const {\n indentationLevels,\n indentationLevel = 0,\n nestedItemsKey,\n enableNestedRow,\n rowTemplate\n } = nestedRowProps || {};\n const [isRowExpanded, setIsRowExpanded] = useState(false);\n const { renderNestedRowConnectors, renderNestedRow, getNestedChildSpacing, hasNestedChildren } =\n useNestedRow({\n indentationLevels,\n indentationLevel,\n item,\n nestedItemsKey,\n rowTemplate,\n isRowExpanded,\n enableNestedRow,\n rowProps: {\n searchValue,\n headers,\n spacing,\n disableContextMenuColumn\n }\n });\n\n const classNames = [classes[\"row\"]];\n const rowBorderClass = enableNestedRow\n ? classes[`border-${indentationLevel}`]\n : classes[`border`];\n\n className && classNames.push(className);\n enableExpandableRow\n ? !isRowExpanded && classNames.push(classes[\"border-drawer\"])\n : classNames.push(rowBorderClass);\n isLoading && classNames.push(classes[\"loading\"]);\n\n const getPrefixButton = (hasNestedChildren: boolean) =>\n hasNestedChildren ? (\n <IconButton\n id={expandButtonId}\n title={expandButtonTitle}\n aria-expanded={isRowExpanded}\n onClick={() => {\n setIsRowExpanded(!isRowExpanded);\n }}\n >\n <Icon size=\"0.75rem\" icon={isRowExpanded ? Icons.ChevronUp : Icons.ChevronDown} />\n </IconButton>\n ) : null;\n\n const visibleCells = React.Children.map(children as React.ReactElement[], (child, index) => {\n const childSpacing = enableNestedRow ? getNestedChildSpacing(spacing, index) : spacing;\n\n const prefixElement =\n enableNestedRow && index === 0 ? (\n <>\n {getPrefixButton(!!hasNestedChildren)}\n {renderNestedRowConnectors()}\n </>\n ) : null;\n\n if (child) {\n const cellWithSpacing = React.cloneElement(child, {\n searchValue,\n spacing: childSpacing,\n cellIndex: index,\n columnLength: headers?.length,\n disableContextMenuColumn,\n prefixElement\n });\n\n const visible = headers && headers.length > index ? !headers[index].hidden : true;\n return visible && cellWithSpacing;\n }\n return null;\n });\n\n return (\n <Fragment>\n <tr {...rest} ref={ref} className={classNames.join(\" \")}>\n {enableExpandableRow && (\n <DataGridCell\n className={classes[\"expand-button-cell\"]}\n onClick={() => {\n (isRowExpanded ? onCollapse : onExpand)?.(item);\n setIsRowExpanded(!isRowExpanded);\n }}\n style={{\n width: \"1px\",\n padding: \"0\"\n }}\n >\n <IconButton\n id={expandButtonId}\n title={expandButtonTitle}\n aria-expanded={isRowExpanded}\n aria-controls={drawerId}\n >\n <Icon size=\"0.75rem\" icon={isRowExpanded ? Icons.ChevronUp : Icons.ChevronDown} />\n </IconButton>\n </DataGridCell>\n )}\n {visibleCells}\n </tr>\n {enableExpandableRow && (\n <tr className={`${classes[\"row\"]} ${isRowExpanded ? classes[\"border-drawer\"] : \"\"}`}>\n <td colSpan={visibleCells.length + 1}>\n <DataGridDrawer\n id={drawerId}\n role=\"region\"\n aria-labelledby={expandButtonId}\n isExpanded={isRowExpanded}\n >\n {expandableRowContent}\n </DataGridDrawer>\n </td>\n </tr>\n )}\n {enableNestedRow && renderNestedRow()}\n </Fragment>\n );\n};\n\nexport const DataGridRow = React.forwardRef(DataGridRowComponent) as <T extends object>(\n p: Props<T> & { ref?: Ref<HTMLTableRowElement> }\n) => ReactElement;\n"],"names":["hasNestedChildren"],"mappings":";;;;;;;;AAmDA,MAAM,uBAAuB,CAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,QACG;AACH,QAAM;AAAA,IACJ,sBAAsB;AAAA,IACtB,iBAAiB,MAAM,WAAA,CAAY;AAAA,IACnC,oBAAoB;AAAA,IACpB,WAAW,MAAM,WAAA,CAAY;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,sBAAsB,CAAA;AAC1B,QAAM;AAAA,IACJ;AAAA,IACA,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,kBAAkB,CAAA;AACtB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAS,KAAK;AACxD,QAAM,EAAE,2BAA2B,iBAAiB,uBAAuB,kBAAA,IACzE,aAAa;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF,CACD;AAEH,QAAM,aAAa,CAAC,QAAQ,KAAK,CAAC;AAClC,QAAM,iBAAiB,kBACnB,QAAQ,UAAU,gBAAgB,EAAE,IACpC,QAAQ,QAAQ;AAEpB,eAAa,WAAW,KAAK,SAAS;AACtC,wBACI,CAAC,iBAAiB,WAAW,KAAK,QAAQ,eAAe,CAAC,IAC1D,WAAW,KAAK,cAAc;AAClC,eAAa,WAAW,KAAK,QAAQ,SAAS,CAAC;AAE/C,QAAM,kBAAkB,CAACA,uBACvBA,qBACE,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,iBAAe;AAAA,MACf,SAAS,MAAM;AACb,yBAAiB,CAAC,aAAa;AAAA,MACjC;AAAA,IAAA;AAAA,IAEA,sBAAA,cAAC,QAAK,MAAK,WAAU,MAAM,gBAAgB,MAAM,YAAY,MAAM,YAAA,CAAa;AAAA,EAAA,IAEhF;AAEN,QAAM,eAAe,MAAM,SAAS,IAAI,UAAkC,CAAC,OAAO,UAAU;AAC1F,UAAM,eAAe,kBAAkB,sBAAsB,SAAS,KAAK,IAAI;AAE/E,UAAM,gBACJ,mBAAmB,UAAU,IAC3B,sBAAA,cAAA,MAAA,UAAA,MACG,gBAAgB,CAAC,CAAC,iBAAiB,GACnC,0BAAA,CACH,IACE;AAEN,QAAI,OAAO;AACT,YAAM,kBAAkB,MAAM,aAAa,OAAO;AAAA,QAChD;AAAA,QACA,SAAS;AAAA,QACT,WAAW;AAAA,QACX,cAAc,mCAAS;AAAA,QACvB;AAAA,QACA;AAAA,MAAA,CACD;AAED,YAAM,UAAU,WAAW,QAAQ,SAAS,QAAQ,CAAC,QAAQ,KAAK,EAAE,SAAS;AAC7E,aAAO,WAAW;AAAA,IACpB;AACA,WAAO;AAAA,EACT,CAAC;AAED,SACE,sBAAA,cAAC,UAAA,MACC,sBAAA,cAAC,MAAA,EAAI,GAAG,MAAM,KAAU,WAAW,WAAW,KAAK,GAAG,KACnD,uBACC,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,QAAQ,oBAAoB;AAAA,MACvC,SAAS,MAAM;;AACb,SAAC,qBAAgB,aAAa,aAA7B,mBAAyC;AAC1C,yBAAiB,CAAC,aAAa;AAAA,MACjC;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,QACP,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEA,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,iBAAe;AAAA,QACf,iBAAe;AAAA,MAAA;AAAA,MAEf,sBAAA,cAAC,QAAK,MAAK,WAAU,MAAM,gBAAgB,MAAM,YAAY,MAAM,YAAA,CAAa;AAAA,IAAA;AAAA,EAClF,GAGH,YACH,GACC,2DACE,MAAA,EAAG,WAAW,GAAG,QAAQ,KAAK,CAAC,IAAI,gBAAgB,QAAQ,eAAe,IAAI,EAAE,0CAC9E,MAAA,EAAG,SAAS,aAAa,SAAS,EAAA,GACjC,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,MACJ,MAAK;AAAA,MACL,mBAAiB;AAAA,MACjB,YAAY;AAAA,IAAA;AAAA,IAEX;AAAA,EAAA,CAEL,CACF,GAED,mBAAmB,iBACtB;AAEJ;AAEO,MAAM,cAAc,MAAM,WAAW,oBAAoB;"}
@@ -1,3 +1,3 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.DataGridRow_row_7l1Pc{position:relative;background-color:var(--data-grid-row-background-color)}.DataGridRow_row_7l1Pc:not(.DataGridRow_loading_7l1Pc):hover{background-color:var(--data-grid-row-hover-background-color)}.DataGridRow_row_7l1Pc.DataGridRow_border-0_7l1Pc:after{content:"";position:absolute;width:calc(100% - 3.0625rem);left:3.0625rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-1_7l1Pc:after{content:"";position:absolute;width:calc(100% - 7.1875rem);left:7.1875rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-2_7l1Pc:after{content:"";position:absolute;width:calc(100% - 11.3125rem);left:11.3125rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-3_7l1Pc:after{content:"";position:absolute;width:calc(100% - 15.4375rem);left:15.4375rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-4_7l1Pc:after{content:"";position:absolute;width:calc(100% - 19.5625rem);left:19.5625rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-5_7l1Pc:after{content:"";position:absolute;width:calc(100% - 23.6875rem);left:23.6875rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-6_7l1Pc:after{content:"";position:absolute;width:calc(100% - 27.8125rem);left:27.8125rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border_7l1Pc:after{content:"";position:absolute;width:100%;left:0;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-drawer_7l1Pc:not(:nth-last-child(2)):after{content:"";position:absolute;width:100%;left:0;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_expand-button-cell_7l1Pc{padding:0}.DataGridRow_connector_7l1Pc{position:absolute;top:0;left:0;width:2.875rem;height:calc(3.25 * var(--font-size))}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-0_7l1Pc{left:0rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-1_7l1Pc{left:4.125rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-2_7l1Pc{left:8.25rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-3_7l1Pc{left:12.375rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-4_7l1Pc{left:16.5rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-5_7l1Pc{left:20.625rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-6_7l1Pc{left:24.75rem}.DataGridRow_connector_7l1Pc.DataGridRow_vertical_7l1Pc:before{position:absolute;content:"";left:50%;height:100%;width:.0625rem;background-color:var(--color-blue-grey200)}.DataGridRow_connector_7l1Pc.DataGridRow_t-shape_7l1Pc:before{position:absolute;content:"";left:50%;height:calc(3.25 * var(--font-size));width:.0625rem;background-color:var(--color-blue-grey200)}.DataGridRow_connector_7l1Pc.DataGridRow_t-shape_7l1Pc:after{position:absolute;content:"";top:50%;left:50%;height:.0625rem;width:100%;background-color:var(--color-blue-grey200)}.DataGridRow_connector_7l1Pc.DataGridRow_line_7l1Pc:before{position:absolute;content:"";left:50%;height:50%;width:1px;background-color:var(--color-blue-grey200)}.DataGridRow_connector_7l1Pc.DataGridRow_line_7l1Pc:after{position:absolute;content:"";top:50%;left:50%;height:1px;width:100%;background-color:var(--color-blue-grey200)}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r="DataGridRow_row_7l1Pc",e="DataGridRow_loading_7l1Pc",o="DataGridRow_border_7l1Pc",t="DataGridRow_connector_7l1Pc",a="DataGridRow_vertical_7l1Pc",l="DataGridRow_line_7l1Pc",d={row:r,loading:e,"border-0":"DataGridRow_border-0_7l1Pc","border-1":"DataGridRow_border-1_7l1Pc","border-2":"DataGridRow_border-2_7l1Pc","border-3":"DataGridRow_border-3_7l1Pc","border-4":"DataGridRow_border-4_7l1Pc","border-5":"DataGridRow_border-5_7l1Pc","border-6":"DataGridRow_border-6_7l1Pc",border:o,"border-drawer":"DataGridRow_border-drawer_7l1Pc","expand-button-cell":"DataGridRow_expand-button-cell_7l1Pc",connector:t,"offset-left-0":"DataGridRow_offset-left-0_7l1Pc","offset-left-1":"DataGridRow_offset-left-1_7l1Pc","offset-left-2":"DataGridRow_offset-left-2_7l1Pc","offset-left-3":"DataGridRow_offset-left-3_7l1Pc","offset-left-4":"DataGridRow_offset-left-4_7l1Pc","offset-left-5":"DataGridRow_offset-left-5_7l1Pc","offset-left-6":"DataGridRow_offset-left-6_7l1Pc",vertical:a,"t-shape":"DataGridRow_t-shape_7l1Pc",line:l};exports.border=o,exports.connector=t,exports.default=d,exports.line=l,exports.loading=e,exports.row=r,exports.vertical=a;
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.DataGridRow_row_SI2V3{position:relative;background-color:var(--data-grid-row-background-color)}.DataGridRow_row_SI2V3:not(.DataGridRow_loading_SI2V3):hover{background-color:var(--data-grid-row-hover-background-color)}.DataGridRow_row_SI2V3.DataGridRow_border-0_SI2V3:after{content:"";position:absolute;width:calc(100% - 3.0625rem);left:3.0625rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-1_SI2V3:after{content:"";position:absolute;width:calc(100% - 7.1875rem);left:7.1875rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-2_SI2V3:after{content:"";position:absolute;width:calc(100% - 11.3125rem);left:11.3125rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-3_SI2V3:after{content:"";position:absolute;width:calc(100% - 15.4375rem);left:15.4375rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-4_SI2V3:after{content:"";position:absolute;width:calc(100% - 19.5625rem);left:19.5625rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-5_SI2V3:after{content:"";position:absolute;width:calc(100% - 23.6875rem);left:23.6875rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-6_SI2V3:after{content:"";position:absolute;width:calc(100% - 27.8125rem);left:27.8125rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border_SI2V3:after{content:"";position:absolute;width:100%;left:0;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-drawer_SI2V3:after{content:"";position:absolute;width:100%;left:0;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_expand-button-cell_SI2V3{padding:0}.DataGridRow_connector_SI2V3{position:absolute;top:0;left:0;width:2.875rem;height:calc(3.25 * var(--font-size))}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-0_SI2V3{left:0rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-1_SI2V3{left:4.125rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-2_SI2V3{left:8.25rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-3_SI2V3{left:12.375rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-4_SI2V3{left:16.5rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-5_SI2V3{left:20.625rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-6_SI2V3{left:24.75rem}.DataGridRow_connector_SI2V3.DataGridRow_vertical_SI2V3:before{position:absolute;content:"";left:50%;height:100%;width:.0625rem;background-color:var(--color-blue-grey200)}.DataGridRow_connector_SI2V3.DataGridRow_t-shape_SI2V3:before{position:absolute;content:"";left:50%;height:calc(3.25 * var(--font-size));width:.0625rem;background-color:var(--color-blue-grey200)}.DataGridRow_connector_SI2V3.DataGridRow_t-shape_SI2V3:after{position:absolute;content:"";top:50%;left:50%;height:.0625rem;width:100%;background-color:var(--color-blue-grey200)}.DataGridRow_connector_SI2V3.DataGridRow_line_SI2V3:before{position:absolute;content:"";left:50%;height:50%;width:1px;background-color:var(--color-blue-grey200)}.DataGridRow_connector_SI2V3.DataGridRow_line_SI2V3:after{position:absolute;content:"";top:50%;left:50%;height:1px;width:100%;background-color:var(--color-blue-grey200)}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r="DataGridRow_row_SI2V3",e="DataGridRow_loading_SI2V3",o="DataGridRow_border_SI2V3",t="DataGridRow_connector_SI2V3",a="DataGridRow_vertical_SI2V3",d="DataGridRow_line_SI2V3",_={row:r,loading:e,"border-0":"DataGridRow_border-0_SI2V3","border-1":"DataGridRow_border-1_SI2V3","border-2":"DataGridRow_border-2_SI2V3","border-3":"DataGridRow_border-3_SI2V3","border-4":"DataGridRow_border-4_SI2V3","border-5":"DataGridRow_border-5_SI2V3","border-6":"DataGridRow_border-6_SI2V3",border:o,"border-drawer":"DataGridRow_border-drawer_SI2V3","expand-button-cell":"DataGridRow_expand-button-cell_SI2V3",connector:t,"offset-left-0":"DataGridRow_offset-left-0_SI2V3","offset-left-1":"DataGridRow_offset-left-1_SI2V3","offset-left-2":"DataGridRow_offset-left-2_SI2V3","offset-left-3":"DataGridRow_offset-left-3_SI2V3","offset-left-4":"DataGridRow_offset-left-4_SI2V3","offset-left-5":"DataGridRow_offset-left-5_SI2V3","offset-left-6":"DataGridRow_offset-left-6_SI2V3",vertical:a,"t-shape":"DataGridRow_t-shape_SI2V3",line:d};exports.border=o,exports.connector=t,exports.default=_,exports.line=d,exports.loading=e,exports.row=r,exports.vertical=a;
3
3
  //# sourceMappingURL=DataGridRow.module.scss.cjs.js.map
@@ -1,33 +1,33 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.DataGridRow_row_7l1Pc{position:relative;background-color:var(--data-grid-row-background-color)}.DataGridRow_row_7l1Pc:not(.DataGridRow_loading_7l1Pc):hover{background-color:var(--data-grid-row-hover-background-color)}.DataGridRow_row_7l1Pc.DataGridRow_border-0_7l1Pc:after{content:"";position:absolute;width:calc(100% - 3.0625rem);left:3.0625rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-1_7l1Pc:after{content:"";position:absolute;width:calc(100% - 7.1875rem);left:7.1875rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-2_7l1Pc:after{content:"";position:absolute;width:calc(100% - 11.3125rem);left:11.3125rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-3_7l1Pc:after{content:"";position:absolute;width:calc(100% - 15.4375rem);left:15.4375rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-4_7l1Pc:after{content:"";position:absolute;width:calc(100% - 19.5625rem);left:19.5625rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-5_7l1Pc:after{content:"";position:absolute;width:calc(100% - 23.6875rem);left:23.6875rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-6_7l1Pc:after{content:"";position:absolute;width:calc(100% - 27.8125rem);left:27.8125rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border_7l1Pc:after{content:"";position:absolute;width:100%;left:0;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_7l1Pc.DataGridRow_border-drawer_7l1Pc:not(:nth-last-child(2)):after{content:"";position:absolute;width:100%;left:0;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_expand-button-cell_7l1Pc{padding:0}.DataGridRow_connector_7l1Pc{position:absolute;top:0;left:0;width:2.875rem;height:calc(3.25 * var(--font-size))}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-0_7l1Pc{left:0rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-1_7l1Pc{left:4.125rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-2_7l1Pc{left:8.25rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-3_7l1Pc{left:12.375rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-4_7l1Pc{left:16.5rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-5_7l1Pc{left:20.625rem}.DataGridRow_connector_7l1Pc.DataGridRow_offset-left-6_7l1Pc{left:24.75rem}.DataGridRow_connector_7l1Pc.DataGridRow_vertical_7l1Pc:before{position:absolute;content:"";left:50%;height:100%;width:.0625rem;background-color:var(--color-blue-grey200)}.DataGridRow_connector_7l1Pc.DataGridRow_t-shape_7l1Pc:before{position:absolute;content:"";left:50%;height:calc(3.25 * var(--font-size));width:.0625rem;background-color:var(--color-blue-grey200)}.DataGridRow_connector_7l1Pc.DataGridRow_t-shape_7l1Pc:after{position:absolute;content:"";top:50%;left:50%;height:.0625rem;width:100%;background-color:var(--color-blue-grey200)}.DataGridRow_connector_7l1Pc.DataGridRow_line_7l1Pc:before{position:absolute;content:"";left:50%;height:50%;width:1px;background-color:var(--color-blue-grey200)}.DataGridRow_connector_7l1Pc.DataGridRow_line_7l1Pc:after{position:absolute;content:"";top:50%;left:50%;height:1px;width:100%;background-color:var(--color-blue-grey200)}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
- const row = "DataGridRow_row_7l1Pc";
3
- const loading = "DataGridRow_loading_7l1Pc";
4
- const border = "DataGridRow_border_7l1Pc";
5
- const connector = "DataGridRow_connector_7l1Pc";
6
- const vertical = "DataGridRow_vertical_7l1Pc";
7
- const line = "DataGridRow_line_7l1Pc";
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.DataGridRow_row_SI2V3{position:relative;background-color:var(--data-grid-row-background-color)}.DataGridRow_row_SI2V3:not(.DataGridRow_loading_SI2V3):hover{background-color:var(--data-grid-row-hover-background-color)}.DataGridRow_row_SI2V3.DataGridRow_border-0_SI2V3:after{content:"";position:absolute;width:calc(100% - 3.0625rem);left:3.0625rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-1_SI2V3:after{content:"";position:absolute;width:calc(100% - 7.1875rem);left:7.1875rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-2_SI2V3:after{content:"";position:absolute;width:calc(100% - 11.3125rem);left:11.3125rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-3_SI2V3:after{content:"";position:absolute;width:calc(100% - 15.4375rem);left:15.4375rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-4_SI2V3:after{content:"";position:absolute;width:calc(100% - 19.5625rem);left:19.5625rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-5_SI2V3:after{content:"";position:absolute;width:calc(100% - 23.6875rem);left:23.6875rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-6_SI2V3:after{content:"";position:absolute;width:calc(100% - 27.8125rem);left:27.8125rem;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border_SI2V3:after{content:"";position:absolute;width:100%;left:0;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_row_SI2V3.DataGridRow_border-drawer_SI2V3:after{content:"";position:absolute;width:100%;left:0;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridRow_expand-button-cell_SI2V3{padding:0}.DataGridRow_connector_SI2V3{position:absolute;top:0;left:0;width:2.875rem;height:calc(3.25 * var(--font-size))}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-0_SI2V3{left:0rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-1_SI2V3{left:4.125rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-2_SI2V3{left:8.25rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-3_SI2V3{left:12.375rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-4_SI2V3{left:16.5rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-5_SI2V3{left:20.625rem}.DataGridRow_connector_SI2V3.DataGridRow_offset-left-6_SI2V3{left:24.75rem}.DataGridRow_connector_SI2V3.DataGridRow_vertical_SI2V3:before{position:absolute;content:"";left:50%;height:100%;width:.0625rem;background-color:var(--color-blue-grey200)}.DataGridRow_connector_SI2V3.DataGridRow_t-shape_SI2V3:before{position:absolute;content:"";left:50%;height:calc(3.25 * var(--font-size));width:.0625rem;background-color:var(--color-blue-grey200)}.DataGridRow_connector_SI2V3.DataGridRow_t-shape_SI2V3:after{position:absolute;content:"";top:50%;left:50%;height:.0625rem;width:100%;background-color:var(--color-blue-grey200)}.DataGridRow_connector_SI2V3.DataGridRow_line_SI2V3:before{position:absolute;content:"";left:50%;height:50%;width:1px;background-color:var(--color-blue-grey200)}.DataGridRow_connector_SI2V3.DataGridRow_line_SI2V3:after{position:absolute;content:"";top:50%;left:50%;height:1px;width:100%;background-color:var(--color-blue-grey200)}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
+ const row = "DataGridRow_row_SI2V3";
3
+ const loading = "DataGridRow_loading_SI2V3";
4
+ const border = "DataGridRow_border_SI2V3";
5
+ const connector = "DataGridRow_connector_SI2V3";
6
+ const vertical = "DataGridRow_vertical_SI2V3";
7
+ const line = "DataGridRow_line_SI2V3";
8
8
  const classes = {
9
9
  row,
10
10
  loading,
11
- "border-0": "DataGridRow_border-0_7l1Pc",
12
- "border-1": "DataGridRow_border-1_7l1Pc",
13
- "border-2": "DataGridRow_border-2_7l1Pc",
14
- "border-3": "DataGridRow_border-3_7l1Pc",
15
- "border-4": "DataGridRow_border-4_7l1Pc",
16
- "border-5": "DataGridRow_border-5_7l1Pc",
17
- "border-6": "DataGridRow_border-6_7l1Pc",
11
+ "border-0": "DataGridRow_border-0_SI2V3",
12
+ "border-1": "DataGridRow_border-1_SI2V3",
13
+ "border-2": "DataGridRow_border-2_SI2V3",
14
+ "border-3": "DataGridRow_border-3_SI2V3",
15
+ "border-4": "DataGridRow_border-4_SI2V3",
16
+ "border-5": "DataGridRow_border-5_SI2V3",
17
+ "border-6": "DataGridRow_border-6_SI2V3",
18
18
  border,
19
- "border-drawer": "DataGridRow_border-drawer_7l1Pc",
20
- "expand-button-cell": "DataGridRow_expand-button-cell_7l1Pc",
19
+ "border-drawer": "DataGridRow_border-drawer_SI2V3",
20
+ "expand-button-cell": "DataGridRow_expand-button-cell_SI2V3",
21
21
  connector,
22
- "offset-left-0": "DataGridRow_offset-left-0_7l1Pc",
23
- "offset-left-1": "DataGridRow_offset-left-1_7l1Pc",
24
- "offset-left-2": "DataGridRow_offset-left-2_7l1Pc",
25
- "offset-left-3": "DataGridRow_offset-left-3_7l1Pc",
26
- "offset-left-4": "DataGridRow_offset-left-4_7l1Pc",
27
- "offset-left-5": "DataGridRow_offset-left-5_7l1Pc",
28
- "offset-left-6": "DataGridRow_offset-left-6_7l1Pc",
22
+ "offset-left-0": "DataGridRow_offset-left-0_SI2V3",
23
+ "offset-left-1": "DataGridRow_offset-left-1_SI2V3",
24
+ "offset-left-2": "DataGridRow_offset-left-2_SI2V3",
25
+ "offset-left-3": "DataGridRow_offset-left-3_SI2V3",
26
+ "offset-left-4": "DataGridRow_offset-left-4_SI2V3",
27
+ "offset-left-5": "DataGridRow_offset-left-5_SI2V3",
28
+ "offset-left-6": "DataGridRow_offset-left-6_SI2V3",
29
29
  vertical,
30
- "t-shape": "DataGridRow_t-shape_7l1Pc",
30
+ "t-shape": "DataGridRow_t-shape_SI2V3",
31
31
  line
32
32
  };
33
33
  export {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./DataGridRow.module.scss.cjs.js");exports.useNestedRow=({indentationLevels:n,item:s,nestedItemsKey:a,rowTemplate:d,isRowExpanded:o,indentationLevel:l,enableNestedRow:r,rowProps:{searchValue:i,headers:c,spacing:u,disableContextMenuColumn:m}})=>{const p=s&&a&&s[a];return{renderNestedRow:()=>{if(d&&s&&a&&s[a]&&o){const t=s[a],o=e=>({level:l+1,isLastChild:e+1===t.length});return t.map(((s,p)=>e.cloneElement(d({item:s,index:p}),{searchValue:i,headers:c,spacing:u,disableContextMenuColumn:m,item:s,nestedRowProps:{rowTemplate:d,enableNestedRow:r,nestedItemsKey:a,indentationLevel:l+1,indentationLevels:n&&t?[...n,o(p)]:[o(p)]}})))}},renderNestedRowConnectors:()=>n?n.map((({level:s,isLastChild:a})=>((n,s,a)=>{const d=t.default["offset-left-"+(n-1)];if(n===a){const a=s?"line":"t-shape";return e.createElement("div",{key:n,"data-testid":"dataGridRowConnector",className:`${t.default.connector} ${t.default[a]} ${d}`})}return s?null:e.createElement("div",{key:n,"data-testid":"dataGridRowConnector",className:`${t.default.connector} ${t.default.vertical} ${d}`})})(s,a,n.length))):null,getNestedChildSpacing:(e,t)=>{const n=`${l?""+((p?0:46)+68*l):0!==l||p?4:50}px`;return e?{...e,paddingLeft:0===t?n:e.paddingLeft}:{paddingLeft:0===t?n:""}},hasNestedChildren:p}};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./DataGridRow.module.scss.cjs.js");exports.useNestedRow=({indentationLevels:n,item:s,nestedItemsKey:a,rowTemplate:d,isRowExpanded:o,indentationLevel:l,enableNestedRow:r,rowProps:{searchValue:i,headers:c,spacing:u,disableContextMenuColumn:m}})=>{const p=s&&a&&s[a];return{renderNestedRow:()=>{if(d&&s&&a&&s[a]&&o){const t=s[a],o=e=>({level:l+1,isLastChild:e+1===t.length});return t.map((s,p)=>e.cloneElement(d({item:s,index:p}),{searchValue:i,headers:c,spacing:u,disableContextMenuColumn:m,item:s,nestedRowProps:{rowTemplate:d,enableNestedRow:r,nestedItemsKey:a,indentationLevel:l+1,indentationLevels:n&&t?[...n,o(p)]:[o(p)]}}))}},renderNestedRowConnectors:()=>n?n.map(({level:s,isLastChild:a})=>((n,s,a)=>{const d=t.default["offset-left-"+(n-1)];if(n===a){const a=s?"line":"t-shape";return e.createElement("div",{key:n,"data-testid":"dataGridRowConnector",className:`${t.default.connector} ${t.default[a]} ${d}`})}return s?null:e.createElement("div",{key:n,"data-testid":"dataGridRowConnector",className:`${t.default.connector} ${t.default.vertical} ${d}`})})(s,a,n.length)):null,getNestedChildSpacing:(e,t)=>{const n=`${l?""+((p?0:46)+68*l):0!==l||p?4:50}px`;return e?{...e,paddingLeft:0===t?n:e.paddingLeft}:{paddingLeft:0===t?n:""}},hasNestedChildren:p}};
2
2
  //# sourceMappingURL=useNestedRow.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useNestedRow.cjs.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ReactElement } from \"react\";\nimport classes from \"./DataGridRow.module.scss\";\nimport { HeaderCell } from \"../../datagrid.interfaces\";\n\nexport interface UseNestedRowProps<T> {\n indentationLevels?: { level: number; isLastChild: boolean }[];\n item?: T;\n nestedItemsKey?: keyof T;\n rowTemplate?: ({ item, index }: { item: T; index: number }) => ReactElement;\n isRowExpanded?: boolean;\n indentationLevel: number;\n enableNestedRow?: boolean;\n rowProps: {\n searchValue?: string;\n headers?: HeaderCell[];\n spacing?: React.CSSProperties;\n disableContextMenuColumn?: boolean;\n };\n}\n\nexport const useNestedRow = <T,>({\n indentationLevels,\n item,\n nestedItemsKey,\n rowTemplate,\n isRowExpanded,\n indentationLevel,\n enableNestedRow,\n rowProps: { searchValue, headers, spacing, disableContextMenuColumn }\n}: UseNestedRowProps<T>) => {\n const hasNestedChildren = item && nestedItemsKey && item[nestedItemsKey];\n\n const getNestedChildSpacing = (spacing: React.CSSProperties | undefined, index: number) => {\n const expandButtonWidth = 46;\n const nestedChildOffset = !hasNestedChildren ? expandButtonWidth : 0;\n\n const connectorWidth = 68;\n const nestedChildIndentation = `${nestedChildOffset + indentationLevel * connectorWidth}`;\n\n const gap = 4;\n const notIndentedWithNoChildrenOffset =\n indentationLevel === 0 && !hasNestedChildren ? expandButtonWidth + gap : gap;\n const childIndentation = `${indentationLevel ? nestedChildIndentation : notIndentedWithNoChildrenOffset}px`;\n\n if (spacing) {\n return {\n ...spacing,\n paddingLeft: index === 0 ? childIndentation : spacing.paddingLeft\n };\n }\n return {\n paddingLeft: index === 0 ? childIndentation : \"\"\n };\n };\n\n const renderNestedRowConnectors = () => {\n if (indentationLevels) {\n return indentationLevels.map(({ level, isLastChild }) =>\n renderNestedRowConnector(level, isLastChild, indentationLevels.length)\n );\n }\n\n return null;\n };\n\n const renderNestedRowConnector = (level: number, isLastChild: boolean, levelsLength: number) => {\n const offsetLeftClass = classes[`offset-left-${level - 1}`];\n\n if (level === levelsLength) {\n const variant = isLastChild ? \"line\" : \"t-shape\";\n\n return (\n <div\n key={level}\n data-testid=\"dataGridRowConnector\"\n className={`${classes[\"connector\"]} ${classes[variant]} ${offsetLeftClass}`}\n />\n );\n } else if (!isLastChild) {\n return (\n <div\n key={level}\n data-testid=\"dataGridRowConnector\"\n className={`${classes[\"connector\"]} ${classes[\"vertical\"]} ${offsetLeftClass}`}\n />\n );\n }\n return null;\n };\n\n const renderNestedRow = () => {\n if (rowTemplate && item && nestedItemsKey && item[nestedItemsKey] && isRowExpanded) {\n const nestedItemsArray: T[] = item[nestedItemsKey] as T[];\n const getIndentationLevel = (index: number) => ({\n level: indentationLevel + 1,\n isLastChild: index + 1 === nestedItemsArray.length\n });\n\n return nestedItemsArray.map((item, index) => {\n return React.cloneElement(rowTemplate({ item, index }), {\n searchValue,\n headers,\n spacing,\n disableContextMenuColumn,\n item,\n nestedRowProps: {\n rowTemplate,\n enableNestedRow,\n nestedItemsKey,\n indentationLevel: indentationLevel + 1,\n indentationLevels:\n indentationLevels && nestedItemsArray\n ? [...indentationLevels, getIndentationLevel(index)]\n : [getIndentationLevel(index)]\n }\n });\n });\n }\n };\n\n return {\n renderNestedRow,\n renderNestedRowConnectors,\n getNestedChildSpacing,\n hasNestedChildren\n };\n};\n"],"names":["indentationLevels","item","nestedItemsKey","rowTemplate","isRowExpanded","indentationLevel","enableNestedRow","rowProps","searchValue","headers","spacing","disableContextMenuColumn","hasNestedChildren","renderNestedRow","nestedItemsArray","getIndentationLevel","index","level","isLastChild","length","map","React","cloneElement","nestedRowProps","renderNestedRowConnectors","levelsLength","offsetLeftClass","classes","variant","createElement","key","className","default","renderNestedRowConnector","getNestedChildSpacing","childIndentation","expandButtonWidth","paddingLeft"],"mappings":"4KAoC4B,EAC1BA,oBACAC,OACAC,iBACAC,cACAC,gBACAC,mBACAC,kBACAC,UAAYC,cAAaC,UAASC,UAASC,gCAE3C,MAAMC,EAAoBX,GAAQC,GAAkBD,EAAKC,GA0FlD,MAAA,CACLW,gBA/BsB,KACtB,GAAIV,GAAeF,GAAQC,GAAkBD,EAAKC,IAAmBE,EAAe,CAC5E,MAAAU,EAAwBb,EAAKC,GAC7Ba,EAAuBC,IAAmB,CAC9CC,MAAOZ,EAAmB,EAC1Ba,YAAaF,EAAQ,IAAMF,EAAiBK,SAG9C,OAAOL,EAAiBM,KAAI,CAACnB,EAAMe,IAC1BK,EAAMC,aAAanB,EAAY,CAAEF,KAAAA,EAAMe,UAAU,CACtDR,cACAC,UACAC,UACAC,2BACAV,KAAAA,EACAsB,eAAgB,CACdpB,cACAG,kBACAJ,iBACAG,iBAAkBA,EAAmB,EACrCL,kBACEA,GAAqBc,EACjB,IAAId,EAAmBe,EAAoBC,IAC3C,CAACD,EAAoBC,QAGhC,GAMHQ,0BAnEgC,IAC5BxB,EACKA,EAAkBoB,KAAI,EAAGH,QAAOC,iBAQV,EAACD,EAAeC,EAAsBO,KACrE,MAAMC,EAAkBC,EAAAA,QAAQ,gBAAeV,EAAQ,IAEvD,GAAIA,IAAUQ,EAAc,CACpB,MAAAG,EAAUV,EAAc,OAAS,UAGrC,OAAAG,EAAAQ,cAAC,MAAA,CACCC,IAAKb,EACL,cAAY,uBACZc,UAAW,GAAGJ,EAAAK,QAAmB,aAAKL,EAAAA,QAAQC,MAAYF,KAC5D,CAAA,OAEQR,EASL,KAPHG,EAAAQ,cAAC,MAAA,CACCC,IAAKb,EACL,cAAY,uBACZc,UAAW,GAAGJ,EAAAK,QAAmB,aAAKL,EAAAA,QAAkB,aAAMD,KAI7D,EA7BHO,CAAyBhB,EAAOC,EAAalB,EAAkBmB,UAI5D,KA6DPe,sBA3F4B,CAACxB,EAA0CM,KACvE,MASMmB,EAAmB,GAAG9B,EALG,KAHJO,EAAwC,EADzC,IAGH,GAC+BP,GAI/B,IAArBA,GAA2BO,EAFjB,EAEqCwB,OAGjD,OAAI1B,EACK,IACFA,EACH2B,YAAuB,IAAVrB,EAAcmB,EAAmBzB,EAAQ2B,aAGnD,CACLA,YAAuB,IAAVrB,EAAcmB,EAAmB,GAChD,EAwEAvB,oBACF"}
1
+ {"version":3,"file":"useNestedRow.cjs.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ReactElement } from \"react\";\nimport classes from \"./DataGridRow.module.scss\";\nimport { HeaderCell } from \"../../datagrid.interfaces\";\n\nexport interface UseNestedRowProps<T> {\n indentationLevels?: { level: number; isLastChild: boolean }[];\n item?: T;\n nestedItemsKey?: keyof T;\n rowTemplate?: ({ item, index }: { item: T; index: number }) => ReactElement;\n isRowExpanded?: boolean;\n indentationLevel: number;\n enableNestedRow?: boolean;\n rowProps: {\n searchValue?: string;\n headers?: HeaderCell[];\n spacing?: React.CSSProperties;\n disableContextMenuColumn?: boolean;\n };\n}\n\nexport const useNestedRow = <T,>({\n indentationLevels,\n item,\n nestedItemsKey,\n rowTemplate,\n isRowExpanded,\n indentationLevel,\n enableNestedRow,\n rowProps: { searchValue, headers, spacing, disableContextMenuColumn }\n}: UseNestedRowProps<T>) => {\n const hasNestedChildren = item && nestedItemsKey && item[nestedItemsKey];\n\n const getNestedChildSpacing = (spacing: React.CSSProperties | undefined, index: number) => {\n const expandButtonWidth = 46;\n const nestedChildOffset = !hasNestedChildren ? expandButtonWidth : 0;\n\n const connectorWidth = 68;\n const nestedChildIndentation = `${nestedChildOffset + indentationLevel * connectorWidth}`;\n\n const gap = 4;\n const notIndentedWithNoChildrenOffset =\n indentationLevel === 0 && !hasNestedChildren ? expandButtonWidth + gap : gap;\n const childIndentation = `${indentationLevel ? nestedChildIndentation : notIndentedWithNoChildrenOffset}px`;\n\n if (spacing) {\n return {\n ...spacing,\n paddingLeft: index === 0 ? childIndentation : spacing.paddingLeft\n };\n }\n return {\n paddingLeft: index === 0 ? childIndentation : \"\"\n };\n };\n\n const renderNestedRowConnectors = () => {\n if (indentationLevels) {\n return indentationLevels.map(({ level, isLastChild }) =>\n renderNestedRowConnector(level, isLastChild, indentationLevels.length)\n );\n }\n\n return null;\n };\n\n const renderNestedRowConnector = (level: number, isLastChild: boolean, levelsLength: number) => {\n const offsetLeftClass = classes[`offset-left-${level - 1}`];\n\n if (level === levelsLength) {\n const variant = isLastChild ? \"line\" : \"t-shape\";\n\n return (\n <div\n key={level}\n data-testid=\"dataGridRowConnector\"\n className={`${classes[\"connector\"]} ${classes[variant]} ${offsetLeftClass}`}\n />\n );\n } else if (!isLastChild) {\n return (\n <div\n key={level}\n data-testid=\"dataGridRowConnector\"\n className={`${classes[\"connector\"]} ${classes[\"vertical\"]} ${offsetLeftClass}`}\n />\n );\n }\n return null;\n };\n\n const renderNestedRow = () => {\n if (rowTemplate && item && nestedItemsKey && item[nestedItemsKey] && isRowExpanded) {\n const nestedItemsArray: T[] = item[nestedItemsKey] as T[];\n const getIndentationLevel = (index: number) => ({\n level: indentationLevel + 1,\n isLastChild: index + 1 === nestedItemsArray.length\n });\n\n return nestedItemsArray.map((item, index) => {\n return React.cloneElement(rowTemplate({ item, index }), {\n searchValue,\n headers,\n spacing,\n disableContextMenuColumn,\n item,\n nestedRowProps: {\n rowTemplate,\n enableNestedRow,\n nestedItemsKey,\n indentationLevel: indentationLevel + 1,\n indentationLevels:\n indentationLevels && nestedItemsArray\n ? [...indentationLevels, getIndentationLevel(index)]\n : [getIndentationLevel(index)]\n }\n });\n });\n }\n };\n\n return {\n renderNestedRow,\n renderNestedRowConnectors,\n getNestedChildSpacing,\n hasNestedChildren\n };\n};\n"],"names":["indentationLevels","item","nestedItemsKey","rowTemplate","isRowExpanded","indentationLevel","enableNestedRow","rowProps","searchValue","headers","spacing","disableContextMenuColumn","hasNestedChildren","renderNestedRow","nestedItemsArray","getIndentationLevel","index","level","isLastChild","length","map","React","cloneElement","nestedRowProps","renderNestedRowConnectors","levelsLength","offsetLeftClass","classes","variant","createElement","key","className","renderNestedRowConnector","getNestedChildSpacing","childIndentation","expandButtonWidth","paddingLeft"],"mappings":"4KAoC4B,EAC1BA,oBACAC,OACAC,iBACAC,cACAC,gBACAC,mBACAC,kBACAC,UAAYC,cAAaC,UAASC,UAASC,gCAE3C,MAAMC,EAAoBX,GAAQC,GAAkBD,EAAKC,GA0FzD,MAAO,CACLW,gBA/BsB,KACtB,GAAIV,GAAeF,GAAQC,GAAkBD,EAAKC,IAAmBE,EAAe,CAClF,MAAMU,EAAwBb,EAAKC,GAC7Ba,EAAuBC,IAAA,CAC3BC,MAAOZ,EAAmB,EAC1Ba,YAAaF,EAAQ,IAAMF,EAAiBK,SAG9C,OAAOL,EAAiBM,IAAI,CAACnB,EAAMe,IAC1BK,EAAMC,aAAanB,EAAY,CAAEF,KAAAA,EAAMe,UAAU,CACtDR,cACAC,UACAC,UACAC,2BACAV,KAAAA,EACAsB,eAAgB,CACdpB,cACAG,kBACAJ,iBACAG,iBAAkBA,EAAmB,EACrCL,kBACEA,GAAqBc,EACjB,IAAId,EAAmBe,EAAoBC,IAC3C,CAACD,EAAoBC,OAInC,GAKAQ,0BAnEgC,IAC5BxB,EACKA,EAAkBoB,IAAI,EAAGH,QAAOC,iBAQV,EAACD,EAAeC,EAAsBO,KACrE,MAAMC,EAAkBC,EAAAA,QAAQ,gBAAeV,EAAQ,IAEvD,GAAIA,IAAUQ,EAAc,CAC1B,MAAMG,EAAUV,EAAc,OAAS,UAEvC,OACEG,EAAAQ,cAAC,MAAA,CACCC,IAAKb,EACL,cAAY,uBACZc,UAAW,GAAGJ,EAAAA,QAAmB,aAAKA,EAAAA,QAAQC,MAAYF,KAGhE,CAAA,OAAYR,EASL,KAPHG,EAAAQ,cAAC,MAAA,CACCC,IAAKb,EACL,cAAY,uBACZc,UAAW,GAAGJ,EAAAA,QAAmB,aAAKA,EAAAA,QAAkB,aAAMD,OAzBhEM,CAAyBf,EAAOC,EAAalB,EAAkBmB,SAI5D,KA6DPc,sBA3F4B,CAACvB,EAA0CM,KACvE,MASMkB,EAAmB,GAAG7B,EALG,KAHJO,EAAwC,EADzC,IAGH,GAC+BP,GAI/B,IAArBA,GAA2BO,EAFjB,EAEqCuB,OAGjD,OAAIzB,EACK,IACFA,EACH0B,YAAuB,IAAVpB,EAAckB,EAAmBxB,EAAQ0B,aAGnD,CACLA,YAAuB,IAAVpB,EAAckB,EAAmB,KAyEhDtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"useNestedRow.es.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ReactElement } from \"react\";\nimport classes from \"./DataGridRow.module.scss\";\nimport { HeaderCell } from \"../../datagrid.interfaces\";\n\nexport interface UseNestedRowProps<T> {\n indentationLevels?: { level: number; isLastChild: boolean }[];\n item?: T;\n nestedItemsKey?: keyof T;\n rowTemplate?: ({ item, index }: { item: T; index: number }) => ReactElement;\n isRowExpanded?: boolean;\n indentationLevel: number;\n enableNestedRow?: boolean;\n rowProps: {\n searchValue?: string;\n headers?: HeaderCell[];\n spacing?: React.CSSProperties;\n disableContextMenuColumn?: boolean;\n };\n}\n\nexport const useNestedRow = <T,>({\n indentationLevels,\n item,\n nestedItemsKey,\n rowTemplate,\n isRowExpanded,\n indentationLevel,\n enableNestedRow,\n rowProps: { searchValue, headers, spacing, disableContextMenuColumn }\n}: UseNestedRowProps<T>) => {\n const hasNestedChildren = item && nestedItemsKey && item[nestedItemsKey];\n\n const getNestedChildSpacing = (spacing: React.CSSProperties | undefined, index: number) => {\n const expandButtonWidth = 46;\n const nestedChildOffset = !hasNestedChildren ? expandButtonWidth : 0;\n\n const connectorWidth = 68;\n const nestedChildIndentation = `${nestedChildOffset + indentationLevel * connectorWidth}`;\n\n const gap = 4;\n const notIndentedWithNoChildrenOffset =\n indentationLevel === 0 && !hasNestedChildren ? expandButtonWidth + gap : gap;\n const childIndentation = `${indentationLevel ? nestedChildIndentation : notIndentedWithNoChildrenOffset}px`;\n\n if (spacing) {\n return {\n ...spacing,\n paddingLeft: index === 0 ? childIndentation : spacing.paddingLeft\n };\n }\n return {\n paddingLeft: index === 0 ? childIndentation : \"\"\n };\n };\n\n const renderNestedRowConnectors = () => {\n if (indentationLevels) {\n return indentationLevels.map(({ level, isLastChild }) =>\n renderNestedRowConnector(level, isLastChild, indentationLevels.length)\n );\n }\n\n return null;\n };\n\n const renderNestedRowConnector = (level: number, isLastChild: boolean, levelsLength: number) => {\n const offsetLeftClass = classes[`offset-left-${level - 1}`];\n\n if (level === levelsLength) {\n const variant = isLastChild ? \"line\" : \"t-shape\";\n\n return (\n <div\n key={level}\n data-testid=\"dataGridRowConnector\"\n className={`${classes[\"connector\"]} ${classes[variant]} ${offsetLeftClass}`}\n />\n );\n } else if (!isLastChild) {\n return (\n <div\n key={level}\n data-testid=\"dataGridRowConnector\"\n className={`${classes[\"connector\"]} ${classes[\"vertical\"]} ${offsetLeftClass}`}\n />\n );\n }\n return null;\n };\n\n const renderNestedRow = () => {\n if (rowTemplate && item && nestedItemsKey && item[nestedItemsKey] && isRowExpanded) {\n const nestedItemsArray: T[] = item[nestedItemsKey] as T[];\n const getIndentationLevel = (index: number) => ({\n level: indentationLevel + 1,\n isLastChild: index + 1 === nestedItemsArray.length\n });\n\n return nestedItemsArray.map((item, index) => {\n return React.cloneElement(rowTemplate({ item, index }), {\n searchValue,\n headers,\n spacing,\n disableContextMenuColumn,\n item,\n nestedRowProps: {\n rowTemplate,\n enableNestedRow,\n nestedItemsKey,\n indentationLevel: indentationLevel + 1,\n indentationLevels:\n indentationLevels && nestedItemsArray\n ? [...indentationLevels, getIndentationLevel(index)]\n : [getIndentationLevel(index)]\n }\n });\n });\n }\n };\n\n return {\n renderNestedRow,\n renderNestedRowConnectors,\n getNestedChildSpacing,\n hasNestedChildren\n };\n};\n"],"names":["spacing","item"],"mappings":";;AAoCO,MAAM,eAAe,CAAK;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU,EAAE,aAAa,SAAS,SAAS,yBAAyB;AACtE,MAA4B;AAC1B,QAAM,oBAAoB,QAAQ,kBAAkB,KAAK,cAAc;AAEjE,QAAA,wBAAwB,CAACA,UAA0C,UAAkB;AACzF,UAAM,oBAAoB;AACpB,UAAA,oBAAoB,CAAC,oBAAoB,oBAAoB;AAEnE,UAAM,iBAAiB;AACvB,UAAM,yBAAyB,GAAG,oBAAoB,mBAAmB,cAAc;AAEvF,UAAM,MAAM;AACZ,UAAM,kCACJ,qBAAqB,KAAK,CAAC,oBAAoB,oBAAoB,MAAM;AAC3E,UAAM,mBAAmB,GAAG,mBAAmB,yBAAyB,+BAA+B;AAEvG,QAAIA,UAAS;AACJ,aAAA;AAAA,QACL,GAAGA;AAAAA,QACH,aAAa,UAAU,IAAI,mBAAmBA,SAAQ;AAAA,MACxD;AAAA,IAAA;AAEK,WAAA;AAAA,MACL,aAAa,UAAU,IAAI,mBAAmB;AAAA,IAChD;AAAA,EACF;AAEA,QAAM,4BAA4B,MAAM;AACtC,QAAI,mBAAmB;AACrB,aAAO,kBAAkB;AAAA,QAAI,CAAC,EAAE,OAAO,kBACrC,yBAAyB,OAAO,aAAa,kBAAkB,MAAM;AAAA,MACvE;AAAA,IAAA;AAGK,WAAA;AAAA,EACT;AAEA,QAAM,2BAA2B,CAAC,OAAe,aAAsB,iBAAyB;AAC9F,UAAM,kBAAkB,QAAQ,eAAe,QAAQ,CAAC,EAAE;AAE1D,QAAI,UAAU,cAAc;AACpB,YAAA,UAAU,cAAc,SAAS;AAGrC,aAAA,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAK;AAAA,UACL,eAAY;AAAA,UACZ,WAAW,GAAG,QAAQ,WAAW,CAAC,IAAI,QAAQ,OAAO,CAAC,IAAI,eAAe;AAAA,QAAA;AAAA,MAC3E;AAAA,IAAA,WAEO,CAAC,aAAa;AAErB,aAAA,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAK;AAAA,UACL,eAAY;AAAA,UACZ,WAAW,GAAG,QAAQ,WAAW,CAAC,IAAI,QAAQ,UAAU,CAAC,KAAK,eAAe;AAAA,QAAA;AAAA,MAC/E;AAAA,IAAA;AAGG,WAAA;AAAA,EACT;AAEA,QAAM,kBAAkB,MAAM;AAC5B,QAAI,eAAe,QAAQ,kBAAkB,KAAK,cAAc,KAAK,eAAe;AAC5E,YAAA,mBAAwB,KAAK,cAAc;AAC3C,YAAA,sBAAsB,CAAC,WAAmB;AAAA,QAC9C,OAAO,mBAAmB;AAAA,QAC1B,aAAa,QAAQ,MAAM,iBAAiB;AAAA,MAAA;AAG9C,aAAO,iBAAiB,IAAI,CAACC,OAAM,UAAU;AACpC,eAAA,MAAM,aAAa,YAAY,EAAE,MAAAA,OAAM,MAAA,CAAO,GAAG;AAAA,UACtD;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,MAAAA;AAAAA,UACA,gBAAgB;AAAA,YACd;AAAA,YACA;AAAA,YACA;AAAA,YACA,kBAAkB,mBAAmB;AAAA,YACrC,mBACE,qBAAqB,mBACjB,CAAC,GAAG,mBAAmB,oBAAoB,KAAK,CAAC,IACjD,CAAC,oBAAoB,KAAK,CAAC;AAAA,UAAA;AAAA,QACnC,CACD;AAAA,MAAA,CACF;AAAA,IAAA;AAAA,EAEL;AAEO,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;"}
1
+ {"version":3,"file":"useNestedRow.es.js","sources":["../../../../../src/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ReactElement } from \"react\";\nimport classes from \"./DataGridRow.module.scss\";\nimport { HeaderCell } from \"../../datagrid.interfaces\";\n\nexport interface UseNestedRowProps<T> {\n indentationLevels?: { level: number; isLastChild: boolean }[];\n item?: T;\n nestedItemsKey?: keyof T;\n rowTemplate?: ({ item, index }: { item: T; index: number }) => ReactElement;\n isRowExpanded?: boolean;\n indentationLevel: number;\n enableNestedRow?: boolean;\n rowProps: {\n searchValue?: string;\n headers?: HeaderCell[];\n spacing?: React.CSSProperties;\n disableContextMenuColumn?: boolean;\n };\n}\n\nexport const useNestedRow = <T,>({\n indentationLevels,\n item,\n nestedItemsKey,\n rowTemplate,\n isRowExpanded,\n indentationLevel,\n enableNestedRow,\n rowProps: { searchValue, headers, spacing, disableContextMenuColumn }\n}: UseNestedRowProps<T>) => {\n const hasNestedChildren = item && nestedItemsKey && item[nestedItemsKey];\n\n const getNestedChildSpacing = (spacing: React.CSSProperties | undefined, index: number) => {\n const expandButtonWidth = 46;\n const nestedChildOffset = !hasNestedChildren ? expandButtonWidth : 0;\n\n const connectorWidth = 68;\n const nestedChildIndentation = `${nestedChildOffset + indentationLevel * connectorWidth}`;\n\n const gap = 4;\n const notIndentedWithNoChildrenOffset =\n indentationLevel === 0 && !hasNestedChildren ? expandButtonWidth + gap : gap;\n const childIndentation = `${indentationLevel ? nestedChildIndentation : notIndentedWithNoChildrenOffset}px`;\n\n if (spacing) {\n return {\n ...spacing,\n paddingLeft: index === 0 ? childIndentation : spacing.paddingLeft\n };\n }\n return {\n paddingLeft: index === 0 ? childIndentation : \"\"\n };\n };\n\n const renderNestedRowConnectors = () => {\n if (indentationLevels) {\n return indentationLevels.map(({ level, isLastChild }) =>\n renderNestedRowConnector(level, isLastChild, indentationLevels.length)\n );\n }\n\n return null;\n };\n\n const renderNestedRowConnector = (level: number, isLastChild: boolean, levelsLength: number) => {\n const offsetLeftClass = classes[`offset-left-${level - 1}`];\n\n if (level === levelsLength) {\n const variant = isLastChild ? \"line\" : \"t-shape\";\n\n return (\n <div\n key={level}\n data-testid=\"dataGridRowConnector\"\n className={`${classes[\"connector\"]} ${classes[variant]} ${offsetLeftClass}`}\n />\n );\n } else if (!isLastChild) {\n return (\n <div\n key={level}\n data-testid=\"dataGridRowConnector\"\n className={`${classes[\"connector\"]} ${classes[\"vertical\"]} ${offsetLeftClass}`}\n />\n );\n }\n return null;\n };\n\n const renderNestedRow = () => {\n if (rowTemplate && item && nestedItemsKey && item[nestedItemsKey] && isRowExpanded) {\n const nestedItemsArray: T[] = item[nestedItemsKey] as T[];\n const getIndentationLevel = (index: number) => ({\n level: indentationLevel + 1,\n isLastChild: index + 1 === nestedItemsArray.length\n });\n\n return nestedItemsArray.map((item, index) => {\n return React.cloneElement(rowTemplate({ item, index }), {\n searchValue,\n headers,\n spacing,\n disableContextMenuColumn,\n item,\n nestedRowProps: {\n rowTemplate,\n enableNestedRow,\n nestedItemsKey,\n indentationLevel: indentationLevel + 1,\n indentationLevels:\n indentationLevels && nestedItemsArray\n ? [...indentationLevels, getIndentationLevel(index)]\n : [getIndentationLevel(index)]\n }\n });\n });\n }\n };\n\n return {\n renderNestedRow,\n renderNestedRowConnectors,\n getNestedChildSpacing,\n hasNestedChildren\n };\n};\n"],"names":["spacing","item"],"mappings":";;AAoCO,MAAM,eAAe,CAAK;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU,EAAE,aAAa,SAAS,SAAS,yBAAA;AAC7C,MAA4B;AAC1B,QAAM,oBAAoB,QAAQ,kBAAkB,KAAK,cAAc;AAEvE,QAAM,wBAAwB,CAACA,UAA0C,UAAkB;AACzF,UAAM,oBAAoB;AAC1B,UAAM,oBAAoB,CAAC,oBAAoB,oBAAoB;AAEnE,UAAM,iBAAiB;AACvB,UAAM,yBAAyB,GAAG,oBAAoB,mBAAmB,cAAc;AAEvF,UAAM,MAAM;AACZ,UAAM,kCACJ,qBAAqB,KAAK,CAAC,oBAAoB,oBAAoB,MAAM;AAC3E,UAAM,mBAAmB,GAAG,mBAAmB,yBAAyB,+BAA+B;AAEvG,QAAIA,UAAS;AACX,aAAO;AAAA,QACL,GAAGA;AAAAA,QACH,aAAa,UAAU,IAAI,mBAAmBA,SAAQ;AAAA,MAAA;AAAA,IAE1D;AACA,WAAO;AAAA,MACL,aAAa,UAAU,IAAI,mBAAmB;AAAA,IAAA;AAAA,EAElD;AAEA,QAAM,4BAA4B,MAAM;AACtC,QAAI,mBAAmB;AACrB,aAAO,kBAAkB;AAAA,QAAI,CAAC,EAAE,OAAO,YAAA,MACrC,yBAAyB,OAAO,aAAa,kBAAkB,MAAM;AAAA,MAAA;AAAA,IAEzE;AAEA,WAAO;AAAA,EACT;AAEA,QAAM,2BAA2B,CAAC,OAAe,aAAsB,iBAAyB;AAC9F,UAAM,kBAAkB,QAAQ,eAAe,QAAQ,CAAC,EAAE;AAE1D,QAAI,UAAU,cAAc;AAC1B,YAAM,UAAU,cAAc,SAAS;AAEvC,aACE,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAK;AAAA,UACL,eAAY;AAAA,UACZ,WAAW,GAAG,QAAQ,WAAW,CAAC,IAAI,QAAQ,OAAO,CAAC,IAAI,eAAe;AAAA,QAAA;AAAA,MAAA;AAAA,IAG/E,WAAW,CAAC,aAAa;AACvB,aACE,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAK;AAAA,UACL,eAAY;AAAA,UACZ,WAAW,GAAG,QAAQ,WAAW,CAAC,IAAI,QAAQ,UAAU,CAAC,KAAK,eAAe;AAAA,QAAA;AAAA,MAAA;AAAA,IAGnF;AACA,WAAO;AAAA,EACT;AAEA,QAAM,kBAAkB,MAAM;AAC5B,QAAI,eAAe,QAAQ,kBAAkB,KAAK,cAAc,KAAK,eAAe;AAClF,YAAM,mBAAwB,KAAK,cAAc;AACjD,YAAM,sBAAsB,CAAC,WAAmB;AAAA,QAC9C,OAAO,mBAAmB;AAAA,QAC1B,aAAa,QAAQ,MAAM,iBAAiB;AAAA,MAAA;AAG9C,aAAO,iBAAiB,IAAI,CAACC,OAAM,UAAU;AAC3C,eAAO,MAAM,aAAa,YAAY,EAAE,MAAAA,OAAM,MAAA,CAAO,GAAG;AAAA,UACtD;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,MAAAA;AAAAA,UACA,gBAAgB;AAAA,YACd;AAAA,YACA;AAAA,YACA;AAAA,YACA,kBAAkB,mBAAmB;AAAA,YACrC,mBACE,qBAAqB,mBACjB,CAAC,GAAG,mBAAmB,oBAAoB,KAAK,CAAC,IACjD,CAAC,oBAAoB,KAAK,CAAC;AAAA,UAAA;AAAA,QACnC,CACD;AAAA,MACH,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataGridDateFilter.cjs.js","sources":["../../../../src/components/DataGrid/DataGridFilters/DataGridDateFilter.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Fragment, useRef, useState } from \"react\";\nimport { DataGridFilterTag } from \"./DataGridFilterTag\";\nimport { createPortal } from \"react-dom\";\nimport { DateTimePicker } from \"./DateTimePicker/DateTimePicker\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport { DateTimeFilter } from \"./DataGridFilters.interfaces\";\n\ntype Props = {\n domRoot?: HTMLElement;\n dateFilterValue?: DateTimeFilter;\n onDateFilterValueChange?: (dateTimeFilter: DateTimeFilter) => void;\n};\n\nexport const DataGridDateFilter = ({\n domRoot,\n dateFilterValue,\n onDateFilterValueChange\n}: Props) => {\n const triggerRef = useRef<HTMLButtonElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n const [isOpen, setIsOpen] = useState(false);\n const [tagCaption, setTagCaption] = useState(\"Last 30 seconds\");\n\n return (\n <Fragment>\n <DataGridFilterTag\n triggerRef={triggerRef}\n ref={wrappingDivRef}\n dateTagCaption={tagCaption}\n mode={\"ADD_DATE\"}\n onFilterOpen={() => setIsOpen(true)}\n />\n {createPortal(\n <DateTimePicker\n popoverRef={popoverRef}\n onTagCaptionChange={setTagCaption}\n anchorRef={wrappingDivRef}\n isOpen={isOpen}\n setPickerOpen={setIsOpen}\n dateFilterValue={dateFilterValue}\n onDateFilterValueChange={onDateFilterValueChange}\n />,\n root\n )}\n </Fragment>\n );\n};\n"],"names":["domRoot","dateFilterValue","onDateFilterValueChange","triggerRef","useRef","popoverRef","wrappingDivRef","root","useGetDomRoot","isOpen","setIsOpen","useState","tagCaption","setTagCaption","Fragment","React","createElement","DataGridFilterTag","ref","dateTagCaption","mode","onFilterOpen","createPortal","DateTimePicker","onTagCaptionChange","anchorRef","setPickerOpen"],"mappings":"wSA6BkC,EAChCA,UACAC,kBACAC,8BAEM,MAAAC,EAAaC,SAA0B,MACvCC,EAAaD,SAAuB,MACpCE,EAAiBF,SAAuB,OACxCG,KAAEA,GAASC,gBAAcR,EAASM,IACjCG,EAAQC,GAAaC,EAAAA,UAAS,IAC9BC,EAAYC,GAAiBF,EAAAA,SAAS,mBAE7C,uBACGG,EACCA,SAAA,KAAAC,EAAAC,cAACC,EAAAA,kBAAA,CACCd,aACAe,IAAKZ,EACLa,eAAgBP,EAChBQ,KAAM,WACNC,aAAc,IAAMX,GAAU,KAE/BY,EAAAA,aACCP,EAAAC,cAACO,EAAAA,eAAA,CACClB,aACAmB,mBAAoBX,EACpBY,UAAWnB,EACXG,SACAiB,cAAehB,EACfT,kBACAC,4BAEFK,GAEJ"}
1
+ {"version":3,"file":"DataGridDateFilter.cjs.js","sources":["../../../../src/components/DataGrid/DataGridFilters/DataGridDateFilter.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Fragment, useRef, useState } from \"react\";\nimport { DataGridFilterTag } from \"./DataGridFilterTag\";\nimport { createPortal } from \"react-dom\";\nimport { DateTimePicker } from \"./DateTimePicker/DateTimePicker\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport { DateTimeFilter } from \"./DataGridFilters.interfaces\";\n\ntype Props = {\n domRoot?: HTMLElement;\n dateFilterValue?: DateTimeFilter;\n onDateFilterValueChange?: (dateTimeFilter: DateTimeFilter) => void;\n};\n\nexport const DataGridDateFilter = ({\n domRoot,\n dateFilterValue,\n onDateFilterValueChange\n}: Props) => {\n const triggerRef = useRef<HTMLButtonElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n const [isOpen, setIsOpen] = useState(false);\n const [tagCaption, setTagCaption] = useState(\"Last 30 seconds\");\n\n return (\n <Fragment>\n <DataGridFilterTag\n triggerRef={triggerRef}\n ref={wrappingDivRef}\n dateTagCaption={tagCaption}\n mode={\"ADD_DATE\"}\n onFilterOpen={() => setIsOpen(true)}\n />\n {createPortal(\n <DateTimePicker\n popoverRef={popoverRef}\n onTagCaptionChange={setTagCaption}\n anchorRef={wrappingDivRef}\n isOpen={isOpen}\n setPickerOpen={setIsOpen}\n dateFilterValue={dateFilterValue}\n onDateFilterValueChange={onDateFilterValueChange}\n />,\n root\n )}\n </Fragment>\n );\n};\n"],"names":["domRoot","dateFilterValue","onDateFilterValueChange","triggerRef","useRef","popoverRef","wrappingDivRef","root","useGetDomRoot","isOpen","setIsOpen","useState","tagCaption","setTagCaption","Fragment","React","createElement","DataGridFilterTag","ref","dateTagCaption","mode","onFilterOpen","createPortal","DateTimePicker","onTagCaptionChange","anchorRef","setPickerOpen"],"mappings":"wSA6BkC,EAChCA,UACAC,kBACAC,8BAEA,MAAMC,EAAaC,EAAAA,OAA0B,MACvCC,EAAaD,EAAAA,OAAuB,MACpCE,EAAiBF,EAAAA,OAAuB,OACxCG,KAAEA,GAASC,gBAAcR,EAASM,IACjCG,EAAQC,GAAaC,EAAAA,UAAS,IAC9BC,EAAYC,GAAiBF,EAAAA,SAAS,mBAE7C,uBACGG,EAAAA,SAAA,KACCC,EAAAC,cAACC,EAAAA,kBAAA,CACCd,aACAe,IAAKZ,EACLa,eAAgBP,EAChBQ,KAAM,WACNC,aAAc,IAAMX,GAAU,KAE/BY,EAAAA,aACCP,EAAAC,cAACO,EAAAA,eAAA,CACClB,aACAmB,mBAAoBX,EACpBY,UAAWnB,EACXG,SACAiB,cAAehB,EACfT,kBACAC,4BAEFK"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataGridDateFilter.es.js","sources":["../../../../src/components/DataGrid/DataGridFilters/DataGridDateFilter.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Fragment, useRef, useState } from \"react\";\nimport { DataGridFilterTag } from \"./DataGridFilterTag\";\nimport { createPortal } from \"react-dom\";\nimport { DateTimePicker } from \"./DateTimePicker/DateTimePicker\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport { DateTimeFilter } from \"./DataGridFilters.interfaces\";\n\ntype Props = {\n domRoot?: HTMLElement;\n dateFilterValue?: DateTimeFilter;\n onDateFilterValueChange?: (dateTimeFilter: DateTimeFilter) => void;\n};\n\nexport const DataGridDateFilter = ({\n domRoot,\n dateFilterValue,\n onDateFilterValueChange\n}: Props) => {\n const triggerRef = useRef<HTMLButtonElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n const [isOpen, setIsOpen] = useState(false);\n const [tagCaption, setTagCaption] = useState(\"Last 30 seconds\");\n\n return (\n <Fragment>\n <DataGridFilterTag\n triggerRef={triggerRef}\n ref={wrappingDivRef}\n dateTagCaption={tagCaption}\n mode={\"ADD_DATE\"}\n onFilterOpen={() => setIsOpen(true)}\n />\n {createPortal(\n <DateTimePicker\n popoverRef={popoverRef}\n onTagCaptionChange={setTagCaption}\n anchorRef={wrappingDivRef}\n isOpen={isOpen}\n setPickerOpen={setIsOpen}\n dateFilterValue={dateFilterValue}\n onDateFilterValueChange={onDateFilterValueChange}\n />,\n root\n )}\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;AA6BO,MAAM,qBAAqB,CAAC;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACF,MAAa;AACL,QAAA,aAAa,OAA0B,IAAI;AAC3C,QAAA,aAAa,OAAuB,IAAI;AACxC,QAAA,iBAAiB,OAAuB,IAAI;AAClD,QAAM,EAAE,KAAS,IAAA,cAAc,SAAS,cAAc;AACtD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,iBAAiB;AAE9D,6CACG,UACC,MAAA,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,KAAK;AAAA,MACL,gBAAgB;AAAA,MAChB,MAAM;AAAA,MACN,cAAc,MAAM,UAAU,IAAI;AAAA,IAAA;AAAA,EAAA,GAEnC;AAAA,IACC,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,oBAAoB;AAAA,QACpB,WAAW;AAAA,QACX;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,IACA;AAAA,EAAA,CAEJ;AAEJ;"}
1
+ {"version":3,"file":"DataGridDateFilter.es.js","sources":["../../../../src/components/DataGrid/DataGridFilters/DataGridDateFilter.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Fragment, useRef, useState } from \"react\";\nimport { DataGridFilterTag } from \"./DataGridFilterTag\";\nimport { createPortal } from \"react-dom\";\nimport { DateTimePicker } from \"./DateTimePicker/DateTimePicker\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport { DateTimeFilter } from \"./DataGridFilters.interfaces\";\n\ntype Props = {\n domRoot?: HTMLElement;\n dateFilterValue?: DateTimeFilter;\n onDateFilterValueChange?: (dateTimeFilter: DateTimeFilter) => void;\n};\n\nexport const DataGridDateFilter = ({\n domRoot,\n dateFilterValue,\n onDateFilterValueChange\n}: Props) => {\n const triggerRef = useRef<HTMLButtonElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n const [isOpen, setIsOpen] = useState(false);\n const [tagCaption, setTagCaption] = useState(\"Last 30 seconds\");\n\n return (\n <Fragment>\n <DataGridFilterTag\n triggerRef={triggerRef}\n ref={wrappingDivRef}\n dateTagCaption={tagCaption}\n mode={\"ADD_DATE\"}\n onFilterOpen={() => setIsOpen(true)}\n />\n {createPortal(\n <DateTimePicker\n popoverRef={popoverRef}\n onTagCaptionChange={setTagCaption}\n anchorRef={wrappingDivRef}\n isOpen={isOpen}\n setPickerOpen={setIsOpen}\n dateFilterValue={dateFilterValue}\n onDateFilterValueChange={onDateFilterValueChange}\n />,\n root\n )}\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;AA6BO,MAAM,qBAAqB,CAAC;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACF,MAAa;AACX,QAAM,aAAa,OAA0B,IAAI;AACjD,QAAM,aAAa,OAAuB,IAAI;AAC9C,QAAM,iBAAiB,OAAuB,IAAI;AAClD,QAAM,EAAE,KAAA,IAAS,cAAc,SAAS,cAAc;AACtD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,iBAAiB;AAE9D,6CACG,UAAA,MACC,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,KAAK;AAAA,MACL,gBAAgB;AAAA,MAChB,MAAM;AAAA,MACN,cAAc,MAAM,UAAU,IAAI;AAAA,IAAA;AAAA,EAAA,GAEnC;AAAA,IACC,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,oBAAoB;AAAA,QACpB,WAAW;AAAA,QACX;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF;AAAA,EAAA,CAEJ;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("react-dom"),r=require("../../../hooks/useGetDomRoot.cjs.js"),o=require("../../../util/helper.cjs.js"),a=require("./DataGridFilterTag.cjs.js"),s=require("./DataGridFilterPopover.cjs.js"),l=require("./DataGridFilterService.cjs.js");exports.DataGridFilter=({mode:i,filter:n,domRoot:u,columnsMetadata:c,onFilterAdd:d,onFilterEdit:m,onFilterDelete:p,tagTranslations:f,popoverTranslations:F,customEditTagContent:D,filterState:v})=>{const g=e.useRef(null),j=e.useRef(null),R=e.useRef(null),[G,E]=e.useState(!1),O=e.useRef(!1);e.useEffect((()=>{var e;!G&&O.current&&(null==(e=j.current)||e.focus()),O.current=G}),[G]);const{root:T}=r.useGetDomRoot(u,g),{resetFields:q,operator:V,setOperator:P,operators:S,setOperators:k,column:C,setColumn:M,values:b,setValues:h,pickedValues:x,setPickedValues:y,initialiseFilterValues:A,allowedColumnsMetaData:I}=l.useDataGridFilter(i,c,v);return e.createElement(e.Fragment,null,e.createElement(a.DataGridFilterTag,{mode:i,onFilterOpen:()=>{E(!G),G||A(n)},onFilterRemove:()=>{if(!n)return;const{id:e}=n;p&&p(e),q(),E(!1)},triggerRef:j,ref:g,filter:n,translations:f,customEditTagContent:D,columnsMetadata:c}),t.createPortal(e.createElement(s.DataGridFilterPopover,{popoverRef:R,anchorRef:g,isOpen:G,translations:F,column:C,columnsMetadata:I,values:b,pickedValues:x,operator:V,operators:S,onFilterSubmit:()=>{if("ADD"===i){const e=o.generateID();d&&d({id:e,column:C,operator:V,value:x})}else if("EDIT"===i&&n){const{id:e}=n;m&&m({id:e,column:C,operator:V,value:x})}q(),E(!1)},resetFields:q,setFilterOpen:E,setColumn:M,setOperator:P,setOperators:k,setValues:h,setPickedValues:y}),T))};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("react-dom"),r=require("../../../hooks/useGetDomRoot.cjs.js"),o=require("../../../util/helper.cjs.js"),a=require("./DataGridFilterTag.cjs.js"),s=require("./DataGridFilterPopover.cjs.js"),l=require("./DataGridFilterService.cjs.js");exports.DataGridFilter=({mode:i,filter:n,domRoot:u,columnsMetadata:c,onFilterAdd:d,onFilterEdit:m,onFilterDelete:p,tagTranslations:f,popoverTranslations:F,customEditTagContent:D,filterState:v})=>{const g=e.useRef(null),j=e.useRef(null),R=e.useRef(null),[G,E]=e.useState(!1),O=e.useRef(!1);e.useEffect(()=>{var e;!G&&O.current&&(null==(e=j.current)||e.focus()),O.current=G},[G]);const{root:T}=r.useGetDomRoot(u,g),{resetFields:q,operator:V,setOperator:P,operators:S,setOperators:k,column:C,setColumn:M,values:b,setValues:h,pickedValues:x,setPickedValues:y,initialiseFilterValues:A,allowedColumnsMetaData:I}=l.useDataGridFilter(i,c,v);return e.createElement(e.Fragment,null,e.createElement(a.DataGridFilterTag,{mode:i,onFilterOpen:()=>{E(!G),G||A(n)},onFilterRemove:()=>{if(!n)return;const{id:e}=n;p&&p(e),q(),E(!1)},triggerRef:j,ref:g,filter:n,translations:f,customEditTagContent:D,columnsMetadata:c}),t.createPortal(e.createElement(s.DataGridFilterPopover,{popoverRef:R,anchorRef:g,isOpen:G,translations:F,column:C,columnsMetadata:I,values:b,pickedValues:x,operator:V,operators:S,onFilterSubmit:()=>{if("ADD"===i){const e=o.generateID();d&&d({id:e,column:C,operator:V,value:x})}else if("EDIT"===i&&n){const{id:e}=n;m&&m({id:e,column:C,operator:V,value:x})}q(),E(!1)},resetFields:q,setFilterOpen:E,setColumn:M,setOperator:P,setOperators:k,setValues:h,setPickedValues:y}),T))};
2
2
  //# sourceMappingURL=DataGridFilter.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataGridFilter.cjs.js","sources":["../../../../src/components/DataGrid/DataGridFilters/DataGridFilter.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Fragment, useRef, useState, useEffect } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport {\n DataGridColumnMetadata,\n Filter,\n FilterEditorMode,\n FiltersState,\n PopoverTranslations,\n TagTranslations\n} from \"./DataGridFilters.interfaces\";\nimport { generateID } from \"../../../util/helper\";\nimport { DataGridFilterTag } from \"./DataGridFilterTag\";\nimport { DataGridFilterPopover } from \"./DataGridFilterPopover\";\nimport { useDataGridFilter } from \"./DataGridFilterService\";\n\nexport type Props = {\n mode: FilterEditorMode;\n domRoot?: HTMLElement;\n filter?: Filter;\n columnsMetadata: DataGridColumnMetadata[];\n onFilterAdd?: (filter: Filter) => void;\n onFilterEdit?: (filter: Filter) => void;\n onFilterDelete?: (id: string) => void;\n tagTranslations?: TagTranslations;\n popoverTranslations?: PopoverTranslations;\n customEditTagContent?: React.ReactElement;\n filterState: FiltersState;\n};\n\nexport const DataGridFilter = ({\n mode,\n filter,\n domRoot,\n columnsMetadata,\n onFilterAdd,\n onFilterEdit,\n onFilterDelete,\n tagTranslations,\n popoverTranslations,\n customEditTagContent,\n filterState\n}: Props) => {\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n\n const [filterOpen, setFilterOpen] = useState(false);\n const wasOpenRef = useRef(false);\n\n useEffect(() => {\n if (!filterOpen && wasOpenRef.current) {\n triggerRef.current?.focus();\n }\n wasOpenRef.current = filterOpen;\n }, [filterOpen]);\n\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n const {\n resetFields,\n operator,\n setOperator,\n operators,\n setOperators,\n column,\n setColumn,\n values,\n setValues,\n pickedValues,\n setPickedValues,\n initialiseFilterValues,\n allowedColumnsMetaData\n } = useDataGridFilter(mode, columnsMetadata, filterState);\n\n const onFilterSubmit = () => {\n if (mode === \"ADD\") {\n const id = generateID();\n onFilterAdd && onFilterAdd({ id, column, operator, value: pickedValues });\n } else if (mode === \"EDIT\" && filter) {\n const { id } = filter;\n onFilterEdit && onFilterEdit({ id, column, operator, value: pickedValues });\n }\n\n resetFields();\n setFilterOpen(false);\n };\n\n const onFilterRemove = () => {\n if (!filter) {\n return;\n }\n\n const { id } = filter;\n onFilterDelete && onFilterDelete(id);\n\n resetFields();\n setFilterOpen(false);\n };\n const onFilterOpen = () => {\n setFilterOpen(!filterOpen);\n if (!filterOpen) {\n initialiseFilterValues(filter);\n }\n };\n\n return (\n <Fragment>\n <DataGridFilterTag\n mode={mode}\n onFilterOpen={onFilterOpen}\n onFilterRemove={onFilterRemove}\n triggerRef={triggerRef}\n ref={wrappingDivRef}\n filter={filter}\n translations={tagTranslations}\n customEditTagContent={customEditTagContent}\n columnsMetadata={columnsMetadata}\n />\n {createPortal(\n <DataGridFilterPopover\n popoverRef={popoverRef}\n anchorRef={wrappingDivRef}\n isOpen={filterOpen}\n translations={popoverTranslations}\n column={column}\n columnsMetadata={allowedColumnsMetaData}\n values={values}\n pickedValues={pickedValues}\n operator={operator}\n operators={operators}\n onFilterSubmit={onFilterSubmit}\n resetFields={resetFields}\n setFilterOpen={setFilterOpen}\n setColumn={setColumn}\n setOperator={setOperator}\n setOperators={setOperators}\n setValues={setValues}\n setPickedValues={setPickedValues}\n />,\n root\n )}\n </Fragment>\n );\n};\n"],"names":["mode","filter","domRoot","columnsMetadata","onFilterAdd","onFilterEdit","onFilterDelete","tagTranslations","popoverTranslations","customEditTagContent","filterState","wrappingDivRef","useRef","triggerRef","popoverRef","filterOpen","setFilterOpen","useState","wasOpenRef","useEffect","current","_a","focus","root","useGetDomRoot","resetFields","operator","setOperator","operators","setOperators","column","setColumn","values","setValues","pickedValues","setPickedValues","initialiseFilterValues","allowedColumnsMetaData","useDataGridFilter","Fragment","React","createElement","DataGridFilterTag","onFilterOpen","onFilterRemove","id","ref","translations","createPortal","DataGridFilterPopover","anchorRef","isOpen","onFilterSubmit","generateID","value"],"mappings":"iXA8C8B,EAC5BA,OACAC,SACAC,UACAC,kBACAC,cACAC,eACAC,iBACAC,kBACAC,sBACAC,uBACAC,kBAEM,MAAAC,EAAiBC,SAAuB,MACxCC,EAAaD,SAA0B,MACvCE,EAAaF,SAAuB,OAEnCG,EAAYC,GAAiBC,EAAAA,UAAS,GACvCC,EAAaN,UAAO,GAE1BO,EAAAA,WAAU,YACHJ,GAAcG,EAAWE,UAC5B,OAAAC,EAAAR,EAAWO,UAASC,EAAAC,SAEtBJ,EAAWE,QAAUL,CAAA,GACpB,CAACA,IAEJ,MAAMQ,KAAEA,GAASC,gBAActB,EAASS,IAClCc,YACJA,EAAAC,SACAA,EAAAC,YACAA,EAAAC,UACAA,EAAAC,aACAA,EAAAC,OACAA,EAAAC,UACAA,EAAAC,OACAA,EAAAC,UACAA,EAAAC,aACAA,EAAAC,gBACAA,EAAAC,uBACAA,EAAAC,uBACAA,GACEC,oBAAkBtC,EAAMG,EAAiBO,GAiC7C,uBACG6B,EACCA,SAAA,KAAAC,EAAAC,cAACC,EAAAA,kBAAA,CACC1C,OACA2C,aAXe,KACnB3B,GAAeD,GACVA,GACHqB,EAAuBnC,EAAM,EAS3B2C,eAvBiB,KACrB,IAAK3C,EACH,OAGI,MAAA4C,GAAEA,GAAO5C,EACfK,GAAkBA,EAAeuC,GAErBpB,IACZT,GAAc,EAAK,EAefH,aACAiC,IAAKnC,EACLV,SACA8C,aAAcxC,EACdE,uBACAN,oBAED6C,EAAAA,aACCR,EAAAC,cAACQ,EAAAA,sBAAA,CACCnC,aACAoC,UAAWvC,EACXwC,OAAQpC,EACRgC,aAAcvC,EACdsB,SACA3B,gBAAiBkC,EACjBL,SACAE,eACAR,WACAE,YACAwB,eAxDe,KACrB,GAAa,QAATpD,EAAgB,CACZ,MAAA6C,EAAKQ,EAAAA,aACXjD,GAAeA,EAAY,CAAEyC,KAAIf,SAAQJ,WAAU4B,MAAOpB,GAAc,MAAA,GACtD,SAATlC,GAAmBC,EAAQ,CAC9B,MAAA4C,GAAEA,GAAO5C,EACfI,GAAgBA,EAAa,CAAEwC,KAAIf,SAAQJ,WAAU4B,MAAOpB,GAAc,CAGhET,IACZT,GAAc,EAAK,EA+CbS,cACAT,gBACAe,YACAJ,cACAE,eACAI,YACAE,oBAEFZ,GAEJ"}
1
+ {"version":3,"file":"DataGridFilter.cjs.js","sources":["../../../../src/components/DataGrid/DataGridFilters/DataGridFilter.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Fragment, useRef, useState, useEffect } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport {\n DataGridColumnMetadata,\n Filter,\n FilterEditorMode,\n FiltersState,\n PopoverTranslations,\n TagTranslations\n} from \"./DataGridFilters.interfaces\";\nimport { generateID } from \"../../../util/helper\";\nimport { DataGridFilterTag } from \"./DataGridFilterTag\";\nimport { DataGridFilterPopover } from \"./DataGridFilterPopover\";\nimport { useDataGridFilter } from \"./DataGridFilterService\";\n\nexport type Props = {\n mode: FilterEditorMode;\n domRoot?: HTMLElement;\n filter?: Filter;\n columnsMetadata: DataGridColumnMetadata[];\n onFilterAdd?: (filter: Filter) => void;\n onFilterEdit?: (filter: Filter) => void;\n onFilterDelete?: (id: string) => void;\n tagTranslations?: TagTranslations;\n popoverTranslations?: PopoverTranslations;\n customEditTagContent?: React.ReactElement;\n filterState: FiltersState;\n};\n\nexport const DataGridFilter = ({\n mode,\n filter,\n domRoot,\n columnsMetadata,\n onFilterAdd,\n onFilterEdit,\n onFilterDelete,\n tagTranslations,\n popoverTranslations,\n customEditTagContent,\n filterState\n}: Props) => {\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n\n const [filterOpen, setFilterOpen] = useState(false);\n const wasOpenRef = useRef(false);\n\n useEffect(() => {\n if (!filterOpen && wasOpenRef.current) {\n triggerRef.current?.focus();\n }\n wasOpenRef.current = filterOpen;\n }, [filterOpen]);\n\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n const {\n resetFields,\n operator,\n setOperator,\n operators,\n setOperators,\n column,\n setColumn,\n values,\n setValues,\n pickedValues,\n setPickedValues,\n initialiseFilterValues,\n allowedColumnsMetaData\n } = useDataGridFilter(mode, columnsMetadata, filterState);\n\n const onFilterSubmit = () => {\n if (mode === \"ADD\") {\n const id = generateID();\n onFilterAdd && onFilterAdd({ id, column, operator, value: pickedValues });\n } else if (mode === \"EDIT\" && filter) {\n const { id } = filter;\n onFilterEdit && onFilterEdit({ id, column, operator, value: pickedValues });\n }\n\n resetFields();\n setFilterOpen(false);\n };\n\n const onFilterRemove = () => {\n if (!filter) {\n return;\n }\n\n const { id } = filter;\n onFilterDelete && onFilterDelete(id);\n\n resetFields();\n setFilterOpen(false);\n };\n const onFilterOpen = () => {\n setFilterOpen(!filterOpen);\n if (!filterOpen) {\n initialiseFilterValues(filter);\n }\n };\n\n return (\n <Fragment>\n <DataGridFilterTag\n mode={mode}\n onFilterOpen={onFilterOpen}\n onFilterRemove={onFilterRemove}\n triggerRef={triggerRef}\n ref={wrappingDivRef}\n filter={filter}\n translations={tagTranslations}\n customEditTagContent={customEditTagContent}\n columnsMetadata={columnsMetadata}\n />\n {createPortal(\n <DataGridFilterPopover\n popoverRef={popoverRef}\n anchorRef={wrappingDivRef}\n isOpen={filterOpen}\n translations={popoverTranslations}\n column={column}\n columnsMetadata={allowedColumnsMetaData}\n values={values}\n pickedValues={pickedValues}\n operator={operator}\n operators={operators}\n onFilterSubmit={onFilterSubmit}\n resetFields={resetFields}\n setFilterOpen={setFilterOpen}\n setColumn={setColumn}\n setOperator={setOperator}\n setOperators={setOperators}\n setValues={setValues}\n setPickedValues={setPickedValues}\n />,\n root\n )}\n </Fragment>\n );\n};\n"],"names":["mode","filter","domRoot","columnsMetadata","onFilterAdd","onFilterEdit","onFilterDelete","tagTranslations","popoverTranslations","customEditTagContent","filterState","wrappingDivRef","useRef","triggerRef","popoverRef","filterOpen","setFilterOpen","useState","wasOpenRef","useEffect","current","_a","focus","root","useGetDomRoot","resetFields","operator","setOperator","operators","setOperators","column","setColumn","values","setValues","pickedValues","setPickedValues","initialiseFilterValues","allowedColumnsMetaData","useDataGridFilter","Fragment","React","createElement","DataGridFilterTag","onFilterOpen","onFilterRemove","id","ref","translations","createPortal","DataGridFilterPopover","anchorRef","isOpen","onFilterSubmit","generateID","value"],"mappings":"iXA8C8B,EAC5BA,OACAC,SACAC,UACAC,kBACAC,cACAC,eACAC,iBACAC,kBACAC,sBACAC,uBACAC,kBAEA,MAAMC,EAAiBC,EAAAA,OAAuB,MACxCC,EAAaD,EAAAA,OAA0B,MACvCE,EAAaF,EAAAA,OAAuB,OAEnCG,EAAYC,GAAiBC,EAAAA,UAAS,GACvCC,EAAaN,EAAAA,QAAO,GAE1BO,EAAAA,UAAU,YACHJ,GAAcG,EAAWE,UAC5B,OAAAC,EAAAR,EAAWO,UAAXC,EAAoBC,SAEtBJ,EAAWE,QAAUL,GACpB,CAACA,IAEJ,MAAMQ,KAAEA,GAASC,gBAActB,EAASS,IAClCc,YACJA,EAAAC,SACAA,EAAAC,YACAA,EAAAC,UACAA,EAAAC,aACAA,EAAAC,OACAA,EAAAC,UACAA,EAAAC,OACAA,EAAAC,UACAA,EAAAC,aACAA,EAAAC,gBACAA,EAAAC,uBACAA,EAAAC,uBACAA,GACEC,oBAAkBtC,EAAMG,EAAiBO,GAiC7C,uBACG6B,EAAAA,SAAA,KACCC,EAAAC,cAACC,EAAAA,kBAAA,CACC1C,OACA2C,aAXe,KACnB3B,GAAeD,GACVA,GACHqB,EAAuBnC,IASrB2C,eAvBiB,KACrB,IAAK3C,EACH,OAGF,MAAM4C,GAAEA,GAAO5C,EACfK,GAAkBA,EAAeuC,GAEjCpB,IACAT,GAAc,IAeVH,aACAiC,IAAKnC,EACLV,SACA8C,aAAcxC,EACdE,uBACAN,oBAED6C,EAAAA,aACCR,EAAAC,cAACQ,EAAAA,sBAAA,CACCnC,aACAoC,UAAWvC,EACXwC,OAAQpC,EACRgC,aAAcvC,EACdsB,SACA3B,gBAAiBkC,EACjBL,SACAE,eACAR,WACAE,YACAwB,eAxDe,KACrB,GAAa,QAATpD,EAAgB,CAClB,MAAM6C,EAAKQ,EAAAA,aACXjD,GAAeA,EAAY,CAAEyC,KAAIf,SAAQJ,WAAU4B,MAAOpB,GAC5D,MAAA,GAAoB,SAATlC,GAAmBC,EAAQ,CACpC,MAAM4C,GAAEA,GAAO5C,EACfI,GAAgBA,EAAa,CAAEwC,KAAIf,SAAQJ,WAAU4B,MAAOpB,GAC9D,CAEAT,IACAT,GAAc,IA+CRS,cACAT,gBACAe,YACAJ,cACAE,eACAI,YACAE,oBAEFZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataGridFilter.es.js","sources":["../../../../src/components/DataGrid/DataGridFilters/DataGridFilter.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Fragment, useRef, useState, useEffect } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport {\n DataGridColumnMetadata,\n Filter,\n FilterEditorMode,\n FiltersState,\n PopoverTranslations,\n TagTranslations\n} from \"./DataGridFilters.interfaces\";\nimport { generateID } from \"../../../util/helper\";\nimport { DataGridFilterTag } from \"./DataGridFilterTag\";\nimport { DataGridFilterPopover } from \"./DataGridFilterPopover\";\nimport { useDataGridFilter } from \"./DataGridFilterService\";\n\nexport type Props = {\n mode: FilterEditorMode;\n domRoot?: HTMLElement;\n filter?: Filter;\n columnsMetadata: DataGridColumnMetadata[];\n onFilterAdd?: (filter: Filter) => void;\n onFilterEdit?: (filter: Filter) => void;\n onFilterDelete?: (id: string) => void;\n tagTranslations?: TagTranslations;\n popoverTranslations?: PopoverTranslations;\n customEditTagContent?: React.ReactElement;\n filterState: FiltersState;\n};\n\nexport const DataGridFilter = ({\n mode,\n filter,\n domRoot,\n columnsMetadata,\n onFilterAdd,\n onFilterEdit,\n onFilterDelete,\n tagTranslations,\n popoverTranslations,\n customEditTagContent,\n filterState\n}: Props) => {\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n\n const [filterOpen, setFilterOpen] = useState(false);\n const wasOpenRef = useRef(false);\n\n useEffect(() => {\n if (!filterOpen && wasOpenRef.current) {\n triggerRef.current?.focus();\n }\n wasOpenRef.current = filterOpen;\n }, [filterOpen]);\n\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n const {\n resetFields,\n operator,\n setOperator,\n operators,\n setOperators,\n column,\n setColumn,\n values,\n setValues,\n pickedValues,\n setPickedValues,\n initialiseFilterValues,\n allowedColumnsMetaData\n } = useDataGridFilter(mode, columnsMetadata, filterState);\n\n const onFilterSubmit = () => {\n if (mode === \"ADD\") {\n const id = generateID();\n onFilterAdd && onFilterAdd({ id, column, operator, value: pickedValues });\n } else if (mode === \"EDIT\" && filter) {\n const { id } = filter;\n onFilterEdit && onFilterEdit({ id, column, operator, value: pickedValues });\n }\n\n resetFields();\n setFilterOpen(false);\n };\n\n const onFilterRemove = () => {\n if (!filter) {\n return;\n }\n\n const { id } = filter;\n onFilterDelete && onFilterDelete(id);\n\n resetFields();\n setFilterOpen(false);\n };\n const onFilterOpen = () => {\n setFilterOpen(!filterOpen);\n if (!filterOpen) {\n initialiseFilterValues(filter);\n }\n };\n\n return (\n <Fragment>\n <DataGridFilterTag\n mode={mode}\n onFilterOpen={onFilterOpen}\n onFilterRemove={onFilterRemove}\n triggerRef={triggerRef}\n ref={wrappingDivRef}\n filter={filter}\n translations={tagTranslations}\n customEditTagContent={customEditTagContent}\n columnsMetadata={columnsMetadata}\n />\n {createPortal(\n <DataGridFilterPopover\n popoverRef={popoverRef}\n anchorRef={wrappingDivRef}\n isOpen={filterOpen}\n translations={popoverTranslations}\n column={column}\n columnsMetadata={allowedColumnsMetaData}\n values={values}\n pickedValues={pickedValues}\n operator={operator}\n operators={operators}\n onFilterSubmit={onFilterSubmit}\n resetFields={resetFields}\n setFilterOpen={setFilterOpen}\n setColumn={setColumn}\n setOperator={setOperator}\n setOperators={setOperators}\n setValues={setValues}\n setPickedValues={setPickedValues}\n />,\n root\n )}\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8CO,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAa;AACL,QAAA,iBAAiB,OAAuB,IAAI;AAC5C,QAAA,aAAa,OAA0B,IAAI;AAC3C,QAAA,aAAa,OAAuB,IAAI;AAE9C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAC5C,QAAA,aAAa,OAAO,KAAK;AAE/B,YAAU,MAAM;;AACV,QAAA,CAAC,cAAc,WAAW,SAAS;AACrC,uBAAW,YAAX,mBAAoB;AAAA,IAAM;AAE5B,eAAW,UAAU;AAAA,EAAA,GACpB,CAAC,UAAU,CAAC;AAEf,QAAM,EAAE,KAAS,IAAA,cAAc,SAAS,cAAc;AAChD,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACE,IAAA,kBAAkB,MAAM,iBAAiB,WAAW;AAExD,QAAM,iBAAiB,MAAM;AAC3B,QAAI,SAAS,OAAO;AAClB,YAAM,KAAK,WAAW;AACtB,qBAAe,YAAY,EAAE,IAAI,QAAQ,UAAU,OAAO,cAAc;AAAA,IAAA,WAC/D,SAAS,UAAU,QAAQ;AAC9B,YAAA,EAAE,OAAO;AACf,sBAAgB,aAAa,EAAE,IAAI,QAAQ,UAAU,OAAO,cAAc;AAAA,IAAA;AAGhE,gBAAA;AACZ,kBAAc,KAAK;AAAA,EACrB;AAEA,QAAM,iBAAiB,MAAM;AAC3B,QAAI,CAAC,QAAQ;AACX;AAAA,IAAA;AAGI,UAAA,EAAE,OAAO;AACf,sBAAkB,eAAe,EAAE;AAEvB,gBAAA;AACZ,kBAAc,KAAK;AAAA,EACrB;AACA,QAAM,eAAe,MAAM;AACzB,kBAAc,CAAC,UAAU;AACzB,QAAI,CAAC,YAAY;AACf,6BAAuB,MAAM;AAAA,IAAA;AAAA,EAEjC;AAEA,6CACG,UACC,MAAA,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,KAAK;AAAA,MACL;AAAA,MACA,cAAc;AAAA,MACd;AAAA,MACA;AAAA,IAAA;AAAA,EAAA,GAED;AAAA,IACC,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,cAAc;AAAA,QACd;AAAA,QACA,iBAAiB;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,IACA;AAAA,EAAA,CAEJ;AAEJ;"}
1
+ {"version":3,"file":"DataGridFilter.es.js","sources":["../../../../src/components/DataGrid/DataGridFilters/DataGridFilter.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Fragment, useRef, useState, useEffect } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport {\n DataGridColumnMetadata,\n Filter,\n FilterEditorMode,\n FiltersState,\n PopoverTranslations,\n TagTranslations\n} from \"./DataGridFilters.interfaces\";\nimport { generateID } from \"../../../util/helper\";\nimport { DataGridFilterTag } from \"./DataGridFilterTag\";\nimport { DataGridFilterPopover } from \"./DataGridFilterPopover\";\nimport { useDataGridFilter } from \"./DataGridFilterService\";\n\nexport type Props = {\n mode: FilterEditorMode;\n domRoot?: HTMLElement;\n filter?: Filter;\n columnsMetadata: DataGridColumnMetadata[];\n onFilterAdd?: (filter: Filter) => void;\n onFilterEdit?: (filter: Filter) => void;\n onFilterDelete?: (id: string) => void;\n tagTranslations?: TagTranslations;\n popoverTranslations?: PopoverTranslations;\n customEditTagContent?: React.ReactElement;\n filterState: FiltersState;\n};\n\nexport const DataGridFilter = ({\n mode,\n filter,\n domRoot,\n columnsMetadata,\n onFilterAdd,\n onFilterEdit,\n onFilterDelete,\n tagTranslations,\n popoverTranslations,\n customEditTagContent,\n filterState\n}: Props) => {\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n\n const [filterOpen, setFilterOpen] = useState(false);\n const wasOpenRef = useRef(false);\n\n useEffect(() => {\n if (!filterOpen && wasOpenRef.current) {\n triggerRef.current?.focus();\n }\n wasOpenRef.current = filterOpen;\n }, [filterOpen]);\n\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n const {\n resetFields,\n operator,\n setOperator,\n operators,\n setOperators,\n column,\n setColumn,\n values,\n setValues,\n pickedValues,\n setPickedValues,\n initialiseFilterValues,\n allowedColumnsMetaData\n } = useDataGridFilter(mode, columnsMetadata, filterState);\n\n const onFilterSubmit = () => {\n if (mode === \"ADD\") {\n const id = generateID();\n onFilterAdd && onFilterAdd({ id, column, operator, value: pickedValues });\n } else if (mode === \"EDIT\" && filter) {\n const { id } = filter;\n onFilterEdit && onFilterEdit({ id, column, operator, value: pickedValues });\n }\n\n resetFields();\n setFilterOpen(false);\n };\n\n const onFilterRemove = () => {\n if (!filter) {\n return;\n }\n\n const { id } = filter;\n onFilterDelete && onFilterDelete(id);\n\n resetFields();\n setFilterOpen(false);\n };\n const onFilterOpen = () => {\n setFilterOpen(!filterOpen);\n if (!filterOpen) {\n initialiseFilterValues(filter);\n }\n };\n\n return (\n <Fragment>\n <DataGridFilterTag\n mode={mode}\n onFilterOpen={onFilterOpen}\n onFilterRemove={onFilterRemove}\n triggerRef={triggerRef}\n ref={wrappingDivRef}\n filter={filter}\n translations={tagTranslations}\n customEditTagContent={customEditTagContent}\n columnsMetadata={columnsMetadata}\n />\n {createPortal(\n <DataGridFilterPopover\n popoverRef={popoverRef}\n anchorRef={wrappingDivRef}\n isOpen={filterOpen}\n translations={popoverTranslations}\n column={column}\n columnsMetadata={allowedColumnsMetaData}\n values={values}\n pickedValues={pickedValues}\n operator={operator}\n operators={operators}\n onFilterSubmit={onFilterSubmit}\n resetFields={resetFields}\n setFilterOpen={setFilterOpen}\n setColumn={setColumn}\n setOperator={setOperator}\n setOperators={setOperators}\n setValues={setValues}\n setPickedValues={setPickedValues}\n />,\n root\n )}\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8CO,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAa;AACX,QAAM,iBAAiB,OAAuB,IAAI;AAClD,QAAM,aAAa,OAA0B,IAAI;AACjD,QAAM,aAAa,OAAuB,IAAI;AAE9C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,aAAa,OAAO,KAAK;AAE/B,YAAU,MAAM;;AACd,QAAI,CAAC,cAAc,WAAW,SAAS;AACrC,uBAAW,YAAX,mBAAoB;AAAA,IACtB;AACA,eAAW,UAAU;AAAA,EACvB,GAAG,CAAC,UAAU,CAAC;AAEf,QAAM,EAAE,KAAA,IAAS,cAAc,SAAS,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,kBAAkB,MAAM,iBAAiB,WAAW;AAExD,QAAM,iBAAiB,MAAM;AAC3B,QAAI,SAAS,OAAO;AAClB,YAAM,KAAK,WAAA;AACX,qBAAe,YAAY,EAAE,IAAI,QAAQ,UAAU,OAAO,cAAc;AAAA,IAC1E,WAAW,SAAS,UAAU,QAAQ;AACpC,YAAM,EAAE,OAAO;AACf,sBAAgB,aAAa,EAAE,IAAI,QAAQ,UAAU,OAAO,cAAc;AAAA,IAC5E;AAEA,gBAAA;AACA,kBAAc,KAAK;AAAA,EACrB;AAEA,QAAM,iBAAiB,MAAM;AAC3B,QAAI,CAAC,QAAQ;AACX;AAAA,IACF;AAEA,UAAM,EAAE,OAAO;AACf,sBAAkB,eAAe,EAAE;AAEnC,gBAAA;AACA,kBAAc,KAAK;AAAA,EACrB;AACA,QAAM,eAAe,MAAM;AACzB,kBAAc,CAAC,UAAU;AACzB,QAAI,CAAC,YAAY;AACf,6BAAuB,MAAM;AAAA,IAC/B;AAAA,EACF;AAEA,6CACG,UAAA,MACC,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,KAAK;AAAA,MACL;AAAA,MACA,cAAc;AAAA,MACd;AAAA,MACA;AAAA,IAAA;AAAA,EAAA,GAED;AAAA,IACC,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,cAAc;AAAA,QACd;AAAA,QACA,iBAAiB;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF;AAAA,EAAA,CAEJ;AAEJ;"}
@@ -1,3 +1,3 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.DataGridFilter_sr-only_7l1Pc{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.DataGridFilter_hidden_7l1Pc{display:none}.DataGridFilter_slide-in_7l1Pc{animation:DataGridFilter_slide-in_7l1Pc .5s forwards}@media (prefers-reduced-motion: reduce){.DataGridFilter_slide-in_7l1Pc{animation-duration:.1ms}}.DataGridFilter_slide-out_7l1Pc{animation:DataGridFilter_slide-out_7l1Pc .5s forwards}@media (prefers-reduced-motion: reduce){.DataGridFilter_slide-out_7l1Pc{animation-duration:.1ms}}@keyframes DataGridFilter_slide-in_7l1Pc{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes DataGridFilter_slide-out_7l1Pc{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.DataGridFilter_filter-wrapper_7l1Pc{display:flex;justify-content:center;align-items:center;gap:.375rem;min-height:1.5rem;padding:.25rem .75rem .25rem .5rem;border-radius:3.125rem;background-color:var(--color-blue-grey100)}.DataGridFilter_filter-wrapper_7l1Pc:hover{background-color:var(--color-blue-grey200)}.DataGridFilter_filter-wrapper_7l1Pc:active{background-color:var(--color-primary100)}.DataGridFilter_filter-wrapper_7l1Pc .DataGridFilter_filter-button_7l1Pc{display:flex;justify-content:flex-start;align-items:center;gap:.375rem;background:none;border:none;padding:0 .25rem;cursor:pointer}.DataGridFilter_filter-wrapper_7l1Pc .DataGridFilter_filter-button_7l1Pc:only-child{margin-right:-.25rem}.DataGridFilter_filter-wrapper_7l1Pc .DataGridFilter_filter-button_7l1Pc:focus-visible{outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:0;border-radius:var(--focus-border-radius)}.DataGridFilter_filter-wrapper_7l1Pc .DataGridFilter_remove-button_7l1Pc{border-radius:1.25rem}.DataGridFilter_filter-wrapper_7l1Pc .DataGridFilter_caption_7l1Pc{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);margin:0;font-weight:400}.DataGridFilter_filter-wrapper_7l1Pc .DataGridFilter_caption_7l1Pc.DataGridFilter_bold_7l1Pc{font-weight:600}.DataGridFilter_filter-wrapper_7l1Pc .DataGridFilter_remove-icon_7l1Pc{font-size:calc(.6 * var(--font-size))}.DataGridFilter_column-select-option_7l1Pc{text-transform:capitalize}.DataGridFilter_popover_7l1Pc{display:flex;flex-direction:column;align-items:flex-start;gap:1rem;padding:1rem .75rem;min-width:40rem}.DataGridFilter_popover_7l1Pc .DataGridFilter_controls_7l1Pc{width:100%;display:flex;gap:1rem}.DataGridFilter_popover_7l1Pc .DataGridFilter_controls_7l1Pc>*:first-child{flex-grow:1.8;flex-shrink:0;margin-top:0}.DataGridFilter_popover_7l1Pc .DataGridFilter_controls_7l1Pc>*:nth-child(2){flex-grow:1;flex-shrink:0;margin-top:0}.DataGridFilter_popover_7l1Pc .DataGridFilter_controls_7l1Pc>*:last-child{flex-basis:15rem;flex-grow:1.8;flex-shrink:0;margin-top:0}.DataGridFilter_popover_7l1Pc .DataGridFilter_actions_7l1Pc{display:flex;gap:1rem}')),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="DataGridFilter_caption_7l1Pc",e="DataGridFilter_popover_7l1Pc",o="DataGridFilter_controls_7l1Pc",r="DataGridFilter_actions_7l1Pc",l={"filter-wrapper":"DataGridFilter_filter-wrapper_7l1Pc","filter-button":"DataGridFilter_filter-button_7l1Pc","remove-button":"DataGridFilter_remove-button_7l1Pc",caption:t,"column-select-option":"DataGridFilter_column-select-option_7l1Pc",popover:e,controls:o,actions:r};exports.actions=r,exports.caption=t,exports.controls=o,exports.default=l,exports.popover=e;
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.DataGridFilter_sr-only_SI2V3{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.DataGridFilter_hidden_SI2V3{display:none}.DataGridFilter_slide-in_SI2V3{animation:DataGridFilter_slide-in_SI2V3 .5s forwards}@media(prefers-reduced-motion:reduce){.DataGridFilter_slide-in_SI2V3{animation-duration:.1ms}}.DataGridFilter_slide-out_SI2V3{animation:DataGridFilter_slide-out_SI2V3 .5s forwards}@media(prefers-reduced-motion:reduce){.DataGridFilter_slide-out_SI2V3{animation-duration:.1ms}}@keyframes DataGridFilter_slide-in_SI2V3{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes DataGridFilter_slide-out_SI2V3{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.DataGridFilter_filter-wrapper_SI2V3{display:flex;justify-content:center;align-items:center;gap:.375rem;min-height:1.5rem;padding:.25rem .75rem .25rem .5rem;border-radius:3.125rem;background-color:var(--color-blue-grey100)}.DataGridFilter_filter-wrapper_SI2V3:hover{background-color:var(--color-blue-grey200)}.DataGridFilter_filter-wrapper_SI2V3:active{background-color:var(--color-primary100)}.DataGridFilter_filter-wrapper_SI2V3 .DataGridFilter_filter-button_SI2V3{display:flex;justify-content:flex-start;align-items:center;gap:.375rem;background:none;border:none;padding:0 .25rem;cursor:pointer}.DataGridFilter_filter-wrapper_SI2V3 .DataGridFilter_filter-button_SI2V3:only-child{margin-right:-.25rem}.DataGridFilter_filter-wrapper_SI2V3 .DataGridFilter_filter-button_SI2V3:focus-visible{outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:0;border-radius:var(--focus-border-radius)}.DataGridFilter_filter-wrapper_SI2V3 .DataGridFilter_remove-button_SI2V3{border-radius:1.25rem}.DataGridFilter_filter-wrapper_SI2V3 .DataGridFilter_caption_SI2V3{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);margin:0;font-weight:400}.DataGridFilter_filter-wrapper_SI2V3 .DataGridFilter_caption_SI2V3.DataGridFilter_bold_SI2V3{font-weight:600}.DataGridFilter_filter-wrapper_SI2V3 .DataGridFilter_remove-icon_SI2V3{font-size:calc(.6 * var(--font-size))}.DataGridFilter_column-select-option_SI2V3{text-transform:capitalize}.DataGridFilter_popover_SI2V3{display:flex;flex-direction:column;align-items:flex-start;gap:1rem;padding:1rem .75rem;min-width:40rem}.DataGridFilter_popover_SI2V3 .DataGridFilter_controls_SI2V3{width:100%;display:flex;gap:1rem}.DataGridFilter_popover_SI2V3 .DataGridFilter_controls_SI2V3>*:first-child{flex-grow:1.8;flex-shrink:0;margin-top:0}.DataGridFilter_popover_SI2V3 .DataGridFilter_controls_SI2V3>*:nth-child(2){flex-grow:1;flex-shrink:0;margin-top:0}.DataGridFilter_popover_SI2V3 .DataGridFilter_controls_SI2V3>*:last-child{flex-basis:15rem;flex-grow:1.8;flex-shrink:0;margin-top:0}.DataGridFilter_popover_SI2V3 .DataGridFilter_actions_SI2V3{display:flex;gap:1rem}')),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="DataGridFilter_caption_SI2V3",e="DataGridFilter_popover_SI2V3",o="DataGridFilter_controls_SI2V3",r="DataGridFilter_actions_SI2V3",i={"filter-wrapper":"DataGridFilter_filter-wrapper_SI2V3","filter-button":"DataGridFilter_filter-button_SI2V3","remove-button":"DataGridFilter_remove-button_SI2V3",caption:t,"column-select-option":"DataGridFilter_column-select-option_SI2V3",popover:e,controls:o,actions:r};exports.actions=r,exports.caption=t,exports.controls=o,exports.default=i,exports.popover=e;
3
3
  //# sourceMappingURL=DataGridFilter.module.scss.cjs.js.map