@etsoo/materialui 1.3.58 → 1.3.59
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/__tests__/ResponsePage.tsx +12 -3
- package/lib/AddresSelector.d.ts +1 -1
- package/lib/AddresSelector.js +9 -18
- package/lib/AuditDisplay.d.ts +1 -1
- package/lib/AuditDisplay.js +12 -15
- package/lib/BackButton.d.ts +1 -2
- package/lib/BackButton.js +3 -4
- package/lib/BridgeCloseButton.d.ts +1 -2
- package/lib/BridgeCloseButton.js +3 -4
- package/lib/ButtonLink.d.ts +1 -2
- package/lib/ButtonLink.js +2 -2
- package/lib/ComboBox.d.ts +1 -2
- package/lib/ComboBox.js +12 -16
- package/lib/ComboBoxMultiple.d.ts +1 -2
- package/lib/ComboBoxMultiple.js +15 -19
- package/lib/ComboBoxPro.d.ts +1 -2
- package/lib/ComboBoxPro.js +3 -2
- package/lib/CountdownButton.js +4 -3
- package/lib/CountryList.d.ts +1 -2
- package/lib/CountryList.js +2 -1
- package/lib/CultureDataTable.d.ts +1 -2
- package/lib/CultureDataTable.js +2 -1
- package/lib/DataGridEx.d.ts +1 -1
- package/lib/DataGridEx.js +55 -58
- package/lib/DataGridRenderers.js +5 -5
- package/lib/DataSteps.d.ts +1 -2
- package/lib/DataSteps.js +20 -23
- package/lib/DataTable.d.ts +1 -1
- package/lib/DataTable.js +2 -1
- package/lib/DialogButton.d.ts +1 -1
- package/lib/DialogButton.js +6 -13
- package/lib/DnDList.d.ts +1 -1
- package/lib/DnDList.js +8 -8
- package/lib/DraggablePaperComponent.d.ts +1 -2
- package/lib/DraggablePaperComponent.js +2 -2
- package/lib/EmailInput.d.ts +1 -2
- package/lib/EmailInput.js +2 -2
- package/lib/FabBox.d.ts +1 -2
- package/lib/FabBox.js +4 -3
- package/lib/FieldSetEx.d.ts +1 -1
- package/lib/FieldSetEx.js +13 -16
- package/lib/FileUploadButton.d.ts +1 -1
- package/lib/FileUploadButton.js +27 -29
- package/lib/FlexBox.d.ts +2 -3
- package/lib/FlexBox.js +3 -3
- package/lib/GridDataFormat.js +2 -2
- package/lib/HiSelector.d.ts +1 -1
- package/lib/HiSelector.js +2 -12
- package/lib/HiSelectorTL.d.ts +1 -1
- package/lib/HiSelectorTL.js +2 -12
- package/lib/IconButtonLink.d.ts +1 -2
- package/lib/IconButtonLink.js +2 -2
- package/lib/InputField.js +2 -1
- package/lib/InputTipField.d.ts +1 -1
- package/lib/InputTipField.js +12 -14
- package/lib/IntInputField.js +28 -33
- package/lib/ItemList.d.ts +1 -1
- package/lib/ItemList.js +6 -11
- package/lib/LineChart.d.ts +1 -2
- package/lib/LineChart.js +2 -1
- package/lib/ListChooser.d.ts +1 -1
- package/lib/ListChooser.js +4 -7
- package/lib/ListMoreDisplay.d.ts +1 -1
- package/lib/ListMoreDisplay.js +5 -10
- package/lib/LoadingButton.d.ts +1 -2
- package/lib/LoadingButton.js +3 -2
- package/lib/MaskInput.d.ts +1 -2
- package/lib/MaskInput.js +2 -1
- package/lib/MenuButton.d.ts +1 -1
- package/lib/MenuButton.js +30 -31
- package/lib/MobileListItemRenderer.d.ts +1 -1
- package/lib/MobileListItemRenderer.js +15 -18
- package/lib/MoneyInputField.js +2 -1
- package/lib/MoreFab.d.ts +1 -1
- package/lib/MoreFab.js +21 -24
- package/lib/NotifierMU.d.ts +2 -2
- package/lib/NotifierMU.js +27 -67
- package/lib/NumberInputField.d.ts +1 -1
- package/lib/NumberInputField.js +4 -4
- package/lib/OptionBool.d.ts +1 -2
- package/lib/OptionBool.js +2 -2
- package/lib/OptionGroup.d.ts +1 -1
- package/lib/OptionGroup.js +17 -20
- package/lib/OptionGroupFlag.d.ts +1 -1
- package/lib/OptionGroupFlag.js +15 -18
- package/lib/PList.d.ts +1 -2
- package/lib/PList.js +5 -4
- package/lib/PercentCircularProgress.d.ts +1 -2
- package/lib/PercentCircularProgress.js +11 -14
- package/lib/PercentLinearProgress.d.ts +1 -2
- package/lib/PercentLinearProgress.js +2 -6
- package/lib/ProgressCount.d.ts +1 -2
- package/lib/ProgressCount.js +12 -18
- package/lib/PullToRefreshUI.d.ts +1 -2
- package/lib/PullToRefreshUI.js +2 -1
- package/lib/QuickList.d.ts +1 -1
- package/lib/QuickList.js +12 -14
- package/lib/ResponsibleContainer.d.ts +1 -1
- package/lib/ResponsibleContainer.js +11 -16
- package/lib/ScrollTopFab.d.ts +1 -2
- package/lib/ScrollTopFab.js +2 -3
- package/lib/ScrollerListEx.d.ts +1 -1
- package/lib/ScrollerListEx.js +3 -2
- package/lib/SearchBar.d.ts +1 -1
- package/lib/SearchBar.js +27 -35
- package/lib/SearchField.d.ts +1 -2
- package/lib/SearchField.js +2 -1
- package/lib/SearchOptionGroup.d.ts +1 -2
- package/lib/SearchOptionGroup.js +2 -2
- package/lib/SelectBool.d.ts +1 -2
- package/lib/SelectBool.js +2 -2
- package/lib/SelectEx.d.ts +1 -1
- package/lib/SelectEx.js +47 -55
- package/lib/ShowDataComparison.js +2 -11
- package/lib/Switch.d.ts +1 -2
- package/lib/Switch.js +3 -2
- package/lib/SwitchAnt.d.ts +1 -2
- package/lib/SwitchAnt.js +12 -14
- package/lib/SwitchField.d.ts +1 -1
- package/lib/SwitchField.js +13 -16
- package/lib/TabBox.d.ts +1 -1
- package/lib/TabBox.js +6 -9
- package/lib/TableEx.d.ts +1 -1
- package/lib/TableEx.js +79 -89
- package/lib/TagList.d.ts +1 -2
- package/lib/TagList.js +4 -5
- package/lib/TagListPro.d.ts +1 -2
- package/lib/TagListPro.js +4 -6
- package/lib/TextFieldEx.js +3 -6
- package/lib/Tiplist.d.ts +1 -2
- package/lib/Tiplist.js +39 -40
- package/lib/TiplistPro.d.ts +2 -2
- package/lib/TiplistPro.js +48 -49
- package/lib/TooltipClick.d.ts +1 -1
- package/lib/TooltipClick.js +3 -3
- package/lib/TwoFieldInput.d.ts +1 -2
- package/lib/TwoFieldInput.js +4 -5
- package/lib/UserAvatar.d.ts +1 -2
- package/lib/UserAvatar.js +3 -3
- package/lib/UserAvatarEditor.d.ts +1 -2
- package/lib/UserAvatarEditor.js +2 -19
- package/lib/messages/OperationMessageContainer.d.ts +1 -2
- package/lib/messages/OperationMessageContainer.js +2 -1
- package/lib/pages/CommonPage.d.ts +1 -2
- package/lib/pages/CommonPage.js +15 -24
- package/lib/pages/DataGridPage.d.ts +1 -2
- package/lib/pages/DataGridPage.js +5 -8
- package/lib/pages/EditPage.d.ts +1 -1
- package/lib/pages/EditPage.js +6 -15
- package/lib/pages/FixedListPage.d.ts +1 -2
- package/lib/pages/FixedListPage.js +5 -9
- package/lib/pages/LeftDrawer.d.ts +1 -1
- package/lib/pages/LeftDrawer.js +3 -10
- package/lib/pages/ListPage.d.ts +1 -2
- package/lib/pages/ListPage.js +4 -7
- package/lib/pages/ResponsivePage.d.ts +1 -2
- package/lib/pages/ResponsivePage.js +25 -26
- package/lib/pages/TablePage.d.ts +1 -2
- package/lib/pages/TablePage.js +5 -8
- package/lib/pages/UserMenu.d.ts +1 -1
- package/lib/pages/UserMenu.js +33 -35
- package/lib/pages/ViewPage.d.ts +2 -2
- package/lib/pages/ViewPage.js +29 -37
- package/lib/texts/DateText.d.ts +1 -2
- package/lib/texts/DateText.js +2 -2
- package/lib/texts/MoneyText.d.ts +1 -2
- package/lib/texts/MoneyText.js +4 -4
- package/lib/texts/NumberText.d.ts +1 -2
- package/lib/texts/NumberText.js +2 -2
- package/package.json +3 -3
- package/tsconfig.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { MUGlobal } from "../MUGlobal";
|
|
3
4
|
import { ResponsibleContainer } from "../ResponsibleContainer";
|
|
@@ -17,30 +18,28 @@ export function ResponsivePage(props) {
|
|
|
17
18
|
const [scrollContainer, setScrollContainer] = React.useState();
|
|
18
19
|
const [direction, setDirection] = React.useState(fabColumnDirection);
|
|
19
20
|
// Layout
|
|
20
|
-
return (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
setScrollContainer(element);
|
|
45
|
-
}, ...rest })));
|
|
21
|
+
return (_jsxs(CommonPage, { ...pageRest, paddings: {}, scrollContainer: scrollContainer, fabColumnDirection: direction, children: [operationMessageHandler && (_jsx(OperationMessageContainer, { handler: operationMessageHandler })), _jsx(ResponsibleContainer, { paddings: paddings, containerBoxSx: (paddings, hasField, _dataGrid) => {
|
|
22
|
+
// Half
|
|
23
|
+
const half = MUGlobal.half(paddings);
|
|
24
|
+
// .SearchBox keep the same to avoid flick when switching between DataGrid and List
|
|
25
|
+
return {
|
|
26
|
+
paddingTop: paddings,
|
|
27
|
+
"& .SearchBox": {
|
|
28
|
+
marginLeft: paddings,
|
|
29
|
+
marginRight: paddings,
|
|
30
|
+
marginBottom: hasField ? half : 0
|
|
31
|
+
},
|
|
32
|
+
"& .ListBox": {
|
|
33
|
+
marginBottom: paddings
|
|
34
|
+
},
|
|
35
|
+
"& .DataGridBox": {
|
|
36
|
+
marginLeft: paddings,
|
|
37
|
+
marginRight: paddings,
|
|
38
|
+
marginBottom: paddings
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}, elementReady: (element, isDataGrid) => {
|
|
42
|
+
setDirection(!isDataGrid);
|
|
43
|
+
setScrollContainer(element);
|
|
44
|
+
}, ...rest })] }));
|
|
46
45
|
}
|
package/lib/pages/TablePage.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DataTypes, IdDefaultType } from "@etsoo/shared";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import { TablePageProps } from "./TablePageProps";
|
|
4
3
|
/**
|
|
5
4
|
* Table page
|
|
6
5
|
* @param props Props
|
|
7
6
|
* @returns Component
|
|
8
7
|
*/
|
|
9
|
-
export declare function TablePage<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: TablePageProps<T, F, D>):
|
|
8
|
+
export declare function TablePage<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: TablePageProps<T, F, D>): import("react/jsx-runtime").JSX.Element;
|
package/lib/pages/TablePage.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { useCombinedRefs, useDimensions } from "@etsoo/react";
|
|
2
3
|
import { Box, Stack } from "@mui/material";
|
|
3
4
|
import React from "react";
|
|
@@ -54,16 +55,12 @@ export function TablePage(props) {
|
|
|
54
55
|
const paddingBottom = parseFloat(style.paddingBottom);
|
|
55
56
|
if (!isNaN(paddingBottom))
|
|
56
57
|
maxHeight -= paddingBottom;
|
|
57
|
-
return (
|
|
58
|
+
return (_jsx(TableEx, { autoLoad: false, columns: columns, loadData: localLoadData, maxHeight: maxHeight, mRef: refs, ...rest }));
|
|
58
59
|
}
|
|
59
60
|
}, [rect]);
|
|
60
61
|
const f = typeof fields == "function" ? fields(searchData ?? {}) : fields;
|
|
61
62
|
// Layout
|
|
62
|
-
return (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
paddingBottom: pageProps.paddings
|
|
66
|
-
} },
|
|
67
|
-
React.createElement(SearchBar, { fields: f, onSubmit: onSubmit })),
|
|
68
|
-
list)));
|
|
63
|
+
return (_jsx(CommonPage, { ...pageProps, scrollContainer: globalThis, children: _jsxs(Stack, { children: [_jsx(Box, { ref: dimensions[0][0], sx: {
|
|
64
|
+
paddingBottom: pageProps.paddings
|
|
65
|
+
}, children: _jsx(SearchBar, { fields: f, onSubmit: onSubmit }) }), list] }) }));
|
|
69
66
|
}
|
package/lib/pages/UserMenu.d.ts
CHANGED
|
@@ -37,4 +37,4 @@ export declare const eventWatcher: EventWatcher;
|
|
|
37
37
|
* @param props Props
|
|
38
38
|
* @returns Component
|
|
39
39
|
*/
|
|
40
|
-
export declare function UserMenu(props: UserMenuProps):
|
|
40
|
+
export declare function UserMenu(props: UserMenuProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/pages/UserMenu.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { EventWatcher } from "@etsoo/react";
|
|
2
3
|
import { IconButton, Menu } from "@mui/material";
|
|
3
4
|
import React from "react";
|
|
@@ -46,41 +47,38 @@ export function UserMenu(props) {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
|
-
return (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
transform: "translateY(-50%) rotate(45deg)",
|
|
75
|
-
zIndex: 0
|
|
50
|
+
return (_jsxs(React.Fragment, { children: [_jsx(IconButton, { edge: "end", "aria-haspopup": "true", onClick: handleUserMenuOpen, color: "inherit", children: _jsx(UserAvatar, { title: name, src: avatar }) }), _jsx(Menu, { slotProps: {
|
|
51
|
+
paper: {
|
|
52
|
+
elevation: 0,
|
|
53
|
+
sx: {
|
|
54
|
+
overflow: "visible",
|
|
55
|
+
filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
|
|
56
|
+
mt: -0.4,
|
|
57
|
+
"& .MuiAvatar-root": {
|
|
58
|
+
width: 32,
|
|
59
|
+
height: 32,
|
|
60
|
+
ml: -0.5,
|
|
61
|
+
mr: 1
|
|
62
|
+
},
|
|
63
|
+
"&:before": {
|
|
64
|
+
content: '""',
|
|
65
|
+
display: "block",
|
|
66
|
+
position: "absolute",
|
|
67
|
+
top: 0,
|
|
68
|
+
right: 14,
|
|
69
|
+
width: 10,
|
|
70
|
+
height: 10,
|
|
71
|
+
bgcolor: "background.paper",
|
|
72
|
+
transform: "translateY(-50%) rotate(45deg)",
|
|
73
|
+
zIndex: 0
|
|
74
|
+
}
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, open: isMenuOpen, transitionDuration: 0, onTransitionEnd: () => eventWatcher.do(eventWatcherAction), onClick: handleClick, onClose: handleMenuClose }, children(handleMenuClose))));
|
|
77
|
+
}, disableScrollLock: true, anchorEl: anchorEl, anchorOrigin: {
|
|
78
|
+
vertical: "bottom",
|
|
79
|
+
horizontal: "right"
|
|
80
|
+
}, keepMounted: true, transformOrigin: {
|
|
81
|
+
vertical: "top",
|
|
82
|
+
horizontal: "right"
|
|
83
|
+
}, open: isMenuOpen, transitionDuration: 0, onTransitionEnd: () => eventWatcher.do(eventWatcherAction), onClick: handleClick, onClose: handleMenuClose, children: children(handleMenuClose) })] }));
|
|
86
84
|
}
|
package/lib/pages/ViewPage.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type ViewPageGridItemProps = GridProps & {
|
|
|
17
17
|
* @param props Props
|
|
18
18
|
* @returns Result
|
|
19
19
|
*/
|
|
20
|
-
export declare function ViewPageGridItem(props: ViewPageGridItemProps):
|
|
20
|
+
export declare function ViewPageGridItem(props: ViewPageGridItemProps): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
/**
|
|
22
22
|
* View page row width type
|
|
23
23
|
*/
|
|
@@ -100,5 +100,5 @@ export interface ViewPageProps<T extends DataTypes.StringRecord> extends Omit<Co
|
|
|
100
100
|
* View page
|
|
101
101
|
* @param props Props
|
|
102
102
|
*/
|
|
103
|
-
export declare function ViewPage<T extends DataTypes.StringRecord>(props: ViewPageProps<T>):
|
|
103
|
+
export declare function ViewPage<T extends DataTypes.StringRecord>(props: ViewPageProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
104
104
|
export {};
|
package/lib/pages/ViewPage.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createElement as _createElement } from "react";
|
|
2
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
1
3
|
import { ScrollRestoration } from "@etsoo/react";
|
|
2
4
|
import { DateUtils, Utils } from "@etsoo/shared";
|
|
3
5
|
import { Grid, LinearProgress, Stack, Typography } from "@mui/material";
|
|
@@ -27,11 +29,7 @@ export function ViewPageGridItem(props) {
|
|
|
27
29
|
options = getResp(singleRow ?? "small");
|
|
28
30
|
}
|
|
29
31
|
// Layout
|
|
30
|
-
return (
|
|
31
|
-
label != null && (React.createElement(Typography, { variant: "caption", component: "div" },
|
|
32
|
-
label,
|
|
33
|
-
":")),
|
|
34
|
-
typeof data === "object" ? (data) : (React.createElement(Typography, { variant: "subtitle2" }, data))));
|
|
32
|
+
return (_jsxs(Grid, { item: true, ...gridProps, ...options, children: [label != null && (_jsxs(Typography, { variant: "caption", component: "div", children: [label, ":"] })), typeof data === "object" ? (data) : (_jsx(Typography, { variant: "subtitle2", children: data }))] }));
|
|
35
33
|
}
|
|
36
34
|
function formatItemData(fieldData) {
|
|
37
35
|
if (fieldData == null)
|
|
@@ -125,36 +123,30 @@ export function ViewPage(props) {
|
|
|
125
123
|
MessageUtils.offRefresh(refreshHandler);
|
|
126
124
|
};
|
|
127
125
|
}, []);
|
|
128
|
-
return (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
Utils.getResult(children, data, refresh),
|
|
155
|
-
pullToRefresh && (React.createElement(PullToRefreshUI, { mainElement: pullContainer, triggerElement: pullContainer, instructionsPullToRefresh: labels.pullToRefresh, instructionsReleaseToRefresh: labels.releaseToRefresh, instructionsRefreshing: labels.refreshing, onRefresh: refresh, shouldPullToRefresh: () => {
|
|
156
|
-
const container = document.querySelector(pullContainer);
|
|
157
|
-
return !container?.scrollTop;
|
|
158
|
-
} })),
|
|
159
|
-
React.createElement(ScrollRestoration, null)))));
|
|
126
|
+
return (_jsx(CommonPage, { paddings: paddings, onRefresh: supportRefresh ? refresh : undefined, onUpdate: supportRefresh ? undefined : refresh, ...rest, scrollContainer: globalThis, fabColumnDirection: fabColumnDirection, fabTop: fabTop, supportBack: supportBack, children: data == null ? (_jsx(LinearProgress, {})) : (_jsxs(React.Fragment, { children: [operationMessageHandler && (_jsx(OperationMessageContainer, { handler: "id" in operationMessageHandler
|
|
127
|
+
? [
|
|
128
|
+
operationMessageHandler.types,
|
|
129
|
+
refresh,
|
|
130
|
+
operationMessageHandler.id
|
|
131
|
+
]
|
|
132
|
+
: operationMessageHandler })), _jsx(Grid, { container: true, justifyContent: "left", spacing: spacing, className: "ET-ViewPage", ref: gridRef, sx: {
|
|
133
|
+
".MuiTypography-subtitle2": {
|
|
134
|
+
fontWeight: "bold"
|
|
135
|
+
}
|
|
136
|
+
}, children: fields.map((field, index) => {
|
|
137
|
+
// Get data
|
|
138
|
+
if (typeof field === "function") {
|
|
139
|
+
// Most flexible way, do whatever you want
|
|
140
|
+
return field(data, refresh);
|
|
141
|
+
}
|
|
142
|
+
const [itemData, itemLabel, gridProps] = getItemField(field, data);
|
|
143
|
+
// Some callback function may return '' instead of undefined
|
|
144
|
+
if (itemData == null || itemData === "")
|
|
145
|
+
return undefined;
|
|
146
|
+
// Layout
|
|
147
|
+
return (_createElement(ViewPageGridItem, { item: true, ...gridProps, key: index, data: itemData, label: itemLabel }));
|
|
148
|
+
}) }), actions !== null && (_jsx(Stack, { className: "ET-ViewPage-Actions", direction: "row", width: "100%", flexWrap: "wrap", justifyContent: "flex-end", paddingTop: actions == null ? undefined : paddings, paddingBottom: paddings, gap: paddings, children: actions != null && Utils.getResult(actions, data, refresh) })), Utils.getResult(children, data, refresh), pullToRefresh && (_jsx(PullToRefreshUI, { mainElement: pullContainer, triggerElement: pullContainer, instructionsPullToRefresh: labels.pullToRefresh, instructionsReleaseToRefresh: labels.releaseToRefresh, instructionsRefreshing: labels.refreshing, onRefresh: refresh, shouldPullToRefresh: () => {
|
|
149
|
+
const container = document.querySelector(pullContainer);
|
|
150
|
+
return !container?.scrollTop;
|
|
151
|
+
} })), _jsx(ScrollRestoration, {})] })) }));
|
|
160
152
|
}
|
package/lib/texts/DateText.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DateUtils } from '@etsoo/shared';
|
|
2
2
|
import { TypographyProps } from '@mui/material';
|
|
3
|
-
import React from 'react';
|
|
4
3
|
/**
|
|
5
4
|
* Date text props
|
|
6
5
|
*/
|
|
@@ -31,4 +30,4 @@ export interface DateTextProps extends TypographyProps {
|
|
|
31
30
|
* @param props Props
|
|
32
31
|
* @returns Component
|
|
33
32
|
*/
|
|
34
|
-
export declare function DateText(props: DateTextProps):
|
|
33
|
+
export declare function DateText(props: DateTextProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/texts/DateText.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { DateUtils } from '@etsoo/shared';
|
|
2
3
|
import { Typography } from '@mui/material';
|
|
3
|
-
import React from 'react';
|
|
4
4
|
/**
|
|
5
5
|
* Date text
|
|
6
6
|
* @param props Props
|
|
@@ -21,5 +21,5 @@ export function DateText(props) {
|
|
|
21
21
|
rest.color = (theme) => theme.palette.error.main;
|
|
22
22
|
}
|
|
23
23
|
// Layout
|
|
24
|
-
return (
|
|
24
|
+
return (_jsx(Typography, { component: "span", fontSize: "inherit", ...rest, children: localValue }));
|
|
25
25
|
}
|
package/lib/texts/MoneyText.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { NumberTextProps } from './NumberText';
|
|
3
2
|
/**
|
|
4
3
|
* Money text props
|
|
@@ -18,4 +17,4 @@ export interface MoneyTextProps extends NumberTextProps {
|
|
|
18
17
|
* @param props Props
|
|
19
18
|
* @returns Component
|
|
20
19
|
*/
|
|
21
|
-
export declare function MoneyText(props: MoneyTextProps):
|
|
20
|
+
export declare function MoneyText(props: MoneyTextProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/texts/MoneyText.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { NumberUtils } from '@etsoo/shared';
|
|
2
3
|
import { Typography } from '@mui/material';
|
|
3
|
-
import React from 'react';
|
|
4
4
|
/**
|
|
5
5
|
* Money text
|
|
6
6
|
* @param props Props
|
|
@@ -10,7 +10,7 @@ export function MoneyText(props) {
|
|
|
10
10
|
// Destruct
|
|
11
11
|
const { currency, isInteger = false, locale, options = {}, value, ...rest } = props;
|
|
12
12
|
// Layout
|
|
13
|
-
return (
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
return (_jsx(Typography, { component: "span", fontSize: "inherit", ...rest, children: value == null
|
|
14
|
+
? ''
|
|
15
|
+
: NumberUtils.formatMoney(value, currency, locale, isInteger, options) }));
|
|
16
16
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TypographyProps } from '@mui/material';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
/**
|
|
4
3
|
* Number text props
|
|
5
4
|
*/
|
|
@@ -22,4 +21,4 @@ export interface NumberTextProps extends TypographyProps {
|
|
|
22
21
|
* @param props Props
|
|
23
22
|
* @returns Component
|
|
24
23
|
*/
|
|
25
|
-
export declare function NumberText(props: NumberTextProps):
|
|
24
|
+
export declare function NumberText(props: NumberTextProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/texts/NumberText.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { NumberUtils } from '@etsoo/shared';
|
|
2
3
|
import { Typography } from '@mui/material';
|
|
3
|
-
import React from 'react';
|
|
4
4
|
/**
|
|
5
5
|
* Number text
|
|
6
6
|
* @param props Props
|
|
@@ -10,5 +10,5 @@ export function NumberText(props) {
|
|
|
10
10
|
// Destruct
|
|
11
11
|
const { locale, options = {}, value, ...rest } = props;
|
|
12
12
|
// Layout
|
|
13
|
-
return (
|
|
13
|
+
return (_jsx(Typography, { component: "span", fontSize: "inherit", ...rest, children: value == null ? '' : NumberUtils.format(value, locale, options) }));
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.59",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"@emotion/styled": "^11.11.5",
|
|
53
53
|
"@etsoo/appscript": "^1.4.90",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.42",
|
|
55
|
-
"@etsoo/react": "^1.7.
|
|
55
|
+
"@etsoo/react": "^1.7.45",
|
|
56
56
|
"@etsoo/shared": "^1.2.40",
|
|
57
57
|
"@mui/icons-material": "^5.15.18",
|
|
58
58
|
"@mui/material": "^5.15.18",
|
|
59
59
|
"@mui/x-data-grid": "^7.5.0",
|
|
60
|
-
"chart.js": "^4.4.
|
|
60
|
+
"chart.js": "^4.4.3",
|
|
61
61
|
"chartjs-plugin-datalabels": "^2.2.0",
|
|
62
62
|
"eventemitter3": "^5.0.1",
|
|
63
63
|
"pica": "^9.0.1",
|