@coveord/plasma-mantine 53.1.0 → 53.1.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 (252) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/.turbo/turbo-test.log +35 -35
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/cjs/components/action-icon/ActionIcon.js +1 -1
  5. package/dist/cjs/components/action-icon/ActionIcon.js.map +1 -1
  6. package/dist/cjs/components/action-icon/index.js.map +1 -1
  7. package/dist/cjs/components/blank-slate/BlankSlate.js +1 -1
  8. package/dist/cjs/components/blank-slate/BlankSlate.js.map +1 -1
  9. package/dist/cjs/components/blank-slate/index.js.map +1 -1
  10. package/dist/cjs/components/browser-preview/BrowserPreview.js.map +1 -1
  11. package/dist/cjs/components/browser-preview/index.js.map +1 -1
  12. package/dist/cjs/components/button/Button.js +3 -3
  13. package/dist/cjs/components/button/Button.js.map +1 -1
  14. package/dist/cjs/components/button/ButtonWithDisabledTooltip.js +3 -3
  15. package/dist/cjs/components/button/ButtonWithDisabledTooltip.js.map +1 -1
  16. package/dist/cjs/components/button/index.js.map +1 -1
  17. package/dist/cjs/components/code-editor/CodeEditor.js +15 -18
  18. package/dist/cjs/components/code-editor/CodeEditor.js.map +1 -1
  19. package/dist/cjs/components/code-editor/index.js.map +1 -1
  20. package/dist/cjs/components/code-editor/languages/xml.js +5 -5
  21. package/dist/cjs/components/code-editor/languages/xml.js.map +1 -1
  22. package/dist/cjs/components/code-editor/search/Search.js +2 -2
  23. package/dist/cjs/components/code-editor/search/Search.js.map +1 -1
  24. package/dist/cjs/components/code-editor/search/index.js.map +1 -1
  25. package/dist/cjs/components/collection/Collection.js +16 -22
  26. package/dist/cjs/components/collection/Collection.js.map +1 -1
  27. package/dist/cjs/components/collection/CollectionContext.js +1 -1
  28. package/dist/cjs/components/collection/CollectionContext.js.map +1 -1
  29. package/dist/cjs/components/collection/CollectionItem.js +5 -5
  30. package/dist/cjs/components/collection/CollectionItem.js.map +1 -1
  31. package/dist/cjs/components/collection/enhanceWithCollectionProps.js.map +1 -1
  32. package/dist/cjs/components/collection/index.js.map +1 -1
  33. package/dist/cjs/components/copyToClipboard/CopyToClipboard.js +4 -5
  34. package/dist/cjs/components/copyToClipboard/CopyToClipboard.js.map +1 -1
  35. package/dist/cjs/components/copyToClipboard/index.js.map +1 -1
  36. package/dist/cjs/components/date-range-picker/DateRangePickerInlineCalendar.js +2 -2
  37. package/dist/cjs/components/date-range-picker/DateRangePickerInlineCalendar.js.map +1 -1
  38. package/dist/cjs/components/date-range-picker/DateRangePickerPopoverCalendar.js +2 -3
  39. package/dist/cjs/components/date-range-picker/DateRangePickerPopoverCalendar.js.map +1 -1
  40. package/dist/cjs/components/date-range-picker/DateRangePickerPresetSelect.js +1 -2
  41. package/dist/cjs/components/date-range-picker/DateRangePickerPresetSelect.js.map +1 -1
  42. package/dist/cjs/components/date-range-picker/EditableDateRangePicker.js +10 -13
  43. package/dist/cjs/components/date-range-picker/EditableDateRangePicker.js.map +1 -1
  44. package/dist/cjs/components/date-range-picker/index.js.map +1 -1
  45. package/dist/cjs/components/header/Header.context.js +1 -1
  46. package/dist/cjs/components/header/Header.context.js.map +1 -1
  47. package/dist/cjs/components/header/Header.js +11 -11
  48. package/dist/cjs/components/header/Header.js.map +1 -1
  49. package/dist/cjs/components/header/HeaderActions/HeaderActions.js +3 -3
  50. package/dist/cjs/components/header/HeaderActions/HeaderActions.js.map +1 -1
  51. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbs.js +2 -2
  52. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbs.js.map +1 -1
  53. package/dist/cjs/components/header/HeaderDocAnchor/HeaderDocAnchor.js +4 -4
  54. package/dist/cjs/components/header/HeaderDocAnchor/HeaderDocAnchor.js.map +1 -1
  55. package/dist/cjs/components/header/index.js.map +1 -1
  56. package/dist/cjs/components/index.js.map +1 -1
  57. package/dist/cjs/components/inline-confirm/InlineConfirm.js +1 -1
  58. package/dist/cjs/components/inline-confirm/InlineConfirm.js.map +1 -1
  59. package/dist/cjs/components/inline-confirm/InlineConfirmContext.js +1 -1
  60. package/dist/cjs/components/inline-confirm/InlineConfirmContext.js.map +1 -1
  61. package/dist/cjs/components/inline-confirm/InlineConfirmPrompt.js +9 -9
  62. package/dist/cjs/components/inline-confirm/InlineConfirmPrompt.js.map +1 -1
  63. package/dist/cjs/components/inline-confirm/InlineConfirmTarget.js +1 -2
  64. package/dist/cjs/components/inline-confirm/InlineConfirmTarget.js.map +1 -1
  65. package/dist/cjs/components/inline-confirm/index.js.map +1 -1
  66. package/dist/cjs/components/menu/Menu.js +3 -3
  67. package/dist/cjs/components/menu/Menu.js.map +1 -1
  68. package/dist/cjs/components/menu/index.js.map +1 -1
  69. package/dist/cjs/components/prompt/Prompt.js.map +1 -1
  70. package/dist/cjs/components/prompt/PromptFooter.js +2 -2
  71. package/dist/cjs/components/prompt/PromptFooter.js.map +1 -1
  72. package/dist/cjs/components/prompt/index.js.map +1 -1
  73. package/dist/cjs/components/sticky-footer/StickyFooter.js +5 -5
  74. package/dist/cjs/components/sticky-footer/StickyFooter.js.map +1 -1
  75. package/dist/cjs/components/sticky-footer/index.js.map +1 -1
  76. package/dist/cjs/components/table/Table.js +18 -21
  77. package/dist/cjs/components/table/Table.js.map +1 -1
  78. package/dist/cjs/components/table/Table.types.js.map +1 -1
  79. package/dist/cjs/components/table/TableContext.js +5 -5
  80. package/dist/cjs/components/table/TableContext.js.map +1 -1
  81. package/dist/cjs/components/table/index.js.map +1 -1
  82. package/dist/cjs/components/table/layouts/TableLayoutControl.js +1 -1
  83. package/dist/cjs/components/table/layouts/TableLayoutControl.js.map +1 -1
  84. package/dist/cjs/components/table/layouts/TableLayouts.js.map +1 -1
  85. package/dist/cjs/components/table/layouts/row-layout/RowLayout.js +3 -3
  86. package/dist/cjs/components/table/layouts/row-layout/RowLayout.js.map +1 -1
  87. package/dist/cjs/components/table/layouts/row-layout/RowLayoutBody.js +10 -12
  88. package/dist/cjs/components/table/layouts/row-layout/RowLayoutBody.js.map +1 -1
  89. package/dist/cjs/components/table/layouts/row-layout/RowLayoutContext.js +1 -1
  90. package/dist/cjs/components/table/layouts/row-layout/RowLayoutContext.js.map +1 -1
  91. package/dist/cjs/components/table/layouts/row-layout/RowLayoutHeader.js +2 -2
  92. package/dist/cjs/components/table/layouts/row-layout/RowLayoutHeader.js.map +1 -1
  93. package/dist/cjs/components/table/layouts/row-layout/RowLayoutIcon.js +2 -2
  94. package/dist/cjs/components/table/layouts/row-layout/RowLayoutIcon.js.map +1 -1
  95. package/dist/cjs/components/table/table-actions/TableActions.js +3 -3
  96. package/dist/cjs/components/table/table-actions/TableActions.js.map +1 -1
  97. package/dist/cjs/components/table/table-column/TableCollapsibleColumn.js +8 -9
  98. package/dist/cjs/components/table/table-column/TableCollapsibleColumn.js.map +1 -1
  99. package/dist/cjs/components/table/table-column/TableSelectableColumn.js +4 -8
  100. package/dist/cjs/components/table/table-column/TableSelectableColumn.js.map +1 -1
  101. package/dist/cjs/components/table/table-columns-selector/TableColumnsSelector.js +10 -11
  102. package/dist/cjs/components/table/table-columns-selector/TableColumnsSelector.js.map +1 -1
  103. package/dist/cjs/components/table/table-consumer/TableConsumer.js.map +1 -1
  104. package/dist/cjs/components/table/table-date-range-picker/TableDateRangePicker.js +5 -5
  105. package/dist/cjs/components/table/table-date-range-picker/TableDateRangePicker.js.map +1 -1
  106. package/dist/cjs/components/table/table-filter/TableFilter.js +6 -6
  107. package/dist/cjs/components/table/table-filter/TableFilter.js.map +1 -1
  108. package/dist/cjs/components/table/table-footer/TableFooter.js +2 -2
  109. package/dist/cjs/components/table/table-footer/TableFooter.js.map +1 -1
  110. package/dist/cjs/components/table/table-header/TableHeader.js +6 -6
  111. package/dist/cjs/components/table/table-header/TableHeader.js.map +1 -1
  112. package/dist/cjs/components/table/table-header/Th.js +7 -7
  113. package/dist/cjs/components/table/table-header/Th.js.map +1 -1
  114. package/dist/cjs/components/table/table-last-updated/TableLastUpdated.js +5 -5
  115. package/dist/cjs/components/table/table-last-updated/TableLastUpdated.js.map +1 -1
  116. package/dist/cjs/components/table/table-loading/TableLoading.js.map +1 -1
  117. package/dist/cjs/components/table/table-pagination/TablePagination.js +9 -10
  118. package/dist/cjs/components/table/table-pagination/TablePagination.js.map +1 -1
  119. package/dist/cjs/components/table/table-pagination/TablePagination.types.js.map +1 -1
  120. package/dist/cjs/components/table/table-per-page/TablePerPage.js +3 -5
  121. package/dist/cjs/components/table/table-per-page/TablePerPage.js.map +1 -1
  122. package/dist/cjs/components/table/table-per-page/TablePerPage.types.js.map +1 -1
  123. package/dist/cjs/components/table/table-predicate/TablePredicate.js +6 -6
  124. package/dist/cjs/components/table/table-predicate/TablePredicate.js.map +1 -1
  125. package/dist/cjs/hooks/index.js.map +1 -1
  126. package/dist/cjs/hooks/useClickWithLoading.js +2 -2
  127. package/dist/cjs/hooks/useClickWithLoading.js.map +1 -1
  128. package/dist/cjs/hooks/useControlledList.js +3 -6
  129. package/dist/cjs/hooks/useControlledList.js.map +1 -1
  130. package/dist/cjs/hooks/useParentHeight.js.map +1 -1
  131. package/dist/cjs/hooks/useRowSelection.js +5 -6
  132. package/dist/cjs/hooks/useRowSelection.js.map +1 -1
  133. package/dist/cjs/index.js +6 -6
  134. package/dist/cjs/index.js.map +1 -1
  135. package/dist/cjs/theme/PlasmaColors.js.map +1 -1
  136. package/dist/cjs/theme/Plasmantine.js.map +1 -1
  137. package/dist/cjs/theme/Theme.js +48 -48
  138. package/dist/cjs/theme/Theme.js.map +1 -1
  139. package/dist/cjs/theme/index.js.map +1 -1
  140. package/dist/cjs/theme/mergeCSSVariablesResolvers.js.map +1 -1
  141. package/dist/cjs/theme/plasmaCSSVariablesResolver.js +2 -2
  142. package/dist/cjs/theme/plasmaCSSVariablesResolver.js.map +1 -1
  143. package/dist/cjs/types/css/index.d.js.map +1 -1
  144. package/dist/cjs/utils/createFactoryComponent.js.map +1 -1
  145. package/dist/cjs/utils/createPolymorphicComponent.js.map +1 -1
  146. package/dist/cjs/utils/index.js.map +1 -1
  147. package/dist/cjs/utils/overrideComponent.js.map +1 -1
  148. package/dist/cjs/vars/Notification.vars.js +3 -3
  149. package/dist/cjs/vars/Notification.vars.js.map +1 -1
  150. package/dist/cjs/vars/Text.vars.js +1 -1
  151. package/dist/cjs/vars/Text.vars.js.map +1 -1
  152. package/dist/esm/components/action-icon/ActionIcon.js.map +1 -1
  153. package/dist/esm/components/action-icon/index.js.map +1 -1
  154. package/dist/esm/components/blank-slate/BlankSlate.js.map +1 -1
  155. package/dist/esm/components/blank-slate/index.js.map +1 -1
  156. package/dist/esm/components/browser-preview/BrowserPreview.js.map +1 -1
  157. package/dist/esm/components/browser-preview/index.js.map +1 -1
  158. package/dist/esm/components/button/Button.js.map +1 -1
  159. package/dist/esm/components/button/ButtonWithDisabledTooltip.js.map +1 -1
  160. package/dist/esm/components/button/index.js.map +1 -1
  161. package/dist/esm/components/code-editor/CodeEditor.js +1 -1
  162. package/dist/esm/components/code-editor/CodeEditor.js.map +1 -1
  163. package/dist/esm/components/code-editor/index.js.map +1 -1
  164. package/dist/esm/components/code-editor/languages/xml.js.map +1 -1
  165. package/dist/esm/components/code-editor/search/Search.js.map +1 -1
  166. package/dist/esm/components/code-editor/search/index.js.map +1 -1
  167. package/dist/esm/components/collection/Collection.js.map +1 -1
  168. package/dist/esm/components/collection/CollectionContext.js.map +1 -1
  169. package/dist/esm/components/collection/CollectionItem.js.map +1 -1
  170. package/dist/esm/components/collection/enhanceWithCollectionProps.js.map +1 -1
  171. package/dist/esm/components/collection/index.js.map +1 -1
  172. package/dist/esm/components/copyToClipboard/CopyToClipboard.js.map +1 -1
  173. package/dist/esm/components/copyToClipboard/index.js.map +1 -1
  174. package/dist/esm/components/date-range-picker/DateRangePickerInlineCalendar.js.map +1 -1
  175. package/dist/esm/components/date-range-picker/DateRangePickerPopoverCalendar.js.map +1 -1
  176. package/dist/esm/components/date-range-picker/DateRangePickerPresetSelect.js.map +1 -1
  177. package/dist/esm/components/date-range-picker/EditableDateRangePicker.js.map +1 -1
  178. package/dist/esm/components/date-range-picker/index.js.map +1 -1
  179. package/dist/esm/components/header/Header.context.js.map +1 -1
  180. package/dist/esm/components/header/Header.js.map +1 -1
  181. package/dist/esm/components/header/HeaderActions/HeaderActions.js.map +1 -1
  182. package/dist/esm/components/header/HeaderBreadcrumbs/HeaderBreadcrumbs.js.map +1 -1
  183. package/dist/esm/components/header/HeaderDocAnchor/HeaderDocAnchor.js.map +1 -1
  184. package/dist/esm/components/header/index.js.map +1 -1
  185. package/dist/esm/components/index.js.map +1 -1
  186. package/dist/esm/components/inline-confirm/InlineConfirm.js.map +1 -1
  187. package/dist/esm/components/inline-confirm/InlineConfirmContext.js.map +1 -1
  188. package/dist/esm/components/inline-confirm/InlineConfirmPrompt.js.map +1 -1
  189. package/dist/esm/components/inline-confirm/InlineConfirmTarget.js.map +1 -1
  190. package/dist/esm/components/inline-confirm/index.js.map +1 -1
  191. package/dist/esm/components/menu/Menu.js.map +1 -1
  192. package/dist/esm/components/menu/index.js.map +1 -1
  193. package/dist/esm/components/prompt/Prompt.js.map +1 -1
  194. package/dist/esm/components/prompt/PromptFooter.js.map +1 -1
  195. package/dist/esm/components/prompt/index.js.map +1 -1
  196. package/dist/esm/components/sticky-footer/StickyFooter.js.map +1 -1
  197. package/dist/esm/components/sticky-footer/index.js.map +1 -1
  198. package/dist/esm/components/table/Table.js.map +1 -1
  199. package/dist/esm/components/table/Table.types.js.map +1 -1
  200. package/dist/esm/components/table/TableContext.js.map +1 -1
  201. package/dist/esm/components/table/index.js.map +1 -1
  202. package/dist/esm/components/table/layouts/TableLayoutControl.js.map +1 -1
  203. package/dist/esm/components/table/layouts/TableLayouts.js.map +1 -1
  204. package/dist/esm/components/table/layouts/row-layout/RowLayout.js.map +1 -1
  205. package/dist/esm/components/table/layouts/row-layout/RowLayoutBody.js.map +1 -1
  206. package/dist/esm/components/table/layouts/row-layout/RowLayoutContext.js.map +1 -1
  207. package/dist/esm/components/table/layouts/row-layout/RowLayoutHeader.js.map +1 -1
  208. package/dist/esm/components/table/layouts/row-layout/RowLayoutIcon.js.map +1 -1
  209. package/dist/esm/components/table/table-actions/TableActions.js.map +1 -1
  210. package/dist/esm/components/table/table-column/TableCollapsibleColumn.js.map +1 -1
  211. package/dist/esm/components/table/table-column/TableSelectableColumn.js +2 -6
  212. package/dist/esm/components/table/table-column/TableSelectableColumn.js.map +1 -1
  213. package/dist/esm/components/table/table-columns-selector/TableColumnsSelector.js.map +1 -1
  214. package/dist/esm/components/table/table-consumer/TableConsumer.js.map +1 -1
  215. package/dist/esm/components/table/table-date-range-picker/TableDateRangePicker.js.map +1 -1
  216. package/dist/esm/components/table/table-filter/TableFilter.js.map +1 -1
  217. package/dist/esm/components/table/table-footer/TableFooter.js.map +1 -1
  218. package/dist/esm/components/table/table-header/TableHeader.js.map +1 -1
  219. package/dist/esm/components/table/table-header/Th.js.map +1 -1
  220. package/dist/esm/components/table/table-last-updated/TableLastUpdated.js.map +1 -1
  221. package/dist/esm/components/table/table-loading/TableLoading.js.map +1 -1
  222. package/dist/esm/components/table/table-pagination/TablePagination.js +1 -1
  223. package/dist/esm/components/table/table-pagination/TablePagination.js.map +1 -1
  224. package/dist/esm/components/table/table-pagination/TablePagination.types.js.map +1 -1
  225. package/dist/esm/components/table/table-per-page/TablePerPage.js.map +1 -1
  226. package/dist/esm/components/table/table-per-page/TablePerPage.types.js.map +1 -1
  227. package/dist/esm/components/table/table-predicate/TablePredicate.js.map +1 -1
  228. package/dist/esm/hooks/index.js.map +1 -1
  229. package/dist/esm/hooks/useClickWithLoading.js.map +1 -1
  230. package/dist/esm/hooks/useControlledList.js.map +1 -1
  231. package/dist/esm/hooks/useParentHeight.js.map +1 -1
  232. package/dist/esm/hooks/useRowSelection.js.map +1 -1
  233. package/dist/esm/index.js.map +1 -1
  234. package/dist/esm/theme/PlasmaColors.js.map +1 -1
  235. package/dist/esm/theme/Plasmantine.js.map +1 -1
  236. package/dist/esm/theme/Theme.js.map +1 -1
  237. package/dist/esm/theme/index.js.map +1 -1
  238. package/dist/esm/theme/mergeCSSVariablesResolvers.js.map +1 -1
  239. package/dist/esm/theme/plasmaCSSVariablesResolver.js.map +1 -1
  240. package/dist/esm/types/css/index.d.js.map +1 -1
  241. package/dist/esm/utils/createFactoryComponent.js.map +1 -1
  242. package/dist/esm/utils/createPolymorphicComponent.js.map +1 -1
  243. package/dist/esm/utils/index.js.map +1 -1
  244. package/dist/esm/utils/overrideComponent.js.map +1 -1
  245. package/dist/esm/vars/Notification.vars.js.map +1 -1
  246. package/dist/esm/vars/Text.vars.js.map +1 -1
  247. package/package.json +31 -31
  248. package/src/__tests__/VitestSetup.ts +1 -1
  249. package/src/components/code-editor/CodeEditor.tsx +1 -1
  250. package/src/components/table/__tests__/TablePagination.spec.tsx +22 -0
  251. package/src/components/table/table-column/TableSelectableColumn.tsx +2 -2
  252. package/src/components/table/table-pagination/TablePagination.tsx +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/menu/Menu.tsx"],"sourcesContent":["import {Menu as MantineMenu, MenuItemProps as MantineMenuItemProps} from '@mantine/core';\nimport {forwardRef} from 'react';\n\nimport {createPolymorphicComponent, overrideComponent} from '../../utils';\nimport {ButtonWithDisabledTooltipProps} from '../button';\nimport {ButtonWithDisabledTooltip} from '../button/ButtonWithDisabledTooltip';\n\nexport interface MenuItemProps extends MantineMenuItemProps, ButtonWithDisabledTooltipProps {}\n\nconst _MenuItem = forwardRef<HTMLButtonElement, MenuItemProps>(\n ({disabledTooltip, disabled, disabledTooltipProps, ...others}, ref) => (\n <ButtonWithDisabledTooltip\n disabled={disabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n >\n <MantineMenu.Item ref={ref} disabled={disabled} {...others} />\n </ButtonWithDisabledTooltip>\n ),\n);\n\nconst MenuItem = createPolymorphicComponent<'button', MenuItemProps>(_MenuItem);\n\nexport const Menu = overrideComponent(MantineMenu, {\n displayName: '@coveord/plasma-mantine/Menu',\n Item: MenuItem,\n});\n"],"names":["Menu","MantineMenu","forwardRef","createPolymorphicComponent","overrideComponent","ButtonWithDisabledTooltip","_MenuItem","disabledTooltip","disabled","disabledTooltipProps","others","ref","Item","MenuItem","displayName"],"mappings":";AAAA,SAAQA,QAAQC,WAAW,QAA8C,gBAAgB;AACzF,SAAQC,UAAU,QAAO,QAAQ;AAEjC,SAAQC,0BAA0B,EAAEC,iBAAiB,QAAO,cAAc;AAE1E,SAAQC,yBAAyB,QAAO,sCAAsC;AAI9E,MAAMC,0BAAYJ,WACd,CAAC,EAACK,eAAe,EAAEC,QAAQ,EAAEC,oBAAoB,EAAE,GAAGC,QAAO,EAAEC,oBAC3D,KAACN;QACGG,UAAUA;QACVD,iBAAiBA;QACjBE,sBAAsBA;kBAEtB,cAAA,KAACR,YAAYW,IAAI;YAACD,KAAKA;YAAKH,UAAUA;YAAW,GAAGE,MAAM;;;AAKtE,MAAMG,WAAWV,2BAAoDG;AAErE,OAAO,MAAMN,OAAOI,kBAAkBH,aAAa;IAC/Ca,aAAa;IACbF,MAAMC;AACV,GAAG"}
1
+ {"version":3,"sources":["../../../../src/components/menu/Menu.tsx"],"sourcesContent":["import {Menu as MantineMenu, MenuItemProps as MantineMenuItemProps} from '@mantine/core';\nimport {forwardRef} from 'react';\n\nimport {createPolymorphicComponent, overrideComponent} from '../../utils';\nimport {ButtonWithDisabledTooltipProps} from '../button';\nimport {ButtonWithDisabledTooltip} from '../button/ButtonWithDisabledTooltip';\n\nexport interface MenuItemProps extends MantineMenuItemProps, ButtonWithDisabledTooltipProps {}\n\nconst _MenuItem = forwardRef<HTMLButtonElement, MenuItemProps>(\n ({disabledTooltip, disabled, disabledTooltipProps, ...others}, ref) => (\n <ButtonWithDisabledTooltip\n disabled={disabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n >\n <MantineMenu.Item ref={ref} disabled={disabled} {...others} />\n </ButtonWithDisabledTooltip>\n ),\n);\n\nconst MenuItem = createPolymorphicComponent<'button', MenuItemProps>(_MenuItem);\n\nexport const Menu = overrideComponent(MantineMenu, {\n displayName: '@coveord/plasma-mantine/Menu',\n Item: MenuItem,\n});\n"],"names":["Menu","MantineMenu","forwardRef","createPolymorphicComponent","overrideComponent","ButtonWithDisabledTooltip","_MenuItem","disabledTooltip","disabled","disabledTooltipProps","others","ref","Item","MenuItem","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAAQA,QAAQC,WAAW,QAA8C,gBAAgB;AACzF,SAAQC,UAAU,QAAO,QAAQ;AAEjC,SAAQC,0BAA0B,EAAEC,iBAAiB,QAAO,cAAc;AAE1E,SAAQC,yBAAyB,QAAO,sCAAsC;AAI9E,MAAMC,0BAAYJ,WACd,CAAC,EAACK,eAAe,EAAEC,QAAQ,EAAEC,oBAAoB,EAAE,GAAGC,QAAO,EAAEC,oBAC3D,KAACN;QACGG,UAAUA;QACVD,iBAAiBA;QACjBE,sBAAsBA;kBAEtB,cAAA,KAACR,YAAYW,IAAI;YAACD,KAAKA;YAAKH,UAAUA;YAAW,GAAGE,MAAM;;;AAKtE,MAAMG,WAAWV,2BAAoDG;AAErE,OAAO,MAAMN,OAAOI,kBAAkBH,aAAa;IAC/Ca,aAAa;IACbF,MAAMC;AACV,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/menu/index.ts"],"sourcesContent":["export * from './Menu';\n"],"names":[],"mappings":"AAAA,cAAc,SAAS"}
1
+ {"version":3,"sources":["../../../../src/components/menu/index.ts"],"sourcesContent":["export * from './Menu';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/prompt/Prompt.tsx"],"sourcesContent":["import {Box, Modal, ModalProps} from '@mantine/core';\nimport {Children, ReactElement, ReactNode} from 'react';\nimport PromptClasses from './Prompt.module.css';\nimport {PromptFooter} from './PromptFooter';\n\nexport interface PromptProps extends ModalProps {\n /**\n * Controls prompt appearance\n *\n * @default \"info\"\n */\n variant?: 'success' | 'warning' | 'critical' | 'info';\n children: ReactNode;\n}\ninterface PromptType {\n (props: PromptProps): ReactElement;\n Footer: typeof PromptFooter;\n}\n\nexport const Prompt: PromptType = ({children, ...otherProps}) => {\n const {classNames: classesProps, ...otherPropsWithoutClasses} = otherProps;\n const convertedChildren = Children.toArray(children) as ReactElement[];\n\n const otherChildren = convertedChildren.filter((child) => child.type !== PromptFooter);\n const footer = convertedChildren.find((child) => child.type === PromptFooter);\n\n const classNames = {\n root: PromptClasses.root,\n header: PromptClasses.header,\n close: PromptClasses.whiteClose,\n body: PromptClasses.body,\n title: PromptClasses.title,\n };\n\n return (\n <Modal variant=\"prompt\" classNames={{...classNames, ...classesProps}} size=\"sm\" {...otherPropsWithoutClasses}>\n <Box className={PromptClasses.innerBody}>{otherChildren}</Box>\n {footer}\n </Modal>\n );\n};\n\nPrompt.Footer = PromptFooter;\n"],"names":["Box","Modal","Children","PromptClasses","PromptFooter","Prompt","children","otherProps","classNames","classesProps","otherPropsWithoutClasses","convertedChildren","toArray","otherChildren","filter","child","type","footer","find","root","header","close","whiteClose","body","title","variant","size","className","innerBody","Footer"],"mappings":";AAAA,SAAQA,GAAG,EAAEC,KAAK,QAAmB,gBAAgB;AACrD,SAAQC,QAAQ,QAAgC,QAAQ;AACxD,OAAOC,mBAAmB,sBAAsB;AAChD,SAAQC,YAAY,QAAO,iBAAiB;AAgB5C,OAAO,MAAMC,SAAqB,CAAC,EAACC,QAAQ,EAAE,GAAGC,YAAW;IACxD,MAAM,EAACC,YAAYC,YAAY,EAAE,GAAGC,0BAAyB,GAAGH;IAChE,MAAMI,oBAAoBT,SAASU,OAAO,CAACN;IAE3C,MAAMO,gBAAgBF,kBAAkBG,MAAM,CAAC,CAACC,QAAUA,MAAMC,IAAI,KAAKZ;IACzE,MAAMa,SAASN,kBAAkBO,IAAI,CAAC,CAACH,QAAUA,MAAMC,IAAI,KAAKZ;IAEhE,MAAMI,aAAa;QACfW,MAAMhB,cAAcgB,IAAI;QACxBC,QAAQjB,cAAciB,MAAM;QAC5BC,OAAOlB,cAAcmB,UAAU;QAC/BC,MAAMpB,cAAcoB,IAAI;QACxBC,OAAOrB,cAAcqB,KAAK;IAC9B;IAEA,qBACI,MAACvB;QAAMwB,SAAQ;QAASjB,YAAY;YAAC,GAAGA,UAAU;YAAE,GAAGC,YAAY;QAAA;QAAGiB,MAAK;QAAM,GAAGhB,wBAAwB;;0BACxG,KAACV;gBAAI2B,WAAWxB,cAAcyB,SAAS;0BAAGf;;YACzCI;;;AAGb,EAAE;AAEFZ,OAAOwB,MAAM,GAAGzB"}
1
+ {"version":3,"sources":["../../../../src/components/prompt/Prompt.tsx"],"sourcesContent":["import {Box, Modal, ModalProps} from '@mantine/core';\nimport {Children, ReactElement, ReactNode} from 'react';\nimport PromptClasses from './Prompt.module.css';\nimport {PromptFooter} from './PromptFooter';\n\nexport interface PromptProps extends ModalProps {\n /**\n * Controls prompt appearance\n *\n * @default \"info\"\n */\n variant?: 'success' | 'warning' | 'critical' | 'info';\n children: ReactNode;\n}\ninterface PromptType {\n (props: PromptProps): ReactElement;\n Footer: typeof PromptFooter;\n}\n\nexport const Prompt: PromptType = ({children, ...otherProps}) => {\n const {classNames: classesProps, ...otherPropsWithoutClasses} = otherProps;\n const convertedChildren = Children.toArray(children) as ReactElement[];\n\n const otherChildren = convertedChildren.filter((child) => child.type !== PromptFooter);\n const footer = convertedChildren.find((child) => child.type === PromptFooter);\n\n const classNames = {\n root: PromptClasses.root,\n header: PromptClasses.header,\n close: PromptClasses.whiteClose,\n body: PromptClasses.body,\n title: PromptClasses.title,\n };\n\n return (\n <Modal variant=\"prompt\" classNames={{...classNames, ...classesProps}} size=\"sm\" {...otherPropsWithoutClasses}>\n <Box className={PromptClasses.innerBody}>{otherChildren}</Box>\n {footer}\n </Modal>\n );\n};\n\nPrompt.Footer = PromptFooter;\n"],"names":["Box","Modal","Children","PromptClasses","PromptFooter","Prompt","children","otherProps","classNames","classesProps","otherPropsWithoutClasses","convertedChildren","toArray","otherChildren","filter","child","type","footer","find","root","header","close","whiteClose","body","title","variant","size","className","innerBody","Footer"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAAQA,GAAG,EAAEC,KAAK,QAAmB,gBAAgB;AACrD,SAAQC,QAAQ,QAAgC,QAAQ;AACxD,OAAOC,mBAAmB,sBAAsB;AAChD,SAAQC,YAAY,QAAO,iBAAiB;AAgB5C,OAAO,MAAMC,SAAqB,CAAC,EAACC,QAAQ,EAAE,GAAGC,YAAW;IACxD,MAAM,EAACC,YAAYC,YAAY,EAAE,GAAGC,0BAAyB,GAAGH;IAChE,MAAMI,oBAAoBT,SAASU,OAAO,CAACN;IAE3C,MAAMO,gBAAgBF,kBAAkBG,MAAM,CAAC,CAACC,QAAUA,MAAMC,IAAI,KAAKZ;IACzE,MAAMa,SAASN,kBAAkBO,IAAI,CAAC,CAACH,QAAUA,MAAMC,IAAI,KAAKZ;IAEhE,MAAMI,aAAa;QACfW,MAAMhB,cAAcgB,IAAI;QACxBC,QAAQjB,cAAciB,MAAM;QAC5BC,OAAOlB,cAAcmB,UAAU;QAC/BC,MAAMpB,cAAcoB,IAAI;QACxBC,OAAOrB,cAAcqB,KAAK;IAC9B;IAEA,qBACI,MAACvB;QAAMwB,SAAQ;QAASjB,YAAY;YAAC,GAAGA,UAAU;YAAE,GAAGC,YAAY;QAAA;QAAGiB,MAAK;QAAM,GAAGhB,wBAAwB;;0BACxG,KAACV;gBAAI2B,WAAWxB,cAAcyB,SAAS;0BAAGf;;YACzCI;;;AAGb,EAAE;AAEFZ,OAAOwB,MAAM,GAAGzB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/prompt/PromptFooter.tsx"],"sourcesContent":["import {FunctionComponent, PropsWithChildren} from 'react';\nimport {StickyFooter, StickyFooterProps} from '../sticky-footer';\n\nexport interface PromptFooterProps extends StickyFooterProps {}\n\nexport const PromptFooter: FunctionComponent<PropsWithChildren<PromptFooterProps>> = ({children, ...otherProps}) => (\n <StickyFooter p={0} pt=\"lg\" {...otherProps}>\n {children}\n </StickyFooter>\n);\n"],"names":["StickyFooter","PromptFooter","children","otherProps","p","pt"],"mappings":";AACA,SAAQA,YAAY,QAA0B,mBAAmB;AAIjE,OAAO,MAAMC,eAAwE,CAAC,EAACC,QAAQ,EAAE,GAAGC,YAAW,iBAC3G,KAACH;QAAaI,GAAG;QAAGC,IAAG;QAAM,GAAGF,UAAU;kBACrCD;OAEP"}
1
+ {"version":3,"sources":["../../../../src/components/prompt/PromptFooter.tsx"],"sourcesContent":["import {FunctionComponent, PropsWithChildren} from 'react';\nimport {StickyFooter, StickyFooterProps} from '../sticky-footer';\n\nexport interface PromptFooterProps extends StickyFooterProps {}\n\nexport const PromptFooter: FunctionComponent<PropsWithChildren<PromptFooterProps>> = ({children, ...otherProps}) => (\n <StickyFooter p={0} pt=\"lg\" {...otherProps}>\n {children}\n </StickyFooter>\n);\n"],"names":["StickyFooter","PromptFooter","children","otherProps","p","pt"],"rangeMappings":";;;;;;;","mappings":";AACA,SAAQA,YAAY,QAA0B,mBAAmB;AAIjE,OAAO,MAAMC,eAAwE,CAAC,EAACC,QAAQ,EAAE,GAAGC,YAAW,iBAC3G,KAACH;QAAaI,GAAG;QAAGC,IAAG;QAAM,GAAGF,UAAU;kBACrCD;OAEP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/prompt/index.ts"],"sourcesContent":["export * from './Prompt';\n"],"names":[],"mappings":"AAAA,cAAc,WAAW"}
1
+ {"version":3,"sources":["../../../../src/components/prompt/index.ts"],"sourcesContent":["export * from './Prompt';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,WAAW"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"sourcesContent":["import {Factory, Group, GroupProps, StylesApiProps, factory, useProps, useStyles} from '@mantine/core';\nimport clsx from 'clsx';\nimport {ReactNode} from 'react';\nimport classes from './StickyFooter.module.css';\n\nexport interface StickyFooterProps\n extends Omit<GroupProps, 'classNames' | 'styles' | 'vars' | 'variant'>,\n StylesApiProps<StickyFooterFactory> {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n /**\n * Footer's children, usually buttons\n */\n children?: ReactNode;\n /**\n * Use variant 'modal-footer' when rendering the `StickyFooter` inside `Modal`.\n *\n * The 'modal-footer' removes the modal's default padding so that the footer properly hugs the bottom of the modal.\n * It also adds a border on top of the footer.\n */\n variant?: 'default' | 'modal-footer';\n}\n\nexport type StickyFooterStylesNames = 'root';\n\nexport type StickyFooterFactory = Factory<{\n props: StickyFooterProps;\n ref: HTMLDivElement;\n stylesNames: StickyFooterStylesNames;\n}>;\n\nconst defaultProps: Partial<StickyFooterProps> = {\n gap: 'sm',\n justify: 'flex-end',\n};\n\nexport const StickyFooter = factory<StickyFooterFactory>((props, ref) => {\n const {borderTop, justify, gap, children, className, classNames, style, styles, unstyled, vars, ...others} =\n useProps('StickyFooter', defaultProps, props);\n const getStyles = useStyles<StickyFooterFactory>({\n name: 'StickyFooter',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const css = getStyles('root');\n\n return (\n <Group\n justify={justify}\n gap={gap}\n className={clsx(css.className, {[classes.border]: !!borderTop})}\n style={css.style}\n ref={ref}\n {...others}\n >\n {children}\n </Group>\n );\n});\n"],"names":["Group","factory","useProps","useStyles","clsx","classes","defaultProps","gap","justify","StickyFooter","props","ref","borderTop","children","className","classNames","style","styles","unstyled","vars","others","getStyles","name","css","border"],"mappings":";AAAA,SAAiBA,KAAK,EAA8BC,OAAO,EAAEC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AACvG,OAAOC,UAAU,OAAO;AAExB,OAAOC,aAAa,4BAA4B;AA8BhD,MAAMC,eAA2C;IAC7CC,KAAK;IACLC,SAAS;AACb;AAEA,OAAO,MAAMC,eAAeR,QAA6B,CAACS,OAAOC;IAC7D,MAAM,EAACC,SAAS,EAAEJ,OAAO,EAAED,GAAG,EAAEM,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC,QAAO,GACtGlB,SAAS,gBAAgBI,cAAcI;IAC3C,MAAMW,YAAYlB,UAA+B;QAC7CmB,MAAM;QACNjB;QACAK;QACAI;QACAE;QACAD;QACAE;QACAC;IACJ;IAEA,MAAMK,MAAMF,UAAU;IAEtB,qBACI,KAACrB;QACGQ,SAASA;QACTD,KAAKA;QACLO,WAAWV,KAAKmB,IAAIT,SAAS,EAAE;YAAC,CAACT,QAAQmB,MAAM,CAAC,EAAE,CAAC,CAACZ;QAAS;QAC7DI,OAAOO,IAAIP,KAAK;QAChBL,KAAKA;QACJ,GAAGS,MAAM;kBAETP;;AAGb,GAAG"}
1
+ {"version":3,"sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"sourcesContent":["import {Factory, Group, GroupProps, StylesApiProps, factory, useProps, useStyles} from '@mantine/core';\nimport clsx from 'clsx';\nimport {ReactNode} from 'react';\nimport classes from './StickyFooter.module.css';\n\nexport interface StickyFooterProps\n extends Omit<GroupProps, 'classNames' | 'styles' | 'vars' | 'variant'>,\n StylesApiProps<StickyFooterFactory> {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n /**\n * Footer's children, usually buttons\n */\n children?: ReactNode;\n /**\n * Use variant 'modal-footer' when rendering the `StickyFooter` inside `Modal`.\n *\n * The 'modal-footer' removes the modal's default padding so that the footer properly hugs the bottom of the modal.\n * It also adds a border on top of the footer.\n */\n variant?: 'default' | 'modal-footer';\n}\n\nexport type StickyFooterStylesNames = 'root';\n\nexport type StickyFooterFactory = Factory<{\n props: StickyFooterProps;\n ref: HTMLDivElement;\n stylesNames: StickyFooterStylesNames;\n}>;\n\nconst defaultProps: Partial<StickyFooterProps> = {\n gap: 'sm',\n justify: 'flex-end',\n};\n\nexport const StickyFooter = factory<StickyFooterFactory>((props, ref) => {\n const {borderTop, justify, gap, children, className, classNames, style, styles, unstyled, vars, ...others} =\n useProps('StickyFooter', defaultProps, props);\n const getStyles = useStyles<StickyFooterFactory>({\n name: 'StickyFooter',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const css = getStyles('root');\n\n return (\n <Group\n justify={justify}\n gap={gap}\n className={clsx(css.className, {[classes.border]: !!borderTop})}\n style={css.style}\n ref={ref}\n {...others}\n >\n {children}\n </Group>\n );\n});\n"],"names":["Group","factory","useProps","useStyles","clsx","classes","defaultProps","gap","justify","StickyFooter","props","ref","borderTop","children","className","classNames","style","styles","unstyled","vars","others","getStyles","name","css","border"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAAiBA,KAAK,EAA8BC,OAAO,EAAEC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AACvG,OAAOC,UAAU,OAAO;AAExB,OAAOC,aAAa,4BAA4B;AA8BhD,MAAMC,eAA2C;IAC7CC,KAAK;IACLC,SAAS;AACb;AAEA,OAAO,MAAMC,eAAeR,QAA6B,CAACS,OAAOC;IAC7D,MAAM,EAACC,SAAS,EAAEJ,OAAO,EAAED,GAAG,EAAEM,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC,QAAO,GACtGlB,SAAS,gBAAgBI,cAAcI;IAC3C,MAAMW,YAAYlB,UAA+B;QAC7CmB,MAAM;QACNjB;QACAK;QACAI;QACAE;QACAD;QACAE;QACAC;IACJ;IAEA,MAAMK,MAAMF,UAAU;IAEtB,qBACI,KAACrB;QACGQ,SAASA;QACTD,KAAKA;QACLO,WAAWV,KAAKmB,IAAIT,SAAS,EAAE;YAAC,CAACT,QAAQmB,MAAM,CAAC,EAAE,CAAC,CAACZ;QAAS;QAC7DI,OAAOO,IAAIP,KAAK;QAChBL,KAAKA;QACJ,GAAGS,MAAM;kBAETP;;AAGb,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/sticky-footer/index.ts"],"sourcesContent":["export * from './StickyFooter';\n"],"names":[],"mappings":"AAAA,cAAc,iBAAiB"}
1
+ {"version":3,"sources":["../../../../src/components/sticky-footer/index.ts"],"sourcesContent":["export * from './StickyFooter';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/table/Table.tsx"],"sourcesContent":["import {Box, Center, Factory, Loader, useProps, useStyles} from '@mantine/core';\nimport {useForm} from '@mantine/form';\nimport {useDidUpdate, useMergedRef} from '@mantine/hooks';\nimport {\n ColumnDef,\n defaultColumnSizing,\n getCoreRowModel,\n Row,\n TableState as TanstackTableState,\n useReactTable,\n} from '@tanstack/react-table';\nimport debounce from 'lodash.debounce';\nimport defaultsDeep from 'lodash.defaultsdeep';\nimport {Children, cloneElement, Dispatch, ForwardedRef, ReactElement, useCallback, useEffect, useState} from 'react';\n\nimport {useRowSelection} from '../../hooks/useRowSelection';\nimport {CustomComponentThemeExtend, identity} from '../../utils';\nimport {TableLayouts} from './layouts/TableLayouts';\nimport {TableActions, TableActionsStylesNames} from './table-actions/TableActions';\nimport {\n TableAccordionColumn,\n TableCollapsibleColumn,\n TableCollapsibleColumnStylesNames,\n} from './table-column/TableCollapsibleColumn';\nimport {TableSelectableColumn} from './table-column/TableSelectableColumn';\nimport {TableColumnsSelector, TableColumnsSelectorStylesNames} from './table-columns-selector/TableColumnsSelector';\nimport {TableConsumer} from './table-consumer/TableConsumer';\nimport {TableDateRangePicker, TableDateRangePickerStylesNames} from './table-date-range-picker/TableDateRangePicker';\nimport {TableFilter, TableFilterStylesNames} from './table-filter/TableFilter';\nimport {TableFooter} from './table-footer/TableFooter';\nimport {TableHeader, TableHeaderStylesNames} from './table-header/TableHeader';\nimport {TableThStylesNames} from './table-header/Th';\nimport {TableLastUpdated, TableLastUpdatedStylesNames} from './table-last-updated/TableLastUpdated';\nimport {TableLoading} from './table-loading/TableLoading';\nimport {TablePagination} from './table-pagination/TablePagination';\nimport {TablePerPage} from './table-per-page/TablePerPage';\nimport {TablePredicate, TablePredicateStylesNames} from './table-predicate/TablePredicate';\nimport classes from './Table.module.css';\nimport {TableFormType, TableLayout, TableProps, TableState} from './Table.types';\nimport {TableContext, TableStylesProvider} from './TableContext';\n\ntype TableStylesNames =\n | 'root'\n | 'table'\n | 'header'\n | 'body'\n | TableActionsStylesNames\n | TableCollapsibleColumnStylesNames\n | TableDateRangePickerStylesNames\n | TableFilterStylesNames\n | TableHeaderStylesNames\n | TableThStylesNames\n | TableLastUpdatedStylesNames\n | TablePredicateStylesNames\n | TableColumnsSelectorStylesNames;\n\nexport type PlasmaTableFactory = Factory<{\n props: TableProps<unknown>;\n ref: HTMLDivElement;\n stylesNames: TableStylesNames;\n staticComponents: {\n Actions: typeof TableActions;\n Filter: typeof TableFilter;\n Footer: typeof TableFooter;\n Header: typeof TableHeader;\n LastUpdated: typeof TableLastUpdated;\n Pagination: typeof TablePagination;\n PerPage: typeof TablePerPage;\n Predicate: typeof TablePredicate;\n DateRangePicker: typeof TableDateRangePicker;\n CollapsibleColumn: typeof TableCollapsibleColumn;\n ColumnsSelector: typeof TableColumnsSelector;\n AccordionColumn: typeof TableAccordionColumn;\n Consumer: typeof TableConsumer;\n Loading: typeof TableLoading;\n Layouts: typeof TableLayouts;\n };\n}>;\n\nconst defaultProps: Partial<TableProps<unknown>> = {\n layouts: [TableLayouts.Rows as TableLayout],\n loading: false,\n multiRowSelectionEnabled: false,\n initialState: {},\n options: {},\n};\n\nexport const Table = <T,>(props: TableProps<T> & {ref?: ForwardedRef<HTMLDivElement>}) => {\n const {\n data,\n getRowId,\n noDataChildren,\n getExpandChildren,\n initialState,\n columns,\n layouts,\n onMount,\n onChange,\n children,\n loading,\n doubleClickAction,\n multiRowSelectionEnabled,\n disableRowSelection,\n onRowSelectionChange,\n additionalRootNodes,\n options,\n ref,\n\n // Style props\n style,\n className,\n classNames,\n styles,\n unstyled,\n ...others\n } = useProps('PlasmaTable', defaultProps as TableProps<T>, props);\n\n const getStyles = useStyles<PlasmaTableFactory>({\n name: 'PlasmaTable',\n classes,\n props: props as TableProps<unknown>,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const header = convertedChildren.find((child) => child.type === TableHeader);\n const footer = convertedChildren.find((child) => child.type === TableFooter);\n const consumer = convertedChildren.find((child) => child.type === TableConsumer);\n const lastUpdated = convertedChildren.find((child) => child.type === TableLastUpdated);\n\n const {predicates, dateRange, ...initialStateWithoutForm} = initialState;\n const form = useForm<TableFormType>({\n initialValues: {\n predicates: initialState?.predicates ?? {},\n dateRange: initialState?.dateRange ?? [null, null],\n layout: initialState?.layout ?? layouts[0].displayName,\n },\n });\n\n const table = useReactTable({\n initialState: defaultsDeep(initialStateWithoutForm, {\n pagination: {pageSize: TablePerPage.DEFAULT_SIZE},\n globalFilter: '',\n }),\n data,\n columns: multiRowSelectionEnabled ? [TableSelectableColumn as ColumnDef<T>].concat(columns) : columns,\n getCoreRowModel: getCoreRowModel(),\n manualPagination: options?.getPaginationRowModel === undefined,\n enableMultiRowSelection: !!multiRowSelectionEnabled,\n getRowId,\n getRowCanExpand: (row: Row<T>) => !!getExpandChildren?.(row.original) ?? false,\n enableRowSelection: !loading,\n defaultColumn: {\n size: undefined,\n minSize: defaultColumnSizing.minSize,\n maxSize: defaultColumnSizing.maxSize,\n },\n ...options,\n });\n\n const getAllColumns = table.getAllFlatColumns;\n\n const [state, setState] = useState<TableState<T>>(table.initialState as TableState<T>);\n table.setOptions((prev) => ({\n ...prev,\n state: state as TanstackTableState,\n onStateChange: setState as Dispatch<React.SetStateAction<TanstackTableState>>,\n }));\n const {clearSelection, getSelectedRow, getSelectedRows, outsideClickRef} = useRowSelection(table, {\n multiRowSelectionEnabled,\n onRowSelectionChange,\n additionalRootNodes,\n });\n const containerRef = useMergedRef(outsideClickRef, ref);\n const isFiltered =\n !!state.globalFilter ||\n Object.keys(form.values?.predicates ?? {}).some((predicate) => !!form.values.predicates[predicate]) ||\n !!form.values.dateRange?.[0] ||\n !!form.values.dateRange?.[1];\n\n const triggerChange = debounce(() => onChange?.({...state, ...form.values}), 500);\n\n useEffect(() => {\n onMount?.({...state, ...form.values});\n return () => {\n triggerChange.cancel();\n };\n }, []);\n\n useDidUpdate(() => {\n triggerChange();\n if (!multiRowSelectionEnabled) {\n clearSelection();\n }\n }, [\n state.globalFilter,\n state.pagination,\n state.sorting,\n JSON.stringify(form.values.dateRange),\n JSON.stringify(form.values.predicates),\n ]);\n\n const clearFilters = useCallback(() => {\n form.setFieldValue('predicates', initialState.predicates ?? {});\n setState((prevState) => ({...prevState, globalFilter: ''}));\n }, []);\n\n if (!data) {\n return (\n <Center style={{flexGrow: 1}}>\n <Loader />\n </Center>\n );\n }\n\n const Layout = layouts.find(({displayName}) => displayName === form.values.layout);\n const hasRows = table.getRowModel().rows.length > 0;\n\n return (\n <Box ref={containerRef} {...others} {...getStyles('root')}>\n <TableStylesProvider value={{getStyles}}>\n <TableContext.Provider\n value={{\n onChange: triggerChange,\n state,\n isFiltered,\n setState,\n clearFilters,\n getSelectedRow,\n getSelectedRows,\n clearSelection,\n form,\n containerRef: outsideClickRef,\n multiRowSelectionEnabled,\n getPageCount: table.getPageCount,\n getAllColumns,\n disableRowSelection,\n layouts,\n }}\n >\n <Layout>\n {consumer}\n {!hasRows && !isFiltered && !loading ? (\n noDataChildren\n ) : (\n <>\n <Box component=\"table\" {...getStyles('table')} pb=\"sm\">\n <thead {...getStyles('header')}>\n {!!header ? (\n <tr>\n <th style={{padding: 0}} colSpan={table.getAllColumns().length}>\n {header}\n </th>\n </tr>\n ) : null}\n <Layout.Header\n table={table}\n doubleClickAction={doubleClickAction}\n getExpandChildren={getExpandChildren}\n loading={loading}\n />\n </thead>\n <tbody {...getStyles('body')}>\n {hasRows ? (\n <Layout.Body\n table={table}\n doubleClickAction={doubleClickAction}\n getExpandChildren={getExpandChildren}\n loading={loading}\n />\n ) : (\n <tr>\n <td colSpan={table.getAllColumns().length}>\n <TableLoading visible={loading}>{noDataChildren}</TableLoading>\n </td>\n </tr>\n )}\n </tbody>\n </Box>\n {footer}\n {lastUpdated\n ? cloneElement(lastUpdated, {\n dependencies: [data, ...(lastUpdated.props.dependencies ?? [])],\n })\n : null}\n </>\n )}\n </Layout>\n </TableContext.Provider>\n </TableStylesProvider>\n </Box>\n );\n};\n\nexport const TableComponentsOrder = {\n MultiSelectInfo: 7,\n Actions: 6,\n Predicate: 5,\n Filter: 4,\n DateRangePicker: 3,\n ColumnsSelector: 2,\n LayoutControl: 1,\n};\n\nTable.Actions = TableActions;\nTable.Filter = TableFilter;\nTable.Footer = TableFooter;\nTable.Header = TableHeader;\nTable.LastUpdated = TableLastUpdated;\nTable.Pagination = TablePagination;\nTable.Predicate = TablePredicate;\nTable.PerPage = TablePerPage;\nTable.Predicate = TablePredicate;\nTable.CollapsibleColumn = TableCollapsibleColumn;\nTable.AccordionColumn = TableAccordionColumn;\nTable.DateRangePicker = TableDateRangePicker;\nTable.Consumer = TableConsumer;\nTable.Loading = TableLoading;\nTable.ColumnsSelector = TableColumnsSelector;\nTable.Layouts = TableLayouts;\n\nTable.extend = identity as CustomComponentThemeExtend<PlasmaTableFactory>;\n"],"names":["Box","Center","Loader","useProps","useStyles","useForm","useDidUpdate","useMergedRef","defaultColumnSizing","getCoreRowModel","useReactTable","debounce","defaultsDeep","Children","cloneElement","useCallback","useEffect","useState","useRowSelection","identity","TableLayouts","TableActions","TableAccordionColumn","TableCollapsibleColumn","TableSelectableColumn","TableColumnsSelector","TableConsumer","TableDateRangePicker","TableFilter","TableFooter","TableHeader","TableLastUpdated","TableLoading","TablePagination","TablePerPage","TablePredicate","classes","TableContext","TableStylesProvider","defaultProps","layouts","Rows","loading","multiRowSelectionEnabled","initialState","options","Table","props","data","getRowId","noDataChildren","getExpandChildren","columns","onMount","onChange","children","doubleClickAction","disableRowSelection","onRowSelectionChange","additionalRootNodes","ref","style","className","classNames","styles","unstyled","others","getStyles","name","convertedChildren","toArray","header","find","child","type","footer","consumer","lastUpdated","predicates","dateRange","initialStateWithoutForm","form","initialValues","layout","displayName","table","pagination","pageSize","DEFAULT_SIZE","globalFilter","concat","manualPagination","getPaginationRowModel","undefined","enableMultiRowSelection","getRowCanExpand","row","original","enableRowSelection","defaultColumn","size","minSize","maxSize","getAllColumns","getAllFlatColumns","state","setState","setOptions","prev","onStateChange","clearSelection","getSelectedRow","getSelectedRows","outsideClickRef","containerRef","isFiltered","Object","keys","values","some","predicate","triggerChange","cancel","sorting","JSON","stringify","clearFilters","setFieldValue","prevState","flexGrow","Layout","hasRows","getRowModel","rows","length","value","Provider","getPageCount","component","pb","thead","tr","th","padding","colSpan","Header","tbody","Body","td","visible","dependencies","TableComponentsOrder","MultiSelectInfo","Actions","Predicate","Filter","DateRangePicker","ColumnsSelector","LayoutControl","Footer","LastUpdated","Pagination","PerPage","CollapsibleColumn","AccordionColumn","Consumer","Loading","Layouts","extend"],"mappings":";AAAA,SAAQA,GAAG,EAAEC,MAAM,EAAWC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AAChF,SAAQC,OAAO,QAAO,gBAAgB;AACtC,SAAQC,YAAY,EAAEC,YAAY,QAAO,iBAAiB;AAC1D,SAEIC,mBAAmB,EACnBC,eAAe,EAGfC,aAAa,QACV,wBAAwB;AAC/B,OAAOC,cAAc,kBAAkB;AACvC,OAAOC,kBAAkB,sBAAsB;AAC/C,SAAQC,QAAQ,EAAEC,YAAY,EAAwCC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAO,QAAQ;AAErH,SAAQC,eAAe,QAAO,8BAA8B;AAC5D,SAAoCC,QAAQ,QAAO,cAAc;AACj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B,KAACwG;4CAAO,GAAG/E,UAAU,OAAO;sDACvBgE,wBACG,KAACD,OAAOiB,IAAI;gDACR9D,OAAOA;gDACP7B,mBAAmBA;gDACnBL,mBAAmBA;gDACnBT,SAASA;+DAGb,KAACmG;0DACG,cAAA,KAACO;oDAAGJ,SAAS3D,MAAMkB,aAAa,GAAG+B,MAAM;8DACrC,cAAA,KAACtG;wDAAaqH,SAAS3G;kEAAUQ;;;;;;;gCAMpDyB;gCACAE,4BACK/D,aAAa+D,aAAa;oCACtByE,cAAc;wCAACtG;2CAAU6B,YAAY9B,KAAK,CAACuG,YAAY,IAAI,EAAE;qCAAE;gCACnE,KACA;;;;;;;;AAQtC,EAAE;AAEF,OAAO,MAAMC,uBAAuB;IAChCC,iBAAiB;IACjBC,SAAS;IACTC,WAAW;IACXC,QAAQ;IACRC,iBAAiB;IACjBC,iBAAiB;IACjBC,eAAe;AACnB,EAAE;AAEFhH,MAAM2G,OAAO,GAAGpI;AAChByB,MAAM6G,MAAM,GAAG/H;AACfkB,MAAMiH,MAAM,GAAGlI;AACfiB,MAAMmG,MAAM,GAAGnH;AACfgB,MAAMkH,WAAW,GAAGjI;AACpBe,MAAMmH,UAAU,GAAGhI;AACnBa,MAAM4G,SAAS,GAAGvH;AAClBW,MAAMoH,OAAO,GAAGhI;AAChBY,MAAM4G,SAAS,GAAGvH;AAClBW,MAAMqH,iBAAiB,GAAG5I;AAC1BuB,MAAMsH,eAAe,GAAG9I;AACxBwB,MAAM8G,eAAe,GAAGjI;AACxBmB,MAAMuH,QAAQ,GAAG3I;AACjBoB,MAAMwH,OAAO,GAAGtI;AAChBc,MAAM+G,eAAe,GAAGpI;AACxBqB,MAAMyH,OAAO,GAAGnJ;AAEhB0B,MAAM0H,MAAM,GAAGrJ"}
1
+ {"version":3,"sources":["../../../../src/components/table/Table.tsx"],"sourcesContent":["import {Box, Center, Factory, Loader, useProps, useStyles} from '@mantine/core';\nimport {useForm} from '@mantine/form';\nimport {useDidUpdate, useMergedRef} from '@mantine/hooks';\nimport {\n ColumnDef,\n defaultColumnSizing,\n getCoreRowModel,\n Row,\n TableState as TanstackTableState,\n useReactTable,\n} from '@tanstack/react-table';\nimport debounce from 'lodash.debounce';\nimport defaultsDeep from 'lodash.defaultsdeep';\nimport {Children, cloneElement, Dispatch, ForwardedRef, ReactElement, useCallback, useEffect, useState} from 'react';\n\nimport {useRowSelection} from '../../hooks/useRowSelection';\nimport {CustomComponentThemeExtend, identity} from '../../utils';\nimport {TableLayouts} from './layouts/TableLayouts';\nimport {TableActions, TableActionsStylesNames} from './table-actions/TableActions';\nimport {\n TableAccordionColumn,\n TableCollapsibleColumn,\n TableCollapsibleColumnStylesNames,\n} from './table-column/TableCollapsibleColumn';\nimport {TableSelectableColumn} from './table-column/TableSelectableColumn';\nimport {TableColumnsSelector, TableColumnsSelectorStylesNames} from './table-columns-selector/TableColumnsSelector';\nimport {TableConsumer} from './table-consumer/TableConsumer';\nimport {TableDateRangePicker, TableDateRangePickerStylesNames} from './table-date-range-picker/TableDateRangePicker';\nimport {TableFilter, TableFilterStylesNames} from './table-filter/TableFilter';\nimport {TableFooter} from './table-footer/TableFooter';\nimport {TableHeader, TableHeaderStylesNames} from './table-header/TableHeader';\nimport {TableThStylesNames} from './table-header/Th';\nimport {TableLastUpdated, TableLastUpdatedStylesNames} from './table-last-updated/TableLastUpdated';\nimport {TableLoading} from './table-loading/TableLoading';\nimport {TablePagination} from './table-pagination/TablePagination';\nimport {TablePerPage} from './table-per-page/TablePerPage';\nimport {TablePredicate, TablePredicateStylesNames} from './table-predicate/TablePredicate';\nimport classes from './Table.module.css';\nimport {TableFormType, TableLayout, TableProps, TableState} from './Table.types';\nimport {TableContext, TableStylesProvider} from './TableContext';\n\ntype TableStylesNames =\n | 'root'\n | 'table'\n | 'header'\n | 'body'\n | TableActionsStylesNames\n | TableCollapsibleColumnStylesNames\n | TableDateRangePickerStylesNames\n | TableFilterStylesNames\n | TableHeaderStylesNames\n | TableThStylesNames\n | TableLastUpdatedStylesNames\n | TablePredicateStylesNames\n | TableColumnsSelectorStylesNames;\n\nexport type PlasmaTableFactory = Factory<{\n props: TableProps<unknown>;\n ref: HTMLDivElement;\n stylesNames: TableStylesNames;\n staticComponents: {\n Actions: typeof TableActions;\n Filter: typeof TableFilter;\n Footer: typeof TableFooter;\n Header: typeof TableHeader;\n LastUpdated: typeof TableLastUpdated;\n Pagination: typeof TablePagination;\n PerPage: typeof TablePerPage;\n Predicate: typeof TablePredicate;\n DateRangePicker: typeof TableDateRangePicker;\n CollapsibleColumn: typeof TableCollapsibleColumn;\n ColumnsSelector: typeof TableColumnsSelector;\n AccordionColumn: typeof TableAccordionColumn;\n Consumer: typeof TableConsumer;\n Loading: typeof TableLoading;\n Layouts: typeof TableLayouts;\n };\n}>;\n\nconst defaultProps: Partial<TableProps<unknown>> = {\n layouts: [TableLayouts.Rows as TableLayout],\n loading: false,\n multiRowSelectionEnabled: false,\n initialState: {},\n options: {},\n};\n\nexport const Table = <T,>(props: TableProps<T> & {ref?: ForwardedRef<HTMLDivElement>}) => {\n const {\n data,\n getRowId,\n noDataChildren,\n getExpandChildren,\n initialState,\n columns,\n layouts,\n onMount,\n onChange,\n children,\n loading,\n doubleClickAction,\n multiRowSelectionEnabled,\n disableRowSelection,\n onRowSelectionChange,\n additionalRootNodes,\n options,\n ref,\n\n // Style props\n style,\n className,\n classNames,\n styles,\n unstyled,\n ...others\n } = useProps('PlasmaTable', defaultProps as TableProps<T>, props);\n\n const getStyles = useStyles<PlasmaTableFactory>({\n name: 'PlasmaTable',\n classes,\n props: props as TableProps<unknown>,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const header = convertedChildren.find((child) => child.type === TableHeader);\n const footer = convertedChildren.find((child) => child.type === TableFooter);\n const consumer = convertedChildren.find((child) => child.type === TableConsumer);\n const lastUpdated = convertedChildren.find((child) => child.type === TableLastUpdated);\n\n const {predicates, dateRange, ...initialStateWithoutForm} = initialState;\n const form = useForm<TableFormType>({\n initialValues: {\n predicates: initialState?.predicates ?? {},\n dateRange: initialState?.dateRange ?? [null, null],\n layout: initialState?.layout ?? layouts[0].displayName,\n },\n });\n\n const table = useReactTable({\n initialState: defaultsDeep(initialStateWithoutForm, {\n pagination: {pageSize: TablePerPage.DEFAULT_SIZE},\n globalFilter: '',\n }),\n data,\n columns: multiRowSelectionEnabled ? [TableSelectableColumn as ColumnDef<T>].concat(columns) : columns,\n getCoreRowModel: getCoreRowModel(),\n manualPagination: options?.getPaginationRowModel === undefined,\n enableMultiRowSelection: !!multiRowSelectionEnabled,\n getRowId,\n getRowCanExpand: (row: Row<T>) => !!getExpandChildren?.(row.original) ?? false,\n enableRowSelection: !loading,\n defaultColumn: {\n size: undefined,\n minSize: defaultColumnSizing.minSize,\n maxSize: defaultColumnSizing.maxSize,\n },\n ...options,\n });\n\n const getAllColumns = table.getAllFlatColumns;\n\n const [state, setState] = useState<TableState<T>>(table.initialState as TableState<T>);\n table.setOptions((prev) => ({\n ...prev,\n state: state as TanstackTableState,\n onStateChange: setState as Dispatch<React.SetStateAction<TanstackTableState>>,\n }));\n const {clearSelection, getSelectedRow, getSelectedRows, outsideClickRef} = useRowSelection(table, {\n multiRowSelectionEnabled,\n onRowSelectionChange,\n additionalRootNodes,\n });\n const containerRef = useMergedRef(outsideClickRef, ref);\n const isFiltered =\n !!state.globalFilter ||\n Object.keys(form.values?.predicates ?? {}).some((predicate) => !!form.values.predicates[predicate]) ||\n !!form.values.dateRange?.[0] ||\n !!form.values.dateRange?.[1];\n\n const triggerChange = debounce(() => onChange?.({...state, ...form.values}), 500);\n\n useEffect(() => {\n onMount?.({...state, ...form.values});\n return () => {\n triggerChange.cancel();\n };\n }, []);\n\n useDidUpdate(() => {\n triggerChange();\n if (!multiRowSelectionEnabled) {\n clearSelection();\n }\n }, [\n state.globalFilter,\n state.pagination,\n state.sorting,\n JSON.stringify(form.values.dateRange),\n JSON.stringify(form.values.predicates),\n ]);\n\n const clearFilters = useCallback(() => {\n form.setFieldValue('predicates', initialState.predicates ?? {});\n setState((prevState) => ({...prevState, globalFilter: ''}));\n }, []);\n\n if (!data) {\n return (\n <Center style={{flexGrow: 1}}>\n <Loader />\n </Center>\n );\n }\n\n const Layout = layouts.find(({displayName}) => displayName === form.values.layout);\n const hasRows = table.getRowModel().rows.length > 0;\n\n return (\n <Box ref={containerRef} {...others} {...getStyles('root')}>\n <TableStylesProvider value={{getStyles}}>\n <TableContext.Provider\n value={{\n onChange: triggerChange,\n state,\n isFiltered,\n setState,\n clearFilters,\n getSelectedRow,\n getSelectedRows,\n clearSelection,\n form,\n containerRef: outsideClickRef,\n multiRowSelectionEnabled,\n getPageCount: table.getPageCount,\n getAllColumns,\n disableRowSelection,\n layouts,\n }}\n >\n <Layout>\n {consumer}\n {!hasRows && !isFiltered && !loading ? (\n noDataChildren\n ) : (\n <>\n <Box component=\"table\" {...getStyles('table')} pb=\"sm\">\n <thead {...getStyles('header')}>\n {!!header ? (\n <tr>\n <th style={{padding: 0}} colSpan={table.getAllColumns().length}>\n {header}\n </th>\n </tr>\n ) : null}\n <Layout.Header\n table={table}\n doubleClickAction={doubleClickAction}\n getExpandChildren={getExpandChildren}\n loading={loading}\n />\n </thead>\n <tbody {...getStyles('body')}>\n {hasRows ? (\n <Layout.Body\n table={table}\n doubleClickAction={doubleClickAction}\n getExpandChildren={getExpandChildren}\n loading={loading}\n />\n ) : (\n <tr>\n <td colSpan={table.getAllColumns().length}>\n <TableLoading visible={loading}>{noDataChildren}</TableLoading>\n </td>\n </tr>\n )}\n </tbody>\n </Box>\n {footer}\n {lastUpdated\n ? cloneElement(lastUpdated, {\n dependencies: [data, ...(lastUpdated.props.dependencies ?? [])],\n })\n : null}\n </>\n )}\n </Layout>\n </TableContext.Provider>\n </TableStylesProvider>\n </Box>\n );\n};\n\nexport const TableComponentsOrder = {\n MultiSelectInfo: 7,\n Actions: 6,\n Predicate: 5,\n Filter: 4,\n DateRangePicker: 3,\n ColumnsSelector: 2,\n LayoutControl: 1,\n};\n\nTable.Actions = TableActions;\nTable.Filter = TableFilter;\nTable.Footer = TableFooter;\nTable.Header = TableHeader;\nTable.LastUpdated = TableLastUpdated;\nTable.Pagination = TablePagination;\nTable.Predicate = TablePredicate;\nTable.PerPage = TablePerPage;\nTable.Predicate = TablePredicate;\nTable.CollapsibleColumn = TableCollapsibleColumn;\nTable.AccordionColumn = TableAccordionColumn;\nTable.DateRangePicker = TableDateRangePicker;\nTable.Consumer = TableConsumer;\nTable.Loading = TableLoading;\nTable.ColumnsSelector = TableColumnsSelector;\nTable.Layouts = TableLayouts;\n\nTable.extend = identity as CustomComponentThemeExtend<PlasmaTableFactory>;\n"],"names":["Box","Center","Loader","useProps","useStyles","useForm","useDidUpdate","useMergedRef","defaultColumnSizing","getCoreRowModel","useReactTable","debounce","defaultsDeep","Children","cloneElement","useCallback","useEffect","useState","useRowSelection","identity","TableLayouts","TableActions","TableAccordionColumn","TableCollapsibleColumn","TableSelectableColumn","TableColumnsSelector","TableConsumer","TableDateRangePicker","TableFilter","TableFooter","TableHeader","TableLastUpdated","TableLoading","TablePagination","TablePerPage","TablePredicate","classes","TableContext","TableStylesProvider","defaultProps","layouts","Rows","loading","multiRowSelectionEnabled","initialState","options","Table","props","data","getRowId","noDataChildren","getExpandChildren","columns","onMount","onChange","children","doubleClickAction","disableRowSelection","onRowSelectionChange","additionalRootNodes","ref","style","className","classNames","styles","unstyled","others","getStyles","name","convertedChildren","toArray","header","find","child","type","footer","consumer","lastUpdated","predicates","dateRange","initialStateWithoutForm","form","initialValues","layout","displayName","table","pagination","pageSize","DEFAULT_SIZE","globalFilter","concat","manualPagination","getPaginationRowModel","undefined","enableMultiRowSelection","getRowCanExpand","row","original","enableRowSelection","defaultColumn","size","minSize","maxSize","getAllColumns","getAllFlatColumns","state","setState","setOptions","prev","onStateChange","clearSelection","getSelectedRow","getSelectedRows","outsideClickRef","containerRef","isFiltered","Object","keys","values","some","predicate","triggerChange","cancel","sorting","JSON","stringify","clearFilters","setFieldValue","prevState","flexGrow","Layout","hasRows","getRowModel","rows","length","value","Provider","getPageCount","component","pb","thead","tr","th","padding","colSpan","Header","tbody","Body","td","visible","dependencies","TableComponentsOrder","MultiSelectInfo","Actions","Predicate","Filter","DateRangePicker","ColumnsSelector","LayoutControl","Footer","LastUpdated","Pagination","PerPage","CollapsibleColumn","AccordionColumn","Consumer","Loading","Layouts","extend"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAAQA,GAAG,EAAEC,MAAM,EAAWC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AAChF,SAAQC,OAAO,QAAO,gBAAgB;AACtC,SAAQC,YAAY,EAAEC,YAAY,QAAO,iBAAiB;AAC1D,SAEIC,mBAAmB,EACnBC,eAAe,EAGfC,aAAa,QACV,wBAAwB;AAC/B,OAAOC,cAAc,kBAAkB;AACvC,OAAOC,kBAAkB,sBAAsB;AAC/C,SAAQC,QAAQ,EAAEC,YAAY,EAAwCC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAO,QAAQ;AAErH,SAAQC,eAAe,QAAO,8BAA8B;AAC5D,SAAoCC,QAAQ,QAAO,cAAc;AACjE,SAAQC,YAAY,QAAO,yBAAyB;AACpD,SAAQC,YAAY,QAAgC,+BAA+B;AACnF,SACIC,oBAAoB,EACpBC,sBAAsB,QAEnB,wCAAwC;AAC/C,SAAQC,qBAAqB,QAAO,uCAAuC;AAC3E,SAAQC,oBAAoB,QAAwC,gDAAg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MAAMkB,aAAa,GAAG+B,MAAM;8DACrC,cAAA,KAACtG;wDAAaqH,SAAS3G;kEAAUQ;;;;;;;gCAMpDyB;gCACAE,4BACK/D,aAAa+D,aAAa;oCACtByE,cAAc;wCAACtG;2CAAU6B,YAAY9B,KAAK,CAACuG,YAAY,IAAI,EAAE;qCAAE;gCACnE,KACA;;;;;;;;AAQtC,EAAE;AAEF,OAAO,MAAMC,uBAAuB;IAChCC,iBAAiB;IACjBC,SAAS;IACTC,WAAW;IACXC,QAAQ;IACRC,iBAAiB;IACjBC,iBAAiB;IACjBC,eAAe;AACnB,EAAE;AAEFhH,MAAM2G,OAAO,GAAGpI;AAChByB,MAAM6G,MAAM,GAAG/H;AACfkB,MAAMiH,MAAM,GAAGlI;AACfiB,MAAMmG,MAAM,GAAGnH;AACfgB,MAAMkH,WAAW,GAAGjI;AACpBe,MAAMmH,UAAU,GAAGhI;AACnBa,MAAM4G,SAAS,GAAGvH;AAClBW,MAAMoH,OAAO,GAAGhI;AAChBY,MAAM4G,SAAS,GAAGvH;AAClBW,MAAMqH,iBAAiB,GAAG5I;AAC1BuB,MAAMsH,eAAe,GAAG9I;AACxBwB,MAAM8G,eAAe,GAAGjI;AACxBmB,MAAMuH,QAAQ,GAAG3I;AACjBoB,MAAMwH,OAAO,GAAGtI;AAChBc,MAAM+G,eAAe,GAAGpI;AACxBqB,MAAMyH,OAAO,GAAGnJ;AAEhB0B,MAAM0H,MAAM,GAAGrJ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/table/Table.types.ts"],"sourcesContent":["import {Icon} from '@coveord/plasma-react-icons';\nimport {BoxProps, StylesApiProps} from '@mantine/core';\nimport {UseFormReturnType} from '@mantine/form';\nimport {\n Column,\n ColumnDef,\n CoreOptions,\n InitialTableState as TanstackInitialTableState,\n TableOptions,\n TableState as TanstackTableState,\n} from '@tanstack/table-core';\nimport {Dispatch, ReactElement, ReactNode, RefObject} from 'react';\n\nimport {DateRangePickerValue} from '../date-range-picker/DateRangePickerInlineCalendar';\nimport {TableLayoutProps} from './layouts/TableLayouts';\nimport {type PlasmaTableFactory} from './Table';\n\nexport type RowSelectionWithData<TData> = Record<string, TData>;\nexport interface RowSelectionState<TData> {\n rowSelection: RowSelectionWithData<TData>;\n}\n\nexport interface TableState<TData> extends Omit<TanstackTableState, 'rowSelection'>, RowSelectionState<TData> {}\n\nexport interface InitialTableState<TData>\n extends Omit<TanstackInitialTableState, 'rowSelection'>,\n Partial<RowSelectionState<TData>>,\n Partial<TableFormType> {}\n\nexport type onTableChangeEvent<TData> = (params: TableState<TData> & TableFormType) => void;\n\nexport interface TableLayout {\n (props: {children: ReactNode}): ReactElement;\n /**\n * Name of the layout.\n * Will be displayed in the layout control\n */\n displayName: string;\n /**\n * Icon illustrating the layout.\n * Will be displayed in the layout control\n */\n Icon?: Icon;\n /**\n * Header portion of the table.\n * In the standard row layout that is where column headers would be displayed.\n */\n Header: <T>(props: TableLayoutProps<T>) => ReactElement;\n /**\n * Body portion of the table.\n * In the standard row layout that is where the rows would be displayed.\n */\n Body: <T>(props: TableLayoutProps<T>) => ReactElement;\n}\n\nexport type TableFormType = {\n /**\n * Object containing the table predicates and their selected values\n *\n * @example {type: \"LONG\", origin: \"system\"}\n */\n predicates: Record<string, string>;\n /**\n * Selected date range in the table\n *\n * @example [new Date(2022, 0, 1), new Date(2022, 0, 31)]\n */\n dateRange: DateRangePickerValue;\n /**\n * Selected layout name\n */\n layout: TableLayout['name'];\n};\n\nexport type TableContextType<TData> = {\n /**\n * Returns all flat columns in the table.\n */\n getAllColumns: () => Array<Column<TData, unknown>>;\n /**\n * Function to call when the table needs an update\n */\n onChange: () => void;\n /**\n * Internal state of the table\n *\n * @see https://tanstack.com/table/v8/docs/api/core/table#state\n */\n state: TableState<TData>;\n /**\n * Function to update the table state\n */\n setState: Dispatch<(prevState: TableState<TData>) => TableState<TData>>;\n /**\n * Whether the table currently as any kind of filter applied.\n * Useful to determine if the noDataChildren is an empty state or just the result of a filter\n */\n isFiltered: boolean;\n /**\n * Function that clears the filter and predicates\n */\n clearFilters: () => void;\n /**\n * Function that returns the selected row if any.\n */\n getSelectedRow: () => TData | null;\n /**\n * Function that returns an array of the selected rows. Most useful when multi row selection is enabled.\n */\n getSelectedRows: () => TData[];\n /**\n * Function that clear the selected row\n */\n clearSelection: () => void;\n /**\n * Form used to handle predicates and dateRange\n */\n form: UseFormReturnType<TableFormType>;\n /**\n * Table container ref\n */\n containerRef: RefObject<HTMLDivElement>;\n /**\n * Whether multi row selection is activated\n */\n multiRowSelectionEnabled: boolean;\n /**\n * Whether row selection is enabled or not\n */\n disableRowSelection: boolean;\n /**\n * Function that returns the number of pages\n */\n getPageCount: () => number;\n /**\n * Available layouts. When more than one layout is provided, it will display a layout control to switch between them.\n */\n layouts: TableLayout[];\n};\n\nexport interface TableProps<T> extends BoxProps, StylesApiProps<PlasmaTableFactory> {\n /**\n * Data to display in the table. Use `null` when the table is initially loading.\n */\n data: T[] | null;\n /**\n * Defines how each row is uniquely identified. It is highly recommended that you specify this prop to an ID that makes sense.\n */\n getRowId?: CoreOptions<T>['getRowId'];\n /**\n * Columns to display in the table.\n *\n * @see https://tanstack.com/table/v8/docs/guide/column-defs\n */\n columns: Array<ColumnDef<T>>;\n /**\n * Available layouts\n *\n * @default [Table.Layouts.Rows]\n */\n layouts?: TableLayout[];\n /**\n * Function called when the table mounts\n *\n * @param state the state of the table\n */\n onMount?: onTableChangeEvent<T>;\n /**\n * Function called when the table should update\n *\n * @param state the state of the table\n */\n onChange?: onTableChangeEvent<T>;\n /**\n * Function that generates the expandable content of a row\n * Return null for rows that don't need to be expandable\n *\n * @param datum the row for which the children should be generated.\n */\n getExpandChildren?: (datum: T) => ReactNode;\n /**\n * React children to show when the table has no rows to show. You can leverage useTable to get the state of the table\n */\n noDataChildren?: ReactNode;\n /**\n * Whether the table is loading or not\n *\n * @default false\n */\n loading?: boolean;\n /**\n * Childrens to display in the table. They need to be wrap in either `Table.Header` or `Table.Footer`\n *\n * @example\n * <Table ...>\n * <Table.Header>\n * <div>Hello</div>\n * </Table.Header>\n * </Table>\n */\n children?: ReactNode;\n /**\n * Initial state of the table\n */\n initialState?: InitialTableState<T>;\n /**\n * Action passed when user double clicks on a row\n */\n doubleClickAction?: (datum: T) => void;\n /**\n * Function called whenever the row selection changes\n *\n * @param selectedRows The selected rows\n */\n onRowSelectionChange?: (selectedRows: T[]) => void;\n /**\n * Whether the user can select multiple rows in order to perform actions in bulk\n *\n * @default false\n */\n multiRowSelectionEnabled?: boolean;\n /**\n * Whether row selection is enabled or not\n *\n * @default false\n */\n disableRowSelection?: boolean;\n /**\n * Nodes that are considered inside the table.\n *\n * Rows normally get unselected when clicking outside the table, but sometimes it has difficulties guessing what is inside or outside, for example when using modals.\n * You can use this prop to force the table to consider some nodes to be inside the table.\n *\n * @see https://mantine.dev/hooks/use-click-outside/#multiple-nodes\n */\n additionalRootNodes?: HTMLElement[];\n /**\n * Additional options that can be passed to the table\n */\n options?: Omit<\n Partial<TableOptions<T>>,\n | 'initialState'\n | 'data'\n | 'columns'\n | 'manualPagination'\n | 'enableMultiRowSelection'\n | 'getRowId'\n | 'getRowCanExpand'\n | 'enableRowSelection'\n | 'onRowSelectionChange'\n >;\n}\n"],"names":[],"mappings":"AAAA,WA2PC"}
1
+ {"version":3,"sources":["../../../../src/components/table/Table.types.ts"],"sourcesContent":["import {Icon} from '@coveord/plasma-react-icons';\nimport {BoxProps, StylesApiProps} from '@mantine/core';\nimport {UseFormReturnType} from '@mantine/form';\nimport {\n Column,\n ColumnDef,\n CoreOptions,\n InitialTableState as TanstackInitialTableState,\n TableOptions,\n TableState as TanstackTableState,\n} from '@tanstack/table-core';\nimport {Dispatch, ReactElement, ReactNode, RefObject} from 'react';\n\nimport {DateRangePickerValue} from '../date-range-picker/DateRangePickerInlineCalendar';\nimport {TableLayoutProps} from './layouts/TableLayouts';\nimport {type PlasmaTableFactory} from './Table';\n\nexport type RowSelectionWithData<TData> = Record<string, TData>;\nexport interface RowSelectionState<TData> {\n rowSelection: RowSelectionWithData<TData>;\n}\n\nexport interface TableState<TData> extends Omit<TanstackTableState, 'rowSelection'>, RowSelectionState<TData> {}\n\nexport interface InitialTableState<TData>\n extends Omit<TanstackInitialTableState, 'rowSelection'>,\n Partial<RowSelectionState<TData>>,\n Partial<TableFormType> {}\n\nexport type onTableChangeEvent<TData> = (params: TableState<TData> & TableFormType) => void;\n\nexport interface TableLayout {\n (props: {children: ReactNode}): ReactElement;\n /**\n * Name of the layout.\n * Will be displayed in the layout control\n */\n displayName: string;\n /**\n * Icon illustrating the layout.\n * Will be displayed in the layout control\n */\n Icon?: Icon;\n /**\n * Header portion of the table.\n * In the standard row layout that is where column headers would be displayed.\n */\n Header: <T>(props: TableLayoutProps<T>) => ReactElement;\n /**\n * Body portion of the table.\n * In the standard row layout that is where the rows would be displayed.\n */\n Body: <T>(props: TableLayoutProps<T>) => ReactElement;\n}\n\nexport type TableFormType = {\n /**\n * Object containing the table predicates and their selected values\n *\n * @example {type: \"LONG\", origin: \"system\"}\n */\n predicates: Record<string, string>;\n /**\n * Selected date range in the table\n *\n * @example [new Date(2022, 0, 1), new Date(2022, 0, 31)]\n */\n dateRange: DateRangePickerValue;\n /**\n * Selected layout name\n */\n layout: TableLayout['name'];\n};\n\nexport type TableContextType<TData> = {\n /**\n * Returns all flat columns in the table.\n */\n getAllColumns: () => Array<Column<TData, unknown>>;\n /**\n * Function to call when the table needs an update\n */\n onChange: () => void;\n /**\n * Internal state of the table\n *\n * @see https://tanstack.com/table/v8/docs/api/core/table#state\n */\n state: TableState<TData>;\n /**\n * Function to update the table state\n */\n setState: Dispatch<(prevState: TableState<TData>) => TableState<TData>>;\n /**\n * Whether the table currently as any kind of filter applied.\n * Useful to determine if the noDataChildren is an empty state or just the result of a filter\n */\n isFiltered: boolean;\n /**\n * Function that clears the filter and predicates\n */\n clearFilters: () => void;\n /**\n * Function that returns the selected row if any.\n */\n getSelectedRow: () => TData | null;\n /**\n * Function that returns an array of the selected rows. Most useful when multi row selection is enabled.\n */\n getSelectedRows: () => TData[];\n /**\n * Function that clear the selected row\n */\n clearSelection: () => void;\n /**\n * Form used to handle predicates and dateRange\n */\n form: UseFormReturnType<TableFormType>;\n /**\n * Table container ref\n */\n containerRef: RefObject<HTMLDivElement>;\n /**\n * Whether multi row selection is activated\n */\n multiRowSelectionEnabled: boolean;\n /**\n * Whether row selection is enabled or not\n */\n disableRowSelection: boolean;\n /**\n * Function that returns the number of pages\n */\n getPageCount: () => number;\n /**\n * Available layouts. When more than one layout is provided, it will display a layout control to switch between them.\n */\n layouts: TableLayout[];\n};\n\nexport interface TableProps<T> extends BoxProps, StylesApiProps<PlasmaTableFactory> {\n /**\n * Data to display in the table. Use `null` when the table is initially loading.\n */\n data: T[] | null;\n /**\n * Defines how each row is uniquely identified. It is highly recommended that you specify this prop to an ID that makes sense.\n */\n getRowId?: CoreOptions<T>['getRowId'];\n /**\n * Columns to display in the table.\n *\n * @see https://tanstack.com/table/v8/docs/guide/column-defs\n */\n columns: Array<ColumnDef<T>>;\n /**\n * Available layouts\n *\n * @default [Table.Layouts.Rows]\n */\n layouts?: TableLayout[];\n /**\n * Function called when the table mounts\n *\n * @param state the state of the table\n */\n onMount?: onTableChangeEvent<T>;\n /**\n * Function called when the table should update\n *\n * @param state the state of the table\n */\n onChange?: onTableChangeEvent<T>;\n /**\n * Function that generates the expandable content of a row\n * Return null for rows that don't need to be expandable\n *\n * @param datum the row for which the children should be generated.\n */\n getExpandChildren?: (datum: T) => ReactNode;\n /**\n * React children to show when the table has no rows to show. You can leverage useTable to get the state of the table\n */\n noDataChildren?: ReactNode;\n /**\n * Whether the table is loading or not\n *\n * @default false\n */\n loading?: boolean;\n /**\n * Childrens to display in the table. They need to be wrap in either `Table.Header` or `Table.Footer`\n *\n * @example\n * <Table ...>\n * <Table.Header>\n * <div>Hello</div>\n * </Table.Header>\n * </Table>\n */\n children?: ReactNode;\n /**\n * Initial state of the table\n */\n initialState?: InitialTableState<T>;\n /**\n * Action passed when user double clicks on a row\n */\n doubleClickAction?: (datum: T) => void;\n /**\n * Function called whenever the row selection changes\n *\n * @param selectedRows The selected rows\n */\n onRowSelectionChange?: (selectedRows: T[]) => void;\n /**\n * Whether the user can select multiple rows in order to perform actions in bulk\n *\n * @default false\n */\n multiRowSelectionEnabled?: boolean;\n /**\n * Whether row selection is enabled or not\n *\n * @default false\n */\n disableRowSelection?: boolean;\n /**\n * Nodes that are considered inside the table.\n *\n * Rows normally get unselected when clicking outside the table, but sometimes it has difficulties guessing what is inside or outside, for example when using modals.\n * You can use this prop to force the table to consider some nodes to be inside the table.\n *\n * @see https://mantine.dev/hooks/use-click-outside/#multiple-nodes\n */\n additionalRootNodes?: HTMLElement[];\n /**\n * Additional options that can be passed to the table\n */\n options?: Omit<\n Partial<TableOptions<T>>,\n | 'initialState'\n | 'data'\n | 'columns'\n | 'manualPagination'\n | 'enableMultiRowSelection'\n | 'getRowId'\n | 'getRowCanExpand'\n | 'enableRowSelection'\n | 'onRowSelectionChange'\n >;\n}\n"],"names":[],"rangeMappings":"","mappings":"AA4IA,WA+GC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/table/TableContext.tsx"],"sourcesContent":["import {createSafeContext, GetStylesApi} from '@mantine/core';\nimport {createContext, useContext} from 'react';\nimport {type PlasmaTableFactory} from './Table';\nimport {TableContextType} from './Table.types';\n\nexport const TableContext = createContext<TableContextType<any> | null>(null);\n\nexport const useTable = <T,>(): TableContextType<T> => {\n const ctx = useContext(TableContext);\n if (ctx === null) {\n throw new Error('useTable must be used inside of a TableContext.Provider');\n }\n\n return ctx;\n};\n\ninterface TableStyleContextType {\n getStyles: GetStylesApi<PlasmaTableFactory>;\n}\n\nexport const [TableStylesProvider, useTableStyles] = createSafeContext<TableStyleContextType>(\n 'Table component was not found in the tree',\n);\n"],"names":["createSafeContext","createContext","useContext","TableContext","useTable","ctx","Error","TableStylesProvider","useTableStyles"],"mappings":"AAAA,SAAQA,iBAAiB,QAAqB,gBAAgB;AAC9D,SAAQC,aAAa,EAAEC,UAAU,QAAO,QAAQ;AAIhD,OAAO,MAAMC,6BAAeF,cAA4C,MAAM;AAE9E,OAAO,MAAMG,WAAW;IACpB,MAAMC,MAAMH,WAAWC;IACvB,IAAIE,QAAQ,MAAM;QACd,MAAM,IAAIC,MAAM;IACpB;IAEA,OAAOD;AACX,EAAE;AAMF,OAAO,MAAM,CAACE,qBAAqBC,eAAe,GAAGR,kBACjD,6CACF"}
1
+ {"version":3,"sources":["../../../../src/components/table/TableContext.tsx"],"sourcesContent":["import {createSafeContext, GetStylesApi} from '@mantine/core';\nimport {createContext, useContext} from 'react';\nimport {type PlasmaTableFactory} from './Table';\nimport {TableContextType} from './Table.types';\n\nexport const TableContext = createContext<TableContextType<any> | null>(null);\n\nexport const useTable = <T,>(): TableContextType<T> => {\n const ctx = useContext(TableContext);\n if (ctx === null) {\n throw new Error('useTable must be used inside of a TableContext.Provider');\n }\n\n return ctx;\n};\n\ninterface TableStyleContextType {\n getStyles: GetStylesApi<PlasmaTableFactory>;\n}\n\nexport const [TableStylesProvider, useTableStyles] = createSafeContext<TableStyleContextType>(\n 'Table component was not found in the tree',\n);\n"],"names":["createSafeContext","createContext","useContext","TableContext","useTable","ctx","Error","TableStylesProvider","useTableStyles"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,SAAQA,iBAAiB,QAAqB,gBAAgB;AAC9D,SAAQC,aAAa,EAAEC,UAAU,QAAO,QAAQ;AAIhD,OAAO,MAAMC,6BAAeF,cAA4C,MAAM;AAE9E,OAAO,MAAMG,WAAW;IACpB,MAAMC,MAAMH,WAAWC;IACvB,IAAIE,QAAQ,MAAM;QACd,MAAM,IAAIC,MAAM;IACpB;IAEA,OAAOD;AACX,EAAE;AAMF,OAAO,MAAM,CAACE,qBAAqBC,eAAe,GAAGR,kBACjD,6CACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/table/index.ts"],"sourcesContent":["export {flexRender as renderTableCell} from '@tanstack/react-table';\nexport * from './Table';\nexport {\n type InitialTableState,\n type TableLayout,\n type TableProps,\n type TableState,\n type onTableChangeEvent,\n} from './Table.types';\nexport {useTable} from './TableContext';\nexport {type TableLayoutProps} from './layouts/TableLayouts';\n"],"names":["flexRender","renderTableCell","useTable"],"mappings":"AAAA,SAAQA,cAAcC,eAAe,QAAO,wBAAwB;AACpE,cAAc,UAAU;AAQxB,SAAQC,QAAQ,QAAO,iBAAiB"}
1
+ {"version":3,"sources":["../../../../src/components/table/index.ts"],"sourcesContent":["export {flexRender as renderTableCell} from '@tanstack/react-table';\nexport * from './Table';\nexport {\n type InitialTableState,\n type TableLayout,\n type TableProps,\n type TableState,\n type onTableChangeEvent,\n} from './Table.types';\nexport {useTable} from './TableContext';\nexport {type TableLayoutProps} from './layouts/TableLayouts';\n"],"names":["flexRender","renderTableCell","useTable"],"rangeMappings":";;","mappings":"AAAA,SAAQA,cAAcC,eAAe,QAAO,wBAAwB;AACpE,cAAc,UAAU;AAQxB,SAAQC,QAAQ,QAAO,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/table/layouts/TableLayoutControl.tsx"],"sourcesContent":["import {Box, Center, Grid, SegmentedControl, Space} from '@mantine/core';\nimport {TableComponentsOrder} from '../Table';\nimport {useTable} from '../TableContext';\n\nexport const TableLayoutControl = () => {\n const {form, layouts} = useTable();\n return layouts.length > 1 ? (\n <Grid.Col order={TableComponentsOrder.LayoutControl} span=\"content\">\n <SegmentedControl\n color=\"action\"\n data={layouts.map(({displayName, Icon}) => ({\n value: displayName,\n label: (\n <Center>\n {Icon ? (\n <>\n <Icon height={16} />\n <Space w=\"xs\" />\n </>\n ) : null}\n <Box>{displayName}</Box>\n </Center>\n ),\n }))}\n {...form.getInputProps('layout')}\n />\n </Grid.Col>\n ) : null;\n};\n"],"names":["Box","Center","Grid","SegmentedControl","Space","TableComponentsOrder","useTable","TableLayoutControl","form","layouts","length","Col","order","LayoutControl","span","color","data","map","displayName","Icon","value","label","height","w","getInputProps"],"mappings":";AAAA,SAAQA,GAAG,EAAEC,MAAM,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,KAAK,QAAO,gBAAgB;AACzE,SAAQC,oBAAoB,QAAO,WAAW;AAC9C,SAAQC,QAAQ,QAAO,kBAAkB;AAEzC,OAAO,MAAMC,qBAAqB;IAC9B,MAAM,EAACC,IAAI,EAAEC,OAAO,EAAC,GAAGH;IACxB,OAAOG,QAAQC,MAAM,GAAG,kBACpB,KAACR,KAAKS,GAAG;QAACC,OAAOP,qBAAqBQ,aAAa;QAAEC,MAAK;kBACtD,cAAA,KAACX;YACGY,OAAM;YACNC,MAAMP,QAAQQ,GAAG,CAAC,CAAC,EAACC,WAAW,EAAEC,IAAI,EAAC,GAAM,CAAA;oBACxCC,OAAOF;oBACPG,qBACI,MAACpB;;4BACIkB,qBACG;;kDACI,KAACA;wCAAKG,QAAQ;;kDACd,KAAClB;wCAAMmB,GAAE;;;iCAEb;0CACJ,KAACvB;0CAAKkB;;;;gBAGlB,CAAA;YACC,GAAGV,KAAKgB,aAAa,CAAC,SAAS;;SAGxC;AACR,EAAE"}
1
+ {"version":3,"sources":["../../../../../src/components/table/layouts/TableLayoutControl.tsx"],"sourcesContent":["import {Box, Center, Grid, SegmentedControl, Space} from '@mantine/core';\nimport {TableComponentsOrder} from '../Table';\nimport {useTable} from '../TableContext';\n\nexport const TableLayoutControl = () => {\n const {form, layouts} = useTable();\n return layouts.length > 1 ? (\n <Grid.Col order={TableComponentsOrder.LayoutControl} span=\"content\">\n <SegmentedControl\n color=\"action\"\n data={layouts.map(({displayName, Icon}) => ({\n value: displayName,\n label: (\n <Center>\n {Icon ? (\n <>\n <Icon height={16} />\n <Space w=\"xs\" />\n </>\n ) : null}\n <Box>{displayName}</Box>\n </Center>\n ),\n }))}\n {...form.getInputProps('layout')}\n />\n </Grid.Col>\n ) : null;\n};\n"],"names":["Box","Center","Grid","SegmentedControl","Space","TableComponentsOrder","useTable","TableLayoutControl","form","layouts","length","Col","order","LayoutControl","span","color","data","map","displayName","Icon","value","label","height","w","getInputProps"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAAQA,GAAG,EAAEC,MAAM,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,KAAK,QAAO,gBAAgB;AACzE,SAAQC,oBAAoB,QAAO,WAAW;AAC9C,SAAQC,QAAQ,QAAO,kBAAkB;AAEzC,OAAO,MAAMC,qBAAqB;IAC9B,MAAM,EAACC,IAAI,EAAEC,OAAO,EAAC,GAAGH;IACxB,OAAOG,QAAQC,MAAM,GAAG,kBACpB,KAACR,KAAKS,GAAG;QAACC,OAAOP,qBAAqBQ,aAAa;QAAEC,MAAK;kBACtD,cAAA,KAACX;YACGY,OAAM;YACNC,MAAMP,QAAQQ,GAAG,CAAC,CAAC,EAACC,WAAW,EAAEC,IAAI,EAAC,GAAM,CAAA;oBACxCC,OAAOF;oBACPG,qBACI,MAACpB;;4BACIkB,qBACG;;kDACI,KAACA;wCAAKG,QAAQ;;kDACd,KAAClB;wCAAMmB,GAAE;;;iCAEb;0CACJ,KAACvB;0CAAKkB;;;;gBAGlB,CAAA;YACC,GAAGV,KAAKgB,aAAa,CAAC,SAAS;;SAGxC;AACR,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/table/layouts/TableLayouts.tsx"],"sourcesContent":["import {Table} from '@tanstack/table-core';\nimport {ReactNode} from 'react';\nimport {RowLayout} from './row-layout/RowLayout';\n\nexport interface TableLayoutProps<T = unknown> {\n table: Table<T>;\n loading?: boolean;\n /**\n * Action passed when user double-clicks on a row\n */\n doubleClickAction?: (datum: T) => void;\n /**\n * Function that generates the expandable content of a row\n * Return null for rows that don't need to be expandable\n *\n * @param datum the row for which the children should be generated.\n */\n getExpandChildren?: (datum: T) => ReactNode;\n /**\n * Whether clicking on a selected row will deselect the row or not.\n */\n keepSelection?: boolean;\n}\n\nexport const TableLayouts = {\n Rows: RowLayout,\n};\n"],"names":["RowLayout","TableLayouts","Rows"],"mappings":"AAEA,SAAQA,SAAS,QAAO,yBAAyB;AAsBjD,OAAO,MAAMC,eAAe;IACxBC,MAAMF;AACV,EAAE"}
1
+ {"version":3,"sources":["../../../../../src/components/table/layouts/TableLayouts.tsx"],"sourcesContent":["import {Table} from '@tanstack/table-core';\nimport {ReactNode} from 'react';\nimport {RowLayout} from './row-layout/RowLayout';\n\nexport interface TableLayoutProps<T = unknown> {\n table: Table<T>;\n loading?: boolean;\n /**\n * Action passed when user double-clicks on a row\n */\n doubleClickAction?: (datum: T) => void;\n /**\n * Function that generates the expandable content of a row\n * Return null for rows that don't need to be expandable\n *\n * @param datum the row for which the children should be generated.\n */\n getExpandChildren?: (datum: T) => ReactNode;\n /**\n * Whether clicking on a selected row will deselect the row or not.\n */\n keepSelection?: boolean;\n}\n\nexport const TableLayouts = {\n Rows: RowLayout,\n};\n"],"names":["RowLayout","TableLayouts","Rows"],"rangeMappings":";;;","mappings":"AAEA,SAAQA,SAAS,QAAO,yBAAyB;AAsBjD,OAAO,MAAMC,eAAe;IACxBC,MAAMF;AACV,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayout.tsx"],"sourcesContent":["import {factory, Factory, StylesApiProps, useProps, useStyles} from '@mantine/core';\nimport {ReactNode} from 'react';\nimport classes from './RowLayout.module.css';\nimport {TableLayout} from '../../Table.types';\nimport {RowLayoutBody, RowLayoutBodyStylesNames} from './RowLayoutBody';\nimport {RowLayoutProvider} from './RowLayoutContext';\nimport {RowLayoutHeader, RowLayoutHeaderStyleNames} from './RowLayoutHeader';\nimport {RowLayoutIcon, RowLayoutIconStylesNames} from './RowLayoutIcon';\n\ntype RowLayoutStylesNames = RowLayoutHeaderStyleNames | RowLayoutIconStylesNames | RowLayoutBodyStylesNames;\nexport interface RowLayoutProps extends StylesApiProps<RowLayoutFactory> {\n children: ReactNode;\n}\n\nexport type RowLayoutFactory = Factory<{\n props: RowLayoutProps;\n stylesNames: RowLayoutStylesNames;\n staticComponents: TableLayout;\n}>;\nconst defaultProps: Partial<RowLayoutProps> = {};\n\nexport const RowLayout = factory<RowLayoutFactory>((props, ref) => {\n const {children, styles, classNames, unstyled} = useProps('PlasmaRowLayout', defaultProps, props);\n const getStyles = useStyles<RowLayoutFactory>({\n name: 'PlasmaRowLayout',\n classes,\n props,\n styles,\n classNames,\n unstyled,\n });\n\n return <RowLayoutProvider value={{getStyles}}>{children}</RowLayoutProvider>;\n});\n\nRowLayout.Body = RowLayoutBody;\nRowLayout.Header = RowLayoutHeader;\nRowLayout.Icon = RowLayoutIcon;\nRowLayout.displayName = 'Rows';\n"],"names":["factory","useProps","useStyles","classes","RowLayoutBody","RowLayoutProvider","RowLayoutHeader","RowLayoutIcon","defaultProps","RowLayout","props","ref","children","styles","classNames","unstyled","getStyles","name","value","Body","Header","Icon","displayName"],"mappings":";AAAA,SAAQA,OAAO,EAA2BC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AAEpF,OAAOC,aAAa,yBAAyB;AAE7C,SAAQC,aAAa,QAAiC,kBAAkB;AACxE,SAAQC,iBAAiB,QAAO,qBAAqB;AACrD,SAAQC,eAAe,QAAkC,oBAAoB;AAC7E,SAAQC,aAAa,QAAiC,kBAAkB;AAYxE,MAAMC,eAAwC,CAAC;AAE/C,OAAO,MAAMC,YAAYT,QAA0B,CAACU,OAAOC;IACvD,MAAM,EAACC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAC,GAAGd,SAAS,mBAAmBO,cAAcE;IAC3F,MAAMM,YAAYd,UAA4B;QAC1Ce,MAAM;QACNd;QACAO;QACAG;QACAC;QACAC;IACJ;IAEA,qBAAO,KAACV;QAAkBa,OAAO;YAACF;QAAS;kBAAIJ;;AACnD,GAAG;AAEHH,UAAUU,IAAI,GAAGf;AACjBK,UAAUW,MAAM,GAAGd;AACnBG,UAAUY,IAAI,GAAGd;AACjBE,UAAUa,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayout.tsx"],"sourcesContent":["import {factory, Factory, StylesApiProps, useProps, useStyles} from '@mantine/core';\nimport {ReactNode} from 'react';\nimport classes from './RowLayout.module.css';\nimport {TableLayout} from '../../Table.types';\nimport {RowLayoutBody, RowLayoutBodyStylesNames} from './RowLayoutBody';\nimport {RowLayoutProvider} from './RowLayoutContext';\nimport {RowLayoutHeader, RowLayoutHeaderStyleNames} from './RowLayoutHeader';\nimport {RowLayoutIcon, RowLayoutIconStylesNames} from './RowLayoutIcon';\n\ntype RowLayoutStylesNames = RowLayoutHeaderStyleNames | RowLayoutIconStylesNames | RowLayoutBodyStylesNames;\nexport interface RowLayoutProps extends StylesApiProps<RowLayoutFactory> {\n children: ReactNode;\n}\n\nexport type RowLayoutFactory = Factory<{\n props: RowLayoutProps;\n stylesNames: RowLayoutStylesNames;\n staticComponents: TableLayout;\n}>;\nconst defaultProps: Partial<RowLayoutProps> = {};\n\nexport const RowLayout = factory<RowLayoutFactory>((props, ref) => {\n const {children, styles, classNames, unstyled} = useProps('PlasmaRowLayout', defaultProps, props);\n const getStyles = useStyles<RowLayoutFactory>({\n name: 'PlasmaRowLayout',\n classes,\n props,\n styles,\n classNames,\n unstyled,\n });\n\n return <RowLayoutProvider value={{getStyles}}>{children}</RowLayoutProvider>;\n});\n\nRowLayout.Body = RowLayoutBody;\nRowLayout.Header = RowLayoutHeader;\nRowLayout.Icon = RowLayoutIcon;\nRowLayout.displayName = 'Rows';\n"],"names":["factory","useProps","useStyles","classes","RowLayoutBody","RowLayoutProvider","RowLayoutHeader","RowLayoutIcon","defaultProps","RowLayout","props","ref","children","styles","classNames","unstyled","getStyles","name","value","Body","Header","Icon","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAAQA,OAAO,EAA2BC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AAEpF,OAAOC,aAAa,yBAAyB;AAE7C,SAAQC,aAAa,QAAiC,kBAAkB;AACxE,SAAQC,iBAAiB,QAAO,qBAAqB;AACrD,SAAQC,eAAe,QAAkC,oBAAoB;AAC7E,SAAQC,aAAa,QAAiC,kBAAkB;AAYxE,MAAMC,eAAwC,CAAC;AAE/C,OAAO,MAAMC,YAAYT,QAA0B,CAACU,OAAOC;IACvD,MAAM,EAACC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAC,GAAGd,SAAS,mBAAmBO,cAAcE;IAC3F,MAAMM,YAAYd,UAA4B;QAC1Ce,MAAM;QACNd;QACAO;QACAG;QACAC;QACAC;IACJ;IAEA,qBAAO,KAACV;QAAkBa,OAAO;YAACF;QAAS;kBAAIJ;;AACnD,GAAG;AAEHH,UAAUU,IAAI,GAAGf;AACjBK,UAAUW,MAAM,GAAGd;AACnBG,UAAUY,IAAI,GAAGd;AACjBE,UAAUa,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutBody.tsx"],"sourcesContent":["import {Box, BoxProps, Collapse, Factory, useProps} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {flexRender} from '@tanstack/react-table';\nimport {defaultColumnSizing} from '@tanstack/table-core';\nimport {ForwardedRef, Fragment, type MouseEvent} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../../../utils';\nimport {TableCollapsibleColumn} from '../../table-column/TableCollapsibleColumn';\nimport {TableSelectableColumn} from '../../table-column/TableSelectableColumn';\nimport {TableLoading} from '../../table-loading/TableLoading';\nimport {useTable} from '../../TableContext';\nimport {TableLayoutProps} from '../TableLayouts';\nimport {useRowLayout} from './RowLayoutContext';\n\nexport type RowLayoutBodyStylesNames = 'row' | 'cell' | 'collapsibleRow' | 'collapsibleWrapper';\n\nexport interface RowLayoutBodyProps<T>\n extends BoxProps,\n TableLayoutProps<T>,\n CompoundStylesApiProps<RowLayoutBodyFactory> {}\n\nexport type RowLayoutBodyFactory = Factory<{\n props: RowLayoutBodyProps<unknown>;\n ref: HTMLTableRowElement;\n stylesNames: RowLayoutBodyStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<RowLayoutBodyProps<unknown>> = {};\n\nexport const RowLayoutBody = <T,>(props: RowLayoutBodyProps<T> & {ref?: ForwardedRef<HTMLTableRowElement>}) => {\n const ctx = useRowLayout();\n const {\n table,\n doubleClickAction,\n getExpandChildren,\n loading,\n keepSelection,\n classNames,\n className,\n styles,\n style,\n ...others\n } = useProps('RowLayoutBody', defaultProps as RowLayoutBodyProps<T>, props);\n const {multiRowSelectionEnabled, disableRowSelection} = useTable();\n const toggleCollapsible = (el: HTMLTableRowElement) => {\n const cell = el.children[el.children.length - 1] as HTMLTableCellElement;\n cell.querySelector('button').click();\n };\n\n const rows = table.getRowModel()?.rows.map((row) => {\n const rowChildren = getExpandChildren?.(row.original) ?? null;\n const isSelected = !!row.getIsSelected();\n const shouldKeepSelection = keepSelection && isSelected;\n const onClick = (event: MouseEvent<HTMLTableRowElement>) => {\n if (rowChildren) {\n toggleCollapsible(event.currentTarget);\n }\n if (!disableRowSelection && !multiRowSelectionEnabled && !shouldKeepSelection) {\n row.toggleSelected();\n }\n };\n\n return (\n <Fragment key={row.id}>\n <tr\n onClick={onClick}\n onDoubleClick={() => doubleClickAction?.(row.original)}\n data-selectable={!disableRowSelection}\n data-selected={isSelected}\n data-multi-selection={multiRowSelectionEnabled}\n aria-selected={isSelected}\n data-testid={row.id}\n {...ctx.getStyles('row', {classNames, className, styles, style})}\n {...others}\n >\n {row.getVisibleCells().map((cell) => {\n const columnSizing = {\n ...defaultColumnSizing,\n size: cell.column.columnDef.size,\n minSize: cell.column.columnDef.minSize,\n maxSize: cell.column.columnDef.maxSize,\n };\n\n const onCollapsibleCellClick = (event: MouseEvent<HTMLTableCellElement>) => {\n if (cell.column.id === TableSelectableColumn.id && !disableRowSelection) {\n event.stopPropagation();\n row.getToggleSelectedHandler();\n }\n };\n\n return (\n <td\n key={cell.id}\n data-testid={cell.id}\n className={ctx.getStyles('cell', {classNames, styles}).className}\n style={{\n width: `${columnSizing.size}px` ?? 'auto',\n minWidth: `${columnSizing.minSize}px`,\n maxWidth: `${columnSizing.maxSize}px`,\n ...ctx.getStyles('cell', {classNames, styles}).style,\n }}\n data-collapsible-cell={cell.column.id === TableCollapsibleColumn.id}\n onClick={onCollapsibleCellClick}\n >\n <TableLoading visible={loading}>\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </TableLoading>\n </td>\n );\n })}\n </tr>\n {rowChildren ? (\n <tr {...ctx.getStyles('collapsibleRow', {classNames, styles})}>\n <td\n colSpan={table.getAllColumns().length}\n style={{\n padding: 0,\n }}\n >\n <Collapse in={row.getIsExpanded()}>\n <Box {...ctx.getStyles('collapsibleWrapper', {classNames, styles})} px=\"sm\" py=\"xs\">\n {rowChildren}\n </Box>\n </Collapse>\n </td>\n </tr>\n ) : null}\n </Fragment>\n );\n });\n\n return <>{rows}</>;\n};\n\nRowLayoutBody.extend = identity as CustomComponentThemeExtend<RowLayoutBodyFactory>;\n"],"names":["Box","Collapse","useProps","flexRender","defaultColumnSizing","Fragment","identity","TableCollapsibleColumn","TableSelectableColumn","TableLoading","useTable","useRowLayout","defaultProps","RowLayoutBody","props","ctx","table","doubleClickAction","getExpandChildren","loading","keepSelection","classNames","className","styles","style","others","multiRowSelectionEnabled","disableRowSelection","toggleCollapsible","el","cell","children","length","querySelector","click","rows","getRowModel","map","row","rowChildren","original","isSelected","getIsSelected","shouldKeepSelection","onClick","event","currentTarget","toggleSelected","tr","onDoubleClick","data-selectable","data-selected","data-multi-selection","aria-selected","data-testid","id","getStyles","getVisibleCells","columnSizing","size","column","columnDef","minSize","maxSize","onCollapsibleCellClick","stopPropagation","getToggleSelectedHandler","td","width","minWidth","maxWidth","data-collapsible-cell","visible","getContext","colSpan","getAllColumns","padding","in","getIsExpanded","px","py","extend"],"mappings":";AAAA,SAAQA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D,EAAE;4BACnEX,SAASoB;sCAET,cAAA,KAACvD;gCAAa+D,SAASrD;0CAClBhB,WAAW2B,KAAK8B,MAAM,CAACC,SAAS,CAAC/B,IAAI,EAAEA,KAAK2C,UAAU;;2BAbtD3C,KAAKyB,EAAE;oBAiBxB;;gBAEHhB,4BACG,KAACS;oBAAI,GAAGjC,IAAIyC,SAAS,CAAC,kBAAkB;wBAACnC;wBAAYE;oBAAM,EAAE;8BACzD,cAAA,KAAC4C;wBACGO,SAAS1D,MAAM2D,aAAa,GAAG3C,MAAM;wBACrCR,OAAO;4BACHoD,SAAS;wBACb;kCAEA,cAAA,KAAC3E;4BAAS4E,IAAIvC,IAAIwC,aAAa;sCAC3B,cAAA,KAAC9E;gCAAK,GAAGe,IAAIyC,SAAS,CAAC,sBAAsB;oCAACnC;oCAAYE;gCAAM,EAAE;gCAAEwD,IAAG;gCAAKC,IAAG;0CAC1EzC;;;;qBAKjB;;WA/DOD,IAAIiB,EAAE;IAkE7B;IAEA,qBAAO;kBAAGpB;;AACd,EAAE;AAEFtB,cAAcoE,MAAM,GAAG3E"}
1
+ {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutBody.tsx"],"sourcesContent":["import {Box, BoxProps, Collapse, Factory, useProps} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {flexRender} from '@tanstack/react-table';\nimport {defaultColumnSizing} from '@tanstack/table-core';\nimport {ForwardedRef, Fragment, type MouseEvent} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../../../utils';\nimport {TableCollapsibleColumn} from '../../table-column/TableCollapsibleColumn';\nimport {TableSelectableColumn} from '../../table-column/TableSelectableColumn';\nimport {TableLoading} from '../../table-loading/TableLoading';\nimport {useTable} from '../../TableContext';\nimport {TableLayoutProps} from '../TableLayouts';\nimport {useRowLayout} from './RowLayoutContext';\n\nexport type RowLayoutBodyStylesNames = 'row' | 'cell' | 'collapsibleRow' | 'collapsibleWrapper';\n\nexport interface RowLayoutBodyProps<T>\n extends BoxProps,\n TableLayoutProps<T>,\n CompoundStylesApiProps<RowLayoutBodyFactory> {}\n\nexport type RowLayoutBodyFactory = Factory<{\n props: RowLayoutBodyProps<unknown>;\n ref: HTMLTableRowElement;\n stylesNames: RowLayoutBodyStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<RowLayoutBodyProps<unknown>> = {};\n\nexport const RowLayoutBody = <T,>(props: RowLayoutBodyProps<T> & {ref?: ForwardedRef<HTMLTableRowElement>}) => {\n const ctx = useRowLayout();\n const {\n table,\n doubleClickAction,\n getExpandChildren,\n loading,\n keepSelection,\n classNames,\n className,\n styles,\n style,\n ...others\n } = useProps('RowLayoutBody', defaultProps as RowLayoutBodyProps<T>, props);\n const {multiRowSelectionEnabled, disableRowSelection} = useTable();\n const toggleCollapsible = (el: HTMLTableRowElement) => {\n const cell = el.children[el.children.length - 1] as HTMLTableCellElement;\n cell.querySelector('button').click();\n };\n\n const rows = table.getRowModel()?.rows.map((row) => {\n const rowChildren = getExpandChildren?.(row.original) ?? null;\n const isSelected = !!row.getIsSelected();\n const shouldKeepSelection = keepSelection && isSelected;\n const onClick = (event: MouseEvent<HTMLTableRowElement>) => {\n if (rowChildren) {\n toggleCollapsible(event.currentTarget);\n }\n if (!disableRowSelection && !multiRowSelectionEnabled && !shouldKeepSelection) {\n row.toggleSelected();\n }\n };\n\n return (\n <Fragment key={row.id}>\n <tr\n onClick={onClick}\n onDoubleClick={() => doubleClickAction?.(row.original)}\n data-selectable={!disableRowSelection}\n data-selected={isSelected}\n data-multi-selection={multiRowSelectionEnabled}\n aria-selected={isSelected}\n data-testid={row.id}\n {...ctx.getStyles('row', {classNames, className, styles, style})}\n {...others}\n >\n {row.getVisibleCells().map((cell) => {\n const columnSizing = {\n ...defaultColumnSizing,\n size: cell.column.columnDef.size,\n minSize: cell.column.columnDef.minSize,\n maxSize: cell.column.columnDef.maxSize,\n };\n\n const onCollapsibleCellClick = (event: MouseEvent<HTMLTableCellElement>) => {\n if (cell.column.id === TableSelectableColumn.id && !disableRowSelection) {\n event.stopPropagation();\n row.getToggleSelectedHandler();\n }\n };\n\n return (\n <td\n key={cell.id}\n data-testid={cell.id}\n className={ctx.getStyles('cell', {classNames, styles}).className}\n style={{\n width: `${columnSizing.size}px` ?? 'auto',\n minWidth: `${columnSizing.minSize}px`,\n maxWidth: `${columnSizing.maxSize}px`,\n ...ctx.getStyles('cell', {classNames, styles}).style,\n }}\n data-collapsible-cell={cell.column.id === TableCollapsibleColumn.id}\n onClick={onCollapsibleCellClick}\n >\n <TableLoading visible={loading}>\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </TableLoading>\n </td>\n );\n })}\n </tr>\n {rowChildren ? (\n <tr {...ctx.getStyles('collapsibleRow', {classNames, styles})}>\n <td\n colSpan={table.getAllColumns().length}\n style={{\n padding: 0,\n }}\n >\n <Collapse in={row.getIsExpanded()}>\n <Box {...ctx.getStyles('collapsibleWrapper', {classNames, styles})} px=\"sm\" py=\"xs\">\n {rowChildren}\n </Box>\n </Collapse>\n </td>\n </tr>\n ) : null}\n </Fragment>\n );\n });\n\n return <>{rows}</>;\n};\n\nRowLayoutBody.extend = identity as CustomComponentThemeExtend<RowLayoutBodyFactory>;\n"],"names":["Box","Collapse","useProps","flexRender","defaultColumnSizing","Fragment","identity","TableCollapsibleColumn","TableSelectableColumn","TableLoading","useTable","useRowLayout","defaultProps","RowLayoutBody","props","ctx","table","doubleClickAction","getExpandChildren","loading","keepSelection","classNames","className","styles","style","others","multiRowSelectionEnabled","disableRowSelection","toggleCollapsible","el","cell","children","length","querySelector","click","rows","getRowModel","map","row","rowChildren","original","isSelected","getIsSelected","shouldKeepSelection","onClick","event","currentTarget","toggleSelected","tr","onDoubleClick","data-selectable","data-selected","data-multi-selection","aria-selected","data-testid","id","getStyles","getVisibleCells","columnSizing","size","column","columnDef","minSize","maxSize","onCollapsibleCellClick","stopPropagation","getToggleSelectedHandler","td","width","minWidth","maxWidth","data-collapsible-cell","visible","getContext","colSpan","getAllColumns","padding","in","getIsExpanded","px","py","extend"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAAQA,GAAG,EAAYC,QAAQ,EAAWC,QAAQ,QAAO,gBAAgB;AAEzE,SAAQC,UAAU,QAAO,wBAAwB;AACjD,SAAQC,mBAAmB,QAAO,uBAAuB;AACzD,SAAsBC,QAAQ,QAAwB,QAAQ;AAC9D,SAAoCC,QAAQ,QAAO,oBAAoB;AACvE,SAAQC,sBAAsB,QAAO,4CAA4C;AACjF,SAAQC,qBAAqB,QAAO,2CAA2C;AAC/E,SAAQC,YAAY,QAAO,mCAAmC;AAC9D,SAAQC,QAAQ,QAAO,qBAAqB;AAE5C,SAAQC,YAAY,QAAO,qBAAqB;AAgBhD,MAAMC,eAAqD,CAAC;AAE5D,OAAO,MAAMC,gBAAgB,CAAKC;IAC9B,MAAMC,MAAMJ;IACZ,MAAM,EACFK,KAAK,EACLC,iBAAiB,EACjBC,iBAAiB,EACjBC,OAAO,EACPC,aAAa,EACbC,UAAU,EACVC,SAAS,EACTC,MAAM,EACNC,KAAK,EACL,GAAGC,QACN,GAAGvB,SAAS,iBAAiBU,cAAuCE;IACrE,MAAM,EAACY,wBAAwB,EAAEC,mBAAmB,EAAC,GAAGjB;IACxD,MAAMkB,oBAAoB,CAACC;QACvB,MAAMC,OAAOD,GAAGE,QAAQ,CAACF,GAAGE,QAAQ,CAACC,MAAM,GAAG,EAAE;QAChDF,KAAKG,aAAa,CAAC,UAAUC,KAAK;IACtC;IAEA,MAAMC,OAAOnB,MAAMoB,WAAW,IAAID,KAAKE,IAAI,CAACC;QACxC,MAAMC,cAAcrB,oBAAoBoB,IAAIE,QAAQ,KAAK;QACzD,MAAMC,aAAa,CAAC,CAACH,IAAII,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O,CAAC,EAAE,CAAC;gCACrCQ,UAAU,CAAC,EAAEZ,aAAaK,OAAO,CAAC,EAAE,CAAC;gCACrC,GAAGhD,IAAIyC,SAAS,CAAC,QAAQ;oCAACnC;oCAAYE;gCAAM,GAAGC,KAAK;4BACxD;4BACA+C,yBAAuBzC,KAAK8B,MAAM,CAACL,EAAE,KAAKhD,uBAAuBgD,EAAE;4BACnEX,SAASoB;sCAET,cAAA,KAACvD;gCAAa+D,SAASrD;0CAClBhB,WAAW2B,KAAK8B,MAAM,CAACC,SAAS,CAAC/B,IAAI,EAAEA,KAAK2C,UAAU;;2BAbtD3C,KAAKyB,EAAE;oBAiBxB;;gBAEHhB,4BACG,KAACS;oBAAI,GAAGjC,IAAIyC,SAAS,CAAC,kBAAkB;wBAACnC;wBAAYE;oBAAM,EAAE;8BACzD,cAAA,KAAC4C;wBACGO,SAAS1D,MAAM2D,aAAa,GAAG3C,MAAM;wBACrCR,OAAO;4BACHoD,SAAS;wBACb;kCAEA,cAAA,KAAC3E;4BAAS4E,IAAIvC,IAAIwC,aAAa;sCAC3B,cAAA,KAAC9E;gCAAK,GAAGe,IAAIyC,SAAS,CAAC,sBAAsB;oCAACnC;oCAAYE;gCAAM,EAAE;gCAAEwD,IAAG;gCAAKC,IAAG;0CAC1EzC;;;;qBAKjB;;WA/DOD,IAAIiB,EAAE;IAkE7B;IAEA,qBAAO;kBAAGpB;;AACd,EAAE;AAEFtB,cAAcoE,MAAM,GAAG3E"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutContext.tsx"],"sourcesContent":["import {createSafeContext, GetStylesApi} from '@mantine/core';\nimport {type RowLayoutFactory} from './RowLayout';\n\ninterface RowLayoutContextType {\n getStyles: GetStylesApi<RowLayoutFactory>;\n}\nexport const [RowLayoutProvider, useRowLayout] = createSafeContext<RowLayoutContextType>(\n 'RowLayout was not found in the component tree',\n);\n"],"names":["createSafeContext","RowLayoutProvider","useRowLayout"],"mappings":"AAAA,SAAQA,iBAAiB,QAAqB,gBAAgB;AAM9D,OAAO,MAAM,CAACC,mBAAmBC,aAAa,GAAGF,kBAC7C,iDACF"}
1
+ {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutContext.tsx"],"sourcesContent":["import {createSafeContext, GetStylesApi} from '@mantine/core';\nimport {type RowLayoutFactory} from './RowLayout';\n\ninterface RowLayoutContextType {\n getStyles: GetStylesApi<RowLayoutFactory>;\n}\nexport const [RowLayoutProvider, useRowLayout] = createSafeContext<RowLayoutContextType>(\n 'RowLayout was not found in the component tree',\n);\n"],"names":["createSafeContext","RowLayoutProvider","useRowLayout"],"rangeMappings":";","mappings":"AAAA,SAAQA,iBAAiB,QAAqB,gBAAgB;AAM9D,OAAO,MAAM,CAACC,mBAAmBC,aAAa,GAAGF,kBAC7C,iDACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutHeader.tsx"],"sourcesContent":["import {BoxProps, Factory, useProps} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {ForwardedRef} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../../../utils';\nimport {Th} from '../../table-header/Th';\nimport {useTable} from '../../TableContext';\nimport {type TableLayoutProps} from '../TableLayouts';\nimport {RowLayoutBodyFactory} from './RowLayoutBody';\nimport {useRowLayout} from './RowLayoutContext';\n\nexport type RowLayoutHeaderStyleNames = 'headerRow';\n\nexport interface RowLayoutHeaderProps<T>\n extends BoxProps,\n TableLayoutProps<T>,\n CompoundStylesApiProps<RowLayoutBodyFactory> {}\n\ntype RowLayoutHeaderFactory = Factory<{\n props: RowLayoutHeaderProps<unknown>;\n ref: HTMLTableRowElement;\n stylesNames: RowLayoutHeaderStyleNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<RowLayoutHeaderProps<unknown>> = {};\n\nexport const RowLayoutHeader = <T,>(props: RowLayoutHeaderProps<T> & {ref?: ForwardedRef<HTMLTableRowElement>}) => {\n const ctx = useRowLayout();\n const {table, getExpandChildren, loading, doubleClickAction, className, style, classNames, styles, ...others} =\n useProps('RowLayoutHeader', defaultProps as RowLayoutHeaderProps<T>, props);\n const {multiRowSelectionEnabled, disableRowSelection} = useTable();\n\n const headers = table.getHeaderGroups().map((headerGroup) => (\n <tr\n key={headerGroup.id}\n data-selectable={!disableRowSelection}\n data-multi-selection={multiRowSelectionEnabled}\n {...ctx.getStyles('headerRow', {className, classNames, styles, style})}\n {...others}\n >\n {headerGroup.headers.map((columnHeader) => (\n <Th key={columnHeader.id} header={columnHeader} />\n ))}\n </tr>\n ));\n return <>{headers}</>;\n};\nRowLayoutHeader.extend = identity as CustomComponentThemeExtend<RowLayoutHeaderFactory>;\n"],"names":["useProps","identity","Th","useTable","useRowLayout","defaultProps","RowLayoutHeader","props","ctx","table","getExpandChildren","loading","doubleClickAction","className","style","classNames","styles","others","multiRowSelectionEnabled","disableRowSelection","headers","getHeaderGroups","map","headerGroup","tr","data-selectable","data-multi-selection","getStyles","columnHeader","header","id","extend"],"mappings":";AAAA,SAA2BA,QAAQ,QAAO,gBAAgB;AAG1D,SAAoCC,QAAQ,QAAO,oBAAoB;AACvE,SAAQC,EAAE,QAAO,wBAAwB;AACzC,SAAQC,QAAQ,QAAO,qBAAqB;AAG5C,SAAQC,YAAY,QAAO,qBAAqB;AAgBhD,MAAMC,eAAuD,CAAC;AAE9D,OAAO,MAAMC,kBAAkB,CAAKC;IAChC,MAAMC,MAAMJ;IACZ,MAAM,EAACK,KAAK,EAAEC,iBAAiB,EAAEC,OAAO,EAAEC,iBAAiB,EAAEC,SAAS,EAAEC,KAAK,EAAEC,UAAU,EAAEC,MAAM,EAAE,GAAGC,QAAO,GACzGjB,SAAS,mBAAmBK,cAAyCE;IACzE,MAAM,EAACW,wBAAwB,EAAEC,mBAAmB,EAAC,GAAGhB;IAExD,MAAMiB,UAAUX,MAAMY,eAAe,GAAGC,GAAG,CAAC,CAACC,4BACzC,KAACC;YAEGC,mBAAiB,CAACN;YAClBO,wBAAsBR;YACrB,GAAGV,IAAImB,SAAS,CAAC,aAAa;gBAACd;gBAAWE;gBAAYC;gBAAQF;YAAK,EAAE;YACrE,GAAGG,MAAM;sBAETM,YAAYH,OAAO,CAACE,GAAG,CAAC,CAACM,6BACtB,KAAC1B;oBAAyB2B,QAAQD;mBAAzBA,aAAaE,EAAE;WAPvBP,YAAYO,EAAE;IAW3B,qBAAO;kBAAGV;;AACd,EAAE;AACFd,gBAAgByB,MAAM,GAAG9B"}
1
+ {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutHeader.tsx"],"sourcesContent":["import {BoxProps, Factory, useProps} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {ForwardedRef} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../../../utils';\nimport {Th} from '../../table-header/Th';\nimport {useTable} from '../../TableContext';\nimport {type TableLayoutProps} from '../TableLayouts';\nimport {RowLayoutBodyFactory} from './RowLayoutBody';\nimport {useRowLayout} from './RowLayoutContext';\n\nexport type RowLayoutHeaderStyleNames = 'headerRow';\n\nexport interface RowLayoutHeaderProps<T>\n extends BoxProps,\n TableLayoutProps<T>,\n CompoundStylesApiProps<RowLayoutBodyFactory> {}\n\ntype RowLayoutHeaderFactory = Factory<{\n props: RowLayoutHeaderProps<unknown>;\n ref: HTMLTableRowElement;\n stylesNames: RowLayoutHeaderStyleNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<RowLayoutHeaderProps<unknown>> = {};\n\nexport const RowLayoutHeader = <T,>(props: RowLayoutHeaderProps<T> & {ref?: ForwardedRef<HTMLTableRowElement>}) => {\n const ctx = useRowLayout();\n const {table, getExpandChildren, loading, doubleClickAction, className, style, classNames, styles, ...others} =\n useProps('RowLayoutHeader', defaultProps as RowLayoutHeaderProps<T>, props);\n const {multiRowSelectionEnabled, disableRowSelection} = useTable();\n\n const headers = table.getHeaderGroups().map((headerGroup) => (\n <tr\n key={headerGroup.id}\n data-selectable={!disableRowSelection}\n data-multi-selection={multiRowSelectionEnabled}\n {...ctx.getStyles('headerRow', {className, classNames, styles, style})}\n {...others}\n >\n {headerGroup.headers.map((columnHeader) => (\n <Th key={columnHeader.id} header={columnHeader} />\n ))}\n </tr>\n ));\n return <>{headers}</>;\n};\nRowLayoutHeader.extend = identity as CustomComponentThemeExtend<RowLayoutHeaderFactory>;\n"],"names":["useProps","identity","Th","useTable","useRowLayout","defaultProps","RowLayoutHeader","props","ctx","table","getExpandChildren","loading","doubleClickAction","className","style","classNames","styles","others","multiRowSelectionEnabled","disableRowSelection","headers","getHeaderGroups","map","headerGroup","tr","data-selectable","data-multi-selection","getStyles","columnHeader","header","id","extend"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAA2BA,QAAQ,QAAO,gBAAgB;AAG1D,SAAoCC,QAAQ,QAAO,oBAAoB;AACvE,SAAQC,EAAE,QAAO,wBAAwB;AACzC,SAAQC,QAAQ,QAAO,qBAAqB;AAG5C,SAAQC,YAAY,QAAO,qBAAqB;AAgBhD,MAAMC,eAAuD,CAAC;AAE9D,OAAO,MAAMC,kBAAkB,CAAKC;IAChC,MAAMC,MAAMJ;IACZ,MAAM,EAACK,KAAK,EAAEC,iBAAiB,EAAEC,OAAO,EAAEC,iBAAiB,EAAEC,SAAS,EAAEC,KAAK,EAAEC,UAAU,EAAEC,MAAM,EAAE,GAAGC,QAAO,GACzGjB,SAAS,mBAAmBK,cAAyCE;IACzE,MAAM,EAACW,wBAAwB,EAAEC,mBAAmB,EAAC,GAAGhB;IAExD,MAAMiB,UAAUX,MAAMY,eAAe,GAAGC,GAAG,CAAC,CAACC,4BACzC,KAACC;YAEGC,mBAAiB,CAACN;YAClBO,wBAAsBR;YACrB,GAAGV,IAAImB,SAAS,CAAC,aAAa;gBAACd;gBAAWE;gBAAYC;gBAAQF;YAAK,EAAE;YACrE,GAAGG,MAAM;sBAETM,YAAYH,OAAO,CAACE,GAAG,CAAC,CAACM,6BACtB,KAAC1B;oBAAyB2B,QAAQD;mBAAzBA,aAAaE,EAAE;WAPvBP,YAAYO,EAAE;IAW3B,qBAAO;kBAAGV;;AACd,EAAE;AACFd,gBAAgByB,MAAM,GAAG9B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutIcon.tsx"],"sourcesContent":["import {Icon as IconType, ListSize16Px} from '@coveord/plasma-react-icons';\nimport {factory, Factory, useProps} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {useRowLayout} from './RowLayoutContext';\n\nexport type RowLayoutIconStylesNames = 'icon';\nexport interface RowLayoutIconProps extends CompoundStylesApiProps<RowLayoutIconFactory> {\n icon: IconType;\n}\n\nexport type RowLayoutIconFactory = Factory<{\n props: RowLayoutIconProps;\n ref: SVGSVGElement;\n stylesNames: RowLayoutIconStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<RowLayoutIconProps> = {\n icon: ListSize16Px,\n};\n\nexport const RowLayoutIcon = factory<RowLayoutIconFactory>((props, ref) => {\n const ctx = useRowLayout();\n const {icon: Icon, classNames, styles} = useProps('RowLayoutIcon', defaultProps, props);\n\n return <Icon ref={ref} {...ctx.getStyles('icon', {styles, classNames})} />;\n});\n"],"names":["ListSize16Px","factory","useProps","useRowLayout","defaultProps","icon","RowLayoutIcon","props","ref","ctx","Icon","classNames","styles","getStyles"],"mappings":";AAAA,SAA0BA,YAAY,QAAO,8BAA8B;AAC3E,SAAQC,OAAO,EAAWC,QAAQ,QAAO,gBAAgB;AAEzD,SAAQC,YAAY,QAAO,qBAAqB;AAchD,MAAMC,eAA4C;IAC9CC,MAAML;AACV;AAEA,OAAO,MAAMM,gBAAgBL,QAA8B,CAACM,OAAOC;IAC/D,MAAMC,MAAMN;IACZ,MAAM,EAACE,MAAMK,IAAI,EAAEC,UAAU,EAAEC,MAAM,EAAC,GAAGV,SAAS,iBAAiBE,cAAcG;IAEjF,qBAAO,KAACG;QAAKF,KAAKA;QAAM,GAAGC,IAAII,SAAS,CAAC,QAAQ;YAACD;YAAQD;QAAU,EAAE;;AAC1E,GAAG"}
1
+ {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutIcon.tsx"],"sourcesContent":["import {Icon as IconType, ListSize16Px} from '@coveord/plasma-react-icons';\nimport {factory, Factory, useProps} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {useRowLayout} from './RowLayoutContext';\n\nexport type RowLayoutIconStylesNames = 'icon';\nexport interface RowLayoutIconProps extends CompoundStylesApiProps<RowLayoutIconFactory> {\n icon: IconType;\n}\n\nexport type RowLayoutIconFactory = Factory<{\n props: RowLayoutIconProps;\n ref: SVGSVGElement;\n stylesNames: RowLayoutIconStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<RowLayoutIconProps> = {\n icon: ListSize16Px,\n};\n\nexport const RowLayoutIcon = factory<RowLayoutIconFactory>((props, ref) => {\n const ctx = useRowLayout();\n const {icon: Icon, classNames, styles} = useProps('RowLayoutIcon', defaultProps, props);\n\n return <Icon ref={ref} {...ctx.getStyles('icon', {styles, classNames})} />;\n});\n"],"names":["ListSize16Px","factory","useProps","useRowLayout","defaultProps","icon","RowLayoutIcon","props","ref","ctx","Icon","classNames","styles","getStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":";AAAA,SAA0BA,YAAY,QAAO,8BAA8B;AAC3E,SAAQC,OAAO,EAAWC,QAAQ,QAAO,gBAAgB;AAEzD,SAAQC,YAAY,QAAO,qBAAqB;AAchD,MAAMC,eAA4C;IAC9CC,MAAML;AACV;AAEA,OAAO,MAAMM,gBAAgBL,QAA8B,CAACM,OAAOC;IAC/D,MAAMC,MAAMN;IACZ,MAAM,EAACE,MAAMK,IAAI,EAAEC,UAAU,EAAEC,MAAM,EAAC,GAAGV,SAAS,iBAAiBE,cAAcG;IAEjF,qBAAO,KAACG;QAAKF,KAAKA;QAAM,GAAGC,IAAII,SAAS,CAAC,QAAQ;YAACD;YAAQD;QAAU,EAAE;;AAC1E,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/table/table-actions/TableActions.tsx"],"sourcesContent":["import {Factory, Grid, GridColProps, Group, useProps} from '@mantine/core';\nimport {ForwardedRef, ReactElement, ReactNode} from 'react';\n\nimport {CustomComponentThemeExtend, identity} from '../../../utils';\nimport {TableComponentsOrder} from '../Table';\nimport {useTable, useTableStyles} from '../TableContext';\n\nexport type TableActionsStylesNames = 'actionsRoot' | 'actionsGroup';\n\nexport interface TableActionsProps<T> extends Omit<GridColProps, 'children'> {\n /**\n * Function that return components for the selected row or selected rows when multi row selection is enabled\n *\n * @param datum the data of the selected row(s)\n * @example\n * <Table.Actions<MyType>>\n * {(datum: MyType) => (\n * <Button\n * component={Link}\n * to={`edit/${datum.id}`}\n * leftIcon={<EditSize24Px />}\n * variant=\"subtle\"\n * color=\"navy.8\"\n * >\n * Edit\n * </Button>\n * )}\n * </Table.Actions>\n */\n children: ((datum: T) => ReactNode) | ((data: T[]) => ReactNode);\n}\n\ntype TableActionsFactory = Factory<{\n props: TableActionsProps<unknown>;\n ref: HTMLDivElement;\n stylesNames: TableActionsStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TableActionsProps<unknown>> = {};\n\nexport const TableActions = <T,>(props: TableActionsProps<T> & {ref?: ForwardedRef<HTMLDivElement>}): ReactElement => {\n const ctx = useTableStyles();\n const {getSelectedRows, multiRowSelectionEnabled} = useTable<T>();\n const {style, className, classNames, styles, children, ...others} = useProps(\n 'PlasmaTableActions',\n defaultProps,\n props,\n );\n const selectedRows = getSelectedRows();\n\n if (selectedRows.length <= 0) {\n return null;\n }\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Actions} {...ctx.getStyles('actionsRoot', {})} {...others}>\n <Group gap=\"xs\" {...ctx.getStyles('actionsGroup', {})}>\n {multiRowSelectionEnabled\n ? (children as (data: T[]) => ReactNode)(selectedRows)\n : (children as (datum: T) => ReactNode)(selectedRows[0])}\n </Group>\n </Grid.Col>\n );\n};\n\nTableActions.extend = identity as CustomComponentThemeExtend<TableActionsFactory>;\n"],"names":["Grid","Group","useProps","identity","TableComponentsOrder","useTable","useTableStyles","defaultProps","TableActions","props","ctx","getSelectedRows","multiRowSelectionEnabled","style","className","classNames","styles","children","others","selectedRows","length","Col","span","order","Actions","getStyles","gap","extend"],"mappings":";AAAA,SAAiBA,IAAI,EAAgBC,KAAK,EAAEC,QAAQ,QAAO,gBAAgB;AAG3E,SAAoCC,QAAQ,QAAO,iBAAiB;AACpE,SAAQC,oBAAoB,QAAO,WAAW;AAC9C,SAAQC,QAAQ,EAAEC,cAAc,QAAO,kBAAkB;AAkCzD,MAAMC,eAAoD,CAAC;AAE3D,OAAO,MAAMC,eAAe,CAAKC;IAC7B,MAAMC,MAAMJ;IACZ,MAAM,EAACK,eAAe,EAAEC,wBAAwB,EAAC,GAAGP;IACpD,MAAM,EAACQ,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGC,QAAO,GAAGhB,SAChE,sBACAK,cACAE;IAEJ,MAAMU,eAAeR;IAErB,IAAIQ,aAAaC,MAAM,IAAI,GAAG;QAC1B,OAAO;IACX;IAEA,qBACI,KAACpB,KAAKqB,GAAG;QAACC,MAAK;QAAUC,OAAOnB,qBAAqBoB,OAAO;QAAG,GAAGd,IAAIe,SAAS,CAAC,eAAe,CAAC,EAAE;QAAG,GAAGP,MAAM;kBAC1G,cAAA,KAACjB;YAAMyB,KAAI;YAAM,GAAGhB,IAAIe,SAAS,CAAC,gBAAgB,CAAC,EAAE;sBAChDb,2BACK,AAACK,SAAsCE,gBACvC,AAACF,SAAqCE,YAAY,CAAC,EAAE;;;AAI3E,EAAE;AAEFX,aAAamB,MAAM,GAAGxB"}
1
+ {"version":3,"sources":["../../../../../src/components/table/table-actions/TableActions.tsx"],"sourcesContent":["import {Factory, Grid, GridColProps, Group, useProps} from '@mantine/core';\nimport {ForwardedRef, ReactElement, ReactNode} from 'react';\n\nimport {CustomComponentThemeExtend, identity} from '../../../utils';\nimport {TableComponentsOrder} from '../Table';\nimport {useTable, useTableStyles} from '../TableContext';\n\nexport type TableActionsStylesNames = 'actionsRoot' | 'actionsGroup';\n\nexport interface TableActionsProps<T> extends Omit<GridColProps, 'children'> {\n /**\n * Function that return components for the selected row or selected rows when multi row selection is enabled\n *\n * @param datum the data of the selected row(s)\n * @example\n * <Table.Actions<MyType>>\n * {(datum: MyType) => (\n * <Button\n * component={Link}\n * to={`edit/${datum.id}`}\n * leftIcon={<EditSize24Px />}\n * variant=\"subtle\"\n * color=\"navy.8\"\n * >\n * Edit\n * </Button>\n * )}\n * </Table.Actions>\n */\n children: ((datum: T) => ReactNode) | ((data: T[]) => ReactNode);\n}\n\ntype TableActionsFactory = Factory<{\n props: TableActionsProps<unknown>;\n ref: HTMLDivElement;\n stylesNames: TableActionsStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TableActionsProps<unknown>> = {};\n\nexport const TableActions = <T,>(props: TableActionsProps<T> & {ref?: ForwardedRef<HTMLDivElement>}): ReactElement => {\n const ctx = useTableStyles();\n const {getSelectedRows, multiRowSelectionEnabled} = useTable<T>();\n const {style, className, classNames, styles, children, ...others} = useProps(\n 'PlasmaTableActions',\n defaultProps,\n props,\n );\n const selectedRows = getSelectedRows();\n\n if (selectedRows.length <= 0) {\n return null;\n }\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Actions} {...ctx.getStyles('actionsRoot', {})} {...others}>\n <Group gap=\"xs\" {...ctx.getStyles('actionsGroup', {})}>\n {multiRowSelectionEnabled\n ? (children as (data: T[]) => ReactNode)(selectedRows)\n : (children as (datum: T) => ReactNode)(selectedRows[0])}\n </Group>\n </Grid.Col>\n );\n};\n\nTableActions.extend = identity as CustomComponentThemeExtend<TableActionsFactory>;\n"],"names":["Grid","Group","useProps","identity","TableComponentsOrder","useTable","useTableStyles","defaultProps","TableActions","props","ctx","getSelectedRows","multiRowSelectionEnabled","style","className","classNames","styles","children","others","selectedRows","length","Col","span","order","Actions","getStyles","gap","extend"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAAiBA,IAAI,EAAgBC,KAAK,EAAEC,QAAQ,QAAO,gBAAgB;AAG3E,SAAoCC,QAAQ,QAAO,iBAAiB;AACpE,SAAQC,oBAAoB,QAAO,WAAW;AAC9C,SAAQC,QAAQ,EAAEC,cAAc,QAAO,kBAAkB;AAkCzD,MAAMC,eAAoD,CAAC;AAE3D,OAAO,MAAMC,eAAe,CAAKC;IAC7B,MAAMC,MAAMJ;IACZ,MAAM,EAACK,eAAe,EAAEC,wBAAwB,EAAC,GAAGP;IACpD,MAAM,EAACQ,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGC,QAAO,GAAGhB,SAChE,sBACAK,cACAE;IAEJ,MAAMU,eAAeR;IAErB,IAAIQ,aAAaC,MAAM,IAAI,GAAG;QAC1B,OAAO;IACX;IAEA,qBACI,KAACpB,KAAKqB,GAAG;QAACC,MAAK;QAAUC,OAAOnB,qBAAqBoB,OAAO;QAAG,GAAGd,IAAIe,SAAS,CAAC,eAAe,CAAC,EAAE;QAAG,GAAGP,MAAM;kBAC1G,cAAA,KAACjB;YAAMyB,KAAI;YAAM,GAAGhB,IAAIe,SAAS,CAAC,gBAAgB,CAAC,EAAE;sBAChDb,2BACK,AAACK,SAAsCE,gBACvC,AAACF,SAAqCE,YAAY,CAAC,EAAE;;;AAI3E,EAAE;AAEFX,aAAamB,MAAM,GAAGxB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/table/table-column/TableCollapsibleColumn.tsx"],"sourcesContent":["import {ArrowHeadDownSize16Px, ArrowHeadUpSize16Px} from '@coveord/plasma-react-icons';\nimport {Factory, factory, useProps} from '@mantine/core';\nimport {CellContext, ColumnDef} from '@tanstack/table-core';\nimport {MouseEvent as ReactMouseEvent, ReactNode} from 'react';\nimport {ActionIcon, ActionIconProps} from '../../action-icon';\nimport {useTableStyles} from '../TableContext';\n\nexport type TableCollapsibleColumnStylesNames = 'collapsibleIcon';\n\nconst sharedProps: ColumnDef<unknown> = {\n id: 'collapsible',\n enableSorting: false,\n header: '',\n size: 84, // 16px padding left + 28px ActionIcon + 40px padding right\n};\n\n/**\n * Generic column to use when your table needs collapsible rows\n */\nexport const TableCollapsibleColumn: ColumnDef<unknown> = {\n ...sharedProps,\n cell: (info) => <CollapsibleIcon info={info} />,\n};\n\n/**\n * Generic column to use when your table needs an accordion (collapsible rows, but only one open at the time)\n */\nexport const TableAccordionColumn: ColumnDef<unknown> = {\n ...sharedProps,\n cell: (info) => {\n const onToggle = () => {\n // close all other rows when the current row not is expanded\n if (!info.row.getIsExpanded()) {\n info.table.toggleAllRowsExpanded(false);\n }\n };\n\n return <CollapsibleIcon onToggle={onToggle} info={info} />;\n },\n};\n\ninterface CollapsibleIconProps extends ActionIconProps {\n info: CellContext<unknown, unknown>;\n onToggle?: (e: ReactMouseEvent<HTMLButtonElement>) => void;\n iconExpanded?: ReactNode;\n iconCollapsed?: ReactNode;\n}\n\ntype TableCollapsibleColumnFactory = Factory<{\n props: CollapsibleIconProps;\n ref: HTMLButtonElement;\n stylesNames: TableCollapsibleColumnStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<CollapsibleIconProps> = {\n iconExpanded: <ArrowHeadUpSize16Px height={16} />,\n iconCollapsed: <ArrowHeadDownSize16Px height={16} />,\n};\n\nconst CollapsibleIcon = factory<TableCollapsibleColumnFactory>((props, ref) => {\n const ctx = useTableStyles();\n const {info, onToggle, iconExpanded, iconCollapsed, classNames, className, style, styles, ...others} = useProps(\n 'PlasmaTableCollapsibleColumn',\n defaultProps,\n props,\n );\n const handler = info.row.getToggleExpandedHandler();\n const onClick = (e: ReactMouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n onToggle?.(e);\n handler();\n };\n return info.row.getCanExpand() ? (\n <ActionIcon\n ref={ref}\n onClick={onClick}\n variant=\"subtle\"\n color=\"gray\"\n radius=\"sm\"\n {...ctx.getStyles('collapsibleIcon', {className, classNames, styles, style})}\n {...others}\n >\n {info.row.getIsExpanded() ? iconExpanded : iconCollapsed}\n </ActionIcon>\n ) : null;\n});\n"],"names":["ArrowHeadDownSize16Px","ArrowHeadUpSize16Px","factory","useProps","ActionIcon","useTableStyles","sharedProps","id","enableSorting","header","size","TableCollapsibleColumn","cell","info","CollapsibleIcon","TableAccordionColumn","onToggle","row","getIsExpanded","table","toggleAllRowsExpanded","defaultProps","iconExpanded","height","iconCollapsed","props","ref","ctx","classNames","className","style","styles","others","handler","getToggleExpandedHandler","onClick","e","stopPropagation","getCanExpand","variant","color","radius","getStyles"],"mappings":";AAAA,SAAQA,qBAAqB,EAAEC,mBAAmB,QAAO,8BAA8B;AACvF,SAAiBC,OAAO,EAAEC,QAAQ,QAAO,gBAAgB;AAGzD,SAAQC,UAAU,QAAwB,oBAAoB;AAC9D,SAAQC,cAAc,QAAO,kBAAkB;AAI/C,MAAMC,cAAkC;IACpCC,IAAI;IACJC,eAAe;IACfC,QAAQ;IACRC,MAAM;AACV;AAEA;;CAEC,GACD,OAAO,MAAMC,yBAA6C;IACtD,GAAGL,WAAW;IACdM,MAAM,CAACC,qBAAS,KAACC;YAAgBD,MAAMA;;AAC3C,EAAE;AAEF;;CAEC,GACD,OAAO,MAAME,uBAA2C;IACpD,GAAGT,WAAW;IACdM,MAAM,CAACC;QACH,MAAMG,WAAW;YACb,4DAA4D;YAC5D,IAAI,CAACH,KAAKI,GAAG,CAACC,aAAa,IAAI;gBAC3BL,KAAKM,KAAK,CAACC,qBAAqB,CAAC;YACrC;QACJ;QAEA,qBAAO,KAACN;YAAgBE,UAAUA;YAAUH,MAAMA;;IACtD;AACJ,EAAE;AAgBF,MAAMQ,eAA8C;IAChDC,4BAAc,KAACrB;QAAoBsB,QAAQ;;IAC3CC,6BAAe,KAACxB;QAAsBuB,QAAQ;;AAClD;AAEA,MAAMT,kBAAkBZ,QAAuC,CAACuB,OAAOC;IACnE,MAAMC,MAAMtB;IACZ,MAAM,EAACQ,IAAI,EAAEG,QAAQ,EAAEM,YAAY,EAAEE,aAAa,EAAEI,UAAU,EAAEC,SAAS,EAAEC,KAAK,EAAEC,MAAM,EAAE,GAAGC,QAAO,GAAG7B,SACnG,gCACAkB,cACAI;IAEJ,MAAMQ,UAAUpB,KAAKI,GAAG,CAACiB,wBAAwB;IACjD,MAAMC,UAAU,CAACC;QACbA,EAAEC,eAAe;QACjBrB,WAAWoB;QACXH;IACJ;IACA,OAAOpB,KAAKI,GAAG,CAACqB,YAAY,mBACxB,KAAClC;QACGsB,KAAKA;QACLS,SAASA;QACTI,SAAQ;QACRC,OAAM;QACNC,QAAO;QACN,GAAGd,IAAIe,SAAS,CAAC,mBAAmB;YAACb;YAAWD;YAAYG;YAAQD;QAAK,EAAE;QAC3E,GAAGE,MAAM;kBAETnB,KAAKI,GAAG,CAACC,aAAa,KAAKI,eAAeE;SAE/C;AACR"}
1
+ {"version":3,"sources":["../../../../../src/components/table/table-column/TableCollapsibleColumn.tsx"],"sourcesContent":["import {ArrowHeadDownSize16Px, ArrowHeadUpSize16Px} from '@coveord/plasma-react-icons';\nimport {Factory, factory, useProps} from '@mantine/core';\nimport {CellContext, ColumnDef} from '@tanstack/table-core';\nimport {MouseEvent as ReactMouseEvent, ReactNode} from 'react';\nimport {ActionIcon, ActionIconProps} from '../../action-icon';\nimport {useTableStyles} from '../TableContext';\n\nexport type TableCollapsibleColumnStylesNames = 'collapsibleIcon';\n\nconst sharedProps: ColumnDef<unknown> = {\n id: 'collapsible',\n enableSorting: false,\n header: '',\n size: 84, // 16px padding left + 28px ActionIcon + 40px padding right\n};\n\n/**\n * Generic column to use when your table needs collapsible rows\n */\nexport const TableCollapsibleColumn: ColumnDef<unknown> = {\n ...sharedProps,\n cell: (info) => <CollapsibleIcon info={info} />,\n};\n\n/**\n * Generic column to use when your table needs an accordion (collapsible rows, but only one open at the time)\n */\nexport const TableAccordionColumn: ColumnDef<unknown> = {\n ...sharedProps,\n cell: (info) => {\n const onToggle = () => {\n // close all other rows when the current row not is expanded\n if (!info.row.getIsExpanded()) {\n info.table.toggleAllRowsExpanded(false);\n }\n };\n\n return <CollapsibleIcon onToggle={onToggle} info={info} />;\n },\n};\n\ninterface CollapsibleIconProps extends ActionIconProps {\n info: CellContext<unknown, unknown>;\n onToggle?: (e: ReactMouseEvent<HTMLButtonElement>) => void;\n iconExpanded?: ReactNode;\n iconCollapsed?: ReactNode;\n}\n\ntype TableCollapsibleColumnFactory = Factory<{\n props: CollapsibleIconProps;\n ref: HTMLButtonElement;\n stylesNames: TableCollapsibleColumnStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<CollapsibleIconProps> = {\n iconExpanded: <ArrowHeadUpSize16Px height={16} />,\n iconCollapsed: <ArrowHeadDownSize16Px height={16} />,\n};\n\nconst CollapsibleIcon = factory<TableCollapsibleColumnFactory>((props, ref) => {\n const ctx = useTableStyles();\n const {info, onToggle, iconExpanded, iconCollapsed, classNames, className, style, styles, ...others} = useProps(\n 'PlasmaTableCollapsibleColumn',\n defaultProps,\n props,\n );\n const handler = info.row.getToggleExpandedHandler();\n const onClick = (e: ReactMouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n onToggle?.(e);\n handler();\n };\n return info.row.getCanExpand() ? (\n <ActionIcon\n ref={ref}\n onClick={onClick}\n variant=\"subtle\"\n color=\"gray\"\n radius=\"sm\"\n {...ctx.getStyles('collapsibleIcon', {className, classNames, styles, style})}\n {...others}\n >\n {info.row.getIsExpanded() ? iconExpanded : iconCollapsed}\n </ActionIcon>\n ) : null;\n});\n"],"names":["ArrowHeadDownSize16Px","ArrowHeadUpSize16Px","factory","useProps","ActionIcon","useTableStyles","sharedProps","id","enableSorting","header","size","TableCollapsibleColumn","cell","info","CollapsibleIcon","TableAccordionColumn","onToggle","row","getIsExpanded","table","toggleAllRowsExpanded","defaultProps","iconExpanded","height","iconCollapsed","props","ref","ctx","classNames","className","style","styles","others","handler","getToggleExpandedHandler","onClick","e","stopPropagation","getCanExpand","variant","color","radius","getStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAAQA,qBAAqB,EAAEC,mBAAmB,QAAO,8BAA8B;AACvF,SAAiBC,OAAO,EAAEC,QAAQ,QAAO,gBAAgB;AAGzD,SAAQC,UAAU,QAAwB,oBAAoB;AAC9D,SAAQC,cAAc,QAAO,kBAAkB;AAI/C,MAAMC,cAAkC;IACpCC,IAAI;IACJC,eAAe;IACfC,QAAQ;IACRC,MAAM;AACV;AAEA;;CAEC,GACD,OAAO,MAAMC,yBAA6C;IACtD,GAAGL,WAAW;IACdM,MAAM,CAACC,qBAAS,KAACC;YAAgBD,MAAMA;;AAC3C,EAAE;AAEF;;CAEC,GACD,OAAO,MAAME,uBAA2C;IACpD,GAAGT,WAAW;IACdM,MAAM,CAACC;QACH,MAAMG,WAAW;YACb,4DAA4D;YAC5D,IAAI,CAACH,KAAKI,GAAG,CAACC,aAAa,IAAI;gBAC3BL,KAAKM,KAAK,CAACC,qBAAqB,CAAC;YACrC;QACJ;QAEA,qBAAO,KAACN;YAAgBE,UAAUA;YAAUH,MAAMA;;IACtD;AACJ,EAAE;AAgBF,MAAMQ,eAA8C;IAChDC,4BAAc,KAACrB;QAAoBsB,QAAQ;;IAC3CC,6BAAe,KAACxB;QAAsBuB,QAAQ;;AAClD;AAEA,MAAMT,kBAAkBZ,QAAuC,CAACuB,OAAOC;IACnE,MAAMC,MAAMtB;IACZ,MAAM,EAACQ,IAAI,EAAEG,QAAQ,EAAEM,YAAY,EAAEE,aAAa,EAAEI,UAAU,EAAEC,SAAS,EAAEC,KAAK,EAAEC,MAAM,EAAE,GAAGC,QAAO,GAAG7B,SACnG,gCACAkB,cACAI;IAEJ,MAAMQ,UAAUpB,KAAKI,GAAG,CAACiB,wBAAwB;IACjD,MAAMC,UAAU,CAACC;QACbA,EAAEC,eAAe;QACjBrB,WAAWoB;QACXH;IACJ;IACA,OAAOpB,KAAKI,GAAG,CAACqB,YAAY,mBACxB,KAAClC;QACGsB,KAAKA;QACLS,SAASA;QACTI,SAAQ;QACRC,OAAM;QACNC,QAAO;QACN,GAAGd,IAAIe,SAAS,CAAC,mBAAmB;YAACb;YAAWD;YAAYG;YAAQD;QAAK,EAAE;QAC3E,GAAGE,MAAM;kBAETnB,KAAKI,GAAG,CAACC,aAAa,KAAKI,eAAeE;SAE/C;AACR"}
@@ -13,9 +13,7 @@ import { Checkbox, Tooltip } from '@mantine/core';
13
13
  checked: table.getIsAllPageRowsSelected(),
14
14
  indeterminate: table.getIsSomePageRowsSelected(),
15
15
  onChange: table.getToggleAllPageRowsSelectedHandler(),
16
- style: {
17
- display: 'flex'
18
- },
16
+ flex: 1,
19
17
  "aria-label": label
20
18
  })
21
19
  });
@@ -24,9 +22,7 @@ import { Checkbox, Tooltip } from '@mantine/core';
24
22
  checked: row.getIsSelected(),
25
23
  indeterminate: row.getIsSomeSelected(),
26
24
  onChange: row.getToggleSelectedHandler(),
27
- style: {
28
- display: 'flex'
29
- },
25
+ flex: 1,
30
26
  "aria-label": "Select row"
31
27
  })
32
28
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/table/table-column/TableSelectableColumn.tsx"],"sourcesContent":["import {Checkbox, Tooltip} from '@mantine/core';\nimport {ColumnDef} from '@tanstack/table-core';\n\n/**\n * Generic column to use when your table needs multi selection of rows\n */\nexport const TableSelectableColumn: ColumnDef<unknown> = {\n id: 'select',\n enableSorting: false,\n header: ({table}) => {\n const label = table.getIsAllRowsSelected() ? 'Unselect all from this page' : 'Select all from this page';\n return (\n <Tooltip label={label}>\n <Checkbox\n checked={table.getIsAllPageRowsSelected()}\n indeterminate={table.getIsSomePageRowsSelected()}\n onChange={table.getToggleAllPageRowsSelectedHandler()}\n style={{display: 'flex'}}\n aria-label={label}\n />\n </Tooltip>\n );\n },\n cell: ({row}) => (\n <Checkbox\n checked={row.getIsSelected()}\n indeterminate={row.getIsSomeSelected()}\n onChange={row.getToggleSelectedHandler()}\n style={{display: 'flex'}}\n aria-label=\"Select row\"\n />\n ),\n};\n"],"names":["Checkbox","Tooltip","TableSelectableColumn","id","enableSorting","header","table","label","getIsAllRowsSelected","checked","getIsAllPageRowsSelected","indeterminate","getIsSomePageRowsSelected","onChange","getToggleAllPageRowsSelectedHandler","style","display","aria-label","cell","row","getIsSelected","getIsSomeSelected","getToggleSelectedHandler"],"mappings":";AAAA,SAAQA,QAAQ,EAAEC,OAAO,QAAO,gBAAgB;AAGhD;;CAEC,GACD,OAAO,MAAMC,wBAA4C;IACrDC,IAAI;IACJC,eAAe;IACfC,QAAQ,CAAC,EAACC,KAAK,EAAC;QACZ,MAAMC,QAAQD,MAAME,oBAAoB,KAAK,gCAAgC;QAC7E,qBACI,KAACP;YAAQM,OAAOA;sBACZ,cAAA,KAACP;gBACGS,SAASH,MAAMI,wBAAwB;gBACvCC,eAAeL,MAAMM,yBAAyB;gBAC9CC,UAAUP,MAAMQ,mCAAmC;gBACnDC,OAAO;oBAACC,SAAS;gBAAM;gBACvBC,cAAYV;;;IAI5B;IACAW,MAAM,CAAC,EAACC,GAAG,EAAC,iBACR,KAACnB;YACGS,SAASU,IAAIC,aAAa;YAC1BT,eAAeQ,IAAIE,iBAAiB;YACpCR,UAAUM,IAAIG,wBAAwB;YACtCP,OAAO;gBAACC,SAAS;YAAM;YACvBC,cAAW;;AAGvB,EAAE"}
1
+ {"version":3,"sources":["../../../../../src/components/table/table-column/TableSelectableColumn.tsx"],"sourcesContent":["import {Checkbox, Tooltip} from '@mantine/core';\nimport {ColumnDef} from '@tanstack/table-core';\n\n/**\n * Generic column to use when your table needs multi selection of rows\n */\nexport const TableSelectableColumn: ColumnDef<unknown> = {\n id: 'select',\n enableSorting: false,\n header: ({table}) => {\n const label = table.getIsAllRowsSelected() ? 'Unselect all from this page' : 'Select all from this page';\n return (\n <Tooltip label={label}>\n <Checkbox\n checked={table.getIsAllPageRowsSelected()}\n indeterminate={table.getIsSomePageRowsSelected()}\n onChange={table.getToggleAllPageRowsSelectedHandler()}\n flex={1}\n aria-label={label}\n />\n </Tooltip>\n );\n },\n cell: ({row}) => (\n <Checkbox\n checked={row.getIsSelected()}\n indeterminate={row.getIsSomeSelected()}\n onChange={row.getToggleSelectedHandler()}\n flex={1}\n aria-label=\"Select row\"\n />\n ),\n};\n"],"names":["Checkbox","Tooltip","TableSelectableColumn","id","enableSorting","header","table","label","getIsAllRowsSelected","checked","getIsAllPageRowsSelected","indeterminate","getIsSomePageRowsSelected","onChange","getToggleAllPageRowsSelectedHandler","flex","aria-label","cell","row","getIsSelected","getIsSomeSelected","getToggleSelectedHandler"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAAQA,QAAQ,EAAEC,OAAO,QAAO,gBAAgB;AAGhD;;CAEC,GACD,OAAO,MAAMC,wBAA4C;IACrDC,IAAI;IACJC,eAAe;IACfC,QAAQ,CAAC,EAACC,KAAK,EAAC;QACZ,MAAMC,QAAQD,MAAME,oBAAoB,KAAK,gCAAgC;QAC7E,qBACI,KAACP;YAAQM,OAAOA;sBACZ,cAAA,KAACP;gBACGS,SAASH,MAAMI,wBAAwB;gBACvCC,eAAeL,MAAMM,yBAAyB;gBAC9CC,UAAUP,MAAMQ,mCAAmC;gBACnDC,MAAM;gBACNC,cAAYT;;;IAI5B;IACAU,MAAM,CAAC,EAACC,GAAG,EAAC,iBACR,KAAClB;YACGS,SAASS,IAAIC,aAAa;YAC1BR,eAAeO,IAAIE,iBAAiB;YACpCP,UAAUK,IAAIG,wBAAwB;YACtCN,MAAM;YACNC,cAAW;;AAGvB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/table/table-columns-selector/TableColumnsSelector.tsx"],"sourcesContent":["import {\n BoxProps,\n Button,\n Checkbox,\n Divider,\n factory,\n Factory,\n Grid,\n Popover,\n ScrollArea,\n Stack,\n Tooltip,\n useProps,\n} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {ReactNode} from 'react';\n\nimport {TableComponentsOrder} from '../Table';\nimport {useTable, useTableStyles} from '../TableContext';\n\nexport type TableColumnsSelectorStylesNames = 'columnSelector' | 'columnSelectorWrapper';\n\nexport interface TableColumnsSelectorProps extends BoxProps, CompoundStylesApiProps<TableColumnsSelectorFactory> {\n /**\n * The label of the button\n * @default 'Edit columns'\n */\n label?: ReactNode;\n /**\n * The style variant of the button\n * @default 'outline'\n */\n buttonVariant?: string;\n /**\n * An array of column ids that the user cannot hide. This is useful for columns that are required for the table to function properly.\n * @default []\n */\n nonHideableColumns?: string[];\n /**\n * Whether the count of visible columns is shown in the button label.\n * @default false\n */\n showVisibleCountLabel?: boolean;\n /**\n * The maximum number of columns that can be selected at the same time.\n * If defined a footer will render with the remaining number of columns that can be selected.\n */\n maxSelectableColumns?: number;\n /**\n * A dictionary of column ids and names to use for the checkbox labels.\n */\n columnNames: Record<string, string>;\n /**\n * The content to display in the footer when maxSelectableColumns is defined.\n */\n footer?: ReactNode;\n /**\n * The tooltip to display when the user hovers over a disabled checkbox.\n * @default 'You have reached the maximum display limit.'\n */\n limitReachedTooltip?: string;\n}\n\nexport type TableColumnsSelectorFactory = Factory<{\n props: TableColumnsSelectorProps;\n ref: HTMLDivElement;\n stylesNames: TableColumnsSelectorStylesNames;\n compound: true;\n}>;\n\nconst COLUMNS_IDS_TO_EXCLUDE = ['collapsible', 'select'];\n\nconst defaultProps: Partial<TableColumnsSelectorProps> = {\n label: 'Edit columns',\n buttonVariant: 'outline',\n limitReachedTooltip: 'You have reached the maximum display limit.',\n showVisibleCountLabel: false,\n};\n\nexport const TableColumnsSelector = factory<TableColumnsSelectorFactory>((props, ref) => {\n const ctx = useTableStyles();\n const {\n label,\n buttonVariant,\n showVisibleCountLabel,\n nonHideableColumns = [],\n maxSelectableColumns,\n footer,\n limitReachedTooltip,\n columnNames,\n classNames,\n className,\n styles,\n style,\n vars,\n ...others\n } = useProps('TableColumnsSelector', defaultProps, props);\n const {getAllColumns} = useTable();\n\n const columnsToExclude = [...nonHideableColumns, ...COLUMNS_IDS_TO_EXCLUDE];\n\n const filteredColumns = getAllColumns().filter((column) => !columnsToExclude.includes(column.id));\n\n const selectedColumnsCount = filteredColumns.filter((column) => column.getIsVisible()).length;\n\n if (filteredColumns.length <= 0) {\n return null;\n }\n\n const stylesApiProps = {classNames, styles};\n\n return (\n <Grid.Col\n span=\"content\"\n order={TableComponentsOrder.ColumnsSelector}\n {...ctx.getStyles('columnSelector', {className, style, ...stylesApiProps})}\n {...others}\n >\n <Popover withinPortal position=\"bottom\" shadow=\"md\">\n <Popover.Target>\n <Button variant={buttonVariant}>{`${label}${\n showVisibleCountLabel ? ` (${selectedColumnsCount})` : ''\n }`}</Button>\n </Popover.Target>\n <Popover.Dropdown miw={240}>\n <ScrollArea.Autosize mah={154}>\n <Stack {...ctx.getStyles('columnSelectorWrapper', stylesApiProps)}>\n {filteredColumns.map((column) => {\n const isDisabled =\n selectedColumnsCount >= maxSelectableColumns && !column.getIsVisible();\n return (\n <Tooltip label={limitReachedTooltip} disabled={!isDisabled} position=\"left\">\n <div>\n <Checkbox\n key={column.id}\n label={columnNames?.[column.id] || column.id}\n name={column.id}\n checked={column.getIsVisible()}\n disabled={isDisabled}\n onChange={column.getToggleVisibilityHandler()}\n />\n </div>\n </Tooltip>\n );\n })}\n </Stack>\n </ScrollArea.Autosize>\n {maxSelectableColumns && (\n <>\n <Divider mb=\"xs\" mt=\"sm\" />\n {footer}\n </>\n )}\n </Popover.Dropdown>\n </Popover>\n </Grid.Col>\n );\n});\n"],"names":["Button","Checkbox","Divider","factory","Grid","Popover","ScrollArea","Stack","Tooltip","useProps","TableComponentsOrder","useTable","useTableStyles","COLUMNS_IDS_TO_EXCLUDE","defaultProps","label","buttonVariant","limitReachedTooltip","showVisibleCountLabel","TableColumnsSelector","props","ref","ctx","nonHideableColumns","maxSelectableColumns","footer","columnNames","classNames","className","styles","style","vars","others","getAllColumns","columnsToExclude","filteredColumns","filter","column","includes","id","selectedColumnsCount","getIsVisible","length","stylesApiProps","Col","span","order","ColumnsSelector","getStyles","withinPortal","position","shadow","Target","variant","Dropdown","miw","Autosize","mah","map","isDisabled","disabled","div","name","checked","onChange","getToggleVisibilityHandler","mb","mt"],"mappings":";AAAA,SAEIA,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,OAAO,EAEPC,IAAI,EACJC,OAAO,EACPC,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,QAAQ,QACL,gBAAgB;AAIvB,SAAQC,oBAAoB,QAAO,WAAW;AAC9C,SAAQC,QAAQ,EAAEC,cAAc,QAAO,kBAAkB;AAoDzD,MAAMC,yBAAyB;IAAC;IAAe;CAAS;AAExD,MAAMC,eAAmD;IACrDC,OAAO;IACPC,eAAe;IACfC,qBAAqB;IACrBC,uBAAuB;AAC3B;AAEA,OAAO,MAAMC,uBAAuBhB,QAAqC,CAACiB,OAAOC;IAC7E,MAAMC,MAAMV;IACZ,MAAM,EACFG,KAAK,EACLC,aAAa,EACbE,qBAAqB,EACrBK,qBAAqB,EAAE,EACvBC,oBAAoB,EACpBC,MAAM,EACNR,mBAAmB,EACnBS,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,MAAM,EACNC,KAAK,EACLC,IAAI,EACJ,GAAGC,QACN,GAAGvB,SAAS,wBAAwBK,cAAcM;IACnD,MAAM,EAACa,aAAa,EAAC,GAAGtB;IAExB,MAAMuB,mBAAmB;WAAIX;WAAuBV;KAAuB;IAE3E,MAAMsB,kBAAkBF,gBAAgBG,MAAM,CAAC,CAACC,SAAW,CAACH,iBAAiBI,QAAQ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CACG;;8CACI,KAACtB;oCAAQgE,IAAG;oCAAKC,IAAG;;gCACnB1C;;;;;;;;AAO7B,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/components/table/table-columns-selector/TableColumnsSelector.tsx"],"sourcesContent":["import {\n BoxProps,\n Button,\n Checkbox,\n Divider,\n factory,\n Factory,\n Grid,\n Popover,\n ScrollArea,\n Stack,\n Tooltip,\n useProps,\n} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {ReactNode} from 'react';\n\nimport {TableComponentsOrder} from '../Table';\nimport {useTable, useTableStyles} from '../TableContext';\n\nexport type TableColumnsSelectorStylesNames = 'columnSelector' | 'columnSelectorWrapper';\n\nexport interface TableColumnsSelectorProps extends BoxProps, CompoundStylesApiProps<TableColumnsSelectorFactory> {\n /**\n * The label of the button\n * @default 'Edit columns'\n */\n label?: ReactNode;\n /**\n * The style variant of the button\n * @default 'outline'\n */\n buttonVariant?: string;\n /**\n * An array of column ids that the user cannot hide. This is useful for columns that are required for the table to function properly.\n * @default []\n */\n nonHideableColumns?: string[];\n /**\n * Whether the count of visible columns is shown in the button label.\n * @default false\n */\n showVisibleCountLabel?: boolean;\n /**\n * The maximum number of columns that can be selected at the same time.\n * If defined a footer will render with the remaining number of columns that can be selected.\n */\n maxSelectableColumns?: number;\n /**\n * A dictionary of column ids and names to use for the checkbox labels.\n */\n columnNames: Record<string, string>;\n /**\n * The content to display in the footer when maxSelectableColumns is defined.\n */\n footer?: ReactNode;\n /**\n * The tooltip to display when the user hovers over a disabled checkbox.\n * @default 'You have reached the maximum display limit.'\n */\n limitReachedTooltip?: string;\n}\n\nexport type TableColumnsSelectorFactory = Factory<{\n props: TableColumnsSelectorProps;\n ref: HTMLDivElement;\n stylesNames: TableColumnsSelectorStylesNames;\n compound: true;\n}>;\n\nconst COLUMNS_IDS_TO_EXCLUDE = ['collapsible', 'select'];\n\nconst defaultProps: Partial<TableColumnsSelectorProps> = {\n label: 'Edit columns',\n buttonVariant: 'outline',\n limitReachedTooltip: 'You have reached the maximum display limit.',\n showVisibleCountLabel: false,\n};\n\nexport const TableColumnsSelector = factory<TableColumnsSelectorFactory>((props, ref) => {\n const ctx = useTableStyles();\n const {\n label,\n buttonVariant,\n showVisibleCountLabel,\n nonHideableColumns = [],\n maxSelectableColumns,\n footer,\n limitReachedTooltip,\n columnNames,\n classNames,\n className,\n styles,\n style,\n vars,\n ...others\n } = useProps('TableColumnsSelector', defaultProps, props);\n const {getAllColumns} = useTable();\n\n const columnsToExclude = [...nonHideableColumns, ...COLUMNS_IDS_TO_EXCLUDE];\n\n const filteredColumns = getAllColumns().filter((column) => !columnsToExclude.includes(column.id));\n\n const selectedColumnsCount = filteredColumns.filter((column) => column.getIsVisible()).length;\n\n if (filteredColumns.length <= 0) {\n return null;\n }\n\n const stylesApiProps = {classNames, styles};\n\n return (\n <Grid.Col\n span=\"content\"\n order={TableComponentsOrder.ColumnsSelector}\n {...ctx.getStyles('columnSelector', {className, style, ...stylesApiProps})}\n {...others}\n >\n <Popover withinPortal position=\"bottom\" shadow=\"md\">\n <Popover.Target>\n <Button variant={buttonVariant}>{`${label}${\n showVisibleCountLabel ? ` (${selectedColumnsCount})` : ''\n }`}</Button>\n </Popover.Target>\n <Popover.Dropdown miw={240}>\n <ScrollArea.Autosize mah={154}>\n <Stack {...ctx.getStyles('columnSelectorWrapper', stylesApiProps)}>\n {filteredColumns.map((column) => {\n const isDisabled =\n selectedColumnsCount >= maxSelectableColumns && !column.getIsVisible();\n return (\n <Tooltip label={limitReachedTooltip} disabled={!isDisabled} position=\"left\">\n <div>\n <Checkbox\n key={column.id}\n label={columnNames?.[column.id] || column.id}\n name={column.id}\n checked={column.getIsVisible()}\n disabled={isDisabled}\n onChange={column.getToggleVisibilityHandler()}\n />\n </div>\n </Tooltip>\n );\n })}\n </Stack>\n </ScrollArea.Autosize>\n {maxSelectableColumns && (\n <>\n <Divider mb=\"xs\" mt=\"sm\" />\n {footer}\n </>\n )}\n </Popover.Dropdown>\n </Popover>\n </Grid.Col>\n );\n});\n"],"names":["Button","Checkbox","Divider","factory","Grid","Popover","ScrollArea","Stack","Tooltip","useProps","TableComponentsOrder","useTable","useTableStyles","COLUMNS_IDS_TO_EXCLUDE","defaultProps","label","buttonVariant","limitReachedTooltip","showVisibleCountLabel","TableColumnsSelector","props","ref","ctx","nonHideableColumns","maxSelectableColumns","footer","columnNames","classNames","className","styles","style","vars","others","getAllColumns","columnsToExclude","filteredColumns","filter","column","includes","id","selectedColumnsCount","getIsVisible","length","stylesApiProps","Col","span","order","ColumnsSelector","getStyles","withinPortal","position","shadow","Target","variant","Dropdown","miw","Autosize","mah","map","isDisabled","disabled","div","name","checked","onChange","getToggleVisibilityHandler","mb","mt"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAEIA,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,OAAO,EAEPC,IAAI,EACJC,OAAO,EACPC,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,QAAQ,QACL,gBAAgB;AAIvB,SAAQC,oBAAoB,QAAO,WAAW;AAC9C,SAAQC,QAAQ,EAAEC,cAAc,QAAO,kBAAkB;AAoDzD,MAAMC,yBAAyB;IAAC;IAAe;CAAS;AAExD,MAAMC,eAAmD;IACrDC,OAAO;IACPC,eAAe;IACfC,qBAAqB;IACrBC,uBAAuB;AAC3B;AAEA,OAAO,MAAMC,uBAAuBhB,QAAqC,CAACiB,OAAOC;IAC7E,MAAMC,MAAMV;IACZ,MAAM,EACFG,KAAK,EACLC,aAAa,EACbE,qBAAqB,EACrBK,qBAAqB,EAAE,EACvBC,oBAAoB,EACpBC,MAAM,EACNR,mBAAmB,EACnBS,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,MAAM,EACNC,KAAK,EACLC,IAAI,EACJ,GAAGC,QACN,G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E,EAAE,CAAC,IAAIF,OAAOE,EAAE;gDAC5CuB,MAAMzB,OAAOE,EAAE;gDACfwB,SAAS1B,OAAOI,YAAY;gDAC5BmB,UAAUD;gDACVK,UAAU3B,OAAO4B,0BAA0B;+CALtC5B,OAAOE,EAAE;;;gCAUlC;;;wBAGPf,sCACG;;8CACI,KAACtB;oCAAQgE,IAAG;oCAAKC,IAAG;;gCACnB1C;;;;;;;;AAO7B,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/table/table-consumer/TableConsumer.tsx"],"sourcesContent":["import type {FunctionComponent, ReactNode} from 'react';\n\nexport const TableConsumer: FunctionComponent<{children: ReactNode}> = ({children}) => <>{children}</>;\n"],"names":["TableConsumer","children"],"mappings":";AAEA,OAAO,MAAMA,gBAA0D,CAAC,EAACC,QAAQ,EAAC,iBAAK;kBAAGA;OAAa"}
1
+ {"version":3,"sources":["../../../../../src/components/table/table-consumer/TableConsumer.tsx"],"sourcesContent":["import type {FunctionComponent, ReactNode} from 'react';\n\nexport const TableConsumer: FunctionComponent<{children: ReactNode}> = ({children}) => <>{children}</>;\n"],"names":["TableConsumer","children"],"rangeMappings":";;;","mappings":";AAEA,OAAO,MAAMA,gBAA0D,CAAC,EAACC,QAAQ,EAAC,iBAAK;kBAAGA;OAAa"}