Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mui/mui-toolpad into docs/example…
Browse files Browse the repository at this point in the history
…-instructions
  • Loading branch information
bharatkashyap committed Feb 11, 2025
2 parents ab9ad85 + 3967dce commit ed53cdd
Show file tree
Hide file tree
Showing 43 changed files with 736 additions and 741 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ commands:
default: false
description: 'Set to true if you intend to use any browser (for example with playwright).'
steps:
- run:
name: Set npm registry public signing keys
command: |
echo "export COREPACK_INTEGRITY_KEYS='$(curl https://registry.npmjs.org/-/npm/v1/keys | jq -c '{npm: .keys}')'" >> $BASH_ENV
- when:
condition: << parameters.browsers >>
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
with:
languages: typescript
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -29,4 +29,4 @@ jobs:
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion docs/data/toolpad/core/integrations/react-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ import DashboardIcon from '@mui/icons-material/Dashboard';
import ShoppingCartIcon from '@mui/icons-material/ShoppingCart';
import { ReactRouterAppProvider } from '@toolpad/core/react-router';
import { Outlet, useNavigate } from 'react-router';
import type { Navigation, Session } from '@toolpad/core';
import type { Navigation } from '@toolpad/core';
import {
firebaseSignOut,
signInWithGoogle,
Expand Down
20 changes: 0 additions & 20 deletions docs/data/toolpad/core/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ const pages: MuiPage[] = [
pathname: '/toolpad/core/react-page-container',
title: 'Page Container',
},
{
pathname: '/toolpad/core/react-notification-center',
title: 'Notification Center',
planned: true,
},
],
},
{
Expand All @@ -103,16 +98,6 @@ const pages: MuiPage[] = [
pathname: '/toolpad/core/react-account',
title: 'Account',
},
{
pathname: '/toolpad/core/react-sign-up-page',
title: 'Sign-up Page',
planned: true,
},
{
pathname: '/toolpad/core/react-rbac',
title: 'RBAC',
planned: true,
},
],
},
{
Expand All @@ -124,11 +109,6 @@ const pages: MuiPage[] = [
title: 'CRUD',
planned: true,
},
{
pathname: '/toolpad/core/react-stat-card',
title: 'Stats Card',
planned: true,
},
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/studio/concepts/custom-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ app.use('/my-app', handler);
app.listen(3001);
```

To run the custom server you'll have to update the scripts in your your package.json
To run the custom server you'll have to update the scripts in your package.json

```json
{
Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/studio/concepts/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

## Install step

Install required depdencies via:
Install required dependencies via:

<codeblock storageKey="package-manager">

Expand Down
4 changes: 2 additions & 2 deletions docs/data/toolpad/studio/concepts/page-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### Options

The possible options for the the display mode are:
The possible options for the display mode are:

- **App shell**: Pages with their display mode set to this value will render within the navigation sidebar on the left, allowing for easy navigation between all pages.

Expand Down Expand Up @@ -52,7 +52,7 @@ Page parameters allow you to pass external data into the Toolpad Studio page sta

### Setting parameters

You can set page parameters from the Page tab in the **Inspector panel** on right. You can add multiple parameters along with a default value for each.
You can set page parameters from the Page tab in the **Inspector panel** on the right. You can add multiple parameters along with a default value for each.

### Using parameters

Expand Down
4 changes: 2 additions & 2 deletions docs/data/toolpad/studio/concepts/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Queries allow you to bring backend data to your Toolpad Studio page. They are ca

You can use this option to enable or disable the query from running

Queries may be programatically re-fetched via the `refetch` function available on these query objects. For example, for a query named `getOrders`, you can add
Queries may be programmatically re-fetched via the `refetch` function available on these query objects. For example, for a query named `getOrders`, you can add

```js
getOrders.refetch();
Expand All @@ -34,7 +34,7 @@ in the `onClick` binding of a Button component.

## Actions

Actions allow performing updates to remote data sources (edit, update, delete) on a user interaction. Actions are not automatically called, they must be programtically called a JavaScript expression in a binding. For example, for a query named `createCustomer`, we can add
Actions allow performing updates to remote data sources (edit, update, delete) on a user interaction. Actions are not automatically called, they must be programmatically called a JavaScript expression in a binding. For example, for a query named `createCustomer`, we can add

```js
createCustomer.call();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p class="description">Toolpad Studio allows you to connect to any database, fast.</p>

You can write a custom function to connect to any database that you need to.
You can focus on writing database queries, while the data fetching and displaying is handled by Toolpad Studio.
You can focus on writing database queries, while the data fetching and displaying are handled by Toolpad Studio.

## Connecting to MySQL

Expand Down
20 changes: 10 additions & 10 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@babel/plugin-transform-object-assign": "7.25.9",
"@babel/runtime-corejs2": "7.26.0",
"@date-io/date-fns-jalali": "3.1.1",
"@docsearch/react": "3.8.2",
"@docsearch/react": "3.8.3",
"@emotion/cache": "11.14.0",
"@emotion/react": "11.14.0",
"@emotion/server": "11.11.0",
Expand All @@ -35,13 +35,13 @@
"@mui/styles": "6.3.1",
"@mui/system": "6.3.1",
"@mui/utils": "6.3.1",
"@mui/x-date-pickers": "7.23.6",
"@mui/x-date-pickers-pro": "7.23.6",
"@mui/x-license": "7.23.6",
"@mui/x-date-pickers": "7.25.0",
"@mui/x-date-pickers-pro": "7.25.0",
"@mui/x-license": "7.25.0",
"@toolpad/core": "workspace:*",
"@toolpad/studio": "workspace:*",
"@trendmicro/react-interpolate": "0.5.5",
"@types/lodash": "4.17.14",
"@types/lodash": "4.17.15",
"ast-types": "0.14.2",
"autoprefixer": "10.4.20",
"babel-plugin-module-resolver": "5.0.2",
Expand All @@ -66,7 +66,7 @@
"lodash": "4.17.21",
"lz-string": "1.5.0",
"markdown-to-jsx": "7.7.3",
"next": "^15.1.5",
"next": "^15.1.6",
"nprogress": "0.2.0",
"postcss": "8.4.49",
"prismjs": "1.29.0",
Expand All @@ -76,15 +76,15 @@
"react-dom": "^19.0.0",
"react-hook-form": "7.53.2",
"react-is": "^19.0.0",
"react-router": "7.1.0",
"react-router": "7.1.5",
"react-runner": "1.0.5",
"react-simple-code-editor": "0.14.1",
"react-simple-typewriter": "5.0.1",
"react-transition-group": "4.4.5",
"recast": "0.23.9",
"rimraf": "6.0.1",
"styled-components": "6.1.13",
"stylis": "4.3.4",
"styled-components": "6.1.14",
"stylis": "4.3.5",
"stylis-plugin-rtl": "npm:stylis-plugin-rtl@^2.1.1",
"stylis-plugin-rtl-sc": "npm:stylis-plugin-rtl@^2.1.1",
"webpack-bundle-analyzer": "4.10.2",
Expand All @@ -97,7 +97,7 @@
"@types/babel__core": "^7.20.5",
"@types/doctrine": "0.0.9",
"@types/json-schema": "7.0.15",
"@types/react": "^19.0.0",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@types/react-is": "^19.0.0",
"@types/react-swipeable-views": "^0.13.6",
Expand Down
4 changes: 2 additions & 2 deletions docs/src/modules/components/examples/ExamplesFeatured.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function ExamplesFeatured(props: FeaturedExamplesProps) {
}}
>
<Link
href={versionGitHubLink(example.href)}
href={example.href}
target="_blank"
sx={{
position: 'relative',
Expand Down Expand Up @@ -191,7 +191,7 @@ export default function ExamplesFeatured(props: FeaturedExamplesProps) {

<Button
component="a"
href={versionGitHubLink(example.href)}
href={example.href}
size="small"
variant="outlined"
color="primary"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/examples/ExamplesGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default function ExamplesGrid(props: ExamplesGridProps) {
component="a"
image={computedSrc}
title={example.description}
href={versionGitHubLink(example.href || example.source)}
href={example.href || versionGitHubLink(example.source)}
rel="nofollow"
sx={(theme) => ({
height: 0,
Expand Down
13 changes: 6 additions & 7 deletions docs/src/modules/components/examples/coreExamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const coreExamples = [
'This app shows you to how to get started using Toolpad Core with Auth.js Passkeys and the Next.js App Router.',
src: '/static/toolpad/docs/core/auth-next-passkey.png',
srcDark: '/static/toolpad/docs/core/auth-next-passkey-dark.png',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-passkey/',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-passkey',
// Crash with Prisma
codeSandbox: false,
stackBlitz: false,
Expand All @@ -53,8 +53,7 @@ const coreExamples = [
'This app shows you to how to get started using Toolpad Core with Auth.js v4 and the Next.js Pages router.',
src: '/static/toolpad/docs/core/auth-next.png',
srcDark: '/static/toolpad/docs/core/auth-next-dark.png',
source:
'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-pages-nextauth-4/',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-pages-nextauth-4',
codeSandbox: true,
// Show nothing
stackBlitz: false,
Expand All @@ -65,7 +64,7 @@ const coreExamples = [
'This app shows you to how to get started using Toolpad Core with Vite and React Router.',
src: '/static/toolpad/docs/core/vite-react-router.png',
srcDark: '/static/toolpad/docs/core/vite-react-router.png', // TODO Fix
source: 'https://github.com/mui/toolpad/tree/master/examples/core/vite/',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/vite',
codeSandbox: true,
// Show nothing
stackBlitz: false,
Expand All @@ -87,7 +86,7 @@ const coreExamples = [
'This app shows you to how to get started using Toolpad Core with Auth.js and the Next.js Pages router.',
src: '/static/toolpad/docs/core/auth-next.png',
srcDark: '/static/toolpad/docs/core/auth-next-dark.png',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-pages/',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-pages',
// infinite redirection
codeSandbox: false,
stackBlitz: false,
Expand All @@ -98,7 +97,7 @@ const coreExamples = [
'This app shows you to how to get started using Toolpad Core with Auth.js and the Next.js App Router.',
src: '/static/toolpad/docs/core/auth-next.png',
srcDark: '/static/toolpad/docs/core/auth-next-dark.png',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs/',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs',
codeSandbox: true,
stackBlitz: true,
},
Expand All @@ -109,7 +108,7 @@ const coreExamples = [
src: '/static/toolpad/docs/core/tutorial-1.png',
srcDark: '/static/toolpad/docs/core/tutorial-1.png', // TODO Fix
href: 'https://mui.com/toolpad/core/introduction/tutorial/',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/tutorial/',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/tutorial',
codeSandbox: true,
stackBlitz: true,
},
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/examples/examplesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function versionGitHubLink(href: string) {

return href.replace(
`${process.env.SOURCE_CODE_REPO}/tree/master`,
`${process.env.SOURCE_CODE_REPO}/blob/v${process.env.LIB_VERSION}`,
`${process.env.SOURCE_CODE_REPO}/tree/v${process.env.LIB_VERSION}`,
);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/core/auth-nextjs-email/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ docker run --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgre
npx prisma migrate dev --schema=./src/prisma/schema.prisma
```

5. You also need to supply the following enviroment variables for the email server to work:
5. You also need to supply the following environment variables for the email server to work:

```bash
EMAIL_SERVER_HOST=
Expand Down
2 changes: 1 addition & 1 deletion examples/core/auth-nextjs-email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20.17.12",
"@types/node": "^20.17.16",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
Expand Down
2 changes: 1 addition & 1 deletion examples/core/auth-nextjs-pages-nextauth-4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20.17.12",
"@types/node": "^20.17.16",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
Expand Down
2 changes: 1 addition & 1 deletion examples/core/auth-nextjs-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20.17.12",
"@types/node": "^20.17.16",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
Expand Down
2 changes: 1 addition & 1 deletion examples/core/auth-nextjs-themed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/node": "^20.17.12",
"@types/node": "^20.17.16",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
Expand Down
2 changes: 1 addition & 1 deletion examples/core/auth-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20.17.12",
"@types/node": "^20.17.16",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
Expand Down
2 changes: 1 addition & 1 deletion examples/core/tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20.17.12",
"@types/node": "^20.17.16",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
Expand Down
2 changes: 1 addition & 1 deletion examples/core/vite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To copy this example and customize it for your needs, run
```bash
npx create-toolpad-app@latest --example vite
# or
pnpm create toolpad-app@latest --example vite
pnpm create toolpad-app --example vite
```

and follow the instructions in the terminal.
Expand Down
2 changes: 1 addition & 1 deletion examples/studio/with-prisma-data-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"qrcode": "^1.5.3"
},
"devDependencies": {
"@types/node": "^20.17.12",
"@types/node": "^20.17.16",
"@types/qrcode": "^1.5.5",
"prisma": "^5.16.1",
"ts-node": "^10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/studio/with-prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"qrcode": "^1.5.3"
},
"devDependencies": {
"@types/node": "^20.17.12",
"@types/node": "^20.17.16",
"@types/qrcode": "^1.5.5",
"prisma": "^5.16.1",
"ts-node": "^10.9.2",
Expand Down
Loading

0 comments on commit ed53cdd

Please sign in to comment.