@m4l/graphics 0.0.23 → 0.0.26
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.
|
@@ -13,28 +13,29 @@ function LocalesProvider({
|
|
|
13
13
|
const [langStorage, setLangStorage] = useLocalStorage("langStorage", "en");
|
|
14
14
|
const {
|
|
15
15
|
host_static_assets,
|
|
16
|
-
|
|
16
|
+
environment_assets
|
|
17
17
|
} = useEnvironment();
|
|
18
18
|
const LANGS = useMemo(() => [{
|
|
19
19
|
label: "English",
|
|
20
20
|
value: "en",
|
|
21
21
|
locale: enLocale,
|
|
22
|
-
icon: `${host_static_assets}/${
|
|
22
|
+
icon: `${host_static_assets}/${environment_assets}/frontend/commons/assets/icons/langs/lang_en.svg`
|
|
23
23
|
}, {
|
|
24
24
|
label: "Espa\xF1ol",
|
|
25
25
|
value: "es",
|
|
26
26
|
locale: esLocale,
|
|
27
|
-
icon: `${host_static_assets}/${
|
|
27
|
+
icon: `${host_static_assets}/${environment_assets}/frontend/commons/assets/icons/langs/lang_es.svg`
|
|
28
28
|
}, {
|
|
29
29
|
label: "French",
|
|
30
30
|
value: "fr",
|
|
31
31
|
locale: frLocale,
|
|
32
|
-
icon: `${host_static_assets}/${
|
|
32
|
+
icon: `${host_static_assets}/${environment_assets}/frontend/commons/assets/icons/langs/lang_fr.svg`
|
|
33
33
|
}], []);
|
|
34
34
|
const [currentLang, setCurrentLang] = useState(LANGS.find((_lang) => _lang.value === langStorage) || LANGS[0]);
|
|
35
35
|
const onChangeLang = (newlang) => {
|
|
36
36
|
setLangStorage(newlang);
|
|
37
37
|
setCurrentLang(LANGS.find((_lang) => _lang.value === newlang) || LANGS[0]);
|
|
38
|
+
console.log("new lagn", newlang, currentLang);
|
|
38
39
|
};
|
|
39
40
|
return /* @__PURE__ */ jsx(LocalesContext.Provider, {
|
|
40
41
|
value: {
|
|
@@ -45,6 +46,9 @@ function LocalesProvider({
|
|
|
45
46
|
children: /* @__PURE__ */ jsx(LocalizationProvider, {
|
|
46
47
|
dateAdapter: AdapterDateFns,
|
|
47
48
|
adapterLocale: currentLang.locale,
|
|
49
|
+
dateFormats: {
|
|
50
|
+
hours24h: "23"
|
|
51
|
+
},
|
|
48
52
|
children
|
|
49
53
|
})
|
|
50
54
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/graphics",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.26",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "M4L Team",
|
|
7
7
|
"scripts": {
|
|
@@ -15,9 +15,11 @@
|
|
|
15
15
|
"format": "npm run prettier:fix && npm run lint:fix"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
+
"@m4l/core": "^0.0.34",
|
|
18
19
|
"@mui/material": "^5.8.6",
|
|
20
|
+
"@mui/x-date-pickers": "^5.0.0-beta.3",
|
|
21
|
+
"date-fns": "^2.29.1",
|
|
19
22
|
"framer-motion": "^6.3.11",
|
|
20
|
-
"nprogress": "^0.2.0",
|
|
21
23
|
"react": ">=18",
|
|
22
24
|
"react-dom": "^18.0.0",
|
|
23
25
|
"react-dropzone": "^14.2.1",
|
|
@@ -28,16 +30,14 @@
|
|
|
28
30
|
"vite-tsconfig-paths": "^3.5.0"
|
|
29
31
|
},
|
|
30
32
|
"peerDependencies": {
|
|
31
|
-
"
|
|
33
|
+
"date-fns": "^2.29.1",
|
|
32
34
|
"react": ">=18",
|
|
33
35
|
"react-dom": "^18.0.0"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
38
|
"@emotion/styled": "^11.9.3",
|
|
37
39
|
"@hookform/resolvers": "^2.9.3",
|
|
38
|
-
"@m4l/core": "^0.0.32",
|
|
39
40
|
"@mui/icons-material": "^5.8.4",
|
|
40
|
-
"@mui/lab": "^5.0.0-alpha.87",
|
|
41
41
|
"@types/node": "^17.0.40",
|
|
42
42
|
"@types/nprogress": "^0.2.0",
|
|
43
43
|
"@types/react": "^18.0.0",
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"@typescript-eslint/eslint-plugin": "^5.27.1",
|
|
46
46
|
"@typescript-eslint/parser": "^5.27.1",
|
|
47
47
|
"@vitejs/plugin-react": "^1.3.0",
|
|
48
|
-
"date-fns": "^2.28.0",
|
|
49
48
|
"eslint": "^8.17.0",
|
|
50
49
|
"eslint-config-prettier": "^8.5.0",
|
|
51
50
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ThemeOptions, Theme } from '@mui/material/styles';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
export declare type EventFunListener = (...args: any[]) => void;
|
|
4
|
-
export interface HostThemeType {
|
|
5
|
-
hostThemeOptions: ThemeOptions;
|
|
6
|
-
fnComponentsOverrides: (theme: Theme) => any;
|
|
7
|
-
}
|
|
8
|
-
export interface HostThemeProviderProps extends HostThemeType {
|
|
9
|
-
isMicroFrontEnd: boolean;
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare type HostThemeContextType = HostThemeType;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Theme } from '@mui/material/styles';
|
|
2
|
-
export default function SvgIcon(_theme: Theme): {
|
|
3
|
-
MuiSvgIcon: {
|
|
4
|
-
styleOverrides: {
|
|
5
|
-
fontSizeSmall: {
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
fontSize: string;
|
|
9
|
-
};
|
|
10
|
-
fontSizeLarge: {
|
|
11
|
-
width: number;
|
|
12
|
-
height: number;
|
|
13
|
-
fontSize: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|