@iowas/toolpad 1.0.2 → 1.0.3
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/dist/{chunk-3JWXE2JW.mjs → chunk-6JQJK2JX.mjs} +11 -1
- package/dist/{chunk-ZXM3V5SD.mjs → chunk-IDMYUY7L.mjs} +1187 -503
- package/dist/core.d.mts +198 -4
- package/dist/core.d.ts +198 -4
- package/dist/core.mjs +11 -14
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.mjs +13 -17
- package/dist/nextjs.d.mts +157 -3
- package/dist/nextjs.d.ts +157 -3
- package/dist/nextjs.js +1 -0
- package/dist/nextjs.mjs +737 -15
- package/dist/utils.mjs +3 -5
- package/package.json +3 -2
- package/dist/AppProvider-CIyOzZv_.d.mts +0 -201
- package/dist/AppProvider-CIyOzZv_.d.ts +0 -201
- package/dist/chunk-F6JD4MSY.mjs +0 -12
- package/dist/chunk-LUTZBKSG.mjs +0 -710
package/dist/utils.mjs
CHANGED
|
@@ -10,17 +10,15 @@ import {
|
|
|
10
10
|
useBoolean,
|
|
11
11
|
usePageTitle
|
|
12
12
|
} from "./chunk-PMIWCP25.mjs";
|
|
13
|
-
import {
|
|
14
|
-
warnOnce
|
|
15
|
-
} from "./chunk-F6JD4MSY.mjs";
|
|
16
13
|
import {
|
|
17
14
|
createGlobalState,
|
|
18
15
|
createProvidedContext,
|
|
19
16
|
interleave,
|
|
20
17
|
useAssertedContext,
|
|
21
18
|
useNonNullableContext,
|
|
22
|
-
useTraceUpdates
|
|
23
|
-
|
|
19
|
+
useTraceUpdates,
|
|
20
|
+
warnOnce
|
|
21
|
+
} from "./chunk-6JQJK2JX.mjs";
|
|
24
22
|
export {
|
|
25
23
|
asArray,
|
|
26
24
|
createGlobalState,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iowas/toolpad",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "https://github.com/iowa/toolpad",
|
|
6
6
|
"description": "Custom mui-toolpad",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"format": "pretty-quick",
|
|
41
41
|
"format:check": "prettier --check src",
|
|
42
42
|
"format:fix": "prettier --check --write src",
|
|
43
|
-
"prepare": "husky"
|
|
43
|
+
"prepare": "husky",
|
|
44
|
+
"dev": "next dev"
|
|
44
45
|
},
|
|
45
46
|
"lint-staged": {
|
|
46
47
|
"src/**/*.{js,jsx,ts,tsx,json,css,md}": "pnpm run format"
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Theme } from '@mui/material/styles';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @ignore - internal component.
|
|
7
|
-
*/
|
|
8
|
-
interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
9
|
-
history?: 'auto' | 'push' | 'replace';
|
|
10
|
-
href: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface LocaleText {
|
|
14
|
-
accountSignInLabel: string;
|
|
15
|
-
accountSignOutLabel: string;
|
|
16
|
-
accountPreviewIconButtonLabel: string;
|
|
17
|
-
accountPreviewTitle: string;
|
|
18
|
-
signInTitle: string | ((brandingTitle?: string) => string);
|
|
19
|
-
signInSubtitle: string;
|
|
20
|
-
providerSignInTitle: (provider: string) => string;
|
|
21
|
-
signInRememberMe: string;
|
|
22
|
-
email: string;
|
|
23
|
-
passkey: string;
|
|
24
|
-
username: string;
|
|
25
|
-
password: string;
|
|
26
|
-
or: string;
|
|
27
|
-
to: string;
|
|
28
|
-
with: string;
|
|
29
|
-
save: string;
|
|
30
|
-
cancel: string;
|
|
31
|
-
ok: string;
|
|
32
|
-
close: string;
|
|
33
|
-
delete: string;
|
|
34
|
-
alert: string;
|
|
35
|
-
confirm: string;
|
|
36
|
-
loading: string;
|
|
37
|
-
createNewButtonLabel: string;
|
|
38
|
-
reloadButtonLabel: string;
|
|
39
|
-
createLabel: string;
|
|
40
|
-
createSuccessMessage: string;
|
|
41
|
-
createErrorMessage: string;
|
|
42
|
-
editLabel: string;
|
|
43
|
-
editSuccessMessage: string;
|
|
44
|
-
editErrorMessage: string;
|
|
45
|
-
deleteLabel: string;
|
|
46
|
-
deleteConfirmTitle: string;
|
|
47
|
-
deleteConfirmMessage: string;
|
|
48
|
-
deleteConfirmLabel: string;
|
|
49
|
-
deleteCancelLabel: string;
|
|
50
|
-
deleteSuccessMessage: string;
|
|
51
|
-
deleteErrorMessage: string;
|
|
52
|
-
deletedItemMessage: string;
|
|
53
|
-
}
|
|
54
|
-
interface LocalizationProviderProps {
|
|
55
|
-
children?: React.ReactNode;
|
|
56
|
-
/**
|
|
57
|
-
* Locale for components texts
|
|
58
|
-
*/
|
|
59
|
-
localeText?: Partial<LocaleText>;
|
|
60
|
-
}
|
|
61
|
-
declare const LocalizationContext: React.Context<Partial<LocaleText>>;
|
|
62
|
-
declare const LocalizationProvider: {
|
|
63
|
-
(props: LocalizationProviderProps): react_jsx_runtime.JSX.Element;
|
|
64
|
-
propTypes: any;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
*
|
|
69
|
-
* Demos:
|
|
70
|
-
*
|
|
71
|
-
* - [Sign-in Page](https://mui.com/toolpad/core/react-sign-in-page/)
|
|
72
|
-
*
|
|
73
|
-
* API:
|
|
74
|
-
*
|
|
75
|
-
* - [LocalizationProvider API](https://mui.com/toolpad/core/api/localization-provider)
|
|
76
|
-
*/
|
|
77
|
-
declare function useLocaleText(): Partial<LocaleText>;
|
|
78
|
-
|
|
79
|
-
interface NavigateOptions {
|
|
80
|
-
history?: 'auto' | 'push' | 'replace';
|
|
81
|
-
}
|
|
82
|
-
interface Navigate {
|
|
83
|
-
(url: string | URL, options?: NavigateOptions): void;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Abstract router used by Toolpad components.
|
|
87
|
-
*/
|
|
88
|
-
interface Router {
|
|
89
|
-
pathname: string;
|
|
90
|
-
searchParams: URLSearchParams;
|
|
91
|
-
navigate: Navigate;
|
|
92
|
-
Link?: React.ComponentType<LinkProps>;
|
|
93
|
-
}
|
|
94
|
-
interface Branding {
|
|
95
|
-
title?: string;
|
|
96
|
-
logo?: React.ReactNode;
|
|
97
|
-
homeUrl?: string;
|
|
98
|
-
}
|
|
99
|
-
interface NavigationPageItem {
|
|
100
|
-
kind?: 'page';
|
|
101
|
-
segment?: string;
|
|
102
|
-
title?: string;
|
|
103
|
-
icon?: React.ReactNode;
|
|
104
|
-
pattern?: string;
|
|
105
|
-
action?: React.ReactNode;
|
|
106
|
-
children?: Navigation;
|
|
107
|
-
}
|
|
108
|
-
interface NavigationSubheaderItem {
|
|
109
|
-
kind: 'header';
|
|
110
|
-
title: string;
|
|
111
|
-
}
|
|
112
|
-
interface NavigationDividerItem {
|
|
113
|
-
kind: 'divider';
|
|
114
|
-
}
|
|
115
|
-
type NavigationItem = NavigationPageItem | NavigationSubheaderItem | NavigationDividerItem;
|
|
116
|
-
type Navigation = NavigationItem[];
|
|
117
|
-
interface Session {
|
|
118
|
-
user?: {
|
|
119
|
-
id?: string | null;
|
|
120
|
-
name?: string | null;
|
|
121
|
-
image?: string | null;
|
|
122
|
-
email?: string | null;
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
interface Authentication {
|
|
126
|
-
signIn: () => void;
|
|
127
|
-
signOut: () => void;
|
|
128
|
-
}
|
|
129
|
-
declare const AuthenticationContext: React.Context<Authentication | null>;
|
|
130
|
-
declare const SessionContext: React.Context<Session | null>;
|
|
131
|
-
type AppTheme = Theme | {
|
|
132
|
-
light: Theme;
|
|
133
|
-
dark: Theme;
|
|
134
|
-
};
|
|
135
|
-
interface AppProviderProps {
|
|
136
|
-
/**
|
|
137
|
-
* The content of the app provider.
|
|
138
|
-
*/
|
|
139
|
-
children: React.ReactNode;
|
|
140
|
-
/**
|
|
141
|
-
* [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.
|
|
142
|
-
* @default createDefaultTheme()
|
|
143
|
-
*/
|
|
144
|
-
theme?: AppTheme;
|
|
145
|
-
/**
|
|
146
|
-
* Branding options for the app.
|
|
147
|
-
* @default null
|
|
148
|
-
*/
|
|
149
|
-
branding?: Branding | null;
|
|
150
|
-
/**
|
|
151
|
-
* Navigation definition for the app. [Find out more](https://mui.com/toolpad/core/react-app-provider/#navigation).
|
|
152
|
-
* @default []
|
|
153
|
-
*/
|
|
154
|
-
navigation?: Navigation;
|
|
155
|
-
/**
|
|
156
|
-
* Router implementation used inside Toolpad components.
|
|
157
|
-
* @default null
|
|
158
|
-
*/
|
|
159
|
-
router?: Router;
|
|
160
|
-
/**
|
|
161
|
-
* Locale text for components
|
|
162
|
-
*/
|
|
163
|
-
localeText?: Partial<LocaleText>;
|
|
164
|
-
/**
|
|
165
|
-
* Session info about the current user.
|
|
166
|
-
* @default null
|
|
167
|
-
*/
|
|
168
|
-
session?: Session | null;
|
|
169
|
-
/**
|
|
170
|
-
* Authentication methods.
|
|
171
|
-
* @default null
|
|
172
|
-
*/
|
|
173
|
-
authentication?: Authentication | null;
|
|
174
|
-
/**
|
|
175
|
-
* The window where the application is rendered.
|
|
176
|
-
* This is needed when rendering the app inside an iframe, for example.
|
|
177
|
-
* @default window
|
|
178
|
-
*/
|
|
179
|
-
window?: Window;
|
|
180
|
-
/**
|
|
181
|
-
* The nonce to be used for inline scripts.
|
|
182
|
-
*/
|
|
183
|
-
nonce?: string;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
*
|
|
187
|
-
* Demos:
|
|
188
|
-
*
|
|
189
|
-
* - [App Provider](https://mui.com/toolpad/core/react-app-provider/)
|
|
190
|
-
* - [Dashboard Layout](https://mui.com/toolpad/core/react-dashboard-layout/)
|
|
191
|
-
*
|
|
192
|
-
* API:
|
|
193
|
-
*
|
|
194
|
-
* - [AppProvider API](https://mui.com/toolpad/core/api/app-provider)
|
|
195
|
-
*/
|
|
196
|
-
declare function AppProvider(props: AppProviderProps): react_jsx_runtime.JSX.Element;
|
|
197
|
-
declare namespace AppProvider {
|
|
198
|
-
var propTypes: any;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export { AppProvider as A, type Branding as B, type LocaleText as L, type Navigate as N, type Router as R, type Session as S, type AppProviderProps as a, type AppTheme as b, type Authentication as c, AuthenticationContext as d, LocalizationContext as e, LocalizationProvider as f, type LocalizationProviderProps as g, type NavigateOptions as h, type Navigation as i, type NavigationDividerItem as j, type NavigationItem as k, type NavigationPageItem as l, type NavigationSubheaderItem as m, SessionContext as n, useLocaleText as u };
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Theme } from '@mui/material/styles';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @ignore - internal component.
|
|
7
|
-
*/
|
|
8
|
-
interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
9
|
-
history?: 'auto' | 'push' | 'replace';
|
|
10
|
-
href: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface LocaleText {
|
|
14
|
-
accountSignInLabel: string;
|
|
15
|
-
accountSignOutLabel: string;
|
|
16
|
-
accountPreviewIconButtonLabel: string;
|
|
17
|
-
accountPreviewTitle: string;
|
|
18
|
-
signInTitle: string | ((brandingTitle?: string) => string);
|
|
19
|
-
signInSubtitle: string;
|
|
20
|
-
providerSignInTitle: (provider: string) => string;
|
|
21
|
-
signInRememberMe: string;
|
|
22
|
-
email: string;
|
|
23
|
-
passkey: string;
|
|
24
|
-
username: string;
|
|
25
|
-
password: string;
|
|
26
|
-
or: string;
|
|
27
|
-
to: string;
|
|
28
|
-
with: string;
|
|
29
|
-
save: string;
|
|
30
|
-
cancel: string;
|
|
31
|
-
ok: string;
|
|
32
|
-
close: string;
|
|
33
|
-
delete: string;
|
|
34
|
-
alert: string;
|
|
35
|
-
confirm: string;
|
|
36
|
-
loading: string;
|
|
37
|
-
createNewButtonLabel: string;
|
|
38
|
-
reloadButtonLabel: string;
|
|
39
|
-
createLabel: string;
|
|
40
|
-
createSuccessMessage: string;
|
|
41
|
-
createErrorMessage: string;
|
|
42
|
-
editLabel: string;
|
|
43
|
-
editSuccessMessage: string;
|
|
44
|
-
editErrorMessage: string;
|
|
45
|
-
deleteLabel: string;
|
|
46
|
-
deleteConfirmTitle: string;
|
|
47
|
-
deleteConfirmMessage: string;
|
|
48
|
-
deleteConfirmLabel: string;
|
|
49
|
-
deleteCancelLabel: string;
|
|
50
|
-
deleteSuccessMessage: string;
|
|
51
|
-
deleteErrorMessage: string;
|
|
52
|
-
deletedItemMessage: string;
|
|
53
|
-
}
|
|
54
|
-
interface LocalizationProviderProps {
|
|
55
|
-
children?: React.ReactNode;
|
|
56
|
-
/**
|
|
57
|
-
* Locale for components texts
|
|
58
|
-
*/
|
|
59
|
-
localeText?: Partial<LocaleText>;
|
|
60
|
-
}
|
|
61
|
-
declare const LocalizationContext: React.Context<Partial<LocaleText>>;
|
|
62
|
-
declare const LocalizationProvider: {
|
|
63
|
-
(props: LocalizationProviderProps): react_jsx_runtime.JSX.Element;
|
|
64
|
-
propTypes: any;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
*
|
|
69
|
-
* Demos:
|
|
70
|
-
*
|
|
71
|
-
* - [Sign-in Page](https://mui.com/toolpad/core/react-sign-in-page/)
|
|
72
|
-
*
|
|
73
|
-
* API:
|
|
74
|
-
*
|
|
75
|
-
* - [LocalizationProvider API](https://mui.com/toolpad/core/api/localization-provider)
|
|
76
|
-
*/
|
|
77
|
-
declare function useLocaleText(): Partial<LocaleText>;
|
|
78
|
-
|
|
79
|
-
interface NavigateOptions {
|
|
80
|
-
history?: 'auto' | 'push' | 'replace';
|
|
81
|
-
}
|
|
82
|
-
interface Navigate {
|
|
83
|
-
(url: string | URL, options?: NavigateOptions): void;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Abstract router used by Toolpad components.
|
|
87
|
-
*/
|
|
88
|
-
interface Router {
|
|
89
|
-
pathname: string;
|
|
90
|
-
searchParams: URLSearchParams;
|
|
91
|
-
navigate: Navigate;
|
|
92
|
-
Link?: React.ComponentType<LinkProps>;
|
|
93
|
-
}
|
|
94
|
-
interface Branding {
|
|
95
|
-
title?: string;
|
|
96
|
-
logo?: React.ReactNode;
|
|
97
|
-
homeUrl?: string;
|
|
98
|
-
}
|
|
99
|
-
interface NavigationPageItem {
|
|
100
|
-
kind?: 'page';
|
|
101
|
-
segment?: string;
|
|
102
|
-
title?: string;
|
|
103
|
-
icon?: React.ReactNode;
|
|
104
|
-
pattern?: string;
|
|
105
|
-
action?: React.ReactNode;
|
|
106
|
-
children?: Navigation;
|
|
107
|
-
}
|
|
108
|
-
interface NavigationSubheaderItem {
|
|
109
|
-
kind: 'header';
|
|
110
|
-
title: string;
|
|
111
|
-
}
|
|
112
|
-
interface NavigationDividerItem {
|
|
113
|
-
kind: 'divider';
|
|
114
|
-
}
|
|
115
|
-
type NavigationItem = NavigationPageItem | NavigationSubheaderItem | NavigationDividerItem;
|
|
116
|
-
type Navigation = NavigationItem[];
|
|
117
|
-
interface Session {
|
|
118
|
-
user?: {
|
|
119
|
-
id?: string | null;
|
|
120
|
-
name?: string | null;
|
|
121
|
-
image?: string | null;
|
|
122
|
-
email?: string | null;
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
interface Authentication {
|
|
126
|
-
signIn: () => void;
|
|
127
|
-
signOut: () => void;
|
|
128
|
-
}
|
|
129
|
-
declare const AuthenticationContext: React.Context<Authentication | null>;
|
|
130
|
-
declare const SessionContext: React.Context<Session | null>;
|
|
131
|
-
type AppTheme = Theme | {
|
|
132
|
-
light: Theme;
|
|
133
|
-
dark: Theme;
|
|
134
|
-
};
|
|
135
|
-
interface AppProviderProps {
|
|
136
|
-
/**
|
|
137
|
-
* The content of the app provider.
|
|
138
|
-
*/
|
|
139
|
-
children: React.ReactNode;
|
|
140
|
-
/**
|
|
141
|
-
* [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.
|
|
142
|
-
* @default createDefaultTheme()
|
|
143
|
-
*/
|
|
144
|
-
theme?: AppTheme;
|
|
145
|
-
/**
|
|
146
|
-
* Branding options for the app.
|
|
147
|
-
* @default null
|
|
148
|
-
*/
|
|
149
|
-
branding?: Branding | null;
|
|
150
|
-
/**
|
|
151
|
-
* Navigation definition for the app. [Find out more](https://mui.com/toolpad/core/react-app-provider/#navigation).
|
|
152
|
-
* @default []
|
|
153
|
-
*/
|
|
154
|
-
navigation?: Navigation;
|
|
155
|
-
/**
|
|
156
|
-
* Router implementation used inside Toolpad components.
|
|
157
|
-
* @default null
|
|
158
|
-
*/
|
|
159
|
-
router?: Router;
|
|
160
|
-
/**
|
|
161
|
-
* Locale text for components
|
|
162
|
-
*/
|
|
163
|
-
localeText?: Partial<LocaleText>;
|
|
164
|
-
/**
|
|
165
|
-
* Session info about the current user.
|
|
166
|
-
* @default null
|
|
167
|
-
*/
|
|
168
|
-
session?: Session | null;
|
|
169
|
-
/**
|
|
170
|
-
* Authentication methods.
|
|
171
|
-
* @default null
|
|
172
|
-
*/
|
|
173
|
-
authentication?: Authentication | null;
|
|
174
|
-
/**
|
|
175
|
-
* The window where the application is rendered.
|
|
176
|
-
* This is needed when rendering the app inside an iframe, for example.
|
|
177
|
-
* @default window
|
|
178
|
-
*/
|
|
179
|
-
window?: Window;
|
|
180
|
-
/**
|
|
181
|
-
* The nonce to be used for inline scripts.
|
|
182
|
-
*/
|
|
183
|
-
nonce?: string;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
*
|
|
187
|
-
* Demos:
|
|
188
|
-
*
|
|
189
|
-
* - [App Provider](https://mui.com/toolpad/core/react-app-provider/)
|
|
190
|
-
* - [Dashboard Layout](https://mui.com/toolpad/core/react-dashboard-layout/)
|
|
191
|
-
*
|
|
192
|
-
* API:
|
|
193
|
-
*
|
|
194
|
-
* - [AppProvider API](https://mui.com/toolpad/core/api/app-provider)
|
|
195
|
-
*/
|
|
196
|
-
declare function AppProvider(props: AppProviderProps): react_jsx_runtime.JSX.Element;
|
|
197
|
-
declare namespace AppProvider {
|
|
198
|
-
var propTypes: any;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export { AppProvider as A, type Branding as B, type LocaleText as L, type Navigate as N, type Router as R, type Session as S, type AppProviderProps as a, type AppTheme as b, type Authentication as c, AuthenticationContext as d, LocalizationContext as e, LocalizationProvider as f, type LocalizationProviderProps as g, type NavigateOptions as h, type Navigation as i, type NavigationDividerItem as j, type NavigationItem as k, type NavigationPageItem as l, type NavigationSubheaderItem as m, SessionContext as n, useLocaleText as u };
|