@hitachivantara/uikit-cli 6.0.3 → 6.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-cli",
3
- "version": "6.0.3",
3
+ "version": "6.0.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "author": "Hitachi Vantara UI Kit Team",
@@ -44,5 +44,5 @@
44
44
  "access": "public",
45
45
  "directory": "package"
46
46
  },
47
- "gitHead": "3f10053759d187946255aede1c25203f4fea7940"
47
+ "gitHead": "4b588056f4226feaedfa7fe4333225358436ccf2"
48
48
  }
@@ -19,8 +19,8 @@
19
19
  "@emotion/css": "^11.10.6",
20
20
  "@emotion/react": "^11.10.6",
21
21
  "@emotion/styled": "^11.10.6",
22
- "@hitachivantara/uikit-react-core": "^6.0.0-next.0",
23
- "@hitachivantara/uikit-react-icons": "^6.0.0-next.0",
22
+ "@hitachivantara/uikit-react-core": "^6.0.0",
23
+ "@hitachivantara/uikit-react-icons": "^6.0.0",
24
24
  "@mui/material": "^7.0.2",
25
25
  "i18next": "^23.7.8",
26
26
  "i18next-browser-languagedetector": "^7.0.1",
@@ -32,9 +32,9 @@
32
32
  "swr": "^2.2.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@hitachivantara/app-shell-vite-plugin": "^2.0.0-next.0",
35
+ "@hitachivantara/app-shell-vite-plugin": "^2.0.0",
36
36
  "@hitachivantara/uikit-config": "^0.5.1",
37
- "@hitachivantara/uikit-uno-preset": "^1.0.0-next.0",
37
+ "@hitachivantara/uikit-uno-preset": "^1.0.0",
38
38
  "@testing-library/jest-dom": "^6.1.5",
39
39
  "@testing-library/react": "^14.0.0",
40
40
  "@testing-library/user-event": "^14.4.3",
@@ -4,25 +4,20 @@ import { createInstance, type i18n } from "i18next";
4
4
  import LanguageDetector from "i18next-browser-languagedetector";
5
5
  import Backend, { type HttpBackendOptions } from "i18next-http-backend";
6
6
 
7
- const initAppI18n = (baseUrl: string) => {
8
- const i18nInstance: i18n = createInstance();
7
+ const initAppI18n = (baseUrl: string): i18n => {
8
+ const i18nInstance = createInstance();
9
9
 
10
10
  const loadPath = `${baseUrl}locales/{{lng}}/{{ns}}.json`;
11
11
 
12
+ // learn more: https://react.i18next.com/latest/using-with-hooks#configure-i18next
12
13
  i18nInstance
13
- // load translation using xhr -> see /public/locales
14
- // learn more: https://github.com/i18next/i18next-xhr-backend
15
14
  .use(Backend)
16
- // detect user language
17
- // learn more: https://github.com/i18next/i18next-browser-languageDetector
18
15
  .use(LanguageDetector)
19
- // pass the i18n instance to react-i18next.
20
16
  .use(initReactI18next)
21
- // init i18next
22
- // for all options read: https://www.i18next.com/overview/configuration-options
23
17
  .init<HttpBackendOptions>({
24
18
  fallbackLng: "en",
25
- supportedLngs: ["en"],
19
+ // enable explicit declaration to avoid fetching non-existing `lng`s
20
+ // supportedLngs: ["en"],
26
21
  backend: {
27
22
  loadPath,
28
23
  },
@@ -36,9 +31,8 @@ const initAppI18n = (baseUrl: string) => {
36
31
  };
37
32
 
38
33
  export const useI18nInstance = () => {
39
- const moduleId = "@hv-apps/uikit-app";
40
- return useMemo(
41
- () => initAppI18n(import.meta.resolve?.(`${moduleId}/`) || ""),
42
- [moduleId],
43
- );
34
+ return useMemo(() => {
35
+ const moduleId = "@hv-apps/uikit-app";
36
+ return initAppI18n(import.meta.resolve?.(`${moduleId}/`) || "");
37
+ }, []);
44
38
  };
@@ -15,7 +15,9 @@ export function withProvider<
15
15
  const ComponentWithProvider: React.FC<P> = (props) => {
16
16
  return (
17
17
  <Suspense fallback={null}>
18
- <WrappedComponent {...props} />
18
+ <Provider>
19
+ <WrappedComponent {...props} />
20
+ </Provider>
19
21
  </Suspense>
20
22
  );
21
23
  };
@@ -1 +1,2 @@
1
1
  /// <reference types="vite/client" />
2
+ /// <reference types="vitest/globals" />
@@ -19,8 +19,8 @@
19
19
  "@emotion/css": "^11.10.6",
20
20
  "@emotion/react": "^11.10.6",
21
21
  "@emotion/styled": "^11.10.6",
22
- "@hitachivantara/uikit-react-core": "^6.0.0-next.0",
23
- "@hitachivantara/uikit-react-icons": "^6.0.0-next.0",
22
+ "@hitachivantara/uikit-react-core": "^6.0.0",
23
+ "@hitachivantara/uikit-react-icons": "^6.0.0",
24
24
  "@mui/material": "^7.0.2",
25
25
  "i18next": "^22.4.10",
26
26
  "i18next-browser-languagedetector": "^7.0.1",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@hitachivantara/uikit-config": "^0.5.1",
36
- "@hitachivantara/uikit-uno-preset": "^1.0.0-next.0",
36
+ "@hitachivantara/uikit-uno-preset": "^1.0.0",
37
37
  "@testing-library/jest-dom": "^6.1.5",
38
38
  "@testing-library/react": "^14.0.0",
39
39
  "@testing-library/user-event": "^14.4.3",
@@ -1 +1,2 @@
1
1
  /// <reference types="vite/client" />
2
+ /// <reference types="vitest/globals" />
@@ -1,8 +0,0 @@
1
- import type { Theme } from "@mui/material/styles";
2
-
3
- // makeStyles is now exported from @mui/styles package which does not know about Theme
4
- // we need to augment the DefaultTheme (empty object) in @mui/styles with Theme from the core.
5
- declare module "@mui/private-theming" {
6
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
7
- interface DefaultTheme extends Theme {}
8
- }
@@ -1,8 +0,0 @@
1
- import type { Theme } from "@mui/material/styles";
2
-
3
- // makeStyles is now exported from @mui/styles package which does not know about Theme
4
- // we need to augment the DefaultTheme (empty object) in @mui/styles with Theme from the core.
5
- declare module "@mui/private-theming" {
6
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
7
- interface DefaultTheme extends Theme {}
8
- }