@m4l/components 0.1.33 → 0.1.35
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/components/CommonActions/components/ActionCancel/{index.641ea102.js → index.a1fe59a4.js} +1 -1
- package/components/CommonActions/components/ActionFormCancel/{index.3b9e5121.js → index.b97872f2.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.d53e0d31.js → index.808a2cd1.js} +1 -1
- package/components/CommonActions/components/Actions/{index.545d7067.js → index.4b0d3293.js} +7 -7
- package/components/DataGrid/formatters/columnNestedValueFormatter/index.f68ef4e1.js +17 -0
- package/components/DataGrid/formatters/columnPointsFormatter/index.5e645334.js +13 -0
- package/components/DataGrid/formatters/columnPriceFormatter/index.d.ts +3 -0
- package/components/DataGrid/formatters/columnPriceFormatter/index.e612fda3.js +13 -0
- package/components/DataGrid/formatters/columnPriceFormatter/types.d.ts +5 -0
- package/components/DataGrid/formatters/columnUncertaintyFormatter/index.cae2057a.js +13 -0
- package/components/DataGrid/formatters/index.d.ts +1 -0
- package/components/DataGrid/{index.b6a45f67.js → index.69d0fcea.js} +37 -3
- package/components/DynamicFilter/{index.b3b19031.js → index.68bcbc88.js} +8 -8
- package/components/ModalDialog/{index.81b8e093.js → index.d50c4a9d.js} +2 -2
- package/components/ObjectLogs/{index.ca9cd589.js → index.4e4ae4f4.js} +4 -4
- package/components/Period/{index.9ce96aed.js → index.4b6704d0.js} +2 -2
- package/components/WrapperComponent/index.5e872594.js +18 -0
- package/components/WrapperComponent/index.d.ts +3 -0
- package/components/WrapperComponent/types.d.ts +5 -0
- package/components/formatters/BooleanFormatter/{index.224d5c4e.js → index.2df47b04.js} +4 -20
- package/components/formatters/DateFormatter/{index.199172d2.js → index.80522f69.js} +4 -23
- package/components/formatters/PointsFormatter/index.80a4e414.js +32 -0
- package/components/formatters/PriceFormatter/index.83cbe7be.js +43 -0
- package/components/formatters/PriceFormatter/index.d.ts +1 -0
- package/components/formatters/PriceFormatter/types.d.ts +2 -1
- package/components/formatters/UncertaintyFormatter/index.08e1b79f.js +34 -0
- package/components/formatters/index.57ec5cbc.js +21 -0
- package/components/formatters/index.d.ts +1 -1
- package/components/hook-form/RHFPeriod/{index.116158c4.js → index.146a34af.js} +1 -1
- package/components/mui_extended/Button/{index.bd85b59c.js → index.44282241.js} +1 -1
- package/components/mui_extended/Pager/{index.a98c43cc.js → index.74f16fe0.js} +1 -1
- package/components/mui_extended/Popover/{index.f38042fc.js → index.2a084d8a.js} +3 -3
- package/contexts/ModalContext/{index.9a44cced.js → index.92ae296c.js} +3 -3
- package/hooks/useModal/{index.2a92d33a.js → index.44ea7900.js} +1 -1
- package/index.js +41 -31
- package/package.json +1 -1
- package/components/formatters/FragmentJSXComponent/index.d.ts +0 -5
- package/components/formatters/index.e154f663.js +0 -126
package/components/CommonActions/components/ActionCancel/{index.641ea102.js → index.a1fe59a4.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useModuleDictionary } from "@m4l/core";
|
|
2
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
2
|
+
import { B as Button } from "../../../mui_extended/Button/index.44282241.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
const ActionCancel = (props) => {
|
|
5
5
|
const {
|
package/components/CommonActions/components/ActionFormCancel/{index.3b9e5121.js → index.b97872f2.js}
RENAMED
|
@@ -2,9 +2,9 @@ import { useFormContext, useFormState } from "react-hook-form";
|
|
|
2
2
|
import { useNavigate } from "react-router-dom";
|
|
3
3
|
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
4
4
|
import { Skeleton } from "@mui/material";
|
|
5
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
5
|
+
import { B as Button } from "../../../mui_extended/Button/index.44282241.js";
|
|
6
6
|
import { useCallback } from "react";
|
|
7
|
-
import { u as useModal } from "../../../../hooks/useModal/index.
|
|
7
|
+
import { u as useModal } from "../../../../hooks/useModal/index.44ea7900.js";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
function ActionFormCancel(props) {
|
|
10
10
|
const {
|
package/components/CommonActions/components/ActionIntro/{index.d53e0d31.js → index.808a2cd1.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useModuleDictionary } from "@m4l/core";
|
|
2
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
2
|
+
import { B as Button } from "../../../mui_extended/Button/index.44282241.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
const ActionIntro = (props) => {
|
|
5
5
|
const {
|
|
@@ -6,16 +6,16 @@ import "@mui/material/Button";
|
|
|
6
6
|
import "react-hook-form";
|
|
7
7
|
import "react-router-dom";
|
|
8
8
|
import { useState, useMemo, forwardRef, useRef, useImperativeHandle, useEffect, useCallback } from "react";
|
|
9
|
-
import "../../../../contexts/ModalContext/index.
|
|
9
|
+
import "../../../../contexts/ModalContext/index.92ae296c.js";
|
|
10
10
|
import "@mui/lab";
|
|
11
11
|
import { I as IconButton$1 } from "../../../mui_extended/IconButton/index.25ff14bd.js";
|
|
12
|
-
import { u as useDataGrid, a as useFilters, O as OriginalDataGridWrapperStyled } from "../../../DataGrid/index.
|
|
13
|
-
import { P as Pager } from "../../../mui_extended/Pager/index.
|
|
12
|
+
import { u as useDataGrid, a as useFilters, O as OriginalDataGridWrapperStyled } from "../../../DataGrid/index.69d0fcea.js";
|
|
13
|
+
import { P as Pager } from "../../../mui_extended/Pager/index.74f16fe0.js";
|
|
14
14
|
import { D as DataGrid$1 } from "../../../../react-data-grid.d46d625e.js";
|
|
15
|
-
import { u as useModal } from "../../../../hooks/useModal/index.
|
|
16
|
-
import { A as ActionCancel } from "../ActionCancel/index.
|
|
17
|
-
import { A as ActionIntro } from "../ActionIntro/index.
|
|
18
|
-
import { P as Popover } from "../../../mui_extended/Popover/index.
|
|
15
|
+
import { u as useModal } from "../../../../hooks/useModal/index.44ea7900.js";
|
|
16
|
+
import { A as ActionCancel } from "../ActionCancel/index.a1fe59a4.js";
|
|
17
|
+
import { A as ActionIntro } from "../ActionIntro/index.808a2cd1.js";
|
|
18
|
+
import { P as Popover } from "../../../mui_extended/Popover/index.2a084d8a.js";
|
|
19
19
|
import { I as Icon } from "../../../Icon/index.619fa9ad.js";
|
|
20
20
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
21
21
|
const WrapperStandarActions = styled("div")(({
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getPropertyByString } from "@m4l/core";
|
|
2
|
+
import { W as WrapperComponent } from "../../../WrapperComponent/index.5e872594.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
function columnNestedValueFormatter(props) {
|
|
5
|
+
const {
|
|
6
|
+
fieldValue,
|
|
7
|
+
Component = WrapperComponent
|
|
8
|
+
} = props;
|
|
9
|
+
return (obProps) => {
|
|
10
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
11
|
+
children: getPropertyByString(obProps, fieldValue) + ""
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
columnNestedValueFormatter as c
|
|
17
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { P as PointsFormatter } from "../../../formatters/PointsFormatter/index.80a4e414.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
function columnPointsFormatter(props) {
|
|
4
|
+
return (obProps) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(PointsFormatter, {
|
|
6
|
+
obProps,
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
columnPointsFormatter as c
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { P as PriceFormatter } from "../../../formatters/PriceFormatter/index.83cbe7be.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
function columnPriceFormatter(props) {
|
|
4
|
+
return (obProps) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(PriceFormatter, {
|
|
6
|
+
obProps,
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
columnPriceFormatter as c
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { U as UncertaintyFormatter } from "../../../formatters/UncertaintyFormatter/index.08e1b79f.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
function columnUncertaintyFormatter(props) {
|
|
4
|
+
return (obProps) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(UncertaintyFormatter, {
|
|
6
|
+
obProps,
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
columnUncertaintyFormatter as c
|
|
13
|
+
};
|
|
@@ -3,4 +3,5 @@ export { columnPointsFormatter } from './columnPointsFormatter';
|
|
|
3
3
|
export { columnNestedValueFormatter } from './columnNestedValueFormatter';
|
|
4
4
|
export { columnBooleanFormatter } from './columnBooleanFormatter';
|
|
5
5
|
export { columnDateFormatter } from './columnDateFormatter';
|
|
6
|
+
export { columnPriceFormatter } from './columnPriceFormatter';
|
|
6
7
|
export type { ColumnUncertaintyFormatterProps } from './columnUncertaintyFormatter/types';
|
|
@@ -6,9 +6,13 @@ 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
8
|
import { voidFunction, useModuleDictionary, useModuleSkeleton, getPropertyByString } from "@m4l/core";
|
|
9
|
-
import { A as ActionsColumn, a as Actions } from "../CommonActions/components/Actions/index.
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
9
|
+
import { A as ActionsColumn, a as Actions } from "../CommonActions/components/Actions/index.4b0d3293.js";
|
|
10
|
+
import { B as BooleanFormatter } from "../formatters/BooleanFormatter/index.2df47b04.js";
|
|
11
|
+
import "@m4l/graphics";
|
|
12
|
+
import "../Icon/index.619fa9ad.js";
|
|
13
|
+
import { D as DateFormatter } from "../formatters/DateFormatter/index.80522f69.js";
|
|
14
|
+
import { g as getModalDialogComponentsDictionary, d as defaultModalDialogDictionary } from "../ModalDialog/index.d50c4a9d.js";
|
|
15
|
+
import { g as getPagerComponentsDictionary, d as defaultPagerDictionary } from "../mui_extended/Pager/index.74f16fe0.js";
|
|
12
16
|
const WrapperGrid = styled("div")(() => ({
|
|
13
17
|
display: "flex",
|
|
14
18
|
flexDirection: "column",
|
|
@@ -980,6 +984,34 @@ function DataGrid(props) {
|
|
|
980
984
|
})
|
|
981
985
|
});
|
|
982
986
|
}
|
|
987
|
+
function columnBooleanFormatter(props) {
|
|
988
|
+
const {
|
|
989
|
+
fieldValue,
|
|
990
|
+
presentationType,
|
|
991
|
+
Component
|
|
992
|
+
} = props;
|
|
993
|
+
return (obProps) => {
|
|
994
|
+
return /* @__PURE__ */ jsx(BooleanFormatter, {
|
|
995
|
+
presentationType,
|
|
996
|
+
value: getPropertyByString(obProps, fieldValue),
|
|
997
|
+
Component
|
|
998
|
+
});
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
function columnDateFormatter(props) {
|
|
1002
|
+
const {
|
|
1003
|
+
fieldValue,
|
|
1004
|
+
presentationType,
|
|
1005
|
+
Component
|
|
1006
|
+
} = props;
|
|
1007
|
+
return (obProps) => {
|
|
1008
|
+
return /* @__PURE__ */ jsx(DateFormatter, {
|
|
1009
|
+
presentationType,
|
|
1010
|
+
value: getPropertyByString(obProps, fieldValue),
|
|
1011
|
+
Component
|
|
1012
|
+
});
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
983
1015
|
function getDataGridComponentsDictionary() {
|
|
984
1016
|
return ["data_grid"].concat(getPagerComponentsDictionary()).concat(getModalDialogComponentsDictionary());
|
|
985
1017
|
}
|
|
@@ -1094,6 +1126,8 @@ export {
|
|
|
1094
1126
|
TextEditor as T,
|
|
1095
1127
|
useFilters as a,
|
|
1096
1128
|
getDataGridRowsFromSet as b,
|
|
1129
|
+
columnBooleanFormatter as c,
|
|
1130
|
+
columnDateFormatter as d,
|
|
1097
1131
|
getDataGridComponentsDictionary as g,
|
|
1098
1132
|
useDataGrid as u
|
|
1099
1133
|
};
|
|
@@ -14,13 +14,13 @@ import { R as RHFDateTime } from "../hook-form/RHFDateTime/index.7f1cbd85.js";
|
|
|
14
14
|
import { useFormatter, useResponsiveDesktop } from "@m4l/graphics";
|
|
15
15
|
import { R as RHFTextField } from "../hook-form/RHFTextField/index.3cb4b35f.js";
|
|
16
16
|
import { I as Icon } from "../Icon/index.619fa9ad.js";
|
|
17
|
-
import "../hook-form/RHFPeriod/index.
|
|
17
|
+
import "../hook-form/RHFPeriod/index.146a34af.js";
|
|
18
18
|
import "../ErrorLabel/index.c8615f16.js";
|
|
19
|
-
import "../Period/index.
|
|
20
|
-
import { L as LabelMemuItem, b as Actions, g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.
|
|
19
|
+
import "../Period/index.4b6704d0.js";
|
|
20
|
+
import { L as LabelMemuItem, b as Actions, g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.4b0d3293.js";
|
|
21
21
|
import "@mui/material/Button";
|
|
22
22
|
import "react-router-dom";
|
|
23
|
-
import "../../contexts/ModalContext/index.
|
|
23
|
+
import "../../contexts/ModalContext/index.92ae296c.js";
|
|
24
24
|
import "@mui/lab";
|
|
25
25
|
import "lodash/isString";
|
|
26
26
|
import "react-dropzone";
|
|
@@ -28,11 +28,11 @@ import "../Image/index.93d5f37f.js";
|
|
|
28
28
|
import "../hook-form/RHFUpload/index.d5cc7c13.js";
|
|
29
29
|
import { I as IconButton } from "../mui_extended/IconButton/index.25ff14bd.js";
|
|
30
30
|
import "simplebar/dist/simplebar.min.css";
|
|
31
|
-
import { F as FilterButton } from "../mui_extended/Button/index.
|
|
32
|
-
import { P as Popover } from "../mui_extended/Popover/index.
|
|
31
|
+
import { F as FilterButton } from "../mui_extended/Button/index.44282241.js";
|
|
32
|
+
import { P as Popover } from "../mui_extended/Popover/index.2a084d8a.js";
|
|
33
33
|
import { R as RHFormProvider } from "../../contexts/RHFormContext/index.d88e6e27.js";
|
|
34
|
-
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.
|
|
35
|
-
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.
|
|
34
|
+
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.a1fe59a4.js";
|
|
35
|
+
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.808a2cd1.js";
|
|
36
36
|
const WrapperApplyedFilters = styled("div")(({
|
|
37
37
|
theme
|
|
38
38
|
}) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dialog, IconButton, Paper } from "@mui/material";
|
|
2
2
|
import { c as cjs } from "../../react-draggable.a09b624f.js";
|
|
3
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
3
|
+
import { u as useModal } from "../../hooks/useModal/index.44ea7900.js";
|
|
4
4
|
import { styled } from "@mui/material/styles";
|
|
5
5
|
import { a as getThemeVariantColor } from "../../utils/index.f3bfdc22.js";
|
|
6
6
|
import { R as Resizeable } from "../Resizeable/index.d27b0310.js";
|
|
@@ -8,7 +8,7 @@ import { useResponsiveDesktop } from "@m4l/graphics";
|
|
|
8
8
|
import { useEnvironment } from "@m4l/core";
|
|
9
9
|
import { I as Icon } from "../Icon/index.619fa9ad.js";
|
|
10
10
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
11
|
-
import { b as Actions, g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.
|
|
11
|
+
import { b as Actions, g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.4b0d3293.js";
|
|
12
12
|
const WrapperDialog = styled(Dialog)(() => ({}));
|
|
13
13
|
const Container = styled("div")(({ theme }) => ({
|
|
14
14
|
display: "flex",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback, useMemo } from "react";
|
|
2
2
|
import { useNetwork, useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
|
|
3
3
|
import { styled } from "@mui/material/styles";
|
|
4
|
-
import { D as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.
|
|
5
|
-
import { D as DateFormatter } from "../formatters/DateFormatter/index.
|
|
4
|
+
import { D as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.69d0fcea.js";
|
|
5
|
+
import { D as DateFormatter } from "../formatters/DateFormatter/index.80522f69.js";
|
|
6
6
|
import { Tooltip, IconButton } from "@mui/material";
|
|
7
7
|
import { useHostTheme, useResponsiveDesktop } from "@m4l/graphics";
|
|
8
8
|
import { R as ReactJson } from "../../react-json-view.57125fcf.js";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
10
|
+
import { u as useModal } from "../../hooks/useModal/index.44ea7900.js";
|
|
11
11
|
import { I as Icon } from "../Icon/index.619fa9ad.js";
|
|
12
|
-
import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.
|
|
12
|
+
import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.68bcbc88.js";
|
|
13
13
|
const Container$1 = styled("div")(() => ({
|
|
14
14
|
height: "100%",
|
|
15
15
|
width: "100%",
|
|
@@ -3,11 +3,11 @@ import { styled, Skeleton, Autocomplete, TextField } from "@mui/material";
|
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { I as Icon } from "../Icon/index.619fa9ad.js";
|
|
5
5
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
6
|
-
import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.
|
|
6
|
+
import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.4b0d3293.js";
|
|
7
7
|
import "@mui/material/Button";
|
|
8
8
|
import "react-hook-form";
|
|
9
9
|
import "react-router-dom";
|
|
10
|
-
import "../../contexts/ModalContext/index.
|
|
10
|
+
import "../../contexts/ModalContext/index.92ae296c.js";
|
|
11
11
|
import "@mui/lab";
|
|
12
12
|
const ContainerPeriod = styled("div")(({
|
|
13
13
|
theme,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
+
function WrapperComponent(props) {
|
|
3
|
+
const {
|
|
4
|
+
children,
|
|
5
|
+
type = "fragment"
|
|
6
|
+
} = props;
|
|
7
|
+
if (type === "fragment") {
|
|
8
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
9
|
+
children
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
13
|
+
children: [" ", children]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
WrapperComponent as W
|
|
18
|
+
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { useModuleDictionary, useEnvironment, getPropertyByString } from "@m4l/core";
|
|
2
1
|
import { useMemo } from "react";
|
|
2
|
+
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
3
3
|
import { I as Icon } from "../../Icon/index.619fa9ad.js";
|
|
4
|
-
import {
|
|
4
|
+
import { W as WrapperComponent } from "../../WrapperComponent/index.5e872594.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import "@m4l/graphics";
|
|
7
6
|
function BooleanFormatter(props) {
|
|
8
7
|
const {
|
|
9
8
|
presentationType,
|
|
10
9
|
value,
|
|
11
|
-
Component =
|
|
10
|
+
Component = WrapperComponent
|
|
12
11
|
} = props;
|
|
13
12
|
const {
|
|
14
13
|
getLabel
|
|
@@ -40,21 +39,6 @@ function BooleanFormatter(props) {
|
|
|
40
39
|
}, [final_value]);
|
|
41
40
|
return memoComponent;
|
|
42
41
|
}
|
|
43
|
-
function columnBooleanFormatter(props) {
|
|
44
|
-
const {
|
|
45
|
-
fieldValue,
|
|
46
|
-
presentationType,
|
|
47
|
-
Component
|
|
48
|
-
} = props;
|
|
49
|
-
return (obProps) => {
|
|
50
|
-
return /* @__PURE__ */ jsx(BooleanFormatter, {
|
|
51
|
-
presentationType,
|
|
52
|
-
value: getPropertyByString(obProps, fieldValue),
|
|
53
|
-
Component
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
42
|
export {
|
|
58
|
-
BooleanFormatter as B
|
|
59
|
-
columnBooleanFormatter as c
|
|
43
|
+
BooleanFormatter as B
|
|
60
44
|
};
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { getPropertyByString } from "@m4l/core";
|
|
2
|
-
import "react";
|
|
3
|
-
import "../../Icon/index.619fa9ad.js";
|
|
4
|
-
import "@mui/material/styles";
|
|
5
|
-
import { jsx, Fragment } from "react/jsx-runtime";
|
|
6
1
|
import { useFormatter } from "@m4l/graphics";
|
|
7
|
-
import {
|
|
2
|
+
import { W as WrapperComponent } from "../../WrapperComponent/index.5e872594.js";
|
|
3
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
8
4
|
function DateFormatter(props) {
|
|
9
5
|
const {
|
|
10
6
|
presentationType,
|
|
11
7
|
value,
|
|
12
8
|
format,
|
|
13
|
-
Component =
|
|
9
|
+
Component = WrapperComponent
|
|
14
10
|
} = props;
|
|
15
11
|
const {
|
|
16
12
|
dateFormatter
|
|
@@ -48,21 +44,6 @@ function DateFormatter(props) {
|
|
|
48
44
|
children: result
|
|
49
45
|
});
|
|
50
46
|
}
|
|
51
|
-
function columnDateFormatter(props) {
|
|
52
|
-
const {
|
|
53
|
-
fieldValue,
|
|
54
|
-
presentationType,
|
|
55
|
-
Component
|
|
56
|
-
} = props;
|
|
57
|
-
return (obProps) => {
|
|
58
|
-
return /* @__PURE__ */ jsx(DateFormatter, {
|
|
59
|
-
presentationType,
|
|
60
|
-
value: getPropertyByString(obProps, fieldValue),
|
|
61
|
-
Component
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
47
|
export {
|
|
66
|
-
DateFormatter as D
|
|
67
|
-
columnDateFormatter as c
|
|
48
|
+
DateFormatter as D
|
|
68
49
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { getPropertyByString } from "@m4l/core";
|
|
2
|
+
import { W as WrapperComponent } from "../../WrapperComponent/index.5e872594.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
function getFormatPoints(obProps, fieldValue, fieldUnit) {
|
|
5
|
+
let result = "";
|
|
6
|
+
const points = getPropertyByString(obProps, fieldValue);
|
|
7
|
+
const unit = getPropertyByString(obProps, fieldUnit) || "";
|
|
8
|
+
if (points === void 0 || points === null || !Array.isArray(points)) {
|
|
9
|
+
return "[]";
|
|
10
|
+
}
|
|
11
|
+
points.map((point) => {
|
|
12
|
+
if (point) {
|
|
13
|
+
result = result.concat(`[${point}${unit}]`);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
|
+
function PointsFormatter(props) {
|
|
19
|
+
const {
|
|
20
|
+
obProps,
|
|
21
|
+
fieldValue,
|
|
22
|
+
fieldUnit,
|
|
23
|
+
Component = WrapperComponent
|
|
24
|
+
} = props;
|
|
25
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
26
|
+
children: getFormatPoints(obProps, fieldValue, fieldUnit)
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
PointsFormatter as P,
|
|
31
|
+
getFormatPoints as g
|
|
32
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { getPropertyByString } from "@m4l/core";
|
|
2
|
+
import { useFormatter } from "@m4l/graphics";
|
|
3
|
+
import { W as WrapperComponent } from "../../WrapperComponent/index.5e872594.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
function getFormatPrice(obProps, fieldValue, currency, decimalDigits) {
|
|
6
|
+
let result = "";
|
|
7
|
+
const value = getPropertyByString(obProps, fieldValue);
|
|
8
|
+
try {
|
|
9
|
+
result = Number(value).toLocaleString(navigator.language, {
|
|
10
|
+
currency,
|
|
11
|
+
style: "currency",
|
|
12
|
+
currencyDisplay: "symbol",
|
|
13
|
+
useGrouping: true,
|
|
14
|
+
maximumFractionDigits: decimalDigits
|
|
15
|
+
}) || "";
|
|
16
|
+
} catch (error) {
|
|
17
|
+
result = Number(value).toLocaleString("en-US", {
|
|
18
|
+
style: "currency",
|
|
19
|
+
currency: "USD",
|
|
20
|
+
currencyDisplay: "symbol",
|
|
21
|
+
useGrouping: true,
|
|
22
|
+
maximumFractionDigits: decimalDigits
|
|
23
|
+
}) || "";
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
function PriceFormatter(props) {
|
|
28
|
+
const {
|
|
29
|
+
obProps,
|
|
30
|
+
fieldValue,
|
|
31
|
+
Component = WrapperComponent
|
|
32
|
+
} = props;
|
|
33
|
+
const {
|
|
34
|
+
currencyFormatter
|
|
35
|
+
} = useFormatter();
|
|
36
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
37
|
+
children: getFormatPrice(obProps, fieldValue, currencyFormatter.code, currencyFormatter.decimalDigits)
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
PriceFormatter as P,
|
|
42
|
+
getFormatPrice as g
|
|
43
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PriceFormatterProps } from './types';
|
|
3
|
+
export declare function getFormatPrice(obProps: any, fieldValue: string, currency: string, decimalDigits: number): string;
|
|
3
4
|
export declare function PriceFormatter(props: PriceFormatterProps): JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { getPropertyByString } from "@m4l/core";
|
|
2
|
+
import { W as WrapperComponent } from "../../WrapperComponent/index.5e872594.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
function getUncertaintyFormat(obProps, fieldValue, fieldSymbol, fieldUnit) {
|
|
5
|
+
let result = "";
|
|
6
|
+
const ranges = getPropertyByString(obProps, fieldValue);
|
|
7
|
+
const symbol = getPropertyByString(obProps, fieldSymbol);
|
|
8
|
+
const unit = getPropertyByString(obProps, fieldUnit);
|
|
9
|
+
if (ranges === void 0 || ranges === null || !Array.isArray(ranges) || typeof symbol !== "string" || typeof unit !== "string") {
|
|
10
|
+
return "[]";
|
|
11
|
+
}
|
|
12
|
+
ranges.map((obj, idx) => {
|
|
13
|
+
const cmc_min_closed = obj.cmc_min_closed != true ? "<" : "\u2264";
|
|
14
|
+
const cmc_max_closed = obj.cmc_max_closed != true ? "<" : "\u2264";
|
|
15
|
+
result = result.concat(`${idx > 0 ? " " : ""}`, obj.cmc_min !== obj.cmc_max ? `[${obj.cmc_min}${unit} ${cmc_min_closed} ${symbol} ${cmc_max_closed} ${obj.cmc_max}${unit} \xB1 ${obj.cmc_uncertainty}]` : `[${obj.cmc_min}${unit} \xB1 ${obj.cmc_uncertainty}]`);
|
|
16
|
+
});
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
function UncertaintyFormatter(props) {
|
|
20
|
+
const {
|
|
21
|
+
obProps,
|
|
22
|
+
fieldValue,
|
|
23
|
+
fieldSymbol,
|
|
24
|
+
fieldUnit,
|
|
25
|
+
Component = WrapperComponent
|
|
26
|
+
} = props;
|
|
27
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
28
|
+
children: getUncertaintyFormat(obProps, fieldValue, fieldSymbol, fieldUnit)
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
UncertaintyFormatter as U,
|
|
33
|
+
getUncertaintyFormat as g
|
|
34
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import "@m4l/core";
|
|
3
|
+
import "../Icon/index.619fa9ad.js";
|
|
4
|
+
import "@mui/material/styles";
|
|
5
|
+
import "react/jsx-runtime";
|
|
6
|
+
import "@m4l/graphics";
|
|
7
|
+
function getFormattersComponentsDictionary() {
|
|
8
|
+
return ["formatters"];
|
|
9
|
+
}
|
|
10
|
+
const defaultFormattersDictionary = {
|
|
11
|
+
pager: {
|
|
12
|
+
boolean_yes: "Yes",
|
|
13
|
+
boolean_no: "No",
|
|
14
|
+
boolean_true: "True",
|
|
15
|
+
boolean_false: "False"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
defaultFormattersDictionary as d,
|
|
20
|
+
getFormattersComponentsDictionary as g
|
|
21
|
+
};
|
|
@@ -2,5 +2,5 @@ export { BooleanFormatter } from './BooleanFormatter';
|
|
|
2
2
|
export { DateFormatter } from './DateFormatter';
|
|
3
3
|
export { UncertaintyFormatter, getUncertaintyFormat } from './UncertaintyFormatter';
|
|
4
4
|
export { PointsFormatter, getFormatPoints } from './PointsFormatter';
|
|
5
|
-
export { PriceFormatter } from './PriceFormatter';
|
|
5
|
+
export { PriceFormatter, getFormatPrice } from './PriceFormatter';
|
|
6
6
|
export type { UncertaintyRange } from './UncertaintyFormatter/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled } from "@mui/material";
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
3
|
import { E as ErrorLabel } from "../../ErrorLabel/index.c8615f16.js";
|
|
4
|
-
import { P as Period } from "../../Period/index.
|
|
4
|
+
import { P as Period } from "../../Period/index.4b6704d0.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
const Wrapper = styled("div")(({
|
|
7
7
|
theme
|
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
import { LoadingButton as LoadingButton$1 } from "@mui/lab";
|
|
6
6
|
import { I as IconButton } from "../IconButton/index.25ff14bd.js";
|
|
7
7
|
import { styled as styled$1, alpha } from "@mui/material/styles";
|
|
8
|
-
import { u as useBase } from "../../DynamicFilter/index.
|
|
8
|
+
import { u as useBase } from "../../DynamicFilter/index.68bcbc88.js";
|
|
9
9
|
import { useMemo } from "react";
|
|
10
10
|
import { I as Image } from "../../Image/index.93d5f37f.js";
|
|
11
11
|
const Button = (props) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { Skeleton, TablePagination } from "@mui/material";
|
|
3
|
-
import { P as PagerActions } from "../../CommonActions/components/Actions/index.
|
|
3
|
+
import { P as PagerActions } from "../../CommonActions/components/Actions/index.4b0d3293.js";
|
|
4
4
|
import { styled } from "@mui/material/styles";
|
|
5
5
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
6
6
|
styled("div")(() => ({
|
|
@@ -12,9 +12,9 @@ import "react-router-dom";
|
|
|
12
12
|
import "@mui/material/Button";
|
|
13
13
|
import { C as CircularProgress } from "../CircularProgress/index.ad569afd.js";
|
|
14
14
|
import "@mui/lab";
|
|
15
|
-
import { I as ImageButton } from "../Button/index.
|
|
16
|
-
import "../../CommonActions/components/Actions/index.
|
|
17
|
-
import "../Pager/index.
|
|
15
|
+
import { I as ImageButton } from "../Button/index.44282241.js";
|
|
16
|
+
import "../../CommonActions/components/Actions/index.4b0d3293.js";
|
|
17
|
+
import "../Pager/index.74f16fe0.js";
|
|
18
18
|
import "../Tab/index.e0653a0a.js";
|
|
19
19
|
const ArrowStyle = styled("span")(({
|
|
20
20
|
arrowType,
|
|
@@ -4,9 +4,9 @@ import { Typography } from "@mui/material";
|
|
|
4
4
|
import { styled } from "@mui/material/styles";
|
|
5
5
|
import { B as BoxIcon } from "../../components/mui_extended/BoxIcon/index.e638ecc8.js";
|
|
6
6
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
7
|
-
import { M as ModalDialog } from "../../components/ModalDialog/index.
|
|
8
|
-
import { A as ActionIntro } from "../../components/CommonActions/components/ActionIntro/index.
|
|
9
|
-
import { A as ActionCancel } from "../../components/CommonActions/components/ActionCancel/index.
|
|
7
|
+
import { M as ModalDialog } from "../../components/ModalDialog/index.d50c4a9d.js";
|
|
8
|
+
import { A as ActionIntro } from "../../components/CommonActions/components/ActionIntro/index.808a2cd1.js";
|
|
9
|
+
import { A as ActionCancel } from "../../components/CommonActions/components/ActionCancel/index.a1fe59a4.js";
|
|
10
10
|
import { b as getVariantColor } from "../../utils/index.f3bfdc22.js";
|
|
11
11
|
const WrapperContentConfirm = styled("div")(() => ({
|
|
12
12
|
display: "flex",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import { M as ModalContext } from "../../contexts/ModalContext/index.
|
|
2
|
+
import { M as ModalContext } from "../../contexts/ModalContext/index.92ae296c.js";
|
|
3
3
|
function useModal() {
|
|
4
4
|
const context = useContext(ModalContext);
|
|
5
5
|
if (!context)
|
package/index.js
CHANGED
|
@@ -18,36 +18,36 @@ import { R as R3 } from "./components/hook-form/RHFDateTime/index.7f1cbd85.js";
|
|
|
18
18
|
import "@m4l/graphics";
|
|
19
19
|
import { R as R4, a as a2 } from "./components/hook-form/RHFTextField/index.3cb4b35f.js";
|
|
20
20
|
import { I as I3 } from "./components/Icon/index.619fa9ad.js";
|
|
21
|
-
import { R as R5 } from "./components/hook-form/RHFPeriod/index.
|
|
21
|
+
import { R as R5 } from "./components/hook-form/RHFPeriod/index.146a34af.js";
|
|
22
22
|
import { E } from "./components/ErrorLabel/index.c8615f16.js";
|
|
23
|
-
import { P as P2, g as g2 } from "./components/Period/index.
|
|
24
|
-
import { b, M, d, g as g3 } from "./components/CommonActions/components/Actions/index.
|
|
23
|
+
import { P as P2, g as g2 } from "./components/Period/index.4b6704d0.js";
|
|
24
|
+
import { b, M, d, g as g3 } from "./components/CommonActions/components/Actions/index.4b0d3293.js";
|
|
25
25
|
import "@mui/material/Button";
|
|
26
|
-
import { M as M2, a as a3 } from "./contexts/ModalContext/index.
|
|
26
|
+
import { M as M2, a as a3 } from "./contexts/ModalContext/index.92ae296c.js";
|
|
27
27
|
import "@mui/lab";
|
|
28
28
|
import "lodash/isString";
|
|
29
29
|
import "react-dropzone";
|
|
30
30
|
import { R as R6 } from "./components/hook-form/RHFUpload/index.d5cc7c13.js";
|
|
31
31
|
import { A } from "./components/mui_extended/Accordion/index.86b97783.js";
|
|
32
32
|
import { A as A2 } from "./components/mui_extended/Avatar/index.fe06afd7.js";
|
|
33
|
-
import { B, L as L2 } from "./components/mui_extended/Button/index.
|
|
34
|
-
import { L as L3, P as P3 } from "./components/mui_extended/Popover/index.
|
|
35
|
-
import { P as P4, g as g4 } from "./components/mui_extended/Pager/index.
|
|
33
|
+
import { B, L as L2 } from "./components/mui_extended/Button/index.44282241.js";
|
|
34
|
+
import { L as L3, P as P3 } from "./components/mui_extended/Popover/index.2a084d8a.js";
|
|
35
|
+
import { P as P4, g as g4 } from "./components/mui_extended/Pager/index.74f16fe0.js";
|
|
36
36
|
import { T } from "./components/mui_extended/Tab/index.e0653a0a.js";
|
|
37
|
-
import { D, N, T as T2, b as b2, g as g5 } from "./components/DataGrid/index.
|
|
37
|
+
import { D, N, T as T2, c, d as d2, b as b2, g as g5 } from "./components/DataGrid/index.69d0fcea.js";
|
|
38
38
|
import "react-dnd";
|
|
39
39
|
import "react-dnd-html5-backend";
|
|
40
40
|
import { S } from "./components/ScrollBar/index.39eeb2de.js";
|
|
41
|
-
import { D as D2, d as
|
|
41
|
+
import { D as D2, d as d3, g as g6 } from "./components/DynamicFilter/index.68bcbc88.js";
|
|
42
42
|
import "simplebar/dist/simplebar.min.css";
|
|
43
43
|
import "@hookform/resolvers/yup";
|
|
44
44
|
import { R as R7 } from "./contexts/RHFormContext/index.d88e6e27.js";
|
|
45
45
|
import "yup";
|
|
46
46
|
import "./react-draggable.a09b624f.js";
|
|
47
|
-
import { M as M3, d as
|
|
47
|
+
import { M as M3, d as d4, g as g7 } from "./components/ModalDialog/index.d50c4a9d.js";
|
|
48
48
|
import { R as R8 } from "./components/Resizeable/index.d27b0310.js";
|
|
49
|
-
import { N as N2, d as
|
|
50
|
-
import { O, d as
|
|
49
|
+
import { N as N2, d as d5, g as g8 } from "./components/NoItemSelected/index.46d2f632.js";
|
|
50
|
+
import { O, d as d6, g as g9 } from "./components/ObjectLogs/index.4e4ae4f4.js";
|
|
51
51
|
import "./react-json-view.57125fcf.js";
|
|
52
52
|
import { P as P5 } from "./components/PaperForm/index.9582ff5e.js";
|
|
53
53
|
import { H } from "./components/Page/index.4237c241.js";
|
|
@@ -70,17 +70,24 @@ import { C } from "./components/mui_extended/CircularProgress/index.ad569afd.js"
|
|
|
70
70
|
import { L as L4 } from "./components/mui_extended/LinearProgress/index.c92b9ba9.js";
|
|
71
71
|
import { L as L5 } from "./components/mui_extended/LinkWithRoute/index.16436ab8.js";
|
|
72
72
|
import { T as T3 } from "./components/mui_extended/Typography/index.e5494696.js";
|
|
73
|
-
import { B as B4
|
|
74
|
-
import { D as D3
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
73
|
+
import { B as B4 } from "./components/formatters/BooleanFormatter/index.2df47b04.js";
|
|
74
|
+
import { D as D3 } from "./components/formatters/DateFormatter/index.80522f69.js";
|
|
75
|
+
import { U, g as g11 } from "./components/formatters/UncertaintyFormatter/index.08e1b79f.js";
|
|
76
|
+
import { P as P7, g as g12 } from "./components/formatters/PointsFormatter/index.80a4e414.js";
|
|
77
|
+
import { P as P8, g as g13 } from "./components/formatters/PriceFormatter/index.83cbe7be.js";
|
|
78
|
+
import { d as d7, g as g14 } from "./components/formatters/index.57ec5cbc.js";
|
|
79
|
+
import { c as c2 } from "./components/DataGrid/formatters/columnUncertaintyFormatter/index.cae2057a.js";
|
|
80
|
+
import { c as c3 } from "./components/DataGrid/formatters/columnPointsFormatter/index.5e645334.js";
|
|
81
|
+
import { c as c4 } from "./components/DataGrid/formatters/columnNestedValueFormatter/index.f68ef4e1.js";
|
|
82
|
+
import { c as c5 } from "./components/DataGrid/formatters/columnPriceFormatter/index.e612fda3.js";
|
|
83
|
+
import { A as A3 } from "./components/CommonActions/components/ActionCancel/index.a1fe59a4.js";
|
|
84
|
+
import { A as A4 } from "./components/CommonActions/components/ActionIntro/index.808a2cd1.js";
|
|
85
|
+
import { A as A5 } from "./components/CommonActions/components/ActionFormCancel/index.b97872f2.js";
|
|
79
86
|
import { A as A6 } from "./components/CommonActions/components/ActionFormIntro/index.ca4d2674.js";
|
|
80
87
|
import { L as L6 } from "./components/Loadable/index.55b8adb7.js";
|
|
81
88
|
import { S as S3 } from "./components/ScrollToTop/index.e06f98f6.js";
|
|
82
89
|
import { u } from "./hooks/useFormAddEdit/index.d4845f1a.js";
|
|
83
|
-
import { u as u2 } from "./hooks/useModal/index.
|
|
90
|
+
import { u as u2 } from "./hooks/useModal/index.44ea7900.js";
|
|
84
91
|
import { L as L7 } from "./assets/Logo/index.228dcb5a.js";
|
|
85
92
|
import "./node_modules.51fc30d1.js";
|
|
86
93
|
import "./utils/index.f3bfdc22.js";
|
|
@@ -92,6 +99,7 @@ import "react-dom";
|
|
|
92
99
|
import "./react-resizable.be53ee35.js";
|
|
93
100
|
import "./commonjs.565e6834.js";
|
|
94
101
|
import "react-helmet-async";
|
|
102
|
+
import "./components/WrapperComponent/index.5e872594.js";
|
|
95
103
|
export {
|
|
96
104
|
A as Accordion,
|
|
97
105
|
A3 as ActionCancel,
|
|
@@ -135,7 +143,7 @@ export {
|
|
|
135
143
|
P2 as Period,
|
|
136
144
|
P7 as PointsFormatter,
|
|
137
145
|
P3 as Popover,
|
|
138
|
-
|
|
146
|
+
P8 as PriceFormatter,
|
|
139
147
|
P as PropagateLoader,
|
|
140
148
|
P6 as PropertyValue,
|
|
141
149
|
R as RHFAutocomplete,
|
|
@@ -159,21 +167,23 @@ export {
|
|
|
159
167
|
T3 as Typography,
|
|
160
168
|
U as UncertaintyFormatter,
|
|
161
169
|
c as columnBooleanFormatter,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
170
|
+
d2 as columnDateFormatter,
|
|
171
|
+
c4 as columnNestedValueFormatter,
|
|
172
|
+
c3 as columnPointsFormatter,
|
|
173
|
+
c5 as columnPriceFormatter,
|
|
174
|
+
c2 as columnUncertaintyFormatter,
|
|
166
175
|
d as defaultCommonActionsDictionary,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
176
|
+
d3 as defaultDynamicFilterDictionary,
|
|
177
|
+
d7 as defaultFormattersDictionary,
|
|
178
|
+
d4 as defaultModalDialogDictionary,
|
|
179
|
+
d5 as defaultNoItemSelectedDictionary,
|
|
180
|
+
d6 as defaultObjectLogDictionary,
|
|
172
181
|
g3 as getCommonActionsDictionary,
|
|
173
182
|
b2 as getDataGridRowsFromSet,
|
|
174
183
|
g6 as getDynamicFilterComponentsDictionary,
|
|
175
|
-
|
|
176
|
-
|
|
184
|
+
g12 as getFormatPoints,
|
|
185
|
+
g13 as getFormatPrice,
|
|
186
|
+
g14 as getFormattersComponentsDictionary,
|
|
177
187
|
g5 as getGridComponentsDictionary,
|
|
178
188
|
g7 as getModalDialogComponentsDictionary,
|
|
179
189
|
g8 as getNoItemSelectedComponentsDictionary,
|
package/package.json
CHANGED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { getPropertyByString } from "@m4l/core";
|
|
4
|
-
import "../Icon/index.619fa9ad.js";
|
|
5
|
-
import "@mui/material/styles";
|
|
6
|
-
import "@m4l/graphics";
|
|
7
|
-
function FragmentJSXComponent(props) {
|
|
8
|
-
const {
|
|
9
|
-
children
|
|
10
|
-
} = props;
|
|
11
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
12
|
-
children: [" ", children]
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
function getUncertaintyFormat(obProps, fieldValue, fieldSymbol, fieldUnit) {
|
|
16
|
-
let result = "";
|
|
17
|
-
const ranges = getPropertyByString(obProps, fieldValue);
|
|
18
|
-
const symbol = getPropertyByString(obProps, fieldSymbol) || "";
|
|
19
|
-
const unit = getPropertyByString(obProps, fieldUnit) || "";
|
|
20
|
-
if (ranges === void 0 || ranges === null || !Array.isArray(ranges)) {
|
|
21
|
-
return "[]";
|
|
22
|
-
}
|
|
23
|
-
ranges.map((obj, idx) => {
|
|
24
|
-
const cmc_min_closed = obj.cmc_min_closed != true ? "<" : "\u2264";
|
|
25
|
-
const cmc_max_closed = obj.cmc_max_closed != true ? "<" : "\u2264";
|
|
26
|
-
result = result.concat(`${idx > 0 ? " " : ""}`, obj.cmc_min !== obj.cmc_max ? `[${obj.cmc_min}${unit} ${cmc_min_closed} ${symbol} ${cmc_max_closed} ${obj.cmc_max}${unit} \xB1 ${obj.cmc_uncertainty}]` : `[${obj.cmc_min}${unit} \xB1 ${obj.cmc_uncertainty}]`);
|
|
27
|
-
});
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
30
|
-
function UncertaintyFormatter(props) {
|
|
31
|
-
const {
|
|
32
|
-
obProps,
|
|
33
|
-
fieldValue,
|
|
34
|
-
fieldSymbol,
|
|
35
|
-
fieldUnit,
|
|
36
|
-
Component = FragmentJSXComponent
|
|
37
|
-
} = props;
|
|
38
|
-
return /* @__PURE__ */ jsx(Component, {
|
|
39
|
-
children: getUncertaintyFormat(obProps, fieldValue, fieldSymbol, fieldUnit)
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
function getFormatPoints(obProps, fieldValue, fieldUnit) {
|
|
43
|
-
let result = "";
|
|
44
|
-
const points = getPropertyByString(obProps, fieldValue);
|
|
45
|
-
const unit = getPropertyByString(obProps, fieldUnit) || "";
|
|
46
|
-
if (points === void 0 || points === null || !Array.isArray(points)) {
|
|
47
|
-
return "[]";
|
|
48
|
-
}
|
|
49
|
-
points.map((point) => {
|
|
50
|
-
if (point) {
|
|
51
|
-
result = result.concat(`[${point}${unit}]`);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
return result;
|
|
55
|
-
}
|
|
56
|
-
function PointsFormatter(props) {
|
|
57
|
-
const {
|
|
58
|
-
obProps,
|
|
59
|
-
fieldValue,
|
|
60
|
-
fieldUnit,
|
|
61
|
-
Component = FragmentJSXComponent
|
|
62
|
-
} = props;
|
|
63
|
-
return /* @__PURE__ */ jsx(Component, {
|
|
64
|
-
children: getFormatPoints(obProps, fieldValue, fieldUnit)
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function PriceFormatter(props) {
|
|
68
|
-
const {
|
|
69
|
-
value,
|
|
70
|
-
Component = FragmentJSXComponent
|
|
71
|
-
} = props;
|
|
72
|
-
return /* @__PURE__ */ jsx(Component, {
|
|
73
|
-
children: `${value}$Cop`
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function getFormattersComponentsDictionary() {
|
|
77
|
-
return ["formatters"];
|
|
78
|
-
}
|
|
79
|
-
const defaultFormattersDictionary = {
|
|
80
|
-
pager: {
|
|
81
|
-
boolean_yes: "Yes",
|
|
82
|
-
boolean_no: "No",
|
|
83
|
-
boolean_true: "True",
|
|
84
|
-
boolean_false: "False"
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
function columnUncertaintyFormatter(props) {
|
|
88
|
-
return (obProps) => {
|
|
89
|
-
return /* @__PURE__ */ jsx(UncertaintyFormatter, {
|
|
90
|
-
obProps,
|
|
91
|
-
...props
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
function columnPointsFormatter(props) {
|
|
96
|
-
return (obProps) => {
|
|
97
|
-
return /* @__PURE__ */ jsx(PointsFormatter, {
|
|
98
|
-
obProps,
|
|
99
|
-
...props
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
function columnNestedValueFormatter(props) {
|
|
104
|
-
const {
|
|
105
|
-
fieldValue,
|
|
106
|
-
Component = FragmentJSXComponent
|
|
107
|
-
} = props;
|
|
108
|
-
return (obProps) => {
|
|
109
|
-
return /* @__PURE__ */ jsx(Component, {
|
|
110
|
-
children: getPropertyByString(obProps, fieldValue) + ""
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
export {
|
|
115
|
-
FragmentJSXComponent as F,
|
|
116
|
-
PointsFormatter as P,
|
|
117
|
-
UncertaintyFormatter as U,
|
|
118
|
-
getFormatPoints as a,
|
|
119
|
-
PriceFormatter as b,
|
|
120
|
-
getFormattersComponentsDictionary as c,
|
|
121
|
-
defaultFormattersDictionary as d,
|
|
122
|
-
columnUncertaintyFormatter as e,
|
|
123
|
-
columnPointsFormatter as f,
|
|
124
|
-
getUncertaintyFormat as g,
|
|
125
|
-
columnNestedValueFormatter as h
|
|
126
|
-
};
|