@applica-software-guru/react-admin 1.5.230 → 1.5.232

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.
@@ -4,6 +4,6 @@ import { PropsWithChildren } from 'react';
4
4
  type ThemeCustomizationProps = PropsWithChildren<{
5
5
  themeOverrides: unknown;
6
6
  }>;
7
- declare function ThemeCustomization({ themeOverrides, children }: ThemeCustomizationProps): import("react/jsx-runtime").JSX.Element;
8
- export { ThemeCustomization, getColors as getThemeColor, getShadow as getThemeShadow };
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,kBAAkB,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,uBAAuB,2CAiEhF;AAED,OAAO,EAAE,kBAAkB,EAAE,SAAS,IAAI,aAAa,EAAE,SAAS,IAAI,cAAc,EAAE,CAAC"}
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
@@ -56,6 +56,7 @@
56
56
  "eslint-plugin-react-hooks": "^4.6.0",
57
57
  "eslint-plugin-simple-import-sort": "^7.0.0",
58
58
  "eslint-plugin-sort-exports": "^0.9.1",
59
+ "file-loader": "^6.2.0",
59
60
  "husky": "^9.0.11",
60
61
  "jsdom": "^22.1.0",
61
62
  "lint-staged": "^13.0.3",
@@ -114,5 +115,5 @@
114
115
  "type": "module",
115
116
  "types": "dist/index.d.ts",
116
117
  "typings": "dist/index.d.ts",
117
- "version": "1.5.230"
118
+ "version": "1.5.232"
118
119
  }
@@ -1,5 +1,5 @@
1
1
  import { ScrollTop } from './components';
2
- import { ThemeCustomization } from './themes';
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
- <ThemeCustomization themeOverrides={theme}>
11
+ <ThemeCustomizationProvider themeOverrides={theme}>
12
12
  <ScrollTop>
13
13
  {/** @ts-ignore */}
14
14
  {children}
15
15
  </ScrollTop>
16
- </ThemeCustomization>
16
+ </ThemeCustomizationProvider>
17
17
  </CoreAdminContext>
18
18
  );
19
19
  }
@@ -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 { ThemeCustomization } from './themes';
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
- <ThemeCustomization themeOverrides={theme}>
132
+ <ThemeCustomizationProvider themeOverrides={theme}>
133
133
  <GenericErrorPage />
134
- </ThemeCustomization>
134
+ </ThemeCustomizationProvider>
135
135
  </ThemeProvider>
136
136
  );
137
137
  }
@@ -1,10 +1,13 @@
1
+ declare module '*.png';
2
+
1
3
  export * from './Admin';
2
4
  export * from './ApplicaAdmin';
3
5
  export * from './components';
4
6
  export * from './hooks';
5
7
  export * from './i18n';
8
+ export * from './themes';
9
+ export * from './types';
6
10
  export * from './utils';
7
-
8
11
  export {
9
12
  ArrayField,
10
13
  ArrayInputContext,
@@ -91,5 +94,3 @@ export {
91
94
  useUpdateMany,
92
95
  withLifecycleCallbacks
93
96
  } from 'react-admin';
94
-
95
- export { ThemeCustomization as ThemeProvider } from './themes';
@@ -13,7 +13,7 @@ import { PropsWithChildren, useMemo } from 'react';
13
13
 
14
14
  type ThemeCustomizationProps = PropsWithChildren<{ themeOverrides: unknown }>;
15
15
 
16
- function ThemeCustomization({ themeOverrides, children }: ThemeCustomizationProps) {
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 { ThemeCustomization, getColors as getThemeColor, getShadow as getThemeShadow };
83
+ export { ThemeCustomizationProvider, getColors as getThemeColor, getShadow as getThemeShadow };
package/tsconfig.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "skipLibCheck": true,
26
26
  "strict": true,
27
27
  "target": "ESNext",
28
- "typeRoots": ["node_modules/@types", "src/index.d.ts"],
28
+ "typeRoots": ["node_modules/@types", "src/assets.d.ts", "src/index.d.ts", "src/types.d.ts"],
29
29
  "useDefineForClassFields": true
30
30
  },
31
31
  "include": ["src"],
package/vite.config.js CHANGED
@@ -44,7 +44,7 @@ export default defineConfig((configEnv) => {
44
44
  build: {
45
45
  sourcemap: true,
46
46
  lib: {
47
- entry: resolve('src', 'index.jsx'),
47
+ entry: resolve('src', 'index.ts'),
48
48
  name: 'react-admin',
49
49
  formats: ['es', 'umd', 'cjs'],
50
50
  fileName: (format) => `react-admin.${format}.js`
File without changes