Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into avoid-monorepo-alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot committed Feb 1, 2024
2 parents 8a83819 + 9602d9d commit a30b828
Show file tree
Hide file tree
Showing 61 changed files with 575 additions and 186 deletions.
16 changes: 11 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,17 @@ commands:
- when:
condition: << parameters.browsers >>
steps:
- run:
name: Install pnpm package manager
command: |
corepack enable
corepack prepare pnpm@latest-8 --activate
- run: corepack enable
- when:
condition:
not: << parameters.browsers >>
steps:
# See https://stackoverflow.com/a/73411601
- run: corepack enable --install-directory ~/bin

- when:
condition: << parameters.browsers >>
steps:
- run:
name: Prepare playwright hash
command: pnpm list --json --filter playwright > /tmp/playwright_info.json
Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/autocomplete.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Autocomplete

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/button.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Button

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/chart.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Chart

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/checkbox.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Checkbox

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/container.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Container

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/data-grid.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# DataGrid

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/date-picker.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# DatePicker

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/file-picker.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# FilePicker

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/form.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Form

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/image.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Image

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/list.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# List

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"//": "This file has been auto-generated using `pnpm docs:build:api`.",
"//": "ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`.",
"pages": [
{
"pathname": "/toolpad/reference/components",
Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/metric.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Metric

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/page-column.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# PageColumn

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/page-row.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# PageRow

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/paper.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Paper

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/select.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Select

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/stack.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Stack

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/tabs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Tabs

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/text-field.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# TextField

Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/reference/components/text.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- This file has been auto-generated using `pnpm docs:build:api`. -->
<!-- ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. -->

# Text

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/autocomplete.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/button.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/chart.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/checkbox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/container.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/data-grid.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/date-picker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/file-picker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/form.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/image.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/list.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/metric.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/page-column.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/page-row.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/paper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/select.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/stack.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/tabs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/text-field.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/reference/components/text.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file has been auto-generated using `pnpm docs:build:api`. */
/* ATTENTION: DO NOT EDIT! This file has been auto-generated using `pnpm docs:build:api`. */

import * as React from 'react';
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs';
Expand Down
22 changes: 21 additions & 1 deletion docs/schemas/v1/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,28 @@
"properties": {
"provider": {
"type": "string",
"enum": ["github", "google"],
"enum": ["github", "google", "azure-ad"],
"description": "Unique identifier for this authentication provider."
},
"roles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "array",
"items": { "type": "string" },
"description": "Authentication provider roles to be mapped from."
},
"target": {
"type": "string",
"description": "Toolpad role to be mapped to."
}
},
"required": ["source", "target"],
"additionalProperties": false
},
"description": "Role mapping definition for this authentication provider."
}
},
"required": ["provider"],
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@
},
"engines": {
"npm": "please-use-yarn",
"node": ">=18"
"node": ">=18",
"pnpm": "8.15.0"
},
"resolutions": {
"google-auth-library": "*"
},
"packageManager": "pnpm@8.7.0"
"packageManager": "pnpm@8.15.0"
}
17 changes: 17 additions & 0 deletions packages/toolpad-app/src/components/icons/AzureIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as React from 'react';

interface AzureIconProps {
size?: number;
color?: string;
}

export default function AzureIcon({ size = 18, color = 'currentColor' }: AzureIconProps) {
return (
<svg viewBox="0 0 59.242 47.271" width={size} height={size} xmlns="http://www.w3.org/2000/svg">
<path
d="m32.368 0-17.468 15.145-14.9 26.75h13.437zm2.323 3.543-7.454 21.008 14.291 17.956-27.728 4.764h45.442z"
fill={color}
/>
</svg>
);
}
9 changes: 6 additions & 3 deletions packages/toolpad-app/src/runtime/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ interface AppPagesNavigationProps {
pages: NavigationEntry[];
clipped?: boolean;
search?: string;
basename: string;
}

function AppPagesNavigation({
activePageSlug,
pages,
clipped = false,
search,
basename,
}: AppPagesNavigationProps) {
const navListSubheaderId = React.useId();

const theme = useTheme();

const productIcon = theme.palette.mode === 'dark' ? productIconDark : productIconLight;

const initialPageSlug = pages[0].slug;

return (
<Drawer
variant="permanent"
Expand All @@ -77,7 +77,7 @@ function AppPagesNavigation({
<MuiLink
color="inherit"
aria-label="Go to home page"
href={initialPageSlug}
href={basename}
underline="none"
sx={{
ml: 3,
Expand Down Expand Up @@ -139,6 +139,7 @@ export interface ToolpadAppLayoutProps {
hasHeader?: boolean;
children?: React.ReactNode;
clipped?: boolean;
basename: string;
}

export function AppLayout({
Expand All @@ -148,6 +149,7 @@ export function AppLayout({
hasHeader = false,
children,
clipped,
basename,
}: ToolpadAppLayoutProps) {
const theme = useTheme();

Expand Down Expand Up @@ -194,6 +196,7 @@ export function AppLayout({
pages={pages}
clipped={clipped}
search={retainedSearch}
basename={basename}
/>
) : null}
<Box sx={{ minWidth: 0, flex: 1, position: 'relative', flexDirection: 'column' }}>
Expand Down
Loading

0 comments on commit a30b828

Please sign in to comment.