@tanstack/table-core 9.0.0-beta.34 → 9.0.0-beta.36
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.
- package/dist/core/rows/coreRowsFeature.types.d.cts +2 -0
- package/dist/core/rows/coreRowsFeature.types.d.ts +2 -0
- package/dist/core/rows/coreRowsFeature.utils.cjs +11 -1
- package/dist/core/rows/coreRowsFeature.utils.cjs.map +1 -1
- package/dist/core/rows/coreRowsFeature.utils.js +11 -1
- package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
- package/dist/core/table/coreTablesFeature.types.d.cts +2 -2
- package/dist/core/table/coreTablesFeature.types.d.ts +2 -2
- package/dist/features/column-ordering/columnOrderingFeature.cjs +12 -11
- package/dist/features/column-ordering/columnOrderingFeature.cjs.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.js +13 -12
- package/dist/features/column-ordering/columnOrderingFeature.js.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +26 -1
- package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +26 -1
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +26 -1
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +14 -2
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +14 -2
- package/dist/features/column-ordering/columnOrderingFeature.utils.js +27 -3
- package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs +10 -6
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.js +10 -6
- package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs +11 -2
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.utils.js +11 -2
- package/dist/features/column-resizing/columnResizingFeature.utils.js.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/static-functions.cjs +1 -0
- package/dist/static-functions.d.cts +2 -2
- package/dist/static-functions.d.ts +2 -2
- package/dist/static-functions.js +2 -2
- package/dist/types/RowModel.d.cts +2 -4
- package/dist/types/RowModel.d.ts +2 -4
- package/dist/utils.cjs +3 -2
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -1
- package/dist/utils.d.ts +2 -1
- package/dist/utils.js +3 -2
- package/dist/utils.js.map +1 -1
- package/dist/worker/initTableWorker.cjs.map +1 -1
- package/dist/worker/initTableWorker.js.map +1 -1
- package/dist/worker/rebuildRowModel.cjs.map +1 -1
- package/dist/worker/rebuildRowModel.js.map +1 -1
- package/package.json +2 -1
- package/src/core/rows/coreRowsFeature.types.ts +5 -0
- package/src/core/rows/coreRowsFeature.utils.ts +13 -1
- package/src/core/table/coreTablesFeature.types.ts +2 -2
- package/src/features/column-ordering/columnOrderingFeature.ts +12 -8
- package/src/features/column-ordering/columnOrderingFeature.types.ts +26 -0
- package/src/features/column-ordering/columnOrderingFeature.utils.ts +56 -5
- package/src/features/column-pinning/columnPinningFeature.utils.ts +24 -10
- package/src/features/column-resizing/columnResizingFeature.utils.ts +22 -5
- package/src/types/RowModel.ts +6 -10
- package/src/utils.ts +3 -2
- package/src/worker/initTableWorker.ts +1 -1
- package/src/worker/rebuildRowModel.ts +8 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columnResizingFeature.utils.cjs","names":["header_getSize","column_getSize","makeObjectMap","cloneState"],"sources":["../../../src/features/column-resizing/columnResizingFeature.utils.ts"],"sourcesContent":["import {\n column_getSize,\n header_getSize,\n table_setColumnSizing,\n} from '../column-sizing/columnSizingFeature.utils'\nimport { cloneState, makeObjectMap } from '../../utils'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Header } from '../../types/Header'\nimport type { Column_Internal } from '../../types/Column'\nimport type { ColumnSizingState } from '../column-sizing/columnSizingFeature.types'\nimport type { columnResizingState } from './columnResizingFeature.types'\n\n/**\n * Creates the default transient column resizing state.\n *\n * The feature default represents no active drag interaction. Reset APIs use\n * this value when `defaultState` is `true`.\n *\n * @example\n * ```ts\n * const resizeInfo = getDefaultColumnResizingState()\n * ```\n */\nexport function getDefaultColumnResizingState(): columnResizingState {\n return {\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n isResizingColumn: false,\n columnSizingStart: [],\n }\n}\n\n/**\n * Checks whether this column can start a resize interaction.\n *\n * Both `columnDef.enableResizing` and table `enableColumnResizing` default to\n * `true`.\n *\n * @example\n * ```ts\n * const canResize = column_getCanResize(column)\n * ```\n */\nexport function column_getCanResize<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n return (\n (column.columnDef.enableResizing ?? true) &&\n (column.table.options.enableColumnResizing ?? true)\n )\n}\n\n/**\n * Checks whether this column is the active column resize target.\n *\n * The value is read from `state.columnResizing.isResizingColumn`.\n *\n * @example\n * ```ts\n * const isResizing = column_getIsResizing(column)\n * ```\n */\nexport function column_getIsResizing<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n return (\n column.table.atoms.columnResizing?.get()?.isResizingColumn === column.id\n )\n}\n\n/**\n * Creates the pointer/touch start handler for resizing a header.\n *\n * The handler records starting sizes for all leaf headers, tracks drag deltas,\n * writes transient resize info, and commits column sizes on change or drag end\n * depending on `columnResizeMode`.\n *\n * @example\n * ```ts\n * const onMouseDown = header_getResizeHandler(header)\n * ```\n */\nexport function header_getResizeHandler<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(header: Header<TFeatures, TData, TValue>, _contextDocument?: Document) {\n const column = header.table.getColumn(header.column.id)!\n const canResize = column_getCanResize(column)\n\n return (event: unknown) => {\n if (!canResize) {\n return\n }\n\n ;(event as any).persist?.()\n\n if (isTouchStartEvent(event)) {\n // lets not respond to multiple touches (e.g. 2 or 3 fingers)\n if (event.touches.length > 1) {\n return\n }\n }\n\n const startSize = header_getSize(header)\n\n const columnSizingStart: Array<[string, number]> = header\n .getLeafHeaders()\n .map((leafHeader) => [\n leafHeader.column.id,\n column_getSize(leafHeader.column),\n ])\n\n const clientX = isTouchStartEvent(event)\n ? Math.round(event.touches[0]!.clientX)\n : (event as MouseEvent).clientX\n\n const newColumnSizing: ColumnSizingState = makeObjectMap()\n\n const updateOffset = (eventType: 'move' | 'end', clientXPos?: number) => {\n if (typeof clientXPos !== 'number') {\n return\n }\n\n const table = column.table\n const isCommit =\n table.options.columnResizeMode === 'onChange' || eventType === 'end'\n\n // one notification flush per tick instead of two\n table._reactivity.batch(() => {\n table_setColumnResizing(table, (old) => {\n const deltaDirection =\n table.options.columnResizeDirection === 'rtl' ? -1 : 1\n const deltaOffset =\n (clientXPos - (old.startOffset ?? 0)) * deltaDirection\n const startSize = old.startSize ?? 0\n const deltaPercentage = Math.max(\n startSize > 0 ? deltaOffset / startSize : 0,\n -0.999999,\n )\n\n // new sizes are only read at commit and are recomputed from\n // absolute positions each time, so skip them on onEnd-mode moves\n if (isCommit) {\n const columnSizingStart = old.columnSizingStart\n for (let i = 0; i < columnSizingStart.length; i++) {\n const entry = columnSizingStart[i]!\n const headerSize = entry[1]\n newColumnSizing[entry[0]] =\n Math.round(\n Math.max(\n headerSize > 0\n ? headerSize + headerSize * deltaPercentage\n : deltaOffset / columnSizingStart.length,\n 0,\n ) * 100,\n ) / 100\n }\n }\n\n return {\n ...old,\n deltaOffset,\n deltaPercentage,\n }\n })\n\n if (isCommit) {\n table_setColumnSizing(table, (old) =>\n Object.assign(makeObjectMap<number>(), old, newColumnSizing),\n )\n }\n })\n }\n\n // Pointer devices can report at several times the display refresh rate,\n // and every update between frames is overwritten by the next one. Apply\n // the first move of a frame immediately, then coalesce the rest into one\n // update per animation frame.\n let moveRafId: number | null = null\n let hasPendingMove = false\n let latestMoveX: number | undefined\n\n const flushMove = () => {\n if (hasPendingMove) {\n hasPendingMove = false\n updateOffset('move', latestMoveX)\n moveRafId = requestAnimationFrame(flushMove)\n } else {\n moveRafId = null\n }\n }\n\n const onMove = (clientXPos?: number) => {\n latestMoveX = clientXPos\n if (typeof requestAnimationFrame !== 'function') {\n updateOffset('move', clientXPos)\n return\n }\n if (moveRafId !== null) {\n hasPendingMove = true\n return\n }\n updateOffset('move', clientXPos)\n moveRafId = requestAnimationFrame(flushMove)\n }\n\n const onEnd = (clientXPos?: number) => {\n if (moveRafId !== null) {\n cancelAnimationFrame(moveRafId)\n moveRafId = null\n hasPendingMove = false\n }\n\n // batch the 'end' commit and the reset into one notification flush\n column.table._reactivity.batch(() => {\n // touchend events carry no touch position, so fall back to the last\n // observed move position for the final commit\n updateOffset('end', clientXPos ?? latestMoveX)\n\n table_setColumnResizing(column.table, (old) => ({\n ...old,\n isResizingColumn: false,\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n columnSizingStart: [],\n }))\n })\n }\n\n const contextDocument =\n _contextDocument || typeof document !== 'undefined' ? document : null\n\n const mouseEvents = {\n moveHandler: (e: MouseEvent) => onMove(e.clientX),\n upHandler: (e: MouseEvent) => {\n contextDocument?.removeEventListener(\n 'mousemove',\n mouseEvents.moveHandler,\n )\n contextDocument?.removeEventListener('mouseup', mouseEvents.upHandler)\n onEnd(e.clientX)\n },\n }\n\n const touchEvents = {\n moveHandler: (touchEvent: TouchEvent) => {\n if (touchEvent.cancelable) {\n touchEvent.preventDefault()\n touchEvent.stopPropagation()\n }\n onMove(touchEvent.touches[0]!.clientX)\n return false\n },\n upHandler: (e: TouchEvent) => {\n contextDocument?.removeEventListener(\n 'touchmove',\n touchEvents.moveHandler,\n )\n contextDocument?.removeEventListener('touchend', touchEvents.upHandler)\n if (e.cancelable) {\n e.preventDefault()\n e.stopPropagation()\n }\n onEnd(e.touches[0]?.clientX)\n },\n }\n\n const passiveIfSupported = passiveEventSupported()\n ? { passive: false }\n : false\n\n if (isTouchStartEvent(event)) {\n contextDocument?.addEventListener(\n 'touchmove',\n touchEvents.moveHandler,\n passiveIfSupported,\n )\n contextDocument?.addEventListener(\n 'touchend',\n touchEvents.upHandler,\n passiveIfSupported,\n )\n } else {\n contextDocument?.addEventListener(\n 'mousemove',\n mouseEvents.moveHandler,\n passiveIfSupported,\n )\n contextDocument?.addEventListener(\n 'mouseup',\n mouseEvents.upHandler,\n passiveIfSupported,\n )\n }\n\n table_setColumnResizing(column.table, (old) => ({\n ...old,\n startOffset: clientX,\n startSize,\n deltaOffset: 0,\n deltaPercentage: 0,\n columnSizingStart,\n isResizingColumn: column.id,\n }))\n }\n}\n\n/**\n * Routes a transient column resizing updater through the table's resize handler.\n *\n * This state tracks the active drag interaction; committed widths live in\n * `columnSizing`.\n *\n * @example\n * ```ts\n * table_setColumnResizing(table, (old) => ({ ...old, deltaOffset: 12 }))\n * ```\n */\nexport function table_setColumnResizing<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n updater: Updater<columnResizingState>,\n) {\n table.options.onColumnResizingChange?.(updater)\n}\n\n/**\n * Resets `columnResizing` to the configured initial state or feature default.\n *\n * With no argument, the reset clones `table.initialState.columnResizing` when\n * it exists. Passing `true` ignores initial state and resets to the no-drag\n * default state.\n *\n * @example\n * ```ts\n * table_resetHeaderSizeInfo(table)\n * table_resetHeaderSizeInfo(table, true)\n * ```\n */\nexport function table_resetHeaderSizeInfo<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n table_setColumnResizing(\n table,\n defaultState\n ? getDefaultColumnResizingState()\n : cloneState(\n table.initialState.columnResizing ?? getDefaultColumnResizingState(),\n ),\n )\n}\n\nlet passiveSupported: boolean | null = null\n/**\n * Detects whether the current environment supports passive event listeners.\n *\n * Column resizing uses this to register pointer and touch listeners with\n * `passive: false` only when the environment understands passive options.\n *\n * @example\n * ```ts\n * const canUsePassiveListeners = passiveEventSupported()\n * ```\n */\nexport function passiveEventSupported() {\n if (typeof passiveSupported === 'boolean') return passiveSupported\n\n let supported = false\n try {\n const options = {\n get passive() {\n supported = true\n return false\n },\n }\n\n const noop = () => {}\n\n window.addEventListener('test', noop, options)\n window.removeEventListener('test', noop)\n } catch (err) {\n supported = false\n }\n passiveSupported = supported\n return passiveSupported\n}\n\n/**\n * Narrows an unknown event to a `touchstart` event.\n *\n * Column resizing uses this before reading touch coordinates and installing\n * touch-specific listeners.\n *\n * @example\n * ```ts\n * const isTouch = isTouchStartEvent(event)\n * ```\n */\nexport function isTouchStartEvent(e: unknown): e is TouchEvent {\n return (e as TouchEvent).type === 'touchstart'\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyBA,SAAgB,gCAAqD;CACnE,OAAO;EACL,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,kBAAkB;EAClB,mBAAmB,CAAC;CACtB;AACF;;;;;;;;;;;;AAaA,SAAgB,oBAId,QAAmD;CACnD,QACG,OAAO,UAAU,kBAAkB,UACnC,OAAO,MAAM,QAAQ,wBAAwB;AAElD;;;;;;;;;;;AAYA,SAAgB,qBAId,QAAmD;CACnD,OACE,OAAO,MAAM,MAAM,gBAAgB,IAAI,CAAC,EAAE,qBAAqB,OAAO;AAE1E;;;;;;;;;;;;;AAcA,SAAgB,wBAId,QAA0C,kBAA6B;CACvE,MAAM,SAAS,OAAO,MAAM,UAAU,OAAO,OAAO,EAAE;CACtD,MAAM,YAAY,oBAAoB,MAAM;CAE5C,QAAQ,UAAmB;EACzB,IAAI,CAAC,WACH;EAGD,AAAC,MAAc,UAAU;EAE1B,IAAI,kBAAkB,KAAK,GAEzB;OAAI,MAAM,QAAQ,SAAS,GACzB;EACF;EAGF,MA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sBAAsB,IAC7C,EAAE,SAAS,MAAM,IACjB;EAEJ,IAAI,kBAAkB,KAAK,GAAG;GAC5B,iBAAiB,iBACf,aACA,YAAY,aACZ,kBACF;GACA,iBAAiB,iBACf,YACA,YAAY,WACZ,kBACF;EACF,OAAO;GACL,iBAAiB,iBACf,aACA,YAAY,aACZ,kBACF;GACA,iBAAiB,iBACf,WACA,YAAY,WACZ,kBACF;EACF;EAEA,wBAAwB,OAAO,QAAQ,SAAS;GAC9C,GAAG;GACH,aAAa;GACb;GACA,aAAa;GACb,iBAAiB;GACjB;GACA,kBAAkB,OAAO;EAC3B,EAAE;CACJ;AACF;;;;;;;;;;;;AAaA,SAAgB,wBAId,OACA,SACA;CACA,MAAM,QAAQ,yBAAyB,OAAO;AAChD;;;;;;;;;;;;;;AAeA,SAAgB,0BAGd,OAAyC,cAAwB;CACjE,wBACE,OACA,eACI,8BAA8B,IAC9BC,yBACE,MAAM,aAAa,kBAAkB,8BAA8B,CACrE,CACN;AACF;AAEA,IAAI,mBAAmC;;;;;;;;;;;;AAYvC,SAAgB,wBAAwB;CACtC,IAAI,OAAO,qBAAqB,WAAW,OAAO;CAElD,IAAI,YAAY;CAChB,IAAI;EACF,MAAM,UAAU,EACd,IAAI,UAAU;GACZ,YAAY;GACZ,OAAO;EACT,EACF;EAEA,MAAM,aAAa,CAAC;EAEpB,OAAO,iBAAiB,QAAQ,MAAM,OAAO;EAC7C,OAAO,oBAAoB,QAAQ,IAAI;CACzC,SAAS,KAAK;EACZ,YAAY;CACd;CACA,mBAAmB;CACnB,OAAO;AACT;;;;;;;;;;;;AAaA,SAAgB,kBAAkB,GAA6B;CAC7D,OAAQ,EAAiB,SAAS;AACpC"}
|
|
1
|
+
{"version":3,"file":"columnResizingFeature.utils.cjs","names":["header_getSize","column_getSize","makeObjectMap","cloneState"],"sources":["../../../src/features/column-resizing/columnResizingFeature.utils.ts"],"sourcesContent":["import {\n column_getSize,\n header_getSize,\n table_setColumnSizing,\n} from '../column-sizing/columnSizingFeature.utils'\nimport { cloneState, makeObjectMap } from '../../utils'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Header } from '../../types/Header'\nimport type { Column_Internal } from '../../types/Column'\nimport type { ColumnSizingState } from '../column-sizing/columnSizingFeature.types'\nimport type { columnResizingState } from './columnResizingFeature.types'\n\n/**\n * Creates the default transient column resizing state.\n *\n * The feature default represents no active drag interaction. Reset APIs use\n * this value when `defaultState` is `true`.\n *\n * @example\n * ```ts\n * const resizeInfo = getDefaultColumnResizingState()\n * ```\n */\nexport function getDefaultColumnResizingState(): columnResizingState {\n return {\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n isResizingColumn: false,\n columnSizingStart: [],\n }\n}\n\n/**\n * Checks whether this column can start a resize interaction.\n *\n * Both `columnDef.enableResizing` and table `enableColumnResizing` default to\n * `true`.\n *\n * @example\n * ```ts\n * const canResize = column_getCanResize(column)\n * ```\n */\nexport function column_getCanResize<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n return (\n (column.columnDef.enableResizing ?? true) &&\n (column.table.options.enableColumnResizing ?? true)\n )\n}\n\n/**\n * Checks whether this column is the active column resize target.\n *\n * The value is read from `state.columnResizing.isResizingColumn`.\n *\n * @example\n * ```ts\n * const isResizing = column_getIsResizing(column)\n * ```\n */\nexport function column_getIsResizing<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n return (\n column.table.atoms.columnResizing?.get()?.isResizingColumn === column.id\n )\n}\n\n/**\n * Creates the pointer/touch start handler for resizing a header.\n *\n * The handler records starting sizes for all leaf headers, tracks drag deltas,\n * writes transient resize info, and commits column sizes on change or drag end\n * depending on `columnResizeMode`.\n *\n * @example\n * ```ts\n * const onMouseDown = header_getResizeHandler(header)\n * ```\n */\nexport function header_getResizeHandler<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(header: Header<TFeatures, TData, TValue>, _contextDocument?: Document) {\n const column = header.table.getColumn(header.column.id)!\n const canResize = column_getCanResize(column)\n\n return (event: unknown) => {\n if (!canResize) {\n return\n }\n\n ;(event as any).persist?.()\n\n if (isTouchStartEvent(event)) {\n // lets not respond to multiple touches (e.g. 2 or 3 fingers)\n if (event.touches.length > 1) {\n return\n }\n }\n\n const startSize = header_getSize(header)\n\n const columnSizingStart: Array<[string, number]> = header\n .getLeafHeaders()\n .map((leafHeader) => [\n leafHeader.column.id,\n column_getSize(leafHeader.column),\n ])\n\n const clientX = isTouchStartEvent(event)\n ? Math.round(event.touches[0]!.clientX)\n : (event as MouseEvent).clientX\n\n const newColumnSizing: ColumnSizingState = makeObjectMap()\n\n const updateOffset = (eventType: 'move' | 'end', clientXPos?: number) => {\n if (typeof clientXPos !== 'number') {\n return\n }\n\n const table = column.table\n const isCommit =\n table.options.columnResizeMode === 'onChange' || eventType === 'end'\n\n // one notification flush per tick instead of two\n table._reactivity.batch(() => {\n table_setColumnResizing(table, (old) => {\n const deltaDirection =\n table.options.columnResizeDirection === 'rtl' ? -1 : 1\n const deltaOffset =\n (clientXPos - (old.startOffset ?? 0)) * deltaDirection\n const startSize = old.startSize ?? 0\n const deltaPercentage = Math.max(\n startSize > 0 ? deltaOffset / startSize : 0,\n -0.999999,\n )\n\n // new sizes are only read at commit and are recomputed from\n // absolute positions each time, so skip them on onEnd-mode moves\n if (isCommit) {\n const columnSizingStart = old.columnSizingStart\n for (let i = 0; i < columnSizingStart.length; i++) {\n const entry = columnSizingStart[i]!\n const headerSize = entry[1]\n newColumnSizing[entry[0]] =\n Math.round(\n Math.max(\n headerSize > 0\n ? headerSize + headerSize * deltaPercentage\n : deltaOffset / columnSizingStart.length,\n 0,\n ) * 100,\n ) / 100\n }\n }\n\n return {\n ...old,\n deltaOffset,\n deltaPercentage,\n }\n })\n\n if (isCommit) {\n table_setColumnSizing(table, (old) =>\n Object.assign(makeObjectMap<number>(), old, newColumnSizing),\n )\n }\n })\n }\n\n // Pointer devices can report at several times the display refresh rate,\n // and every update between frames is overwritten by the next one. Apply\n // the first move of a frame immediately, then coalesce the rest into one\n // update per animation frame.\n let moveRafId: number | null = null\n let hasPendingMove = false\n let latestMoveX: number | undefined\n\n const flushMove = () => {\n if (hasPendingMove) {\n hasPendingMove = false\n updateOffset('move', latestMoveX)\n moveRafId = requestAnimationFrame(flushMove)\n } else {\n moveRafId = null\n }\n }\n\n const onMove = (clientXPos?: number) => {\n latestMoveX = clientXPos\n if (typeof requestAnimationFrame !== 'function') {\n updateOffset('move', clientXPos)\n return\n }\n if (moveRafId !== null) {\n hasPendingMove = true\n return\n }\n updateOffset('move', clientXPos)\n moveRafId = requestAnimationFrame(flushMove)\n }\n\n const onEnd = (clientXPos?: number) => {\n if (moveRafId !== null) {\n cancelAnimationFrame(moveRafId)\n moveRafId = null\n hasPendingMove = false\n }\n\n // batch the 'end' commit and the reset into one notification flush\n column.table._reactivity.batch(() => {\n // touchend events carry no touch position, so fall back to the last\n // observed move position for the final commit\n updateOffset('end', clientXPos ?? latestMoveX)\n\n table_setColumnResizing(column.table, (old) => ({\n ...old,\n isResizingColumn: false,\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n columnSizingStart: [],\n }))\n })\n }\n\n const contextDocument =\n _contextDocument || typeof document !== 'undefined' ? document : null\n\n const mouseEvents = {\n moveHandler: (e: MouseEvent) => onMove(e.clientX),\n upHandler: (e: MouseEvent) => {\n contextDocument?.removeEventListener(\n 'mousemove',\n mouseEvents.moveHandler,\n )\n contextDocument?.removeEventListener('mouseup', mouseEvents.upHandler)\n onEnd(e.clientX)\n },\n }\n\n const touchEvents = {\n moveHandler: (touchEvent: TouchEvent) => {\n if (touchEvent.cancelable) {\n touchEvent.preventDefault()\n touchEvent.stopPropagation()\n }\n onMove(touchEvent.touches[0]!.clientX)\n return false\n },\n upHandler: (e: TouchEvent) => {\n removeTouchEvents()\n if (e.cancelable) {\n e.preventDefault()\n e.stopPropagation()\n }\n onEnd(e.touches[0]?.clientX)\n },\n // the browser fires touchcancel instead of touchend when it takes over\n // the gesture (system gesture, scroll takeover, tab switch); without\n // this the non-passive touchmove listener stays on the document forever\n cancelHandler: () => {\n removeTouchEvents()\n onEnd()\n },\n }\n\n const removeTouchEvents = () => {\n contextDocument?.removeEventListener('touchmove', touchEvents.moveHandler)\n contextDocument?.removeEventListener('touchend', touchEvents.upHandler)\n contextDocument?.removeEventListener(\n 'touchcancel',\n touchEvents.cancelHandler,\n )\n }\n\n const passiveIfSupported = passiveEventSupported()\n ? { passive: false }\n : false\n\n if (isTouchStartEvent(event)) {\n contextDocument?.addEventListener(\n 'touchmove',\n touchEvents.moveHandler,\n passiveIfSupported,\n )\n contextDocument?.addEventListener(\n 'touchend',\n touchEvents.upHandler,\n passiveIfSupported,\n )\n contextDocument?.addEventListener(\n 'touchcancel',\n touchEvents.cancelHandler,\n passiveIfSupported,\n )\n } else {\n contextDocument?.addEventListener(\n 'mousemove',\n mouseEvents.moveHandler,\n passiveIfSupported,\n )\n contextDocument?.addEventListener(\n 'mouseup',\n mouseEvents.upHandler,\n passiveIfSupported,\n )\n }\n\n table_setColumnResizing(column.table, (old) => ({\n ...old,\n startOffset: clientX,\n startSize,\n deltaOffset: 0,\n deltaPercentage: 0,\n columnSizingStart,\n isResizingColumn: column.id,\n }))\n }\n}\n\n/**\n * Routes a transient column resizing updater through the table's resize handler.\n *\n * This state tracks the active drag interaction; committed widths live in\n * `columnSizing`.\n *\n * @example\n * ```ts\n * table_setColumnResizing(table, (old) => ({ ...old, deltaOffset: 12 }))\n * ```\n */\nexport function table_setColumnResizing<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n updater: Updater<columnResizingState>,\n) {\n table.options.onColumnResizingChange?.(updater)\n}\n\n/**\n * Resets `columnResizing` to the configured initial state or feature default.\n *\n * With no argument, the reset clones `table.initialState.columnResizing` when\n * it exists. Passing `true` ignores initial state and resets to the no-drag\n * default state.\n *\n * @example\n * ```ts\n * table_resetHeaderSizeInfo(table)\n * table_resetHeaderSizeInfo(table, true)\n * ```\n */\nexport function table_resetHeaderSizeInfo<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n table_setColumnResizing(\n table,\n defaultState\n ? getDefaultColumnResizingState()\n : cloneState(\n table.initialState.columnResizing ?? getDefaultColumnResizingState(),\n ),\n )\n}\n\nlet passiveSupported: boolean | null = null\n/**\n * Detects whether the current environment supports passive event listeners.\n *\n * Column resizing uses this to register pointer and touch listeners with\n * `passive: false` only when the environment understands passive options.\n *\n * @example\n * ```ts\n * const canUsePassiveListeners = passiveEventSupported()\n * ```\n */\nexport function passiveEventSupported() {\n if (typeof passiveSupported === 'boolean') return passiveSupported\n\n let supported = false\n try {\n const options = {\n get passive() {\n supported = true\n return false\n },\n }\n\n const noop = () => {}\n\n window.addEventListener('test', noop, options)\n window.removeEventListener('test', noop)\n } catch (err) {\n supported = false\n }\n passiveSupported = supported\n return passiveSupported\n}\n\n/**\n * Narrows an unknown event to a `touchstart` event.\n *\n * Column resizing uses this before reading touch coordinates and installing\n * touch-specific listeners.\n *\n * @example\n * ```ts\n * const isTouch = isTouchStartEvent(event)\n * ```\n */\nexport function isTouchStartEvent(e: unknown): e is TouchEvent {\n return (e as TouchEvent).type === 'touchstart'\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyBA,SAAgB,gCAAqD;CACnE,OAAO;EACL,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,kBAAkB;EAClB,mBAAmB,CAAC;CACtB;AACF;;;;;;;;;;;;AAaA,SAAgB,oBAId,QAAmD;CACnD,QACG,OAAO,UAAU,kBAAkB,UACnC,OAAO,MAAM,QAAQ,wBAAwB;AAElD;;;;;;;;;;;A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tC,IAAI,OAAO,qBAAqB,WAAW,OAAO;CAElD,IAAI,YAAY;CAChB,IAAI;EACF,MAAM,UAAU,EACd,IAAI,UAAU;GACZ,YAAY;GACZ,OAAO;EACT,EACF;EAEA,MAAM,aAAa,CAAC;EAEpB,OAAO,iBAAiB,QAAQ,MAAM,OAAO;EAC7C,OAAO,oBAAoB,QAAQ,IAAI;CACzC,SAAS,KAAK;EACZ,YAAY;CACd;CACA,mBAAmB;CACnB,OAAO;AACT;;;;;;;;;;;;AAaA,SAAgB,kBAAkB,GAA6B;CAC7D,OAAQ,EAAiB,SAAS;AACpC"}
|
|
@@ -163,19 +163,28 @@ function header_getResizeHandler(header, _contextDocument) {
|
|
|
163
163
|
return false;
|
|
164
164
|
},
|
|
165
165
|
upHandler: (e) => {
|
|
166
|
-
|
|
167
|
-
contextDocument?.removeEventListener("touchend", touchEvents.upHandler);
|
|
166
|
+
removeTouchEvents();
|
|
168
167
|
if (e.cancelable) {
|
|
169
168
|
e.preventDefault();
|
|
170
169
|
e.stopPropagation();
|
|
171
170
|
}
|
|
172
171
|
onEnd(e.touches[0]?.clientX);
|
|
172
|
+
},
|
|
173
|
+
cancelHandler: () => {
|
|
174
|
+
removeTouchEvents();
|
|
175
|
+
onEnd();
|
|
173
176
|
}
|
|
174
177
|
};
|
|
178
|
+
const removeTouchEvents = () => {
|
|
179
|
+
contextDocument?.removeEventListener("touchmove", touchEvents.moveHandler);
|
|
180
|
+
contextDocument?.removeEventListener("touchend", touchEvents.upHandler);
|
|
181
|
+
contextDocument?.removeEventListener("touchcancel", touchEvents.cancelHandler);
|
|
182
|
+
};
|
|
175
183
|
const passiveIfSupported = passiveEventSupported() ? { passive: false } : false;
|
|
176
184
|
if (isTouchStartEvent(event)) {
|
|
177
185
|
contextDocument?.addEventListener("touchmove", touchEvents.moveHandler, passiveIfSupported);
|
|
178
186
|
contextDocument?.addEventListener("touchend", touchEvents.upHandler, passiveIfSupported);
|
|
187
|
+
contextDocument?.addEventListener("touchcancel", touchEvents.cancelHandler, passiveIfSupported);
|
|
179
188
|
} else {
|
|
180
189
|
contextDocument?.addEventListener("mousemove", mouseEvents.moveHandler, passiveIfSupported);
|
|
181
190
|
contextDocument?.addEventListener("mouseup", mouseEvents.upHandler, passiveIfSupported);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columnResizingFeature.utils.js","names":[],"sources":["../../../src/features/column-resizing/columnResizingFeature.utils.ts"],"sourcesContent":["import {\n column_getSize,\n header_getSize,\n table_setColumnSizing,\n} from '../column-sizing/columnSizingFeature.utils'\nimport { cloneState, makeObjectMap } from '../../utils'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Header } from '../../types/Header'\nimport type { Column_Internal } from '../../types/Column'\nimport type { ColumnSizingState } from '../column-sizing/columnSizingFeature.types'\nimport type { columnResizingState } from './columnResizingFeature.types'\n\n/**\n * Creates the default transient column resizing state.\n *\n * The feature default represents no active drag interaction. Reset APIs use\n * this value when `defaultState` is `true`.\n *\n * @example\n * ```ts\n * const resizeInfo = getDefaultColumnResizingState()\n * ```\n */\nexport function getDefaultColumnResizingState(): columnResizingState {\n return {\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n isResizingColumn: false,\n columnSizingStart: [],\n }\n}\n\n/**\n * Checks whether this column can start a resize interaction.\n *\n * Both `columnDef.enableResizing` and table `enableColumnResizing` default to\n * `true`.\n *\n * @example\n * ```ts\n * const canResize = column_getCanResize(column)\n * ```\n */\nexport function column_getCanResize<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n return (\n (column.columnDef.enableResizing ?? true) &&\n (column.table.options.enableColumnResizing ?? true)\n )\n}\n\n/**\n * Checks whether this column is the active column resize target.\n *\n * The value is read from `state.columnResizing.isResizingColumn`.\n *\n * @example\n * ```ts\n * const isResizing = column_getIsResizing(column)\n * ```\n */\nexport function column_getIsResizing<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n return (\n column.table.atoms.columnResizing?.get()?.isResizingColumn === column.id\n )\n}\n\n/**\n * Creates the pointer/touch start handler for resizing a header.\n *\n * The handler records starting sizes for all leaf headers, tracks drag deltas,\n * writes transient resize info, and commits column sizes on change or drag end\n * depending on `columnResizeMode`.\n *\n * @example\n * ```ts\n * const onMouseDown = header_getResizeHandler(header)\n * ```\n */\nexport function header_getResizeHandler<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(header: Header<TFeatures, TData, TValue>, _contextDocument?: Document) {\n const column = header.table.getColumn(header.column.id)!\n const canResize = column_getCanResize(column)\n\n return (event: unknown) => {\n if (!canResize) {\n return\n }\n\n ;(event as any).persist?.()\n\n if (isTouchStartEvent(event)) {\n // lets not respond to multiple touches (e.g. 2 or 3 fingers)\n if (event.touches.length > 1) {\n return\n }\n }\n\n const startSize = header_getSize(header)\n\n const columnSizingStart: Array<[string, number]> = header\n .getLeafHeaders()\n .map((leafHeader) => [\n leafHeader.column.id,\n column_getSize(leafHeader.column),\n ])\n\n const clientX = isTouchStartEvent(event)\n ? Math.round(event.touches[0]!.clientX)\n : (event as MouseEvent).clientX\n\n const newColumnSizing: ColumnSizingState = makeObjectMap()\n\n const updateOffset = (eventType: 'move' | 'end', clientXPos?: number) => {\n if (typeof clientXPos !== 'number') {\n return\n }\n\n const table = column.table\n const isCommit =\n table.options.columnResizeMode === 'onChange' || eventType === 'end'\n\n // one notification flush per tick instead of two\n table._reactivity.batch(() => {\n table_setColumnResizing(table, (old) => {\n const deltaDirection =\n table.options.columnResizeDirection === 'rtl' ? -1 : 1\n const deltaOffset =\n (clientXPos - (old.startOffset ?? 0)) * deltaDirection\n const startSize = old.startSize ?? 0\n const deltaPercentage = Math.max(\n startSize > 0 ? deltaOffset / startSize : 0,\n -0.999999,\n )\n\n // new sizes are only read at commit and are recomputed from\n // absolute positions each time, so skip them on onEnd-mode moves\n if (isCommit) {\n const columnSizingStart = old.columnSizingStart\n for (let i = 0; i < columnSizingStart.length; i++) {\n const entry = columnSizingStart[i]!\n const headerSize = entry[1]\n newColumnSizing[entry[0]] =\n Math.round(\n Math.max(\n headerSize > 0\n ? headerSize + headerSize * deltaPercentage\n : deltaOffset / columnSizingStart.length,\n 0,\n ) * 100,\n ) / 100\n }\n }\n\n return {\n ...old,\n deltaOffset,\n deltaPercentage,\n }\n })\n\n if (isCommit) {\n table_setColumnSizing(table, (old) =>\n Object.assign(makeObjectMap<number>(), old, newColumnSizing),\n )\n }\n })\n }\n\n // Pointer devices can report at several times the display refresh rate,\n // and every update between frames is overwritten by the next one. Apply\n // the first move of a frame immediately, then coalesce the rest into one\n // update per animation frame.\n let moveRafId: number | null = null\n let hasPendingMove = false\n let latestMoveX: number | undefined\n\n const flushMove = () => {\n if (hasPendingMove) {\n hasPendingMove = false\n updateOffset('move', latestMoveX)\n moveRafId = requestAnimationFrame(flushMove)\n } else {\n moveRafId = null\n }\n }\n\n const onMove = (clientXPos?: number) => {\n latestMoveX = clientXPos\n if (typeof requestAnimationFrame !== 'function') {\n updateOffset('move', clientXPos)\n return\n }\n if (moveRafId !== null) {\n hasPendingMove = true\n return\n }\n updateOffset('move', clientXPos)\n moveRafId = requestAnimationFrame(flushMove)\n }\n\n const onEnd = (clientXPos?: number) => {\n if (moveRafId !== null) {\n cancelAnimationFrame(moveRafId)\n moveRafId = null\n hasPendingMove = false\n }\n\n // batch the 'end' commit and the reset into one notification flush\n column.table._reactivity.batch(() => {\n // touchend events carry no touch position, so fall back to the last\n // observed move position for the final commit\n updateOffset('end', clientXPos ?? latestMoveX)\n\n table_setColumnResizing(column.table, (old) => ({\n ...old,\n isResizingColumn: false,\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n columnSizingStart: [],\n }))\n })\n }\n\n const contextDocument =\n _contextDocument || typeof document !== 'undefined' ? document : null\n\n const mouseEvents = {\n moveHandler: (e: MouseEvent) => onMove(e.clientX),\n upHandler: (e: MouseEvent) => {\n contextDocument?.removeEventListener(\n 'mousemove',\n mouseEvents.moveHandler,\n )\n contextDocument?.removeEventListener('mouseup', mouseEvents.upHandler)\n onEnd(e.clientX)\n },\n }\n\n const touchEvents = {\n moveHandler: (touchEvent: TouchEvent) => {\n if (touchEvent.cancelable) {\n touchEvent.preventDefault()\n touchEvent.stopPropagation()\n }\n onMove(touchEvent.touches[0]!.clientX)\n return false\n },\n upHandler: (e: TouchEvent) => {\n contextDocument?.removeEventListener(\n 'touchmove',\n touchEvents.moveHandler,\n )\n contextDocument?.removeEventListener('touchend', touchEvents.upHandler)\n if (e.cancelable) {\n e.preventDefault()\n e.stopPropagation()\n }\n onEnd(e.touches[0]?.clientX)\n },\n }\n\n const passiveIfSupported = passiveEventSupported()\n ? { passive: false }\n : false\n\n if (isTouchStartEvent(event)) {\n contextDocument?.addEventListener(\n 'touchmove',\n touchEvents.moveHandler,\n passiveIfSupported,\n )\n contextDocument?.addEventListener(\n 'touchend',\n touchEvents.upHandler,\n passiveIfSupported,\n )\n } else {\n contextDocument?.addEventListener(\n 'mousemove',\n mouseEvents.moveHandler,\n passiveIfSupported,\n )\n contextDocument?.addEventListener(\n 'mouseup',\n mouseEvents.upHandler,\n passiveIfSupported,\n )\n }\n\n table_setColumnResizing(column.table, (old) => ({\n ...old,\n startOffset: clientX,\n startSize,\n deltaOffset: 0,\n deltaPercentage: 0,\n columnSizingStart,\n isResizingColumn: column.id,\n }))\n }\n}\n\n/**\n * Routes a transient column resizing updater through the table's resize handler.\n *\n * This state tracks the active drag interaction; committed widths live in\n * `columnSizing`.\n *\n * @example\n * ```ts\n * table_setColumnResizing(table, (old) => ({ ...old, deltaOffset: 12 }))\n * ```\n */\nexport function table_setColumnResizing<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n updater: Updater<columnResizingState>,\n) {\n table.options.onColumnResizingChange?.(updater)\n}\n\n/**\n * Resets `columnResizing` to the configured initial state or feature default.\n *\n * With no argument, the reset clones `table.initialState.columnResizing` when\n * it exists. Passing `true` ignores initial state and resets to the no-drag\n * default state.\n *\n * @example\n * ```ts\n * table_resetHeaderSizeInfo(table)\n * table_resetHeaderSizeInfo(table, true)\n * ```\n */\nexport function table_resetHeaderSizeInfo<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n table_setColumnResizing(\n table,\n defaultState\n ? getDefaultColumnResizingState()\n : cloneState(\n table.initialState.columnResizing ?? getDefaultColumnResizingState(),\n ),\n )\n}\n\nlet passiveSupported: boolean | null = null\n/**\n * Detects whether the current environment supports passive event listeners.\n *\n * Column resizing uses this to register pointer and touch listeners with\n * `passive: false` only when the environment understands passive options.\n *\n * @example\n * ```ts\n * const canUsePassiveListeners = passiveEventSupported()\n * ```\n */\nexport function passiveEventSupported() {\n if (typeof passiveSupported === 'boolean') return passiveSupported\n\n let supported = false\n try {\n const options = {\n get passive() {\n supported = true\n return false\n },\n }\n\n const noop = () => {}\n\n window.addEventListener('test', noop, options)\n window.removeEventListener('test', noop)\n } catch (err) {\n supported = false\n }\n passiveSupported = supported\n return passiveSupported\n}\n\n/**\n * Narrows an unknown event to a `touchstart` event.\n *\n * Column resizing uses this before reading touch coordinates and installing\n * touch-specific listeners.\n *\n * @example\n * ```ts\n * const isTouch = isTouchStartEvent(event)\n * ```\n */\nexport function isTouchStartEvent(e: unknown): e is TouchEvent {\n return (e as TouchEvent).type === 'touchstart'\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyBA,SAAgB,gCAAqD;CACnE,OAAO;EACL,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,kBAAkB;EAClB,mBAAmB,CAAC;CACtB;AACF;;;;;;;;;;;;AAaA,SAAgB,oBAId,QAAmD;CACnD,QACG,OAAO,U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,OAAO;EACT,EACF;EAEA,MAAM,aAAa,CAAC;EAEpB,OAAO,iBAAiB,QAAQ,MAAM,OAAO;EAC7C,OAAO,oBAAoB,QAAQ,IAAI;CACzC,SAAS,KAAK;EACZ,YAAY;CACd;CACA,mBAAmB;CACnB,OAAO;AACT;;;;;;;;;;;;AAaA,SAAgB,kBAAkB,GAA6B;CAC7D,OAAQ,EAAiB,SAAS;AACpC"}
|
|
1
|
+
{"version":3,"file":"columnResizingFeature.utils.js","names":[],"sources":["../../../src/features/column-resizing/columnResizingFeature.utils.ts"],"sourcesContent":["import {\n column_getSize,\n header_getSize,\n table_setColumnSizing,\n} from '../column-sizing/columnSizingFeature.utils'\nimport { cloneState, makeObjectMap } from '../../utils'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Header } from '../../types/Header'\nimport type { Column_Internal } from '../../types/Column'\nimport type { ColumnSizingState } from '../column-sizing/columnSizingFeature.types'\nimport type { columnResizingState } from './columnResizingFeature.types'\n\n/**\n * Creates the default transient column resizing state.\n *\n * The feature default represents no active drag interaction. Reset APIs use\n * this value when `defaultState` is `true`.\n *\n * @example\n * ```ts\n * const resizeInfo = getDefaultColumnResizingState()\n * ```\n */\nexport function getDefaultColumnResizingState(): columnResizingState {\n return {\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n isResizingColumn: false,\n columnSizingStart: [],\n }\n}\n\n/**\n * Checks whether this column can start a resize interaction.\n *\n * Both `columnDef.enableResizing` and table `enableColumnResizing` default to\n * `true`.\n *\n * @example\n * ```ts\n * const canResize = column_getCanResize(column)\n * ```\n */\nexport function column_getCanResize<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n return (\n (column.columnDef.enableResizing ?? true) &&\n (column.table.options.enableColumnResizing ?? true)\n )\n}\n\n/**\n * Checks whether this column is the active column resize target.\n *\n * The value is read from `state.columnResizing.isResizingColumn`.\n *\n * @example\n * ```ts\n * const isResizing = column_getIsResizing(column)\n * ```\n */\nexport function column_getIsResizing<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n return (\n column.table.atoms.columnResizing?.get()?.isResizingColumn === column.id\n )\n}\n\n/**\n * Creates the pointer/touch start handler for resizing a header.\n *\n * The handler records starting sizes for all leaf headers, tracks drag deltas,\n * writes transient resize info, and commits column sizes on change or drag end\n * depending on `columnResizeMode`.\n *\n * @example\n * ```ts\n * const onMouseDown = header_getResizeHandler(header)\n * ```\n */\nexport function header_getResizeHandler<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(header: Header<TFeatures, TData, TValue>, _contextDocument?: Document) {\n const column = header.table.getColumn(header.column.id)!\n const canResize = column_getCanResize(column)\n\n return (event: unknown) => {\n if (!canResize) {\n return\n }\n\n ;(event as any).persist?.()\n\n if (isTouchStartEvent(event)) {\n // lets not respond to multiple touches (e.g. 2 or 3 fingers)\n if (event.touches.length > 1) {\n return\n }\n }\n\n const startSize = header_getSize(header)\n\n const columnSizingStart: Array<[string, number]> = header\n .getLeafHeaders()\n .map((leafHeader) => [\n leafHeader.column.id,\n column_getSize(leafHeader.column),\n ])\n\n const clientX = isTouchStartEvent(event)\n ? Math.round(event.touches[0]!.clientX)\n : (event as MouseEvent).clientX\n\n const newColumnSizing: ColumnSizingState = makeObjectMap()\n\n const updateOffset = (eventType: 'move' | 'end', clientXPos?: number) => {\n if (typeof clientXPos !== 'number') {\n return\n }\n\n const table = column.table\n const isCommit =\n table.options.columnResizeMode === 'onChange' || eventType === 'end'\n\n // one notification flush per tick instead of two\n table._reactivity.batch(() => {\n table_setColumnResizing(table, (old) => {\n const deltaDirection =\n table.options.columnResizeDirection === 'rtl' ? -1 : 1\n const deltaOffset =\n (clientXPos - (old.startOffset ?? 0)) * deltaDirection\n const startSize = old.startSize ?? 0\n const deltaPercentage = Math.max(\n startSize > 0 ? deltaOffset / startSize : 0,\n -0.999999,\n )\n\n // new sizes are only read at commit and are recomputed from\n // absolute positions each time, so skip them on onEnd-mode moves\n if (isCommit) {\n const columnSizingStart = old.columnSizingStart\n for (let i = 0; i < columnSizingStart.length; i++) {\n const entry = columnSizingStart[i]!\n const headerSize = entry[1]\n newColumnSizing[entry[0]] =\n Math.round(\n Math.max(\n headerSize > 0\n ? headerSize + headerSize * deltaPercentage\n : deltaOffset / columnSizingStart.length,\n 0,\n ) * 100,\n ) / 100\n }\n }\n\n return {\n ...old,\n deltaOffset,\n deltaPercentage,\n }\n })\n\n if (isCommit) {\n table_setColumnSizing(table, (old) =>\n Object.assign(makeObjectMap<number>(), old, newColumnSizing),\n )\n }\n })\n }\n\n // Pointer devices can report at several times the display refresh rate,\n // and every update between frames is overwritten by the next one. Apply\n // the first move of a frame immediately, then coalesce the rest into one\n // update per animation frame.\n let moveRafId: number | null = null\n let hasPendingMove = false\n let latestMoveX: number | undefined\n\n const flushMove = () => {\n if (hasPendingMove) {\n hasPendingMove = false\n updateOffset('move', latestMoveX)\n moveRafId = requestAnimationFrame(flushMove)\n } else {\n moveRafId = null\n }\n }\n\n const onMove = (clientXPos?: number) => {\n latestMoveX = clientXPos\n if (typeof requestAnimationFrame !== 'function') {\n updateOffset('move', clientXPos)\n return\n }\n if (moveRafId !== null) {\n hasPendingMove = true\n return\n }\n updateOffset('move', clientXPos)\n moveRafId = requestAnimationFrame(flushMove)\n }\n\n const onEnd = (clientXPos?: number) => {\n if (moveRafId !== null) {\n cancelAnimationFrame(moveRafId)\n moveRafId = null\n hasPendingMove = false\n }\n\n // batch the 'end' commit and the reset into one notification flush\n column.table._reactivity.batch(() => {\n // touchend events carry no touch position, so fall back to the last\n // observed move position for the final commit\n updateOffset('end', clientXPos ?? latestMoveX)\n\n table_setColumnResizing(column.table, (old) => ({\n ...old,\n isResizingColumn: false,\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n columnSizingStart: [],\n }))\n })\n }\n\n const contextDocument =\n _contextDocument || typeof document !== 'undefined' ? document : null\n\n const mouseEvents = {\n moveHandler: (e: MouseEvent) => onMove(e.clientX),\n upHandler: (e: MouseEvent) => {\n contextDocument?.removeEventListener(\n 'mousemove',\n mouseEvents.moveHandler,\n )\n contextDocument?.removeEventListener('mouseup', mouseEvents.upHandler)\n onEnd(e.clientX)\n },\n }\n\n const touchEvents = {\n moveHandler: (touchEvent: TouchEvent) => {\n if (touchEvent.cancelable) {\n touchEvent.preventDefault()\n touchEvent.stopPropagation()\n }\n onMove(touchEvent.touches[0]!.clientX)\n return false\n },\n upHandler: (e: TouchEvent) => {\n removeTouchEvents()\n if (e.cancelable) {\n e.preventDefault()\n e.stopPropagation()\n }\n onEnd(e.touches[0]?.clientX)\n },\n // the browser fires touchcancel instead of touchend when it takes over\n // the gesture (system gesture, scroll takeover, tab switch); without\n // this the non-passive touchmove listener stays on the document forever\n cancelHandler: () => {\n removeTouchEvents()\n onEnd()\n },\n }\n\n const removeTouchEvents = () => {\n contextDocument?.removeEventListener('touchmove', touchEvents.moveHandler)\n contextDocument?.removeEventListener('touchend', touchEvents.upHandler)\n contextDocument?.removeEventListener(\n 'touchcancel',\n touchEvents.cancelHandler,\n )\n }\n\n const passiveIfSupported = passiveEventSupported()\n ? { passive: false }\n : false\n\n if (isTouchStartEvent(event)) {\n contextDocument?.addEventListener(\n 'touchmove',\n touchEvents.moveHandler,\n passiveIfSupported,\n )\n contextDocument?.addEventListener(\n 'touchend',\n touchEvents.upHandler,\n passiveIfSupported,\n )\n contextDocument?.addEventListener(\n 'touchcancel',\n touchEvents.cancelHandler,\n passiveIfSupported,\n )\n } else {\n contextDocument?.addEventListener(\n 'mousemove',\n mouseEvents.moveHandler,\n passiveIfSupported,\n )\n contextDocument?.addEventListener(\n 'mouseup',\n mouseEvents.upHandler,\n passiveIfSupported,\n )\n }\n\n table_setColumnResizing(column.table, (old) => ({\n ...old,\n startOffset: clientX,\n startSize,\n deltaOffset: 0,\n deltaPercentage: 0,\n columnSizingStart,\n isResizingColumn: column.id,\n }))\n }\n}\n\n/**\n * Routes a transient column resizing updater through the table's resize handler.\n *\n * This state tracks the active drag interaction; committed widths live in\n * `columnSizing`.\n *\n * @example\n * ```ts\n * table_setColumnResizing(table, (old) => ({ ...old, deltaOffset: 12 }))\n * ```\n */\nexport function table_setColumnResizing<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n updater: Updater<columnResizingState>,\n) {\n table.options.onColumnResizingChange?.(updater)\n}\n\n/**\n * Resets `columnResizing` to the configured initial state or feature default.\n *\n * With no argument, the reset clones `table.initialState.columnResizing` when\n * it exists. Passing `true` ignores initial state and resets to the no-drag\n * default state.\n *\n * @example\n * ```ts\n * table_resetHeaderSizeInfo(table)\n * table_resetHeaderSizeInfo(table, true)\n * ```\n */\nexport function table_resetHeaderSizeInfo<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n table_setColumnResizing(\n table,\n defaultState\n ? getDefaultColumnResizingState()\n : cloneState(\n table.initialState.columnResizing ?? getDefaultColumnResizingState(),\n ),\n )\n}\n\nlet passiveSupported: boolean | null = null\n/**\n * Detects whether the current environment supports passive event listeners.\n *\n * Column resizing uses this to register pointer and touch listeners with\n * `passive: false` only when the environment understands passive options.\n *\n * @example\n * ```ts\n * const canUsePassiveListeners = passiveEventSupported()\n * ```\n */\nexport function passiveEventSupported() {\n if (typeof passiveSupported === 'boolean') return passiveSupported\n\n let supported = false\n try {\n const options = {\n get passive() {\n supported = true\n return false\n },\n }\n\n const noop = () => {}\n\n window.addEventListener('test', noop, options)\n window.removeEventListener('test', noop)\n } catch (err) {\n supported = false\n }\n passiveSupported = supported\n return passiveSupported\n}\n\n/**\n * Narrows an unknown event to a `touchstart` event.\n *\n * Column resizing uses this before reading touch coordinates and installing\n * touch-specific listeners.\n *\n * @example\n * ```ts\n * const isTouch = isTouchStartEvent(event)\n * ```\n */\nexport function isTouchStartEvent(e: unknown): e is TouchEvent {\n return (e as TouchEvent).type === 'touchstart'\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyBA,SAAgB,gCAAqD;CACnE,OAAO;EACL,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,kBAAkB;EAClB,mBAAmB,CAAC;CACtB;AACF;;;;;;;;;;;;AAaA,SAAgB,oBAId,QAAmD;CACnD,QACG,OAAO,UAAU,kBAAkB,UACnC,OAAO,MAAM,QAAQ,wBAAwB;AAElD;;;;;;;;;;;AAYA,SAAgB,qBAId,QAAmD;CACnD,OACE,OAAO,MAAM,MAAM,gBAAgB,IAAI,CAAC,EAAE,qBAAqB,OAAO;AAE1E;;;;;;;;;;;;;AAcA,SAAgB,wBAId,QAA0C,kBAA6B;CACvE,MAAM,SAAS,OAAO,MAAM,UAAU,OAAO,OAAO,EAAE;CACtD,MAAM,YAAY,oBAAoB,MAAM;CAE5C,QAAQ,UAAmB;EACzB,IAAI,CAAC,WACH;EAGD,AAAC,MAAc,UAAU;EAE1B,IAAI,kBAAkB,KAAK,GAEzB;OAAI,MAAM,QAAQ,SAAS,GACzB;EACF;EAGF,MAAM,YAAY,eAAe,MAAM;EAEvC,MAAM,oBAA6C,OAChD,eAAe,CAAC,CAChB,KAAK,eAAe,CACnB,WAAW,OAAO,IAClB,eAAe,WAAW,MAAM,CAClC,CAAC;EAEH,MAAM,UAAU,kBAAkB,KAAK,IACnC,KAAK,MAAM,MAAM,QAAQ,EAAE,CAAE,OAAO,IACnC,MAAqB;EAE1B,MAAM,kBAAqC,cAAc;EAEzD,MAAM,gBAAgB,WAA2B,eAAwB;GACvE,IAAI,OAAO,eAAe,UACxB;GAGF,MAAM,QAAQ,OAAO;GACrB,MAAM,WACJ,MAAM,QAAQ,qBAAqB,cAAc,cAAc;GAGjE,MAAM,YAAY,YAAY;IAC5B,wBAAw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AO,QAAQ,SAAS;GAC9C,GAAG;GACH,aAAa;GACb;GACA,aAAa;GACb,iBAAiB;GACjB;GACA,kBAAkB,OAAO;EAC3B,EAAE;CACJ;AACF;;;;;;;;;;;;AAaA,SAAgB,wBAId,OACA,SACA;CACA,MAAM,QAAQ,yBAAyB,OAAO;AAChD;;;;;;;;;;;;;;AAeA,SAAgB,0BAGd,OAAyC,cAAwB;CACjE,wBACE,OACA,eACI,8BAA8B,IAC9B,WACE,MAAM,aAAa,kBAAkB,8BAA8B,CACrE,CACN;AACF;AAEA,IAAI,mBAAmC;;;;;;;;;;;;AAYvC,SAAgB,wBAAwB;CACtC,IAAI,OAAO,qBAAqB,WAAW,OAAO;CAElD,IAAI,YAAY;CAChB,IAAI;EACF,MAAM,UAAU,EACd,IAAI,UAAU;GACZ,YAAY;GACZ,OAAO;EACT,EACF;EAEA,MAAM,aAAa,CAAC;EAEpB,OAAO,iBAAiB,QAAQ,MAAM,OAAO;EAC7C,OAAO,oBAAoB,QAAQ,IAAI;CACzC,SAAS,KAAK;EACZ,YAAY;CACd;CACA,mBAAmB;CACnB,OAAO;AACT;;;;;;;;;;;;AAaA,SAAgB,kBAAkB,GAA6B;CAC7D,OAAQ,EAAiB,SAAS;AACpC"}
|
package/dist/index.d.cts
CHANGED
|
@@ -31,7 +31,7 @@ import { CachedRowModel_Filtered, ColumnDef_ColumnFiltering, ColumnFilter, Colum
|
|
|
31
31
|
import { CachedRowModel_Paginated, PaginationDefaultOptions, PaginationState, TableOptions_RowPagination, TableState_RowPagination, Table_RowModels_Paginated, Table_RowPagination } from "./features/row-pagination/rowPaginationFeature.types.cjs";
|
|
32
32
|
import { CachedRowModel_Core, RowModel, Table_RowModels, Table_RowModels_Core } from "./core/row-models/coreRowModelsFeature.types.cjs";
|
|
33
33
|
import { CachedRowModel_Faceted, Column_ColumnFaceting, Table_ColumnFaceting, Table_RowModels_Faceted } from "./features/column-faceting/columnFacetingFeature.types.cjs";
|
|
34
|
-
import { ColumnOrderDefaultOptions, ColumnOrderState, Column_ColumnOrdering, TableOptions_ColumnOrdering, TableState_ColumnOrdering, Table_ColumnOrdering } from "./features/column-ordering/columnOrderingFeature.types.cjs";
|
|
34
|
+
import { ColumnIndexes, ColumnOrderDefaultOptions, ColumnOrderState, Column_ColumnOrdering, TableOptions_ColumnOrdering, TableState_ColumnOrdering, Table_ColumnOrdering } from "./features/column-ordering/columnOrderingFeature.types.cjs";
|
|
35
35
|
import { CachedRowModel_All, CachedRowModels, CachedRowModels_FeatureMap } from "./types/RowModel.cjs";
|
|
36
36
|
import { RowModelFns, RowModelFns_All, RowModelFns_Core, RowModelFns_FeatureMap } from "./types/RowModelFns.cjs";
|
|
37
37
|
import { TableState, TableState_All, TableState_FeatureMap } from "./types/TableState.cjs";
|
|
@@ -76,4 +76,4 @@ import { createGroupedRowModel } from "./features/column-grouping/createGroupedR
|
|
|
76
76
|
import { createExpandedRowModel, expandRows } from "./features/row-expanding/createExpandedRowModel.cjs";
|
|
77
77
|
import { createPaginatedRowModel } from "./features/row-pagination/createPaginatedRowModel.cjs";
|
|
78
78
|
import { createSortedRowModel } from "./features/row-sorting/createSortedRowModel.cjs";
|
|
79
|
-
export { API, APIObject, AccessorColumnDef, AccessorFn, AccessorFnColumnDef, AccessorFnColumnDefBase, AccessorKeyColumnDef, AccessorKeyColumnDefBase, AggregationFn, AggregationFnOption, AggregationFns, Atoms, Atoms_All, BaseAtoms, BaseAtoms_All, BuiltInAggregationFn, BuiltInFilterFn, BuiltInSortFn, CachedRowModel_All, CachedRowModel_Core, CachedRowModel_Expanded, CachedRowModel_Faceted, CachedRowModel_Filtered, CachedRowModel_Grouped, CachedRowModel_Paginated, CachedRowModel_Sorted, CachedRowModels, CachedRowModels_FeatureMap, Cell, CellContext, CellData, Cell_Cell, Cell_ColumnGrouping, Cell_Core, Cell_CoreProperties, Cell_FeatureMap, Column, ColumnDef, ColumnDefBase, ColumnDefBase_All, ColumnDefResolved, ColumnDefTemplate, ColumnDef_ColumnFiltering, ColumnDef_ColumnGrouping, ColumnDef_ColumnPinning, ColumnDef_ColumnResizing, ColumnDef_ColumnSizing, ColumnDef_ColumnVisibility, ColumnDef_FeatureMap, ColumnDef_GlobalFiltering, ColumnDef_RowSorting, ColumnDefaultOptions, ColumnFilter, ColumnFilterAutoRemoveTestFn, ColumnFiltersState, ColumnHelper, ColumnMeta, ColumnOffsets, ColumnOffsetsByPosition, ColumnOrderDefaultOptions, ColumnOrderState, ColumnPinningDefaultOptions, ColumnPinningPosition, ColumnPinningState, ColumnResizeDirection, ColumnResizeMode, ColumnResizingDefaultOptions, ColumnSizingDefaultOptions, ColumnSizingState, ColumnSort, ColumnVisibilityState, Column_Column, Column_ColumnFaceting, Column_ColumnFiltering, Column_ColumnGrouping, Column_ColumnOrdering, Column_ColumnPinning, Column_ColumnResizing, Column_ColumnSizing, Column_ColumnVisibility, Column_Core, Column_CoreProperties, Column_FeatureMap, Column_GlobalFiltering, Column_RowSorting, CoreFeatures, CustomAggregationFns, CustomFilterFns, CustomSortFns, DebugOptions, DeepKeys, DeepValue, DisplayColumnDef, ExpandedState, ExpandedStateList, ExternalAtoms, ExternalAtoms_All, ExtractAggregationFnKeys, ExtractColumnMeta, ExtractFeatureMapTypes, ExtractFilterFnKeys, ExtractFilterMeta, ExtractSortFnKeys, ExtractTableMeta, FeatureSlotPrereqs, FilterFn, FilterFnOption, FilterFns, FilterMeta, Getter, GroupColumnDef, GroupingColumnMode, GroupingState, Header, HeaderContext, HeaderGroup, HeaderGroup_Core, HeaderGroup_Header, Header_ColumnResizing, Header_ColumnSizing, Header_Core, Header_CoreProperties, Header_FeatureMap, Header_Header, IdIdentifier, IdentifiedColumnDef, IsAny, NoInfer, NonFeatureKeys, OnChangeFn, PaginationDefaultOptions, PaginationState, PartialKeys, Plugins, Prettify, PrototypeAPI, PrototypeAPIObject, RequiredKeys, ResolvedColumnFilter, Row, RowData, RowModel, RowModelFns, RowModelFns_All, RowModelFns_ColumnFiltering, RowModelFns_ColumnGrouping, RowModelFns_Core, RowModelFns_FeatureMap, RowModelFns_RowSorting, RowPinningDefaultOptions, RowPinningPosition, RowPinningState, RowSelectionState, Row_ColumnFiltering, Row_ColumnGrouping, Row_ColumnPinning, Row_ColumnVisibility, Row_Core, Row_CoreProperties, Row_FeatureMap, Row_Row, Row_RowExpanding, Row_RowPinning, Row_RowSelection, SortDirection, SortFn, SortFnOption, SortFns, SortingState, StockFeatures, StringHeaderIdentifier, StringOrTemplateHeader, Table, TableFeature, TableFeatures, TableMeta, TableOptions, TableOptions_All, TableOptions_Cell, TableOptions_ColumnFiltering, TableOptions_ColumnGrouping, TableOptions_ColumnOrdering, TableOptions_ColumnPinning, TableOptions_ColumnResizing, TableOptions_ColumnSizing, TableOptions_ColumnVisibility, TableOptions_Columns, TableOptions_Core, TableOptions_FeatureMap, TableOptions_GlobalFiltering, TableOptions_RowExpanding, TableOptions_RowPagination, TableOptions_RowPinning, TableOptions_RowSelection, TableOptions_RowSorting, TableOptions_Rows, TableOptions_Table, TableState, TableState_All, TableState_ColumnFiltering, TableState_ColumnGrouping, TableState_ColumnOrdering, TableState_ColumnPinning, TableState_ColumnResizing, TableState_ColumnSizing, TableState_ColumnVisibility, TableState_FeatureMap, TableState_GlobalFiltering, TableState_RowExpanding, TableState_RowPagination, TableState_RowPinning, TableState_RowSelection, TableState_RowSorting, Table_ColumnFaceting, Table_ColumnFiltering, Table_ColumnGrouping, Table_ColumnOrdering, Table_ColumnPinning, Table_ColumnResizing, Table_ColumnSizing, Table_ColumnVisibility, Table_Columns, Table_Core, Table_CoreProperties, Table_FeatureMap, Table_GlobalFiltering, Table_Headers, Table_RowExpanding, Table_RowModels, Table_RowModels_Core, Table_RowModels_Expanded, Table_RowModels_Faceted, Table_RowModels_Filtered, Table_RowModels_Grouped, Table_RowModels_Paginated, Table_RowModels_Sorted, Table_RowPagination, Table_RowPinning, Table_RowSelection, Table_RowSorting, Table_Rows, Table_Table, TransformFilterValueFn, UnionToIntersection, Updater, ValidateFeatureSlots, VisibilityDefaultOptions, aggregationFn_count, aggregationFn_extent, aggregationFn_max, aggregationFn_mean, aggregationFn_median, aggregationFn_min, aggregationFn_sum, aggregationFn_unique, aggregationFn_uniqueCount, aggregationFns, assignPrototypeAPIs, assignTableAPIs, buildHeaderGroups, callMemoOrStaticFn, cloneState, columnFacetingFeature, columnFilteringFeature, columnGroupingFeature, columnOrderingFeature, columnPinningFeature, columnResizingFeature, columnResizingState, columnSizingFeature, columnVisibilityFeature, constructCell, constructColumn, constructHeader, constructRow, constructTable, copyInstancePropertiesWithoutMemos, coreCellsFeature, coreColumnsFeature, coreFeatures, coreHeadersFeature, coreRowModelsFeature, coreRowsFeature, coreTablesFeature, createColumnHelper, createCoreRowModel, createExpandedRowModel, createFacetedMinMaxValues, createFacetedRowModel, createFacetedUniqueValues, createFilteredRowModel, createGroupedRowModel, createPaginatedRowModel, createSortedRowModel, expandRows, filterFn_arrHas, filterFn_arrIncludes, filterFn_arrIncludesAll, filterFn_arrIncludesSome, filterFn_equals, filterFn_equalsString, filterFn_equalsStringSensitive, filterFn_greaterThan, filterFn_greaterThanOrEqualTo, filterFn_inNumberRange, filterFn_includesString, filterFn_includesStringSensitive, filterFn_lessThan, filterFn_lessThanOrEqualTo, filterFn_weakEquals, filterFns, flattenBy, functionalUpdate, getFunctionNameInfo, getInitialTableState, globalFilteringFeature, hasOwn, isFunction, makeObjectMap, makeStateUpdater, memo, metaHelper, reSplitAlphaNumeric, rowExpandingFeature, rowPaginationFeature, rowPinningFeature, rowSelectionFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_alphanumericCaseSensitive, sortFn_basic, sortFn_datetime, sortFn_text, sortFn_textCaseSensitive, sortFns, stockFeatures, tableFeatures, tableMemo, tableOptions };
|
|
79
|
+
export { API, APIObject, AccessorColumnDef, AccessorFn, AccessorFnColumnDef, AccessorFnColumnDefBase, AccessorKeyColumnDef, AccessorKeyColumnDefBase, AggregationFn, AggregationFnOption, AggregationFns, Atoms, Atoms_All, BaseAtoms, BaseAtoms_All, BuiltInAggregationFn, BuiltInFilterFn, BuiltInSortFn, CachedRowModel_All, CachedRowModel_Core, CachedRowModel_Expanded, CachedRowModel_Faceted, CachedRowModel_Filtered, CachedRowModel_Grouped, CachedRowModel_Paginated, CachedRowModel_Sorted, CachedRowModels, CachedRowModels_FeatureMap, Cell, CellContext, CellData, Cell_Cell, Cell_ColumnGrouping, Cell_Core, Cell_CoreProperties, Cell_FeatureMap, Column, ColumnDef, ColumnDefBase, ColumnDefBase_All, ColumnDefResolved, ColumnDefTemplate, ColumnDef_ColumnFiltering, ColumnDef_ColumnGrouping, ColumnDef_ColumnPinning, ColumnDef_ColumnResizing, ColumnDef_ColumnSizing, ColumnDef_ColumnVisibility, ColumnDef_FeatureMap, ColumnDef_GlobalFiltering, ColumnDef_RowSorting, ColumnDefaultOptions, ColumnFilter, ColumnFilterAutoRemoveTestFn, ColumnFiltersState, ColumnHelper, ColumnIndexes, ColumnMeta, ColumnOffsets, ColumnOffsetsByPosition, ColumnOrderDefaultOptions, ColumnOrderState, ColumnPinningDefaultOptions, ColumnPinningPosition, ColumnPinningState, ColumnResizeDirection, ColumnResizeMode, ColumnResizingDefaultOptions, ColumnSizingDefaultOptions, ColumnSizingState, ColumnSort, ColumnVisibilityState, Column_Column, Column_ColumnFaceting, Column_ColumnFiltering, Column_ColumnGrouping, Column_ColumnOrdering, Column_ColumnPinning, Column_ColumnResizing, Column_ColumnSizing, Column_ColumnVisibility, Column_Core, Column_CoreProperties, Column_FeatureMap, Column_GlobalFiltering, Column_RowSorting, CoreFeatures, CustomAggregationFns, CustomFilterFns, CustomSortFns, DebugOptions, DeepKeys, DeepValue, DisplayColumnDef, ExpandedState, ExpandedStateList, ExternalAtoms, ExternalAtoms_All, ExtractAggregationFnKeys, ExtractColumnMeta, ExtractFeatureMapTypes, ExtractFilterFnKeys, ExtractFilterMeta, ExtractSortFnKeys, ExtractTableMeta, FeatureSlotPrereqs, FilterFn, FilterFnOption, FilterFns, FilterMeta, Getter, GroupColumnDef, GroupingColumnMode, GroupingState, Header, HeaderContext, HeaderGroup, HeaderGroup_Core, HeaderGroup_Header, Header_ColumnResizing, Header_ColumnSizing, Header_Core, Header_CoreProperties, Header_FeatureMap, Header_Header, IdIdentifier, IdentifiedColumnDef, IsAny, NoInfer, NonFeatureKeys, OnChangeFn, PaginationDefaultOptions, PaginationState, PartialKeys, Plugins, Prettify, PrototypeAPI, PrototypeAPIObject, RequiredKeys, ResolvedColumnFilter, Row, RowData, RowModel, RowModelFns, RowModelFns_All, RowModelFns_ColumnFiltering, RowModelFns_ColumnGrouping, RowModelFns_Core, RowModelFns_FeatureMap, RowModelFns_RowSorting, RowPinningDefaultOptions, RowPinningPosition, RowPinningState, RowSelectionState, Row_ColumnFiltering, Row_ColumnGrouping, Row_ColumnPinning, Row_ColumnVisibility, Row_Core, Row_CoreProperties, Row_FeatureMap, Row_Row, Row_RowExpanding, Row_RowPinning, Row_RowSelection, SortDirection, SortFn, SortFnOption, SortFns, SortingState, StockFeatures, StringHeaderIdentifier, StringOrTemplateHeader, Table, TableFeature, TableFeatures, TableMeta, TableOptions, TableOptions_All, TableOptions_Cell, TableOptions_ColumnFiltering, TableOptions_ColumnGrouping, TableOptions_ColumnOrdering, TableOptions_ColumnPinning, TableOptions_ColumnResizing, TableOptions_ColumnSizing, TableOptions_ColumnVisibility, TableOptions_Columns, TableOptions_Core, TableOptions_FeatureMap, TableOptions_GlobalFiltering, TableOptions_RowExpanding, TableOptions_RowPagination, TableOptions_RowPinning, TableOptions_RowSelection, TableOptions_RowSorting, TableOptions_Rows, TableOptions_Table, TableState, TableState_All, TableState_ColumnFiltering, TableState_ColumnGrouping, TableState_ColumnOrdering, TableState_ColumnPinning, TableState_ColumnResizing, TableState_ColumnSizing, TableState_ColumnVisibility, TableState_FeatureMap, TableState_GlobalFiltering, TableState_RowExpanding, TableState_RowPagination, TableState_RowPinning, TableState_RowSelection, TableState_RowSorting, Table_ColumnFaceting, Table_ColumnFiltering, Table_ColumnGrouping, Table_ColumnOrdering, Table_ColumnPinning, Table_ColumnResizing, Table_ColumnSizing, Table_ColumnVisibility, Table_Columns, Table_Core, Table_CoreProperties, Table_FeatureMap, Table_GlobalFiltering, Table_Headers, Table_RowExpanding, Table_RowModels, Table_RowModels_Core, Table_RowModels_Expanded, Table_RowModels_Faceted, Table_RowModels_Filtered, Table_RowModels_Grouped, Table_RowModels_Paginated, Table_RowModels_Sorted, Table_RowPagination, Table_RowPinning, Table_RowSelection, Table_RowSorting, Table_Rows, Table_Table, TransformFilterValueFn, UnionToIntersection, Updater, ValidateFeatureSlots, VisibilityDefaultOptions, aggregationFn_count, aggregationFn_extent, aggregationFn_max, aggregationFn_mean, aggregationFn_median, aggregationFn_min, aggregationFn_sum, aggregationFn_unique, aggregationFn_uniqueCount, aggregationFns, assignPrototypeAPIs, assignTableAPIs, buildHeaderGroups, callMemoOrStaticFn, cloneState, columnFacetingFeature, columnFilteringFeature, columnGroupingFeature, columnOrderingFeature, columnPinningFeature, columnResizingFeature, columnResizingState, columnSizingFeature, columnVisibilityFeature, constructCell, constructColumn, constructHeader, constructRow, constructTable, copyInstancePropertiesWithoutMemos, coreCellsFeature, coreColumnsFeature, coreFeatures, coreHeadersFeature, coreRowModelsFeature, coreRowsFeature, coreTablesFeature, createColumnHelper, createCoreRowModel, createExpandedRowModel, createFacetedMinMaxValues, createFacetedRowModel, createFacetedUniqueValues, createFilteredRowModel, createGroupedRowModel, createPaginatedRowModel, createSortedRowModel, expandRows, filterFn_arrHas, filterFn_arrIncludes, filterFn_arrIncludesAll, filterFn_arrIncludesSome, filterFn_equals, filterFn_equalsString, filterFn_equalsStringSensitive, filterFn_greaterThan, filterFn_greaterThanOrEqualTo, filterFn_inNumberRange, filterFn_includesString, filterFn_includesStringSensitive, filterFn_lessThan, filterFn_lessThanOrEqualTo, filterFn_weakEquals, filterFns, flattenBy, functionalUpdate, getFunctionNameInfo, getInitialTableState, globalFilteringFeature, hasOwn, isFunction, makeObjectMap, makeStateUpdater, memo, metaHelper, reSplitAlphaNumeric, rowExpandingFeature, rowPaginationFeature, rowPinningFeature, rowSelectionFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_alphanumericCaseSensitive, sortFn_basic, sortFn_datetime, sortFn_text, sortFn_textCaseSensitive, sortFns, stockFeatures, tableFeatures, tableMemo, tableOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ import { CachedRowModel_Filtered, ColumnDef_ColumnFiltering, ColumnFilter, Colum
|
|
|
31
31
|
import { CachedRowModel_Paginated, PaginationDefaultOptions, PaginationState, TableOptions_RowPagination, TableState_RowPagination, Table_RowModels_Paginated, Table_RowPagination } from "./features/row-pagination/rowPaginationFeature.types.js";
|
|
32
32
|
import { CachedRowModel_Core, RowModel, Table_RowModels, Table_RowModels_Core } from "./core/row-models/coreRowModelsFeature.types.js";
|
|
33
33
|
import { CachedRowModel_Faceted, Column_ColumnFaceting, Table_ColumnFaceting, Table_RowModels_Faceted } from "./features/column-faceting/columnFacetingFeature.types.js";
|
|
34
|
-
import { ColumnOrderDefaultOptions, ColumnOrderState, Column_ColumnOrdering, TableOptions_ColumnOrdering, TableState_ColumnOrdering, Table_ColumnOrdering } from "./features/column-ordering/columnOrderingFeature.types.js";
|
|
34
|
+
import { ColumnIndexes, ColumnOrderDefaultOptions, ColumnOrderState, Column_ColumnOrdering, TableOptions_ColumnOrdering, TableState_ColumnOrdering, Table_ColumnOrdering } from "./features/column-ordering/columnOrderingFeature.types.js";
|
|
35
35
|
import { CachedRowModel_All, CachedRowModels, CachedRowModels_FeatureMap } from "./types/RowModel.js";
|
|
36
36
|
import { RowModelFns, RowModelFns_All, RowModelFns_Core, RowModelFns_FeatureMap } from "./types/RowModelFns.js";
|
|
37
37
|
import { TableState, TableState_All, TableState_FeatureMap } from "./types/TableState.js";
|
|
@@ -76,4 +76,4 @@ import { createGroupedRowModel } from "./features/column-grouping/createGroupedR
|
|
|
76
76
|
import { createExpandedRowModel, expandRows } from "./features/row-expanding/createExpandedRowModel.js";
|
|
77
77
|
import { createPaginatedRowModel } from "./features/row-pagination/createPaginatedRowModel.js";
|
|
78
78
|
import { createSortedRowModel } from "./features/row-sorting/createSortedRowModel.js";
|
|
79
|
-
export { API, APIObject, AccessorColumnDef, AccessorFn, AccessorFnColumnDef, AccessorFnColumnDefBase, AccessorKeyColumnDef, AccessorKeyColumnDefBase, AggregationFn, AggregationFnOption, AggregationFns, Atoms, Atoms_All, BaseAtoms, BaseAtoms_All, BuiltInAggregationFn, BuiltInFilterFn, BuiltInSortFn, CachedRowModel_All, CachedRowModel_Core, CachedRowModel_Expanded, CachedRowModel_Faceted, CachedRowModel_Filtered, CachedRowModel_Grouped, CachedRowModel_Paginated, CachedRowModel_Sorted, CachedRowModels, CachedRowModels_FeatureMap, Cell, CellContext, CellData, Cell_Cell, Cell_ColumnGrouping, Cell_Core, Cell_CoreProperties, Cell_FeatureMap, Column, ColumnDef, ColumnDefBase, ColumnDefBase_All, ColumnDefResolved, ColumnDefTemplate, ColumnDef_ColumnFiltering, ColumnDef_ColumnGrouping, ColumnDef_ColumnPinning, ColumnDef_ColumnResizing, ColumnDef_ColumnSizing, ColumnDef_ColumnVisibility, ColumnDef_FeatureMap, ColumnDef_GlobalFiltering, ColumnDef_RowSorting, ColumnDefaultOptions, ColumnFilter, ColumnFilterAutoRemoveTestFn, ColumnFiltersState, ColumnHelper, ColumnMeta, ColumnOffsets, ColumnOffsetsByPosition, ColumnOrderDefaultOptions, ColumnOrderState, ColumnPinningDefaultOptions, ColumnPinningPosition, ColumnPinningState, ColumnResizeDirection, ColumnResizeMode, ColumnResizingDefaultOptions, ColumnSizingDefaultOptions, ColumnSizingState, ColumnSort, ColumnVisibilityState, Column_Column, Column_ColumnFaceting, Column_ColumnFiltering, Column_ColumnGrouping, Column_ColumnOrdering, Column_ColumnPinning, Column_ColumnResizing, Column_ColumnSizing, Column_ColumnVisibility, Column_Core, Column_CoreProperties, Column_FeatureMap, Column_GlobalFiltering, Column_RowSorting, CoreFeatures, CustomAggregationFns, CustomFilterFns, CustomSortFns, DebugOptions, DeepKeys, DeepValue, DisplayColumnDef, ExpandedState, ExpandedStateList, ExternalAtoms, ExternalAtoms_All, ExtractAggregationFnKeys, ExtractColumnMeta, ExtractFeatureMapTypes, ExtractFilterFnKeys, ExtractFilterMeta, ExtractSortFnKeys, ExtractTableMeta, FeatureSlotPrereqs, FilterFn, FilterFnOption, FilterFns, FilterMeta, Getter, GroupColumnDef, GroupingColumnMode, GroupingState, Header, HeaderContext, HeaderGroup, HeaderGroup_Core, HeaderGroup_Header, Header_ColumnResizing, Header_ColumnSizing, Header_Core, Header_CoreProperties, Header_FeatureMap, Header_Header, IdIdentifier, IdentifiedColumnDef, IsAny, NoInfer, NonFeatureKeys, OnChangeFn, PaginationDefaultOptions, PaginationState, PartialKeys, Plugins, Prettify, PrototypeAPI, PrototypeAPIObject, RequiredKeys, ResolvedColumnFilter, Row, RowData, RowModel, RowModelFns, RowModelFns_All, RowModelFns_ColumnFiltering, RowModelFns_ColumnGrouping, RowModelFns_Core, RowModelFns_FeatureMap, RowModelFns_RowSorting, RowPinningDefaultOptions, RowPinningPosition, RowPinningState, RowSelectionState, Row_ColumnFiltering, Row_ColumnGrouping, Row_ColumnPinning, Row_ColumnVisibility, Row_Core, Row_CoreProperties, Row_FeatureMap, Row_Row, Row_RowExpanding, Row_RowPinning, Row_RowSelection, SortDirection, SortFn, SortFnOption, SortFns, SortingState, StockFeatures, StringHeaderIdentifier, StringOrTemplateHeader, Table, TableFeature, TableFeatures, TableMeta, TableOptions, TableOptions_All, TableOptions_Cell, TableOptions_ColumnFiltering, TableOptions_ColumnGrouping, TableOptions_ColumnOrdering, TableOptions_ColumnPinning, TableOptions_ColumnResizing, TableOptions_ColumnSizing, TableOptions_ColumnVisibility, TableOptions_Columns, TableOptions_Core, TableOptions_FeatureMap, TableOptions_GlobalFiltering, TableOptions_RowExpanding, TableOptions_RowPagination, TableOptions_RowPinning, TableOptions_RowSelection, TableOptions_RowSorting, TableOptions_Rows, TableOptions_Table, TableState, TableState_All, TableState_ColumnFiltering, TableState_ColumnGrouping, TableState_ColumnOrdering, TableState_ColumnPinning, TableState_ColumnResizing, TableState_ColumnSizing, TableState_ColumnVisibility, TableState_FeatureMap, TableState_GlobalFiltering, TableState_RowExpanding, TableState_RowPagination, TableState_RowPinning, TableState_RowSelection, TableState_RowSorting, Table_ColumnFaceting, Table_ColumnFiltering, Table_ColumnGrouping, Table_ColumnOrdering, Table_ColumnPinning, Table_ColumnResizing, Table_ColumnSizing, Table_ColumnVisibility, Table_Columns, Table_Core, Table_CoreProperties, Table_FeatureMap, Table_GlobalFiltering, Table_Headers, Table_RowExpanding, Table_RowModels, Table_RowModels_Core, Table_RowModels_Expanded, Table_RowModels_Faceted, Table_RowModels_Filtered, Table_RowModels_Grouped, Table_RowModels_Paginated, Table_RowModels_Sorted, Table_RowPagination, Table_RowPinning, Table_RowSelection, Table_RowSorting, Table_Rows, Table_Table, TransformFilterValueFn, UnionToIntersection, Updater, ValidateFeatureSlots, VisibilityDefaultOptions, aggregationFn_count, aggregationFn_extent, aggregationFn_max, aggregationFn_mean, aggregationFn_median, aggregationFn_min, aggregationFn_sum, aggregationFn_unique, aggregationFn_uniqueCount, aggregationFns, assignPrototypeAPIs, assignTableAPIs, buildHeaderGroups, callMemoOrStaticFn, cloneState, columnFacetingFeature, columnFilteringFeature, columnGroupingFeature, columnOrderingFeature, columnPinningFeature, columnResizingFeature, columnResizingState, columnSizingFeature, columnVisibilityFeature, constructCell, constructColumn, constructHeader, constructRow, constructTable, copyInstancePropertiesWithoutMemos, coreCellsFeature, coreColumnsFeature, coreFeatures, coreHeadersFeature, coreRowModelsFeature, coreRowsFeature, coreTablesFeature, createColumnHelper, createCoreRowModel, createExpandedRowModel, createFacetedMinMaxValues, createFacetedRowModel, createFacetedUniqueValues, createFilteredRowModel, createGroupedRowModel, createPaginatedRowModel, createSortedRowModel, expandRows, filterFn_arrHas, filterFn_arrIncludes, filterFn_arrIncludesAll, filterFn_arrIncludesSome, filterFn_equals, filterFn_equalsString, filterFn_equalsStringSensitive, filterFn_greaterThan, filterFn_greaterThanOrEqualTo, filterFn_inNumberRange, filterFn_includesString, filterFn_includesStringSensitive, filterFn_lessThan, filterFn_lessThanOrEqualTo, filterFn_weakEquals, filterFns, flattenBy, functionalUpdate, getFunctionNameInfo, getInitialTableState, globalFilteringFeature, hasOwn, isFunction, makeObjectMap, makeStateUpdater, memo, metaHelper, reSplitAlphaNumeric, rowExpandingFeature, rowPaginationFeature, rowPinningFeature, rowSelectionFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_alphanumericCaseSensitive, sortFn_basic, sortFn_datetime, sortFn_text, sortFn_textCaseSensitive, sortFns, stockFeatures, tableFeatures, tableMemo, tableOptions };
|
|
79
|
+
export { API, APIObject, AccessorColumnDef, AccessorFn, AccessorFnColumnDef, AccessorFnColumnDefBase, AccessorKeyColumnDef, AccessorKeyColumnDefBase, AggregationFn, AggregationFnOption, AggregationFns, Atoms, Atoms_All, BaseAtoms, BaseAtoms_All, BuiltInAggregationFn, BuiltInFilterFn, BuiltInSortFn, CachedRowModel_All, CachedRowModel_Core, CachedRowModel_Expanded, CachedRowModel_Faceted, CachedRowModel_Filtered, CachedRowModel_Grouped, CachedRowModel_Paginated, CachedRowModel_Sorted, CachedRowModels, CachedRowModels_FeatureMap, Cell, CellContext, CellData, Cell_Cell, Cell_ColumnGrouping, Cell_Core, Cell_CoreProperties, Cell_FeatureMap, Column, ColumnDef, ColumnDefBase, ColumnDefBase_All, ColumnDefResolved, ColumnDefTemplate, ColumnDef_ColumnFiltering, ColumnDef_ColumnGrouping, ColumnDef_ColumnPinning, ColumnDef_ColumnResizing, ColumnDef_ColumnSizing, ColumnDef_ColumnVisibility, ColumnDef_FeatureMap, ColumnDef_GlobalFiltering, ColumnDef_RowSorting, ColumnDefaultOptions, ColumnFilter, ColumnFilterAutoRemoveTestFn, ColumnFiltersState, ColumnHelper, ColumnIndexes, ColumnMeta, ColumnOffsets, ColumnOffsetsByPosition, ColumnOrderDefaultOptions, ColumnOrderState, ColumnPinningDefaultOptions, ColumnPinningPosition, ColumnPinningState, ColumnResizeDirection, ColumnResizeMode, ColumnResizingDefaultOptions, ColumnSizingDefaultOptions, ColumnSizingState, ColumnSort, ColumnVisibilityState, Column_Column, Column_ColumnFaceting, Column_ColumnFiltering, Column_ColumnGrouping, Column_ColumnOrdering, Column_ColumnPinning, Column_ColumnResizing, Column_ColumnSizing, Column_ColumnVisibility, Column_Core, Column_CoreProperties, Column_FeatureMap, Column_GlobalFiltering, Column_RowSorting, CoreFeatures, CustomAggregationFns, CustomFilterFns, CustomSortFns, DebugOptions, DeepKeys, DeepValue, DisplayColumnDef, ExpandedState, ExpandedStateList, ExternalAtoms, ExternalAtoms_All, ExtractAggregationFnKeys, ExtractColumnMeta, ExtractFeatureMapTypes, ExtractFilterFnKeys, ExtractFilterMeta, ExtractSortFnKeys, ExtractTableMeta, FeatureSlotPrereqs, FilterFn, FilterFnOption, FilterFns, FilterMeta, Getter, GroupColumnDef, GroupingColumnMode, GroupingState, Header, HeaderContext, HeaderGroup, HeaderGroup_Core, HeaderGroup_Header, Header_ColumnResizing, Header_ColumnSizing, Header_Core, Header_CoreProperties, Header_FeatureMap, Header_Header, IdIdentifier, IdentifiedColumnDef, IsAny, NoInfer, NonFeatureKeys, OnChangeFn, PaginationDefaultOptions, PaginationState, PartialKeys, Plugins, Prettify, PrototypeAPI, PrototypeAPIObject, RequiredKeys, ResolvedColumnFilter, Row, RowData, RowModel, RowModelFns, RowModelFns_All, RowModelFns_ColumnFiltering, RowModelFns_ColumnGrouping, RowModelFns_Core, RowModelFns_FeatureMap, RowModelFns_RowSorting, RowPinningDefaultOptions, RowPinningPosition, RowPinningState, RowSelectionState, Row_ColumnFiltering, Row_ColumnGrouping, Row_ColumnPinning, Row_ColumnVisibility, Row_Core, Row_CoreProperties, Row_FeatureMap, Row_Row, Row_RowExpanding, Row_RowPinning, Row_RowSelection, SortDirection, SortFn, SortFnOption, SortFns, SortingState, StockFeatures, StringHeaderIdentifier, StringOrTemplateHeader, Table, TableFeature, TableFeatures, TableMeta, TableOptions, TableOptions_All, TableOptions_Cell, TableOptions_ColumnFiltering, TableOptions_ColumnGrouping, TableOptions_ColumnOrdering, TableOptions_ColumnPinning, TableOptions_ColumnResizing, TableOptions_ColumnSizing, TableOptions_ColumnVisibility, TableOptions_Columns, TableOptions_Core, TableOptions_FeatureMap, TableOptions_GlobalFiltering, TableOptions_RowExpanding, TableOptions_RowPagination, TableOptions_RowPinning, TableOptions_RowSelection, TableOptions_RowSorting, TableOptions_Rows, TableOptions_Table, TableState, TableState_All, TableState_ColumnFiltering, TableState_ColumnGrouping, TableState_ColumnOrdering, TableState_ColumnPinning, TableState_ColumnResizing, TableState_ColumnSizing, TableState_ColumnVisibility, TableState_FeatureMap, TableState_GlobalFiltering, TableState_RowExpanding, TableState_RowPagination, TableState_RowPinning, TableState_RowSelection, TableState_RowSorting, Table_ColumnFaceting, Table_ColumnFiltering, Table_ColumnGrouping, Table_ColumnOrdering, Table_ColumnPinning, Table_ColumnResizing, Table_ColumnSizing, Table_ColumnVisibility, Table_Columns, Table_Core, Table_CoreProperties, Table_FeatureMap, Table_GlobalFiltering, Table_Headers, Table_RowExpanding, Table_RowModels, Table_RowModels_Core, Table_RowModels_Expanded, Table_RowModels_Faceted, Table_RowModels_Filtered, Table_RowModels_Grouped, Table_RowModels_Paginated, Table_RowModels_Sorted, Table_RowPagination, Table_RowPinning, Table_RowSelection, Table_RowSorting, Table_Rows, Table_Table, TransformFilterValueFn, UnionToIntersection, Updater, ValidateFeatureSlots, VisibilityDefaultOptions, aggregationFn_count, aggregationFn_extent, aggregationFn_max, aggregationFn_mean, aggregationFn_median, aggregationFn_min, aggregationFn_sum, aggregationFn_unique, aggregationFn_uniqueCount, aggregationFns, assignPrototypeAPIs, assignTableAPIs, buildHeaderGroups, callMemoOrStaticFn, cloneState, columnFacetingFeature, columnFilteringFeature, columnGroupingFeature, columnOrderingFeature, columnPinningFeature, columnResizingFeature, columnResizingState, columnSizingFeature, columnVisibilityFeature, constructCell, constructColumn, constructHeader, constructRow, constructTable, copyInstancePropertiesWithoutMemos, coreCellsFeature, coreColumnsFeature, coreFeatures, coreHeadersFeature, coreRowModelsFeature, coreRowsFeature, coreTablesFeature, createColumnHelper, createCoreRowModel, createExpandedRowModel, createFacetedMinMaxValues, createFacetedRowModel, createFacetedUniqueValues, createFilteredRowModel, createGroupedRowModel, createPaginatedRowModel, createSortedRowModel, expandRows, filterFn_arrHas, filterFn_arrIncludes, filterFn_arrIncludesAll, filterFn_arrIncludesSome, filterFn_equals, filterFn_equalsString, filterFn_equalsStringSensitive, filterFn_greaterThan, filterFn_greaterThanOrEqualTo, filterFn_inNumberRange, filterFn_includesString, filterFn_includesStringSensitive, filterFn_lessThan, filterFn_lessThanOrEqualTo, filterFn_weakEquals, filterFns, flattenBy, functionalUpdate, getFunctionNameInfo, getInitialTableState, globalFilteringFeature, hasOwn, isFunction, makeObjectMap, makeStateUpdater, memo, metaHelper, reSplitAlphaNumeric, rowExpandingFeature, rowPaginationFeature, rowPinningFeature, rowSelectionFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_alphanumericCaseSensitive, sortFn_basic, sortFn_datetime, sortFn_text, sortFn_textCaseSensitive, sortFns, stockFeatures, tableFeatures, tableMemo, tableOptions };
|
|
@@ -153,6 +153,7 @@ exports.table_getCenterRows = require_rowPinningFeature_utils.table_getCenterRow
|
|
|
153
153
|
exports.table_getCenterTotalSize = require_columnSizingFeature_utils.table_getCenterTotalSize;
|
|
154
154
|
exports.table_getCenterVisibleLeafColumns = require_columnPinningFeature_utils.table_getCenterVisibleLeafColumns;
|
|
155
155
|
exports.table_getColumn = require_coreColumnsFeature_utils.table_getColumn;
|
|
156
|
+
exports.table_getColumnIndexes = require_columnOrderingFeature_utils.table_getColumnIndexes;
|
|
156
157
|
exports.table_getColumnOffsets = require_columnSizingFeature_utils.table_getColumnOffsets;
|
|
157
158
|
exports.table_getCoreRowModel = require_coreRowModelsFeature_utils.table_getCoreRowModel;
|
|
158
159
|
exports.table_getDefaultColumnDef = require_coreColumnsFeature_utils.table_getDefaultColumnDef;
|
|
@@ -7,7 +7,7 @@ import { table_mergeOptions, table_reset, table_setOptions, table_syncExternalSt
|
|
|
7
7
|
import { column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues } from "./features/column-faceting/columnFacetingFeature.utils.cjs";
|
|
8
8
|
import { column_getAutoFilterFn, column_getCanFilter, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getIsFiltered, column_setFilterValue, getDefaultColumnFiltersState, shouldAutoRemoveFilter, table_resetColumnFilters, table_setColumnFilters } from "./features/column-filtering/columnFilteringFeature.utils.cjs";
|
|
9
9
|
import { cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, column_getAggregationFn, column_getAutoAggregationFn, column_getCanGroup, column_getGroupedIndex, column_getIsGrouped, column_getToggleGroupingHandler, column_toggleGrouping, getDefaultGroupingState, row_getGroupingValue, row_getIsGrouped, table_resetGrouping, table_setGrouping } from "./features/column-grouping/columnGroupingFeature.utils.cjs";
|
|
10
|
-
import { column_getIndex, column_getIsFirstColumn, column_getIsLastColumn, getDefaultColumnOrderState, orderColumns, table_getOrderColumnsFn, table_resetColumnOrder, table_setColumnOrder } from "./features/column-ordering/columnOrderingFeature.utils.cjs";
|
|
10
|
+
import { column_getIndex, column_getIsFirstColumn, column_getIsLastColumn, getDefaultColumnOrderState, orderColumns, table_getColumnIndexes, table_getOrderColumnsFn, table_resetColumnOrder, table_setColumnOrder } from "./features/column-ordering/columnOrderingFeature.utils.cjs";
|
|
11
11
|
import { column_getCanPin, column_getIsPinned, column_getPinnedIndex, column_pin, getDefaultColumnPinningState, row_getCenterVisibleCells, row_getLeftVisibleCells, row_getRightVisibleCells, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterVisibleLeafColumns, table_getIsSomeColumnsPinned, table_getLeftFlatHeaders, table_getLeftFooterGroups, table_getLeftHeaderGroups, table_getLeftLeafColumns, table_getLeftLeafHeaders, table_getLeftVisibleLeafColumns, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getRightFlatHeaders, table_getRightFooterGroups, table_getRightHeaderGroups, table_getRightLeafColumns, table_getRightLeafHeaders, table_getRightVisibleLeafColumns, table_resetColumnPinning, table_setColumnPinning } from "./features/column-pinning/columnPinningFeature.utils.cjs";
|
|
12
12
|
import { column_getCanResize, column_getIsResizing, getDefaultColumnResizingState, header_getResizeHandler, isTouchStartEvent, passiveEventSupported, table_resetHeaderSizeInfo, table_setColumnResizing } from "./features/column-resizing/columnResizingFeature.utils.cjs";
|
|
13
13
|
import { column_getAfter, column_getSize, column_getStart, column_resetSize, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, header_getSize, header_getStart, table_getCenterTotalSize, table_getColumnOffsets, table_getLeftTotalSize, table_getRightTotalSize, table_getTotalSize, table_resetColumnSizing, table_setColumnSizing } from "./features/column-sizing/columnSizingFeature.utils.cjs";
|
|
@@ -18,4 +18,4 @@ import { getDefaultPaginationState, table_autoResetPageIndex, table_firstPage, t
|
|
|
18
18
|
import { getDefaultRowPinningState, row_getCanPin, row_getIsPinned, row_getPinnedIndex, row_pin, table_getBottomRows, table_getCenterRows, table_getIsSomeRowsPinned, table_getTopRows, table_resetRowPinning, table_setRowPinning } from "./features/row-pinning/rowPinningFeature.utils.cjs";
|
|
19
19
|
import { getDefaultRowSelectionState, isRowSelected, isSubRowSelected, row_getCanMultiSelect, row_getCanSelect, row_getCanSelectSubRows, row_getIsAllSubRowsSelected, row_getIsSelected, row_getIsSomeSelected, row_getToggleSelectedHandler, row_toggleSelected, selectRowsFn, table_getFilteredSelectedRowModel, table_getGroupedSelectedRowModel, table_getIsAllPageRowsSelected, table_getIsAllRowsSelected, table_getIsSomePageRowsSelected, table_getIsSomeRowsSelected, table_getPreSelectedRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsSelectedHandler, table_resetRowSelection, table_setRowSelection, table_toggleAllPageRowsSelected, table_toggleAllRowsSelected } from "./features/row-selection/rowSelectionFeature.utils.cjs";
|
|
20
20
|
import { column_clearSorting, column_getAutoSortDir, column_getAutoSortFn, column_getCanMultiSort, column_getCanSort, column_getFirstSortDir, column_getIsSorted, column_getNextSortingOrder, column_getSortFn, column_getSortIndex, column_getToggleSortingHandler, column_toggleSorting, getDefaultSortingState, table_resetSorting, table_setSorting } from "./features/row-sorting/rowSortingFeature.utils.cjs";
|
|
21
|
-
export { cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFn, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getLeftVisibleCells, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getRightVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getLeftFlatHeaders, table_getLeftFooterGroups, table_getLeftHeaderGroups, table_getLeftLeafColumns, table_getLeftLeafHeaders, table_getLeftTotalSize, table_getLeftVisibleLeafColumns, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRightFlatHeaders, table_getRightFooterGroups, table_getRightHeaderGroups, table_getRightLeafColumns, table_getRightLeafHeaders, table_getRightTotalSize, table_getRightVisibleLeafColumns, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
|
|
21
|
+
export { cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFn, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getLeftVisibleCells, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getRightVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getLeftFlatHeaders, table_getLeftFooterGroups, table_getLeftHeaderGroups, table_getLeftLeafColumns, table_getLeftLeafHeaders, table_getLeftTotalSize, table_getLeftVisibleLeafColumns, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRightFlatHeaders, table_getRightFooterGroups, table_getRightHeaderGroups, table_getRightLeafColumns, table_getRightLeafHeaders, table_getRightTotalSize, table_getRightVisibleLeafColumns, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
|
|
@@ -7,7 +7,7 @@ import { table_mergeOptions, table_reset, table_setOptions, table_syncExternalSt
|
|
|
7
7
|
import { column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues } from "./features/column-faceting/columnFacetingFeature.utils.js";
|
|
8
8
|
import { column_getAutoFilterFn, column_getCanFilter, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getIsFiltered, column_setFilterValue, getDefaultColumnFiltersState, shouldAutoRemoveFilter, table_resetColumnFilters, table_setColumnFilters } from "./features/column-filtering/columnFilteringFeature.utils.js";
|
|
9
9
|
import { cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, column_getAggregationFn, column_getAutoAggregationFn, column_getCanGroup, column_getGroupedIndex, column_getIsGrouped, column_getToggleGroupingHandler, column_toggleGrouping, getDefaultGroupingState, row_getGroupingValue, row_getIsGrouped, table_resetGrouping, table_setGrouping } from "./features/column-grouping/columnGroupingFeature.utils.js";
|
|
10
|
-
import { column_getIndex, column_getIsFirstColumn, column_getIsLastColumn, getDefaultColumnOrderState, orderColumns, table_getOrderColumnsFn, table_resetColumnOrder, table_setColumnOrder } from "./features/column-ordering/columnOrderingFeature.utils.js";
|
|
10
|
+
import { column_getIndex, column_getIsFirstColumn, column_getIsLastColumn, getDefaultColumnOrderState, orderColumns, table_getColumnIndexes, table_getOrderColumnsFn, table_resetColumnOrder, table_setColumnOrder } from "./features/column-ordering/columnOrderingFeature.utils.js";
|
|
11
11
|
import { column_getCanPin, column_getIsPinned, column_getPinnedIndex, column_pin, getDefaultColumnPinningState, row_getCenterVisibleCells, row_getLeftVisibleCells, row_getRightVisibleCells, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterVisibleLeafColumns, table_getIsSomeColumnsPinned, table_getLeftFlatHeaders, table_getLeftFooterGroups, table_getLeftHeaderGroups, table_getLeftLeafColumns, table_getLeftLeafHeaders, table_getLeftVisibleLeafColumns, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getRightFlatHeaders, table_getRightFooterGroups, table_getRightHeaderGroups, table_getRightLeafColumns, table_getRightLeafHeaders, table_getRightVisibleLeafColumns, table_resetColumnPinning, table_setColumnPinning } from "./features/column-pinning/columnPinningFeature.utils.js";
|
|
12
12
|
import { column_getCanResize, column_getIsResizing, getDefaultColumnResizingState, header_getResizeHandler, isTouchStartEvent, passiveEventSupported, table_resetHeaderSizeInfo, table_setColumnResizing } from "./features/column-resizing/columnResizingFeature.utils.js";
|
|
13
13
|
import { column_getAfter, column_getSize, column_getStart, column_resetSize, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, header_getSize, header_getStart, table_getCenterTotalSize, table_getColumnOffsets, table_getLeftTotalSize, table_getRightTotalSize, table_getTotalSize, table_resetColumnSizing, table_setColumnSizing } from "./features/column-sizing/columnSizingFeature.utils.js";
|
|
@@ -18,4 +18,4 @@ import { getDefaultPaginationState, table_autoResetPageIndex, table_firstPage, t
|
|
|
18
18
|
import { getDefaultRowPinningState, row_getCanPin, row_getIsPinned, row_getPinnedIndex, row_pin, table_getBottomRows, table_getCenterRows, table_getIsSomeRowsPinned, table_getTopRows, table_resetRowPinning, table_setRowPinning } from "./features/row-pinning/rowPinningFeature.utils.js";
|
|
19
19
|
import { getDefaultRowSelectionState, isRowSelected, isSubRowSelected, row_getCanMultiSelect, row_getCanSelect, row_getCanSelectSubRows, row_getIsAllSubRowsSelected, row_getIsSelected, row_getIsSomeSelected, row_getToggleSelectedHandler, row_toggleSelected, selectRowsFn, table_getFilteredSelectedRowModel, table_getGroupedSelectedRowModel, table_getIsAllPageRowsSelected, table_getIsAllRowsSelected, table_getIsSomePageRowsSelected, table_getIsSomeRowsSelected, table_getPreSelectedRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsSelectedHandler, table_resetRowSelection, table_setRowSelection, table_toggleAllPageRowsSelected, table_toggleAllRowsSelected } from "./features/row-selection/rowSelectionFeature.utils.js";
|
|
20
20
|
import { column_clearSorting, column_getAutoSortDir, column_getAutoSortFn, column_getCanMultiSort, column_getCanSort, column_getFirstSortDir, column_getIsSorted, column_getNextSortingOrder, column_getSortFn, column_getSortIndex, column_getToggleSortingHandler, column_toggleSorting, getDefaultSortingState, table_resetSorting, table_setSorting } from "./features/row-sorting/rowSortingFeature.utils.js";
|
|
21
|
-
export { cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFn, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getLeftVisibleCells, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getRightVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getLeftFlatHeaders, table_getLeftFooterGroups, table_getLeftHeaderGroups, table_getLeftLeafColumns, table_getLeftLeafHeaders, table_getLeftTotalSize, table_getLeftVisibleLeafColumns, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRightFlatHeaders, table_getRightFooterGroups, table_getRightHeaderGroups, table_getRightLeafColumns, table_getRightLeafHeaders, table_getRightTotalSize, table_getRightVisibleLeafColumns, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
|
|
21
|
+
export { cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFn, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getLeftVisibleCells, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getRightVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getLeftFlatHeaders, table_getLeftFooterGroups, table_getLeftHeaderGroups, table_getLeftLeafColumns, table_getLeftLeafHeaders, table_getLeftTotalSize, table_getLeftVisibleLeafColumns, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRightFlatHeaders, table_getRightFooterGroups, table_getRightHeaderGroups, table_getRightLeafColumns, table_getRightLeafHeaders, table_getRightTotalSize, table_getRightVisibleLeafColumns, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
|
package/dist/static-functions.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cell_getContext, cell_getValue, cell_renderValue } from "./core/cells/coreCellsFeature.utils.js";
|
|
2
2
|
import { column_getCanHide, column_getIsVisible, column_getToggleVisibilityHandler, column_toggleVisibility, getDefaultColumnVisibilityState, row_getVisibleCells, row_getVisibleCellsByColumnId, table_getIsAllColumnsVisible, table_getIsSomeColumnsVisible, table_getToggleAllColumnsVisibilityHandler, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_resetColumnVisibility, table_setColumnVisibility, table_toggleAllColumnsVisible } from "./features/column-visibility/columnVisibilityFeature.utils.js";
|
|
3
3
|
import { column_getCanPin, column_getIsPinned, column_getPinnedIndex, column_pin, getDefaultColumnPinningState, row_getCenterVisibleCells, row_getLeftVisibleCells, row_getRightVisibleCells, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterVisibleLeafColumns, table_getIsSomeColumnsPinned, table_getLeftFlatHeaders, table_getLeftFooterGroups, table_getLeftHeaderGroups, table_getLeftLeafColumns, table_getLeftLeafHeaders, table_getLeftVisibleLeafColumns, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getRightFlatHeaders, table_getRightFooterGroups, table_getRightHeaderGroups, table_getRightLeafColumns, table_getRightLeafHeaders, table_getRightVisibleLeafColumns, table_resetColumnPinning, table_setColumnPinning } from "./features/column-pinning/columnPinningFeature.utils.js";
|
|
4
|
-
import { column_getIndex, column_getIsFirstColumn, column_getIsLastColumn, getDefaultColumnOrderState, orderColumns, table_getOrderColumnsFn, table_resetColumnOrder, table_setColumnOrder } from "./features/column-ordering/columnOrderingFeature.utils.js";
|
|
4
|
+
import { column_getIndex, column_getIsFirstColumn, column_getIsLastColumn, getDefaultColumnOrderState, orderColumns, table_getColumnIndexes, table_getOrderColumnsFn, table_resetColumnOrder, table_setColumnOrder } from "./features/column-ordering/columnOrderingFeature.utils.js";
|
|
5
5
|
import { column_getFlatColumns, column_getLeafColumns, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getColumn, table_getDefaultColumnDef } from "./core/columns/coreColumnsFeature.utils.js";
|
|
6
6
|
import { header_getContext, header_getLeafHeaders, table_getFlatHeaders, table_getFooterGroups, table_getHeaderGroups, table_getLeafHeaders } from "./core/headers/coreHeadersFeature.utils.js";
|
|
7
7
|
import { getDefaultPaginationState, table_autoResetPageIndex, table_firstPage, table_getCanNextPage, table_getCanPreviousPage, table_getPageCount, table_getPageOptions, table_getRowCount, table_lastPage, table_nextPage, table_previousPage, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_setPageIndex, table_setPageSize, table_setPagination } from "./features/row-pagination/rowPaginationFeature.utils.js";
|
|
@@ -19,4 +19,4 @@ import { getDefaultRowPinningState, row_getCanPin, row_getIsPinned, row_getPinne
|
|
|
19
19
|
import { getDefaultRowSelectionState, isRowSelected, isSubRowSelected, row_getCanMultiSelect, row_getCanSelect, row_getCanSelectSubRows, row_getIsAllSubRowsSelected, row_getIsSelected, row_getIsSomeSelected, row_getToggleSelectedHandler, row_toggleSelected, selectRowsFn, table_getFilteredSelectedRowModel, table_getGroupedSelectedRowModel, table_getIsAllPageRowsSelected, table_getIsAllRowsSelected, table_getIsSomePageRowsSelected, table_getIsSomeRowsSelected, table_getPreSelectedRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsSelectedHandler, table_resetRowSelection, table_setRowSelection, table_toggleAllPageRowsSelected, table_toggleAllRowsSelected } from "./features/row-selection/rowSelectionFeature.utils.js";
|
|
20
20
|
import { column_clearSorting, column_getAutoSortDir, column_getAutoSortFn, column_getCanMultiSort, column_getCanSort, column_getFirstSortDir, column_getIsSorted, column_getNextSortingOrder, column_getSortFn, column_getSortIndex, column_getToggleSortingHandler, column_toggleSorting, getDefaultSortingState, table_resetSorting, table_setSorting } from "./features/row-sorting/rowSortingFeature.utils.js";
|
|
21
21
|
|
|
22
|
-
export { cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFn, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getLeftVisibleCells, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getRightVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getLeftFlatHeaders, table_getLeftFooterGroups, table_getLeftHeaderGroups, table_getLeftLeafColumns, table_getLeftLeafHeaders, table_getLeftTotalSize, table_getLeftVisibleLeafColumns, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRightFlatHeaders, table_getRightFooterGroups, table_getRightHeaderGroups, table_getRightLeafColumns, table_getRightLeafHeaders, table_getRightTotalSize, table_getRightVisibleLeafColumns, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
|
|
22
|
+
export { cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFn, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getLeftVisibleCells, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getRightVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getLeftFlatHeaders, table_getLeftFooterGroups, table_getLeftHeaderGroups, table_getLeftLeafColumns, table_getLeftLeafHeaders, table_getLeftTotalSize, table_getLeftVisibleLeafColumns, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRightFlatHeaders, table_getRightFooterGroups, table_getRightHeaderGroups, table_getRightLeafColumns, table_getRightLeafHeaders, table_getRightTotalSize, table_getRightVisibleLeafColumns, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
|
|
@@ -4,7 +4,7 @@ import { CachedRowModel_Grouped } from "../features/column-grouping/columnGroupi
|
|
|
4
4
|
import { CachedRowModel_Expanded } from "../features/row-expanding/rowExpandingFeature.types.cjs";
|
|
5
5
|
import { CachedRowModel_Filtered } from "../features/column-filtering/columnFilteringFeature.types.cjs";
|
|
6
6
|
import { CachedRowModel_Paginated } from "../features/row-pagination/rowPaginationFeature.types.cjs";
|
|
7
|
-
import { CachedRowModel_Core
|
|
7
|
+
import { CachedRowModel_Core } from "../core/row-models/coreRowModelsFeature.types.cjs";
|
|
8
8
|
import { CachedRowModel_Faceted } from "../features/column-faceting/columnFacetingFeature.types.cjs";
|
|
9
9
|
import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.cjs";
|
|
10
10
|
|
|
@@ -17,9 +17,7 @@ interface CachedRowModels_FeatureMap<in out TFeatures extends TableFeatures, in
|
|
|
17
17
|
rowPaginationFeature: CachedRowModel_Paginated<TFeatures, TData>;
|
|
18
18
|
rowSortingFeature: CachedRowModel_Sorted<TFeatures, TData>;
|
|
19
19
|
}
|
|
20
|
-
type CachedRowModels<TFeatures extends TableFeatures, TData extends RowData> =
|
|
21
|
-
CachedRowModel_Core: () => RowModel<TFeatures, TData>;
|
|
22
|
-
} & ExtractFeatureMapTypes<TFeatures, CachedRowModels_FeatureMap<TFeatures, TData>>;
|
|
20
|
+
type CachedRowModels<TFeatures extends TableFeatures, TData extends RowData> = Partial<CachedRowModel_Core<TFeatures, TData>> & ExtractFeatureMapTypes<TFeatures, CachedRowModels_FeatureMap<TFeatures, TData>>;
|
|
23
21
|
interface CachedRowModel_All<in out TFeatures extends TableFeatures, in out TData extends RowData = any> extends Partial<CachedRowModel_Core<TFeatures, TData> & CachedRowModel_Expanded<TFeatures, TData> & CachedRowModel_Faceted<TFeatures, TData> & CachedRowModel_Filtered<TFeatures, TData> & CachedRowModel_Grouped<TFeatures, TData> & CachedRowModel_Paginated<TFeatures, TData> & CachedRowModel_Sorted<TFeatures, TData>> {}
|
|
24
22
|
//#endregion
|
|
25
23
|
export { CachedRowModel_All, CachedRowModels, CachedRowModels_FeatureMap };
|
package/dist/types/RowModel.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { CachedRowModel_Grouped } from "../features/column-grouping/columnGroupi
|
|
|
4
4
|
import { CachedRowModel_Expanded } from "../features/row-expanding/rowExpandingFeature.types.js";
|
|
5
5
|
import { CachedRowModel_Filtered } from "../features/column-filtering/columnFilteringFeature.types.js";
|
|
6
6
|
import { CachedRowModel_Paginated } from "../features/row-pagination/rowPaginationFeature.types.js";
|
|
7
|
-
import { CachedRowModel_Core
|
|
7
|
+
import { CachedRowModel_Core } from "../core/row-models/coreRowModelsFeature.types.js";
|
|
8
8
|
import { CachedRowModel_Faceted } from "../features/column-faceting/columnFacetingFeature.types.js";
|
|
9
9
|
import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.js";
|
|
10
10
|
|
|
@@ -17,9 +17,7 @@ interface CachedRowModels_FeatureMap<in out TFeatures extends TableFeatures, in
|
|
|
17
17
|
rowPaginationFeature: CachedRowModel_Paginated<TFeatures, TData>;
|
|
18
18
|
rowSortingFeature: CachedRowModel_Sorted<TFeatures, TData>;
|
|
19
19
|
}
|
|
20
|
-
type CachedRowModels<TFeatures extends TableFeatures, TData extends RowData> =
|
|
21
|
-
CachedRowModel_Core: () => RowModel<TFeatures, TData>;
|
|
22
|
-
} & ExtractFeatureMapTypes<TFeatures, CachedRowModels_FeatureMap<TFeatures, TData>>;
|
|
20
|
+
type CachedRowModels<TFeatures extends TableFeatures, TData extends RowData> = Partial<CachedRowModel_Core<TFeatures, TData>> & ExtractFeatureMapTypes<TFeatures, CachedRowModels_FeatureMap<TFeatures, TData>>;
|
|
23
21
|
interface CachedRowModel_All<in out TFeatures extends TableFeatures, in out TData extends RowData = any> extends Partial<CachedRowModel_Core<TFeatures, TData> & CachedRowModel_Expanded<TFeatures, TData> & CachedRowModel_Faceted<TFeatures, TData> & CachedRowModel_Filtered<TFeatures, TData> & CachedRowModel_Grouped<TFeatures, TData> & CachedRowModel_Paginated<TFeatures, TData> & CachedRowModel_Sorted<TFeatures, TData>> {}
|
|
24
22
|
//#endregion
|
|
25
23
|
export { CachedRowModel_All, CachedRowModels, CachedRowModels_FeatureMap };
|
package/dist/utils.cjs
CHANGED
|
@@ -35,14 +35,15 @@ function cloneState(value) {
|
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Copies prototype-instance own properties without carrying over lazy memo
|
|
38
|
-
* closures
|
|
38
|
+
* closures or the per-row cell cache, both of which are bound to the source
|
|
39
|
+
* instance (cached cells reference the source row).
|
|
39
40
|
*/
|
|
40
41
|
function copyInstancePropertiesWithoutMemos(target, source) {
|
|
41
42
|
const keys = Object.keys(source);
|
|
42
43
|
const targetRecord = target;
|
|
43
44
|
for (let i = 0; i < keys.length; i++) {
|
|
44
45
|
const key = keys[i];
|
|
45
|
-
if (!key.startsWith("_memo_")) targetRecord[key] = source[key];
|
|
46
|
+
if (!key.startsWith("_memo_") && key !== "_cellsCache") targetRecord[key] = source[key];
|
|
46
47
|
}
|
|
47
48
|
return target;
|
|
48
49
|
}
|