package.build.lib.features.RowSelection.js.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of table-core Show documentation
Show all versions of table-core Show documentation
Headless UI for building powerful tables & datagrids for TS/JS.
The newest version!
{"version":3,"file":"RowSelection.js","sources":["../../../src/features/RowSelection.ts"],"sourcesContent":["import { TableFeature } from '../core/table'\nimport { OnChangeFn, Table, Row, RowModel, Updater, RowData } from '../types'\nimport { makeStateUpdater, memo } from '../utils'\n\nexport type RowSelectionState = Record\n\nexport interface RowSelectionTableState {\n rowSelection: RowSelectionState\n}\n\nexport interface RowSelectionOptions {\n enableRowSelection?: boolean | ((row: Row) => boolean)\n enableMultiRowSelection?: boolean | ((row: Row) => boolean)\n enableSubRowSelection?: boolean | ((row: Row) => boolean)\n onRowSelectionChange?: OnChangeFn\n // enableGroupingRowSelection?:\n // | boolean\n // | ((\n // row: Row\n // ) => boolean)\n // isAdditiveSelectEvent?: (e: unknown) => boolean\n // isInclusiveSelectEvent?: (e: unknown) => boolean\n // selectRowsFn?: (\n // table: Table,\n // rowModel: RowModel\n // ) => RowModel\n}\n\nexport interface RowSelectionRow {\n getIsSelected: () => boolean\n getIsSomeSelected: () => boolean\n getIsAllSubRowsSelected: () => boolean\n getCanSelect: () => boolean\n getCanMultiSelect: () => boolean\n getCanSelectSubRows: () => boolean\n toggleSelected: (value?: boolean) => void\n getToggleSelectedHandler: () => (event: unknown) => void\n}\n\nexport interface RowSelectionInstance {\n getToggleAllRowsSelectedHandler: () => (event: unknown) => void\n getToggleAllPageRowsSelectedHandler: () => (event: unknown) => void\n setRowSelection: (updater: Updater) => void\n resetRowSelection: (defaultState?: boolean) => void\n getIsAllRowsSelected: () => boolean\n getIsAllPageRowsSelected: () => boolean\n getIsSomeRowsSelected: () => boolean\n getIsSomePageRowsSelected: () => boolean\n toggleAllRowsSelected: (value?: boolean) => void\n toggleAllPageRowsSelected: (value?: boolean) => void\n getPreSelectedRowModel: () => RowModel\n getSelectedRowModel: () => RowModel\n getFilteredSelectedRowModel: () => RowModel\n getGroupedSelectedRowModel: () => RowModel\n}\n\n//\n\nexport const RowSelection: TableFeature = {\n getInitialState: (state): RowSelectionTableState => {\n return {\n rowSelection: {},\n ...state,\n }\n },\n\n getDefaultOptions: (\n table: Table\n ): RowSelectionOptions => {\n return {\n onRowSelectionChange: makeStateUpdater('rowSelection', table),\n enableRowSelection: true,\n enableMultiRowSelection: true,\n enableSubRowSelection: true,\n // enableGroupingRowSelection: false,\n // isAdditiveSelectEvent: (e: unknown) => !!e.metaKey,\n // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,\n }\n },\n\n createTable: (\n table: Table\n ): RowSelectionInstance => {\n return {\n setRowSelection: updater => table.options.onRowSelectionChange?.(updater),\n resetRowSelection: defaultState =>\n table.setRowSelection(\n defaultState ? {} : table.initialState.rowSelection ?? {}\n ),\n toggleAllRowsSelected: value => {\n table.setRowSelection(old => {\n value =\n typeof value !== 'undefined' ? value : !table.getIsAllRowsSelected()\n\n const rowSelection = { ...old }\n\n const preGroupedFlatRows = table.getPreGroupedRowModel().flatRows\n\n // We don't use `mutateRowIsSelected` here for performance reasons.\n // All of the rows are flat already, so it wouldn't be worth it\n if (value) {\n preGroupedFlatRows.forEach(row => {\n if (!row.getCanSelect()) {\n return\n }\n rowSelection[row.id] = true\n })\n } else {\n preGroupedFlatRows.forEach(row => {\n delete rowSelection[row.id]\n })\n }\n\n return rowSelection\n })\n },\n toggleAllPageRowsSelected: value =>\n table.setRowSelection(old => {\n const resolvedValue =\n typeof value !== 'undefined'\n ? value\n : !table.getIsAllPageRowsSelected()\n\n const rowSelection: RowSelectionState = { ...old }\n\n table.getRowModel().rows.forEach(row => {\n mutateRowIsSelected(rowSelection, row.id, resolvedValue, table)\n })\n\n return rowSelection\n }),\n\n // addRowSelectionRange: rowId => {\n // const {\n // rows,\n // rowsById,\n // options: { selectGroupingRows, selectSubRows },\n // } = table\n\n // const findSelectedRow = (rows: Row[]) => {\n // let found\n // rows.find(d => {\n // if (d.getIsSelected()) {\n // found = d\n // return true\n // }\n // const subFound = findSelectedRow(d.subRows || [])\n // if (subFound) {\n // found = subFound\n // return true\n // }\n // return false\n // })\n // return found\n // }\n\n // const firstRow = findSelectedRow(rows) || rows[0]\n // const lastRow = rowsById[rowId]\n\n // let include = false\n // const selectedRowIds = {}\n\n // const addRow = (row: Row) => {\n // mutateRowIsSelected(selectedRowIds, row.id, true, {\n // rowsById,\n // selectGroupingRows: selectGroupingRows!,\n // selectSubRows: selectSubRows!,\n // })\n // }\n\n // table.rows.forEach(row => {\n // const isFirstRow = row.id === firstRow.id\n // const isLastRow = row.id === lastRow.id\n\n // if (isFirstRow || isLastRow) {\n // if (!include) {\n // include = true\n // } else if (include) {\n // addRow(row)\n // include = false\n // }\n // }\n\n // if (include) {\n // addRow(row)\n // }\n // })\n\n // table.setRowSelection(selectedRowIds)\n // },\n getPreSelectedRowModel: () => table.getCoreRowModel(),\n getSelectedRowModel: memo(\n () => [table.getState().rowSelection, table.getCoreRowModel()],\n (rowSelection, rowModel) => {\n if (!Object.keys(rowSelection).length) {\n return {\n rows: [],\n flatRows: [],\n rowsById: {},\n }\n }\n\n return selectRowsFn(table, rowModel)\n },\n {\n key: process.env.NODE_ENV === 'development' && 'getSelectedRowModel',\n debug: () => table.options.debugAll ?? table.options.debugTable,\n }\n ),\n\n getFilteredSelectedRowModel: memo(\n () => [table.getState().rowSelection, table.getFilteredRowModel()],\n (rowSelection, rowModel) => {\n if (!Object.keys(rowSelection).length) {\n return {\n rows: [],\n flatRows: [],\n rowsById: {},\n }\n }\n\n return selectRowsFn(table, rowModel)\n },\n {\n key:\n process.env.NODE_ENV === 'production' &&\n 'getFilteredSelectedRowModel',\n debug: () => table.options.debugAll ?? table.options.debugTable,\n }\n ),\n\n getGroupedSelectedRowModel: memo(\n () => [table.getState().rowSelection, table.getSortedRowModel()],\n (rowSelection, rowModel) => {\n if (!Object.keys(rowSelection).length) {\n return {\n rows: [],\n flatRows: [],\n rowsById: {},\n }\n }\n\n return selectRowsFn(table, rowModel)\n },\n {\n key:\n process.env.NODE_ENV === 'production' &&\n 'getGroupedSelectedRowModel',\n debug: () => table.options.debugAll ?? table.options.debugTable,\n }\n ),\n\n ///\n\n // getGroupingRowCanSelect: rowId => {\n // const row = table.getRow(rowId)\n\n // if (!row) {\n // throw new Error()\n // }\n\n // if (typeof table.options.enableGroupingRowSelection === 'function') {\n // return table.options.enableGroupingRowSelection(row)\n // }\n\n // return table.options.enableGroupingRowSelection ?? false\n // },\n\n getIsAllRowsSelected: () => {\n const preGroupedFlatRows = table.getFilteredRowModel().flatRows\n const { rowSelection } = table.getState()\n\n let isAllRowsSelected = Boolean(\n preGroupedFlatRows.length && Object.keys(rowSelection).length\n )\n\n if (isAllRowsSelected) {\n if (\n preGroupedFlatRows.some(\n row => row.getCanSelect() && !rowSelection[row.id]\n )\n ) {\n isAllRowsSelected = false\n }\n }\n\n return isAllRowsSelected\n },\n\n getIsAllPageRowsSelected: () => {\n const paginationFlatRows = table\n .getPaginationRowModel()\n .flatRows.filter(row => row.getCanSelect())\n const { rowSelection } = table.getState()\n\n let isAllPageRowsSelected = !!paginationFlatRows.length\n\n if (\n isAllPageRowsSelected &&\n paginationFlatRows.some(row => !rowSelection[row.id])\n ) {\n isAllPageRowsSelected = false\n }\n\n return isAllPageRowsSelected\n },\n\n getIsSomeRowsSelected: () => {\n const totalSelected = Object.keys(\n table.getState().rowSelection ?? {}\n ).length\n return (\n totalSelected > 0 &&\n totalSelected < table.getFilteredRowModel().flatRows.length\n )\n },\n\n getIsSomePageRowsSelected: () => {\n const paginationFlatRows = table.getPaginationRowModel().flatRows\n return table.getIsAllPageRowsSelected()\n ? false\n : paginationFlatRows\n .filter(row => row.getCanSelect())\n .some(d => d.getIsSelected() || d.getIsSomeSelected())\n },\n\n getToggleAllRowsSelectedHandler: () => {\n return (e: unknown) => {\n table.toggleAllRowsSelected(\n ((e as MouseEvent).target as HTMLInputElement).checked\n )\n }\n },\n\n getToggleAllPageRowsSelectedHandler: () => {\n return (e: unknown) => {\n table.toggleAllPageRowsSelected(\n ((e as MouseEvent).target as HTMLInputElement).checked\n )\n }\n },\n }\n },\n\n createRow: (\n row: Row,\n table: Table\n ): RowSelectionRow => {\n return {\n toggleSelected: value => {\n const isSelected = row.getIsSelected()\n\n table.setRowSelection(old => {\n value = typeof value !== 'undefined' ? value : !isSelected\n\n if (isSelected === value) {\n return old\n }\n\n const selectedRowIds = { ...old }\n\n mutateRowIsSelected(selectedRowIds, row.id, value, table)\n\n return selectedRowIds\n })\n },\n getIsSelected: () => {\n const { rowSelection } = table.getState()\n return isRowSelected(row, rowSelection)\n },\n\n getIsSomeSelected: () => {\n const { rowSelection } = table.getState()\n return isSubRowSelected(row, rowSelection, table) === 'some'\n },\n\n getIsAllSubRowsSelected: () => {\n const { rowSelection } = table.getState()\n return isSubRowSelected(row, rowSelection, table) === 'all'\n },\n\n getCanSelect: () => {\n if (typeof table.options.enableRowSelection === 'function') {\n return table.options.enableRowSelection(row)\n }\n\n return table.options.enableRowSelection ?? true\n },\n\n getCanSelectSubRows: () => {\n if (typeof table.options.enableSubRowSelection === 'function') {\n return table.options.enableSubRowSelection(row)\n }\n\n return table.options.enableSubRowSelection ?? true\n },\n\n getCanMultiSelect: () => {\n if (typeof table.options.enableMultiRowSelection === 'function') {\n return table.options.enableMultiRowSelection(row)\n }\n\n return table.options.enableMultiRowSelection ?? true\n },\n getToggleSelectedHandler: () => {\n const canSelect = row.getCanSelect()\n\n return (e: unknown) => {\n if (!canSelect) return\n row.toggleSelected(\n ((e as MouseEvent).target as HTMLInputElement)?.checked\n )\n }\n },\n }\n },\n}\n\nconst mutateRowIsSelected = (\n selectedRowIds: Record,\n id: string,\n value: boolean,\n table: Table\n) => {\n const row = table.getRow(id)\n\n // const isGrouped = row.getIsGrouped()\n\n // if ( // TODO: enforce grouping row selection rules\n // !isGrouped ||\n // (isGrouped && table.options.enableGroupingRowSelection)\n // ) {\n if (value) {\n if (!row.getCanMultiSelect()) {\n Object.keys(selectedRowIds).forEach(key => delete selectedRowIds[key])\n }\n if (row.getCanSelect()) {\n selectedRowIds[id] = true\n }\n } else {\n delete selectedRowIds[id]\n }\n // }\n\n if (row.subRows?.length && row.getCanSelectSubRows()) {\n row.subRows.forEach(row =>\n mutateRowIsSelected(selectedRowIds, row.id, value, table)\n )\n }\n}\n\nexport function selectRowsFn(\n table: Table,\n rowModel: RowModel\n): RowModel {\n const rowSelection = table.getState().rowSelection\n\n const newSelectedFlatRows: Row[] = []\n const newSelectedRowsById: Record> = {}\n\n // Filters top level and nested rows\n const recurseRows = (rows: Row[], depth = 0): Row[] => {\n return rows\n .map(row => {\n const isSelected = isRowSelected(row, rowSelection)\n\n if (isSelected) {\n newSelectedFlatRows.push(row)\n newSelectedRowsById[row.id] = row\n }\n\n if (row.subRows?.length) {\n row = {\n ...row,\n subRows: recurseRows(row.subRows, depth + 1),\n }\n }\n\n if (isSelected) {\n return row\n }\n })\n .filter(Boolean) as Row[]\n }\n\n return {\n rows: recurseRows(rowModel.rows),\n flatRows: newSelectedFlatRows,\n rowsById: newSelectedRowsById,\n }\n}\n\nexport function isRowSelected(\n row: Row,\n selection: Record\n): boolean {\n return selection[row.id] ?? false\n}\n\nexport function isSubRowSelected(\n row: Row,\n selection: Record,\n table: Table\n): boolean | 'some' | 'all' {\n if (row.subRows && row.subRows.length) {\n let allChildrenSelected = true\n let someSelected = false\n\n row.subRows.forEach(subRow => {\n // Bail out early if we know both of these\n if (someSelected && !allChildrenSelected) {\n return\n }\n\n if (isRowSelected(subRow, selection)) {\n someSelected = true\n } else {\n allChildrenSelected = false\n }\n })\n\n return allChildrenSelected ? 'all' : someSelected ? 'some' : false\n }\n\n return false\n}\n"],"names":["RowSelection","getInitialState","state","rowSelection","getDefaultOptions","table","onRowSelectionChange","makeStateUpdater","enableRowSelection","enableMultiRowSelection","enableSubRowSelection","createTable","setRowSelection","updater","options","resetRowSelection","defaultState","_table$initialState$r","initialState","toggleAllRowsSelected","value","old","getIsAllRowsSelected","preGroupedFlatRows","getPreGroupedRowModel","flatRows","forEach","row","getCanSelect","id","toggleAllPageRowsSelected","resolvedValue","getIsAllPageRowsSelected","getRowModel","rows","mutateRowIsSelected","getPreSelectedRowModel","getCoreRowModel","getSelectedRowModel","memo","getState","rowModel","Object","keys","length","rowsById","selectRowsFn","key","process","env","NODE_ENV","debug","_table$options$debugA","debugAll","debugTable","getFilteredSelectedRowModel","getFilteredRowModel","_table$options$debugA2","getGroupedSelectedRowModel","getSortedRowModel","_table$options$debugA3","isAllRowsSelected","Boolean","some","paginationFlatRows","getPaginationRowModel","filter","isAllPageRowsSelected","getIsSomeRowsSelected","_table$getState$rowSe","totalSelected","getIsSomePageRowsSelected","d","getIsSelected","getIsSomeSelected","getToggleAllRowsSelectedHandler","e","target","checked","getToggleAllPageRowsSelectedHandler","createRow","toggleSelected","isSelected","selectedRowIds","isRowSelected","isSubRowSelected","getIsAllSubRowsSelected","_table$options$enable","getCanSelectSubRows","_table$options$enable2","getCanMultiSelect","_table$options$enable3","getToggleSelectedHandler","canSelect","_target","_row$subRows","getRow","subRows","newSelectedFlatRows","newSelectedRowsById","recurseRows","depth","map","_row$subRows2","push","selection","_selection$row$id","allChildrenSelected","someSelected","subRow"],"mappings":";;;;;;;;;;;;;;;;AAwDA;;AAEO,MAAMA,YAA0B,GAAG;EACxCC,eAAe,EAAGC,KAAK,IAA6B;IAClD,OAAO;MACLC,YAAY,EAAE,EAAE;MAChB,GAAGD,KAAAA;KACJ,CAAA;GACF;EAEDE,iBAAiB,EACfC,KAAmB,IACY;IAC/B,OAAO;AACLC,MAAAA,oBAAoB,EAAEC,sBAAgB,CAAC,cAAc,EAAEF,KAAK,CAAC;AAC7DG,MAAAA,kBAAkB,EAAE,IAAI;AACxBC,MAAAA,uBAAuB,EAAE,IAAI;AAC7BC,MAAAA,qBAAqB,EAAE,IAAA;AACvB;AACA;AACA;KACD,CAAA;GACF;;EAEDC,WAAW,EACTN,KAAmB,IACa;IAChC,OAAO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