@iowas/toolpad 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -5
- package/dist/core.d.mts +200 -4
- package/dist/core.d.ts +200 -4
- package/dist/core.js +777 -936
- package/dist/core.mjs +2849 -71
- package/dist/index.d.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +776 -1095
- package/dist/index.mjs +2849 -109
- package/package.json +2 -12
- package/dist/AppProvider-CIyOzZv_.d.mts +0 -201
- package/dist/AppProvider-CIyOzZv_.d.ts +0 -201
- package/dist/chunk-3JWXE2JW.mjs +0 -125
- package/dist/chunk-F6JD4MSY.mjs +0 -12
- package/dist/chunk-LUTZBKSG.mjs +0 -710
- package/dist/chunk-PMIWCP25.mjs +0 -68
- package/dist/chunk-ZXM3V5SD.mjs +0 -2325
- package/dist/nextjs.d.mts +0 -8
- package/dist/nextjs.d.ts +0 -8
- package/dist/nextjs.js +0 -802
- package/dist/nextjs.mjs +0 -54
- package/dist/utils.d.mts +0 -98
- package/dist/utils.d.ts +0 -98
- package/dist/utils.js +0 -218
- package/dist/utils.mjs +0 -42
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Reusable React components and hooks extracted from this repository.
|
|
|
8
8
|
pnpm add @iowas/toolpad
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Peer dependencies are required in the consuming app (`react`, `react-dom`, MUI, emotion, and optionally `next` for `toolpad/
|
|
11
|
+
Peer dependencies are required in the consuming app (`react`, `react-dom`, MUI, emotion, and optionally `next` for Next.js integrations in `toolpad/core`).
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
@@ -20,8 +20,7 @@ Use subpath exports when you only need a subset:
|
|
|
20
20
|
|
|
21
21
|
```tsx
|
|
22
22
|
import { AppProvider } from '@iowas/toolpad/core';
|
|
23
|
-
import {
|
|
24
|
-
import { NextAppProvider } from '@iowas/toolpad/nextjs';
|
|
23
|
+
import { NextAppProvider } from '@iowas/toolpad/core';
|
|
25
24
|
```
|
|
26
25
|
|
|
27
26
|
## Build
|
|
@@ -52,8 +51,6 @@ pnpm add /absolute/path/to/@iowas%2ftoolpad-1.0.0.tgz
|
|
|
52
51
|
|
|
53
52
|
- `@iowas/toolpad`
|
|
54
53
|
- `@iowas/toolpad/core`
|
|
55
|
-
- `@iowas/toolpad/utils`
|
|
56
|
-
- `@iowas/toolpad/nextjs`
|
|
57
54
|
|
|
58
55
|
```bash
|
|
59
56
|
npm login
|
package/dist/core.d.mts
CHANGED
|
@@ -4,11 +4,9 @@ import Button, { ButtonProps } from '@mui/material/Button';
|
|
|
4
4
|
import Popover, { PopoverProps } from '@mui/material/Popover';
|
|
5
5
|
import Stack, { StackProps } from '@mui/material/Stack';
|
|
6
6
|
import { AvatarProps } from '@mui/material/Avatar';
|
|
7
|
-
import { SxProps } from '@mui/material/styles';
|
|
7
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
8
8
|
import { IconButtonProps } from '@mui/material/IconButton';
|
|
9
9
|
import { BoxProps } from '@mui/material/Box';
|
|
10
|
-
import { B as Branding, i as Navigation, l as NavigationPageItem } from './AppProvider-CIyOzZv_.mjs';
|
|
11
|
-
export { A as AppProvider, a as AppProviderProps, b as AppTheme, c as Authentication, d as AuthenticationContext, L as LocaleText, e as LocalizationContext, f as LocalizationProvider, g as LocalizationProviderProps, N as Navigate, h as NavigateOptions, j as NavigationDividerItem, k as NavigationItem, m as NavigationSubheaderItem, R as Router, S as Session, n as SessionContext, u as useLocaleText } from './AppProvider-CIyOzZv_.mjs';
|
|
12
10
|
import { ContainerProps } from '@mui/material/Container';
|
|
13
11
|
import { SxProps as SxProps$1, SnackbarProps } from '@mui/material';
|
|
14
12
|
|
|
@@ -217,6 +215,202 @@ declare namespace SignOutButton {
|
|
|
217
215
|
var propTypes: any;
|
|
218
216
|
}
|
|
219
217
|
|
|
218
|
+
/**
|
|
219
|
+
* @ignore - internal component.
|
|
220
|
+
*/
|
|
221
|
+
interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
222
|
+
history?: 'auto' | 'push' | 'replace';
|
|
223
|
+
href: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
interface LocaleText {
|
|
227
|
+
accountSignInLabel: string;
|
|
228
|
+
accountSignOutLabel: string;
|
|
229
|
+
accountPreviewIconButtonLabel: string;
|
|
230
|
+
accountPreviewTitle: string;
|
|
231
|
+
signInTitle: string | ((brandingTitle?: string) => string);
|
|
232
|
+
signInSubtitle: string;
|
|
233
|
+
providerSignInTitle: (provider: string) => string;
|
|
234
|
+
signInRememberMe: string;
|
|
235
|
+
email: string;
|
|
236
|
+
passkey: string;
|
|
237
|
+
username: string;
|
|
238
|
+
password: string;
|
|
239
|
+
or: string;
|
|
240
|
+
to: string;
|
|
241
|
+
with: string;
|
|
242
|
+
save: string;
|
|
243
|
+
cancel: string;
|
|
244
|
+
ok: string;
|
|
245
|
+
close: string;
|
|
246
|
+
delete: string;
|
|
247
|
+
alert: string;
|
|
248
|
+
confirm: string;
|
|
249
|
+
loading: string;
|
|
250
|
+
createNewButtonLabel: string;
|
|
251
|
+
reloadButtonLabel: string;
|
|
252
|
+
createLabel: string;
|
|
253
|
+
createSuccessMessage: string;
|
|
254
|
+
createErrorMessage: string;
|
|
255
|
+
editLabel: string;
|
|
256
|
+
editSuccessMessage: string;
|
|
257
|
+
editErrorMessage: string;
|
|
258
|
+
deleteLabel: string;
|
|
259
|
+
deleteConfirmTitle: string;
|
|
260
|
+
deleteConfirmMessage: string;
|
|
261
|
+
deleteConfirmLabel: string;
|
|
262
|
+
deleteCancelLabel: string;
|
|
263
|
+
deleteSuccessMessage: string;
|
|
264
|
+
deleteErrorMessage: string;
|
|
265
|
+
deletedItemMessage: string;
|
|
266
|
+
}
|
|
267
|
+
interface LocalizationProviderProps {
|
|
268
|
+
children?: React.ReactNode;
|
|
269
|
+
/**
|
|
270
|
+
* Locale for components texts
|
|
271
|
+
*/
|
|
272
|
+
localeText?: Partial<LocaleText>;
|
|
273
|
+
}
|
|
274
|
+
declare const LocalizationContext: React.Context<Partial<LocaleText>>;
|
|
275
|
+
declare const LocalizationProvider: {
|
|
276
|
+
(props: LocalizationProviderProps): react_jsx_runtime.JSX.Element;
|
|
277
|
+
propTypes: any;
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
*
|
|
282
|
+
* Demos:
|
|
283
|
+
*
|
|
284
|
+
* - [Sign-in Page](https://mui.com/toolpad/core/react-sign-in-page/)
|
|
285
|
+
*
|
|
286
|
+
* API:
|
|
287
|
+
*
|
|
288
|
+
* - [LocalizationProvider API](https://mui.com/toolpad/core/api/localization-provider)
|
|
289
|
+
*/
|
|
290
|
+
declare function useLocaleText(): Partial<LocaleText>;
|
|
291
|
+
|
|
292
|
+
interface NavigateOptions {
|
|
293
|
+
history?: 'auto' | 'push' | 'replace';
|
|
294
|
+
}
|
|
295
|
+
interface Navigate {
|
|
296
|
+
(url: string | URL, options?: NavigateOptions): void;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Abstract router used by Toolpad components.
|
|
300
|
+
*/
|
|
301
|
+
interface Router {
|
|
302
|
+
pathname: string;
|
|
303
|
+
searchParams: URLSearchParams;
|
|
304
|
+
navigate: Navigate;
|
|
305
|
+
Link?: React.ComponentType<LinkProps>;
|
|
306
|
+
}
|
|
307
|
+
interface Branding {
|
|
308
|
+
title?: string;
|
|
309
|
+
logo?: React.ReactNode;
|
|
310
|
+
homeUrl?: string;
|
|
311
|
+
}
|
|
312
|
+
interface NavigationPageItem {
|
|
313
|
+
kind?: 'page';
|
|
314
|
+
segment?: string;
|
|
315
|
+
title?: string;
|
|
316
|
+
icon?: React.ReactNode;
|
|
317
|
+
pattern?: string;
|
|
318
|
+
action?: React.ReactNode;
|
|
319
|
+
children?: Navigation;
|
|
320
|
+
}
|
|
321
|
+
interface NavigationSubheaderItem {
|
|
322
|
+
kind: 'header';
|
|
323
|
+
title: string;
|
|
324
|
+
}
|
|
325
|
+
interface NavigationDividerItem {
|
|
326
|
+
kind: 'divider';
|
|
327
|
+
}
|
|
328
|
+
type NavigationItem = NavigationPageItem | NavigationSubheaderItem | NavigationDividerItem;
|
|
329
|
+
type Navigation = NavigationItem[];
|
|
330
|
+
interface Session {
|
|
331
|
+
user?: {
|
|
332
|
+
id?: string | null;
|
|
333
|
+
name?: string | null;
|
|
334
|
+
image?: string | null;
|
|
335
|
+
email?: string | null;
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
interface Authentication {
|
|
339
|
+
signIn: () => void;
|
|
340
|
+
signOut: () => void;
|
|
341
|
+
}
|
|
342
|
+
declare const AuthenticationContext: React.Context<Authentication | null>;
|
|
343
|
+
declare const SessionContext: React.Context<Session | null>;
|
|
344
|
+
type AppTheme = Theme | {
|
|
345
|
+
light: Theme;
|
|
346
|
+
dark: Theme;
|
|
347
|
+
};
|
|
348
|
+
interface AppProviderProps {
|
|
349
|
+
/**
|
|
350
|
+
* The content of the app provider.
|
|
351
|
+
*/
|
|
352
|
+
children: React.ReactNode;
|
|
353
|
+
/**
|
|
354
|
+
* [Theme or themes](https://mui.com/toolpad/core/react-app-provider/#theming) to be used by the app in light/dark mode. A [CSS variables theme](https://mui.com/material-ui/customization/css-theme-variables/overview/) is recommended.
|
|
355
|
+
* @default createDefaultTheme()
|
|
356
|
+
*/
|
|
357
|
+
theme?: AppTheme;
|
|
358
|
+
/**
|
|
359
|
+
* Branding options for the app.
|
|
360
|
+
* @default null
|
|
361
|
+
*/
|
|
362
|
+
branding?: Branding | null;
|
|
363
|
+
/**
|
|
364
|
+
* Navigation definition for the app. [Find out more](https://mui.com/toolpad/core/react-app-provider/#navigation).
|
|
365
|
+
* @default []
|
|
366
|
+
*/
|
|
367
|
+
navigation?: Navigation;
|
|
368
|
+
/**
|
|
369
|
+
* Router implementation used inside Toolpad components.
|
|
370
|
+
* @default null
|
|
371
|
+
*/
|
|
372
|
+
router?: Router;
|
|
373
|
+
/**
|
|
374
|
+
* Locale text for components
|
|
375
|
+
*/
|
|
376
|
+
localeText?: Partial<LocaleText>;
|
|
377
|
+
/**
|
|
378
|
+
* Session info about the current user.
|
|
379
|
+
* @default null
|
|
380
|
+
*/
|
|
381
|
+
session?: Session | null;
|
|
382
|
+
/**
|
|
383
|
+
* Authentication methods.
|
|
384
|
+
* @default null
|
|
385
|
+
*/
|
|
386
|
+
authentication?: Authentication | null;
|
|
387
|
+
/**
|
|
388
|
+
* The window where the application is rendered.
|
|
389
|
+
* This is needed when rendering the app inside an iframe, for example.
|
|
390
|
+
* @default window
|
|
391
|
+
*/
|
|
392
|
+
window?: Window;
|
|
393
|
+
/**
|
|
394
|
+
* The nonce to be used for inline scripts.
|
|
395
|
+
*/
|
|
396
|
+
nonce?: string;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
*
|
|
400
|
+
* Demos:
|
|
401
|
+
*
|
|
402
|
+
* - [App Provider](https://mui.com/toolpad/core/react-app-provider/)
|
|
403
|
+
* - [Dashboard Layout](https://mui.com/toolpad/core/react-dashboard-layout/)
|
|
404
|
+
*
|
|
405
|
+
* API:
|
|
406
|
+
*
|
|
407
|
+
* - [AppProvider API](https://mui.com/toolpad/core/api/app-provider)
|
|
408
|
+
*/
|
|
409
|
+
declare function AppProvider(props: AppProviderProps): react_jsx_runtime.JSX.Element;
|
|
410
|
+
declare namespace AppProvider {
|
|
411
|
+
var propTypes: any;
|
|
412
|
+
}
|
|
413
|
+
|
|
220
414
|
interface AppTitleProps {
|
|
221
415
|
branding?: Branding;
|
|
222
416
|
}
|
|
@@ -992,4 +1186,6 @@ interface NotificationsProviderProps {
|
|
|
992
1186
|
*/
|
|
993
1187
|
declare function NotificationsProvider(props: NotificationsProviderProps): react_jsx_runtime.JSX.Element;
|
|
994
1188
|
|
|
995
|
-
|
|
1189
|
+
declare function NextAppProvider(props: AppProviderProps): react_jsx_runtime.JSX.Element;
|
|
1190
|
+
|
|
1191
|
+
export { Account, AccountPopoverFooter, type AccountPopoverFooterProps, AccountPopoverHeader, type AccountPopoverHeaderProps, AccountPreview, type AccountPreviewProps, type AccountPreviewSlots, type AccountPreviewVariant, type AccountProps, type AccountSlots, type ActivePage, AlertDialog, type AlertDialogPayload, type AlertDialogProps, type AlertOptions, AppProvider, type AppProviderProps, type AppTheme, type Authentication, AuthenticationContext, type Branding, type Breadcrumb, type CloseDialog, type CloseNotification, ConfirmDialog, type ConfirmDialogPayload, type ConfirmDialogProps, type ConfirmOptions, DashboardHeader, type DashboardHeaderProps, type DashboardHeaderSlotProps, type DashboardHeaderSlots, DashboardLayout, type DashboardLayoutProps, type DashboardLayoutSlotProps, type DashboardLayoutSlots, DashboardSidebarPageItem, type DashboardSidebarPageItemContextProps, type DashboardSidebarPageItemProps, type DefaultStorageStateoptions, type DialogComponent, type DialogHook, type DialogProps, type DialogProviderProps, DialogsProvider, type LocaleText, LocalizationContext, LocalizationProvider, type LocalizationProviderProps, type Navigate, type NavigateOptions, type Navigation, type NavigationDividerItem, type NavigationItem, type NavigationPageItem, type NavigationSubheaderItem, NextAppProvider, NotificationsProvider, type NotificationsProviderProps, type NotificationsProviderSlotProps, type NotificationsProviderSlots, type OpenAlertDialog, type OpenConfirmDialog, type OpenDialog, type OpenDialogOptions, type OpenPromptDialog, PageContainer, type PageContainerProps, type PageContainerSlotProps, type PageContainerSlots, PageHeader, type PageHeaderProps, type PageHeaderSlotProps, type PageHeaderSlots, PageHeaderToolbar, type PageHeaderToolbarProps, PromptDialog, type PromptDialogPayload, type PromptDialogProps, type PromptOptions, type Router, type Session, SessionContext, type ShowNotification, type ShowNotificationOptions, type SidebarFooterProps, SignInButton, SignOutButton, type SignOutButtonProps, type StorageStateInitializer, type StorageStateOptions, ThemeSwitcher, ToolbarActions, type UseStorageState, type UseStorageStateHookResult, _default as en, useActivePage, useDialogs, useLocalStorageState, useLocaleText, useNotifications, useStorageState, useStorageStateServer };
|
package/dist/core.d.ts
CHANGED
|
@@ -4,11 +4,9 @@ import Button, { ButtonProps } from '@mui/material/Button';
|
|
|
4
4
|
import Popover, { PopoverProps } from '@mui/material/Popover';
|
|
5
5
|
import Stack, { StackProps } from '@mui/material/Stack';
|
|
6
6
|
import { AvatarProps } from '@mui/material/Avatar';
|
|
7
|
-
import { SxProps } from '@mui/material/styles';
|
|
7
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
8
8
|
import { IconButtonProps } from '@mui/material/IconButton';
|
|
9
9
|
import { BoxProps } from '@mui/material/Box';
|
|
10
|
-
import { B as Branding, i as Navigation, l as NavigationPageItem } from './AppProvider-CIyOzZv_.js';
|
|
11
|
-
export { A as AppProvider, a as AppProviderProps, b as AppTheme, c as Authentication, d as AuthenticationContext, L as LocaleText, e as LocalizationContext, f as LocalizationProvider, g as LocalizationProviderProps, N as Navigate, h as NavigateOptions, j as NavigationDividerItem, k as NavigationItem, m as NavigationSubheaderItem, R as Router, S as Session, n as SessionContext, u as useLocaleText } from './AppProvider-CIyOzZv_.js';
|
|
12
10
|
import { ContainerProps } from '@mui/material/Container';
|
|
13
11
|
import { SxProps as SxProps$1, SnackbarProps } from '@mui/material';
|
|
14
12
|
|
|
@@ -217,6 +215,202 @@ declare namespace SignOutButton {
|
|
|
217
215
|
var propTypes: any;
|
|
218
216
|
}
|
|
219
217
|
|
|
218
|
+
/**
|
|
219
|
+
* @ignore - internal component.
|
|
220
|
+
*/
|
|
221
|
+
interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
222
|
+
history?: 'auto' | 'push' | 'replace';
|
|
223
|
+
href: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
interface LocaleText {
|
|
227
|
+
accountSignInLabel: string;
|
|
228
|
+
accountSignOutLabel: string;
|
|
229
|
+
accountPreviewIconButtonLabel: string;
|
|
230
|
+
accountPreviewTitle: string;
|
|
231
|
+
signInTitle: string | ((brandingTitle?: string) => string);
|
|
232
|
+
signInSubtitle: string;
|
|
233
|
+
providerSignInTitle: (provider: string) => string;
|
|
234
|
+
signInRememberMe: string;
|
|
235
|
+
email: string;
|
|
236
|
+
passkey: string;
|
|
237
|
+
username: string;
|
|
238
|
+
password: string;
|
|
239
|
+
or: string;
|
|
240
|
+
to: string;
|
|
241
|
+
with: string;
|
|
242
|
+
save: string;
|
|
243
|
+
cancel: string;
|
|
244
|
+
ok: string;
|
|
245
|
+
close: string;
|
|
246
|
+
delete: string;
|
|
247
|
+
alert: string;
|
|
248
|
+
confirm: string;
|
|
249
|
+
loading: string;
|
|
250
|
+
createNewButtonLabel: string;
|
|
251
|
+
reloadButtonLabel: string;
|
|
252
|
+
createLabel: string;
|
|
253
|
+
createSuccessMessage: string;
|
|
254
|
+
createErrorMessage: string;
|
|
255
|
+
editLabel: string;
|
|
256
|
+
editSuccessMessage: string;
|
|
257
|
+
editErrorMessage: string;
|
|
258
|
+
deleteLabel: string;
|
|
259
|
+
deleteConfirmTitle: string;
|
|
260
|
+
deleteConfirmMessage: string;
|
|
261
|
+
deleteConfirmLabel: string;
|
|
262
|
+
deleteCancelLabel: string;
|
|
263
|
+
deleteSuccessMessage: string;
|
|
264
|
+
deleteErrorMessage: string;
|
|
265
|
+
deletedItemMessage: string;
|
|
266
|
+
}
|
|
267
|
+
interface LocalizationProviderProps {
|
|
268
|
+
children?: React.ReactNode;
|
|
269
|
+
/**
|
|
270
|
+
* Locale for components texts
|
|
271
|
+
*/
|
|
272
|
+
localeText?: Partial<LocaleText>;
|
|
273
|
+
}
|
|
274
|
+
declare const LocalizationContext: React.Context<Partial<LocaleText>>;
|
|
275
|
+
declare const LocalizationProvider: {
|
|
276
|
+
(props: LocalizationProviderProps): react_jsx_runtime.JSX.Element;
|
|
277
|
+
propTypes: any;
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
*
|
|
282
|
+
* Demos:
|
|
283
|
+
*
|
|
284
|
+
* - [Sign-in Page](https://mui.com/toolpad/core/react-sign-in-page/)
|
|
285
|
+
*
|
|
286
|
+
* API:
|
|
287
|
+
*
|
|
288
|
+
* - [LocalizationProvider API](https://mui.com/toolpad/core/api/localization-provider)
|
|
289
|
+
*/
|
|
290
|
+
declare function useLocaleText(): Partial<LocaleText>;
|
|
291
|
+
|
|
292
|
+
interface NavigateOptions {
|
|
293
|
+
history?: 'auto' | 'push' | 'replace';
|
|
294
|
+
}
|
|
295
|
+
interface Navigate {
|
|
296
|
+
(url: string | URL, options?: NavigateOptions): void;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Abstract router used by Toolpad components.
|
|
300
|
+
*/
|
|
301
|
+
interface Router {
|
|
302
|
+
pathname: string;
|
|
303
|
+
searchParams: URLSearchParams;
|
|
304
|
+
navigate: Navigate;
|
|
305
|
+
Link?: React.ComponentType<LinkProps>;
|
|
306
|
+
}
|
|
307
|
+
interface Branding {
|
|
308
|
+
title?: string;
|
|
309
|
+
logo?: React.ReactNode;
|
|
310
|
+
homeUrl?: string;
|
|
311
|
+
}
|
|
312
|
+
interface NavigationPageItem {
|
|
313
|
+
kind?: 'page';
|
|
314
|
+
segment?: string;
|
|
315
|
+
title?: string;
|
|
316
|
+
icon?: React.ReactNode;
|
|
317
|
+
pattern?: string;
|
|
318
|
+
action?: React.ReactNode;
|
|
319
|
+
children?: Navigation;
|
|
320
|
+
}
|
|
321
|
+
interface NavigationSubheaderItem {
|
|
322
|
+
kind: 'header';
|
|
323
|
+
title: string;
|
|
324
|
+
}
|
|
325
|
+
interface NavigationDividerItem {
|
|
326
|
+
kind: 'divider';
|
|
327
|
+
}
|
|
328
|
+
type NavigationItem = NavigationPageItem | NavigationSubheaderItem | NavigationDividerItem;
|
|
329
|
+
type Navigation = NavigationItem[];
|
|
330
|
+
interface Session {
|
|
331
|
+
user?: {
|
|
332
|
+
id?: string | null;
|
|
333
|
+
name?: string | null;
|
|
334
|
+
image?: string | null;
|
|
335
|
+
email?: string | null;
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
interface Authentication {
|
|
339
|
+
signIn: () => void;
|
|
340
|
+
signOut: () => void;
|
|
341
|
+
}
|
|
342
|
+
declare const AuthenticationContext: React.Context<Authentication | null>;
|
|
343
|
+
declare const SessionContext: React.Context<Session | null>;
|
|
344
|
+
type AppTheme = Theme | {
|
|
345
|
+
light: Theme;
|
|
346
|
+
dark: Theme;
|
|
347
|
+
};
|
|
348
|
+
interface AppProviderProps {
|
|
349
|
+
/**
|
|
350
|
+
* The content of the app provider.
|
|
351
|
+
*/
|
|
352
|
+
children: React.ReactNode;
|
|
353
|
+
/**
|
|
354
|
+
* [Theme or themes](https://mui.com/toolpad/core/react-app-provider/#theming) to be used by the app in light/dark mode. A [CSS variables theme](https://mui.com/material-ui/customization/css-theme-variables/overview/) is recommended.
|
|
355
|
+
* @default createDefaultTheme()
|
|
356
|
+
*/
|
|
357
|
+
theme?: AppTheme;
|
|
358
|
+
/**
|
|
359
|
+
* Branding options for the app.
|
|
360
|
+
* @default null
|
|
361
|
+
*/
|
|
362
|
+
branding?: Branding | null;
|
|
363
|
+
/**
|
|
364
|
+
* Navigation definition for the app. [Find out more](https://mui.com/toolpad/core/react-app-provider/#navigation).
|
|
365
|
+
* @default []
|
|
366
|
+
*/
|
|
367
|
+
navigation?: Navigation;
|
|
368
|
+
/**
|
|
369
|
+
* Router implementation used inside Toolpad components.
|
|
370
|
+
* @default null
|
|
371
|
+
*/
|
|
372
|
+
router?: Router;
|
|
373
|
+
/**
|
|
374
|
+
* Locale text for components
|
|
375
|
+
*/
|
|
376
|
+
localeText?: Partial<LocaleText>;
|
|
377
|
+
/**
|
|
378
|
+
* Session info about the current user.
|
|
379
|
+
* @default null
|
|
380
|
+
*/
|
|
381
|
+
session?: Session | null;
|
|
382
|
+
/**
|
|
383
|
+
* Authentication methods.
|
|
384
|
+
* @default null
|
|
385
|
+
*/
|
|
386
|
+
authentication?: Authentication | null;
|
|
387
|
+
/**
|
|
388
|
+
* The window where the application is rendered.
|
|
389
|
+
* This is needed when rendering the app inside an iframe, for example.
|
|
390
|
+
* @default window
|
|
391
|
+
*/
|
|
392
|
+
window?: Window;
|
|
393
|
+
/**
|
|
394
|
+
* The nonce to be used for inline scripts.
|
|
395
|
+
*/
|
|
396
|
+
nonce?: string;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
*
|
|
400
|
+
* Demos:
|
|
401
|
+
*
|
|
402
|
+
* - [App Provider](https://mui.com/toolpad/core/react-app-provider/)
|
|
403
|
+
* - [Dashboard Layout](https://mui.com/toolpad/core/react-dashboard-layout/)
|
|
404
|
+
*
|
|
405
|
+
* API:
|
|
406
|
+
*
|
|
407
|
+
* - [AppProvider API](https://mui.com/toolpad/core/api/app-provider)
|
|
408
|
+
*/
|
|
409
|
+
declare function AppProvider(props: AppProviderProps): react_jsx_runtime.JSX.Element;
|
|
410
|
+
declare namespace AppProvider {
|
|
411
|
+
var propTypes: any;
|
|
412
|
+
}
|
|
413
|
+
|
|
220
414
|
interface AppTitleProps {
|
|
221
415
|
branding?: Branding;
|
|
222
416
|
}
|
|
@@ -992,4 +1186,6 @@ interface NotificationsProviderProps {
|
|
|
992
1186
|
*/
|
|
993
1187
|
declare function NotificationsProvider(props: NotificationsProviderProps): react_jsx_runtime.JSX.Element;
|
|
994
1188
|
|
|
995
|
-
|
|
1189
|
+
declare function NextAppProvider(props: AppProviderProps): react_jsx_runtime.JSX.Element;
|
|
1190
|
+
|
|
1191
|
+
export { Account, AccountPopoverFooter, type AccountPopoverFooterProps, AccountPopoverHeader, type AccountPopoverHeaderProps, AccountPreview, type AccountPreviewProps, type AccountPreviewSlots, type AccountPreviewVariant, type AccountProps, type AccountSlots, type ActivePage, AlertDialog, type AlertDialogPayload, type AlertDialogProps, type AlertOptions, AppProvider, type AppProviderProps, type AppTheme, type Authentication, AuthenticationContext, type Branding, type Breadcrumb, type CloseDialog, type CloseNotification, ConfirmDialog, type ConfirmDialogPayload, type ConfirmDialogProps, type ConfirmOptions, DashboardHeader, type DashboardHeaderProps, type DashboardHeaderSlotProps, type DashboardHeaderSlots, DashboardLayout, type DashboardLayoutProps, type DashboardLayoutSlotProps, type DashboardLayoutSlots, DashboardSidebarPageItem, type DashboardSidebarPageItemContextProps, type DashboardSidebarPageItemProps, type DefaultStorageStateoptions, type DialogComponent, type DialogHook, type DialogProps, type DialogProviderProps, DialogsProvider, type LocaleText, LocalizationContext, LocalizationProvider, type LocalizationProviderProps, type Navigate, type NavigateOptions, type Navigation, type NavigationDividerItem, type NavigationItem, type NavigationPageItem, type NavigationSubheaderItem, NextAppProvider, NotificationsProvider, type NotificationsProviderProps, type NotificationsProviderSlotProps, type NotificationsProviderSlots, type OpenAlertDialog, type OpenConfirmDialog, type OpenDialog, type OpenDialogOptions, type OpenPromptDialog, PageContainer, type PageContainerProps, type PageContainerSlotProps, type PageContainerSlots, PageHeader, type PageHeaderProps, type PageHeaderSlotProps, type PageHeaderSlots, PageHeaderToolbar, type PageHeaderToolbarProps, PromptDialog, type PromptDialogPayload, type PromptDialogProps, type PromptOptions, type Router, type Session, SessionContext, type ShowNotification, type ShowNotificationOptions, type SidebarFooterProps, SignInButton, SignOutButton, type SignOutButtonProps, type StorageStateInitializer, type StorageStateOptions, ThemeSwitcher, ToolbarActions, type UseStorageState, type UseStorageStateHookResult, _default as en, useActivePage, useDialogs, useLocalStorageState, useLocaleText, useNotifications, useStorageState, useStorageStateServer };
|