@m4l/components 0.0.6 → 0.0.7
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/components/NoItemSelected/dictionary.d.ts +3 -0
- package/dist/components/NoItemSelected/index.d.ts +2 -0
- package/dist/components/NoItemSelected/index.js +76 -0
- package/dist/components/NoItemSelected/styles.d.ts +5 -0
- package/dist/components/NoItemSelected/types.d.ts +5 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/vendor.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
2
|
+
import { styled } from "@mui/material/styles";
|
|
3
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
|
+
const WrapperNoItemSelected = styled("div")(({
|
|
5
|
+
theme
|
|
6
|
+
}) => ({
|
|
7
|
+
width: "100%",
|
|
8
|
+
height: "100%",
|
|
9
|
+
display: "flex",
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
justifyContent: "center",
|
|
13
|
+
overflow: "auto",
|
|
14
|
+
padding: theme.spacing(3)
|
|
15
|
+
}));
|
|
16
|
+
const Image = styled("span", {
|
|
17
|
+
shouldForwardProp: (prop) => prop !== "src"
|
|
18
|
+
})(({
|
|
19
|
+
src,
|
|
20
|
+
theme
|
|
21
|
+
}) => ({
|
|
22
|
+
zIndex: 9,
|
|
23
|
+
top: 0,
|
|
24
|
+
height: "100%",
|
|
25
|
+
width: "100%",
|
|
26
|
+
maxWidth: "500px",
|
|
27
|
+
maxHeight: "200px",
|
|
28
|
+
".split_horizontal &": {
|
|
29
|
+
bruces: "sss",
|
|
30
|
+
minWidth: "150px"
|
|
31
|
+
},
|
|
32
|
+
".split_vertical &": {
|
|
33
|
+
bruces: "sss",
|
|
34
|
+
minHeight: "150px"
|
|
35
|
+
},
|
|
36
|
+
padding: `0px ${theme.spacing(1)} ${theme.spacing(1)} ${theme.spacing(1)}`,
|
|
37
|
+
display: "inline-block",
|
|
38
|
+
backgroundColor: theme.palette.divider,
|
|
39
|
+
justifyContent: "center",
|
|
40
|
+
mask: `url(${src}) no-repeat center / contain`,
|
|
41
|
+
WebkitMask: `url(${src}) no-repeat center / contain`
|
|
42
|
+
}));
|
|
43
|
+
const Label = styled("span")(({
|
|
44
|
+
theme
|
|
45
|
+
}) => ({
|
|
46
|
+
...theme.typography.body2,
|
|
47
|
+
padding: `${theme.spacing(1.5)} ${theme.spacing(1)} ${theme.spacing(1)} ${theme.spacing(1)}`,
|
|
48
|
+
color: theme.palette.text.primary
|
|
49
|
+
}));
|
|
50
|
+
function NoItemSelected() {
|
|
51
|
+
const {
|
|
52
|
+
host_static_assets,
|
|
53
|
+
environment
|
|
54
|
+
} = useEnvironment();
|
|
55
|
+
const {
|
|
56
|
+
getLabel
|
|
57
|
+
} = useModuleDictionary();
|
|
58
|
+
const src = `${host_static_assets}/${environment}/frontend/components/no_item_selected/assets/icons/no_selected.svg`;
|
|
59
|
+
return /* @__PURE__ */ jsxs(WrapperNoItemSelected, {
|
|
60
|
+
id: "Wrapper",
|
|
61
|
+
children: [/* @__PURE__ */ jsx(Image, {
|
|
62
|
+
src
|
|
63
|
+
}), /* @__PURE__ */ jsx(Label, {
|
|
64
|
+
children: getLabel("no_item_selected.message")
|
|
65
|
+
})]
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function getNoItemSelectedComponentsDictionary() {
|
|
69
|
+
return ["no_item_selected"];
|
|
70
|
+
}
|
|
71
|
+
const defaultNoItemSelectedDictionary = {
|
|
72
|
+
no_item_selected: {
|
|
73
|
+
message: "Please select a item to show detail"
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
export { NoItemSelected as N, defaultNoItemSelectedDictionary as d, getNoItemSelectedComponentsDictionary as g };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ImageProps } from './types';
|
|
3
|
+
export declare const WrapperNoItemSelected: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
|
+
export declare const Image: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & ImageProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
5
|
+
export declare const Label: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -7,6 +7,8 @@ export * from '../components/FormActions';
|
|
|
7
7
|
export * from '../components/FormActions/dictionary';
|
|
8
8
|
export * from '../components/ModalDialog';
|
|
9
9
|
export * from '../components/ModalDialog/dictionary';
|
|
10
|
+
export * from '../components/NoItemSelected';
|
|
11
|
+
export * from '../components/NoItemSelected/dictionary';
|
|
10
12
|
export * from '../components/Resizeable';
|
|
11
13
|
export * from '../components/SplitLayout';
|
|
12
14
|
export type { SplitPosition } from '../components/SplitLayout/types';
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export { a as DataGrid, d as defaultGridDictionary, g as getGridComponentsDictio
|
|
|
8
8
|
export { O as ObjectLogs, d as defaultObjectLogDictionary, g as getObjectLogsComponentsDictionary } from "./components/ObjectLogs/index.js";
|
|
9
9
|
export { F as FormActions, d as defaultActionsDictionary, g as getActionnsComponentsDictionary } from "./components/FormActions/index.js";
|
|
10
10
|
export { M as ModalDialog, d as defaultModalDialogDictionary, g as getModalDialogComponentsDictionary } from "./components/ModalDialog/index.js";
|
|
11
|
+
export { N as NoItemSelected, d as defaultNoItemSelectedDictionary, g as getNoItemSelectedComponentsDictionary } from "./components/NoItemSelected/index.js";
|
|
11
12
|
export { R as Resizeable } from "./components/Resizeable/index.js";
|
|
12
13
|
export { S as SplitLayout } from "./components/SplitLayout/index.js";
|
|
13
14
|
export { M as ModalContext, a as ModalProvider } from "./contexts/ModalContext/index.js";
|
package/dist/vendor.js
CHANGED
|
@@ -23,6 +23,7 @@ import "./components/FormActions/index.js";
|
|
|
23
23
|
import "./react-draggable.js";
|
|
24
24
|
import "./components/ModalDialog/index.js";
|
|
25
25
|
import "./components/Resizeable/index.js";
|
|
26
|
+
import "./components/NoItemSelected/index.js";
|
|
26
27
|
import "./react-splitter-layout.js";
|
|
27
28
|
import "./components/SplitLayout/index.js";
|
|
28
29
|
import "./components/mui_extended/BoxIcon/index.js";
|