Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tychenjiajun authored Oct 18, 2024
2 parents 86a854c + 6b4d616 commit 0e7ca5d
Show file tree
Hide file tree
Showing 590 changed files with 41,810 additions and 8,757 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: autofix.ci # needed to securely identify the workflow

on:
pull_request:
push:
branches: [main, alpha, beta, rc]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
autofix:
name: autofix
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Fix formatting
run: pnpm prettier:write
- name: Apply fixes
uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
with:
commit-message: 'ci: apply automated fixes'
25 changes: 9 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
description: override release tag
required: false
push:
branches: ['main', 'alpha', 'beta', 'rc']
branches: [main, alpha, beta, rc]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
Expand All @@ -16,6 +16,10 @@ concurrency:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

permissions:
contents: write
id-token: write

jobs:
test-and-publish:
name: Test & Publish
Expand All @@ -25,20 +29,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
fetch-depth: 0
- name: Start Nx Agents
run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Run Tests
run: pnpm run test:ci --parallel=3
- name: Stop Nx Agents
Expand All @@ -51,8 +46,6 @@ jobs:
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm run cipublish
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ inputs.tag }}
34 changes: 21 additions & 13 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ concurrency:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

permissions:
contents: read

jobs:
test:
name: Test
Expand All @@ -23,25 +26,30 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- name: Start Nx Agents
run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Get base and head commits for `nx affected`
uses: nrwl/nx-set-shas@v3
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: 'main'
main-branch-name: main
- name: Run Checks
run: pnpm run test:pr --parallel=3
- name: Stop Nx Agents
if: ${{ always() }}
run: npx nx-cloud stop-all-agents
preview:
name: Preview
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Build Packages
run: pnpm run build:all
- name: Publish Previews
run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ coverage
.env.test.local
.env.production.local
.next
.svelte-kit

npm-debug.log*
yarn-debug.log*
Expand All @@ -35,10 +36,12 @@ stats-hydration.json
stats-react.json
stats.html
.vscode/settings.json
.idea

*.log
.DS_Store
.cache
.idea
.pnpm-store

package-lock.json
Expand All @@ -47,5 +50,8 @@ yarn.lock
*.tsbuildinfo

.nx/cache
.nx/workspace-data
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

.angular
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
link-workspace-packages=true
prefer-workspace-packages=true
provenance=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.19.0
20.15.1
6 changes: 3 additions & 3 deletions .nx/workflows/dynamic-changesets.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distribute-on:
small-changeset: 8 linux-medium-js
medium-changeset: 10 linux-medium-js
large-changeset: 12 linux-medium-js
small-changeset: 3 linux-medium-js
medium-changeset: 6 linux-medium-js
large-changeset: 10 linux-medium-js
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
**/docs
**/old-examples
pnpm-lock.yaml

.angular
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# [TanStack](https://tanstack.com) Table v8

Headless UI for building **powerful tables & datagrids** for **React, Solid, Vue, Svelte and TS/JS**.
Headless UI for building **powerful tables & datagrids** for **React, Solid, Vue, Svelte, Qwik and TS/JS**.

<a href="https://twitter.com/intent/tweet?button_hashtag=TanStack" target="\_parent">
<img alt="#TanStack" src="https://img.shields.io/twitter/url?color=%2308a0e9&label=%23TanStack&style=social&url=https%3A%2F%2Ftwitter.com%2Fintent%2Ftweet%3Fbutton_hashtag%3DTanStack" />
Expand Down Expand Up @@ -46,10 +46,13 @@ Try other [TanStack](https://tanstack.com) libraries:

You may know **TanStack Table** by our adapter names, too!

- [React Table](https://tanstack.com/table/v8/docs/adapters/react-table)
- [Solid Table](https://tanstack.com/table/v8/docs/adapters/solid-table)
- [Svelte Table](https://tanstack.com/table/v8/docs/adapters/svelte-table)
- [Vue Table](https://tanstack.com/table/v8/docs/adapters/vue-table)
- [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

Expand Down Expand Up @@ -114,10 +117,14 @@ 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/vue-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?
Expand Down
2 changes: 1 addition & 1 deletion docs/api/core/cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

## Cell API

Expand Down
2 changes: 1 addition & 1 deletion docs/api/core/column-def.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ meta?: ColumnMeta // This interface is extensible via declaration merging. See b
The meta data to be associated with the column. We can access it anywhere when the column is available via `column.columnDef.meta`. This type is global to all tables and can be extended like so:

```tsx
import '@tanstack/react-table' //or vue, svelte, solid, etc.
import '@tanstack/react-table' //or vue, svelte, solid, qwik, etc.
declare module '@tanstack/react-table' {
interface ColumnMeta<TData extends RowData, TValue> {
Expand Down
2 changes: 1 addition & 1 deletion docs/api/core/column.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

## Column API

Expand Down
4 changes: 2 additions & 2 deletions docs/api/core/header-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

## Header Group API

Expand Down Expand Up @@ -30,4 +30,4 @@ The depth of the header group, zero-indexed based.
type headers = Header<TData>[]
```
An array of [Header](./header) objects that belong to this header group
An array of [Header](../header) objects that belong to this header group
6 changes: 3 additions & 3 deletions docs/api/core/header.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

## Header API

Expand Down Expand Up @@ -38,15 +38,15 @@ The depth of the header, zero-indexed based.
column: Column<TData>
```

The header's associated [Column](./column) object
The header's associated [Column](../column) object

### `headerGroup`

```tsx
headerGroup: HeaderGroup<TData>
```

The header's associated [HeaderGroup](./header-group) object
The header's associated [HeaderGroup](../header-group) object

### `subHeaders`

Expand Down
4 changes: 2 additions & 2 deletions docs/api/core/row.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

## Row API

Expand Down Expand Up @@ -120,4 +120,4 @@ An array of the original subRows as returned by the `options.getSubRows` option.
type getAllCells = () => Cell<TData>[]
```
Returns all of the [Cells](./cell) for the row.
Returns all of the [Cells](../cell) for the row.
14 changes: 11 additions & 3 deletions docs/api/core/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Table APIs
---

## `useReactTable` / `createSolidTable` / `useVueTable` / `createSvelteTable`
## `createAngularTable` / `useReactTable` / `createSolidTable` / `useQwikTable` / `useVueTable` / `createSvelteTable`

```tsx
type useReactTable = <TData extends AnyData>(
Expand All @@ -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).
### `data`
Expand Down Expand Up @@ -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 example](../../../framework/react/examples/editable-data).
### `state`

Expand Down Expand Up @@ -168,6 +168,14 @@ debugRows?: boolean

Set this option to true to output row debugging information to the console.

### `_features`

```tsx
_features?: TableFeature[]
```

An array of extra features that you can add to the table instance.

### `render`

> ⚠️ This option is only necessary if you are implementing a table adapter.
Expand Down
Loading

0 comments on commit 0e7ca5d

Please sign in to comment.