From ca91baff4c72e4d1eca941a5952722224a58a24a Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 7 Dec 2025 02:02:42 +1100 Subject: [PATCH 1/2] ci: prepare for trusted publishing --- .github/ISSUE_TEMPLATE/config.yml | 7 +- .github/workflows/autofix.yml | 4 +- .github/workflows/pr.yml | 8 +- .github/workflows/release.yml | 5 +- .../angular/basic/src/app/app.component.ts | 18 +- examples/angular/basic/src/main.ts | 2 +- .../column-ordering/src/app/app.component.ts | 28 +- examples/angular/column-ordering/src/main.ts | 2 +- .../src/app/app.component.ts | 22 +- .../angular/column-pinning-sticky/src/main.ts | 2 +- .../column-pinning/src/app/app.component.ts | 30 +- examples/angular/column-pinning/src/main.ts | 2 +- .../src/app/app.component.ts | 28 +- .../src/app/resizable-cell.ts | 4 +- .../column-resizing-performant/src/main.ts | 2 +- .../src/app/app.component.ts | 24 +- .../angular/column-visibility/src/main.ts | 2 +- .../angular/editable/src/app/app.component.ts | 20 +- examples/angular/editable/src/main.ts | 2 +- .../expanding/src/app/app.component.ts | 22 +- examples/angular/expanding/src/main.ts | 2 +- .../angular/filters/src/app/app.component.ts | 10 +- .../src/app/debounced-input.directive.ts | 14 +- .../filters/src/app/table-filter.component.ts | 2 +- examples/angular/filters/src/main.ts | 2 +- examples/angular/grouping/src/app/columns.ts | 8 +- examples/angular/grouping/src/main.ts | 2 +- .../angular/row-dnd/src/app/app.component.ts | 10 +- examples/angular/row-dnd/src/main.ts | 2 +- .../src/app/app.component.ts | 32 +- .../angular/row-selection-signal/src/main.ts | 2 +- .../row-selection/src/app/app.component.ts | 32 +- examples/angular/row-selection/src/main.ts | 2 +- .../signal-input/src/app/app.component.ts | 4 +- .../person-table/person-table.component.ts | 8 +- examples/angular/signal-input/src/main.ts | 2 +- .../sub-components/src/app/app.component.ts | 22 +- examples/angular/sub-components/src/main.ts | 2 +- examples/lit/basic/src/main.ts | 62 +-- examples/lit/column-sizing/src/main.ts | 30 +- examples/lit/filters/src/main.ts | 36 +- examples/lit/row-selection/src/main.ts | 36 +- examples/lit/sorting-dynamic-data/src/main.ts | 34 +- examples/lit/sorting/src/main.ts | 30 +- examples/lit/virtualized-rows/src/main.ts | 40 +- examples/qwik/basic/src/main.tsx | 36 +- examples/qwik/filters/src/main.tsx | 44 +- examples/qwik/row-selection/src/main.tsx | 32 +- examples/qwik/sorting/src/main.tsx | 36 +- examples/react/basic/src/main.tsx | 38 +- examples/react/bootstrap/src/main.tsx | 40 +- examples/react/column-dnd/src/main.tsx | 24 +- examples/react/column-groups/src/main.tsx | 38 +- examples/react/column-ordering/src/main.tsx | 44 +- .../react/column-pinning-sticky/src/main.tsx | 36 +- examples/react/column-pinning/src/main.tsx | 66 +-- .../column-resizing-performant/src/main.tsx | 38 +- examples/react/column-sizing/src/main.tsx | 68 +-- examples/react/column-visibility/src/main.tsx | 42 +- examples/react/custom-features/src/main.tsx | 61 +-- examples/react/editable-data/src/main.tsx | 52 +-- examples/react/expanding/src/main.tsx | 46 +- examples/react/filters-faceted/src/main.tsx | 52 ++- examples/react/filters-fuzzy/src/main.tsx | 50 ++- examples/react/filters/src/main.tsx | 52 ++- .../full-width-resizable-table/src/main.tsx | 36 +- examples/react/full-width-table/src/main.tsx | 44 +- examples/react/fully-controlled/src/main.tsx | 48 +- examples/react/grouping/src/main.tsx | 34 +- examples/react/kitchen-sink/src/App.tsx | 10 +- .../src/components/ActionButtons.tsx | 8 +- .../src/components/CustomTable.tsx | 18 +- .../kitchen-sink/src/components/Filter.tsx | 8 +- examples/react/kitchen-sink/src/hooks.tsx | 2 +- examples/react/kitchen-sink/src/main.tsx | 2 +- .../react/kitchen-sink/src/tableModels.tsx | 40 +- .../material-ui-pagination/src/actions.tsx | 8 +- .../react/material-ui-pagination/src/main.tsx | 46 +- .../pagination-controlled/src/fetchData.ts | 4 +- .../react/pagination-controlled/src/main.tsx | 44 +- examples/react/pagination/src/main.tsx | 50 +-- .../src/api/user.ts | 10 +- .../src/components/debouncedInput.tsx | 2 +- .../src/components/table.tsx | 20 +- .../src/hooks/useFilters.ts | 4 +- .../query-router-search-params/src/main.tsx | 2 +- .../src/routes/index.tsx | 8 +- .../src/utils/cleanEmptyParams.ts | 4 +- examples/react/row-dnd/src/main.tsx | 28 +- examples/react/row-pinning/src/main.tsx | 42 +- examples/react/row-selection/src/main.tsx | 54 +-- examples/react/sorting/src/main.tsx | 22 +- examples/react/sub-components/src/main.tsx | 34 +- .../src/main.tsx | 32 +- .../src/makeData.ts | 4 +- .../react/virtualized-columns/src/main.tsx | 18 +- .../react/virtualized-columns/src/makeData.ts | 4 +- .../src/main.tsx | 40 +- .../src/makeData.ts | 4 +- .../src/main.tsx | 32 +- examples/react/virtualized-rows/src/main.tsx | 26 +- examples/solid/basic/src/App.tsx | 36 +- examples/solid/bootstrap/src/App.tsx | 40 +- examples/solid/column-groups/src/App.tsx | 40 +- examples/solid/column-ordering/src/App.tsx | 46 +- examples/solid/column-visibility/src/App.tsx | 44 +- examples/solid/filters/src/App.tsx | 38 +- examples/solid/filters/src/ColumnFilter.tsx | 14 +- examples/solid/sorting/src/App.tsx | 34 +- examples/svelte/basic/src/App.svelte | 24 +- examples/svelte/column-groups/src/App.svelte | 28 +- .../svelte/column-ordering/src/App.svelte | 40 +- examples/svelte/column-pinning/src/App.svelte | 56 +-- .../svelte/column-visibility/src/App.svelte | 34 +- examples/svelte/filtering/src/App.svelte | 8 +- examples/svelte/sorting/src/App.svelte | 34 +- examples/vanilla/basic/src/main.ts | 34 +- examples/vanilla/basic/src/useTable.ts | 8 +- examples/vanilla/pagination/src/main.ts | 49 ++- examples/vanilla/pagination/src/useTable.ts | 8 +- examples/vanilla/sorting/src/main.ts | 29 +- examples/vanilla/sorting/src/useTable.ts | 8 +- examples/vue/basic/src/App.vue | 22 +- examples/vue/column-ordering/src/App.vue | 28 +- examples/vue/column-pinning/src/App.vue | 30 +- examples/vue/filters/src/App.vue | 28 +- examples/vue/filters/src/DebouncedInput.vue | 2 +- examples/vue/filters/src/Filter.vue | 10 +- examples/vue/grouping/src/App.vue | 8 +- .../vue/pagination-controlled/src/App.vue | 4 +- .../pagination-controlled/src/useService.ts | 4 +- examples/vue/pagination/src/App.vue | 22 +- examples/vue/row-selection/src/App.vue | 24 +- examples/vue/sorting/src/App.vue | 24 +- examples/vue/sub-components/src/App.vue | 24 +- examples/vue/virtualized-rows/src/App.vue | 14 +- nx.json | 3 + package.json | 10 +- packages/angular-table/src/flex-render.ts | 22 +- .../flex-render/flex-render-component-ref.ts | 32 +- .../src/flex-render/flex-render-component.ts | 4 +- .../angular-table/src/flex-render/view.ts | 8 +- packages/angular-table/src/index.ts | 6 +- packages/angular-table/src/proxy.ts | 2 +- .../tests/createAngularTable.test.ts | 16 +- .../tests/flex-render-table.test.ts | 20 +- .../angular-table/tests/flex-render.test.ts | 2 +- .../angular-table/tests/lazy-init.test.ts | 4 +- packages/angular-table/tests/test-setup.ts | 2 +- packages/angular-table/tests/test-utils.ts | 6 +- packages/lit-table/rollup.config.mjs | 2 +- packages/lit-table/src/index.ts | 10 +- packages/match-sorter-utils/rollup.config.mjs | 2 +- packages/match-sorter-utils/src/index.ts | 20 +- .../match-sorter-utils/src/remove-accents.ts | 2 +- .../tests/match-sorter-utils.test.ts | 32 +- packages/qwik-table/rollup.config.mjs | 2 +- packages/qwik-table/src/index.tsx | 8 +- .../react-table-devtools/rollup.config.mjs | 2 +- .../react-table-devtools/src/Explorer.tsx | 24 +- packages/react-table-devtools/src/index.tsx | 4 +- .../src/styledComponents.ts | 6 +- .../src/useLocalStorage.ts | 8 +- packages/react-table-devtools/src/utils.ts | 12 +- packages/react-table/rollup.config.mjs | 2 +- packages/react-table/src/index.tsx | 10 +- packages/react-table/tests/core/core.test.tsx | 62 +-- .../tests/features/RowSelection.test.tsx | 22 +- .../tests/features/Visibility.test.tsx | 60 +-- .../features/useAbsoluteLayout.notest.js | 18 +- .../tests/features/useBlockLayout.notest.js | 20 +- .../tests/features/useColumnOrder.notest.js | 16 +- .../tests/features/useExpanded.notest.js | 10 +- .../tests/features/useFilters.notest.js | 38 +- .../features/useFiltersAndRowSelect.notest.js | 18 +- .../tests/features/useFlexLayout.notest.js | 16 +- .../tests/features/useGroupBy.notest.js | 16 +- .../tests/features/usePagination.notest.js | 25 +- .../tests/features/useResizeColumns.notest.js | 42 +- .../tests/features/useRowSelect.notest.js | 18 +- .../tests/features/useRowState.notest.js | 18 +- .../tests/features/withSorting.notest.tsx | 30 +- packages/solid-table/rollup.config.mjs | 2 +- packages/solid-table/src/index.tsx | 10 +- packages/svelte-table/rollup.config.mjs | 2 +- packages/svelte-table/src/index.ts | 8 +- packages/svelte-table/src/placeholder.ts | 2 +- packages/svelte-table/src/render-component.ts | 10 +- packages/table-core/rollup.config.mjs | 2 +- packages/table-core/src/aggregationFns.ts | 17 +- packages/table-core/src/columnHelper.ts | 6 +- packages/table-core/src/core/cell.ts | 8 +- packages/table-core/src/core/column.ts | 18 +- packages/table-core/src/core/headers.ts | 112 ++--- packages/table-core/src/core/row.ts | 26 +- packages/table-core/src/core/table.ts | 50 ++- .../table-core/src/features/ColumnFaceting.ts | 8 +- .../src/features/ColumnFiltering.ts | 45 +- .../table-core/src/features/ColumnGrouping.ts | 42 +- .../table-core/src/features/ColumnOrdering.ts | 26 +- .../table-core/src/features/ColumnPinning.ts | 81 ++-- .../table-core/src/features/ColumnSizing.ts | 68 +-- .../src/features/ColumnVisibility.ts | 64 +-- .../src/features/GlobalFiltering.ts | 16 +- .../table-core/src/features/RowExpanding.ts | 26 +- .../table-core/src/features/RowPagination.ts | 40 +- .../table-core/src/features/RowPinning.ts | 53 +-- .../table-core/src/features/RowSelection.ts | 82 ++-- .../table-core/src/features/RowSorting.ts | 45 +- packages/table-core/src/filterFns.ts | 26 +- packages/table-core/src/sortingFns.ts | 8 +- packages/table-core/src/types.ts | 68 +-- packages/table-core/src/utils.ts | 18 +- .../table-core/src/utils/filterRowsUtils.ts | 10 +- .../table-core/src/utils/getCoreRowModel.ts | 16 +- .../src/utils/getExpandedRowModel.ts | 6 +- .../src/utils/getFacetedMinMaxValues.ts | 10 +- .../src/utils/getFacetedRowModel.ts | 6 +- .../src/utils/getFacetedUniqueValues.ts | 10 +- .../src/utils/getFilteredRowModel.ts | 26 +- .../src/utils/getGroupedRowModel.ts | 30 +- .../src/utils/getPaginationRowModel.ts | 4 +- .../table-core/src/utils/getSortedRowModel.ts | 18 +- packages/table-core/tests/RowPinning.test.ts | 2 +- .../table-core/tests/RowSelection.test.ts | 32 +- .../tests/getGroupedRowModel.test.ts | 12 +- packages/vue-table/rollup.config.mjs | 2 +- packages/vue-table/src/index.ts | 18 +- packages/vue-table/src/merge-proxy.ts | 4 +- pnpm-lock.yaml | 410 ++++++++++++------ prettier.config.cjs | 13 - prettier.config.js | 12 + scripts/getRollupConfig.js | 4 +- scripts/verify-links.ts | 8 +- tsconfig.json | 4 +- 235 files changed, 2917 insertions(+), 2684 deletions(-) delete mode 100644 prettier.config.cjs create mode 100644 prettier.config.js diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 6a5ed2d4a4..963fe444ec 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,11 @@ blank_issues_enabled: false contact_links: - - name: Feature Requests & Questions + - name: šŸ¤” Feature Requests & Questions url: https://github.com/TanStack/table/discussions about: Please ask and answer questions here. - - name: Community Chat + - name: šŸ’¬ Community Chat url: https://discord.gg/mQd7egN about: A dedicated discord server hosted by TanStack + - name: šŸ¦‹ TanStack Bluesky + url: https://bsky.app/profile/tanstack.com + about: Stay up to date with new releases of our libraries diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 8ca8702155..e3bc82ecfd 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -18,13 +18,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Setup Tools uses: tanstack/config/.github/setup@main - name: Fix formatting - run: pnpm prettier:write + run: pnpm format - name: Apply fixes uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a with: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index db5a2157ca..ed8ac2b67e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Start Nx Agents @@ -31,7 +31,7 @@ jobs: - name: Setup Tools uses: tanstack/config/.github/setup@main - name: Get base and head commits for `nx affected` - uses: nrwl/nx-set-shas@v4.3.3 + uses: nrwl/nx-set-shas@v4.4.0 with: main-branch-name: main - name: Run Checks @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Setup Tools @@ -58,7 +58,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Check Provenance diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8348d7025a..7e0555074c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: ci +name: Release on: push: @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Start Nx Agents @@ -44,4 +44,3 @@ jobs: title: 'ci: Version Packages' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/examples/angular/basic/src/app/app.component.ts b/examples/angular/basic/src/app/app.component.ts index 29d0edb180..38495b0b7e 100644 --- a/examples/angular/basic/src/app/app.component.ts +++ b/examples/angular/basic/src/app/app.component.ts @@ -46,35 +46,35 @@ const defaultData: Person[] = [ const defaultColumns: ColumnDef[] = [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: info => info.column.id, + cell: (info) => info.getValue(), + footer: (info) => info.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => `${info.getValue()}`, + cell: (info) => `${info.getValue()}`, header: () => `Last Name`, - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'age', header: () => 'Age', - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'visits', header: () => `Visits`, - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'status', header: 'Status', - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: info => info.column.id, + footer: (info) => info.column.id, }, ] diff --git a/examples/angular/basic/src/main.ts b/examples/angular/basic/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/basic/src/main.ts +++ b/examples/angular/basic/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/column-ordering/src/app/app.component.ts b/examples/angular/column-ordering/src/app/app.component.ts index 2f447c6f61..aca98fffe1 100644 --- a/examples/angular/column-ordering/src/app/app.component.ts +++ b/examples/angular/column-ordering/src/app/app.component.ts @@ -18,30 +18,30 @@ import { faker } from '@faker-js/faker' const defaultColumns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -49,17 +49,17 @@ const defaultColumns: ColumnDef[] = [ { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -87,12 +87,12 @@ export class AppComponent { columnVisibility: this.columnVisibility(), }, getCoreRowModel: getCoreRowModel(), - onColumnVisibilityChange: updaterOrValue => { + onColumnVisibilityChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.columnVisibility.update(updaterOrValue) : this.columnVisibility.set(updaterOrValue) }, - onColumnOrderChange: updaterOrValue => { + onColumnOrderChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.columnOrder.update(updaterOrValue) : this.columnOrder.set(updaterOrValue) @@ -108,7 +108,7 @@ export class AppComponent { randomizeColumns() { this.table.setColumnOrder( - faker.helpers.shuffle(this.table.getAllLeafColumns().map(d => d.id)) + faker.helpers.shuffle(this.table.getAllLeafColumns().map((d) => d.id)), ) } diff --git a/examples/angular/column-ordering/src/main.ts b/examples/angular/column-ordering/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/column-ordering/src/main.ts +++ b/examples/angular/column-ordering/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/column-pinning-sticky/src/app/app.component.ts b/examples/angular/column-pinning-sticky/src/app/app.component.ts index c9fe3ce9e6..43af4a5142 100644 --- a/examples/angular/column-pinning-sticky/src/app/app.component.ts +++ b/examples/angular/column-pinning-sticky/src/app/app.component.ts @@ -32,44 +32,44 @@ const defaultColumns: ColumnDef[] = [ accessorKey: 'firstName', id: 'firstName', header: 'First Name', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, size: 180, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, size: 180, }, { accessorKey: 'age', id: 'age', header: 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, size: 180, }, { accessorKey: 'visits', id: 'visits', header: 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, size: 180, }, { accessorKey: 'status', id: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, size: 180, }, { accessorKey: 'progress', id: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, size: 180, }, ] @@ -103,7 +103,7 @@ export class AppComponent { }) readonly getCommonPinningStyles = ( - column: Column + column: Column, ): Record => { const isPinned = column.getIsPinned() const isLastLeftPinnedColumn = @@ -128,7 +128,7 @@ export class AppComponent { randomizeColumns() { this.table.setColumnOrder( - faker.helpers.shuffle(this.table.getAllLeafColumns().map(d => d.id)) + faker.helpers.shuffle(this.table.getAllLeafColumns().map((d) => d.id)), ) } diff --git a/examples/angular/column-pinning-sticky/src/main.ts b/examples/angular/column-pinning-sticky/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/column-pinning-sticky/src/main.ts +++ b/examples/angular/column-pinning-sticky/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/column-pinning/src/app/app.component.ts b/examples/angular/column-pinning/src/app/app.component.ts index 3784a0782c..fab5cd7262 100644 --- a/examples/angular/column-pinning/src/app/app.component.ts +++ b/examples/angular/column-pinning/src/app/app.component.ts @@ -29,30 +29,30 @@ type Person = { const defaultColumns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -60,17 +60,17 @@ const defaultColumns: ColumnDef[] = [ { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -100,17 +100,17 @@ export class AppComponent { columnOrder: this.columnOrder(), columnPinning: this.columnPinning(), }, - onColumnVisibilityChange: updaterOrValue => { + onColumnVisibilityChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.columnVisibility.update(updaterOrValue) : this.columnVisibility.set(updaterOrValue) }, - onColumnOrderChange: updaterOrValue => { + onColumnOrderChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.columnOrder.update(updaterOrValue) : this.columnOrder.set(updaterOrValue) }, - onColumnPinningChange: updaterOrValue => { + onColumnPinningChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.columnPinning.update(updaterOrValue) : this.columnPinning.set(updaterOrValue) @@ -127,7 +127,7 @@ export class AppComponent { randomizeColumns() { this.table.setColumnOrder( - faker.helpers.shuffle(this.table.getAllLeafColumns().map(d => d.id)) + faker.helpers.shuffle(this.table.getAllLeafColumns().map((d) => d.id)), ) } diff --git a/examples/angular/column-pinning/src/main.ts b/examples/angular/column-pinning/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/column-pinning/src/main.ts +++ b/examples/angular/column-pinning/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/column-resizing-performant/src/app/app.component.ts b/examples/angular/column-resizing-performant/src/app/app.component.ts index 43efd47de2..f7da925eb9 100644 --- a/examples/angular/column-resizing-performant/src/app/app.component.ts +++ b/examples/angular/column-resizing-performant/src/app/app.component.ts @@ -17,45 +17,45 @@ import { TableResizableCell, TableResizableHeader } from './resizable-cell' const defaultColumns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -72,7 +72,7 @@ export class AppComponent { readonly data = signal(makeData(200)) readonly columnSizingInfo = computed( - () => this.table.getState().columnSizingInfo + () => this.table.getState().columnSizingInfo, ) readonly columnSizing = computed(() => this.table.getState().columnSizing) @@ -116,7 +116,7 @@ export class AppComponent { columnSizing: this.table.getState().columnSizing, }, null, - 2 - ) + 2, + ), ) } diff --git a/examples/angular/column-resizing-performant/src/app/resizable-cell.ts b/examples/angular/column-resizing-performant/src/app/resizable-cell.ts index 2338bbc8c4..af40d01940 100644 --- a/examples/angular/column-resizing-performant/src/app/resizable-cell.ts +++ b/examples/angular/column-resizing-performant/src/app/resizable-cell.ts @@ -13,7 +13,7 @@ export class TableResizableHeader { }) readonly width = computed( - () => `calc(var(--header-${this.cellId()}-size) * 1px)` + () => `calc(var(--header-${this.cellId()}-size) * 1px)`, ) } @@ -30,6 +30,6 @@ export class TableResizableCell { }) readonly width = computed( - () => `calc(var(--col-${this.cellId()}-size) * 1px)` + () => `calc(var(--col-${this.cellId()}-size) * 1px)`, ) } diff --git a/examples/angular/column-resizing-performant/src/main.ts b/examples/angular/column-resizing-performant/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/column-resizing-performant/src/main.ts +++ b/examples/angular/column-resizing-performant/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/column-visibility/src/app/app.component.ts b/examples/angular/column-visibility/src/app/app.component.ts index c38a366b3c..b710675993 100644 --- a/examples/angular/column-visibility/src/app/app.component.ts +++ b/examples/angular/column-visibility/src/app/app.component.ts @@ -52,30 +52,30 @@ const defaultData: Person[] = [ const defaultColumns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -83,17 +83,17 @@ const defaultColumns: ColumnDef[] = [ { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -119,7 +119,7 @@ export class AppComponent implements OnInit { columnVisibility: this.columnVisibility(), }, getCoreRowModel: getCoreRowModel(), - onColumnVisibilityChange: updaterOrValue => { + onColumnVisibilityChange: (updaterOrValue) => { const visibilityState = typeof updaterOrValue === 'function' ? updaterOrValue(this.columnVisibility()) diff --git a/examples/angular/column-visibility/src/main.ts b/examples/angular/column-visibility/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/column-visibility/src/main.ts +++ b/examples/angular/column-visibility/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/editable/src/app/app.component.ts b/examples/angular/editable/src/app/app.component.ts index 54956725a4..95f301bab2 100644 --- a/examples/angular/editable/src/app/app.component.ts +++ b/examples/angular/editable/src/app/app.component.ts @@ -34,7 +34,7 @@ const defaultColumn: Partial> = { value: initialValue, }, outputs: { - blur: value => { + blur: (value) => { if (table.options.meta?.updateData) { table.options.meta.updateData(row.index, column.id, value) } @@ -47,33 +47,33 @@ const defaultColumn: Partial> = { const defaultColumns: ColumnDef[] = [ { accessorKey: 'firstName', - footer: info => info.column.id, + footer: (info) => info.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', header: () => `Last Name`, - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'age', header: () => 'Age', - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'visits', header: () => `Visits`, - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'status', header: 'Status', - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: info => info.column.id, + footer: (info) => info.column.id, }, ] @@ -105,7 +105,7 @@ export class AppComponent { // Skip page index reset until after next rerender this.autoResetPageIndex.set(false) - this.data.update(old => + this.data.update((old) => old.map((row, index) => { if (index === rowIndex) { return { @@ -114,7 +114,7 @@ export class AppComponent { } } return row - }) + }), ) afterNextRender(() => this.autoResetPageIndex.set(true), { diff --git a/examples/angular/editable/src/main.ts b/examples/angular/editable/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/editable/src/main.ts +++ b/examples/angular/editable/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/expanding/src/app/app.component.ts b/examples/angular/expanding/src/app/app.component.ts index 741f357e53..d5db0d639b 100644 --- a/examples/angular/expanding/src/app/app.component.ts +++ b/examples/angular/expanding/src/app/app.component.ts @@ -31,31 +31,31 @@ const defaultColumns: ColumnDef[] = [ cell: () => flexRenderComponent(ExpandableCell), }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'visits', header: () => `Visits`, - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ] @@ -76,11 +76,11 @@ export class AppComponent { state: { expanded: this.expanded(), }, - onExpandedChange: updater => + onExpandedChange: (updater) => typeof updater === 'function' ? this.expanded.update(updater) : this.expanded.set(updater), - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, getCoreRowModel: getCoreRowModel(), getPaginationRowModel: getPaginationRowModel(), getFilteredRowModel: getFilteredRowModel(), @@ -91,11 +91,11 @@ export class AppComponent { })) readonly rawExpandedState = computed(() => - JSON.stringify(this.expanded(), undefined, 2) + JSON.stringify(this.expanded(), undefined, 2), ) readonly rawRowSelectionState = computed(() => - JSON.stringify(this.table.getState().rowSelection, undefined, 2) + JSON.stringify(this.table.getState().rowSelection, undefined, 2), ) onPageInputChange(event: Event): void { diff --git a/examples/angular/expanding/src/main.ts b/examples/angular/expanding/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/expanding/src/main.ts +++ b/examples/angular/expanding/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/filters/src/app/app.component.ts b/examples/angular/filters/src/app/app.component.ts index 1748a57674..7d5b55dfab 100644 --- a/examples/angular/filters/src/app/app.component.ts +++ b/examples/angular/filters/src/app/app.component.ts @@ -36,12 +36,12 @@ export class AppComponent { readonly columns: ColumnDef[] = [ { accessorKey: 'firstName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', }, { @@ -80,7 +80,7 @@ export class AppComponent { state: { columnFilters: this.columnFilters(), }, - onColumnFiltersChange: updater => { + onColumnFiltersChange: (updater) => { updater instanceof Function ? this.columnFilters.update(updater) : this.columnFilters.set(updater) @@ -98,7 +98,7 @@ export class AppComponent { })) readonly stringifiedFilters = computed(() => - JSON.stringify(this.columnFilters(), null, 2) + JSON.stringify(this.columnFilters(), null, 2), ) onPageInputChange(event: Event): void { diff --git a/examples/angular/filters/src/app/debounced-input.directive.ts b/examples/angular/filters/src/app/debounced-input.directive.ts index 19d5ef1b55..e91e24a8d4 100644 --- a/examples/angular/filters/src/app/debounced-input.directive.ts +++ b/examples/angular/filters/src/app/debounced-input.directive.ts @@ -9,11 +9,11 @@ import { import { outputFromObservable, toObservable } from '@angular/core/rxjs-interop' export function runOutsideAngular( - zone: NgZone + zone: NgZone, ): MonoTypeOperatorFunction { - return source => - new Observable(subscriber => - zone.runOutsideAngular(() => source.subscribe(subscriber)) + return (source) => + new Observable((subscriber) => + zone.runOutsideAngular(() => source.subscribe(subscriber)), ) } @@ -29,9 +29,9 @@ export class DebouncedInputDirective { readonly changeEvent = outputFromObservable( this.debounce$.pipe( - switchMap(debounce => { + switchMap((debounce) => { return fromEvent(this.#ref, 'change').pipe(debounceTime(debounce)) - }) - ) + }), + ), ) } diff --git a/examples/angular/filters/src/app/table-filter.component.ts b/examples/angular/filters/src/app/table-filter.component.ts index 2c897cfe7d..48636284ce 100644 --- a/examples/angular/filters/src/app/table-filter.component.ts +++ b/examples/angular/filters/src/app/table-filter.component.ts @@ -90,7 +90,7 @@ export class FilterComponent { }) readonly columnFilterValue = computed(() => - this.column().getFilterValue() + this.column().getFilterValue(), ) readonly minRangePlaceholder = computed(() => { diff --git a/examples/angular/filters/src/main.ts b/examples/angular/filters/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/filters/src/main.ts +++ b/examples/angular/filters/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/grouping/src/app/columns.ts b/examples/angular/grouping/src/app/columns.ts index ab35acdf4b..28a4536623 100644 --- a/examples/angular/grouping/src/app/columns.ts +++ b/examples/angular/grouping/src/app/columns.ts @@ -17,18 +17,18 @@ export const columns: ColumnDef[] = [ { accessorKey: 'firstName', header: 'First Name', - cell: info => info.getValue(), + cell: (info) => info.getValue(), /** * override the value used for row grouping * (otherwise, defaults to the value derived from accessorKey / accessorFn) */ - getGroupingValue: row => `${row.firstName} ${row.lastName}`, + getGroupingValue: (row) => `${row.firstName} ${row.lastName}`, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', header: () => `Last Name`, - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, ], }, diff --git a/examples/angular/grouping/src/main.ts b/examples/angular/grouping/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/grouping/src/main.ts +++ b/examples/angular/grouping/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/row-dnd/src/app/app.component.ts b/examples/angular/row-dnd/src/app/app.component.ts index e28c236f08..33afac49a1 100644 --- a/examples/angular/row-dnd/src/app/app.component.ts +++ b/examples/angular/row-dnd/src/app/app.component.ts @@ -32,12 +32,12 @@ const defaultColumns: ColumnDef[] = [ }, { accessorKey: 'firstName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => `Last Name`, }, { @@ -73,7 +73,7 @@ export class AppComponent { return { data: this.data(), columns: defaultColumns, - getRowId: row => row.userId, //required because row indexes will change + getRowId: (row) => row.userId, //required because row indexes will change debugTable: true, debugHeaders: true, debugColumns: true, @@ -83,7 +83,7 @@ export class AppComponent { } }) - readonly sortedIds = computed(() => this.data().map(data => data.userId)) + readonly sortedIds = computed(() => this.data().map((data) => data.userId)) drop(event: CdkDragDrop) { const data = [...this.data()] diff --git a/examples/angular/row-dnd/src/main.ts b/examples/angular/row-dnd/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/row-dnd/src/main.ts +++ b/examples/angular/row-dnd/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/row-selection-signal/src/app/app.component.ts b/examples/angular/row-selection-signal/src/app/app.component.ts index 5e2e103b4a..fb7b416976 100644 --- a/examples/angular/row-selection-signal/src/app/app.component.ts +++ b/examples/angular/row-selection-signal/src/app/app.component.ts @@ -45,31 +45,31 @@ export class AppComponent { }, { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, header: 'First name', }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => this.ageHeaderCell(), - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -77,17 +77,17 @@ export class AppComponent { { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -103,11 +103,11 @@ export class AppComponent { }, enableRowSelection: true, // enable row selection for all rows // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row - onRowSelectionChange: updaterOrValue => { + onRowSelectionChange: (updaterOrValue) => { this.rowSelection.set( typeof updaterOrValue === 'function' ? updaterOrValue(this.rowSelection()) - : updaterOrValue + : updaterOrValue, ) }, getCoreRowModel: getCoreRowModel(), @@ -117,11 +117,11 @@ export class AppComponent { })) readonly stringifiedRowSelection = computed(() => - JSON.stringify(this.rowSelection(), null, 2) + JSON.stringify(this.rowSelection(), null, 2), ) readonly rowSelectionLength = computed( - () => Object.keys(this.rowSelection()).length + () => Object.keys(this.rowSelection()).length, ) onPageInputChange(event: Event): void { @@ -137,7 +137,7 @@ export class AppComponent { logSelectedFlatRows(): void { console.info( 'table.getSelectedRowModel().flatRows', - this.table.getSelectedRowModel().flatRows + this.table.getSelectedRowModel().flatRows, ) } diff --git a/examples/angular/row-selection-signal/src/main.ts b/examples/angular/row-selection-signal/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/row-selection-signal/src/main.ts +++ b/examples/angular/row-selection-signal/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/row-selection/src/app/app.component.ts b/examples/angular/row-selection/src/app/app.component.ts index da7ce36ef5..5a72cc25d4 100644 --- a/examples/angular/row-selection/src/app/app.component.ts +++ b/examples/angular/row-selection/src/app/app.component.ts @@ -51,31 +51,31 @@ export class AppComponent { }, { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, header: 'First name', }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => this.ageHeaderCell(), - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -83,17 +83,17 @@ export class AppComponent { { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -109,11 +109,11 @@ export class AppComponent { }, enableRowSelection: true, // enable row selection for all rows // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row - onRowSelectionChange: updaterOrValue => { + onRowSelectionChange: (updaterOrValue) => { this.rowSelection.set( typeof updaterOrValue === 'function' ? updaterOrValue(this.rowSelection()) - : updaterOrValue + : updaterOrValue, ) }, getCoreRowModel: getCoreRowModel(), @@ -123,11 +123,11 @@ export class AppComponent { })) readonly stringifiedRowSelection = computed(() => - JSON.stringify(this.rowSelection(), null, 2) + JSON.stringify(this.rowSelection(), null, 2), ) readonly rowSelectionLength = computed( - () => Object.keys(this.rowSelection()).length + () => Object.keys(this.rowSelection()).length, ) onPageInputChange(event: Event): void { @@ -143,7 +143,7 @@ export class AppComponent { logSelectedFlatRows(): void { console.info( 'table.getSelectedRowModel().flatRows', - this.table.getSelectedRowModel().flatRows + this.table.getSelectedRowModel().flatRows, ) } diff --git a/examples/angular/row-selection/src/main.ts b/examples/angular/row-selection/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/row-selection/src/main.ts +++ b/examples/angular/row-selection/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/signal-input/src/app/app.component.ts b/examples/angular/signal-input/src/app/app.component.ts index ac4f08a53b..02fbb3b650 100644 --- a/examples/angular/signal-input/src/app/app.component.ts +++ b/examples/angular/signal-input/src/app/app.component.ts @@ -27,14 +27,14 @@ export class AppComponent { } previousPage(): void { - this.pagination.update(pagination => ({ + this.pagination.update((pagination) => ({ ...pagination, pageIndex: pagination.pageIndex - 1, })) } nextPage(): void { - this.pagination.update(pagination => ({ + this.pagination.update((pagination) => ({ ...pagination, pageIndex: pagination.pageIndex + 1, })) diff --git a/examples/angular/signal-input/src/app/person-table/person-table.component.ts b/examples/angular/signal-input/src/app/person-table/person-table.component.ts index 29a8622ce9..e34a9e3ab1 100644 --- a/examples/angular/signal-input/src/app/person-table/person-table.component.ts +++ b/examples/angular/signal-input/src/app/person-table/person-table.component.ts @@ -28,13 +28,13 @@ export class PersonTableComponent { { accessorKey: 'firstName', header: 'First Name', - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', header: () => `Last Name`, - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, ] @@ -45,7 +45,7 @@ export class PersonTableComponent { state: { pagination: this.pagination(), }, - onPaginationChange: updaterOrValue => { + onPaginationChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.pagination.update(updaterOrValue) : this.pagination.set(updaterOrValue) diff --git a/examples/angular/signal-input/src/main.ts b/examples/angular/signal-input/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/signal-input/src/main.ts +++ b/examples/angular/signal-input/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/sub-components/src/app/app.component.ts b/examples/angular/sub-components/src/app/app.component.ts index 5b6372a173..a52a9c620b 100644 --- a/examples/angular/sub-components/src/app/app.component.ts +++ b/examples/angular/sub-components/src/app/app.component.ts @@ -23,7 +23,7 @@ import { JsonPipe, NgTemplateOutlet } from '@angular/common' const columns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { id: 'expander', @@ -46,25 +46,25 @@ const columns: ColumnDef[] = [ accessorKey: 'firstName', header: 'First Name', cell: () => flexRenderComponent(ExpandableCell), - footer: props => props.column.id, + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -72,17 +72,17 @@ const columns: ColumnDef[] = [ { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -112,7 +112,7 @@ export class AppComponent { state: { expanded: this.expanded(), }, - onExpandedChange: updater => + onExpandedChange: (updater) => typeof updater === 'function' ? this.expanded.update(updater) : this.expanded.set(updater), diff --git a/examples/angular/sub-components/src/main.ts b/examples/angular/sub-components/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/sub-components/src/main.ts +++ b/examples/angular/sub-components/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/lit/basic/src/main.ts b/examples/lit/basic/src/main.ts index e913a2f6d0..233c53531c 100644 --- a/examples/lit/basic/src/main.ts +++ b/examples/lit/basic/src/main.ts @@ -25,31 +25,31 @@ const columnHelper = createColumnHelper() const columns = [ columnHelper.accessor('firstName', { - cell: info => info.getValue(), - footer: info => info.column.id, + cell: (info) => info.getValue(), + footer: (info) => info.column.id, }), - columnHelper.accessor(row => row.lastName, { + columnHelper.accessor((row) => row.lastName, { id: 'lastName', - cell: info => html`${info.getValue()}`, + cell: (info) => html`${info.getValue()}`, header: () => html`Last Name`, - footer: info => info.column.id, + footer: (info) => info.column.id, }), columnHelper.accessor('age', { header: () => 'Age', - cell: info => info.renderValue(), - footer: info => info.column.id, + cell: (info) => info.renderValue(), + footer: (info) => info.column.id, }), columnHelper.accessor('visits', { header: () => html`Visits`, - footer: info => info.column.id, + footer: (info) => info.column.id, }), columnHelper.accessor('status', { header: 'Status', - footer: info => info.column.id, + footer: (info) => info.column.id, }), columnHelper.accessor('progress', { header: 'Profile Progress', - footer: info => info.column.id, + footer: (info) => info.column.id, }), ] @@ -105,66 +105,66 @@ class LitTableExample extends LitElement { ${repeat( table.getHeaderGroups(), - headerGroup => headerGroup.id, - headerGroup => + (headerGroup) => headerGroup.id, + (headerGroup) => html`${repeat( headerGroup.headers, - header => header.id, - header => + (header) => header.id, + (header) => html` ${header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} - ` - )}` + `, + )}`, )} ${repeat( table.getRowModel().rows, - row => row.id, - row => html` + (row) => row.id, + (row) => html` ${repeat( row.getVisibleCells(), - cell => cell.id, - cell => + (cell) => cell.id, + (cell) => html` ${flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )} - ` + `, )} - ` + `, )} ${repeat( table.getFooterGroups(), - footerGroup => footerGroup.id, - footerGroup => html` + (footerGroup) => footerGroup.id, + (footerGroup) => html` ${repeat( footerGroup.headers, - header => header.id, - header => html` + (header) => header.id, + (header) => html` ${header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )} - ` + `, )} - ` + `, )} diff --git a/examples/lit/column-sizing/src/main.ts b/examples/lit/column-sizing/src/main.ts index 937a39ff6b..5a0685507e 100644 --- a/examples/lit/column-sizing/src/main.ts +++ b/examples/lit/column-sizing/src/main.ts @@ -14,12 +14,12 @@ import { makeData, Person } from './makeData' const columns: ColumnDef[] = [ { accessorKey: 'firstName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => html`Last Name`, }, { @@ -73,18 +73,18 @@ class LitTableExample extends LitElement { ${repeat( table.getHeaderGroups(), - headerGroup => headerGroup.id, - headerGroup => html` + (headerGroup) => headerGroup.id, + (headerGroup) => html` ${headerGroup.headers.map( - header => html` + (header) => html` ${flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} ${header.isPlaceholder ? null @@ -98,10 +98,10 @@ class LitTableExample extends LitElement { @touchstart="${header.getResizeHandler()}" />`} - ` + `, )} - ` + `, )} @@ -109,22 +109,22 @@ class LitTableExample extends LitElement { .getRowModel() .rows.slice(0, 10) .map( - row => html` + (row) => html` ${row .getVisibleCells() .map( - cell => html` + (cell) => html` ${flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )} - ` + `, )} - ` + `, )} @@ -135,7 +135,7 @@ ${JSON.stringify( columnSizingInfo: table.getState().columnSizingInfo, }, null, - 2 + 2, )}