@applica-software-guru/react-admin 1.5.230 → 1.5.231
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/react-admin.cjs.js +42 -42
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +4 -1
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +48 -48
- package/dist/react-admin.umd.js.map +1 -1
- package/dist/themes/index.d.ts +2 -2
- package/dist/themes/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/AdminContext.tsx +3 -3
- package/src/ApplicaAdmin.tsx +3 -3
- package/src/index.jsx +1 -2
- package/src/themes/index.tsx +2 -2
package/dist/themes/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ import { PropsWithChildren } from 'react';
|
|
|
4
4
|
type ThemeCustomizationProps = PropsWithChildren<{
|
|
5
5
|
themeOverrides: unknown;
|
|
6
6
|
}>;
|
|
7
|
-
declare function
|
|
8
|
-
export {
|
|
7
|
+
declare function ThemeCustomizationProvider({ themeOverrides, children }: ThemeCustomizationProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { ThemeCustomizationProvider, getColors as getThemeColor, getShadow as getThemeShadow };
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAUxC,OAAO,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAEnD,KAAK,uBAAuB,GAAG,iBAAiB,CAAC;IAAE,cAAc,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE9E,iBAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAUxC,OAAO,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAEnD,KAAK,uBAAuB,GAAG,iBAAiB,CAAC;IAAE,cAAc,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE9E,iBAAS,0BAA0B,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,uBAAuB,2CAiExF;AAED,OAAO,EAAE,0BAA0B,EAAE,SAAS,IAAI,aAAa,EAAE,SAAS,IAAI,cAAc,EAAE,CAAC"}
|
package/package.json
CHANGED
package/src/AdminContext.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScrollTop } from './components';
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeCustomizationProvider } from './themes';
|
|
3
3
|
import { CoreAdminContext, CoreAdminContextProps } from 'react-admin';
|
|
4
4
|
|
|
5
5
|
type AdminContextProps = CoreAdminContextProps & {
|
|
@@ -8,12 +8,12 @@ type AdminContextProps = CoreAdminContextProps & {
|
|
|
8
8
|
function AdminContext({ children, theme, ...props }: AdminContextProps): JSX.Element {
|
|
9
9
|
return (
|
|
10
10
|
<CoreAdminContext {...props}>
|
|
11
|
-
<
|
|
11
|
+
<ThemeCustomizationProvider themeOverrides={theme}>
|
|
12
12
|
<ScrollTop>
|
|
13
13
|
{/** @ts-ignore */}
|
|
14
14
|
{children}
|
|
15
15
|
</ScrollTop>
|
|
16
|
-
</
|
|
16
|
+
</ThemeCustomizationProvider>
|
|
17
17
|
</CoreAdminContext>
|
|
18
18
|
);
|
|
19
19
|
}
|
package/src/ApplicaAdmin.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Admin } from './Admin';
|
|
2
2
|
import { CatchResult, IErrorEventHandler, useErrorEventCatcher } from './dev';
|
|
3
3
|
import { useI18nProvider } from './i18n';
|
|
4
|
-
import {
|
|
4
|
+
import { ThemeCustomizationProvider } from './themes';
|
|
5
5
|
import {
|
|
6
6
|
AuthBackground,
|
|
7
7
|
GenericErrorPage,
|
|
@@ -129,9 +129,9 @@ function ApplicaAdmin({
|
|
|
129
129
|
} else if (i18nProvider.error) {
|
|
130
130
|
return (
|
|
131
131
|
<ThemeProvider initialConfig={themeConfig}>
|
|
132
|
-
<
|
|
132
|
+
<ThemeCustomizationProvider themeOverrides={theme}>
|
|
133
133
|
<GenericErrorPage />
|
|
134
|
-
</
|
|
134
|
+
</ThemeCustomizationProvider>
|
|
135
135
|
</ThemeProvider>
|
|
136
136
|
);
|
|
137
137
|
}
|
package/src/index.jsx
CHANGED
|
@@ -3,6 +3,7 @@ export * from './ApplicaAdmin';
|
|
|
3
3
|
export * from './components';
|
|
4
4
|
export * from './hooks';
|
|
5
5
|
export * from './i18n';
|
|
6
|
+
export * from './themes';
|
|
6
7
|
export * from './utils';
|
|
7
8
|
|
|
8
9
|
export {
|
|
@@ -91,5 +92,3 @@ export {
|
|
|
91
92
|
useUpdateMany,
|
|
92
93
|
withLifecycleCallbacks
|
|
93
94
|
} from 'react-admin';
|
|
94
|
-
|
|
95
|
-
export { ThemeCustomization as ThemeProvider } from './themes';
|
package/src/themes/index.tsx
CHANGED
|
@@ -13,7 +13,7 @@ import { PropsWithChildren, useMemo } from 'react';
|
|
|
13
13
|
|
|
14
14
|
type ThemeCustomizationProps = PropsWithChildren<{ themeOverrides: unknown }>;
|
|
15
15
|
|
|
16
|
-
function
|
|
16
|
+
function ThemeCustomizationProvider({ themeOverrides, children }: ThemeCustomizationProps) {
|
|
17
17
|
const _themeConfig = useThemeConfig();
|
|
18
18
|
const { themeDirection, mode, presetColor, fontFamily } = _themeConfig;
|
|
19
19
|
|
|
@@ -80,4 +80,4 @@ function ThemeCustomization({ themeOverrides, children }: ThemeCustomizationProp
|
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
export {
|
|
83
|
+
export { ThemeCustomizationProvider, getColors as getThemeColor, getShadow as getThemeShadow };
|