@m4l/components 0.1.1 → 0.1.2

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.
@@ -1108,7 +1108,6 @@ function ApplyedFilter(props) {
1108
1108
  host_static_assets,
1109
1109
  environment_assets
1110
1110
  } = useEnvironment();
1111
- useModuleDictionary();
1112
1111
  const field = useMemo(() => {
1113
1112
  return getFieldByName(fieldName);
1114
1113
  }, [getFieldByName]);
@@ -1336,7 +1335,6 @@ function InputFilter() {
1336
1335
  closeMenuFields,
1337
1336
  hidePopupEdit
1338
1337
  } = useBase();
1339
- useModuleDictionary();
1340
1338
  const [valueFilter, setValueFilter] = useState("");
1341
1339
  const finalFields = useMemo(() => {
1342
1340
  if (!openAnchorEl) {
@@ -1,8 +1,18 @@
1
1
  import { useState } from "react";
2
- import { Skeleton, IconButton } from "@mui/material";
2
+ import { Skeleton, IconButton, Stack, MenuItem } from "@mui/material";
3
3
  import { I as Image } from "../Image/index.js";
4
4
  import { useLocales } from "@m4l/graphics";
5
- import { jsx, Fragment } from "react/jsx-runtime";
5
+ import "@m4l/core";
6
+ import "../Icon/index.js";
7
+ import "@mui/material/styles";
8
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
9
+ import "react-router-dom";
10
+ import "@mui/lab";
11
+ import "../mui_extended/LoadingButton/index.js";
12
+ import { M as MenuPopover } from "../mui_extended/MenuPopover/index.js";
13
+ import "../CommonActions/components/Actions/index.js";
14
+ import "../mui_extended/Pager/index.js";
15
+ import "../mui_extended/Tab/index.js";
6
16
  function LanguagePopover(props) {
7
17
  const {
8
18
  isSkeleton
@@ -16,6 +26,9 @@ function LanguagePopover(props) {
16
26
  const handleOpen = (event) => {
17
27
  setOpen(event.currentTarget);
18
28
  };
29
+ const handleClose = () => {
30
+ setOpen(null);
31
+ };
19
32
  if (isSkeleton) {
20
33
  return /* @__PURE__ */ jsx(Skeleton, {
21
34
  variant: "circular",
@@ -23,8 +36,8 @@ function LanguagePopover(props) {
23
36
  height: 20
24
37
  });
25
38
  }
26
- return /* @__PURE__ */ jsx(Fragment, {
27
- children: /* @__PURE__ */ jsx(IconButton, {
39
+ return /* @__PURE__ */ jsxs(Fragment, {
40
+ children: [/* @__PURE__ */ jsx(IconButton, {
28
41
  onClick: handleOpen,
29
42
  sx: {
30
43
  width: 40,
@@ -37,7 +50,39 @@ function LanguagePopover(props) {
37
50
  src: currentLang.icon,
38
51
  alt: currentLang.label
39
52
  })
40
- })
53
+ }), /* @__PURE__ */ jsx(MenuPopover, {
54
+ open: Boolean(open),
55
+ anchorEl: open,
56
+ onClose: handleClose,
57
+ sx: {
58
+ mt: 1.5,
59
+ ml: 0.75,
60
+ width: 180,
61
+ "& .MuiMenuItem-root": {
62
+ px: 1,
63
+ typography: "body2",
64
+ borderRadius: 0.75
65
+ }
66
+ },
67
+ children: /* @__PURE__ */ jsx(Stack, {
68
+ spacing: 0.75,
69
+ children: allLang.map((option) => /* @__PURE__ */ jsxs(MenuItem, {
70
+ selected: option.value === currentLang.value,
71
+ onClick: () => {
72
+ onChangeLang(option.value);
73
+ handleClose();
74
+ },
75
+ children: [/* @__PURE__ */ jsx(Image, {
76
+ alt: option.label,
77
+ src: option.icon,
78
+ sx: {
79
+ width: 28,
80
+ mr: 2
81
+ }
82
+ }), option.label]
83
+ }, option.value))
84
+ })
85
+ })]
41
86
  });
42
87
  }
43
88
  export { LanguagePopover as L };
@@ -1,5 +1,5 @@
1
- import { styled, useTheme } from "@mui/material/styles";
2
1
  import { Skeleton } from "@mui/material";
2
+ import { styled } from "@mui/material/styles";
3
3
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
4
4
  import { I as Icon } from "../Icon/index.js";
5
5
  const WrapperPaper = styled("div")(({
@@ -93,7 +93,6 @@ function PaperForm(props) {
93
93
  children,
94
94
  isSkeleton = false
95
95
  } = props;
96
- useTheme();
97
96
  return /* @__PURE__ */ jsx(WrapperPaper, {
98
97
  id: "ContainerPropertyValue",
99
98
  children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, {
@@ -104,9 +104,7 @@ const WrapperImage = styled("div")(({
104
104
  alignItems: "center",
105
105
  maxWidth: theme.spacing(20)
106
106
  }));
107
- styled("div")(({
108
- theme
109
- }) => ({
107
+ styled("div")(() => ({
110
108
  width: "100%",
111
109
  height: "100%",
112
110
  position: "absolute",
@@ -204,9 +202,7 @@ function UploadImage({
204
202
  }), helperText && helperText]
205
203
  });
206
204
  }
207
- const WrapperRHFUploadImage = styled$1("div")(({
208
- theme
209
- }) => ({
205
+ const WrapperRHFUploadImage = styled$1("div")(() => ({
210
206
  width: "inherit",
211
207
  height: "inherit",
212
208
  padding: "1px"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "license": "UNLICENSED",
5
5
  "dependencies": {
6
6
  "@m4l/core": "*",