@m4l/components 0.1.7 → 0.1.9
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/commonjs.js +1 -1
- package/components/CommonActions/components/Actions/index.js +42 -41
- package/components/DataGrid/components/editors/TextEditor/index.d.ts +6 -0
- package/components/DataGrid/formatters/columnNestedValueFormatter/index.d.ts +3 -0
- package/components/DataGrid/formatters/columnNestedValueFormatter/types.d.ts +5 -0
- package/components/DataGrid/formatters/columnPointsFormatter/index.d.ts +3 -0
- package/components/DataGrid/formatters/columnPointsFormatter/types.d.ts +6 -0
- package/components/DataGrid/formatters/columnUncertaintyFormatter/index.d.ts +3 -0
- package/components/DataGrid/formatters/columnUncertaintyFormatter/types.d.ts +7 -0
- package/components/DataGrid/formatters/index.d.ts +4 -0
- package/components/DataGrid/index.js +66 -4
- package/components/DataGrid/types.d.ts +5 -2
- package/components/DynamicFilter/index.js +8 -7
- package/components/ErrorLabel/index.d.ts +3 -0
- package/components/ErrorLabel/styles.d.ts +2 -0
- package/components/ErrorLabel/types.d.ts +3 -0
- package/components/LanguagePopover/index.js +3 -1
- package/components/ModalDialog/index.js +1 -1
- package/components/NoItemSelected/index.d.ts +1 -2
- package/components/NoItemSelected/index.js +3 -5
- package/components/PaperForm/components/Header.d.ts +3 -0
- package/components/PaperForm/index.js +39 -47
- package/components/PaperForm/styles.d.ts +2 -3
- package/components/PaperForm/types.d.ts +2 -2
- package/components/PropertyValue/index.js +38 -26
- package/components/PropertyValue/styles.d.ts +3 -4
- package/components/PropertyValue/types.d.ts +8 -9
- package/components/animate/variants/bounce.d.ts +1 -1
- package/components/animate/variants/container.d.ts +1 -1
- package/components/animate/variants/fade.d.ts +1 -1
- package/components/animate/variants/transition.d.ts +3 -3
- package/components/formatters/BooleanFormatter/index.js +4 -3
- package/components/formatters/BooleanFormatter/types.d.ts +1 -1
- package/components/formatters/PointsFormatter/index.d.ts +3 -0
- package/components/formatters/PointsFormatter/types.d.ts +7 -0
- package/components/formatters/PriceFormatter/index.d.ts +3 -0
- package/components/formatters/PriceFormatter/types.d.ts +5 -0
- package/components/formatters/UncertaintyFormatter/index.d.ts +3 -0
- package/components/formatters/UncertaintyFormatter/types.d.ts +14 -0
- package/components/formatters/index.d.ts +4 -0
- package/components/formatters/index.js +100 -4
- package/components/hook-form/FormProvider/index.js +19 -7
- package/components/hook-form/FormProvider/types.d.ts +4 -1
- package/components/hook-form/RHFAutocomplete/index.js +4 -2
- package/components/hook-form/RHFAutocomplete/types.d.ts +0 -1
- package/components/hook-form/RHFAutocompleteAsync/index.js +15 -5
- package/components/hook-form/RHFAutocompleteAsync/types.d.ts +1 -2
- package/components/hook-form/RHFCheckbox/index.d.ts +2 -1
- package/components/hook-form/RHFCheckbox/index.js +51 -30
- package/components/hook-form/RHFCheckbox/styles.d.ts +12 -1
- package/components/hook-form/RHFCheckbox/types.d.ts +0 -1
- package/components/hook-form/RHFDateTime/index.js +2 -2
- package/components/hook-form/RHFDateTime/types.d.ts +0 -1
- package/components/hook-form/RHFPeriod/dictionary.d.ts +3 -0
- package/components/hook-form/RHFPeriod/index.d.ts +3 -0
- package/components/hook-form/RHFPeriod/styles.d.ts +6 -0
- package/components/hook-form/RHFPeriod/types.d.ts +29 -0
- package/components/hook-form/RHFTextField/index.js +41 -17
- package/components/hook-form/RHFTextField/types.d.ts +0 -1
- package/components/hook-form/RHFUpload/index.js +5 -5
- package/components/hook-form/index.d.ts +4 -0
- package/components/index.d.ts +5 -1
- package/components/mui_extended/Accordion/components/AccordionLabel.d.ts +3 -0
- package/components/mui_extended/Accordion/index.js +74 -14
- package/components/mui_extended/Accordion/styles.d.ts +4 -0
- package/components/mui_extended/Accordion/types.d.ts +4 -1
- package/components/mui_extended/Button/index.js +25 -25
- package/components/mui_extended/Tab/index.d.ts +2 -1
- package/components/mui_extended/Tab/index.js +2 -1
- package/components/mui_extended/Tab/types.d.ts +5 -0
- package/components/mui_extended/index.d.ts +1 -0
- package/hooks/index.d.ts +2 -0
- package/hooks/useFormAddEdit/index.d.ts +6 -0
- package/hooks/useFormAddEdit/types.d.ts +8 -0
- package/index.d.ts +1 -1
- package/index.js +290 -20
- package/package.json +3 -3
- package/utils/index.js +0 -1
- package/components/NoItemSelected/types.d.ts +0 -10
- package/components/PaperForm/skeleton.d.ts +0 -6
- package/components/hook-form/RHFCheckbox/skeleton.d.ts +0 -2
package/commonjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import "react-dom";
|
|
3
2
|
import "prop-types";
|
|
3
|
+
import "react-dom";
|
|
4
4
|
import "clsx";
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
6
6
|
function getDefaultExportFromCjs(x) {
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { styled } from "@mui/material/styles";
|
|
2
|
-
import { I as IconButton$1 } from "../../../mui_extended/IconButton/index.js";
|
|
3
3
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import "@mui/material/Button";
|
|
5
|
+
import "../../../mui_extended/Button/index.js";
|
|
6
|
+
import "react-hook-form";
|
|
7
|
+
import "react-router-dom";
|
|
7
8
|
import { IconButton, Tooltip, MenuItem, Skeleton, Checkbox } from "@mui/material";
|
|
8
9
|
import { useState, useMemo, forwardRef, useRef, useImperativeHandle, useEffect, useCallback } from "react";
|
|
10
|
+
import "../../../../contexts/ModalContext/index.js";
|
|
11
|
+
import "@mui/lab";
|
|
12
|
+
import { I as IconButton$1 } from "../../../mui_extended/IconButton/index.js";
|
|
13
|
+
import { u as useBase, a as useFilters, O as OriginalDataGridWrapperStyled } from "../../../DataGrid/index.js";
|
|
14
|
+
import { P as Pager } from "../../../mui_extended/Pager/index.js";
|
|
9
15
|
import { D as DataGrid$1 } from "../../../../react-data-grid.js";
|
|
10
16
|
import { u as useModal } from "../../../../hooks/useModal/index.js";
|
|
11
17
|
import { A as ActionCancel } from "../ActionCancel/index.js";
|
|
@@ -13,12 +19,38 @@ import { A as ActionIntro } from "../ActionIntro/index.js";
|
|
|
13
19
|
import { M as MenuPopover } from "../../../mui_extended/MenuPopover/index.js";
|
|
14
20
|
import { I as Icon } from "../../../Icon/index.js";
|
|
15
21
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
const WrapperStandarActions = styled("div")(({
|
|
23
|
+
theme
|
|
24
|
+
}) => ({
|
|
25
|
+
paddingTop: theme.spacing(3),
|
|
26
|
+
margin: theme.spacing(0, 1.5),
|
|
27
|
+
display: "flex",
|
|
28
|
+
flexDirection: "row",
|
|
29
|
+
justifyContent: "flex-end",
|
|
30
|
+
"& > button": {
|
|
31
|
+
marginLeft: "10px"
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
const Actions$1 = (props) => {
|
|
35
|
+
const {
|
|
36
|
+
children
|
|
37
|
+
} = props;
|
|
38
|
+
return /* @__PURE__ */ jsx(WrapperStandarActions, {
|
|
39
|
+
id: "WrapperStandarActions",
|
|
40
|
+
children
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
function getCommonActionsDictionary() {
|
|
44
|
+
return ["common_actions"];
|
|
45
|
+
}
|
|
46
|
+
const defaultCommonActionsDictionary = {
|
|
47
|
+
common_actions: {
|
|
48
|
+
cancel: "Cancel",
|
|
49
|
+
intro: "Intro",
|
|
50
|
+
confirm_quit_title: "Confirm",
|
|
51
|
+
confirm_quit_msg: "Are your sure exit?"
|
|
52
|
+
}
|
|
53
|
+
};
|
|
22
54
|
const WrapperMenuActions = styled(IconButton)(() => ({}));
|
|
23
55
|
const LabelMemuItem = styled("div")(({
|
|
24
56
|
theme
|
|
@@ -574,26 +606,6 @@ const SKTWrapperColumnsSettings = styled("div")(({ theme }) => ({
|
|
|
574
606
|
minWidth: theme.spacing(3.75),
|
|
575
607
|
height: theme.spacing(3.75)
|
|
576
608
|
}));
|
|
577
|
-
const WrapperStandarActions = styled("div")(({
|
|
578
|
-
theme
|
|
579
|
-
}) => ({
|
|
580
|
-
paddingTop: theme.spacing(3),
|
|
581
|
-
display: "flex",
|
|
582
|
-
flexDirection: "row",
|
|
583
|
-
justifyContent: "flex-end",
|
|
584
|
-
"& > button": {
|
|
585
|
-
marginLeft: "10px"
|
|
586
|
-
}
|
|
587
|
-
}));
|
|
588
|
-
const Actions$1 = (props) => {
|
|
589
|
-
const {
|
|
590
|
-
children
|
|
591
|
-
} = props;
|
|
592
|
-
return /* @__PURE__ */ jsx(WrapperStandarActions, {
|
|
593
|
-
id: "WrapperStandarActions",
|
|
594
|
-
children
|
|
595
|
-
});
|
|
596
|
-
};
|
|
597
609
|
function Settings() {
|
|
598
610
|
const {
|
|
599
611
|
openModal,
|
|
@@ -844,15 +856,4 @@ function Actions(props) {
|
|
|
844
856
|
})]
|
|
845
857
|
});
|
|
846
858
|
}
|
|
847
|
-
function getCommonActionsDictionary() {
|
|
848
|
-
return ["common_actions"];
|
|
849
|
-
}
|
|
850
|
-
const defaultCommonActionsDictionary = {
|
|
851
|
-
common_actions: {
|
|
852
|
-
cancel: "Cancel",
|
|
853
|
-
intro: "Intro",
|
|
854
|
-
confirm_quit_title: "Confirm",
|
|
855
|
-
confirm_quit_msg: "Are your sure exit?"
|
|
856
|
-
}
|
|
857
|
-
};
|
|
858
859
|
export { ActionsColumn as A, LabelMemuItem as L, MenuActions as M, PagerActions as P, Actions as a, Actions$1 as b, defaultCommonActionsDictionary as d, getCommonActionsDictionary as g };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { EditorProps } from 'react-data-grid';
|
|
3
|
+
export declare const Input: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|
|
4
|
+
export declare function TextEditor<TRow, TSummaryRow>({ row, column, onRowChange, onClose, }: EditorProps<TRow, TSummaryRow>): JSX.Element;
|
|
5
|
+
export declare function NumberEditor<TRow, TSummaryRow>({ row, column, onRowChange, onClose, }: EditorProps<TRow, TSummaryRow>): JSX.Element;
|
|
6
|
+
export default TextEditor;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { columnUncertaintyFormatter } from './columnUncertaintyFormatter';
|
|
2
|
+
export { columnPointsFormatter } from './columnPointsFormatter';
|
|
3
|
+
export { columnNestedValueFormatter } from './columnNestedValueFormatter';
|
|
4
|
+
export type { ColumnUncertaintyFormatterProps } from './columnUncertaintyFormatter/types';
|
|
@@ -5,7 +5,7 @@ import { useDrag, useDrop, DndProvider } from "react-dnd";
|
|
|
5
5
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
6
6
|
import { SvgIcon, Checkbox, InputBase, Skeleton } from "@mui/material";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { voidFunction, useModuleDictionary } from "@m4l/core";
|
|
8
|
+
import { voidFunction, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
9
9
|
import { A as ActionsColumn, a as Actions } from "../CommonActions/components/Actions/index.js";
|
|
10
10
|
import { g as getModalDialogComponentsDictionary, d as defaultModalDialogDictionary } from "../ModalDialog/index.js";
|
|
11
11
|
import { g as getPagerComponentsDictionary, d as defaultPagerDictionary } from "../mui_extended/Pager/index.js";
|
|
@@ -816,7 +816,8 @@ function Table(props) {
|
|
|
816
816
|
isMultipleSelect = false,
|
|
817
817
|
columns,
|
|
818
818
|
rows,
|
|
819
|
-
withActions
|
|
819
|
+
withActions,
|
|
820
|
+
onRowsChange
|
|
820
821
|
} = props;
|
|
821
822
|
const {
|
|
822
823
|
finalColumns,
|
|
@@ -908,6 +909,7 @@ function Table(props) {
|
|
|
908
909
|
onSortColumnsChange: onChangeSort,
|
|
909
910
|
onColumnResize,
|
|
910
911
|
rows: finalRows,
|
|
912
|
+
onRowsChange,
|
|
911
913
|
selectedRows,
|
|
912
914
|
onSelectedRowsChange: onInternalSelectedRowsChange,
|
|
913
915
|
onRowClick,
|
|
@@ -928,16 +930,17 @@ function Table(props) {
|
|
|
928
930
|
}
|
|
929
931
|
function DataGrid(props) {
|
|
930
932
|
const {
|
|
931
|
-
isSkeleton = false,
|
|
932
933
|
withActions = true,
|
|
933
934
|
rows,
|
|
934
935
|
columns,
|
|
935
936
|
actionsProps,
|
|
936
937
|
rowActionsGetter,
|
|
938
|
+
onRowsChange,
|
|
937
939
|
rowHeaderHeights = [44, 63, 75],
|
|
938
940
|
rowHeights = [36, 52, 67],
|
|
939
941
|
initialRowHeightVariant = "compact"
|
|
940
942
|
} = props;
|
|
943
|
+
const isSkeleton = useModuleSkeleton();
|
|
941
944
|
return /* @__PURE__ */ jsx(WrapperGrid, {
|
|
942
945
|
id: `WrapperGrid_${props.id}`,
|
|
943
946
|
children: /* @__PURE__ */ jsx(BaseProvider, {
|
|
@@ -961,6 +964,7 @@ function DataGrid(props) {
|
|
|
961
964
|
isMultipleSelect: props.isMultipleSelect,
|
|
962
965
|
selectedRows: props.selectedRows,
|
|
963
966
|
rowKeyGetter: props.rowKeyGetter,
|
|
967
|
+
onRowsChange,
|
|
964
968
|
onRowsSelectedChange: props.onRowsSelectedChange
|
|
965
969
|
})]
|
|
966
970
|
})
|
|
@@ -999,4 +1003,62 @@ function getDataGridComponentsDictionary() {
|
|
|
999
1003
|
...defaultPagerDictionary,
|
|
1000
1004
|
...defaultModalDialogDictionary
|
|
1001
1005
|
});
|
|
1002
|
-
|
|
1006
|
+
const Input = styled("input")(() => ({
|
|
1007
|
+
appearance: "none",
|
|
1008
|
+
boxSizing: "border-box",
|
|
1009
|
+
inlineSize: "100%",
|
|
1010
|
+
blockSize: "100%",
|
|
1011
|
+
paddingBlock: "0",
|
|
1012
|
+
verticalAlign: "top",
|
|
1013
|
+
textAlign: "right",
|
|
1014
|
+
color: "var(--rdg-color)",
|
|
1015
|
+
backgroundColor: "var(--rdg-background-color)",
|
|
1016
|
+
fontFamily: "inherit",
|
|
1017
|
+
"&:focus": {
|
|
1018
|
+
outline: "none"
|
|
1019
|
+
},
|
|
1020
|
+
"&::placeholder": {
|
|
1021
|
+
color: "#999",
|
|
1022
|
+
opacity: "1"
|
|
1023
|
+
}
|
|
1024
|
+
}));
|
|
1025
|
+
function autoFocusAndSelect(input) {
|
|
1026
|
+
input?.focus();
|
|
1027
|
+
input?.select();
|
|
1028
|
+
}
|
|
1029
|
+
function TextEditor({
|
|
1030
|
+
row,
|
|
1031
|
+
column,
|
|
1032
|
+
onRowChange,
|
|
1033
|
+
onClose
|
|
1034
|
+
}) {
|
|
1035
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
1036
|
+
className: "rdg-text-editor",
|
|
1037
|
+
ref: autoFocusAndSelect,
|
|
1038
|
+
value: row[column.key],
|
|
1039
|
+
onChange: (event) => onRowChange({
|
|
1040
|
+
...row,
|
|
1041
|
+
[column.key]: event.target.value
|
|
1042
|
+
}),
|
|
1043
|
+
onBlur: () => onClose(true)
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
function NumberEditor({
|
|
1047
|
+
row,
|
|
1048
|
+
column,
|
|
1049
|
+
onRowChange,
|
|
1050
|
+
onClose
|
|
1051
|
+
}) {
|
|
1052
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
1053
|
+
className: "rdg-text-editor",
|
|
1054
|
+
ref: autoFocusAndSelect,
|
|
1055
|
+
type: "number",
|
|
1056
|
+
value: row[column.key],
|
|
1057
|
+
onChange: (event) => onRowChange({
|
|
1058
|
+
...row,
|
|
1059
|
+
[column.key]: event.target.value !== "" ? Number(event.target.value) : ""
|
|
1060
|
+
}),
|
|
1061
|
+
onBlur: () => onClose(true)
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
export { DataGrid as D, NumberEditor as N, OriginalDataGridWrapperStyled as O, TextEditor as T, useFilters as a, getDataGridComponentsDictionary as g, useBase as u };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { Maybe } from '@m4l/core';
|
|
3
|
+
import type { Column, RowsChangeData, FormatterProps } from 'react-data-grid';
|
|
3
4
|
import type { MenuAction } from '../mui_extended/MenuActions/types';
|
|
4
5
|
import { ActionsProps } from './components/Actions/types';
|
|
6
|
+
export declare type GridFormatterPropss<T, SR> = FormatterProps<T, SR>;
|
|
7
|
+
export type { columnUncertaintyFormatter, columnPointsFormatter, columnNestedValueFormatter, } from './formatters';
|
|
5
8
|
export declare type ColumnType = 'text' | 'date' | 'number' | 'boolean' | 'custom';
|
|
6
9
|
export declare type ColumnAlign = 'left' | 'center' | 'right';
|
|
7
10
|
export declare interface GridRow {
|
|
@@ -38,7 +41,6 @@ export declare type RowHeightVariants = 'standard' | 'compact' | 'confortable';
|
|
|
38
41
|
export declare type RowHeights = number | number[];
|
|
39
42
|
export declare interface GridProps<TRow, TSummaryRow> {
|
|
40
43
|
id: RowKey;
|
|
41
|
-
isSkeleton?: boolean;
|
|
42
44
|
withActions?: boolean;
|
|
43
45
|
columns: readonly Column<TRow, TSummaryRow>[];
|
|
44
46
|
rows: TRow[];
|
|
@@ -49,6 +51,7 @@ export declare interface GridProps<TRow, TSummaryRow> {
|
|
|
49
51
|
rowKeyGetter: (row: TRow) => RowKey;
|
|
50
52
|
isMultipleSelect?: boolean;
|
|
51
53
|
selectedRows?: Set<RowKey>;
|
|
54
|
+
onRowsChange?: Maybe<(rows: TRow[], data: RowsChangeData<TRow, TSummaryRow>) => void>;
|
|
52
55
|
onRowsSelectedChange?: (mapRowsSelected: ReadonlySet<RowKey>, rawRowsSelected: TRow[]) => void;
|
|
53
56
|
}
|
|
54
57
|
export declare interface DataGridProps<TRow, TSummaryRow> extends GridProps<TRow, TSummaryRow> {
|
|
@@ -13,6 +13,14 @@ import "../hook-form/RHFCheckbox/index.js";
|
|
|
13
13
|
import { R as RHFDateTime } from "../hook-form/RHFDateTime/index.js";
|
|
14
14
|
import "@mui/x-date-pickers";
|
|
15
15
|
import { R as RHFTextField } from "../hook-form/RHFTextField/index.js";
|
|
16
|
+
import "../../index.js";
|
|
17
|
+
import { I as Icon } from "../Icon/index.js";
|
|
18
|
+
import { L as LabelMemuItem, b as Actions, g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.js";
|
|
19
|
+
import "@mui/material/Button";
|
|
20
|
+
import { F as FilterButton } from "../mui_extended/Button/index.js";
|
|
21
|
+
import "react-router-dom";
|
|
22
|
+
import "../../contexts/ModalContext/index.js";
|
|
23
|
+
import "@mui/lab";
|
|
16
24
|
import "../../lodash.js";
|
|
17
25
|
import "react-dropzone";
|
|
18
26
|
import "../../react-lazy-load-image-component.js";
|
|
@@ -20,16 +28,9 @@ import "../Image/index.js";
|
|
|
20
28
|
import "../hook-form/RHFUpload/index.js";
|
|
21
29
|
import { I as IconButton } from "../mui_extended/IconButton/index.js";
|
|
22
30
|
import "simplebar/dist/simplebar.min.css";
|
|
23
|
-
import { F as FilterButton } from "../mui_extended/Button/index.js";
|
|
24
|
-
import { L as LabelMemuItem, b as Actions, g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.js";
|
|
25
31
|
import { M as MenuPopover } from "../mui_extended/MenuPopover/index.js";
|
|
26
|
-
import { I as Icon } from "../Icon/index.js";
|
|
27
32
|
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.js";
|
|
28
33
|
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.js";
|
|
29
|
-
import "react-router-dom";
|
|
30
|
-
import "@mui/material/Button";
|
|
31
|
-
import "../../contexts/ModalContext/index.js";
|
|
32
|
-
import "@mui/lab";
|
|
33
34
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
34
35
|
const WrapperApplyedFilters = styled("div")(({
|
|
35
36
|
theme
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Wrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
@@ -6,10 +6,12 @@ import { useModuleSkeleton } from "@m4l/core";
|
|
|
6
6
|
import "../Icon/index.js";
|
|
7
7
|
import "@mui/material/styles";
|
|
8
8
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
9
|
+
import "../mui_extended/Accordion/index.js";
|
|
9
10
|
import "../mui_extended/Avatar/index.js";
|
|
10
11
|
import "react-router-dom";
|
|
11
|
-
import "@mui/
|
|
12
|
+
import "@mui/material/Button";
|
|
12
13
|
import "../mui_extended/Button/index.js";
|
|
14
|
+
import "@mui/lab";
|
|
13
15
|
import { M as MenuPopover } from "../mui_extended/MenuPopover/index.js";
|
|
14
16
|
import "../CommonActions/components/Actions/index.js";
|
|
15
17
|
import "../mui_extended/Pager/index.js";
|
|
@@ -71,7 +71,7 @@ const Header = (props) => {
|
|
|
71
71
|
const iconSrcWarning = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/warning.svg`;
|
|
72
72
|
const iconSrcError = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/error.svg`;
|
|
73
73
|
const iconSrcInfo = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/info.svg`;
|
|
74
|
-
const iconDefault = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/
|
|
74
|
+
const iconDefault = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/icon_bar_title.svg`;
|
|
75
75
|
return /* @__PURE__ */ jsxs(Header$1, {
|
|
76
76
|
id: "Header",
|
|
77
77
|
className: "draggable-dialog-title",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
1
|
+
import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
2
2
|
import { styled } from "@mui/material/styles";
|
|
3
3
|
import { I as Image } from "../Image/index.js";
|
|
4
4
|
import { Skeleton } from "@mui/material";
|
|
@@ -34,10 +34,7 @@ const WrapperSKTNoItemSelected = styled("div")(() => ({
|
|
|
34
34
|
mask: `url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 70 70' style='enable-background:new 0 0 70 70%3B' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M45 8.7c1.4-1.5 3.4-2.3 5.4-2.3s3.9 0.8 5.4 2.3s2.4 3.5 2.5 5.7c0 2.2-0.9 4.2-2.4 5.7s-3.5 2.3-5.5 2.2c-2.1 0.1-4-0.7-5.5-2.2c-1.4-1.5-2.3-3.5-2.4-5.7C42.6 12.2 43.5 10.2 45 8.7z'/%3E%3Cpath d='M68.4 62.1c-0.3 0.5-0.7 0.8-1.2 1.1s-1 0.4-1.6 0.4H4.3c-0.6 0-1.1-0.1-1.6-0.4s-0.9-0.6-1.2-1.1c-0.2-0.5-0.4-1-0.4-1.5s0.1-1.1 0.4-1.5l23-36.4c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l11.5 18.2c0.2 0.3 0.5 0.5 0.8 0.7c0.3 0.2 0.6 0.3 1 0.3c0.3 0 0.7-0.1 1-0.3c0.3-0.2 0.6-0.4 0.8-0.7l3.1-4.9c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l14.6 23.1c0.3 0.5 0.3 1 0.3 1.5S68.7 61.7 68.4 62.1z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain`,
|
|
35
35
|
WebkitMask: `url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 70 70' style='enable-background:new 0 0 70 70%3B' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M45 8.7c1.4-1.5 3.4-2.3 5.4-2.3s3.9 0.8 5.4 2.3s2.4 3.5 2.5 5.7c0 2.2-0.9 4.2-2.4 5.7s-3.5 2.3-5.5 2.2c-2.1 0.1-4-0.7-5.5-2.2c-1.4-1.5-2.3-3.5-2.4-5.7C42.6 12.2 43.5 10.2 45 8.7z'/%3E%3Cpath d='M68.4 62.1c-0.3 0.5-0.7 0.8-1.2 1.1s-1 0.4-1.6 0.4H4.3c-0.6 0-1.1-0.1-1.6-0.4s-0.9-0.6-1.2-1.1c-0.2-0.5-0.4-1-0.4-1.5s0.1-1.1 0.4-1.5l23-36.4c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l11.5 18.2c0.2 0.3 0.5 0.5 0.8 0.7c0.3 0.2 0.6 0.3 1 0.3c0.3 0 0.7-0.1 1-0.3c0.3-0.2 0.6-0.4 0.8-0.7l3.1-4.9c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l14.6 23.1c0.3 0.5 0.3 1 0.3 1.5S68.7 61.7 68.4 62.1z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain`
|
|
36
36
|
}));
|
|
37
|
-
function NoItemSelected(
|
|
38
|
-
const {
|
|
39
|
-
isSkeleton
|
|
40
|
-
} = props;
|
|
37
|
+
function NoItemSelected() {
|
|
41
38
|
const {
|
|
42
39
|
host_static_assets,
|
|
43
40
|
environment_assets
|
|
@@ -45,6 +42,7 @@ function NoItemSelected(props) {
|
|
|
45
42
|
const {
|
|
46
43
|
getLabel
|
|
47
44
|
} = useModuleDictionary();
|
|
45
|
+
const isSkeleton = useModuleSkeleton();
|
|
48
46
|
const src = useMemo(() => {
|
|
49
47
|
return `${host_static_assets}/${environment_assets}/frontend/components/no_item_selected/assets/icons/no_selected.svg`;
|
|
50
48
|
}, []);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Skeleton } from "@mui/material";
|
|
2
1
|
import { styled } from "@mui/material/styles";
|
|
3
|
-
import {
|
|
2
|
+
import { useModuleSkeleton } from "@m4l/core";
|
|
3
|
+
import { Skeleton } from "@mui/material";
|
|
4
4
|
import { I as Icon } from "../Icon/index.js";
|
|
5
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
6
|
const WrapperPaper = styled("div")(({
|
|
6
7
|
theme
|
|
7
8
|
}) => ({
|
|
@@ -16,7 +17,7 @@ const WrapperPaper = styled("div")(({
|
|
|
16
17
|
backgroundColor: theme.palette.background.paper
|
|
17
18
|
}
|
|
18
19
|
}));
|
|
19
|
-
const
|
|
20
|
+
const HeaderContainer = styled("div")(({
|
|
20
21
|
theme
|
|
21
22
|
}) => ({
|
|
22
23
|
display: "flex",
|
|
@@ -50,7 +51,7 @@ const Content = styled("div")(() => ({
|
|
|
50
51
|
flexGrow: 1,
|
|
51
52
|
position: "relative"
|
|
52
53
|
}));
|
|
53
|
-
const
|
|
54
|
+
const SkTPaperFormHeader = styled("div")(({
|
|
54
55
|
theme
|
|
55
56
|
}) => ({
|
|
56
57
|
width: "auto",
|
|
@@ -61,58 +62,49 @@ const SkPaperFormHeader = styled("div")(({
|
|
|
61
62
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
62
63
|
marginBottom: `${theme.spacing(3)}`
|
|
63
64
|
}));
|
|
64
|
-
const
|
|
65
|
-
display: "flex",
|
|
66
|
-
flexDirection: "column",
|
|
67
|
-
flexGrow: "1"
|
|
68
|
-
}));
|
|
69
|
-
function SKTPaperForm(prop) {
|
|
65
|
+
const Header = (props) => {
|
|
70
66
|
const {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}), /* @__PURE__ */ jsx(PaperFormBoddy, {
|
|
85
|
-
children
|
|
67
|
+
urlIcon,
|
|
68
|
+
title
|
|
69
|
+
} = props;
|
|
70
|
+
const isSkeleton = useModuleSkeleton();
|
|
71
|
+
return isSkeleton ? /* @__PURE__ */ jsxs(SkTPaperFormHeader, {
|
|
72
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
73
|
+
variant: "circular",
|
|
74
|
+
width: 16,
|
|
75
|
+
height: 16
|
|
76
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
77
|
+
variant: "text",
|
|
78
|
+
width: 68,
|
|
79
|
+
height: 14
|
|
86
80
|
})]
|
|
81
|
+
}) : /* @__PURE__ */ jsx(HeaderContainer, {
|
|
82
|
+
id: "Header",
|
|
83
|
+
children: /* @__PURE__ */ jsxs(IconTitleContainer, {
|
|
84
|
+
className: "draggable-dialog-title",
|
|
85
|
+
children: [/* @__PURE__ */ jsx(IconHeader, {
|
|
86
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
87
|
+
src: urlIcon
|
|
88
|
+
})
|
|
89
|
+
}), title]
|
|
90
|
+
})
|
|
87
91
|
});
|
|
88
|
-
}
|
|
92
|
+
};
|
|
89
93
|
function PaperForm(props) {
|
|
90
94
|
const {
|
|
91
95
|
urlIcon,
|
|
92
|
-
|
|
93
|
-
children
|
|
94
|
-
isSkeleton = false
|
|
96
|
+
title,
|
|
97
|
+
children
|
|
95
98
|
} = props;
|
|
96
|
-
return /* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ jsxs(WrapperPaper, {
|
|
97
100
|
id: "ContainerPropertyValue",
|
|
98
|
-
children:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
children: [/* @__PURE__ */ jsx(IconHeader, {
|
|
104
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
105
|
-
src: urlIcon
|
|
106
|
-
})
|
|
107
|
-
}), tittle]
|
|
108
|
-
})
|
|
109
|
-
}), /* @__PURE__ */ jsx(Content, {
|
|
110
|
-
id: "Content",
|
|
111
|
-
children
|
|
112
|
-
})]
|
|
113
|
-
}) : /* @__PURE__ */ jsx(SKTPaperForm, {
|
|
101
|
+
children: [/* @__PURE__ */ jsx(Header, {
|
|
102
|
+
urlIcon,
|
|
103
|
+
title
|
|
104
|
+
}), /* @__PURE__ */ jsx(Content, {
|
|
105
|
+
id: "Content",
|
|
114
106
|
children
|
|
115
|
-
})
|
|
107
|
+
})]
|
|
116
108
|
});
|
|
117
109
|
}
|
|
118
110
|
export { PaperForm as P };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const WrapperPaper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const HeaderContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
4
|
export declare const IconTitleContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
5
|
export declare const IconHeader: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
6
|
export declare const Content: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const PaperFormBoddy: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const SkTPaperFormHeader: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|