diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000000..6c0bb61c00 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json", + "changelog": [ + "@svitejs/changesets-changelog-github-compact", + { "repo": "TanStack/table" } + ], + "commit": false, + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "fixed": [], + "linked": [], + "ignore": [], + "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { + "onlyUpdatePeerDependentsWhenOutOfRange": true + } +} diff --git a/.gitattributes b/.gitattributes index dfe0770424..5a0d5e480b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ # Auto detect text files and perform LF normalization -* text=auto +* text=auto eol=lf 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/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..5dcbf401f2 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ +## 🎯 Changes + + + +## ✅ Checklist + +- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/table/blob/main/CONTRIBUTING.md). +- [ ] I have tested this code locally with `pnpm test:pr`. + +## 🚀 Release Impact + +- [ ] This change affects published code, and I have generated a [changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md). +- [ ] This change is docs/CI/dev-only (no release). diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 53051c6d5f..e3bc82ecfd 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -18,11 +18,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + 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 7af298149a..ed8ac2b67e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,4 +1,4 @@ -name: pr +name: PR on: pull_request: @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + 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 + 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@v4 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Setup Tools @@ -53,3 +53,15 @@ jobs: run: pnpm run build:all - name: Publish Previews run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*' + provenance: + name: Provenance + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6.0.1 + with: + fetch-depth: 0 + - name: Check Provenance + uses: danielroe/provenance-action@v0.1.1 + with: + fail-on-downgrade: true diff --git a/.github/workflows/ci.yml b/.github/workflows/release.yml similarity index 54% rename from .github/workflows/ci.yml rename to .github/workflows/release.yml index b8ea2bf5d1..7e0555074c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,6 @@ -name: ci +name: Release on: - workflow_dispatch: - inputs: - tag: - description: override release tag - required: false push: branches: [main, alpha, beta, rc] @@ -19,15 +14,16 @@ env: permissions: contents: write id-token: write + pull-requests: write jobs: - test-and-publish: - name: Test & Publish - if: github.repository == 'TanStack/table' + release: + name: Release + if: github.repository_owner == 'TanStack' runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Start Nx Agents @@ -39,13 +35,12 @@ jobs: - name: Stop Nx Agents if: ${{ always() }} run: npx nx-cloud stop-all-agents - - name: Publish - run: | - git config --global user.name 'Tanner Linsley' - git config --global user.email 'tannerlinsley@users.noreply.github.com' - npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" - pnpm run cipublish + - name: Run Changesets (version or publish) + uses: changesets/action@v1.5.3 + with: + version: pnpm run changeset:version + publish: pnpm run changeset:publish + commit: 'ci: Version Packages' + title: 'ci: Version Packages' env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - TAG: ${{ inputs.tag }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.npmrc b/.npmrc index 84aee8d998..268c392d3c 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1 @@ -link-workspace-packages=true -prefer-workspace-packages=true provenance=true diff --git a/.nvmrc b/.nvmrc index b8e593f521..b404027604 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.15.1 +24.8.0 diff --git a/README.md b/README.md index 3b5b5284ee..59506ffbfd 100644 --- a/README.md +++ b/README.md @@ -1,141 +1,118 @@ -![TanStack Table Header](https://github.com/tanstack/table/raw/main/media/repo-header.png) +
+ TanStack Table +
-# [TanStack](https://tanstack.com) Table v8 +
-Headless UI for building **powerful tables & datagrids** for **React, Solid, Vue, Svelte, Qwik and TS/JS**. - - - #TanStack - - - - +
- + npm downloads + + + github stars - + bundle size +
+ +
semantic-release - - Join the discussion on Github - - - - - - - - -> [Looking for version 7 of `react-table`? Click here!](https://github.com/tanstack/table/tree/v7) - -## Enjoy this library? - -Try other [TanStack](https://tanstack.com) libraries: - -- [TanStack Query](https://github.com/TanStack/query) -- [TanStack Table](https://github.com/TanStack/table) -- [TanStack Router](https://github.com/TanStack/router) -- [TanStack Virtual](https://github.com/TanStack/virtual) -- [TanStack Form](https://github.com/TanStack/form) -- [TanStack Ranger](https://github.com/TanStack/ranger) - -## Visit [tanstack.com/table](https://tanstack.com/table) for docs, guides, API and more! - -You may know **TanStack Table** by our adapter names, too! - -- [Angular Table](https://tanstack.com/table/v8/docs/framework/angular/angular-table) -- [Lit Table](https://tanstack.com/table/v8/docs/framework/lit/lit-table) -- [Qwik Table](https://tanstack.com/table/v8/docs/framework/qwik/qwik-table) -- [**React Table**](https://tanstack.com/table/v8/docs/framework/react/react-table) -- [Solid Table](https://tanstack.com/table/v8/docs/framework/solid/solid-table) -- [Svelte Table](https://tanstack.com/table/v8/docs/framework/svelte/svelte-table) -- [Vue Table](https://tanstack.com/table/v8/docs/framework/vue/vue-table) - -## Summary - -TanStack Table is a **headless** table library, which means it does not ship with components, markup or styles. This means that you have **full control** over markup and styles (CSS, CSS-in-JS, UI Component Libraries, etc) and this is also what gives it its portable nature. You can even use it in React Native! - -If you want a **lightweight table with full control over markup and implementation**, then you should consider using **TanStack Table, a headless table library**. - -If you want a **ready-to-use component-based table with more power but more constraints around markup/styles/implementation**, you should consider using [AG Grid](https://ag-grid.com/react-data-grid/?utm_source=reacttable&utm_campaign=githubreacttable), a component-based table library from our OSS partner [AG Grid](https://ag-grid.com). - -TanStack Table and AG Grid are respectfully the -**best table/datagrid libraries around**. Instead -of competing, we're working together to ensure the highest -quality table/datagrid options are available for the entire -JS/TS ecosystem and every use-case. - -## Quick Features - -- Agnostic core (JS/TS) -- 1st-class framework bindings for React, Vue, Solid -- ~15kb or less (with tree-shaking) -- 100% TypeScript (but not required) -- Headless (100% customizable, Bring-your-own-UI) -- Auto out of the box, opt-in controllable state -- Filters (column and global) -- Sorting (multi-column, multi-directional) -- Grouping & Aggregation -- Pivoting (coming soon!) -- Row Selection -- Row Expansion -- Column Visibility/Ordering/Pinning/Resizing -- Table Splitting -- Animatable -- Virtualizable -- Server-side/external data model support - -# Migrating from React Table v7 - -## Notable Changes - -- Full rewrite to TypeScript with types included in the base package -- Removal of plugin system to favor more inversion of control -- Vastly larger and improved API (and new features like pinning) -- Better controlled state management -- Better support for server-side operations -- Complete (but optional) data pipeline control -- Agnostic core with framework adapters for React, Solid, Svelte, Vue, and potentially more in the future -- New Dev Tools - -## Migration - -There are a fair amount of breaking changes (they're worth it, trust us!): - -- Turns out that TypeScript makes your code **a lot** better/safer, but also usually requires breaking changes to architecture. -- Plugin system has been removed so plugins must be rewritten to wrap/compose the new functional API. Contact us if you need help! -- Column configuration options have changed, but only slightly. -- Table options are mostly the same, with some larger changes around optional state management/control and data pipeline control -- The `table` instance while similar in spirit to v7 has been reconfigured to be much faster. - -## Installation - -Install one of the following packages based on your framework of choice: - -```bash -# Npm -npm install @tanstack/angular-table -npm install @tanstack/lit-table -npm install @tanstack/qwik-table -npm install @tanstack/react-table -npm install @tanstack/solid-table -npm install @tanstack/svelte-table -npm install @tanstack/vue-table -npm install @tanstack/table-core #vanilla js that can work with any framework -``` - -## How to help? - -- Try out the already-migrated examples -- Try it out in your own projects. -- Introspect the types! Even without the docs finished, the library ships with 100% typescript to help you explore its capabilities. -- [Read the contribution guidelines](https://github.com/tanstack/table/tree/main/CONTRIBUTING.md) -- Write some docs! Start with the [API docs](https://github.com/TanStack/react-table/tree/main/docs/api) and try adding some information about one or more of the features. The types do a decent job of showing what's supported and the capabilities of the library. -- **Using a plugin?** Try rewriting your plugin (v8 doesn't have a plugin system any more) as a functional wrapper that uses TanStack Table internally. The new API is much more powerful and easier to compose. If you find something you can't figure out, let us know and we'll add it to the API. - -### [Become a Sponsor](https://github.com/sponsors/tannerlinsley/) +Best of JS + Follow @TanStack +
+ +### [Become a Sponsor!](https://github.com/sponsors/tannerlinsley/) + + + +# TanStack Table + +> [!NOTE] +> You may know TanStack Table by the adapter names: +> +> - [Angular Table](https://tanstack.com/table/v8/docs/framework/angular/angular-table) +> - [Lit Table](https://tanstack.com/table/v8/docs/framework/lit/lit-table) +> - [Qwik Table](https://tanstack.com/table/v8/docs/framework/qwik/qwik-table) +> - [React Table](https://tanstack.com/table/v8/docs/framework/react/react-table) +> - [Solid Table](https://tanstack.com/table/v8/docs/framework/solid/solid-table) +> - [Svelte Table](https://tanstack.com/table/v8/docs/framework/svelte/svelte-table) +> - [Vue Table](https://tanstack.com/table/v8/docs/framework/vue/vue-table) + +A headless table library for building powerful datagrids with full control over markup, styles, and behavior. + +- Framework‑agnostic core with bindings for React, Vue & Solid +- 100% customizable — bring your own UI, components, and styles +- Sorting, filtering, grouping, aggregation & row selection +- Lightweight, virtualizable & server‑side friendly + +### Read the Docs → + +## Get Involved + +- We welcome issues and pull requests! +- Participate in [GitHub discussions](https://github.com/TanStack/table/discussions) +- Chat with the community on [Discord](https://discord.com/invite/WrRKjPJ) +- See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup instructions + +## Partners + + + + + + + +
+ + + + + CodeRabbit + + + + + + + + Cloudflare + + + + + + + + AG Grid + + +
+ +
+Table & you? +

+We're looking for TanStack Table Partners to join our mission! Partner with us to push the boundaries of TanStack Table and build amazing things together. +

+LET'S CHAT +
+ +## Explore the TanStack Ecosystem + +- TanStack Config – Tooling for JS/TS packages +- TanStack DB – Reactive sync client store +- TanStack DevTools – Unified devtools panel +- TanStack Form – Type‑safe form state +- TanStack Pacer – Debouncing, throttling, batching
+- TanStack Query – Async state & caching +- TanStack Ranger – Range & slider primitives +- TanStack Router – Type‑safe routing, caching & URL state +- TanStack Start – Full‑stack SSR & streaming +- TanStack Store – Reactive data store +- TanStack Virtual – Virtualized rendering + +… and more at TanStack.com » diff --git a/docs/api/core/cell.md b/docs/api/core/cell.md index 6c1ff4a073..b579fd5047 100644 --- a/docs/api/core/cell.md +++ b/docs/api/core/cell.md @@ -2,7 +2,7 @@ title: Cell APIs --- -These are **core** options and API properties for all cells. More options and API properties are available for other [table features](../../../guide/features). +These are **core** options and API properties for all cells. More options and API properties are available for other [table features](../../guide/features.md). ## Cell API diff --git a/docs/api/core/column.md b/docs/api/core/column.md index 626287b836..10fcb8690a 100644 --- a/docs/api/core/column.md +++ b/docs/api/core/column.md @@ -2,7 +2,7 @@ title: Column APIs --- -These are **core** options and API properties for all columns. More options and API properties are available for other [table features](../../../guide/features). +These are **core** options and API properties for all columns. More options and API properties are available for other [table features](../../guide/features.md). ## Column API diff --git a/docs/api/core/header-group.md b/docs/api/core/header-group.md index 022e7bdff2..1c506c97ed 100644 --- a/docs/api/core/header-group.md +++ b/docs/api/core/header-group.md @@ -2,7 +2,7 @@ title: HeaderGroup APIs --- -These are **core** options and API properties for all header groups. More options and API properties may be available for other [table features](../../../guide/features). +These are **core** options and API properties for all header groups. More options and API properties may be available for other [table features](../../guide/features.md). ## Header Group API @@ -30,4 +30,4 @@ The depth of the header group, zero-indexed based. type headers = Header[] ``` -An array of [Header](../header) objects that belong to this header group +An array of [Header](./header.md) objects that belong to this header group diff --git a/docs/api/core/header.md b/docs/api/core/header.md index 120a9fc29a..542eed6ead 100644 --- a/docs/api/core/header.md +++ b/docs/api/core/header.md @@ -2,7 +2,7 @@ title: Header APIs --- -These are **core** options and API properties for all headers. More options and API properties may be available for other [table features](../../../guide/features). +These are **core** options and API properties for all headers. More options and API properties may be available for other [table features](../../guide/features.md). ## Header API @@ -38,7 +38,7 @@ The depth of the header, zero-indexed based. column: Column ``` -The header's associated [Column](../column) object +The header's associated [Column](./column.md) object ### `headerGroup` @@ -46,7 +46,7 @@ The header's associated [Column](../column) object headerGroup: HeaderGroup ``` -The header's associated [HeaderGroup](../header-group) object +The header's associated [HeaderGroup](./header-group.md) object ### `subHeaders` diff --git a/docs/api/core/row.md b/docs/api/core/row.md index b010df2811..2e8cf7d09f 100644 --- a/docs/api/core/row.md +++ b/docs/api/core/row.md @@ -2,7 +2,7 @@ title: Row APIs --- -These are **core** options and API properties for all rows. More options and API properties are available for other [table features](../../../guide/features). +These are **core** options and API properties for all rows. More options and API properties are available for other [table features](../../guide/features.md). ## Row API @@ -120,4 +120,4 @@ An array of the original subRows as returned by the `options.getSubRows` option. type getAllCells = () => Cell[] ``` -Returns all of the [Cells](../cell) for the row. +Returns all of the [Cells](./cell.md) for the row. diff --git a/docs/api/core/table.md b/docs/api/core/table.md index bd2415bf57..ebac5a5c6b 100644 --- a/docs/api/core/table.md +++ b/docs/api/core/table.md @@ -2,7 +2,7 @@ title: Table APIs --- -## `createAngularTable` / `useReactTable` / `createSolidTable` / `useQwikTable` / `useVueTable` / `createSvelteTable` +## `useReactTable` / `createSolidTable` / `useQwikTable` / `useVueTable` / `createSvelteTable` ```tsx type useReactTable = ( @@ -14,7 +14,7 @@ These functions are used to create a table. Which one you use depends on which f ## Options -These are **core** options and API properties for the table. More options and API properties are available for other [table features](../../../guide/features). +These are **core** options and API properties for the table. More options and API properties are available for other [table features](../../guide/features.md). ### `data` @@ -34,7 +34,7 @@ When the `data` option changes reference (compared via `Object.is`), the table w type columns = ColumnDef[] ``` -The array of column defs to use for the table. See the [Column Defs Guide](../../docs/guide/column-defs) for more information on creating column definitions. +The array of column defs to use for the table. See the [Column Def Guide](../../guide/column-defs.md) for more information on creating column definitions. ### `defaultColumn` @@ -89,7 +89,7 @@ declare module '@tanstack/table-core' { } ``` -> 🧠 Think of this option as an arbitrary "context" for your table. This is a great way to pass arbitrary data or functions to your table without having to pass it to every thing the table touches. A good example is passing a locale object to your table to use for formatting dates, numbers, etc or even a function that can be used to update editable data like in the [editable-data example](../../../framework/react/examples/editable-data). +> 🧠 Think of this option as an arbitrary "context" for your table. This is a great way to pass arbitrary data or functions to your table without having to pass it to every thing the table touches. A good example is passing a locale object to your table to use for formatting dates, numbers, etc or even a function that can be used to update editable data like in the [editable-data](https://github.com/TanStack/table/tree/main/examples/react/editable-data) example. ### `state` diff --git a/docs/api/features/filters.md b/docs/api/features/filters.md index c7c05fcd73..7df657c606 100644 --- a/docs/api/features/filters.md +++ b/docs/api/features/filters.md @@ -7,7 +7,7 @@ id: filters The Filtering API docs are now split into multiple API doc pages: -- [Column Faceting](../column-faceting) -- [Global Faceting](../global-faceting) -- [Column Filtering](../column-filtering) -- [Global Filtering](../global-filtering) \ No newline at end of file +- [Column Faceting](../../guide/column-faceting.md) +- [Global Faceting](../../guide/global-faceting.md) +- [Column Filtering](../../guide/column-filtering.md) +- [Global Filtering](../../guide/global-filtering.md) \ No newline at end of file diff --git a/docs/api/features/global-filtering.md b/docs/api/features/global-filtering.md index 7b48f55ad7..75271f731f 100644 --- a/docs/api/features/global-filtering.md +++ b/docs/api/features/global-filtering.md @@ -25,7 +25,7 @@ export interface GlobalFilterTableState { ## Filter Functions -You can use the same filter functions that are available for column filtering for global filtering. See the [Column Filtering APIs](../column-filtering) to learn more about filter functions. +You can use the same filter functions that are available for column filtering for global filtering. See the [Column Filtering](../../guide/column-filtering.md) to learn more about filter functions. #### Using Filter Functions diff --git a/docs/api/features/pinning.md b/docs/api/features/pinning.md index 92222ac7fe..a592a03a99 100644 --- a/docs/api/features/pinning.md +++ b/docs/api/features/pinning.md @@ -7,5 +7,5 @@ id: pinning The pinning apis are now split into multiple api pages: -- [Column Pinning](../column-pinning) -- [Row Pinning](../row-pinning) \ No newline at end of file +- [Column Pinning](../../guide/column-pinning.md) +- [Row Pinning](../../guide/row-pinning.md) \ No newline at end of file diff --git a/docs/api/features/row-selection.md b/docs/api/features/row-selection.md index 312fde8573..877e3775d1 100644 --- a/docs/api/features/row-selection.md +++ b/docs/api/features/row-selection.md @@ -15,7 +15,7 @@ export type RowSelectionTableState = { } ``` -By default, the row selection state uses the index of each row as the row identifiers. Row selection state can instead be tracked with a custom unique row id by passing in a custom [getRowId](../../../api/core/table.md#getrowid) function to the the table. +By default, the row selection state uses the index of each row as the row identifiers. Row selection state can instead be tracked with a custom unique row id by passing in a custom [getRowId](../core/table.md#getrowid) function to the the table. ## Table Options @@ -113,8 +113,6 @@ getIsSomeRowsSelected: () => boolean Returns whether or not any rows in the table are selected. -NOTE: Returns `false` if all rows are selected. - ### `getIsSomePageRowsSelected` ```tsx diff --git a/docs/config.json b/docs/config.json index 506f16ab8f..19d268775f 100644 --- a/docs/config.json +++ b/docs/config.json @@ -435,9 +435,29 @@ "to": "framework/angular/examples/row-selection", "label": "Row Selection" }, + { + "to": "framework/angular/examples/expanding", + "label": "Expanding" + }, + { + "to": "framework/angular/examples/sub-components", + "label": "Sub Components" + }, { "to": "framework/angular/examples/signal-input", "label": "Signal Input" + }, + { + "to": "framework/angular/examples/editable", + "label": "Editable data" + }, + { + "to": "framework/angular/examples/row-dnd", + "label": "Row DnD" + }, + { + "to": "framework/angular/examples/column-resizing-performant", + "label": "Performant Column Resizing" } ] }, @@ -590,10 +610,18 @@ "to": "framework/react/examples/virtualized-columns", "label": "Virtualized Columns" }, + { + "to": "framework/react/examples/virtualized-columns-experimental", + "label": "Virtualized Columns (Experimental)" + }, { "to": "framework/react/examples/virtualized-rows", "label": "Virtualized Rows" }, + { + "to": "framework/react/examples/virtualized-rows-experimental", + "label": "Virtualized Rows (Experimental)" + }, { "to": "framework/react/examples/virtualized-infinite-scrolling", "label": "Virtualized Infinite Scrolling" @@ -732,6 +760,10 @@ { "to": "framework/vue/examples/virtualized-rows", "label": "Virtualized Rows" + }, + { + "to": "framework/vue/examples/grouping", + "label": "Grouping" } ] }, diff --git a/docs/framework/angular/angular-table.md b/docs/framework/angular/angular-table.md index c3e74071d2..d992a7ecea 100644 --- a/docs/framework/angular/angular-table.md +++ b/docs/framework/angular/angular-table.md @@ -40,41 +40,181 @@ FlexRender supports any type of content supported by Angular: - A [TemplateRef](https://angular.dev/api/core/TemplateRef) - A [Component](https://angular.dev/api/core/Component) wrapped into `FlexRenderComponent` -Example: +You can just use the `cell.renderValue` or `cell.getValue` APIs to render the cells of your table. However, +these APIs will only spit out the raw cell values (from accessor functions). +If you are using the `cell: () => any` column definition options, you will want to use the `FlexRenderDirective` from the adapter. + +Cell column definition is **reactive** and runs into an **injection context**, then you can inject services or make use of signals to automatically modify the rendered content. + +#### Example ```ts @Component({ imports: [FlexRenderDirective], //... }) +class YourComponent {} ``` ```angular-html @for (row of table.getRowModel().rows; track row.id) { - - @for (cell of row.getVisibleCells(); track cell.id) { - - - - {{ cell }} - -
-
- -} - + > + + {{ cell }} + +
+ + + } + } ``` +#### Rendering a Component + +To render a Component into a specific column header/cell/footer, you can pass a `FlexRenderComponent` instantiated with +your `ComponentType, with the ability to include parameters such as inputs, outputs and a custom injector. + +```ts +import {flexRenderComponent} from "./flex-render-component"; +import {ChangeDetectionStrategy, input, output} from "@angular/core"; + +@Component({ + template: ` + ... + `, + standalone: true, + changeDetectionStrategy: ChangeDetectionStrategy.OnPush, + host: { + '(click)': 'clickEvent.emit($event)' + } +}) +class CustomCell { + readonly content = input.required(); + readonly cellType = input(); + + // An output that will emit for every cell click + readonly clickEvent = output(); +} + +class AppComponent { + columns: ColumnDef[] = [ + { + id: 'custom-cell', + header: () => { + const translateService = inject(TranslateService); + return translateService.translate('...'); + }, + cell: (context) => { + return flexRenderComponent( + MyCustomComponent, + { + injector, // Optional injector + inputs: { + // Mandatory input since we are using `input.required() + content: context.row.original.rowProperty, + // cellType? - Optional input + }, + outputs: { + clickEvent: () => { + // Do something + } + } + } + ) + }, + }, + ] +} +``` + +Underneath, this utilizes +the [ViewContainerRef#createComponent](https://angular.dev/api/core/ViewContainerRef#createComponent) api. +Therefore, you should declare your custom inputs using the @Input decorator or input/model signals. + +You can still access the table cell context through the `injectFlexRenderContext` function, which returns the context +value based on the props you pass to the `FlexRenderDirective`. + +```ts + +@Component({ + // ... +}) +class CustomCellComponent { + // context of a cell component + readonly context = injectFlexRenderContext>(); + // context of a header/footer component + readonly context = injectFlexRenderContext>(); +} +``` + +Alternatively, you can render a component into a specific column header, cell, or footer by passing the component type +to the corresponding column definitions. These column definitions will be provided to the `flexRender` directive along +with the `context`. + +```ts +class AppComponent { + columns: ColumnDef[] = [ + { + id: 'select', + header: () => TableHeadSelectionComponent, + cell: () => TableRowSelectionComponent, + }, + ] +} +``` + +```angular-html + + {{ headerCell }} + +``` + +Properties of `context` provided in the `flexRender` directive will be accessible to your component. +You can explicitly define the context properties required by your component. +In this example, the context provided to flexRender is of type HeaderContext. +Input signal `table`, which is a property of HeaderContext together with `column` and `header` properties, +is then defined to be used in the component. If any of the context properties are +needed in your component, feel free to use them. Please take note that only input signal is supported, +when defining access to context properties, using this approach. + +```angular-ts +@Component({ + template: ` + + `, + // ... +}) +export class TableHeadSelectionComponent { + //column = input.required>() + //header = input.required>() + table = input.required>() +} +``` + #### Rendering a TemplateRef In order to render a TemplateRef into a specific column header/cell/footer, you can pass the TemplateRef into the column @@ -171,101 +311,3 @@ class AppComponent { ] } ``` - -#### Rendering a Component - -To render a Component into a specific column header/cell/footer, you can pass a `FlexRenderComponent instantiated with -your `ComponentType, with the ability to include optional parameters such as inputs and an injector. - -```ts -import {FlexRenderComponent} from "@tanstack/angular-table"; - -class AppComponent { - columns: ColumnDef[] = [ - { - id: 'customCell', - header: () => new FlexRenderComponent( - CustomCellComponent, - {}, // optional inputs - injector // optional injector - ), - cell: () => this.customCell(), - }, - ] -} -``` - -Underneath, this utilizes -the [ViewContainerRef#createComponent](https://angular.dev/api/core/ViewContainerRef#createComponent) api. -Therefore, you should declare your custom inputs using the @Input decorator or input/model signals. - -You can still access the table cell context through the `injectFlexRenderContext` function, which returns the context -value based on the props you pass to the `FlexRenderDirective`. - -```ts -@Component({ - // ... -}) -class CustomCellComponent { - // context of a cell component - readonly context = injectFlexRenderContext>(); - // context of a header/footer component - readonly context = injectFlexRenderContext>(); -} -``` - -Alternatively, you can render a component into a specific column header, cell, or footer by passing the component type -to the corresponding column definitions. These column definitions will be provided to the `flexRender` directive along with the `context`. - -```ts -import {FlexRenderComponent} from "@tanstack/angular-table"; - -class AppComponent { - columns: ColumnDef[] = [ - { - id: 'select', - header: () => TableHeadSelectionComponent, - cell: () => TableRowSelectionComponent, - }, - ] -} -``` - -```angular2html - - {{ headerCell }} - -``` - -Properties of `context` provided in the `flexRender` directive will be accessible to your component. -You can explicitly define the context properties required by your component. -In this example, the context provided to flexRender is of type HeaderContext. -Input signal `table`, which is a property of HeaderContext together with `column` and `header` properties, -is then defined to be used in the component. If any of the context properties are -needed in your component, feel free to use them. Please take note that only input signal is supported, -when defining access to context properties, using this approach. - -```angular-ts -@Component({ - template: ` - - `, - // ... -}) -export class TableHeadSelectionComponent { - //column = input.required>() - //header = input.required>() - table = input.required>() -} -``` \ No newline at end of file diff --git a/docs/framework/react/guide/table-state.md b/docs/framework/react/guide/table-state.md index fb5ac16321..09d57566a0 100644 --- a/docs/framework/react/guide/table-state.md +++ b/docs/framework/react/guide/table-state.md @@ -6,8 +6,8 @@ title: Table State (React) Guide Want to skip to the implementation? Check out these examples: -- [kitchen sink](../../examples/kitchen-sink) -- [fully controlled](../../examples/fully-controlled) +- [kitchen sink](../examples/kitchen-sink) +- [fully controlled](../examples/fully-controlled) ## Table State (React) Guide diff --git a/docs/guide/cells.md b/docs/guide/cells.md index 489411122e..56ef95246f 100644 --- a/docs/guide/cells.md +++ b/docs/guide/cells.md @@ -4,7 +4,7 @@ title: Cells Guide ## API -[Cell API](../../api/core/cell) +[Cell API](../api/core/cell) ## Cells Guide @@ -12,7 +12,7 @@ This quick guide will discuss the different ways you can retrieve and interact w ### Where to Get Cells From -Cells come from [Rows](../rows). Enough said, right? +Cells come from [Rows](../guide/rows). Enough said, right? There are multiple `row` instance APIs you can use to retrieve the appropriate cells from a row depending on which features you are using. Most commonly, you will use the `row.getAllCells` or `row.getVisibleCells` APIs (if you are using column visibility features), but there are a handful of other similar APIs that you can use. @@ -32,7 +32,7 @@ During grouping or aggregation features, the `cell.id` will have additional stri #### Cell Parent Objects -Every cell stores a reference to its parent [row](../rows) and [column](../columns) objects. +Every cell stores a reference to its parent [row](../guide/rows) and [column](../guide/columns) objects. #### Access Cell Values @@ -82,4 +82,4 @@ const columns = [ {row.getVisibleCells().map(cell => { return {flexRender(cell.column.columnDef.cell, cell.getContext())} })} - \ No newline at end of file + diff --git a/docs/guide/column-defs.md b/docs/guide/column-defs.md index 4b4f997dc9..07daad7c05 100644 --- a/docs/guide/column-defs.md +++ b/docs/guide/column-defs.md @@ -1,20 +1,18 @@ --- -title: Columns Definitions Guide +title: Columns Guide --- ## API -[Column Def](../../api/core/column-def) +[Table API](../api/core/table.md) ## Column Definitions Guide -> Note: This guide is about setting up column definitions for your table and NOT about the actual [`column`](../columns) objects that are generated within the table instance. - Column defs are the single most important part of building a table. They are responsible for: - Building the underlying data model that will be used for everything including sorting, filtering, grouping, etc. - Formatting the data model into what will be displayed in the table -- Creating [header groups](../../../api/core/header-group), [headers](../../../api/core/header) and [footers](../../../api/core/column-def#footer) +- Creating [header groups](../api/core/header-group.md), [headers](../api/core/header.md) and [footers](../api/core/column-def.md#footer) - Creating columns for display-only purposes, eg. action buttons, checkboxes, expanders, sparklines, etc. ## Column Def Types @@ -147,38 +145,6 @@ columnHelper.accessor('firstName') } ``` -## Deep Keys - -If each of your items is an object with the following shape: - -```tsx -type Person = { - name: { - first: string - last: string - } - info: { - age: number - visits: number - } -} -``` - -You could extract the `first` value like so: - -```tsx -columnHelper.accessor('name.first', { - id: 'firstName', -}) - -// OR - -{ - accessorKey: 'name.first', - id: 'firstName', -} -``` - ## Array Indices If each of your items is an array with the following shape: @@ -276,7 +242,7 @@ columnHelper.accessor('firstName', { ## Aggregated Cell Formatting -For more info on aggregated cells, see [grouping](../grouping). +For more info on aggregated cells, see [grouping](./grouping.md). ## Header & Footer Formatting diff --git a/docs/guide/column-faceting.md b/docs/guide/column-faceting.md index 3931bb9e89..1cbc68f37d 100644 --- a/docs/guide/column-faceting.md +++ b/docs/guide/column-faceting.md @@ -6,11 +6,11 @@ title: Column Faceting Guide Want to skip to the implementation? Check out these examples: -- [filters-faceted](../../framework/react/examples/filters-faceted) +- [filters-faceted](../framework/react/examples/filters-faceted) ## API -[Column Faceting API](../../api/features/column-faceting) +[Column Faceting API](../api/features/column-faceting) ## Column Faceting Guide @@ -86,4 +86,4 @@ const table = useReactTable({ }) ``` -Alternatively, you don't have to put any of your faceting logic through the TanStack Table APIs at all. Just fetch your lists and pass them to your filter components directly. \ No newline at end of file +Alternatively, you don't have to put any of your faceting logic through the TanStack Table APIs at all. Just fetch your lists and pass them to your filter components directly. diff --git a/docs/guide/column-filtering.md b/docs/guide/column-filtering.md index f6eb4e68bc..0d9d7e2087 100644 --- a/docs/guide/column-filtering.md +++ b/docs/guide/column-filtering.md @@ -6,18 +6,16 @@ title: Column Filtering Guide Want to skip to the implementation? Check out these examples: -- [Column Filters](../../framework/react/examples/filters) -- [Faceted Filters](../../framework/react/examples/filters-faceted) (Autocomplete and Range filters) -- [Fuzzy Search](../../framework/react/examples/filters-fuzzy) (Match Sorter) -- [Editable Data](../../framework/react/examples/editable-data) -- [Expanding](../../framework/react/examples/expanding) (Filtering from Sub-Rows) -- [Grouping](../../framework/react/examples/grouping) -- [Pagination](../../framework/react/examples/pagination) -- [Row Selection](../../framework/react/examples/row-selection) +- [filters](https://github.com/TanStack/table/tree/main/examples/react/filters) (includes faceting) +- [editable-data](https://github.com/TanStack/table/tree/main/examples/react/editable-data) +- [expanding](https://github.com/TanStack/table/tree/main/examples/react/expanding) +- [grouping](https://github.com/TanStack/table/tree/main/examples/react/grouping) +- [pagination](https://github.com/TanStack/table/tree/main/examples/react/pagination) +- [row-selection](https://github.com/TanStack/table/tree/main/examples/react/row-selection) ## API -[Column Filtering API](../../api/features/column-filtering) +[Column Filtering API](../api/features/column-filtering.md) ## Column Filtering Guide @@ -25,13 +23,13 @@ Filtering comes in 2 flavors: Column Filtering and Global Filtering. This guide will focus on column filtering, which is a filter that is applied to a single column's accessor value. -TanStack table supports both client-side and manual server-side filtering. This guide will go over how to implement and customize both, and help you decide which one is best for your use-case. +TanStack table supports both both client-side and manual server-side filtering. This guide will go over how to implement and customize both, and help you decide which one is best for your use-case. ### Client-Side vs Server-Side Filtering If you have a large dataset, you may not want to load all of that data into the client's browser in order to filter it. In this case, you will most likely want to implement server-side filtering, sorting, pagination, etc. -However, as also discussed in the [Pagination Guide](../pagination#should-you-use-client-side-pagination), a lot of developers underestimate how many rows can be loaded client-side without a performance hit. The TanStack table examples are often tested to handle up to 100,000 rows or more with decent performance for client-side filtering, sorting, pagination, and grouping. This doesn't necessarily mean that your app will be able to handle that many rows, but if your table is only going to have a few thousand rows at most, you might be able to take advantage of the client-side filtering, sorting, pagination, and grouping that TanStack table provides. +However, as also discussed in the [Pagination Guide](./pagination.md#should-you-use-client-side-pagination), a lot of developers underestimate how many rows can be loaded client-side without a performance hit. The TanStack table examples are often tested to handle up to 100,000 rows or more with decent performance for client-side filtering, sorting, pagination, and grouping. This doesn't necessarily that your app will be able to handle that many rows, but if your table is only going to have a few thousand rows at most, you might be able to take advantage of the client-side filtering, sorting, pagination, and grouping that TanStack table provides. > TanStack Table can handle thousands of client-side rows with good performance. Don't rule out client-side filtering, pagination, sorting, etc. without some thought first. @@ -59,7 +57,7 @@ const table = useReactTable({ }) ``` -> **Note:** When using manual filtering, many of the options that are discussed in the rest of this guide will have no effect. When `manualFiltering` is set to `true`, the table instance will not apply any filtering logic to the rows that are passed to it. Instead, it will assume that the rows are already filtered and will use the `data` that you pass to it as-is. +> **Note:** When using manual filtering, many of the options that are discussed in the rest of this guide will have no effect. When is `manualFiltering` is set to `true`, the table instance will not apply any filtering logic to the rows that are passed to it. Instead, it will assume that the rows are already filtered and will use the `data` that you pass to it as-is. ### Client-Side Filtering @@ -217,8 +215,8 @@ const table = useReactTable({ data, getCoreRowModel: getCoreRowModel(), getFilteredRowModel: getFilteredRowModel(), - filterFns: { // add a custom global filter function - myCustomFilterFn: (row, columnId, filterValue) => { // defined inline here + filterFns: { //add a custom sorting function + myCustomFilterFn: (row, columnId, filterValue) => { //defined inline here return // true or false based on your custom logic }, startsWith: startsWithFilterFn, // defined elsewhere @@ -323,15 +321,15 @@ const table = useReactTable({ There are a lot of Column and Table APIs that you can use to interact with the column filter state and hook up to your UI components. Here is a list of the available APIs and their most common use-cases: -- `table.setColumnFilters` - Overwrite the entire column filter state with a new state. -- `table.resetColumnFilters` - Useful for a "clear all/reset filters" button. +- `table.setColumnFilters` - Overwrite the entire column filter state with a new state +- `table.resetColumnFilters` - Useful for a "clear all/reset filters" button -- **`column.getFilterValue`** - Useful for getting the default initial filter value for an input, or even directly providing the filter value to a filter input. -- **`column.setFilterValue`** - Useful for connecting filter inputs to their `onChange` or `onBlur` handlers. +- **`column.getFilterValue`** - Useful for getting the default initial filter value for an input, or even directly providing the filter value to a filter input +- **`column.setFilterValue`** - Useful for connecting filter inputs to their `onChange` or `onBlur` handlers -- `column.getCanFilter` - Useful for disabling/enabling filter inputs. -- `column.getIsFiltered` - Useful for displaying a visual indicator that a column is currently being filtered. -- `column.getFilterIndex` - Useful for displaying in what order the current filter is being applied. +- `column.getCanFilter` - Useful for disabling/enabling filter inputs +- `column.getIsFiltered` - Useful for displaying a visual indicator that a column is currently being filtered +- `column.getFilterIndex` - Useful for displaying in what order the current filter is being applied -- `column.getAutoFilterFn` - Used internally to find the default filter function for a column if none is specified. -- `column.getFilterFn` - Useful for displaying which filter mode or function is currently being used. +- `column.getAutoFilterFn` - +- `column.getFilterFn` - Useful for displaying which filter mode or function is currently being used \ No newline at end of file diff --git a/docs/guide/column-ordering.md b/docs/guide/column-ordering.md index 42a7441da7..1e511841d5 100644 --- a/docs/guide/column-ordering.md +++ b/docs/guide/column-ordering.md @@ -6,12 +6,12 @@ title: Column Ordering Guide Want to skip to the implementation? Check out these examples: -- [column-ordering](../../framework/react/examples/column-ordering) -- [column-dnd](../../framework/react/examples/column-dnd) +- [column-ordering](../framework/react/examples/column-ordering) +- [column-dnd](../framework/react/examples/column-dnd) ## API -[Column Ordering API](../../api/features/column-ordering) +[Column Ordering API](../api/features/column-ordering) ## Column Ordering Guide @@ -21,9 +21,9 @@ By default, columns are ordered in the order they are defined in the `columns` a There are 3 table features that can reorder columns, which happen in the following order: -1. [Column Pinning](../column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns. +1. [Column Pinning](../guide/column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns. 2. Manual **Column Ordering** - A manually specified column order is applied. -3. [Grouping](../grouping) - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow. +3. [Grouping](../guide/grouping) - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow. > **Note:** `columnOrder` state will only affect unpinned columns if used in conjunction with column pinning. @@ -104,8 +104,8 @@ There are undoubtedly many ways to implement drag and drop features along-side T 1. Do NOT try to use [`"react-dnd"`](https://react-dnd.github.io/react-dnd/docs/overview) _if you are using React 18 or newer_. React DnD was an important library for its time, but it now does not get updated very often, and it has incompatibilities with React 18, especially in React Strict Mode. It is still possible to get it to work, but there are newer alternatives that have better compatibility and are more actively maintained. React DnD's Provider may also interfere and conflict with any other DnD solutions you may want to try in your app. -2. Use [`"@dnd-kit/core"`](https://dndkit.com/). DnD Kit is a modern, modular and lightweight drag and drop library that is highly compatible with the modern React ecosystem, and it works well with semantic `` markup. Both of the official TanStack DnD examples, [Column DnD](../../framework/react/examples/column-dnd) and [Row DnD](../../framework/react/examples/row-dnd), now use DnD Kit. +2. Use [`"@dnd-kit/core"`](https://dndkit.com/). DnD Kit is a modern, modular and lightweight drag and drop library that is highly compatible with the modern React ecosystem, and it works well with semantic `
` markup. Both of the official TanStack DnD examples, [Column DnD](../framework/react/examples/column-dnd) and [Row DnD](../framework/react/examples/row-dnd), now use DnD Kit. 3. Consider other DnD libraries like [`"react-beautiful-dnd"`](https://github.com/atlassian/react-beautiful-dnd), but be aware of their potentially large bundle sizes, maintenance status, and compatibility with `
` markup. -4. Consider using native browser events and state management to implement lightweight drag and drop features. However, be aware that this approach may not be best for mobile users if you do not go the extra mile to implement proper touch events. [Material React Table V2](https://www.material-react-table.com/docs/examples/column-ordering) is an example of a library that implements TanStack Table with only browser drag and drop events such as `onDragStart`, `onDragEnd`, `onDragEnter` and no other dependencies. Browse its source code to see how it is done. \ No newline at end of file +4. Consider using native browser events and state management to implement lightweight drag and drop features. However, be aware that this approach may not be best for mobile users if you do not go the extra mile to implement proper touch events. [Material React Table V2](https://www.material-react-table.com/docs/examples/column-ordering) is an example of a library that implements TanStack Table with only browser drag and drop events such as `onDragStart`, `onDragEnd`, `onDragEnter` and no other dependencies. Browse its source code to see how it is done. diff --git a/docs/guide/column-pinning.md b/docs/guide/column-pinning.md index 5a201e741e..9a2f5a4a95 100644 --- a/docs/guide/column-pinning.md +++ b/docs/guide/column-pinning.md @@ -6,17 +6,17 @@ title: Column Pinning Guide Want to skip to the implementation? Check out these examples: -- [column-pinning](../../framework/react/examples/column-pinning) -- [sticky-column-pinning](../../framework/react/examples/column-pinning-sticky) +- [column-pinning](../framework/react/examples/column-pinning) +- [sticky-column-pinning](../framework/react/examples/column-pinning-sticky) ### Other Examples -- [Svelte column-pinning](../../framework/svelte/examples/column-pinning) -- [Vue column-pinning](../../framework/vue/examples/column-pinning) +- [Svelte column-pinning](../framework/svelte/examples/column-pinning) +- [Vue column-pinning](../framework/vue/examples/column-pinning) ## API -[Column Pinning API](../../api/features/column-pinning) +[Column Pinning API](../api/features/column-pinning) ## Column Pinning Guide @@ -27,8 +27,8 @@ TanStack Table offers state and APIs helpful for implementing column pinning fea There are 3 table features that can reorder columns, which happen in the following order: 1. **Column Pinning** - If pinning, columns are split into left, center (unpinned), and right pinned columns. -2. Manual [Column Ordering](../column-ordering) - A manually specified column order is applied. -3. [Grouping](../grouping) - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow. +2. Manual [Column Ordering](../guide/column-ordering) - A manually specified column order is applied. +3. [Grouping](../guide/grouping) - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow. The only way to change the order of the pinned columns is in the `columnPinning.left` and `columnPinning.right` state itself. `columnOrder` state will only affect the order of the unpinned ("center") columns. @@ -77,13 +77,13 @@ const table = useReactTable({ There are a handful of useful Column API methods to help you implement column pinning features: -- [`column.getCanPin`](../../api/features/column-pinning#getcanpin): Use to determine if a column can be pinned. -- [`column.pin`](../../api/features/column-pinning#pin): Use to pin a column to the left or right. Or use to unpin a column. -- [`column.getIsPinned`](../../api/features/column-pinning#getispinned): Use to determine where a column is pinned. -- [`column.getStart`](../../api/features/column-pinning#getstart): Use to provide the correct `left` CSS value for a pinned column. -- [`column.getAfter`](../../api/features/column-pinning#getafter): Use to provide the correct `right` CSS value for a pinned column. -- [`column.getIsLastColumn`](../../api/features/column-pinning#getislastcolumn): Use to determine if a column is the last column in its pinned group. Useful for adding a box-shadow -- [`column.getIsFirstColumn`](../../api/features/column-pinning#getisfirstcolumn): Use to determine if a column is the first column in its pinned group. Useful for adding a box-shadow +- [`column.getCanPin`](../api/features/column-pinning#getcanpin): Use to determine if a column can be pinned. +- [`column.pin`](../api/features/column-pinning#pin): Use to pin a column to the left or right. Or use to unpin a column. +- [`column.getIsPinned`](../api/features/column-pinning#getispinned): Use to determine where a column is pinned. +- [`column.getStart`](../api/features/column-pinning#getstart): Use to provide the correct `left` CSS value for a pinned column. +- [`column.getAfter`](../api/features/column-pinning#getafter): Use to provide the correct `right` CSS value for a pinned column. +- [`column.getIsLastColumn`](../api/features/column-pinning#getislastcolumn): Use to determine if a column is the last column in its pinned group. Useful for adding a box-shadow +- [`column.getIsFirstColumn`](../api/features/column-pinning#getisfirstcolumn): Use to determine if a column is the first column in its pinned group. Useful for adding a box-shadow ### Split Table Column Pinning diff --git a/docs/guide/column-sizing.md b/docs/guide/column-sizing.md index a4212559da..4c35ffbab8 100644 --- a/docs/guide/column-sizing.md +++ b/docs/guide/column-sizing.md @@ -6,12 +6,12 @@ title: Column Sizing Guide Want to skip to the implementation? Check out these examples: -- [column-sizing](../../framework/react/examples/column-sizing) -- [column-resizing-performant](../../framework/react/examples/column-resizing-performant) +- [column-sizing](../framework/react/examples/column-sizing) +- [column-resizing-performant](../framework/react/examples/column-resizing-performant) ## API -[Column Sizing API](../../api/features/column-sizing) +[Column Sizing API](../api/features/column-sizing) ## Column Sizing Guide @@ -166,7 +166,7 @@ TanStack Table keeps track of an state object called `columnSizingInfo` that you If you are creating large or complex tables (and using React 😉), you may find that if you do not add proper memoization to your render logic, your users may experience degraded performance while resizing columns. -We have created a [performant column resizing example](../../framework/react/examples/column-resizing-performant) that demonstrates how to achieve 60 fps column resizing renders with a complex table that may otherwise have slow renders. It is recommended that you just look at that example to see how it is done, but these are the basic things to keep in mind: +We have created a [performant column resizing example](../framework/react/examples/column-resizing-performant) that demonstrates how to achieve 60 fps column resizing renders with a complex table that may otherwise have slow renders. It is recommended that you just look at that example to see how it is done, but these are the basic things to keep in mind: 1. Don't use `column.getSize()` on every header and every data cell. Instead, calculate all column widths once upfront, **memoized**! 2. Memoize your Table Body while resizing is in progress. diff --git a/docs/guide/column-visibility.md b/docs/guide/column-visibility.md index ba7e7e744f..d65d42fff3 100644 --- a/docs/guide/column-visibility.md +++ b/docs/guide/column-visibility.md @@ -6,18 +6,18 @@ title: Column Visibility Guide Want to skip to the implementation? Check out these examples: -- [column-visibility](../../framework/react/examples/column-visibility) -- [column-ordering](../../framework/react/examples/column-ordering) -- [sticky-column-pinning](../../framework/react/examples/column-pinning-sticky) +- [column-visibility](../framework/react/examples/column-visibility) +- [column-ordering](../framework/react/examples/column-ordering) +- [sticky-column-pinning](../framework/react/examples/column-pinning-sticky) ### Other Examples -- [SolidJS column-visibility](../../framework/solid/examples/column-visibility) -- [Svelte column-visibility](../../framework/svelte/examples/column-visibility) +- [SolidJS column-visibility](../framework/solid/examples/column-visibility) +- [Svelte column-visibility](../framework/svelte/examples/column-visibility) ## API -[Column Visibility API](../../api/features/column-visibility) +[Column Visibility API](../api/features/column-visibility) ## Column Visibility Guide diff --git a/docs/guide/columns.md b/docs/guide/columns.md index b2242d6f8b..a40d2edb2a 100644 --- a/docs/guide/columns.md +++ b/docs/guide/columns.md @@ -4,11 +4,11 @@ title: Columns Guide ## API -[Column API](../../api/core/column) +[Column API](../api/core/column) ## Columns Guide -> Note: This guide is about the actual `column` objects that are generated within the table instance and NOT about setting up the [column definitions](../column-defs) for your table. +> Note: This guide is about the actual `column` objects that are generated within the table instance and NOT about setting up the [column definitions](../guide/column-defs) for your table. This quick guide will discuss the different ways you can retrieve and interact with `column` objects in TanStack Table. @@ -18,7 +18,7 @@ You can find the `column` objects in many places. They are often attached #### Header and Cell Objects -Before you reach for one of the `table` instance APIs, consider if you actually need to retrieve either [headers](../headers) or [cells](../cells) instead of `columns`. If you are rending out the markup for your table, you will most likely want to reach for the APIs that return headers or cells instead of columns. The column objects themselves are not really meant to render out the headers or cells, but the `header` and `cell` objects will contain references to these `column` objects from which they can derive the necessary information to render their UI. +Before you reach for one of the `table` instance APIs, consider if you actually need to retrieve either [headers](../guide/headers) or [cells](../guide/cells) instead of `columns`. If you are rending out the markup for your table, you will most likely want to reach for the APIs that return headers or cells instead of columns. The column objects themselves are not really meant to render out the headers or cells, but the `header` and `cell` objects will contain references to these `column` objects from which they can derive the necessary information to render their UI. ```js const column = cell.column; // get column from cell @@ -47,7 +47,7 @@ Column objects are not actually meant to be used to render out the table UI dire #### Column IDs -Every column must have a unique `id` defined in their associated [Column Definition](../column-defs). Usually, you define this `id` yourself, or it is derived from the `accessorKey` or `header` properties in the column definition. +Every column must have a unique `id` defined in their associated [Column Definition](../guide/column-defs). Usually, you define this `id` yourself, or it is derived from the `accessorKey` or `header` properties in the column definition. #### ColumnDef @@ -67,6 +67,6 @@ There are dozens of Column APIs that you can use to interact with the table stat ### Column Rendering -Don't necessarily use `column` objects to render `headers` or `cells` directly. Instead, use the [`header`](../headers) and [`cell`](../cells) objects, as discussed above. +Don't necessarily use `column` objects to render `headers` or `cells` directly. Instead, use the [`header`](../guide/headers) and [`cell`](../guide/cells) objects, as discussed above. But if you are just rendering a list of columns somewhere else in your UI for something like a column visibility menu or something similar, you can just map over a columns array and render out the UI as you normally would. diff --git a/docs/guide/custom-features.md b/docs/guide/custom-features.md index 9242209fdd..5eaa8bdf78 100644 --- a/docs/guide/custom-features.md +++ b/docs/guide/custom-features.md @@ -6,7 +6,7 @@ title: Custom Features Guide Want to skip to the implementation? Check out these examples: -- [custom-features](../../framework/react/examples/custom-features) +- [custom-features](../framework/react/examples/custom-features) ## Custom Features Guide @@ -108,7 +108,7 @@ The `createCell` method in a table feature is responsible for adding methods to Let's walk through making a custom table feature for a hypothetical use case. Let's say we want to add a feature to the table instance that allows the user to change the "density" (padding of cells) of the table. -Check out the full [custom-features](../../framework/react/examples/custom-features) example to see the full implementation, but here's an in-depth look at the steps to create a custom feature. +Check out the full [custom-features](../framework/react/examples/custom-features) example to see the full implementation, but here's an in-depth look at the steps to create a custom feature. #### Step 1: Set up TypeScript Types diff --git a/docs/guide/data.md b/docs/guide/data.md index 77f5d0f874..f6a969a972 100644 --- a/docs/guide/data.md +++ b/docs/guide/data.md @@ -127,13 +127,13 @@ const columns = [ }, { header: 'Age', - accessorFn: info => info.age, + accessorFn: row => row.info.age, }, //... ] ``` -This is discussed in more detail in the [Column Def Guide](../column-defs). +This is discussed in more detail in the [Column Def Guide](../guide/column-defs). > NOTE: The "keys" in your json data can usually be anything, but any periods in the keys will be interpreted as a deep key and will cause errors. @@ -179,7 +179,7 @@ type User = { } ``` -Where `subRows` is an optional array of `User` objects. This is discussed in more detail in the [Expanding Guide](../expanding). +Where `subRows` is an optional array of `User` objects. This is discussed in more detail in the [Expanding Guide](../guide/expanding). ### Give Data a "Stable" Reference @@ -239,7 +239,7 @@ export default function MyComponent() { ### How TanStack Table Transforms Data -Later, in other parts of these docs, you will see how TanStack Table processes the `data` that you pass to the table and generates the row and cell objects that are used to create the table. The `data` that you pass to the table is never mutated by TanStack Table, but the actual values in the rows and cells may be transformed by the accessors in your column definitions, or by other features performed by [row models](../row-models) like grouping or aggregation. +Later, in other parts of these docs, you will see how TanStack Table processes the `data` that you pass to the table and generates the row and cell objects that are used to create the table. The `data` that you pass to the table is never mutated by TanStack Table, but the actual values in the rows and cells may be transformed by the accessors in your column definitions, or by other features performed by [row models](../guide/row-models) like grouping or aggregation. ### How Much Data Can TanStack Table Handle? @@ -247,4 +247,4 @@ Believe it or not, TanStack Table was actually built to scale up to handle poten The default mindset of a developer building a data grid is to implement server-side pagination, sorting, and filtering for large datasets. This is still usually a good idea, but a lot of developers underestimate how much data can actually be handled in the client with modern browsers and the right optimizations. If your table will never have more than a few thousand rows, you can probably take advantage of the client-side features in TanStack Table instead of implementing them yourself on the server. Before committing to letting TanStack Table's client-side features handle your large dataset, you should test it with your actual data to see if it performs well enough for your needs, of course. -This is discussed in more detail in the [Pagination Guide](../pagination#should-you-use-client-side-pagination). +This is discussed in more detail in the [Pagination Guide](../guide/pagination#should-you-use-client-side-pagination). diff --git a/docs/guide/expanding.md b/docs/guide/expanding.md index 8ca11daaf9..6088251ec9 100644 --- a/docs/guide/expanding.md +++ b/docs/guide/expanding.md @@ -6,13 +6,13 @@ title: Expanding Guide Want to skip to the implementation? Check out these examples: -- [expanding](../../framework/react/examples/expanding) -- [grouping](../../framework/react/examples/grouping) -- [sub-components](../../framework/react/examples/sub-components) +- [expanding](../framework/react/examples/expanding) +- [grouping](../framework/react/examples/grouping) +- [sub-components](../framework/react/examples/sub-components) ## API -[Expanding API](../../api/features/expanding) +[Expanding API](../api/features/expanding) ## Expanding Feature Guide diff --git a/docs/guide/features.md b/docs/guide/features.md index 83d961c5b5..fad7441652 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -4,18 +4,18 @@ title: Features Guide TanStack Table comes with many features, each with their own associated options and API: -- [Column Ordering](../column-ordering) -- [Column Pinning](../column-pinning) -- [Column Sizing](../column-sizing) -- [Column Visibility](../column-visibility) -- [Expanding](../expanding) -- [Column Faceting](../column-faceting) -- [Column Filtering](../column-filtering) -- [Global Faceting](../global-faceting) -- [Global Filtering](../global-filtering) -- [Grouping](../grouping) -- [Pagination](../pagination) -- [Row Pinning](../row-pinning) -- [Row Selection](../row-selection) -- [Sorting](../sorting) -- [Virtualization](../virtualization) \ No newline at end of file +- [Column Ordering](./column-ordering.md) +- [Column Pinning](./column-pinning.md) +- [Column Sizing](./column-sizing.md) +- [Column Visibility](./column-visibility.md) +- [Expanding](./expanding.md) +- [Column Faceting](./column-faceting.md) +- [Column Filtering](./column-filtering.md) +- [Global Faceting](./global-faceting.md) +- [Global Filtering](./global-filtering.md) +- [Grouping](./grouping.md) +- [Pagination](./pagination.md) +- [Row Pinning](./row-pinning.md) +- [Row Selection](./row-selection.md) +- [Sorting](./sorting.md) +- [Virtualization](./virtualization.md) \ No newline at end of file diff --git a/docs/guide/filters.md b/docs/guide/filters.md index 1a5dfe5211..478915025e 100644 --- a/docs/guide/filters.md +++ b/docs/guide/filters.md @@ -6,8 +6,7 @@ title: Filters Guide The filter guides are now split into multiple guides: -- [Column Filtering](../column-filtering) -- [Global Filtering](../global-filtering) -- [Fuzzy Filtering](../fuzzy-filtering) -- [Column Faceting](../column-faceting) -- [Global Faceting](../global-faceting) \ No newline at end of file +- [Column Filtering](./column-filtering.md) +- [Global Filtering](./global-filtering.md) +- [Fuzzy Filtering](./fuzzy-filtering.md) + \ No newline at end of file diff --git a/docs/guide/fuzzy-filtering.md b/docs/guide/fuzzy-filtering.md index 6a42b8a839..4dbfefd75f 100644 --- a/docs/guide/fuzzy-filtering.md +++ b/docs/guide/fuzzy-filtering.md @@ -6,11 +6,11 @@ title: Fuzzy Filtering Guide Want to skip to the implementation? Check out these examples: -- [filters-fuzzy](../../framework/react/examples/filters-fuzzy) +- [filters-fuzzy](../framework/react/examples/filters-fuzzy) ## API -[Filters API](../../api/features/filters) +[Filters API](../api/features/filters) ## Fuzzy Filtering Guide diff --git a/docs/guide/global-faceting.md b/docs/guide/global-faceting.md index 708d2d53f4..76a531a98d 100644 --- a/docs/guide/global-faceting.md +++ b/docs/guide/global-faceting.md @@ -6,11 +6,11 @@ title: Global Faceting Guide Want to skip to the implementation? Check out these examples: -- [filters-faceted](../../framework/react/examples/filters) +- [filters-faceted](../framework/react/examples/filters) ## API -[Global Faceting API](../../api/features/global-faceting) +[Global Faceting API](../api/features/global-faceting) ## Global Faceting Guide diff --git a/docs/guide/global-filtering.md b/docs/guide/global-filtering.md index 8006eb0abc..c4e7fb437b 100644 --- a/docs/guide/global-filtering.md +++ b/docs/guide/global-filtering.md @@ -6,11 +6,11 @@ title: Global Filtering Guide Want to skip to the implementation? Check out these examples: -- [Global Filters](../../framework/react/examples/filters-global) +- [Global Filters](https://github.com/TanStack/table/tree/main/examples/react/filters-global) ## API -[Global Filtering API](../../api/features/global-filtering) +[Global Filtering API](../api/features/global-filtering) ## Global Filtering Guide @@ -22,7 +22,7 @@ This guide will focus on global filtering, which is a filter that is applied acr If you have a large dataset, you may not want to load all of that data into the client's browser in order to filter it. In this case, you will most likely want to implement server-side filtering, sorting, pagination, etc. -However, as also discussed in the [Pagination Guide](../pagination#should-you-use-client-side-pagination), a lot of developers underestimate how many rows can be loaded client-side without a performance hit. The TanStack table examples are often tested to handle up to 100,000 rows or more with decent performance for client-side filtering, sorting, pagination, and grouping. This doesn't necessarily mean that your app will be able to handle that many rows, but if your table is only going to have a few thousand rows at most, you might be able to take advantage of the client-side filtering, sorting, pagination, and grouping that TanStack table provides. +However, as also discussed in the [Pagination Guide](../guide/pagination#should-you-use-client-side-pagination), a lot of developers underestimate how many rows can be loaded client-side without a performance hit. The TanStack table examples are often tested to handle up to 100,000 rows or more with decent performance for client-side filtering, sorting, pagination, and grouping. This doesn't necessarily mean that your app will be able to handle that many rows, but if your table is only going to have a few thousand rows at most, you might be able to take advantage of the client-side filtering, sorting, pagination, and grouping that TanStack table provides. > TanStack Table can handle thousands of client-side rows with good performance. Don't rule out client-side filtering, pagination, sorting, etc. without some thought first. diff --git a/docs/guide/grouping.md b/docs/guide/grouping.md index 0bae282711..9c8ee4b278 100644 --- a/docs/guide/grouping.md +++ b/docs/guide/grouping.md @@ -6,18 +6,18 @@ title: Grouping Guide Want to skip to the implementation? Check out these examples: -- [grouping](../../framework/react/examples/grouping) +- [grouping](https://github.com/TanStack/table/tree/main/examples/react/grouping) ## API -[Grouping API](../../api/features/grouping) +[Grouping API](../api/features/grouping.md) ## Grouping Guide There are 3 table features that can reorder columns, which happen in the following order: -1. [Column Pinning](../column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns. -2. Manual [Column Ordering](../column-ordering) - A manually specified column order is applied. +1. [Column Pinning](./column-pinning.md) - If pinning, columns are split into left, center (unpinned), and right pinned columns. +2. Manual [Column Ordering](./column-ordering.md) - A manually specified column order is applied. 3. **Grouping** - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow. Grouping in TanStack table is a feature that applies to columns and allows you to categorize and organize the table rows based on specific columns. This can be useful in cases where you have a large amount of data and you want to group them together based on certain criteria. diff --git a/docs/guide/header-groups.md b/docs/guide/header-groups.md index 0ea1754cf2..9a5762130e 100644 --- a/docs/guide/header-groups.md +++ b/docs/guide/header-groups.md @@ -4,7 +4,7 @@ title: Header Groups Guide ## API -[Header Group API](../../api/core/header-group) +[Header Group API](../api/core/header-group) ## Header Groups Guide @@ -12,7 +12,7 @@ This quick guide will discuss the different ways you can retrieve and interact w ### What are Header Groups? -Header Groups are simply "rows" of headers. Don't let the name confuse you, it's just that simple. The large majority of tables will only have one row of headers (a single header group), but if you define your column structure with nested columns as with the [Column Groups example](../../framework/react/examples/column-groups), you can have multiple rows of headers (multiple header groups). +Header Groups are simply "rows" of headers. Don't let the name confuse you, it's just that simple. The large majority of tables will only have one row of headers (a single header group), but if you define your column structure with nested columns as with the [Column Groups example](../framework/react/examples/column-groups), you can have multiple rows of headers (multiple header groups). ### Where to Get Header Groups From @@ -20,13 +20,13 @@ There are multiple `table` instance APIs you can use to retrieve header groups f ### Header Group Objects -Header Group objects are similar to [Row](../rows) objects, though simpler since there is not as much going on in header rows as there are in the body rows. +Header Group objects are similar to [Row](../guide/rows) objects, though simpler since there is not as much going on in header rows as there are in the body rows. By default, header groups only have three properties: - `id`: The unique identifier for the header group that is generated from its depth (index). This is useful as a key for React components. - `depth`: The depth of the header group, zero-indexed based. Think of this as the row index amongst all header rows. -- `headers`: An array of [Header](../headers) cell objects that belong to this header group (row). +- `headers`: An array of [Header](../guide/headers) cell objects that belong to this header group (row). ### Access Header Cells @@ -46,4 +46,4 @@ To render the header cells in a header group, you just map over the `headers` ar ) })} -``` \ No newline at end of file +``` diff --git a/docs/guide/headers.md b/docs/guide/headers.md index 97623c908c..e0414c8678 100644 --- a/docs/guide/headers.md +++ b/docs/guide/headers.md @@ -4,7 +4,7 @@ title: Headers Guide ## API -[Header API](../../api/core/header) +[Header API](../api/core/header) ## Headers Guide @@ -14,7 +14,7 @@ Headers are the equivalent of cells, but meant for the `` section of the ### Where to Get Headers From -Headers come from [Header Groups](../header-groups), which are the equivalent of rows, but meant for the `` section of the table instead of the `` section. +Headers come from [Header Groups](../guide/header-groups), which are the equivalent of rows, but meant for the `` section of the table instead of the `` section. #### HeaderGroup Headers @@ -42,11 +42,11 @@ There are multiple `table` instance APIs that you can use to retrieve a list of ### Header Objects -Header objects are similar to [Cell](../cells) objects, but meant for the `` section of the table instead of the `` section. Every header object can be associated with a `` section of the table instead of the `` section. Every header object can be associated with a ` -))} \ No newline at end of file +))} diff --git a/docs/guide/pagination.md b/docs/guide/pagination.md index 8ff1aec367..6cc2b73f01 100644 --- a/docs/guide/pagination.md +++ b/docs/guide/pagination.md @@ -6,17 +6,17 @@ title: Pagination Guide Want to skip to the implementation? Check out these examples: -- [pagination](../../framework/react/examples/pagination) -- [pagination-controlled (React Query)](../../framework/react/examples/pagination-controlled) -- [editable-data](../../framework/react/examples/editable-data) -- [expanding](../../framework/react/examples/expanding) -- [filters](../../framework/react/examples/filters) -- [fully-controlled](../../framework/react/examples/fully-controlled) -- [row-selection](../../framework/react/examples/row-selection) +- [pagination](../framework/react/examples/pagination) +- [pagination-controlled (React Query)](../framework/react/examples/pagination-controlled) +- [editable-data](../framework/react/examples/editable-data) +- [expanding](../framework/react/examples/expanding) +- [filters](../framework/react/examples/filters) +- [fully-controlled](../framework/react/examples/fully-controlled) +- [row-selection](../framework/react/examples/row-selection) ## API -[Pagination API](../../api/features/pagination) +[Pagination API](../api/features/pagination) ## Pagination Guide @@ -30,7 +30,7 @@ Using client-side pagination means that the `data` that you fetch will contain * Client-side pagination is usually the simplest way to implement pagination when using TanStack Table, but it might not be practical for very large datasets. -However, a lot of people underestimate just how much data can be handled client-side. If your table will only ever have a few thousand rows or less, client-side pagination can still be a viable option. TanStack Table is designed to scale up to 10s of thousands of rows with decent performance for pagination, filtering, sorting, and grouping. The [official pagination example](../../framework/react/examples/pagination) loads 100,000 rows and still performs well, albeit with only handful of columns. +However, a lot of people underestimate just how much data can be handled client-side. If your table will only ever have a few thousand rows or less, client-side pagination can still be a viable option. TanStack Table is designed to scale up to 10s of thousands of rows with decent performance for pagination, filtering, sorting, and grouping. The [official pagination example](../framework/react/examples/pagination) loads 100,000 rows and still performs well, albeit with only handful of columns. Every use-case is different and will depend on the complexity of the table, how many columns you have, how large every piece of data is, etc. The main bottlenecks to pay attention to are: diff --git a/docs/guide/pinning.md b/docs/guide/pinning.md index c8951f9695..3d33e44ebb 100644 --- a/docs/guide/pinning.md +++ b/docs/guide/pinning.md @@ -6,5 +6,5 @@ title: Pinning Guide Pinning is split into 2 different feature guides: -- [Column Pinning](../column-pinning) -- [Row Pinning](../row-pinning) \ No newline at end of file +- [Column Pinning](./column-pinning.md) +- [Row Pinning](./row-pinning.md) \ No newline at end of file diff --git a/docs/guide/row-pinning.md b/docs/guide/row-pinning.md index e5ee91921b..8554253c9a 100644 --- a/docs/guide/row-pinning.md +++ b/docs/guide/row-pinning.md @@ -6,15 +6,15 @@ title: Row Pinning Guide Want to skip to the implementation? Check out these examples: -- [row-pinning](../../framework/react/examples/row-pinning) +- [row-pinning](../framework/react/examples/row-pinning) ## API -[Row Pinning API](../../api/features/row-pinning) +[Row Pinning API](../api/features/row-pinning) ## Row Pinning Guide There are 2 table features that can reorder rows, which happen in the following order: 1. **Row Pinning** - If pinning, rows are split into top, center (unpinned), and bottom pinned rows. -2. [Sorting](../sorting) \ No newline at end of file +2. [Sorting](../guide/sorting) diff --git a/docs/guide/row-selection.md b/docs/guide/row-selection.md index c3e7b29651..a5a868833b 100644 --- a/docs/guide/row-selection.md +++ b/docs/guide/row-selection.md @@ -6,13 +6,13 @@ title: Row Selection Guide Want to skip to the implementation? Check out these examples: -- [React row-selection](../../framework/react/examples/row-selection) -- [Vue row-selection](../../framework/vue/row-selection) -- [React expanding](../../framework/react/examples/expanding) +- [React row-selection](https://github.com/TanStack/table/tree/main/examples/react/row-selection) +- [Vue row-selection](https://github.com/TanStack/table/tree/main/examples/vue/row-selection) +- [React expanding](https://github.com/TanStack/table/tree/main/examples/react/expanding) ## API -[Row Selection API](../../api/features/row-selection) +[Row Selection API](../api/features/row-selection.md) ## Row Selection Guide diff --git a/docs/guide/rows.md b/docs/guide/rows.md index d2426453fc..a54fd50fd5 100644 --- a/docs/guide/rows.md +++ b/docs/guide/rows.md @@ -4,7 +4,7 @@ title: Rows Guide ## API -[Row API](../../api/core/row) +[Row API](../api/core/row) ## Rows Guide @@ -24,7 +24,7 @@ const row = table.getRow(rowId) #### Row Models -The `table` instance generates `row` objects and stores them in useful arrays called ["Row Models"](../row-models). This is discussed in much more detail in the [Row Models Guide](../row-models), but here are the most common ways you may access the row models. +The `table` instance generates `row` objects and stores them in useful arrays called ["Row Models"](../guide/row-models). This is discussed in much more detail in the [Row Models Guide](../guide/row-models), but here are the most common ways you may access the row models. ##### Render Rows @@ -85,7 +85,7 @@ const firstName = row.original.firstName // { firstName: 'John', lastName: 'Doe' ### Sub Rows -If you are using either grouping or expanding features, your rows may contain sub-rows or parent row references. This is discussed in much more detail in the [Expanding Guide](../expanding), but here is a quick overview of useful properties and methods for working with sub-rows. +If you are using either grouping or expanding features, your rows may contain sub-rows or parent row references. This is discussed in much more detail in the [Expanding Guide](../guide/expanding), but here is a quick overview of useful properties and methods for working with sub-rows. - `row.subRows`: An array of sub-rows for the row. - `row.depth`: The depth of the row (if nested or grouped) relative to the root row array. 0 for root level rows, 1 for child rows, 2 for grandchild rows, etc. @@ -94,4 +94,4 @@ If you are using either grouping or expanding features, your rows may contain su ### More Row APIs -Depending on the features that you are using for your table, there are dozens more useful APIs for interacting with rows. See each features' respective API docs or guide for more information. \ No newline at end of file +Depending on the features that you are using for your table, there are dozens more useful APIs for interacting with rows. See each features' respective API docs or guide for more information. diff --git a/docs/guide/sorting.md b/docs/guide/sorting.md index ec58b7fed4..13e756dfb8 100644 --- a/docs/guide/sorting.md +++ b/docs/guide/sorting.md @@ -6,12 +6,12 @@ title: Sorting Guide Want to skip to the implementation? Check out these examples: -- [sorting](../../framework/react/examples/sorting) -- [filters](../../framework/react/examples/filters) +- [sorting](../framework/react/examples/sorting) +- [filters](../framework/react/examples/filters) ## API -[Sorting API](../../api/features/sorting) +[Sorting API](../api/features/sorting) ## Sorting Guide diff --git a/docs/guide/tables.md b/docs/guide/tables.md index 2ee721f6e9..781ae37c6c 100644 --- a/docs/guide/tables.md +++ b/docs/guide/tables.md @@ -4,72 +4,102 @@ title: Table Instance Guide ## API -[Table API](../../api/core/table) +[Table API](../api/core/table.md) ## Table Instance Guide -TanStack Table is a headless UI library. When we talk about the `table` or "table instance", we're not talking about a literal `
` or similar cell element in your UI. There are a few properties and methods on `header` objects that you can use to interact with the table state and extract cell values from the table based on the state of the table. +Header objects are similar to [Cell](../guide/cells) objects, but meant for the `
` or similar cell element in your UI. There are a few properties and methods on `header` objects that you can use to interact with the table state and extract cell values from the table based on the state of the table. #### Header IDs -Every header object has an `id` property that makes it unique within the table instance. Usually you only need this `id` as a unique identifier for React keys or if you are following the [performant column resizing example](../../framework/react/examples/column-resizing-performant). +Every header object has an `id` property that makes it unique within the table instance. Usually you only need this `id` as a unique identifier for React keys or if you are following the [performant column resizing example](../framework/react/examples/column-resizing-performant). For simple headers with no advanced nested or grouped headers logic, the `header.id` will be the same as it's parent `column.id`. However, if the header is part group column or a placeholder cell, it will have a more complicated id that is constructed from the header family, depth/header row index, column id, and header group id. @@ -65,11 +65,11 @@ There are a few properties on `header` objects that are only useful if the heade #### Header Parent Objects -Every header stores a reference to its parent [column](../columns) object and its parent [header group](../header-groups) object. +Every header stores a reference to its parent [column](../guide/columns) object and its parent [header group](../guide/header-groups) object. ### More Header APIs -Headers have a few more useful APIs attached to them that are useful for interacting with the table state. Most of them relate to the Column sizing and resizing features. See the [Column Resizing Guide](../column-resizing) for more information. +Headers have a few more useful APIs attached to them that are useful for interacting with the table state. Most of them relate to the Column sizing and resizing features. See the [Column Sizing Guide](../guide/column-sizing) for more information. ### Header Rendering @@ -81,4 +81,4 @@ Since the `header` column option you defined can be either a string, jsx, or a f {/* Handles all possible header column def scenarios for `header` */} {flexRender(header.column.columnDef.header, header.getContext())}
` element. Instead, we're referring to the core table object that contains the table state and APIs. The `table` instance is created by calling your adapter's `createTable` function (e.g. `useReactTable`, `useVueTable`, `createSolidTable`, `createSvelteTable`, `createAngularTable`, `useQwikTable`). - -The `table` instance that is returned from the `createTable` function (from the framework adapter) is the main object that you will interact with to read and mutate the table state. It is the one place where everything happens in TanStack Table. When you get to the point where you are rendering your UI, you will use APIs from this `table` instance. +TanStack Table is a headless UI library. When we talk about the `table` or "table instance", we're not talking about a literal `
` element. Instead, we're referring to the core table object that contains the table state and APIs. The `table` instance is created by calling your adapter's `createTable` function (e.g. `useReactTable`, `createSolidTable`, `createSvelteTable`, `useQwikTable`, `useVueTable`). ### Creating a Table Instance -To create a table instance, 3 `options` are required: `columns`, `data`, and a `getCoreRowModel` implementation. There are dozens of other table options to configure features and behavior, but these 3 are required. +To create a table instance, 2 `options` are required: `columns` and `data`. There are dozens of other table options to configure features and behavior, but these 2 are required. #### Defining Data -Define your data as an array of objects with a stable reference. `data` can come from anywhere like an API response or defined statically in your code, but it must have a stable reference to prevent infinite re-renders. If using TypeScript, the type that you give your data will be used as a `TData` generic. See the [Data Guide](../data) for more info. +`data` is an array of objects that will be turned into the rows of your table. Each object in the array represents a row of data (under normal circumstances). If you are using TypeScript, we usually define a type for the shape of our data. This type is used as a generic type for all of the other table, column, row, and cell instances. This type is usually referred to as `TData`. + +For example, if we have a table that displays a list of users in an array like this: + +```json +[ + { + "firstName": "Tanner", + "lastName": "Linsley", + "age": 33, + "visits": 100, + "progress": 50, + "status": "Married" + }, + { + "firstName": "Kevin", + "lastName": "Vandy", + "age": 27, + "visits": 200, + "progress": 100, + "status": "Single" + } +] +``` -#### Defining Columns +Then we can define a User (TData) type like this: + +```ts +//TData +type User = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string +} +``` -Column definitions are covered in detail in the previous section in the [Column Def Guide](../column-defs). We'll note here, however, that when you define the type of your columns, you should use the same `TData` type that you used for your data. +We can then define our `data` array with this type, and then TanStack Table will be able to intelligently infer lots of types for us later on in our columns, rows, cells, etc. ```ts -const columns: ColumnDef[] = [] //Pass User type as the generic TData type +//note: data needs a "stable" reference in order to prevent infinite re-renders +const data: User[] = [] //or -const columnHelper = createColumnHelper() //Pass User type as the generic TData type +const [data, setData] = React.useState([]) +//or +const data = ref([]) +//etc... ``` -The column definitions are where we will tell TanStack Table how each column should access and/or transform row data with either an `accessorKey` or `accessorFn`. See the [Column Def Guide](../column-defs#creating-accessor-columns) for more info. +> Note: `data` needs a "stable" reference (especially in React) in order to prevent infinite re-renders. This is why we recommend using `React.useState` or `React.useMemo`, or defining your data outside of the same react component that creates the table instance, or using a library like TanStack Query to manage your data state. -#### Passing in Row Models +#### Defining Columns -This is explained in much more detail in the [Row Models Guide](../row-models), but for now, just import the `getCoreRowModel` function from TanStack Table and pass it in as a table option. Depending on the features you plan to use, you may need to pass in additional row models later. +Column definitions are covered in detail in the next section in the [Column Def Guide](./column-defs.md). We'll note here, however, that when you define the type of your columns, you should use the same `TData` type that you used for you data. ```ts -import { getCoreRowModel } from '@tanstack/[framework]-table' - -const table = createTable({ columns, data, getCoreRowModel: getCoreRowModel() }) +const columns: ColumnDef[] = [] //Pass User type as the generic TData type +//or +const columnHelper = createColumnHelper() //Pass User type as the generic TData type ``` -#### Initializing the Table Instance +The column definitions are where we will tell TanStack Table how each column should access and/or transform row data with either an `accessorKey` or `accessorFn`. See the [Column Def Guide](./column-defs.md) for more info. + +#### Creating the Table Instance -With our `columns`, `data`, and `getCoreRowModel` defined, we can now create our basic table instance, along side any other table options that we want to pass in. +With our `columns` and `data` defined, we can now create our basic table instance. ```ts //vanilla js -const table = createTable({ columns, data, getCoreRowModel: getCoreRowModel() }) - -//angular -this.table = createAngularTable({ columns: this.columns, data: this.data(), getCoreRowModel: getCoreRowModel() }) - -//lit -const table = this.tableController.table({ columns, data, getCoreRowModel: getCoreRowModel() }) - -//qwik -const table = useQwikTable({ columns, data, getCoreRowModel: getCoreRowModel() }) +const table = createTable({ columns, data }) //react -const table = useReactTable({ columns, data, getCoreRowModel: getCoreRowModel() }) +const table = useReactTable({ columns, data }) //solid -const table = createSolidTable({ columns, get data() { return data() }, getCoreRowModel: getCoreRowModel() }) +const table = createSolidTable({ columns, data }) //svelte -const table = createSvelteTable({ columns, data, getCoreRowModel: getCoreRowModel() }) +const table = createSvelteTable({ columns, data }) //vue -const table = useVueTable({ columns, data, getCoreRowModel: getCoreRowModel() }) +const table = useVueTable({ columns, data }) ``` So what's in the `table` instance? Let's take a look at what interactions we can have with the table instance. @@ -86,16 +116,14 @@ table.setRowSelection((old) => ({...old})) //set the row selection state table.resetRowSelection() //reset the row selection state ``` -This is covered in more detail in the [Table State Guides](../../framework/react/guide/table-state) - ### Table APIs There are dozens of table APIs created by each feature to help you either read or mutate the table state in different ways. API reference docs for the core table instance and all other feature APIs can be found throughout the API docs. -For example, you can find the core table instance API docs here: [Table API](../../api/core/table#table-api) +For example, you can find the core table instance API docs here: [Table API](../api/core/table#table-api) ### Table Row Models -There is a special set of table instance APIs for reading rows out of the table instance called row models. TanStack Table has advanced features where the rows that are generated may be very different than the array of `data` that you originally passed in. To learn more about the different row models that you can pass in as a table option, see the [Row Models Guide](../row-models). +There is a special set of table instance APIs for reading rows out of the table instance called row models. TanStack Table has advanced features where the rows that are generated may be very different than the array of `data` that you originally passed in. To learn more about the different row models that you can pass in as a table option, see the [Row Models Guide](./row-models.md). diff --git a/docs/guide/virtualization.md b/docs/guide/virtualization.md index 3298979908..7b66b602ad 100644 --- a/docs/guide/virtualization.md +++ b/docs/guide/virtualization.md @@ -6,14 +6,10 @@ title: Virtualization Guide Want to skip to the implementation? Check out these examples: -- [virtualized-columns](../../framework/react/examples/virtualized-columns) -- [virtualized-rows (dynamic row height)](../../framework/react/examples/virtualized-rows) -- [virtualized-rows (fixed row height)](../../../../../virtual/v3/docs/framework/react/examples/table) -- [virtualized-infinite-scrolling](../../framework/react/examples/virtualized-infinite-scrolling) - -## API - -[TanStack Virtual Virtualizer API](../../../../../virtual/v3/docs/api/virtualizer) +- [virtualized-columns](https://github.com/TanStack/table/tree/main/examples/react/virtualized-columns) +- [virtualized-rows (dynamic row height)](https://github.com/TanStack/table/tree/main/examples/react/virtualized-rows) +- [virtualized-rows (fixed row height)](https://github.com/TanStack/table/tree/main/examples/react/virtualized-rows) +- [virtualized-infinite-scrolling](https://github.com/TanStack/table/tree/main/examples/react/virtualized-infinite-scrolling) ## Virtualization Guide diff --git a/docs/overview.md b/docs/overview.md index 4a01e92d14..7d20598014 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -8,56 +8,29 @@ TanStack Table's core is **framework agnostic**, which means its API is the same While TanStack Table is written in [TypeScript](https://www.typescriptlang.org/), using TypeScript in your application is optional (but recommended as it comes with outstanding benefits to both you and your codebase) -If you use TypeScript, you will get top-notch type safety and editor autocomplete for all table APIs and state. - ## Headless -As it was mentioned extensively in the [Intro](../introduction) section, TanStack Table is **headless**. This means that it doesn't render any DOM elements, and instead relies on you, the UI/UX developer to provide the table's markup and styles. This is a great way to build a table that can be used in any UI framework, including React, Vue, Solid, Svelte, Qwik, Angular, and even JS-to-native platforms like React Native! - -## Agnostic - -Since TanStack Table is headless and runs on a vanilla JavaScript core, it is agnostic in a couple of ways: - -1. TanStack Table is **Framework Agnostic**, which means you can use it with any JavaScript framework (or library) that you want. TanStack Table provides ready-to-use adapters for React, Vue, Solid, Svelte, and Qwik out of the box, but you can create your own adapter if you need to. -2. TanStack Table is **CSS / Component Library Agnostic**, which means that you can use TanStack Table with whatever CSS strategy or component library you want. TanStack Table itself does not render any table markup or styles. You bring your own! Want to use Tailwind or ShadCN? No problem! Want to use Material UI or Bootstrap? No problem! Have your own custom design system? TanStack Table was made for you! +As it was mentioned extensively in the [Intro](./introduction.md) section, TanStack Table is **headless**. This means that it doesn't render any DOM elements, and instead relies on you, the UI/UX developer to provide the table's markup and styles. This is a great way to build a table that can be used in any UI framework, including React, Vue, Solid, Svelte, Qwik, and even JS-to-native platforms like React Native! ## Core Objects and Types The table core uses the following abstractions, commonly exposed by adapters: -- [Data](../guide/data) - The core data array you provide the table -- [Column Defs](../guide/column-defs): Objects used to configure a column and its data model, display templates, and more -- [Table Instance](../guide/tables): The core table object containing both state and API -- [Row Models](../guide/row-models): How the `data` array is transformed into useful rows depending on the features you are using -- [Rows](../guide/rows): Each row mirrors its respective row data and provides row-specific APIs -- [Cells](../guide/cells): Each cell mirrors its respective row-column intersection and provides cell-specific APIs -- [Header Groups](../guide/header-groups): Header groups are computed slices of nested header levels, each containing a group of headers -- [Headers](../guide/headers): Each header is either directly associated with or derived from its column def and provides header-specific APIs -- [Columns](../guide/columns): Each column mirrors its respective column def and also provides column-specific APIs - -## Features - -TanStack Table will help you build just about any type of table you can imagine. It has built-in state and APIs for the following features: - -- [Column Faceting](../guide/column-faceting) - List unique lists of column values or min/max values for a column -- [Column Filtering](../guide/column-filtering) - Filter rows based on search values for a column -- [Column Grouping](../guide/grouping) - Group columns together, run aggregations, and more -- [Column Ordering](../guide/column-ordering) - Dynamically change the order of columns -- [Column Pinning](../guide/column-pinning) - Pin (Freeze) columns to the left or right of the table -- [Column Sizing](../guide/column-sizing) - Dynamically change the size of columns (column resizing handles) -- [Column Visibility](../guide/column-visibility) - Hide/show columns -- [Global Faceting](../guide/global-faceting) - List unique lists of column values or min/max values for the entire table -- [Global Filtering](../guide/global-filtering) - Filter rows based on search values for the entire table -- [Row Expanding](../guide/expanding) - Expand/collapse rows (sub-rows) -- [Row Pagination](../guide/pagination) - Paginate rows -- [Row Pinning](../guide/row-pinning) - Pin (Freeze) rows to the top or bottom of the table -- [Row Selection](../guide/row-selection) - Select/deselect rows (checkboxes) -- [Row Sorting](../guide/sorting) - Sort rows by column values - -These are just some of the capabilities that you can build with TanStack Table. There are many more features that are possible with TanStack Table that you can add along-side the built-in features. - -[Virtualization](../guide/virtualization) is an example of a feature that is not built-in to TanStack Table, but can be achieved by using another library (like [TanStack Virtual](https://tanstack.com/virtual/v3)) and adding it along-side your other table rendering logic. - -TanStack Table also supports [Custom Features](../guide/custom-features) (plugins) that you can use to modify the table instance to add your own custom logic to the table in a more integrated way. - -And of course, you can just write your own state and hooks to add whatever other features you want for your table. The features from the TanStack Table core are just a solid foundation to build on, with a large focus on performance and DX. +- Column Defs + - Objects used to configure a column and its data model, display templates, and more +- Table + - The core table object containing both state and API +- Table Data + - The core data array you provide the table +- Columns + - Each column mirrors its respective column def and also provides column-specific APIs +- Rows + - Each row mirrors its respective row data and provides row-specific APIs +- Header Groups + - Header groups are computed slices of nested header levels, each containing a group of headers +- Headers + - Each header is either directly associated with or derived from its column def and provides header-specific APIs +- Cells + - Each cell mirrors its respective row-column intersection and provides cell-specific APIs + +There are even more structures that pertain to specific features like filtering, sorting, grouping, etc, which you can find in the [features](./guide/features.md) section. diff --git a/examples/angular/basic/package.json b/examples/angular/basic/package.json index e713398656..d8dd632512 100644 --- a/examples/angular/basic/package.json +++ b/examples/angular/basic/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-angular-basic", - "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", @@ -18,7 +17,7 @@ "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", "@angular/router": "^17.3.9", - "@tanstack/angular-table": "^8.20.5", + "@tanstack/angular-table": "^8.21.3", "rxjs": "~7.8.1", "zone.js": "~0.14.4" }, 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/package.json b/examples/angular/column-ordering/package.json index 0be40f4c65..b14a707b72 100644 --- a/examples/angular/column-ordering/package.json +++ b/examples/angular/column-ordering/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-angular-column-ordering", - "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", @@ -18,7 +17,7 @@ "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", "@faker-js/faker": "^8.4.1", - "@tanstack/angular-table": "^8.20.5", + "@tanstack/angular-table": "^8.21.3", "rxjs": "~7.8.1", "zone.js": "~0.14.4" }, 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/package.json b/examples/angular/column-pinning-sticky/package.json index ed69d5b3ea..5877ed87de 100644 --- a/examples/angular/column-pinning-sticky/package.json +++ b/examples/angular/column-pinning-sticky/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-angular-column-pinning-sticky", - "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", @@ -18,7 +17,7 @@ "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", "@faker-js/faker": "^8.4.1", - "@tanstack/angular-table": "^8.20.5", + "@tanstack/angular-table": "^8.21.3", "rxjs": "~7.8.1", "zone.js": "~0.14.4" }, 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/package.json b/examples/angular/column-pinning/package.json index 3de8173aaa..e8ca9592de 100644 --- a/examples/angular/column-pinning/package.json +++ b/examples/angular/column-pinning/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-angular-column-pinning", - "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", @@ -18,7 +17,7 @@ "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", "@faker-js/faker": "^8.4.1", - "@tanstack/angular-table": "^8.20.5", + "@tanstack/angular-table": "^8.21.3", "rxjs": "~7.8.1", "zone.js": "~0.14.4" }, 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/.devcontainer/devcontainer.json b/examples/angular/column-resizing-performant/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..36f47d8762 --- /dev/null +++ b/examples/angular/column-resizing-performant/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Node.js", + "image": "mcr.microsoft.com/devcontainers/javascript-node:18" +} diff --git a/examples/angular/column-resizing-performant/.editorconfig b/examples/angular/column-resizing-performant/.editorconfig new file mode 100644 index 0000000000..59d9a3a3e7 --- /dev/null +++ b/examples/angular/column-resizing-performant/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/examples/angular/column-resizing-performant/.gitignore b/examples/angular/column-resizing-performant/.gitignore new file mode 100644 index 0000000000..0711527ef9 --- /dev/null +++ b/examples/angular/column-resizing-performant/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/examples/angular/column-resizing-performant/README.md b/examples/angular/column-resizing-performant/README.md new file mode 100644 index 0000000000..5da97a87d1 --- /dev/null +++ b/examples/angular/column-resizing-performant/README.md @@ -0,0 +1,27 @@ +# Basic + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.1.2. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/examples/angular/column-resizing-performant/angular.json b/examples/angular/column-resizing-performant/angular.json new file mode 100644 index 0000000000..f74e8d69b9 --- /dev/null +++ b/examples/angular/column-resizing-performant/angular.json @@ -0,0 +1,83 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "column-resizing-performant": { + "cli": { + "cache": { + "enabled": false + } + }, + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "outputPath": "dist/column-resizing-performant", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": ["zone.js"], + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "column-resizing-performant:build:production" + }, + "development": { + "buildTarget": "column-resizing-performant:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "column-resizing-performant:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": ["zone.js", "zone.js/testing"], + "tsConfig": "tsconfig.spec.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + } + } + } + } + }, + "cli": { + "analytics": false + } +} diff --git a/examples/angular/column-resizing-performant/package.json b/examples/angular/column-resizing-performant/package.json new file mode 100644 index 0000000000..d97f8fa706 --- /dev/null +++ b/examples/angular/column-resizing-performant/package.json @@ -0,0 +1,39 @@ +{ + "name": "tanstack-table-example-angular-column-resizing-performant", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "dependencies": { + "@angular/animations": "^17.3.9", + "@angular/common": "^17.3.9", + "@angular/compiler": "^17.3.9", + "@angular/core": "^17.3.9", + "@angular/forms": "^17.3.9", + "@angular/platform-browser": "^17.3.9", + "@angular/platform-browser-dynamic": "^17.3.9", + "@angular/router": "^17.3.9", + "@faker-js/faker": "^8.4.1", + "@tanstack/angular-table": "^8.21.3", + "rxjs": "~7.8.1", + "zone.js": "~0.14.4" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^17.3.8", + "@angular/cli": "^17.3.8", + "@angular/compiler-cli": "^17.3.9", + "@types/jasmine": "~5.1.4", + "jasmine-core": "~5.1.2", + "karma": "~6.4.3", + "karma-chrome-launcher": "~3.2.0", + "karma-coverage": "~2.2.1", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.1.0", + "tslib": "^2.6.2", + "typescript": "5.4.5" + } +} diff --git a/examples/angular/column-resizing-performant/src/app/app.component.html b/examples/angular/column-resizing-performant/src/app/app.component.html new file mode 100644 index 0000000000..e18f52be95 --- /dev/null +++ b/examples/angular/column-resizing-performant/src/app/app.component.html @@ -0,0 +1,66 @@ +
+
+
+    {{ columnSizingDebugInfo() }}
+  
+
+ + ({{ data().length }} rows) + +
+
+
+ @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) { +
+ @for (header of headerGroup.headers; track header.id) { +
+ @if (!header.isPlaceholder) { + +
+
+ } + +
+
+ } +
+ } +
+
+ @for (row of table.getRowModel().rows; track row.id) { +
+ @for (cell of row.getVisibleCells(); track cell.id) { + + } + + } + + + + diff --git a/examples/angular/column-resizing-performant/src/app/app.component.ts b/examples/angular/column-resizing-performant/src/app/app.component.ts new file mode 100644 index 0000000000..f7da925eb9 --- /dev/null +++ b/examples/angular/column-resizing-performant/src/app/app.component.ts @@ -0,0 +1,122 @@ +import { + ChangeDetectionStrategy, + Component, + computed, + signal, + untracked, +} from '@angular/core' +import { + ColumnDef, + createAngularTable, + FlexRenderDirective, + getCoreRowModel, +} from '@tanstack/angular-table' +import { makeData, type Person } from './makeData' +import { TableResizableCell, TableResizableHeader } from './resizable-cell' + +const defaultColumns: ColumnDef[] = [ + { + header: 'Name', + footer: (props) => props.column.id, + columns: [ + { + accessorKey: 'firstName', + cell: (info) => info.getValue(), + footer: (props) => props.column.id, + }, + { + accessorFn: (row) => row.lastName, + id: 'lastName', + cell: (info) => info.getValue(), + header: () => 'Last Name', + footer: (props) => props.column.id, + }, + ], + }, + { + header: 'Info', + footer: (props) => props.column.id, + columns: [ + { + accessorKey: 'age', + header: () => 'Age', + footer: (props) => props.column.id, + }, + { + accessorKey: 'visits', + header: () => 'Visits', + footer: (props) => props.column.id, + }, + { + accessorKey: 'status', + header: 'Status', + footer: (props) => props.column.id, + }, + { + accessorKey: 'progress', + header: 'Profile Progress', + footer: (props) => props.column.id, + }, + ], + }, +] + +@Component({ + selector: 'app-root', + standalone: true, + imports: [FlexRenderDirective, TableResizableCell, TableResizableHeader], + templateUrl: './app.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class AppComponent { + readonly data = signal(makeData(200)) + + readonly columnSizingInfo = computed( + () => this.table.getState().columnSizingInfo, + ) + readonly columnSizing = computed(() => this.table.getState().columnSizing) + + /** + * Instead of calling `column.getSize()` on every render for every header + * and especially every data cell (very expensive), + * we will calculate all column sizes at once at the root table level in a useMemo + * and pass the column sizes down as CSS variables to the
+ +
+
+
element. + */ + readonly columnSizeVars = computed(() => { + void this.columnSizing() + void this.columnSizingInfo() + const headers = untracked(() => this.table.getFlatHeaders()) + const colSizes: { [key: string]: number } = {} + let i = headers.length + while (--i >= 0) { + const header = headers[i]! + colSizes[`--header-${header.id}-size`] = header.getSize() + colSizes[`--col-${header.column.id}-size`] = header.column.getSize() + } + return colSizes + }) + + readonly table = createAngularTable(() => ({ + data: this.data(), + columns: defaultColumns, + columnResizeMode: 'onChange', + getCoreRowModel: getCoreRowModel(), + defaultColumn: { + minSize: 60, + maxSize: 800, + }, + debugTable: true, + debugHeaders: true, + debugColumns: true, + })) + + readonly columnSizingDebugInfo = computed(() => + JSON.stringify( + { + columnSizing: this.table.getState().columnSizing, + }, + null, + 2, + ), + ) +} diff --git a/examples/angular/column-resizing-performant/src/app/app.config.ts b/examples/angular/column-resizing-performant/src/app/app.config.ts new file mode 100644 index 0000000000..f27099f33c --- /dev/null +++ b/examples/angular/column-resizing-performant/src/app/app.config.ts @@ -0,0 +1,5 @@ +import { ApplicationConfig } from '@angular/core' + +export const appConfig: ApplicationConfig = { + providers: [], +} diff --git a/examples/angular/column-resizing-performant/src/app/makeData.ts b/examples/angular/column-resizing-performant/src/app/makeData.ts new file mode 100644 index 0000000000..331dd1eb19 --- /dev/null +++ b/examples/angular/column-resizing-performant/src/app/makeData.ts @@ -0,0 +1,48 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Person[] +} + +const range = (len: number) => { + const arr: number[] = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, + } +} + +export function makeData(...lens: number[]) { + const makeDataLevel = (depth = 0): Person[] => { + const len = lens[depth]! + return range(len).map((d): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/angular/column-resizing-performant/src/app/resizable-cell.ts b/examples/angular/column-resizing-performant/src/app/resizable-cell.ts new file mode 100644 index 0000000000..af40d01940 --- /dev/null +++ b/examples/angular/column-resizing-performant/src/app/resizable-cell.ts @@ -0,0 +1,35 @@ +import { computed, Directive, input } from '@angular/core' + +@Directive({ + selector: '[tableResizableHeader]', + host: { + '[style.width]': 'width()', + }, + standalone: true, +}) +export class TableResizableHeader { + readonly cellId = input.required({ + alias: 'tableResizableHeader', + }) + + readonly width = computed( + () => `calc(var(--header-${this.cellId()}-size) * 1px)`, + ) +} + +@Directive({ + selector: '[tableResizableCell]', + host: { + '[style.width]': 'width()', + }, + standalone: true, +}) +export class TableResizableCell { + readonly cellId = input.required({ + alias: 'tableResizableCell', + }) + + readonly width = computed( + () => `calc(var(--col-${this.cellId()}-size) * 1px)`, + ) +} diff --git a/examples/angular/column-resizing-performant/src/assets/.gitkeep b/examples/angular/column-resizing-performant/src/assets/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/angular/column-resizing-performant/src/favicon.ico b/examples/angular/column-resizing-performant/src/favicon.ico new file mode 100644 index 0000000000..57614f9c96 Binary files /dev/null and b/examples/angular/column-resizing-performant/src/favicon.ico differ diff --git a/examples/angular/column-resizing-performant/src/index.html b/examples/angular/column-resizing-performant/src/index.html new file mode 100644 index 0000000000..0132a98242 --- /dev/null +++ b/examples/angular/column-resizing-performant/src/index.html @@ -0,0 +1,14 @@ + + + + + Performant Column Resizing + + + + + + + + + diff --git a/examples/angular/column-resizing-performant/src/main.ts b/examples/angular/column-resizing-performant/src/main.ts new file mode 100644 index 0000000000..c3d8f9af99 --- /dev/null +++ b/examples/angular/column-resizing-performant/src/main.ts @@ -0,0 +1,5 @@ +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)) diff --git a/examples/angular/column-resizing-performant/src/styles.scss b/examples/angular/column-resizing-performant/src/styles.scss new file mode 100644 index 0000000000..b829b6ca09 --- /dev/null +++ b/examples/angular/column-resizing-performant/src/styles.scss @@ -0,0 +1,74 @@ +* { + box-sizing: border-box; +} + +html { + font-family: sans-serif; + font-size: 14px; +} + +table, +.divTable { + display: block; + border: 1px solid lightgray; + width: fit-content; +} + +.tr { + display: flex; +} + +tr, +.tr { + width: fit-content; + height: 30px; +} + +th, +.th, +td, +.td { + box-shadow: inset 0 0 0 1px lightgray; + padding: 0.25rem; +} + +th, +.th { + padding: 2px 4px; + position: relative; + font-weight: bold; + text-align: center; + height: 30px; +} + +td, +.td { + height: 30px; +} + +.resizer { + position: absolute; + top: 0; + height: 100%; + right: 0; + width: 5px; + background: rgba(0, 0, 0, 0.5); + cursor: col-resize; + user-select: none; + touch-action: none; +} + +.resizer.isResizing { + background: blue; + opacity: 1; +} + +@media (hover: hover) { + .resizer { + opacity: 0; + } + + *:hover > .resizer { + opacity: 1; + } +} diff --git a/examples/angular/column-resizing-performant/tsconfig.app.json b/examples/angular/column-resizing-performant/tsconfig.app.json new file mode 100644 index 0000000000..84f1f992d2 --- /dev/null +++ b/examples/angular/column-resizing-performant/tsconfig.app.json @@ -0,0 +1,10 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": ["src/main.ts"], + "include": ["src/**/*.d.ts"] +} diff --git a/examples/angular/column-resizing-performant/tsconfig.json b/examples/angular/column-resizing-performant/tsconfig.json new file mode 100644 index 0000000000..b58d3efc71 --- /dev/null +++ b/examples/angular/column-resizing-performant/tsconfig.json @@ -0,0 +1,31 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "src", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": false, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": ["ES2022", "dom"] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/examples/angular/column-resizing-performant/tsconfig.spec.json b/examples/angular/column-resizing-performant/tsconfig.spec.json new file mode 100644 index 0000000000..47e3dd7551 --- /dev/null +++ b/examples/angular/column-resizing-performant/tsconfig.spec.json @@ -0,0 +1,9 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": ["jasmine"] + }, + "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] +} diff --git a/examples/angular/column-visibility/package.json b/examples/angular/column-visibility/package.json index 1c0a1d6e24..c8781158ae 100644 --- a/examples/angular/column-visibility/package.json +++ b/examples/angular/column-visibility/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-angular-column-visibility", - "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", @@ -17,7 +16,7 @@ "@angular/forms": "^17.3.9", "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", - "@tanstack/angular-table": "^8.20.5", + "@tanstack/angular-table": "^8.21.3", "rxjs": "~7.8.1", "zone.js": "~0.14.4" }, 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/.devcontainer/devcontainer.json b/examples/angular/editable/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..36f47d8762 --- /dev/null +++ b/examples/angular/editable/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Node.js", + "image": "mcr.microsoft.com/devcontainers/javascript-node:18" +} diff --git a/examples/angular/editable/.editorconfig b/examples/angular/editable/.editorconfig new file mode 100644 index 0000000000..59d9a3a3e7 --- /dev/null +++ b/examples/angular/editable/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/examples/angular/editable/.gitignore b/examples/angular/editable/.gitignore new file mode 100644 index 0000000000..0711527ef9 --- /dev/null +++ b/examples/angular/editable/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/examples/angular/editable/README.md b/examples/angular/editable/README.md new file mode 100644 index 0000000000..5da97a87d1 --- /dev/null +++ b/examples/angular/editable/README.md @@ -0,0 +1,27 @@ +# Basic + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.1.2. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/examples/angular/editable/angular.json b/examples/angular/editable/angular.json new file mode 100644 index 0000000000..0a6c896860 --- /dev/null +++ b/examples/angular/editable/angular.json @@ -0,0 +1,83 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "editable": { + "cli": { + "cache": { + "enabled": false + } + }, + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "outputPath": "dist/editable", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": ["zone.js"], + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "editable:build:production" + }, + "development": { + "buildTarget": "editable:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "editable:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": ["zone.js", "zone.js/testing"], + "tsConfig": "tsconfig.spec.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + } + } + } + } + }, + "cli": { + "analytics": false + } +} diff --git a/examples/angular/editable/package.json b/examples/angular/editable/package.json new file mode 100644 index 0000000000..c0b1fc86c0 --- /dev/null +++ b/examples/angular/editable/package.json @@ -0,0 +1,39 @@ +{ + "name": "tanstack-table-example-angular-editable", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "dependencies": { + "@angular/animations": "^17.3.9", + "@angular/common": "^17.3.9", + "@angular/compiler": "^17.3.9", + "@angular/core": "^17.3.9", + "@angular/forms": "^17.3.9", + "@angular/platform-browser": "^17.3.9", + "@angular/platform-browser-dynamic": "^17.3.9", + "@angular/router": "^17.3.9", + "@faker-js/faker": "^8.4.1", + "@tanstack/angular-table": "^8.21.3", + "rxjs": "~7.8.1", + "zone.js": "~0.14.4" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^17.3.8", + "@angular/cli": "^17.3.8", + "@angular/compiler-cli": "^17.3.9", + "@types/jasmine": "~5.1.4", + "jasmine-core": "~5.1.2", + "karma": "~6.4.3", + "karma-chrome-launcher": "~3.2.0", + "karma-coverage": "~2.2.1", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.1.0", + "tslib": "^2.6.2", + "typescript": "5.4.5" + } +} diff --git a/examples/angular/editable/src/app/app.component.html b/examples/angular/editable/src/app/app.component.html new file mode 100644 index 0000000000..d960bcf324 --- /dev/null +++ b/examples/angular/editable/src/app/app.component.html @@ -0,0 +1,106 @@ +
+
+ + @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) { + + @for (header of headerGroup.headers; track header.id) { + @if (!header.isPlaceholder) { + + } + } + + } + + + @for (row of table.getRowModel().rows; track row.id) { + + @for (cell of row.getVisibleCells(); track cell.id) { + + } + + } + + + @for (footerGroup of table.getFooterGroups(); track footerGroup.id) { + + @for (footer of footerGroup.headers; track footer.id) { + + } + + } + +
+ +
+
+
+ +
+
+
+ + {{ footer }} + +
+ +
+
+ + + + + +
Page
+ + {{ table.getState().pagination.pageIndex + 1 }} of + {{ table.getPageCount() }} + +
+
+
+ + diff --git a/examples/angular/editable/src/app/app.component.ts b/examples/angular/editable/src/app/app.component.ts new file mode 100644 index 0000000000..95f301bab2 --- /dev/null +++ b/examples/angular/editable/src/app/app.component.ts @@ -0,0 +1,130 @@ +import { + afterNextRender, + ChangeDetectionStrategy, + Component, + inject, + Injector, + signal, +} from '@angular/core' +import { + ColumnDef, + createAngularTable, + flexRenderComponent, + FlexRenderDirective, + getCoreRowModel, + getFilteredRowModel, + getPaginationRowModel, + type RowData, +} from '@tanstack/angular-table' +import { EditableCell } from './editable-cell' +import { makeData, type Person } from './makeData' + +declare module '@tanstack/angular-table' { + interface TableMeta { + updateData: (rowIndex: number, columnId: string, value: unknown) => void + } +} + +const defaultColumn: Partial> = { + cell: ({ getValue, row, column, table }) => { + const initialValue = getValue() + + return flexRenderComponent(EditableCell, { + inputs: { + value: initialValue, + }, + outputs: { + blur: (value) => { + if (table.options.meta?.updateData) { + table.options.meta.updateData(row.index, column.id, value) + } + }, + }, + }) + }, +} + +const defaultColumns: ColumnDef[] = [ + { + accessorKey: 'firstName', + footer: (info) => info.column.id, + }, + { + accessorFn: (row) => row.lastName, + id: 'lastName', + header: () => `Last Name`, + footer: (info) => info.column.id, + }, + { + accessorKey: 'age', + header: () => 'Age', + footer: (info) => info.column.id, + }, + { + accessorKey: 'visits', + header: () => `Visits`, + footer: (info) => info.column.id, + }, + { + accessorKey: 'status', + header: 'Status', + footer: (info) => info.column.id, + }, + { + accessorKey: 'progress', + header: 'Profile Progress', + footer: (info) => info.column.id, + }, +] + +@Component({ + selector: 'app-root', + standalone: true, + imports: [FlexRenderDirective], + templateUrl: './app.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class AppComponent { + readonly data = signal(makeData(10_000)) + readonly injector = inject(Injector) + + readonly autoResetPageIndex = signal(true) + + readonly table = createAngularTable(() => ({ + data: this.data(), + columns: defaultColumns, + defaultColumn: defaultColumn, + getCoreRowModel: getCoreRowModel(), + getFilteredRowModel: getFilteredRowModel(), + getPaginationRowModel: getPaginationRowModel(), + debugTable: true, + autoResetPageIndex: this.autoResetPageIndex(), + // Provide our updateData function to our table meta + meta: { + updateData: (rowIndex, columnId, value) => { + // Skip page index reset until after next rerender + this.autoResetPageIndex.set(false) + + this.data.update((old) => + old.map((row, index) => { + if (index === rowIndex) { + return { + ...old[rowIndex], + [columnId]: value, + } + } + return row + }), + ) + + afterNextRender(() => this.autoResetPageIndex.set(true), { + injector: this.injector, + }) + }, + }, + })) + + refresh() { + this.data.set(makeData(10_000)) + } +} diff --git a/examples/angular/editable/src/app/app.config.ts b/examples/angular/editable/src/app/app.config.ts new file mode 100644 index 0000000000..f27099f33c --- /dev/null +++ b/examples/angular/editable/src/app/app.config.ts @@ -0,0 +1,5 @@ +import { ApplicationConfig } from '@angular/core' + +export const appConfig: ApplicationConfig = { + providers: [], +} diff --git a/examples/angular/editable/src/app/editable-cell.ts b/examples/angular/editable/src/app/editable-cell.ts new file mode 100644 index 0000000000..db5980334c --- /dev/null +++ b/examples/angular/editable/src/app/editable-cell.ts @@ -0,0 +1,30 @@ +import { + Component, + effect, + input, + output, + signal, + untracked, +} from '@angular/core' +import { FormsModule } from '@angular/forms' + +@Component({ + selector: 'editable-cell', + template: ` `, + standalone: true, + imports: [FormsModule], +}) +export class EditableCell { + readonly modelValue = signal(undefined) + + readonly value = input() + + readonly blur = output() + + constructor() { + effect(() => { + const value = this.value() + untracked(() => this.modelValue.set(value)) + }) + } +} diff --git a/examples/angular/editable/src/app/makeData.ts b/examples/angular/editable/src/app/makeData.ts new file mode 100644 index 0000000000..331dd1eb19 --- /dev/null +++ b/examples/angular/editable/src/app/makeData.ts @@ -0,0 +1,48 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Person[] +} + +const range = (len: number) => { + const arr: number[] = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, + } +} + +export function makeData(...lens: number[]) { + const makeDataLevel = (depth = 0): Person[] => { + const len = lens[depth]! + return range(len).map((d): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/angular/editable/src/assets/.gitkeep b/examples/angular/editable/src/assets/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/angular/editable/src/favicon.ico b/examples/angular/editable/src/favicon.ico new file mode 100644 index 0000000000..57614f9c96 Binary files /dev/null and b/examples/angular/editable/src/favicon.ico differ diff --git a/examples/angular/editable/src/index.html b/examples/angular/editable/src/index.html new file mode 100644 index 0000000000..d24da42550 --- /dev/null +++ b/examples/angular/editable/src/index.html @@ -0,0 +1,14 @@ + + + + + Editable data + + + + + + + + + diff --git a/examples/angular/editable/src/main.ts b/examples/angular/editable/src/main.ts new file mode 100644 index 0000000000..c3d8f9af99 --- /dev/null +++ b/examples/angular/editable/src/main.ts @@ -0,0 +1,5 @@ +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)) diff --git a/examples/angular/editable/src/styles.scss b/examples/angular/editable/src/styles.scss new file mode 100644 index 0000000000..cda3113f7d --- /dev/null +++ b/examples/angular/editable/src/styles.scss @@ -0,0 +1,32 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} + +.pagination-actions { + margin: 10px; + display: flex; + gap: 10px; +} diff --git a/examples/angular/editable/tsconfig.app.json b/examples/angular/editable/tsconfig.app.json new file mode 100644 index 0000000000..84f1f992d2 --- /dev/null +++ b/examples/angular/editable/tsconfig.app.json @@ -0,0 +1,10 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": ["src/main.ts"], + "include": ["src/**/*.d.ts"] +} diff --git a/examples/angular/editable/tsconfig.json b/examples/angular/editable/tsconfig.json new file mode 100644 index 0000000000..b58d3efc71 --- /dev/null +++ b/examples/angular/editable/tsconfig.json @@ -0,0 +1,31 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "src", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": false, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": ["ES2022", "dom"] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/examples/angular/editable/tsconfig.spec.json b/examples/angular/editable/tsconfig.spec.json new file mode 100644 index 0000000000..47e3dd7551 --- /dev/null +++ b/examples/angular/editable/tsconfig.spec.json @@ -0,0 +1,9 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": ["jasmine"] + }, + "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] +} diff --git a/examples/angular/expanding/.devcontainer/devcontainer.json b/examples/angular/expanding/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..36f47d8762 --- /dev/null +++ b/examples/angular/expanding/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Node.js", + "image": "mcr.microsoft.com/devcontainers/javascript-node:18" +} diff --git a/examples/angular/expanding/.editorconfig b/examples/angular/expanding/.editorconfig new file mode 100644 index 0000000000..59d9a3a3e7 --- /dev/null +++ b/examples/angular/expanding/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/examples/angular/expanding/.gitignore b/examples/angular/expanding/.gitignore new file mode 100644 index 0000000000..0711527ef9 --- /dev/null +++ b/examples/angular/expanding/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/examples/angular/expanding/README.md b/examples/angular/expanding/README.md new file mode 100644 index 0000000000..5da97a87d1 --- /dev/null +++ b/examples/angular/expanding/README.md @@ -0,0 +1,27 @@ +# Basic + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.1.2. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/examples/angular/expanding/angular.json b/examples/angular/expanding/angular.json new file mode 100644 index 0000000000..afb55da75f --- /dev/null +++ b/examples/angular/expanding/angular.json @@ -0,0 +1,83 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "expanding": { + "cli": { + "cache": { + "enabled": false + } + }, + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "outputPath": "dist/expanding", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": ["zone.js"], + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "expanding:build:production" + }, + "development": { + "buildTarget": "expanding:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "expanding:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": ["zone.js", "zone.js/testing"], + "tsConfig": "tsconfig.spec.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + } + } + } + } + }, + "cli": { + "analytics": false + } +} diff --git a/examples/angular/expanding/package.json b/examples/angular/expanding/package.json new file mode 100644 index 0000000000..194beb91cd --- /dev/null +++ b/examples/angular/expanding/package.json @@ -0,0 +1,32 @@ +{ + "name": "tanstack-table-example-angular-expanding", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "dependencies": { + "@angular/animations": "^17.3.9", + "@angular/common": "^17.3.9", + "@angular/compiler": "^17.3.9", + "@angular/core": "^17.3.9", + "@angular/forms": "^17.3.9", + "@angular/platform-browser": "^17.3.9", + "@angular/platform-browser-dynamic": "^17.3.9", + "@angular/router": "^17.3.9", + "@faker-js/faker": "^8.4.1", + "@tanstack/angular-table": "^8.21.3", + "rxjs": "~7.8.1", + "zone.js": "~0.14.4" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^17.3.8", + "@angular/cli": "^17.3.8", + "@angular/compiler-cli": "^17.3.9", + "tslib": "^2.6.2", + "typescript": "5.4.5" + } +} diff --git a/examples/angular/expanding/src/app/app.component.html b/examples/angular/expanding/src/app/app.component.html new file mode 100644 index 0000000000..e010730d97 --- /dev/null +++ b/examples/angular/expanding/src/app/app.component.html @@ -0,0 +1,110 @@ +
+
+ +
+ + + @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) { + + @for (header of headerGroup.headers; track header.id) { + + } + + } + + + @for (row of table.getRowModel().rows; track row.id) { + + @for (cell of row.getVisibleCells(); track cell.id) { + + } + + } + +
+ @if (!header.isPlaceholder) { + +
+
+ } +
+ +
+
+
+
+ +
+
+ + + + + +
Page
+ + {{ table.getState().pagination.pageIndex + 1 }} of + {{ table.getPageCount() }} + +
+ + | Go to page: + + + + +
+ + +
{{ rawExpandedState() }}
+ +
{{ rawRowSelectionState() }}
+
diff --git a/examples/angular/expanding/src/app/app.component.ts b/examples/angular/expanding/src/app/app.component.ts new file mode 100644 index 0000000000..d5db0d639b --- /dev/null +++ b/examples/angular/expanding/src/app/app.component.ts @@ -0,0 +1,110 @@ +import { + ChangeDetectionStrategy, + Component, + computed, + signal, +} from '@angular/core' +import { + ColumnDef, + createAngularTable, + ExpandedState, + flexRenderComponent, + FlexRenderDirective, + getCoreRowModel, + getExpandedRowModel, + getFilteredRowModel, + getPaginationRowModel, +} from '@tanstack/angular-table' +import { makeData, type Person } from './makeData' +import { ReactiveFormsModule } from '@angular/forms' +import { ExpandableCell, ExpandableHeaderCell } from './expandable-cell' + +const defaultColumns: ColumnDef[] = [ + { + accessorKey: 'firstName', + header: () => + flexRenderComponent(ExpandableHeaderCell, { + inputs: { + label: 'First name', + }, + }), + cell: () => flexRenderComponent(ExpandableCell), + }, + { + accessorFn: (row) => row.lastName, + id: 'lastName', + cell: (info) => info.getValue(), + header: () => 'Last Name', + footer: (props) => props.column.id, + }, + { + accessorKey: 'age', + header: () => 'Age', + footer: (props) => props.column.id, + }, + { + accessorKey: 'visits', + header: () => `Visits`, + footer: (props) => props.column.id, + }, + { + accessorKey: 'status', + header: 'Status', + footer: (props) => props.column.id, + }, + { + accessorKey: 'progress', + header: 'Profile Progress', + footer: (props) => props.column.id, + }, +] + +@Component({ + selector: 'app-root', + standalone: true, + imports: [FlexRenderDirective, ReactiveFormsModule], + templateUrl: './app.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class AppComponent { + readonly data = signal(makeData(100, 5, 3)) + readonly expanded = signal({}) + + readonly table = createAngularTable(() => ({ + data: this.data(), + columns: defaultColumns, + state: { + expanded: this.expanded(), + }, + onExpandedChange: (updater) => + typeof updater === 'function' + ? this.expanded.update(updater) + : this.expanded.set(updater), + getSubRows: (row) => row.subRows, + getCoreRowModel: getCoreRowModel(), + getPaginationRowModel: getPaginationRowModel(), + getFilteredRowModel: getFilteredRowModel(), + getExpandedRowModel: getExpandedRowModel(), + // filterFromLeafRows: true, + // maxLeafRowFilterDepth: 0, + debugTable: true, + })) + + readonly rawExpandedState = computed(() => + JSON.stringify(this.expanded(), undefined, 2), + ) + + readonly rawRowSelectionState = computed(() => + JSON.stringify(this.table.getState().rowSelection, undefined, 2), + ) + + onPageInputChange(event: Event): void { + const inputElement = event.target as HTMLInputElement + const page = inputElement.value ? Number(inputElement.value) - 1 : 0 + this.table.setPageIndex(page) + } + + onPageSizeChange(event: any): void { + this.table.setPageSize(Number(event.target.value)) + } +} diff --git a/examples/angular/expanding/src/app/app.config.ts b/examples/angular/expanding/src/app/app.config.ts new file mode 100644 index 0000000000..f27099f33c --- /dev/null +++ b/examples/angular/expanding/src/app/app.config.ts @@ -0,0 +1,5 @@ +import { ApplicationConfig } from '@angular/core' + +export const appConfig: ApplicationConfig = { + providers: [], +} diff --git a/examples/angular/expanding/src/app/expandable-cell.ts b/examples/angular/expanding/src/app/expandable-cell.ts new file mode 100644 index 0000000000..2b1ecdd3b6 --- /dev/null +++ b/examples/angular/expanding/src/app/expandable-cell.ts @@ -0,0 +1,79 @@ +import { ChangeDetectionStrategy, Component, input } from '@angular/core' +import { + type HeaderContext, + injectFlexRenderContext, + type Table, + CellContext, +} from '@tanstack/angular-table' + +@Component({ + standalone: true, + template: ` + + {{ ' ' }} + + + + {{ label() }} + `, + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ExpandableHeaderCell { + readonly context = injectFlexRenderContext>() + + readonly label = input.required() + + get table() { + return this.context.table as Table + } +} + +@Component({ + standalone: true, + template: ` +
+
+ + {{ ' ' }} + + @if (row.getCanExpand()) { + + } @else { + 🔵 + } + {{ ' ' }} + + {{ context.getValue() }} +
+
+ `, + changeDetection: ChangeDetectionStrategy.OnPush, + styles: ` + :host { + > div { + padding-left: calc(2rem * var(--depth, 1)); + } + } + `, +}) +export class ExpandableCell { + readonly context = injectFlexRenderContext>() + + get row() { + return this.context.row + } +} diff --git a/examples/angular/expanding/src/app/makeData.ts b/examples/angular/expanding/src/app/makeData.ts new file mode 100644 index 0000000000..331dd1eb19 --- /dev/null +++ b/examples/angular/expanding/src/app/makeData.ts @@ -0,0 +1,48 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Person[] +} + +const range = (len: number) => { + const arr: number[] = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, + } +} + +export function makeData(...lens: number[]) { + const makeDataLevel = (depth = 0): Person[] => { + const len = lens[depth]! + return range(len).map((d): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/angular/expanding/src/assets/.gitkeep b/examples/angular/expanding/src/assets/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/angular/expanding/src/favicon.ico b/examples/angular/expanding/src/favicon.ico new file mode 100644 index 0000000000..57614f9c96 Binary files /dev/null and b/examples/angular/expanding/src/favicon.ico differ diff --git a/examples/angular/expanding/src/index.html b/examples/angular/expanding/src/index.html new file mode 100644 index 0000000000..bd21f08bcc --- /dev/null +++ b/examples/angular/expanding/src/index.html @@ -0,0 +1,14 @@ + + + + + Expanding + + + + + + + + + diff --git a/examples/angular/expanding/src/main.ts b/examples/angular/expanding/src/main.ts new file mode 100644 index 0000000000..c3d8f9af99 --- /dev/null +++ b/examples/angular/expanding/src/main.ts @@ -0,0 +1,5 @@ +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)) diff --git a/examples/angular/expanding/src/styles.scss b/examples/angular/expanding/src/styles.scss new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/angular/expanding/src/styles.scss @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/angular/expanding/tsconfig.app.json b/examples/angular/expanding/tsconfig.app.json new file mode 100644 index 0000000000..84f1f992d2 --- /dev/null +++ b/examples/angular/expanding/tsconfig.app.json @@ -0,0 +1,10 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": ["src/main.ts"], + "include": ["src/**/*.d.ts"] +} diff --git a/examples/angular/expanding/tsconfig.json b/examples/angular/expanding/tsconfig.json new file mode 100644 index 0000000000..b58d3efc71 --- /dev/null +++ b/examples/angular/expanding/tsconfig.json @@ -0,0 +1,31 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "src", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": false, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": ["ES2022", "dom"] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/examples/angular/expanding/tsconfig.spec.json b/examples/angular/expanding/tsconfig.spec.json new file mode 100644 index 0000000000..47e3dd7551 --- /dev/null +++ b/examples/angular/expanding/tsconfig.spec.json @@ -0,0 +1,9 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": ["jasmine"] + }, + "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] +} diff --git a/examples/angular/filters/package.json b/examples/angular/filters/package.json index 3098179b3e..842f2ee1a3 100644 --- a/examples/angular/filters/package.json +++ b/examples/angular/filters/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-angular-filters", - "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", @@ -18,7 +17,7 @@ "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", "@faker-js/faker": "^8.4.1", - "@tanstack/angular-table": "^8.20.5", + "@tanstack/angular-table": "^8.21.3", "rxjs": "~7.8.1", "tslib": "^2.6.2", "zone.js": "~0.14.4" 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/package.json b/examples/angular/grouping/package.json index ce7b27c37e..79f6837c01 100644 --- a/examples/angular/grouping/package.json +++ b/examples/angular/grouping/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-angular-grouping", - "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", @@ -18,7 +17,7 @@ "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", "@faker-js/faker": "^8.4.1", - "@tanstack/angular-table": "^8.20.5", + "@tanstack/angular-table": "^8.21.3", "rxjs": "~7.8.1", "zone.js": "~0.14.4" }, 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/.devcontainer/devcontainer.json b/examples/angular/row-dnd/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..36f47d8762 --- /dev/null +++ b/examples/angular/row-dnd/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Node.js", + "image": "mcr.microsoft.com/devcontainers/javascript-node:18" +} diff --git a/examples/angular/row-dnd/.editorconfig b/examples/angular/row-dnd/.editorconfig new file mode 100644 index 0000000000..59d9a3a3e7 --- /dev/null +++ b/examples/angular/row-dnd/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/examples/angular/row-dnd/.gitignore b/examples/angular/row-dnd/.gitignore new file mode 100644 index 0000000000..0711527ef9 --- /dev/null +++ b/examples/angular/row-dnd/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/examples/angular/row-dnd/README.md b/examples/angular/row-dnd/README.md new file mode 100644 index 0000000000..8494f725e3 --- /dev/null +++ b/examples/angular/row-dnd/README.md @@ -0,0 +1,27 @@ +# Row Dnd + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.1.2. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/examples/angular/row-dnd/angular.json b/examples/angular/row-dnd/angular.json new file mode 100644 index 0000000000..0a6c896860 --- /dev/null +++ b/examples/angular/row-dnd/angular.json @@ -0,0 +1,83 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "editable": { + "cli": { + "cache": { + "enabled": false + } + }, + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "outputPath": "dist/editable", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": ["zone.js"], + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "editable:build:production" + }, + "development": { + "buildTarget": "editable:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "editable:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": ["zone.js", "zone.js/testing"], + "tsConfig": "tsconfig.spec.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + } + } + } + } + }, + "cli": { + "analytics": false + } +} diff --git a/examples/angular/row-dnd/package.json b/examples/angular/row-dnd/package.json new file mode 100644 index 0000000000..c87c652da8 --- /dev/null +++ b/examples/angular/row-dnd/package.json @@ -0,0 +1,40 @@ +{ + "name": "tanstack-table-example-angular-row-dnd", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "dependencies": { + "@angular/animations": "^17.3.9", + "@angular/cdk": "^17.3.10", + "@angular/common": "^17.3.9", + "@angular/compiler": "^17.3.9", + "@angular/core": "^17.3.9", + "@angular/forms": "^17.3.9", + "@angular/platform-browser": "^17.3.9", + "@angular/platform-browser-dynamic": "^17.3.9", + "@angular/router": "^17.3.9", + "@faker-js/faker": "^8.4.1", + "@tanstack/angular-table": "^8.21.3", + "rxjs": "~7.8.1", + "zone.js": "~0.14.4" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^17.3.8", + "@angular/cli": "^17.3.8", + "@angular/compiler-cli": "^17.3.9", + "@types/jasmine": "~5.1.4", + "jasmine-core": "~5.1.2", + "karma": "~6.4.3", + "karma-chrome-launcher": "~3.2.0", + "karma-coverage": "~2.2.1", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.1.0", + "tslib": "^2.6.2", + "typescript": "5.4.5" + } +} diff --git a/examples/angular/row-dnd/src/app/app.component.css b/examples/angular/row-dnd/src/app/app.component.css new file mode 100644 index 0000000000..9c94476209 --- /dev/null +++ b/examples/angular/row-dnd/src/app/app.component.css @@ -0,0 +1,23 @@ +.cdk-drag-preview { + box-sizing: border-box; + box-shadow: + 0 5px 5px -3px rgba(0, 0, 0, 0.2), + 0 8px 10px 1px rgba(0, 0, 0, 0.14), + 0 3px 14px 2px rgba(0, 0, 0, 0.12); +} + +.cdk-drag-placeholder { + transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); +} + +.cdk-drag-placeholder > td { + background: #ccc; +} + +.cdk-drag-animating { + transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); +} + +.cdk-drop-list-dragging tr[cdkdrag]:not(.cdk-drag-placeholder) { + transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); +} diff --git a/examples/angular/row-dnd/src/app/app.component.html b/examples/angular/row-dnd/src/app/app.component.html new file mode 100644 index 0000000000..b680eaf212 --- /dev/null +++ b/examples/angular/row-dnd/src/app/app.component.html @@ -0,0 +1,55 @@ +
+ + + @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) { + + @for (header of headerGroup.headers; track header.id) { + @if (!header.isPlaceholder) { + + } + } + + } + + + @for (row of table.getRowModel().rows; track row.id) { + + @for (cell of row.getVisibleCells(); track cell.id) { + + } + + } + +
+ +
+
+
+ +
+
+
+ +
{{ sortedIds() | json }}
+
diff --git a/examples/angular/row-dnd/src/app/app.component.ts b/examples/angular/row-dnd/src/app/app.component.ts new file mode 100644 index 0000000000..33afac49a1 --- /dev/null +++ b/examples/angular/row-dnd/src/app/app.component.ts @@ -0,0 +1,93 @@ +import { + ChangeDetectionStrategy, + Component, + computed, + signal, +} from '@angular/core' +import { + ColumnDef, + createAngularTable, + flexRenderComponent, + FlexRenderDirective, + getCoreRowModel, + getFilteredRowModel, + getPaginationRowModel, +} from '@tanstack/angular-table' +import { DragHandleCell } from './drag-handle-cell' +import { makeData, type Person } from './makeData' +import { + CdkDrag, + type CdkDragDrop, + CdkDropList, + moveItemInArray, +} from '@angular/cdk/drag-drop' +import { JsonPipe } from '@angular/common' + +const defaultColumns: ColumnDef[] = [ + { + id: 'drag-handle', + header: 'Move', + cell: () => flexRenderComponent(DragHandleCell), + size: 60, + }, + { + accessorKey: 'firstName', + cell: (info) => info.getValue(), + }, + { + accessorFn: (row) => row.lastName, + id: 'lastName', + cell: (info) => info.getValue(), + header: () => `Last Name`, + }, + { + accessorKey: 'age', + header: () => 'Age', + }, + { + accessorKey: 'visits', + header: () => `Visits`, + }, + { + accessorKey: 'status', + header: 'Status', + }, + { + accessorKey: 'progress', + header: 'Profile Progress', + }, +] + +@Component({ + selector: 'app-root', + standalone: true, + imports: [FlexRenderDirective, CdkDropList, CdkDrag, JsonPipe], + templateUrl: './app.component.html', + styleUrl: './app.component.css', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class AppComponent { + readonly data = signal(makeData(20)) + + readonly table = createAngularTable(() => { + return { + data: this.data(), + columns: defaultColumns, + getRowId: (row) => row.userId, //required because row indexes will change + debugTable: true, + debugHeaders: true, + debugColumns: true, + getCoreRowModel: getCoreRowModel(), + getFilteredRowModel: getFilteredRowModel(), + getPaginationRowModel: getPaginationRowModel(), + } + }) + + readonly sortedIds = computed(() => this.data().map((data) => data.userId)) + + drop(event: CdkDragDrop) { + const data = [...this.data()] + moveItemInArray(data, event.previousIndex, event.currentIndex) + this.data.set(data) + } +} diff --git a/examples/angular/row-dnd/src/app/app.config.ts b/examples/angular/row-dnd/src/app/app.config.ts new file mode 100644 index 0000000000..f27099f33c --- /dev/null +++ b/examples/angular/row-dnd/src/app/app.config.ts @@ -0,0 +1,5 @@ +import { ApplicationConfig } from '@angular/core' + +export const appConfig: ApplicationConfig = { + providers: [], +} diff --git a/examples/angular/row-dnd/src/app/drag-handle-cell.ts b/examples/angular/row-dnd/src/app/drag-handle-cell.ts new file mode 100644 index 0000000000..00320e706e --- /dev/null +++ b/examples/angular/row-dnd/src/app/drag-handle-cell.ts @@ -0,0 +1,20 @@ +import { + ChangeDetectionStrategy, + Component, + effect, + input, + output, + signal, + untracked, +} from '@angular/core' +import { FormsModule } from '@angular/forms' +import { CdkDragHandle } from '@angular/cdk/drag-drop' + +@Component({ + selector: 'editable-cell', + template: ` `, + standalone: true, + imports: [CdkDragHandle], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class DragHandleCell {} diff --git a/examples/angular/row-dnd/src/app/makeData.ts b/examples/angular/row-dnd/src/app/makeData.ts new file mode 100644 index 0000000000..26b666d2ae --- /dev/null +++ b/examples/angular/row-dnd/src/app/makeData.ts @@ -0,0 +1,50 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + userId: string + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Person[] +} + +const range = (len: number) => { + const arr: number[] = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + userId: faker.string.uuid(), + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, + } +} + +export function makeData(...lens: number[]) { + const makeDataLevel = (depth = 0): Person[] => { + const len = lens[depth]! + return range(len).map((_d): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/angular/row-dnd/src/assets/.gitkeep b/examples/angular/row-dnd/src/assets/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/angular/row-dnd/src/favicon.ico b/examples/angular/row-dnd/src/favicon.ico new file mode 100644 index 0000000000..57614f9c96 Binary files /dev/null and b/examples/angular/row-dnd/src/favicon.ico differ diff --git a/examples/angular/row-dnd/src/index.html b/examples/angular/row-dnd/src/index.html new file mode 100644 index 0000000000..adc28921f9 --- /dev/null +++ b/examples/angular/row-dnd/src/index.html @@ -0,0 +1,14 @@ + + + + + Row Drag and drop + + + + + + + + + diff --git a/examples/angular/row-dnd/src/main.ts b/examples/angular/row-dnd/src/main.ts new file mode 100644 index 0000000000..c3d8f9af99 --- /dev/null +++ b/examples/angular/row-dnd/src/main.ts @@ -0,0 +1,5 @@ +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)) diff --git a/examples/angular/row-dnd/src/styles.scss b/examples/angular/row-dnd/src/styles.scss new file mode 100644 index 0000000000..bcafc9601e --- /dev/null +++ b/examples/angular/row-dnd/src/styles.scss @@ -0,0 +1,41 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +td { + border-right: 1px solid lightgray; + padding: 4px 4px; + background-color: white; +} + +td button { + padding: 1px 1rem; + cursor: grab; +} + +td:last-child { + border-right: 0; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/angular/row-dnd/tsconfig.app.json b/examples/angular/row-dnd/tsconfig.app.json new file mode 100644 index 0000000000..84f1f992d2 --- /dev/null +++ b/examples/angular/row-dnd/tsconfig.app.json @@ -0,0 +1,10 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": ["src/main.ts"], + "include": ["src/**/*.d.ts"] +} diff --git a/examples/angular/row-dnd/tsconfig.json b/examples/angular/row-dnd/tsconfig.json new file mode 100644 index 0000000000..b58d3efc71 --- /dev/null +++ b/examples/angular/row-dnd/tsconfig.json @@ -0,0 +1,31 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "src", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": false, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": ["ES2022", "dom"] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/examples/angular/row-dnd/tsconfig.spec.json b/examples/angular/row-dnd/tsconfig.spec.json new file mode 100644 index 0000000000..47e3dd7551 --- /dev/null +++ b/examples/angular/row-dnd/tsconfig.spec.json @@ -0,0 +1,9 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": ["jasmine"] + }, + "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] +} diff --git a/examples/angular/row-selection-signal/package.json b/examples/angular/row-selection-signal/package.json index 376d351e36..40d2c28f79 100644 --- a/examples/angular/row-selection-signal/package.json +++ b/examples/angular/row-selection-signal/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-angular-row-selection-signal", - "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", @@ -18,7 +17,7 @@ "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", "@faker-js/faker": "^8.4.1", - "@tanstack/angular-table": "^8.20.5", + "@tanstack/angular-table": "^8.21.3", "rxjs": "~7.8.1", "tslib": "^2.6.2", "zone.js": "~0.14.4" 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/package.json b/examples/angular/row-selection/package.json index da1b83e281..8f27b5b30b 100644 --- a/examples/angular/row-selection/package.json +++ b/examples/angular/row-selection/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-angular-row-selection", - "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", @@ -18,7 +17,7 @@ "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", "@faker-js/faker": "^8.4.1", - "@tanstack/angular-table": "^8.20.5", + "@tanstack/angular-table": "^8.21.3", "rxjs": "~7.8.1", "tslib": "^2.6.2", "zone.js": "~0.14.4" diff --git a/examples/angular/row-selection/src/app/app.component.ts b/examples/angular/row-selection/src/app/app.component.ts index 8711fd3959..5a72cc25d4 100644 --- a/examples/angular/row-selection/src/app/app.component.ts +++ b/examples/angular/row-selection/src/app/app.component.ts @@ -9,7 +9,7 @@ import { import { ColumnDef, createAngularTable, - FlexRenderComponent, + flexRenderComponent, FlexRenderDirective, getCoreRowModel, getFilteredRowModel, @@ -43,39 +43,39 @@ export class AppComponent { { id: 'select', header: () => { - return new FlexRenderComponent(TableHeadSelectionComponent) + return flexRenderComponent(TableHeadSelectionComponent) }, cell: () => { - return new FlexRenderComponent(TableRowSelectionComponent) + return flexRenderComponent(TableRowSelectionComponent) }, }, { 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/package.json b/examples/angular/signal-input/package.json index dee398f483..d417167212 100644 --- a/examples/angular/signal-input/package.json +++ b/examples/angular/signal-input/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-angular-signal-input", - "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", @@ -17,7 +16,7 @@ "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", "@faker-js/faker": "^8.4.1", - "@tanstack/angular-table": "^8.20.5", + "@tanstack/angular-table": "^8.21.3", "rxjs": "~7.8.1", "zone.js": "~0.14.4" }, 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/.devcontainer/devcontainer.json b/examples/angular/sub-components/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..36f47d8762 --- /dev/null +++ b/examples/angular/sub-components/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Node.js", + "image": "mcr.microsoft.com/devcontainers/javascript-node:18" +} diff --git a/examples/angular/sub-components/.editorconfig b/examples/angular/sub-components/.editorconfig new file mode 100644 index 0000000000..59d9a3a3e7 --- /dev/null +++ b/examples/angular/sub-components/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/examples/angular/sub-components/.gitignore b/examples/angular/sub-components/.gitignore new file mode 100644 index 0000000000..0711527ef9 --- /dev/null +++ b/examples/angular/sub-components/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/examples/angular/sub-components/README.md b/examples/angular/sub-components/README.md new file mode 100644 index 0000000000..5da97a87d1 --- /dev/null +++ b/examples/angular/sub-components/README.md @@ -0,0 +1,27 @@ +# Basic + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.1.2. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/examples/angular/sub-components/angular.json b/examples/angular/sub-components/angular.json new file mode 100644 index 0000000000..6327dd784f --- /dev/null +++ b/examples/angular/sub-components/angular.json @@ -0,0 +1,83 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "sub-components": { + "cli": { + "cache": { + "enabled": false + } + }, + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "outputPath": "dist/sub-components", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": ["zone.js"], + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "sub-components:build:production" + }, + "development": { + "buildTarget": "sub-components:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "sub-components:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": ["zone.js", "zone.js/testing"], + "tsConfig": "tsconfig.spec.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + } + } + } + } + }, + "cli": { + "analytics": false + } +} diff --git a/examples/angular/sub-components/package.json b/examples/angular/sub-components/package.json new file mode 100644 index 0000000000..c164c781c3 --- /dev/null +++ b/examples/angular/sub-components/package.json @@ -0,0 +1,32 @@ +{ + "name": "tanstack-table-example-angular-sub-components", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "dependencies": { + "@angular/animations": "^17.3.9", + "@angular/common": "^17.3.9", + "@angular/compiler": "^17.3.9", + "@angular/core": "^17.3.9", + "@angular/forms": "^17.3.9", + "@angular/platform-browser": "^17.3.9", + "@angular/platform-browser-dynamic": "^17.3.9", + "@angular/router": "^17.3.9", + "@faker-js/faker": "^8.4.1", + "@tanstack/angular-table": "^8.21.3", + "rxjs": "~7.8.1", + "zone.js": "~0.14.4" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^17.3.8", + "@angular/cli": "^17.3.8", + "@angular/compiler-cli": "^17.3.9", + "tslib": "^2.6.2", + "typescript": "5.4.5" + } +} diff --git a/examples/angular/sub-components/src/app/app.component.html b/examples/angular/sub-components/src/app/app.component.html new file mode 100644 index 0000000000..b2c63ba226 --- /dev/null +++ b/examples/angular/sub-components/src/app/app.component.html @@ -0,0 +1,69 @@ +
+
+ + + @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) { + + @for (header of headerGroup.headers; track header.id) { + + } + + } + + + @for (row of table.getRowModel().rows; track row.id) { + + + @for (cell of row.getVisibleCells(); track cell.id) { + + } + + + @if (row.getIsExpanded()) { + + + + + } + } + +
+ @if (!header.isPlaceholder) { + +
+
+ } +
+ +
+
+
+ +
+
+
+ + +
+    
+      {{ row.original | json }}
+    
+  
+
diff --git a/examples/angular/sub-components/src/app/app.component.ts b/examples/angular/sub-components/src/app/app.component.ts new file mode 100644 index 0000000000..a52a9c620b --- /dev/null +++ b/examples/angular/sub-components/src/app/app.component.ts @@ -0,0 +1,123 @@ +import { + ChangeDetectionStrategy, + Component, + computed, + signal, +} from '@angular/core' +import { + ColumnDef, + createAngularTable, + ExpandedState, + flexRenderComponent, + FlexRenderDirective, + getCoreRowModel, + getExpandedRowModel, + getFilteredRowModel, + getPaginationRowModel, +} from '@tanstack/angular-table' +import { makeData, type Person } from './makeData' +import { ReactiveFormsModule } from '@angular/forms' +import { ExpandableCell, ExpanderCell } from './expandable-cell' +import { JsonPipe, NgTemplateOutlet } from '@angular/common' + +const columns: ColumnDef[] = [ + { + header: 'Name', + footer: (props) => props.column.id, + columns: [ + { + id: 'expander', + header: () => null, + cell: ({ row }) => { + if (!row.getCanExpand()) { + return '🔵' + } + return flexRenderComponent(ExpanderCell, { + inputs: { + expanded: row.getIsExpanded(), + }, + outputs: { + click: row.getToggleExpandedHandler(), + }, + }) + }, + }, + { + accessorKey: 'firstName', + header: 'First Name', + cell: () => flexRenderComponent(ExpandableCell), + footer: (props) => props.column.id, + }, + { + accessorFn: (row) => row.lastName, + id: 'lastName', + cell: (info) => info.getValue(), + header: () => 'Last Name', + footer: (props) => props.column.id, + }, + ], + }, + { + header: 'Info', + footer: (props) => props.column.id, + columns: [ + { + accessorKey: 'age', + header: () => 'Age', + footer: (props) => props.column.id, + }, + { + header: 'More Info', + columns: [ + { + accessorKey: 'visits', + header: () => 'Visits', + footer: (props) => props.column.id, + }, + { + accessorKey: 'status', + header: 'Status', + footer: (props) => props.column.id, + }, + { + accessorKey: 'progress', + header: 'Profile Progress', + footer: (props) => props.column.id, + }, + ], + }, + ], + }, +] + +@Component({ + selector: 'app-root', + standalone: true, + imports: [ + FlexRenderDirective, + ReactiveFormsModule, + JsonPipe, + NgTemplateOutlet, + ], + templateUrl: './app.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class AppComponent { + readonly data = signal(makeData(10)) + readonly expanded = signal({}) + + readonly table = createAngularTable(() => ({ + data: this.data(), + columns, + state: { + expanded: this.expanded(), + }, + onExpandedChange: (updater) => + typeof updater === 'function' + ? this.expanded.update(updater) + : this.expanded.set(updater), + getRowCanExpand: () => true, + getCoreRowModel: getCoreRowModel(), + getExpandedRowModel: getExpandedRowModel(), + })) +} diff --git a/examples/angular/sub-components/src/app/app.config.ts b/examples/angular/sub-components/src/app/app.config.ts new file mode 100644 index 0000000000..f27099f33c --- /dev/null +++ b/examples/angular/sub-components/src/app/app.config.ts @@ -0,0 +1,5 @@ +import { ApplicationConfig } from '@angular/core' + +export const appConfig: ApplicationConfig = { + providers: [], +} diff --git a/examples/angular/sub-components/src/app/expandable-cell.ts b/examples/angular/sub-components/src/app/expandable-cell.ts new file mode 100644 index 0000000000..cc89a29b21 --- /dev/null +++ b/examples/angular/sub-components/src/app/expandable-cell.ts @@ -0,0 +1,51 @@ +import { + ChangeDetectionStrategy, + Component, + input, + output, +} from '@angular/core' +import { + type HeaderContext, + injectFlexRenderContext, + type Table, + CellContext, +} from '@tanstack/angular-table' + +@Component({ + standalone: true, + template: ` + + `, + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ExpanderCell { + readonly expanded = input.required() + + readonly click = output() +} + +@Component({ + standalone: true, + template: ` +
+ {{ context.getValue() }} +
+ `, + changeDetection: ChangeDetectionStrategy.OnPush, + styles: ` + :host { + > div { + padding-left: calc(2rem * var(--depth, 1)); + } + } + `, +}) +export class ExpandableCell { + readonly context = injectFlexRenderContext>() + + get row() { + return this.context.row + } +} diff --git a/examples/angular/sub-components/src/app/makeData.ts b/examples/angular/sub-components/src/app/makeData.ts new file mode 100644 index 0000000000..331dd1eb19 --- /dev/null +++ b/examples/angular/sub-components/src/app/makeData.ts @@ -0,0 +1,48 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Person[] +} + +const range = (len: number) => { + const arr: number[] = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, + } +} + +export function makeData(...lens: number[]) { + const makeDataLevel = (depth = 0): Person[] => { + const len = lens[depth]! + return range(len).map((d): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/angular/sub-components/src/assets/.gitkeep b/examples/angular/sub-components/src/assets/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/angular/sub-components/src/favicon.ico b/examples/angular/sub-components/src/favicon.ico new file mode 100644 index 0000000000..57614f9c96 Binary files /dev/null and b/examples/angular/sub-components/src/favicon.ico differ diff --git a/examples/angular/sub-components/src/index.html b/examples/angular/sub-components/src/index.html new file mode 100644 index 0000000000..bd21f08bcc --- /dev/null +++ b/examples/angular/sub-components/src/index.html @@ -0,0 +1,14 @@ + + + + + Expanding + + + + + + + + + diff --git a/examples/angular/sub-components/src/main.ts b/examples/angular/sub-components/src/main.ts new file mode 100644 index 0000000000..c3d8f9af99 --- /dev/null +++ b/examples/angular/sub-components/src/main.ts @@ -0,0 +1,5 @@ +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)) diff --git a/examples/angular/sub-components/src/styles.scss b/examples/angular/sub-components/src/styles.scss new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/angular/sub-components/src/styles.scss @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/angular/sub-components/tsconfig.app.json b/examples/angular/sub-components/tsconfig.app.json new file mode 100644 index 0000000000..84f1f992d2 --- /dev/null +++ b/examples/angular/sub-components/tsconfig.app.json @@ -0,0 +1,10 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": ["src/main.ts"], + "include": ["src/**/*.d.ts"] +} diff --git a/examples/angular/sub-components/tsconfig.json b/examples/angular/sub-components/tsconfig.json new file mode 100644 index 0000000000..b58d3efc71 --- /dev/null +++ b/examples/angular/sub-components/tsconfig.json @@ -0,0 +1,31 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "src", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": false, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": ["ES2022", "dom"] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/examples/angular/sub-components/tsconfig.spec.json b/examples/angular/sub-components/tsconfig.spec.json new file mode 100644 index 0000000000..47e3dd7551 --- /dev/null +++ b/examples/angular/sub-components/tsconfig.spec.json @@ -0,0 +1,9 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": ["jasmine"] + }, + "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] +} diff --git a/examples/lit/basic/package.json b/examples/lit/basic/package.json index 37ee5419ca..7eee5234b9 100644 --- a/examples/lit/basic/package.json +++ b/examples/lit/basic/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-lit-table-example-basic", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -9,7 +8,7 @@ "start": "vite" }, "dependencies": { - "@tanstack/lit-table": "^8.20.5", + "@tanstack/lit-table": "^8.21.3", "@twind/core": "^1.1.3", "@twind/preset-autoprefix": "^1.0.7", "@twind/preset-tailwind": "^1.1.4", 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/package.json b/examples/lit/column-sizing/package.json index 6603b18bb3..10bd6e332f 100644 --- a/examples/lit/column-sizing/package.json +++ b/examples/lit/column-sizing/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-lit-table-example-column-sizing", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/lit-table": "^8.20.5", + "@tanstack/lit-table": "^8.21.3", "lit": "^3.1.4" }, "devDependencies": { 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, )} + ` + } +} diff --git a/examples/lit/sorting-dynamic-data/src/makeData.ts b/examples/lit/sorting-dynamic-data/src/makeData.ts new file mode 100644 index 0000000000..d6c0639b22 --- /dev/null +++ b/examples/lit/sorting-dynamic-data/src/makeData.ts @@ -0,0 +1,52 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string | undefined + age: number + visits: number | undefined + progress: number + status: 'relationship' | 'complicated' | 'single' + rank: number + createdAt: Date + subRows?: Person[] +} + +const range = (len: number) => { + const arr: number[] = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: Math.random() < 0.1 ? undefined : faker.person.lastName(), + age: faker.number.int(40), + visits: Math.random() < 0.1 ? undefined : faker.number.int(1000), + progress: faker.number.int(100), + createdAt: faker.date.anytime(), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, + rank: faker.number.int(100), + } +} + +export function makeData(...lens: number[]) { + const makeDataLevel = (depth = 0): Person[] => { + const len = lens[depth]! + return range(len).map((_d): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/lit/sorting-dynamic-data/tsconfig.json b/examples/lit/sorting-dynamic-data/tsconfig.json new file mode 100644 index 0000000000..56517d3a72 --- /dev/null +++ b/examples/lit/sorting-dynamic-data/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "useDefineForClassFields": false, + + /* Linting */ + "strict": true, + "noUnusedLocals": false, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/examples/lit/sorting-dynamic-data/vite.config.js b/examples/lit/sorting-dynamic-data/vite.config.js new file mode 100644 index 0000000000..fa3b238ac6 --- /dev/null +++ b/examples/lit/sorting-dynamic-data/vite.config.js @@ -0,0 +1,15 @@ +import { defineConfig } from 'vite' +import rollupReplace from '@rollup/plugin-replace' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + rollupReplace({ + preventAssignment: true, + values: { + __DEV__: JSON.stringify(true), + 'process.env.NODE_ENV': JSON.stringify('development'), + }, + }), + ], +}) diff --git a/examples/lit/sorting/package.json b/examples/lit/sorting/package.json index 9958736516..3734e523b5 100644 --- a/examples/lit/sorting/package.json +++ b/examples/lit/sorting/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-lit-table-example-sorting", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/lit-table": "^8.20.5", + "@tanstack/lit-table": "^8.21.3", "lit": "^3.1.4" }, "devDependencies": { diff --git a/examples/lit/sorting/src/main.ts b/examples/lit/sorting/src/main.ts index e111ac50c6..0ee95c17ad 100644 --- a/examples/lit/sorting/src/main.ts +++ b/examples/lit/sorting/src/main.ts @@ -24,13 +24,13 @@ const sortStatusFn: SortingFn = (rowA, rowB, _columnId) => { const columns: ColumnDef[] = [ { accessorKey: 'firstName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), //this column will sort in ascending order by default since it is a string column }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => html`Last Name`, sortUndefined: 'last', //force undefined values to the end sortDescFirst: false, //first sort order will be ascending (nullable values can mess up auto detection of sort order) @@ -83,7 +83,7 @@ class LitTableExample extends LitElement { state: { sorting: this._sorting, }, - onSortingChange: updaterOrValue => { + onSortingChange: (updaterOrValue) => { if (typeof updaterOrValue === 'function') { this._sorting = updaterOrValue(this._sorting) } else { @@ -99,11 +99,11 @@ class LitTableExample extends LitElement { ${repeat( table.getHeaderGroups(), - headerGroup => headerGroup.id, - headerGroup => html` + (headerGroup) => headerGroup.id, + (headerGroup) => html` ${headerGroup.headers.map( - header => html` + (header) => html` ${header.isPlaceholder ? null @@ -122,17 +122,17 @@ class LitTableExample extends LitElement { > ${flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} ${{ asc: ' 🔼', desc: ' 🔽' }[ header.column.getIsSorted() as string ] ?? null} `} - ` + `, )} - ` + `, )} @@ -140,22 +140,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(), )} - ` + `, )} - ` + `, )} diff --git a/examples/lit/virtualized-rows/package.json b/examples/lit/virtualized-rows/package.json index 077611a9c0..0cec27d14f 100644 --- a/examples/lit/virtualized-rows/package.json +++ b/examples/lit/virtualized-rows/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-lit-table-virtualized-rows", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/lit-table": "^8.20.5", + "@tanstack/lit-table": "^8.21.3", "@tanstack/lit-virtual": "^3.8.3", "lit": "^3.1.4" }, diff --git a/examples/lit/virtualized-rows/src/main.ts b/examples/lit/virtualized-rows/src/main.ts index d11e3fd0dd..db0c47b7d7 100644 --- a/examples/lit/virtualized-rows/src/main.ts +++ b/examples/lit/virtualized-rows/src/main.ts @@ -23,12 +23,12 @@ 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`, }, { @@ -53,7 +53,7 @@ const columns: ColumnDef[] = [ { accessorKey: 'createdAt', header: 'Created At', - cell: info => info.getValue().toLocaleString(), + cell: (info) => info.getValue().toLocaleString(), size: 250, }, ] @@ -110,13 +110,13 @@ class LitTableExample extends LitElement { > ${repeat( table.getHeaderGroups(), - headerGroup => headerGroup.id, - headerGroup => html` + (headerGroup) => headerGroup.id, + (headerGroup) => html` ${repeat( headerGroup.headers, - header => header.id, - header => html` + (header) => header.id, + (header) => html` () 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 => {info.getValue()}, + cell: (info) => {info.getValue()}, header: () => 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: () => 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, }), ] @@ -98,15 +98,15 @@ const App = component$(() => {
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -114,9 +114,9 @@ const App = component$(() => { ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( @@ -125,15 +125,15 @@ const App = component$(() => { ))} - {table.getFooterGroups().map(footerGroup => ( + {table.getFooterGroups().map((footerGroup) => ( - {footerGroup.headers.map(header => ( + {footerGroup.headers.map((header) => ( ))} diff --git a/examples/qwik/filters/package.json b/examples/qwik/filters/package.json index 4d62e5619a..bc6efee9fc 100644 --- a/examples/qwik/filters/package.json +++ b/examples/qwik/filters/package.json @@ -1,7 +1,6 @@ { "name": "tanstack-table-example-qwik-filters", "private": true, - "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", @@ -16,7 +15,7 @@ "vite": "^5.3.2" }, "dependencies": { - "@tanstack/qwik-table": "^8.20.5", - "@tanstack/match-sorter-utils": "^8.19.4" + "@tanstack/match-sorter-utils": "^8.19.4", + "@tanstack/qwik-table": "^8.21.3" } } diff --git a/examples/qwik/filters/src/main.tsx b/examples/qwik/filters/src/main.tsx index 95063efa5f..3bdc78c474 100644 --- a/examples/qwik/filters/src/main.tsx +++ b/examples/qwik/filters/src/main.tsx @@ -59,7 +59,7 @@ const fuzzySort: SortingFn = (rowA, rowB, columnId) => { if (rowA.columnFiltersMeta[columnId]) { dir = compareItems( rowA.columnFiltersMeta[columnId]?.itemRank!, - rowB.columnFiltersMeta[columnId]?.itemRank! + rowB.columnFiltersMeta[columnId]?.itemRank!, ) } @@ -116,50 +116,50 @@ const columnHelper = createColumnHelper() const columns = [ columnHelper.group({ header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ columnHelper.accessor('firstName', { - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, }), - columnHelper.accessor(row => row.lastName, { + columnHelper.accessor((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, sortingFn: fuzzySort, }), - columnHelper.accessor(row => `${row.firstName} ${row.lastName}`, { + columnHelper.accessor((row) => `${row.firstName} ${row.lastName}`, { id: 'fullName', header: 'Full Name', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, sortingFn: fuzzySort, }), ], }), columnHelper.group({ header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ columnHelper.accessor('age', { header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }), columnHelper.group({ header: 'More Info', columns: [ columnHelper.accessor('visits', { header: () => Visits, - footer: props => props.column.id, + footer: (props) => props.column.id, }), columnHelper.accessor('status', { header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }), columnHelper.accessor('progress', { header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }), ], }), @@ -182,12 +182,12 @@ const App = component$(() => { columnFilters: columnFilters.value, globalFilter: globalFilter.value, }, - onColumnFiltersChange: updater => { + onColumnFiltersChange: (updater) => { const updated = updater instanceof Function ? updater(columnFilters.value) : updater columnFilters.value = updated }, - onGlobalFilterChange: updater => { + onGlobalFilterChange: (updater) => { const updated = updater(globalFilter.value) globalFilter.value = updated }, @@ -218,9 +218,9 @@ const App = component$(() => {
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender(cell.column.columnDef.cell, cell.getContext())}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( diff --git a/examples/qwik/row-selection/package.json b/examples/qwik/row-selection/package.json index 900aed03c1..fd842b4594 100644 --- a/examples/qwik/row-selection/package.json +++ b/examples/qwik/row-selection/package.json @@ -1,7 +1,6 @@ { "name": "tanstack-table-example-qwik-row-selection", "private": true, - "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", @@ -16,6 +15,6 @@ "vite": "^5.3.2" }, "dependencies": { - "@tanstack/qwik-table": "^8.20.5" + "@tanstack/qwik-table": "^8.21.3" } } diff --git a/examples/qwik/row-selection/src/main.tsx b/examples/qwik/row-selection/src/main.tsx index 3c24e842a7..bd9313c416 100644 --- a/examples/qwik/row-selection/src/main.tsx +++ b/examples/qwik/row-selection/src/main.tsx @@ -97,30 +97,30 @@ const columns: ColumnDef[] = [ }, }, columnHelper.accessor('firstName', { - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, }), - columnHelper.accessor(row => row.lastName, { + columnHelper.accessor((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, }), columnHelper.accessor('age', { header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }), columnHelper.accessor('visits', { header: () => Visits, - footer: props => props.column.id, + footer: (props) => props.column.id, }), columnHelper.accessor('status', { header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }), columnHelper.accessor('progress', { header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }), ] @@ -133,7 +133,7 @@ const App = component$(() => { getCoreRowModel: getCoreRowModel(), getSortedRowModel: getSortedRowModel(), enableSorting: true, - onRowSelectionChange: updater => { + onRowSelectionChange: (updater) => { rowSelection.value = updater instanceof Function ? updater(rowSelection.value) : updater }, @@ -148,9 +148,9 @@ const App = component$(() => {
{header.isPlaceholder ? null : ( @@ -235,7 +235,7 @@ const App = component$(() => { > {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -256,10 +256,10 @@ const App = component$(() => { ))}
{flexRender(cell.column.columnDef.cell, cell.getContext())}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { const { column } = header const id = column.id return ( @@ -166,7 +166,7 @@ const App = component$(() => { ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} ) @@ -176,10 +176,10 @@ const App = component$(() => { - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( @@ -204,7 +204,7 @@ const App = component$(() => { onClick$={() => console.info( 'table.getSelectedRowModel().flatRows', - table.getSelectedRowModel().flatRows + table.getSelectedRowModel().flatRows, ) } > diff --git a/examples/qwik/sorting/package.json b/examples/qwik/sorting/package.json index 290747eeb0..14bdeeadd2 100644 --- a/examples/qwik/sorting/package.json +++ b/examples/qwik/sorting/package.json @@ -1,7 +1,6 @@ { "name": "tanstack-table-example-qwik-sorting", "private": true, - "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", @@ -16,6 +15,6 @@ "vite": "^5.3.2" }, "dependencies": { - "@tanstack/qwik-table": "^8.20.5" + "@tanstack/qwik-table": "^8.21.3" } } diff --git a/examples/qwik/sorting/src/main.tsx b/examples/qwik/sorting/src/main.tsx index d1a4d4488f..0d6ebaae57 100644 --- a/examples/qwik/sorting/src/main.tsx +++ b/examples/qwik/sorting/src/main.tsx @@ -25,41 +25,41 @@ type Person = { const columns: ColumnDef[] = [ { 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, }, { 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, sortDescFirst: true, // This column will sort in descending order first (default for number columns anyway) }, { accessorKey: 'createdAt', header: 'Created At', - cell: info => info.getValue().toLocaleDateString(), + cell: (info) => info.getValue().toLocaleDateString(), // sortingFn: 'datetime' (inferred from the data) }, ] @@ -78,7 +78,7 @@ const App = component$(() => { state: { sorting: sorting.value, }, - onSortingChange: updater => { + onSortingChange: (updater) => { sorting.value = updater instanceof Function ? updater(sorting.value) : updater }, @@ -88,9 +88,9 @@ const App = component$(() => {
{flexRender(cell.column.columnDef.cell, cell.getContext())}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { const { column } = header const id = column.id return ( @@ -102,7 +102,7 @@ const App = component$(() => { ? 'cursor-pointer select-none' : '' } - onClick$={$(event => { + onClick$={$((event) => { const col = table.getColumn(id)! //avoid serializing errors col.getToggleSortingHandler()!(event) })} @@ -118,7 +118,7 @@ const App = component$(() => { > {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -136,15 +136,15 @@ const App = component$(() => { {table .getRowModel() .rows.slice(0, 10) - .map(row => { + .map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index 8c7c6bd7e0..d2aa60342f 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-basic", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -9,7 +8,7 @@ "start": "vite" }, "dependencies": { - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/basic/src/main.tsx b/examples/react/basic/src/main.tsx index c1f615525e..b2226b2746 100644 --- a/examples/react/basic/src/main.tsx +++ b/examples/react/basic/src/main.tsx @@ -50,31 +50,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 => {info.getValue()}, + cell: (info) => {info.getValue()}, header: () => 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: () => 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, }), ] @@ -92,15 +92,15 @@ function App() {
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -108,9 +108,9 @@ function App() { ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( @@ -119,15 +119,15 @@ function App() { ))} - {table.getFooterGroups().map(footerGroup => ( + {table.getFooterGroups().map((footerGroup) => ( - {footerGroup.headers.map(header => ( + {footerGroup.headers.map((header) => ( ))} @@ -149,5 +149,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/bootstrap/package.json b/examples/react/bootstrap/package.json index 0cc4c1b9a9..6e6a3a8fbf 100644 --- a/examples/react/bootstrap/package.json +++ b/examples/react/bootstrap/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-bootstrap", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -9,7 +8,7 @@ "start": "vite" }, "dependencies": { - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "bootstrap": "^5.3.3", "react": "^18.3.1", "react-bootstrap": "2.10.3", diff --git a/examples/react/bootstrap/src/main.tsx b/examples/react/bootstrap/src/main.tsx index f06911f9b4..626723a28d 100644 --- a/examples/react/bootstrap/src/main.tsx +++ b/examples/react/bootstrap/src/main.tsx @@ -16,30 +16,30 @@ import { makeData, Person } from './makeData' const columns: 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', @@ -47,17 +47,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, }, ], }, @@ -79,15 +79,15 @@ function App() {
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -95,9 +95,9 @@ function App() { ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( @@ -106,15 +106,15 @@ function App() { ))} - {table.getFooterGroups().map(footerGroup => ( + {table.getFooterGroups().map((footerGroup) => ( - {footerGroup.headers.map(header => ( + {footerGroup.headers.map((header) => ( ))} @@ -137,5 +137,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/column-dnd/package.json b/examples/react/column-dnd/package.json index bbe1b1e579..07f379d9c6 100644 --- a/examples/react/column-dnd/package.json +++ b/examples/react/column-dnd/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-column-dnd", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -14,7 +13,7 @@ "@dnd-kit/sortable": "^8.0.0", "@dnd-kit/utilities": "^3.2.2", "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/column-dnd/src/main.tsx b/examples/react/column-dnd/src/main.tsx index 9365e35ccb..ab1373c09e 100644 --- a/examples/react/column-dnd/src/main.tsx +++ b/examples/react/column-dnd/src/main.tsx @@ -93,13 +93,13 @@ function App() { () => [ { accessorKey: 'firstName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), id: 'firstName', size: 150, }, { - accessorFn: row => row.lastName, - cell: info => info.getValue(), + accessorFn: (row) => row.lastName, + cell: (info) => info.getValue(), header: () => Last Name, id: 'lastName', size: 150, @@ -129,12 +129,12 @@ function App() { size: 180, }, ], - [] + [], ) const [data, setData] = React.useState(() => makeData(20)) const [columnOrder, setColumnOrder] = React.useState(() => - columns.map(c => c.id!) + columns.map((c) => c.id!), ) const rerender = () => setData(() => makeData(20)) @@ -156,7 +156,7 @@ function App() { function handleDragEnd(event: DragEndEvent) { const { active, over } = event if (active && over && active.id !== over.id) { - setColumnOrder(columnOrder => { + setColumnOrder((columnOrder) => { const oldIndex = columnOrder.indexOf(active.id as string) const newIndex = columnOrder.indexOf(over.id as string) return arrayMove(columnOrder, oldIndex, newIndex) //this is just a splice util @@ -167,7 +167,7 @@ function App() { const sensors = useSensors( useSensor(MouseSensor, {}), useSensor(TouchSensor, {}), - useSensor(KeyboardSensor, {}) + useSensor(KeyboardSensor, {}), ) return ( @@ -188,13 +188,13 @@ function App() {
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender(cell.column.columnDef.cell, cell.getContext())}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender(cell.column.columnDef.cell, cell.getContext())}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -202,9 +202,9 @@ function App() { ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( - + , ) diff --git a/examples/react/column-groups/package.json b/examples/react/column-groups/package.json index 46c7be166e..4f5384a831 100644 --- a/examples/react/column-groups/package.json +++ b/examples/react/column-groups/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-column-groups", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -9,7 +8,7 @@ "start": "vite" }, "dependencies": { - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/column-groups/src/main.tsx b/examples/react/column-groups/src/main.tsx index d17fbf67e8..43e7979a13 100644 --- a/examples/react/column-groups/src/main.tsx +++ b/examples/react/column-groups/src/main.tsx @@ -55,39 +55,39 @@ const columns = [ // footer: props => props.column.id, columns: [ columnHelper.accessor('firstName', { - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, }), - columnHelper.accessor(row => row.lastName, { + columnHelper.accessor((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, }), ], }), columnHelper.group({ header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ columnHelper.accessor('age', { header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }), columnHelper.group({ header: 'More Info', columns: [ columnHelper.accessor('visits', { header: () => Visits, - footer: props => props.column.id, + footer: (props) => props.column.id, }), columnHelper.accessor('status', { header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }), columnHelper.accessor('progress', { header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }), ], }), @@ -109,15 +109,15 @@ function App() {
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -125,9 +125,9 @@ function App() { ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( @@ -136,15 +136,15 @@ function App() { ))} - {table.getFooterGroups().map(footerGroup => ( + {table.getFooterGroups().map((footerGroup) => ( - {footerGroup.headers.map(header => ( + {footerGroup.headers.map((header) => ( ))} @@ -166,5 +166,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/column-ordering/package.json b/examples/react/column-ordering/package.json index 59b5fba55e..e3d78d604b 100644 --- a/examples/react/column-ordering/package.json +++ b/examples/react/column-ordering/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-column-ordering", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/column-ordering/src/main.tsx b/examples/react/column-ordering/src/main.tsx index 470e02d49e..edabce74a9 100644 --- a/examples/react/column-ordering/src/main.tsx +++ b/examples/react/column-ordering/src/main.tsx @@ -16,30 +16,30 @@ import { makeData, Person } from './makeData' 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', @@ -47,17 +47,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, }, ], }, @@ -91,7 +91,7 @@ function App() { const randomizeColumns = () => { table.setColumnOrder( - faker.helpers.shuffle(table.getAllLeafColumns().map(d => d.id)) + faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)), ) } @@ -110,7 +110,7 @@ function App() { Toggle All - {table.getAllLeafColumns().map(column => { + {table.getAllLeafColumns().map((column) => { return (
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender(cell.column.columnDef.cell, cell.getContext())}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -155,9 +155,9 @@ function App() { ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( @@ -166,15 +166,15 @@ function App() { ))} - {table.getFooterGroups().map(footerGroup => ( + {table.getFooterGroups().map((footerGroup) => ( - {footerGroup.headers.map(header => ( + {footerGroup.headers.map((header) => ( ))} @@ -193,5 +193,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/column-pinning-sticky/package.json b/examples/react/column-pinning-sticky/package.json index e6ee9b7995..2dd016592c 100644 --- a/examples/react/column-pinning-sticky/package.json +++ b/examples/react/column-pinning-sticky/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-column-pinning-sticky", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/column-pinning-sticky/src/main.tsx b/examples/react/column-pinning-sticky/src/main.tsx index 4a554cf39b..f941923cab 100644 --- a/examples/react/column-pinning-sticky/src/main.tsx +++ b/examples/react/column-pinning-sticky/src/main.tsx @@ -43,44 +43,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 @@ function App() { const randomizeColumns = () => { table.setColumnOrder( - faker.helpers.shuffle(table.getAllLeafColumns().map(d => d.id)) + faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)), ) } @@ -122,7 +122,7 @@ function App() { Toggle All - {table.getAllLeafColumns().map(column => { + {table.getAllLeafColumns().map((column) => { return (
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { const { column } = header return ( @@ -173,7 +173,7 @@ function App() { ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}{' '} {/* Demo getIndex behavior */} {column.getIndex(column.getIsPinned() || 'center')} @@ -229,9 +229,9 @@ function App() { ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { const { column } = cell return ( ) @@ -262,5 +262,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/column-pinning/package.json b/examples/react/column-pinning/package.json index 34f13c95f3..bfdf987d4d 100644 --- a/examples/react/column-pinning/package.json +++ b/examples/react/column-pinning/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-column-pinning", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/column-pinning/src/main.tsx b/examples/react/column-pinning/src/main.tsx index 6c862dc1b2..be674475d7 100644 --- a/examples/react/column-pinning/src/main.tsx +++ b/examples/react/column-pinning/src/main.tsx @@ -17,30 +17,30 @@ import { makeData, Person } from './makeData' 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', @@ -48,17 +48,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, }, ], }, @@ -97,7 +97,7 @@ function App() { const randomizeColumns = () => { table.setColumnOrder( - faker.helpers.shuffle(table.getAllLeafColumns().map(d => d.id)) + faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)), ) } @@ -116,7 +116,7 @@ function App() { Toggle All - {table.getAllLeafColumns().map(column => { + {table.getAllLeafColumns().map((column) => { return (
@@ -157,16 +157,16 @@ function App() { {isSplit ? (
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender(cell.column.columnDef.cell, cell.getContext())}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getLeftHeaderGroups().map(headerGroup => ( + {table.getLeftHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( - {row.getLeftVisibleCells().map(cell => { + {row.getLeftVisibleCells().map((cell) => { return ( ) @@ -236,16 +236,16 @@ function App() { {(isSplit ? table.getCenterHeaderGroups() : table.getHeaderGroups() - ).map(headerGroup => ( + ).map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( {(isSplit ? row.getCenterVisibleCells() : row.getVisibleCells() - ).map(cell => { + ).map((cell) => { return ( ) @@ -315,16 +315,16 @@ function App() { {isSplit ? (
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{!header.isPlaceholder && header.column.getCanPin() && ( @@ -212,15 +212,15 @@ function App() { {table .getRowModel() .rows.slice(0, 20) - .map(row => { + .map((row) => { return (
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{!header.isPlaceholder && header.column.getCanPin() && ( @@ -291,18 +291,18 @@ function App() { {table .getRowModel() .rows.slice(0, 20) - .map(row => { + .map((row) => { return (
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getRightHeaderGroups().map(headerGroup => ( + {table.getRightHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( - {row.getRightVisibleCells().map(cell => { + {row.getRightVisibleCells().map((cell) => { return ( ) @@ -401,5 +401,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/column-resizing-performant/package.json b/examples/react/column-resizing-performant/package.json index af00cbfa8b..237841c780 100644 --- a/examples/react/column-resizing-performant/package.json +++ b/examples/react/column-resizing-performant/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-column-resizing-performant", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/column-resizing-performant/src/main.tsx b/examples/react/column-resizing-performant/src/main.tsx index 089060f209..1e8f783fac 100644 --- a/examples/react/column-resizing-performant/src/main.tsx +++ b/examples/react/column-resizing-performant/src/main.tsx @@ -24,45 +24,45 @@ 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, }, { 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, }, ], }, @@ -135,7 +135,7 @@ function App() { columnSizing: table.getState().columnSizing, }, null, - 2 + 2, )}
({data.length} rows) @@ -151,14 +151,14 @@ function App() { }} >
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => (
- {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => (
}) { className: 'tbody', }} > - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => (
- {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { //simulate expensive render for (let i = 0; i < 10000; i++) { Math.random() @@ -245,7 +245,7 @@ function TableBody({ table }: { table: Table }) { //special memoized wrapper for our table body that we will use during column resizing export const MemoizedTableBody = React.memo( TableBody, - (prev, next) => prev.table.options.data === next.table.options.data + (prev, next) => prev.table.options.data === next.table.options.data, ) as typeof TableBody const rootElement = document.getElementById('root') @@ -254,5 +254,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/column-sizing/package.json b/examples/react/column-sizing/package.json index 17faad0ac6..810b9aea75 100644 --- a/examples/react/column-sizing/package.json +++ b/examples/react/column-sizing/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-column-sizing", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -9,7 +8,7 @@ "start": "vite" }, "dependencies": { - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/column-sizing/src/main.tsx b/examples/react/column-sizing/src/main.tsx index 086d950775..7e804becad 100644 --- a/examples/react/column-sizing/src/main.tsx +++ b/examples/react/column-sizing/src/main.tsx @@ -51,30 +51,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', @@ -82,17 +82,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, }, ], }, @@ -129,7 +129,9 @@ function App() {
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( ))} @@ -241,14 +243,14 @@ function App() { }} >
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => (
- {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => (
- {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => (
- {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => (
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
))} @@ -340,7 +342,7 @@ function App() { }} >
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => (
- {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => (
- {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => (
- {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => (
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
))} @@ -449,7 +451,7 @@ function App() { columnSizingInfo: table.getState().columnSizingInfo, }, null, - 2 + 2, )}
@@ -462,5 +464,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/column-visibility/package.json b/examples/react/column-visibility/package.json index d5b9f58ef7..c2c1b538a8 100644 --- a/examples/react/column-visibility/package.json +++ b/examples/react/column-visibility/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-column-visibility", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -9,7 +8,7 @@ "start": "vite" }, "dependencies": { - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/column-visibility/src/main.tsx b/examples/react/column-visibility/src/main.tsx index cf35b07f05..b19db69c55 100644 --- a/examples/react/column-visibility/src/main.tsx +++ b/examples/react/column-visibility/src/main.tsx @@ -49,30 +49,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', @@ -80,17 +80,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, }, ], }, @@ -135,7 +135,7 @@ function App() { Toggle All
- {table.getAllLeafColumns().map(column => { + {table.getAllLeafColumns().map((column) => { return (
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{!header.isPlaceholder && header.column.getCanPin() && ( @@ -370,15 +370,15 @@ function App() { {table .getRowModel() .rows.slice(0, 20) - .map(row => { + .map((row) => { return (
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -171,9 +171,9 @@ function App() { ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( @@ -182,15 +182,15 @@ function App() { ))} - {table.getFooterGroups().map(footerGroup => ( + {table.getFooterGroups().map((footerGroup) => ( - {footerGroup.headers.map(header => ( + {footerGroup.headers.map((header) => ( ))} @@ -214,5 +214,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/custom-features/package.json b/examples/react/custom-features/package.json index 9d62a0b25a..5d089666bc 100644 --- a/examples/react/custom-features/package.json +++ b/examples/react/custom-features/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-custom-features", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/custom-features/src/main.tsx b/examples/react/custom-features/src/main.tsx index 5bad334d38..a146c1ef5e 100644 --- a/examples/react/custom-features/src/main.tsx +++ b/examples/react/custom-features/src/main.tsx @@ -48,8 +48,9 @@ declare module '@tanstack/react-table' { //merge our new feature's state with the existing table state interface TableState extends DensityTableState {} //merge our new feature's options with the existing table options - interface TableOptionsResolved - extends DensityOptions {} + interface TableOptionsResolved< + TData extends RowData, + > extends DensityOptions {} //merge our new feature's instance APIs with the existing table instance APIs interface Table extends DensityInstance {} // if you need to add cell instance APIs... @@ -79,7 +80,7 @@ export const DensityFeature: TableFeature = { // define the new feature's default options getDefaultOptions: ( - table: Table + table: Table, ): DensityOptions => { return { enableDensity: true, @@ -93,15 +94,15 @@ export const DensityFeature: TableFeature = { // define the new feature's table instance methods createTable: (table: Table): void => { - table.setDensity = updater => { - const safeUpdater: Updater = old => { + table.setDensity = (updater) => { + const safeUpdater: Updater = (old) => { let newState = functionalUpdate(updater, old) return newState } return table.options.onDensityChange?.(safeUpdater) } - table.toggleDensity = value => { - table.setDensity(old => { + table.toggleDensity = (value) => { + table.setDensity((old) => { if (value) return value return old === 'lg' ? 'md' : old === 'md' ? 'sm' : 'lg' //cycle through the 3 options }) @@ -125,38 +126,38 @@ function App() { () => [ { 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, }, { 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, }, ], - [] + [], ) const [data, _setData] = React.useState(() => makeData(1000)) @@ -188,9 +189,9 @@ function App() {
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender(cell.column.columnDef.cell, cell.getContext())}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -307,7 +308,7 @@ function App() { { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -316,11 +317,11 @@ function App() { + onChange={(e) => column.setFilterValue((old: [number, number]) => [ e.target.value, old?.[1], @@ -366,7 +367,7 @@ function Filter({ + onChange={(e) => column.setFilterValue((old: [number, number]) => [ old?.[0], e.target.value, @@ -380,7 +381,7 @@ function Filter({ column.setFilterValue(e.target.value)} + onChange={(e) => column.setFilterValue(e.target.value)} placeholder={`Search...`} className="w-36 border shadow rounded" /> @@ -393,5 +394,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/editable-data/package.json b/examples/react/editable-data/package.json index 4aea3a36a5..922c11cf38 100644 --- a/examples/react/editable-data/package.json +++ b/examples/react/editable-data/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-editable-data", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/editable-data/src/main.tsx b/examples/react/editable-data/src/main.tsx index 0b12a9fd8c..abc624166f 100644 --- a/examples/react/editable-data/src/main.tsx +++ b/examples/react/editable-data/src/main.tsx @@ -44,7 +44,7 @@ const defaultColumn: Partial> = { return ( setValue(e.target.value)} + onChange={(e) => setValue(e.target.value)} onBlur={onBlur} /> ) @@ -74,28 +74,28 @@ function App() { () => [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', 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', @@ -103,24 +103,24 @@ function App() { { 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, }, ], }, ], }, ], - [] + [], ) const [data, setData] = React.useState(() => makeData(1000)) @@ -141,7 +141,7 @@ function App() { updateData: (rowIndex, columnId, value) => { // Skip page index reset until after next rerender skipAutoResetPageIndex() - setData(old => + setData((old) => old.map((row, index) => { if (index === rowIndex) { return { @@ -150,7 +150,7 @@ function App() { } } return row - }) + }), ) }, }, @@ -162,16 +162,16 @@ function App() {
{flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -235,10 +236,10 @@ function App() { ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -249,7 +249,7 @@ function App() { min="1" max={table.getPageCount()} defaultValue={table.getState().pagination.pageIndex + 1} - onChange={e => { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -258,11 +258,11 @@ function App() { + onChange={(e) => column.setFilterValue((old: [number, number]) => [ e.target.value, old?.[1], @@ -309,7 +309,7 @@ function Filter({ + onChange={(e) => column.setFilterValue((old: [number, number]) => [ old?.[0], e.target.value, @@ -323,7 +323,7 @@ function Filter({ column.setFilterValue(e.target.value)} + onChange={(e) => column.setFilterValue(e.target.value)} placeholder={`Search...`} className="w-36 border shadow rounded" /> @@ -336,5 +336,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/expanding/package.json b/examples/react/expanding/package.json index a05a90b217..3f10d0cdbd 100644 --- a/examples/react/expanding/package.json +++ b/examples/react/expanding/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-expanding", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/expanding/src/main.tsx b/examples/react/expanding/src/main.tsx index 0b1bcad384..e410914327 100644 --- a/examples/react/expanding/src/main.tsx +++ b/examples/react/expanding/src/main.tsx @@ -77,37 +77,37 @@ function App() { ), - 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, }, { 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, }, ], - [] + [], ) const [data, setData] = React.useState(() => makeData(100, 5, 3)) @@ -122,7 +122,7 @@ function App() { expanded, }, onExpandedChange: setExpanded, - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, getCoreRowModel: getCoreRowModel(), getPaginationRowModel: getPaginationRowModel(), getFilteredRowModel: getFilteredRowModel(), @@ -137,16 +137,16 @@ function App() {
{header.isPlaceholder ? null : (
{flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {header.column.getCanFilter() ? (
@@ -187,15 +187,15 @@ function App() { ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -224,7 +224,7 @@ function App() { min="1" max={table.getPageCount()} defaultValue={table.getState().pagination.pageIndex + 1} - onChange={e => { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -233,11 +233,11 @@ function App() { + onChange={(e) => column.setFilterValue((old: [number, number]) => [ e.target.value, old?.[1], @@ -289,7 +289,7 @@ function Filter({ + onChange={(e) => column.setFilterValue((old: [number, number]) => [ old?.[0], e.target.value, @@ -303,7 +303,7 @@ function Filter({ column.setFilterValue(e.target.value)} + onChange={(e) => column.setFilterValue(e.target.value)} placeholder={`Search...`} className="w-36 border shadow rounded" /> @@ -339,5 +339,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/filters-faceted/package.json b/examples/react/filters-faceted/package.json index 7749a6f20a..c4a3d655c8 100644 --- a/examples/react/filters-faceted/package.json +++ b/examples/react/filters-faceted/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-filters-faceted", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -11,7 +10,7 @@ "dependencies": { "@faker-js/faker": "^8.4.1", "@tanstack/match-sorter-utils": "^8.19.4", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/filters-faceted/src/main.tsx b/examples/react/filters-faceted/src/main.tsx index 76ae112325..3dd6d98d5f 100644 --- a/examples/react/filters-faceted/src/main.tsx +++ b/examples/react/filters-faceted/src/main.tsx @@ -32,19 +32,19 @@ function App() { const rerender = React.useReducer(() => ({}), {})[1] const [columnFilters, setColumnFilters] = React.useState( - [] + [], ) const columns = React.useMemo[]>( () => [ { 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, }, { @@ -76,11 +76,11 @@ function App() { }, }, ], - [] + [], ) const [data, setData] = React.useState(() => makeData(5_000)) - const refreshData = () => setData(_old => makeData(100_000)) //stress test + const refreshData = () => setData((_old) => makeData(100_000)) //stress test const table = useReactTable({ data, @@ -105,9 +105,9 @@ function App() {
{header.isPlaceholder ? null : (
{flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {header.column.getCanFilter() ? (
@@ -162,15 +162,15 @@ function App() { ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -203,7 +203,7 @@ function App() { { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -212,11 +212,11 @@ function App() { column.setFilterValue(e.target.value)} + onChange={(e) => column.setFilterValue(e.target.value)} value={columnFilterValue?.toString()} > - {sortedUniqueValues.map(value => ( + {sortedUniqueValues.map((value) => ( //dynamically generated select options from faceted values feature
{header.isPlaceholder ? null : ( @@ -122,7 +122,7 @@ function App() { > {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -143,15 +143,15 @@ function App() { ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -251,7 +251,7 @@ function App() { { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -260,11 +260,11 @@ function App() { setValue(e.target.value)} /> + setValue(e.target.value)} + /> ) } @@ -342,5 +346,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/filters/package.json b/examples/react/filters/package.json index 055342c02f..defc650f2a 100644 --- a/examples/react/filters/package.json +++ b/examples/react/filters/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-filters", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -11,7 +10,7 @@ "dependencies": { "@faker-js/faker": "^8.4.1", "@tanstack/match-sorter-utils": "^8.19.4", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/filters/src/main.tsx b/examples/react/filters/src/main.tsx index 4837edbc18..37737201fb 100644 --- a/examples/react/filters/src/main.tsx +++ b/examples/react/filters/src/main.tsx @@ -29,26 +29,26 @@ function App() { const rerender = React.useReducer(() => ({}), {})[1] const [columnFilters, setColumnFilters] = React.useState( - [] + [], ) const columns = React.useMemo[]>( () => [ { 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, }, { - accessorFn: row => `${row.firstName} ${row.lastName}`, + accessorFn: (row) => `${row.firstName} ${row.lastName}`, id: 'fullName', header: 'Full Name', - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, { accessorKey: 'age', @@ -79,11 +79,11 @@ function App() { }, }, ], - [] + [], ) const [data, setData] = React.useState(() => makeData(5_000)) - const refreshData = () => setData(_old => makeData(50_000)) //stress test + const refreshData = () => setData((_old) => makeData(50_000)) //stress test const table = useReactTable({ data, @@ -106,9 +106,9 @@ function App() {
{header.isPlaceholder ? null : ( @@ -170,7 +170,7 @@ function App() { > {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -191,15 +191,15 @@ function App() { ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -206,7 +206,7 @@ function App() { min="1" max={table.getPageCount()} defaultValue={table.getState().pagination.pageIndex + 1} - onChange={e => { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -215,11 +215,11 @@ function App() { column.setFilterValue(e.target.value)} + onChange={(e) => column.setFilterValue(e.target.value)} value={columnFilterValue?.toString()} > {/* See faceted column filters example for dynamic select options */} @@ -287,7 +287,7 @@ function Filter({ column }: { column: Column }) { ) : ( column.setFilterValue(value)} + onChange={(value) => column.setFilterValue(value)} placeholder={`Search...`} type="text" value={(columnFilterValue ?? '') as string} @@ -322,7 +322,11 @@ function DebouncedInput({ }, [value]) return ( - setValue(e.target.value)} /> + setValue(e.target.value)} + /> ) } @@ -332,5 +336,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/full-width-resizable-table/package.json b/examples/react/full-width-resizable-table/package.json index 9e03368b3a..7ef0bd1e79 100755 --- a/examples/react/full-width-resizable-table/package.json +++ b/examples/react/full-width-resizable-table/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-full-width-resizable-table", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/full-width-resizable-table/src/main.tsx b/examples/react/full-width-resizable-table/src/main.tsx index 7ac6e8dd6f..2084ba1c29 100644 --- a/examples/react/full-width-resizable-table/src/main.tsx +++ b/examples/react/full-width-resizable-table/src/main.tsx @@ -13,30 +13,30 @@ import { makeData, Person } from './makeData' const columns: 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', @@ -44,17 +44,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, }, ], }, @@ -81,9 +81,9 @@ function App() {
{header.isPlaceholder ? null : ( @@ -123,7 +123,7 @@ function App() { > {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -144,15 +144,15 @@ function App() { ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -141,5 +141,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/full-width-table/package.json b/examples/react/full-width-table/package.json index 0617f52012..1f747b4b2f 100755 --- a/examples/react/full-width-table/package.json +++ b/examples/react/full-width-table/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-full-width", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/full-width-table/src/main.tsx b/examples/react/full-width-table/src/main.tsx index 3312784123..b031dbb45e 100644 --- a/examples/react/full-width-table/src/main.tsx +++ b/examples/react/full-width-table/src/main.tsx @@ -19,50 +19,50 @@ function App() { () => [ { 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, }, ], }, ], - [] + [], ) const [data, setData] = React.useState(() => makeData(100000)) @@ -92,16 +92,16 @@ function App() {
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -174,7 +174,7 @@ function App() { min="1" max={table.getPageCount()} defaultValue={table.getState().pagination.pageIndex + 1} - onChange={e => { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -183,11 +183,11 @@ function App() {
{header.isPlaceholder ? null : (
{flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
)} @@ -112,15 +112,15 @@ function App() { ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -126,9 +126,9 @@ function App() { ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( @@ -137,15 +137,15 @@ function App() { ))} - {table.getFooterGroups().map(footerGroup => ( + {table.getFooterGroups().map((footerGroup) => ( - {footerGroup.headers.map(header => ( + {footerGroup.headers.map((header) => ( ))} @@ -197,7 +197,7 @@ function App() { min="1" max={table.getPageCount()} defaultValue={table.getState().pagination.pageIndex + 1} - onChange={e => { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -206,11 +206,11 @@ function App() {
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender(cell.column.columnDef.cell, cell.getContext())}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( @@ -249,7 +249,7 @@ function App() { min="1" max={table.getPageCount()} defaultValue={table.getState().pagination.pageIndex + 1} - onChange={e => { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -258,11 +258,11 @@ function App() { setIsSplit(e.target.checked)} + onChange={(e) => setIsSplit(e.target.checked)} className="mx-1" /> Split Mode diff --git a/examples/react/kitchen-sink/src/components/ActionButtons.tsx b/examples/react/kitchen-sink/src/components/ActionButtons.tsx index 2a33663619..85c5ad949d 100644 --- a/examples/react/kitchen-sink/src/components/ActionButtons.tsx +++ b/examples/react/kitchen-sink/src/components/ActionButtons.tsx @@ -78,7 +78,7 @@ export function ActionButtons({ min="1" max={pageCount} defaultValue={pageIndex + 1} - onChange={e => { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 setPageIndex(page) }} @@ -88,11 +88,11 @@ export function ActionButtons({
{header.isPlaceholder ? null : ( @@ -131,7 +131,7 @@ function App() { ) : null}{' '} {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} )} @@ -142,10 +142,10 @@ function App() { ))}
@@ -188,13 +188,13 @@ function App() { flexRender( cell.column.columnDef.aggregatedCell ?? cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), ) ) : cell.getIsPlaceholder() ? null : ( // For cells with repeated values, render null // Otherwise, just render the regular cell flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), ) )}
- {headerGroups.map(headerGroup => ( + {headerGroups.map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {getRowGroup(row, tableGroup).map(cell => ( + {getRowGroup(row, tableGroup).map((cell) => ( - {footerGroup.map(footerGroup => ( + {footerGroup.map((footerGroup) => ( - {footerGroup.headers.map(header => ( + {footerGroup.headers.map((header) => ( ))} diff --git a/examples/react/kitchen-sink/src/components/Filter.tsx b/examples/react/kitchen-sink/src/components/Filter.tsx index 83d11ec89b..f877eb2b61 100644 --- a/examples/react/kitchen-sink/src/components/Filter.tsx +++ b/examples/react/kitchen-sink/src/components/Filter.tsx @@ -27,7 +27,7 @@ const NumberInput: React.FC = ({ min={min} max={max} value={columnFilterValue?.[0] ?? ''} - onChange={value => + onChange={(value) => setFilterValue((old: [number, number]) => [value, old?.[1]]) } placeholder={`Min ${minOpt ? `(${min})` : ''}`} @@ -38,7 +38,7 @@ const NumberInput: React.FC = ({ min={min} max={max} value={columnFilterValue?.[1] ?? ''} - onChange={value => + onChange={(value) => setFilterValue((old: [number, number]) => [old?.[0], value]) } placeholder={`Max ${maxOpt ? `(${max})` : ''}`} @@ -77,7 +77,7 @@ const TextInput: React.FC = ({ setFilterValue(value)} + onChange={(value) => setFilterValue(value)} placeholder={`Search... (${columnSize})`} className="w-36 border shadow rounded" list={dataListId} @@ -105,7 +105,7 @@ export function Filter({ column, table }: Props) { typeof firstValue === 'number' ? [] : Array.from(uniqueValues.keys()).sort(), - [uniqueValues] + [uniqueValues], ) return typeof firstValue === 'number' ? ( diff --git a/examples/react/kitchen-sink/src/hooks.tsx b/examples/react/kitchen-sink/src/hooks.tsx index f41940baef..3ac4bb5406 100644 --- a/examples/react/kitchen-sink/src/hooks.tsx +++ b/examples/react/kitchen-sink/src/hooks.tsx @@ -15,7 +15,7 @@ export function useSkipper() { const result = React.useMemo( () => [Boolean(shouldSkip), skip] as const, - [shouldSkip, skip] + [shouldSkip, skip], ) return result diff --git a/examples/react/kitchen-sink/src/main.tsx b/examples/react/kitchen-sink/src/main.tsx index 12107de5b7..a4837c6396 100644 --- a/examples/react/kitchen-sink/src/main.tsx +++ b/examples/react/kitchen-sink/src/main.tsx @@ -10,5 +10,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/kitchen-sink/src/tableModels.tsx b/examples/react/kitchen-sink/src/tableModels.tsx index 242c543c4b..b6b6c24dda 100644 --- a/examples/react/kitchen-sink/src/tableModels.tsx +++ b/examples/react/kitchen-sink/src/tableModels.tsx @@ -17,7 +17,7 @@ export const fuzzyFilter: FilterFn = ( row, columnId, value, - addMeta + addMeta, ) => { // Rank the item const itemRank = rankItem(row.getValue(columnId), value) @@ -36,7 +36,7 @@ export const fuzzySort: SortingFn = (rowA, rowB, columnId) => { if (rowA.columnFiltersMeta[columnId]) { dir = compareItems( rowA.columnFiltersMeta[columnId]! as RankingInfo, - rowB.columnFiltersMeta[columnId]! as RankingInfo + rowB.columnFiltersMeta[columnId]! as RankingInfo, ) } @@ -68,7 +68,7 @@ export const defaultColumn: Partial> = { return ( setValue(e.target.value)} + onChange={(e) => setValue(e.target.value)} onBlur={onBlur} /> ) @@ -97,26 +97,26 @@ export const columns: 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, }, { - accessorFn: row => `${row.firstName} ${row.lastName}`, + accessorFn: (row) => `${row.firstName} ${row.lastName}`, id: 'fullName', header: 'Full Name', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, filterFn: fuzzyFilter, sortingFn: fuzzySort, }, @@ -124,12 +124,12 @@ export const columns: ColumnDef[] = [ }, { 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', @@ -137,17 +137,17 @@ export 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, }, ], }, @@ -157,13 +157,13 @@ export const columns: ColumnDef[] = [ export const getTableMeta = ( setData: React.Dispatch>, - skipAutoResetPageIndex: () => void + skipAutoResetPageIndex: () => void, ) => ({ updateData: (rowIndex, columnId, value) => { // Skip age index reset until after next rerender skipAutoResetPageIndex() - setData(old => + setData((old) => old.map((row, index) => { if (index !== rowIndex) return row @@ -171,7 +171,7 @@ export const getTableMeta = ( ...old[rowIndex]!, [columnId]: value, } - }) + }), ) }, }) as TableMeta diff --git a/examples/react/material-ui-pagination/package.json b/examples/react/material-ui-pagination/package.json index c30ce81d1d..dd4d8f21fe 100644 --- a/examples/react/material-ui-pagination/package.json +++ b/examples/react/material-ui-pagination/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-material-ui-pagination", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -13,7 +12,7 @@ "@emotion/styled": "^11.11.5", "@mui/icons-material": "^5.15.21", "@mui/material": "^5.15.21", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/material-ui-pagination/src/actions.tsx b/examples/react/material-ui-pagination/src/actions.tsx index 1a6c325dcd..a9ae2b17ad 100644 --- a/examples/react/material-ui-pagination/src/actions.tsx +++ b/examples/react/material-ui-pagination/src/actions.tsx @@ -14,25 +14,25 @@ const TablePaginationActions = (props: TablePaginationActionsProps) => { const { count, page, rowsPerPage, onPageChange } = props const handleFirstPageButtonClick = ( - event: React.MouseEvent + event: React.MouseEvent, ) => { onPageChange(event, 0) } const handleBackButtonClick = ( - event: React.MouseEvent + event: React.MouseEvent, ) => { onPageChange(event, page - 1) } const handleNextButtonClick = ( - event: React.MouseEvent + event: React.MouseEvent, ) => { onPageChange(event, page + 1) } const handleLastPageButtonClick = ( - event: React.MouseEvent + event: React.MouseEvent, ) => { onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1)) } diff --git a/examples/react/material-ui-pagination/src/main.tsx b/examples/react/material-ui-pagination/src/main.tsx index beddb100aa..c00e5d6d43 100644 --- a/examples/react/material-ui-pagination/src/main.tsx +++ b/examples/react/material-ui-pagination/src/main.tsx @@ -34,30 +34,30 @@ function App() { () => [ { 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', @@ -65,24 +65,24 @@ function App() { { 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, }, ], }, ], }, ], - [] + [], ) const [data, setData] = React.useState(() => makeData(100000)) @@ -127,16 +127,16 @@ function LocalTable({
({ ) : null}{' '} {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}{' '}
({ ))}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( {header.isPlaceholder ? null : (
{flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {header.column.getCanFilter() ? (
@@ -152,15 +152,15 @@ function LocalTable({ ))} - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( {flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )} ) @@ -186,7 +186,7 @@ function LocalTable({ onPageChange={(_, page) => { table.setPageIndex(page) }} - onRowsPerPageChange={e => { + onRowsPerPageChange={(e) => { const size = e.target.value ? Number(e.target.value) : 10 table.setPageSize(size) }} @@ -214,7 +214,7 @@ function Filter({ + onChange={(e) => column.setFilterValue((old: [number, number]) => [ e.target.value, old?.[1], @@ -226,7 +226,7 @@ function Filter({ + onChange={(e) => column.setFilterValue((old: [number, number]) => [ old?.[0], e.target.value, @@ -240,7 +240,7 @@ function Filter({ ) : ( column.setFilterValue(e.target.value)} + onChange={(e) => column.setFilterValue(e.target.value)} placeholder={`Search...`} className="w-36 border shadow rounded" inputProps={{ 'aria-label': 'search' }} @@ -254,5 +254,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/pagination-controlled/package.json b/examples/react/pagination-controlled/package.json index 9ffa5d4c01..18f7c55689 100644 --- a/examples/react/pagination-controlled/package.json +++ b/examples/react/pagination-controlled/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-pagination-controlled", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -11,7 +10,7 @@ "dependencies": { "@faker-js/faker": "^8.4.1", "@tanstack/react-query": "^5.49.0", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/pagination-controlled/src/fetchData.ts b/examples/react/pagination-controlled/src/fetchData.ts index 53a51ea688..26df9c05c7 100644 --- a/examples/react/pagination-controlled/src/fetchData.ts +++ b/examples/react/pagination-controlled/src/fetchData.ts @@ -54,12 +54,12 @@ export async function fetchData(options: { pageSize: number }) { // Simulate some network latency - await new Promise(r => setTimeout(r, 500)) + await new Promise((r) => setTimeout(r, 500)) return { rows: data.slice( options.pageIndex * options.pageSize, - (options.pageIndex + 1) * options.pageSize + (options.pageIndex + 1) * options.pageSize, ), pageCount: Math.ceil(data.length / options.pageSize), rowCount: data.length, diff --git a/examples/react/pagination-controlled/src/main.tsx b/examples/react/pagination-controlled/src/main.tsx index f7f250a3d6..6e3527aa0d 100644 --- a/examples/react/pagination-controlled/src/main.tsx +++ b/examples/react/pagination-controlled/src/main.tsx @@ -31,30 +31,30 @@ function App() { () => [ { 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', @@ -62,24 +62,24 @@ function App() { { 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, }, ], }, ], }, ], - [] + [], ) const [pagination, setPagination] = React.useState({ @@ -115,16 +115,16 @@ function App() {
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -197,7 +197,7 @@ function App() { min="1" max={table.getPageCount()} defaultValue={table.getState().pagination.pageIndex + 1} - onChange={e => { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -206,11 +206,11 @@ function App() {
{header.isPlaceholder ? null : (
{flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
)} @@ -135,15 +135,15 @@ function App() { ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -210,7 +210,7 @@ function MyTable({ min="1" max={table.getPageCount()} defaultValue={table.getState().pagination.pageIndex + 1} - onChange={e => { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -219,11 +219,11 @@ function MyTable({ + onChange={(e) => column.setFilterValue((old: [number, number]) => [ e.target.value, old?.[1], @@ -269,7 +269,7 @@ function Filter({ + onChange={(e) => column.setFilterValue((old: [number, number]) => [ old?.[0], e.target.value, @@ -282,8 +282,8 @@ function Filter({ ) : ( column.setFilterValue(e.target.value)} - onClick={e => e.stopPropagation()} + onChange={(e) => column.setFilterValue(e.target.value)} + onClick={(e) => e.stopPropagation()} placeholder={`Search...`} type="text" value={(columnFilterValue ?? '') as string} @@ -297,5 +297,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/query-router-search-params/package.json b/examples/react/query-router-search-params/package.json index c92fcfb775..f7b8113a52 100644 --- a/examples/react/query-router-search-params/package.json +++ b/examples/react/query-router-search-params/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-query-router-search-params", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -11,14 +10,14 @@ "dependencies": { "@tanstack/react-query": "^5.49.0", "@tanstack/react-router": "^1.43.2", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, "devDependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/router-vite-plugin": "^1.43.1", "@rollup/plugin-replace": "^5.0.7", + "@tanstack/router-vite-plugin": "^1.43.1", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.1", diff --git a/examples/react/query-router-search-params/src/api/user.ts b/examples/react/query-router-search-params/src/api/user.ts index 6953ac61b7..26be50fb34 100644 --- a/examples/react/query-router-search-params/src/api/user.ts +++ b/examples/react/query-router-search-params/src/api/user.ts @@ -29,7 +29,7 @@ function makeData(amount: number): User[] { const data = makeData(1000) export async function fetchUsers( - filtersAndPagination: UserFilters + filtersAndPagination: UserFilters, ): Promise> { console.log('fetchUsers', filtersAndPagination) const { @@ -52,8 +52,8 @@ export async function fetchUsers( }) } - const filteredData = requestedData.filter(user => { - return Object.keys(filters).every(key => { + const filteredData = requestedData.filter((user) => { + return Object.keys(filters).every((key) => { const filter = filters[key as keyof User] if (filter === undefined || filter === '') return true @@ -64,12 +64,12 @@ export async function fetchUsers( }) }) - await new Promise(resolve => setTimeout(resolve, 100)) + await new Promise((resolve) => setTimeout(resolve, 100)) return { result: filteredData.slice( pageIndex * pageSize, - (pageIndex + 1) * pageSize + (pageIndex + 1) * pageSize, ), rowCount: filteredData.length, } diff --git a/examples/react/query-router-search-params/src/components/debouncedInput.tsx b/examples/react/query-router-search-params/src/components/debouncedInput.tsx index 8097555524..38ecd1dd4d 100644 --- a/examples/react/query-router-search-params/src/components/debouncedInput.tsx +++ b/examples/react/query-router-search-params/src/components/debouncedInput.tsx @@ -29,7 +29,7 @@ export function DebouncedInput({ { + onChange={(e) => { if (e.target.value === '') return setValue('') if (props.type === 'number') { setValue(e.target.valueAsNumber) diff --git a/examples/react/query-router-search-params/src/components/table.tsx b/examples/react/query-router-search-params/src/components/table.tsx index 03205bdd9b..7bac6e66d8 100644 --- a/examples/react/query-router-search-params/src/components/table.tsx +++ b/examples/react/query-router-search-params/src/components/table.tsx @@ -51,9 +51,9 @@ export default function Table>({
{flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -148,15 +148,15 @@ function MyTable({ ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { const fieldMeta = header.column.columnDef.meta return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -163,7 +163,7 @@ export default function Table>({ { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -172,11 +172,11 @@ export default function Table>({ - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( @@ -86,12 +86,12 @@ function App() { }, { 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, }, { @@ -111,13 +111,13 @@ function App() { header: 'Profile Progress', }, ], - [] + [], ) const [data, setData] = React.useState(() => makeData(20)) const dataIds = React.useMemo( () => data?.map(({ userId }) => userId), - [data] + [data], ) const rerender = () => setData(() => makeData(20)) @@ -126,7 +126,7 @@ function App() { data, columns, getCoreRowModel: getCoreRowModel(), - 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, @@ -136,7 +136,7 @@ function App() { function handleDragEnd(event: DragEndEvent) { const { active, over } = event if (active && over && active.id !== over.id) { - setData(data => { + setData((data) => { const oldIndex = dataIds.indexOf(active.id) const newIndex = dataIds.indexOf(over.id) return arrayMove(data, oldIndex, newIndex) //this is just a splice util @@ -147,7 +147,7 @@ function App() { const sensors = useSensors( useSensor(MouseSensor, {}), useSensor(TouchSensor, {}), - useSensor(KeyboardSensor, {}) + useSensor(KeyboardSensor, {}), ) return ( @@ -168,15 +168,15 @@ function App() {
@@ -69,7 +69,7 @@ export default function Table>({ > {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -81,7 +81,7 @@ export default function Table>({ fieldMeta?.filterKey !== undefined ? ( { + onChange={(value) => { onFilterChange({ [fieldMeta.filterKey as keyof T]: value, } as Partial) @@ -104,15 +104,15 @@ export default function Table>({ ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
{flexRender(cell.column.columnDef.cell, cell.getContext())}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -188,7 +188,7 @@ function App() { items={dataIds} strategy={verticalListSortingStrategy} > - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( ))} @@ -206,5 +206,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/row-pinning/package.json b/examples/react/row-pinning/package.json index d8724259d3..3704db3e27 100644 --- a/examples/react/row-pinning/package.json +++ b/examples/react/row-pinning/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-row-pinning", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/row-pinning/src/main.tsx b/examples/react/row-pinning/src/main.tsx index 0c93f2b37b..79e046733a 100644 --- a/examples/react/row-pinning/src/main.tsx +++ b/examples/react/row-pinning/src/main.tsx @@ -108,12 +108,12 @@ function App() { ), - 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, }, { @@ -136,7 +136,7 @@ function App() { size: 80, }, ], - [includeLeafRows, includeParentRows] + [includeLeafRows, includeParentRows], ) const [data, setData] = React.useState(() => makeData(1000, 2, 2)) @@ -152,7 +152,7 @@ function App() { }, onExpandedChange: setExpanded, onRowPinningChange: setRowPinning, - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, getCoreRowModel: getCoreRowModel(), getFilteredRowModel: getFilteredRowModel(), getExpandedRowModel: getExpandedRowModel(), @@ -167,16 +167,16 @@ function App() {
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getTopRows().map(row => ( + {table.getTopRows().map((row) => ( ))} {(copyPinnedRows ? table.getRowModel().rows : table.getCenterRows() - ).map(row => { + ).map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -214,7 +214,7 @@ function App() { ) })} - {table.getBottomRows().map(row => ( + {table.getBottomRows().map((row) => ( ))} @@ -265,7 +265,7 @@ function App() { min="1" max={table.getPageCount()} defaultValue={table.getState().pagination.pageIndex + 1} - onChange={e => { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -274,11 +274,11 @@ function App() { + {table.getHeaderGroups().map((headerGroup) => ( + + ))} + + ) +} + +interface TableHeadRowProps { + columnVirtualizer: Virtualizer + headerGroup: HeaderGroup +} + +function TableHeadRow({ columnVirtualizer, headerGroup }: TableHeadRowProps) { + const virtualColumnIndexes = columnVirtualizer.getVirtualIndexes() + + return ( + + {/* fake empty column to the left for virtualization scroll padding */} + + ) +} + +interface TableHeadCellProps { + columnVirtualizer: Virtualizer + header: Header +} + +function TableHeadCell({ + columnVirtualizer: _columnVirtualizer, + header, +}: TableHeadCellProps) { + return ( + + ) +} + +const TableHeadCellMemo = React.memo( + TableHeadCell, + (_prev, next) => next.columnVirtualizer.isScrolling, +) as typeof TableHeadCell + +interface TableBodyProps { + columnVirtualizer: Virtualizer + table: Table + tableContainerRef: React.RefObject +} + +function TableBody({ + columnVirtualizer, + table, + tableContainerRef, +}: TableBodyProps) { + const tableBodyRef = React.useRef(null) + const rowRefsMap = React.useRef>(new Map()) + + const { rows } = table.getRowModel() + + //dynamic row height virtualization - alternatively you could use a simpler fixed row height strategy without the need for `measureElement` + const rowVirtualizer = useVirtualizer({ + count: rows.length, + estimateSize: () => 33, //estimate row height for accurate scrollbar dragging + getScrollElement: () => tableContainerRef.current, + //measure dynamic row height, except in firefox because it measures table border height incorrectly + measureElement: + typeof window !== 'undefined' && + navigator.userAgent.indexOf('Firefox') === -1 + ? (element) => element?.getBoundingClientRect().height + : undefined, + overscan: 5, + onChange: (instance) => { + // requestAnimationFrame(() => { + tableBodyRef.current!.style.height = `${instance.getTotalSize()}px` + instance.getVirtualItems().forEach((virtualRow) => { + const rowRef = rowRefsMap.current.get(virtualRow.index) + if (!rowRef) return + rowRef.style.transform = `translateY(${virtualRow.start}px)` + }) + // }) + }, + }) + + React.useLayoutEffect(() => { + rowVirtualizer.measure() + }, [table.getState()]) + + const virtualRowIndexes = rowVirtualizer.getVirtualIndexes() + + return ( + + {virtualRowIndexes.map((virtualRowIndex) => { + const row = rows[virtualRowIndex] as Row + + return ( + + ) + })} + + ) +} + +interface TableBodyRowProps { + columnVirtualizer: Virtualizer + row: Row + rowVirtualizer: Virtualizer + virtualRowIndex: number + rowRefsMap: React.MutableRefObject> +} + +function TableBodyRow({ + columnVirtualizer, + row, + rowVirtualizer, + virtualRowIndex, + rowRefsMap, +}: TableBodyRowProps) { + const visibleCells = row.getVisibleCells() + const virtualColumnIndexes = columnVirtualizer.getVirtualIndexes() + + return ( + { + if (node) { + rowVirtualizer.measureElement(node) + rowRefsMap.current.set(virtualRowIndex, node) + } + }} //measure dynamic row height + key={row.id} + style={{ + display: 'flex', + position: 'absolute', + width: '100%', + }} + > + {/* fake empty column to the left for virtualization scroll padding */} + + ) +} + +// TODO: Can rows be memoized in any way without breaking column virtualization? +// const TableBodyRowMemo = React.memo( +// TableBodyRow, +// (_prev, next) => next.rowVirtualizer.isScrolling +// ) + +interface TableBodyCellProps { + cell: Cell + columnVirtualizer: Virtualizer +} + +function TableBodyCell({ + cell, + columnVirtualizer: _columnVirtualizer, +}: TableBodyCellProps) { + return ( + + ) +} + +const TableBodyCellMemo = React.memo( + TableBodyCell, + (_prev, next) => next.columnVirtualizer.isScrolling, +) as typeof TableBodyCell + +const rootElement = document.getElementById('root') + +if (!rootElement) throw new Error('Failed to find the root element') + +ReactDOM.createRoot(rootElement).render( + + + , +) diff --git a/examples/react/virtualized-columns-experimental/src/makeData.ts b/examples/react/virtualized-columns-experimental/src/makeData.ts new file mode 100644 index 0000000000..2d45800b12 --- /dev/null +++ b/examples/react/virtualized-columns-experimental/src/makeData.ts @@ -0,0 +1,19 @@ +import { faker } from '@faker-js/faker' + +export const makeColumns = (num) => + [...Array(num)].map((_, i) => { + return { + accessorKey: i.toString(), + header: 'Column ' + i.toString(), + size: Math.floor(Math.random() * 150) + 100, + } + }) + +export const makeData = (num, columns) => + [...Array(num)].map(() => ({ + ...Object.fromEntries( + columns.map((col) => [col.accessorKey, faker.person.firstName()]), + ), + })) + +export type Person = ReturnType[0] diff --git a/examples/react/virtualized-columns-experimental/tsconfig.json b/examples/react/virtualized-columns-experimental/tsconfig.json new file mode 100644 index 0000000000..6d545f543f --- /dev/null +++ b/examples/react/virtualized-columns-experimental/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/examples/react/virtualized-columns-experimental/vite.config.js b/examples/react/virtualized-columns-experimental/vite.config.js new file mode 100644 index 0000000000..2e1361723a --- /dev/null +++ b/examples/react/virtualized-columns-experimental/vite.config.js @@ -0,0 +1,17 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import rollupReplace from '@rollup/plugin-replace' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + rollupReplace({ + preventAssignment: true, + values: { + __DEV__: JSON.stringify(true), + 'process.env.NODE_ENV': JSON.stringify('development'), + }, + }), + react(), + ], +}) diff --git a/examples/react/virtualized-columns/index.html b/examples/react/virtualized-columns/index.html index 3fc40c9367..fa04f89341 100644 --- a/examples/react/virtualized-columns/index.html +++ b/examples/react/virtualized-columns/index.html @@ -8,6 +8,7 @@
+ diff --git a/examples/react/virtualized-columns/package.json b/examples/react/virtualized-columns/package.json index 91126df109..ad9eef3938 100644 --- a/examples/react/virtualized-columns/package.json +++ b/examples/react/virtualized-columns/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-virtualized-columns", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,8 +9,8 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", - "@tanstack/react-virtual": "^3.8.1", + "@tanstack/react-table": "^8.21.3", + "@tanstack/react-virtual": "^3.12.0", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/virtualized-columns/src/main.tsx b/examples/react/virtualized-columns/src/main.tsx index 982b6447db..1b52ff46b2 100644 --- a/examples/react/virtualized-columns/src/main.tsx +++ b/examples/react/virtualized-columns/src/main.tsx @@ -1,28 +1,36 @@ import React from 'react' import ReactDOM from 'react-dom/client' - import './index.css' - import { + Cell, ColumnDef, + Header, + HeaderGroup, + Row, + Table, flexRender, getCoreRowModel, getSortedRowModel, - Row, useReactTable, } from '@tanstack/react-table' - -import { useVirtualizer } from '@tanstack/react-virtual' - +import { + useVirtualizer, + VirtualItem, + Virtualizer, +} from '@tanstack/react-virtual' import { makeColumns, makeData, Person } from './makeData' function App() { const columns = React.useMemo[]>( () => makeColumns(1_000), - [] + [], ) - const [data, _setData] = React.useState(() => makeData(1_000, columns)) + const [data, setData] = React.useState(() => makeData(1_000, columns)) + + const refreshData = React.useCallback(() => { + setData(makeData(1_000, columns)) + }, [columns]) const table = useReactTable({ data, @@ -32,38 +40,47 @@ function App() { debugTable: true, }) - const { rows } = table.getRowModel() + //All important CSS styles are included as inline styles for this example. This is not recommended for your code. + return ( +
+ {process.env.NODE_ENV === 'development' ? ( +

+ Notice: You are currently running React in + development mode. Virtualized rendering performance will be slightly + degraded until this application is built for production. +

+ ) : null} +
({columns.length.toLocaleString()} columns)
+
({data.length.toLocaleString()} rows)
+ + +
+ ) +} +interface TableContainerProps { + table: Table +} + +function TableContainer({ table }: TableContainerProps) { const visibleColumns = table.getVisibleLeafColumns() //The virtualizers need to know the scrollable container element const tableContainerRef = React.useRef(null) //we are using a slightly different virtualization strategy for columns (compared to virtual rows) in order to support dynamic row heights - const columnVirtualizer = useVirtualizer({ + const columnVirtualizer = useVirtualizer< + HTMLDivElement, + HTMLTableCellElement + >({ count: visibleColumns.length, - estimateSize: index => visibleColumns[index].getSize(), //estimate width of each column for accurate scrollbar dragging + estimateSize: (index) => visibleColumns[index].getSize(), //estimate width of each column for accurate scrollbar dragging getScrollElement: () => tableContainerRef.current, horizontal: true, overscan: 3, //how many columns to render on each side off screen each way (adjust this for performance) }) - //dynamic row height virtualization - alternatively you could use a simpler fixed row height strategy without the need for `measureElement` - const rowVirtualizer = useVirtualizer({ - count: rows.length, - estimateSize: () => 33, //estimate row height for accurate scrollbar dragging - getScrollElement: () => tableContainerRef.current, - //measure dynamic row height, except in firefox because it measures table border height incorrectly - measureElement: - typeof window !== 'undefined' && - navigator.userAgent.indexOf('Firefox') === -1 - ? element => element?.getBoundingClientRect().height - : undefined, - overscan: 5, - }) - const virtualColumns = columnVirtualizer.getVirtualItems() - const virtualRows = rowVirtualizer.getVirtualItems() //different virtualization strategy for columns - instead of absolute and translateY, we add empty columns to the left and right let virtualPaddingLeft: number | undefined @@ -76,143 +93,256 @@ function App() { (virtualColumns[virtualColumns.length - 1]?.end ?? 0) } - //All important CSS styles are included as inline styles for this example. This is not recommended for your code. return ( -
- {process.env.NODE_ENV === 'development' ? ( -

- Notice: You are currently running React in - development mode. Virtualized rendering performance will be slightly - degraded until this application is built for production. -

+
+ {/* Even though we're still using sematic table tags, we must use CSS grid and flexbox for dynamic row heights */} +
{header.isPlaceholder ? null : ( <> {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {header.column.getCanFilter() ? (
@@ -192,21 +192,21 @@ function App() { ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
{flexRender(cell.column.columnDef.cell, cell.getContext())} @@ -389,7 +389,7 @@ function Filter({ + onChange={(e) => column.setFilterValue((old: any) => [e.target.value, old?.[1]]) } placeholder={`Min`} @@ -398,7 +398,7 @@ function Filter({ + onChange={(e) => column.setFilterValue((old: any) => [old?.[0], e.target.value]) } placeholder={`Max`} @@ -409,7 +409,7 @@ function Filter({ column.setFilterValue(e.target.value)} + onChange={(e) => column.setFilterValue(e.target.value)} placeholder={`Search...`} className="w-36 border shadow rounded" /> @@ -422,5 +422,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/row-selection/package.json b/examples/react/row-selection/package.json index beb7e94c10..26be497dab 100644 --- a/examples/react/row-selection/package.json +++ b/examples/react/row-selection/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-row-selection", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/row-selection/src/main.tsx b/examples/react/row-selection/src/main.tsx index 03c1e12bf5..f8abf7b0dc 100644 --- a/examples/react/row-selection/src/main.tsx +++ b/examples/react/row-selection/src/main.tsx @@ -50,30 +50,30 @@ function App() { }, { 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', @@ -81,24 +81,24 @@ function App() { { 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, }, ], }, ], }, ], - [] + [], ) const [data, setData] = React.useState(() => makeData(100000)) @@ -124,7 +124,7 @@ function App() {
setGlobalFilter(e.target.value)} + onChange={(e) => setGlobalFilter(e.target.value)} className="p-2 font-lg shadow border border-block" placeholder="Search all columns..." /> @@ -132,16 +132,16 @@ function App() {
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -233,7 +233,7 @@ function App() { min="1" max={table.getPageCount()} defaultValue={table.getState().pagination.pageIndex + 1} - onChange={e => { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) }} @@ -242,11 +242,11 @@ function App() { + onChange={(e) => column.setFilterValue((old: any) => [e.target.value, old?.[1]]) } placeholder={`Min`} @@ -319,7 +319,7 @@ function Filter({ + onChange={(e) => column.setFilterValue((old: any) => [old?.[0], e.target.value]) } placeholder={`Max`} @@ -330,7 +330,7 @@ function Filter({ column.setFilterValue(e.target.value)} + onChange={(e) => column.setFilterValue(e.target.value)} placeholder={`Search...`} className="w-36 border shadow rounded" /> @@ -366,5 +366,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/sorting/package.json b/examples/react/sorting/package.json index 1d7044effa..69fd494bee 100644 --- a/examples/react/sorting/package.json +++ b/examples/react/sorting/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-sorting", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/sorting/src/main.tsx b/examples/react/sorting/src/main.tsx index 3a5ba39de4..e8629efb07 100644 --- a/examples/react/sorting/src/main.tsx +++ b/examples/react/sorting/src/main.tsx @@ -31,13 +31,13 @@ function App() { () => [ { accessorKey: 'firstName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), //this column will sort in ascending order by default since it is a string column }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => Last Name, sortUndefined: 'last', //force undefined values to the end sortDescFirst: false, //first sort order will be ascending (nullable values can mess up auto detection of sort order) @@ -73,7 +73,7 @@ function App() { // sortingFn: 'datetime' //make sure table knows this is a datetime column (usually can detect if no null values) }, ], - [] + [], ) const [data, setData] = React.useState(() => makeData(1_000)) @@ -109,9 +109,9 @@ function App() {
{header.isPlaceholder ? null : ( <> {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {header.column.getCanFilter() ? (
@@ -157,15 +157,15 @@ function App() { ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -189,5 +189,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/sub-components/package.json b/examples/react/sub-components/package.json index 4f2402df77..db02deef16 100644 --- a/examples/react/sub-components/package.json +++ b/examples/react/sub-components/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-sub-components", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,7 +9,7 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", + "@tanstack/react-table": "^8.21.3", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/sub-components/src/main.tsx b/examples/react/sub-components/src/main.tsx index 4890d12c5d..db9242ca9c 100644 --- a/examples/react/sub-components/src/main.tsx +++ b/examples/react/sub-components/src/main.tsx @@ -16,7 +16,7 @@ import { makeData, Person } from './makeData' const columns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { id: 'expander', @@ -52,25 +52,25 @@ const columns: ColumnDef[] = [ {getValue()} ), - 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', @@ -78,17 +78,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, }, ], }, @@ -122,16 +122,16 @@ function Table({
{header.isPlaceholder ? null : ( @@ -134,7 +134,7 @@ function App() { > {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -152,15 +152,15 @@ function App() { {table .getRowModel() .rows.slice(0, 10) - .map(row => { + .map((row) => { return (
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( - {table.getRowModel().rows.map(row => { + {table.getRowModel().rows.map((row) => { return ( {/* first row is a normal row */} - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( ) @@ -204,5 +204,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/virtualized-columns-experimental/.gitignore b/examples/react/virtualized-columns-experimental/.gitignore new file mode 100644 index 0000000000..d451ff16c1 --- /dev/null +++ b/examples/react/virtualized-columns-experimental/.gitignore @@ -0,0 +1,5 @@ +node_modules +.DS_Store +dist +dist-ssr +*.local diff --git a/examples/react/virtualized-columns-experimental/README.md b/examples/react/virtualized-columns-experimental/README.md new file mode 100644 index 0000000000..b168d3c4b1 --- /dev/null +++ b/examples/react/virtualized-columns-experimental/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run start` or `yarn start` diff --git a/examples/react/virtualized-columns-experimental/index.html b/examples/react/virtualized-columns-experimental/index.html new file mode 100644 index 0000000000..fa04f89341 --- /dev/null +++ b/examples/react/virtualized-columns-experimental/index.html @@ -0,0 +1,14 @@ + + + + + + Vite App + + + +
+ + + + diff --git a/examples/react/virtualized-columns-experimental/package.json b/examples/react/virtualized-columns-experimental/package.json new file mode 100644 index 0000000000..cb055efe47 --- /dev/null +++ b/examples/react/virtualized-columns-experimental/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-virtualized-columns-experimental", + "private": true, + "scripts": { + "dev": "vite", + "build": "vite build", + "serve": "vite preview", + "start": "vite" + }, + "dependencies": { + "@faker-js/faker": "^8.4.1", + "@tanstack/react-table": "^8.21.3", + "@tanstack/react-virtual": "^3.12.0", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@rollup/plugin-replace": "^5.0.7", + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "^4.3.1", + "typescript": "5.4.5", + "vite": "^5.3.2" + } +} diff --git a/examples/react/virtualized-columns-experimental/src/index.css b/examples/react/virtualized-columns-experimental/src/index.css new file mode 100644 index 0000000000..98d667b225 --- /dev/null +++ b/examples/react/virtualized-columns-experimental/src/index.css @@ -0,0 +1,53 @@ +:root { + --virtual-padding-left: 0px; + --virtual-padding-right: 0px; +} + +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border-collapse: collapse; + border-spacing: 0; + font-family: arial, sans-serif; + table-layout: fixed; +} + +thead { + background: lightgray; +} + +tr { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; + text-align: left; +} + +td { + padding: 6px; +} + +.container { + border: 1px solid lightgray; + margin: 1rem auto; +} + +.app { + margin: 1rem auto; + text-align: center; +} + +.left-column-spacer { + width: var(--virtual-padding-left); +} + +.right-column-spacer { + width: var(--virtual-padding-right); +} diff --git a/examples/react/virtualized-columns-experimental/src/main.tsx b/examples/react/virtualized-columns-experimental/src/main.tsx new file mode 100644 index 0000000000..568b8159d7 --- /dev/null +++ b/examples/react/virtualized-columns-experimental/src/main.tsx @@ -0,0 +1,389 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import './index.css' +import { + Cell, + ColumnDef, + Header, + HeaderGroup, + Row, + Table, + flexRender, + getCoreRowModel, + getSortedRowModel, + useReactTable, +} from '@tanstack/react-table' +import { useVirtualizer, Virtualizer } from '@tanstack/react-virtual' +import { makeColumns, makeData, Person } from './makeData' + +// All important CSS styles are included as inline styles for this example. This is not recommended for your code. +function App() { + const columns = React.useMemo[]>( + () => makeColumns(1_000), + [], + ) + + const [data, setData] = React.useState(() => makeData(1_000, columns)) + + const refreshData = React.useCallback(() => { + setData(makeData(1_000, columns)) + }, [columns]) + + // refresh data every 5 seconds + React.useEffect(() => { + const interval = setInterval(() => { + refreshData() + }, 5000) + return () => clearInterval(interval) + }, [refreshData]) + + // The table does not live in the same scope as the virtualizers + const table = useReactTable({ + data, + columns, + getCoreRowModel: getCoreRowModel(), + getSortedRowModel: getSortedRowModel(), + debugTable: true, + }) + + return ( +
+ {process.env.NODE_ENV === 'development' ? ( +

+ Notice: You are currently running React in + development mode. Virtualized rendering performance will be slightly + degraded until this application is built for production. +

+ ) : null} +
({columns.length.toLocaleString()} columns)
+
({data.length.toLocaleString()} rows)
+ + +
+ ) +} + +interface TableContainerProps { + table: Table +} + +function TableContainer({ table }: TableContainerProps) { + const visibleColumns = table.getVisibleLeafColumns() + + //The virtualizers need to know the scrollable container element + const tableContainerRef = React.useRef(null) + + //we are using a slightly different virtualization strategy for columns (compared to virtual rows) in order to support dynamic row heights + const columnVirtualizer = useVirtualizer< + HTMLDivElement, + HTMLTableCellElement + >({ + count: visibleColumns.length, + estimateSize: (index) => visibleColumns[index].getSize(), //estimate width of each column for accurate scrollbar dragging + getScrollElement: () => tableContainerRef.current, + horizontal: true, + overscan: 3, //how many columns to render on each side off screen each way (adjust this for performance) + onChange: (instance) => { + // requestAnimationFrame(() => { + const virtualColumns = instance.getVirtualItems() + // different virtualization strategy for columns - instead of absolute and translateY, we add empty columns to the left and right + const virtualPaddingLeft = virtualColumns[0]?.start ?? 0 + const virtualPaddingRight = + instance.getTotalSize() - + (virtualColumns[virtualColumns.length - 1]?.end ?? 0) + + tableContainerRef.current?.style.setProperty( + '--virtual-padding-left', + `${virtualPaddingLeft}px`, + ) + tableContainerRef.current?.style.setProperty( + '--virtual-padding-right', + `${virtualPaddingRight}px`, + ) + // }) + }, + }) + + return ( +
+ {/* Even though we're still using sematic table tags, we must use CSS grid and flexbox for dynamic row heights */} +
{header.isPlaceholder ? null : (
{flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
)} @@ -142,17 +142,17 @@ function Table({ ))}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
+ + +
+
+ ) +} + +interface TableHeadProps { + columnVirtualizer: Virtualizer + table: Table +} + +function TableHead({ table, columnVirtualizer }: TableHeadProps) { + return ( +
+ {virtualColumnIndexes.map((virtualColumnIndex) => { + const header = headerGroup.headers[virtualColumnIndex] + return ( + + ) + })} + {/* fake empty column to the right for virtualization scroll padding */} + +
+
+ {flexRender(header.column.columnDef.header, header.getContext())} + {{ + asc: ' 🔼', + desc: ' 🔽', + }[header.column.getIsSorted() as string] ?? null} +
+
+ {virtualColumnIndexes.map((virtualColumnIndex) => { + const cell = visibleCells[virtualColumnIndex] + return ( + + ) + })} + {/* fake empty column to the right for virtualization scroll padding */} + +
+ {flexRender(cell.column.columnDef.cell, cell.getContext())} +
+ + +
+
+ ) +} + +interface TableHeadProps { + columnVirtualizer: Virtualizer + table: Table + virtualPaddingLeft: number | undefined + virtualPaddingRight: number | undefined +} + +function TableHead({ + columnVirtualizer, + table, + virtualPaddingLeft, + virtualPaddingRight, +}: TableHeadProps) { + return ( + + {table.getHeaderGroups().map((headerGroup) => ( + + ))} + + ) +} + +interface TableHeadRowProps { + columnVirtualizer: Virtualizer + headerGroup: HeaderGroup + virtualPaddingLeft: number | undefined + virtualPaddingRight: number | undefined +} + +function TableHeadRow({ + columnVirtualizer, + headerGroup, + virtualPaddingLeft, + virtualPaddingRight, +}: TableHeadRowProps) { + const virtualColumns = columnVirtualizer.getVirtualItems() + return ( + + {virtualPaddingLeft ? ( + //fake empty column to the left for virtualization scroll padding + ) : null} -
({columns.length.toLocaleString()} columns)
-
({data.length.toLocaleString()} rows)
+ {virtualColumns.map((virtualColumn) => { + const header = headerGroup.headers[virtualColumn.index] + return + })} + {virtualPaddingRight ? ( + //fake empty column to the right for virtualization scroll padding + + ) : null} + + ) +} + +interface TableHeadCellProps { + header: Header +} +function TableHeadCell({ header }: TableHeadCellProps) { + return ( +
- {/* Even though we're still using sematic table tags, we must use CSS grid and flexbox for dynamic row heights */} - - - {table.getHeaderGroups().map(headerGroup => ( - - {virtualPaddingLeft ? ( - //fake empty column to the left for virtualization scroll padding - - ) - })} - {virtualPaddingRight ? ( - //fake empty column to the right for virtualization scroll padding - - ))} - - - {virtualRows.map(virtualRow => { - const row = rows[virtualRow.index] as Row - const visibleCells = row.getVisibleCells() - - return ( - rowVirtualizer.measureElement(node)} //measure dynamic row height - key={row.id} - style={{ - display: 'flex', - position: 'absolute', - transform: `translateY(${virtualRow.start}px)`, //this should always be a `style` as it changes on scroll - width: '100%', - }} - > - {virtualPaddingLeft ? ( - //fake empty column to the left for virtualization scroll padding - - ) - })} - {virtualPaddingRight ? ( - //fake empty column to the right for virtualization scroll padding - - ) - })} - -
- ) : null} - {virtualColumns.map(vc => { - const header = headerGroup.headers[vc.index] - return ( - -
- {flexRender( - header.column.columnDef.header, - header.getContext() - )} - {{ - asc: ' 🔼', - desc: ' 🔽', - }[header.column.getIsSorted() as string] ?? null} -
-
- ) : null} -
- ) : null} - {virtualColumns.map(vc => { - const cell = visibleCells[vc.index] - return ( - - {flexRender( - cell.column.columnDef.cell, - cell.getContext() - )} - - ) : null} -
+ {flexRender(header.column.columnDef.header, header.getContext())} + {{ + asc: ' 🔼', + desc: ' 🔽', + }[header.column.getIsSorted() as string] ?? null}
- + + ) +} + +interface TableBodyProps { + columnVirtualizer: Virtualizer + table: Table + tableContainerRef: React.RefObject + virtualPaddingLeft: number | undefined + virtualPaddingRight: number | undefined +} + +function TableBody({ + columnVirtualizer, + table, + tableContainerRef, + virtualPaddingLeft, + virtualPaddingRight, +}: TableBodyProps) { + const { rows } = table.getRowModel() + + //dynamic row height virtualization - alternatively you could use a simpler fixed row height strategy without the need for `measureElement` + const rowVirtualizer = useVirtualizer({ + count: rows.length, + estimateSize: () => 33, //estimate row height for accurate scrollbar dragging + getScrollElement: () => tableContainerRef.current, + //measure dynamic row height, except in firefox because it measures table border height incorrectly + measureElement: + typeof window !== 'undefined' && + navigator.userAgent.indexOf('Firefox') === -1 + ? (element) => element?.getBoundingClientRect().height + : undefined, + overscan: 5, + }) + + const virtualRows = rowVirtualizer.getVirtualItems() + + return ( + + {virtualRows.map((virtualRow) => { + const row = rows[virtualRow.index] as Row + + return ( + + ) + })} + + ) +} + +interface TableBodyRowProps { + columnVirtualizer: Virtualizer + row: Row + rowVirtualizer: Virtualizer + virtualPaddingLeft: number | undefined + virtualPaddingRight: number | undefined + virtualRow: VirtualItem +} + +function TableBodyRow({ + columnVirtualizer, + row, + rowVirtualizer, + virtualPaddingLeft, + virtualPaddingRight, + virtualRow, +}: TableBodyRowProps) { + const visibleCells = row.getVisibleCells() + const virtualColumns = columnVirtualizer.getVirtualItems() + return ( + rowVirtualizer.measureElement(node)} //measure dynamic row height + key={row.id} + style={{ + display: 'flex', + position: 'absolute', + transform: `translateY(${virtualRow.start}px)`, //this should always be a `style` as it changes on scroll + width: '100%', + }} + > + {virtualPaddingLeft ? ( + //fake empty column to the left for virtualization scroll padding + + ) : null} + {virtualColumns.map((vc) => { + const cell = visibleCells[vc.index] + return + })} + {virtualPaddingRight ? ( + //fake empty column to the right for virtualization scroll padding + + ) : null} + + ) +} + +interface TableBodyCellProps { + cell: Cell +} + +function TableBodyCell({ cell }: TableBodyCellProps) { + return ( + + {flexRender(cell.column.columnDef.cell, cell.getContext())} + ) } @@ -223,5 +353,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/virtualized-columns/src/makeData.ts b/examples/react/virtualized-columns/src/makeData.ts index 3fde072d12..2d45800b12 100644 --- a/examples/react/virtualized-columns/src/makeData.ts +++ b/examples/react/virtualized-columns/src/makeData.ts @@ -1,6 +1,6 @@ import { faker } from '@faker-js/faker' -export const makeColumns = num => +export const makeColumns = (num) => [...Array(num)].map((_, i) => { return { accessorKey: i.toString(), @@ -12,7 +12,7 @@ export const makeColumns = num => export const makeData = (num, columns) => [...Array(num)].map(() => ({ ...Object.fromEntries( - columns.map(col => [col.accessorKey, faker.person.firstName()]) + columns.map((col) => [col.accessorKey, faker.person.firstName()]), ), })) diff --git a/examples/react/virtualized-infinite-scrolling/package.json b/examples/react/virtualized-infinite-scrolling/package.json index 7250cfe972..9089a5d894 100644 --- a/examples/react/virtualized-infinite-scrolling/package.json +++ b/examples/react/virtualized-infinite-scrolling/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-virtualized-infinite-scrolling", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -11,8 +10,8 @@ "dependencies": { "@faker-js/faker": "^8.4.1", "@tanstack/react-query": "^5.49.0", - "@tanstack/react-table": "^8.20.6", - "@tanstack/react-virtual": "^3.8.1", + "@tanstack/react-table": "^8.21.3", + "@tanstack/react-virtual": "^3.12.0", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/virtualized-infinite-scrolling/src/main.tsx b/examples/react/virtualized-infinite-scrolling/src/main.tsx index 2042e8e38e..42e8d52e49 100644 --- a/examples/react/virtualized-infinite-scrolling/src/main.tsx +++ b/examples/react/virtualized-infinite-scrolling/src/main.tsx @@ -41,12 +41,12 @@ function App() { }, { 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, }, { @@ -71,11 +71,11 @@ function App() { { accessorKey: 'createdAt', header: 'Created At', - cell: info => info.getValue().toLocaleString(), + cell: (info) => info.getValue().toLocaleString(), size: 200, }, ], - [] + [], ) //react-query has a useInfiniteQuery hook that is perfect for this use case @@ -98,8 +98,8 @@ function App() { //flatten the array of arrays from the useInfiniteQuery hook const flatData = React.useMemo( - () => data?.pages?.flatMap(page => page.data) ?? [], - [data] + () => data?.pages?.flatMap((page) => page.data) ?? [], + [data], ) const totalDBRowCount = data?.pages?.[0]?.meta?.totalRowCount ?? 0 const totalFetched = flatData.length @@ -119,7 +119,7 @@ function App() { } } }, - [fetchNextPage, isFetching, totalFetched, totalDBRowCount] + [fetchNextPage, isFetching, totalFetched, totalDBRowCount], ) //a check on mount and after a fetch to see if the table is already scrolled to the bottom and immediately needs to fetch more data @@ -140,7 +140,7 @@ function App() { }) //scroll to top of table when sorting changes - const handleSortingChange: OnChangeFn = updater => { + const handleSortingChange: OnChangeFn = (updater) => { setSorting(updater) if (!!table.getRowModel().rows.length) { rowVirtualizer.scrollToIndex?.(0) @@ -148,7 +148,7 @@ function App() { } //since this table option is derived from table row model state, we're using the table.setOptions utility - table.setOptions(prev => ({ + table.setOptions((prev) => ({ ...prev, onSortingChange: handleSortingChange, })) @@ -163,7 +163,7 @@ function App() { measureElement: typeof window !== 'undefined' && navigator.userAgent.indexOf('Firefox') === -1 - ? element => element?.getBoundingClientRect().height + ? (element) => element?.getBoundingClientRect().height : undefined, overscan: 5, }) @@ -184,7 +184,7 @@ function App() { ({flatData.length} of {totalDBRowCount} rows fetched)
fetchMoreOnBottomReached(e.currentTarget)} + onScroll={(e) => fetchMoreOnBottomReached(e.currentTarget)} ref={tableContainerRef} style={{ overflow: 'auto', //our scrollable table container @@ -202,12 +202,12 @@ function App() { zIndex: 1, }} > - {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -246,12 +246,12 @@ function App() { position: 'relative', //needed for absolute positioning of rows }} > - {rowVirtualizer.getVirtualItems().map(virtualRow => { + {rowVirtualizer.getVirtualItems().map((virtualRow) => { const row = rows[virtualRow.index] as Row return ( rowVirtualizer.measureElement(node)} //measure dynamic row height + ref={(node) => rowVirtualizer.measureElement(node)} //measure dynamic row height key={row.id} style={{ display: 'flex', @@ -260,7 +260,7 @@ function App() { width: '100%', }} > - {row.getVisibleCells().map(cell => { + {row.getVisibleCells().map((cell) => { return ( {flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )} ) @@ -298,5 +298,5 @@ ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/react/virtualized-infinite-scrolling/src/makeData.ts b/examples/react/virtualized-infinite-scrolling/src/makeData.ts index 57ed8a1071..fb8292e642 100644 --- a/examples/react/virtualized-infinite-scrolling/src/makeData.ts +++ b/examples/react/virtualized-infinite-scrolling/src/makeData.ts @@ -63,7 +63,7 @@ const data = makeData(1000) export const fetchData = async ( start: number, size: number, - sorting: SortingState + sorting: SortingState, ) => { const dbData = [...data] if (sorting.length) { @@ -78,7 +78,7 @@ export const fetchData = async ( } //simulate a backend api - await new Promise(resolve => setTimeout(resolve, 200)) + await new Promise((resolve) => setTimeout(resolve, 200)) return { data: dbData.slice(start, start + size), diff --git a/examples/react/virtualized-rows-experimental/.gitignore b/examples/react/virtualized-rows-experimental/.gitignore new file mode 100644 index 0000000000..d451ff16c1 --- /dev/null +++ b/examples/react/virtualized-rows-experimental/.gitignore @@ -0,0 +1,5 @@ +node_modules +.DS_Store +dist +dist-ssr +*.local diff --git a/examples/react/virtualized-rows-experimental/README.md b/examples/react/virtualized-rows-experimental/README.md new file mode 100644 index 0000000000..b168d3c4b1 --- /dev/null +++ b/examples/react/virtualized-rows-experimental/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run start` or `yarn start` diff --git a/examples/react/virtualized-rows-experimental/index.html b/examples/react/virtualized-rows-experimental/index.html new file mode 100644 index 0000000000..fa04f89341 --- /dev/null +++ b/examples/react/virtualized-rows-experimental/index.html @@ -0,0 +1,14 @@ + + + + + + Vite App + + + +
+ + + + diff --git a/examples/react/virtualized-rows-experimental/package.json b/examples/react/virtualized-rows-experimental/package.json new file mode 100644 index 0000000000..e5ba63df43 --- /dev/null +++ b/examples/react/virtualized-rows-experimental/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-virtualized-rows-experimental", + "private": true, + "scripts": { + "dev": "vite", + "build": "vite build", + "serve": "vite preview", + "start": "vite" + }, + "dependencies": { + "@faker-js/faker": "^8.4.1", + "@tanstack/react-table": "^8.21.3", + "@tanstack/react-virtual": "^3.12.0", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@rollup/plugin-replace": "^5.0.7", + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "^4.3.1", + "typescript": "5.4.5", + "vite": "^5.3.2" + } +} diff --git a/examples/react/virtualized-rows-experimental/src/index.css b/examples/react/virtualized-rows-experimental/src/index.css new file mode 100644 index 0000000000..6402cb4b8b --- /dev/null +++ b/examples/react/virtualized-rows-experimental/src/index.css @@ -0,0 +1,40 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border-collapse: collapse; + border-spacing: 0; + font-family: arial, sans-serif; + table-layout: fixed; +} + +thead { + background: lightgray; +} + +tr { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; + text-align: left; +} + +td { + padding: 6px; +} + +.container { + border: 1px solid lightgray; + margin: 1rem auto; +} + +.app { + margin: 1rem auto; + text-align: center; +} diff --git a/examples/react/virtualized-rows-experimental/src/main.tsx b/examples/react/virtualized-rows-experimental/src/main.tsx new file mode 100644 index 0000000000..216917db90 --- /dev/null +++ b/examples/react/virtualized-rows-experimental/src/main.tsx @@ -0,0 +1,309 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' + +import './index.css' + +import { + flexRender, + getCoreRowModel, + getSortedRowModel, + useReactTable, +} from '@tanstack/react-table' +import { useVirtualizer } from '@tanstack/react-virtual' +import { makeData } from './makeData' +import type { ColumnDef, Row, Table } from '@tanstack/react-table' +import type { Virtualizer } from '@tanstack/react-virtual' +import type { Person } from './makeData' + +// This is a dynamic row height example, which is more complicated, but allows for a more realistic table. +// See https://tanstack.com/virtual/v3/docs/examples/react/table for a simpler fixed row height example. +function App() { + const columns = React.useMemo>>( + () => [ + { + accessorKey: 'id', + header: 'ID', + size: 60, + }, + { + accessorKey: 'firstName', + cell: (info) => info.getValue(), + }, + { + accessorFn: (row) => row.lastName, + id: 'lastName', + cell: (info) => info.getValue(), + header: () => Last Name, + }, + { + accessorKey: 'age', + header: () => 'Age', + size: 50, + }, + { + accessorKey: 'visits', + header: () => Visits, + size: 50, + }, + { + accessorKey: 'status', + header: 'Status', + }, + { + accessorKey: 'progress', + header: 'Profile Progress', + size: 80, + }, + { + accessorKey: 'createdAt', + header: 'Created At', + cell: (info) => info.getValue().toLocaleString(), + size: 250, + }, + ], + [], + ) + + const [data, _setData] = React.useState(() => makeData(50_000)) + + const refreshData = React.useCallback(() => { + _setData(makeData(50_000)) + }, []) + + // refresh data every 5 seconds + React.useEffect(() => { + const interval = setInterval(() => { + refreshData() + }, 5000) + return () => clearInterval(interval) + }, [refreshData]) + + const table = useReactTable({ + data, + columns, + getCoreRowModel: getCoreRowModel(), + getSortedRowModel: getSortedRowModel(), + debugTable: true, + }) + + // The virtualizer needs to know the scrollable container element + const tableContainerRef = React.useRef(null) + + // All important CSS styles are included as inline styles for this example. This is not recommended for your code. + return ( +
+ {process.env.NODE_ENV === 'development' ? ( +

+ Notice: You are currently running React in + development mode. Virtualized rendering performance will be slightly + degraded until this application is built for production. +

+ ) : null} + ({data.length} rows) + +
+ {/* Even though we're still using sematic table tags, we must use CSS grid and flexbox for dynamic row heights */} + + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((header) => { + return ( + + ) + })} + + ))} + + +
+
+ {flexRender( + header.column.columnDef.header, + header.getContext(), + )} + {{ + asc: ' 🔼', + desc: ' 🔽', + }[header.column.getIsSorted() as string] ?? null} +
+
+
+
+ ) +} + +interface TableBodyWrapperProps { + table: Table + tableContainerRef: React.RefObject +} + +function TableBodyWrapper({ table, tableContainerRef }: TableBodyWrapperProps) { + const rowRefsMap = React.useRef>(new Map()) + + const { rows } = table.getRowModel() + + const rowVirtualizer = useVirtualizer({ + count: rows.length, + estimateSize: () => 33, // estimate row height for accurate scrollbar dragging + getScrollElement: () => tableContainerRef.current, + // measure dynamic row height, except in firefox because it measures table border height incorrectly + measureElement: + typeof window !== 'undefined' && + navigator.userAgent.indexOf('Firefox') === -1 + ? (element) => element?.getBoundingClientRect().height + : undefined, + overscan: 5, + onChange: (instance) => { + // requestAnimationFrame(() => { + instance.getVirtualItems().forEach((virtualRow) => { + const rowRef = rowRefsMap.current.get(virtualRow.index) + if (!rowRef) return + rowRef.style.transform = `translateY(${virtualRow.start}px)` + }) + // }) + }, + }) + + React.useLayoutEffect(() => { + rowVirtualizer.measure() + }, [table.getState()]) + + return ( + + ) +} + +interface TableBodyProps { + table: Table + rowVirtualizer: Virtualizer + rowRefsMap: React.MutableRefObject> +} + +function TableBody({ rowVirtualizer, table, rowRefsMap }: TableBodyProps) { + const { rows } = table.getRowModel() + const virtualRowIndexes = rowVirtualizer.getVirtualIndexes() + + return ( + + {virtualRowIndexes.map((virtualRowIndex) => { + const row = rows[virtualRowIndex] + return ( + + ) + })} + + ) +} + +interface TableBodyRowProps { + row: Row + rowRefsMap: React.MutableRefObject> + rowVirtualizer: Virtualizer + virtualRowIndex: number +} + +function TableBodyRow({ + row, + rowRefsMap, + rowVirtualizer, + virtualRowIndex, +}: TableBodyRowProps) { + return ( + { + if (node && typeof virtualRowIndex !== 'undefined') { + rowVirtualizer.measureElement(node) // measure dynamic row height + rowRefsMap.current.set(virtualRowIndex, node) // store ref for virtualizer to apply scrolling transforms + } + }} + key={row.id} + style={{ + display: 'flex', + position: 'absolute', + width: '100%', + }} + > + {row.getVisibleCells().map((cell) => { + return ( + + {flexRender(cell.column.columnDef.cell, cell.getContext())} + + ) + })} + + ) +} + +// test out when rows don't re-render at all (future TanStack Virtual release can make this unnecessary) +const TableBodyRowMemo = React.memo( + TableBodyRow, + (_prev, next) => next.rowVirtualizer.isScrolling, +) as typeof TableBodyRow + +const rootElement = document.getElementById('root') + +if (!rootElement) throw new Error('Failed to find the root element') + +ReactDOM.createRoot(rootElement).render( + + + , +) diff --git a/examples/react/virtualized-rows-experimental/src/makeData.ts b/examples/react/virtualized-rows-experimental/src/makeData.ts new file mode 100644 index 0000000000..e5695467f5 --- /dev/null +++ b/examples/react/virtualized-rows-experimental/src/makeData.ts @@ -0,0 +1,50 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + id: number + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + createdAt: Date +} + +const range = (len: number) => { + const arr: number[] = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (index: number): Person => { + return { + id: index + 1, + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + createdAt: faker.date.anytime(), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, + } +} + +export function makeData(...lens: number[]) { + const makeDataLevel = (depth = 0): Person[] => { + const len = lens[depth]! + return range(len).map((d): Person => { + return { + ...newPerson(d), + } + }) + } + + return makeDataLevel() +} diff --git a/examples/react/virtualized-rows-experimental/tsconfig.json b/examples/react/virtualized-rows-experimental/tsconfig.json new file mode 100644 index 0000000000..6d545f543f --- /dev/null +++ b/examples/react/virtualized-rows-experimental/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/examples/react/virtualized-rows-experimental/vite.config.js b/examples/react/virtualized-rows-experimental/vite.config.js new file mode 100644 index 0000000000..2e1361723a --- /dev/null +++ b/examples/react/virtualized-rows-experimental/vite.config.js @@ -0,0 +1,17 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import rollupReplace from '@rollup/plugin-replace' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + rollupReplace({ + preventAssignment: true, + values: { + __DEV__: JSON.stringify(true), + 'process.env.NODE_ENV': JSON.stringify('development'), + }, + }), + react(), + ], +}) diff --git a/examples/react/virtualized-rows/index.html b/examples/react/virtualized-rows/index.html index 3fc40c9367..fa04f89341 100644 --- a/examples/react/virtualized-rows/index.html +++ b/examples/react/virtualized-rows/index.html @@ -8,6 +8,7 @@
+ diff --git a/examples/react/virtualized-rows/package.json b/examples/react/virtualized-rows/package.json index 9cf6df0b17..02113d1376 100644 --- a/examples/react/virtualized-rows/package.json +++ b/examples/react/virtualized-rows/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-virtualized-rows", - "version": "0.0.0", "private": true, "scripts": { "dev": "vite", @@ -10,8 +9,8 @@ }, "dependencies": { "@faker-js/faker": "^8.4.1", - "@tanstack/react-table": "^8.20.6", - "@tanstack/react-virtual": "^3.8.1", + "@tanstack/react-table": "^8.21.3", + "@tanstack/react-virtual": "^3.12.0", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/examples/react/virtualized-rows/src/main.tsx b/examples/react/virtualized-rows/src/main.tsx index 630f3775de..66b9c5206e 100644 --- a/examples/react/virtualized-rows/src/main.tsx +++ b/examples/react/virtualized-rows/src/main.tsx @@ -9,11 +9,14 @@ import { getCoreRowModel, getSortedRowModel, Row, + Table, useReactTable, } from '@tanstack/react-table' - -import { useVirtualizer } from '@tanstack/react-virtual' - +import { + useVirtualizer, + VirtualItem, + Virtualizer, +} from '@tanstack/react-virtual' import { makeData, Person } from './makeData' //This is a dynamic row height example, which is more complicated, but allows for a more realistic table. @@ -28,12 +31,12 @@ function App() { }, { 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, }, { @@ -58,14 +61,21 @@ function App() { { accessorKey: 'createdAt', header: 'Created At', - cell: info => info.getValue().toLocaleString(), + cell: (info) => info.getValue().toLocaleString(), size: 250, }, ], - [] + [], ) - const [data, _setData] = React.useState(() => makeData(50_000)) + // The virtualizer will need a reference to the scrollable container element + const tableContainerRef = React.useRef(null) + + const [data, setData] = React.useState(() => makeData(50_000)) + + const refreshData = React.useCallback(() => { + setData(makeData(50_000)) + }, []) const table = useReactTable({ data, @@ -75,25 +85,7 @@ function App() { debugTable: true, }) - const { rows } = table.getRowModel() - - //The virtualizer needs to know the scrollable container element - const tableContainerRef = React.useRef(null) - - const rowVirtualizer = useVirtualizer({ - count: rows.length, - estimateSize: () => 33, //estimate row height for accurate scrollbar dragging - getScrollElement: () => tableContainerRef.current, - //measure dynamic row height, except in firefox because it measures table border height incorrectly - measureElement: - typeof window !== 'undefined' && - navigator.userAgent.indexOf('Firefox') === -1 - ? element => element?.getBoundingClientRect().height - : undefined, - overscan: 5, - }) - - //All important CSS styles are included as inline styles for this example. This is not recommended for your code. + // All important CSS styles are included as inline styles for this example. This is not recommended for your code. return (
{process.env.NODE_ENV === 'development' ? ( @@ -104,6 +96,7 @@ function App() {

) : null} ({data.length} rows) +
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => { + {headerGroup.headers.map((header) => { return ( {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -160,53 +153,94 @@ function App() { ))} - - {rowVirtualizer.getVirtualItems().map(virtualRow => { - const row = rows[virtualRow.index] as Row - return ( - rowVirtualizer.measureElement(node)} //measure dynamic row height - key={row.id} - style={{ - display: 'flex', - position: 'absolute', - transform: `translateY(${virtualRow.start}px)`, //this should always be a `style` as it changes on scroll - width: '100%', - }} - > - {row.getVisibleCells().map(cell => { - return ( - - {flexRender( - cell.column.columnDef.cell, - cell.getContext() - )} - - ) - })} - - ) - })} - +
) } +interface TableBodyProps { + table: Table + tableContainerRef: React.RefObject +} + +function TableBody({ table, tableContainerRef }: TableBodyProps) { + const { rows } = table.getRowModel() + + // Important: Keep the row virtualizer in the lowest component possible to avoid unnecessary re-renders. + const rowVirtualizer = useVirtualizer({ + count: rows.length, + estimateSize: () => 33, //estimate row height for accurate scrollbar dragging + getScrollElement: () => tableContainerRef.current, + //measure dynamic row height, except in firefox because it measures table border height incorrectly + measureElement: + typeof window !== 'undefined' && + navigator.userAgent.indexOf('Firefox') === -1 + ? (element) => element?.getBoundingClientRect().height + : undefined, + overscan: 5, + }) + + return ( + + {rowVirtualizer.getVirtualItems().map((virtualRow) => { + const row = rows[virtualRow.index] as Row + return ( + + ) + })} + + ) +} + +interface TableBodyRowProps { + row: Row + virtualRow: VirtualItem + rowVirtualizer: Virtualizer +} + +function TableBodyRow({ row, virtualRow, rowVirtualizer }: TableBodyRowProps) { + return ( + rowVirtualizer.measureElement(node)} //measure dynamic row height + key={row.id} + style={{ + display: 'flex', + position: 'absolute', + transform: `translateY(${virtualRow.start}px)`, //this should always be a `style` as it changes on scroll + width: '100%', + }} + > + {row.getVisibleCells().map((cell) => { + return ( + + {flexRender(cell.column.columnDef.cell, cell.getContext())} + + ) + })} + + ) +} + const rootElement = document.getElementById('root') if (!rootElement) throw new Error('Failed to find the root element') @@ -214,5 +248,5 @@ if (!rootElement) throw new Error('Failed to find the root element') ReactDOM.createRoot(rootElement).render( - + , ) diff --git a/examples/solid/basic/package.json b/examples/solid/basic/package.json index 50b6f96808..bd5fca9ff7 100644 --- a/examples/solid/basic/package.json +++ b/examples/solid/basic/package.json @@ -1,7 +1,6 @@ { "name": "tanstack-table-example-solid-basic", - "version": "0.0.0", - "description": "", + "private": true, "scripts": { "start": "vite", "dev": "vite", @@ -15,7 +14,7 @@ "vite-plugin-solid": "^2.10.2" }, "dependencies": { - "@tanstack/solid-table": "^8.20.5", + "@tanstack/solid-table": "^8.21.3", "solid-js": "^1.8.18" } } diff --git a/examples/solid/basic/src/App.tsx b/examples/solid/basic/src/App.tsx index 8a988dcfc0..9d91d1ceb2 100644 --- a/examples/solid/basic/src/App.tsx +++ b/examples/solid/basic/src/App.tsx @@ -45,35 +45,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, }, ] @@ -94,16 +94,16 @@ function App() { - {headerGroup => ( + {(headerGroup) => ( - {header => ( + {(header) => ( )} @@ -114,14 +114,14 @@ function App() { - {row => ( + {(row) => ( - {cell => ( + {(cell) => ( )} @@ -132,16 +132,16 @@ function App() { - {footerGroup => ( + {(footerGroup) => ( - {header => ( + {(header) => ( )} diff --git a/examples/solid/bootstrap/package.json b/examples/solid/bootstrap/package.json index db906986a7..6f31a991ff 100644 --- a/examples/solid/bootstrap/package.json +++ b/examples/solid/bootstrap/package.json @@ -1,7 +1,6 @@ { "name": "tanstack-table-example-solid-bootstrap", - "version": "0.0.0", - "description": "", + "private": true, "scripts": { "start": "vite", "dev": "vite", @@ -16,7 +15,7 @@ "vite-plugin-solid": "^2.10.2" }, "dependencies": { - "@tanstack/solid-table": "^8.20.5", + "@tanstack/solid-table": "^8.21.3", "bootstrap": "^5.3.3", "solid-bootstrap": "^1.0.20", "solid-js": "^1.8.18" diff --git a/examples/solid/bootstrap/src/App.tsx b/examples/solid/bootstrap/src/App.tsx index 781adc6daa..9a823628c6 100644 --- a/examples/solid/bootstrap/src/App.tsx +++ b/examples/solid/bootstrap/src/App.tsx @@ -13,30 +13,30 @@ import 'bootstrap/dist/css/bootstrap.min.css' const columns: 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', @@ -44,17 +44,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, }, ], }, @@ -79,16 +79,16 @@ function App() { - {headerGroup => ( + {(headerGroup) => ( - {header => ( + {(header) => ( )} @@ -99,14 +99,14 @@ function App() { - {row => ( + {(row) => ( - {cell => ( + {(cell) => ( )} @@ -117,16 +117,16 @@ function App() { - {footerGroup => ( + {(footerGroup) => ( - {header => ( + {(header) => ( )} diff --git a/examples/solid/column-groups/package.json b/examples/solid/column-groups/package.json index 949e395816..8409c26ea3 100644 --- a/examples/solid/column-groups/package.json +++ b/examples/solid/column-groups/package.json @@ -1,7 +1,6 @@ { "name": "tanstack-table-example-solid-column-groups", - "version": "0.0.0", - "description": "", + "private": true, "scripts": { "start": "vite", "dev": "vite", @@ -15,7 +14,7 @@ "vite-plugin-solid": "^2.10.2" }, "dependencies": { - "@tanstack/solid-table": "^8.20.5", + "@tanstack/solid-table": "^8.21.3", "solid-js": "^1.8.18" } } diff --git a/examples/solid/column-groups/src/App.tsx b/examples/solid/column-groups/src/App.tsx index 27e9526967..2b1c8dbd07 100644 --- a/examples/solid/column-groups/src/App.tsx +++ b/examples/solid/column-groups/src/App.tsx @@ -45,30 +45,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', @@ -76,17 +76,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, }, ], }, @@ -111,16 +111,16 @@ function App() {
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
- {headerGroup => ( + {(headerGroup) => ( - {header => ( + {(header) => ( )} @@ -131,14 +131,14 @@ function App() { - {row => ( + {(row) => ( - {cell => ( + {(cell) => ( )} @@ -149,16 +149,16 @@ function App() { - {footerGroup => ( + {(footerGroup) => ( - {header => ( + {(header) => ( )} diff --git a/examples/solid/column-ordering/package.json b/examples/solid/column-ordering/package.json index 57fd6558ea..247ef7986b 100644 --- a/examples/solid/column-ordering/package.json +++ b/examples/solid/column-ordering/package.json @@ -1,7 +1,6 @@ { "name": "tanstack-table-example-solid-column-ordering", - "version": "0.0.0", - "description": "", + "private": true, "scripts": { "start": "vite", "dev": "vite", @@ -16,7 +15,7 @@ "vite-plugin-solid": "^2.10.2" }, "dependencies": { - "@tanstack/solid-table": "^8.20.5", + "@tanstack/solid-table": "^8.21.3", "solid-js": "^1.8.18" } } diff --git a/examples/solid/column-ordering/src/App.tsx b/examples/solid/column-ordering/src/App.tsx index f09d5a9ee0..0905c98018 100644 --- a/examples/solid/column-ordering/src/App.tsx +++ b/examples/solid/column-ordering/src/App.tsx @@ -13,30 +13,30 @@ import { 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', @@ -44,17 +44,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, }, ], }, @@ -66,7 +66,7 @@ function App() { const [data, setData] = createSignal(makeData(20)) const [columnOrder, setColumnOrder] = createSignal([]) const [columnVisibility, setColumnVisibility] = createSignal( - {} + {}, ) const rerender = () => setData(() => makeData(20)) @@ -90,7 +90,7 @@ function App() { const randomizeColumns = () => { table.setColumnOrder( - faker.helpers.shuffle(table.getAllLeafColumns().map(d => d.id)) + faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)), ) } @@ -108,7 +108,7 @@ function App() { - {column => ( + {(column) => (
- {headerGroup => ( + {(headerGroup) => ( - {header => ( + {(header) => ( @@ -155,14 +155,14 @@ function App() { - {row => ( + {(row) => ( - {cell => ( + {(cell) => ( )} @@ -173,15 +173,15 @@ function App() { - {footerGroup => ( + {(footerGroup) => ( - {header => ( + {(header) => ( diff --git a/examples/solid/column-visibility/package.json b/examples/solid/column-visibility/package.json index 5ef2480071..827d94dc9b 100644 --- a/examples/solid/column-visibility/package.json +++ b/examples/solid/column-visibility/package.json @@ -1,7 +1,6 @@ { "name": "tanstack-table-example-solid-column-visibility", - "version": "0.0.0", - "description": "", + "private": true, "scripts": { "start": "vite", "dev": "vite", @@ -15,7 +14,7 @@ "vite-plugin-solid": "^2.10.2" }, "dependencies": { - "@tanstack/solid-table": "^8.20.5", + "@tanstack/solid-table": "^8.21.3", "solid-js": "^1.8.18" } } diff --git a/examples/solid/column-visibility/src/App.tsx b/examples/solid/column-visibility/src/App.tsx index d972aabdd4..95ccc6db6c 100644 --- a/examples/solid/column-visibility/src/App.tsx +++ b/examples/solid/column-visibility/src/App.tsx @@ -46,30 +46,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', @@ -77,17 +77,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, }, ], }, @@ -98,7 +98,7 @@ const defaultColumns: ColumnDef[] = [ function App() { const [data, setData] = createSignal(defaultData) const [columnVisibility, setColumnVisibility] = createSignal( - {} + {}, ) const rerender = () => setData(defaultData) @@ -130,7 +130,7 @@ function App() { - {column => ( + {(column) => (
- {headerGroup => ( + {(headerGroup) => ( - {header => ( + {(header) => ( @@ -168,14 +168,14 @@ function App() { - {row => ( + {(row) => ( - {cell => ( + {(cell) => ( )} @@ -186,15 +186,15 @@ function App() { - {footerGroup => ( + {(footerGroup) => ( - {header => ( + {(header) => ( diff --git a/examples/solid/filters/package.json b/examples/solid/filters/package.json index fe71bc1d18..9998cb9ccb 100644 --- a/examples/solid/filters/package.json +++ b/examples/solid/filters/package.json @@ -1,7 +1,6 @@ { "name": "tanstack-table-example-solid-filters", - "version": "0.0.0", - "description": "", + "private": true, "scripts": { "start": "vite", "dev": "vite", @@ -17,7 +16,7 @@ }, "dependencies": { "@solid-primitives/scheduled": "^1.4.3", - "@tanstack/solid-table": "^8.20.5", + "@tanstack/solid-table": "^8.21.3", "solid-js": "^1.8.18" } } diff --git a/examples/solid/filters/src/App.tsx b/examples/solid/filters/src/App.tsx index c9c8989657..14fa710843 100644 --- a/examples/solid/filters/src/App.tsx +++ b/examples/solid/filters/src/App.tsx @@ -17,30 +17,30 @@ import { createSignal, For } from 'solid-js' const columns: 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', @@ -48,17 +48,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, }, ], }, @@ -72,7 +72,7 @@ function App() { const [globalFilter, setGlobalFilter] = createSignal('') const debounceSetGlobalFilter = debounce( (value: string) => setGlobalFilter(value), - 500 + 500, ) const refreshData = () => setData(makeData(50000)) @@ -107,23 +107,23 @@ function App() { debounceSetGlobalFilter(e.currentTarget.value)} + onInput={(e) => debounceSetGlobalFilter(e.currentTarget.value)} placeholder="Search all columns..." />
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
{flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
{flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
{flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
{flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
- {headerGroup => ( + {(headerGroup) => ( - {header => ( + {(header) => ( - {row => ( + {(row) => ( - {cell => ( + {(cell) => ( )} diff --git a/examples/solid/filters/src/ColumnFilter.tsx b/examples/solid/filters/src/ColumnFilter.tsx index 92891e148e..d4919975bd 100644 --- a/examples/solid/filters/src/ColumnFilter.tsx +++ b/examples/solid/filters/src/ColumnFilter.tsx @@ -15,7 +15,7 @@ function ColumnFilter(props: { const sortedUniqueValues = createMemo(() => typeof firstValue === 'number' ? [] - : Array.from(props.column.getFacetedUniqueValues().keys()).sort() + : Array.from(props.column.getFacetedUniqueValues().keys()).sort(), ) return ( @@ -32,8 +32,8 @@ function ColumnFilter(props: { type="text" value={(columnFilterValue() ?? '') as string} onInput={debounce( - e => props.column.setFilterValue(e.target.value), - 500 + (e) => props.column.setFilterValue(e.target.value), + 500, )} placeholder={`Search... (${props.column.getFacetedUniqueValues().size})`} class="w-36 border shadow rounded" @@ -50,12 +50,12 @@ function ColumnFilter(props: { max={Number(props.column.getFacetedMinMaxValues()?.[1] ?? '')} value={(columnFilterValue() as [number, number])?.[0] ?? ''} onInput={debounce( - e => + (e) => props.column.setFilterValue((old: [number, number]) => [ e.target.value, old?.[1], ]), - 500 + 500, )} placeholder={`Min ${ props.column.getFacetedMinMaxValues()?.[0] @@ -70,12 +70,12 @@ function ColumnFilter(props: { max={Number(props.column.getFacetedMinMaxValues()?.[1] ?? '')} value={(columnFilterValue() as [number, number])?.[1] ?? ''} onInput={debounce( - e => + (e) => props.column.setFilterValue((old: [number, number]) => [ old?.[0], e.target.value, ]), - 500 + 500, )} placeholder={`Max ${ props.column.getFacetedMinMaxValues()?.[1] diff --git a/examples/solid/sorting/package.json b/examples/solid/sorting/package.json index 2396f9b7c3..feb0029b4b 100644 --- a/examples/solid/sorting/package.json +++ b/examples/solid/sorting/package.json @@ -1,7 +1,6 @@ { "name": "tanstack-table-example-solid-sorting", - "version": "0.0.0", - "description": "", + "private": true, "scripts": { "start": "vite", "dev": "vite", @@ -16,7 +15,7 @@ "vite-plugin-solid": "^2.10.2" }, "dependencies": { - "@tanstack/solid-table": "^8.20.5", + "@tanstack/solid-table": "^8.21.3", "solid-js": "^1.8.18" } } diff --git a/examples/solid/sorting/src/App.tsx b/examples/solid/sorting/src/App.tsx index 8b73cc3ad8..a7c65274e5 100644 --- a/examples/solid/sorting/src/App.tsx +++ b/examples/solid/sorting/src/App.tsx @@ -17,30 +17,30 @@ function App() { const columns: 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', @@ -48,17 +48,17 @@ function App() { { 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,10 +87,10 @@ function App() {
{header.isPlaceholder ? null : ( <> {flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {header.column.getCanFilter() ? (
@@ -144,14 +144,14 @@ function App() {
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
- {headerGroup => ( + {(headerGroup) => ( - {header => ( + {(header) => ( - {row => ( + {(row) => ( - {cell => ( + {(cell) => ( )} diff --git a/examples/svelte/basic/package.json b/examples/svelte/basic/package.json index 4db5ed4221..bd2519b246 100644 --- a/examples/svelte/basic/package.json +++ b/examples/svelte/basic/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-svelte-basic", - "version": "0.0.0", "private": true, "type": "module", "scripts": { @@ -12,7 +11,7 @@ "devDependencies": { "@rollup/plugin-replace": "^5.0.7", "@sveltejs/vite-plugin-svelte": "^3.1.1", - "@tanstack/svelte-table": "^8.20.5", + "@tanstack/svelte-table": "^8.21.3", "@tsconfig/svelte": "^5.0.4", "svelte": "^4.2.18", "svelte-check": "^3.8.4", diff --git a/examples/svelte/basic/src/App.svelte b/examples/svelte/basic/src/App.svelte index a918729a1a..2f8fb1f85f 100644 --- a/examples/svelte/basic/src/App.svelte +++ b/examples/svelte/basic/src/App.svelte @@ -47,35 +47,35 @@ 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, }, ] @@ -86,7 +86,7 @@ }) const rerender = () => { - options.update(options => ({ + options.update((options) => ({ ...options, data: defaultData, })) @@ -106,7 +106,7 @@ {/if} @@ -137,7 +137,7 @@ {/if} diff --git a/examples/svelte/column-groups/package.json b/examples/svelte/column-groups/package.json index 302eba7f48..5d2c0678b6 100644 --- a/examples/svelte/column-groups/package.json +++ b/examples/svelte/column-groups/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-svelte-column-groups", - "version": "0.0.0", "private": true, "type": "module", "scripts": { @@ -12,7 +11,7 @@ "devDependencies": { "@rollup/plugin-replace": "^5.0.7", "@sveltejs/vite-plugin-svelte": "^3.1.1", - "@tanstack/svelte-table": "^8.20.5", + "@tanstack/svelte-table": "^8.21.3", "@tsconfig/svelte": "^5.0.4", "svelte": "^4.2.18", "svelte-check": "^3.8.4", diff --git a/examples/svelte/column-groups/src/App.svelte b/examples/svelte/column-groups/src/App.svelte index ac780c0da3..457d2151d6 100644 --- a/examples/svelte/column-groups/src/App.svelte +++ b/examples/svelte/column-groups/src/App.svelte @@ -47,30 +47,30 @@ 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', @@ -78,17 +78,17 @@ { 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,7 +103,7 @@ }) const rerender = () => { - options.update(options => ({ + options.update((options) => ({ ...options, data: defaultData, })) @@ -123,7 +123,7 @@ {/if} @@ -154,7 +154,7 @@ {/if} diff --git a/examples/svelte/column-ordering/package.json b/examples/svelte/column-ordering/package.json index ab13648ec7..a6b060bdab 100644 --- a/examples/svelte/column-ordering/package.json +++ b/examples/svelte/column-ordering/package.json @@ -1,6 +1,5 @@ { "name": "tanstack-table-example-svelte-column-ordering", - "version": "0.0.0", "private": true, "type": "module", "scripts": { @@ -13,7 +12,7 @@ "@faker-js/faker": "^8.4.1", "@rollup/plugin-replace": "^5.0.7", "@sveltejs/vite-plugin-svelte": "^3.1.1", - "@tanstack/svelte-table": "^8.20.5", + "@tanstack/svelte-table": "^8.21.3", "@tsconfig/svelte": "^5.0.4", "svelte": "^4.2.18", "svelte-check": "^3.8.4", diff --git a/examples/svelte/column-ordering/src/App.svelte b/examples/svelte/column-ordering/src/App.svelte index d23b8c84a0..d0eef92db8 100644 --- a/examples/svelte/column-ordering/src/App.svelte +++ b/examples/svelte/column-ordering/src/App.svelte @@ -20,30 +20,30 @@ const columns: 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', @@ -51,17 +51,17 @@ { 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, }, ], }, @@ -74,13 +74,13 @@ let columnOrder: ColumnOrderState = [] let columnVisibility: VisibilityState = {} - const setColumnOrder: OnChangeFn = updater => { + const setColumnOrder: OnChangeFn = (updater) => { if (updater instanceof Function) { columnOrder = updater(columnOrder) } else { columnOrder = updater } - options.update(old => ({ + options.update((old) => ({ ...old, state: { ...old.state, @@ -89,13 +89,13 @@ })) } - const setColumnVisibility: OnChangeFn = updater => { + const setColumnVisibility: OnChangeFn = (updater) => { if (updater instanceof Function) { columnVisibility = updater(columnVisibility) } else { columnVisibility = updater } - options.update(old => ({ + options.update((old) => ({ ...old, state: { ...old.state, @@ -119,13 +119,13 @@ }) const randomizeColumns = () => { - $table.setColumnOrder(_updater => - faker.helpers.shuffle($table.getAllLeafColumns().map(d => d.id)) + $table.setColumnOrder((_updater) => + faker.helpers.shuffle($table.getAllLeafColumns().map((d) => d.id)), ) } const regenerate = () => { - options.update(options => ({ + options.update((options) => ({ ...options, data: makeData(5000), })) @@ -140,7 +140,7 @@
{flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} {{ asc: ' 🔼', @@ -120,14 +120,14 @@ function App() {
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
+ + @for (row of table.getRowModel().rows; track row.id) { + + @for (cell of row.getVisibleCells(); track cell.id) { + + } + + } + +
+ + + +
+ `, + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + selector: 'app-table-test', + imports: [FlexRender], + }) + class TestComponent { + readonly expandState = signal({}) + + readonly table = createAngularTable(() => { + return { + columns: columns, + data: defaultData, + getCoreRowModel: getCoreRowModel(), + state: { expanded: this.expandState() }, + onExpandedChange: (updaterOrValue) => { + typeof updaterOrValue === 'function' + ? this.expandState.update(updaterOrValue) + : this.expandState.set(updaterOrValue) + }, + } + }) + } + const fixture = TestBed.createComponent(TestComponent) + fixture.detectChanges() + + const expandCell = fixture.debugElement.query(By.directive(ExpandCell)) + expect(fixture.componentInstance.expandState()).toEqual({}) + expect(expandCell.componentInstance.expanded()).toEqual(false) + + const buttonEl = expandCell.query(By.css('button')) + expect(buttonEl.nativeElement.innerHTML).toEqual(' Not expanded ') + buttonEl.triggerEventHandler('click') + + expect(fixture.componentInstance.expandState()).toEqual({ + '0': true, + }) + fixture.detectChanges() + expect(buttonEl.nativeElement.innerHTML).toEqual(' Expanded ') + }) +}) + +function expectPrimitiveValueIs( + cell: HTMLTableCellElement | null, + value: unknown, +) { + expect(cell).not.toBeNull() + expect(cell!.matches(':empty')).toBe(false) + const span = cell!.querySelector('span')! + expect(span).toBeDefined() + expect(span.innerHTML).toEqual(value) +} + +type TestData = { id: string; title: string } + +export function createTestTable( + data: TestData[], + columns: ColumnDef[], + optionsFn?: () => Partial>, +) { + @Component({ + template: ` + + + @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) { + + @for (header of headerGroup.headers; track header.id) { + @if (!header.isPlaceholder) { + + } + } + + } + + + @for (row of table.getRowModel().rows; track row.id) { + + @for (cell of row.getVisibleCells(); track cell.id) { + + } + + } + +
+ + + +
+ + + +
+ + + + + + {{ count() }} + `, + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + selector: 'app-table-test', + imports: [FlexRender], + }) + class TestComponent { + readonly columns = input[]>(columns) + readonly data = input(data) + + readonly count = signal(0) + + readonly table = createAngularTable(() => { + return { + ...(optionsFn?.() ?? {}), + columns: this.columns(), + data: this.data(), + getCoreRowModel: getCoreRowModel(), + } + }) + } + + const fixture = TestBed.createComponent(TestComponent) + + fixture.detectChanges() + + return { + fixture, + dom: { + clickTriggerCdButton() { + const btn = fixture.debugElement.query(By.css('button')) + btn.triggerEventHandler('click', null) + fixture.detectChanges() + }, + clickTriggerCdButton2() { + const btn = fixture.debugElement.queryAll(By.css('button'))[1]! + btn.triggerEventHandler('click', null) + fixture.detectChanges() + }, + getTable() { + return fixture.nativeElement.querySelector('table') as HTMLTableElement + }, + getHeader() { + return this.getTable().querySelector('thead') as HTMLTableSectionElement + }, + getHeaderRow() { + return this.getHeader().querySelector('tr') as HTMLTableRowElement + }, + getBody() { + return this.getTable().querySelector('tbody') as HTMLTableSectionElement + }, + getBodyRow(index: number) { + return this.getBody().rows.item(index) + }, + }, + } +} + +@Component({ + selector: 'app-test-badge', + template: `{{ status() }} `, + standalone: true, + changeDetection: ChangeDetectionStrategy.OnPush, +}) +class TestBadgeComponent { + readonly context = injectFlexRenderContext>() + + readonly status = input.required() +} diff --git a/packages/angular-table/tests/flex-render.test.ts b/packages/angular-table/tests/flex-render.test.ts index 2cb4ecde82..9e0d4c6d7f 100644 --- a/packages/angular-table/tests/flex-render.test.ts +++ b/packages/angular-table/tests/flex-render.test.ts @@ -1,13 +1,22 @@ -import { Component, ViewChild, input, type TemplateRef } from '@angular/core' +import { + Component, + ViewChild, + input, + type TemplateRef, + effect, +} from '@angular/core' import { TestBed, type ComponentFixture } from '@angular/core/testing' import { createColumnHelper } from '@tanstack/table-core' import { describe, expect, test } from 'vitest' import { - FlexRenderComponent, FlexRenderDirective, injectFlexRenderContext, } from '../src/flex-render' import { setFixtureSignalInput, setFixtureSignalInputs } from './test-utils' +import { + flexRenderComponent, + FlexRenderComponent, +} from '../src/flex-render/flex-render-component' interface Data { id: string @@ -108,7 +117,7 @@ describe('FlexRenderDirective', () => { const fixture = TestBed.createComponent(TestRenderComponent) setFixtureSignalInputs(fixture, { - content: () => new FlexRenderComponent(FakeComponent), + content: () => flexRenderComponent(FakeComponent), context: { property: 'Context value', }, @@ -124,13 +133,15 @@ describe('FlexRenderDirective', () => { // Skip for now, test framework (using ComponentRef.setInput) cannot recognize signal inputs // as component inputs - test.skip('should render custom components', () => { + test('should render custom components', () => { @Component({ template: `{{ row().property }}`, standalone: true, }) class FakeComponent { row = input.required<{ property: string }>() + + constructor() {} } const fixture = TestBed.createComponent(TestRenderComponent) @@ -176,7 +187,7 @@ type FlexRenderDirectiveAllowedContent = FlexRenderDirective< function expectPrimitiveValueIs( fixture: ComponentFixture, - value: unknown + value: unknown, ) { expect(fixture.nativeElement.matches(':empty')).toBe(false) const span = fixture.nativeElement.querySelector('span') diff --git a/packages/angular-table/tests/lazy-init.test.ts b/packages/angular-table/tests/lazy-init.test.ts index 5f6563e2a6..fa3a43f553 100644 --- a/packages/angular-table/tests/lazy-init.test.ts +++ b/packages/angular-table/tests/lazy-init.test.ts @@ -113,12 +113,12 @@ describe('lazyInit', () => { setFixtureSignalInputs(fixture, { title: 'updatedValue' }) expect(fixture.debugElement.nativeElement.textContent).toBe( - '1 - updatedValue' + '1 - updatedValue', ) setFixtureSignalInputs(fixture, { title: 'newUpdatedValue' }) expect(fixture.debugElement.nativeElement.textContent).toBe( - '1 - newUpdatedValue' + '1 - newUpdatedValue', ) }) }) diff --git a/packages/angular-table/tests/test-setup.ts b/packages/angular-table/tests/test-setup.ts index 8bd07572e8..2933c0b0af 100644 --- a/packages/angular-table/tests/test-setup.ts +++ b/packages/angular-table/tests/test-setup.ts @@ -1,4 +1,4 @@ -import '@analogjs/vite-plugin-angular/setup-vitest' +import '@analogjs/vitest-angular/setup-zone' import '@testing-library/jest-dom/vitest' import { @@ -9,5 +9,5 @@ import { getTestBed } from '@angular/core/testing' getTestBed().initTestEnvironment( BrowserDynamicTestingModule, - platformBrowserDynamicTesting() + platformBrowserDynamicTesting(), ) diff --git a/packages/angular-table/tests/test-utils.ts b/packages/angular-table/tests/test-utils.ts index cfff0e7e69..d747d4ae24 100644 --- a/packages/angular-table/tests/test-utils.ts +++ b/packages/angular-table/tests/test-utils.ts @@ -8,27 +8,14 @@ type ToSignalInputUpdatableMap = { : never]: T[K] extends InputSignal ? Value : never } -/** - * Set required signal input value to component fixture - * @see https://github.com/angular/angular/issues/54013 - */ -export function setSignalInputs>( - component: T, - inputs: ToSignalInputUpdatableMap -) { - for (const inputKey in inputs) { - if (componentHasSignalInputProperty(component, inputKey)) { - signalSetFn(component[inputKey][SIGNAL], inputs[inputKey]) - } - } -} - export function setFixtureSignalInputs>( componentFixture: ComponentFixture, inputs: ToSignalInputUpdatableMap, - options: { detectChanges: boolean } = { detectChanges: true } + options: { detectChanges: boolean } = { detectChanges: true }, ) { - setSignalInputs(componentFixture.componentInstance, inputs) + for (const inputKey in inputs) { + componentFixture.componentRef.setInput(inputKey, inputs[inputKey]) + } if (options.detectChanges) { componentFixture.detectChanges() } @@ -41,16 +28,16 @@ export function setFixtureSignalInput< >( componentFixture: ComponentFixture, inputName: InputName, - value: InputMaps[InputName] + value: InputMaps[InputName], ) { - setSignalInputs(componentFixture.componentInstance, { + setFixtureSignalInputs(componentFixture, { [inputName]: value, } as ToSignalInputUpdatableMap) } function componentHasSignalInputProperty( component: object, - property: TProperty + property: TProperty, ): component is { [key in TProperty]: InputSignal } { return ( component.hasOwnProperty(property) && (component as any)[property][SIGNAL] diff --git a/packages/angular-table/tsconfig.test.json b/packages/angular-table/tsconfig.test.json new file mode 100644 index 0000000000..caf761f734 --- /dev/null +++ b/packages/angular-table/tsconfig.test.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2015", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": ["ES2022", "dom"], + "types": ["vitest/globals"] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + }, + "include": ["src", "tests"] +} diff --git a/packages/angular-table/vitest.config.ts b/packages/angular-table/vitest.config.ts index 523b22e583..67bd4e6c7f 100644 --- a/packages/angular-table/vitest.config.ts +++ b/packages/angular-table/vitest.config.ts @@ -1,13 +1,23 @@ import { defineConfig } from 'vitest/config' import packageJson from './package.json' +import angular from '@analogjs/vite-plugin-angular' +import path from 'node:path' + +const angularPlugin = angular({ tsconfig: 'tsconfig.test.json', jit: true }) export default defineConfig({ + plugins: [ + // @ts-expect-error Fix types + angularPlugin, + ], test: { name: packageJson.name, - dir: './tests', watch: false, + pool: 'threads', environment: 'jsdom', setupFiles: ['./tests/test-setup.ts'], globals: true, + reporters: 'default', + disableConsoleIntercept: true, }, }) diff --git a/packages/lit-table/package.json b/packages/lit-table/package.json index 3468051046..e4c0f022fe 100644 --- a/packages/lit-table/package.json +++ b/packages/lit-table/package.json @@ -1,12 +1,12 @@ { "name": "@tanstack/lit-table", - "version": "8.20.5", + "version": "8.21.3", "description": "Headless UI for building powerful tables & datagrids for Lit.", "author": "Tanner Linsley", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/TanStack/table.git", + "url": "git+https://github.com/TanStack/table.git", "directory": "packages/lit-table" }, "homepage": "https://tanstack.com/table", diff --git a/packages/lit-table/rollup.config.mjs b/packages/lit-table/rollup.config.mjs index 328da31311..b0b1f2a08c 100644 --- a/packages/lit-table/rollup.config.mjs +++ b/packages/lit-table/rollup.config.mjs @@ -13,5 +13,5 @@ export default defineConfig( globals: { lit: 'Lit', }, - }) + }), ) diff --git a/packages/lit-table/src/index.ts b/packages/lit-table/src/index.ts index 1237d6553b..e3eb10359f 100755 --- a/packages/lit-table/src/index.ts +++ b/packages/lit-table/src/index.ts @@ -12,7 +12,7 @@ export * from '@tanstack/table-core' export function flexRender( Comp: ((props: TProps) => string) | string | TemplateResult | undefined, - props: TProps + props: TProps, ): TemplateResult | string | null { if (!Comp) return null @@ -23,9 +23,9 @@ export function flexRender( return Comp } -export class TableController - implements ReactiveController -{ +export class TableController< + TData extends RowData, +> implements ReactiveController { host: ReactiveControllerHost private tableInstance: Table | null = null @@ -52,8 +52,9 @@ export class TableController } } - this.tableInstance.setOptions(prev => ({ + this.tableInstance.setOptions((prev) => ({ ...prev, + ...options, state: { ...this._tableState, ...options.state }, onStateChange: (updater: any) => { this._tableState = updater(this._tableState) diff --git a/packages/match-sorter-utils/package.json b/packages/match-sorter-utils/package.json index 2a7ee45d55..cde09c197c 100644 --- a/packages/match-sorter-utils/package.json +++ b/packages/match-sorter-utils/package.json @@ -9,7 +9,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/TanStack/table.git", + "url": "git+https://github.com/TanStack/table.git", "directory": "packages/match-sorter-utils" }, "homepage": "https://tanstack.com/table", diff --git a/packages/match-sorter-utils/rollup.config.mjs b/packages/match-sorter-utils/rollup.config.mjs index 4daccdcf02..f2ada69d2c 100644 --- a/packages/match-sorter-utils/rollup.config.mjs +++ b/packages/match-sorter-utils/rollup.config.mjs @@ -11,5 +11,5 @@ export default defineConfig( entryFile: 'src/index.ts', external: [], globals: {}, - }) + }), ) diff --git a/packages/match-sorter-utils/src/index.ts b/packages/match-sorter-utils/src/index.ts index c3103dde72..34e923f050 100755 --- a/packages/match-sorter-utils/src/index.ts +++ b/packages/match-sorter-utils/src/index.ts @@ -77,7 +77,7 @@ export type Ranking = (typeof rankings)[keyof typeof rankings] export function rankItem( item: TItem, value: string, - options?: RankItemOptions + options?: RankItemOptions, ): RankingInfo { options = options || {} @@ -147,7 +147,7 @@ export function rankItem( function getMatchRanking( testString: string, stringToRank: string, - options: RankItemOptions + options: RankItemOptions, ): Ranking { testString = prepareValueForComparison(testString, options) stringToRank = prepareValueForComparison(stringToRank, options) @@ -210,9 +210,9 @@ function getMatchRanking( function getAcronym(string: string): string { let acronym = '' const wordsInString = string.split(' ') - wordsInString.forEach(wordInString => { + wordsInString.forEach((wordInString) => { const splitByHyphenWords = wordInString.split('-') - splitByHyphenWords.forEach(splitByHyphenWord => { + splitByHyphenWords.forEach((splitByHyphenWord) => { acronym += splitByHyphenWord.substr(0, 1) }) }) @@ -231,14 +231,14 @@ function getAcronym(string: string): string { */ function getClosenessRanking( testString: string, - stringToRank: string + stringToRank: string, ): Ranking { let matchingInOrderCharCount = 0 let charNumber = 0 function findMatchingCharacter( matchChar: undefined | string, string: string, - index: number + index: number, ) { for (let j = index, J = string.length; j < J; j++) { const stringChar = string[j] @@ -291,7 +291,7 @@ export function compareItems(a: RankingInfo, b: RankingInfo): number { */ function prepareValueForComparison( value: string, - { keepDiacritics }: RankItemOptions + { keepDiacritics }: RankItemOptions, ): string { // value might not actually be a string at this point (we don't get to choose) // so part of preparing the value for comparison is ensure that it is a string @@ -310,7 +310,7 @@ function prepareValueForComparison( */ function getItemValues( item: TItem, - accessor: Accessor + accessor: Accessor, ): Array { let accessorFn = accessor as AccessorFn @@ -340,7 +340,7 @@ function getItemValues( */ function getAllValuesToRank( item: TItem, - accessors: ReadonlyArray> + accessors: ReadonlyArray>, ) { const allValues: Array<{ itemValue: string @@ -370,7 +370,7 @@ const defaultKeyAttributes = { * @return object containing the accessor's attributes */ function getAccessorAttributes( - accessor: Accessor + accessor: Accessor, ): AccessorAttributes { if (typeof accessor === 'function') { return defaultKeyAttributes diff --git a/packages/match-sorter-utils/src/remove-accents.ts b/packages/match-sorter-utils/src/remove-accents.ts index ca944b9eea..e3d5eb2947 100644 --- a/packages/match-sorter-utils/src/remove-accents.ts +++ b/packages/match-sorter-utils/src/remove-accents.ts @@ -404,7 +404,7 @@ const chars = Object.keys(characterMap).join('|') const allAccents = new RegExp(chars, 'g') export function removeAccents(str: string) { - return str.replace(allAccents, match => { + return str.replace(allAccents, (match) => { return characterMap[match]! }) } diff --git a/packages/match-sorter-utils/tests/match-sorter-utils.test.ts b/packages/match-sorter-utils/tests/match-sorter-utils.test.ts index 873ea47b81..b79c997628 100644 --- a/packages/match-sorter-utils/tests/match-sorter-utils.test.ts +++ b/packages/match-sorter-utils/tests/match-sorter-utils.test.ts @@ -19,9 +19,9 @@ describe('match-sorter-utils', () => { it('CASE_SENSITIVE_EQUAL', () => { const ranking = rankItem(testPerson, 'John', { accessors: [ - item => item.firstName, - item => item.lastName, - item => item.email, + (item) => item.firstName, + (item) => item.lastName, + (item) => item.email, ], }) expect(ranking.rank).toBe(rankings.CASE_SENSITIVE_EQUAL) @@ -34,9 +34,9 @@ describe('match-sorter-utils', () => { it('NO_MATCH', () => { const ranking = rankItem(testPerson, 'Tom', { accessors: [ - item => item.firstName, - item => item.lastName, - item => item.email, + (item) => item.firstName, + (item) => item.lastName, + (item) => item.email, ], }) expect(ranking.rank).toBe(rankings.NO_MATCH) @@ -52,15 +52,15 @@ describe('match-sorter-utils', () => { const ranking = rankItem(testPerson, 'John', { accessors: [ { - accessor: item => item.firstName, + accessor: (item) => item.firstName, threshold: rankings.CONTAINS, }, { - accessor: item => item.lastName, + accessor: (item) => item.lastName, threshold: rankings.CONTAINS, }, { - accessor: item => item.email, + accessor: (item) => item.email, threshold: rankings.MATCHES, }, ], @@ -77,19 +77,19 @@ describe('match-sorter-utils', () => { threshold: rankings.ACRONYM, accessors: [ { - accessor: item => item.firstName, + accessor: (item) => item.firstName, threshold: rankings.CONTAINS, }, { - accessor: item => item.lastName, + accessor: (item) => item.lastName, threshold: rankings.CONTAINS, }, { - accessor: item => `${item.firstName} ${item.lastName}`, + accessor: (item) => `${item.firstName} ${item.lastName}`, threshold: rankings.CONTAINS, }, { - accessor: item => item.email, + accessor: (item) => item.email, threshold: rankings.CONTAINS, }, ], @@ -105,15 +105,15 @@ describe('match-sorter-utils', () => { const ranking = rankItem(testPerson, 'Tom', { accessors: [ { - accessor: item => item.firstName, + accessor: (item) => item.firstName, threshold: rankings.CONTAINS, }, { - accessor: item => item.lastName, + accessor: (item) => item.lastName, threshold: rankings.CONTAINS, }, { - accessor: item => item.email, + accessor: (item) => item.email, threshold: rankings.MATCHES, }, ], diff --git a/packages/qwik-table/package.json b/packages/qwik-table/package.json index 1301446dbe..16797b7359 100644 --- a/packages/qwik-table/package.json +++ b/packages/qwik-table/package.json @@ -1,12 +1,12 @@ { "name": "@tanstack/qwik-table", - "version": "8.20.5", + "version": "8.21.3", "description": "Headless UI for building powerful tables & datagrids for Qwik.", "author": "Tanner Linsley", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/TanStack/table.git", + "url": "git+https://github.com/TanStack/table.git", "directory": "packages/qwik-table" }, "homepage": "https://tanstack.com/table", diff --git a/packages/qwik-table/rollup.config.mjs b/packages/qwik-table/rollup.config.mjs index ca90266438..ef7b8489d5 100644 --- a/packages/qwik-table/rollup.config.mjs +++ b/packages/qwik-table/rollup.config.mjs @@ -13,5 +13,5 @@ export default defineConfig( globals: { '@builder.io/qwik': 'Qwik', }, - }) + }), ) diff --git a/packages/qwik-table/src/index.tsx b/packages/qwik-table/src/index.tsx index 4f7630e965..3042096b87 100644 --- a/packages/qwik-table/src/index.tsx +++ b/packages/qwik-table/src/index.tsx @@ -19,7 +19,7 @@ const isQwikComponent = (comp: unknown): comp is QwikComps => export function flexRender( Comp: any, // TODO: add renderable type - props: TProps + props: TProps, ) { return !Comp ? null : isQwikComponent(Comp) ? ( @@ -31,7 +31,7 @@ export function flexRender( } export function useQwikTable( - options: TableOptions + options: TableOptions, ) { // Compose in the generic options to the user options const resolvedOptions: TableOptionsResolved = { @@ -53,7 +53,7 @@ export function useQwikTable( // Compose the default state above with any user state. This will allow the user // to only control a subset of the state if desired. - table.instance!.setOptions(prev => ({ + table.instance!.setOptions((prev) => ({ ...prev, ...options, state: { @@ -62,7 +62,7 @@ export function useQwikTable( }, // Similarly, we'll maintain both our internal state and any user-provided // state. - onStateChange: updater => { + onStateChange: (updater) => { state.value = updater instanceof Function ? updater(state.value) : updater options.onStateChange?.(updater) }, diff --git a/packages/react-table-devtools/package.json b/packages/react-table-devtools/package.json index 479ce8dc3b..cf0417d1a8 100644 --- a/packages/react-table-devtools/package.json +++ b/packages/react-table-devtools/package.json @@ -1,12 +1,12 @@ { "name": "@tanstack/react-table-devtools", - "version": "8.20.6", + "version": "8.21.3", "description": "Devtools for React Table", "author": "Tanner Linsley", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/TanStack/table.git", + "url": "git+https://github.com/TanStack/table.git", "directory": "packages/react-table-devtools" }, "homepage": "https://tanstack.com/table", diff --git a/packages/react-table-devtools/rollup.config.mjs b/packages/react-table-devtools/rollup.config.mjs index 9a3f9be21b..ff49c0b2fe 100644 --- a/packages/react-table-devtools/rollup.config.mjs +++ b/packages/react-table-devtools/rollup.config.mjs @@ -14,5 +14,5 @@ export default defineConfig( react: 'React', '@tanstack/react-table': 'ReactTable', }, - }) + }), ) diff --git a/packages/react-table-devtools/src/Explorer.tsx b/packages/react-table-devtools/src/Explorer.tsx index 8028b70b09..9094054cc5 100644 --- a/packages/react-table-devtools/src/Explorer.tsx +++ b/packages/react-table-devtools/src/Explorer.tsx @@ -80,7 +80,7 @@ const DefaultRenderer = ({ {expanded ? ( subEntryPages.length === 1 ? ( - {subEntries.map(entry => handleEntry(entry))} + {subEntries.map((entry) => handleEntry(entry))} ) : ( @@ -89,10 +89,10 @@ const DefaultRenderer = ({ {expandedPages.includes(index) ? ( - {entries.map(entry => handleEntry(entry))} + {entries.map((entry) => handleEntry(entry))} ) : null} @@ -146,8 +146,8 @@ export default function Explorer({ }) { const [expanded, setExpanded] = React.useState(defaultExpanded) - const toggle = set => { - setExpanded(old => (typeof set !== 'undefined' ? set : !old)) + const toggle = (set) => { + setExpanded((old) => (typeof set !== 'undefined' ? set : !old)) } const path = [] @@ -156,7 +156,7 @@ export default function Explorer({ let subEntries const subEntryPages = [] - const makeProperty = sub => { + const makeProperty = (sub) => { const newPath = path.concat(sub.label) const subDefaultExpanded = defaultExpanded === true @@ -177,7 +177,7 @@ export default function Explorer({ makeProperty({ label: i, value: d, - }) + }), ) } else if ( value !== null && @@ -189,7 +189,7 @@ export default function Explorer({ makeProperty({ label: i, value: val, - }) + }), ) } else if (typeof value === 'function') { type = 'function' @@ -200,7 +200,7 @@ export default function Explorer({ makeProperty({ label, value, - }) + }), ) } @@ -214,7 +214,7 @@ export default function Explorer({ } return renderer({ - handleEntry: entry => ( + handleEntry: (entry) => ( ), type, diff --git a/packages/react-table-devtools/src/index.tsx b/packages/react-table-devtools/src/index.tsx index 6390689397..7db0471d01 100644 --- a/packages/react-table-devtools/src/index.tsx +++ b/packages/react-table-devtools/src/index.tsx @@ -82,7 +82,7 @@ export function ReactTableDevtools({ const panelRef = React.useRef(null) const [isOpen, setIsOpen] = useLocalStorage( 'reactTableDevtoolsOpen', - initialIsOpen + initialIsOpen, ) const isMounted = useIsMounted() @@ -105,7 +105,7 @@ export function ReactTableDevtools({ type="button" {...otherToggleButtonProps} aria-label="Open React Table Devtools" - onClick={e => { + onClick={(e) => { setIsOpen(true) onToggleClick && onToggleClick(e) }} diff --git a/packages/react-table-devtools/src/styledComponents.ts b/packages/react-table-devtools/src/styledComponents.ts index e1872cd45d..435d754392 100644 --- a/packages/react-table-devtools/src/styledComponents.ts +++ b/packages/react-table-devtools/src/styledComponents.ts @@ -17,7 +17,7 @@ export const Panel = styled( fontSize: '.9em', // flexDirection: 'column', }, - } + }, ) const ActivePanel = styled( @@ -33,7 +33,7 @@ const ActivePanel = styled( '(max-width: 700px)': (_props, theme) => ({ borderTop: `2px solid ${theme.gray}`, }), - } + }, ) export const Button = styled('button', (props, theme) => ({ @@ -102,5 +102,5 @@ const Select = styled( '(max-width: 500px)': { display: 'none', }, - } + }, ) diff --git a/packages/react-table-devtools/src/useLocalStorage.ts b/packages/react-table-devtools/src/useLocalStorage.ts index e29f662c0c..f8174818f1 100644 --- a/packages/react-table-devtools/src/useLocalStorage.ts +++ b/packages/react-table-devtools/src/useLocalStorage.ts @@ -14,7 +14,7 @@ const getItem = (key: string): unknown => { export default function useLocalStorage( key: string, - defaultValue: T | undefined + defaultValue: T | undefined, ): [T | undefined, (newVal: T | ((prevVal: T) => T)) => void] { const [value, setValue] = React.useState() @@ -23,7 +23,7 @@ export default function useLocalStorage( if (typeof initialValue === 'undefined' || initialValue === null) { setValue( - typeof defaultValue === 'function' ? defaultValue() : defaultValue + typeof defaultValue === 'function' ? defaultValue() : defaultValue, ) } else { setValue(initialValue) @@ -32,7 +32,7 @@ export default function useLocalStorage( const setter = React.useCallback( (updater: any) => { - setValue(old => { + setValue((old) => { let newVal = updater if (typeof updater == 'function') { @@ -45,7 +45,7 @@ export default function useLocalStorage( return newVal }) }, - [key] + [key], ) return [value, setter] diff --git a/packages/react-table-devtools/src/utils.ts b/packages/react-table-devtools/src/utils.ts index 945b3b2423..196fe0257b 100644 --- a/packages/react-table-devtools/src/utils.ts +++ b/packages/react-table-devtools/src/utils.ts @@ -51,7 +51,7 @@ type Styles = export function styled( type: T, newStyles: Styles, - queries: Record = {} + queries: Record = {}, ) { return React.forwardRef>( ({ style, ...rest }, ref) => { @@ -67,7 +67,7 @@ export function styled( } : current }, - {} + {}, ) return React.createElement(type, { @@ -81,7 +81,7 @@ export function styled( }, ref, }) - } + }, ) } @@ -116,7 +116,7 @@ function useSafeState(initialState: T): [T, (value: T) => void] { } }) }, - [isMounted] + [isMounted], ) return [state, safeSetState] @@ -129,9 +129,9 @@ function useSafeState(initialState: T): [T, (value: T) => void] { function scheduleMicrotask(callback: () => void) { Promise.resolve() .then(callback) - .catch(error => + .catch((error) => setTimeout(() => { throw error - }) + }), ) } diff --git a/packages/react-table/package.json b/packages/react-table/package.json index fcf9b4dbf6..ab72d8f6b4 100644 --- a/packages/react-table/package.json +++ b/packages/react-table/package.json @@ -1,12 +1,12 @@ { "name": "@tanstack/react-table", - "version": "8.20.6", + "version": "8.21.3", "description": "Headless UI for building powerful tables & datagrids for React.", "author": "Tanner Linsley", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/TanStack/table.git", + "url": "git+https://github.com/TanStack/table.git", "directory": "packages/react-table" }, "homepage": "https://tanstack.com/table", diff --git a/packages/react-table/rollup.config.mjs b/packages/react-table/rollup.config.mjs index f811cd16bd..a2b8043811 100644 --- a/packages/react-table/rollup.config.mjs +++ b/packages/react-table/rollup.config.mjs @@ -13,5 +13,5 @@ export default defineConfig( globals: { react: 'React', }, - }) + }), ) diff --git a/packages/react-table/src/index.tsx b/packages/react-table/src/index.tsx index 132ea49083..5df524b892 100755 --- a/packages/react-table/src/index.tsx +++ b/packages/react-table/src/index.tsx @@ -17,7 +17,7 @@ export type Renderable = React.ReactNode | React.ComponentType */ export function flexRender( Comp: Renderable, - props: TProps + props: TProps, ): React.ReactNode | React.JSX.Element { return !Comp ? null : isReactComponent(Comp) ? ( @@ -27,7 +27,7 @@ export function flexRender( } function isReactComponent( - component: unknown + component: unknown, ): component is React.ComponentType { return ( isClassComponent(component) || @@ -55,7 +55,7 @@ function isExoticComponent(component: any) { } export function useReactTable( - options: TableOptions + options: TableOptions, ) { // Compose in the generic options to the user options const resolvedOptions: TableOptionsResolved = { @@ -75,7 +75,7 @@ export function useReactTable( // Compose the default state above with any user state. This will allow the user // to only control a subset of the state if desired. - tableRef.current.setOptions(prev => ({ + tableRef.current.setOptions((prev) => ({ ...prev, ...options, state: { @@ -84,7 +84,7 @@ export function useReactTable( }, // Similarly, we'll maintain both our internal state and any user-provided // state. - onStateChange: updater => { + onStateChange: (updater) => { setState(updater) options.onStateChange?.(updater) }, diff --git a/packages/react-table/tests/core/core.test.tsx b/packages/react-table/tests/core/core.test.tsx index d6f8e76178..752decf00b 100644 --- a/packages/react-table/tests/core/core.test.tsx +++ b/packages/react-table/tests/core/core.test.tsx @@ -48,30 +48,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.renderValue(), - footer: props => props.column.id, + cell: (info) => info.renderValue(), + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.renderValue(), + cell: (info) => info.renderValue(), 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', @@ -79,17 +79,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, }, ], }, @@ -123,15 +123,15 @@ describe('core', () => {
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -139,13 +139,13 @@ describe('core', () => { ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( ))} @@ -153,15 +153,15 @@ describe('core', () => { ))} - {table.getFooterGroups().map(footerGroup => ( + {table.getFooterGroups().map((footerGroup) => ( - {footerGroup.headers.map(header => ( + {footerGroup.headers.map((header) => ( ))} @@ -190,27 +190,27 @@ describe('core', () => { expect(RTL.screen.getAllByRole('cell').length).toEqual(18) expect( - Array.from(rendered.container.querySelectorAll('thead > tr')).map(d => - Array.from(d.querySelectorAll('th')).map(d => [ + Array.from(rendered.container.querySelectorAll('thead > tr')).map((d) => + Array.from(d.querySelectorAll('th')).map((d) => [ d.innerHTML, d.getAttribute('colspan'), - ]) - ) + ]), + ), ).toMatchSnapshot() expect( - Array.from(rendered.container.querySelectorAll('tbody > tr')).map(d => - Array.from(d.querySelectorAll('td')).map(d => d.innerHTML) - ) + Array.from(rendered.container.querySelectorAll('tbody > tr')).map((d) => + Array.from(d.querySelectorAll('td')).map((d) => d.innerHTML), + ), ).toMatchSnapshot() expect( - Array.from(rendered.container.querySelectorAll('tfoot > tr')).map(d => - Array.from(d.querySelectorAll('th')).map(d => [ + Array.from(rendered.container.querySelectorAll('tfoot > tr')).map((d) => + Array.from(d.querySelectorAll('th')).map((d) => [ d.innerHTML, d.getAttribute('colspan'), - ]) - ) + ]), + ), ).toMatchSnapshot() }) diff --git a/packages/react-table/tests/features/RowSelection.test.tsx b/packages/react-table/tests/features/RowSelection.test.tsx index 0db73f476b..cc663a9139 100644 --- a/packages/react-table/tests/features/RowSelection.test.tsx +++ b/packages/react-table/tests/features/RowSelection.test.tsx @@ -113,15 +113,15 @@ const TableComponent: FC<{ options?: Partial> }> = ({ return (
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -129,9 +129,9 @@ const TableComponent: FC<{ options?: Partial> }> = ({ ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( @@ -146,8 +146,8 @@ const TableComponent: FC<{ options?: Partial> }> = ({ test(`Select all do not select rows which are not available for selection`, () => { render( row.original.age > 40 }} - /> + options={{ enableRowSelection: (row) => row.original.age > 40 }} + />, ) const [title, notSelected, selected] = screen.getAllByRole('checkbox') @@ -171,7 +171,7 @@ test(`Select all do not select rows which are not available for selection`, () = // issue #4757 test(`Select all is unchecked for current page if all rows are not available for selection`, () => { - let condition = row => row.original.age > 50 + let condition = (row) => row.original.age > 50 const { rerender } = render( + />, ) expect(screen.queryByTestId('select-single')).not.toBeInTheDocument() @@ -188,7 +188,7 @@ test(`Select all is unchecked for current page if all rows are not available for expect(selectedOnPage).not.toBeChecked() expect(selectedOnPage).not.toHaveAttribute('aria-checked', 'mixed') - condition = row => row.original.age > 40 + condition = (row) => row.original.age > 40 rerender( + />, ) expect(screen.queryByTestId('select-single')).toBeInTheDocument() diff --git a/packages/react-table/tests/features/Visibility.test.tsx b/packages/react-table/tests/features/Visibility.test.tsx index 7d13d7828d..b8d06c6459 100644 --- a/packages/react-table/tests/features/Visibility.test.tsx +++ b/packages/react-table/tests/features/Visibility.test.tsx @@ -48,30 +48,30 @@ const defaultData: Person[] = [ const defaultColumns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: props => props.renderValue(), - footer: props => props.column.id, + cell: (props) => props.renderValue(), + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: props => props.renderValue(), + cell: (props) => props.renderValue(), 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', @@ -79,17 +79,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, }, ], }, @@ -134,7 +134,7 @@ describe('useReactTable', () => { Toggle All - {table.getAllLeafColumns().map(column => { + {table.getAllLeafColumns().map((column) => { return (
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender(cell.column.columnDef.cell, cell.getContext())}
- {table.getHeaderGroups().map(headerGroup => ( + {table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map(header => ( + {headerGroup.headers.map((header) => ( ))} @@ -170,13 +170,13 @@ describe('useReactTable', () => { ))} - {table.getRowModel().rows.map(row => ( + {table.getRowModel().rows.map((row) => ( - {row.getVisibleCells().map(cell => ( + {row.getVisibleCells().map((cell) => ( ))} @@ -184,15 +184,15 @@ describe('useReactTable', () => { ))} - {table.getFooterGroups().map(footerGroup => ( + {table.getFooterGroups().map((footerGroup) => ( - {footerGroup.headers.map(header => ( + {footerGroup.headers.map((header) => ( ))} @@ -219,23 +219,23 @@ describe('useReactTable', () => { const snap = (name: string) => { expect({ headers: Array.from( - rendered.container.querySelectorAll('thead > tr') - ).map(d => - Array.from(d.querySelectorAll('th')).map(d => [ + rendered.container.querySelectorAll('thead > tr'), + ).map((d) => + Array.from(d.querySelectorAll('th')).map((d) => [ d.innerHTML, d.getAttribute('colspan'), - ]) + ]), ), rows: Array.from(rendered.container.querySelectorAll('tbody > tr')).map( - d => Array.from(d.querySelectorAll('td')).map(d => d.innerHTML) + (d) => Array.from(d.querySelectorAll('td')).map((d) => d.innerHTML), ), footers: Array.from( - rendered.container.querySelectorAll('tfoot > tr') - ).map(d => - Array.from(d.querySelectorAll('th')).map(d => [ + rendered.container.querySelectorAll('tfoot > tr'), + ).map((d) => + Array.from(d.querySelectorAll('th')).map((d) => [ d.innerHTML, d.getAttribute('colspan'), - ]) + ]), ), }).toMatchSnapshot(`${snapIndex++} - ${name}`) } diff --git a/packages/react-table/tests/features/useAbsoluteLayout.notest.js b/packages/react-table/tests/features/useAbsoluteLayout.notest.js index 44f6320069..2216d9f46e 100644 --- a/packages/react-table/tests/features/useAbsoluteLayout.notest.js +++ b/packages/react-table/tests/features/useAbsoluteLayout.notest.js @@ -45,15 +45,15 @@ function Table({ columns, data }) { data, defaultColumn, }, - useAbsoluteLayout + useAbsoluteLayout, ) return (
- {headerGroups.map(headerGroup => ( + {headerGroups.map((headerGroup) => (
- {headerGroup.headers.map(column => ( + {headerGroup.headers.map((column) => (
{column.render('Header')}
@@ -67,7 +67,7 @@ function Table({ columns, data }) { (row, i) => prepareRow(row) || (
- {row.cells.map(cell => { + {row.cells.map((cell) => { return (
{cell.render('Cell')} @@ -75,7 +75,7 @@ function Table({ columns, data }) { ) })}
- ) + ), )}
@@ -124,7 +124,7 @@ function App() { ], }, ], - [] + [], ) return
{header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )}
{flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )}
{header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )}
@@ -134,11 +134,13 @@ test('renders a table', () => { const rtl = render() expect( - rtl.getAllByRole('columnheader').every(d => d.style.position === 'absolute') + rtl + .getAllByRole('columnheader') + .every((d) => d.style.position === 'absolute'), ).toBe(true) expect( - rtl.getAllByRole('columnheader').map(d => [d.style.left, d.style.width]) + rtl.getAllByRole('columnheader').map((d) => [d.style.left, d.style.width]), ).toStrictEqual([ ['0px', '550px'], ['550px', '850px'], diff --git a/packages/react-table/tests/features/useBlockLayout.notest.js b/packages/react-table/tests/features/useBlockLayout.notest.js index 6406d5eba8..10072b65cf 100644 --- a/packages/react-table/tests/features/useBlockLayout.notest.js +++ b/packages/react-table/tests/features/useBlockLayout.notest.js @@ -45,15 +45,15 @@ function Table({ columns, data }) { data, defaultColumn, }, - useBlockLayout + useBlockLayout, ) return (
- {headerGroups.map(headerGroup => ( + {headerGroups.map((headerGroup) => (
- {headerGroup.headers.map(column => ( + {headerGroup.headers.map((column) => (
{column.render('Header')}
@@ -67,7 +67,7 @@ function Table({ columns, data }) { (row, i) => prepareRow(row) || (
- {row.cells.map(cell => { + {row.cells.map((cell) => { return (
{cell.render('Cell')} @@ -75,7 +75,7 @@ function Table({ columns, data }) { ) })}
- ) + ), )}
@@ -124,7 +124,7 @@ function App() { ], }, ], - [] + [], ) return
@@ -136,15 +136,15 @@ test('renders a table', () => { expect( rtl .getAllByRole('columnheader') - .every(d => d.style.display === 'inline-block') + .every((d) => d.style.display === 'inline-block'), ).toBe(true) - expect(rtl.getAllByRole('row').every(d => d.style.display === 'flex')).toBe( - true + expect(rtl.getAllByRole('row').every((d) => d.style.display === 'flex')).toBe( + true, ) expect( - rtl.getAllByRole('columnheader').map(d => d.style.width) + rtl.getAllByRole('columnheader').map((d) => d.style.width), ).toStrictEqual([ '550px', '850px', diff --git a/packages/react-table/tests/features/useColumnOrder.notest.js b/packages/react-table/tests/features/useColumnOrder.notest.js index 357fe00a6f..dd98d74a2b 100644 --- a/packages/react-table/tests/features/useColumnOrder.notest.js +++ b/packages/react-table/tests/features/useColumnOrder.notest.js @@ -66,15 +66,15 @@ function Table({ columns, data }) { columns, data, }, - useColumnOrder + useColumnOrder, ) const testColumnOrder = () => { setColumnOrder( shuffle( - leafColumns.map(d => d.id), - [1, 4, 2, 0, 3, 5] - ) + leafColumns.map((d) => d.id), + [1, 4, 2, 0, 3, 5], + ), ) } @@ -85,7 +85,7 @@ function Table({ columns, data }) { {headerGroups.map((headerGroup, i) => ( - {headerGroup.headers.map(column => ( + {headerGroup.headers.map((column) => ( ))} @@ -149,7 +149,7 @@ function App() { ], }, ], - [] + [], ) return
{column.render('Header')}
@@ -158,7 +158,7 @@ function App() { test('renders a column-orderable table', () => { const rtl = render() - expect(rtl.getAllByRole('columnheader').map(d => d.textContent)).toEqual([ + expect(rtl.getAllByRole('columnheader').map((d) => d.textContent)).toEqual([ 'Name', 'Info', 'First Name', @@ -171,7 +171,7 @@ test('renders a column-orderable table', () => { fireEvent.click(rtl.getByText('Randomize Columns')) - expect(rtl.getAllByRole('columnheader').map(d => d.textContent)).toEqual([ + expect(rtl.getAllByRole('columnheader').map((d) => d.textContent)).toEqual([ 'Name', 'Info', 'Name', diff --git a/packages/react-table/tests/features/useExpanded.notest.js b/packages/react-table/tests/features/useExpanded.notest.js index 3719c7c94e..7dc130486f 100644 --- a/packages/react-table/tests/features/useExpanded.notest.js +++ b/packages/react-table/tests/features/useExpanded.notest.js @@ -19,16 +19,16 @@ function Table({ columns: userColumns, data, SubComponent }) { columns: userColumns, data, }, - useExpanded + useExpanded, ) return ( <>
- {headerGroups.map(headerGroup => ( + {headerGroups.map((headerGroup) => ( - {headerGroup.headers.map(column => ( + {headerGroup.headers.map((column) => ( ))} @@ -41,7 +41,7 @@ function Table({ columns: userColumns, data, SubComponent }) { return ( - {row.cells.map(cell => { + {row.cells.map((cell) => { return ( ) @@ -87,7 +87,7 @@ function App() { Cell: ({ row: { id } }) => `Row ${id}`, }, ], - [] + [], ) return ( diff --git a/packages/react-table/tests/features/useFilters.notest.js b/packages/react-table/tests/features/useFilters.notest.js index 7db6be59f6..776f9aebd2 100644 --- a/packages/react-table/tests/features/useFilters.notest.js +++ b/packages/react-table/tests/features/useFilters.notest.js @@ -44,7 +44,7 @@ const defaultColumn = { Filter: ({ column: { filterValue, setFilter } }) => ( { + onChange={(e) => { setFilter(e.target.value || undefined) // Set undefined to remove the filter entirely }} placeholder="Search..." @@ -113,7 +113,7 @@ function App(props) { defaultColumn, }, useFilters, - useGlobalFilter + useGlobalFilter, ) const reset = () => setData(makeData()) @@ -123,9 +123,9 @@ function App(props) {
{column.render('Header')}
{cell.render('Cell')}
- {headerGroups.map(headerGroup => ( + {headerGroups.map((headerGroup) => ( - {headerGroup.headers.map(column => ( + {headerGroup.headers.map((column) => ( - {row.cells.map(cell => ( + {row.cells.map((cell) => ( ))} - ) + ), )}
{column.render('Header')} {column.canFilter ? column.render('Filter') : null} @@ -143,7 +143,7 @@ function App(props) { { + onChange={(e) => { setGlobalFilter(e.target.value || undefined) // Set undefined to remove the filter entirely }} placeholder={`Global search...`} @@ -161,11 +161,11 @@ function App(props) { (row, i) => prepareRow(row) || (
{cell.render('Cell')}
@@ -187,7 +187,7 @@ test('renders a filterable table', async () => { rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual(['firstName: tanner', 'firstName: jaylen']) fireEvent.change(filterInputs[1], { target: { value: 'er' } }) @@ -195,7 +195,7 @@ test('renders a filterable table', async () => { rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual(['firstName: derek', 'firstName: joe']) fireEvent.change(filterInputs[2], { target: { value: 'nothing' } }) @@ -203,7 +203,7 @@ test('renders a filterable table', async () => { rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual([]) fireEvent.change(filterInputs[1], { target: { value: '' } }) @@ -211,7 +211,7 @@ test('renders a filterable table', async () => { rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual([]) fireEvent.change(filterInputs[2], { target: { value: '' } }) @@ -219,7 +219,7 @@ test('renders a filterable table', async () => { rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual([ 'firstName: tanner', 'firstName: derek', @@ -232,7 +232,7 @@ test('renders a filterable table', async () => { rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual(['firstName: tanner', 'firstName: joe', 'firstName: jaylen']) fireEvent.click(resetButton) @@ -240,7 +240,7 @@ test('renders a filterable table', async () => { rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual([ 'firstName: tanner', 'firstName: derek', @@ -300,7 +300,7 @@ test('does not filter columns marked as disableFilters', () => { rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual(['firstName: joe']) fireEvent.change(filterInputs[0], { target: { value: '' } }) @@ -308,7 +308,7 @@ test('does not filter columns marked as disableFilters', () => { rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual([ 'firstName: tanner', 'firstName: derek', @@ -365,7 +365,7 @@ test('does not filter columns with GlobalFilter if marked disableGlobalFilter', rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual([ 'firstName: tanner', 'firstName: derek', @@ -379,7 +379,7 @@ test('does not filter columns with GlobalFilter if marked disableGlobalFilter', rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual(['firstName: joe']) // double check global filter ignore (should ignore joe bergevin) @@ -388,6 +388,6 @@ test('does not filter columns with GlobalFilter if marked disableGlobalFilter', rendered .queryAllByRole('row') .slice(3) - .map(row => Array.from(row.children)[0].textContent) + .map((row) => Array.from(row.children)[0].textContent), ).toEqual(['firstName: tanner', 'firstName: derek', 'firstName: jaylen']) }) diff --git a/packages/react-table/tests/features/useFiltersAndRowSelect.notest.js b/packages/react-table/tests/features/useFiltersAndRowSelect.notest.js index 0c33cfe314..cec6d0c247 100644 --- a/packages/react-table/tests/features/useFiltersAndRowSelect.notest.js +++ b/packages/react-table/tests/features/useFiltersAndRowSelect.notest.js @@ -56,7 +56,7 @@ function Table({ columns, data }) { defaultColumn, }, useFilters, - useRowSelect + useRowSelect, ) // Render the UI for your table @@ -64,9 +64,9 @@ function Table({ columns, data }) { <> - {headerGroups.map(headerGroup => ( + {headerGroups.map((headerGroup) => ( - {headerGroup.headers.map(column => ( + {headerGroup.headers.map((column) => ( - {row.cells.map(cell => { + {row.cells.map((cell) => { return ( ) })} - ) + ), )}
{column.render('Header')} {column.canFilter ? column.render('Filter') : null} @@ -80,13 +80,13 @@ function Table({ columns, data }) { (row, i) => prepareRow(row) || (
{cell.render('Cell')}
@@ -108,7 +108,7 @@ const defaultColumn = { Filter: ({ column: { filterValue, setFilter } }) => ( { + onChange={(e) => { setFilter(e.target.value || undefined) // Set undefined to remove the filter entirely }} placeholder="Search..." @@ -126,7 +126,7 @@ const IndeterminateCheckbox = React.forwardRef( }, [resolvedRef, indeterminate]) return - } + }, ) function App() { @@ -200,7 +200,7 @@ function App() { ], }, ], - [] + [], ) return @@ -208,7 +208,7 @@ function App() { test('Select/Clear All while filtered only affects visible rows', () => { const { getAllByPlaceholderText, getByLabelText, getByTestId } = render( - + , ) const selectedCount = getByTestId('selected-count') const selectAllCheckbox = getByLabelText('Select All') diff --git a/packages/react-table/tests/features/useFlexLayout.notest.js b/packages/react-table/tests/features/useFlexLayout.notest.js index 5465491185..49a72eda3f 100644 --- a/packages/react-table/tests/features/useFlexLayout.notest.js +++ b/packages/react-table/tests/features/useFlexLayout.notest.js @@ -45,15 +45,15 @@ function Table({ columns, data }) { data, defaultColumn, }, - useFlexLayout + useFlexLayout, ) return (
- {headerGroups.map(headerGroup => ( + {headerGroups.map((headerGroup) => (
- {headerGroup.headers.map(column => ( + {headerGroup.headers.map((column) => (
{column.render('Header')}
@@ -67,7 +67,7 @@ function Table({ columns, data }) { (row, i) => prepareRow(row) || (
- {row.cells.map(cell => { + {row.cells.map((cell) => { return (
{cell.render('Cell')} @@ -75,7 +75,7 @@ function Table({ columns, data }) { ) })}
- ) + ), )}
@@ -124,7 +124,7 @@ function App() { ], }, ], - [] + [], ) return
@@ -136,11 +136,11 @@ test('renders a table', () => { const [headerRow, , firstRow] = rendered.queryAllByRole('row') expect(headerRow.getAttribute('style')).toEqual( - 'display: flex; flex: 1 0 auto; min-width: 800px;' + 'display: flex; flex: 1 0 auto; min-width: 800px;', ) expect( - Array.from(firstRow.children).map(d => d.getAttribute('style')) + Array.from(firstRow.children).map((d) => d.getAttribute('style')), ).toEqual([ 'box-sizing: border-box; flex: 0 0 auto; min-width: 100px; width: 250px;', 'box-sizing: border-box; flex: 0 0 auto; min-width: 100px; width: 300px;', diff --git a/packages/react-table/tests/features/useGroupBy.notest.js b/packages/react-table/tests/features/useGroupBy.notest.js index 68d9633c33..60c4a3acfb 100644 --- a/packages/react-table/tests/features/useGroupBy.notest.js +++ b/packages/react-table/tests/features/useGroupBy.notest.js @@ -52,7 +52,7 @@ const defaultColumn = { Filter: ({ filterValue, setFilter }) => ( { + onChange={(e) => { setFilter(e.target.value || undefined) // Set undefined to remove the filter entirely }} placeholder="Search..." @@ -72,15 +72,15 @@ function Table({ columns, data }) { }, }, useGrouping, - useExpanded + useExpanded, ) return (
- {headerGroups.map(headerGroup => ( + {headerGroups.map((headerGroup) => ( - {headerGroup.headers.map(column => ( + {headerGroup.headers.map((column) => ( - {row.cells.map(cell => { + {row.cells.map((cell) => { return ( - ) + ), )}
{column.canGroup ? ( // If the column can be grouped, let's add a toggle @@ -99,7 +99,7 @@ function Table({ columns, data }) { (row, i) => prepareRow(row) || (
{cell.getIsGrouped() ? ( @@ -123,7 +123,7 @@ function Table({ columns, data }) { ) })}
@@ -137,7 +137,7 @@ function roundedMedian(leafValues) { let min = leafValues[0] || 0 let max = leafValues[0] || 0 - leafValues.forEach(value => { + leafValues.forEach((value) => { min = Math.min(min, value) max = Math.max(max, value) }) @@ -227,7 +227,7 @@ function App() { ], }, ], - [] + [], ) return diff --git a/packages/react-table/tests/features/usePagination.notest.js b/packages/react-table/tests/features/usePagination.notest.js index c1db8071fa..ce7446488a 100644 --- a/packages/react-table/tests/features/usePagination.notest.js +++ b/packages/react-table/tests/features/usePagination.notest.js @@ -73,16 +73,16 @@ function Table({ columns, data }) { data, initialState: { pageIndex: 2 }, }, - usePagination + usePagination, ) return ( <>
- {headerGroups.map(headerGroup => ( + {headerGroups.map((headerGroup) => ( - {headerGroup.headers.map(column => ( + {headerGroup.headers.map((column) => ( ))} @@ -93,13 +93,13 @@ function Table({ columns, data }) { (row, i) => prepareRow(row) || ( - {row.cells.map(cell => { + {row.cells.map((cell) => { return ( ) })} - ) + ), )}
{column.render('Header')}
{cell.render('Cell')}
@@ -127,7 +127,7 @@ function Table({ columns, data }) { { + onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 gotoPage(page) }} @@ -136,12 +136,12 @@ function Table({ columns, data }) { {' '} - } + }, ) function App() { @@ -201,7 +201,7 @@ function App() { ], }, ], - [] + [], ) return diff --git a/packages/react-table/tests/features/useRowState.notest.js b/packages/react-table/tests/features/useRowState.notest.js index 7f7043405d..abae3fc045 100644 --- a/packages/react-table/tests/features/useRowState.notest.js +++ b/packages/react-table/tests/features/useRowState.notest.js @@ -43,7 +43,9 @@ const defaultColumn = {
Row {row.id} Cell {column.id} Count {cell.state.count}{' '} @@ -61,15 +63,15 @@ function Table({ columns, data }) { initialRowStateAccessor: () => ({ count: 0 }), initialCellStateAccessor: () => ({ count: 0 }), }, - useRowState + useRowState, ) return (
- {headerGroups.map(headerGroup => ( + {headerGroups.map((headerGroup) => ( - {headerGroup.headers.map(column => ( + {headerGroup.headers.map((column) => ( ))} @@ -84,7 +86,7 @@ function Table({ columns, data }) {
Row Count {row.state.count}
- {row.cells.map(cell => ( + {row.cells.map((cell) => ( ))} - ) + ), )}
{column.render('Header')}
{cell.render('Cell')}
@@ -142,7 +144,7 @@ function App() { ], }, ], - [] + [], ) return diff --git a/packages/react-table/tests/features/withSorting.notest.tsx b/packages/react-table/tests/features/withSorting.notest.tsx index 4c3ca32754..d89cd6c9e0 100644 --- a/packages/react-table/tests/features/withSorting.notest.tsx +++ b/packages/react-table/tests/features/withSorting.notest.tsx @@ -73,7 +73,7 @@ const columns: Column[] = [ describe('withSorting', () => { it('renders a sortable table', () => { const { result } = renderHook( - options => { + (options) => { const table = useTable(options, [withCore, withSorting]) return table @@ -83,7 +83,7 @@ describe('withSorting', () => { data, columns, }, - } + }, ) expect(getHeaderIds(result.current)).toEqual([ @@ -99,7 +99,7 @@ describe('withSorting', () => { act(() => { result.current.flatHeaders - .find(d => d.id === 'firstName') + .find((d) => d.id === 'firstName') ?.getToggleSortingProps?.() .onClick({ persist: noop, @@ -114,7 +114,7 @@ describe('withSorting', () => { act(() => { result.current.flatHeaders - .find(d => d.id === 'firstName') + .find((d) => d.id === 'firstName') ?.getToggleSortingProps?.() .onClick({ persist: noop, @@ -129,7 +129,7 @@ describe('withSorting', () => { act(() => { result.current.flatHeaders - .find(d => d.id === 'progress') + .find((d) => d.id === 'progress') ?.getToggleSortingProps?.() .onClick({ persist: noop, @@ -144,7 +144,7 @@ describe('withSorting', () => { act(() => { result.current.flatHeaders - .find(d => d.id === 'firstName') + .find((d) => d.id === 'firstName') ?.getToggleSortingProps?.() .onClick({ persist: noop, @@ -161,7 +161,7 @@ describe('withSorting', () => { it('renders a controlled sorted table', () => { const { result, rerender } = renderHook( - options => { + (options) => { const table = useTable(options, [withSorting]) return table @@ -172,7 +172,7 @@ describe('withSorting', () => { columns, state: {}, }, - } + }, ) expect(getHeaderIds(result.current)).toEqual([ @@ -242,7 +242,7 @@ describe('withSorting', () => { it('renders a hoisted state sorted table', () => { const { result } = renderHook( - options => { + (options) => { const [sorting, setSorting] = React.useState([]) const table = useTable( @@ -253,7 +253,7 @@ describe('withSorting', () => { }, onSortingChange: setSorting, }, - [withSorting] + [withSorting], ) return table @@ -263,7 +263,7 @@ describe('withSorting', () => { data, columns, }, - } + }, ) expect(getHeaderIds(result.current)).toEqual([ @@ -279,7 +279,7 @@ describe('withSorting', () => { act(() => { result.current.flatHeaders - .find(d => d.id === 'firstName') + .find((d) => d.id === 'firstName') ?.getToggleSortingProps?.() .onClick({ persist: noop, @@ -294,7 +294,7 @@ describe('withSorting', () => { act(() => { result.current.flatHeaders - .find(d => d.id === 'firstName') + .find((d) => d.id === 'firstName') ?.getToggleSortingProps?.() .onClick({ persist: noop, @@ -309,7 +309,7 @@ describe('withSorting', () => { act(() => { result.current.flatHeaders - .find(d => d.id === 'progress') + .find((d) => d.id === 'progress') ?.getToggleSortingProps?.() .onClick({ persist: noop, @@ -324,7 +324,7 @@ describe('withSorting', () => { act(() => { result.current.flatHeaders - .find(d => d.id === 'firstName') + .find((d) => d.id === 'firstName') ?.getToggleSortingProps?.() .onClick({ persist: noop, diff --git a/packages/solid-table/package.json b/packages/solid-table/package.json index 235b660b19..273f5b8ce8 100644 --- a/packages/solid-table/package.json +++ b/packages/solid-table/package.json @@ -1,12 +1,12 @@ { "name": "@tanstack/solid-table", - "version": "8.20.5", + "version": "8.21.3", "description": "Headless UI for building powerful tables & datagrids for Solid.", "author": "Tanner Linsley", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/TanStack/table.git", + "url": "git+https://github.com/TanStack/table.git", "directory": "packages/solid-table" }, "homepage": "https://tanstack.com/table", diff --git a/packages/solid-table/rollup.config.mjs b/packages/solid-table/rollup.config.mjs index 4975cc7d9d..52944118b2 100644 --- a/packages/solid-table/rollup.config.mjs +++ b/packages/solid-table/rollup.config.mjs @@ -14,5 +14,5 @@ export default defineConfig( 'solid-js': 'Solid', 'solid-js/store': 'SolidStore', }, - }) + }), ) diff --git a/packages/solid-table/src/index.tsx b/packages/solid-table/src/index.tsx index a1a0244668..a0d744e5b3 100755 --- a/packages/solid-table/src/index.tsx +++ b/packages/solid-table/src/index.tsx @@ -13,7 +13,7 @@ export * from '@tanstack/table-core' export function flexRender( Comp: ((props: TProps) => JSX.Element) | JSX.Element | undefined, - props: TProps + props: TProps, ): JSX.Element { if (!Comp) return null @@ -25,7 +25,7 @@ export function flexRender( } export function createSolidTable( - options: TableOptions + options: TableOptions, ) { const resolvedOptions: TableOptionsResolved = mergeProps( { @@ -34,19 +34,19 @@ export function createSolidTable( renderFallbackValue: null, mergeOptions: ( defaultOptions: TableOptions, - options: Partial> + options: Partial>, ) => { return mergeProps(defaultOptions, options) as TableOptions }, }, - options + options, ) const table = createTable(resolvedOptions) const [state, setState] = createStore(table.initialState) createComputed(() => { - table.setOptions(prev => { + table.setOptions((prev) => { return mergeProps(prev, options, { state: mergeProps(state, options.state || {}), // Similarly, we'll maintain both our internal state and any user-provided diff --git a/packages/svelte-table/package.json b/packages/svelte-table/package.json index fd6f7c945e..af59f6dcff 100644 --- a/packages/svelte-table/package.json +++ b/packages/svelte-table/package.json @@ -1,12 +1,12 @@ { "name": "@tanstack/svelte-table", - "version": "8.20.5", + "version": "8.21.3", "description": "Headless UI for building powerful tables & datagrids for Svelte.", "author": "Tanner Linsley", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/TanStack/table.git", + "url": "git+https://github.com/TanStack/table.git", "directory": "packages/svelte-table" }, "homepage": "https://tanstack.com/table", diff --git a/packages/svelte-table/rollup.config.mjs b/packages/svelte-table/rollup.config.mjs index eaa02049df..789dc1236c 100644 --- a/packages/svelte-table/rollup.config.mjs +++ b/packages/svelte-table/rollup.config.mjs @@ -20,5 +20,5 @@ export default defineConfig( 'svelte/internal': 'SvelteInternal', 'svelte/store': 'SvelteStore', }, - }) + }), ) diff --git a/packages/svelte-table/src/index.ts b/packages/svelte-table/src/index.ts index 0a7dd157cf..5235bb571d 100755 --- a/packages/svelte-table/src/index.ts +++ b/packages/svelte-table/src/index.ts @@ -69,7 +69,7 @@ export function flexRender(component: any, props: any): ComponentType | null { type ReadableOrVal = T | Readable export function createSvelteTable( - options: ReadableOrVal> + options: ReadableOrVal>, ) { let optionsStore: Readable> @@ -90,17 +90,17 @@ export function createSvelteTable( let stateStore = writable(/** @type {number} */ table.initialState) // combine stores - let stateOptionsStore = derived([stateStore, optionsStore], s => s) + let stateOptionsStore = derived([stateStore, optionsStore], (s) => s) const tableReadable = readable(table, function start(set) { const unsubscribe = stateOptionsStore.subscribe(([state, options]) => { - table.setOptions(prev => { + table.setOptions((prev) => { return { ...prev, ...options, state: { ...state, ...options.state }, // Similarly, we'll maintain both our internal state and any user-provided // state. - onStateChange: updater => { + onStateChange: (updater) => { if (updater instanceof Function) { stateStore.update(updater) } else { diff --git a/packages/svelte-table/src/placeholder.ts b/packages/svelte-table/src/placeholder.ts index b99a4c69b8..ecac0f55e1 100644 --- a/packages/svelte-table/src/placeholder.ts +++ b/packages/svelte-table/src/placeholder.ts @@ -7,7 +7,7 @@ type X = typeof PlaceholderClient const PlaceholderServer = create_ssr_component( ($$result: any, $$props: any, $$bindings: any, slots: any) => { return `${escape($$props.content)}` - } + }, ) as any as typeof SvelteComponentDev export default typeof document === 'undefined' diff --git a/packages/svelte-table/src/render-component.ts b/packages/svelte-table/src/render-component.ts index 08f4fb1a65..b31336296d 100644 --- a/packages/svelte-table/src/render-component.ts +++ b/packages/svelte-table/src/render-component.ts @@ -49,7 +49,7 @@ function create_fragment(ctx: any, Comp: any, props: any) { function renderClient( Comp: T, - props: T extends ComponentType ? ComponentProps : any + props: T extends ComponentType ? ComponentProps : any, ) { return class WrapperComp extends SvelteComponent { constructor(options: any) { @@ -61,7 +61,7 @@ function renderClient( (ctx: any) => create_fragment(ctx, Comp, props), safe_not_equal, {}, - undefined + undefined, ) } } as ComponentType @@ -69,7 +69,7 @@ function renderClient( function renderServer( Comp: T, - props: T extends ComponentType ? ComponentProps : any + props: T extends ComponentType ? ComponentProps : any, ) { const WrapperComp = create_ssr_component( ($$result: any, $$props: any, $$bindings: any, slots: any) => { @@ -77,9 +77,9 @@ function renderServer( $$result, props, {}, - {} + {}, )}` - } + }, ) return WrapperComp as unknown as ComponentType diff --git a/packages/table-core/package.json b/packages/table-core/package.json index 7cb7f07d46..8e7a77a3b5 100644 --- a/packages/table-core/package.json +++ b/packages/table-core/package.json @@ -1,12 +1,12 @@ { "name": "@tanstack/table-core", - "version": "8.20.5", + "version": "8.21.3", "description": "Headless UI for building powerful tables & datagrids for TS/JS.", "author": "Tanner Linsley", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/TanStack/table.git", + "url": "git+https://github.com/TanStack/table.git", "directory": "packages/table-core" }, "homepage": "https://tanstack.com/table", diff --git a/packages/table-core/rollup.config.mjs b/packages/table-core/rollup.config.mjs index 6d31938690..a0b9e93c29 100644 --- a/packages/table-core/rollup.config.mjs +++ b/packages/table-core/rollup.config.mjs @@ -11,5 +11,5 @@ export default defineConfig( entryFile: 'src/index.ts', external: [], globals: {}, - }) + }), ) diff --git a/packages/table-core/src/aggregationFns.ts b/packages/table-core/src/aggregationFns.ts index 06c7f95ada..b7667aa27e 100755 --- a/packages/table-core/src/aggregationFns.ts +++ b/packages/table-core/src/aggregationFns.ts @@ -13,7 +13,7 @@ const sum: AggregationFn = (columnId, _leafRows, childRows) => { const min: AggregationFn = (columnId, _leafRows, childRows) => { let min: number | undefined - childRows.forEach(row => { + childRows.forEach((row) => { const value = row.getValue(columnId) if ( @@ -30,7 +30,7 @@ const min: AggregationFn = (columnId, _leafRows, childRows) => { const max: AggregationFn = (columnId, _leafRows, childRows) => { let max: number | undefined - childRows.forEach(row => { + childRows.forEach((row) => { const value = row.getValue(columnId) if ( value != null && @@ -47,7 +47,7 @@ const extent: AggregationFn = (columnId, _leafRows, childRows) => { let min: number | undefined let max: number | undefined - childRows.forEach(row => { + childRows.forEach((row) => { const value = row.getValue(columnId) if (value != null) { if (min === undefined) { @@ -66,10 +66,11 @@ const mean: AggregationFn = (columnId, leafRows) => { let count = 0 let sum = 0 - leafRows.forEach(row => { + leafRows.forEach((row) => { let value = row.getValue(columnId) if (value != null && (value = +value) >= value) { - ++count, (sum += value) + ++count + sum += value } }) @@ -83,7 +84,7 @@ const median: AggregationFn = (columnId, leafRows) => { return } - const values = leafRows.map(row => row.getValue(columnId)) + const values = leafRows.map((row) => row.getValue(columnId)) if (!isNumberArray(values)) { return } @@ -97,11 +98,11 @@ const median: AggregationFn = (columnId, leafRows) => { } const unique: AggregationFn = (columnId, leafRows) => { - return Array.from(new Set(leafRows.map(d => d.getValue(columnId))).values()) + return Array.from(new Set(leafRows.map((d) => d.getValue(columnId))).values()) } const uniqueCount: AggregationFn = (columnId, leafRows) => { - return new Set(leafRows.map(d => d.getValue(columnId))).size + return new Set(leafRows.map((d) => d.getValue(columnId))).size } const count: AggregationFn = (_columnId, leafRows) => { diff --git a/packages/table-core/src/columnHelper.ts b/packages/table-core/src/columnHelper.ts index 975a5e5b05..6ccd385c5e 100644 --- a/packages/table-core/src/columnHelper.ts +++ b/packages/table-core/src/columnHelper.ts @@ -62,7 +62,7 @@ export type ColumnHelper = { accessor: TAccessor, column: TAccessor extends AccessorFn ? DisplayColumnDef - : IdentifiedColumnDef + : IdentifiedColumnDef, ) => TAccessor extends AccessorFn ? AccessorFnColumnDef : AccessorKeyColumnDef @@ -85,7 +85,7 @@ export function createColumnHelper< accessorKey: accessor, } }, - display: column => column, - group: column => column, + display: (column) => column, + group: (column) => column, } } diff --git a/packages/table-core/src/core/cell.ts b/packages/table-core/src/core/cell.ts index bacd6622e4..2638e9e6f7 100644 --- a/packages/table-core/src/core/cell.ts +++ b/packages/table-core/src/core/cell.ts @@ -53,7 +53,7 @@ export function createCell( table: Table, row: Row, column: Column, - columnId: string + columnId: string, ): Cell { const getRenderValue = () => cell.getValue() ?? table.options.renderFallbackValue @@ -74,16 +74,16 @@ export function createCell( getValue: cell.getValue, renderValue: cell.renderValue, }), - getMemoOptions(table.options, 'debugCells', 'cell.getContext') + getMemoOptions(table.options, 'debugCells', 'cell.getContext'), ), } - table._features.forEach(feature => { + table._features.forEach((feature) => { feature.createCell?.( cell as Cell, column, row as Row, - table + table, ) }, {}) diff --git a/packages/table-core/src/core/column.ts b/packages/table-core/src/core/column.ts index 97ee3e68d4..cbc220b724 100644 --- a/packages/table-core/src/core/column.ts +++ b/packages/table-core/src/core/column.ts @@ -66,7 +66,7 @@ export function createColumn( table: Table, columnDef: ColumnDef, depth: number, - parent?: Column + parent?: Column, ): Column { const defaultColumn = table._getDefaultColumnDef() @@ -102,7 +102,7 @@ export function createColumn( result = result?.[key] if (process.env.NODE_ENV !== 'production' && result === undefined) { console.warn( - `"${key}" in deeply nested key "${accessorKey}" returned undefined.` + `"${key}" in deeply nested key "${accessorKey}" returned undefined.`, ) } } @@ -120,7 +120,7 @@ export function createColumn( throw new Error( resolvedColumnDef.accessorFn ? `Columns require an id when using an accessorFn` - : `Columns require an id when using a non-string header` + : `Columns require an id when using a non-string header`, ) } throw new Error() @@ -138,17 +138,17 @@ export function createColumn( () => { return [ column as Column, - ...column.columns?.flatMap(d => d.getFlatColumns()), + ...column.columns?.flatMap((d) => d.getFlatColumns()), ] }, - getMemoOptions(table.options, 'debugColumns', 'column.getFlatColumns') + getMemoOptions(table.options, 'debugColumns', 'column.getFlatColumns'), ), getLeafColumns: memo( () => [table._getOrderColumnsFn()], - orderColumns => { + (orderColumns) => { if (column.columns?.length) { - let leafColumns = column.columns.flatMap(column => - column.getLeafColumns() + let leafColumns = column.columns.flatMap((column) => + column.getLeafColumns(), ) return orderColumns(leafColumns) @@ -156,7 +156,7 @@ export function createColumn( return [column as Column] }, - getMemoOptions(table.options, 'debugColumns', 'column.getLeafColumns') + getMemoOptions(table.options, 'debugColumns', 'column.getLeafColumns'), ), } diff --git a/packages/table-core/src/core/headers.ts b/packages/table-core/src/core/headers.ts index 263da8d29d..70b9167635 100644 --- a/packages/table-core/src/core/headers.ts +++ b/packages/table-core/src/core/headers.ts @@ -219,7 +219,7 @@ function createHeader( placeholderId?: string index: number depth: number - } + }, ): Header { const id = options.id ?? column.id @@ -255,7 +255,7 @@ function createHeader( }), } - table._features.forEach(feature => { + table._features.forEach((feature) => { feature.createHeader?.(header as Header, table) }) @@ -276,27 +276,27 @@ export const Headers: TableFeature = { (allColumns, leafColumns, left, right) => { const leftColumns = left - ?.map(columnId => leafColumns.find(d => d.id === columnId)!) + ?.map((columnId) => leafColumns.find((d) => d.id === columnId)!) .filter(Boolean) ?? [] const rightColumns = right - ?.map(columnId => leafColumns.find(d => d.id === columnId)!) + ?.map((columnId) => leafColumns.find((d) => d.id === columnId)!) .filter(Boolean) ?? [] const centerColumns = leafColumns.filter( - column => !left?.includes(column.id) && !right?.includes(column.id) + (column) => !left?.includes(column.id) && !right?.includes(column.id), ) const headerGroups = buildHeaderGroups( allColumns, [...leftColumns, ...centerColumns, ...rightColumns], - table + table, ) return headerGroups }, - getMemoOptions(table.options, debug, 'getHeaderGroups') + getMemoOptions(table.options, debug, 'getHeaderGroups'), ) table.getCenterHeaderGroups = memo( @@ -308,11 +308,11 @@ export const Headers: TableFeature = { ], (allColumns, leafColumns, left, right) => { leafColumns = leafColumns.filter( - column => !left?.includes(column.id) && !right?.includes(column.id) + (column) => !left?.includes(column.id) && !right?.includes(column.id), ) return buildHeaderGroups(allColumns, leafColumns, table, 'center') }, - getMemoOptions(table.options, debug, 'getCenterHeaderGroups') + getMemoOptions(table.options, debug, 'getCenterHeaderGroups'), ) table.getLeftHeaderGroups = memo( @@ -324,12 +324,12 @@ export const Headers: TableFeature = { (allColumns, leafColumns, left) => { const orderedLeafColumns = left - ?.map(columnId => leafColumns.find(d => d.id === columnId)!) + ?.map((columnId) => leafColumns.find((d) => d.id === columnId)!) .filter(Boolean) ?? [] return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'left') }, - getMemoOptions(table.options, debug, 'getLeftHeaderGroups') + getMemoOptions(table.options, debug, 'getLeftHeaderGroups'), ) table.getRightHeaderGroups = memo( @@ -341,122 +341,122 @@ export const Headers: TableFeature = { (allColumns, leafColumns, right) => { const orderedLeafColumns = right - ?.map(columnId => leafColumns.find(d => d.id === columnId)!) + ?.map((columnId) => leafColumns.find((d) => d.id === columnId)!) .filter(Boolean) ?? [] return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'right') }, - getMemoOptions(table.options, debug, 'getRightHeaderGroups') + getMemoOptions(table.options, debug, 'getRightHeaderGroups'), ) // Footer Groups table.getFooterGroups = memo( () => [table.getHeaderGroups()], - headerGroups => { + (headerGroups) => { return [...headerGroups].reverse() }, - getMemoOptions(table.options, debug, 'getFooterGroups') + getMemoOptions(table.options, debug, 'getFooterGroups'), ) table.getLeftFooterGroups = memo( () => [table.getLeftHeaderGroups()], - headerGroups => { + (headerGroups) => { return [...headerGroups].reverse() }, - getMemoOptions(table.options, debug, 'getLeftFooterGroups') + getMemoOptions(table.options, debug, 'getLeftFooterGroups'), ) table.getCenterFooterGroups = memo( () => [table.getCenterHeaderGroups()], - headerGroups => { + (headerGroups) => { return [...headerGroups].reverse() }, - getMemoOptions(table.options, debug, 'getCenterFooterGroups') + getMemoOptions(table.options, debug, 'getCenterFooterGroups'), ) table.getRightFooterGroups = memo( () => [table.getRightHeaderGroups()], - headerGroups => { + (headerGroups) => { return [...headerGroups].reverse() }, - getMemoOptions(table.options, debug, 'getRightFooterGroups') + getMemoOptions(table.options, debug, 'getRightFooterGroups'), ) // Flat Headers table.getFlatHeaders = memo( () => [table.getHeaderGroups()], - headerGroups => { + (headerGroups) => { return headerGroups - .map(headerGroup => { + .map((headerGroup) => { return headerGroup.headers }) .flat() }, - getMemoOptions(table.options, debug, 'getFlatHeaders') + getMemoOptions(table.options, debug, 'getFlatHeaders'), ) table.getLeftFlatHeaders = memo( () => [table.getLeftHeaderGroups()], - left => { + (left) => { return left - .map(headerGroup => { + .map((headerGroup) => { return headerGroup.headers }) .flat() }, - getMemoOptions(table.options, debug, 'getLeftFlatHeaders') + getMemoOptions(table.options, debug, 'getLeftFlatHeaders'), ) table.getCenterFlatHeaders = memo( () => [table.getCenterHeaderGroups()], - left => { + (left) => { return left - .map(headerGroup => { + .map((headerGroup) => { return headerGroup.headers }) .flat() }, - getMemoOptions(table.options, debug, 'getCenterFlatHeaders') + getMemoOptions(table.options, debug, 'getCenterFlatHeaders'), ) table.getRightFlatHeaders = memo( () => [table.getRightHeaderGroups()], - left => { + (left) => { return left - .map(headerGroup => { + .map((headerGroup) => { return headerGroup.headers }) .flat() }, - getMemoOptions(table.options, debug, 'getRightFlatHeaders') + getMemoOptions(table.options, debug, 'getRightFlatHeaders'), ) // Leaf Headers table.getCenterLeafHeaders = memo( () => [table.getCenterFlatHeaders()], - flatHeaders => { - return flatHeaders.filter(header => !header.subHeaders?.length) + (flatHeaders) => { + return flatHeaders.filter((header) => !header.subHeaders?.length) }, - getMemoOptions(table.options, debug, 'getCenterLeafHeaders') + getMemoOptions(table.options, debug, 'getCenterLeafHeaders'), ) table.getLeftLeafHeaders = memo( () => [table.getLeftFlatHeaders()], - flatHeaders => { - return flatHeaders.filter(header => !header.subHeaders?.length) + (flatHeaders) => { + return flatHeaders.filter((header) => !header.subHeaders?.length) }, - getMemoOptions(table.options, debug, 'getLeftLeafHeaders') + getMemoOptions(table.options, debug, 'getLeftLeafHeaders'), ) table.getRightLeafHeaders = memo( () => [table.getRightFlatHeaders()], - flatHeaders => { - return flatHeaders.filter(header => !header.subHeaders?.length) + (flatHeaders) => { + return flatHeaders.filter((header) => !header.subHeaders?.length) }, - getMemoOptions(table.options, debug, 'getRightLeafHeaders') + getMemoOptions(table.options, debug, 'getRightLeafHeaders'), ) table.getLeafHeaders = memo( @@ -471,12 +471,12 @@ export const Headers: TableFeature = { ...(center[0]?.headers ?? []), ...(right[0]?.headers ?? []), ] - .map(header => { + .map((header) => { return header.getLeafHeaders() }) .flat() }, - getMemoOptions(table.options, debug, 'getLeafHeaders') + getMemoOptions(table.options, debug, 'getLeafHeaders'), ) }, } @@ -485,7 +485,7 @@ export function buildHeaderGroups( allColumns: Column[], columnsToGroup: Column[], table: Table, - headerFamily?: 'center' | 'left' | 'right' + headerFamily?: 'center' | 'left' | 'right', ) { // Find the max depth of the columns: // build the leaf column row @@ -499,8 +499,8 @@ export function buildHeaderGroups( maxDepth = Math.max(maxDepth, depth) columns - .filter(column => column.getIsVisible()) - .forEach(column => { + .filter((column) => column.getIsVisible()) + .forEach((column) => { if (column.columns?.length) { findMaxDepth(column.columns, depth + 1) } @@ -513,7 +513,7 @@ export function buildHeaderGroups( const createHeaderGroup = ( headersToGroup: Header[], - depth: number + depth: number, ) => { // The header group we are creating const headerGroup: HeaderGroup = { @@ -526,7 +526,7 @@ export function buildHeaderGroups( const pendingParentHeaders: Header[] = [] // Scan each column for parents - headersToGroup.forEach(headerToGroup => { + headersToGroup.forEach((headerToGroup) => { // What is the latest (last) parent column? const latestPendingParentHeader = [...pendingParentHeaders].reverse()[0] @@ -559,7 +559,7 @@ export function buildHeaderGroups( .join('_'), isPlaceholder, placeholderId: isPlaceholder - ? `${pendingParentHeaders.filter(d => d.column === column).length}` + ? `${pendingParentHeaders.filter((d) => d.column === column).length}` : undefined, depth, index: pendingParentHeaders.length, @@ -587,7 +587,7 @@ export function buildHeaderGroups( createHeader(table, column, { depth: maxDepth, index, - }) + }), ) createHeaderGroup(bottomHeaders, maxDepth - 1) @@ -599,13 +599,13 @@ export function buildHeaderGroups( // }) const recurseHeadersForSpans = ( - headers: Header[] + headers: Header[], ): { colSpan: number; rowSpan: number }[] => { - const filteredHeaders = headers.filter(header => - header.column.getIsVisible() + const filteredHeaders = headers.filter((header) => + header.column.getIsVisible(), ) - return filteredHeaders.map(header => { + return filteredHeaders.map((header) => { let colSpan = 0 let rowSpan = 0 let childRowSpans = [0] @@ -617,7 +617,7 @@ export function buildHeaderGroups( ({ colSpan: childColSpan, rowSpan: childRowSpan }) => { colSpan += childColSpan childRowSpans.push(childRowSpan) - } + }, ) } else { colSpan = 1 diff --git a/packages/table-core/src/core/row.ts b/packages/table-core/src/core/row.ts index 0af28aa94c..ec09633087 100644 --- a/packages/table-core/src/core/row.ts +++ b/packages/table-core/src/core/row.ts @@ -99,7 +99,7 @@ export const createRow = ( rowIndex: number, depth: number, subRows?: Row[], - parentId?: string + parentId?: string, ): Row => { let row: CoreRow = { id, @@ -109,7 +109,7 @@ export const createRow = ( parentId, _valuesCache: {}, _uniqueValuesCache: {}, - getValue: columnId => { + getValue: (columnId) => { if (row._valuesCache.hasOwnProperty(columnId)) { return row._valuesCache[columnId] } @@ -122,12 +122,12 @@ export const createRow = ( row._valuesCache[columnId] = column.accessorFn( row.original as TData, - rowIndex + rowIndex, ) return row._valuesCache[columnId] as any }, - getUniqueValues: columnId => { + getUniqueValues: (columnId) => { if (row._uniqueValuesCache.hasOwnProperty(columnId)) { return row._uniqueValuesCache[columnId] } @@ -145,15 +145,15 @@ export const createRow = ( row._uniqueValuesCache[columnId] = column.columnDef.getUniqueValues( row.original as TData, - rowIndex + rowIndex, ) return row._uniqueValuesCache[columnId] as any }, - renderValue: columnId => + renderValue: (columnId) => row.getValue(columnId) ?? table.options.renderFallbackValue, subRows: subRows ?? [], - getLeafRows: () => flattenBy(row.subRows, d => d.subRows), + getLeafRows: () => flattenBy(row.subRows, (d) => d.subRows), getParentRow: () => row.parentId ? table.getRow(row.parentId, true) : undefined, getParentRows: () => { @@ -169,26 +169,26 @@ export const createRow = ( }, getAllCells: memo( () => [table.getAllLeafColumns()], - leafColumns => { - return leafColumns.map(column => { + (leafColumns) => { + return leafColumns.map((column) => { return createCell(table, row as Row, column, column.id) }) }, - getMemoOptions(table.options, 'debugRows', 'getAllCells') + getMemoOptions(table.options, 'debugRows', 'getAllCells'), ), _getAllCellsByColumnId: memo( () => [row.getAllCells()], - allCells => { + (allCells) => { return allCells.reduce( (acc, cell) => { acc[cell.column.id] = cell return acc }, - {} as Record> + {} as Record>, ) }, - getMemoOptions(table.options, 'debugRows', 'getAllCellsByColumnId') + getMemoOptions(table.options, 'debugRows', 'getAllCellsByColumnId'), ), } diff --git a/packages/table-core/src/core/table.ts b/packages/table-core/src/core/table.ts index 00d62da98f..75702bda53 100644 --- a/packages/table-core/src/core/table.ts +++ b/packages/table-core/src/core/table.ts @@ -163,7 +163,7 @@ export interface CoreOptions { */ mergeOptions?: ( defaultOptions: TableOptions, - options: Partial> + options: Partial>, ) => TableOptions /** * You can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`. @@ -281,7 +281,7 @@ export interface CoreInstance { } export function createTable( - options: TableOptionsResolved + options: TableOptionsResolved, ): Table { if ( process.env.NODE_ENV !== 'production' && @@ -316,7 +316,7 @@ export function createTable( ...(options.initialState ?? {}), } as TableState - table._features.forEach(feature => { + table._features.forEach((feature) => { initialState = (feature.getInitialState?.(initialState) ?? initialState) as TableState }) @@ -331,7 +331,7 @@ export function createTable( ...options, }, initialState, - _queue: cb => { + _queue: (cb) => { queued.push(cb) if (!queuedTimeout) { @@ -346,17 +346,17 @@ export function createTable( } queuedTimeout = false }) - .catch(error => + .catch((error) => setTimeout(() => { throw error - }) + }), ) } }, reset: () => { table.setState(table.initialState) }, - setOptions: updater => { + setOptions: (updater) => { const newOptions = functionalUpdate(updater, table.options) table.options = mergeOptions(newOptions) as RequiredKeys< TableOptionsResolved, @@ -410,13 +410,13 @@ export function createTable( }, _getDefaultColumnDef: memo( () => [table.options.defaultColumn], - defaultColumn => { + (defaultColumn) => { defaultColumn = (defaultColumn ?? {}) as Partial< ColumnDef > return { - header: props => { + header: (props) => { const resolvedColumnDef = props.header.column .columnDef as ColumnDefResolved @@ -431,27 +431,27 @@ export function createTable( return null }, // footer: props => props.header.column.id, - cell: props => props.renderValue()?.toString?.() ?? null, + cell: (props) => props.renderValue()?.toString?.() ?? null, ...table._features.reduce((obj, feature) => { return Object.assign(obj, feature.getDefaultColumnDef?.()) }, {}), ...defaultColumn, } as Partial> }, - getMemoOptions(options, 'debugColumns', '_getDefaultColumnDef') + getMemoOptions(options, 'debugColumns', '_getDefaultColumnDef'), ), _getColumnDefs: () => table.options.columns, getAllColumns: memo( () => [table._getColumnDefs()], - columnDefs => { + (columnDefs) => { const recurseColumns = ( columnDefs: ColumnDef[], parent?: Column, - depth = 0 + depth = 0, ): Column[] => { - return columnDefs.map(columnDef => { + return columnDefs.map((columnDef) => { const column = createColumn(table, columnDef, depth, parent) const groupingColumnDef = columnDef as GroupColumnDef< @@ -469,43 +469,45 @@ export function createTable( return recurseColumns(columnDefs) }, - getMemoOptions(options, 'debugColumns', 'getAllColumns') + getMemoOptions(options, 'debugColumns', 'getAllColumns'), ), getAllFlatColumns: memo( () => [table.getAllColumns()], - allColumns => { - return allColumns.flatMap(column => { + (allColumns) => { + return allColumns.flatMap((column) => { return column.getFlatColumns() }) }, - getMemoOptions(options, 'debugColumns', 'getAllFlatColumns') + getMemoOptions(options, 'debugColumns', 'getAllFlatColumns'), ), _getAllFlatColumnsById: memo( () => [table.getAllFlatColumns()], - flatColumns => { + (flatColumns) => { return flatColumns.reduce( (acc, column) => { acc[column.id] = column return acc }, - {} as Record> + {} as Record>, ) }, - getMemoOptions(options, 'debugColumns', 'getAllFlatColumnsById') + getMemoOptions(options, 'debugColumns', 'getAllFlatColumnsById'), ), getAllLeafColumns: memo( () => [table.getAllColumns(), table._getOrderColumnsFn()], (allColumns, orderColumns) => { - let leafColumns = allColumns.flatMap(column => column.getLeafColumns()) + let leafColumns = allColumns.flatMap((column) => + column.getLeafColumns(), + ) return orderColumns(leafColumns) }, - getMemoOptions(options, 'debugColumns', 'getAllLeafColumns') + getMemoOptions(options, 'debugColumns', 'getAllLeafColumns'), ), - getColumn: columnId => { + getColumn: (columnId) => { const column = table._getAllFlatColumnsById()[columnId] if (process.env.NODE_ENV !== 'production' && !column) { diff --git a/packages/table-core/src/features/ColumnFaceting.ts b/packages/table-core/src/features/ColumnFaceting.ts index 1997d0c9ad..f356252deb 100644 --- a/packages/table-core/src/features/ColumnFaceting.ts +++ b/packages/table-core/src/features/ColumnFaceting.ts @@ -31,15 +31,15 @@ export interface FacetedColumn { export interface FacetedOptions { getFacetedMinMaxValues?: ( table: Table, - columnId: string + columnId: string, ) => () => undefined | [number, number] getFacetedRowModel?: ( table: Table, - columnId: string + columnId: string, ) => () => RowModel getFacetedUniqueValues?: ( table: Table, - columnId: string + columnId: string, ) => () => Map } @@ -48,7 +48,7 @@ export interface FacetedOptions { export const ColumnFaceting: TableFeature = { createColumn: ( column: Column, - table: Table + table: Table, ): void => { column._getFacetedRowModel = table.options.getFacetedRowModel && diff --git a/packages/table-core/src/features/ColumnFiltering.ts b/packages/table-core/src/features/ColumnFiltering.ts index 24ebaedaf6..77b9927c04 100644 --- a/packages/table-core/src/features/ColumnFiltering.ts +++ b/packages/table-core/src/features/ColumnFiltering.ts @@ -35,7 +35,7 @@ export interface FilterFn { row: Row, columnId: string, filterValue: any, - addMeta: (meta: FilterMeta) => void + addMeta: (meta: FilterMeta) => void, ): boolean autoRemove?: ColumnFilterAutoRemoveTestFn resolveFilterValue?: TransformFilterValueFn @@ -43,12 +43,12 @@ export interface FilterFn { export type TransformFilterValueFn = ( value: any, - column?: Column + column?: Column, ) => unknown export type ColumnFilterAutoRemoveTestFn = ( value: any, - column?: Column + column?: Column, ) => boolean export type CustomFilterFns = Record< @@ -195,8 +195,7 @@ type ResolvedFilterFns = keyof FilterFns extends never } export interface ColumnFiltersOptions - extends ColumnFiltersOptionsBase, - ResolvedFilterFns {} + extends ColumnFiltersOptionsBase, ResolvedFilterFns {} export interface ColumnFiltersInstance { _getFilteredRowModel?: () => RowModel @@ -257,7 +256,7 @@ export const ColumnFiltering: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): ColumnFiltersOptions => { return { onColumnFiltersChange: makeStateUpdater('columnFilters', table), @@ -268,7 +267,7 @@ export const ColumnFiltering: TableFeature = { createColumn: ( column: Column, - table: Table + table: Table, ): void => { column.getAutoFilterFn = () => { const firstRow = table.getCoreRowModel().flatRows[0] @@ -303,8 +302,8 @@ export const ColumnFiltering: TableFeature = { : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : // @ts-ignore - table.options.filterFns?.[column.columnDef.filterFn as string] ?? - filterFns[column.columnDef.filterFn as BuiltInFilterFn] + (table.options.filterFns?.[column.columnDef.filterFn as string] ?? + filterFns[column.columnDef.filterFn as BuiltInFilterFn]) } column.getCanFilter = () => { return ( @@ -318,33 +317,33 @@ export const ColumnFiltering: TableFeature = { column.getIsFiltered = () => column.getFilterIndex() > -1 column.getFilterValue = () => - table.getState().columnFilters?.find(d => d.id === column.id)?.value + table.getState().columnFilters?.find((d) => d.id === column.id)?.value column.getFilterIndex = () => - table.getState().columnFilters?.findIndex(d => d.id === column.id) ?? -1 + table.getState().columnFilters?.findIndex((d) => d.id === column.id) ?? -1 - column.setFilterValue = value => { - table.setColumnFilters(old => { + column.setFilterValue = (value) => { + table.setColumnFilters((old) => { const filterFn = column.getFilterFn() - const previousFilter = old?.find(d => d.id === column.id) + const previousFilter = old?.find((d) => d.id === column.id) const newFilter = functionalUpdate( value, - previousFilter ? previousFilter.value : undefined + previousFilter ? previousFilter.value : undefined, ) // if ( shouldAutoRemoveFilter(filterFn as FilterFn, newFilter, column) ) { - return old?.filter(d => d.id !== column.id) ?? [] + return old?.filter((d) => d.id !== column.id) ?? [] } const newFilterObj = { id: column.id, value: newFilter } if (previousFilter) { return ( - old?.map(d => { + old?.map((d) => { if (d.id === column.id) { return newFilterObj } @@ -364,7 +363,7 @@ export const ColumnFiltering: TableFeature = { createRow: ( row: Row, - _table: Table + _table: Table, ): void => { row.columnFilters = {} row.columnFiltersMeta = {} @@ -375,8 +374,8 @@ export const ColumnFiltering: TableFeature = { const leafColumns = table.getAllLeafColumns() const updateFn = (old: ColumnFiltersState) => { - return functionalUpdate(updater, old)?.filter(filter => { - const column = leafColumns.find(d => d.id === filter.id) + return functionalUpdate(updater, old)?.filter((filter) => { + const column = leafColumns.find((d) => d.id === filter.id) if (column) { const filterFn = column.getFilterFn() @@ -393,9 +392,9 @@ export const ColumnFiltering: TableFeature = { table.options.onColumnFiltersChange?.(updateFn) } - table.resetColumnFilters = defaultState => { + table.resetColumnFilters = (defaultState) => { table.setColumnFilters( - defaultState ? [] : table.initialState?.columnFilters ?? [] + defaultState ? [] : (table.initialState?.columnFilters ?? []), ) } @@ -417,7 +416,7 @@ export const ColumnFiltering: TableFeature = { export function shouldAutoRemoveFilter( filterFn?: FilterFn, value?: any, - column?: Column + column?: Column, ) { return ( (filterFn && filterFn.autoRemove diff --git a/packages/table-core/src/features/ColumnGrouping.ts b/packages/table-core/src/features/ColumnGrouping.ts index 21e8781cc2..58b9fa082b 100644 --- a/packages/table-core/src/features/ColumnGrouping.ts +++ b/packages/table-core/src/features/ColumnGrouping.ts @@ -23,7 +23,7 @@ export interface GroupingTableState { export type AggregationFn = ( columnId: string, leafRows: Row[], - childRows: Row[] + childRows: Row[], ) => any export type CustomAggregationFns = Record> @@ -204,8 +204,7 @@ type ResolvedAggregationFns = keyof AggregationFns extends never } export interface GroupingOptions - extends GroupingOptionsBase, - ResolvedAggregationFns {} + extends GroupingOptionsBase, ResolvedAggregationFns {} export type GroupingColumnMode = false | 'reorder' | 'remove' @@ -245,7 +244,8 @@ export const ColumnGrouping: TableFeature = { unknown > => { return { - aggregatedCell: props => (props.getValue() as any)?.toString?.() ?? null, + aggregatedCell: (props) => + (props.getValue() as any)?.toString?.() ?? null, aggregationFn: 'auto', } }, @@ -258,7 +258,7 @@ export const ColumnGrouping: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): GroupingOptions => { return { onGroupingChange: makeStateUpdater('grouping', table), @@ -268,13 +268,13 @@ export const ColumnGrouping: TableFeature = { createColumn: ( column: Column, - table: Table + table: Table, ): void => { column.toggleGrouping = () => { - table.setGrouping(old => { + table.setGrouping((old) => { // Find any existing grouping for this column if (old?.includes(column.id)) { - return old.filter(d => d !== column.id) + return old.filter((d) => d !== column.id) } return [...(old ?? []), column.id] @@ -325,20 +325,22 @@ export const ColumnGrouping: TableFeature = { ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() - : table.options.aggregationFns?.[ + : (table.options.aggregationFns?.[ column.columnDef.aggregationFn as string ] ?? aggregationFns[ column.columnDef.aggregationFn as BuiltInAggregationFn - ] + ]) } }, createTable: (table: Table): void => { - table.setGrouping = updater => table.options.onGroupingChange?.(updater) + table.setGrouping = (updater) => table.options.onGroupingChange?.(updater) - table.resetGrouping = defaultState => { - table.setGrouping(defaultState ? [] : table.initialState?.grouping ?? []) + table.resetGrouping = (defaultState) => { + table.setGrouping( + defaultState ? [] : (table.initialState?.grouping ?? []), + ) } table.getPreGroupedRowModel = () => table.getFilteredRowModel() @@ -357,10 +359,10 @@ export const ColumnGrouping: TableFeature = { createRow: ( row: Row, - table: Table + table: Table, ): void => { row.getIsGrouped = () => !!row.groupingColumnId - row.getGroupingValue = columnId => { + row.getGroupingValue = (columnId) => { if (row._groupingValuesCache.hasOwnProperty(columnId)) { return row._groupingValuesCache[columnId] } @@ -372,7 +374,7 @@ export const ColumnGrouping: TableFeature = { } row._groupingValuesCache[columnId] = column.columnDef.getGroupingValue( - row.original + row.original, ) return row._groupingValuesCache[columnId] @@ -384,7 +386,7 @@ export const ColumnGrouping: TableFeature = { cell: Cell, column: Column, row: Row, - table: Table + table: Table, ): void => { const getRenderValue = () => cell.getValue() ?? table.options.renderFallbackValue @@ -400,14 +402,14 @@ export const ColumnGrouping: TableFeature = { export function orderColumns( leafColumns: Column[], grouping: string[], - groupedColumnMode?: GroupingColumnMode + groupedColumnMode?: GroupingColumnMode, ) { if (!grouping?.length || !groupedColumnMode) { return leafColumns } const nonGroupingColumns = leafColumns.filter( - col => !grouping.includes(col.id) + (col) => !grouping.includes(col.id), ) if (groupedColumnMode === 'remove') { @@ -415,7 +417,7 @@ export function orderColumns( } const groupingColumns = grouping - .map(g => leafColumns.find(col => col.id === g)!) + .map((g) => leafColumns.find((col) => col.id === g)!) .filter(Boolean) return [...groupingColumns, ...nonGroupingColumns] diff --git a/packages/table-core/src/features/ColumnOrdering.ts b/packages/table-core/src/features/ColumnOrdering.ts index c64370ef15..cd4fc9626d 100644 --- a/packages/table-core/src/features/ColumnOrdering.ts +++ b/packages/table-core/src/features/ColumnOrdering.ts @@ -54,7 +54,7 @@ export interface ColumnOrderDefaultOptions { export interface ColumnOrderInstance { _getOrderColumnsFn: () => ( - columns: Column[] + columns: Column[], ) => Column[] /** * Resets the **columnOrder** state to `initialState.columnOrder`, or `true` can be passed to force a default blank state reset to `[]`. @@ -81,7 +81,7 @@ export const ColumnOrdering: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): ColumnOrderDefaultOptions => { return { onColumnOrderChange: makeStateUpdater('columnOrder', table), @@ -90,29 +90,29 @@ export const ColumnOrdering: TableFeature = { createColumn: ( column: Column, - table: Table + table: Table, ): void => { column.getIndex = memo( - position => [_getVisibleLeafColumns(table, position)], - columns => columns.findIndex(d => d.id === column.id), - getMemoOptions(table.options, 'debugColumns', 'getIndex') + (position) => [_getVisibleLeafColumns(table, position)], + (columns) => columns.findIndex((d) => d.id === column.id), + getMemoOptions(table.options, 'debugColumns', 'getIndex'), ) - column.getIsFirstColumn = position => { + column.getIsFirstColumn = (position) => { const columns = _getVisibleLeafColumns(table, position) return columns[0]?.id === column.id } - column.getIsLastColumn = position => { + column.getIsLastColumn = (position) => { const columns = _getVisibleLeafColumns(table, position) return columns[columns.length - 1]?.id === column.id } }, createTable: (table: Table): void => { - table.setColumnOrder = updater => + table.setColumnOrder = (updater) => table.options.onColumnOrderChange?.(updater) - table.resetColumnOrder = defaultState => { + table.resetColumnOrder = (defaultState) => { table.setColumnOrder( - defaultState ? [] : table.initialState.columnOrder ?? [] + defaultState ? [] : (table.initialState.columnOrder ?? []), ) } table._getOrderColumnsFn = memo( @@ -142,7 +142,7 @@ export const ColumnOrdering: TableFeature = { while (columnsCopy.length && columnOrderCopy.length) { const targetColumnId = columnOrderCopy.shift() const foundIndex = columnsCopy.findIndex( - d => d.id === targetColumnId + (d) => d.id === targetColumnId, ) if (foundIndex > -1) { orderedColumns.push(columnsCopy.splice(foundIndex, 1)[0]!) @@ -155,7 +155,7 @@ export const ColumnOrdering: TableFeature = { return orderColumns(orderedColumns, grouping, groupedColumnMode) }, - getMemoOptions(table.options, 'debugTable', '_getOrderColumnsFn') + getMemoOptions(table.options, 'debugTable', '_getOrderColumnsFn'), ) }, } diff --git a/packages/table-core/src/features/ColumnPinning.ts b/packages/table-core/src/features/ColumnPinning.ts index 1c0ef70799..0a1b6e185f 100644 --- a/packages/table-core/src/features/ColumnPinning.ts +++ b/packages/table-core/src/features/ColumnPinning.ts @@ -159,7 +159,7 @@ export const ColumnPinning: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): ColumnPinningDefaultOptions => { return { onColumnPinningChange: makeStateUpdater('columnPinning', table), @@ -168,20 +168,20 @@ export const ColumnPinning: TableFeature = { createColumn: ( column: Column, - table: Table + table: Table, ): void => { - column.pin = position => { + column.pin = (position) => { const columnIds = column .getLeafColumns() - .map(d => d.id) + .map((d) => d.id) .filter(Boolean) as string[] - table.setColumnPinning(old => { + table.setColumnPinning((old) => { if (position === 'right') { return { - left: (old?.left ?? []).filter(d => !columnIds?.includes(d)), + left: (old?.left ?? []).filter((d) => !columnIds?.includes(d)), right: [ - ...(old?.right ?? []).filter(d => !columnIds?.includes(d)), + ...(old?.right ?? []).filter((d) => !columnIds?.includes(d)), ...columnIds, ], } @@ -190,16 +190,16 @@ export const ColumnPinning: TableFeature = { if (position === 'left') { return { left: [ - ...(old?.left ?? []).filter(d => !columnIds?.includes(d)), + ...(old?.left ?? []).filter((d) => !columnIds?.includes(d)), ...columnIds, ], - right: (old?.right ?? []).filter(d => !columnIds?.includes(d)), + right: (old?.right ?? []).filter((d) => !columnIds?.includes(d)), } } return { - left: (old?.left ?? []).filter(d => !columnIds?.includes(d)), - right: (old?.right ?? []).filter(d => !columnIds?.includes(d)), + left: (old?.left ?? []).filter((d) => !columnIds?.includes(d)), + right: (old?.right ?? []).filter((d) => !columnIds?.includes(d)), } }) } @@ -208,21 +208,21 @@ export const ColumnPinning: TableFeature = { const leafColumns = column.getLeafColumns() return leafColumns.some( - d => + (d) => (d.columnDef.enablePinning ?? true) && (table.options.enableColumnPinning ?? table.options.enablePinning ?? - true) + true), ) } column.getIsPinned = () => { - const leafColumnIds = column.getLeafColumns().map(d => d.id) + const leafColumnIds = column.getLeafColumns().map((d) => d.id) const { left, right } = table.getState().columnPinning - const isLeft = leafColumnIds.some(d => left?.includes(d)) - const isRight = leafColumnIds.some(d => right?.includes(d)) + const isLeft = leafColumnIds.some((d) => left?.includes(d)) + const isRight = leafColumnIds.some((d) => right?.includes(d)) return isLeft ? 'left' : isRight ? 'right' : false } @@ -231,14 +231,14 @@ export const ColumnPinning: TableFeature = { const position = column.getIsPinned() return position - ? table.getState().columnPinning?.[position]?.indexOf(column.id) ?? -1 + ? (table.getState().columnPinning?.[position]?.indexOf(column.id) ?? -1) : 0 } }, createRow: ( row: Row, - table: Table + table: Table, ): void => { row.getCenterVisibleCells = memo( () => [ @@ -249,48 +249,53 @@ export const ColumnPinning: TableFeature = { (allCells, left, right) => { const leftAndRight: string[] = [...(left ?? []), ...(right ?? [])] - return allCells.filter(d => !leftAndRight.includes(d.column.id)) + return allCells.filter((d) => !leftAndRight.includes(d.column.id)) }, - getMemoOptions(table.options, 'debugRows', 'getCenterVisibleCells') + getMemoOptions(table.options, 'debugRows', 'getCenterVisibleCells'), ) row.getLeftVisibleCells = memo( () => [row._getAllVisibleCells(), table.getState().columnPinning.left], (allCells, left) => { const cells = (left ?? []) - .map(columnId => allCells.find(cell => cell.column.id === columnId)!) + .map( + (columnId) => allCells.find((cell) => cell.column.id === columnId)!, + ) .filter(Boolean) - .map(d => ({ ...d, position: 'left' }) as Cell) + .map((d) => ({ ...d, position: 'left' }) as Cell) return cells }, - getMemoOptions(table.options, 'debugRows', 'getLeftVisibleCells') + getMemoOptions(table.options, 'debugRows', 'getLeftVisibleCells'), ) row.getRightVisibleCells = memo( () => [row._getAllVisibleCells(), table.getState().columnPinning.right], (allCells, right) => { const cells = (right ?? []) - .map(columnId => allCells.find(cell => cell.column.id === columnId)!) + .map( + (columnId) => allCells.find((cell) => cell.column.id === columnId)!, + ) .filter(Boolean) - .map(d => ({ ...d, position: 'right' }) as Cell) + .map((d) => ({ ...d, position: 'right' }) as Cell) return cells }, - getMemoOptions(table.options, 'debugRows', 'getRightVisibleCells') + getMemoOptions(table.options, 'debugRows', 'getRightVisibleCells'), ) }, createTable: (table: Table): void => { - table.setColumnPinning = updater => + table.setColumnPinning = (updater) => table.options.onColumnPinningChange?.(updater) - table.resetColumnPinning = defaultState => + table.resetColumnPinning = (defaultState) => table.setColumnPinning( defaultState ? getDefaultColumnPinningState() - : table.initialState?.columnPinning ?? getDefaultColumnPinningState() + : (table.initialState?.columnPinning ?? + getDefaultColumnPinningState()), ) - table.getIsSomeColumnsPinned = position => { + table.getIsSomeColumnsPinned = (position) => { const pinningState = table.getState().columnPinning if (!position) { @@ -303,20 +308,24 @@ export const ColumnPinning: TableFeature = { () => [table.getAllLeafColumns(), table.getState().columnPinning.left], (allColumns, left) => { return (left ?? []) - .map(columnId => allColumns.find(column => column.id === columnId)!) + .map( + (columnId) => allColumns.find((column) => column.id === columnId)!, + ) .filter(Boolean) }, - getMemoOptions(table.options, 'debugColumns', 'getLeftLeafColumns') + getMemoOptions(table.options, 'debugColumns', 'getLeftLeafColumns'), ) table.getRightLeafColumns = memo( () => [table.getAllLeafColumns(), table.getState().columnPinning.right], (allColumns, right) => { return (right ?? []) - .map(columnId => allColumns.find(column => column.id === columnId)!) + .map( + (columnId) => allColumns.find((column) => column.id === columnId)!, + ) .filter(Boolean) }, - getMemoOptions(table.options, 'debugColumns', 'getRightLeafColumns') + getMemoOptions(table.options, 'debugColumns', 'getRightLeafColumns'), ) table.getCenterLeafColumns = memo( @@ -328,9 +337,9 @@ export const ColumnPinning: TableFeature = { (allColumns, left, right) => { const leftAndRight: string[] = [...(left ?? []), ...(right ?? [])] - return allColumns.filter(d => !leftAndRight.includes(d.id)) + return allColumns.filter((d) => !leftAndRight.includes(d.id)) }, - getMemoOptions(table.options, 'debugColumns', 'getCenterLeafColumns') + getMemoOptions(table.options, 'debugColumns', 'getCenterLeafColumns'), ) }, } diff --git a/packages/table-core/src/features/ColumnSizing.ts b/packages/table-core/src/features/ColumnSizing.ts index 3cce2ddcb2..a707b52a0b 100644 --- a/packages/table-core/src/features/ColumnSizing.ts +++ b/packages/table-core/src/features/ColumnSizing.ts @@ -10,6 +10,7 @@ import { } from '../types' import { getMemoOptions, makeStateUpdater, memo } from '../utils' import { ColumnPinningPosition } from './ColumnPinning' +import { safelyAccessDocument } from '../utils/document' // @@ -244,7 +245,7 @@ export const ColumnSizing: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): ColumnSizingDefaultOptions => { return { columnResizeMode: 'onEnd', @@ -256,7 +257,7 @@ export const ColumnSizing: TableFeature = { createColumn: ( column: Column, - table: Table + table: Table, ): void => { column.getSize = () => { const columnSize = table.getState().columnSizing[column.id] @@ -264,14 +265,14 @@ export const ColumnSizing: TableFeature = { return Math.min( Math.max( column.columnDef.minSize ?? defaultColumnSizing.minSize, - columnSize ?? column.columnDef.size ?? defaultColumnSizing.size + columnSize ?? column.columnDef.size ?? defaultColumnSizing.size, ), - column.columnDef.maxSize ?? defaultColumnSizing.maxSize + column.columnDef.maxSize ?? defaultColumnSizing.maxSize, ) } column.getStart = memo( - position => [ + (position) => [ position, _getVisibleLeafColumns(table, position), table.getState().columnSizing, @@ -280,11 +281,11 @@ export const ColumnSizing: TableFeature = { columns .slice(0, column.getIndex(position)) .reduce((sum, column) => sum + column.getSize(), 0), - getMemoOptions(table.options, 'debugColumns', 'getStart') + getMemoOptions(table.options, 'debugColumns', 'getStart'), ) column.getAfter = memo( - position => [ + (position) => [ position, _getVisibleLeafColumns(table, position), table.getState().columnSizing, @@ -293,7 +294,7 @@ export const ColumnSizing: TableFeature = { columns .slice(column.getIndex(position) + 1) .reduce((sum, column) => sum + column.getSize(), 0), - getMemoOptions(table.options, 'debugColumns', 'getAfter') + getMemoOptions(table.options, 'debugColumns', 'getAfter'), ) column.resetSize = () => { @@ -314,7 +315,7 @@ export const ColumnSizing: TableFeature = { createHeader: ( header: Header, - table: Table + table: Table, ): void => { header.getSize = () => { let sum = 0 @@ -339,7 +340,7 @@ export const ColumnSizing: TableFeature = { return 0 } - header.getResizeHandler = _contextDocument => { + header.getResizeHandler = (_contextDocument) => { const column = table.getColumn(header.column.id) const canResize = column?.getCanResize() @@ -360,7 +361,9 @@ export const ColumnSizing: TableFeature = { const startSize = header.getSize() const columnSizingStart: [string, number][] = header - ? header.getLeafHeaders().map(d => [d.column.id, d.column.getSize()]) + ? header + .getLeafHeaders() + .map((d) => [d.column.id, d.column.getSize()]) : [[column.id, column.getSize()]] const clientX = isTouchStartEvent(e) @@ -371,26 +374,26 @@ export const ColumnSizing: TableFeature = { const updateOffset = ( eventType: 'move' | 'end', - clientXPos?: number + clientXPos?: number, ) => { if (typeof clientXPos !== 'number') { return } - table.setColumnSizingInfo(old => { + table.setColumnSizingInfo((old) => { const deltaDirection = table.options.columnResizeDirection === 'rtl' ? -1 : 1 const deltaOffset = (clientXPos - (old?.startOffset ?? 0)) * deltaDirection const deltaPercentage = Math.max( deltaOffset / (old?.startSize ?? 0), - -0.999999 + -0.999999, ) old.columnSizingStart.forEach(([columnId, headerSize]) => { newColumnSizing[columnId] = Math.round( - Math.max(headerSize + headerSize * deltaPercentage, 0) * 100 + Math.max(headerSize + headerSize * deltaPercentage, 0) * 100, ) / 100 }) @@ -405,7 +408,7 @@ export const ColumnSizing: TableFeature = { table.options.columnResizeMode === 'onChange' || eventType === 'end' ) { - table.setColumnSizing(old => ({ + table.setColumnSizing((old) => ({ ...old, ...newColumnSizing, })) @@ -417,7 +420,7 @@ export const ColumnSizing: TableFeature = { const onEnd = (clientXPos?: number) => { updateOffset('end', clientXPos) - table.setColumnSizingInfo(old => ({ + table.setColumnSizingInfo((old) => ({ ...old, isResizingColumn: false, startOffset: null, @@ -428,19 +431,18 @@ export const ColumnSizing: TableFeature = { })) } - const contextDocument = - _contextDocument || typeof document !== 'undefined' ? document : null + const contextDocument = safelyAccessDocument(_contextDocument) const mouseEvents = { moveHandler: (e: MouseEvent) => onMove(e.clientX), upHandler: (e: MouseEvent) => { contextDocument?.removeEventListener( 'mousemove', - mouseEvents.moveHandler + mouseEvents.moveHandler, ) contextDocument?.removeEventListener( 'mouseup', - mouseEvents.upHandler + mouseEvents.upHandler, ) onEnd(e.clientX) }, @@ -458,11 +460,11 @@ export const ColumnSizing: TableFeature = { upHandler: (e: TouchEvent) => { contextDocument?.removeEventListener( 'touchmove', - touchEvents.moveHandler + touchEvents.moveHandler, ) contextDocument?.removeEventListener( 'touchend', - touchEvents.upHandler + touchEvents.upHandler, ) if (e.cancelable) { e.preventDefault() @@ -480,27 +482,27 @@ export const ColumnSizing: TableFeature = { contextDocument?.addEventListener( 'touchmove', touchEvents.moveHandler, - passiveIfSupported + passiveIfSupported, ) contextDocument?.addEventListener( 'touchend', touchEvents.upHandler, - passiveIfSupported + passiveIfSupported, ) } else { contextDocument?.addEventListener( 'mousemove', mouseEvents.moveHandler, - passiveIfSupported + passiveIfSupported, ) contextDocument?.addEventListener( 'mouseup', mouseEvents.upHandler, - passiveIfSupported + passiveIfSupported, ) } - table.setColumnSizingInfo(old => ({ + table.setColumnSizingInfo((old) => ({ ...old, startOffset: clientX, startSize, @@ -514,21 +516,21 @@ export const ColumnSizing: TableFeature = { }, createTable: (table: Table): void => { - table.setColumnSizing = updater => + table.setColumnSizing = (updater) => table.options.onColumnSizingChange?.(updater) - table.setColumnSizingInfo = updater => + table.setColumnSizingInfo = (updater) => table.options.onColumnSizingInfoChange?.(updater) - table.resetColumnSizing = defaultState => { + table.resetColumnSizing = (defaultState) => { table.setColumnSizing( - defaultState ? {} : table.initialState.columnSizing ?? {} + defaultState ? {} : (table.initialState.columnSizing ?? {}), ) } - table.resetHeaderSizeInfo = defaultState => { + table.resetHeaderSizeInfo = (defaultState) => { table.setColumnSizingInfo( defaultState ? getDefaultColumnSizingInfoState() - : table.initialState.columnSizingInfo ?? - getDefaultColumnSizingInfoState() + : (table.initialState.columnSizingInfo ?? + getDefaultColumnSizingInfoState()), ) } table.getTotalSize = () => diff --git a/packages/table-core/src/features/ColumnVisibility.ts b/packages/table-core/src/features/ColumnVisibility.ts index f37e57be8e..6045c5682a 100644 --- a/packages/table-core/src/features/ColumnVisibility.ts +++ b/packages/table-core/src/features/ColumnVisibility.ts @@ -158,7 +158,7 @@ export const ColumnVisibility: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): VisibilityDefaultOptions => { return { onColumnVisibilityChange: makeStateUpdater('columnVisibility', table), @@ -167,11 +167,11 @@ export const ColumnVisibility: TableFeature = { createColumn: ( column: Column, - table: Table + table: Table, ): void => { - column.toggleVisibility = value => { + column.toggleVisibility = (value) => { if (column.getCanHide()) { - table.setColumnVisibility(old => ({ + table.setColumnVisibility((old) => ({ ...old, [column.id]: value ?? !column.getIsVisible(), })) @@ -181,7 +181,7 @@ export const ColumnVisibility: TableFeature = { const childColumns = column.columns return ( (childColumns.length - ? childColumns.some(c => c.getIsVisible()) + ? childColumns.some((c) => c.getIsVisible()) : table.getState().columnVisibility?.[column.id]) ?? true ) } @@ -195,7 +195,7 @@ export const ColumnVisibility: TableFeature = { column.getToggleVisibilityHandler = () => { return (e: unknown) => { column.toggleVisibility?.( - ((e as MouseEvent).target as HTMLInputElement).checked + ((e as MouseEvent).target as HTMLInputElement).checked, ) } } @@ -203,14 +203,14 @@ export const ColumnVisibility: TableFeature = { createRow: ( row: Row, - table: Table + table: Table, ): void => { row._getAllVisibleCells = memo( () => [row.getAllCells(), table.getState().columnVisibility], - cells => { - return cells.filter(cell => cell.column.getIsVisible()) + (cells) => { + return cells.filter((cell) => cell.column.getIsVisible()) }, - getMemoOptions(table.options, 'debugRows', '_getAllVisibleCells') + getMemoOptions(table.options, 'debugRows', '_getAllVisibleCells'), ) row.getVisibleCells = memo( () => [ @@ -219,61 +219,61 @@ export const ColumnVisibility: TableFeature = { row.getRightVisibleCells(), ], (left, center, right) => [...left, ...center, ...right], - getMemoOptions(table.options, 'debugRows', 'getVisibleCells') + getMemoOptions(table.options, 'debugRows', 'getVisibleCells'), ) }, createTable: (table: Table): void => { const makeVisibleColumnsMethod = ( key: string, - getColumns: () => Column[] + getColumns: () => Column[], ): (() => Column[]) => { return memo( () => [ getColumns(), getColumns() - .filter(d => d.getIsVisible()) - .map(d => d.id) + .filter((d) => d.getIsVisible()) + .map((d) => d.id) .join('_'), ], - columns => { - return columns.filter(d => d.getIsVisible?.()) + (columns) => { + return columns.filter((d) => d.getIsVisible?.()) }, - getMemoOptions(table.options, 'debugColumns', key) + getMemoOptions(table.options, 'debugColumns', key), ) } table.getVisibleFlatColumns = makeVisibleColumnsMethod( 'getVisibleFlatColumns', - () => table.getAllFlatColumns() + () => table.getAllFlatColumns(), ) table.getVisibleLeafColumns = makeVisibleColumnsMethod( 'getVisibleLeafColumns', - () => table.getAllLeafColumns() + () => table.getAllLeafColumns(), ) table.getLeftVisibleLeafColumns = makeVisibleColumnsMethod( 'getLeftVisibleLeafColumns', - () => table.getLeftLeafColumns() + () => table.getLeftLeafColumns(), ) table.getRightVisibleLeafColumns = makeVisibleColumnsMethod( 'getRightVisibleLeafColumns', - () => table.getRightLeafColumns() + () => table.getRightLeafColumns(), ) table.getCenterVisibleLeafColumns = makeVisibleColumnsMethod( 'getCenterVisibleLeafColumns', - () => table.getCenterLeafColumns() + () => table.getCenterLeafColumns(), ) - table.setColumnVisibility = updater => + table.setColumnVisibility = (updater) => table.options.onColumnVisibilityChange?.(updater) - table.resetColumnVisibility = defaultState => { + table.resetColumnVisibility = (defaultState) => { table.setColumnVisibility( - defaultState ? {} : table.initialState.columnVisibility ?? {} + defaultState ? {} : (table.initialState.columnVisibility ?? {}), ) } - table.toggleAllColumnsVisible = value => { + table.toggleAllColumnsVisible = (value) => { value = value ?? !table.getIsAllColumnsVisible() table.setColumnVisibility( @@ -282,21 +282,21 @@ export const ColumnVisibility: TableFeature = { ...obj, [column.id]: !value ? !column.getCanHide?.() : value, }), - {} - ) + {}, + ), ) } table.getIsAllColumnsVisible = () => - !table.getAllLeafColumns().some(column => !column.getIsVisible?.()) + !table.getAllLeafColumns().some((column) => !column.getIsVisible?.()) table.getIsSomeColumnsVisible = () => - table.getAllLeafColumns().some(column => column.getIsVisible?.()) + table.getAllLeafColumns().some((column) => column.getIsVisible?.()) table.getToggleAllColumnsVisibilityHandler = () => { return (e: unknown) => { table.toggleAllColumnsVisible( - ((e as MouseEvent).target as HTMLInputElement)?.checked + ((e as MouseEvent).target as HTMLInputElement)?.checked, ) } } @@ -305,7 +305,7 @@ export const ColumnVisibility: TableFeature = { export function _getVisibleLeafColumns( table: Table, - position?: ColumnPinningPosition | 'center' + position?: ColumnPinningPosition | 'center', ) { return !position ? table.getVisibleLeafColumns() diff --git a/packages/table-core/src/features/GlobalFiltering.ts b/packages/table-core/src/features/GlobalFiltering.ts index ada28f1eab..6ec384ece4 100644 --- a/packages/table-core/src/features/GlobalFiltering.ts +++ b/packages/table-core/src/features/GlobalFiltering.ts @@ -102,12 +102,12 @@ export const GlobalFiltering: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): GlobalFilterOptions => { return { onGlobalFilterChange: makeStateUpdater('globalFilter', table), globalFilterFn: 'auto', - getColumnCanGlobalFilter: column => { + getColumnCanGlobalFilter: (column) => { const value = table .getCoreRowModel() .flatRows[0]?._getAllCellsByColumnId() @@ -120,7 +120,7 @@ export const GlobalFiltering: TableFeature = { createColumn: ( column: Column, - table: Table + table: Table, ): void => { column.getCanGlobalFilter = () => { return ( @@ -145,17 +145,17 @@ export const GlobalFiltering: TableFeature = { ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() - : table.options.filterFns?.[globalFilterFn as string] ?? - filterFns[globalFilterFn as BuiltInFilterFn] + : (table.options.filterFns?.[globalFilterFn as string] ?? + filterFns[globalFilterFn as BuiltInFilterFn]) } - table.setGlobalFilter = updater => { + table.setGlobalFilter = (updater) => { table.options.onGlobalFilterChange?.(updater) } - table.resetGlobalFilter = defaultState => { + table.resetGlobalFilter = (defaultState) => { table.setGlobalFilter( - defaultState ? undefined : table.initialState.globalFilter + defaultState ? undefined : table.initialState.globalFilter, ) } }, diff --git a/packages/table-core/src/features/RowExpanding.ts b/packages/table-core/src/features/RowExpanding.ts index 15da45e0ea..456108d4d4 100644 --- a/packages/table-core/src/features/RowExpanding.ts +++ b/packages/table-core/src/features/RowExpanding.ts @@ -175,7 +175,7 @@ export const RowExpanding: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): ExpandedOptions => { return { onExpandedChange: makeStateUpdater('expanded', table), @@ -208,21 +208,23 @@ export const RowExpanding: TableFeature = { }) } } - table.setExpanded = updater => table.options.onExpandedChange?.(updater) - table.toggleAllRowsExpanded = expanded => { + table.setExpanded = (updater) => table.options.onExpandedChange?.(updater) + table.toggleAllRowsExpanded = (expanded) => { if (expanded ?? !table.getIsAllRowsExpanded()) { table.setExpanded(true) } else { table.setExpanded({}) } } - table.resetExpanded = defaultState => { - table.setExpanded(defaultState ? {} : table.initialState?.expanded ?? {}) + table.resetExpanded = (defaultState) => { + table.setExpanded( + defaultState ? {} : (table.initialState?.expanded ?? {}), + ) } table.getCanSomeRowsExpand = () => { return table .getPrePaginationRowModel() - .flatRows.some(row => row.getCanExpand()) + .flatRows.some((row) => row.getCanExpand()) } table.getToggleAllRowsExpandedHandler = () => { return (e: unknown) => { @@ -247,7 +249,7 @@ export const RowExpanding: TableFeature = { } // If any row is not expanded, return false - if (table.getRowModel().flatRows.some(row => !row.getIsExpanded())) { + if (table.getRowModel().flatRows.some((row) => !row.getIsExpanded())) { return false } @@ -262,7 +264,7 @@ export const RowExpanding: TableFeature = { ? Object.keys(table.getRowModel().rowsById) : Object.keys(table.getState().expanded) - rowIds.forEach(id => { + rowIds.forEach((id) => { const splitId = id.split('.') maxDepth = Math.max(maxDepth, splitId.length) }) @@ -285,16 +287,16 @@ export const RowExpanding: TableFeature = { createRow: ( row: Row, - table: Table + table: Table, ): void => { - row.toggleExpanded = expanded => { - table.setExpanded(old => { + row.toggleExpanded = (expanded) => { + table.setExpanded((old) => { const exists = old === true ? true : !!old?.[row.id] let oldExpanded: ExpandedStateList = {} if (old === true) { - Object.keys(table.getRowModel().rowsById).forEach(rowId => { + Object.keys(table.getRowModel().rowsById).forEach((rowId) => { oldExpanded[rowId] = true }) } else { diff --git a/packages/table-core/src/features/RowPagination.ts b/packages/table-core/src/features/RowPagination.ts index 836470673b..454c25aa8d 100644 --- a/packages/table-core/src/features/RowPagination.ts +++ b/packages/table-core/src/features/RowPagination.ts @@ -204,7 +204,7 @@ export const RowPagination: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): PaginationDefaultOptions => { return { onPaginationChange: makeStateUpdater('pagination', table), @@ -236,8 +236,8 @@ export const RowPagination: TableFeature = { }) } } - table.setPagination = updater => { - const safeUpdater: Updater = old => { + table.setPagination = (updater) => { + const safeUpdater: Updater = (old) => { let newState = functionalUpdate(updater, old) return newState @@ -245,15 +245,15 @@ export const RowPagination: TableFeature = { return table.options.onPaginationChange?.(safeUpdater) } - table.resetPagination = defaultState => { + table.resetPagination = (defaultState) => { table.setPagination( defaultState ? getDefaultPaginationState() - : table.initialState.pagination ?? getDefaultPaginationState() + : (table.initialState.pagination ?? getDefaultPaginationState()), ) } - table.setPageIndex = updater => { - table.setPagination(old => { + table.setPageIndex = (updater) => { + table.setPagination((old) => { let pageIndex = functionalUpdate(updater, old.pageIndex) const maxPageIndex = @@ -270,22 +270,22 @@ export const RowPagination: TableFeature = { } }) } - table.resetPageIndex = defaultState => { + table.resetPageIndex = (defaultState) => { table.setPageIndex( defaultState ? defaultPageIndex - : table.initialState?.pagination?.pageIndex ?? defaultPageIndex + : (table.initialState?.pagination?.pageIndex ?? defaultPageIndex), ) } - table.resetPageSize = defaultState => { + table.resetPageSize = (defaultState) => { table.setPageSize( defaultState ? defaultPageSize - : table.initialState?.pagination?.pageSize ?? defaultPageSize + : (table.initialState?.pagination?.pageSize ?? defaultPageSize), ) } - table.setPageSize = updater => { - table.setPagination(old => { + table.setPageSize = (updater) => { + table.setPagination((old) => { const pageSize = Math.max(1, functionalUpdate(updater, old.pageSize)) const topRowIndex = old.pageSize * old.pageIndex! const pageIndex = Math.floor(topRowIndex / pageSize) @@ -298,11 +298,11 @@ export const RowPagination: TableFeature = { }) } //deprecated - table.setPageCount = updater => - table.setPagination(old => { + table.setPageCount = (updater) => + table.setPagination((old) => { let newPageCount = functionalUpdate( updater, - table.options.pageCount ?? -1 + table.options.pageCount ?? -1, ) if (typeof newPageCount === 'number') { @@ -317,14 +317,14 @@ export const RowPagination: TableFeature = { table.getPageOptions = memo( () => [table.getPageCount()], - pageCount => { + (pageCount) => { let pageOptions: number[] = [] if (pageCount && pageCount > 0) { pageOptions = [...new Array(pageCount)].fill(null).map((_, i) => i) } return pageOptions }, - getMemoOptions(table.options, 'debugTable', 'getPageOptions') + getMemoOptions(table.options, 'debugTable', 'getPageOptions'), ) table.getCanPreviousPage = () => table.getState().pagination.pageIndex > 0 @@ -346,11 +346,11 @@ export const RowPagination: TableFeature = { } table.previousPage = () => { - return table.setPageIndex(old => old - 1) + return table.setPageIndex((old) => old - 1) } table.nextPage = () => { - return table.setPageIndex(old => { + return table.setPageIndex((old) => { return old + 1 }) } diff --git a/packages/table-core/src/features/RowPinning.ts b/packages/table-core/src/features/RowPinning.ts index 02288ab8d1..dcc3b9795d 100644 --- a/packages/table-core/src/features/RowPinning.ts +++ b/packages/table-core/src/features/RowPinning.ts @@ -71,7 +71,7 @@ export interface RowPinningRow { pin: ( position: RowPinningPosition, includeLeafRows?: boolean, - includeParentRows?: boolean + includeParentRows?: boolean, ) => void } @@ -79,7 +79,7 @@ export interface RowPinningInstance { _getPinnedRows: ( visiblePinnedRows: Array>, pinnedRowIds: Array | undefined, - position: 'top' | 'bottom' + position: 'top' | 'bottom', ) => Row[] /** * Returns all bottom pinned rows. @@ -135,7 +135,7 @@ export const RowPinning: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): RowPinningDefaultOptions => { return { onRowPinningChange: makeStateUpdater('rowPinning', table), @@ -144,7 +144,7 @@ export const RowPinning: TableFeature = { createRow: ( row: Row, - table: Table + table: Table, ): void => { row.pin = (position, includeLeafRows, includeParentRows) => { const leafRowIds = includeLeafRows @@ -155,12 +155,12 @@ export const RowPinning: TableFeature = { : [] const rowIds = new Set([...parentRowIds, row.id, ...leafRowIds]) - table.setRowPinning(old => { + table.setRowPinning((old) => { if (position === 'bottom') { return { - top: (old?.top ?? []).filter(d => !rowIds?.has(d)), + top: (old?.top ?? []).filter((d) => !rowIds?.has(d)), bottom: [ - ...(old?.bottom ?? []).filter(d => !rowIds?.has(d)), + ...(old?.bottom ?? []).filter((d) => !rowIds?.has(d)), ...Array.from(rowIds), ], } @@ -169,16 +169,16 @@ export const RowPinning: TableFeature = { if (position === 'top') { return { top: [ - ...(old?.top ?? []).filter(d => !rowIds?.has(d)), + ...(old?.top ?? []).filter((d) => !rowIds?.has(d)), ...Array.from(rowIds), ], - bottom: (old?.bottom ?? []).filter(d => !rowIds?.has(d)), + bottom: (old?.bottom ?? []).filter((d) => !rowIds?.has(d)), } } return { - top: (old?.top ?? []).filter(d => !rowIds?.has(d)), - bottom: (old?.bottom ?? []).filter(d => !rowIds?.has(d)), + top: (old?.top ?? []).filter((d) => !rowIds?.has(d)), + bottom: (old?.bottom ?? []).filter((d) => !rowIds?.has(d)), } }) } @@ -194,8 +194,8 @@ export const RowPinning: TableFeature = { const { top, bottom } = table.getState().rowPinning - const isTop = rowIds.some(d => top?.includes(d)) - const isBottom = rowIds.some(d => bottom?.includes(d)) + const isTop = rowIds.some((d) => top?.includes(d)) + const isBottom = rowIds.some((d) => bottom?.includes(d)) return isTop ? 'top' : isBottom ? 'bottom' : false } @@ -212,16 +212,17 @@ export const RowPinning: TableFeature = { }, createTable: (table: Table): void => { - table.setRowPinning = updater => table.options.onRowPinningChange?.(updater) + table.setRowPinning = (updater) => + table.options.onRowPinningChange?.(updater) - table.resetRowPinning = defaultState => + table.resetRowPinning = (defaultState) => table.setRowPinning( defaultState ? getDefaultRowPinningState() - : table.initialState?.rowPinning ?? getDefaultRowPinningState() + : (table.initialState?.rowPinning ?? getDefaultRowPinningState()), ) - table.getIsSomeRowsPinned = position => { + table.getIsSomeRowsPinned = (position) => { const pinningState = table.getState().rowPinning if (!position) { @@ -232,33 +233,35 @@ export const RowPinning: TableFeature = { table._getPinnedRows = (visibleRows, pinnedRowIds, position) => { const rows = - table.options.keepPinnedRows ?? true + (table.options.keepPinnedRows ?? true) ? //get all rows that are pinned even if they would not be otherwise visible //account for expanded parent rows, but not pagination or filtering - (pinnedRowIds ?? []).map(rowId => { + (pinnedRowIds ?? []).map((rowId) => { const row = table.getRow(rowId, true) return row.getIsAllParentsExpanded() ? row : null }) : //else get only visible rows that are pinned (pinnedRowIds ?? []).map( - rowId => visibleRows.find(row => row.id === rowId)! + (rowId) => visibleRows.find((row) => row.id === rowId)!, ) - return rows.filter(Boolean).map(d => ({ ...d, position })) as Row[] + return rows + .filter(Boolean) + .map((d) => ({ ...d, position })) as Row[] } table.getTopRows = memo( () => [table.getRowModel().rows, table.getState().rowPinning.top], (allRows, topPinnedRowIds) => table._getPinnedRows(allRows, topPinnedRowIds, 'top'), - getMemoOptions(table.options, 'debugRows', 'getTopRows') + getMemoOptions(table.options, 'debugRows', 'getTopRows'), ) table.getBottomRows = memo( () => [table.getRowModel().rows, table.getState().rowPinning.bottom], (allRows, bottomPinnedRowIds) => table._getPinnedRows(allRows, bottomPinnedRowIds, 'bottom'), - getMemoOptions(table.options, 'debugRows', 'getBottomRows') + getMemoOptions(table.options, 'debugRows', 'getBottomRows'), ) table.getCenterRows = memo( @@ -269,9 +272,9 @@ export const RowPinning: TableFeature = { ], (allRows, top, bottom) => { const topAndBottom = new Set([...(top ?? []), ...(bottom ?? [])]) - return allRows.filter(d => !topAndBottom.has(d.id)) + return allRows.filter((d) => !topAndBottom.has(d.id)) }, - getMemoOptions(table.options, 'debugRows', 'getCenterRows') + getMemoOptions(table.options, 'debugRows', 'getCenterRows'), ) }, } diff --git a/packages/table-core/src/features/RowSelection.ts b/packages/table-core/src/features/RowSelection.ts index 90166823aa..e5fddaba9d 100644 --- a/packages/table-core/src/features/RowSelection.ts +++ b/packages/table-core/src/features/RowSelection.ts @@ -205,7 +205,7 @@ export const RowSelection: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): RowSelectionOptions => { return { onRowSelectionChange: makeStateUpdater('rowSelection', table), @@ -219,14 +219,14 @@ export const RowSelection: TableFeature = { }, createTable: (table: Table): void => { - table.setRowSelection = updater => + table.setRowSelection = (updater) => table.options.onRowSelectionChange?.(updater) - table.resetRowSelection = defaultState => + table.resetRowSelection = (defaultState) => table.setRowSelection( - defaultState ? {} : table.initialState.rowSelection ?? {} + defaultState ? {} : (table.initialState.rowSelection ?? {}), ) - table.toggleAllRowsSelected = value => { - table.setRowSelection(old => { + table.toggleAllRowsSelected = (value) => { + table.setRowSelection((old) => { value = typeof value !== 'undefined' ? value : !table.getIsAllRowsSelected() @@ -237,14 +237,14 @@ export const RowSelection: TableFeature = { // We don't use `mutateRowIsSelected` here for performance reasons. // All of the rows are flat already, so it wouldn't be worth it if (value) { - preGroupedFlatRows.forEach(row => { + preGroupedFlatRows.forEach((row) => { if (!row.getCanSelect()) { return } rowSelection[row.id] = true }) } else { - preGroupedFlatRows.forEach(row => { + preGroupedFlatRows.forEach((row) => { delete rowSelection[row.id] }) } @@ -252,8 +252,8 @@ export const RowSelection: TableFeature = { return rowSelection }) } - table.toggleAllPageRowsSelected = value => - table.setRowSelection(old => { + table.toggleAllPageRowsSelected = (value) => + table.setRowSelection((old) => { const resolvedValue = typeof value !== 'undefined' ? value @@ -261,7 +261,7 @@ export const RowSelection: TableFeature = { const rowSelection: RowSelectionState = { ...old } - table.getRowModel().rows.forEach(row => { + table.getRowModel().rows.forEach((row) => { mutateRowIsSelected(rowSelection, row.id, resolvedValue, true, table) }) @@ -340,7 +340,7 @@ export const RowSelection: TableFeature = { return selectRowsFn(table, rowModel) }, - getMemoOptions(table.options, 'debugTable', 'getSelectedRowModel') + getMemoOptions(table.options, 'debugTable', 'getSelectedRowModel'), ) table.getFilteredSelectedRowModel = memo( @@ -356,7 +356,11 @@ export const RowSelection: TableFeature = { return selectRowsFn(table, rowModel) }, - getMemoOptions(table.options, 'debugTable', 'getFilteredSelectedRowModel') + getMemoOptions( + table.options, + 'debugTable', + 'getFilteredSelectedRowModel', + ), ) table.getGroupedSelectedRowModel = memo( @@ -372,7 +376,7 @@ export const RowSelection: TableFeature = { return selectRowsFn(table, rowModel) }, - getMemoOptions(table.options, 'debugTable', 'getGroupedSelectedRowModel') + getMemoOptions(table.options, 'debugTable', 'getGroupedSelectedRowModel'), ) /// @@ -396,13 +400,13 @@ export const RowSelection: TableFeature = { const { rowSelection } = table.getState() let isAllRowsSelected = Boolean( - preGroupedFlatRows.length && Object.keys(rowSelection).length + preGroupedFlatRows.length && Object.keys(rowSelection).length, ) if (isAllRowsSelected) { if ( preGroupedFlatRows.some( - row => row.getCanSelect() && !rowSelection[row.id] + (row) => row.getCanSelect() && !rowSelection[row.id], ) ) { isAllRowsSelected = false @@ -415,14 +419,14 @@ export const RowSelection: TableFeature = { table.getIsAllPageRowsSelected = () => { const paginationFlatRows = table .getPaginationRowModel() - .flatRows.filter(row => row.getCanSelect()) + .flatRows.filter((row) => row.getCanSelect()) const { rowSelection } = table.getState() let isAllPageRowsSelected = !!paginationFlatRows.length if ( isAllPageRowsSelected && - paginationFlatRows.some(row => !rowSelection[row.id]) + paginationFlatRows.some((row) => !rowSelection[row.id]) ) { isAllPageRowsSelected = false } @@ -432,7 +436,7 @@ export const RowSelection: TableFeature = { table.getIsSomeRowsSelected = () => { const totalSelected = Object.keys( - table.getState().rowSelection ?? {} + table.getState().rowSelection ?? {}, ).length return ( totalSelected > 0 && @@ -445,14 +449,14 @@ export const RowSelection: TableFeature = { return table.getIsAllPageRowsSelected() ? false : paginationFlatRows - .filter(row => row.getCanSelect()) - .some(d => d.getIsSelected() || d.getIsSomeSelected()) + .filter((row) => row.getCanSelect()) + .some((d) => d.getIsSelected() || d.getIsSomeSelected()) } table.getToggleAllRowsSelectedHandler = () => { return (e: unknown) => { table.toggleAllRowsSelected( - ((e as MouseEvent).target as HTMLInputElement).checked + ((e as MouseEvent).target as HTMLInputElement).checked, ) } } @@ -460,7 +464,7 @@ export const RowSelection: TableFeature = { table.getToggleAllPageRowsSelectedHandler = () => { return (e: unknown) => { table.toggleAllPageRowsSelected( - ((e as MouseEvent).target as HTMLInputElement).checked + ((e as MouseEvent).target as HTMLInputElement).checked, ) } } @@ -468,12 +472,12 @@ export const RowSelection: TableFeature = { createRow: ( row: Row, - table: Table + table: Table, ): void => { row.toggleSelected = (value, opts) => { const isSelected = row.getIsSelected() - table.setRowSelection(old => { + table.setRowSelection((old) => { value = typeof value !== 'undefined' ? value : !isSelected if (row.getCanSelect() && isSelected === value) { @@ -487,7 +491,7 @@ export const RowSelection: TableFeature = { row.id, value, opts?.selectChildren ?? true, - table + table, ) return selectedRowIds @@ -537,7 +541,7 @@ export const RowSelection: TableFeature = { return (e: unknown) => { if (!canSelect) return row.toggleSelected( - ((e as MouseEvent).target as HTMLInputElement)?.checked + ((e as MouseEvent).target as HTMLInputElement)?.checked, ) } } @@ -549,7 +553,7 @@ const mutateRowIsSelected = ( id: string, value: boolean, includeChildren: boolean, - table: Table + table: Table, ) => { const row = table.getRow(id, true) @@ -561,7 +565,7 @@ const mutateRowIsSelected = ( // ) { if (value) { if (!row.getCanMultiSelect()) { - Object.keys(selectedRowIds).forEach(key => delete selectedRowIds[key]) + Object.keys(selectedRowIds).forEach((key) => delete selectedRowIds[key]) } if (row.getCanSelect()) { selectedRowIds[id] = true @@ -572,15 +576,21 @@ const mutateRowIsSelected = ( // } if (includeChildren && row.subRows?.length && row.getCanSelectSubRows()) { - row.subRows.forEach(row => - mutateRowIsSelected(selectedRowIds, row.id, value, includeChildren, table) + row.subRows.forEach((row) => + mutateRowIsSelected( + selectedRowIds, + row.id, + value, + includeChildren, + table, + ), ) } } export function selectRowsFn( table: Table, - rowModel: RowModel + rowModel: RowModel, ): RowModel { const rowSelection = table.getState().rowSelection @@ -590,7 +600,7 @@ export function selectRowsFn( // Filters top level and nested rows const recurseRows = (rows: Row[], depth = 0): Row[] => { return rows - .map(row => { + .map((row) => { const isSelected = isRowSelected(row, rowSelection) if (isSelected) { @@ -621,7 +631,7 @@ export function selectRowsFn( export function isRowSelected( row: Row, - selection: Record + selection: Record, ): boolean { return selection[row.id] ?? false } @@ -629,14 +639,14 @@ export function isRowSelected( export function isSubRowSelected( row: Row, selection: Record, - table: Table + table: Table, ): boolean | 'some' | 'all' { if (!row.subRows?.length) return false let allChildrenSelected = true let someSelected = false - row.subRows.forEach(subRow => { + row.subRows.forEach((subRow) => { // Bail out early if we know both of these if (someSelected && !allChildrenSelected) { return diff --git a/packages/table-core/src/features/RowSorting.ts b/packages/table-core/src/features/RowSorting.ts index c2e7c32d53..9e8e969285 100644 --- a/packages/table-core/src/features/RowSorting.ts +++ b/packages/table-core/src/features/RowSorting.ts @@ -242,8 +242,7 @@ type ResolvedSortingFns = keyof SortingFns extends never } export interface SortingOptions - extends SortingOptionsBase, - ResolvedSortingFns {} + extends SortingOptionsBase, ResolvedSortingFns {} export interface SortingInstance { _getSortedRowModel?: () => RowModel @@ -291,7 +290,7 @@ export const RowSorting: TableFeature = { }, getDefaultOptions: ( - table: Table + table: Table, ): SortingOptions => { return { onSortingChange: makeStateUpdater('sorting', table), @@ -303,7 +302,7 @@ export const RowSorting: TableFeature = { createColumn: ( column: Column, - table: Table + table: Table, ): void => { column.getAutoSortingFn = () => { const firstRows = table.getFilteredRowModel().flatRows.slice(10) @@ -352,8 +351,8 @@ export const RowSorting: TableFeature = { ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() - : table.options.sortingFns?.[column.columnDef.sortingFn as string] ?? - sortingFns[column.columnDef.sortingFn as BuiltInSortingFn] + : (table.options.sortingFns?.[column.columnDef.sortingFn as string] ?? + sortingFns[column.columnDef.sortingFn as BuiltInSortingFn]) } column.toggleSorting = (desc, multi) => { // if (column.columns.length) { @@ -369,10 +368,10 @@ export const RowSorting: TableFeature = { const nextSortingOrder = column.getNextSortingOrder() const hasManualValue = typeof desc !== 'undefined' && desc !== null - table.setSorting(old => { + table.setSorting((old) => { // Find any existing sorting for this column - const existingSorting = old?.find(d => d.id === column.id) - const existingIndex = old?.findIndex(d => d.id === column.id) + const existingSorting = old?.find((d) => d.id === column.id) + const existingIndex = old?.findIndex((d) => d.id === column.id) let newSorting: SortingState = [] @@ -421,11 +420,11 @@ export const RowSorting: TableFeature = { newSorting.splice( 0, newSorting.length - - (table.options.maxMultiSortColCount ?? Number.MAX_SAFE_INTEGER) + (table.options.maxMultiSortColCount ?? Number.MAX_SAFE_INTEGER), ) } else if (sortAction === 'toggle') { // This flips (or sets) the - newSorting = old.map(d => { + newSorting = old.map((d) => { if (d.id === column.id) { return { ...d, @@ -435,7 +434,7 @@ export const RowSorting: TableFeature = { return d }) } else if (sortAction === 'remove') { - newSorting = old.filter(d => d.id !== column.id) + newSorting = old.filter((d) => d.id !== column.id) } else { newSorting = [ { @@ -468,7 +467,7 @@ export const RowSorting: TableFeature = { if ( isSorted !== firstSortDirection && (table.options.enableSortingRemoval ?? true) && // If enableSortRemove, enable in general - (multi ? table.options.enableMultiRemove ?? true : true) // If multi, don't allow if enableMultiRemove)) + (multi ? (table.options.enableMultiRemove ?? true) : true) // If multi, don't allow if enableMultiRemove)) ) { return false } @@ -492,18 +491,20 @@ export const RowSorting: TableFeature = { } column.getIsSorted = () => { - const columnSort = table.getState().sorting?.find(d => d.id === column.id) + const columnSort = table + .getState() + .sorting?.find((d) => d.id === column.id) return !columnSort ? false : columnSort.desc ? 'desc' : 'asc' } column.getSortIndex = () => - table.getState().sorting?.findIndex(d => d.id === column.id) ?? -1 + table.getState().sorting?.findIndex((d) => d.id === column.id) ?? -1 column.clearSorting = () => { //clear sorting for just 1 column - table.setSorting(old => - old?.length ? old.filter(d => d.id !== column.id) : [] + table.setSorting((old) => + old?.length ? old.filter((d) => d.id !== column.id) : [], ) } @@ -515,16 +516,18 @@ export const RowSorting: TableFeature = { ;(e as any).persist?.() column.toggleSorting?.( undefined, - column.getCanMultiSort() ? table.options.isMultiSortEvent?.(e) : false + column.getCanMultiSort() + ? table.options.isMultiSortEvent?.(e) + : false, ) } } }, createTable: (table: Table): void => { - table.setSorting = updater => table.options.onSortingChange?.(updater) - table.resetSorting = defaultState => { - table.setSorting(defaultState ? [] : table.initialState?.sorting ?? []) + table.setSorting = (updater) => table.options.onSortingChange?.(updater) + table.resetSorting = (defaultState) => { + table.setSorting(defaultState ? [] : (table.initialState?.sorting ?? [])) } table.getPreSortedRowModel = () => table.getGroupedRowModel() table.getSortedRowModel = () => { diff --git a/packages/table-core/src/filterFns.ts b/packages/table-core/src/filterFns.ts index 5667e80e82..aa20e691a8 100644 --- a/packages/table-core/src/filterFns.ts +++ b/packages/table-core/src/filterFns.ts @@ -3,7 +3,7 @@ import { FilterFn } from './features/ColumnFiltering' const includesString: FilterFn = ( row, columnId: string, - filterValue: string + filterValue: string, ) => { const search = filterValue?.toString()?.toLowerCase() return Boolean( @@ -11,7 +11,7 @@ const includesString: FilterFn = ( .getValue(columnId) ?.toString() ?.toLowerCase() - ?.includes(search) + ?.includes(search), ) } @@ -20,10 +20,10 @@ includesString.autoRemove = (val: any) => testFalsey(val) const includesStringSensitive: FilterFn = ( row, columnId: string, - filterValue: string + filterValue: string, ) => { return Boolean( - row.getValue(columnId)?.toString()?.includes(filterValue) + row.getValue(columnId)?.toString()?.includes(filterValue), ) } @@ -32,7 +32,7 @@ includesStringSensitive.autoRemove = (val: any) => testFalsey(val) const equalsString: FilterFn = ( row, columnId: string, - filterValue: string + filterValue: string, ) => { return ( row.getValue(columnId)?.toString()?.toLowerCase() === @@ -45,20 +45,20 @@ equalsString.autoRemove = (val: any) => testFalsey(val) const arrIncludes: FilterFn = ( row, columnId: string, - filterValue: unknown + filterValue: unknown, ) => { return row.getValue(columnId)?.includes(filterValue) } -arrIncludes.autoRemove = (val: any) => testFalsey(val) || !val?.length +arrIncludes.autoRemove = (val: any) => testFalsey(val) const arrIncludesAll: FilterFn = ( row, columnId: string, - filterValue: unknown[] + filterValue: unknown[], ) => { return !filterValue.some( - val => !row.getValue(columnId)?.includes(val) + (val) => !row.getValue(columnId)?.includes(val), ) } @@ -67,10 +67,10 @@ arrIncludesAll.autoRemove = (val: any) => testFalsey(val) || !val?.length const arrIncludesSome: FilterFn = ( row, columnId: string, - filterValue: unknown[] + filterValue: unknown[], ) => { - return filterValue.some(val => - row.getValue(columnId)?.includes(val) + return filterValue.some((val) => + row.getValue(columnId)?.includes(val), ) } @@ -85,7 +85,7 @@ equals.autoRemove = (val: any) => testFalsey(val) const weakEquals: FilterFn = ( row, columnId: string, - filterValue: unknown + filterValue: unknown, ) => { return row.getValue(columnId) == filterValue } @@ -95,7 +95,7 @@ weakEquals.autoRemove = (val: any) => testFalsey(val) const inNumberRange: FilterFn = ( row, columnId: string, - filterValue: [number, number] + filterValue: [number, number], ) => { let [min, max] = filterValue diff --git a/packages/table-core/src/sortingFns.ts b/packages/table-core/src/sortingFns.ts index acb0c05fab..b3c6e45c5b 100644 --- a/packages/table-core/src/sortingFns.ts +++ b/packages/table-core/src/sortingFns.ts @@ -5,14 +5,14 @@ export const reSplitAlphaNumeric = /([0-9]+)/gm const alphanumeric: SortingFn = (rowA, rowB, columnId) => { return compareAlphanumeric( toString(rowA.getValue(columnId)).toLowerCase(), - toString(rowB.getValue(columnId)).toLowerCase() + toString(rowB.getValue(columnId)).toLowerCase(), ) } const alphanumericCaseSensitive: SortingFn = (rowA, rowB, columnId) => { return compareAlphanumeric( toString(rowA.getValue(columnId)), - toString(rowB.getValue(columnId)) + toString(rowB.getValue(columnId)), ) } @@ -21,7 +21,7 @@ const alphanumericCaseSensitive: SortingFn = (rowA, rowB, columnId) => { const text: SortingFn = (rowA, rowB, columnId) => { return compareBasic( toString(rowA.getValue(columnId)).toLowerCase(), - toString(rowB.getValue(columnId)).toLowerCase() + toString(rowB.getValue(columnId)).toLowerCase(), ) } @@ -30,7 +30,7 @@ const text: SortingFn = (rowA, rowB, columnId) => { const textCaseSensitive: SortingFn = (rowA, rowB, columnId) => { return compareBasic( toString(rowA.getValue(columnId)), - toString(rowB.getValue(columnId)) + toString(rowB.getValue(columnId)), ) } diff --git a/packages/table-core/src/types.ts b/packages/table-core/src/types.ts index 26bf47939e..ba933e4592 100644 --- a/packages/table-core/src/types.ts +++ b/packages/table-core/src/types.ts @@ -102,7 +102,7 @@ export interface TableFeature { cell: Cell, column: Column, row: Row, - table: Table + table: Table, ) => void createColumn?: (column: Column, table: Table) => void createHeader?: (header: Header, table: Table) => void @@ -110,7 +110,7 @@ export interface TableFeature { createTable?: (table: Table) => void getDefaultColumnDef?: () => Partial> getDefaultOptions?: ( - table: Table + table: Table, ) => Partial> getInitialState?: (initialState?: InitialTableState) => Partial } @@ -135,7 +135,8 @@ export type RowData = unknown | object | any[] export type AnyRender = (Comp: any, props: any) => any export interface Table - extends CoreInstance, + extends + CoreInstance, HeadersInstance, VisibilityInstance, ColumnOrderInstance, @@ -152,7 +153,8 @@ export interface Table RowSelectionInstance {} interface FeatureOptions - extends VisibilityOptions, + extends + VisibilityOptions, ColumnOrderOptions, ColumnPinningOptions, RowPinningOptions, @@ -167,17 +169,16 @@ interface FeatureOptions RowSelectionOptions {} export interface TableOptionsResolved - extends CoreOptions, - FeatureOptions {} + extends CoreOptions, FeatureOptions {} -export interface TableOptions - extends PartialKeys< - TableOptionsResolved, - 'state' | 'onStateChange' | 'renderFallbackValue' - > {} +export interface TableOptions extends PartialKeys< + TableOptionsResolved, + 'state' | 'onStateChange' | 'renderFallbackValue' +> {} export interface TableState - extends CoreTableState, + extends + CoreTableState, VisibilityTableState, ColumnOrderTableState, ColumnPinningTableState, @@ -192,7 +193,8 @@ export interface TableState RowSelectionTableState {} interface CompleteInitialTableState - extends CoreTableState, + extends + CoreTableState, VisibilityTableState, ColumnOrderTableState, ColumnPinningTableState, @@ -209,7 +211,8 @@ interface CompleteInitialTableState export interface InitialTableState extends Partial {} export interface Row - extends CoreRow, + extends + CoreRow, VisibilityRow, ColumnPinningRow, RowPinningRow, @@ -226,7 +229,7 @@ export interface RowModel { export type AccessorFn = ( originalRow: TData, - index: number + index: number, ) => TValue export type ColumnDefTemplate = @@ -254,7 +257,8 @@ type ColumnIdentifiers = // interface ColumnDefExtensions - extends VisibilityColumnDef, + extends + VisibilityColumnDef, ColumnPinningColumnDef, ColumnFiltersColumnDef, GlobalFilterColumnDef, @@ -262,8 +266,10 @@ interface ColumnDefExtensions GroupingColumnDef, ColumnSizingColumnDef {} -export interface ColumnDefBase - extends ColumnDefExtensions { +export interface ColumnDefBase< + TData extends RowData, + TValue = unknown, +> extends ColumnDefExtensions { getUniqueValues?: AccessorFn footer?: ColumnDefTemplate> cell?: ColumnDefTemplate> @@ -272,8 +278,10 @@ export interface ColumnDefBase // -export interface IdentifiedColumnDef - extends ColumnDefBase { +export interface IdentifiedColumnDef< + TData extends RowData, + TValue = unknown, +> extends ColumnDefBase { id?: string header?: StringOrTemplateHeader } @@ -283,8 +291,10 @@ export type DisplayColumnDef< TValue = unknown, > = ColumnDefBase & ColumnIdentifiers -interface GroupColumnDefBase - extends ColumnDefBase { +interface GroupColumnDefBase< + TData extends RowData, + TValue = unknown, +> extends ColumnDefBase { columns?: ColumnDef[] } @@ -338,7 +348,8 @@ export type ColumnDefResolved< } export interface Column - extends CoreColumn, + extends + CoreColumn, ColumnVisibilityColumn, ColumnPinningColumn, FacetedColumn, @@ -350,12 +361,11 @@ export interface Column ColumnOrderColumn {} export interface Cell - extends CoreCell, - GroupingCell {} + extends CoreCell, GroupingCell {} export interface Header - extends CoreHeader, - ColumnSizingHeader {} + extends CoreHeader, ColumnSizingHeader {} -export interface HeaderGroup - extends CoreHeaderGroup {} +export interface HeaderGroup< + TData extends RowData, +> extends CoreHeaderGroup {} diff --git a/packages/table-core/src/utils.ts b/packages/table-core/src/utils.ts index 77be57d750..c1f02a7c61 100755 --- a/packages/table-core/src/utils.ts +++ b/packages/table-core/src/utils.ts @@ -90,7 +90,7 @@ export function noop() { export function makeStateUpdater( key: K, - instance: unknown + instance: unknown, ) { return (updater: Updater) => { ;(instance as any).setState((old: TTableState) => { @@ -109,17 +109,17 @@ export function isFunction(d: any): d is T { } export function isNumberArray(d: any): d is number[] { - return Array.isArray(d) && d.every(val => typeof val === 'number') + return Array.isArray(d) && d.every((val) => typeof val === 'number') } export function flattenBy( arr: TNode[], - getChildren: (item: TNode) => TNode[] + getChildren: (item: TNode) => TNode[], ) { const flat: TNode[] = [] const recurse = (subArr: TNode[]) => { - subArr.forEach(item => { + subArr.forEach((item) => { flat.push(item) const children = getChildren(item) if (children?.length) { @@ -140,12 +140,12 @@ export function memo( key: any debug?: () => any onChange?: (result: TResult) => void - } + }, ): (depArgs?: TDepArgs) => TResult { let deps: any[] = [] let result: TResult | undefined - return depArgs => { + return (depArgs) => { let depTime: number if (opts.key && opts.debug) depTime = Date.now() @@ -188,9 +188,9 @@ export function memo( font-weight: bold; color: hsl(${Math.max( 0, - Math.min(120 - 120 * resultFpsPercentage, 120) + Math.min(120 - 120 * resultFpsPercentage, 120), )}deg 100% 31%);`, - opts?.key + opts?.key, ) } } @@ -209,7 +209,7 @@ export function getMemoOptions( | 'debugRows' | 'debugHeaders', key: string, - onChange?: (result: any) => void + onChange?: (result: any) => void, ) { return { debug: () => tableOptions?.debugAll ?? tableOptions[debugLevel], diff --git a/packages/table-core/src/utils/document.ts b/packages/table-core/src/utils/document.ts new file mode 100644 index 0000000000..3d46d95b3b --- /dev/null +++ b/packages/table-core/src/utils/document.ts @@ -0,0 +1,12 @@ +export function safelyAccessDocument(_document?: Document): Document | null { + return _document || (typeof document !== 'undefined' ? document : null) +} + +export function safelyAccessDocumentEvent(event: Event): Document | null { + return !!event && + !!event.target && + typeof event.target === 'object' && + 'ownerDocument' in event.target + ? (event.target.ownerDocument as Document | null) + : null +} diff --git a/packages/table-core/src/utils/filterRowsUtils.ts b/packages/table-core/src/utils/filterRowsUtils.ts index a27258f145..f764734a77 100644 --- a/packages/table-core/src/utils/filterRowsUtils.ts +++ b/packages/table-core/src/utils/filterRowsUtils.ts @@ -4,7 +4,7 @@ import { Row, RowModel, Table, RowData } from '../types' export function filterRows( rows: Row[], filterRowImpl: (row: Row) => any, - table: Table + table: Table, ) { if (table.options.filterFromLeafRows) { return filterRowModelFromLeafs(rows, filterRowImpl, table) @@ -16,7 +16,7 @@ export function filterRows( function filterRowModelFromLeafs( rowsToFilter: Row[], filterRow: (row: Row) => Row[], - table: Table + table: Table, ): RowModel { const newFilteredFlatRows: Row[] = [] const newFilteredRowsById: Record> = {} @@ -36,7 +36,7 @@ function filterRowModelFromLeafs( row.index, row.depth, undefined, - row.parentId + row.parentId, ) newRow.columnFilters = row.columnFilters @@ -80,7 +80,7 @@ function filterRowModelFromLeafs( function filterRowModelFromRoot( rowsToFilter: Row[], filterRow: (row: Row) => any, - table: Table + table: Table, ): RowModel { const newFilteredFlatRows: Row[] = [] const newFilteredRowsById: Record> = {} @@ -107,7 +107,7 @@ function filterRowModelFromRoot( row.index, row.depth, undefined, - row.parentId + row.parentId, ) newRow.subRows = recurseFilterRows(row.subRows, depth + 1) row = newRow diff --git a/packages/table-core/src/utils/getCoreRowModel.ts b/packages/table-core/src/utils/getCoreRowModel.ts index e6f7349a27..8c81068933 100644 --- a/packages/table-core/src/utils/getCoreRowModel.ts +++ b/packages/table-core/src/utils/getCoreRowModel.ts @@ -3,13 +3,13 @@ import { Table, Row, RowModel, RowData } from '../types' import { getMemoOptions, memo } from '../utils' export function getCoreRowModel(): ( - table: Table + table: Table, ) => () => RowModel { - return table => + return (table) => memo( () => [table.options.data], ( - data + data, ): { rows: Row[] flatRows: Row[] @@ -24,7 +24,7 @@ export function getCoreRowModel(): ( const accessRows = ( originalRows: TData[], depth = 0, - parentRow?: Row + parentRow?: Row, ): Row[] => { const rows = [] as Row[] @@ -44,7 +44,7 @@ export function getCoreRowModel(): ( i, depth, undefined, - parentRow?.id + parentRow?.id, ) // Keep track of every row in a flat array @@ -58,7 +58,7 @@ export function getCoreRowModel(): ( if (table.options.getSubRows) { row.originalSubRows = table.options.getSubRows( originalRows[i]!, - i + i, ) // Then recursively access them @@ -76,7 +76,7 @@ export function getCoreRowModel(): ( return rowModel }, getMemoOptions(table.options, 'debugTable', 'getRowModel', () => - table._autoResetPageIndex() - ) + table._autoResetPageIndex(), + ), ) } diff --git a/packages/table-core/src/utils/getExpandedRowModel.ts b/packages/table-core/src/utils/getExpandedRowModel.ts index 2890b6e7f3..573e5871ca 100644 --- a/packages/table-core/src/utils/getExpandedRowModel.ts +++ b/packages/table-core/src/utils/getExpandedRowModel.ts @@ -2,9 +2,9 @@ import { Table, Row, RowModel, RowData } from '../types' import { getMemoOptions, memo } from '../utils' export function getExpandedRowModel(): ( - table: Table + table: Table, ) => () => RowModel { - return table => + return (table) => memo( () => [ table.getState().expanded, @@ -26,7 +26,7 @@ export function getExpandedRowModel(): ( return expandRows(rowModel) }, - getMemoOptions(table.options, 'debugTable', 'getExpandedRowModel') + getMemoOptions(table.options, 'debugTable', 'getExpandedRowModel'), ) } diff --git a/packages/table-core/src/utils/getFacetedMinMaxValues.ts b/packages/table-core/src/utils/getFacetedMinMaxValues.ts index 129ed4b47f..41c7b39534 100644 --- a/packages/table-core/src/utils/getFacetedMinMaxValues.ts +++ b/packages/table-core/src/utils/getFacetedMinMaxValues.ts @@ -3,18 +3,18 @@ import { getMemoOptions, memo } from '../utils' export function getFacetedMinMaxValues(): ( table: Table, - columnId: string + columnId: string, ) => () => undefined | [number, number] { return (table, columnId) => memo( () => [table.getColumn(columnId)?.getFacetedRowModel()], - facetedRowModel => { + (facetedRowModel) => { if (!facetedRowModel) return undefined const uniqueValues = facetedRowModel.flatRows - .flatMap(flatRow => flatRow.getUniqueValues(columnId) ?? []) + .flatMap((flatRow) => flatRow.getUniqueValues(columnId) ?? []) .map(Number) - .filter(value => !Number.isNaN(value)) + .filter((value) => !Number.isNaN(value)) if (!uniqueValues.length) return @@ -28,6 +28,6 @@ export function getFacetedMinMaxValues(): ( return [facetedMinValue, facetedMaxValue] }, - getMemoOptions(table.options, 'debugTable', 'getFacetedMinMaxValues') + getMemoOptions(table.options, 'debugTable', 'getFacetedMinMaxValues'), ) } diff --git a/packages/table-core/src/utils/getFacetedRowModel.ts b/packages/table-core/src/utils/getFacetedRowModel.ts index ab0110a469..cda4f760f1 100644 --- a/packages/table-core/src/utils/getFacetedRowModel.ts +++ b/packages/table-core/src/utils/getFacetedRowModel.ts @@ -4,7 +4,7 @@ import { filterRows } from './filterRowsUtils' export function getFacetedRowModel(): ( table: Table, - columnId: string + columnId: string, ) => () => RowModel { return (table, columnId) => memo( @@ -23,7 +23,7 @@ export function getFacetedRowModel(): ( } const filterableIds = [ - ...columnFilters.map(d => d.id).filter(d => d !== columnId), + ...columnFilters.map((d) => d.id).filter((d) => d !== columnId), globalFilter ? '__global__' : undefined, ].filter(Boolean) as string[] @@ -39,6 +39,6 @@ export function getFacetedRowModel(): ( return filterRows(preRowModel.rows, filterRowsImpl, table) }, - getMemoOptions(table.options, 'debugTable', 'getFacetedRowModel') + getMemoOptions(table.options, 'debugTable', 'getFacetedRowModel'), ) } diff --git a/packages/table-core/src/utils/getFacetedUniqueValues.ts b/packages/table-core/src/utils/getFacetedUniqueValues.ts index 93f957f170..a609f4b8df 100644 --- a/packages/table-core/src/utils/getFacetedUniqueValues.ts +++ b/packages/table-core/src/utils/getFacetedUniqueValues.ts @@ -3,12 +3,12 @@ import { getMemoOptions, memo } from '../utils' export function getFacetedUniqueValues(): ( table: Table, - columnId: string + columnId: string, ) => () => Map { return (table, columnId) => memo( () => [table.getColumn(columnId)?.getFacetedRowModel()], - facetedRowModel => { + (facetedRowModel) => { if (!facetedRowModel) return new Map() let facetedUniqueValues = new Map() @@ -23,7 +23,7 @@ export function getFacetedUniqueValues(): ( if (facetedUniqueValues.has(value)) { facetedUniqueValues.set( value, - (facetedUniqueValues.get(value) ?? 0) + 1 + (facetedUniqueValues.get(value) ?? 0) + 1, ) } else { facetedUniqueValues.set(value, 1) @@ -36,7 +36,7 @@ export function getFacetedUniqueValues(): ( getMemoOptions( table.options, 'debugTable', - `getFacetedUniqueValues_${columnId}` - ) + `getFacetedUniqueValues_${columnId}`, + ), ) } diff --git a/packages/table-core/src/utils/getFilteredRowModel.ts b/packages/table-core/src/utils/getFilteredRowModel.ts index c04341ad2a..3d09f0af2e 100644 --- a/packages/table-core/src/utils/getFilteredRowModel.ts +++ b/packages/table-core/src/utils/getFilteredRowModel.ts @@ -4,9 +4,9 @@ import { getMemoOptions, memo } from '../utils' import { filterRows } from './filterRowsUtils' export function getFilteredRowModel(): ( - table: Table + table: Table, ) => () => RowModel { - return table => + return (table) => memo( () => [ table.getPreFilteredRowModel(), @@ -28,7 +28,7 @@ export function getFilteredRowModel(): ( const resolvedColumnFilters: ResolvedColumnFilter[] = [] const resolvedGlobalFilters: ResolvedColumnFilter[] = [] - ;(columnFilters ?? []).forEach(d => { + ;(columnFilters ?? []).forEach((d) => { const column = table.getColumn(d.id) if (!column) { @@ -40,7 +40,7 @@ export function getFilteredRowModel(): ( if (!filterFn) { if (process.env.NODE_ENV !== 'production') { console.warn( - `Could not find a valid 'column.filterFn' for column with the ID: ${column.id}.` + `Could not find a valid 'column.filterFn' for column with the ID: ${column.id}.`, ) } return @@ -53,13 +53,13 @@ export function getFilteredRowModel(): ( }) }) - const filterableIds = (columnFilters ?? []).map(d => d.id) + const filterableIds = (columnFilters ?? []).map((d) => d.id) const globalFilterFn = table.getGlobalFilterFn() const globallyFilterableColumns = table .getAllLeafColumns() - .filter(column => column.getCanGlobalFilter()) + .filter((column) => column.getCanGlobalFilter()) if ( globalFilter && @@ -68,7 +68,7 @@ export function getFilteredRowModel(): ( ) { filterableIds.push('__global__') - globallyFilterableColumns.forEach(column => { + globallyFilterableColumns.forEach((column) => { resolvedGlobalFilters.push({ id: column.id, filterFn: globalFilterFn, @@ -98,9 +98,9 @@ export function getFilteredRowModel(): ( row, id, currentColumnFilter.resolvedValue, - filterMeta => { + (filterMeta) => { row.columnFiltersMeta[id] = filterMeta - } + }, ) } } @@ -115,9 +115,9 @@ export function getFilteredRowModel(): ( row, id, currentGlobalFilter.resolvedValue, - filterMeta => { + (filterMeta) => { row.columnFiltersMeta[id] = filterMeta - } + }, ) ) { row.columnFilters.__global__ = true @@ -145,7 +145,7 @@ export function getFilteredRowModel(): ( return filterRows(rowModel.rows, filterRowsImpl, table) }, getMemoOptions(table.options, 'debugTable', 'getFilteredRowModel', () => - table._autoResetPageIndex() - ) + table._autoResetPageIndex(), + ), ) } diff --git a/packages/table-core/src/utils/getGroupedRowModel.ts b/packages/table-core/src/utils/getGroupedRowModel.ts index da97631913..33267bcaa1 100644 --- a/packages/table-core/src/utils/getGroupedRowModel.ts +++ b/packages/table-core/src/utils/getGroupedRowModel.ts @@ -4,14 +4,14 @@ import { flattenBy, getMemoOptions, memo } from '../utils' import { GroupingState } from '../features/ColumnGrouping' export function getGroupedRowModel(): ( - table: Table + table: Table, ) => () => RowModel { - return table => + return (table) => memo( () => [table.getState().grouping, table.getPreGroupedRowModel()], (grouping, rowModel) => { if (!rowModel.rows.length || !grouping.length) { - rowModel.rows.forEach(row => { + rowModel.rows.forEach((row) => { row.depth = 0 row.parentId = undefined }) @@ -19,8 +19,8 @@ export function getGroupedRowModel(): ( } // Filter the grouping list down to columns that exist - const existingGrouping = grouping.filter(columnId => - table.getColumn(columnId) + const existingGrouping = grouping.filter((columnId) => + table.getColumn(columnId), ) const groupedFlatRows: Row[] = [] @@ -34,12 +34,12 @@ export function getGroupedRowModel(): ( const groupUpRecursively = ( rows: Row[], depth = 0, - parentId?: string + parentId?: string, ) => { // Grouping depth has been been met // Stop grouping and simply rewrite thd depth and row relationships if (depth >= existingGrouping.length) { - return rows.map(row => { + return rows.map((row) => { row.depth = depth groupedFlatRows.push(row) @@ -67,13 +67,13 @@ export function getGroupedRowModel(): ( // First, Recurse to group sub rows before aggregation const subRows = groupUpRecursively(groupedRows, depth + 1, id) - subRows.forEach(subRow => { + subRows.forEach((subRow) => { subRow.parentId = id }) // Flatten the leaf rows of the rows in this group const leafRows = depth - ? flattenBy(groupedRows, row => row.subRows) + ? flattenBy(groupedRows, (row) => row.subRows) : groupedRows const row = createRow( @@ -83,7 +83,7 @@ export function getGroupedRowModel(): ( index, depth, undefined, - parentId + parentId, ) Object.assign(row, { @@ -118,7 +118,7 @@ export function getGroupedRowModel(): ( row._groupingValuesCache[columnId] = aggregateFn( columnId, leafRows, - groupedRows + groupedRows, ) return row._groupingValuesCache[columnId] @@ -126,7 +126,7 @@ export function getGroupedRowModel(): ( }, }) - subRows.forEach(subRow => { + subRows.forEach((subRow) => { groupedFlatRows.push(subRow) groupedRowsById[subRow.id] = subRow // if (subRow.getIsGrouped?.()) { @@ -139,7 +139,7 @@ export function getGroupedRowModel(): ( }) return row - } + }, ) return aggregatedGroupedRows @@ -147,7 +147,7 @@ export function getGroupedRowModel(): ( const groupedRows = groupUpRecursively(rowModel.rows, 0) - groupedRows.forEach(subRow => { + groupedRows.forEach((subRow) => { groupedFlatRows.push(subRow) groupedRowsById[subRow.id] = subRow // if (subRow.getIsGrouped?.()) { @@ -170,7 +170,7 @@ export function getGroupedRowModel(): ( table._autoResetExpanded() table._autoResetPageIndex() }) - }) + }), ) } diff --git a/packages/table-core/src/utils/getPaginationRowModel.ts b/packages/table-core/src/utils/getPaginationRowModel.ts index 9119a5dc23..1529b01181 100644 --- a/packages/table-core/src/utils/getPaginationRowModel.ts +++ b/packages/table-core/src/utils/getPaginationRowModel.ts @@ -5,7 +5,7 @@ import { expandRows } from './getExpandedRowModel' export function getPaginationRowModel(opts?: { initialSync: boolean }): (table: Table) => () => RowModel { - return table => + return (table) => memo( () => [ table.getState().pagination, @@ -55,6 +55,6 @@ export function getPaginationRowModel(opts?: { return paginatedRowModel }, - getMemoOptions(table.options, 'debugTable', 'getPaginationRowModel') + getMemoOptions(table.options, 'debugTable', 'getPaginationRowModel'), ) } diff --git a/packages/table-core/src/utils/getSortedRowModel.ts b/packages/table-core/src/utils/getSortedRowModel.ts index 928c26448f..929b836736 100644 --- a/packages/table-core/src/utils/getSortedRowModel.ts +++ b/packages/table-core/src/utils/getSortedRowModel.ts @@ -3,9 +3,9 @@ import { SortingFn } from '../features/RowSorting' import { getMemoOptions, memo } from '../utils' export function getSortedRowModel(): ( - table: Table + table: Table, ) => () => RowModel { - return table => + return (table) => memo( () => [table.getState().sorting, table.getPreSortedRowModel()], (sorting, rowModel) => { @@ -18,8 +18,8 @@ export function getSortedRowModel(): ( const sortedFlatRows: Row[] = [] // Filter out sortings that correspond to non existing columns - const availableSorting = sortingState.filter(sort => - table.getColumn(sort.id)?.getCanSort() + const availableSorting = sortingState.filter((sort) => + table.getColumn(sort.id)?.getCanSort(), ) const columnInfoById: Record< @@ -31,7 +31,7 @@ export function getSortedRowModel(): ( } > = {} - availableSorting.forEach(sortEntry => { + availableSorting.forEach((sortEntry) => { const column = table.getColumn(sortEntry.id) if (!column) return @@ -45,7 +45,7 @@ export function getSortedRowModel(): ( const sortData = (rows: Row[]) => { // This will also perform a stable sorting using the row index // if needed. - const sortedData = rows.map(row => ({ ...row })) + const sortedData = rows.map((row) => ({ ...row })) sortedData.sort((rowA, rowB) => { for (let i = 0; i < availableSorting.length; i += 1) { @@ -98,7 +98,7 @@ export function getSortedRowModel(): ( }) // If there are sub-rows, sort them - sortedData.forEach(row => { + sortedData.forEach((row) => { sortedFlatRows.push(row) if (row.subRows?.length) { row.subRows = sortData(row.subRows) @@ -115,7 +115,7 @@ export function getSortedRowModel(): ( } }, getMemoOptions(table.options, 'debugTable', 'getSortedRowModel', () => - table._autoResetPageIndex() - ) + table._autoResetPageIndex(), + ), ) } diff --git a/packages/table-core/tests/RowPinning.test.ts b/packages/table-core/tests/RowPinning.test.ts index a034422cc8..6e20b68fcb 100644 --- a/packages/table-core/tests/RowPinning.test.ts +++ b/packages/table-core/tests/RowPinning.test.ts @@ -14,7 +14,7 @@ type PersonColumn = ColumnDef function generateColumns(people: Person[]): PersonColumn[] { const columnHelper = createColumnHelper() const person = people[0] - return Object.keys(person).map(key => { + return Object.keys(person).map((key) => { const typedKey = key as personKeys return columnHelper.accessor(typedKey, { id: typedKey }) }) diff --git a/packages/table-core/tests/RowSelection.test.ts b/packages/table-core/tests/RowSelection.test.ts index 38bdfb7dcb..266bf27806 100644 --- a/packages/table-core/tests/RowSelection.test.ts +++ b/packages/table-core/tests/RowSelection.test.ts @@ -14,7 +14,7 @@ type PersonColumn = ColumnDef function generateColumns(people: Person[]): PersonColumn[] { const columnHelper = createColumnHelper() const person = people[0] - return Object.keys(person).map(key => { + return Object.keys(person).map((key) => { const typedKey = key as personKeys return columnHelper.accessor(typedKey, { id: typedKey }) }) @@ -31,7 +31,7 @@ describe('RowSelection', () => { onStateChange() {}, renderFallbackValue: '', data, - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, state: { rowSelection: { '0': true, @@ -60,7 +60,7 @@ describe('RowSelection', () => { onStateChange() {}, renderFallbackValue: '', data, - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, state: { rowSelection: { '0': true, @@ -89,7 +89,7 @@ describe('RowSelection', () => { onStateChange() {}, renderFallbackValue: '', data, - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, state: { rowSelection: {}, }, @@ -167,7 +167,7 @@ describe('RowSelection', () => { const result = RowSelection.isSubRowSelected( firstRow, table.getState().rowSelection, - table + table, ) expect(result).toEqual(false) @@ -182,7 +182,7 @@ describe('RowSelection', () => { onStateChange() {}, renderFallbackValue: '', data, - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, state: { rowSelection: {}, }, @@ -195,7 +195,7 @@ describe('RowSelection', () => { const result = RowSelection.isSubRowSelected( firstRow, table.getState().rowSelection, - table + table, ) expect(result).toEqual(false) @@ -210,7 +210,7 @@ describe('RowSelection', () => { onStateChange() {}, renderFallbackValue: '', data, - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, state: { rowSelection: { '0.0': true, @@ -225,7 +225,7 @@ describe('RowSelection', () => { const result = RowSelection.isSubRowSelected( firstRow, table.getState().rowSelection, - table + table, ) expect(result).toEqual('some') @@ -240,7 +240,7 @@ describe('RowSelection', () => { onStateChange() {}, renderFallbackValue: '', data, - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, state: { rowSelection: { '0.0': true, @@ -256,7 +256,7 @@ describe('RowSelection', () => { const result = RowSelection.isSubRowSelected( firstRow, table.getState().rowSelection, - table + table, ) expect(result).toEqual('all') @@ -266,11 +266,11 @@ describe('RowSelection', () => { const columns = generateColumns(data) const table = createTable({ - enableRowSelection: row => row.index === 0, // only first row is selectable (of 2 sub-rows) + enableRowSelection: (row) => row.index === 0, // only first row is selectable (of 2 sub-rows) onStateChange() {}, renderFallbackValue: '', data, - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, state: { rowSelection: { '0.0': true, // first sub-row @@ -285,7 +285,7 @@ describe('RowSelection', () => { const result = RowSelection.isSubRowSelected( firstRow, table.getState().rowSelection, - table + table, ) expect(result).toEqual('all') @@ -299,7 +299,7 @@ describe('RowSelection', () => { onStateChange() {}, renderFallbackValue: '', data, - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, state: { rowSelection: { '0.0.0': true, // first nested sub-row @@ -314,7 +314,7 @@ describe('RowSelection', () => { const result = RowSelection.isSubRowSelected( firstRow, table.getState().rowSelection, - table + table, ) expect(result).toEqual('some') diff --git a/packages/table-core/tests/getGroupedRowModel.test.ts b/packages/table-core/tests/getGroupedRowModel.test.ts index 2448547b75..16e3632588 100644 --- a/packages/table-core/tests/getGroupedRowModel.test.ts +++ b/packages/table-core/tests/getGroupedRowModel.test.ts @@ -11,7 +11,7 @@ type PersonColumn = ColumnDef function generateColumns(people: Person[]): PersonColumn[] { const columnHelper = createColumnHelper() const person = people[0] - return Object.keys(person).map(key => { + return Object.keys(person).map((key) => { const typedKey = key as personKeys return columnHelper.accessor(typedKey, { id: typedKey }) }) @@ -24,9 +24,9 @@ describe('#getGroupedRowModel', () => { const grouping = ['firstName', 'lastName', 'age'] const start = new Date() - data.forEach(p => (p.firstName = 'Fixed')) - data.forEach(p => (p.lastName = 'Name')) - data.forEach(p => (p.age = 123)) + data.forEach((p) => (p.firstName = 'Fixed')) + data.forEach((p) => (p.lastName = 'Name')) + data.forEach((p) => (p.age = 123)) const table = createTable({ onStateChange() {}, @@ -42,10 +42,10 @@ describe('#getGroupedRowModel', () => { expect(groupedById['firstName:Fixed'].leafRows.length).toEqual(50000) expect( - groupedById['firstName:Fixed>lastName:Name'].leafRows.length + groupedById['firstName:Fixed>lastName:Name'].leafRows.length, ).toEqual(50000) expect( - groupedById['firstName:Fixed>lastName:Name>age:123'].leafRows.length + groupedById['firstName:Fixed>lastName:Name>age:123'].leafRows.length, ).toEqual(50000) expect(end.valueOf() - start.valueOf()).toBeLessThan(5000) }) diff --git a/packages/table-core/tests/test-setup.ts b/packages/table-core/tests/test-setup.ts deleted file mode 100644 index a9d0dd31aa..0000000000 --- a/packages/table-core/tests/test-setup.ts +++ /dev/null @@ -1 +0,0 @@ -import '@testing-library/jest-dom/vitest' diff --git a/packages/table-core/tests/utils/document.test.ts b/packages/table-core/tests/utils/document.test.ts new file mode 100644 index 0000000000..442543d7ff --- /dev/null +++ b/packages/table-core/tests/utils/document.test.ts @@ -0,0 +1,57 @@ +import { + safelyAccessDocument, + safelyAccessDocumentEvent, +} from '../../src/utils/document' +import { afterEach, beforeEach, expect, describe, test } from 'vitest' + +const originalDocument = globalThis.document + +export function getDocumentMock(): Document { + return {} as Document +} + +describe('safelyAccessDocument', () => { + describe('global document', () => { + const mockedDocument = getDocumentMock() + const originalDocument = globalThis.document + beforeEach(() => { + if (typeof globalThis.document === 'undefined') { + globalThis.document = mockedDocument + } + }) + afterEach(() => { + if (typeof originalDocument === 'undefined') { + // @ts-expect-error Just Typings + delete globalThis.document + } + }) + + test('get global document when no args are passed', () => { + const contextDocument = safelyAccessDocument() + expect(contextDocument).toEqual(mockedDocument) + }) + }) + + test('get document', () => { + let givenDocument = {} as Document + const contextDocument = safelyAccessDocument(givenDocument) + + expect(contextDocument).toEqual(givenDocument) + }) +}) + +describe('safelyAccessDocumentEvent', () => { + test('get document by given event', () => { + const fakeDocument = {} + const event = new Event('mousedown') + + class FakeElement extends EventTarget { + ownerDocument = fakeDocument + } + + Object.defineProperty(event, 'target', { value: new FakeElement() }) + + const document = safelyAccessDocumentEvent(event) + expect(fakeDocument).toEqual(document) + }) +}) diff --git a/packages/table-core/vitest.config.ts b/packages/table-core/vitest.config.ts index 523b22e583..016a1bf033 100644 --- a/packages/table-core/vitest.config.ts +++ b/packages/table-core/vitest.config.ts @@ -6,8 +6,7 @@ export default defineConfig({ name: packageJson.name, dir: './tests', watch: false, - environment: 'jsdom', - setupFiles: ['./tests/test-setup.ts'], + environment: 'node', globals: true, }, }) diff --git a/packages/vue-table/package.json b/packages/vue-table/package.json index 647056f5b6..3c820e15db 100644 --- a/packages/vue-table/package.json +++ b/packages/vue-table/package.json @@ -1,12 +1,12 @@ { "name": "@tanstack/vue-table", - "version": "8.20.5", + "version": "8.21.3", "description": "Headless UI for building powerful tables & datagrids for Vue.", "author": "Tanner Linsley", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/TanStack/table.git", + "url": "git+https://github.com/TanStack/table.git", "directory": "packages/vue-table" }, "homepage": "https://tanstack.com/table", diff --git a/packages/vue-table/rollup.config.mjs b/packages/vue-table/rollup.config.mjs index d9685568cb..309729e056 100644 --- a/packages/vue-table/rollup.config.mjs +++ b/packages/vue-table/rollup.config.mjs @@ -13,5 +13,5 @@ export default defineConfig( globals: { vue: 'Vue', }, - }) + }), ) diff --git a/packages/vue-table/src/index.ts b/packages/vue-table/src/index.ts index 1cd3823fe9..1ea766c261 100755 --- a/packages/vue-table/src/index.ts +++ b/packages/vue-table/src/index.ts @@ -43,7 +43,7 @@ export const FlexRender = defineComponent({ }) function getOptionsWithReactiveData( - options: TableOptionsWithReactiveData + options: TableOptionsWithReactiveData, ) { return mergeProxy(options, { data: unref(options.data), @@ -51,7 +51,7 @@ function getOptionsWithReactiveData( } export function useVueTable( - initialOptions: TableOptionsWithReactiveData + initialOptions: TableOptionsWithReactiveData, ) { const IS_REACTIVE = isRef(initialOptions.data) @@ -62,7 +62,7 @@ export function useVueTable( renderFallbackValue: null, mergeOptions( defaultOptions: TableOptions, - options: TableOptions + options: TableOptions, ) { return IS_REACTIVE ? { @@ -72,11 +72,11 @@ export function useVueTable( : mergeProxy(defaultOptions, options) }, }, - IS_REACTIVE ? getOptionsWithReactiveData(initialOptions) : initialOptions + IS_REACTIVE ? getOptionsWithReactiveData(initialOptions) : initialOptions, ) const table = createTable( - resolvedOptions as TableOptionsResolved + resolvedOptions as TableOptionsResolved, ) // Add reactivity support @@ -85,12 +85,12 @@ export function useVueTable( watch( dataRef, () => { - table.setState(prev => ({ + table.setState((prev) => ({ ...prev, data: dataRef.value, })) }, - { immediate: true } + { immediate: true }, ) } @@ -98,7 +98,7 @@ export function useVueTable( const state = ref(table.initialState) watchEffect(() => { - table.setOptions(prev => { + table.setOptions((prev) => { const stateProxy = new Proxy({} as typeof state.value, { get: (_, prop) => state.value[prop as keyof typeof state.value], }) @@ -124,7 +124,7 @@ export function useVueTable( initialOptions.onStateChange?.(updater) }, - } + }, ) }) }) diff --git a/packages/vue-table/src/merge-proxy.ts b/packages/vue-table/src/merge-proxy.ts index c5605934b1..575bd39dd3 100644 --- a/packages/vue-table/src/merge-proxy.ts +++ b/packages/vue-table/src/merge-proxy.ts @@ -40,7 +40,7 @@ type BoxedTupleTypes = { [P in keyof T]: [UnboxLazy] }[Exclude] type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ( - k: infer I + k: infer I, ) => void ? I : never @@ -76,6 +76,6 @@ export function mergeProxy(...sources: any): any { return [...Array.from(new Set(keys))] }, }, - propTraps + propTraps, ) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf00fbd5ab..254d8e0175 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: '@babel/preset-typescript': specifier: ^7.24.7 version: 7.24.7(@babel/core@7.24.7) + '@changesets/cli': + specifier: ^2.29.7 + version: 2.29.7(@types/node@20.14.9) '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 @@ -41,9 +44,9 @@ importers: '@size-limit/preset-small-lib': specifier: ^11.1.4 version: 11.1.4(size-limit@11.1.4) - '@tanstack/config': - specifier: ^0.13.0 - version: 0.13.0(@types/node@20.14.9)(esbuild@0.21.5)(eslint@8.57.0)(rollup@4.18.0)(typescript@5.4.5)(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) + '@svitejs/changesets-changelog-github-compact': + specifier: ^1.2.0 + version: 1.2.0(encoding@0.1.13) '@testing-library/jest-dom': specifier: ^6.4.6 version: 6.4.6(vitest@1.6.0(@types/node@20.14.9)(jsdom@24.1.0)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) @@ -62,15 +65,18 @@ importers: knip: specifier: ^5.23.2 version: 5.23.2(@types/node@20.14.9)(typescript@5.4.5) + markdown-link-extractor: + specifier: ^4.0.2 + version: 4.0.2 nx: - specifier: ^19.3.2 - version: 19.3.2 + specifier: ^22.1.3 + version: 22.1.3 prettier: - specifier: ^3.3.2 - version: 3.3.2 + specifier: ^3.7.4 + version: 3.7.4 prettier-plugin-svelte: specifier: ^3.2.5 - version: 3.2.5(prettier@3.3.2)(svelte@4.2.18) + version: 3.2.5(prettier@3.7.4)(svelte@4.2.18) rimraf: specifier: ^5.0.7 version: 5.0.7 @@ -87,11 +93,14 @@ importers: specifier: ^5.12.0 version: 5.12.0(rollup@4.18.0) sherif: - specifier: ^0.9.0 - version: 0.9.0 + specifier: ^1.6.1 + version: 1.9.0 size-limit: specifier: ^11.1.4 version: 11.1.4 + tinyglobby: + specifier: ^0.2.15 + version: 0.2.15 typescript: specifier: 5.4.5 version: 5.4.5 @@ -126,7 +135,7 @@ importers: specifier: ^17.3.9 version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(rxjs@7.8.1) '@tanstack/angular-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/angular-table rxjs: specifier: ~7.8.1 @@ -199,7 +208,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/angular-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/angular-table rxjs: specifier: ~7.8.1 @@ -272,7 +281,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/angular-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/angular-table rxjs: specifier: ~7.8.1 @@ -345,7 +354,83 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/angular-table': - specifier: ^8.20.5 + specifier: ^8.21.3 + version: link:../../../packages/angular-table + rxjs: + specifier: ~7.8.1 + version: 7.8.1 + zone.js: + specifier: ~0.14.4 + version: 0.14.7 + devDependencies: + '@angular-devkit/build-angular': + specifier: ^17.3.8 + version: 17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5))(typescript@5.4.5) + '@angular/cli': + specifier: ^17.3.8 + version: 17.3.8(chokidar@3.6.0) + '@angular/compiler-cli': + specifier: ^17.3.9 + version: 17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5) + '@types/jasmine': + specifier: ~5.1.4 + version: 5.1.4 + jasmine-core: + specifier: ~5.1.2 + version: 5.1.2 + karma: + specifier: ~6.4.3 + version: 6.4.3 + karma-chrome-launcher: + specifier: ~3.2.0 + version: 3.2.0 + karma-coverage: + specifier: ~2.2.1 + version: 2.2.1 + karma-jasmine: + specifier: ~5.1.0 + version: 5.1.0(karma@6.4.3) + karma-jasmine-html-reporter: + specifier: ~2.1.0 + version: 2.1.0(jasmine-core@5.1.2)(karma-jasmine@5.1.0(karma@6.4.3))(karma@6.4.3) + tslib: + specifier: ^2.6.2 + version: 2.6.3 + typescript: + specifier: 5.4.5 + version: 5.4.5 + + examples/angular/column-resizing-performant: + dependencies: + '@angular/animations': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/common': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1) + '@angular/compiler': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/core': + specifier: ^17.3.9 + version: 17.3.11(rxjs@7.8.1)(zone.js@0.14.7) + '@angular/forms': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(rxjs@7.8.1) + '@angular/platform-browser': + specifier: ^17.3.9 + version: 17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/platform-browser-dynamic': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))) + '@angular/router': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(rxjs@7.8.1) + '@faker-js/faker': + specifier: ^8.4.1 + version: 8.4.1 + '@tanstack/angular-table': + specifier: ^8.21.3 version: link:../../../packages/angular-table rxjs: specifier: ~7.8.1 @@ -415,7 +500,7 @@ importers: specifier: ^17.3.9 version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))) '@tanstack/angular-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/angular-table rxjs: specifier: ~7.8.1 @@ -461,6 +546,137 @@ importers: specifier: 5.4.5 version: 5.4.5 + examples/angular/editable: + dependencies: + '@angular/animations': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/common': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1) + '@angular/compiler': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/core': + specifier: ^17.3.9 + version: 17.3.11(rxjs@7.8.1)(zone.js@0.14.7) + '@angular/forms': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(rxjs@7.8.1) + '@angular/platform-browser': + specifier: ^17.3.9 + version: 17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/platform-browser-dynamic': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))) + '@angular/router': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(rxjs@7.8.1) + '@faker-js/faker': + specifier: ^8.4.1 + version: 8.4.1 + '@tanstack/angular-table': + specifier: ^8.21.3 + version: link:../../../packages/angular-table + rxjs: + specifier: ~7.8.1 + version: 7.8.1 + zone.js: + specifier: ~0.14.4 + version: 0.14.7 + devDependencies: + '@angular-devkit/build-angular': + specifier: ^17.3.8 + version: 17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5))(typescript@5.4.5) + '@angular/cli': + specifier: ^17.3.8 + version: 17.3.8(chokidar@3.6.0) + '@angular/compiler-cli': + specifier: ^17.3.9 + version: 17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5) + '@types/jasmine': + specifier: ~5.1.4 + version: 5.1.4 + jasmine-core: + specifier: ~5.1.2 + version: 5.1.2 + karma: + specifier: ~6.4.3 + version: 6.4.3 + karma-chrome-launcher: + specifier: ~3.2.0 + version: 3.2.0 + karma-coverage: + specifier: ~2.2.1 + version: 2.2.1 + karma-jasmine: + specifier: ~5.1.0 + version: 5.1.0(karma@6.4.3) + karma-jasmine-html-reporter: + specifier: ~2.1.0 + version: 2.1.0(jasmine-core@5.1.2)(karma-jasmine@5.1.0(karma@6.4.3))(karma@6.4.3) + tslib: + specifier: ^2.6.2 + version: 2.6.3 + typescript: + specifier: 5.4.5 + version: 5.4.5 + + examples/angular/expanding: + dependencies: + '@angular/animations': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/common': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1) + '@angular/compiler': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/core': + specifier: ^17.3.9 + version: 17.3.11(rxjs@7.8.1)(zone.js@0.14.7) + '@angular/forms': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(rxjs@7.8.1) + '@angular/platform-browser': + specifier: ^17.3.9 + version: 17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/platform-browser-dynamic': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))) + '@angular/router': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(rxjs@7.8.1) + '@faker-js/faker': + specifier: ^8.4.1 + version: 8.4.1 + '@tanstack/angular-table': + specifier: ^8.21.3 + version: link:../../../packages/angular-table + rxjs: + specifier: ~7.8.1 + version: 7.8.1 + zone.js: + specifier: ~0.14.4 + version: 0.14.7 + devDependencies: + '@angular-devkit/build-angular': + specifier: ^17.3.8 + version: 17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5))(typescript@5.4.5) + '@angular/cli': + specifier: ^17.3.8 + version: 17.3.8(chokidar@3.6.0) + '@angular/compiler-cli': + specifier: ^17.3.9 + version: 17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5) + tslib: + specifier: ^2.6.2 + version: 2.6.3 + typescript: + specifier: 5.4.5 + version: 5.4.5 + examples/angular/filters: dependencies: '@angular/animations': @@ -488,7 +704,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/angular-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/angular-table rxjs: specifier: ~7.8.1 @@ -561,7 +777,86 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/angular-table': - specifier: ^8.20.5 + specifier: ^8.21.3 + version: link:../../../packages/angular-table + rxjs: + specifier: ~7.8.1 + version: 7.8.1 + zone.js: + specifier: ~0.14.4 + version: 0.14.7 + devDependencies: + '@angular-devkit/build-angular': + specifier: ^17.3.8 + version: 17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5))(typescript@5.4.5) + '@angular/cli': + specifier: ^17.3.8 + version: 17.3.8(chokidar@3.6.0) + '@angular/compiler-cli': + specifier: ^17.3.9 + version: 17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5) + '@types/jasmine': + specifier: ~5.1.4 + version: 5.1.4 + jasmine-core: + specifier: ~5.1.2 + version: 5.1.2 + karma: + specifier: ~6.4.3 + version: 6.4.3 + karma-chrome-launcher: + specifier: ~3.2.0 + version: 3.2.0 + karma-coverage: + specifier: ~2.2.1 + version: 2.2.1 + karma-jasmine: + specifier: ~5.1.0 + version: 5.1.0(karma@6.4.3) + karma-jasmine-html-reporter: + specifier: ~2.1.0 + version: 2.1.0(jasmine-core@5.1.2)(karma-jasmine@5.1.0(karma@6.4.3))(karma@6.4.3) + tslib: + specifier: ^2.6.2 + version: 2.6.3 + typescript: + specifier: 5.4.5 + version: 5.4.5 + + examples/angular/row-dnd: + dependencies: + '@angular/animations': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/cdk': + specifier: ^17.3.10 + version: 17.3.10(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1) + '@angular/common': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1) + '@angular/compiler': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/core': + specifier: ^17.3.9 + version: 17.3.11(rxjs@7.8.1)(zone.js@0.14.7) + '@angular/forms': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(rxjs@7.8.1) + '@angular/platform-browser': + specifier: ^17.3.9 + version: 17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/platform-browser-dynamic': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))) + '@angular/router': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(rxjs@7.8.1) + '@faker-js/faker': + specifier: ^8.4.1 + version: 8.4.1 + '@tanstack/angular-table': + specifier: ^8.21.3 version: link:../../../packages/angular-table rxjs: specifier: ~7.8.1 @@ -634,7 +929,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/angular-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/angular-table rxjs: specifier: ~7.8.1 @@ -707,7 +1002,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/angular-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/angular-table rxjs: specifier: ~7.8.1 @@ -777,7 +1072,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/angular-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/angular-table rxjs: specifier: ~7.8.1 @@ -823,10 +1118,65 @@ importers: specifier: 5.4.5 version: 5.4.5 + examples/angular/sub-components: + dependencies: + '@angular/animations': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/common': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1) + '@angular/compiler': + specifier: ^17.3.9 + version: 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/core': + specifier: ^17.3.9 + version: 17.3.11(rxjs@7.8.1)(zone.js@0.14.7) + '@angular/forms': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(rxjs@7.8.1) + '@angular/platform-browser': + specifier: ^17.3.9 + version: 17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) + '@angular/platform-browser-dynamic': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))) + '@angular/router': + specifier: ^17.3.9 + version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(rxjs@7.8.1) + '@faker-js/faker': + specifier: ^8.4.1 + version: 8.4.1 + '@tanstack/angular-table': + specifier: ^8.21.3 + version: link:../../../packages/angular-table + rxjs: + specifier: ~7.8.1 + version: 7.8.1 + zone.js: + specifier: ~0.14.4 + version: 0.14.7 + devDependencies: + '@angular-devkit/build-angular': + specifier: ^17.3.8 + version: 17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5))(typescript@5.4.5) + '@angular/cli': + specifier: ^17.3.8 + version: 17.3.8(chokidar@3.6.0) + '@angular/compiler-cli': + specifier: ^17.3.9 + version: 17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5) + tslib: + specifier: ^2.6.2 + version: 2.6.3 + typescript: + specifier: 5.4.5 + version: 5.4.5 + examples/lit/basic: dependencies: '@tanstack/lit-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/lit-table '@twind/core': specifier: ^1.1.3 @@ -860,7 +1210,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/lit-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/lit-table lit: specifier: ^3.1.4 @@ -882,7 +1232,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/lit-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/lit-table lit: specifier: ^3.1.4 @@ -904,7 +1254,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/lit-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/lit-table lit: specifier: ^3.1.4 @@ -926,7 +1276,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/lit-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/lit-table lit: specifier: ^3.1.4 @@ -942,13 +1292,35 @@ importers: specifier: ^5.3.2 version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) + examples/lit/sorting-dynamic-data: + dependencies: + '@faker-js/faker': + specifier: ^8.4.1 + version: 8.4.1 + '@tanstack/lit-table': + specifier: ^8.21.3 + version: link:../../../packages/lit-table + lit: + specifier: ^3.1.4 + version: 3.1.4 + devDependencies: + '@rollup/plugin-replace': + specifier: ^5.0.7 + version: 5.0.7(rollup@4.29.1) + typescript: + specifier: 5.4.5 + version: 5.4.5 + vite: + specifier: ^5.3.2 + version: 5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) + examples/lit/virtualized-rows: dependencies: '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 '@tanstack/lit-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/lit-table '@tanstack/lit-virtual': specifier: ^3.8.3 @@ -970,12 +1342,12 @@ importers: examples/qwik/basic: dependencies: '@tanstack/qwik-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/qwik-table devDependencies: '@builder.io/qwik': specifier: ^1.6.0 - version: 1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@6.11.1) + version: 1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@7.16.0) serve: specifier: ^14.2.3 version: 14.2.3 @@ -992,12 +1364,12 @@ importers: specifier: ^8.19.4 version: link:../../../packages/match-sorter-utils '@tanstack/qwik-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/qwik-table devDependencies: '@builder.io/qwik': specifier: ^1.6.0 - version: 1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@6.11.1) + version: 1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@7.16.0) '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 @@ -1014,12 +1386,12 @@ importers: examples/qwik/row-selection: dependencies: '@tanstack/qwik-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/qwik-table devDependencies: '@builder.io/qwik': specifier: ^1.6.0 - version: 1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@6.11.1) + version: 1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@7.16.0) '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 @@ -1036,12 +1408,12 @@ importers: examples/qwik/sorting: dependencies: '@tanstack/qwik-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/qwik-table devDependencies: '@builder.io/qwik': specifier: ^1.6.0 - version: 1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@6.11.1) + version: 1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@7.16.0) '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 @@ -1058,7 +1430,7 @@ importers: examples/react/basic: dependencies: '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1089,7 +1461,7 @@ importers: examples/react/bootstrap: dependencies: '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table bootstrap: specifier: ^5.3.3 @@ -1150,7 +1522,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1181,7 +1553,7 @@ importers: examples/react/column-groups: dependencies: '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1215,7 +1587,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1249,7 +1621,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1283,7 +1655,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1317,7 +1689,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1348,7 +1720,7 @@ importers: examples/react/column-sizing: dependencies: '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1379,7 +1751,7 @@ importers: examples/react/column-visibility: dependencies: '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1413,7 +1785,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1447,7 +1819,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1481,7 +1853,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1518,7 +1890,7 @@ importers: specifier: ^8.19.4 version: link:../../../packages/match-sorter-utils '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1555,7 +1927,7 @@ importers: specifier: ^8.19.4 version: link:../../../packages/match-sorter-utils '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1592,7 +1964,7 @@ importers: specifier: ^8.19.4 version: link:../../../packages/match-sorter-utils '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1626,7 +1998,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1660,7 +2032,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1694,7 +2066,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1728,7 +2100,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1768,7 +2140,7 @@ importers: specifier: ^8.19.4 version: link:../../../packages/match-sorter-utils '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1820,7 +2192,7 @@ importers: specifier: ^5.15.21 version: 5.15.21(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1857,7 +2229,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1894,7 +2266,96 @@ importers: specifier: ^5.49.0 version: 5.49.0(react@18.3.1) '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 + version: link:../../../packages/react-table + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + devDependencies: + '@rollup/plugin-replace': + specifier: ^5.0.7 + version: 5.0.7(rollup@4.29.1) + '@types/react': + specifier: ^18.3.3 + version: 18.3.3 + '@types/react-dom': + specifier: ^18.3.0 + version: 18.3.0 + '@vitejs/plugin-react': + specifier: ^4.3.1 + version: 4.3.1(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) + typescript: + specifier: 5.4.5 + version: 5.4.5 + vite: + specifier: ^5.3.2 + version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) + + examples/react/query-router-search-params: + dependencies: + '@tanstack/react-query': + specifier: ^5.49.0 + version: 5.49.0(react@18.3.1) + '@tanstack/react-router': + specifier: ^1.43.2 + version: 1.43.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@tanstack/react-table': + specifier: ^8.21.3 + version: link:../../../packages/react-table + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + devDependencies: + '@faker-js/faker': + specifier: ^8.4.1 + version: 8.4.1 + '@rollup/plugin-replace': + specifier: ^5.0.7 + version: 5.0.7(rollup@4.29.1) + '@tanstack/router-vite-plugin': + specifier: ^1.43.1 + version: 1.43.1(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) + '@types/react': + specifier: ^18.3.3 + version: 18.3.3 + '@types/react-dom': + specifier: ^18.3.0 + version: 18.3.0 + '@vitejs/plugin-react': + specifier: ^4.3.1 + version: 4.3.1(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) + typescript: + specifier: 5.4.5 + version: 5.4.5 + vite: + specifier: ^5.3.2 + version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) + + examples/react/row-dnd: + dependencies: + '@dnd-kit/core': + specifier: ^6.1.0 + version: 6.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@dnd-kit/modifiers': + specifier: ^7.0.0 + version: 7.0.0(@dnd-kit/core@6.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + '@dnd-kit/sortable': + specifier: ^8.0.0 + version: 8.0.0(@dnd-kit/core@6.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + '@dnd-kit/utilities': + specifier: ^3.2.2 + version: 3.2.2(react@18.3.1) + '@faker-js/faker': + specifier: ^8.4.1 + version: 8.4.1 + '@tanstack/react-table': + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1922,16 +2383,13 @@ importers: specifier: ^5.3.2 version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - examples/react/query-router-search-params: + examples/react/row-pinning: dependencies: - '@tanstack/react-query': - specifier: ^5.49.0 - version: 5.49.0(react@18.3.1) - '@tanstack/react-router': - specifier: ^1.43.2 - version: 1.43.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@faker-js/faker': + specifier: ^8.4.1 + version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -1940,15 +2398,9 @@ importers: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) devDependencies: - '@faker-js/faker': - specifier: ^8.4.1 - version: 8.4.1 '@rollup/plugin-replace': specifier: ^5.0.7 version: 5.0.7(rollup@4.29.1) - '@tanstack/router-vite-plugin': - specifier: ^1.43.1 - version: 1.43.1(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) '@types/react': specifier: ^18.3.3 version: 18.3.3 @@ -1965,25 +2417,13 @@ importers: specifier: ^5.3.2 version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - examples/react/row-dnd: + examples/react/row-selection: dependencies: - '@dnd-kit/core': - specifier: ^6.1.0 - version: 6.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@dnd-kit/modifiers': - specifier: ^7.0.0 - version: 7.0.0(@dnd-kit/core@6.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) - '@dnd-kit/sortable': - specifier: ^8.0.0 - version: 8.0.0(@dnd-kit/core@6.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) - '@dnd-kit/utilities': - specifier: ^3.2.2 - version: 3.2.2(react@18.3.1) '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -2011,13 +2451,13 @@ importers: specifier: ^5.3.2 version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - examples/react/row-pinning: + examples/react/sorting: dependencies: '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -2045,13 +2485,13 @@ importers: specifier: ^5.3.2 version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - examples/react/row-selection: + examples/react/sub-components: dependencies: '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table react: specifier: ^18.3.1 @@ -2079,14 +2519,17 @@ importers: specifier: ^5.3.2 version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - examples/react/sorting: + examples/react/virtualized-columns: dependencies: '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table + '@tanstack/react-virtual': + specifier: ^3.12.0 + version: 3.12.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -2113,14 +2556,17 @@ importers: specifier: ^5.3.2 version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - examples/react/sub-components: + examples/react/virtualized-columns-experimental: dependencies: '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table + '@tanstack/react-virtual': + specifier: ^3.12.0 + version: 3.12.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -2139,25 +2585,28 @@ importers: version: 18.3.0 '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) + version: 4.3.1(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) typescript: specifier: 5.4.5 version: 5.4.5 vite: specifier: ^5.3.2 - version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) + version: 5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - examples/react/virtualized-columns: + examples/react/virtualized-infinite-scrolling: dependencies: '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 + '@tanstack/react-query': + specifier: ^5.49.0 + version: 5.49.0(react@18.3.1) '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table '@tanstack/react-virtual': - specifier: ^3.8.1 - version: 3.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^3.12.0 + version: 3.12.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -2184,20 +2633,17 @@ importers: specifier: ^5.3.2 version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - examples/react/virtualized-infinite-scrolling: + examples/react/virtualized-rows: dependencies: '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 - '@tanstack/react-query': - specifier: ^5.49.0 - version: 5.49.0(react@18.3.1) '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table '@tanstack/react-virtual': - specifier: ^3.8.1 - version: 3.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^3.12.0 + version: 3.12.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -2224,17 +2670,17 @@ importers: specifier: ^5.3.2 version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - examples/react/virtualized-rows: + examples/react/virtualized-rows-experimental: dependencies: '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 '@tanstack/react-table': - specifier: ^8.20.6 + specifier: ^8.21.3 version: link:../../../packages/react-table '@tanstack/react-virtual': - specifier: ^3.8.1 - version: 3.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^3.12.0 + version: 3.12.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -2253,18 +2699,18 @@ importers: version: 18.3.0 '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) + version: 4.3.1(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) typescript: specifier: 5.4.5 version: 5.4.5 vite: specifier: ^5.3.2 - version: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) + version: 5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) examples/solid/basic: dependencies: '@tanstack/solid-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/solid-table solid-js: specifier: ^1.8.18 @@ -2283,7 +2729,7 @@ importers: examples/solid/bootstrap: dependencies: '@tanstack/solid-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/solid-table bootstrap: specifier: ^5.3.3 @@ -2311,7 +2757,7 @@ importers: examples/solid/column-groups: dependencies: '@tanstack/solid-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/solid-table solid-js: specifier: ^1.8.18 @@ -2330,7 +2776,7 @@ importers: examples/solid/column-ordering: dependencies: '@tanstack/solid-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/solid-table solid-js: specifier: ^1.8.18 @@ -2352,7 +2798,7 @@ importers: examples/solid/column-visibility: dependencies: '@tanstack/solid-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/solid-table solid-js: specifier: ^1.8.18 @@ -2374,7 +2820,7 @@ importers: specifier: ^1.4.3 version: 1.4.3(solid-js@1.8.18) '@tanstack/solid-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/solid-table solid-js: specifier: ^1.8.18 @@ -2396,7 +2842,7 @@ importers: examples/solid/sorting: dependencies: '@tanstack/solid-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/solid-table solid-js: specifier: ^1.8.18 @@ -2424,7 +2870,7 @@ importers: specifier: ^3.1.1 version: 3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) '@tanstack/svelte-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/svelte-table '@tsconfig/svelte': specifier: ^5.0.4 @@ -2451,7 +2897,7 @@ importers: specifier: ^3.1.1 version: 3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) '@tanstack/svelte-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/svelte-table '@tsconfig/svelte': specifier: ^5.0.4 @@ -2481,7 +2927,7 @@ importers: specifier: ^3.1.1 version: 3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) '@tanstack/svelte-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/svelte-table '@tsconfig/svelte': specifier: ^5.0.4 @@ -2511,7 +2957,7 @@ importers: specifier: ^3.1.1 version: 3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) '@tanstack/svelte-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/svelte-table '@tsconfig/svelte': specifier: ^5.0.4 @@ -2538,7 +2984,7 @@ importers: specifier: ^3.1.1 version: 3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) '@tanstack/svelte-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/svelte-table '@tsconfig/svelte': specifier: ^5.0.4 @@ -2571,7 +3017,7 @@ importers: specifier: ^8.19.4 version: link:../../../packages/match-sorter-utils '@tanstack/svelte-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/svelte-table '@tsconfig/svelte': specifier: ^5.0.4 @@ -2601,7 +3047,7 @@ importers: specifier: ^3.1.1 version: 3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) '@tanstack/svelte-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/svelte-table '@tsconfig/svelte': specifier: ^5.0.4 @@ -2622,7 +3068,7 @@ importers: examples/vanilla/basic: dependencies: '@tanstack/table-core': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/table-core nanostores: specifier: ^0.11.3 @@ -2641,7 +3087,7 @@ importers: examples/vanilla/pagination: dependencies: '@tanstack/table-core': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/table-core nanostores: specifier: ^0.11.3 @@ -2663,7 +3109,7 @@ importers: examples/vanilla/sorting: dependencies: '@tanstack/table-core': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/table-core nanostores: specifier: ^0.11.3 @@ -2685,7 +3131,7 @@ importers: examples/vue/basic: dependencies: '@tanstack/vue-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/vue-table vue: specifier: ^3.4.31 @@ -2713,7 +3159,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/vue-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/vue-table vue: specifier: ^3.4.31 @@ -2741,7 +3187,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/vue-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/vue-table vue: specifier: ^3.4.31 @@ -2769,7 +3215,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/vue-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/vue-table vue: specifier: ^3.4.31 @@ -2791,13 +3237,38 @@ importers: specifier: ^2.0.22 version: 2.0.29(typescript@5.4.5) + examples/vue/grouping: + dependencies: + '@tanstack/vue-table': + specifier: ^8.21.3 + version: link:../../../packages/vue-table + vue: + specifier: ^3.4.31 + version: 3.5.13(typescript@5.4.5) + devDependencies: + '@types/node': + specifier: ^20.14.9 + version: 20.14.9 + '@vitejs/plugin-vue': + specifier: ^5.0.5 + version: 5.2.1(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1))(vue@3.5.13(typescript@5.4.5)) + typescript: + specifier: 5.4.5 + version: 5.4.5 + vite: + specifier: ^5.3.2 + version: 5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) + vue-tsc: + specifier: ^2.0.22 + version: 2.2.0(typescript@5.4.5) + examples/vue/pagination: dependencies: '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 '@tanstack/vue-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/vue-table vue: specifier: ^3.4.31 @@ -2825,7 +3296,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/vue-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/vue-table vue: specifier: ^3.4.31 @@ -2853,7 +3324,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/vue-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/vue-table vue: specifier: ^3.4.31 @@ -2884,7 +3355,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/vue-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/vue-table vue: specifier: ^3.4.31 @@ -2912,7 +3383,7 @@ importers: specifier: ^8.4.1 version: 8.4.1 '@tanstack/vue-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/vue-table vue: specifier: ^3.4.31 @@ -2937,7 +3408,7 @@ importers: examples/vue/virtualized-rows: dependencies: '@tanstack/vue-table': - specifier: ^8.20.5 + specifier: ^8.21.3 version: link:../../../packages/vue-table '@tanstack/vue-virtual': specifier: ^3.10.8 @@ -2975,8 +3446,11 @@ importers: version: 2.6.3 devDependencies: '@analogjs/vite-plugin-angular': - specifier: ^1.3.1 - version: 1.5.0(@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(tslib@2.6.3)(typescript@5.6.2))(typescript@5.6.2))(@ngtools/webpack@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(typescript@5.6.2)(webpack@5.90.3(esbuild@0.21.5))) + specifier: ^1.11.0 + version: 1.11.0(@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5))(typescript@5.4.5)) + '@analogjs/vitest-angular': + specifier: ^1.11.0 + version: 1.11.0(@analogjs/vite-plugin-angular@1.11.0(@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5))(typescript@5.4.5)))(vitest@1.6.0(@types/node@20.14.9)(jsdom@24.1.0)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) '@angular/core': specifier: ^17.3.9 version: 17.3.11(rxjs@7.8.1)(zone.js@0.14.7) @@ -2988,7 +3462,13 @@ importers: version: 17.3.11(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(@angular/platform-browser@17.3.11(@angular/animations@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))) ng-packagr: specifier: ^17.3.0 - version: 17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(tslib@2.6.3)(typescript@5.6.2) + version: 17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5) + typescript: + specifier: 5.4.5 + version: 5.4.5 + vitest: + specifier: ^1.6.0 + version: 1.6.0(@types/node@20.14.9)(jsdom@24.1.0)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) packages/lit-table: dependencies: @@ -3014,7 +3494,7 @@ importers: devDependencies: '@builder.io/qwik': specifier: ^1.6.0 - version: 1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@6.11.1) + version: 1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@7.16.0) packages/react-table: dependencies: @@ -3078,7 +3558,7 @@ importers: devDependencies: vue: specifier: ^3.4.31 - version: 3.4.31(typescript@5.6.2) + version: 3.4.31(typescript@5.4.5) packages: @@ -3089,11 +3569,23 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@analogjs/vite-plugin-angular@1.5.0': - resolution: {integrity: sha512-e88LyREExpKc6KgpRUcKu8JJO0k6ZVDHYzsKEzRVxbz34e8D3LTGJxYAoiW6ucxW4irKbhHZlySll5+cdtvfXA==} + '@analogjs/vite-plugin-angular@1.11.0': + resolution: {integrity: sha512-18HSwOAVFQjwwRQPq9+duOoubuiut0INo55h0gV3v2TWS+tAP2wXP8SPyAG99P3ySNQB7zMUYE8mVsqLM+8bDA==} + peerDependencies: + '@angular-devkit/build-angular': ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + '@angular/build': ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@angular-devkit/build-angular': + optional: true + '@angular/build': + optional: true + + '@analogjs/vitest-angular@1.11.0': + resolution: {integrity: sha512-ZY0AOJfTV/eIOkx3QLCF0iOUnGfYNGpf45kVVrOcuam2II6w6YcgsqpRxDIR66wXi3gbvIxJzwB05v0Hc4+Gkw==} peerDependencies: - '@angular-devkit/build-angular': ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 - '@ngtools/webpack': ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + '@analogjs/vite-plugin-angular': '*' + '@angular-devkit/architect': ^0.1500.0 || ^0.1600.0 || ^0.1700.0 || ^0.1800.0 || ^0.1900.0 || next + vitest: ^1.3.1 || ^2.0.0 '@angular-devkit/architect@0.1703.8': resolution: {integrity: sha512-lKxwG4/QABXZvJpqeSIn/kAwnY6MM9HdHZUV+o5o3UiTi+vO8rZApG4CCaITH3Bxebm7Nam7Xbk8RuukC5rq6g==} @@ -3166,6 +3658,13 @@ packages: peerDependencies: '@angular/core': 17.3.11 + '@angular/cdk@17.3.10': + resolution: {integrity: sha512-b1qktT2c1TTTe5nTji/kFAVW92fULK0YhYAvJ+BjZTPKu2FniZNe8o4qqQ0pUuvtMu+ZQxp/QqFYoidIVCjScg==} + peerDependencies: + '@angular/common': ^17.0.0 || ^18.0.0 + '@angular/core': ^17.0.0 || ^18.0.0 + rxjs: ^6.5.3 || ^7.4.0 + '@angular/cli@17.3.8': resolution: {integrity: sha512-X5ZOQ6ZTKVHjhIsfl32ZRqbs+FUoeHLbT7x4fh2Os/8ObDDwrUcCJPqxe2b2RB5E2d0vepYigknHeLE7gwzlNQ==} engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} @@ -3967,18 +4466,68 @@ packages: peerDependencies: undici: '*' + '@changesets/apply-release-plan@7.0.13': + resolution: {integrity: sha512-BIW7bofD2yAWoE8H4V40FikC+1nNFEKBisMECccS16W1rt6qqhNTBDmIw5HaqmMgtLNz9e7oiALiEUuKrQ4oHg==} + + '@changesets/assemble-release-plan@6.0.9': + resolution: {integrity: sha512-tPgeeqCHIwNo8sypKlS3gOPmsS3wP0zHt67JDuL20P4QcXiw/O4Hl7oXiuLnP9yg+rXLQ2sScdV1Kkzde61iSQ==} + + '@changesets/changelog-git@0.2.1': + resolution: {integrity: sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==} + + '@changesets/cli@2.29.7': + resolution: {integrity: sha512-R7RqWoaksyyKXbKXBTbT4REdy22yH81mcFK6sWtqSanxUCbUi9Uf+6aqxZtDQouIqPdem2W56CdxXgsxdq7FLQ==} + hasBin: true + + '@changesets/config@3.1.1': + resolution: {integrity: sha512-bd+3Ap2TKXxljCggI0mKPfzCQKeV/TU4yO2h2C6vAihIo8tzseAn2e7klSuiyYYXvgu53zMN1OeYMIQkaQoWnA==} + + '@changesets/errors@0.2.0': + resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} + + '@changesets/get-dependents-graph@2.1.3': + resolution: {integrity: sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==} + + '@changesets/get-github-info@0.6.0': + resolution: {integrity: sha512-v/TSnFVXI8vzX9/w3DU2Ol+UlTZcu3m0kXTjTT4KlAdwSvwutcByYwyYn9hwerPWfPkT2JfpoX0KgvCEi8Q/SA==} + + '@changesets/get-release-plan@4.0.13': + resolution: {integrity: sha512-DWG1pus72FcNeXkM12tx+xtExyH/c9I1z+2aXlObH3i9YA7+WZEVaiHzHl03thpvAgWTRaH64MpfHxozfF7Dvg==} + + '@changesets/get-version-range-type@0.4.0': + resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} + + '@changesets/git@3.0.4': + resolution: {integrity: sha512-BXANzRFkX+XcC1q/d27NKvlJ1yf7PSAgi8JG6dt8EfbHFHi4neau7mufcSca5zRhwOL8j9s6EqsxmT+s+/E6Sw==} + + '@changesets/logger@0.1.1': + resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} + + '@changesets/parse@0.4.1': + resolution: {integrity: sha512-iwksMs5Bf/wUItfcg+OXrEpravm5rEd9Bf4oyIPL4kVTmJQ7PNDSd6MDYkpSJR1pn7tz/k8Zf2DhTCqX08Ou+Q==} + + '@changesets/pre@2.0.2': + resolution: {integrity: sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==} + + '@changesets/read@0.6.5': + resolution: {integrity: sha512-UPzNGhsSjHD3Veb0xO/MwvasGe8eMyNrR/sT9gR8Q3DhOQZirgKhhXv/8hVsI0QpPjR004Z9iFxoJU6in3uGMg==} + + '@changesets/should-skip-package@0.1.2': + resolution: {integrity: sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==} + + '@changesets/types@4.1.0': + resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} + + '@changesets/types@6.1.0': + resolution: {integrity: sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==} + + '@changesets/write@0.4.0': + resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} + '@colors/colors@1.5.0': resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} - '@commitlint/parse@19.0.3': - resolution: {integrity: sha512-Il+tNyOb8VDxN3P6XoBBwWJtKKGzHlitEuXA5BP6ir/3loWlsSqDr5aecl6hZcC/spjq4pHqNh0qPlfeWu38QA==} - engines: {node: '>=v18'} - - '@commitlint/types@19.0.3': - resolution: {integrity: sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA==} - engines: {node: '>=v18'} - '@discoveryjs/json-ext@0.5.7': resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} @@ -4011,6 +4560,15 @@ packages: peerDependencies: react: '>=16.8.0' + '@emnapi/core@1.7.1': + resolution: {integrity: sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==} + + '@emnapi/runtime@1.7.1': + resolution: {integrity: sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==} + + '@emnapi/wasi-threads@1.1.0': + resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} + '@emotion/babel-plugin-jsx-pragmatic@0.2.1': resolution: {integrity: sha512-xy1SlgEJygAAIvIuC2idkGKJYa6v5iwoyILkvNKgk347bV+IImXrUat5Z86EmLGyWhEoTplVT9EHqTnHZG4HFw==} peerDependencies: @@ -4626,28 +5184,6 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.4.0': - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.11.0': - resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@eslint/js@8.57.0': - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@eslint/js@9.9.1': - resolution: {integrity: sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@faker-js/faker@8.4.1': resolution: {integrity: sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} @@ -4667,18 +5203,14 @@ packages: '@floating-ui/utils@0.2.3': resolution: {integrity: sha512-XGndio0l5/Gvd6CLIABvsav9HHezgDFFhDfHk1bvLfr9ni8dojqLSvBbotJEjmIwNHL7vK4QzBJTdBRoB+c1ww==} - '@humanwhocodes/config-array@0.11.14': - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead + '@inquirer/external-editor@1.0.2': + resolution: {integrity: sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -4692,10 +5224,22 @@ packages: resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} engines: {node: '>=8'} + '@jest/diff-sequences@30.0.1': + resolution: {integrity: sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/get-type@30.1.0': + resolution: {integrity: sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + '@jest/schemas@29.6.3': resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/schemas@30.0.5': + resolution: {integrity: sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -4717,12 +5261,6 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@kwsites/file-exists@1.1.1': - resolution: {integrity: sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==} - - '@kwsites/promise-deferred@1.1.1': - resolution: {integrity: sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==} - '@leichtgewicht/ip-codec@2.0.5': resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==} @@ -4736,18 +5274,11 @@ packages: resolution: {integrity: sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==} engines: {node: '>= 0.4'} - '@microsoft/api-extractor-model@7.29.4': - resolution: {integrity: sha512-LHOMxmT8/tU1IiiiHOdHFF83Qsi+V8d0kLfscG4EvQE9cafiR8blOYr8SfkQKWB1wgEilQgXJX3MIA4vetDLZw==} - - '@microsoft/api-extractor@7.47.4': - resolution: {integrity: sha512-HKm+P4VNzWwvq1Ey+Jfhhj/3MjsD+ka2hbt8L5AcRM95lu1MFOYnz3XlU7Gr79Q/ZhOb7W/imAKeYrOI0bFydg==} - hasBin: true - - '@microsoft/tsdoc-config@0.17.0': - resolution: {integrity: sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==} + '@manypkg/find-root@1.1.0': + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} - '@microsoft/tsdoc@0.15.0': - resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} + '@manypkg/get-packages@1.1.3': + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} '@mui/base@5.0.0-beta.40': resolution: {integrity: sha512-I/lGHztkCzvwlXpjD2+SNmvNQvB4227xBXhISPjEaJUXGImOQ9f3D2Yj/T3KasSI/h0MLWy74X0J6clhPmsRbQ==} @@ -4848,6 +5379,9 @@ packages: '@types/react': optional: true + '@napi-rs/wasm-runtime@0.2.4': + resolution: {integrity: sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==} + '@ngtools/webpack@17.3.8': resolution: {integrity: sha512-CjSVVa/9fzMpEDQP01SC4colKCbZwj7vUq0H2bivp8jVsmd21x9Fu0gDBH0Y9NdfAIm4eGZvmiZKMII3vIOaYQ==} engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} @@ -4917,67 +5451,53 @@ packages: resolution: {integrity: sha512-9ApYM/3+rBt9V80aYg6tZfzj3UWdiYyCt7gJUD1VJKvWF5nwKDSICXbYIQbspFTq6TOpbsEtIC0LArB8d9PFmg==} engines: {node: ^16.14.0 || >=18.0.0} - '@nrwl/tao@19.3.2': - resolution: {integrity: sha512-I1gW7woqwU6rdlgwj6XXAKcreJ5ptRKI2WpLdZErkrPmaRG/jMZx/yjZrG4PWdIEuZ4ZmYnRsoXbKN6ilCknQw==} - hasBin: true - - '@nx/nx-darwin-arm64@19.3.2': - resolution: {integrity: sha512-MTqPTR1FwfVfIkHKUw95dFlPBN6mbqfJ+KzLHvUSPcqLKelhi82tsisjMoB5sNK0YWcNNVqYW72ojCnHVB0TUg==} - engines: {node: '>= 10'} + '@nx/nx-darwin-arm64@22.1.3': + resolution: {integrity: sha512-4D/jXGsr3jcQ0vBo8aXXZMdfmC3n4OsZ1zjFaOXlF62Ujug+RqI/IvKxycT9r7Lr09PmW2OqBC01NfIWKoBLhg==} cpu: [arm64] os: [darwin] - '@nx/nx-darwin-x64@19.3.2': - resolution: {integrity: sha512-C8s9X5AlVgl3V5PycLdX+75lpAWq0qQs6QUEAnyxrLM9l+/HRecgoW6uZ7tX6Fnd8WGfMIwyahBw4LyZgk6zTw==} - engines: {node: '>= 10'} + '@nx/nx-darwin-x64@22.1.3': + resolution: {integrity: sha512-XmdccOBp1Lx9DXUzYDX65mkFqFvXaxUKm1d63bfA43vxIYUpR59SASB81KRQ/Q4dgvvU27C0EJuxSJbXsSkSYw==} cpu: [x64] os: [darwin] - '@nx/nx-freebsd-x64@19.3.2': - resolution: {integrity: sha512-XeEpEU0iqJ/5cAPMmjqJ0Sdz89ZtDRj4NdksioyhAHri94X5/3lm3lDs4tB3nObT7p3QL7r/HP1itq5DHYmMSQ==} - engines: {node: '>= 10'} + '@nx/nx-freebsd-x64@22.1.3': + resolution: {integrity: sha512-O+o4mqPwhKxfdsri4KxDbXbjwIwr04GfTSfA0TwgXs6hFf68qmc45FAmPGrPSvxIJg9+mUVDeFirdS8GcUE0jQ==} cpu: [x64] os: [freebsd] - '@nx/nx-linux-arm-gnueabihf@19.3.2': - resolution: {integrity: sha512-r4Wl0P94QRBUyiexUcfwKxqFXp48avMG3L0no/ZuNWGODbw1w8ppA4vhnkXtXbIaMdaTGx9eIYO7kFJ2SwMCng==} - engines: {node: '>= 10'} + '@nx/nx-linux-arm-gnueabihf@22.1.3': + resolution: {integrity: sha512-ZIPDgzLq8qmvrZ3Bp+bWXam5uKwahjcChBNtORVtrHQfm4mxov2RMUMKTg2ZsVAWVP64zK+gmzG5LuoZjPMm4Q==} cpu: [arm] os: [linux] - '@nx/nx-linux-arm64-gnu@19.3.2': - resolution: {integrity: sha512-oaTC4iS1fXnc61ZgSxwCQ2GGIqY64G22udRqNsX9TOtgrT7UA/mjE3Si01r+0xODimOiB525ueyxdIh1MAu6Vg==} - engines: {node: '>= 10'} + '@nx/nx-linux-arm64-gnu@22.1.3': + resolution: {integrity: sha512-wgpPaTpQKl+cCkSuE5zamTVrg14mRvT+bLAeN/yHSUgMztvGxwl3Ll+K9DgEcktBo1PLECTWNkVaW8IAsJm4Rg==} cpu: [arm64] os: [linux] - '@nx/nx-linux-arm64-musl@19.3.2': - resolution: {integrity: sha512-yyO9bTM7FW7HTYsSQlL4lgbAexUBpzfhdK+RkgsCiW+U/5bi+jFRxo/SbqGUL+IVliFavWyRXahMqOOM6nBq/w==} - engines: {node: '>= 10'} + '@nx/nx-linux-arm64-musl@22.1.3': + resolution: {integrity: sha512-o9XmQehSPR2y0RD4evD+Ob3lNFuwsFOL5upVJqZ3rcE6GkJIFPg8SwEP5FaRIS5MwS04fxnek20NZ18BHjjV/g==} cpu: [arm64] os: [linux] - '@nx/nx-linux-x64-gnu@19.3.2': - resolution: {integrity: sha512-DC+llVdL4toLjQkDGBgzoCe26FWIOT+SzRdVcKePoNliZ4jDhkOh3+p75NEIOEcDUgoE9M2iCWEBUjkV978ogw==} - engines: {node: '>= 10'} + '@nx/nx-linux-x64-gnu@22.1.3': + resolution: {integrity: sha512-ekcinyDNTa2huVe02T2SFMR8oArohozRbMGO19zftbObXXI4dLdoAuLNb3vK9Pe4vYOpkhfxBVkZvcWMmx7JdA==} cpu: [x64] os: [linux] - '@nx/nx-linux-x64-musl@19.3.2': - resolution: {integrity: sha512-Wun4v+kuuqv20tJiCENkHGisDqfx029bFufqxx2IOe9TvD6vK4rMMkFVPUoK3FP8EBdaMW4nrR0ZucTFnStl6w==} - engines: {node: '>= 10'} + '@nx/nx-linux-x64-musl@22.1.3': + resolution: {integrity: sha512-CqpRIJeIgELCqIgjtSsYnnLi6G0uqjbp/Pw9d7w4im4/NmJXqaE9gxpdHA1eowXLgAy9W1LkfzCPS8Q2IScPuQ==} cpu: [x64] os: [linux] - '@nx/nx-win32-arm64-msvc@19.3.2': - resolution: {integrity: sha512-bNVf6eu5rWFjHvn0rKHeZYlHUcs3naXvvbduW1g0DPkHG6mt8FYffQmyboN+CSeBd/uWDPNyTUekVWwU7PjtLA==} - engines: {node: '>= 10'} + '@nx/nx-win32-arm64-msvc@22.1.3': + resolution: {integrity: sha512-YbuWb8KQsAR9G0+7b4HA16GV962/VWtRcdS7WY2yaScmPT2W5rObl528Y2j4DuB0j/MVZj12qJKrYfUyjL+UJA==} cpu: [arm64] os: [win32] - '@nx/nx-win32-x64-msvc@19.3.2': - resolution: {integrity: sha512-8DD5BPa5YrxTOKL3HTAgEd+IXNqRtJfwvbrn2MbOMNMyoMG9Zi5yhFvTH/HTT9Tz6VUHvXP16QWYA3R7eFi7Gg==} - engines: {node: '>= 10'} + '@nx/nx-win32-x64-msvc@22.1.3': + resolution: {integrity: sha512-G90Sp409ypeOUbmj6nmEbdy043KJUKaZ7pffxmM6i63yEe2F2WdmMgdi525vUEgmq+pfB9zQQOX1sDR/rPFvtg==} cpu: [x64] os: [win32] @@ -5256,35 +5776,10 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - '@rushstack/node-core-library@5.5.1': - resolution: {integrity: sha512-ZutW56qIzH8xIOlfyaLQJFx+8IBqdbVCZdnj+XT1MorQ1JqqxHse8vbCpEM+2MjsrqcbxcgDIbfggB1ZSQ2A3g==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - - '@rushstack/rig-package@0.5.3': - resolution: {integrity: sha512-olzSSjYrvCNxUFZowevC3uz8gvKr3WTpHQ7BkpjtRpA3wK+T0ybep/SRUMfr195gBzJm5gaXw0ZMgjIyHqJUow==} - - '@rushstack/terminal@0.13.3': - resolution: {integrity: sha512-fc3zjXOw8E0pXS5t9vTiIPx9gHA0fIdTXsu9mT4WbH+P3mYvnrX0iAQ5a6NvyK1+CqYWBTw/wVNx7SDJkI+WYQ==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - - '@rushstack/ts-command-line@4.22.3': - resolution: {integrity: sha512-edMpWB3QhFFZ4KtSzS8WNjBgR4PXPPOVrOHMbb7kNpmQ1UFS9HdVtjCXg1H5fG+xYAbeE+TMPcVPUyX2p84STA==} - '@schematics/angular@17.3.8': resolution: {integrity: sha512-2g4OmSyE9YGq50Uj7fNI26P/TSAFJ7ZuirwTF2O7Xc4XRQ29/tYIIqhezpNlTb6rlYblcQuMcUZBrMfWJHcqJw==} engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} - '@shikijs/core@1.12.0': - resolution: {integrity: sha512-mc1cLbm6UQ8RxLc0dZES7v5rkH+99LxQp/ZvTqV3NLyYsO/fD6JhEflP1H5b2SDq9gI0+0G36AVZWxvounfR9w==} - '@sigstore/bundle@2.3.2': resolution: {integrity: sha512-wueKWDk70QixNLB363yHc2D2ItTgYiMTdPwK8D9dKQMR3ZQ0c35IxP5xnwQ8cNLoCgCRcHf14kE+CLIvNX1zmA==} engines: {node: ^16.14.0 || >=18.0.0} @@ -5312,6 +5807,9 @@ packages: '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@sinclair/typebox@0.34.41': + resolution: {integrity: sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==} + '@sindresorhus/merge-streams@2.3.0': resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} engines: {node: '>=18'} @@ -5346,12 +5844,6 @@ packages: peerDependencies: solid-js: ^1.6.12 - '@stylistic/eslint-plugin-js@2.7.1': - resolution: {integrity: sha512-4YgqaPhPV8nMAMWnRz+RB7S/CQh/ximISMj2QJ8HPveUzCqUBkeNV7iB4cggr4pkalcDCsIu0y4LhmrlS1yAgA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: '>=8.40.0' - '@sveltejs/vite-plugin-svelte-inspector@2.1.0': resolution: {integrity: sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg==} engines: {node: ^18.0.0 || >=20} @@ -5367,14 +5859,13 @@ packages: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.0 + '@svitejs/changesets-changelog-github-compact@1.2.0': + resolution: {integrity: sha512-08eKiDAjj4zLug1taXSIJ0kGL5cawjVCyJkBb6EWSg5fEPX6L+Wtr0CH2If4j5KYylz85iaZiFlUItvgJvll5g==} + engines: {node: ^14.13.1 || ^16.0.0 || >=18} + '@swc/helpers@0.5.11': resolution: {integrity: sha512-YNlnKRWF2sVojTpIyzwou9XoTNbzbzONwRhOoniEioF1AtaitTvVZblaQRrAzChWQ1bLYyYSWzM18y4WwgzJ+A==} - '@tanstack/config@0.13.0': - resolution: {integrity: sha512-vkPmNYH/Ee8Zqn9f0lwB2tyi/Erg9kKmaywQZGBWRfaHwXUGahMWc0S8Fb2iS/SMa8YOkUUl1w79J0hELTY65A==} - engines: {node: '>=18'} - hasBin: true - '@tanstack/history@1.41.0': resolution: {integrity: sha512-euTyZoHidW1+NeAW9V7SSPNjD6c54TBqKBO8HypA880HWlTXLW6V8rcBnfi1LY1W706dGCvDmZDTg6fsl/jJUw==} engines: {node: '>=12'} @@ -5405,11 +5896,11 @@ packages: react: '>=16' react-dom: '>=16' - '@tanstack/react-virtual@3.8.1': - resolution: {integrity: sha512-dP5a7giEM4BQWLJ7K07ToZv8rF51mzbrBMkf0scg1QNYuFx3utnPUBPUHdzaowZhIez1K2XS78amuzD+YGRA5Q==} + '@tanstack/react-virtual@3.12.0': + resolution: {integrity: sha512-6krceiPN07kpxXmU6m8AY7EL0X1gHLu8m3nJdh4phvktzVNxkQfBmSwnRUpoUjGQO1PAn8wSAhYaL8hY1cS1vw==} peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 '@tanstack/router-generator@1.43.1': resolution: {integrity: sha512-9dK/vVGO6SupMed1EAHwsIY0sHEu1EBsVYa208/V+zonJLOTNTthuDAYUxjmLTLm18FeqsujKoDl0hFX4rsREw==} @@ -5437,8 +5928,8 @@ packages: '@tanstack/virtual-core@3.11.2': resolution: {integrity: sha512-vTtpNt7mKCiZ1pwU9hfKPhpdVO2sVzFQsxoVBGtOSHxlrRRzYr8iQ2TlwbAcRYCcEiZ9ECAM8kBzH0v2+VzfKw==} - '@tanstack/virtual-core@3.8.1': - resolution: {integrity: sha512-uNtAwenT276M9QYCjTBoHZ8X3MUeCRoGK59zPi92hMIxdfS9AyHjkDWJ94WroDxnv48UE+hIeo21BU84jKc8aQ==} + '@tanstack/virtual-core@3.12.0': + resolution: {integrity: sha512-7mDINtua3v/pOnn6WUmuT9dPXYSO7WidFej7JzoAfqEOcbbpt/iZ1WPqd+eg+FnrL9nUJK8radqj4iAU51Zchg==} '@tanstack/virtual-core@3.8.3': resolution: {integrity: sha512-vd2A2TnM5lbnWZnHi9B+L2gPtkSeOtJOAw358JqokIH1+v2J7vUAzFVPwB/wrye12RFOurffXu33plm4uQ+JBQ==} @@ -5557,8 +6048,8 @@ packages: typescript: optional: true - '@types/argparse@1.0.38': - resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} + '@tybys/wasm-util@0.9.0': + resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==} '@types/aria-query@5.0.4': resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} @@ -5590,9 +6081,6 @@ packages: '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} - '@types/conventional-commits-parser@5.0.0': - resolution: {integrity: sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==} - '@types/cookie@0.4.1': resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} @@ -5617,9 +6105,6 @@ packages: '@types/express@4.17.21': resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} - '@types/hast@3.0.4': - resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} @@ -5638,6 +6123,9 @@ packages: '@types/node-forge@1.3.11': resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} + '@types/node@12.20.55': + resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + '@types/node@20.14.9': resolution: {integrity: sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==} @@ -5698,66 +6186,6 @@ packages: '@types/ws@8.5.10': resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} - '@typescript-eslint/eslint-plugin@8.3.0': - resolution: {integrity: sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/parser@8.3.0': - resolution: {integrity: sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/scope-manager@8.3.0': - resolution: {integrity: sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/type-utils@8.3.0': - resolution: {integrity: sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/types@8.3.0': - resolution: {integrity: sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/typescript-estree@8.3.0': - resolution: {integrity: sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/utils@8.3.0': - resolution: {integrity: sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - - '@typescript-eslint/visitor-keys@8.3.0': - resolution: {integrity: sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@vitejs/plugin-basic-ssl@1.1.0': resolution: {integrity: sha512-wO4Dk/rm8u7RNhOf95ZzcEmC9rYOncYgvq4z3duaJrCgjN8BxAnDVyndanfcJZ0O6XZzHz6Q0hTimxTg8Y9g/A==} engines: {node: '>=14.6.0'} @@ -5971,9 +6399,9 @@ packages: '@yarnpkg/lockfile@1.1.0': resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} - '@yarnpkg/parsers@3.0.0-rc.46': - resolution: {integrity: sha512-aiATs7pSutzda/rq8fnuPwTglyVwjM22bNnK2ZgjrpAjQHSSl3lztd2f9evst1W/qnC58DRz7T7QndUDumAR4Q==} - engines: {node: '>=14.15.0'} + '@yarnpkg/parsers@3.0.2': + resolution: {integrity: sha512-/HcYgtUSiJiot/XWGLOlGxPYUG65+/31V8oqk17vZLW1xlCoR4PampyePljOxY2n8/3jz9+tIFzICsyGujJZoA==} + engines: {node: '>=18.12.0'} '@zeit/schemas@2.36.0': resolution: {integrity: sha512-7kjMwcChYEzMKjeex9ZFXkt1AyNov9R5HZtjBKVsmVpw7pa7ZtlCGvCBC2vnnXctaYN+aRI61HjIqeetZW5ROg==} @@ -5982,10 +6410,6 @@ packages: resolution: {integrity: sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==} hasBin: true - JSONStream@1.3.5: - resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} - hasBin: true - abbrev@2.0.0: resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -5996,14 +6420,10 @@ packages: acorn-import-assertions@1.9.0: resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} + deprecated: package has been renamed to acorn-import-attributes peerDependencies: acorn: ^8 - acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn-walk@8.3.3: resolution: {integrity: sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==} engines: {node: '>=0.4.0'} @@ -6025,14 +6445,6 @@ packages: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} - ajv-draft-04@1.0.0: - resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} - peerDependencies: - ajv: ^8.5.0 - peerDependenciesMeta: - ajv: - optional: true - ajv-formats@2.1.1: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} peerDependencies: @@ -6041,14 +6453,6 @@ packages: ajv: optional: true - ajv-formats@3.0.1: - resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true - ajv-keywords@3.5.2: resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} peerDependencies: @@ -6065,9 +6469,6 @@ packages: ajv@8.12.0: resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} - ajv@8.13.0: - resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} - ajv@8.16.0: resolution: {integrity: sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==} @@ -6136,23 +6537,16 @@ packages: arity-n@1.0.4: resolution: {integrity: sha512-fExL2kFDC1Q2DUOx3whE/9KoN66IzkY4b4zUHUBFM1ojEYjZZYDcUW3bek/ufGionX9giIKDC5redH2IlGqcQQ==} - array-each@1.0.1: - resolution: {integrity: sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==} - engines: {node: '>=0.10.0'} - array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} - array-ify@1.0.0: - resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} - array-last@1.3.0: resolution: {integrity: sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==} engines: {node: '>=0.10.0'} - array-slice@1.1.0: - resolution: {integrity: sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==} - engines: {node: '>=0.10.0'} + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} @@ -6167,6 +6561,9 @@ packages: peerDependencies: postcss: ^8.1.0 + axios@1.13.2: + resolution: {integrity: sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==} + axios@1.7.2: resolution: {integrity: sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==} @@ -6183,9 +6580,6 @@ packages: '@babel/core': ^7.12.0 webpack: '>=5' - babel-plugin-add-module-exports@0.2.1: - resolution: {integrity: sha512-3AN/9V/rKuv90NG65m4tTHsI04XrCKsWbztIcW7a8H5iIN7WlvWucRtVV0V/rT4QvtA11n5Vmp20fLwfMWqp6g==} - babel-plugin-istanbul@6.1.1: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} @@ -6246,6 +6640,10 @@ packages: batch@0.6.1: resolution: {integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==} + better-path-resolve@1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + big.js@5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} @@ -6324,6 +6722,10 @@ packages: resolution: {integrity: sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg==} engines: {node: ^16.14.0 || >=18.0.0} + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -6378,9 +6780,19 @@ packages: chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + chardet@2.1.0: + resolution: {integrity: sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==} + check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + cheerio-select@2.1.0: + resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} + + cheerio@1.1.2: + resolution: {integrity: sha512-IkxPpb5rS/d1IiLbHMgfPuS0FgiWTtFIm/Nj+2woXDLTZ7fOT2eqzgYbdMlLweqlHbsZjxEChoVK+7iph7jyQg==} + engines: {node: '>=20.18.1'} + chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} @@ -6396,6 +6808,10 @@ packages: ci-env@1.17.0: resolution: {integrity: sha512-NtTjhgSEqv4Aj90TUYHQLxHdnCPXnjdtuGG1X8lTfp/JqeXTdw0FTWl/vUAPuvbWZTF8QVpv6ASe/XacE+7R2A==} + ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + classnames@2.5.1: resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} @@ -6489,12 +6905,6 @@ packages: commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - compare-func@2.0.0: - resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} - - compare-versions@6.1.1: - resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} - compose-function@3.0.3: resolution: {integrity: sha512-xzhzTJ5eC+gmIzvZq+C3kCJHsp9os6tJkrigDRZclyGtOKINbZtE8n1Tzmeh32jW+BUDPbvZpibwvJHBLGMVwg==} @@ -6535,15 +6945,6 @@ packages: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} - conventional-changelog-angular@7.0.0: - resolution: {integrity: sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==} - engines: {node: '>=16'} - - conventional-commits-parser@5.0.0: - resolution: {integrity: sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==} - engines: {node: '>=16'} - hasBin: true - convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} @@ -6596,13 +6997,14 @@ packages: critters@0.0.22: resolution: {integrity: sha512-NU7DEcQZM2Dy8XTKFHxtdnIM/drE312j2T4PCVaSUcS0oBeyT/NImpRw/Ap0zOr/1SE7SgPK9tGPg1WK/sVakw==} - cross-spawn@5.1.0: - resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} - cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + css-loader@6.10.0: resolution: {integrity: sha512-LTSA/jWbwdMlk+rhmElbDR2vbtQoTBPr7fkJE+mxrHj+7ru0hUmHafDRzWIjIHTwpitWVaqY2/UWGRca3yUgRw==} engines: {node: '>= 12.13.0'} @@ -6641,9 +7043,6 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - current-git-branch@1.1.0: - resolution: {integrity: sha512-n5mwGZllLsFzxDPtTmadqGe4IIBPfqPbiIRX4xgFR9VK/Bx47U+94KiVkxSKAKN6/s43TlkztS2GZpgMKzwQ8A==} - custom-event@1.0.1: resolution: {integrity: sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==} @@ -6651,6 +7050,9 @@ packages: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} + dataloader@1.4.0: + resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} + date-format@4.0.14: resolution: {integrity: sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==} engines: {node: '>=4.0'} @@ -6666,14 +7068,6 @@ packages: supports-color: optional: true - debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.3.6: resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} engines: {node: '>=6.0'} @@ -6694,9 +7088,6 @@ packages: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} @@ -6740,10 +7131,6 @@ packages: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - detect-file@1.0.0: - resolution: {integrity: sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==} - engines: {node: '>=0.10.0'} - detect-indent@6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} @@ -6766,10 +7153,6 @@ packages: resolution: {integrity: sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==} engines: {node: '>=6'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dom-accessibility-api@0.5.16: resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} @@ -6795,9 +7178,8 @@ packages: domutils@3.1.0: resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} - dot-prop@5.3.0: - resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} - engines: {node: '>=8'} + domutils@3.2.2: + resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} dotenv-expand@11.0.6: resolution: {integrity: sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g==} @@ -6807,8 +7189,9 @@ packages: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} - duplexer@0.1.2: - resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -6836,6 +7219,9 @@ packages: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} + encoding-sniffer@0.2.1: + resolution: {integrity: sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==} + encoding@0.1.13: resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} @@ -6858,6 +7244,10 @@ packages: resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} engines: {node: '>=8.6'} + enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} + ent@2.2.1: resolution: {integrity: sha512-QHuXVeZx9d+tIQAz/XztU0ZwZf2Agg9CcXcgE1rurqvdBeDBrpSwjl8/6XUqMg7tw2Y7uAdKb2sRv+bSEFqQ5A==} engines: {node: '>= 0.4'} @@ -6866,6 +7256,10 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + entities@6.0.1: + resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} + engines: {node: '>=0.12'} + env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -6884,6 +7278,10 @@ packages: resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} engines: {node: '>= 0.4'} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} @@ -6891,14 +7289,17 @@ packages: es-module-lexer@1.5.4: resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + es6-promise@3.3.1: resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} - esbuild-register@3.6.0: - resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==} - peerDependencies: - esbuild: '>=0.12 <1' - esbuild-wasm@0.20.1: resolution: {integrity: sha512-6v/WJubRsjxBbQdz6izgvx7LsVFvVaGmSdwrFHmEzoVgfXL89hkKPoQHsnVI2ngOkcBUQT9kmAM1hVL1k/Av4A==} engines: {node: '>=12'} @@ -6944,72 +7345,15 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - eslint-compat-utils@0.5.1: - resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} - engines: {node: '>=12'} - peerDependencies: - eslint: '>=6.0.0' - - eslint-import-resolver-node@0.3.9: - resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - - eslint-plugin-es-x@7.8.0: - resolution: {integrity: sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - eslint: '>=8' - - eslint-plugin-import-x@4.1.1: - resolution: {integrity: sha512-dBEM8fACIFNt4H7GoOaRmnH6evJW6JSTJTYYgmRd3vI4geBTjgDM/JyUDKUwIw0HDSyI+u7Vs3vFRXUo/BOAtA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - - eslint-plugin-n@17.10.2: - resolution: {integrity: sha512-e+s4eAf5NtJaxPhTNu3qMO0Iz40WANS93w9LQgYcvuljgvDmWi/a3rh+OrNyMHeng6aOWGJO0rCg5lH4zi8yTw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: '>=8.23.0' - eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. - hasBin: true - - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true - esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} - engines: {node: '>=0.10'} - esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} @@ -7043,10 +7387,6 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} - execa@0.6.3: - resolution: {integrity: sha512-/teX3MDLFBdYUhRk8WCBYboIMUmqeizu0m9Z3YF3JWrbEh/SlZg00vLJSaAGWw3wrZ9tE0buNw79eaAPYhUuvg==} - engines: {node: '>=4'} - execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -7055,10 +7395,6 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - expand-tilde@2.0.2: - resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==} - engines: {node: '>=0.10.0'} - exponential-backoff@3.1.1: resolution: {integrity: sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==} @@ -7069,6 +7405,9 @@ packages: extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + extendable-error@0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + external-editor@3.1.0: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} @@ -7083,9 +7422,6 @@ packages: fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-url-parser@1.1.3: resolution: {integrity: sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==} @@ -7096,14 +7432,19 @@ packages: resolution: {integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==} engines: {node: '>=0.8.0'} + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + figures@3.2.0: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -7135,30 +7476,10 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - find-up@6.3.0: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - findup-sync@5.0.0: - resolution: {integrity: sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==} - engines: {node: '>= 10.13.0'} - - fined@2.0.0: - resolution: {integrity: sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==} - engines: {node: '>= 10.13.0'} - - flagged-respawn@2.0.0: - resolution: {integrity: sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==} - engines: {node: '>= 10.13.0'} - - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true @@ -7175,14 +7496,6 @@ packages: debug: optional: true - for-in@1.0.2: - resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} - engines: {node: '>=0.10.0'} - - for-own@1.0.0: - resolution: {integrity: sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==} - engines: {node: '>=0.10.0'} - foreground-child@3.2.1: resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==} engines: {node: '>=14'} @@ -7191,6 +7504,10 @@ packages: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} + form-data@4.0.5: + resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==} + engines: {node: '>= 6'} + forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -7257,13 +7574,17 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + get-package-type@0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} - get-stream@3.0.0: - resolution: {integrity: sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==} - engines: {node: '>=4'} + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} @@ -7273,9 +7594,6 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} - get-tsconfig@4.7.5: - resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} - glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -7301,25 +7619,13 @@ packages: engines: {node: '>=12'} deprecated: Glob versions prior to v9 are no longer supported - global-modules@1.0.0: - resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==} - engines: {node: '>=0.10.0'} - - global-prefix@1.0.2: - resolution: {integrity: sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==} - engines: {node: '>=0.10.0'} - globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} - - globals@15.9.0: - resolution: {integrity: sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==} - engines: {node: '>=18'} + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} globby@13.2.2: resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} @@ -7329,18 +7635,16 @@ packages: resolution: {integrity: sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==} engines: {node: '>=18'} - globrex@0.1.2: - resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - handle-thing@2.0.1: resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==} @@ -7366,6 +7670,14 @@ packages: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -7377,10 +7689,6 @@ packages: hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} - homedir-polyfill@1.0.3: - resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} - engines: {node: '>=0.10.0'} - hosted-git-info@7.0.2: resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} engines: {node: ^16.14.0 || >=18.0.0} @@ -7401,10 +7709,16 @@ packages: html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + html-link-extractor@1.0.5: + resolution: {integrity: sha512-ADd49pudM157uWHwHQPUSX4ssMsvR/yHIswOR5CUfBdK9g9ZYGMhVSE6KZVHJ6kCkR0gH4htsfzU6zECDNVwyw==} + html-tags@3.3.1: resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==} engines: {node: '>=8'} + htmlparser2@10.0.0: + resolution: {integrity: sha512-TwAZM+zE5Tq3lrEHvOlvwgj1XLWQCtaaibSN11Q+gGBAS7Y1uZSWwXXRe4iF6OXnaq1riyQAPFOBtYc77Mxq0g==} + htmlparser2@8.0.2: resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} @@ -7450,6 +7764,10 @@ packages: resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} engines: {node: '>= 14'} + human-id@4.1.1: + resolution: {integrity: sha512-3gKm/gCSUipeLsRYZbbdA1BD83lBoWUkZ7G9VFrhWPAU76KwYo5KR8V28bpoPm/ygy0x5/GCbpRQdY7VLYCoIg==} + hasBin: true + human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -7466,6 +7784,10 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + iconv-lite@0.7.0: + resolution: {integrity: sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==} + engines: {node: '>=0.10.0'} + icss-utils@5.1.0: resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14} @@ -7486,6 +7808,10 @@ packages: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} + ignore@7.0.5: + resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} + engines: {node: '>= 4'} + image-size@0.5.5: resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==} engines: {node: '>=0.10.0'} @@ -7498,10 +7824,6 @@ packages: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} - import-lazy@4.0.0: - resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} - engines: {node: '>=8'} - imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -7534,10 +7856,6 @@ packages: resolution: {integrity: sha512-vI2w4zl/mDluHt9YEQ/543VTCwPKWiHzKtm9dM2V0NdFcqEexDAjUHzO1oA60HRNaVifGXXM1tRRNluLVHa0Kg==} engines: {node: '>=18'} - interpret@3.1.1: - resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==} - engines: {node: '>=10.13.0'} - invariant@2.2.4: resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} @@ -7553,10 +7871,6 @@ packages: resolution: {integrity: sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==} engines: {node: '>= 10'} - is-absolute@1.0.0: - resolution: {integrity: sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==} - engines: {node: '>=0.10.0'} - is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -7585,9 +7899,6 @@ packages: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} - is-git-repository@1.1.1: - resolution: {integrity: sha512-hxLpJytJnIZ5Og5QsxSkzmb8Qx8rGau9bio1JN/QtXcGEFuSsQYau0IiqlsCwftsfVYjF1mOq6uLdmwNSspgpA==} - is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -7614,14 +7925,6 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - is-obj@2.0.0: - resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} - engines: {node: '>=8'} - - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - is-plain-obj@3.0.0: resolution: {integrity: sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==} engines: {node: '>=10'} @@ -7630,10 +7933,6 @@ packages: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} engines: {node: '>=0.10.0'} - is-plain-object@5.0.0: - resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} - engines: {node: '>=0.10.0'} - is-port-reachable@4.0.0: resolution: {integrity: sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -7647,14 +7946,6 @@ packages: is-reference@3.0.2: resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} - is-relative@1.0.0: - resolution: {integrity: sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==} - engines: {node: '>=0.10.0'} - - is-stream@1.1.0: - resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} - engines: {node: '>=0.10.0'} - is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} @@ -7663,13 +7954,9 @@ packages: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-text-path@2.0.0: - resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} - engines: {node: '>=8'} - - is-unc-path@1.0.0: - resolution: {integrity: sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==} - engines: {node: '>=0.10.0'} + is-subdir@1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} @@ -7742,13 +8029,9 @@ packages: jasmine-core@5.1.2: resolution: {integrity: sha512-2oIUMGn00FdUiqz6epiiJr7xcFyNYj3rDcfmnzfkBnHyBQ3cBQUs4mmyGsOb7TTLb9kxk7dBcmEmqhDKkBoDyA==} - jest-diff@29.7.0: - resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-get-type@29.6.3: - resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-diff@30.2.0: + resolution: {integrity: sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} jest-worker@27.5.1: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} @@ -7758,9 +8041,6 @@ packages: resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} hasBin: true - jju@1.4.0: - resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} - js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -7796,9 +8076,6 @@ packages: engines: {node: '>=4'} hasBin: true - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} @@ -7812,9 +8089,6 @@ packages: json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -7867,9 +8141,6 @@ packages: engines: {node: '>= 10'} hasBin: true - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -7890,9 +8161,6 @@ packages: '@types/node': '>=18' typescript: '>=5.0.4' - kolorist@1.8.0: - resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} - launch-editor@2.8.0: resolution: {integrity: sha512-vJranOAJrI/llyWGRQqiDM+adrw+k83fvmmx3+nV47g3+36xM15jE+zyZ6Ffel02+xSvuM0b2GDRosXZkbb6wA==} @@ -7908,10 +8176,6 @@ packages: engines: {node: '>=6'} hasBin: true - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - license-webpack-plugin@4.0.2: resolution: {integrity: sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw==} peerDependencies: @@ -7920,10 +8184,6 @@ packages: webpack: optional: true - liftoff@5.0.0: - resolution: {integrity: sha512-a5BQjbCHnB+cy+gsro8lXJ4kZluzOijzJ1UVVfyJYZC+IP2pLv1h4+aysQeKuTmyO8NAqfyQAk4HWaP/HjcKTg==} - engines: {node: '>=10.13.0'} - lilconfig@3.1.2: resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} engines: {node: '>=14'} @@ -7931,13 +8191,10 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lines-and-columns@2.0.4: - resolution: {integrity: sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==} + lines-and-columns@2.0.3: + resolution: {integrity: sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - linkify-it@5.0.0: - resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} - lit-element@4.0.6: resolution: {integrity: sha512-U4sdJ3CSQip7sLGZ/uJskO5hGiqtlpxndsLr6mt3IQIjheg93UKYeGQjWMRql1s/cXNOaRrCzC2FQwjIwSUqkg==} @@ -7970,10 +8227,6 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - locate-path@7.2.0: resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -7984,8 +8237,8 @@ packages: lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -8009,9 +8262,6 @@ packages: resolution: {integrity: sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ==} engines: {node: 14 || >=16.14} - lru-cache@4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} - lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -8019,9 +8269,6 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} - lunr@2.3.9: - resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} - lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true @@ -8052,24 +8299,25 @@ packages: resolution: {integrity: sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==} engines: {node: ^16.14.0 || >=18.0.0} - map-cache@0.2.2: - resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} - engines: {node: '>=0.10.0'} - map-obj@2.0.0: resolution: {integrity: sha512-TzQSV2DiMYgoF5RycneKVUzIa9bQsj/B3tTgsE3dOGqlzHnGIDaC7XBE7grnA+8kZPnfqSGFe95VHc2oc0VFUQ==} engines: {node: '>=4'} - markdown-it@14.1.0: - resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + markdown-link-extractor@4.0.2: + resolution: {integrity: sha512-5cUOu4Vwx1wenJgxaudsJ8xwLUMN7747yDJX3V/L7+gi3e4MsCm7w5nbrDQQy8nEfnl4r5NV3pDXMAjhGXYXAw==} + + marked@12.0.2: + resolution: {integrity: sha512-qXUm7e/YKFoqFPYPa3Ukg9xlI5cyAtGmyEIzMfW//m6kXwCy2Ps9DYf5ioijFKQ8qyuscrHoY04iJGctu2Kg0Q==} + engines: {node: '>= 18'} hasBin: true + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - mdurl@2.0.0: - resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} - media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} @@ -8078,10 +8326,6 @@ packages: resolution: {integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==} engines: {node: '>= 4.0.0'} - meow@12.1.1: - resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} - engines: {node: '>=16.10'} - merge-anything@5.1.7: resolution: {integrity: sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ==} engines: {node: '>=12.13'} @@ -8104,6 +8348,10 @@ packages: resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} engines: {node: '>=8.6'} + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + mime-db@1.33.0: resolution: {integrity: sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==} engines: {node: '>= 0.6'} @@ -8151,9 +8399,6 @@ packages: minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - minimatch@3.0.8: - resolution: {integrity: sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==} - minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -8273,9 +8518,6 @@ packages: resolution: {integrity: sha512-TUes3xKIX33re4QzdxwZ6tdbodjmn3tWXCEc1uokiEmo14sI1EaGYNs2k3bU2pyyGNmBqFGAVl6jAGWd06AVIg==} engines: {node: ^18.0.0 || >=20.0.0} - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - needle@3.3.1: resolution: {integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==} engines: {node: '>= 4.4.x'} @@ -8308,6 +8550,15 @@ packages: node-addon-api@3.2.1: resolution: {integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==} + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + node-forge@1.3.1: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} @@ -8372,10 +8623,6 @@ packages: resolution: {integrity: sha512-8l+7jxhim55S85fjiDGJ1rZXBWGtRLi1OSb4Z3BPLObPuIaeKRlPRiYMSHU4/81ck3t71Z+UwDDl47gcpmfQQA==} engines: {node: ^16.14.0 || >=18.0.0} - npm-run-path@2.0.2: - resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==} - engines: {node: '>=4'} - npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -8390,8 +8637,8 @@ packages: nwsapi@2.2.10: resolution: {integrity: sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==} - nx@19.3.2: - resolution: {integrity: sha512-eKWs+ahkTKnq9EeWJCE4u8JLeq1cOHnq5DKoiisy2nwUg4KGy1odReegxUMLeEgNBcMI40EUtEJFiTMJSXZQeg==} + nx@22.1.3: + resolution: {integrity: sha512-8zS/jhz1ZYSlW3tDEkqIA3oXaS/BTnpuFNV6L3tGKAaIxdn1sD5BuOdxIVK+G/TaoxOhw2iKrGiZeSSpV7fILw==} hasBin: true peerDependencies: '@swc-node/register': ^1.8.0 @@ -8417,14 +8664,6 @@ packages: resolution: {integrity: sha512-+8hwcz/JnQ9EpLIXzN0Rs7DLsBpJNT/xYehtB/jU93tHYr5BFEO8E+JGQNOSqE7opVzz5cGksKFHt7uUJVLSjQ==} engines: {node: '>=0.10.0'} - object.defaults@1.1.0: - resolution: {integrity: sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==} - engines: {node: '>=0.10.0'} - - object.pick@1.3.0: - resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} - engines: {node: '>=0.10.0'} - obuf@1.1.2: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} @@ -8455,10 +8694,6 @@ packages: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} - ora@5.3.0: resolution: {integrity: sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==} engines: {node: '>=10'} @@ -8471,18 +8706,17 @@ packages: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} - p-finally@1.0.0: - resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} - engines: {node: '>=4'} + outdent@0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + + p-filter@2.1.0: + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - p-limit@4.0.0: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -8495,14 +8729,14 @@ packages: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - p-locate@6.0.0: resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + p-map@4.0.0: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} @@ -8518,6 +8752,9 @@ packages: package-json-from-dist@1.0.0: resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + package-manager-detector@0.2.11: + resolution: {integrity: sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==} + pacote@17.0.6: resolution: {integrity: sha512-cJKrW21VRE8vVTRskJo78c/RCvwJCn1f4qgfxL4w77SOWrTCRcmfkYHlHtS0gqpgjv3zhXflRtgsrUCX5xwNnQ==} engines: {node: ^16.14.0 || >=18.0.0} @@ -8527,10 +8764,6 @@ packages: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} - parse-filepath@1.0.2: - resolution: {integrity: sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==} - engines: {node: '>=0.8'} - parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -8543,19 +8776,24 @@ packages: resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==} engines: {node: '>= 0.10'} - parse-passwd@1.0.0: - resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} - engines: {node: '>=0.10.0'} - parse5-html-rewriting-stream@7.0.0: resolution: {integrity: sha512-mazCyGWkmCRWDI15Zp+UiCqMp/0dgEmkZRvhlsqqKYr4SsVm/TvnSpD9fCvqCA2zoWJcfRym846ejWBBHRiYEg==} + parse5-htmlparser2-tree-adapter@7.1.0: + resolution: {integrity: sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==} + + parse5-parser-stream@7.1.2: + resolution: {integrity: sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==} + parse5-sax-parser@7.0.0: resolution: {integrity: sha512-5A+v2SNsq8T6/mG3ahcz8ZtQ0OUFTatxPbeidoMB7tkJSGDY3tdfl4MHovtLQHkEn5CGxijNWRQHhRQ6IRpXKg==} parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} + parse5@7.3.0: + resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} + parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -8578,10 +8816,6 @@ packages: path-is-inside@1.0.2: resolution: {integrity: sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==} - path-key@2.0.1: - resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} - engines: {node: '>=4'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -8593,14 +8827,6 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - path-root-regex@0.1.2: - resolution: {integrity: sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==} - engines: {node: '>=0.10.0'} - - path-root@0.1.1: - resolution: {integrity: sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==} - engines: {node: '>=0.10.0'} - path-scurry@1.11.1: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} @@ -8646,6 +8872,10 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} + picomatch@4.0.3: + resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} + engines: {node: '>=12'} + pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} @@ -8726,18 +8956,19 @@ packages: resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} engines: {node: ^10 || ^12 || >=14} - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - prettier-plugin-svelte@3.2.5: resolution: {integrity: sha512-vP/M/Goc8z4iVIvrwXwbrYVjJgA0Hf8PO1G4LBh/ocSt6vUP6sLvyu9F3ABEGr+dbKyxZjEKLkeFsWy/yYl0HQ==} peerDependencies: prettier: ^3.0.0 svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 - prettier@3.3.2: - resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==} + prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + + prettier@3.7.4: + resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} engines: {node: '>=14'} hasBin: true @@ -8753,6 +8984,10 @@ packages: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + pretty-format@30.2.0: + resolution: {integrity: sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + pretty-ms@9.0.0: resolution: {integrity: sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==} engines: {node: '>=18'} @@ -8798,16 +9033,9 @@ packages: prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} - pseudomap@1.0.2: - resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} - punycode.js@2.3.1: - resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} - engines: {node: '>=6'} - punycode@1.4.1: resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} @@ -8823,6 +9051,9 @@ packages: resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} engines: {node: '>=0.6'} + quansync@0.2.11: + resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} + querystringify@2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} @@ -8904,6 +9135,10 @@ packages: engines: {node: ^16.14.0 || >=18.0.0} deprecated: This package is no longer supported. Please use @npmcli/package-json instead. + read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} @@ -8915,10 +9150,6 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} - rechoir@0.8.0: - resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==} - engines: {node: '>= 10.13.0'} - redent@3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} @@ -8971,10 +9202,6 @@ packages: requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - resolve-dir@1.0.1: - resolution: {integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==} - engines: {node: '>=0.10.0'} - resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -8983,9 +9210,6 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - resolve-pkg-maps@1.0.0: - resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - resolve-url-loader@5.0.0: resolution: {integrity: sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==} engines: {node: '>=12'} @@ -8994,6 +9218,10 @@ packages: resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} engines: {node: '>=10'} + resolve.exports@2.0.3: + resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} + engines: {node: '>=10'} + resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -9035,11 +9263,6 @@ packages: engines: {node: '>=14.18'} hasBin: true - rollup-plugin-preserve-directives@0.4.0: - resolution: {integrity: sha512-gx4nBxYm5BysmEQS+e2tAMrtFxrGvk+Pe5ppafRibQi0zlW7VYAbEGk6IKDw9sJGPdFWgVTE0o4BU4cdG0Fylg==} - peerDependencies: - rollup: 2.x || 3.x || 4.x - rollup-plugin-size@0.3.1: resolution: {integrity: sha512-SAtpTAAJ0nFkISxLxYjDZX9Zqt34tAIil98R305ZM0GhTnnO6VYG0P5M+2IXKo/iNDdbpBcIfg1W06CLtk/vXA==} @@ -9166,11 +9389,6 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.5.4: - resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} - engines: {node: '>=10'} - hasBin: true - semver@7.6.0: resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} engines: {node: '>=10'} @@ -9228,18 +9446,10 @@ packages: resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} engines: {node: '>=8'} - shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} - shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} - shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} @@ -9250,43 +9460,50 @@ packages: shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} - sherif-darwin-arm64@0.9.0: - resolution: {integrity: sha512-nP+tn4PzEiVwXgA4t5ZenAIqoZIzJt28DOaR9QI5tKHEOzosgf/RglYtFEU0O+xjbexrE9BOwdlvJ8vKloZ3Mg==} + sherif-darwin-arm64@1.9.0: + resolution: {integrity: sha512-R+RpKSzlqZgBHean04CqHrdlmBBKu6Dhd/9BcdCpjx/KpqsalZsh9LzBVxTWLTtT9IBb/ccr23PNqFzWQTuh6A==} cpu: [arm64] os: [darwin] - sherif-darwin-x64@0.9.0: - resolution: {integrity: sha512-n2PpWLwUJbJaq5lW8Jyll0RCWCNezsP3idAijFHMawUgThUNNMCSzFdLFWbT0ZuResgyDBu2vspMPEtJgwSvvg==} + sherif-darwin-x64@1.9.0: + resolution: {integrity: sha512-b/KX9MczzkzmyEjngGxYuBq/rOdM6CbGcDLFdQ0H990Dmn9foj4C/UpLlyqSxXcsJhy586ATMEVN68aM2hFQdQ==} cpu: [x64] os: [darwin] - sherif-linux-arm64@0.9.0: - resolution: {integrity: sha512-S5NPMfWfYIN0JoQfJxDrXZZteRXHv9/r84RsOLZckoLvzTGc33VITg0Gqk2Yrm7j0cBRaFj6EyPxkasJ4iB4SQ==} + sherif-linux-arm64-musl@1.9.0: + resolution: {integrity: sha512-OZ4cKcCXTJTl8zaTxKnP8z0wu05nDeGtttxRQjaXHSKK+fjBwGkH/1qqFEVDcRANUxtLRLLdwmDyxvqQrCzhPQ==} + cpu: [arm64] + os: [linux] + + sherif-linux-arm64@1.9.0: + resolution: {integrity: sha512-TyuGhaD/efCxGIk4scx09n6NsTr3qfKvH5qHYdyxtelv1mHRgbzVHwJ+Jj98jVktuzOZoexHpxr/hz7RUjd/nw==} cpu: [arm64] os: [linux] - sherif-linux-x64@0.9.0: - resolution: {integrity: sha512-4RGatcQFcrK/IW6ZgdGyhjlVA/mS90ZCiNcXewwIzPVafTfyx56QzpWFANtZoUr7fg6o1xUZQ6QqXWk5k/x+pA==} + sherif-linux-x64-musl@1.9.0: + resolution: {integrity: sha512-JSbA6DN0HkWSabYU858BUkS4cMmkTsAamDZEYuUVDW+XvW9IjaI6o0HNatUr7oCjrITIfcjzqlqy7uizmNlr/A==} cpu: [x64] os: [linux] - sherif-windows-arm64@0.9.0: - resolution: {integrity: sha512-/Gf4RLkcG/g+kjYR9JYn9338uGt/nbaIs9IWvNGmCODKEf4Xy87rFDr8ZYERArLpSmx+kgLZhi3UvGExy8oCPQ==} + sherif-linux-x64@1.9.0: + resolution: {integrity: sha512-iO+hTxndO36r0hgmipBRjntWFqFHKrrYFRODz0WnmDquVek88LInSzAY1xpS18/Thbff8IVc6ssefYNVFQQPWw==} + cpu: [x64] + os: [linux] + + sherif-windows-arm64@1.9.0: + resolution: {integrity: sha512-lPqQXDB/95SJodtIbGAJc90O/KyxcunvKTycZqo+6RGjkOSYZB/XnRzm/tJ7If/6kz0/wcDP4uvkJmJxrxcj3A==} cpu: [arm64] os: [win32] - sherif-windows-x64@0.9.0: - resolution: {integrity: sha512-hJpCq/t1IUWu58LktbEsiBdGThtj/gvc9iqjHjSCGdzH8Oz/ALVfqTYibBX0akpnGiVOJd7JFHLv1WuUX6GjpA==} + sherif-windows-x64@1.9.0: + resolution: {integrity: sha512-3cL+XVGLpmyLC3UOZYiPr4vY2OFBQqPZnCoCwoRKN+ONm8VfGMirO9iqI0OckgFBUtJoG4AQY/MWxoPhNmzD8A==} cpu: [x64] os: [win32] - sherif@0.9.0: - resolution: {integrity: sha512-n81vLJac110M1IN4rCl956PVIMGejucg+vZHKfOznU4vSwutc1FxmgQzrVV/bmN9uXdx4Khkl7/nhz82x+SESA==} + sherif@1.9.0: + resolution: {integrity: sha512-5n7zqPAjL+RzR7n09NPKpWBXmDCtuRpQzIL+ycj8pe6MayV7cDuFmceoyPQJ0c95oFj6feY7SZvhX/+S0i1ukg==} hasBin: true - shiki@1.12.0: - resolution: {integrity: sha512-BuAxWOm5JhRcbSOl7XCei8wGjgJJonnV0oipUupPY58iULxUGyHhW5CF+9FRMuM1pcJ5cGEJGll1LusX6FwpPA==} - side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} @@ -9305,14 +9522,15 @@ packages: resolution: {integrity: sha512-8G+/XDU8wNsJOQS5ysDVO0Etg9/2uA5gR9l4ZwijjlwxBcrU6RPfwi2+jJmbP+Ap1Hlp/nVAaEO4Fj22/SL2gQ==} engines: {node: ^16.14.0 || >=18.0.0} - simple-git@3.25.0: - resolution: {integrity: sha512-KIY5sBnzc4yEcJXW7Tdv4viEz8KyG+nU0hay+DWZasvdFOYKeUZ6Xc25LUHHjw0tinPT7O1eY6pzX7pRT1K8rw==} - size-limit@11.1.4: resolution: {integrity: sha512-V2JAI/Z7h8sEuxU3V+Ig3XKA5FcYbI4CZ7sh6s7wvuy+TUwDZYqw7sAqrHhQ4cgcNfPKIAHAaH8VaqOdbcwJDA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + slash@4.0.0: resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} engines: {node: '>=12'} @@ -9410,6 +9628,9 @@ packages: resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} engines: {node: '>= 8'} + spawndamnit@3.0.1: + resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} + spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} @@ -9429,10 +9650,6 @@ packages: resolution: {integrity: sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==} engines: {node: '>=6.0.0'} - split2@4.2.0: - resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} - engines: {node: '>= 10.x'} - sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -9443,9 +9660,6 @@ packages: resolution: {integrity: sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - stable-hash@0.0.4: - resolution: {integrity: sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==} - stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} @@ -9464,10 +9678,6 @@ packages: resolution: {integrity: sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==} engines: {node: '>=8.0'} - string-argv@0.3.2: - resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} - engines: {node: '>=0.6.19'} - string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -9497,10 +9707,6 @@ packages: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} - strip-eof@1.0.0: - resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} - engines: {node: '>=0.10.0'} - strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -9517,10 +9723,6 @@ packages: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - strip-json-comments@5.0.1: resolution: {integrity: sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw==} engines: {node: '>=14.16'} @@ -9528,11 +9730,6 @@ packages: strip-literal@2.1.0: resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==} - strong-log-transformer@2.1.0: - resolution: {integrity: sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA==} - engines: {node: '>=4'} - hasBin: true - style-vendorizer@2.2.3: resolution: {integrity: sha512-/VDRsWvQAgspVy9eATN3z6itKTuyg+jW1q6UoTCQCFRqPDw8bi3E1hXIKnGw5LvXS2AQPuJ7Af4auTLYeBOLEg==} @@ -9637,6 +9834,10 @@ packages: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} + term-size@2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + terser-webpack-plugin@5.3.10: resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} engines: {node: '>= 10.13.0'} @@ -9667,16 +9868,6 @@ packages: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} - text-extensions@2.4.0: - resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==} - engines: {node: '>=8'} - - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - - through@2.3.8: - resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - thunky@1.1.0: resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==} @@ -9689,6 +9880,10 @@ packages: tinybench@2.8.0: resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} + tinyglobby@0.2.15: + resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} + engines: {node: '>=12.0.0'} + tinypool@0.8.4: resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} engines: {node: '>=14.0.0'} @@ -9730,33 +9925,20 @@ packages: resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} engines: {node: '>=6'} + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + tr46@5.0.0: resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==} engines: {node: '>=18'} tree-kill@1.2.2: - resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} - hasBin: true - - ts-api-utils@1.3.0: - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true ts-morph@21.0.1: resolution: {integrity: sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==} - tsconfck@3.1.1: - resolution: {integrity: sha512-00eoI6WY57SvZEVjm13stEVE90VkEdJAFGgpFLTsZbJyW/LwFQ7uQxJHWpZ2hzSWgCPKc9AnBnNP+0X7o3hAmQ==} - engines: {node: ^18 || >=20} - hasBin: true - peerDependencies: - typescript: ^5.0.0 - peerDependenciesMeta: - typescript: - optional: true - tsconfig-paths@4.2.0: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} @@ -9771,18 +9953,10 @@ packages: resolution: {integrity: sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA==} engines: {node: ^16.14.0 || >=18.0.0} - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} @@ -9798,61 +9972,17 @@ packages: typed-assert@1.0.9: resolution: {integrity: sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==} - typedoc-plugin-frontmatter@1.0.0: - resolution: {integrity: sha512-Mqn96+RjUjPUz/42H8MOp/8eOKjE5MVIgZRFDGmSI2YuggnMZSfh5MMpvd6ykjNTpq7gV5D2iwjqLt8nYRg9rg==} - peerDependencies: - typedoc-plugin-markdown: '>=4.0.0' - - typedoc-plugin-markdown@4.2.6: - resolution: {integrity: sha512-k33o2lZSGpL3GjH28eW+RsujzCYFP0L5GNqpK+wa4CBcMOxpj8WV7SydNRLS6eSa2UvaPvNVJTaAZ6Tm+8GXoA==} - engines: {node: '>= 18'} - peerDependencies: - typedoc: 0.26.x - - typedoc@0.26.6: - resolution: {integrity: sha512-SfEU3SH3wHNaxhFPjaZE2kNl/NFtLNW5c1oHsg7mti7GjmUj1Roq6osBQeMd+F4kL0BoRBBr8gQAuqBlfFu8LA==} - engines: {node: '>= 18'} - hasBin: true - peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x - - typescript-eslint@8.3.0: - resolution: {integrity: sha512-EvWjwWLwwKDIJuBjk2I6UkV8KEQcwZ0VM10nR1rIunRDIP67QJTZAHBXTX0HW/oI1H10YESF8yWie8fRQxjvFA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - typescript@5.4.2: - resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} - engines: {node: '>=14.17'} - hasBin: true - typescript@5.4.5: resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} engines: {node: '>=14.17'} hasBin: true - typescript@5.6.2: - resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} - engines: {node: '>=14.17'} - hasBin: true - ua-parser-js@0.7.38: resolution: {integrity: sha512-fYmIy7fKTSFAhG3fuPlubeGaMoAd6r0rSnfEsO5nEY55i26KSLt9EH7PLQiiqPUhNqYIJvSkTy1oArIcXAbPbA==} - uc.micro@2.1.0: - resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} - ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} - unc-path-regex@0.1.2: - resolution: {integrity: sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==} - engines: {node: '>=0.10.0'} - uncontrollable@7.2.1: resolution: {integrity: sha512-svtcfoTADIB0nT9nltgjujTi7BzVmwjZClOmskKu/E8FW9BXzg9os8OLr4f8Dlnk0rYWJIWr4wv9eKUXiQvQwQ==} peerDependencies: @@ -9870,6 +10000,10 @@ packages: resolution: {integrity: sha512-KyhzaLJnV1qa3BSHdj4AZ2ndqI0QWPxYzaIOio0WzcEJB9gvuysprJSLtpvc2D9mhR9jPDUk7xlJlZbH2KR5iw==} engines: {node: '>=18.0'} + undici@7.16.0: + resolution: {integrity: sha512-QEg3HPMll0o3t2ourKwOeUAZ159Kn9mx5pnzHRQO8+Wixmh88YdZRiIwat0iNzNNXn0yoEtXJqFpyW7eM8BV7g==} + engines: {node: '>=20.18.1'} + unescape-js@1.1.4: resolution: {integrity: sha512-42SD8NOQEhdYntEiUQdYq/1V/YHwr1HLwlHuTJB5InVVdOSbgI6xu8jK5q65yIzuFCfczzyDF/7hbGzVbyCw0g==} @@ -9901,6 +10035,9 @@ packages: resolution: {integrity: sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + unist-util-stringify-position@4.0.0: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -9952,10 +10089,6 @@ packages: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true - v8flags@4.0.1: - resolution: {integrity: sha512-fcRLaS4H/hrZk9hYwbdRM35D0U8IYMfEClhXxCivOojl+yTRAZH3Zy2sSy6qVCiGbV9YAtPssP6jaChqC9vPCg==} - engines: {node: '>= 10.13.0'} - validate-html-nesting@1.2.2: resolution: {integrity: sha512-hGdgQozCsQJMyfK5urgFcWEqsSSrK63Awe0t/IMR0bZ0QMtnuaiHzThW81guu3qx9abLi99NEuiaN6P9gVYsNg==} @@ -9970,26 +10103,17 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} + vfile-message@4.0.2: + resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} + + vfile@6.0.3: + resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + vite-node@1.6.0: resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-plugin-dts@4.0.3: - resolution: {integrity: sha512-+xnTsaONwU2kV6zhRjtbRJSGN41uFR/whqmcb4k4fftLFDJElxthp0PP5Fq8gMeM9ytWMt1yk5gGgekLREWYQQ==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - typescript: '*' - vite: '*' - peerDependenciesMeta: - vite: - optional: true - - vite-plugin-externalize-deps@0.8.0: - resolution: {integrity: sha512-MdC8kRNQ1ZjhUicU2HcqGVhL0UUFqv83Zp1JZdHjE82PoPR8wsSWZ3axpot7B6img3sW6g8shYJikE0CKA0chA==} - peerDependencies: - vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 - vite-plugin-solid@2.10.2: resolution: {integrity: sha512-AOEtwMe2baBSXMXdo+BUwECC8IFHcKS6WQV/1NEd+Q7vHPap5fmIhLcAzr+DUJ04/KHx/1UBU0l1/GWP+rMAPQ==} peerDependencies: @@ -10000,14 +10124,6 @@ packages: '@testing-library/jest-dom': optional: true - vite-tsconfig-paths@5.0.1: - resolution: {integrity: sha512-yqwv+LstU7NwPeNqajZzLEBVpUFU6Dugtb2P84FXuvaoYA+/70l9MHE+GYfYAycVyPSDYZ7mjOFuYBRqlEpTig==} - peerDependencies: - vite: '*' - peerDependenciesMeta: - vite: - optional: true - vite@5.1.7: resolution: {integrity: sha512-sgnEEFTZYMui/sTlH1/XEnVNHMujOahPLGMxn1+5sIT45Xjng1Ec1K78jRP15dSmVgg5WBin9yO81j3o9OxofA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -10183,6 +10299,9 @@ packages: wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + webidl-conversions@7.0.0: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} @@ -10266,6 +10385,9 @@ packages: resolution: {integrity: sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==} engines: {node: '>=18'} + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true @@ -10292,10 +10414,6 @@ packages: wildcard@2.0.1: resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==} - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -10334,9 +10452,6 @@ packages: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - yallist@2.1.2: - resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -10347,9 +10462,9 @@ packages: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - yaml@2.5.0: - resolution: {integrity: sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==} - engines: {node: '>= 14'} + yaml@2.8.2: + resolution: {integrity: sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==} + engines: {node: '>= 14.6'} hasBin: true yargs-parser@20.2.9: @@ -10368,10 +10483,6 @@ packages: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - yocto-queue@1.1.1: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} @@ -10401,11 +10512,17 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@analogjs/vite-plugin-angular@1.5.0(@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(tslib@2.6.3)(typescript@5.6.2))(typescript@5.6.2))(@ngtools/webpack@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(typescript@5.6.2)(webpack@5.90.3(esbuild@0.21.5)))': + '@analogjs/vite-plugin-angular@1.11.0(@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5))(typescript@5.4.5))': dependencies: - '@angular-devkit/build-angular': 17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(tslib@2.6.3)(typescript@5.6.2))(typescript@5.6.2) - '@ngtools/webpack': 17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(typescript@5.6.2)(webpack@5.90.3(esbuild@0.21.5)) ts-morph: 21.0.1 + vfile: 6.0.3 + optionalDependencies: + '@angular-devkit/build-angular': 17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5))(typescript@5.4.5) + + '@analogjs/vitest-angular@1.11.0(@analogjs/vite-plugin-angular@1.11.0(@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5))(typescript@5.4.5)))(vitest@1.6.0(@types/node@20.14.9)(jsdom@24.1.0)(less@4.2.0)(sass@1.77.6)(terser@5.31.1))': + dependencies: + '@analogjs/vite-plugin-angular': 1.11.0(@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(tslib@2.6.3)(typescript@5.4.5))(typescript@5.4.5)) + vitest: 1.6.0(@types/node@20.14.9)(jsdom@24.1.0)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) '@angular-devkit/architect@0.1703.8(chokidar@3.6.0)': dependencies: @@ -10418,7 +10535,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1703.8(chokidar@3.6.0) - '@angular-devkit/build-webpack': 0.1703.8(chokidar@3.6.0)(webpack-dev-server@4.15.1(webpack@5.90.3(esbuild@0.21.5)))(webpack@5.90.3(esbuild@0.21.5)) + '@angular-devkit/build-webpack': 0.1703.8(chokidar@3.6.0)(webpack-dev-server@4.15.1(webpack@5.90.3(esbuild@0.20.1)))(webpack@5.90.3(esbuild@0.20.1)) '@angular-devkit/core': 17.3.8(chokidar@3.6.0) '@angular/compiler-cli': 17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5) '@babel/core': 7.24.0 @@ -10435,12 +10552,12 @@ snapshots: '@vitejs/plugin-basic-ssl': 1.1.0(vite@5.1.7(@types/node@20.14.9)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) ansi-colors: 4.1.3 autoprefixer: 10.4.18(postcss@8.4.35) - babel-loader: 9.1.3(@babel/core@7.24.0)(webpack@5.90.3(esbuild@0.21.5)) + babel-loader: 9.1.3(@babel/core@7.24.0)(webpack@5.90.3(esbuild@0.20.1)) babel-plugin-istanbul: 6.1.1 browserslist: 4.23.1 - copy-webpack-plugin: 11.0.0(webpack@5.90.3(esbuild@0.21.5)) + copy-webpack-plugin: 11.0.0(webpack@5.90.3(esbuild@0.20.1)) critters: 0.0.22 - css-loader: 6.10.0(webpack@5.90.3(esbuild@0.21.5)) + css-loader: 6.10.0(webpack@5.90.3(esbuild@0.20.1)) esbuild-wasm: 0.20.1 fast-glob: 3.3.2 http-proxy-middleware: 2.0.6(@types/express@4.17.21) @@ -10449,11 +10566,11 @@ snapshots: jsonc-parser: 3.2.1 karma-source-map-support: 1.4.0 less: 4.2.0 - less-loader: 11.1.0(less@4.2.0)(webpack@5.90.3(esbuild@0.21.5)) - license-webpack-plugin: 4.0.2(webpack@5.90.3(esbuild@0.21.5)) + less-loader: 11.1.0(less@4.2.0)(webpack@5.90.3(esbuild@0.20.1)) + license-webpack-plugin: 4.0.2(webpack@5.90.3(esbuild@0.20.1)) loader-utils: 3.2.1 magic-string: 0.30.8 - mini-css-extract-plugin: 2.8.1(webpack@5.90.3(esbuild@0.21.5)) + mini-css-extract-plugin: 2.8.1(webpack@5.90.3(esbuild@0.20.1)) mrmime: 2.0.0 open: 8.4.2 ora: 5.4.1 @@ -10465,9 +10582,9 @@ snapshots: resolve-url-loader: 5.0.0 rxjs: 7.8.1 sass: 1.71.1 - sass-loader: 14.1.1(sass@1.71.1)(webpack@5.90.3(esbuild@0.21.5)) + sass-loader: 14.1.1(sass@1.71.1)(webpack@5.90.3(esbuild@0.20.1)) semver: 7.6.0 - source-map-loader: 5.0.0(webpack@5.90.3(esbuild@0.21.5)) + source-map-loader: 5.0.0(webpack@5.90.3(esbuild@0.20.1)) source-map-support: 0.5.21 terser: 5.29.1 tree-kill: 1.2.2 @@ -10476,11 +10593,11 @@ snapshots: undici: 6.11.1 vite: 5.1.7(@types/node@20.14.9)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) watchpack: 2.4.0 - webpack: 5.90.3(esbuild@0.21.5) - webpack-dev-middleware: 6.1.2(webpack@5.90.3(esbuild@0.21.5)) - webpack-dev-server: 4.15.1(webpack@5.90.3(esbuild@0.21.5)) + webpack: 5.90.3(esbuild@0.20.1) + webpack-dev-middleware: 6.1.2(webpack@5.90.3(esbuild@0.20.1)) + webpack-dev-server: 4.15.1(webpack@5.90.3(esbuild@0.20.1)) webpack-merge: 5.10.0 - webpack-subresource-integrity: 5.1.0(webpack@5.90.3(esbuild@0.21.5)) + webpack-subresource-integrity: 5.1.0(webpack@5.90.3(esbuild@0.20.1)) optionalDependencies: esbuild: 0.20.1 karma: 6.4.3 @@ -10504,102 +10621,12 @@ snapshots: - utf-8-validate - webpack-cli - '@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(@types/express@4.17.21)(@types/node@20.14.9)(chokidar@3.6.0)(karma@6.4.3)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(tslib@2.6.3)(typescript@5.6.2))(typescript@5.6.2)': - dependencies: - '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.1703.8(chokidar@3.6.0) - '@angular-devkit/build-webpack': 0.1703.8(chokidar@3.6.0)(webpack-dev-server@4.15.1(webpack@5.90.3(esbuild@0.21.5)))(webpack@5.90.3(esbuild@0.21.5)) - '@angular-devkit/core': 17.3.8(chokidar@3.6.0) - '@angular/compiler-cli': 17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2) - '@babel/core': 7.24.0 - '@babel/generator': 7.23.6 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.6 - '@babel/plugin-transform-async-generator-functions': 7.23.9(@babel/core@7.24.0) - '@babel/plugin-transform-async-to-generator': 7.23.3(@babel/core@7.24.0) - '@babel/plugin-transform-runtime': 7.24.0(@babel/core@7.24.0) - '@babel/preset-env': 7.24.0(@babel/core@7.24.0) - '@babel/runtime': 7.24.0 - '@discoveryjs/json-ext': 0.5.7 - '@ngtools/webpack': 17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(typescript@5.6.2)(webpack@5.90.3(esbuild@0.21.5)) - '@vitejs/plugin-basic-ssl': 1.1.0(vite@5.1.7(@types/node@20.14.9)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) - ansi-colors: 4.1.3 - autoprefixer: 10.4.18(postcss@8.4.35) - babel-loader: 9.1.3(@babel/core@7.24.0)(webpack@5.90.3(esbuild@0.21.5)) - babel-plugin-istanbul: 6.1.1 - browserslist: 4.23.1 - copy-webpack-plugin: 11.0.0(webpack@5.90.3(esbuild@0.21.5)) - critters: 0.0.22 - css-loader: 6.10.0(webpack@5.90.3(esbuild@0.21.5)) - esbuild-wasm: 0.20.1 - fast-glob: 3.3.2 - http-proxy-middleware: 2.0.6(@types/express@4.17.21) - https-proxy-agent: 7.0.4 - inquirer: 9.2.15 - jsonc-parser: 3.2.1 - karma-source-map-support: 1.4.0 - less: 4.2.0 - less-loader: 11.1.0(less@4.2.0)(webpack@5.90.3(esbuild@0.21.5)) - license-webpack-plugin: 4.0.2(webpack@5.90.3(esbuild@0.21.5)) - loader-utils: 3.2.1 - magic-string: 0.30.8 - mini-css-extract-plugin: 2.8.1(webpack@5.90.3(esbuild@0.21.5)) - mrmime: 2.0.0 - open: 8.4.2 - ora: 5.4.1 - parse5-html-rewriting-stream: 7.0.0 - picomatch: 4.0.1 - piscina: 4.4.0 - postcss: 8.4.35 - postcss-loader: 8.1.1(postcss@8.4.35)(typescript@5.6.2)(webpack@5.90.3(esbuild@0.21.5)) - resolve-url-loader: 5.0.0 - rxjs: 7.8.1 - sass: 1.71.1 - sass-loader: 14.1.1(sass@1.71.1)(webpack@5.90.3(esbuild@0.21.5)) - semver: 7.6.0 - source-map-loader: 5.0.0(webpack@5.90.3(esbuild@0.21.5)) - source-map-support: 0.5.21 - terser: 5.29.1 - tree-kill: 1.2.2 - tslib: 2.6.2 - typescript: 5.6.2 - undici: 6.11.1 - vite: 5.1.7(@types/node@20.14.9)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) - watchpack: 2.4.0 - webpack: 5.90.3(esbuild@0.21.5) - webpack-dev-middleware: 6.1.2(webpack@5.90.3(esbuild@0.21.5)) - webpack-dev-server: 4.15.1(webpack@5.90.3(esbuild@0.21.5)) - webpack-merge: 5.10.0 - webpack-subresource-integrity: 5.1.0(webpack@5.90.3(esbuild@0.21.5)) - optionalDependencies: - esbuild: 0.20.1 - karma: 6.4.3 - ng-packagr: 17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(tslib@2.6.3)(typescript@5.6.2) - transitivePeerDependencies: - - '@rspack/core' - - '@swc/core' - - '@types/express' - - '@types/node' - - bufferutil - - chokidar - - debug - - html-webpack-plugin - - lightningcss - - node-sass - - sass-embedded - - stylus - - sugarss - - supports-color - - uglify-js - - utf-8-validate - - webpack-cli - - '@angular-devkit/build-webpack@0.1703.8(chokidar@3.6.0)(webpack-dev-server@4.15.1(webpack@5.90.3(esbuild@0.21.5)))(webpack@5.90.3(esbuild@0.21.5))': + '@angular-devkit/build-webpack@0.1703.8(chokidar@3.6.0)(webpack-dev-server@4.15.1(webpack@5.90.3(esbuild@0.20.1)))(webpack@5.90.3(esbuild@0.20.1))': dependencies: '@angular-devkit/architect': 0.1703.8(chokidar@3.6.0) rxjs: 7.8.1 - webpack: 5.90.3(esbuild@0.21.5) - webpack-dev-server: 4.15.1(webpack@5.90.3(esbuild@0.21.5)) + webpack: 5.90.3(esbuild@0.20.1) + webpack-dev-server: 4.15.1(webpack@5.90.3(esbuild@0.20.1)) transitivePeerDependencies: - chokidar @@ -10629,6 +10656,15 @@ snapshots: '@angular/core': 17.3.11(rxjs@7.8.1)(zone.js@0.14.7) tslib: 2.6.3 + '@angular/cdk@17.3.10(@angular/common@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1))(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1)': + dependencies: + '@angular/common': 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))(rxjs@7.8.1) + '@angular/core': 17.3.11(rxjs@7.8.1)(zone.js@0.14.7) + rxjs: 7.8.1 + tslib: 2.6.3 + optionalDependencies: + parse5: 7.1.2 + '@angular/cli@17.3.8(chokidar@3.6.0)': dependencies: '@angular-devkit/architect': 0.1703.8(chokidar@3.6.0) @@ -10675,21 +10711,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2)': - dependencies: - '@angular/compiler': 17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)) - '@babel/core': 7.23.9 - '@jridgewell/sourcemap-codec': 1.5.0 - chokidar: 3.6.0 - convert-source-map: 1.9.0 - reflect-metadata: 0.2.2 - semver: 7.6.3 - tslib: 2.6.3 - typescript: 5.6.2 - yargs: 17.7.2 - transitivePeerDependencies: - - supports-color - '@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7))': dependencies: tslib: 2.6.3 @@ -10737,7 +10758,7 @@ snapshots: '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 - picocolors: 1.0.1 + picocolors: 1.1.1 '@babel/compat-data@7.24.7': {} @@ -10749,10 +10770,10 @@ snapshots: '@babel/helper-compilation-targets': 7.24.7 '@babel/helper-module-transforms': 7.24.7(@babel/core@7.23.9) '@babel/helpers': 7.24.7 - '@babel/parser': 7.24.7 + '@babel/parser': 7.26.3 '@babel/template': 7.24.7 '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 convert-source-map: 2.0.0 debug: 4.3.6 gensync: 1.0.0-beta.2 @@ -10769,10 +10790,10 @@ snapshots: '@babel/helper-compilation-targets': 7.24.7 '@babel/helper-module-transforms': 7.24.7(@babel/core@7.24.0) '@babel/helpers': 7.24.7 - '@babel/parser': 7.24.7 + '@babel/parser': 7.26.3 '@babel/template': 7.24.7 '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 convert-source-map: 2.0.0 debug: 4.3.6 gensync: 1.0.0-beta.2 @@ -10803,21 +10824,21 @@ snapshots: '@babel/generator@7.23.6': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 '@babel/generator@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 '@babel/helper-annotate-as-pure@7.22.5': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 '@babel/helper-annotate-as-pure@7.24.7': dependencies: @@ -10826,7 +10847,7 @@ snapshots: '@babel/helper-builder-binary-assignment-operator-visitor@7.24.7': dependencies: '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 transitivePeerDependencies: - supports-color @@ -10917,16 +10938,16 @@ snapshots: '@babel/helper-environment-visitor@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 '@babel/helper-function-name@7.24.7': dependencies: '@babel/template': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 '@babel/helper-hoist-variables@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 '@babel/helper-member-expression-to-functions@7.24.7': dependencies: @@ -10941,7 +10962,7 @@ snapshots: '@babel/helper-module-imports@7.22.15': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 '@babel/helper-module-imports@7.24.7': dependencies: @@ -11028,24 +11049,24 @@ snapshots: '@babel/helper-simple-access@7.24.7': dependencies: '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 transitivePeerDependencies: - supports-color '@babel/helper-skip-transparent-expression-wrappers@7.24.7': dependencies: '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 transitivePeerDependencies: - supports-color '@babel/helper-split-export-declaration@7.22.6': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 '@babel/helper-split-export-declaration@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 '@babel/helper-string-parser@7.24.7': {} @@ -11069,18 +11090,18 @@ snapshots: '@babel/helpers@7.24.7': dependencies: '@babel/template': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 '@babel/highlight@7.24.7': dependencies: '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.1 + picocolors: 1.1.1 '@babel/parser@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 '@babel/parser@7.26.3': dependencies: @@ -12235,14 +12256,14 @@ snapshots: dependencies: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 esutils: 2.0.3 '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 '@babel/helper-plugin-utils': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 esutils: 2.0.3 '@babel/preset-react@7.24.7(@babel/core@7.24.7)': @@ -12281,8 +12302,8 @@ snapshots: '@babel/template@7.24.7': dependencies: '@babel/code-frame': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 '@babel/traverse@7.24.7': dependencies: @@ -12292,8 +12313,8 @@ snapshots: '@babel/helper-function-name': 7.24.7 '@babel/helper-hoist-variables': 7.24.7 '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 debug: 4.3.6 globals: 11.12.0 transitivePeerDependencies: @@ -12310,32 +12331,173 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 - '@builder.io/qwik@1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@6.11.1)': + '@builder.io/qwik@1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)(undici@7.16.0)': dependencies: csstype: 3.1.3 - undici: 6.11.1 - vite: 5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) + undici: 7.16.0 + vite: 5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - '@types/node' - less - lightningcss - sass + - sass-embedded - stylus - sugarss - terser - '@colors/colors@1.5.0': {} + '@changesets/apply-release-plan@7.0.13': + dependencies: + '@changesets/config': 3.1.1 + '@changesets/get-version-range-type': 0.4.0 + '@changesets/git': 3.0.4 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + detect-indent: 6.1.0 + fs-extra: 7.0.1 + lodash.startcase: 4.4.0 + outdent: 0.5.0 + prettier: 2.8.8 + resolve-from: 5.0.0 + semver: 7.6.3 + + '@changesets/assemble-release-plan@6.0.9': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.3 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + semver: 7.6.3 + + '@changesets/changelog-git@0.2.1': + dependencies: + '@changesets/types': 6.1.0 + + '@changesets/cli@2.29.7(@types/node@20.14.9)': + dependencies: + '@changesets/apply-release-plan': 7.0.13 + '@changesets/assemble-release-plan': 6.0.9 + '@changesets/changelog-git': 0.2.1 + '@changesets/config': 3.1.1 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.3 + '@changesets/get-release-plan': 4.0.13 + '@changesets/git': 3.0.4 + '@changesets/logger': 0.1.1 + '@changesets/pre': 2.0.2 + '@changesets/read': 0.6.5 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@changesets/write': 0.4.0 + '@inquirer/external-editor': 1.0.2(@types/node@20.14.9) + '@manypkg/get-packages': 1.1.3 + ansi-colors: 4.1.3 + ci-info: 3.9.0 + enquirer: 2.4.1 + fs-extra: 7.0.1 + mri: 1.2.0 + p-limit: 2.3.0 + package-manager-detector: 0.2.11 + picocolors: 1.1.1 + resolve-from: 5.0.0 + semver: 7.6.3 + spawndamnit: 3.0.1 + term-size: 2.2.1 + transitivePeerDependencies: + - '@types/node' + + '@changesets/config@3.1.1': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.3 + '@changesets/logger': 0.1.1 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.8 + + '@changesets/errors@0.2.0': + dependencies: + extendable-error: 0.1.7 + + '@changesets/get-dependents-graph@2.1.3': + dependencies: + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + picocolors: 1.1.1 + semver: 7.6.3 + + '@changesets/get-github-info@0.6.0(encoding@0.1.13)': + dependencies: + dataloader: 1.4.0 + node-fetch: 2.7.0(encoding@0.1.13) + transitivePeerDependencies: + - encoding + + '@changesets/get-release-plan@4.0.13': + dependencies: + '@changesets/assemble-release-plan': 6.0.9 + '@changesets/config': 3.1.1 + '@changesets/pre': 2.0.2 + '@changesets/read': 0.6.5 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/get-version-range-type@0.4.0': {} + + '@changesets/git@3.0.4': + dependencies: + '@changesets/errors': 0.2.0 + '@manypkg/get-packages': 1.1.3 + is-subdir: 1.2.0 + micromatch: 4.0.8 + spawndamnit: 3.0.1 + + '@changesets/logger@0.1.1': + dependencies: + picocolors: 1.1.1 + + '@changesets/parse@0.4.1': + dependencies: + '@changesets/types': 6.1.0 + js-yaml: 3.14.1 - '@commitlint/parse@19.0.3': + '@changesets/pre@2.0.2': dependencies: - '@commitlint/types': 19.0.3 - conventional-changelog-angular: 7.0.0 - conventional-commits-parser: 5.0.0 + '@changesets/errors': 0.2.0 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 - '@commitlint/types@19.0.3': + '@changesets/read@0.6.5': dependencies: - '@types/conventional-commits-parser': 5.0.0 - chalk: 5.3.0 + '@changesets/git': 3.0.4 + '@changesets/logger': 0.1.1 + '@changesets/parse': 0.4.1 + '@changesets/types': 6.1.0 + fs-extra: 7.0.1 + p-filter: 2.1.0 + picocolors: 1.1.1 + + '@changesets/should-skip-package@0.1.2': + dependencies: + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/types@4.1.0': {} + + '@changesets/types@6.1.0': {} + + '@changesets/write@0.4.0': + dependencies: + '@changesets/types': 6.1.0 + fs-extra: 7.0.1 + human-id: 4.1.1 + prettier: 2.8.8 + + '@colors/colors@1.5.0': {} '@discoveryjs/json-ext@0.5.7': {} @@ -12371,6 +12533,19 @@ snapshots: react: 18.3.1 tslib: 2.6.3 + '@emnapi/core@1.7.1': + dependencies: + '@emnapi/wasi-threads': 1.1.0 + tslib: 2.6.3 + + '@emnapi/runtime@1.7.1': + dependencies: + tslib: 2.6.3 + + '@emnapi/wasi-threads@1.1.0': + dependencies: + tslib: 2.6.3 + '@emotion/babel-plugin-jsx-pragmatic@0.2.1(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 @@ -12755,31 +12930,6 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': - dependencies: - eslint: 8.57.0 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.11.0': {} - - '@eslint/eslintrc@2.1.4': - dependencies: - ajv: 6.12.6 - debug: 4.3.6 - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.1 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/js@8.57.0': {} - - '@eslint/js@9.9.1': {} - '@faker-js/faker@8.4.1': {} '@floating-ui/core@1.6.3': @@ -12799,17 +12949,12 @@ snapshots: '@floating-ui/utils@0.2.3': {} - '@humanwhocodes/config-array@0.11.14': + '@inquirer/external-editor@1.0.2(@types/node@20.14.9)': dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.6 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/object-schema@2.0.3': {} + chardet: 2.1.0 + iconv-lite: 0.7.0 + optionalDependencies: + '@types/node': 20.14.9 '@isaacs/cliui@8.0.2': dependencies: @@ -12830,10 +12975,18 @@ snapshots: '@istanbuljs/schema@0.1.3': {} + '@jest/diff-sequences@30.0.1': {} + + '@jest/get-type@30.1.0': {} + '@jest/schemas@29.6.3': dependencies: '@sinclair/typebox': 0.27.8 + '@jest/schemas@30.0.5': + dependencies: + '@sinclair/typebox': 0.34.41 + '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 @@ -12856,14 +13009,6 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@kwsites/file-exists@1.1.1': - dependencies: - debug: 4.3.6 - transitivePeerDependencies: - - supports-color - - '@kwsites/promise-deferred@1.1.1': {} - '@leichtgewicht/ip-codec@2.0.5': {} '@lit-labs/ssr-dom-shim@1.2.0': {} @@ -12876,40 +13021,21 @@ snapshots: dependencies: call-bind: 1.0.7 - '@microsoft/api-extractor-model@7.29.4(@types/node@20.14.9)': - dependencies: - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.5.1(@types/node@20.14.9) - transitivePeerDependencies: - - '@types/node' - - '@microsoft/api-extractor@7.47.4(@types/node@20.14.9)': + '@manypkg/find-root@1.1.0': dependencies: - '@microsoft/api-extractor-model': 7.29.4(@types/node@20.14.9) - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.5.1(@types/node@20.14.9) - '@rushstack/rig-package': 0.5.3 - '@rushstack/terminal': 0.13.3(@types/node@20.14.9) - '@rushstack/ts-command-line': 4.22.3(@types/node@20.14.9) - lodash: 4.17.21 - minimatch: 3.0.8 - resolve: 1.22.8 - semver: 7.5.4 - source-map: 0.6.1 - typescript: 5.4.2 - transitivePeerDependencies: - - '@types/node' + '@babel/runtime': 7.24.7 + '@types/node': 12.20.55 + find-up: 4.1.0 + fs-extra: 8.1.0 - '@microsoft/tsdoc-config@0.17.0': + '@manypkg/get-packages@1.1.3': dependencies: - '@microsoft/tsdoc': 0.15.0 - ajv: 8.12.0 - jju: 1.4.0 - resolve: 1.22.8 - - '@microsoft/tsdoc@0.15.0': {} + '@babel/runtime': 7.24.7 + '@changesets/types': 4.1.0 + '@manypkg/find-root': 1.1.0 + fs-extra: 8.1.0 + globby: 11.1.0 + read-yaml-file: 1.1.0 '@mui/base@5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -13006,17 +13132,17 @@ snapshots: optionalDependencies: '@types/react': 18.3.3 + '@napi-rs/wasm-runtime@0.2.4': + dependencies: + '@emnapi/core': 1.7.1 + '@emnapi/runtime': 1.7.1 + '@tybys/wasm-util': 0.9.0 + '@ngtools/webpack@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5))(typescript@5.4.5)(webpack@5.90.3(esbuild@0.20.1))': dependencies: '@angular/compiler-cli': 17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.4.5) typescript: 5.4.5 - webpack: 5.90.3(esbuild@0.21.5) - - '@ngtools/webpack@17.3.8(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(typescript@5.6.2)(webpack@5.90.3(esbuild@0.21.5))': - dependencies: - '@angular/compiler-cli': 17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2) - typescript: 5.6.2 - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) '@nodelib/fs.scandir@2.1.5': dependencies: @@ -13105,43 +13231,34 @@ snapshots: - bluebird - supports-color - '@nrwl/tao@19.3.2': - dependencies: - nx: 19.3.2 - tslib: 2.6.3 - transitivePeerDependencies: - - '@swc-node/register' - - '@swc/core' - - debug - - '@nx/nx-darwin-arm64@19.3.2': + '@nx/nx-darwin-arm64@22.1.3': optional: true - '@nx/nx-darwin-x64@19.3.2': + '@nx/nx-darwin-x64@22.1.3': optional: true - '@nx/nx-freebsd-x64@19.3.2': + '@nx/nx-freebsd-x64@22.1.3': optional: true - '@nx/nx-linux-arm-gnueabihf@19.3.2': + '@nx/nx-linux-arm-gnueabihf@22.1.3': optional: true - '@nx/nx-linux-arm64-gnu@19.3.2': + '@nx/nx-linux-arm64-gnu@22.1.3': optional: true - '@nx/nx-linux-arm64-musl@19.3.2': + '@nx/nx-linux-arm64-musl@22.1.3': optional: true - '@nx/nx-linux-x64-gnu@19.3.2': + '@nx/nx-linux-x64-gnu@22.1.3': optional: true - '@nx/nx-linux-x64-musl@19.3.2': + '@nx/nx-linux-x64-musl@22.1.3': optional: true - '@nx/nx-win32-arm64-msvc@19.3.2': + '@nx/nx-win32-arm64-msvc@22.1.3': optional: true - '@nx/nx-win32-x64-msvc@19.3.2': + '@nx/nx-win32-x64-msvc@22.1.3': optional: true '@pkgjs/parseargs@0.11.0': @@ -13366,40 +13483,6 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - '@rushstack/node-core-library@5.5.1(@types/node@20.14.9)': - dependencies: - ajv: 8.13.0 - ajv-draft-04: 1.0.0(ajv@8.13.0) - ajv-formats: 3.0.1(ajv@8.13.0) - fs-extra: 7.0.1 - import-lazy: 4.0.0 - jju: 1.4.0 - resolve: 1.22.8 - semver: 7.5.4 - optionalDependencies: - '@types/node': 20.14.9 - - '@rushstack/rig-package@0.5.3': - dependencies: - resolve: 1.22.8 - strip-json-comments: 3.1.1 - - '@rushstack/terminal@0.13.3(@types/node@20.14.9)': - dependencies: - '@rushstack/node-core-library': 5.5.1(@types/node@20.14.9) - supports-color: 8.1.1 - optionalDependencies: - '@types/node': 20.14.9 - - '@rushstack/ts-command-line@4.22.3(@types/node@20.14.9)': - dependencies: - '@rushstack/terminal': 0.13.3(@types/node@20.14.9) - '@types/argparse': 1.0.38 - argparse: 1.0.10 - string-argv: 0.3.2 - transitivePeerDependencies: - - '@types/node' - '@schematics/angular@17.3.8(chokidar@3.6.0)': dependencies: '@angular-devkit/core': 17.3.8(chokidar@3.6.0) @@ -13408,10 +13491,6 @@ snapshots: transitivePeerDependencies: - chokidar - '@shikijs/core@1.12.0': - dependencies: - '@types/hast': 3.0.4 - '@sigstore/bundle@2.3.2': dependencies: '@sigstore/protobuf-specs': 0.3.2 @@ -13446,6 +13525,8 @@ snapshots: '@sinclair/typebox@0.27.8': {} + '@sinclair/typebox@0.34.41': {} + '@sindresorhus/merge-streams@2.3.0': {} '@size-limit/esbuild@11.1.4(size-limit@11.1.4)': @@ -13476,13 +13557,6 @@ snapshots: dependencies: solid-js: 1.8.18 - '@stylistic/eslint-plugin-js@2.7.1(eslint@8.57.0)': - dependencies: - '@types/eslint': 9.6.1 - eslint: 8.57.0 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 - '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1))': dependencies: '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) @@ -13506,44 +13580,16 @@ snapshots: transitivePeerDependencies: - supports-color - '@swc/helpers@0.5.11': + '@svitejs/changesets-changelog-github-compact@1.2.0(encoding@0.1.13)': dependencies: - tslib: 2.6.3 + '@changesets/get-github-info': 0.6.0(encoding@0.1.13) + dotenv: 16.4.5 + transitivePeerDependencies: + - encoding - '@tanstack/config@0.13.0(@types/node@20.14.9)(esbuild@0.21.5)(eslint@8.57.0)(rollup@4.18.0)(typescript@5.4.5)(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1))': + '@swc/helpers@0.5.11': dependencies: - '@commitlint/parse': 19.0.3 - '@eslint/js': 9.9.1 - '@stylistic/eslint-plugin-js': 2.7.1(eslint@8.57.0) - commander: 12.1.0 - current-git-branch: 1.1.0 - esbuild-register: 3.6.0(esbuild@0.21.5) - eslint-plugin-import-x: 4.1.1(eslint@8.57.0)(typescript@5.4.5) - eslint-plugin-n: 17.10.2(eslint@8.57.0) - globals: 15.9.0 - interpret: 3.1.1 - jsonfile: 6.1.0 - liftoff: 5.0.0 - minimist: 1.2.8 - rollup-plugin-preserve-directives: 0.4.0(rollup@4.18.0) - semver: 7.6.3 - simple-git: 3.25.0 - typedoc: 0.26.6(typescript@5.4.5) - typedoc-plugin-frontmatter: 1.0.0(typedoc-plugin-markdown@4.2.6(typedoc@0.26.6(typescript@5.4.5))) - typedoc-plugin-markdown: 4.2.6(typedoc@0.26.6(typescript@5.4.5)) - typescript-eslint: 8.3.0(eslint@8.57.0)(typescript@5.4.5) - v8flags: 4.0.1 - vite-plugin-dts: 4.0.3(@types/node@20.14.9)(rollup@4.18.0)(typescript@5.4.5)(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) - vite-plugin-externalize-deps: 0.8.0(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) - vite-tsconfig-paths: 5.0.1(typescript@5.4.5)(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)) - transitivePeerDependencies: - - '@types/node' - - esbuild - - eslint - - rollup - - supports-color - - typescript - - vite + tslib: 2.6.3 '@tanstack/history@1.41.0': {} @@ -13575,15 +13621,15 @@ snapshots: react-dom: 18.3.1(react@18.3.1) use-sync-external-store: 1.2.2(react@18.3.1) - '@tanstack/react-virtual@3.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@tanstack/react-virtual@3.12.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@tanstack/virtual-core': 3.8.1 + '@tanstack/virtual-core': 3.12.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) '@tanstack/router-generator@1.43.1': dependencies: - prettier: 3.3.2 + prettier: 3.7.4 zod: 3.23.8 '@tanstack/router-plugin@1.43.1(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1))': @@ -13621,7 +13667,7 @@ snapshots: '@tanstack/virtual-core@3.11.2': {} - '@tanstack/virtual-core@3.8.1': {} + '@tanstack/virtual-core@3.12.0': {} '@tanstack/virtual-core@3.8.3': {} @@ -13707,7 +13753,9 @@ snapshots: optionalDependencies: typescript: 5.4.5 - '@types/argparse@1.0.38': {} + '@tybys/wasm-util@0.9.0': + dependencies: + tslib: 2.6.3 '@types/aria-query@5.0.4': {} @@ -13754,10 +13802,6 @@ snapshots: dependencies: '@types/node': 20.14.9 - '@types/conventional-commits-parser@5.0.0': - dependencies: - '@types/node': 20.14.9 - '@types/cookie@0.4.1': {} '@types/cors@2.8.17': @@ -13767,11 +13811,11 @@ snapshots: '@types/eslint-scope@3.7.7': dependencies: '@types/eslint': 9.6.1 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/eslint@9.6.1': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 '@types/estree@1.0.5': {} @@ -13792,10 +13836,6 @@ snapshots: '@types/qs': 6.9.15 '@types/serve-static': 1.15.7 - '@types/hast@3.0.4': - dependencies: - '@types/unist': 3.0.2 - '@types/http-errors@2.0.4': {} '@types/http-proxy@1.17.14': @@ -13812,6 +13852,8 @@ snapshots: dependencies: '@types/node': 20.14.9 + '@types/node@12.20.55': {} + '@types/node@20.14.9': dependencies: undici-types: 5.26.5 @@ -13876,89 +13918,6 @@ snapshots: dependencies: '@types/node': 20.14.9 - '@typescript-eslint/eslint-plugin@8.3.0(@typescript-eslint/parser@8.3.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': - dependencies: - '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.3.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 8.3.0 - '@typescript-eslint/type-utils': 8.3.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 8.3.0 - eslint: 8.57.0 - graphemer: 1.4.0 - ignore: 5.3.1 - natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.4.5) - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@8.3.0(eslint@8.57.0)(typescript@5.4.5)': - dependencies: - '@typescript-eslint/scope-manager': 8.3.0 - '@typescript-eslint/types': 8.3.0 - '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 8.3.0 - debug: 4.3.6 - eslint: 8.57.0 - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/scope-manager@8.3.0': - dependencies: - '@typescript-eslint/types': 8.3.0 - '@typescript-eslint/visitor-keys': 8.3.0 - - '@typescript-eslint/type-utils@8.3.0(eslint@8.57.0)(typescript@5.4.5)': - dependencies: - '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.4.5) - '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.6 - ts-api-utils: 1.3.0(typescript@5.4.5) - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - eslint - - supports-color - - '@typescript-eslint/types@8.3.0': {} - - '@typescript-eslint/typescript-estree@8.3.0(typescript@5.4.5)': - dependencies: - '@typescript-eslint/types': 8.3.0 - '@typescript-eslint/visitor-keys': 8.3.0 - debug: 4.3.6 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.4.5) - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.3.0(eslint@8.57.0)(typescript@5.4.5)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@typescript-eslint/scope-manager': 8.3.0 - '@typescript-eslint/types': 8.3.0 - '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.4.5) - eslint: 8.57.0 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/visitor-keys@8.3.0': - dependencies: - '@typescript-eslint/types': 8.3.0 - eslint-visitor-keys: 3.4.3 - - '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-basic-ssl@1.1.0(vite@5.1.7(@types/node@20.14.9)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': dependencies: vite: 5.1.7(@types/node@20.14.9)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) @@ -13974,6 +13933,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@vitejs/plugin-react@4.3.1(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1))': + dependencies: + '@babel/core': 7.24.7 + '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.24.7) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.2 + vite: 5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) + transitivePeerDependencies: + - supports-color + '@vitejs/plugin-vue-jsx@4.0.0(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1))(vue@3.4.31(typescript@5.4.5))': dependencies: '@babel/core': 7.24.7 @@ -14205,12 +14175,6 @@ snapshots: '@vue/shared': 3.4.31 vue: 3.4.31(typescript@5.4.5) - '@vue/server-renderer@3.4.31(vue@3.4.31(typescript@5.6.2))': - dependencies: - '@vue/compiler-ssr': 3.4.31 - '@vue/shared': 3.4.31 - vue: 3.4.31(typescript@5.6.2) - '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.4.5))': dependencies: '@vue/compiler-ssr': 3.5.13 @@ -14303,7 +14267,7 @@ snapshots: '@yarnpkg/lockfile@1.1.0': {} - '@yarnpkg/parsers@3.0.0-rc.46': + '@yarnpkg/parsers@3.0.2': dependencies: js-yaml: 3.14.1 tslib: 2.6.3 @@ -14314,11 +14278,6 @@ snapshots: dependencies: argparse: 2.0.1 - JSONStream@1.3.5: - dependencies: - jsonparse: 1.3.1 - through: 2.3.8 - abbrev@2.0.0: {} accepts@1.3.8: @@ -14330,10 +14289,6 @@ snapshots: dependencies: acorn: 8.12.1 - acorn-jsx@5.3.2(acorn@8.12.1): - dependencies: - acorn: 8.12.1 - acorn-walk@8.3.3: dependencies: acorn: 8.12.1 @@ -14356,10 +14311,6 @@ snapshots: clean-stack: 2.2.0 indent-string: 4.0.0 - ajv-draft-04@1.0.0(ajv@8.13.0): - optionalDependencies: - ajv: 8.13.0 - ajv-formats@2.1.1(ajv@8.12.0): optionalDependencies: ajv: 8.12.0 @@ -14368,10 +14319,6 @@ snapshots: optionalDependencies: ajv: 8.16.0 - ajv-formats@3.0.1(ajv@8.13.0): - optionalDependencies: - ajv: 8.13.0 - ajv-keywords@3.5.2(ajv@6.12.6): dependencies: ajv: 6.12.6 @@ -14395,13 +14342,6 @@ snapshots: require-from-string: 2.0.2 uri-js: 4.4.1 - ajv@8.13.0: - dependencies: - fast-deep-equal: 3.1.3 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - uri-js: 4.4.1 - ajv@8.16.0: dependencies: fast-deep-equal: 3.1.3 @@ -14460,17 +14400,13 @@ snapshots: arity-n@1.0.4: {} - array-each@1.0.1: {} - array-flatten@1.1.1: {} - array-ify@1.0.0: {} - array-last@1.3.0: dependencies: is-number: 4.0.0 - array-slice@1.1.0: {} + array-union@2.1.0: {} assertion-error@1.1.0: {} @@ -14482,10 +14418,18 @@ snapshots: caniuse-lite: 1.0.30001638 fraction.js: 4.3.7 normalize-range: 0.1.2 - picocolors: 1.0.1 + picocolors: 1.1.1 postcss: 8.4.35 postcss-value-parser: 4.2.0 + axios@1.13.2: + dependencies: + follow-redirects: 1.15.6 + form-data: 4.0.5 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + axios@1.7.2: dependencies: follow-redirects: 1.15.6 @@ -14503,18 +14447,16 @@ snapshots: '@babel/core': 7.24.7 '@babel/parser': 7.26.3 '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.26.3 transitivePeerDependencies: - supports-color - babel-loader@9.1.3(@babel/core@7.24.0)(webpack@5.90.3(esbuild@0.21.5)): + babel-loader@9.1.3(@babel/core@7.24.0)(webpack@5.90.3(esbuild@0.20.1)): dependencies: '@babel/core': 7.24.0 find-cache-dir: 4.0.0 schema-utils: 4.2.0 - webpack: 5.90.3(esbuild@0.21.5) - - babel-plugin-add-module-exports@0.2.1: {} + webpack: 5.90.3(esbuild@0.20.1) babel-plugin-istanbul@6.1.1: dependencies: @@ -14604,6 +14546,10 @@ snapshots: batch@0.6.1: {} + better-path-resolve@1.0.0: + dependencies: + is-windows: 1.0.2 + big.js@5.2.2: {} binary-extensions@2.3.0: {} @@ -14707,6 +14653,11 @@ snapshots: tar: 6.2.1 unique-filename: 3.0.0 + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + call-bind@1.0.7: dependencies: es-define-property: 1.0.0 @@ -14761,10 +14712,35 @@ snapshots: chardet@0.7.0: {} + chardet@2.1.0: {} + check-error@1.0.3: dependencies: get-func-name: 2.0.2 + cheerio-select@2.1.0: + dependencies: + boolbase: 1.0.0 + css-select: 5.1.0 + css-what: 6.1.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.2.2 + + cheerio@1.1.2: + dependencies: + cheerio-select: 2.1.0 + dom-serializer: 2.0.0 + domhandler: 5.0.3 + domutils: 3.2.2 + encoding-sniffer: 0.2.1 + htmlparser2: 10.0.0 + parse5: 7.3.0 + parse5-htmlparser2-tree-adapter: 7.1.0 + parse5-parser-stream: 7.1.2 + undici: 7.16.0 + whatwg-mimetype: 4.0.0 + chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -14783,6 +14759,8 @@ snapshots: ci-env@1.17.0: {} + ci-info@3.9.0: {} + classnames@2.5.1: {} clean-stack@2.2.0: {} @@ -14832,7 +14810,7 @@ snapshots: code-red@1.0.4: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 acorn: 8.12.1 estree-walker: 3.0.3 periscopic: 3.1.0 @@ -14865,13 +14843,6 @@ snapshots: commondir@1.0.1: {} - compare-func@2.0.0: - dependencies: - array-ify: 1.0.0 - dot-prop: 5.3.0 - - compare-versions@6.1.1: {} - compose-function@3.0.3: dependencies: arity-n: 1.0.4 @@ -14915,18 +14886,7 @@ snapshots: dependencies: safe-buffer: 5.2.1 - content-type@1.0.5: {} - - conventional-changelog-angular@7.0.0: - dependencies: - compare-func: 2.0.0 - - conventional-commits-parser@5.0.0: - dependencies: - JSONStream: 1.3.5 - is-text-path: 2.0.0 - meow: 12.1.1 - split2: 4.2.0 + content-type@1.0.5: {} convert-source-map@1.9.0: {} @@ -14942,7 +14902,7 @@ snapshots: dependencies: is-what: 3.14.1 - copy-webpack-plugin@11.0.0(webpack@5.90.3(esbuild@0.21.5)): + copy-webpack-plugin@11.0.0(webpack@5.90.3(esbuild@0.20.1)): dependencies: fast-glob: 3.3.2 glob-parent: 6.0.2 @@ -14950,7 +14910,7 @@ snapshots: normalize-path: 3.0.0 schema-utils: 4.2.0 serialize-javascript: 6.0.2 - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) core-js-compat@3.37.1: dependencies: @@ -14980,15 +14940,6 @@ snapshots: optionalDependencies: typescript: 5.4.5 - cosmiconfig@9.0.0(typescript@5.6.2): - dependencies: - env-paths: 2.2.1 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - parse-json: 5.2.0 - optionalDependencies: - typescript: 5.6.2 - critters@0.0.22: dependencies: chalk: 4.1.2 @@ -14996,33 +14947,33 @@ snapshots: dom-serializer: 2.0.0 domhandler: 5.0.3 htmlparser2: 8.0.2 - postcss: 8.4.39 + postcss: 8.4.49 postcss-media-query-parser: 0.2.3 - cross-spawn@5.1.0: + cross-spawn@7.0.3: dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.3.1 + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 - cross-spawn@7.0.3: + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 - css-loader@6.10.0(webpack@5.90.3(esbuild@0.21.5)): + css-loader@6.10.0(webpack@5.90.3(esbuild@0.20.1)): dependencies: - icss-utils: 5.1.0(postcss@8.4.39) - postcss: 8.4.39 - postcss-modules-extract-imports: 3.1.0(postcss@8.4.39) - postcss-modules-local-by-default: 4.0.5(postcss@8.4.39) - postcss-modules-scope: 3.2.0(postcss@8.4.39) - postcss-modules-values: 4.0.0(postcss@8.4.39) + icss-utils: 5.1.0(postcss@8.4.49) + postcss: 8.4.49 + postcss-modules-extract-imports: 3.1.0(postcss@8.4.49) + postcss-modules-local-by-default: 4.0.5(postcss@8.4.49) + postcss-modules-scope: 3.2.0(postcss@8.4.49) + postcss-modules-values: 4.0.0(postcss@8.4.49) postcss-value-parser: 4.2.0 semver: 7.6.3 optionalDependencies: - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) css-select@5.1.0: dependencies: @@ -15035,7 +14986,7 @@ snapshots: css-tree@2.3.1: dependencies: mdn-data: 2.0.30 - source-map-js: 1.2.0 + source-map-js: 1.2.1 css-what@6.1.0: {} @@ -15049,12 +15000,6 @@ snapshots: csstype@3.1.3: {} - current-git-branch@1.1.0: - dependencies: - babel-plugin-add-module-exports: 0.2.1 - execa: 0.6.3 - is-git-repository: 1.1.1 - custom-event@1.0.1: {} data-urls@5.0.0: @@ -15062,6 +15007,8 @@ snapshots: whatwg-mimetype: 4.0.0 whatwg-url: 14.0.0 + dataloader@1.4.0: {} + date-format@4.0.14: {} de-indent@1.0.2: {} @@ -15070,10 +15017,6 @@ snapshots: dependencies: ms: 2.0.0 - debug@3.2.7: - dependencies: - ms: 2.1.3 - debug@4.3.6: dependencies: ms: 2.1.2 @@ -15086,8 +15029,6 @@ snapshots: deep-extend@0.6.0: {} - deep-is@0.1.4: {} - deepmerge@4.3.1: {} default-gateway@6.0.3: @@ -15118,8 +15059,6 @@ snapshots: destroy@1.2.0: {} - detect-file@1.0.0: {} - detect-indent@6.1.0: {} detect-node@2.1.0: {} @@ -15136,10 +15075,6 @@ snapshots: dependencies: '@leichtgewicht/ip-codec': 2.0.5 - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - dom-accessibility-api@0.5.16: {} dom-accessibility-api@0.6.3: {} @@ -15174,9 +15109,11 @@ snapshots: domelementtype: 2.3.0 domhandler: 5.0.3 - dot-prop@5.3.0: + domutils@3.2.2: dependencies: - is-obj: 2.0.0 + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 dotenv-expand@11.0.6: dependencies: @@ -15184,7 +15121,11 @@ snapshots: dotenv@16.4.5: {} - duplexer@0.1.2: {} + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 eastasianwidth@0.2.0: {} @@ -15206,6 +15147,11 @@ snapshots: encodeurl@1.0.2: {} + encoding-sniffer@0.2.1: + dependencies: + iconv-lite: 0.6.3 + whatwg-encoding: 3.1.1 + encoding@0.1.13: dependencies: iconv-lite: 0.6.3 @@ -15243,12 +15189,19 @@ snapshots: dependencies: ansi-colors: 4.1.3 + enquirer@2.4.1: + dependencies: + ansi-colors: 4.1.3 + strip-ansi: 6.0.1 + ent@2.2.1: dependencies: punycode: 1.4.1 entities@4.5.0: {} + entities@6.0.1: {} + env-paths@2.2.1: {} err-code@2.0.3: {} @@ -15266,18 +15219,24 @@ snapshots: dependencies: get-intrinsic: 1.2.4 + es-define-property@1.0.1: {} + es-errors@1.3.0: {} es-module-lexer@1.5.4: {} - es6-promise@3.3.1: {} + es-object-atoms@1.1.1: + dependencies: + es-errors: 1.3.0 - esbuild-register@3.6.0(esbuild@0.21.5): + es-set-tostringtag@2.1.0: dependencies: - debug: 4.3.6 - esbuild: 0.21.5 - transitivePeerDependencies: - - supports-color + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + + es6-promise@3.3.1: {} esbuild-wasm@0.20.1: {} @@ -15397,131 +15356,13 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@8.57.0): - dependencies: - eslint: 8.57.0 - semver: 7.6.3 - - eslint-import-resolver-node@0.3.9: - dependencies: - debug: 3.2.7 - is-core-module: 2.14.0 - resolve: 1.22.8 - transitivePeerDependencies: - - supports-color - - eslint-plugin-es-x@7.8.0(eslint@8.57.0): - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.11.0 - eslint: 8.57.0 - eslint-compat-utils: 0.5.1(eslint@8.57.0) - - eslint-plugin-import-x@4.1.1(eslint@8.57.0)(typescript@5.4.5): - dependencies: - '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.4.5) - '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.6 - doctrine: 3.0.0 - eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 - get-tsconfig: 4.7.5 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - stable-hash: 0.0.4 - tslib: 2.6.3 - transitivePeerDependencies: - - supports-color - - typescript - - eslint-plugin-n@17.10.2(eslint@8.57.0): - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - enhanced-resolve: 5.17.0 - eslint: 8.57.0 - eslint-plugin-es-x: 7.8.0(eslint@8.57.0) - get-tsconfig: 4.7.5 - globals: 15.9.0 - ignore: 5.3.1 - minimatch: 9.0.5 - semver: 7.6.3 - eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@7.2.2: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} - - eslint-visitor-keys@4.0.0: {} - - eslint@8.57.0: - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.11.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.6 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.5.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.1 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - - espree@10.1.0: - dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 - - espree@9.6.1: - dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 3.4.3 - esprima@4.0.1: {} - esquery@1.5.0: - dependencies: - estraverse: 5.3.0 - esrecurse@4.3.0: dependencies: estraverse: 5.3.0 @@ -15534,7 +15375,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 esutils@2.0.3: {} @@ -15544,16 +15385,6 @@ snapshots: events@3.3.0: {} - execa@0.6.3: - dependencies: - cross-spawn: 5.1.0 - get-stream: 3.0.0 - is-stream: 1.1.0 - npm-run-path: 2.0.2 - p-finally: 1.0.0 - signal-exit: 3.0.7 - strip-eof: 1.0.0 - execa@5.1.1: dependencies: cross-spawn: 7.0.3 @@ -15578,10 +15409,6 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - expand-tilde@2.0.2: - dependencies: - homedir-polyfill: 1.0.3 - exponential-backoff@3.1.1: {} express@4.19.2: @@ -15622,6 +15449,8 @@ snapshots: extend@3.0.2: {} + extendable-error@0.1.7: {} + external-editor@3.1.0: dependencies: chardet: 0.7.0 @@ -15640,8 +15469,6 @@ snapshots: fast-json-stable-stringify@2.1.0: {} - fast-levenshtein@2.0.6: {} - fast-url-parser@1.1.3: dependencies: punycode: 1.4.1 @@ -15654,14 +15481,14 @@ snapshots: dependencies: websocket-driver: 0.7.4 + fdir@6.5.0(picomatch@4.0.3): + optionalDependencies: + picomatch: 4.0.3 + figures@3.2.0: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@6.0.1: - dependencies: - flat-cache: 3.2.0 - fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -15710,51 +15537,17 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - find-up@6.3.0: dependencies: locate-path: 7.2.0 path-exists: 5.0.0 - findup-sync@5.0.0: - dependencies: - detect-file: 1.0.0 - is-glob: 4.0.3 - micromatch: 4.0.7 - resolve-dir: 1.0.1 - - fined@2.0.0: - dependencies: - expand-tilde: 2.0.2 - is-plain-object: 5.0.0 - object.defaults: 1.1.0 - object.pick: 1.3.0 - parse-filepath: 1.0.2 - - flagged-respawn@2.0.0: {} - - flat-cache@3.2.0: - dependencies: - flatted: 3.3.1 - keyv: 4.5.4 - rimraf: 3.0.2 - flat@5.0.2: {} flatted@3.3.1: {} follow-redirects@1.15.6: {} - for-in@1.0.2: {} - - for-own@1.0.0: - dependencies: - for-in: 1.0.2 - foreground-child@3.2.1: dependencies: cross-spawn: 7.0.3 @@ -15766,6 +15559,14 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 + form-data@4.0.5: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.2 + mime-types: 2.1.35 + forwarded@0.2.0: {} fraction.js@4.3.7: {} @@ -15827,18 +15628,30 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.2 + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + get-package-type@0.1.0: {} - get-stream@3.0.0: {} + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 get-stream@6.0.1: {} get-stream@8.0.1: {} - get-tsconfig@4.7.5: - dependencies: - resolve-pkg-maps: 1.0.0 - glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -15875,27 +15688,16 @@ snapshots: minimatch: 5.1.6 once: 1.4.0 - global-modules@1.0.0: - dependencies: - global-prefix: 1.0.2 - is-windows: 1.0.2 - resolve-dir: 1.0.1 - - global-prefix@1.0.2: - dependencies: - expand-tilde: 2.0.2 - homedir-polyfill: 1.0.3 - ini: 1.3.8 - is-windows: 1.0.2 - which: 1.3.1 - globals@11.12.0: {} - globals@13.24.0: + globby@11.1.0: dependencies: - type-fest: 0.20.2 - - globals@15.9.0: {} + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.1 + merge2: 1.4.1 + slash: 3.0.0 globby@13.2.2: dependencies: @@ -15914,15 +15716,13 @@ snapshots: slash: 5.1.0 unicorn-magic: 0.1.0 - globrex@0.1.2: {} - gopd@1.0.1: dependencies: get-intrinsic: 1.2.4 - graceful-fs@4.2.11: {} + gopd@1.2.0: {} - graphemer@1.4.0: {} + graceful-fs@4.2.11: {} handle-thing@2.0.1: {} @@ -15940,6 +15740,12 @@ snapshots: has-symbols@1.0.3: {} + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.0.3 + hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -15950,10 +15756,6 @@ snapshots: dependencies: react-is: 16.13.1 - homedir-polyfill@1.0.3: - dependencies: - parse-passwd: 1.0.0 - hosted-git-info@7.0.2: dependencies: lru-cache: 10.3.0 @@ -15975,8 +15777,19 @@ snapshots: html-escaper@2.0.2: {} + html-link-extractor@1.0.5: + dependencies: + cheerio: 1.1.2 + html-tags@3.3.1: {} + htmlparser2@10.0.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.2.2 + entities: 6.0.1 + htmlparser2@8.0.2: dependencies: domelementtype: 2.3.0 @@ -16046,6 +15859,8 @@ snapshots: transitivePeerDependencies: - supports-color + human-id@4.1.1: {} + human-signals@2.1.0: {} human-signals@5.0.0: {} @@ -16058,9 +15873,13 @@ snapshots: dependencies: safer-buffer: 2.1.2 - icss-utils@5.1.0(postcss@8.4.39): + iconv-lite@0.7.0: dependencies: - postcss: 8.4.39 + safer-buffer: 2.1.2 + + icss-utils@5.1.0(postcss@8.4.49): + dependencies: + postcss: 8.4.49 identity-function@1.0.0: {} @@ -16072,6 +15891,8 @@ snapshots: ignore@5.3.1: {} + ignore@7.0.5: {} + image-size@0.5.5: optional: true @@ -16082,8 +15903,6 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 - import-lazy@4.0.0: {} - imurmurhash@0.1.4: {} indent-string@4.0.0: {} @@ -16123,8 +15942,6 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 6.2.0 - interpret@3.1.1: {} - invariant@2.2.4: dependencies: loose-envify: 1.4.0 @@ -16138,11 +15955,6 @@ snapshots: ipaddr.js@2.2.0: {} - is-absolute@1.0.0: - dependencies: - is-relative: 1.0.0 - is-windows: 1.0.2 - is-arrayish@0.2.1: {} is-binary-path@2.1.0: @@ -16163,11 +15975,6 @@ snapshots: is-fullwidth-code-point@3.0.0: {} - is-git-repository@1.1.1: - dependencies: - execa: 0.6.3 - path-is-absolute: 1.0.1 - is-glob@4.0.3: dependencies: is-extglob: 2.1.1 @@ -16184,18 +15991,12 @@ snapshots: is-number@7.0.0: {} - is-obj@2.0.0: {} - - is-path-inside@3.0.3: {} - is-plain-obj@3.0.0: {} is-plain-object@2.0.4: dependencies: isobject: 3.0.1 - is-plain-object@5.0.0: {} - is-port-reachable@4.0.0: {} is-potential-custom-element-name@1.0.1: {} @@ -16206,25 +16007,15 @@ snapshots: is-reference@3.0.2: dependencies: - '@types/estree': 1.0.5 - - is-relative@1.0.0: - dependencies: - is-unc-path: 1.0.0 - - is-stream@1.1.0: {} + '@types/estree': 1.0.6 is-stream@2.0.1: {} is-stream@3.0.0: {} - is-text-path@2.0.0: - dependencies: - text-extensions: 2.4.0 - - is-unc-path@1.0.0: + is-subdir@1.2.0: dependencies: - unc-path-regex: 0.1.2 + better-path-resolve: 1.0.0 is-unicode-supported@0.1.0: {} @@ -16253,7 +16044,7 @@ snapshots: istanbul-lib-instrument@5.2.1: dependencies: '@babel/core': 7.24.7 - '@babel/parser': 7.24.7 + '@babel/parser': 7.26.3 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 6.3.1 @@ -16291,14 +16082,12 @@ snapshots: jasmine-core@5.1.2: {} - jest-diff@29.7.0: + jest-diff@30.2.0: dependencies: + '@jest/diff-sequences': 30.0.1 + '@jest/get-type': 30.1.0 chalk: 4.1.2 - diff-sequences: 29.6.3 - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - - jest-get-type@29.6.3: {} + pretty-format: 30.2.0 jest-worker@27.5.1: dependencies: @@ -16308,8 +16097,6 @@ snapshots: jiti@1.21.6: {} - jju@1.4.0: {} - js-tokens@4.0.0: {} js-tokens@9.0.0: {} @@ -16357,8 +16144,6 @@ snapshots: jsesc@2.5.2: {} - json-buffer@3.0.1: {} - json-parse-even-better-errors@2.3.1: {} json-parse-even-better-errors@3.0.2: {} @@ -16367,8 +16152,6 @@ snapshots: json-schema-traverse@1.0.0: {} - json-stable-stringify-without-jsonify@1.0.1: {} - json5@2.2.3: {} jsonc-parser@3.2.0: {} @@ -16451,10 +16234,6 @@ snapshots: - supports-color - utf-8-validate - keyv@4.5.4: - dependencies: - json-buffer: 3.0.1 - kind-of@6.0.3: {} kleur@4.1.5: {} @@ -16484,18 +16263,16 @@ snapshots: zod: 3.23.8 zod-validation-error: 3.3.0(zod@3.23.8) - kolorist@1.8.0: {} - launch-editor@2.8.0: dependencies: - picocolors: 1.0.1 + picocolors: 1.1.1 shell-quote: 1.8.1 - less-loader@11.1.0(less@4.2.0)(webpack@5.90.3(esbuild@0.21.5)): + less-loader@11.1.0(less@4.2.0)(webpack@5.90.3(esbuild@0.20.1)): dependencies: klona: 2.0.6 less: 4.2.0 - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) less@4.2.0: dependencies: @@ -16511,36 +16288,17 @@ snapshots: needle: 3.3.1 source-map: 0.6.1 - levn@0.4.1: - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - - license-webpack-plugin@4.0.2(webpack@5.90.3(esbuild@0.21.5)): + license-webpack-plugin@4.0.2(webpack@5.90.3(esbuild@0.20.1)): dependencies: webpack-sources: 3.2.3 optionalDependencies: - webpack: 5.90.3(esbuild@0.21.5) - - liftoff@5.0.0: - dependencies: - extend: 3.0.2 - findup-sync: 5.0.0 - fined: 2.0.0 - flagged-respawn: 2.0.0 - is-plain-object: 5.0.0 - rechoir: 0.8.0 - resolve: 1.22.8 + webpack: 5.90.3(esbuild@0.20.1) lilconfig@3.1.2: {} lines-and-columns@1.2.4: {} - lines-and-columns@2.0.4: {} - - linkify-it@5.0.0: - dependencies: - uc.micro: 2.1.0 + lines-and-columns@2.0.3: {} lit-element@4.0.6: dependencies: @@ -16579,10 +16337,6 @@ snapshots: dependencies: p-locate: 4.1.0 - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - locate-path@7.2.0: dependencies: p-locate: 6.0.0 @@ -16591,7 +16345,7 @@ snapshots: lodash.debounce@4.0.8: {} - lodash.merge@4.6.2: {} + lodash.startcase@4.4.0: {} lodash@4.17.21: {} @@ -16620,11 +16374,6 @@ snapshots: lru-cache@10.3.0: {} - lru-cache@4.1.5: - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -16633,8 +16382,6 @@ snapshots: dependencies: yallist: 4.0.0 - lunr@2.3.9: {} - lz-string@1.5.0: {} magic-string@0.16.0: @@ -16680,22 +16427,18 @@ snapshots: transitivePeerDependencies: - supports-color - map-cache@0.2.2: {} - map-obj@2.0.0: {} - markdown-it@14.1.0: + markdown-link-extractor@4.0.2: dependencies: - argparse: 2.0.1 - entities: 4.5.0 - linkify-it: 5.0.0 - mdurl: 2.0.0 - punycode.js: 2.3.1 - uc.micro: 2.1.0 + html-link-extractor: 1.0.5 + marked: 12.0.2 - mdn-data@2.0.30: {} + marked@12.0.2: {} + + math-intrinsics@1.1.0: {} - mdurl@2.0.0: {} + mdn-data@2.0.30: {} media-typer@0.3.0: {} @@ -16703,8 +16446,6 @@ snapshots: dependencies: fs-monkey: 1.0.6 - meow@12.1.1: {} - merge-anything@5.1.7: dependencies: is-what: 4.1.16 @@ -16722,6 +16463,11 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + mime-db@1.33.0: {} mime-db@1.52.0: {} @@ -16744,17 +16490,13 @@ snapshots: min-indent@1.0.1: {} - mini-css-extract-plugin@2.8.1(webpack@5.90.3(esbuild@0.21.5)): + mini-css-extract-plugin@2.8.1(webpack@5.90.3(esbuild@0.20.1)): dependencies: schema-utils: 4.2.0 tapable: 2.2.1 - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) - minimalistic-assert@1.0.1: {} - - minimatch@3.0.8: - dependencies: - brace-expansion: 1.1.11 + minimalistic-assert@1.0.1: {} minimatch@3.1.2: dependencies: @@ -16856,12 +16598,10 @@ snapshots: nanospinner@1.1.0: dependencies: - picocolors: 1.0.1 + picocolors: 1.1.1 nanostores@0.11.3: {} - natural-compare@1.4.0: {} - needle@3.3.1: dependencies: iconv-lite: 0.6.3 @@ -16902,38 +16642,6 @@ snapshots: optionalDependencies: esbuild: 0.20.2 rollup: 4.18.0 - optional: true - - ng-packagr@17.3.0(@angular/compiler-cli@17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2))(tslib@2.6.3)(typescript@5.6.2): - dependencies: - '@angular/compiler-cli': 17.3.11(@angular/compiler@17.3.11(@angular/core@17.3.11(rxjs@7.8.1)(zone.js@0.14.7)))(typescript@5.6.2) - '@rollup/plugin-json': 6.1.0(rollup@4.18.0) - '@rollup/plugin-node-resolve': 15.2.3(rollup@4.18.0) - '@rollup/wasm-node': 4.18.0 - ajv: 8.16.0 - ansi-colors: 4.1.3 - browserslist: 4.23.1 - cacache: 18.0.3 - chokidar: 3.6.0 - commander: 12.1.0 - convert-source-map: 2.0.0 - dependency-graph: 1.0.0 - esbuild-wasm: 0.20.2 - fast-glob: 3.3.2 - find-cache-dir: 3.3.2 - injection-js: 2.4.0 - jsonc-parser: 3.3.1 - less: 4.2.0 - ora: 5.4.1 - piscina: 4.6.1 - postcss: 8.4.39 - rxjs: 7.8.1 - sass: 1.77.6 - tslib: 2.6.3 - typescript: 5.6.2 - optionalDependencies: - esbuild: 0.20.2 - rollup: 4.18.0 nice-napi@1.0.2: dependencies: @@ -16944,6 +16652,12 @@ snapshots: node-addon-api@3.2.1: optional: true + node-fetch@2.7.0(encoding@0.1.13): + dependencies: + whatwg-url: 5.0.0 + optionalDependencies: + encoding: 0.1.13 + node-forge@1.3.1: {} node-gyp-build@4.8.1: @@ -17023,10 +16737,6 @@ snapshots: transitivePeerDependencies: - supports-color - npm-run-path@2.0.2: - dependencies: - path-key: 2.0.1 - npm-run-path@4.0.1: dependencies: path-key: 3.1.1 @@ -17041,13 +16751,13 @@ snapshots: nwsapi@2.2.10: {} - nx@19.3.2: + nx@22.1.3: dependencies: - '@nrwl/tao': 19.3.2 + '@napi-rs/wasm-runtime': 0.2.4 '@yarnpkg/lockfile': 1.1.0 - '@yarnpkg/parsers': 3.0.0-rc.46 + '@yarnpkg/parsers': 3.0.2 '@zkochan/js-yaml': 0.0.7 - axios: 1.7.2 + axios: 1.13.2 chalk: 4.1.2 cli-cursor: 3.1.0 cli-spinners: 2.6.1 @@ -17058,36 +16768,37 @@ snapshots: figures: 3.2.0 flat: 5.0.2 front-matter: 4.0.2 - fs-extra: 11.2.0 - ignore: 5.3.1 - jest-diff: 29.7.0 + ignore: 7.0.5 + jest-diff: 30.2.0 jsonc-parser: 3.2.0 - lines-and-columns: 2.0.4 + lines-and-columns: 2.0.3 minimatch: 9.0.3 node-machine-id: 1.1.12 npm-run-path: 4.0.1 open: 8.4.2 ora: 5.3.0 + resolve.exports: 2.0.3 semver: 7.6.3 string-width: 4.2.3 - strong-log-transformer: 2.1.0 tar-stream: 2.2.0 tmp: 0.2.3 + tree-kill: 1.2.2 tsconfig-paths: 4.2.0 tslib: 2.6.3 + yaml: 2.8.2 yargs: 17.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@nx/nx-darwin-arm64': 19.3.2 - '@nx/nx-darwin-x64': 19.3.2 - '@nx/nx-freebsd-x64': 19.3.2 - '@nx/nx-linux-arm-gnueabihf': 19.3.2 - '@nx/nx-linux-arm64-gnu': 19.3.2 - '@nx/nx-linux-arm64-musl': 19.3.2 - '@nx/nx-linux-x64-gnu': 19.3.2 - '@nx/nx-linux-x64-musl': 19.3.2 - '@nx/nx-win32-arm64-msvc': 19.3.2 - '@nx/nx-win32-x64-msvc': 19.3.2 + '@nx/nx-darwin-arm64': 22.1.3 + '@nx/nx-darwin-x64': 22.1.3 + '@nx/nx-freebsd-x64': 22.1.3 + '@nx/nx-linux-arm-gnueabihf': 22.1.3 + '@nx/nx-linux-arm64-gnu': 22.1.3 + '@nx/nx-linux-arm64-musl': 22.1.3 + '@nx/nx-linux-x64-gnu': 22.1.3 + '@nx/nx-linux-x64-musl': 22.1.3 + '@nx/nx-win32-arm64-msvc': 22.1.3 + '@nx/nx-win32-x64-msvc': 22.1.3 transitivePeerDependencies: - debug @@ -17099,17 +16810,6 @@ snapshots: object-values@1.0.0: {} - object.defaults@1.1.0: - dependencies: - array-each: 1.0.1 - array-slice: 1.1.0 - for-own: 1.0.0 - isobject: 3.0.1 - - object.pick@1.3.0: - dependencies: - isobject: 3.0.1 - obuf@1.1.2: {} on-finished@2.3.0: @@ -17140,15 +16840,6 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 - optionator@0.9.4: - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.5 - ora@5.3.0: dependencies: bl: 4.1.0 @@ -17174,15 +16865,15 @@ snapshots: os-tmpdir@1.0.2: {} - p-finally@1.0.0: {} + outdent@0.5.0: {} - p-limit@2.3.0: + p-filter@2.1.0: dependencies: - p-try: 2.2.0 + p-map: 2.1.0 - p-limit@3.1.0: + p-limit@2.3.0: dependencies: - yocto-queue: 0.1.0 + p-try: 2.2.0 p-limit@4.0.0: dependencies: @@ -17196,14 +16887,12 @@ snapshots: dependencies: p-limit: 2.3.0 - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - p-locate@6.0.0: dependencies: p-limit: 4.0.0 + p-map@2.1.0: {} + p-map@4.0.0: dependencies: aggregate-error: 3.1.0 @@ -17217,6 +16906,10 @@ snapshots: package-json-from-dist@1.0.0: {} + package-manager-detector@0.2.11: + dependencies: + quansync: 0.2.11 + pacote@17.0.6: dependencies: '@npmcli/git': 5.0.7 @@ -17245,12 +16938,6 @@ snapshots: dependencies: callsites: 3.1.0 - parse-filepath@1.0.2: - dependencies: - is-absolute: 1.0.0 - map-cache: 0.2.2 - path-root: 0.1.1 - parse-json@5.2.0: dependencies: '@babel/code-frame': 7.24.7 @@ -17262,14 +16949,21 @@ snapshots: parse-node-version@1.0.1: {} - parse-passwd@1.0.0: {} - parse5-html-rewriting-stream@7.0.0: dependencies: entities: 4.5.0 parse5: 7.1.2 parse5-sax-parser: 7.0.0 + parse5-htmlparser2-tree-adapter@7.1.0: + dependencies: + domhandler: 5.0.3 + parse5: 7.3.0 + + parse5-parser-stream@7.1.2: + dependencies: + parse5: 7.3.0 + parse5-sax-parser@7.0.0: dependencies: parse5: 7.1.2 @@ -17278,6 +16972,10 @@ snapshots: dependencies: entities: 4.5.0 + parse5@7.3.0: + dependencies: + entities: 6.0.1 + parseurl@1.3.3: {} path-browserify@1.0.1: {} @@ -17290,20 +16988,12 @@ snapshots: path-is-inside@1.0.2: {} - path-key@2.0.1: {} - path-key@3.1.1: {} path-key@4.0.0: {} path-parse@1.0.7: {} - path-root-regex@0.1.2: {} - - path-root@0.1.1: - dependencies: - path-root-regex: 0.1.2 - path-scurry@1.11.1: dependencies: lru-cache: 10.3.0 @@ -17323,7 +17013,7 @@ snapshots: periscopic@3.1.0: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 3.0.3 is-reference: 3.0.2 @@ -17337,8 +17027,9 @@ snapshots: picomatch@4.0.2: {} - pify@4.0.1: - optional: true + picomatch@4.0.3: {} + + pify@4.0.1: {} piscina@4.4.0: optionalDependencies: @@ -17369,43 +17060,32 @@ snapshots: postcss: 8.4.35 semver: 7.6.3 optionalDependencies: - webpack: 5.90.3(esbuild@0.21.5) - transitivePeerDependencies: - - typescript - - postcss-loader@8.1.1(postcss@8.4.35)(typescript@5.6.2)(webpack@5.90.3(esbuild@0.21.5)): - dependencies: - cosmiconfig: 9.0.0(typescript@5.6.2) - jiti: 1.21.6 - postcss: 8.4.35 - semver: 7.6.3 - optionalDependencies: - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) transitivePeerDependencies: - typescript postcss-media-query-parser@0.2.3: {} - postcss-modules-extract-imports@3.1.0(postcss@8.4.39): + postcss-modules-extract-imports@3.1.0(postcss@8.4.49): dependencies: - postcss: 8.4.39 + postcss: 8.4.49 - postcss-modules-local-by-default@4.0.5(postcss@8.4.39): + postcss-modules-local-by-default@4.0.5(postcss@8.4.49): dependencies: - icss-utils: 5.1.0(postcss@8.4.39) - postcss: 8.4.39 + icss-utils: 5.1.0(postcss@8.4.49) + postcss: 8.4.49 postcss-selector-parser: 6.1.0 postcss-value-parser: 4.2.0 - postcss-modules-scope@3.2.0(postcss@8.4.39): + postcss-modules-scope@3.2.0(postcss@8.4.49): dependencies: - postcss: 8.4.39 + postcss: 8.4.49 postcss-selector-parser: 6.1.0 - postcss-modules-values@4.0.0(postcss@8.4.39): + postcss-modules-values@4.0.0(postcss@8.4.49): dependencies: - icss-utils: 5.1.0(postcss@8.4.39) - postcss: 8.4.39 + icss-utils: 5.1.0(postcss@8.4.49) + postcss: 8.4.49 postcss-selector-parser@6.1.0: dependencies: @@ -17417,8 +17097,8 @@ snapshots: postcss@8.4.35: dependencies: nanoid: 3.3.7 - picocolors: 1.0.1 - source-map-js: 1.2.0 + picocolors: 1.1.1 + source-map-js: 1.2.1 postcss@8.4.39: dependencies: @@ -17432,14 +17112,14 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - prelude-ls@1.2.1: {} - - prettier-plugin-svelte@3.2.5(prettier@3.3.2)(svelte@4.2.18): + prettier-plugin-svelte@3.2.5(prettier@3.7.4)(svelte@4.2.18): dependencies: - prettier: 3.3.2 + prettier: 3.7.4 svelte: 4.2.18 - prettier@3.3.2: {} + prettier@2.8.8: {} + + prettier@3.7.4: {} pretty-bytes@6.1.1: {} @@ -17455,6 +17135,12 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.3.1 + pretty-format@30.2.0: + dependencies: + '@jest/schemas': 30.0.5 + ansi-styles: 5.2.0 + react-is: 18.3.1 + pretty-ms@9.0.0: dependencies: parse-ms: 4.0.0 @@ -17494,12 +17180,8 @@ snapshots: prr@1.0.1: optional: true - pseudomap@1.0.2: {} - psl@1.9.0: {} - punycode.js@2.3.1: {} - punycode@1.4.1: {} punycode@2.3.1: {} @@ -17510,6 +17192,8 @@ snapshots: dependencies: side-channel: 1.0.6 + quansync@0.2.11: {} + querystringify@2.2.0: {} queue-microtask@1.2.3: {} @@ -17600,6 +17284,13 @@ snapshots: normalize-package-data: 6.0.2 npm-normalize-package-bin: 3.0.1 + read-yaml-file@1.1.0: + dependencies: + graceful-fs: 4.2.11 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + readable-stream@2.3.8: dependencies: core-util-is: 1.0.3 @@ -17620,10 +17311,6 @@ snapshots: dependencies: picomatch: 2.3.1 - rechoir@0.8.0: - dependencies: - resolve: 1.22.8 - redent@3.0.0: dependencies: indent-string: 4.0.0 @@ -17675,27 +17362,22 @@ snapshots: requires-port@1.0.0: {} - resolve-dir@1.0.1: - dependencies: - expand-tilde: 2.0.2 - global-modules: 1.0.0 - resolve-from@4.0.0: {} resolve-from@5.0.0: {} - resolve-pkg-maps@1.0.0: {} - resolve-url-loader@5.0.0: dependencies: adjust-sourcemap-loader: 4.0.0 convert-source-map: 1.9.0 loader-utils: 2.0.4 - postcss: 8.4.39 + postcss: 8.4.49 source-map: 0.6.1 resolve.exports@2.0.2: {} + resolve.exports@2.0.3: {} + resolve@1.22.8: dependencies: is-core-module: 2.14.0 @@ -17729,12 +17411,6 @@ snapshots: dependencies: glob: 10.4.2 - rollup-plugin-preserve-directives@0.4.0(rollup@4.18.0): - dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.18.0) - magic-string: 0.30.11 - rollup: 4.18.0 - rollup-plugin-size@0.3.1: dependencies: axios: 1.7.2 @@ -17842,24 +17518,24 @@ snapshots: mkdirp: 0.5.6 rimraf: 2.7.1 - sass-loader@14.1.1(sass@1.71.1)(webpack@5.90.3(esbuild@0.21.5)): + sass-loader@14.1.1(sass@1.71.1)(webpack@5.90.3(esbuild@0.20.1)): dependencies: neo-async: 2.6.2 optionalDependencies: sass: 1.71.1 - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) sass@1.71.1: dependencies: chokidar: 3.6.0 immutable: 4.3.6 - source-map-js: 1.2.0 + source-map-js: 1.2.1 sass@1.77.6: dependencies: chokidar: 3.6.0 immutable: 4.3.6 - source-map-js: 1.2.0 + source-map-js: 1.2.1 sax@1.4.1: optional: true @@ -17897,10 +17573,6 @@ snapshots: semver@6.3.1: {} - semver@7.5.4: - dependencies: - lru-cache: 6.0.0 - semver@7.6.0: dependencies: lru-cache: 6.0.0 @@ -18000,53 +17672,50 @@ snapshots: dependencies: kind-of: 6.0.3 - shebang-command@1.2.0: - dependencies: - shebang-regex: 1.0.0 - shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 - shebang-regex@1.0.0: {} - shebang-regex@3.0.0: {} shell-quote-word@1.0.1: {} shell-quote@1.8.1: {} - sherif-darwin-arm64@0.9.0: + sherif-darwin-arm64@1.9.0: optional: true - sherif-darwin-x64@0.9.0: + sherif-darwin-x64@1.9.0: optional: true - sherif-linux-arm64@0.9.0: + sherif-linux-arm64-musl@1.9.0: optional: true - sherif-linux-x64@0.9.0: + sherif-linux-arm64@1.9.0: optional: true - sherif-windows-arm64@0.9.0: + sherif-linux-x64-musl@1.9.0: optional: true - sherif-windows-x64@0.9.0: + sherif-linux-x64@1.9.0: optional: true - sherif@0.9.0: - optionalDependencies: - sherif-darwin-arm64: 0.9.0 - sherif-darwin-x64: 0.9.0 - sherif-linux-arm64: 0.9.0 - sherif-linux-x64: 0.9.0 - sherif-windows-arm64: 0.9.0 - sherif-windows-x64: 0.9.0 + sherif-windows-arm64@1.9.0: + optional: true - shiki@1.12.0: - dependencies: - '@shikijs/core': 1.12.0 - '@types/hast': 3.0.4 + sherif-windows-x64@1.9.0: + optional: true + + sherif@1.9.0: + optionalDependencies: + sherif-darwin-arm64: 1.9.0 + sherif-darwin-x64: 1.9.0 + sherif-linux-arm64: 1.9.0 + sherif-linux-arm64-musl: 1.9.0 + sherif-linux-x64: 1.9.0 + sherif-linux-x64-musl: 1.9.0 + sherif-windows-arm64: 1.9.0 + sherif-windows-x64: 1.9.0 side-channel@1.0.6: dependencies: @@ -18072,14 +17741,6 @@ snapshots: transitivePeerDependencies: - supports-color - simple-git@3.25.0: - dependencies: - '@kwsites/file-exists': 1.1.1 - '@kwsites/promise-deferred': 1.1.1 - debug: 4.3.6 - transitivePeerDependencies: - - supports-color - size-limit@11.1.4: dependencies: bytes-iec: 3.1.1 @@ -18090,6 +17751,8 @@ snapshots: nanospinner: 1.1.0 picocolors: 1.0.1 + slash@3.0.0: {} + slash@4.0.0: {} slash@5.1.0: {} @@ -18193,11 +17856,11 @@ snapshots: source-map-js@1.2.1: {} - source-map-loader@5.0.0(webpack@5.90.3(esbuild@0.21.5)): + source-map-loader@5.0.0(webpack@5.90.3(esbuild@0.20.1)): dependencies: iconv-lite: 0.6.3 - source-map-js: 1.2.0 - webpack: 5.90.3(esbuild@0.21.5) + source-map-js: 1.2.1 + webpack: 5.90.3(esbuild@0.20.1) source-map-support@0.5.21: dependencies: @@ -18210,6 +17873,11 @@ snapshots: source-map@0.7.4: {} + spawndamnit@3.0.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + spdx-correct@3.2.0: dependencies: spdx-expression-parse: 3.0.1 @@ -18245,8 +17913,6 @@ snapshots: transitivePeerDependencies: - supports-color - split2@4.2.0: {} - sprintf-js@1.0.3: {} sprintf-js@1.1.3: {} @@ -18255,8 +17921,6 @@ snapshots: dependencies: minipass: 7.1.2 - stable-hash@0.0.4: {} - stackback@0.0.2: {} statuses@1.5.0: {} @@ -18273,8 +17937,6 @@ snapshots: transitivePeerDependencies: - supports-color - string-argv@0.3.2: {} - string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -18307,8 +17969,6 @@ snapshots: strip-bom@3.0.0: {} - strip-eof@1.0.0: {} - strip-final-newline@2.0.0: {} strip-final-newline@3.0.0: {} @@ -18319,20 +17979,12 @@ snapshots: strip-json-comments@2.0.1: {} - strip-json-comments@3.1.1: {} - strip-json-comments@5.0.1: {} strip-literal@2.1.0: dependencies: js-tokens: 9.0.0 - strong-log-transformer@2.1.0: - dependencies: - duplexer: 0.1.2 - minimist: 1.2.8 - through: 2.3.8 - style-vendorizer@2.2.3: {} stylis@4.2.0: {} @@ -18436,16 +18088,18 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 - terser-webpack-plugin@5.3.10(esbuild@0.21.5)(webpack@5.90.3(esbuild@0.20.1)): + term-size@2.2.1: {} + + terser-webpack-plugin@5.3.10(esbuild@0.20.1)(webpack@5.90.3(esbuild@0.20.1)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.1 - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) optionalDependencies: - esbuild: 0.21.5 + esbuild: 0.20.1 terser@5.29.1: dependencies: @@ -18467,12 +18121,6 @@ snapshots: glob: 7.2.3 minimatch: 3.1.2 - text-extensions@2.4.0: {} - - text-table@0.2.0: {} - - through@2.3.8: {} - thunky@1.1.0: {} tiny-invariant@1.3.3: {} @@ -18481,6 +18129,11 @@ snapshots: tinybench@2.8.0: {} + tinyglobby@0.2.15: + dependencies: + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + tinypool@0.8.4: {} tinyspy@2.2.1: {} @@ -18516,25 +18169,19 @@ snapshots: universalify: 0.2.0 url-parse: 1.5.10 + tr46@0.0.3: {} + tr46@5.0.0: dependencies: punycode: 2.3.1 tree-kill@1.2.2: {} - ts-api-utils@1.3.0(typescript@5.4.5): - dependencies: - typescript: 5.4.5 - ts-morph@21.0.1: dependencies: '@ts-morph/common': 0.22.0 code-block-writer: 12.0.0 - tsconfck@3.1.1(typescript@5.4.5): - optionalDependencies: - typescript: 5.4.5 - tsconfig-paths@4.2.0: dependencies: json5: 2.2.3 @@ -18553,14 +18200,8 @@ snapshots: transitivePeerDependencies: - supports-color - type-check@0.4.0: - dependencies: - prelude-ls: 1.2.1 - type-detect@4.0.8: {} - type-fest@0.20.2: {} - type-fest@0.21.3: {} type-fest@2.19.0: {} @@ -18572,49 +18213,12 @@ snapshots: typed-assert@1.0.9: {} - typedoc-plugin-frontmatter@1.0.0(typedoc-plugin-markdown@4.2.6(typedoc@0.26.6(typescript@5.4.5))): - dependencies: - typedoc-plugin-markdown: 4.2.6(typedoc@0.26.6(typescript@5.4.5)) - yaml: 2.5.0 - - typedoc-plugin-markdown@4.2.6(typedoc@0.26.6(typescript@5.4.5)): - dependencies: - typedoc: 0.26.6(typescript@5.4.5) - - typedoc@0.26.6(typescript@5.4.5): - dependencies: - lunr: 2.3.9 - markdown-it: 14.1.0 - minimatch: 9.0.5 - shiki: 1.12.0 - typescript: 5.4.5 - yaml: 2.5.0 - - typescript-eslint@8.3.0(eslint@8.57.0)(typescript@5.4.5): - dependencies: - '@typescript-eslint/eslint-plugin': 8.3.0(@typescript-eslint/parser@8.3.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 8.3.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.4.5) - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - eslint - - supports-color - - typescript@5.4.2: {} - typescript@5.4.5: {} - typescript@5.6.2: {} - ua-parser-js@0.7.38: {} - uc.micro@2.1.0: {} - ufo@1.5.3: {} - unc-path-regex@0.1.2: {} - uncontrollable@7.2.1(react@18.3.1): dependencies: '@babel/runtime': 7.24.7 @@ -18631,6 +18235,8 @@ snapshots: undici@6.11.1: {} + undici@7.16.0: {} + unescape-js@1.1.4: dependencies: string.fromcodepoint: 0.2.1 @@ -18656,6 +18262,10 @@ snapshots: dependencies: imurmurhash: 0.1.4 + unist-util-stringify-position@4.0.0: + dependencies: + '@types/unist': 3.0.2 + universalify@0.1.2: {} universalify@0.2.0: {} @@ -18675,7 +18285,7 @@ snapshots: dependencies: browserslist: 4.23.1 escalade: 3.1.2 - picocolors: 1.0.1 + picocolors: 1.1.1 update-check@1.5.4: dependencies: @@ -18701,8 +18311,6 @@ snapshots: uuid@8.3.2: {} - v8flags@4.0.1: {} - validate-html-nesting@1.2.2: {} validate-npm-package-license@3.0.4: @@ -18714,6 +18322,16 @@ snapshots: vary@1.1.2: {} + vfile-message@4.0.2: + dependencies: + '@types/unist': 3.0.2 + unist-util-stringify-position: 4.0.0 + + vfile@6.0.3: + dependencies: + '@types/unist': 3.0.2 + vfile-message: 4.0.2 + vite-node@1.6.0(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1): dependencies: cac: 6.7.14 @@ -18732,30 +18350,6 @@ snapshots: - supports-color - terser - vite-plugin-dts@4.0.3(@types/node@20.14.9)(rollup@4.18.0)(typescript@5.4.5)(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)): - dependencies: - '@microsoft/api-extractor': 7.47.4(@types/node@20.14.9) - '@rollup/pluginutils': 5.1.0(rollup@4.18.0) - '@volar/typescript': 2.4.11 - '@vue/language-core': 2.0.29(typescript@5.4.5) - compare-versions: 6.1.1 - debug: 4.3.6 - kolorist: 1.8.0 - local-pkg: 0.5.0 - magic-string: 0.30.11 - typescript: 5.4.5 - vue-tsc: 2.0.29(typescript@5.4.5) - optionalDependencies: - vite: 5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - transitivePeerDependencies: - - '@types/node' - - rollup - - supports-color - - vite-plugin-externalize-deps@0.8.0(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)): - dependencies: - vite: 5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - vite-plugin-solid@2.10.2(@testing-library/jest-dom@6.4.6(vitest@1.6.0(@types/node@20.14.9)(jsdom@24.1.0)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)))(solid-js@1.8.18)(vite@5.3.2(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)): dependencies: '@babel/core': 7.24.7 @@ -18771,22 +18365,11 @@ snapshots: transitivePeerDependencies: - supports-color - vite-tsconfig-paths@5.0.1(typescript@5.4.5)(vite@5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1)): - dependencies: - debug: 4.3.6 - globrex: 0.1.2 - tsconfck: 3.1.1(typescript@5.4.5) - optionalDependencies: - vite: 5.4.11(@types/node@20.14.9)(less@4.2.0)(sass@1.77.6)(terser@5.31.1) - transitivePeerDependencies: - - supports-color - - typescript - vite@5.1.7(@types/node@20.14.9)(less@4.2.0)(sass@1.71.1)(terser@5.29.1): dependencies: esbuild: 0.19.12 - postcss: 8.4.39 - rollup: 4.18.0 + postcss: 8.4.49 + rollup: 4.29.1 optionalDependencies: '@types/node': 20.14.9 fsevents: 2.3.3 @@ -18886,16 +18469,6 @@ snapshots: optionalDependencies: typescript: 5.4.5 - vue@3.4.31(typescript@5.6.2): - dependencies: - '@vue/compiler-dom': 3.4.31 - '@vue/compiler-sfc': 3.4.31 - '@vue/runtime-dom': 3.4.31 - '@vue/server-renderer': 3.4.31(vue@3.4.31(typescript@5.6.2)) - '@vue/shared': 3.4.31 - optionalDependencies: - typescript: 5.6.2 - vue@3.5.13(typescript@5.4.5): dependencies: '@vue/compiler-dom': 3.5.13 @@ -18927,18 +18500,20 @@ snapshots: dependencies: defaults: 1.0.4 + webidl-conversions@3.0.1: {} + webidl-conversions@7.0.0: {} - webpack-dev-middleware@5.3.4(webpack@5.90.3(esbuild@0.21.5)): + webpack-dev-middleware@5.3.4(webpack@5.90.3(esbuild@0.20.1)): dependencies: colorette: 2.0.20 memfs: 3.5.3 mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) - webpack-dev-middleware@6.1.2(webpack@5.90.3(esbuild@0.21.5)): + webpack-dev-middleware@6.1.2(webpack@5.90.3(esbuild@0.20.1)): dependencies: colorette: 2.0.20 memfs: 3.5.3 @@ -18946,9 +18521,9 @@ snapshots: range-parser: 1.2.1 schema-utils: 4.2.0 optionalDependencies: - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) - webpack-dev-server@4.15.1(webpack@5.90.3(esbuild@0.21.5)): + webpack-dev-server@4.15.1(webpack@5.90.3(esbuild@0.20.1)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -18978,10 +18553,10 @@ snapshots: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack-dev-middleware: 5.3.4(webpack@5.90.3(esbuild@0.21.5)) + webpack-dev-middleware: 5.3.4(webpack@5.90.3(esbuild@0.20.1)) ws: 8.17.1 optionalDependencies: - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) transitivePeerDependencies: - bufferutil - debug @@ -18996,17 +18571,17 @@ snapshots: webpack-sources@3.2.3: {} - webpack-subresource-integrity@5.1.0(webpack@5.90.3(esbuild@0.21.5)): + webpack-subresource-integrity@5.1.0(webpack@5.90.3(esbuild@0.20.1)): dependencies: typed-assert: 1.0.9 - webpack: 5.90.3(esbuild@0.21.5) + webpack: 5.90.3(esbuild@0.20.1) webpack-virtual-modules@0.6.2: {} - webpack@5.90.3(esbuild@0.21.5): + webpack@5.90.3(esbuild@0.20.1): dependencies: '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@webassemblyjs/ast': 1.12.1 '@webassemblyjs/wasm-edit': 1.12.1 '@webassemblyjs/wasm-parser': 1.12.1 @@ -19026,7 +18601,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(esbuild@0.21.5)(webpack@5.90.3(esbuild@0.20.1)) + terser-webpack-plugin: 5.3.10(esbuild@0.20.1)(webpack@5.90.3(esbuild@0.20.1)) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -19053,6 +18628,11 @@ snapshots: tr46: 5.0.0 webidl-conversions: 7.0.0 + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + which@1.3.1: dependencies: isexe: 2.0.0 @@ -19076,8 +18656,6 @@ snapshots: wildcard@2.0.1: {} - word-wrap@1.2.5: {} - wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0 @@ -19106,15 +18684,13 @@ snapshots: y18n@5.0.8: {} - yallist@2.1.2: {} - yallist@3.1.1: {} yallist@4.0.0: {} yaml@1.10.2: {} - yaml@2.5.0: {} + yaml@2.8.2: {} yargs-parser@20.2.9: {} @@ -19140,8 +18716,6 @@ snapshots: y18n: 5.0.8 yargs-parser: 21.1.1 - yocto-queue@0.1.0: {} - yocto-queue@1.1.1: {} zlib@1.0.5: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 510148d15c..4b166ed474 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,7 @@ +cleanupUnusedCatalogs: true +linkWorkspacePackages: true +preferWorkspacePackages: true + packages: - 'packages/*' - 'examples/angular/*' diff --git a/prettier.config.cjs b/prettier.config.cjs deleted file mode 100644 index 383f5b5e35..0000000000 --- a/prettier.config.cjs +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - printWidth: 80, - tabWidth: 2, - useTabs: false, - semi: false, - singleQuote: true, - trailingComma: 'es5', - bracketSpacing: true, - arrowParens: 'avoid', - endOfLine: 'auto', - plugins: ['prettier-plugin-svelte'], - overrides: [{ files: '*.svelte', options: { parser: 'svelte' } }], -} diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000000..dbb08b1110 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,12 @@ +// @ts-check + +/** @type {import('prettier').Config} */ +const config = { + semi: false, + singleQuote: true, + trailingComma: 'all', + plugins: ['prettier-plugin-svelte'], + overrides: [{ files: '*.svelte', options: { parser: 'svelte' } }], +} + +export default config diff --git a/scripts/config.js b/scripts/config.js deleted file mode 100644 index 8d41706057..0000000000 --- a/scripts/config.js +++ /dev/null @@ -1,73 +0,0 @@ -// @ts-check - -import { resolve } from 'node:path' -import { fileURLToPath } from 'node:url' - -/** - * List your npm packages here. The first package will be used as the versioner. - * @type {import('./types').Package[]} - */ -export const packages = [ - { - name: '@tanstack/table-core', - packageDir: 'packages/table-core', - }, - { - name: '@tanstack/angular-table', - packageDir: 'packages/angular-table', - }, - { - name: '@tanstack/lit-table', - packageDir: 'packages/lit-table', - }, - { - name: '@tanstack/qwik-table', - packageDir: 'packages/qwik-table', - }, - { - name: '@tanstack/react-table', - packageDir: 'packages/react-table', - }, - { - name: '@tanstack/solid-table', - packageDir: 'packages/solid-table', - }, - { - name: '@tanstack/svelte-table', - packageDir: 'packages/svelte-table', - }, - { - name: '@tanstack/vue-table', - packageDir: 'packages/vue-table', - }, - { - name: '@tanstack/react-table-devtools', - packageDir: 'packages/react-table-devtools', - }, - { - name: '@tanstack/match-sorter-utils', - packageDir: 'packages/match-sorter-utils', - }, -] - -/** - * Contains config for publishable branches. - * @type {Record} - */ -export const branchConfigs = { - main: { - prerelease: false, - }, - alpha: { - prerelease: true, - }, - beta: { - prerelease: true, - }, - rc: { - prerelease: true, - }, -} - -const __dirname = fileURLToPath(new URL('.', import.meta.url)) -export const rootDir = resolve(__dirname, '..') diff --git a/scripts/getRollupConfig.js b/scripts/getRollupConfig.js index 1dabe33dc6..42b63767d0 100644 --- a/scripts/getRollupConfig.js +++ b/scripts/getRollupConfig.js @@ -1,6 +1,7 @@ // @ts-check import { resolve } from 'node:path' +import { fileURLToPath } from 'node:url' import { babel } from '@rollup/plugin-babel' import commonJS from '@rollup/plugin-commonjs' import { visualizer } from 'rollup-plugin-visualizer' @@ -10,10 +11,12 @@ import size from 'rollup-plugin-size' import replace from '@rollup/plugin-replace' import { nodeResolve } from '@rollup/plugin-node-resolve' import svelte from 'rollup-plugin-svelte' -import { rootDir } from './config.js' + +const __dirname = fileURLToPath(new URL('.', import.meta.url)) +const rootDir = resolve(__dirname, '..') /** @param {'development' | 'production'} type */ -const forceEnvPlugin = type => +const forceEnvPlugin = (type) => replace({ 'process.env.NODE_ENV': `"${type}"`, delimiters: ['', ''], @@ -41,7 +44,7 @@ export function buildConfigs(opts) { const input = resolve(opts.entryFile) /** @param {string} moduleName */ - const external = moduleName => opts.external.includes(moduleName) + const external = (moduleName) => opts.external.includes(moduleName) const umdExternal = Object.keys(opts.globals) const banner = createBanner(opts.name) diff --git a/scripts/publish.js b/scripts/publish.js deleted file mode 100644 index ba818b5058..0000000000 --- a/scripts/publish.js +++ /dev/null @@ -1,15 +0,0 @@ -// @ts-check - -import { publish } from '@tanstack/config/publish' -import { branchConfigs, packages, rootDir } from './config.js' - -await publish({ - branchConfigs, - packages, - rootDir, - branch: process.env.BRANCH, - tag: process.env.TAG, - ghToken: process.env.GH_TOKEN, -}) - -process.exit(0) diff --git a/scripts/types.d.ts b/scripts/types.d.ts deleted file mode 100644 index ac48f9b8ca..0000000000 --- a/scripts/types.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type Package = { - name: string - packageDir: string -} - -export type BranchConfig = { - prerelease: boolean - previousVersion?: boolean -} diff --git a/scripts/verify-links.ts b/scripts/verify-links.ts new file mode 100644 index 0000000000..8a1c40ddc5 --- /dev/null +++ b/scripts/verify-links.ts @@ -0,0 +1,125 @@ +import { existsSync, readFileSync, statSync } from 'node:fs' +import { extname, resolve } from 'node:path' +import { glob } from 'tinyglobby' +// @ts-ignore Could not find a declaration file for module 'markdown-link-extractor'. +import markdownLinkExtractor from 'markdown-link-extractor' + +const errors: Array<{ + file: string + link: string + resolvedPath: string + reason: string +}> = [] + +function isRelativeLink(link: string) { + return ( + !link.startsWith('/') && + !link.startsWith('http://') && + !link.startsWith('https://') && + !link.startsWith('//') && + !link.startsWith('#') && + !link.startsWith('mailto:') + ) +} + +/** Remove any trailing .md */ +function stripExtension(p: string): string { + return p.replace(`${extname(p)}`, '') +} + +function relativeLinkExists(link: string, file: string): boolean { + // Remove hash if present + const linkWithoutHash = link.split('#')[0] + // If the link is empty after removing hash, it's not a file + if (!linkWithoutHash) return false + + // Strip the file/link extensions + const filePath = stripExtension(file) + const linkPath = stripExtension(linkWithoutHash) + + // Resolve the path relative to the markdown file's directory + // Nav up a level to simulate how links are resolved on the web + let absPath = resolve(filePath, '..', linkPath) + + // Ensure the resolved path is within /docs + const docsRoot = resolve('docs') + if (!absPath.startsWith(docsRoot)) { + errors.push({ + link, + file, + resolvedPath: absPath, + reason: 'Path outside /docs', + }) + return false + } + + // Check if this is an example path + const isExample = absPath.includes('/examples/') + + let exists = false + + if (isExample) { + // Transform /docs/framework/{framework}/examples/ to /examples/{framework}/ + absPath = absPath.replace( + /\/docs\/framework\/([^/]+)\/examples\//, + '/examples/$1/', + ) + // For examples, we want to check if the directory exists + exists = existsSync(absPath) && statSync(absPath).isDirectory() + } else { + // For non-examples, we want to check if the .md file exists + if (!absPath.endsWith('.md')) { + absPath = `${absPath}.md` + } + exists = existsSync(absPath) + } + + if (!exists) { + errors.push({ + link, + file, + resolvedPath: absPath, + reason: 'Not found', + }) + } + return exists +} + +async function verifyMarkdownLinks() { + // Find all markdown files in docs directory + const markdownFiles = await glob('docs/**/*.md', { + ignore: ['**/node_modules/**'], + }) + + console.log(`Found ${markdownFiles.length} markdown files\n`) + + // Process each file + for (const file of markdownFiles) { + const content = readFileSync(file, 'utf-8') + const links: Array = markdownLinkExtractor(content) + + const relativeLinks = links.filter((link: string) => { + return isRelativeLink(link) + }) + + if (relativeLinks.length > 0) { + relativeLinks.forEach((link) => { + relativeLinkExists(link, file) + }) + } + } + + if (errors.length > 0) { + console.log(`\n❌ Found ${errors.length} broken links:`) + errors.forEach((err) => { + console.log( + `${err.file}\n link: ${err.link}\n resolved: ${err.resolvedPath}\n why: ${err.reason}\n`, + ) + }) + process.exit(1) + } else { + console.log('\n✅ No broken links found!') + } +} + +verifyMarkdownLinks().catch(console.error) diff --git a/tsconfig.json b/tsconfig.json index b03740bbf0..6d78f08a75 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "forceConsistentCasingInFileNames": true, "isolatedModules": true, "lib": ["DOM", "DOM.Iterable", "ES2022"], - "module": "ES2022", + "module": "ESNext", "moduleResolution": "Bundler", "noImplicitReturns": false, // TODO enable "noUncheckedIndexedAccess": true, @@ -22,5 +22,5 @@ "strict": true, "target": "ES2020" }, - "include": ["prettier.config.cjs", "scripts"] + "include": ["*.config.*", "scripts"] }