@m4l/components 0.1.32 → 0.1.33
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/DataGrid/formatters/columnBooleanFormatter/types.d.ts +2 -2
- package/components/DataGrid/formatters/columnDateFormatter/types.d.ts +2 -2
- package/components/DataGrid/formatters/columnNestedValueFormatter/types.d.ts +2 -2
- package/components/DataGrid/formatters/columnPointsFormatter/types.d.ts +2 -2
- package/components/DataGrid/formatters/columnUncertaintyFormatter/types.d.ts +2 -2
- package/components/ObjectLogs/{index.af1c3382.js → index.ca9cd589.js} +1 -1
- package/components/formatters/BooleanFormatter/{index.81f4ea70.js → index.224d5c4e.js} +4 -3
- package/components/formatters/BooleanFormatter/types.d.ts +2 -2
- package/components/formatters/DateFormatter/{index.8494575f.js → index.199172d2.js} +4 -3
- package/components/formatters/DateFormatter/types.d.ts +2 -2
- package/components/formatters/FragmentJSXComponent/index.d.ts +5 -0
- package/components/formatters/PointsFormatter/types.d.ts +2 -2
- package/components/formatters/PriceFormatter/types.d.ts +2 -2
- package/components/formatters/UncertaintyFormatter/types.d.ts +2 -2
- package/components/formatters/{index.a0309e3a.js → index.e154f663.js} +15 -6
- package/index.js +4 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { PresentationType } from '../../../../components/formatters/BooleanFormatter/types';
|
|
3
3
|
export interface ColumnBooleanFormatterProps {
|
|
4
|
-
Component?:
|
|
4
|
+
Component?: React.ElementType;
|
|
5
5
|
presentationType: PresentationType;
|
|
6
6
|
fieldValue: string;
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { PresentationType } from '../../../formatters/DateFormatter/types';
|
|
3
3
|
export interface ColumnDateFormatterProps {
|
|
4
|
-
Component?:
|
|
4
|
+
Component?: React.ElementType;
|
|
5
5
|
presentationType: PresentationType;
|
|
6
6
|
format?: string;
|
|
7
7
|
fieldValue: string;
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { D as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.b6a45f67.js";
|
|
5
|
-
import { D as DateFormatter } from "../formatters/DateFormatter/index.
|
|
5
|
+
import { D as DateFormatter } from "../formatters/DateFormatter/index.199172d2.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";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useModuleDictionary, useEnvironment, getPropertyByString } from "@m4l/core";
|
|
2
|
-
import
|
|
2
|
+
import { useMemo } from "react";
|
|
3
3
|
import { I as Icon } from "../../Icon/index.619fa9ad.js";
|
|
4
|
+
import { F as FragmentJSXComponent } from "../index.e154f663.js";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import "@m4l/graphics";
|
|
6
7
|
function BooleanFormatter(props) {
|
|
7
8
|
const {
|
|
8
9
|
presentationType,
|
|
9
10
|
value,
|
|
10
|
-
Component =
|
|
11
|
+
Component = FragmentJSXComponent
|
|
11
12
|
} = props;
|
|
12
13
|
const {
|
|
13
14
|
getLabel
|
|
@@ -43,7 +44,7 @@ function columnBooleanFormatter(props) {
|
|
|
43
44
|
const {
|
|
44
45
|
fieldValue,
|
|
45
46
|
presentationType,
|
|
46
|
-
Component
|
|
47
|
+
Component
|
|
47
48
|
} = props;
|
|
48
49
|
return (obProps) => {
|
|
49
50
|
return /* @__PURE__ */ jsx(BooleanFormatter, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export declare type PresentationType = 'string_yes_no' | 'string_true_false' | 'check';
|
|
3
3
|
export interface BooleanFormatterProps {
|
|
4
|
-
Component?:
|
|
4
|
+
Component?: React.ElementType;
|
|
5
5
|
presentationType: PresentationType;
|
|
6
6
|
value?: boolean;
|
|
7
7
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import React__default from "react";
|
|
2
1
|
import { getPropertyByString } from "@m4l/core";
|
|
2
|
+
import "react";
|
|
3
3
|
import "../../Icon/index.619fa9ad.js";
|
|
4
4
|
import "@mui/material/styles";
|
|
5
5
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
6
6
|
import { useFormatter } from "@m4l/graphics";
|
|
7
|
+
import { F as FragmentJSXComponent } from "../index.e154f663.js";
|
|
7
8
|
function DateFormatter(props) {
|
|
8
9
|
const {
|
|
9
10
|
presentationType,
|
|
10
11
|
value,
|
|
11
12
|
format,
|
|
12
|
-
Component =
|
|
13
|
+
Component = FragmentJSXComponent
|
|
13
14
|
} = props;
|
|
14
15
|
const {
|
|
15
16
|
dateFormatter
|
|
@@ -51,7 +52,7 @@ function columnDateFormatter(props) {
|
|
|
51
52
|
const {
|
|
52
53
|
fieldValue,
|
|
53
54
|
presentationType,
|
|
54
|
-
Component
|
|
55
|
+
Component
|
|
55
56
|
} = props;
|
|
56
57
|
return (obProps) => {
|
|
57
58
|
return /* @__PURE__ */ jsx(DateFormatter, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Maybe } from '@m4l/core';
|
|
2
|
-
import { ComponentType } from 'react';
|
|
3
3
|
export declare type PresentationType = 'date' | 'datetime' | 'time';
|
|
4
4
|
export interface DateFormatterProps {
|
|
5
|
-
Component?:
|
|
5
|
+
Component?: React.ElementType;
|
|
6
6
|
presentationType: PresentationType;
|
|
7
7
|
format?: string;
|
|
8
8
|
value: Maybe<Date | string | number>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export declare type CalibrationPoint = number | null;
|
|
3
3
|
export interface PointsFormatterProps {
|
|
4
|
-
Component?:
|
|
4
|
+
Component?: React.ElementType;
|
|
5
5
|
obProps: any;
|
|
6
6
|
fieldUnit: string;
|
|
7
7
|
fieldValue: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export interface UncertaintyRange {
|
|
3
3
|
cmc_min_closed: boolean;
|
|
4
4
|
cmc_min: number;
|
|
@@ -7,7 +7,7 @@ export interface UncertaintyRange {
|
|
|
7
7
|
cmc_uncertainty: number;
|
|
8
8
|
}
|
|
9
9
|
export interface UncertaintyFormatterProps {
|
|
10
|
-
Component?:
|
|
10
|
+
Component?: React.ElementType;
|
|
11
11
|
obProps: any;
|
|
12
12
|
fieldValue: string;
|
|
13
13
|
fieldSymbol: string;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
3
|
import { getPropertyByString } from "@m4l/core";
|
|
4
4
|
import "../Icon/index.619fa9ad.js";
|
|
5
5
|
import "@mui/material/styles";
|
|
6
6
|
import "@m4l/graphics";
|
|
7
|
+
function FragmentJSXComponent(props) {
|
|
8
|
+
const {
|
|
9
|
+
children
|
|
10
|
+
} = props;
|
|
11
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
12
|
+
children: [" ", children]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
7
15
|
function getUncertaintyFormat(obProps, fieldValue, fieldSymbol, fieldUnit) {
|
|
8
16
|
let result = "";
|
|
9
17
|
const ranges = getPropertyByString(obProps, fieldValue);
|
|
@@ -25,7 +33,7 @@ function UncertaintyFormatter(props) {
|
|
|
25
33
|
fieldValue,
|
|
26
34
|
fieldSymbol,
|
|
27
35
|
fieldUnit,
|
|
28
|
-
Component =
|
|
36
|
+
Component = FragmentJSXComponent
|
|
29
37
|
} = props;
|
|
30
38
|
return /* @__PURE__ */ jsx(Component, {
|
|
31
39
|
children: getUncertaintyFormat(obProps, fieldValue, fieldSymbol, fieldUnit)
|
|
@@ -50,7 +58,7 @@ function PointsFormatter(props) {
|
|
|
50
58
|
obProps,
|
|
51
59
|
fieldValue,
|
|
52
60
|
fieldUnit,
|
|
53
|
-
Component =
|
|
61
|
+
Component = FragmentJSXComponent
|
|
54
62
|
} = props;
|
|
55
63
|
return /* @__PURE__ */ jsx(Component, {
|
|
56
64
|
children: getFormatPoints(obProps, fieldValue, fieldUnit)
|
|
@@ -59,7 +67,7 @@ function PointsFormatter(props) {
|
|
|
59
67
|
function PriceFormatter(props) {
|
|
60
68
|
const {
|
|
61
69
|
value,
|
|
62
|
-
Component =
|
|
70
|
+
Component = FragmentJSXComponent
|
|
63
71
|
} = props;
|
|
64
72
|
return /* @__PURE__ */ jsx(Component, {
|
|
65
73
|
children: `${value}$Cop`
|
|
@@ -95,7 +103,7 @@ function columnPointsFormatter(props) {
|
|
|
95
103
|
function columnNestedValueFormatter(props) {
|
|
96
104
|
const {
|
|
97
105
|
fieldValue,
|
|
98
|
-
Component =
|
|
106
|
+
Component = FragmentJSXComponent
|
|
99
107
|
} = props;
|
|
100
108
|
return (obProps) => {
|
|
101
109
|
return /* @__PURE__ */ jsx(Component, {
|
|
@@ -104,6 +112,7 @@ function columnNestedValueFormatter(props) {
|
|
|
104
112
|
};
|
|
105
113
|
}
|
|
106
114
|
export {
|
|
115
|
+
FragmentJSXComponent as F,
|
|
107
116
|
PointsFormatter as P,
|
|
108
117
|
UncertaintyFormatter as U,
|
|
109
118
|
getFormatPoints as a,
|
package/index.js
CHANGED
|
@@ -47,7 +47,7 @@ import "./react-draggable.a09b624f.js";
|
|
|
47
47
|
import { M as M3, d as d3, g as g7 } from "./components/ModalDialog/index.81b8e093.js";
|
|
48
48
|
import { R as R8 } from "./components/Resizeable/index.d27b0310.js";
|
|
49
49
|
import { N as N2, d as d4, g as g8 } from "./components/NoItemSelected/index.46d2f632.js";
|
|
50
|
-
import { O, d as d5, g as g9 } from "./components/ObjectLogs/index.
|
|
50
|
+
import { O, d as d5, g as g9 } from "./components/ObjectLogs/index.ca9cd589.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,9 +70,9 @@ 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, c } from "./components/formatters/BooleanFormatter/index.
|
|
74
|
-
import { D as D3, c as c2 } from "./components/formatters/DateFormatter/index.
|
|
75
|
-
import { P as P7, b as b4, U, h, f, e, d as d6, a as a5, c as c3, g as g11 } from "./components/formatters/index.
|
|
73
|
+
import { B as B4, c } from "./components/formatters/BooleanFormatter/index.224d5c4e.js";
|
|
74
|
+
import { D as D3, c as c2 } from "./components/formatters/DateFormatter/index.199172d2.js";
|
|
75
|
+
import { P as P7, b as b4, U, h, f, e, d as d6, a as a5, c as c3, g as g11 } from "./components/formatters/index.e154f663.js";
|
|
76
76
|
import { A as A3 } from "./components/CommonActions/components/ActionCancel/index.641ea102.js";
|
|
77
77
|
import { A as A4 } from "./components/CommonActions/components/ActionIntro/index.d53e0d31.js";
|
|
78
78
|
import { A as A5 } from "./components/CommonActions/components/ActionFormCancel/index.3b9e5121.js";
|