@razorpay/blade 12.42.3 → 12.43.1

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 (30) hide show
  1. package/build/lib/native/components/Table/TableContext.js +1 -1
  2. package/build/lib/native/components/Table/TableContext.js.map +1 -1
  3. package/build/lib/native/components/Table/tokens.js.map +1 -1
  4. package/build/lib/web/development/components/Table/Table.web.js +39 -8
  5. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  6. package/build/lib/web/development/components/Table/TableBody.web.js +82 -14
  7. package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
  8. package/build/lib/web/development/components/Table/TableContext.js +2 -1
  9. package/build/lib/web/development/components/Table/TableContext.js.map +1 -1
  10. package/build/lib/web/development/components/Table/TableFooter.web.js +15 -3
  11. package/build/lib/web/development/components/Table/TableFooter.web.js.map +1 -1
  12. package/build/lib/web/development/components/Table/TableHeader.web.js +15 -3
  13. package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
  14. package/build/lib/web/development/components/Table/tokens.js +4 -2
  15. package/build/lib/web/development/components/Table/tokens.js.map +1 -1
  16. package/build/lib/web/production/components/Table/Table.web.js +39 -8
  17. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  18. package/build/lib/web/production/components/Table/TableBody.web.js +82 -14
  19. package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
  20. package/build/lib/web/production/components/Table/TableContext.js +2 -1
  21. package/build/lib/web/production/components/Table/TableContext.js.map +1 -1
  22. package/build/lib/web/production/components/Table/TableFooter.web.js +15 -3
  23. package/build/lib/web/production/components/Table/TableFooter.web.js.map +1 -1
  24. package/build/lib/web/production/components/Table/TableHeader.web.js +15 -3
  25. package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
  26. package/build/lib/web/production/components/Table/tokens.js +4 -2
  27. package/build/lib/web/production/components/Table/tokens.js.map +1 -1
  28. package/build/types/components/index.d.ts +47 -7
  29. package/build/types/components/index.native.d.ts +43 -3
  30. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import React__default from 'react';
2
2
 
3
- var TableContext=React__default.createContext({selectionType:'none',selectedRows:undefined,totalItems:0,toggleRowSelectionById:function toggleRowSelectionById(){},toggleAllRowsSelection:function toggleAllRowsSelection(){},deselectAllRows:function deselectAllRows(){},rowDensity:'normal',toggleSort:function toggleSort(){},currentSortedState:{sortKey:'',isSortReversed:false},setPaginationPage:function setPaginationPage(){},setPaginationRowSize:function setPaginationRowSize(){},disabledRows:[],setDisabledRows:function setDisabledRows(){},paginationType:'client',setPaginationType:function setPaginationType(){},backgroundColor:'surface.background.gray.intense',setHeaderRowDensity:function setHeaderRowDensity(){},showBorderedCells:false,hasHoverActions:false,setHasHoverActions:function setHasHoverActions(){},columnCount:0,gridTemplateColumns:undefined,isVirtualized:false,tableData:[]});var useTableContext=function useTableContext(){var context=React__default.useContext(TableContext);return context;};
3
+ var TableContext=React__default.createContext({selectionType:'none',selectedRows:undefined,totalItems:0,toggleRowSelectionById:function toggleRowSelectionById(){},toggleAllRowsSelection:function toggleAllRowsSelection(){},deselectAllRows:function deselectAllRows(){},rowDensity:'normal',toggleSort:function toggleSort(){},currentSortedState:{sortKey:'',isSortReversed:false},setPaginationPage:function setPaginationPage(){},setPaginationRowSize:function setPaginationRowSize(){},disabledRows:[],setDisabledRows:function setDisabledRows(){},paginationType:'client',setPaginationType:function setPaginationType(){},backgroundColor:'surface.background.gray.intense',setHeaderRowDensity:function setHeaderRowDensity(){},showBorderedCells:false,hasHoverActions:false,setHasHoverActions:function setHasHoverActions(){},columnCount:0,gridTemplateColumns:undefined,isVirtualized:false,tableData:[],isGrouped:false});var useTableContext=function useTableContext(){var context=React__default.useContext(TableContext);return context;};
4
4
 
5
5
  export { TableContext, useTableContext };
6
6
  //# sourceMappingURL=TableContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableContext.js","sources":["../../../../../src/components/Table/TableContext.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nimport React from 'react';\nimport type { TableNode } from '@table-library/react-table-library/table';\nimport type {\n TableBackgroundColors,\n TableProps,\n TablePaginationType,\n TableHeaderRowProps,\n TableNode as LocalTableNode,\n} from './types';\n\nexport type TableContextType<Item> = {\n selectionType?: TableProps<unknown>['selectionType'];\n selectedRows?: TableNode['id'][];\n totalItems: number;\n toggleRowSelectionById: (id: TableNode['id']) => void;\n toggleAllRowsSelection: () => void;\n deselectAllRows: () => void;\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n toggleSort: (sortKey: string) => void;\n currentSortedState: {\n sortKey: string;\n isSortReversed: boolean;\n sortableColumns?: string[];\n };\n setPaginationPage: (page: number) => void;\n setPaginationRowSize: (size: number) => void;\n currentPaginationState?: {\n page: number;\n size: number;\n };\n showStripedRows?: boolean;\n disabledRows: TableNode['id'][];\n setDisabledRows: React.Dispatch<React.SetStateAction<TableNode['id'][]>>;\n paginationType: NonNullable<TablePaginationType>;\n setPaginationType: React.Dispatch<React.SetStateAction<NonNullable<TablePaginationType>>>;\n backgroundColor: TableBackgroundColors | 'transparent';\n headerRowDensity?: TableHeaderRowProps['rowDensity'];\n setHeaderRowDensity: React.Dispatch<React.SetStateAction<TableHeaderRowProps['rowDensity']>>;\n showBorderedCells: NonNullable<TableProps<unknown>['showBorderedCells']>;\n hasHoverActions: boolean;\n setHasHoverActions: (hasHoverActions: boolean) => void;\n columnCount: number;\n gridTemplateColumns: string | undefined;\n isVirtualized?: boolean;\n tableData: LocalTableNode<Item>[];\n};\n\nconst TableContext = React.createContext<TableContextType<unknown>>({\n selectionType: 'none',\n selectedRows: undefined,\n totalItems: 0,\n toggleRowSelectionById: () => {},\n toggleAllRowsSelection: () => {},\n deselectAllRows: () => {},\n rowDensity: 'normal',\n toggleSort: () => {},\n currentSortedState: {\n sortKey: '',\n isSortReversed: false,\n },\n setPaginationPage: () => {},\n setPaginationRowSize: () => {},\n disabledRows: [],\n setDisabledRows: () => {},\n paginationType: 'client',\n setPaginationType: () => {},\n backgroundColor: 'surface.background.gray.intense',\n setHeaderRowDensity: () => {},\n showBorderedCells: false,\n hasHoverActions: false,\n setHasHoverActions: () => {},\n columnCount: 0,\n gridTemplateColumns: undefined,\n isVirtualized: false,\n tableData: [],\n});\n\nconst useTableContext = <Item,>(): TableContextType<Item> => {\n const context = React.useContext(TableContext as React.Context<TableContextType<Item>>);\n return context;\n};\n\nexport { useTableContext, TableContext };\n"],"names":["TableContext","React","createContext","selectionType","selectedRows","undefined","totalItems","toggleRowSelectionById","toggleAllRowsSelection","deselectAllRows","rowDensity","toggleSort","currentSortedState","sortKey","isSortReversed","setPaginationPage","setPaginationRowSize","disabledRows","setDisabledRows","paginationType","setPaginationType","backgroundColor","setHeaderRowDensity","showBorderedCells","hasHoverActions","setHasHoverActions","columnCount","gridTemplateColumns","isVirtualized","tableData","useTableContext","context","useContext"],"mappings":";;AAiDM,IAAAA,YAAY,CAAGC,cAAK,CAACC,aAAa,CAA4B,CAClEC,aAAa,CAAE,MAAM,CACrBC,YAAY,CAAEC,SAAS,CACvBC,UAAU,CAAE,CAAC,CACbC,sBAAsB,CAAE,SAAAA,sBAAA,EAAM,EAAE,CAChCC,sBAAsB,CAAE,SAAAA,wBAAM,EAAE,CAChCC,eAAe,CAAE,SAAAA,eAAAA,EAAM,EAAE,CACzBC,UAAU,CAAE,QAAQ,CACpBC,UAAU,CAAE,SAAAA,UAAAA,EAAM,EAAE,CACpBC,kBAAkB,CAAE,CAClBC,OAAO,CAAE,EAAE,CACXC,cAAc,CAAE,KAClB,CAAC,CACDC,iBAAiB,CAAE,SAAAA,iBAAA,EAAM,EAAE,CAC3BC,oBAAoB,CAAE,SAAAA,sBAAM,EAAE,CAC9BC,YAAY,CAAE,EAAE,CAChBC,eAAe,CAAE,SAAAA,eAAAA,EAAM,EAAE,CACzBC,cAAc,CAAE,QAAQ,CACxBC,iBAAiB,CAAE,SAAAA,iBAAAA,EAAM,EAAE,CAC3BC,eAAe,CAAE,iCAAiC,CAClDC,mBAAmB,CAAE,SAAAA,mBAAAA,EAAM,EAAE,CAC7BC,iBAAiB,CAAE,KAAK,CACxBC,eAAe,CAAE,KAAK,CACtBC,kBAAkB,CAAE,SAAAA,oBAAM,EAAE,CAC5BC,WAAW,CAAE,CAAC,CACdC,mBAAmB,CAAEtB,SAAS,CAC9BuB,aAAa,CAAE,KAAK,CACpBC,SAAS,CAAE,EACb,CAAC,EAEK,IAAAC,eAAe,CAAG,SAAlBA,eAAeA,EAAwC,CAC3D,IAAMC,OAAO,CAAG9B,cAAK,CAAC+B,UAAU,CAAChC,YAAqD,CAAC,CACvF,OAAO+B,OAAO,CAChB;;;;"}
1
+ {"version":3,"file":"TableContext.js","sources":["../../../../../src/components/Table/TableContext.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nimport React from 'react';\nimport type { TableNode } from '@table-library/react-table-library/table';\nimport type {\n TableBackgroundColors,\n TableProps,\n TablePaginationType,\n TableHeaderRowProps,\n TableNode as LocalTableNode,\n} from './types';\n\nexport type TableContextType<Item> = {\n selectionType?: TableProps<unknown>['selectionType'];\n selectedRows?: TableNode['id'][];\n totalItems: number;\n toggleRowSelectionById: (id: TableNode['id']) => void;\n toggleAllRowsSelection: () => void;\n deselectAllRows: () => void;\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n toggleSort: (sortKey: string) => void;\n currentSortedState: {\n sortKey: string;\n isSortReversed: boolean;\n sortableColumns?: string[];\n };\n setPaginationPage: (page: number) => void;\n setPaginationRowSize: (size: number) => void;\n currentPaginationState?: {\n page: number;\n size: number;\n };\n showStripedRows?: boolean;\n disabledRows: TableNode['id'][];\n setDisabledRows: React.Dispatch<React.SetStateAction<TableNode['id'][]>>;\n paginationType: NonNullable<TablePaginationType>;\n setPaginationType: React.Dispatch<React.SetStateAction<NonNullable<TablePaginationType>>>;\n backgroundColor: TableBackgroundColors | 'transparent';\n headerRowDensity?: TableHeaderRowProps['rowDensity'];\n setHeaderRowDensity: React.Dispatch<React.SetStateAction<TableHeaderRowProps['rowDensity']>>;\n showBorderedCells: NonNullable<TableProps<unknown>['showBorderedCells']>;\n hasHoverActions: boolean;\n setHasHoverActions: (hasHoverActions: boolean) => void;\n columnCount: number;\n gridTemplateColumns: string | undefined;\n isVirtualized?: boolean;\n tableData: LocalTableNode<Item>[];\n isGrouped: boolean;\n};\n\nconst TableContext = React.createContext<TableContextType<unknown>>({\n selectionType: 'none',\n selectedRows: undefined,\n totalItems: 0,\n toggleRowSelectionById: () => {},\n toggleAllRowsSelection: () => {},\n deselectAllRows: () => {},\n rowDensity: 'normal',\n toggleSort: () => {},\n currentSortedState: {\n sortKey: '',\n isSortReversed: false,\n },\n setPaginationPage: () => {},\n setPaginationRowSize: () => {},\n disabledRows: [],\n setDisabledRows: () => {},\n paginationType: 'client',\n setPaginationType: () => {},\n backgroundColor: 'surface.background.gray.intense',\n setHeaderRowDensity: () => {},\n showBorderedCells: false,\n hasHoverActions: false,\n setHasHoverActions: () => {},\n columnCount: 0,\n gridTemplateColumns: undefined,\n isVirtualized: false,\n tableData: [],\n isGrouped: false,\n});\n\nconst useTableContext = <Item,>(): TableContextType<Item> => {\n const context = React.useContext(TableContext as React.Context<TableContextType<Item>>);\n return context;\n};\n\nexport { useTableContext, TableContext };\n"],"names":["TableContext","React","createContext","selectionType","selectedRows","undefined","totalItems","toggleRowSelectionById","toggleAllRowsSelection","deselectAllRows","rowDensity","toggleSort","currentSortedState","sortKey","isSortReversed","setPaginationPage","setPaginationRowSize","disabledRows","setDisabledRows","paginationType","setPaginationType","backgroundColor","setHeaderRowDensity","showBorderedCells","hasHoverActions","setHasHoverActions","columnCount","gridTemplateColumns","isVirtualized","tableData","isGrouped","useTableContext","context","useContext"],"mappings":";;AAkDM,IAAAA,YAAY,CAAGC,cAAK,CAACC,aAAa,CAA4B,CAClEC,aAAa,CAAE,MAAM,CACrBC,YAAY,CAAEC,SAAS,CACvBC,UAAU,CAAE,CAAC,CACbC,sBAAsB,CAAE,SAAAA,sBAAA,EAAM,EAAE,CAChCC,sBAAsB,CAAE,SAAAA,wBAAM,EAAE,CAChCC,eAAe,CAAE,SAAAA,eAAA,EAAM,EAAE,CACzBC,UAAU,CAAE,QAAQ,CACpBC,UAAU,CAAE,SAAAA,UAAA,EAAM,EAAE,CACpBC,kBAAkB,CAAE,CAClBC,OAAO,CAAE,EAAE,CACXC,cAAc,CAAE,KAClB,CAAC,CACDC,iBAAiB,CAAE,SAAAA,iBAAAA,EAAM,EAAE,CAC3BC,oBAAoB,CAAE,SAAAA,oBAAA,EAAM,EAAE,CAC9BC,YAAY,CAAE,EAAE,CAChBC,eAAe,CAAE,SAAAA,iBAAM,EAAE,CACzBC,cAAc,CAAE,QAAQ,CACxBC,iBAAiB,CAAE,SAAAA,mBAAM,EAAE,CAC3BC,eAAe,CAAE,iCAAiC,CAClDC,mBAAmB,CAAE,SAAAA,qBAAM,EAAE,CAC7BC,iBAAiB,CAAE,KAAK,CACxBC,eAAe,CAAE,KAAK,CACtBC,kBAAkB,CAAE,SAAAA,kBAAA,EAAM,EAAE,CAC5BC,WAAW,CAAE,CAAC,CACdC,mBAAmB,CAAEtB,SAAS,CAC9BuB,aAAa,CAAE,KAAK,CACpBC,SAAS,CAAE,EAAE,CACbC,SAAS,CAAE,KACb,CAAC,EAEK,IAAAC,eAAe,CAAG,SAAlBA,eAAeA,EAAwC,CAC3D,IAAMC,OAAO,CAAG/B,cAAK,CAACgC,UAAU,CAACjC,YAAqD,CAAC,CACvF,OAAOgC,OAAO,CAChB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'interactive.background.gray.default',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.default',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.faded',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.faded',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tableToolbar = {\n backgroundColor: 'transparent',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tablePagination = {\n padding: 'spacing.4',\n pageSelectionButton: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.highlighted',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n padding: 'spacing.2',\n borderRadius: 'small',\n focusRingColor: 'surface.border.primary.muted',\n textColor: 'surface.text.gray.subtle',\n textColorSelected: 'surface.text.primary.normal',\n height: size['32'],\n width: size['32'],\n },\n defaultPageSize: 10,\n} as const;\n\nconst tableEditableCellRowDensityToInputSizeMap = {\n compact: 'medium',\n normal: 'large',\n comfortable: 'medium',\n} as const;\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nconst classes = {\n HOVER_ACTIONS: 'hover-actions',\n HOVER_ACTIONS_LAYER2: 'hover-actions-layer-2',\n HOVER_ACTIONS_LAYER3: 'hover-actions-layer-3',\n};\n\nexport {\n tableHeader,\n tableFooter,\n tableRow,\n tableToolbar,\n tablePagination,\n refreshWrapperZIndex,\n tableBackgroundColor,\n firstColumnStickyZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n classes,\n};\n"],"names":["tableEditableCellRowDensityToInputSizeMap","compact","normal","comfortable","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHM,IAAAA,yCAAyC,CAAG,CAChDC,OAAO,CAAE,QAAQ,CACjBC,MAAM,CAAE,OAAO,CACfC,WAAW,CAAE,QACf,EAEM,IAAAC,qCAAqC,CAAG,CAC5CC,IAAI,CAAEC,SAAS,CACfC,OAAO,CAAEC,SAAS,CAClBC,KAAK,CAAEC,eACT,EAEM,IAAAC,mCAAmC,CAAG,CAC1CR,WAAW,CAAE,KAAK,CAClBD,MAAM,CAAE,IAAI,CACZD,OAAO,CAAE,IACX;;;;"}
1
+ {"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'interactive.background.gray.default',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.default',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.faded',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.faded',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n groupHeaderBackgroundColor: 'surface.background.gray.moderate',\n} as const;\n\nconst tableToolbar = {\n backgroundColor: 'transparent',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tablePagination = {\n padding: 'spacing.4',\n pageSelectionButton: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.highlighted',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n padding: 'spacing.2',\n borderRadius: 'small',\n focusRingColor: 'surface.border.primary.muted',\n textColor: 'surface.text.gray.subtle',\n textColorSelected: 'surface.text.primary.normal',\n height: size['32'],\n width: size['32'],\n },\n defaultPageSize: 10,\n} as const;\n\nconst tableEditableCellRowDensityToInputSizeMap = {\n compact: 'medium',\n normal: 'large',\n comfortable: 'medium',\n} as const;\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nconst classes = {\n HOVER_ACTIONS: 'hover-actions',\n HOVER_ACTIONS_LAYER2: 'hover-actions-layer-2',\n HOVER_ACTIONS_LAYER3: 'hover-actions-layer-3',\n HAS_ROW_SPANNING: 'has-row-spanning',\n};\n\nexport {\n tableHeader,\n tableFooter,\n tableRow,\n tableToolbar,\n tablePagination,\n refreshWrapperZIndex,\n tableBackgroundColor,\n firstColumnStickyZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n classes,\n};\n"],"names":["tableEditableCellRowDensityToInputSizeMap","compact","normal","comfortable","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0HM,IAAAA,yCAAyC,CAAG,CAChDC,OAAO,CAAE,QAAQ,CACjBC,MAAM,CAAE,OAAO,CACfC,WAAW,CAAE,QACf,EAEM,IAAAC,qCAAqC,CAAG,CAC5CC,IAAI,CAAEC,SAAS,CACfC,OAAO,CAAEC,SAAS,CAClBC,KAAK,CAAEC,eACT,EAEM,IAAAC,mCAAmC,CAAG,CAC1CR,WAAW,CAAE,KAAK,CAClBD,MAAM,CAAE,IAAI,CACZD,OAAO,CAAE,IACX;;;;"}
@@ -7,11 +7,12 @@ import { useTheme as useTheme$1 } from '@table-library/react-table-library/theme
7
7
  import { useSort } from '@table-library/react-table-library/sort';
8
8
  import { usePagination } from '@table-library/react-table-library/pagination';
9
9
  import { SelectTypes, useRowSelect, SelectClickTypes } from '@table-library/react-table-library/select';
10
+ import { useTree } from '@table-library/react-table-library/tree';
10
11
  import styled from 'styled-components';
11
12
  import usePresence from 'use-presence';
12
13
  import { TableContext } from './TableContext.js';
13
14
  import { ComponentIds } from './componentIds.js';
14
- import { tableBackgroundColor, firstColumnStickyZIndex, checkboxCellWidth, tablePagination, refreshWrapperZIndex } from './tokens.js';
15
+ import { tableBackgroundColor, firstColumnStickyZIndex, classes, checkboxCellWidth, tablePagination, refreshWrapperZIndex } from './tokens.js';
15
16
  import './commonStyles/index.js';
16
17
  import '../../utils/index.js';
17
18
  import '../../utils/isValidAllowedChildren/index.js';
@@ -27,6 +28,7 @@ import getIn from '../../utils/lodashButBetter/get.js';
27
28
  import '../../utils/makeAccessible/index.js';
28
29
  import { useIsMobile } from '../../utils/useIsMobile.js';
29
30
  import '../../utils/makeAnalyticsAttribute/index.js';
31
+ import { useIsomorphicLayoutEffect } from '../../utils/useIsomorphicLayoutEffect.js';
30
32
  import { jsx, jsxs } from 'react/jsx-runtime';
31
33
  import { getComponentId, isValidAllowedChildren } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
32
34
  import useTheme from '../BladeProvider/useTheme.js';
@@ -43,7 +45,7 @@ import { Spinner } from '../Spinner/Spinner/Spinner.js';
43
45
  import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
44
46
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
45
47
 
46
- var _excluded = ["children", "data", "multiSelectTrigger", "selectionType", "onSelectionChange", "isHeaderSticky", "isFooterSticky", "isFirstColumnSticky", "rowDensity", "onSortChange", "sortFunctions", "toolbar", "pagination", "height", "showStripedRows", "gridTemplateColumns", "isLoading", "isRefreshing", "showBorderedCells", "defaultSelectedIds", "backgroundColor"];
48
+ var _excluded = ["children", "data", "multiSelectTrigger", "selectionType", "onSelectionChange", "isHeaderSticky", "isFooterSticky", "isFirstColumnSticky", "rowDensity", "onSortChange", "sortFunctions", "toolbar", "pagination", "height", "showStripedRows", "gridTemplateColumns", "isLoading", "isRefreshing", "showBorderedCells", "defaultSelectedIds", "backgroundColor", "isGrouped"];
47
49
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
48
50
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
49
51
  var rowSelectType = {
@@ -149,6 +151,8 @@ var _Table = function _Table(_ref3) {
149
151
  defaultSelectedIds = _ref3$defaultSelected === void 0 ? [] : _ref3$defaultSelected,
150
152
  _ref3$backgroundColor = _ref3.backgroundColor,
151
153
  backgroundColor = _ref3$backgroundColor === void 0 ? tableBackgroundColor : _ref3$backgroundColor,
154
+ _ref3$isGrouped = _ref3.isGrouped,
155
+ isGrouped = _ref3$isGrouped === void 0 ? false : _ref3$isGrouped,
152
156
  rest = _objectWithoutProperties(_ref3, _excluded);
153
157
  var _useTheme2 = useTheme(),
154
158
  theme = _useTheme2.theme;
@@ -192,9 +196,9 @@ var _Table = function _Table(_ref3) {
192
196
 
193
197
  // Table Theme
194
198
  var columnCount = getTableHeaderCellCount(children);
195
- var firstColumnStickyHeaderCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyZIndex, " !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyZIndex, " !important;\n }\n ")) : '';
196
- var firstColumnStickyFooterCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyZIndex, " !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyZIndex, " !important;\n }\n ")) : '';
197
- var firstColumnStickyBodyCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyZIndex, " !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyZIndex, " !important;\n }\n ")) : '';
199
+ var firstColumnStickyHeaderCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyZIndex, " !important;\n }\n /* Higher z-index for sticky first column cells that also span rows to prevent stacking issues */\n &:nth-of-type(1).").concat(classes.HAS_ROW_SPANNING, " {\n z-index: 3 !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyZIndex, " !important;\n }\n ")) : '';
200
+ var firstColumnStickyFooterCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyZIndex, " !important;\n }\n /* Higher z-index for sticky first column cells that also span rows to prevent stacking issues */\n &:nth-of-type(1).").concat(classes.HAS_ROW_SPANNING, " {\n z-index: 3 !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyZIndex, " !important;\n }\n ")) : '';
201
+ var firstColumnStickyBodyCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyZIndex, " !important;\n }\n /* Higher z-index for sticky first column cells that also span rows to prevent stacking issues */\n &:nth-of-type(1).").concat(classes.HAS_ROW_SPANNING, " {\n z-index: 3 !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyZIndex, " !important;\n }\n ")) : '';
198
202
  var tableTheme = useTheme$1({
199
203
  Table: "\n height:".concat(isFooterSticky ? "100%" : undefined, ";\n border: ").concat(makeBorderSize(theme.border.width.thin), " solid ").concat(theme.colors.surface.border.gray.muted, ";\n --data-table-library_grid-template-columns: ").concat(gridTemplateColumns ? "".concat(gridTemplateColumns, " ").concat(hasHoverActions ? lastHoverActionsColWidth : '') : " ".concat(selectionType === 'multiple' ? 'min-content' : '', " repeat(").concat(columnCount, ",minmax(100px, 1fr)) ").concat(hasHoverActions ? lastHoverActionsColWidth : '', " !important;"), " !important;\n background-color: ").concat(getIn(theme.colors, backgroundColor), ";\n "),
200
204
  HeaderCell: "\n position: ".concat(shouldHeaderBeSticky ? 'sticky' : 'relative', ";\n \n top: ").concat(shouldHeaderBeSticky ? '0' : undefined, ";\n ").concat(firstColumnStickyHeaderCellCSS, "\n "),
@@ -231,7 +235,15 @@ var _Table = function _Table(_ref3) {
231
235
  });
232
236
  var toggleRowSelectionById = useMemo(function () {
233
237
  return function (id) {
234
- rowSelectConfig.fns.onToggleById(id);
238
+ // Use recursive selection only for grouped tables with multiple selection
239
+ if (selectionType === 'multiple' && isGrouped) {
240
+ rowSelectConfig.fns.onToggleByIdRecursively(id, {
241
+ // When clicking partially selected parent, select all children
242
+ isPartialToAll: true
243
+ });
244
+ } else {
245
+ rowSelectConfig.fns.onToggleById(id);
246
+ }
235
247
  };
236
248
  }, [rowSelectConfig.fns]);
237
249
  var deselectAllRows = useMemo(function () {
@@ -243,6 +255,8 @@ var _Table = function _Table(_ref3) {
243
255
  return function () {
244
256
  if (selectedRows.length > 0) {
245
257
  rowSelectConfig.fns.onRemoveAll();
258
+ } else if (isGrouped) {
259
+ rowSelectConfig.fns.onToggleAll({});
246
260
  } else {
247
261
  var ids = data.nodes.map(function (item) {
248
262
  return disabledRows.includes(item.id) ? null : item.id;
@@ -251,6 +265,21 @@ var _Table = function _Table(_ref3) {
251
265
  }
252
266
  };
253
267
  }, [rowSelectConfig.fns, data.nodes, selectedRows, disabledRows]);
268
+ var tree = useTree(isGrouped ? data : {
269
+ nodes: []
270
+ }, {}, {
271
+ // Disable row click expand/collapse (fallback enables unwanted expand/collapse on row click)
272
+ clickType: undefined,
273
+ // Disable all indentation for flat appearance
274
+ treeYLevel: undefined
275
+ });
276
+ useIsomorphicLayoutEffect(function () {
277
+ if (isGrouped && tree !== null && tree !== void 0 && tree.fns.onToggleAll) {
278
+ tree.fns.onToggleAll({
279
+ ids: []
280
+ });
281
+ }
282
+ }, []);
254
283
 
255
284
  // Sort Logic
256
285
  var handleSortChange = function handleSortChange(_, state) {
@@ -341,9 +370,10 @@ var _Table = function _Table(_ref3) {
341
370
  columnCount: columnCount,
342
371
  gridTemplateColumns: gridTemplateColumns,
343
372
  isVirtualized: isVirtualized,
344
- tableData: data.nodes
373
+ tableData: data.nodes,
374
+ isGrouped: isGrouped
345
375
  };
346
- }, [selectionType, selectedRows, totalItems, toggleRowSelectionById, toggleAllRowsSelection, deselectAllRows, gridTemplateColumns, rowDensity, toggleSort, columnCount, currentSortedState, setPaginationPage, setPaginationRowSize, currentPaginationState, showStripedRows, disabledRows, setDisabledRows, paginationType, setPaginationType, backgroundColor, headerRowDensity, setHeaderRowDensity, showBorderedCells, hasHoverActions, setHasHoverActions, isVirtualized, data]);
376
+ }, [selectionType, selectedRows, totalItems, toggleRowSelectionById, toggleAllRowsSelection, deselectAllRows, gridTemplateColumns, rowDensity, toggleSort, columnCount, currentSortedState, setPaginationPage, setPaginationRowSize, currentPaginationState, showStripedRows, disabledRows, setDisabledRows, paginationType, setPaginationType, backgroundColor, headerRowDensity, setHeaderRowDensity, showBorderedCells, hasHoverActions, setHasHoverActions, isVirtualized, data, isGrouped]);
347
377
  return /*#__PURE__*/jsx(TableContext.Provider, {
348
378
  value: tableContext,
349
379
  children: isLoading ? /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
@@ -401,6 +431,7 @@ var _Table = function _Table(_ref3) {
401
431
  theme: tableTheme,
402
432
  select: selectionType !== 'none' ? rowSelectConfig : null,
403
433
  sort: sortFunctions ? sort : null,
434
+ tree: isGrouped ? tree : null,
404
435
  $styledProps: {
405
436
  height: height,
406
437
  width: isVirtualized ? "100%" : undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"Table.web.js","sources":["../../../../../../src/components/Table/Table.web.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo } from 'react';\nimport { Table as ReactTable } from '@table-library/react-table-library/table';\nimport { useTheme as useTableTheme } from '@table-library/react-table-library/theme';\nimport type { MiddlewareFunction } from '@table-library/react-table-library/types/common';\nimport { useSort } from '@table-library/react-table-library/sort';\nimport { usePagination } from '@table-library/react-table-library/pagination';\nimport {\n SelectClickTypes,\n SelectTypes,\n useRowSelect,\n} from '@table-library/react-table-library/select';\nimport styled from 'styled-components';\nimport usePresence from 'use-presence';\nimport type { TableContextType } from './TableContext';\nimport { TableContext } from './TableContext';\nimport { ComponentIds } from './componentIds';\nimport {\n checkboxCellWidth,\n firstColumnStickyZIndex,\n refreshWrapperZIndex,\n tableBackgroundColor,\n tablePagination,\n} from './tokens';\nimport type {\n TableProps,\n TableNode,\n Identifier,\n TablePaginationType,\n TableHeaderRowProps,\n} from './types';\nimport { getTableBodyStyles } from './commonStyles';\nimport { makeBorderSize, makeMotionTime } from '~utils';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\nimport type { BoxProps } from '~components/Box';\nimport { getBaseBoxStyles } from '~components/Box/BaseBox/baseBoxStyles';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useTheme } from '~components/BladeProvider';\nimport getIn from '~utils/lodashButBetter/get';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst rowSelectType: Record<\n NonNullable<TableProps<unknown>['selectionType']>,\n SelectTypes | undefined\n> = {\n single: SelectTypes.SingleSelect,\n multiple: SelectTypes.MultiSelect,\n none: undefined,\n};\n\n// Get the number of TableHeaderCell components.\n// This is very complicated but the only way to iterate through the structure and get number of header cells.\n// Assuming number of header cells is the same as number of columns\nconst getTableHeaderCellCount = (children: (data: []) => React.ReactElement): number => {\n const tableRootComponent = children([]);\n if (tableRootComponent && React.isValidElement(tableRootComponent)) {\n const tableComponentArray = React.Children.toArray(tableRootComponent);\n if (React.isValidElement(tableComponentArray[0])) {\n const tableComponentArrayChildren = React.Children.toArray(\n tableComponentArray[0].props.children,\n );\n const tableHeader = tableComponentArrayChildren.find(\n (child) => getComponentId(child) === ComponentIds.TableHeader,\n );\n const tableHeaderChildrenArray = React.isValidElement(tableHeader)\n ? React.Children.toArray(tableHeader.props.children)\n : null;\n const tableHeaderRow = tableHeaderChildrenArray?.find(\n (child) => getComponentId(child) === ComponentIds.TableHeaderRow,\n );\n const tableHeaderRowChildrenArray = React.isValidElement(tableHeaderRow)\n ? React.Children.toArray(tableHeaderRow.props.children)\n : null;\n const tableHeaderCells = tableHeaderRowChildrenArray\n ? tableHeaderRowChildrenArray.filter(\n (child) => getComponentId(child) === ComponentIds.TableHeaderCell,\n )\n : null;\n return tableHeaderCells?.length ?? 0;\n }\n }\n return 0;\n};\n\nconst StyledReactTable = styled(ReactTable)<{\n $styledProps?: {\n height?: BoxProps['height'];\n width?: BoxProps['width'];\n isVirtualized?: boolean;\n isSelectable?: boolean;\n showStripedRows?: boolean;\n };\n}>(({ $styledProps }) => {\n const { theme } = useTheme();\n const styledPropsCSSObject = getBaseBoxStyles({\n theme,\n height: $styledProps?.height,\n ...($styledProps?.isVirtualized && {\n width: '100%',\n }),\n });\n const $isSelectable = $styledProps?.isSelectable;\n const $showStripedRows = $styledProps?.showStripedRows;\n return {\n '&&&': {\n ...styledPropsCSSObject,\n overflow: `${$styledProps?.isVirtualized ? 'unset' : 'auto'} !important`,\n },\n ...($styledProps?.isVirtualized\n ? getTableBodyStyles({\n isVirtualized: $styledProps?.isVirtualized,\n theme,\n height: $styledProps?.height,\n width: '100%',\n isSelectable: $isSelectable,\n showStripedRows: $showStripedRows,\n })\n : null),\n };\n});\n\nconst RefreshWrapper = styled(BaseBox)<{\n isRefreshSpinnerVisible: boolean;\n isRefreshSpinnerEntering: boolean;\n isRefreshSpinnerExiting: boolean;\n}>(({ isRefreshSpinnerVisible, isRefreshSpinnerEntering, isRefreshSpinnerExiting, theme }) => {\n return {\n opacity: isRefreshSpinnerVisible ? 1 : 0,\n transition: `opacity ${makeMotionTime(theme.motion.duration.quick)} ${\n isRefreshSpinnerEntering\n ? theme.motion.easing.entrance\n : isRefreshSpinnerExiting\n ? theme.motion.easing.exit\n : ''\n }`,\n };\n});\n\nconst _Table = <Item,>({\n children,\n data,\n multiSelectTrigger = 'row',\n selectionType = 'none',\n onSelectionChange,\n isHeaderSticky,\n isFooterSticky,\n isFirstColumnSticky,\n rowDensity = 'normal',\n onSortChange,\n sortFunctions,\n toolbar,\n pagination,\n height,\n showStripedRows,\n gridTemplateColumns,\n isLoading = false,\n isRefreshing = false,\n showBorderedCells = false,\n defaultSelectedIds = [],\n backgroundColor = tableBackgroundColor,\n ...rest\n}: TableProps<Item>): React.ReactElement => {\n const { theme } = useTheme();\n const [selectedRows, setSelectedRows] = React.useState<TableNode<unknown>['id'][]>(\n selectionType !== 'none' ? defaultSelectedIds : [],\n );\n const [disabledRows, setDisabledRows] = React.useState<TableNode<unknown>['id'][]>([]);\n const [totalItems, setTotalItems] = React.useState(data.nodes.length || 0);\n const [paginationType, setPaginationType] = React.useState<NonNullable<TablePaginationType>>(\n 'client',\n );\n const [headerRowDensity, setHeaderRowDensity] = React.useState<TableHeaderRowProps['rowDensity']>(\n undefined,\n );\n const [hasHoverActions, setHasHoverActions] = React.useState(false);\n const tableRootComponent = children([]);\n const isVirtualized = getComponentId(tableRootComponent) === ComponentIds.VirtualizedTable;\n // Need to make header is sticky if first column is sticky otherwise the first header cell will not be sticky\n const shouldHeaderBeSticky = isVirtualized || isHeaderSticky || isFirstColumnSticky;\n\n const isMobile = useIsMobile();\n const lastHoverActionsColWidth = isMobile ? '1fr' : '0px';\n\n const {\n isEntering: isRefreshSpinnerEntering,\n isMounted: isRefreshSpinnerMounted,\n isExiting: isRefreshSpinnerExiting,\n isVisible: isRefreshSpinnerVisible,\n } = usePresence(isRefreshing, {\n transitionDuration: theme.motion.duration.quick,\n });\n\n // Table Theme\n const columnCount = getTableHeaderCellCount(children);\n const firstColumnStickyHeaderCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyFooterCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyBodyCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n\n const tableTheme = useTableTheme({\n Table: `\n height:${isFooterSticky ? `100%` : undefined};\n border: ${makeBorderSize(theme.border.width.thin)} solid ${\n theme.colors.surface.border.gray.muted\n };\n --data-table-library_grid-template-columns: ${\n gridTemplateColumns\n ? `${gridTemplateColumns} ${hasHoverActions ? lastHoverActionsColWidth : ''}`\n : ` ${\n selectionType === 'multiple' ? 'min-content' : ''\n } repeat(${columnCount},minmax(100px, 1fr)) ${\n hasHoverActions ? lastHoverActionsColWidth : ''\n } !important;`\n } !important;\n background-color: ${getIn(theme.colors, backgroundColor)};\n `,\n HeaderCell: `\n position: ${shouldHeaderBeSticky ? 'sticky' : 'relative'};\n \n top: ${shouldHeaderBeSticky ? '0' : undefined};\n ${firstColumnStickyHeaderCellCSS}\n `,\n Cell: `\n ${firstColumnStickyBodyCellCSS}\n `,\n FooterCell: `\n position: ${isFooterSticky ? 'sticky' : 'relative'};\n bottom: ${isFooterSticky ? '0' : undefined};\n ${firstColumnStickyFooterCellCSS}\n `,\n });\n\n useEffect(() => {\n // Get the total number of items\n setTotalItems(data.nodes.length);\n }, [data.nodes]);\n\n // Selection Logic\n const onSelectChange: MiddlewareFunction = (_, state): void => {\n const selectedIds: Identifier[] = state.id ? [state.id] : state.ids ?? [];\n setSelectedRows(selectedIds);\n onSelectionChange?.({\n selectedIds,\n values: data.nodes.filter((node) => selectedIds.includes(node.id)),\n });\n };\n\n const rowSelectConfig = useRowSelect(\n data,\n {\n onChange: onSelectChange,\n state: {\n ...(selectionType === 'multiple'\n ? { ids: selectedRows }\n : selectionType === 'single'\n ? { id: selectedRows[0] }\n : {}),\n },\n },\n {\n clickType:\n multiSelectTrigger === 'row' ? SelectClickTypes.RowClick : SelectClickTypes.ButtonClick,\n rowSelect: selectionType !== 'none' ? rowSelectType[selectionType] : undefined,\n },\n );\n\n const toggleRowSelectionById = useMemo(\n () => (id: Identifier): void => {\n rowSelectConfig.fns.onToggleById(id);\n },\n [rowSelectConfig.fns],\n );\n\n const deselectAllRows = useMemo(\n () => (): void => {\n rowSelectConfig.fns.onRemoveAll();\n },\n [rowSelectConfig.fns],\n );\n\n const toggleAllRowsSelection = useMemo(\n () => (): void => {\n if (selectedRows.length > 0) {\n rowSelectConfig.fns.onRemoveAll();\n } else {\n const ids = data.nodes\n .map((item: TableNode<Item>) => (disabledRows.includes(item.id) ? null : item.id))\n .filter(Boolean) as Identifier[];\n\n rowSelectConfig.fns.onAddAll(ids);\n }\n },\n [rowSelectConfig.fns, data.nodes, selectedRows, disabledRows],\n );\n\n // Sort Logic\n const handleSortChange: MiddlewareFunction = (_, state) => {\n onSortChange?.({\n sortKey: state.sortKey,\n isSortReversed: state.reverse,\n });\n };\n\n const sort = useSort(\n data,\n {\n onChange: handleSortChange,\n },\n {\n // @ts-expect-error ignore this, if sortFunctions is undefined, it will be ignored\n sortFns: sortFunctions,\n },\n );\n\n const currentSortedState: TableContextType<Item>['currentSortedState'] = useMemo(() => {\n return {\n sortKey: sort.state.sortKey,\n isSortReversed: sort.state.reverse,\n sortableColumns: Object.keys(sortFunctions ?? {}),\n };\n }, [sort.state, sortFunctions]);\n\n const toggleSort = useCallback(\n (sortKey: string): void => {\n sort.fns.onToggleSort({\n sortKey,\n });\n },\n [sort.fns],\n );\n\n // Pagination\n\n const hasPagination = Boolean(pagination);\n\n const paginationConfig = usePagination(\n data,\n {\n state: {\n page: 0,\n size: tablePagination.defaultPageSize,\n },\n },\n {\n isServer: paginationType === 'server',\n },\n );\n\n const currentPaginationState = useMemo(() => {\n return hasPagination\n ? {\n page: paginationConfig.state.page,\n size: paginationConfig.state.size,\n }\n : undefined;\n }, [paginationConfig.state, hasPagination]);\n\n const setPaginationPage = useCallback(\n (page: number): void => {\n paginationConfig.fns.onSetPage(page);\n },\n [paginationConfig.fns],\n );\n\n const setPaginationRowSize = useCallback(\n (size: number): void => {\n paginationConfig.fns.onSetSize(size);\n },\n [paginationConfig.fns],\n );\n\n // Toolbar Component\n if (__DEV__) {\n if (toolbar && !isValidAllowedChildren(toolbar, ComponentIds.TableToolbar)) {\n throwBladeError({\n message: 'Only TableToolbar component is allowed in the `toolbar` prop',\n moduleName: 'Table',\n });\n }\n }\n\n // Table Context\n const tableContext: TableContextType<Item> = useMemo(\n () => ({\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n rowDensity,\n toggleSort,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n hasHoverActions,\n setHasHoverActions,\n columnCount,\n gridTemplateColumns,\n isVirtualized,\n tableData: data.nodes,\n }),\n [\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n gridTemplateColumns,\n rowDensity,\n toggleSort,\n columnCount,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n hasHoverActions,\n setHasHoverActions,\n isVirtualized,\n data,\n ],\n );\n\n return (\n <TableContext.Provider value={tableContext}>\n {isLoading ? (\n <BaseBox\n display=\"flex\"\n flex={1}\n alignItems=\"center\"\n justifyContent=\"center\"\n height={height}\n {...getStyledProps(rest)}\n {...metaAttribute({ name: MetaConstants.Table })}\n {...makeAnalyticsAttribute(rest)}\n >\n <Spinner accessibilityLabel=\"Loading Table\" size=\"large\" testID=\"table-spinner\" />\n </BaseBox>\n ) : (\n <BaseBox\n // ref={ref as never}\n flex={1}\n position=\"relative\"\n {...getStyledProps(rest)}\n {...metaAttribute({ name: MetaConstants.Table })}\n width={isVirtualized ? `100%` : undefined}\n {...makeAnalyticsAttribute(rest)}\n >\n {isRefreshSpinnerMounted && (\n <RefreshWrapper\n position=\"absolute\"\n width=\"100%\"\n height=\"100%\"\n zIndex={refreshWrapperZIndex}\n backgroundColor=\"overlay.background.subtle\"\n justifyContent=\"center\"\n alignItems=\"center\"\n display=\"flex\"\n isRefreshSpinnerEntering={isRefreshSpinnerEntering}\n isRefreshSpinnerExiting={isRefreshSpinnerExiting}\n isRefreshSpinnerVisible={isRefreshSpinnerVisible}\n >\n <Spinner color=\"white\" accessibilityLabel=\"Refreshing Table\" size=\"large\" />\n </RefreshWrapper>\n )}\n {/* wrapping toolbar in BaseBox and passing the same analytics attributes as of table because in analytics POV, events triggered are from table */}\n <BaseBox {...makeAnalyticsAttribute(rest)}>{toolbar}</BaseBox>\n <StyledReactTable\n role=\"table\"\n layout={{ fixedHeader: shouldHeaderBeSticky, horizontalScroll: true }}\n data={data}\n // @ts-expect-error ignore this, theme clashes with styled-component's theme. We're using useTheme from blade to get actual theme\n theme={tableTheme}\n select={selectionType !== 'none' ? rowSelectConfig : null}\n sort={sortFunctions ? sort : null}\n $styledProps={{\n height,\n width: isVirtualized ? `100%` : undefined,\n isVirtualized,\n isSelectable: selectionType !== 'none',\n showStripedRows,\n }}\n pagination={hasPagination ? paginationConfig : null}\n {...makeAccessible({ multiSelectable: selectionType === 'multiple' })}\n {...metaAttribute({ name: MetaConstants.Table })}\n {...makeAnalyticsAttribute(rest)}\n >\n {children}\n </StyledReactTable>\n {pagination}\n </BaseBox>\n )}\n </TableContext.Provider>\n );\n};\nconst Table = assignWithoutSideEffects(_Table, {\n componentId: ComponentIds.Table,\n});\n\nexport { Table };\n"],"names":["rowSelectType","single","SelectTypes","SingleSelect","multiple","MultiSelect","none","undefined","getTableHeaderCellCount","children","tableRootComponent","React","isValidElement","tableComponentArray","Children","toArray","_tableHeaderCells$len","tableComponentArrayChildren","props","tableHeader","find","child","getComponentId","ComponentIds","TableHeader","tableHeaderChildrenArray","tableHeaderRow","TableHeaderRow","tableHeaderRowChildrenArray","tableHeaderCells","filter","TableHeaderCell","length","StyledReactTable","styled","ReactTable","withConfig","displayName","componentId","_ref","$styledProps","_useTheme","useTheme","theme","styledPropsCSSObject","getBaseBoxStyles","_objectSpread","height","isVirtualized","width","$isSelectable","isSelectable","$showStripedRows","showStripedRows","overflow","concat","getTableBodyStyles","RefreshWrapper","BaseBox","_ref2","isRefreshSpinnerVisible","isRefreshSpinnerEntering","isRefreshSpinnerExiting","opacity","transition","makeMotionTime","motion","duration","quick","easing","entrance","exit","_Table","_ref3","data","_ref3$multiSelectTrig","multiSelectTrigger","_ref3$selectionType","selectionType","onSelectionChange","isHeaderSticky","isFooterSticky","isFirstColumnSticky","_ref3$rowDensity","rowDensity","onSortChange","sortFunctions","toolbar","pagination","gridTemplateColumns","_ref3$isLoading","isLoading","_ref3$isRefreshing","isRefreshing","_ref3$showBorderedCel","showBorderedCells","_ref3$defaultSelected","defaultSelectedIds","_ref3$backgroundColor","backgroundColor","tableBackgroundColor","rest","_objectWithoutProperties","_excluded","_useTheme2","_React$useState","useState","_React$useState2","_slicedToArray","selectedRows","setSelectedRows","_React$useState3","_React$useState4","disabledRows","setDisabledRows","_React$useState5","nodes","_React$useState6","totalItems","setTotalItems","_React$useState7","_React$useState8","paginationType","setPaginationType","_React$useState9","_React$useState10","headerRowDensity","setHeaderRowDensity","_React$useState11","_React$useState12","hasHoverActions","setHasHoverActions","VirtualizedTable","shouldHeaderBeSticky","isMobile","useIsMobile","lastHoverActionsColWidth","_usePresence","usePresence","transitionDuration","isEntering","isRefreshSpinnerMounted","isMounted","isExiting","isVisible","columnCount","firstColumnStickyHeaderCellCSS","firstColumnStickyZIndex","checkboxCellWidth","firstColumnStickyFooterCellCSS","firstColumnStickyBodyCellCSS","tableTheme","useTableTheme","Table","makeBorderSize","border","thin","colors","surface","gray","muted","getIn","HeaderCell","Cell","FooterCell","useEffect","onSelectChange","_","state","_state$ids","selectedIds","id","ids","values","node","includes","rowSelectConfig","useRowSelect","onChange","clickType","SelectClickTypes","RowClick","ButtonClick","rowSelect","toggleRowSelectionById","useMemo","fns","onToggleById","deselectAllRows","onRemoveAll","toggleAllRowsSelection","map","item","Boolean","onAddAll","handleSortChange","sortKey","isSortReversed","reverse","sort","useSort","sortFns","currentSortedState","sortableColumns","Object","keys","toggleSort","useCallback","onToggleSort","hasPagination","paginationConfig","usePagination","page","size","tablePagination","defaultPageSize","isServer","currentPaginationState","setPaginationPage","onSetPage","setPaginationRowSize","onSetSize","isValidAllowedChildren","TableToolbar","throwBladeError","message","moduleName","tableContext","tableData","_jsx","TableContext","Provider","value","display","flex","alignItems","justifyContent","getStyledProps","metaAttribute","name","MetaConstants","makeAnalyticsAttribute","Spinner","accessibilityLabel","testID","_jsxs","position","zIndex","refreshWrapperZIndex","color","role","layout","fixedHeader","horizontalScroll","select","makeAccessible","multiSelectable","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAEwH,UAAAA,gBAAgB,EAAE,IAAA;SAAO;AACtEnL,QAAAA,IAAI,EAAEA,IAAAA;AACN;AAAA;AACA/B,QAAAA,KAAK,EAAE4G,UAAW;AAClBuG,QAAAA,MAAM,EAAEhL,aAAa,KAAK,MAAM,GAAGkG,eAAe,GAAG,IAAK;AAC1DuB,QAAAA,IAAI,EAAEjH,aAAa,GAAGiH,IAAI,GAAG,IAAK;AAClC/J,QAAAA,YAAY,EAAE;AACZO,UAAAA,MAAM,EAANA,MAAM;UACNE,KAAK,EAAED,aAAa,GAAA,MAAA,GAAYzC,SAAS;AACzCyC,UAAAA,aAAa,EAAbA,aAAa;UACbG,YAAY,EAAE2B,aAAa,KAAK,MAAM;AACtCzB,UAAAA,eAAe,EAAfA,eAAAA;SACA;AACFmC,QAAAA,UAAU,EAAEyH,aAAa,GAAGC,gBAAgB,GAAG,IAAA;AAAK,OAAA,EAChD6C,cAAc,CAAC;QAAEC,eAAe,EAAElL,aAAa,KAAK,UAAA;OAAY,CAAC,CACjEgK,EAAAA,aAAa,CAAC;QAAEC,IAAI,EAAEC,aAAa,CAACvF,KAAAA;AAAM,OAAC,CAAC,CAAA,EAC5CwF,sBAAsB,CAAC5I,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAAA5F,QAAAA,QAAA,EAE/BA,QAAAA;OACe,CAAA,CAAC,EAClB+E,UAAU,CAAA;KACJ,CAAA,CAAA;AACV,GACoB,CAAC,CAAA;AAE5B,CAAC,CAAA;AACD,IAAMiE,KAAK,gBAAGwG,wBAAwB,CAACzL,MAAM,EAAE;EAC7ClC,WAAW,EAAEf,YAAY,CAACkI,KAAAA;AAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"Table.web.js","sources":["../../../../../../src/components/Table/Table.web.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo } from 'react';\nimport { Table as ReactTable } from '@table-library/react-table-library/table';\nimport { useTheme as useTableTheme } from '@table-library/react-table-library/theme';\nimport type { MiddlewareFunction } from '@table-library/react-table-library/types/common';\nimport { useSort } from '@table-library/react-table-library/sort';\nimport { usePagination } from '@table-library/react-table-library/pagination';\nimport {\n SelectClickTypes,\n SelectTypes,\n useRowSelect,\n} from '@table-library/react-table-library/select';\nimport { useTree } from '@table-library/react-table-library/tree';\nimport styled from 'styled-components';\nimport usePresence from 'use-presence';\nimport type { TableContextType } from './TableContext';\nimport { TableContext } from './TableContext';\nimport { ComponentIds } from './componentIds';\nimport {\n checkboxCellWidth,\n firstColumnStickyZIndex,\n refreshWrapperZIndex,\n tableBackgroundColor,\n tablePagination,\n classes,\n} from './tokens';\nimport type {\n TableProps,\n TableNode,\n Identifier,\n TablePaginationType,\n TableHeaderRowProps,\n} from './types';\nimport { getTableBodyStyles } from './commonStyles';\nimport { makeBorderSize, makeMotionTime } from '~utils';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\nimport type { BoxProps } from '~components/Box';\nimport { getBaseBoxStyles } from '~components/Box/BaseBox/baseBoxStyles';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useTheme } from '~components/BladeProvider';\nimport getIn from '~utils/lodashButBetter/get';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\n\nconst rowSelectType: Record<\n NonNullable<TableProps<unknown>['selectionType']>,\n SelectTypes | undefined\n> = {\n single: SelectTypes.SingleSelect,\n multiple: SelectTypes.MultiSelect,\n none: undefined,\n};\n\n// Get the number of TableHeaderCell components.\n// This is very complicated but the only way to iterate through the structure and get number of header cells.\n// Assuming number of header cells is the same as number of columns\nconst getTableHeaderCellCount = (children: (data: []) => React.ReactElement): number => {\n const tableRootComponent = children([]);\n if (tableRootComponent && React.isValidElement(tableRootComponent)) {\n const tableComponentArray = React.Children.toArray(tableRootComponent);\n if (React.isValidElement(tableComponentArray[0])) {\n const tableComponentArrayChildren = React.Children.toArray(\n tableComponentArray[0].props.children,\n );\n const tableHeader = tableComponentArrayChildren.find(\n (child) => getComponentId(child) === ComponentIds.TableHeader,\n );\n const tableHeaderChildrenArray = React.isValidElement(tableHeader)\n ? React.Children.toArray(tableHeader.props.children)\n : null;\n const tableHeaderRow = tableHeaderChildrenArray?.find(\n (child) => getComponentId(child) === ComponentIds.TableHeaderRow,\n );\n const tableHeaderRowChildrenArray = React.isValidElement(tableHeaderRow)\n ? React.Children.toArray(tableHeaderRow.props.children)\n : null;\n const tableHeaderCells = tableHeaderRowChildrenArray\n ? tableHeaderRowChildrenArray.filter(\n (child) => getComponentId(child) === ComponentIds.TableHeaderCell,\n )\n : null;\n return tableHeaderCells?.length ?? 0;\n }\n }\n return 0;\n};\n\nconst StyledReactTable = styled(ReactTable)<{\n $styledProps?: {\n height?: BoxProps['height'];\n width?: BoxProps['width'];\n isVirtualized?: boolean;\n isSelectable?: boolean;\n showStripedRows?: boolean;\n };\n}>(({ $styledProps }) => {\n const { theme } = useTheme();\n const styledPropsCSSObject = getBaseBoxStyles({\n theme,\n height: $styledProps?.height,\n ...($styledProps?.isVirtualized && {\n width: '100%',\n }),\n });\n const $isSelectable = $styledProps?.isSelectable;\n const $showStripedRows = $styledProps?.showStripedRows;\n return {\n '&&&': {\n ...styledPropsCSSObject,\n overflow: `${$styledProps?.isVirtualized ? 'unset' : 'auto'} !important`,\n },\n ...($styledProps?.isVirtualized\n ? getTableBodyStyles({\n isVirtualized: $styledProps?.isVirtualized,\n theme,\n height: $styledProps?.height,\n width: '100%',\n isSelectable: $isSelectable,\n showStripedRows: $showStripedRows,\n })\n : null),\n };\n});\n\nconst RefreshWrapper = styled(BaseBox)<{\n isRefreshSpinnerVisible: boolean;\n isRefreshSpinnerEntering: boolean;\n isRefreshSpinnerExiting: boolean;\n}>(({ isRefreshSpinnerVisible, isRefreshSpinnerEntering, isRefreshSpinnerExiting, theme }) => {\n return {\n opacity: isRefreshSpinnerVisible ? 1 : 0,\n transition: `opacity ${makeMotionTime(theme.motion.duration.quick)} ${\n isRefreshSpinnerEntering\n ? theme.motion.easing.entrance\n : isRefreshSpinnerExiting\n ? theme.motion.easing.exit\n : ''\n }`,\n };\n});\n\nconst _Table = <Item,>({\n children,\n data,\n multiSelectTrigger = 'row',\n selectionType = 'none',\n onSelectionChange,\n isHeaderSticky,\n isFooterSticky,\n isFirstColumnSticky,\n rowDensity = 'normal',\n onSortChange,\n sortFunctions,\n toolbar,\n pagination,\n height,\n showStripedRows,\n gridTemplateColumns,\n isLoading = false,\n isRefreshing = false,\n showBorderedCells = false,\n defaultSelectedIds = [],\n backgroundColor = tableBackgroundColor,\n isGrouped = false,\n ...rest\n}: TableProps<Item>): React.ReactElement => {\n const { theme } = useTheme();\n const [selectedRows, setSelectedRows] = React.useState<TableNode<unknown>['id'][]>(\n selectionType !== 'none' ? defaultSelectedIds : [],\n );\n const [disabledRows, setDisabledRows] = React.useState<TableNode<unknown>['id'][]>([]);\n const [totalItems, setTotalItems] = React.useState(data.nodes.length || 0);\n const [paginationType, setPaginationType] = React.useState<NonNullable<TablePaginationType>>(\n 'client',\n );\n const [headerRowDensity, setHeaderRowDensity] = React.useState<TableHeaderRowProps['rowDensity']>(\n undefined,\n );\n const [hasHoverActions, setHasHoverActions] = React.useState(false);\n const tableRootComponent = children([]);\n const isVirtualized = getComponentId(tableRootComponent) === ComponentIds.VirtualizedTable;\n // Need to make header is sticky if first column is sticky otherwise the first header cell will not be sticky\n const shouldHeaderBeSticky = isVirtualized || isHeaderSticky || isFirstColumnSticky;\n\n const isMobile = useIsMobile();\n const lastHoverActionsColWidth = isMobile ? '1fr' : '0px';\n\n const {\n isEntering: isRefreshSpinnerEntering,\n isMounted: isRefreshSpinnerMounted,\n isExiting: isRefreshSpinnerExiting,\n isVisible: isRefreshSpinnerVisible,\n } = usePresence(isRefreshing, {\n transitionDuration: theme.motion.duration.quick,\n });\n\n // Table Theme\n const columnCount = getTableHeaderCellCount(children);\n const firstColumnStickyHeaderCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n /* Higher z-index for sticky first column cells that also span rows to prevent stacking issues */\n &:nth-of-type(1).${classes.HAS_ROW_SPANNING} {\n z-index: 3 !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyFooterCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n /* Higher z-index for sticky first column cells that also span rows to prevent stacking issues */\n &:nth-of-type(1).${classes.HAS_ROW_SPANNING} {\n z-index: 3 !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyBodyCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n /* Higher z-index for sticky first column cells that also span rows to prevent stacking issues */\n &:nth-of-type(1).${classes.HAS_ROW_SPANNING} {\n z-index: 3 !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n\n const tableTheme = useTableTheme({\n Table: `\n height:${isFooterSticky ? `100%` : undefined};\n border: ${makeBorderSize(theme.border.width.thin)} solid ${\n theme.colors.surface.border.gray.muted\n };\n --data-table-library_grid-template-columns: ${\n gridTemplateColumns\n ? `${gridTemplateColumns} ${hasHoverActions ? lastHoverActionsColWidth : ''}`\n : ` ${\n selectionType === 'multiple' ? 'min-content' : ''\n } repeat(${columnCount},minmax(100px, 1fr)) ${\n hasHoverActions ? lastHoverActionsColWidth : ''\n } !important;`\n } !important;\n background-color: ${getIn(theme.colors, backgroundColor)};\n `,\n HeaderCell: `\n position: ${shouldHeaderBeSticky ? 'sticky' : 'relative'};\n \n top: ${shouldHeaderBeSticky ? '0' : undefined};\n ${firstColumnStickyHeaderCellCSS}\n `,\n Cell: `\n ${firstColumnStickyBodyCellCSS}\n `,\n FooterCell: `\n position: ${isFooterSticky ? 'sticky' : 'relative'};\n bottom: ${isFooterSticky ? '0' : undefined};\n ${firstColumnStickyFooterCellCSS}\n `,\n });\n\n useEffect(() => {\n // Get the total number of items\n setTotalItems(data.nodes.length);\n }, [data.nodes]);\n\n // Selection Logic\n const onSelectChange: MiddlewareFunction = (_, state): void => {\n const selectedIds: Identifier[] = state.id ? [state.id] : state.ids ?? [];\n setSelectedRows(selectedIds);\n onSelectionChange?.({\n selectedIds,\n values: data.nodes.filter((node) => selectedIds.includes(node.id)),\n });\n };\n\n const rowSelectConfig = useRowSelect(\n data,\n {\n onChange: onSelectChange,\n state: {\n ...(selectionType === 'multiple'\n ? { ids: selectedRows }\n : selectionType === 'single'\n ? { id: selectedRows[0] }\n : {}),\n },\n },\n {\n clickType:\n multiSelectTrigger === 'row' ? SelectClickTypes.RowClick : SelectClickTypes.ButtonClick,\n rowSelect: selectionType !== 'none' ? rowSelectType[selectionType] : undefined,\n },\n );\n\n const toggleRowSelectionById = useMemo(\n () => (id: Identifier): void => {\n // Use recursive selection only for grouped tables with multiple selection\n if (selectionType === 'multiple' && isGrouped) {\n rowSelectConfig.fns.onToggleByIdRecursively(id, {\n // When clicking partially selected parent, select all children\n isPartialToAll: true,\n });\n } else {\n rowSelectConfig.fns.onToggleById(id);\n }\n },\n [rowSelectConfig.fns],\n );\n\n const deselectAllRows = useMemo(\n () => (): void => {\n rowSelectConfig.fns.onRemoveAll();\n },\n [rowSelectConfig.fns],\n );\n\n const toggleAllRowsSelection = useMemo(\n () => (): void => {\n if (selectedRows.length > 0) {\n rowSelectConfig.fns.onRemoveAll();\n } else if (isGrouped) {\n rowSelectConfig.fns.onToggleAll({});\n } else {\n const ids = data.nodes\n .map((item: TableNode<Item>) => (disabledRows.includes(item.id) ? null : item.id))\n .filter(Boolean) as Identifier[];\n\n rowSelectConfig.fns.onAddAll(ids);\n }\n },\n [rowSelectConfig.fns, data.nodes, selectedRows, disabledRows],\n );\n\n const tree = useTree(\n isGrouped ? data : { nodes: [] },\n {},\n {\n // Disable row click expand/collapse (fallback enables unwanted expand/collapse on row click)\n clickType: undefined,\n // Disable all indentation for flat appearance\n treeYLevel: undefined,\n },\n );\n\n useIsomorphicLayoutEffect(() => {\n if (isGrouped && tree?.fns.onToggleAll) {\n tree.fns.onToggleAll({ ids: [] });\n }\n }, []);\n\n // Sort Logic\n const handleSortChange: MiddlewareFunction = (_, state) => {\n onSortChange?.({\n sortKey: state.sortKey,\n isSortReversed: state.reverse,\n });\n };\n\n const sort = useSort(\n data,\n {\n onChange: handleSortChange,\n },\n {\n // @ts-expect-error ignore this, if sortFunctions is undefined, it will be ignored\n sortFns: sortFunctions,\n },\n );\n\n const currentSortedState: TableContextType<Item>['currentSortedState'] = useMemo(() => {\n return {\n sortKey: sort.state.sortKey,\n isSortReversed: sort.state.reverse,\n sortableColumns: Object.keys(sortFunctions ?? {}),\n };\n }, [sort.state, sortFunctions]);\n\n const toggleSort = useCallback(\n (sortKey: string): void => {\n sort.fns.onToggleSort({\n sortKey,\n });\n },\n [sort.fns],\n );\n\n // Pagination\n\n const hasPagination = Boolean(pagination);\n\n const paginationConfig = usePagination(\n data,\n {\n state: {\n page: 0,\n size: tablePagination.defaultPageSize,\n },\n },\n {\n isServer: paginationType === 'server',\n },\n );\n\n const currentPaginationState = useMemo(() => {\n return hasPagination\n ? {\n page: paginationConfig.state.page,\n size: paginationConfig.state.size,\n }\n : undefined;\n }, [paginationConfig.state, hasPagination]);\n\n const setPaginationPage = useCallback(\n (page: number): void => {\n paginationConfig.fns.onSetPage(page);\n },\n [paginationConfig.fns],\n );\n\n const setPaginationRowSize = useCallback(\n (size: number): void => {\n paginationConfig.fns.onSetSize(size);\n },\n [paginationConfig.fns],\n );\n\n // Toolbar Component\n if (__DEV__) {\n if (toolbar && !isValidAllowedChildren(toolbar, ComponentIds.TableToolbar)) {\n throwBladeError({\n message: 'Only TableToolbar component is allowed in the `toolbar` prop',\n moduleName: 'Table',\n });\n }\n }\n\n // Table Context\n const tableContext: TableContextType<Item> = useMemo(\n () => ({\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n rowDensity,\n toggleSort,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n hasHoverActions,\n setHasHoverActions,\n columnCount,\n gridTemplateColumns,\n isVirtualized,\n tableData: data.nodes,\n isGrouped,\n }),\n [\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n gridTemplateColumns,\n rowDensity,\n toggleSort,\n columnCount,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n hasHoverActions,\n setHasHoverActions,\n isVirtualized,\n data,\n isGrouped,\n ],\n );\n\n return (\n <TableContext.Provider value={tableContext}>\n {isLoading ? (\n <BaseBox\n display=\"flex\"\n flex={1}\n alignItems=\"center\"\n justifyContent=\"center\"\n height={height}\n {...getStyledProps(rest)}\n {...metaAttribute({ name: MetaConstants.Table })}\n {...makeAnalyticsAttribute(rest)}\n >\n <Spinner accessibilityLabel=\"Loading Table\" size=\"large\" testID=\"table-spinner\" />\n </BaseBox>\n ) : (\n <BaseBox\n // ref={ref as never}\n flex={1}\n position=\"relative\"\n {...getStyledProps(rest)}\n {...metaAttribute({ name: MetaConstants.Table })}\n width={isVirtualized ? `100%` : undefined}\n {...makeAnalyticsAttribute(rest)}\n >\n {isRefreshSpinnerMounted && (\n <RefreshWrapper\n position=\"absolute\"\n width=\"100%\"\n height=\"100%\"\n zIndex={refreshWrapperZIndex}\n backgroundColor=\"overlay.background.subtle\"\n justifyContent=\"center\"\n alignItems=\"center\"\n display=\"flex\"\n isRefreshSpinnerEntering={isRefreshSpinnerEntering}\n isRefreshSpinnerExiting={isRefreshSpinnerExiting}\n isRefreshSpinnerVisible={isRefreshSpinnerVisible}\n >\n <Spinner color=\"white\" accessibilityLabel=\"Refreshing Table\" size=\"large\" />\n </RefreshWrapper>\n )}\n {/* wrapping toolbar in BaseBox and passing the same analytics attributes as of table because in analytics POV, events triggered are from table */}\n <BaseBox {...makeAnalyticsAttribute(rest)}>{toolbar}</BaseBox>\n <StyledReactTable\n role=\"table\"\n layout={{ fixedHeader: shouldHeaderBeSticky, horizontalScroll: true }}\n data={data}\n // @ts-expect-error ignore this, theme clashes with styled-component's theme. We're using useTheme from blade to get actual theme\n theme={tableTheme}\n select={selectionType !== 'none' ? rowSelectConfig : null}\n sort={sortFunctions ? sort : null}\n tree={isGrouped ? tree : null}\n $styledProps={{\n height,\n width: isVirtualized ? `100%` : undefined,\n isVirtualized,\n isSelectable: selectionType !== 'none',\n showStripedRows,\n }}\n pagination={hasPagination ? paginationConfig : null}\n {...makeAccessible({ multiSelectable: selectionType === 'multiple' })}\n {...metaAttribute({ name: MetaConstants.Table })}\n {...makeAnalyticsAttribute(rest)}\n >\n {children}\n </StyledReactTable>\n {pagination}\n </BaseBox>\n )}\n </TableContext.Provider>\n );\n};\nconst Table = assignWithoutSideEffects(_Table, {\n componentId: ComponentIds.Table,\n});\n\nexport { Table };\n"],"names":["rowSelectType","single","SelectTypes","SingleSelect","multiple","MultiSelect","none","undefined","getTableHeaderCellCount","children","tableRootComponent","React","isValidElement","tableComponentArray","Children","toArray","_tableHeaderCells$len","tableComponentArrayChildren","props","tableHeader","find","child","getComponentId","ComponentIds","TableHeader","tableHeaderChildrenArray","tableHeaderRow","TableHeaderRow","tableHeaderRowChildrenArray","tableHeaderCells","filter","TableHeaderCell","length","StyledReactTable","styled","ReactTable","withConfig","displayName","componentId","_ref","$styledProps","_useTheme","useTheme","theme","styledPropsCSSObject","getBaseBoxStyles","_objectSpread","height","isVirtualized","width","$isSelectable","isSelectable","$showStripedRows","showStripedRows","overflow","concat","getTableBodyStyles","RefreshWrapper","BaseBox","_ref2","isRefreshSpinnerVisible","isRefreshSpinnerEntering","isRefreshSpinnerExiting","opacity","transition","makeMotionTime","motion","duration","quick","easing","entrance","exit","_Table","_ref3","data","_ref3$multiSelectTrig","multiSelectTrigger","_ref3$selectionType","selectionType","onSelectionChange","isHeaderSticky","isFooterSticky","isFirstColumnSticky","_ref3$rowDensity","rowDensity","onSortChange","sortFunctions","toolbar","pagination","gridTemplateColumns","_ref3$isLoading","isLoading","_ref3$isRefreshing","isRefreshing","_ref3$showBorderedCel","showBorderedCells","_ref3$defaultSelected","defaultSelectedIds","_ref3$backgroundColor","backgroundColor","tableBackgroundColor","_ref3$isGrouped","isGrouped","rest","_objectWithoutProperties","_excluded","_useTheme2","_React$useState","useState","_React$useState2","_slicedToArray","selectedRows","setSelectedRows","_React$useState3","_React$useState4","disabledRows","setDisabledRows","_React$useState5","nodes","_React$useState6","totalItems","setTotalItems","_React$useState7","_React$useState8","paginationType","setPaginationType","_React$useState9","_React$useState10","headerRowDensity","setHeaderRowDensity","_React$useState11","_React$useState12","hasHoverActions","setHasHoverActions","VirtualizedTable","shouldHeaderBeSticky","isMobile","useIsMobile","lastHoverActionsColWidth","_usePresence","usePresence","transitionDuration","isEntering","isRefreshSpinnerMounted","isMounted","isExiting","isVisible","columnCount","firstColumnStickyHeaderCellCSS","firstColumnStickyZIndex","classes","HAS_ROW_SPANNING","checkboxCellWidth","firstColumnStickyFooterCellCSS","firstColumnStickyBodyCellCSS","tableTheme","useTableTheme","Table","makeBorderSize","border","thin","colors","surface","gray","muted","getIn","HeaderCell","Cell","FooterCell","useEffect","onSelectChange","_","state","_state$ids","selectedIds","id","ids","values","node","includes","rowSelectConfig","useRowSelect","onChange","clickType","SelectClickTypes","RowClick","ButtonClick","rowSelect","toggleRowSelectionById","useMemo","fns","onToggleByIdRecursively","isPartialToAll","onToggleById","deselectAllRows","onRemoveAll","toggleAllRowsSelection","onToggleAll","map","item","Boolean","onAddAll","tree","useTree","treeYLevel","useIsomorphicLayoutEffect","handleSortChange","sortKey","isSortReversed","reverse","sort","useSort","sortFns","currentSortedState","sortableColumns","Object","keys","toggleSort","useCallback","onToggleSort","hasPagination","paginationConfig","usePagination","page","size","tablePagination","defaultPageSize","isServer","currentPaginationState","setPaginationPage","onSetPage","setPaginationRowSize","onSetSize","isValidAllowedChildren","TableToolbar","throwBladeError","message","moduleName","tableContext","tableData","_jsx","TableContext","Provider","value","display","flex","alignItems","justifyContent","getStyledProps","metaAttribute","name","MetaConstants","makeAnalyticsAttribute","Spinner","accessibilityLabel","testID","_jsxs","position","zIndex","refreshWrapperZIndex","color","role","layout","fixedHeader","horizontalScroll","select","makeAccessible","multiSelectable","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,IAAMA,aAGL,GAAG;EACFC,MAAM,EAAEC,WAAW,CAACC,YAAY;EAChCC,QAAQ,EAAEF,WAAW,CAACG,WAAW;AACjCC,EAAAA,IAAI,EAAEC,SAAAA;AACR,CAAC,CAAA;;AAED;AACA;AACA;AACA,IAAMC,uBAAuB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