@coveord/plasma-mantine 56.1.3 → 56.1.5

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 (123) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/.turbo/turbo-test.log +53 -55
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/cjs/components/header/Header.js +1 -1
  5. package/dist/cjs/components/header/Header.js.map +1 -1
  6. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbAnchor.d.ts +3 -3
  7. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbAnchor.d.ts.map +1 -1
  8. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbAnchor.js +1 -1
  9. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbAnchor.js.map +1 -1
  10. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbText.d.ts +3 -3
  11. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbText.d.ts.map +1 -1
  12. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbText.js +1 -1
  13. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbText.js.map +1 -1
  14. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -1
  15. package/dist/cjs/components/header/HeaderBreadcrumbs/HeaderBreadcrumbs.js.map +1 -1
  16. package/dist/cjs/components/header/HeaderDocAnchor/HeaderDocAnchor.js +1 -1
  17. package/dist/cjs/components/header/HeaderDocAnchor/HeaderDocAnchor.js.map +1 -1
  18. package/dist/cjs/components/header/HeaderRight/HeaderRight.js +1 -1
  19. package/dist/cjs/components/header/HeaderRight/HeaderRight.js.map +1 -1
  20. package/dist/cjs/components/prompt/Prompt.d.ts.map +1 -1
  21. package/dist/cjs/components/prompt/Prompt.js +1 -1
  22. package/dist/cjs/components/prompt/Prompt.js.map +1 -1
  23. package/dist/cjs/components/prompt/PromptCancelButton.js +1 -1
  24. package/dist/cjs/components/prompt/PromptCancelButton.js.map +1 -1
  25. package/dist/cjs/components/prompt/PromptConfirmButton.js +1 -1
  26. package/dist/cjs/components/prompt/PromptConfirmButton.js.map +1 -1
  27. package/dist/cjs/components/table/Table.d.ts +1 -1
  28. package/dist/cjs/components/table/Table.d.ts.map +1 -1
  29. package/dist/cjs/components/table/Table.js.map +1 -1
  30. package/dist/cjs/components/table/TableContext.d.ts +1 -1
  31. package/dist/cjs/components/table/TableContext.d.ts.map +1 -1
  32. package/dist/cjs/components/table/TableContext.js.map +1 -1
  33. package/dist/cjs/components/table/index.d.ts +1 -1
  34. package/dist/cjs/components/table/index.d.ts.map +1 -1
  35. package/dist/cjs/components/table/index.js.map +1 -1
  36. package/dist/cjs/components/table/layouts/row-layout/RowLayout.d.ts +1 -1
  37. package/dist/cjs/components/table/layouts/row-layout/RowLayout.d.ts.map +1 -1
  38. package/dist/cjs/components/table/layouts/row-layout/RowLayout.js.map +1 -1
  39. package/dist/cjs/components/table/layouts/row-layout/RowLayoutBody.d.ts +1 -1
  40. package/dist/cjs/components/table/layouts/row-layout/RowLayoutBody.d.ts.map +1 -1
  41. package/dist/cjs/components/table/layouts/row-layout/RowLayoutBody.js.map +1 -1
  42. package/dist/cjs/components/table/layouts/row-layout/RowLayoutHeader.d.ts +1 -1
  43. package/dist/cjs/components/table/layouts/row-layout/RowLayoutHeader.d.ts.map +1 -1
  44. package/dist/cjs/components/table/layouts/row-layout/RowLayoutHeader.js.map +1 -1
  45. package/dist/cjs/components/table/table-actions/TableActionsList.d.ts +1 -1
  46. package/dist/cjs/components/table/table-actions/TableActionsList.d.ts.map +1 -1
  47. package/dist/cjs/components/table/table-actions/TableActionsList.js.map +1 -1
  48. package/dist/cjs/components/table/table-pagination/TablePagination.d.ts +1 -1
  49. package/dist/cjs/components/table/table-pagination/TablePagination.d.ts.map +1 -1
  50. package/dist/cjs/components/table/table-pagination/TablePagination.js.map +1 -1
  51. package/dist/cjs/components/table/table-per-page/TablePerPage.d.ts +1 -1
  52. package/dist/cjs/components/table/table-per-page/TablePerPage.d.ts.map +1 -1
  53. package/dist/cjs/components/table/table-per-page/TablePerPage.js.map +1 -1
  54. package/dist/esm/components/header/Header.js +1 -1
  55. package/dist/esm/components/header/Header.js.map +1 -1
  56. package/dist/esm/components/header/HeaderBreadcrumbs/HeaderBreadcrumbAnchor.d.ts +3 -3
  57. package/dist/esm/components/header/HeaderBreadcrumbs/HeaderBreadcrumbAnchor.d.ts.map +1 -1
  58. package/dist/esm/components/header/HeaderBreadcrumbs/HeaderBreadcrumbAnchor.js +1 -1
  59. package/dist/esm/components/header/HeaderBreadcrumbs/HeaderBreadcrumbAnchor.js.map +1 -1
  60. package/dist/esm/components/header/HeaderBreadcrumbs/HeaderBreadcrumbText.d.ts +3 -3
  61. package/dist/esm/components/header/HeaderBreadcrumbs/HeaderBreadcrumbText.d.ts.map +1 -1
  62. package/dist/esm/components/header/HeaderBreadcrumbs/HeaderBreadcrumbText.js +1 -1
  63. package/dist/esm/components/header/HeaderBreadcrumbs/HeaderBreadcrumbText.js.map +1 -1
  64. package/dist/esm/components/header/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -1
  65. package/dist/esm/components/header/HeaderBreadcrumbs/HeaderBreadcrumbs.js.map +1 -1
  66. package/dist/esm/components/header/HeaderDocAnchor/HeaderDocAnchor.js +1 -1
  67. package/dist/esm/components/header/HeaderDocAnchor/HeaderDocAnchor.js.map +1 -1
  68. package/dist/esm/components/header/HeaderRight/HeaderRight.js +1 -1
  69. package/dist/esm/components/header/HeaderRight/HeaderRight.js.map +1 -1
  70. package/dist/esm/components/prompt/Prompt.d.ts.map +1 -1
  71. package/dist/esm/components/prompt/Prompt.js +1 -1
  72. package/dist/esm/components/prompt/Prompt.js.map +1 -1
  73. package/dist/esm/components/prompt/PromptCancelButton.js +1 -1
  74. package/dist/esm/components/prompt/PromptCancelButton.js.map +1 -1
  75. package/dist/esm/components/prompt/PromptConfirmButton.js +1 -1
  76. package/dist/esm/components/prompt/PromptConfirmButton.js.map +1 -1
  77. package/dist/esm/components/table/Table.d.ts +1 -1
  78. package/dist/esm/components/table/Table.d.ts.map +1 -1
  79. package/dist/esm/components/table/Table.js.map +1 -1
  80. package/dist/esm/components/table/TableContext.d.ts +1 -1
  81. package/dist/esm/components/table/TableContext.d.ts.map +1 -1
  82. package/dist/esm/components/table/TableContext.js.map +1 -1
  83. package/dist/esm/components/table/index.d.ts +1 -1
  84. package/dist/esm/components/table/index.d.ts.map +1 -1
  85. package/dist/esm/components/table/index.js.map +1 -1
  86. package/dist/esm/components/table/layouts/row-layout/RowLayout.d.ts +1 -1
  87. package/dist/esm/components/table/layouts/row-layout/RowLayout.d.ts.map +1 -1
  88. package/dist/esm/components/table/layouts/row-layout/RowLayout.js.map +1 -1
  89. package/dist/esm/components/table/layouts/row-layout/RowLayoutBody.d.ts +1 -1
  90. package/dist/esm/components/table/layouts/row-layout/RowLayoutBody.d.ts.map +1 -1
  91. package/dist/esm/components/table/layouts/row-layout/RowLayoutBody.js.map +1 -1
  92. package/dist/esm/components/table/layouts/row-layout/RowLayoutHeader.d.ts +1 -1
  93. package/dist/esm/components/table/layouts/row-layout/RowLayoutHeader.d.ts.map +1 -1
  94. package/dist/esm/components/table/layouts/row-layout/RowLayoutHeader.js.map +1 -1
  95. package/dist/esm/components/table/table-actions/TableActionsList.d.ts +1 -1
  96. package/dist/esm/components/table/table-actions/TableActionsList.d.ts.map +1 -1
  97. package/dist/esm/components/table/table-actions/TableActionsList.js.map +1 -1
  98. package/dist/esm/components/table/table-pagination/TablePagination.d.ts +1 -1
  99. package/dist/esm/components/table/table-pagination/TablePagination.d.ts.map +1 -1
  100. package/dist/esm/components/table/table-pagination/TablePagination.js.map +1 -1
  101. package/dist/esm/components/table/table-per-page/TablePerPage.d.ts +1 -1
  102. package/dist/esm/components/table/table-per-page/TablePerPage.d.ts.map +1 -1
  103. package/dist/esm/components/table/table-per-page/TablePerPage.js.map +1 -1
  104. package/package.json +3 -3
  105. package/src/components/header/Header.tsx +1 -1
  106. package/src/components/header/HeaderBreadcrumbs/HeaderBreadcrumbAnchor.tsx +1 -1
  107. package/src/components/header/HeaderBreadcrumbs/HeaderBreadcrumbText.tsx +1 -1
  108. package/src/components/header/HeaderBreadcrumbs/HeaderBreadcrumbs.tsx +1 -1
  109. package/src/components/header/HeaderDocAnchor/HeaderDocAnchor.tsx +1 -1
  110. package/src/components/header/HeaderRight/HeaderRight.tsx +1 -1
  111. package/src/components/prompt/Prompt.tsx +1 -1
  112. package/src/components/prompt/PromptCancelButton.tsx +1 -1
  113. package/src/components/prompt/PromptConfirmButton.tsx +1 -1
  114. package/src/components/table/Table.tsx +1 -1
  115. package/src/components/table/TableContext.tsx +1 -1
  116. package/src/components/table/__tests__/Table.spec.tsx +1 -1
  117. package/src/components/table/index.ts +1 -1
  118. package/src/components/table/layouts/row-layout/RowLayout.tsx +1 -1
  119. package/src/components/table/layouts/row-layout/RowLayoutBody.tsx +1 -1
  120. package/src/components/table/layouts/row-layout/RowLayoutHeader.tsx +1 -1
  121. package/src/components/table/table-actions/TableActionsList.tsx +1 -1
  122. package/src/components/table/table-pagination/TablePagination.tsx +1 -1
  123. package/src/components/table/table-per-page/TablePerPage.tsx +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/prompt/Prompt.tsx"],"sourcesContent":["import {\n Box,\n factory,\n Factory,\n ModalRootProps,\n ModalStylesNames,\n StylesApiProps,\n Title,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport {Children, ComponentType, ReactElement, ReactNode} from 'react';\nimport {Modal} from '../modal/index.js';\nimport {PromptContextProvider} from './Prompt.context';\nimport classes from './Prompt.module.css';\nimport {PromptCancelButton, PromptCancelButtonStylesNamesVariant} from './PromptCancelButton.js';\nimport {PromptConfirmButton, PromptConfirmButtonStylesNamesVariant} from './PromptConfirmButton.js';\nimport CriticalIcon from './icons/CriticalIcon.js';\nimport InfoIcon from './icons/InfoIcon.js';\nimport SuccessIcon from './icons/SuccessIcon.js';\nimport WarningIcon from './icons/WarningIcon.js';\n\nexport type PromptVariant = 'success' | 'warning' | 'critical' | 'info';\nexport type PromptVars = {root: '--prompt-icon-size'};\nexport type PromptStylesNames =\n | Exclude<ModalStylesNames, 'title'>\n | 'icon'\n | PromptCancelButtonStylesNamesVariant\n | PromptConfirmButtonStylesNamesVariant;\n\nexport interface PromptProps\n extends StylesApiProps<PromptFactory>,\n Omit<ModalRootProps, 'classNames' | 'styles' | 'vars'> {\n /**\n * Controls prompt appearance\n *\n * @default \"info\"\n */\n variant?: PromptVariant;\n children: ReactNode;\n title: ReactNode;\n}\n\nexport type PromptFactory = Factory<{\n props: PromptProps;\n ref: HTMLDivElement;\n vars: PromptVars;\n variant: PromptVariant;\n stylesNames: PromptStylesNames;\n staticComponents: {\n CancelButton: typeof PromptCancelButton;\n ConfirmButton: typeof PromptConfirmButton;\n Footer: typeof PromptFooter;\n };\n}>;\n\nconst PromptVariantIconsMapping: Record<PromptVariant, ComponentType> = {\n success: SuccessIcon,\n warning: WarningIcon,\n critical: CriticalIcon,\n info: InfoIcon,\n};\n\nconst defaultProps: Partial<PromptProps> = {\n variant: 'info',\n centered: true,\n};\n\nexport const Prompt = factory<PromptFactory>((_props, ref) => {\n const props = useProps('Prompt', defaultProps, _props);\n const {variant, title, children, className, classNames, style, styles, unstyled, vars, ...others} = props;\n const getStyles = useStyles<PromptFactory>({\n name: 'Prompt',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n });\n const stylesApiProps = {classNames, styles};\n\n const footers: ReactElement[] = [];\n const otherChildren: ReactElement[] = [];\n\n Children.forEach(children, (child: ReactElement) => {\n (child.type === Prompt.Footer ? footers : otherChildren).push(child);\n });\n\n const IconComponent = PromptVariantIconsMapping[variant];\n\n return (\n <PromptContextProvider value={{variant, getStyles}}>\n <Modal.Root ref={ref} variant=\"prompt\" size=\"sm\" {...others} {...getStyles('root')}>\n <Modal.Overlay {...getStyles('overlay', stylesApiProps)} />\n <Modal.Content {...getStyles('content', stylesApiProps)}>\n <Modal.Header {...getStyles('header', stylesApiProps)}>\n <IconComponent />\n <Modal.Title>\n <Title order={3} component=\"div\">\n {title}\n </Title>\n </Modal.Title>\n <Modal.CloseButton {...getStyles('close', stylesApiProps)} />\n </Modal.Header>\n <Modal.Body {...getStyles('body', stylesApiProps)}>\n <Box {...getStyles('inner', stylesApiProps)}>{otherChildren}</Box>\n </Modal.Body>\n {footers}\n </Modal.Content>\n </Modal.Root>\n </PromptContextProvider>\n );\n});\n\nconst PromptFooter = Modal.Footer.withProps({pt: 0});\n\nPrompt.CancelButton = PromptCancelButton;\nPrompt.ConfirmButton = PromptConfirmButton;\nPrompt.Footer = PromptFooter;\n"],"names":["Box","factory","Title","useProps","useStyles","Children","Modal","PromptContextProvider","classes","PromptCancelButton","PromptConfirmButton","CriticalIcon","InfoIcon","SuccessIcon","WarningIcon","PromptVariantIconsMapping","success","warning","critical","info","defaultProps","variant","centered","Prompt","_props","ref","props","title","children","className","classNames","style","styles","unstyled","vars","others","getStyles","name","stylesApiProps","footers","otherChildren","forEach","child","type","Footer","push","IconComponent","value","Root","size","Overlay","Content","Header","order","component","CloseButton","Body","PromptFooter","withProps","pt","CancelButton","ConfirmButton"],"mappings":";AAAA,SACIA,GAAG,EACHC,OAAO,EAKPC,KAAK,EACLC,QAAQ,EACRC,SAAS,QACN,gBAAgB;AACvB,SAAQC,QAAQ,QAA+C,QAAQ;AACvE,SAAQC,KAAK,QAAO,oBAAoB;AACxC,SAAQC,qBAAqB,QAAO,mBAAmB;AACvD,OAAOC,aAAa,sBAAsB;AAC1C,SAAQC,kBAAkB,QAA6C,0BAA0B;AACjG,SAAQC,mBAAmB,QAA8C,2BAA2B;AACpG,OAAOC,kBAAkB,0BAA0B;AACnD,OAAOC,cAAc,sBAAsB;AAC3C,OAAOC,iBAAiB,yBAAyB;AACjD,OAAOC,iBAAiB,yBAAyB;AAoCjD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;8CAGT,KAACrB,MAAMiD,WAAW;oCAAE,GAAGnB,UAAU,SAASE,eAAe;;;;sCAE7D,KAAChC,MAAMkD,IAAI;4BAAE,GAAGpB,UAAU,QAAQE,eAAe;sCAC7C,cAAA,KAACtC;gCAAK,GAAGoC,UAAU,SAASE,eAAe;0CAAGE;;;wBAEjDD;;;;;;AAKrB,GAAG;AAEH,MAAMkB,eAAenD,MAAMsC,MAAM,CAACc,SAAS,CAAC;IAACC,IAAI;AAAC;AAElDpC,OAAOqC,YAAY,GAAGnD;AACtBc,OAAOsC,aAAa,GAAGnD;AACvBa,OAAOqB,MAAM,GAAGa"}
1
+ {"version":3,"sources":["../../../../src/components/prompt/Prompt.tsx"],"sourcesContent":["import {\n Box,\n factory,\n Factory,\n ModalRootProps,\n ModalStylesNames,\n StylesApiProps,\n Title,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport {Children, ComponentType, ReactElement, ReactNode} from 'react';\nimport {Modal} from '../modal/index.js';\nimport {PromptContextProvider} from './Prompt.context.js';\nimport classes from './Prompt.module.css';\nimport {PromptCancelButton, PromptCancelButtonStylesNamesVariant} from './PromptCancelButton.js';\nimport {PromptConfirmButton, PromptConfirmButtonStylesNamesVariant} from './PromptConfirmButton.js';\nimport CriticalIcon from './icons/CriticalIcon.js';\nimport InfoIcon from './icons/InfoIcon.js';\nimport SuccessIcon from './icons/SuccessIcon.js';\nimport WarningIcon from './icons/WarningIcon.js';\n\nexport type PromptVariant = 'success' | 'warning' | 'critical' | 'info';\nexport type PromptVars = {root: '--prompt-icon-size'};\nexport type PromptStylesNames =\n | Exclude<ModalStylesNames, 'title'>\n | 'icon'\n | PromptCancelButtonStylesNamesVariant\n | PromptConfirmButtonStylesNamesVariant;\n\nexport interface PromptProps\n extends StylesApiProps<PromptFactory>,\n Omit<ModalRootProps, 'classNames' | 'styles' | 'vars'> {\n /**\n * Controls prompt appearance\n *\n * @default \"info\"\n */\n variant?: PromptVariant;\n children: ReactNode;\n title: ReactNode;\n}\n\nexport type PromptFactory = Factory<{\n props: PromptProps;\n ref: HTMLDivElement;\n vars: PromptVars;\n variant: PromptVariant;\n stylesNames: PromptStylesNames;\n staticComponents: {\n CancelButton: typeof PromptCancelButton;\n ConfirmButton: typeof PromptConfirmButton;\n Footer: typeof PromptFooter;\n };\n}>;\n\nconst PromptVariantIconsMapping: Record<PromptVariant, ComponentType> = {\n success: SuccessIcon,\n warning: WarningIcon,\n critical: CriticalIcon,\n info: InfoIcon,\n};\n\nconst defaultProps: Partial<PromptProps> = {\n variant: 'info',\n centered: true,\n};\n\nexport const Prompt = factory<PromptFactory>((_props, ref) => {\n const props = useProps('Prompt', defaultProps, _props);\n const {variant, title, children, className, classNames, style, styles, unstyled, vars, ...others} = props;\n const getStyles = useStyles<PromptFactory>({\n name: 'Prompt',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n });\n const stylesApiProps = {classNames, styles};\n\n const footers: ReactElement[] = [];\n const otherChildren: ReactElement[] = [];\n\n Children.forEach(children, (child: ReactElement) => {\n (child.type === Prompt.Footer ? footers : otherChildren).push(child);\n });\n\n const IconComponent = PromptVariantIconsMapping[variant];\n\n return (\n <PromptContextProvider value={{variant, getStyles}}>\n <Modal.Root ref={ref} variant=\"prompt\" size=\"sm\" {...others} {...getStyles('root')}>\n <Modal.Overlay {...getStyles('overlay', stylesApiProps)} />\n <Modal.Content {...getStyles('content', stylesApiProps)}>\n <Modal.Header {...getStyles('header', stylesApiProps)}>\n <IconComponent />\n <Modal.Title>\n <Title order={3} component=\"div\">\n {title}\n </Title>\n </Modal.Title>\n <Modal.CloseButton {...getStyles('close', stylesApiProps)} />\n </Modal.Header>\n <Modal.Body {...getStyles('body', stylesApiProps)}>\n <Box {...getStyles('inner', stylesApiProps)}>{otherChildren}</Box>\n </Modal.Body>\n {footers}\n </Modal.Content>\n </Modal.Root>\n </PromptContextProvider>\n );\n});\n\nconst PromptFooter = Modal.Footer.withProps({pt: 0});\n\nPrompt.CancelButton = PromptCancelButton;\nPrompt.ConfirmButton = PromptConfirmButton;\nPrompt.Footer = PromptFooter;\n"],"names":["Box","factory","Title","useProps","useStyles","Children","Modal","PromptContextProvider","classes","PromptCancelButton","PromptConfirmButton","CriticalIcon","InfoIcon","SuccessIcon","WarningIcon","PromptVariantIconsMapping","success","warning","critical","info","defaultProps","variant","centered","Prompt","_props","ref","props","title","children","className","classNames","style","styles","unstyled","vars","others","getStyles","name","stylesApiProps","footers","otherChildren","forEach","child","type","Footer","push","IconComponent","value","Root","size","Overlay","Content","Header","order","component","CloseButton","Body","PromptFooter","withProps","pt","CancelButton","ConfirmButton"],"mappings":";AAAA,SACIA,GAAG,EACHC,OAAO,EAKPC,KAAK,EACLC,QAAQ,EACRC,SAAS,QACN,gBAAgB;AACvB,SAAQC,QAAQ,QAA+C,QAAQ;AACvE,SAAQC,KAAK,QAAO,oBAAoB;AACxC,SAAQC,qBAAqB,QAAO,sBAAsB;AAC1D,OAAOC,aAAa,sBAAsB;AAC1C,SAAQC,kBAAkB,QAA6C,0BAA0B;AACjG,SAAQC,mBAAmB,QAA8C,2BAA2B;AACpG,OAAOC,kBAAkB,0BAA0B;AACnD,OAAOC,cAAc,sBAAsB;AAC3C,OAAOC,iBAAiB,yBAAyB;AACjD,OAAOC,iBAAiB,yBAAyB;AAoCjD,MAAMC,4BAAkE;IACpEC,SAASH;IACTI,SAASH;IACTI,UAAUP;IACVQ,MAAMP;AACV;AAEA,MAAMQ,eAAqC;IACvCC,SAAS;IACTC,UAAU;AACd;AAEA,OAAO,MAAMC,SAAStB,QAAuB,CAACuB,QAAQC;IAClD,MAAMC,QAAQvB,SAAS,UAAUiB,cAAcI;IAC/C,MAAM,EAACH,OAAO,EAAEM,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC,QAAO,GAAGT;IACpG,MAAMU,YAAYhC,UAAyB;QACvCiC,MAAM;Q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x as _jsx } from "react/jsx-runtime";
2
2
  import { factory, useProps } from '@mantine/core';
3
3
  import { Button } from '../button/Button.js';
4
- import { usePromptContext } from './Prompt.context';
4
+ import { usePromptContext } from './Prompt.context.js';
5
5
  const defaultProps = {};
6
6
  export const PromptCancelButton = factory((_props, ref)=>{
7
7
  const { getStyles } = usePromptContext();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/prompt/PromptCancelButton.tsx"],"sourcesContent":["import {CompoundStylesApiProps, factory, Factory, useProps} from '@mantine/core';\nimport {Button, ButtonProps} from '../button/Button.js';\nimport {usePromptContext} from './Prompt.context';\n\nexport type PromptCancelButtonStylesNamesVariant = 'cancel';\n\nexport interface PromptCancelButtonProps\n extends CompoundStylesApiProps<PromptCancelButtonFactory>,\n Omit<ButtonProps, 'primary' | 'classNames' | 'styles' | 'vars' | 'variant'> {}\n\nexport type PromptCancelButtonFactory = Factory<{\n props: PromptCancelButtonProps;\n ref: HTMLButtonElement;\n stylesNames: PromptCancelButtonStylesNamesVariant;\n compound: true;\n}>;\n\nconst defaultProps: Partial<PromptCancelButtonProps> = {};\n\nexport const PromptCancelButton = factory<PromptCancelButtonFactory>((_props, ref) => {\n const {getStyles} = usePromptContext();\n const props = useProps('PromptCancelButton', defaultProps, _props);\n const {className, classNames, style, styles, unstyled, vars, ...others} = props;\n\n return <Button.Tertiary ref={ref} {...others} {...getStyles('cancel', {style, styles, className, classNames})} />;\n});\n"],"names":["factory","useProps","Button","usePromptContext","defaultProps","PromptCancelButton","_props","ref","getStyles","props","className","classNames","style","styles","unstyled","vars","others","Tertiary"],"mappings":";AAAA,SAAgCA,OAAO,EAAWC,QAAQ,QAAO,gBAAgB;AACjF,SAAQC,MAAM,QAAoB,sBAAsB;AACxD,SAAQC,gBAAgB,QAAO,mBAAmB;AAelD,MAAMC,eAAiD,CAAC;AAExD,OAAO,MAAMC,qBAAqBL,QAAmC,CAACM,QAAQC;IAC1E,MAAM,EAACC,SAAS,EAAC,GAAGL;IACpB,MAAMM,QAAQR,SAAS,sBAAsBG,cAAcE;IAC3D,MAAM,EAACI,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC,QAAO,GAAGP;IAE1E,qBAAO,KAACP,OAAOe,QAAQ;QAACV,KAAKA;QAAM,GAAGS,MAAM;QAAG,GAAGR,UAAU,UAAU;YAACI;YAAOC;YAAQH;YAAWC;QAAU,EAAE;;AACjH,GAAG"}
1
+ {"version":3,"sources":["../../../../src/components/prompt/PromptCancelButton.tsx"],"sourcesContent":["import {CompoundStylesApiProps, factory, Factory, useProps} from '@mantine/core';\nimport {Button, ButtonProps} from '../button/Button.js';\nimport {usePromptContext} from './Prompt.context.js';\n\nexport type PromptCancelButtonStylesNamesVariant = 'cancel';\n\nexport interface PromptCancelButtonProps\n extends CompoundStylesApiProps<PromptCancelButtonFactory>,\n Omit<ButtonProps, 'primary' | 'classNames' | 'styles' | 'vars' | 'variant'> {}\n\nexport type PromptCancelButtonFactory = Factory<{\n props: PromptCancelButtonProps;\n ref: HTMLButtonElement;\n stylesNames: PromptCancelButtonStylesNamesVariant;\n compound: true;\n}>;\n\nconst defaultProps: Partial<PromptCancelButtonProps> = {};\n\nexport const PromptCancelButton = factory<PromptCancelButtonFactory>((_props, ref) => {\n const {getStyles} = usePromptContext();\n const props = useProps('PromptCancelButton', defaultProps, _props);\n const {className, classNames, style, styles, unstyled, vars, ...others} = props;\n\n return <Button.Tertiary ref={ref} {...others} {...getStyles('cancel', {style, styles, className, classNames})} />;\n});\n"],"names":["factory","useProps","Button","usePromptContext","defaultProps","PromptCancelButton","_props","ref","getStyles","props","className","classNames","style","styles","unstyled","vars","others","Tertiary"],"mappings":";AAAA,SAAgCA,OAAO,EAAWC,QAAQ,QAAO,gBAAgB;AACjF,SAAQC,MAAM,QAAoB,sBAAsB;AACxD,SAAQC,gBAAgB,QAAO,sBAAsB;AAerD,MAAMC,eAAiD,CAAC;AAExD,OAAO,MAAMC,qBAAqBL,QAAmC,CAACM,QAAQC;IAC1E,MAAM,EAACC,SAAS,EAAC,GAAGL;IACpB,MAAMM,QAAQR,SAAS,sBAAsBG,cAAcE;IAC3D,MAAM,EAACI,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC,QAAO,GAAGP;IAE1E,qBAAO,KAACP,OAAOe,QAAQ;QAACV,KAAKA;QAAM,GAAGS,MAAM;QAAG,GAAGR,UAAU,UAAU;YAACI;YAAOC;YAAQH;YAAWC;QAAU,EAAE;;AACjH,GAAG"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { factory, useProps } from '@mantine/core';
3
3
  import { Button } from '../button/Button.js';
4
- import { usePromptContext } from './Prompt.context';
4
+ import { usePromptContext } from './Prompt.context.js';
5
5
  const COMPONENT_BY_VARIANT = {
6
6
  success: Button.Primary,
7
7
  info: Button.Primary,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/prompt/PromptConfirmButton.tsx"],"sourcesContent":["import {CompoundStylesApiProps, factory, Factory, PolymorphicComponentProps, useProps} from '@mantine/core';\nimport {JSXElementConstructor, ReactElement} from 'react';\nimport {Button, ButtonProps} from '../button/Button.js';\nimport {PromptVariant} from './Prompt.js';\nimport {usePromptContext} from './Prompt.context';\n\nexport type PromptConfirmButtonStylesNamesVariant = 'confirm';\n\nexport interface PromptConfirmButtonProps\n extends CompoundStylesApiProps<PromptConfirmButtonFactory>,\n Omit<ButtonProps, 'primary' | 'classNames' | 'styles' | 'vars' | 'variant'> {}\n\nexport type PromptConfirmButtonFactory = Factory<{\n props: PromptConfirmButtonProps;\n ref: HTMLButtonElement;\n stylesNames: PromptConfirmButtonStylesNamesVariant;\n compound: true;\n}>;\n\nconst COMPONENT_BY_VARIANT: Record<\n PromptVariant,\n <L = 'button'>(\n props: PolymorphicComponentProps<L, ButtonProps>,\n ) => ReactElement<any, string | JSXElementConstructor<any>>\n> = {\n success: Button.Primary,\n info: Button.Primary,\n warning: Button.DestructivePrimary,\n critical: Button.DestructivePrimary,\n};\n\nconst defaultProps: Partial<PromptConfirmButtonProps> = {};\n\nexport const PromptConfirmButton = factory<PromptConfirmButtonFactory>((_props, ref) => {\n const {variant, getStyles} = usePromptContext();\n const props = useProps('PromptConfirmButton', defaultProps, _props);\n const {\n className,\n classNames,\n style,\n styles,\n unstyled,\n vars,\n disabled,\n disabledTooltip,\n disabledTooltipProps,\n ...others\n } = props;\n const Component = COMPONENT_BY_VARIANT[variant];\n return (\n <Component\n ref={ref}\n disabled={disabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n {...others}\n {...getStyles('confirm', {style, styles, className, classNames})}\n />\n );\n});\n"],"names":["factory","useProps","Button","usePromptContext","COMPONENT_BY_VARIANT","success","Primary","info","warning","DestructivePrimary","critical","defaultProps","PromptConfirmButton","_props","ref","variant","getStyles","props","className","classNames","style","styles","unstyled","vars","disabled","disabledTooltip","disabledTooltipProps","others","Component"],"mappings":";AAAA,SAAgCA,OAAO,EAAsCC,QAAQ,QAAO,gBAAgB;AAE5G,SAAQC,MAAM,QAAoB,sBAAsB;AAExD,SAAQC,gBAAgB,QAAO,mBAAmB;AAelD,MAAMC,uBAKF;IACAC,SAASH,OAAOI,OAAO;IACvBC,MAAML,OAAOI,OAAO;IACpBE,SAASN,OAAOO,kBAAkB;IAClCC,UAAUR,OAAOO,kBAAkB;AACvC;AAEA,MAAME,eAAkD,CAAC;AAEzD,OAAO,MAAMC,sBAAsBZ,QAAoC,CAACa,QAAQC;IAC5E,MAAM,EAACC,OAAO,EAAEC,SAAS,EAAC,GAAGb;IAC7B,MAAMc,QAAQhB,SAAS,uBAAuBU,cAAcE;IAC5D,MAAM,EACFK,SAAS,EACTC,UAAU,EACVC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,IAAI,EACJC,QAAQ,EACRC,eAAe,EACfC,oBAAoB,EACpB,GAAGC,QACN,GAAGV;IACJ,MAAMW,YAAYxB,oBAAoB,CAACW,QAAQ;IAC/C,qBACI,KAACa;QACGd,KAAKA;QACLU,UAAUA;QACVC,iBAAiBA;QACjBC,sBAAsBA;QACrB,GAAGC,MAAM;QACT,GAAGX,UAAU,WAAW;YAACI;YAAOC;YAAQH;YAAWC;QAAU,EAAE;;AAG5E,GAAG"}
1
+ {"version":3,"sources":["../../../../src/components/prompt/PromptConfirmButton.tsx"],"sourcesContent":["import {CompoundStylesApiProps, factory, Factory, PolymorphicComponentProps, useProps} from '@mantine/core';\nimport {JSXElementConstructor, ReactElement} from 'react';\nimport {Button, ButtonProps} from '../button/Button.js';\nimport {PromptVariant} from './Prompt.js';\nimport {usePromptContext} from './Prompt.context.js';\n\nexport type PromptConfirmButtonStylesNamesVariant = 'confirm';\n\nexport interface PromptConfirmButtonProps\n extends CompoundStylesApiProps<PromptConfirmButtonFactory>,\n Omit<ButtonProps, 'primary' | 'classNames' | 'styles' | 'vars' | 'variant'> {}\n\nexport type PromptConfirmButtonFactory = Factory<{\n props: PromptConfirmButtonProps;\n ref: HTMLButtonElement;\n stylesNames: PromptConfirmButtonStylesNamesVariant;\n compound: true;\n}>;\n\nconst COMPONENT_BY_VARIANT: Record<\n PromptVariant,\n <L = 'button'>(\n props: PolymorphicComponentProps<L, ButtonProps>,\n ) => ReactElement<any, string | JSXElementConstructor<any>>\n> = {\n success: Button.Primary,\n info: Button.Primary,\n warning: Button.DestructivePrimary,\n critical: Button.DestructivePrimary,\n};\n\nconst defaultProps: Partial<PromptConfirmButtonProps> = {};\n\nexport const PromptConfirmButton = factory<PromptConfirmButtonFactory>((_props, ref) => {\n const {variant, getStyles} = usePromptContext();\n const props = useProps('PromptConfirmButton', defaultProps, _props);\n const {\n className,\n classNames,\n style,\n styles,\n unstyled,\n vars,\n disabled,\n disabledTooltip,\n disabledTooltipProps,\n ...others\n } = props;\n const Component = COMPONENT_BY_VARIANT[variant];\n return (\n <Component\n ref={ref}\n disabled={disabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n {...others}\n {...getStyles('confirm', {style, styles, className, classNames})}\n />\n );\n});\n"],"names":["factory","useProps","Button","usePromptContext","COMPONENT_BY_VARIANT","success","Primary","info","warning","DestructivePrimary","critical","defaultProps","PromptConfirmButton","_props","ref","variant","getStyles","props","className","classNames","style","styles","unstyled","vars","disabled","disabledTooltip","disabledTooltipProps","others","Component"],"mappings":";AAAA,SAAgCA,OAAO,EAAsCC,QAAQ,QAAO,gBAAgB;AAE5G,SAAQC,MAAM,QAAoB,sBAAsB;AAExD,SAAQC,gBAAgB,QAAO,sBAAsB;AAerD,MAAMC,uBAKF;IACAC,SAASH,OAAOI,OAAO;IACvBC,MAAML,OAAOI,OAAO;IACpBE,SAASN,OAAOO,kBAAkB;IAClCC,UAAUR,OAAOO,kBAAkB;AACvC;AAEA,MAAME,eAAkD,CAAC;AAEzD,OAAO,MAAMC,sBAAsBZ,QAAoC,CAACa,QAAQC;IAC5E,MAAM,EAACC,OAAO,EAAEC,SAAS,EAAC,GAAGb;IAC7B,MAAMc,QAAQhB,SAAS,uBAAuBU,cAAcE;IAC5D,MAAM,EACFK,SAAS,EACTC,UAAU,EACVC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,IAAI,EACJC,QAAQ,EACRC,eAAe,EACfC,oBAAoB,EACpB,GAAGC,QACN,GAAGV;IACJ,MAAMW,YAAYxB,oBAAoB,CAACW,QAAQ;IAC/C,qBACI,KAACa;QACGd,KAAKA;QACLU,UAAUA;QACVC,iBAAiBA;QACjBC,sBAAsBA;QACrB,GAAGC,MAAM;QACT,GAAGX,UAAU,WAAW;YAACI;YAAOC;YAAQH;YAAWC;QAAU,EAAE;;AAG5E,GAAG"}
@@ -2,7 +2,7 @@ import { Factory } from '@mantine/core';
2
2
  import { ColumnDef } from '@tanstack/react-table';
3
3
  import { ForwardedRef } from 'react';
4
4
  import { CustomComponentThemeExtend } from '../../utils/index.js';
5
- import { TableLayout, TableProps } from './Table.types';
5
+ import { TableLayout, TableProps } from './Table.types.js';
6
6
  import { TableLayouts } from './layouts/TableLayouts.js';
7
7
  import { TableActionItem, TableActionItemStylesNames, TableHeaderActionsStylesNames } from './table-actions/index.js';
8
8
  import { TableActionsListStylesNames } from './table-actions/TableActionsList.js';
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAA8B,MAAM,eAAe,CAAC;AAEhF,OAAO,EACH,SAAS,EAMZ,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAW,YAAY,EAAkC,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAC,0BAA0B,EAAW,MAAM,sBAAsB,CAAC;AAE1E,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAC,eAAe,EAAE,0BAA0B,EAAE,6BAA6B,EAAC,MAAM,0BAA0B,CAAC;AACpH,OAAO,EAAC,2BAA2B,EAAC,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAC,kBAAkB,EAAC,MAAM,sCAAsC,CAAC;AACxE,OAAO,EACH,oBAAoB,EACpB,sBAAsB,EACtB,iCAAiC,EACpC,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAAC,oBAAoB,EAAE,+BAA+B,EAAC,MAAM,kDAAkD,CAAC;AACvH,OAAO,EAAC,oBAAoB,EAAE,+BAA+B,EAAC,MAAM,mDAAmD,CAAC;AACxH,OAAO,EAAC,WAAW,EAAE,sBAAsB,EAAC,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAC,WAAW,EAAC,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAE,sBAAsB,EAAC,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAC,kBAAkB,EA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AAE,YAAY,CAAC,cAAc,CAAC,CAAA;KAAC;;;mKAxE/D,MAAO,YAAY;;;;;;mBAMP,MAAO,WACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAiCU,UAAU,CAAC,OAAO,CAAC;aACrB,cAAc;qBACN,gBAAgB;0BACX;YACd,eAAe,EAAE,OAAO,oBAAoB,CAAC;YAC7C,aAAa,EAAE,OAAO,kBAAkB,CAAC;YACzC,UAAU,EAAE,OAAO,eAAe,CAAC;YACnC,iBAAiB,EAAE,OAAO,sBAAsB,CAAC;YACjD,eAAe,EAAE,OAAO,oBAAoB,CAAC;YAC7C,eAAe,EAAE,OAAO,oBAAoB,CAAC;YAC7C,MAAM,EAAE,OAAO,WAAW,CAAC;YAC3B,MAAM,EAAE,OAAO,WAAW,CAAC;YAC3B,MAAM,EAAE,OAAO,WAAW,CAAC;YAC3B,WAAW,EAAE,OAAO,gBAAgB,CAAC;YACrC,OAAO,EAAE,OAAO,YAAY,CAAC;YAC7B,OAAO,EAAE,OAAO,YAAY,CAAC;YAC7B,MAAM,EAAE,OAAO,WAAW,CAAC;YAC3B,UAAU,EAAE,OAAO,eAAe,CAAC;YACnC,OAAO,EAAE,OAAO,YAAY,CAAC;YAC7B,SAAS,EAAE,OAAO,cAAc,CAAC;SACpC;;CAoNJ,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;CAQhC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/table/Table.tsx"],"sourcesContent":["import {Box, Center, Factory, Loader, useProps, useStyles} from '@mantine/core';\nimport {useClickOutside, useMergedRef} from '@mantine/hooks';\nimport {\n ColumnDef,\n Row,\n RowSelectionState,\n defaultColumnSizing,\n getCoreRowModel,\n useReactTable,\n} from '@tanstack/react-table';\nimport isEqual from 'fast-deep-equal';\nimport {Children, ForwardedRef, ReactElement, useEffect, useRef} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../utils/index.js';\nimport classes from './Table.module.css';\nimport {TableLayout, TableProps} from './Table.types';\nimport {TableProvider} from './TableContext.js';\nimport {TableLayouts} from './layouts/TableLayouts.js';\nimport {TableActionItem, TableActionItemStylesNames, TableHeaderActionsStylesNames} from './table-actions/index.js';\nimport {TableActionsListStylesNames} from './table-actions/TableActionsList.js';\nimport {TableActionsColumn} from './table-column/TableActionsColumn.js';\nimport {\n TableAccordionColumn,\n TableCollapsibleColumn,\n TableCollapsibleColumnStylesNames,\n} from './table-column/TableCollapsibleColumn.js';\nimport {TableSelectableColumn} from './table-column/TableSelectableColumn.js';\nimport {TableColumnsSelector, TableColumnsSelectorStylesNames} from './table-columns-selector/TableColumnsSelector.js';\nimport {TableDateRangePicker, TableDateRangePickerStylesNames} from './table-date-range-picker/TableDateRangePicker.js';\nimport {TableFilter, TableFilterStylesNames} from './table-filter/TableFilter.js';\nimport {TableFooter} from './table-footer/TableFooter.js';\nimport {TableHeader, TableHeaderStylesNames} from './table-header/TableHeader.js';\nimport {TableThStylesNames} from './table-header/Th.js';\nimport {TableLastUpdated, TableLastUpdatedStylesNames} from './table-last-updated/TableLastUpdated.js';\nimport {TableLoading} from './table-loading/TableLoading.js';\nimport {TableNoData} from './table-no-data/TableNoData.js';\nimport {TablePagination} from './table-pagination/TablePagination.js';\nimport {TablePerPage} from './table-per-page/TablePerPage.js';\nimport {TablePredicate, TablePredicateStylesNames} from './table-predicate/TablePredicate.js';\nimport {TableState} from './use-table.js';\n\ntype TableStylesNames =\n | 'root'\n | 'table'\n | 'header'\n | 'body'\n | TableHeaderActionsStylesNames\n | TableActionsListStylesNames\n | TableActionItemStylesNames\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 AccordionColumn: typeof TableAccordionColumn;\n ActionsColumn: typeof TableActionsColumn;\n ActionItem: typeof TableActionItem;\n CollapsibleColumn: typeof TableCollapsibleColumn;\n ColumnsSelector: typeof TableColumnsSelector;\n DateRangePicker: typeof TableDateRangePicker;\n Filter: typeof TableFilter;\n Footer: typeof TableFooter;\n Header: typeof TableHeader;\n LastUpdated: typeof TableLastUpdated;\n Layouts: typeof TableLayouts;\n Loading: typeof TableLoading;\n NoData: typeof TableNoData;\n Pagination: typeof TablePagination;\n PerPage: typeof TablePerPage;\n Predicate: typeof TablePredicate;\n };\n}>;\n\nconst defaultProps: Partial<TableProps<unknown>> = {\n layouts: [TableLayouts.Rows as TableLayout],\n layoutProps: {},\n loading: false,\n additionalRootNodes: [],\n options: {},\n getRowActions: () => [],\n};\n\nexport const Table = <T,>(props: TableProps<T> & {ref?: ForwardedRef<HTMLDivElement>}) => {\n const {\n store,\n data,\n getRowId,\n getRowAttributes,\n getRowExpandedContent,\n getRowActions,\n columns,\n layouts,\n layoutProps,\n children,\n loading,\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 lastUpdated = convertedChildren.find((child) => child.type === TableLastUpdated);\n const noData = convertedChildren.find((child) => child.type === TableNoData);\n\n const table = useReactTable({\n data,\n state: {\n globalFilter: store.state.globalFilter,\n sorting: store.state.sorting,\n pagination: store.state.pagination,\n columnVisibility: store.state.columnVisibility,\n expanded: store.state.expanded,\n },\n onGlobalFilterChange: store.setGlobalFilter,\n onExpandedChange: store.setExpanded,\n onSortingChange: store.setSorting,\n onPaginationChange: store.setPagination,\n onColumnVisibilityChange: store.setColumnVisibility,\n columns: store.multiRowSelectionEnabled ? [TableSelectableColumn as ColumnDef<T>].concat(columns) : columns,\n getCoreRowModel: getCoreRowModel(),\n manualPagination: options?.getPaginationRowModel === undefined,\n enableMultiRowSelection: !!store.multiRowSelectionEnabled,\n getRowId,\n getRowCanExpand: (row: Row<T>) => !!getRowExpandedContent?.(row.original, row.index, row),\n enableRowSelection: !loading,\n defaultColumn: {\n size: undefined,\n minSize: defaultColumnSizing.minSize,\n maxSize: defaultColumnSizing.maxSize,\n },\n rowCount: options?.getFilteredRowModel ? undefined : store.state.totalEntries,\n ...options,\n });\n\n table.setOptions((prev) => ({\n ...prev,\n state: {\n ...prev.state,\n rowSelection: store.state.rowSelection as RowSelectionState,\n },\n onRowSelectionChange: (rowSelectionUpdater) => {\n store.setRowSelection((old) => {\n const newRowSelection = (\n rowSelectionUpdater instanceof Function\n ? rowSelectionUpdater(old as RowSelectionState)\n : rowSelectionUpdater\n ) as TableState<T>['rowSelection'];\n\n if (isEqual(old, newRowSelection)) {\n return old;\n }\n\n const rows = table.getRowModel().rowsById;\n\n Object.keys(newRowSelection).forEach((rowId) => {\n if (newRowSelection[rowId] === true) {\n if (!rows[rowId]) {\n console.error(\n 'The table was not initialized properly, the rowSelection state should contain an object of type Record<string, TData>.',\n );\n }\n newRowSelection[rowId] = rows[rowId]?.original ?? (true as T);\n }\n });\n\n return newRowSelection;\n });\n },\n }));\n\n useEffect(() => {\n // Update the selected rows data when the data prop changes\n if (store.getSelectedRows().length > 0) {\n store.setRowSelection((old) => {\n const rowsById = table.getRowModel().rowsById;\n const newSelection = {...old};\n Object.keys(old).forEach((rowId) => {\n if (rowsById[rowId]) {\n newSelection[rowId] = rowsById[rowId].original;\n }\n });\n return isEqual(newSelection, old) ? old : newSelection;\n });\n }\n }, [data]);\n\n const containerRef = useRef<HTMLDivElement>();\n useClickOutside(\n () => {\n if (!store.multiRowSelectionEnabled && store.getSelectedRows().length > 0) {\n store.clearRowSelection();\n }\n },\n null,\n [containerRef.current, ...additionalRootNodes],\n );\n const mergedRef = useMergedRef(containerRef, ref);\n\n if (!data) {\n return (\n <Center style={{flexGrow: 1}}>\n <Loader />\n </Center>\n );\n }\n\n const Layout =\n store.state.layout === null ? layouts[0] : layouts.find(({displayName}) => displayName === store.state.layout);\n const hasRows = table.getRowModel().rows.length > 0;\n\n return (\n <Box ref={mergedRef} {...others} {...getStyles('root')}>\n <TableProvider<T> value={{getStyles, getRowActions, store, table, layouts, containerRef}}>\n <Layout>\n {store.isVacant && !store.isFiltered ? (\n noData\n ) : (\n <>\n <Box component=\"table\" {...getStyles('table')} mod={{loading}}>\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 getRowExpandedContent={getRowExpandedContent}\n getRowAttributes={getRowAttributes}\n loading={loading}\n {...layoutProps}\n />\n </thead>\n <tbody {...getStyles('body')}>\n {hasRows ? (\n <Layout.Body\n getRowExpandedContent={getRowExpandedContent}\n getRowAttributes={getRowAttributes}\n loading={loading}\n {...layoutProps}\n />\n ) : (\n <tr>\n <td colSpan={table.getAllColumns().length}>\n <TableLoading visible={loading || !store.isFiltered}>\n {noData}\n </TableLoading>\n </td>\n </tr>\n )}\n </tbody>\n </Box>\n {footer}\n {lastUpdated}\n </>\n )}\n </Layout>\n </TableProvider>\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.AccordionColumn = TableAccordionColumn;\nTable.ActionsColumn = TableActionsColumn;\nTable.ActionItem = TableActionItem;\nTable.CollapsibleColumn = TableCollapsibleColumn;\nTable.ColumnsSelector = TableColumnsSelector;\nTable.DateRangePicker = TableDateRangePicker;\nTable.Filter = TableFilter;\nTable.Footer = TableFooter;\nTable.Header = TableHeader;\nTable.LastUpdated = TableLastUpdated;\nTable.Layouts = TableLayouts;\nTable.Loading = TableLoading;\nTable.NoData = TableNoData;\nTable.Pagination = TablePagination;\nTable.PerPage = TablePerPage;\nTable.Predicate = TablePredicate;\n\nTable.extend = identity as CustomComponentThemeExtend<PlasmaTableFactory>;\n"],"names":["Box","Center","Loader","useProps","useStyles","useClickOutside","useMergedRef","defaultColumnSizing","getCoreRowModel","useReactTable","isEqual","Children","useEffect","useRef","identity","classes","TableProvider","TableLayouts","TableActionItem","TableActionsColumn","TableAccordionColumn","TableCollapsibleColumn","TableSelectableColumn","TableColumnsSelector","TableDateRangePicker","TableFilter","TableFooter","TableHeader","TableLastUpdated","TableLoading","TableNoData","TablePagination","TablePerPage","TablePredicate","defaultProps","layouts","Rows","layoutProps","loading","additionalRootNodes","options","getRowActions","Table","props","store","data","getRowId","getRowAttributes","getRowExpandedContent","columns","children","ref","style","className","classNames","styles","unstyled","others","getStyles","name","convertedChildren","toArray","header","find","child","type","footer","lastUpdated","noData","table","state","globalFilter","sorting","pagination","columnVisibility","expanded","onGlobalFilterChange","setGlobalFilter","onExpandedChange","setExpanded","onSortingChange","setSorting","onPaginationChange","setPagination","onColumnVisibilityChange","setColumnVisibility","multiRowSelectionEnabled","concat","manualPagination","getPaginationRowModel","undefined","enableMultiRowSelection","getRowCanExpand","row","original","index","enableRowSelection","defaultColumn","size","minSize","maxSize","rowCount","getFilteredRowModel","totalEntries","setOptions","prev","rowSelection","onRowSelectionChange","rowSelectionUpdater","setRowSelection","old","newRowSelection","Function","rows","getRowModel","rowsById","Object","keys","forEach","rowId","console","error","getSelectedRows","length","newSelection","containerRef","clearRowSelection","current","mergedRef","flexGrow","Layout","layout","displayName","hasRows","value","isVacant","isFiltered","component","mod","thead","tr","th","padding","colSpan","getAllColumns","Header","tbody","Body","td","visible","TableComponentsOrder","MultiSelectInfo","Actions","Predicate","Filter","DateRangePicker","ColumnsSelector","LayoutControl","AccordionColumn","ActionsColumn","ActionItem","CollapsibleColumn","Footer","LastUpdated","Layouts","Loading","NoData","Pagination","PerPage","extend"],"mappings":";AAAA,SAAQA,GAAG,EAAEC,MAAM,EAAWC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AAChF,SAAQC,eAAe,EAAEC,YAAY,QAAO,iBAAiB;AAC7D,SAIIC,mBAAmB,EACnBC,eAAe,EACfC,aAAa,QACV,wBAAwB;AAC/B,OAAOC,aAAa,kBAAkB;AACtC,SAAQC,QAAQ,EAA8BC,SAAS,EAAEC,MAAM,QAAO,QAAQ;AAC9E,SAAoCC,QAAQ,QAAO,uBAAuB;AAC1E,OAAOC,aAAa,qBAAqB;AAEzC,SAAQC,aAAa,QAAO,oBAAoB;AAChD,SAAQC,YAAY,QAAO,4BAA4B;AACvD,SAAQC,eAAe,QAAkE,2BAA2B;AAEpH,SAAQC,kBAAkB,QAAO,uCAAuC;AACxE,SACIC,oBAAoB,EACpBC,sBAAsB,QAEnB,2CAA2C;AAClD,SAAQC,qBAAqB,QAAO,0CAA0C;AAC9E,SAAQC,oBAAoB,QAAwC,mDAAmD;AACvH,SAAQC,oBAAoB,QAAwC,oDAAoD;AACxH,SAAQC,WAAW,QAA+B,gCAAgC;AAClF,SAAQC,WAAW,QAAO,gCAAgC;AAC1D,SAAQC,WAAW,QAA+B,gCAAgC;AAElF,SAAQC,gBAAgB,QAAoC,2CAA2C;AACvG,SAAQC,YAAY,QAAO,kCAAkC;AAC7D,SAAQC,WAAW,QAAO,iCAAiC;AAC3D,SAAQC,eAAe,QAAO,wCAAwC;AACtE,SAAQC,YAAY,QAAO,mCAAmC;AAC9D,SAAQC,cAAc,QAAkC,sCAAsC;AA4C9F,MAAMC,eAA6C;IAC/CC,SAAS;QAAClB,aAAamB,IAAI;KAAgB;IAC3CC,aAAa,CAAC;IACdC,SAAS;IACTC,qBAAqB,EAAE;IACvBC,SAA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AAM,GAAGxI;AACfgB,MAAMuG,MAAM,GAAGtH;AACfe,MAAMyH,WAAW,GAAGvI;AACpBc,MAAM0H,OAAO,GAAGnJ;AAChByB,MAAM2H,OAAO,GAAGxI;AAChBa,MAAM4H,MAAM,GAAGxI;AACfY,MAAM6H,UAAU,GAAGxI;AACnBW,MAAM8H,OAAO,GAAGxI;AAChBU,MAAM+G,SAAS,GAAGxH;AAElBS,MAAM+H,MAAM,GAAG3J"}
1
+ {"version":3,"sources":["../../../../src/components/table/Table.tsx"],"sourcesContent":["import {Box, Center, Factory, Loader, useProps, useStyles} from '@mantine/core';\nimport {useClickOutside, useMergedRef} from '@mantine/hooks';\nimport {\n ColumnDef,\n Row,\n RowSelectionState,\n defaultColumnSizing,\n getCoreRowModel,\n useReactTable,\n} from '@tanstack/react-table';\nimport isEqual from 'fast-deep-equal';\nimport {Children, ForwardedRef, ReactElement, useEffect, useRef} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../utils/index.js';\nimport classes from './Table.module.css';\nimport {TableLayout, TableProps} from './Table.types.js';\nimport {TableProvider} from './TableContext.js';\nimport {TableLayouts} from './layouts/TableLayouts.js';\nimport {TableActionItem, TableActionItemStylesNames, TableHeaderActionsStylesNames} from './table-actions/index.js';\nimport {TableActionsListStylesNames} from './table-actions/TableActionsList.js';\nimport {TableActionsColumn} from './table-column/TableActionsColumn.js';\nimport {\n TableAccordionColumn,\n TableCollapsibleColumn,\n TableCollapsibleColumnStylesNames,\n} from './table-column/TableCollapsibleColumn.js';\nimport {TableSelectableColumn} from './table-column/TableSelectableColumn.js';\nimport {TableColumnsSelector, TableColumnsSelectorStylesNames} from './table-columns-selector/TableColumnsSelector.js';\nimport {TableDateRangePicker, TableDateRangePickerStylesNames} from './table-date-range-picker/TableDateRangePicker.js';\nimport {TableFilter, TableFilterStylesNames} from './table-filter/TableFilter.js';\nimport {TableFooter} from './table-footer/TableFooter.js';\nimport {TableHeader, TableHeaderStylesNames} from './table-header/TableHeader.js';\nimport {TableThStylesNames} from './table-header/Th.js';\nimport {TableLastUpdated, TableLastUpdatedStylesNames} from './table-last-updated/TableLastUpdated.js';\nimport {TableLoading} from './table-loading/TableLoading.js';\nimport {TableNoData} from './table-no-data/TableNoData.js';\nimport {TablePagination} from './table-pagination/TablePagination.js';\nimport {TablePerPage} from './table-per-page/TablePerPage.js';\nimport {TablePredicate, TablePredicateStylesNames} from './table-predicate/TablePredicate.js';\nimport {TableState} from './use-table.js';\n\ntype TableStylesNames =\n | 'root'\n | 'table'\n | 'header'\n | 'body'\n | TableHeaderActionsStylesNames\n | TableActionsListStylesNames\n | TableActionItemStylesNames\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 AccordionColumn: typeof TableAccordionColumn;\n ActionsColumn: typeof TableActionsColumn;\n ActionItem: typeof TableActionItem;\n CollapsibleColumn: typeof TableCollapsibleColumn;\n ColumnsSelector: typeof TableColumnsSelector;\n DateRangePicker: typeof TableDateRangePicker;\n Filter: typeof TableFilter;\n Footer: typeof TableFooter;\n Header: typeof TableHeader;\n LastUpdated: typeof TableLastUpdated;\n Layouts: typeof TableLayouts;\n Loading: typeof TableLoading;\n NoData: typeof TableNoData;\n Pagination: typeof TablePagination;\n PerPage: typeof TablePerPage;\n Predicate: typeof TablePredicate;\n };\n}>;\n\nconst defaultProps: Partial<TableProps<unknown>> = {\n layouts: [TableLayouts.Rows as TableLayout],\n layoutProps: {},\n loading: false,\n additionalRootNodes: [],\n options: {},\n getRowActions: () => [],\n};\n\nexport const Table = <T,>(props: TableProps<T> & {ref?: ForwardedRef<HTMLDivElement>}) => {\n const {\n store,\n data,\n getRowId,\n getRowAttributes,\n getRowExpandedContent,\n getRowActions,\n columns,\n layouts,\n layoutProps,\n children,\n loading,\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 lastUpdated = convertedChildren.find((child) => child.type === TableLastUpdated);\n const noData = convertedChildren.find((child) => child.type === TableNoData);\n\n const table = useReactTable({\n data,\n state: {\n globalFilter: store.state.globalFilter,\n sorting: store.state.sorting,\n pagination: store.state.pagination,\n columnVisibility: store.state.columnVisibility,\n expanded: store.state.expanded,\n },\n onGlobalFilterChange: store.setGlobalFilter,\n onExpandedChange: store.setExpanded,\n onSortingChange: store.setSorting,\n onPaginationChange: store.setPagination,\n onColumnVisibilityChange: store.setColumnVisibility,\n columns: store.multiRowSelectionEnabled ? [TableSelectableColumn as ColumnDef<T>].concat(columns) : columns,\n getCoreRowModel: getCoreRowModel(),\n manualPagination: options?.getPaginationRowModel === undefined,\n enableMultiRowSelection: !!store.multiRowSelectionEnabled,\n getRowId,\n getRowCanExpand: (row: Row<T>) => !!getRowExpandedContent?.(row.original, row.index, row),\n enableRowSelection: !loading,\n defaultColumn: {\n size: undefined,\n minSize: defaultColumnSizing.minSize,\n maxSize: defaultColumnSizing.maxSize,\n },\n rowCount: options?.getFilteredRowModel ? undefined : store.state.totalEntries,\n ...options,\n });\n\n table.setOptions((prev) => ({\n ...prev,\n state: {\n ...prev.state,\n rowSelection: store.state.rowSelection as RowSelectionState,\n },\n onRowSelectionChange: (rowSelectionUpdater) => {\n store.setRowSelection((old) => {\n const newRowSelection = (\n rowSelectionUpdater instanceof Function\n ? rowSelectionUpdater(old as RowSelectionState)\n : rowSelectionUpdater\n ) as TableState<T>['rowSelection'];\n\n if (isEqual(old, newRowSelection)) {\n return old;\n }\n\n const rows = table.getRowModel().rowsById;\n\n Object.keys(newRowSelection).forEach((rowId) => {\n if (newRowSelection[rowId] === true) {\n if (!rows[rowId]) {\n console.error(\n 'The table was not initialized properly, the rowSelection state should contain an object of type Record<string, TData>.',\n );\n }\n newRowSelection[rowId] = rows[rowId]?.original ?? (true as T);\n }\n });\n\n return newRowSelection;\n });\n },\n }));\n\n useEffect(() => {\n // Update the selected rows data when the data prop changes\n if (store.getSelectedRows().length > 0) {\n store.setRowSelection((old) => {\n const rowsById = table.getRowModel().rowsById;\n const newSelection = {...old};\n Object.keys(old).forEach((rowId) => {\n if (rowsById[rowId]) {\n newSelection[rowId] = rowsById[rowId].original;\n }\n });\n return isEqual(newSelection, old) ? old : newSelection;\n });\n }\n }, [data]);\n\n const containerRef = useRef<HTMLDivElement>();\n useClickOutside(\n () => {\n if (!store.multiRowSelectionEnabled && store.getSelectedRows().length > 0) {\n store.clearRowSelection();\n }\n },\n null,\n [containerRef.current, ...additionalRootNodes],\n );\n const mergedRef = useMergedRef(containerRef, ref);\n\n if (!data) {\n return (\n <Center style={{flexGrow: 1}}>\n <Loader />\n </Center>\n );\n }\n\n const Layout =\n store.state.layout === null ? layouts[0] : layouts.find(({displayName}) => displayName === store.state.layout);\n const hasRows = table.getRowModel().rows.length > 0;\n\n return (\n <Box ref={mergedRef} {...others} {...getStyles('root')}>\n <TableProvider<T> value={{getStyles, getRowActions, store, table, layouts, containerRef}}>\n <Layout>\n {store.isVacant && !store.isFiltered ? (\n noData\n ) : (\n <>\n <Box component=\"table\" {...getStyles('table')} mod={{loading}}>\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 getRowExpandedContent={getRowExpandedContent}\n getRowAttributes={getRowAttributes}\n loading={loading}\n {...layoutProps}\n />\n </thead>\n <tbody {...getStyles('body')}>\n {hasRows ? (\n <Layout.Body\n getRowExpandedContent={getRowExpandedContent}\n getRowAttributes={getRowAttributes}\n loading={loading}\n {...layoutProps}\n />\n ) : (\n <tr>\n <td colSpan={table.getAllColumns().length}>\n <TableLoading visible={loading || !store.isFiltered}>\n {noData}\n </TableLoading>\n </td>\n </tr>\n )}\n </tbody>\n </Box>\n {footer}\n {lastUpdated}\n </>\n )}\n </Layout>\n </TableProvider>\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.AccordionColumn = TableAccordionColumn;\nTable.ActionsColumn = TableActionsColumn;\nTable.ActionItem = TableActionItem;\nTable.CollapsibleColumn = TableCollapsibleColumn;\nTable.ColumnsSelector = TableColumnsSelector;\nTable.DateRangePicker = TableDateRangePicker;\nTable.Filter = TableFilter;\nTable.Footer = TableFooter;\nTable.Header = TableHeader;\nTable.LastUpdated = TableLastUpdated;\nTable.Layouts = TableLayouts;\nTable.Loading = TableLoading;\nTable.NoData = TableNoData;\nTable.Pagination = TablePagination;\nTable.PerPage = TablePerPage;\nTable.Predicate = TablePredicate;\n\nTable.extend = identity as CustomComponentThemeExtend<PlasmaTableFactory>;\n"],"names":["Box","Center","Loader","useProps","useStyles","useClickOutside","useMergedRef","defaultColumnSizing","getCoreRowModel","useReactTable","isEqual","Children","useEffect","useRef","identity","classes","TableProvider","TableLayouts","TableActionItem","TableActionsColumn","TableAccordionColumn","TableCollapsibleColumn","TableSelectableColumn","TableColumnsSelector","TableDateRangePicker","TableFilter","TableFooter","TableHeader","TableLastUpdated","TableLoading","TableNoData","TablePagination","TablePerPage","TablePredicate","defaultProps","layouts","Rows","layoutProps","loading","additionalRootNodes","options","getRowActions","Table","props","store","data","getRowId","getRowAttributes","getRowExpandedContent","columns","children","ref","style","className","classNames","styles","unstyled","others","getStyles","name","convertedChildren","toArray","header","find","child","type","footer","lastUpdated","noData","table","state","globalFilter","sorting","pagination","columnVisibility","expanded","onGlobalFilterChange","setGlobalFilter","onExpandedChange","setExpanded","onSortingChange","setSorting","onPaginationChange","setPagination","onColumnVisibilityChange","setColumnVisibility","multiRowSelectionEnabled","concat","manualPagination","getPaginationRowModel","undefined","enableMultiRowSelection","getRowCanExpand","row","original","index","enableRowSelection","defaultColumn","size","minSize","maxSize","rowCount","getFilteredRowModel","totalEntries","setOptions","prev","rowSelection","onRowSelectionChange","rowSelectionUpdater","setRowSelection","old","newRowSelection","Function","rows","getRowModel","rowsById","Object","keys","forEach","rowId","console","error","getSelectedRows","length","newSelection","containerRef","clearRowSelection","current","mergedRef","flexGrow","Layout","layout","displayName","hasRows","value","isVacant","isFiltered","component","mod","thead","tr","th","padding","colSpan","getAllColumns","Header","tbody","Body","td","visible","TableComponentsOrder","MultiSelectInfo","Actions","Predicate","Filter","DateRangePicker","ColumnsSelector","LayoutControl","AccordionColumn","ActionsColumn","ActionItem","CollapsibleColumn","Footer","LastUpdated","Layouts","Loading","NoData","Pagination","PerPage","extend"],"mappings":";AAAA,SAAQA,GAAG,EAAEC,MAAM,EAAWC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AAChF,SAAQC,eAAe,EAAEC,YAAY,QAAO,iBAAiB;AAC7D,SAIIC,mBAAmB,EACnBC,eAAe,EACfC,aAAa,QACV,wBAAwB;AAC/B,OAAOC,aAAa,kBAAkB;AACtC,SAAQC,QAAQ,EAA8BC,SAAS,EAAEC,MAAM,QAAO,QAAQ;AAC9E,SAAoCC,QAAQ,QAAO,uBAAuB;AAC1E,OAAOC,aAAa,qBAAqB;AAEzC,SAAQC,aAAa,QAAO,oBAAoB;AAChD,SAAQC,YAAY,QAAO,4BAA4B;AACvD,SAAQC,eAAe,QAAkE,2BAA2B;AAEpH,SAAQC,kBAAkB,QAAO,uCAAuC;AACxE,SACIC,oB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R,GAAGD,WAAW;uDAGnB,KAACuG;kDACG,cAAA,KAACQ;4CAAGL,SAAS1E,MAAM2E,aAAa,GAAGrB,MAAM;sDACrC,cAAA,KAAC9F;gDAAawH,SAAS/G,WAAW,CAACM,MAAM4F,UAAU;0DAC9CpE;;;;;;;wBAOxBF;wBACAC;;;;;;AAO7B,EAAE;AAEF,OAAO,MAAMmF,uBAAuB;IAChCC,iBAAiB;IACjBC,SAAS;IACTC,WAAW;IACXC,QAAQ;IACRC,iBAAiB;IACjBC,iBAAiB;IACjBC,eAAe;AACnB,EAAE;AAEFnH,MAAMoH,eAAe,GAAG1I;AACxBsB,MAAMqH,aAAa,GAAG5I;AACtBuB,MAAMsH,UAAU,GAAG9I;AACnBwB,MAAMuH,iBAAiB,GAAG5I;AAC1BqB,MAAMkH,eAAe,GAAGrI;AACxBmB,MAAMiH,eAAe,GAAGnI;AACxBkB,MAAMgH,MAAM,GAAGjI;AACfiB,MAAMwH,MAAM,GAAGxI;AACfgB,MAAMuG,MAAM,GAAGtH;AACfe,MAAMyH,WAAW,GAAGvI;AACpBc,MAAM0H,OAAO,GAAGnJ;AAChByB,MAAM2H,OAAO,GAAGxI;AAChBa,MAAM4H,MAAM,GAAGxI;AACfY,MAAM6H,UAAU,GAAGxI;AACnBW,MAAM8H,OAAO,GAAGxI;AAChBU,MAAM+G,SAAS,GAAGxH;AAElBS,MAAM+H,MAAM,GAAG3J"}
@@ -2,7 +2,7 @@ import { GetStylesApi } from '@mantine/core';
2
2
  import { Table } from '@tanstack/table-core';
3
3
  import { MutableRefObject, ReactElement } from 'react';
4
4
  import { type PlasmaTableFactory } from './Table.js';
5
- import { TableAction, TableLayout } from './Table.types';
5
+ import { TableAction, TableLayout } from './Table.types.js';
6
6
  import { TableStore } from './use-table.js';
7
7
  export interface TableContextValue<TData = unknown> {
8
8
  getStyles: GetStylesApi<PlasmaTableFactory>;
@@ -1 +1 @@
1
- {"version":3,"file":"TableContext.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAC,gBAAgB,EAAE,YAAY,EAAC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAC,KAAK,kBAAkB,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AACvD,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE1C,MAAM,WAAW,iBAAiB,CAAC,KAAK,GAAG,OAAO;IAC9C,SAAS,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;IAC5C,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IACzB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,CAAC;IACjD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACjC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC5B,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;CACzB;AAED,eAAO,MAAO,aAAa,GAEpB,KAAK,SAAS,kBAAkB,CAAC,KAAK,CAAC,KAAK,YAAY,EAFlC,eAAe,GAEsB,KAAK,OAAO,iBAAiB,CAAC,KAAK,CAAE,CAAC"}
1
+ {"version":3,"file":"TableContext.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAC,gBAAgB,EAAE,YAAY,EAAC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAC,KAAK,kBAAkB,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE1C,MAAM,WAAW,iBAAiB,CAAC,KAAK,GAAG,OAAO;IAC9C,SAAS,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;IAC5C,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IACzB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,CAAC;IACjD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACjC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC5B,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;CACzB;AAED,eAAO,MAAO,aAAa,GAEpB,KAAK,SAAS,kBAAkB,CAAC,KAAK,CAAC,KAAK,YAAY,EAFlC,eAAe,GAEsB,KAAK,OAAO,iBAAiB,CAAC,KAAK,CAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/table/TableContext.tsx"],"sourcesContent":["import {createSafeContext, GetStylesApi} from '@mantine/core';\nimport {Table} from '@tanstack/table-core';\nimport {MutableRefObject, ReactElement} from 'react';\nimport {type PlasmaTableFactory} from './Table.js';\nimport {TableAction, TableLayout} from './Table.types';\nimport {TableStore} from './use-table.js';\n\nexport interface TableContextValue<TData = unknown> {\n getStyles: GetStylesApi<PlasmaTableFactory>;\n store: TableStore<TData>;\n layouts: TableLayout[];\n getRowActions: (datum: TData[]) => TableAction[];\n table: Table<TData>;\n containerRef: MutableRefObject<HTMLDivElement>;\n}\n\nexport interface TableProviderProps<T> {\n value: TableContextValue<T>;\n children: JSX.Element;\n}\n\nexport const [TableProvider, useTableContext] = createSafeContext<TableContextValue>(\n 'Table component was not found in the tree',\n) as [<TData>(props: TableProviderProps<TData>) => ReactElement, <TData>() => TableContextValue<TData>];\n"],"names":["createSafeContext","TableProvider","useTableContext"],"mappings":"AAAA,SAAQA,iBAAiB,QAAqB,gBAAgB;AAqB9D,OAAO,MAAM,CAACC,eAAeC,gBAAgB,GAAGF,kBAC5C,6CACoG"}
1
+ {"version":3,"sources":["../../../../src/components/table/TableContext.tsx"],"sourcesContent":["import {createSafeContext, GetStylesApi} from '@mantine/core';\nimport {Table} from '@tanstack/table-core';\nimport {MutableRefObject, ReactElement} from 'react';\nimport {type PlasmaTableFactory} from './Table.js';\nimport {TableAction, TableLayout} from './Table.types.js';\nimport {TableStore} from './use-table.js';\n\nexport interface TableContextValue<TData = unknown> {\n getStyles: GetStylesApi<PlasmaTableFactory>;\n store: TableStore<TData>;\n layouts: TableLayout[];\n getRowActions: (datum: TData[]) => TableAction[];\n table: Table<TData>;\n containerRef: MutableRefObject<HTMLDivElement>;\n}\n\nexport interface TableProviderProps<T> {\n value: TableContextValue<T>;\n children: JSX.Element;\n}\n\nexport const [TableProvider, useTableContext] = createSafeContext<TableContextValue>(\n 'Table component was not found in the tree',\n) as [<TData>(props: TableProviderProps<TData>) => ReactElement, <TData>() => TableContextValue<TData>];\n"],"names":["createSafeContext","TableProvider","useTableContext"],"mappings":"AAAA,SAAQA,iBAAiB,QAAqB,gBAAgB;AAqB9D,OAAO,MAAM,CAACC,eAAeC,gBAAgB,GAAGF,kBAC5C,6CACoG"}
@@ -1,7 +1,7 @@
1
1
  export { flexRender as renderTableCell } from '@tanstack/react-table';
2
2
  export * from './Table.js';
3
3
  export { type TablePredicateProps } from './table-predicate/TablePredicate.js';
4
- export { type TableAction, type TableLayout, type TableLayoutProps, type TableProps } from './Table.types';
4
+ export { type TableAction, type TableLayout, type TableLayoutProps, type TableProps } from './Table.types.js';
5
5
  export { useTableContext } from './TableContext.js';
6
6
  export { useTable, type TableState, type TableStore, type UseTableOptions } from './use-table.js';
7
7
  export { useUrlSyncedState, type UseUrlSyncedStateOptions, type SearchParamEntry } from './use-url-synced-state.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,IAAI,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACpE,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAC,KAAK,mBAAmB,EAAC,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAC,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAC,MAAM,eAAe,CAAC;AACzG,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,QAAQ,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAC,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,KAAK,gBAAgB,EAAC,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,IAAI,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACpE,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAC,KAAK,mBAAmB,EAAC,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAC,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5G,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,QAAQ,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAC,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,KAAK,gBAAgB,EAAC,MAAM,2BAA2B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/table/index.ts"],"sourcesContent":["export {flexRender as renderTableCell} from '@tanstack/react-table';\nexport * from './Table.js';\nexport {type TablePredicateProps} from './table-predicate/TablePredicate.js';\nexport {type TableAction, type TableLayout, type TableLayoutProps, type TableProps} from './Table.types';\nexport {useTableContext} from './TableContext.js';\nexport {useTable, type TableState, type TableStore, type UseTableOptions} from './use-table.js';\nexport {useUrlSyncedState, type UseUrlSyncedStateOptions, type SearchParamEntry} from './use-url-synced-state.js';\n"],"names":["flexRender","renderTableCell","useTableContext","useTable","useUrlSyncedState"],"mappings":"AAAA,SAAQA,cAAcC,eAAe,QAAO,wBAAwB;AACpE,cAAc,aAAa;AAG3B,SAAQC,eAAe,QAAO,oBAAoB;AAClD,SAAQC,QAAQ,QAA+D,iBAAiB;AAChG,SAAQC,iBAAiB,QAA6D,4BAA4B"}
1
+ {"version":3,"sources":["../../../../src/components/table/index.ts"],"sourcesContent":["export {flexRender as renderTableCell} from '@tanstack/react-table';\nexport * from './Table.js';\nexport {type TablePredicateProps} from './table-predicate/TablePredicate.js';\nexport {type TableAction, type TableLayout, type TableLayoutProps, type TableProps} from './Table.types.js';\nexport {useTableContext} from './TableContext.js';\nexport {useTable, type TableState, type TableStore, type UseTableOptions} from './use-table.js';\nexport {useUrlSyncedState, type UseUrlSyncedStateOptions, type SearchParamEntry} from './use-url-synced-state.js';\n"],"names":["flexRender","renderTableCell","useTableContext","useTable","useUrlSyncedState"],"mappings":"AAAA,SAAQA,cAAcC,eAAe,QAAO,wBAAwB;AACpE,cAAc,aAAa;AAG3B,SAAQC,eAAe,QAAO,oBAAoB;AAClD,SAAQC,QAAQ,QAA+D,iBAAiB;AAChG,SAAQC,iBAAiB,QAA6D,4BAA4B"}
@@ -1,6 +1,6 @@
1
1
  import { Factory, MantineComponent, StylesApiProps } from '@mantine/core';
2
2
  import { ReactNode } from 'react';
3
- import { TableLayout } from '../../Table.types';
3
+ import { TableLayout } from '../../Table.types.js';
4
4
  import { RowLayoutBodyStylesNames } from './RowLayoutBody.js';
5
5
  import { RowLayoutHeaderStyleNames } from './RowLayoutHeader.js';
6
6
  type RowLayoutStylesNames = RowLayoutHeaderStyleNames | RowLayoutBodyStylesNames;
@@ -1 +1 @@
1
- {"version":3,"file":"RowLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/components/table/layouts/row-layout/RowLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAsB,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAgB,wBAAwB,EAAC,MAAM,oBAAoB,CAAC;AAE3E,OAAO,EAAkB,yBAAyB,EAAC,MAAM,sBAAsB,CAAC;AAEhF,KAAK,oBAAoB,GAAG,yBAAyB,GAAG,wBAAwB,CAAC;AACjF,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IACpE,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;IACnC,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,cAAc,CAAC;IACtB,WAAW,EAAE,oBAAoB,CAAC;IAClC,gBAAgB,EAAE,WAAW,CAAC;CACjC,CAAC,CAAC;AAGH,eAAO,MAAM,SAAS,EAYhB,gBAAgB,CAAC,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"RowLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/components/table/layouts/row-layout/RowLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAsB,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAgB,wBAAwB,EAAC,MAAM,oBAAoB,CAAC;AAE3E,OAAO,EAAkB,yBAAyB,EAAC,MAAM,sBAAsB,CAAC;AAEhF,KAAK,oBAAoB,GAAG,yBAAyB,GAAG,wBAAwB,CAAC;AACjF,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IACpE,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;IACnC,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,cAAc,CAAC;IACtB,WAAW,EAAE,oBAAoB,CAAC;IAClC,gBAAgB,EAAE,WAAW,CAAC;CACjC,CAAC,CAAC;AAGH,eAAO,MAAM,SAAS,EAYhB,gBAAgB,CAAC,gBAAgB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayout.tsx"],"sourcesContent":["import {IconList} from '@coveord/plasma-react-icons';\nimport {Factory, MantineComponent, StylesApiProps, useProps, useStyles} from '@mantine/core';\nimport {ReactNode} from 'react';\nimport {identity} from '../../../../utils/index.js';\nimport {TableLayout} from '../../Table.types';\nimport classes from './RowLayout.module.css';\nimport {RowLayoutBody, RowLayoutBodyStylesNames} from './RowLayoutBody.js';\nimport {RowLayoutProvider} from './RowLayoutContext.js';\nimport {RowLayoutHeader, RowLayoutHeaderStyleNames} from './RowLayoutHeader.js';\n\ntype RowLayoutStylesNames = RowLayoutHeaderStyleNames | RowLayoutBodyStylesNames;\nexport interface RowLayoutProps extends StylesApiProps<RowLayoutFactory> {\n children: ReactNode;\n}\n\nexport type RowLayoutFactory = Factory<{\n ref?: never;\n props: RowLayoutProps;\n stylesNames: RowLayoutStylesNames;\n staticComponents: TableLayout;\n}>;\nconst defaultProps: Partial<RowLayoutProps> = {};\n\nexport const RowLayout = ((props: RowLayoutProps) => {\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}) as MantineComponent<RowLayoutFactory>;\n\nRowLayout.Body = RowLayoutBody;\nRowLayout.Header = RowLayoutHeader;\nRowLayout.Icon = IconList;\nRowLayout.displayName = 'Rows';\nRowLayout.extend = identity;\n"],"names":["IconList","useProps","useStyles","identity","classes","RowLayoutBody","RowLayoutProvider","RowLayoutHeader","defaultProps","RowLayout","props","children","styles","classNames","unstyled","getStyles","name","value","Body","Header","Icon","displayName","extend"],"mappings":";AAAA,SAAQA,QAAQ,QAAO,8BAA8B;AACrD,SAAmDC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AAE7F,SAAQC,QAAQ,QAAO,6BAA6B;AAEpD,OAAOC,aAAa,yBAAyB;AAC7C,SAAQC,aAAa,QAAiC,qBAAqB;AAC3E,SAAQC,iBAAiB,QAAO,wBAAwB;AACxD,SAAQC,eAAe,QAAkC,uBAAuB;AAahF,MAAMC,eAAwC,CAAC;AAE/C,OAAO,MAAMC,YAAa,CAACC;IACvB,MAAM,EAACC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAC,GAAGb,SAAS,mBAAmBO,cAAcE;IAC3F,MAAMK,YAAYb,UAA4B;QAC1Cc,MAAM;QACNZ;QACAM;QACAE;QACAC;QACAC;IACJ;IAEA,qBAAO,KAACR;QAAkBW,OAAO;YAACF;QAAS;kBAAIJ;;AACnD,EAAyC;AAEzCF,UAAUS,IAAI,GAAGb;AACjBI,UAAUU,MAAM,GAAGZ;AACnBE,UAAUW,IAAI,GAAGpB;AACjBS,UAAUY,WAAW,GAAG;AACxBZ,UAAUa,MAAM,GAAGnB"}
1
+ {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayout.tsx"],"sourcesContent":["import {IconList} from '@coveord/plasma-react-icons';\nimport {Factory, MantineComponent, StylesApiProps, useProps, useStyles} from '@mantine/core';\nimport {ReactNode} from 'react';\nimport {identity} from '../../../../utils/index.js';\nimport {TableLayout} from '../../Table.types.js';\nimport classes from './RowLayout.module.css';\nimport {RowLayoutBody, RowLayoutBodyStylesNames} from './RowLayoutBody.js';\nimport {RowLayoutProvider} from './RowLayoutContext.js';\nimport {RowLayoutHeader, RowLayoutHeaderStyleNames} from './RowLayoutHeader.js';\n\ntype RowLayoutStylesNames = RowLayoutHeaderStyleNames | RowLayoutBodyStylesNames;\nexport interface RowLayoutProps extends StylesApiProps<RowLayoutFactory> {\n children: ReactNode;\n}\n\nexport type RowLayoutFactory = Factory<{\n ref?: never;\n props: RowLayoutProps;\n stylesNames: RowLayoutStylesNames;\n staticComponents: TableLayout;\n}>;\nconst defaultProps: Partial<RowLayoutProps> = {};\n\nexport const RowLayout = ((props: RowLayoutProps) => {\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}) as MantineComponent<RowLayoutFactory>;\n\nRowLayout.Body = RowLayoutBody;\nRowLayout.Header = RowLayoutHeader;\nRowLayout.Icon = IconList;\nRowLayout.displayName = 'Rows';\nRowLayout.extend = identity;\n"],"names":["IconList","useProps","useStyles","identity","classes","RowLayoutBody","RowLayoutProvider","RowLayoutHeader","defaultProps","RowLayout","props","children","styles","classNames","unstyled","getStyles","name","value","Body","Header","Icon","displayName","extend"],"mappings":";AAAA,SAAQA,QAAQ,QAAO,8BAA8B;AACrD,SAAmDC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AAE7F,SAAQC,QAAQ,QAAO,6BAA6B;AAEpD,OAAOC,aAAa,yBAAyB;AAC7C,SAAQC,aAAa,QAAiC,qBAAqB;AAC3E,SAAQC,iBAAiB,QAAO,wBAAwB;AACxD,SAAQC,eAAe,QAAkC,uBAAuB;AAahF,MAAMC,eAAwC,CAAC;AAE/C,OAAO,MAAMC,YAAa,CAACC;IACvB,MAAM,EAACC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAC,GAAGb,SAAS,mBAAmBO,cAAcE;IAC3F,MAAMK,YAAYb,UAA4B;QAC1Cc,MAAM;QACNZ;QACAM;QACAE;QACAC;QACAC;IACJ;IAEA,qBAAO,KAACR;QAAkBW,OAAO;YAACF;QAAS;kBAAIJ;;AACnD,EAAyC;AAEzCF,UAAUS,IAAI,GAAGb;AACjBI,UAAUU,MAAM,GAAGZ;AACnBE,UAAUW,IAAI,GAAGpB;AACjBS,UAAUY,WAAW,GAAG;AACxBZ,UAAUa,MAAM,GAAGnB"}
@@ -1,7 +1,7 @@
1
1
  import { BoxProps, CompoundStylesApiProps, Factory } from '@mantine/core';
2
2
  import { ForwardedRef } from 'react';
3
3
  import { CustomComponentThemeExtend } from '../../../../utils/index.js';
4
- import { TableLayoutProps } from '../../Table.types';
4
+ import { TableLayoutProps } from '../../Table.types.js';
5
5
  export type RowLayoutBodyStylesNames = 'row' | 'cell' | 'collapsibleRow' | 'collapsibleWrapper';
6
6
  export interface RowLayoutBodyProps<T> extends BoxProps, TableLayoutProps<T>, CompoundStylesApiProps<RowLayoutBodyFactory> {
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RowLayoutBody.d.ts","sourceRoot":"","sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutBody.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,QAAQ,EAAY,sBAAsB,EAAE,OAAO,EAAW,MAAM,eAAe,CAAC;AAGjG,OAAO,EAAC,YAAY,EAA4B,MAAM,OA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B,CAAC,CAAC,CACjC,SAAQ,QAAQ,EACZ,gBAAgB,CAAC,CAAC,CAAC,EACnB,sBAAsB,CAAC,oBAAoB,CAAC;CAAG;AAEvD,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;IACvC,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACnC,GAAG,EAAE,mBAAmB,CAAC;IACzB,WAAW,EAAE,wBAAwB,CAAC;IACtC,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AAIH,eAAO,MAAM,aAAa;KAAI,CAAC,SAAU,kBAAkB,CAAC,CAAC,CAAC,GAAG;QAAC,GAAG,CAAC,EAAE,YAAY,CAAC,mBAAmB,CAAC,CAAA;KAAC;;eAR/F,kBAAkB,CAAC,OAAO,CAAC;aAC7B,mBAAmB;qBACX,wBAAwB;kBAC3B,IAAI;;CA6GjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutBody.tsx"],"sourcesContent":["import {Box, BoxProps, Collapse, CompoundStylesApiProps, Factory, useProps} from '@mantine/core';\nimport {flexRender} from '@tanstack/react-table';\nimport {defaultColumnSizing} from '@tanstack/table-core';\nimport {ForwardedRef, Fragment, type MouseEvent} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../../../utils/index.js';\nimport {TableLayoutProps} from '../../Table.types';\nimport {useTableContext} from '../../TableContext.js';\nimport {TableCollapsibleColumn} from '../../table-column/TableCollapsibleColumn.js';\nimport {TableSelectableColumn} from '../../table-column/TableSelectableColumn.js';\nimport {TableLoading} from '../../table-loading/TableLoading.js';\nimport {useRowLayout} from './RowLayoutContext.js';\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 getRowExpandedContent,\n onRowDoubleClick,\n loading,\n classNames,\n className,\n styles,\n style,\n getRowAttributes,\n ...others\n } = useProps('RowLayoutBody', defaultProps as RowLayoutBodyProps<T>, props);\n const {table, store} = useTableContext<T>();\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 = getRowExpandedContent?.(row.original, row.index, row) ?? null;\n const isSelected = !!row.getIsSelected();\n const shouldKeepSelection = store.rowSelectionForced && isSelected;\n const onClick = (event: MouseEvent<HTMLTableRowElement>) => {\n if (rowChildren) {\n toggleCollapsible(event.currentTarget);\n }\n if (store.rowSelectionEnabled && !store.multiRowSelectionEnabled && !shouldKeepSelection) {\n row.toggleSelected();\n }\n };\n\n return (\n <Fragment key={row.id}>\n <tr\n onClick={onClick}\n onDoubleClick={() => {\n onRowDoubleClick?.(row.original, row.index, row);\n }}\n data-selectable={store.rowSelectionEnabled}\n data-selected={isSelected}\n data-multi-selection={store.multiRowSelectionEnabled}\n aria-selected={isSelected}\n data-testid={row.id}\n {...ctx.getStyles('row', {classNames, className, styles, style})}\n {...(getRowAttributes?.(row.original, row.index, row) ?? {})}\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 && store.rowSelectionEnabled) {\n event.stopPropagation();\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 ? `${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","useTableContext","TableCollapsibleColumn","TableSelectableColumn","TableLoading","useRowLayout","defaultProps","RowLayoutBody","props","ctx","getRowExpandedContent","onRowDoubleClick","loading","classNames","className","styles","style","getRowAttributes","others","table","store","toggleCollapsible","el","cell","children","length","querySelector","click","rows","getRowModel","map","row","rowChildren","original","index","isSelected","getIsSelected","shouldKeepSelection","rowSelectionForced","onClick","event","currentTarget","rowSelectionEnabled","multiRowSelectionEnabled","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","td","width","minWidth","maxWidth","data-collapsible-cell","visible","getContext","colSpan","getAllColumns","padding","in","getIsExpanded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AAC;gCACrCO,UAAU,GAAGX,aAAaK,OAAO,CAAC,EAAE,CAAC;gCACrC,GAAGnD,IAAI4C,SAAS,CAAC,QAAQ;oCAACxC;oCAAYE;gCAAM,GAAGC,KAAK;4BACxD;4BACAmD,yBAAuB5C,KAAKkC,MAAM,CAACL,EAAE,KAAKlD,uBAAuBkD,EAAE;4BACnEb,SAASsB;sCAET,cAAA,KAACzD;gCAAagE,SAASxD;0CAClBf,WAAW0B,KAAKkC,MAAM,CAACC,SAAS,CAACnC,IAAI,EAAEA,KAAK8C,UAAU;;2BAbtD9C,KAAK6B,EAAE;oBAiBxB;;gBAEHpB,4BACG,KAACa;oBAAI,GAAGpC,IAAI4C,SAAS,CAAC,kBAAkB;wBAACxC;wBAAYE;oBAAM,EAAE;8BACzD,cAAA,KAACgD;wBACGO,SAASnD,MAAMoD,aAAa,GAAG9C,MAAM;wBACrCT,OAAO;4BACHwD,SAAS;wBACb;kCAEA,cAAA,KAAC7E;4BAAS8E,IAAI1C,IAAI2C,aAAa;sCAC3B,cAAA,KAAChF;gCAAK,GAAGe,IAAI4C,SAAS,CAAC,sBAAsB;oCAACxC;oCAAYE;gCAAM,EAAE;gCAAE4D,IAAG;gCAAKC,IAAG;0CAC1E5C;;;;qBAKjB;;WAjEOD,IAAIqB,EAAE;IAoE7B;IAEA,qBAAO;kBAAGxB;;AACd,EAAE;AAEFrB,cAAcsE,MAAM,GAAG7E"}
1
+ {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutBody.tsx"],"sourcesContent":["import {Box, BoxProps, Collapse, CompoundStylesApiProps, Factory, useProps} from '@mantine/core';\nimport {flexRender} from '@tanstack/react-table';\nimport {defaultColumnSizing} from '@tanstack/table-core';\nimport {ForwardedRef, Fragment, type MouseEvent} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../../../utils/index.js';\nimport {TableLayoutProps} from '../../Table.types.js';\nimport {useTableContext} from '../../TableContext.js';\nimport {TableCollapsibleColumn} from '../../table-column/TableCollapsibleColumn.js';\nimport {TableSelectableColumn} from '../../table-column/TableSelectableColumn.js';\nimport {TableLoading} from '../../table-loading/TableLoading.js';\nimport {useRowLayout} from './RowLayoutContext.js';\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 getRowExpandedContent,\n onRowDoubleClick,\n loading,\n classNames,\n className,\n styles,\n style,\n getRowAttributes,\n ...others\n } = useProps('RowLayoutBody', defaultProps as RowLayoutBodyProps<T>, props);\n const {table, store} = useTableContext<T>();\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 = getRowExpandedContent?.(row.original, row.index, row) ?? null;\n const isSelected = !!row.getIsSelected();\n const shouldKeepSelection = store.rowSelectionForced && isSelected;\n const onClick = (event: MouseEvent<HTMLTableRowElement>) => {\n if (rowChildren) {\n toggleCollapsible(event.currentTarget);\n }\n if (store.rowSelectionEnabled && !store.multiRowSelectionEnabled && !shouldKeepSelection) {\n row.toggleSelected();\n }\n };\n\n return (\n <Fragment key={row.id}>\n <tr\n onClick={onClick}\n onDoubleClick={() => {\n onRowDoubleClick?.(row.original, row.index, row);\n }}\n data-selectable={store.rowSelectionEnabled}\n data-selected={isSelected}\n data-multi-selection={store.multiRowSelectionEnabled}\n aria-selected={isSelected}\n data-testid={row.id}\n {...ctx.getStyles('row', {classNames, className, styles, style})}\n {...(getRowAttributes?.(row.original, row.index, row) ?? {})}\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 && store.rowSelectionEnabled) {\n event.stopPropagation();\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 ? `${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","useTableContext","TableCollapsibleColumn","TableSelectableColumn","TableLoading","useRowLayout","defaultProps","RowLayoutBody","props","ctx","getRowExpandedContent","onRowDoubleClick","loading","classNames","className","styles","style","getRowAttributes","others","table","store","toggleCollapsible","el","cell","children","length","querySelector","click","rows","getRowModel","map","row","rowChildren","original","index","isSelected","getIsSelected","shouldKeepSelection","rowSelectionForced","onClick","event","currentTarget","rowSelectionEnabled","multiRowSelectionEnabled","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","td","width","minWidth","maxWidth","data-collapsible-cell","visible","getContext","colSpan","getAllColumns","padding","in","getIsExpanded","px","py","extend"],"mappings":";AAAA,SAAQA,GAAG,EAAYC,QAAQ,EAAmCC,QAAQ,QAAO,gBAAgB;AACjG,SAAQC,UAAU,QAAO,wBAAwB;AACjD,SAAQC,mBAAmB,QAAO,uBAAuB;AACzD,SAAsBC,QAAQ,QAAwB,QAAQ;AAC9D,SAAoCC,QAAQ,QAAO,6BAA6B;AAEhF,SAAQC,eAAe,QAAO,wBAAwB;AACtD,SAAQC,sBAAsB,QAAO,+CAA+C;AACpF,SAAQC,qBAAqB,QAAO,8CAA8C;AAClF,SAAQC,YAAY,QAAO,sCAAsC;AACjE,SAAQC,YAAY,QAAO,wBAAwB;AAgBnD,MAAMC,eAAqD,CAAC;AAE5D,OAAO,MAAMC,gBAAgB,CAAKC;IAC9B,MAAMC,MAAMJ;IACZ,MAAM,EACFK,qBAAqB,EACrBC,gBAAgB,EAChBC,OAAO,EACPC,UAAU,EACVC,SAAS,EACTC,MAAM,EACNC,KAAK,EACLC,gBAAgB,EAChB,GAAGC,QACN,GAAGtB,SAAS,iBAAiBU,cAAuCE;IACrE,MAAM,EAACW,KAAK,EAAEC,KAAK,EAAC,GAAGnB;IACvB,MAAMoB,oBAAoB,CAACC;QACvB,MAAMC,OAAOD,GAAGE,QAAQ,CAACF,GAAGE,QAAQ,CAACC,MAAM,GAAG,EAAE;QAChDF,KAAKG,aAAa,CAAC,UAAUC,KAAK;IACtC;IAEA,MAAMC,OAAOT,MAAMU,WAAW,IAAID,KAAKE,IAAI,C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CompoundStylesApiProps } from '@mantine/core';
2
2
  import { ForwardedRef } from 'react';
3
3
  import { CustomComponentThemeExtend } from '../../../../utils/index.js';
4
- import { TableLayoutProps } from '../../Table.types';
4
+ import { TableLayoutProps } from '../../Table.types.js';
5
5
  import { RowLayoutBodyFactory } from './RowLayoutBody.js';
6
6
  export type RowLayoutHeaderStyleNames = 'headerRow';
7
7
  export interface RowLayoutHeaderProps<T> extends BoxProps, TableLayoutProps<T>, CompoundStylesApiProps<RowLayoutBodyFactory> {
@@ -1 +1 @@
1
- {"version":3,"file":"RowLayoutHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,sBAAsB,EAAoB,MAAM,eAAe,CAAC;AAClF,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,EAAC,0BAA0B,EAAW,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AAGxD,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC;AAEpD,MAAM,WAAW,oBAAoB,CAAC,CAAC,CACnC,SAAQ,QAAQ,EACZ,gBAAgB,CAAC,CAAC,CAAC,EACnB,sBAAsB,CAAC,oBAAoB,CAAC;CAAG;AAWvD,eAAO,MAAM,eAAe;KAAI,CAAC,SAAU,oBAAoB,CAAC,CAAC,CAAC,GAAG;QAAC,GAAG,CAAC,EAAE,YAAY,CAAC,mBAAmB,CAAC,CAAA;KAAC;;eARnG,oBAAoB,CAAC,OAAO,CAAC;aAC/B,mBAAmB;qBACX,yBAAyB;kBAC5B,IAAI;;CAmCjB,CAAC"}
1
+ {"version":3,"file":"RowLayoutHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,sBAAsB,EAAoB,MAAM,eAAe,CAAC;AAClF,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,EAAC,0BAA0B,EAAW,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAGtD,OAAO,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AAGxD,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC;AAEpD,MAAM,WAAW,oBAAoB,CAAC,CAAC,CACnC,SAAQ,QAAQ,EACZ,gBAAgB,CAAC,CAAC,CAAC,EACnB,sBAAsB,CAAC,oBAAoB,CAAC;CAAG;AAWvD,eAAO,MAAM,eAAe;KAAI,CAAC,SAAU,oBAAoB,CAAC,CAAC,CAAC,GAAG;QAAC,GAAG,CAAC,EAAE,YAAY,CAAC,mBAAmB,CAAC,CAAA;KAAC;;eARnG,oBAAoB,CAAC,OAAO,CAAC;aAC/B,mBAAmB;qBACX,yBAAyB;kBAC5B,IAAI;;CAmCjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutHeader.tsx"],"sourcesContent":["import {BoxProps, CompoundStylesApiProps, Factory, useProps} from '@mantine/core';\nimport {ForwardedRef} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../../../utils/index.js';\nimport {TableLayoutProps} from '../../Table.types';\nimport {useTableContext} from '../../TableContext.js';\nimport {Th} from '../../table-header/Th.js';\nimport {RowLayoutBodyFactory} from './RowLayoutBody.js';\nimport {useRowLayout} from './RowLayoutContext.js';\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 {\n getRowExpandedContent: _getRowExpandedContent,\n getRowActions: _getRowActions,\n loading: _loading,\n getRowAttributes: _getRowAttributes,\n onRowDoubleClick: _onRowDoubleClick,\n className,\n style,\n classNames,\n styles,\n ...others\n } = useProps('RowLayoutHeader', defaultProps as RowLayoutHeaderProps<T>, props);\n const {table, store} = useTableContext<T>();\n\n const headers = table.getHeaderGroups().map((headerGroup) => (\n <tr\n key={headerGroup.id}\n data-selectable={store.rowSelectionEnabled}\n data-multi-selection={store.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","useTableContext","Th","useRowLayout","defaultProps","RowLayoutHeader","props","ctx","getRowExpandedContent","_getRowExpandedContent","getRowActions","_getRowActions","loading","_loading","getRowAttributes","_getRowAttributes","onRowDoubleClick","_onRowDoubleClick","className","style","classNames","styles","others","table","store","headers","getHeaderGroups","map","headerGroup","tr","data-selectable","rowSelectionEnabled","data-multi-selection","multiRowSelectionEnabled","getStyles","columnHeader","header","id","extend"],"mappings":";AAAA,SAAmDA,QAAQ,QAAO,gBAAgB;AAElF,SAAoCC,QAAQ,QAAO,6BAA6B;AAEhF,SAAQC,eAAe,QAAO,wBAAwB;AACtD,SAAQC,EAAE,QAAO,2BAA2B;AAE5C,SAAQC,YAAY,QAAO,wBAAwB;AAgBnD,MAAMC,eAAuD,CAAC;AAE9D,OAAO,MAAMC,kBAAkB,CAAKC;IAChC,MAAMC,MAAMJ;IACZ,MAAM,EACFK,uBAAuBC,sBAAsB,EAC7CC,eAAeC,cAAc,EAC7BC,SAASC,QAAQ,EACjBC,kBAAkBC,iBAAiB,EACnCC,kBAAkBC,iBAAiB,EACnCC,SAAS,EACTC,KAAK,EACLC,UAAU,EACVC,MAAM,EACN,GAAGC,QACN,GAAGvB,SAAS,mBAAmBK,cAAyCE;IACzE,MAAM,EAACiB,KAAK,EAAEC,KAAK,EAAC,GAAGvB;IAEvB,MAAMwB,UAAUF,MAAMG,eAAe,GAAGC,GAAG,CAAC,CAACC,4BACzC,KAACC;YAEGC,mBAAiBN,MAAMO,mBAAmB;YAC1CC,wBAAsBR,MAAMS,wBAAwB;YACnD,GAAG1B,IAAI2B,SAAS,CAAC,aAAa;gBAAChB;gBAAWE;gBAAYC;gBAAQF;YAAK,EAAE;YACrE,GAAGG,MAAM;sBAETM,YAAYH,OAAO,CAACE,GAAG,CAAC,CAACQ,6BACtB,KAACjC;oBAAyBkC,QAAQD;mBAAzBA,aAAaE,EAAE;WAPvBT,YAAYS,EAAE;IAW3B,qBAAO;kBAAGZ;;AACd,EAAE;AACFpB,gBAAgBiC,MAAM,GAAGtC"}
1
+ {"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutHeader.tsx"],"sourcesContent":["import {BoxProps, CompoundStylesApiProps, Factory, useProps} from '@mantine/core';\nimport {ForwardedRef} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../../../utils/index.js';\nimport {TableLayoutProps} from '../../Table.types.js';\nimport {useTableContext} from '../../TableContext.js';\nimport {Th} from '../../table-header/Th.js';\nimport {RowLayoutBodyFactory} from './RowLayoutBody.js';\nimport {useRowLayout} from './RowLayoutContext.js';\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 {\n getRowExpandedContent: _getRowExpandedContent,\n getRowActions: _getRowActions,\n loading: _loading,\n getRowAttributes: _getRowAttributes,\n onRowDoubleClick: _onRowDoubleClick,\n className,\n style,\n classNames,\n styles,\n ...others\n } = useProps('RowLayoutHeader', defaultProps as RowLayoutHeaderProps<T>, props);\n const {table, store} = useTableContext<T>();\n\n const headers = table.getHeaderGroups().map((headerGroup) => (\n <tr\n key={headerGroup.id}\n data-selectable={store.rowSelectionEnabled}\n data-multi-selection={store.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","useTableContext","Th","useRowLayout","defaultProps","RowLayoutHeader","props","ctx","getRowExpandedContent","_getRowExpandedContent","getRowActions","_getRowActions","loading","_loading","getRowAttributes","_getRowAttributes","onRowDoubleClick","_onRowDoubleClick","className","style","classNames","styles","others","table","store","headers","getHeaderGroups","map","headerGroup","tr","data-selectable","rowSelectionEnabled","data-multi-selection","multiRowSelectionEnabled","getStyles","columnHeader","header","id","extend"],"mappings":";AAAA,SAAmDA,QAAQ,QAAO,gBAAgB;AAElF,SAAoCC,QAAQ,QAAO,6BAA6B;AAEhF,SAAQC,eAAe,QAAO,wBAAwB;AACtD,SAAQC,EAAE,QAAO,2BAA2B;AAE5C,SAAQC,YAAY,QAAO,wBAAwB;AAgBnD,MAAMC,eAAuD,CAAC;AAE9D,OAAO,MAAMC,kBAAkB,CAAKC;IAChC,MAAMC,MAAMJ;IACZ,MAAM,EACFK,uBAAuBC,sBAAsB,EAC7CC,eAAeC,cAAc,EAC7BC,SAASC,QAAQ,EACjBC,kBAAkBC,iBAAiB,EACnCC,kBAAkBC,iBAAiB,EACnCC,SAAS,EACTC,KAAK,EACLC,UAAU,EACVC,MAAM,EACN,GAAGC,QACN,GAAGvB,SAAS,mBAAmBK,cAAyCE;IACzE,MAAM,EAACiB,KAAK,EAAEC,KAAK,EAAC,GAAGvB;IAEvB,MAAMwB,UAAUF,MAAMG,eAAe,GAAGC,GAAG,CAAC,CAACC,4BACzC,KAACC;YAEGC,mBAAiBN,MAAMO,mBAAmB;YAC1CC,wBAAsBR,MAAMS,wBAAwB;YACnD,GAAG1B,IAAI2B,SAAS,CAAC,aAAa;gBAAChB;gBAAWE;gBAAYC;gBAAQF;YAAK,EAAE;YACrE,GAAGG,MAAM;sBAETM,YAAYH,OAAO,CAACE,GAAG,CAAC,CAACQ,6BACtB,KAACjC;oBAAyBkC,QAAQD;mBAAzBA,aAAaE,EAAE;WAPvBT,YAAYS,EAAE;IAW3B,qBAAO;kBAAGZ;;AACd,EAAE;AACFpB,gBAAgBiC,MAAM,GAAGtC"}
@@ -1,6 +1,6 @@
1
1
  import { CompoundStylesApiProps, ExtendComponent, Factory, MenuProps } from '@mantine/core';
2
2
  import { ReactNode } from 'react';
3
- import { TableAction } from '../Table.types';
3
+ import { TableAction } from '../Table.types.js';
4
4
  export type TableActionsListStylesNames = 'actionsTarget' | 'actionsDropdown' | 'actionsTooltip' | 'actionsGroup' | 'actionsGroupLabel' | 'actionsGroupDivider' | 'actionsGroupItems';
5
5
  export interface TableActionsListProps extends Omit<MenuProps, 'classNames' | 'styles' | 'vars' | 'variant'>, CompoundStylesApiProps<TableActionsListFactory> {
6
6
  actions: TableAction[];
@@ -1 +1 @@
1
- {"version":3,"file":"TableActionsList.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-actions/TableActionsList.tsx"],"names":[],"mappings":"AACA,OAAO,EAEH,sBAAsB,EAEtB,eAAe,EACf,OAAO,EAEP,SAAS,EAGZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAoB,SAAS,EAAW,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAI3C,MAAM,MAAM,2BAA2B,GACjC,eAAe,GACf,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,CAAC;AAE1B,MAAM,WAAW,qBACb,SAAQ,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,EACjE,sBAAsB,CAAC,uBAAuB,CAAC;IACnD,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,KAAK,uBAAuB,GAAG,OAAO,CAAC;IACnC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,2BAA2B,CAAC;IACzC,QAAQ,EAAE,IAAI,CAAC;IACf,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC;CACjC,CAAC,CAAC;AAmBH,eAAO,MAAM,gBAAgB;YAAW,qBAAqB;kBAuI3B,eAAe,CAAC,uBAAuB,CAAC;eA/J/D,qBAAqB;aACvB,cAAc;qBACN,2BAA2B;kBAC9B,IAAI;iBACL,OAAO,GAAG,UAAU;;CAoIhC,CAAC"}
1
+ {"version":3,"file":"TableActionsList.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-actions/TableActionsList.tsx"],"names":[],"mappings":"AACA,OAAO,EAEH,sBAAsB,EAEtB,eAAe,EACf,OAAO,EAEP,SAAS,EAGZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAoB,SAAS,EAAW,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAI9C,MAAM,MAAM,2BAA2B,GACjC,eAAe,GACf,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,CAAC;AAE1B,MAAM,WAAW,qBACb,SAAQ,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,EACjE,sBAAsB,CAAC,uBAAuB,CAAC;IACnD,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,KAAK,uBAAuB,GAAG,OAAO,CAAC;IACnC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,2BAA2B,CAAC;IACzC,QAAQ,EAAE,IAAI,CAAC;IACf,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC;CACjC,CAAC,CAAC;AAmBH,eAAO,MAAM,gBAAgB;YAAW,qBAAqB;kBAuI3B,eAAe,CAAC,uBAAuB,CAAC;eA/J/D,qBAAqB;aACvB,cAAc;qBACN,2BAA2B;kBAC9B,IAAI;iBACL,OAAO,GAAG,UAAU;;CAoIhC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/table/table-actions/TableActionsList.tsx"],"sourcesContent":["import {MoreSize16Px} from '@coveord/plasma-react-icons';\nimport {\n Box,\n CompoundStylesApiProps,\n CSSProperties,\n ExtendComponent,\n Factory,\n Menu,\n MenuProps,\n Tooltip,\n useProps,\n} from '@mantine/core';\nimport {MouseEventHandler, ReactNode, useState} from 'react';\nimport {ActionIcon} from '../../action-icon/index.js';\nimport {Button} from '../../button/index.js';\nimport {InlineConfirm} from '../../inline-confirm/index.js';\nimport {TableAction} from '../Table.types';\nimport {useTableContext} from '../TableContext.js';\nimport {TableActionProvider} from './TableActionContext.js';\n\nexport type TableActionsListStylesNames =\n | 'actionsTarget'\n | 'actionsDropdown'\n | 'actionsTooltip'\n | 'actionsGroup'\n | 'actionsGroupLabel'\n | 'actionsGroupDivider'\n | 'actionsGroupItems';\n\nexport interface TableActionsListProps\n extends Omit<MenuProps, 'classNames' | 'styles' | 'vars' | 'variant'>,\n CompoundStylesApiProps<TableActionsListFactory> {\n actions: TableAction[];\n /**\n * Label for the more menu\n * @default 'More' when variant is 'split', 'Actions' when variant is 'combined'\n */\n label?: string;\n /**\n * Label for the primary actions group when variant is 'combined'\n * @default ''\n */\n primaryGroupLabel?: string;\n icon?: ReactNode;\n}\n\ntype TableActionsListFactory = Factory<{\n props: TableActionsListProps;\n ref: HTMLDivElement;\n stylesNames: TableActionsListStylesNames;\n compound: true;\n variant: 'split' | 'combined';\n}>;\n\nconst defaultProps: Partial<TableActionsListProps> = {\n label: 'More',\n primaryGroupLabel: '',\n icon: <MoreSize16Px height={16} />,\n};\n\ninterface ActionsDict {\n $$primary: TableAction[];\n $$confirmPrompt: TableAction[];\n secondary: Record<string, Array<TableAction['component']>>;\n}\n\ninterface ActionGroup {\n name: string;\n actions: ReactNode[];\n}\n\nexport const TableActionsList = (props: TableActionsListProps) => {\n const {getStyles} = useTableContext();\n const {\n actions,\n icon,\n label,\n primaryGroupLabel,\n classNames,\n styles,\n vars: _vars,\n variant,\n ...others\n } = useProps('PlasmaTableActionsListColumn', defaultProps, props);\n const [opened, setOpened] = useState(false);\n\n const onClick: MouseEventHandler = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setOpened((prevState) => !prevState);\n };\n const onChange = (newOpened: boolean) => {\n if (!newOpened) {\n setOpened(false);\n }\n };\n\n const actionsGroups: ActionsDict = actions.reduce<ActionsDict>(\n (acc, action) => {\n if (action.group === '$$primary') {\n acc.$$primary.push(action);\n } else if (action.group === '$$confirmPrompt') {\n acc.$$confirmPrompt.push(action);\n } else {\n if (acc.secondary[action.group]) {\n acc.secondary[action.group].push(action.component);\n } else {\n acc.secondary[action.group] = [action.component];\n }\n }\n return acc;\n },\n {$$primary: [], $$confirmPrompt: [], secondary: {}},\n );\n\n const primaryActions = actionsGroups.$$primary.map((action) => action.component);\n const confirmPrompts = actionsGroups.$$confirmPrompt.map((confirmPromptAction) => confirmPromptAction.component);\n const secondaryActionGroups = Object.entries(actionsGroups.secondary).map(\n ([group, groupActions]): ActionGroup => ({\n name: group,\n actions: groupActions,\n }),\n );\n\n if (variant === 'split') {\n return (\n <InlineConfirm>\n {confirmPrompts}\n <TableActionProvider value={{primary: true}}>{primaryActions}</TableActionProvider>\n {secondaryActionGroups.length > 0 ? (\n <TableActionProvider value={{primary: false}}>\n <Menu withinPortal={false} {...others} keepMounted>\n <Menu.Target>\n <Button.Quaternary\n {...getStyles('actionsTarget', {styles, classNames})}\n leftSection={icon}\n >\n {label}\n </Button.Quaternary>\n </Menu.Target>\n <Menu.Dropdown {...getStyles('actionsDropdown', {styles, classNames})}>\n <ActionsGroupsMenuItems\n classNames={classNames}\n styles={styles}\n actionGroups={secondaryActionGroups}\n />\n </Menu.Dropdown>\n </Menu>\n </TableActionProvider>\n ) : null}\n </InlineConfirm>\n );\n }\n return (\n <InlineConfirm>\n {confirmPrompts}\n <TableActionProvider value={{primary: false}}>\n <Menu opened={opened} onChange={onChange} {...others} keepMounted>\n <Menu.Target>\n <Tooltip label={label} {...getStyles('actionsTooltip', {styles, classNames})}>\n <ActionIcon.Quaternary\n {...getStyles('actionsTarget', {styles, classNames})}\n onClick={onClick}\n >\n {icon}\n </ActionIcon.Quaternary>\n </Tooltip>\n </Menu.Target>\n <Menu.Dropdown {...getStyles('actionsDropdown', {styles, classNames})}>\n <ActionsGroupsMenuItems\n classNames={classNames}\n styles={styles}\n actionGroups={\n primaryActions.length > 0\n ? [{name: primaryGroupLabel, actions: primaryActions}, ...secondaryActionGroups]\n : secondaryActionGroups\n }\n />\n </Menu.Dropdown>\n </Menu>\n </TableActionProvider>\n </InlineConfirm>\n );\n};\n\ninterface ActionsGroupsMenuItemsProps {\n styles: Partial<Record<TableActionsListStylesNames, CSSProperties>>;\n classNames: Partial<Record<TableActionsListStylesNames, string>>;\n actionGroups: ActionGroup[];\n}\n\nconst ActionsGroupsMenuItems = ({styles, classNames, actionGroups}: ActionsGroupsMenuItemsProps) => {\n const {getStyles} = useTableContext();\n return actionGroups.map(({name, actions}, index) => (\n <Box key={name} {...getStyles('actionsGroup', {styles, classNames})}>\n {actionGroups.length > 1 ? (\n <Menu.Label {...getStyles('actionsGroupLabel', {styles, classNames})}>{name}</Menu.Label>\n ) : null}\n <Box {...getStyles('actionsGroupItems', {styles, classNames})}>{actions}</Box>\n {index < actionGroups.length - 1 ? (\n <Menu.Divider {...getStyles('actionsGroupDivider', {styles, classNames})} />\n ) : null}\n </Box>\n ));\n};\n\nTableActionsList.extend = (input: ExtendComponent<TableActionsListFactory>) => input;\n"],"names":["MoreSize16Px","Box","Menu","Tooltip","useProps","useState","ActionIcon","Button","InlineConfirm","useTableContext","TableActionProvider","defaultProps","label","primaryGroupLabel","icon","height","TableActionsList","props","getStyles","actions","classNames","styles","vars","_vars","variant","others","opened","setOpened","onClick","e","preventDefault","stopPropagation","prevState","onChange","newOpened","actionsGroups","reduce","acc","action","group","$$primary","push","$$confirmPrompt","secondary","component","primaryActions","map","confirmPrompts","confirmPromptAction","secondaryActionGroups","Object","entries","groupActions","name","value","primary","length","withinPortal","keepMounted","Target","Quaternary","leftSection","Dropdown","ActionsGroupsMenuItems","actionGroups","index","Label","Divider","extend","input"],"mappings":";AAAA,SAAQA,YAAY,QAAO,8BAA8B;AACzD,SACIC,GAAG,EAKHC,IAAI,EAEJC,OAAO,EACPC,QAAQ,QACL,gBAAgB;AACvB,SAAsCC,QAAQ,QAAO,QAAQ;AAC7D,SA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AAU,kBAAkB;oCAACG;oCAAQD;gCAAU,EAAE;0CACxE,cAAA,KAACd,WAAWsD,UAAU;oCACjB,GAAG1C,UAAU,iBAAiB;wCAACG;wCAAQD;oCAAU,EAAE;oCACpDQ,SAASA;8CAERd;;;;sCAIb,KAACZ,KAAK4D,QAAQ;4BAAE,GAAG5C,UAAU,mBAAmB;gCAACG;gCAAQD;4BAAU,EAAE;sCACjE,cAAA,KAAC2C;gCACG3C,YAAYA;gCACZC,QAAQA;gCACR2C,cACInB,eAAeW,MAAM,GAAG,IAClB;oCAAC;wCAACH,MAAMxC;wCAAmBM,SAAS0B;oCAAc;uCAAMI;iCAAsB,GAC9EA;;;;;;;;AAQtC,EAAE;AAQF,MAAMc,yBAAyB,CAAC,EAAC1C,MAAM,EAAED,UAAU,EAAE4C,YAAY,EAA8B;IAC3F,MAAM,EAAC9C,SAAS,EAAC,GAAGT;IACpB,OAAOuD,aAAalB,GAAG,CAAC,CAAC,EAACO,IAAI,EAAElC,OAAO,EAAC,EAAE8C,sBACtC,MAAChE;YAAgB,GAAGiB,UAAU,gBAAgB;gBAACG;gBAAQD;YAAU,EAAE;;gBAC9D4C,aAAaR,MAAM,GAAG,kBACnB,KAACtD,KAAKgE,KAAK;oBAAE,GAAGhD,UAAU,qBAAqB;wBAACG;wBAAQD;oBAAU,EAAE;8BAAGiC;qBACvE;8BACJ,KAACpD;oBAAK,GAAGiB,UAAU,qBAAqB;wBAACG;wBAAQD;oBAAU,EAAE;8BAAGD;;gBAC/D8C,QAAQD,aAAaR,MAAM,GAAG,kBAC3B,KAACtD,KAAKiE,OAAO;oBAAE,GAAGjD,UAAU,uBAAuB;wBAACG;wBAAQD;oBAAU,EAAE;qBACxE;;WAPEiC;AAUlB;AAEArC,iBAAiBoD,MAAM,GAAG,CAACC,QAAoDA"}
1
+ {"version":3,"sources":["../../../../../src/components/table/table-actions/TableActionsList.tsx"],"sourcesContent":["import {MoreSize16Px} from '@coveord/plasma-react-icons';\nimport {\n Box,\n CompoundStylesApiProps,\n CSSProperties,\n ExtendComponent,\n Factory,\n Menu,\n MenuProps,\n Tooltip,\n useProps,\n} from '@mantine/core';\nimport {MouseEventHandler, ReactNode, useState} from 'react';\nimport {ActionIcon} from '../../action-icon/index.js';\nimport {Button} from '../../button/index.js';\nimport {InlineConfirm} from '../../inline-confirm/index.js';\nimport {TableAction} from '../Table.types.js';\nimport {useTableContext} from '../TableContext.js';\nimport {TableActionProvider} from './TableActionContext.js';\n\nexport type TableActionsListStylesNames =\n | 'actionsTarget'\n | 'actionsDropdown'\n | 'actionsTooltip'\n | 'actionsGroup'\n | 'actionsGroupLabel'\n | 'actionsGroupDivider'\n | 'actionsGroupItems';\n\nexport interface TableActionsListProps\n extends Omit<MenuProps, 'classNames' | 'styles' | 'vars' | 'variant'>,\n CompoundStylesApiProps<TableActionsListFactory> {\n actions: TableAction[];\n /**\n * Label for the more menu\n * @default 'More' when variant is 'split', 'Actions' when variant is 'combined'\n */\n label?: string;\n /**\n * Label for the primary actions group when variant is 'combined'\n * @default ''\n */\n primaryGroupLabel?: string;\n icon?: ReactNode;\n}\n\ntype TableActionsListFactory = Factory<{\n props: TableActionsListProps;\n ref: HTMLDivElement;\n stylesNames: TableActionsListStylesNames;\n compound: true;\n variant: 'split' | 'combined';\n}>;\n\nconst defaultProps: Partial<TableActionsListProps> = {\n label: 'More',\n primaryGroupLabel: '',\n icon: <MoreSize16Px height={16} />,\n};\n\ninterface ActionsDict {\n $$primary: TableAction[];\n $$confirmPrompt: TableAction[];\n secondary: Record<string, Array<TableAction['component']>>;\n}\n\ninterface ActionGroup {\n name: string;\n actions: ReactNode[];\n}\n\nexport const TableActionsList = (props: TableActionsListProps) => {\n const {getStyles} = useTableContext();\n const {\n actions,\n icon,\n label,\n primaryGroupLabel,\n classNames,\n styles,\n vars: _vars,\n variant,\n ...others\n } = useProps('PlasmaTableActionsListColumn', defaultProps, props);\n const [opened, setOpened] = useState(false);\n\n const onClick: MouseEventHandler = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setOpened((prevState) => !prevState);\n };\n const onChange = (newOpened: boolean) => {\n if (!newOpened) {\n setOpened(false);\n }\n };\n\n const actionsGroups: ActionsDict = actions.reduce<ActionsDict>(\n (acc, action) => {\n if (action.group === '$$primary') {\n acc.$$primary.push(action);\n } else if (action.group === '$$confirmPrompt') {\n acc.$$confirmPrompt.push(action);\n } else {\n if (acc.secondary[action.group]) {\n acc.secondary[action.group].push(action.component);\n } else {\n acc.secondary[action.group] = [action.component];\n }\n }\n return acc;\n },\n {$$primary: [], $$confirmPrompt: [], secondary: {}},\n );\n\n const primaryActions = actionsGroups.$$primary.map((action) => action.component);\n const confirmPrompts = actionsGroups.$$confirmPrompt.map((confirmPromptAction) => confirmPromptAction.component);\n const secondaryActionGroups = Object.entries(actionsGroups.secondary).map(\n ([group, groupActions]): ActionGroup => ({\n name: group,\n actions: groupActions,\n }),\n );\n\n if (variant === 'split') {\n return (\n <InlineConfirm>\n {confirmPrompts}\n <TableActionProvider value={{primary: true}}>{primaryActions}</TableActionProvider>\n {secondaryActionGroups.length > 0 ? (\n <TableActionProvider value={{primary: false}}>\n <Menu withinPortal={false} {...others} keepMounted>\n <Menu.Target>\n <Button.Quaternary\n {...getStyles('actionsTarget', {styles, classNames})}\n leftSection={icon}\n >\n {label}\n </Button.Quaternary>\n </Menu.Target>\n <Menu.Dropdown {...getStyles('actionsDropdown', {styles, classNames})}>\n <ActionsGroupsMenuItems\n classNames={classNames}\n styles={styles}\n actionGroups={secondaryActionGroups}\n />\n </Menu.Dropdown>\n </Menu>\n </TableActionProvider>\n ) : null}\n </InlineConfirm>\n );\n }\n return (\n <InlineConfirm>\n {confirmPrompts}\n <TableActionProvider value={{primary: false}}>\n <Menu opened={opened} onChange={onChange} {...others} keepMounted>\n <Menu.Target>\n <Tooltip label={label} {...getStyles('actionsTooltip', {styles, classNames})}>\n <ActionIcon.Quaternary\n {...getStyles('actionsTarget', {styles, classNames})}\n onClick={onClick}\n >\n {icon}\n </ActionIcon.Quaternary>\n </Tooltip>\n </Menu.Target>\n <Menu.Dropdown {...getStyles('actionsDropdown', {styles, classNames})}>\n <ActionsGroupsMenuItems\n classNames={classNames}\n styles={styles}\n actionGroups={\n primaryActions.length > 0\n ? [{name: primaryGroupLabel, actions: primaryActions}, ...secondaryActionGroups]\n : secondaryActionGroups\n }\n />\n </Menu.Dropdown>\n </Menu>\n </TableActionProvider>\n </InlineConfirm>\n );\n};\n\ninterface ActionsGroupsMenuItemsProps {\n styles: Partial<Record<TableActionsListStylesNames, CSSProperties>>;\n classNames: Partial<Record<TableActionsListStylesNames, string>>;\n actionGroups: ActionGroup[];\n}\n\nconst ActionsGroupsMenuItems = ({styles, classNames, actionGroups}: ActionsGroupsMenuItemsProps) => {\n const {getStyles} = useTableContext();\n return actionGroups.map(({name, actions}, index) => (\n <Box key={name} {...getStyles('actionsGroup', {styles, classNames})}>\n {actionGroups.length > 1 ? (\n <Menu.Label {...getStyles('actionsGroupLabel', {styles, classNames})}>{name}</Menu.Label>\n ) : null}\n <Box {...getStyles('actionsGroupItems', {styles, classNames})}>{actions}</Box>\n {index < actionGroups.length - 1 ? (\n <Menu.Divider {...getStyles('actionsGroupDivider', {styles, classNames})} />\n ) : null}\n </Box>\n ));\n};\n\nTableActionsList.extend = (input: ExtendComponent<TableActionsListFactory>) => input;\n"],"names":["MoreSize16Px","Box","Menu","Tooltip","useProps","useState","ActionIcon","Button","InlineConfirm","useTableContext","TableActionProvider","defaultProps","label","primaryGroupLabel","icon","height","TableActionsList","props","getStyles","actions","classNames","styles","vars","_vars","variant","others","opened","setOpened","onClick","e","preventDefault","stopPropagation","prevState","onChange","newOpened","actionsGroups","reduce","acc","action","group","$$primary","push","$$confirmPrompt","secondary","component","primaryActions","map","confirmPrompts","confirmPromptAction","secondaryActionGroups","Object","entries","groupActions","name","value","primary","length","withinPortal","keepMounted","Target","Quaternary","leftSection","Dropdown","ActionsGroupsMenuItems","actionGroups","index","Label","Divider","extend","input"],"mappings":";AAAA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BoD,MAAM,GAAG,CAACC,QAAoDA"}
@@ -1,4 +1,4 @@
1
1
  import { FunctionComponent } from 'react';
2
- import { TablePaginationProps } from './TablePagination.types';
2
+ import { TablePaginationProps } from './TablePagination.types.js';
3
3
  export declare const TablePagination: FunctionComponent<TablePaginationProps>;
4
4
  //# sourceMappingURL=TablePagination.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-pagination/TablePagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAExC,OAAO,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAG7D,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,CAwCnE,CAAC"}
1
+ {"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-pagination/TablePagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAExC,OAAO,EAAC,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AAGhE,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,CAwCnE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/table/table-pagination/TablePagination.tsx"],"sourcesContent":["import {Pagination} from '@mantine/core';\nimport {useDidUpdate} from '@mantine/hooks';\nimport {FunctionComponent} from 'react';\n\nimport {TablePaginationProps} from './TablePagination.types';\nimport {useTableContext} from '../TableContext.js';\n\nexport const TablePagination: FunctionComponent<TablePaginationProps> = ({onPageChange}) => {\n const {store, table, containerRef} = useTableContext();\n\n const updatePage = (newPage: number) => {\n onPageChange?.(newPage - 1);\n store.setPagination((prev) => ({...prev, pageIndex: newPage - 1}));\n containerRef.current.scrollIntoView({behavior: 'smooth'});\n };\n\n const total = table.getPageCount();\n\n useDidUpdate(() => {\n if (store.state.pagination.pageIndex + 1 > total && total > 0) {\n updatePage(total);\n }\n }, [store.state.pagination.pageIndex, total]);\n\n return (\n <Pagination\n value={store.state.pagination.pageIndex + 1}\n onChange={updatePage}\n total={total}\n boundaries={1}\n size=\"md\"\n gap=\"xs\"\n getControlProps={(control) => {\n switch (control) {\n case 'previous':\n return {\n component: 'button',\n 'aria-label': 'previous page',\n };\n case 'next':\n return {component: 'button', 'aria-label': 'next page'};\n default:\n return {};\n }\n }}\n />\n );\n};\n"],"names":["Pagination","useDidUpdate","useTableContext","TablePagination","onPageChange","store","table","containerRef","updatePage","newPage","setPagination","prev","pageIndex","current","scrollIntoView","behavior","total","getPageCount","state","pagination","value","onChange","boundaries","size","gap","getControlProps","control","component"],"mappings":";AAAA,SAAQA,UAAU,QAAO,gBAAgB;AACzC,SAAQC,YAAY,QAAO,iBAAiB;AAI5C,SAAQC,eAAe,QAAO,qBAAqB;AAEnD,OAAO,MAAMC,kBAA2D,CAAC,EAACC,YAAY,EAAC;IACnF,MAAM,EAACC,KAAK,EAAEC,KAAK,EAAEC,YAAY,EAAC,GAAGL;IAErC,MAAMM,aAAa,CAACC;QAChBL,eAAeK,UAAU;QACzBJ,MAAMK,aAAa,CAAC,CAACC,OAAU,CAAA;gBAAC,GAAGA,IAAI;gBAAEC,WAAWH,UAAU;YAAC,CAAA;QAC/DF,aAAaM,OAAO,CAACC,cAAc,CAAC;YAACC,UAAU;QAAQ;IAC3D;IAEA,MAAMC,QAAQV,MAAMW,YAAY;IAEhChB,aAAa;QACT,IAAII,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS,GAAG,IAAII,SAASA,QAAQ,GAAG;YAC3DR,WAAWQ;QACf;IACJ,GAAG;QAACX,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS;QAAEI;KAAM;IAE5C,qBACI,KAAChB;QACGoB,OAAOf,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS,GAAG;QAC1CS,UAAUb;QACVQ,OAAOA;QACPM,YAAY;QACZC,MAAK;QACLC,KAAI;QACJC,iBAAiB,CAACC;YACd,OAAQA;gBACJ,KAAK;oBACD,OAAO;wBACHC,WAAW;wBACX,cAAc;oBAClB;gBACJ,KAAK;oBACD,OAAO;wBAACA,WAAW;wBAAU,cAAc;oBAAW;gBAC1D;oBACI,OAAO,CAAC;YAChB;QACJ;;AAGZ,EAAE"}
1
+ {"version":3,"sources":["../../../../../src/components/table/table-pagination/TablePagination.tsx"],"sourcesContent":["import {Pagination} from '@mantine/core';\nimport {useDidUpdate} from '@mantine/hooks';\nimport {FunctionComponent} from 'react';\n\nimport {TablePaginationProps} from './TablePagination.types.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport const TablePagination: FunctionComponent<TablePaginationProps> = ({onPageChange}) => {\n const {store, table, containerRef} = useTableContext();\n\n const updatePage = (newPage: number) => {\n onPageChange?.(newPage - 1);\n store.setPagination((prev) => ({...prev, pageIndex: newPage - 1}));\n containerRef.current.scrollIntoView({behavior: 'smooth'});\n };\n\n const total = table.getPageCount();\n\n useDidUpdate(() => {\n if (store.state.pagination.pageIndex + 1 > total && total > 0) {\n updatePage(total);\n }\n }, [store.state.pagination.pageIndex, total]);\n\n return (\n <Pagination\n value={store.state.pagination.pageIndex + 1}\n onChange={updatePage}\n total={total}\n boundaries={1}\n size=\"md\"\n gap=\"xs\"\n getControlProps={(control) => {\n switch (control) {\n case 'previous':\n return {\n component: 'button',\n 'aria-label': 'previous page',\n };\n case 'next':\n return {component: 'button', 'aria-label': 'next page'};\n default:\n return {};\n }\n }}\n />\n );\n};\n"],"names":["Pagination","useDidUpdate","useTableContext","TablePagination","onPageChange","store","table","containerRef","updatePage","newPage","setPagination","prev","pageIndex","current","scrollIntoView","behavior","total","getPageCount","state","pagination","value","onChange","boundaries","size","gap","getControlProps","control","component"],"mappings":";AAAA,SAAQA,UAAU,QAAO,gBAAgB;AACzC,SAAQC,YAAY,QAAO,iBAAiB;AAI5C,SAAQC,eAAe,QAAO,qBAAqB;AAEnD,OAAO,MAAMC,kBAA2D,CAAC,EAACC,YAAY,EAAC;IACnF,MAAM,EAACC,KAAK,EAAEC,KAAK,EAAEC,YAAY,EAAC,GAAGL;IAErC,MAAMM,aAAa,CAACC;QAChBL,eAAeK,UAAU;QACzBJ,MAAMK,aAAa,CAAC,CAACC,OAAU,CAAA;gBAAC,GAAGA,IAAI;gBAAEC,WAAWH,UAAU;YAAC,CAAA;QAC/DF,aAAaM,OAAO,CAACC,cAAc,CAAC;YAACC,UAAU;QAAQ;IAC3D;IAEA,MAAMC,QAAQV,MAAMW,YAAY;IAEhChB,aAAa;QACT,IAAII,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS,GAAG,IAAII,SAASA,QAAQ,GAAG;YAC3DR,WAAWQ;QACf;IACJ,GAAG;QAACX,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS;QAAEI;KAAM;IAE5C,qBACI,KAAChB;QACGoB,OAAOf,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS,GAAG;QAC1CS,UAAUb;QACVQ,OAAOA;QACPM,YAAY;QACZC,MAAK;QACLC,KAAI;QACJC,iBAAiB,CAACC;YACd,OAAQA;gBACJ,KAAK;oBACD,OAAO;wBACHC,WAAW;wBACX,cAAc;oBAClB;gBACJ,KAAK;oBACD,OAAO;wBAACA,WAAW;wBAAU,cAAc;oBAAW;gBAC1D;oBACI,OAAO,CAAC;YAChB;QACJ;;AAGZ,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
- import { TablePerPageProps } from './TablePerPage.types';
2
+ import { TablePerPageProps } from './TablePerPage.types.js';
3
3
  export declare const TablePerPage: FunctionComponent<TablePerPageProps> & {
4
4
  DEFAULT_SIZE: number;
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TablePerPage.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-per-page/TablePerPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,GAAG;IAAC,YAAY,EAAE,MAAM,CAAA;CAwBtF,CAAC"}
1
+ {"version":3,"file":"TablePerPage.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-per-page/TablePerPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAE1D,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,GAAG;IAAC,YAAY,EAAE,MAAM,CAAA;CAwBtF,CAAC"}