@etsoo/react 1.4.84 → 1.4.85
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/lib/mu/AuditDisplay.js
CHANGED
|
@@ -69,6 +69,7 @@ export function AuditDisplay(props) {
|
|
|
69
69
|
return (React.createElement(React.Fragment, null,
|
|
70
70
|
data.changes != null && (React.createElement(Button, { variant: "outlined", size: "small", onClick: () => showDataComparison(data.changes), sx: {
|
|
71
71
|
marginLeft: theme.spacing(1),
|
|
72
|
+
marginTop: theme.spacing(-0.5),
|
|
72
73
|
float: 'right'
|
|
73
74
|
} }, dataComparisonLabel)),
|
|
74
75
|
React.createElement(Typography, null, formatDate(data.creation) +
|
|
@@ -77,7 +78,7 @@ export function AuditDisplay(props) {
|
|
|
77
78
|
'], ' +
|
|
78
79
|
data.user)));
|
|
79
80
|
}, headerTitle = (React.createElement(React.Fragment, null,
|
|
80
|
-
getLabel('audits'),
|
|
81
|
+
React.createElement(Typography, null, getLabel('audits')),
|
|
81
82
|
React.createElement(Divider, null))), ...rest } = props;
|
|
82
83
|
// Layout
|
|
83
84
|
return (React.createElement(ListMoreDisplay, { headerTitle: headerTitle, ...rest }, (data, index) => (React.createElement("div", { key: data.id, style: getItemStyle(index, theme) }, itemRenderer(data, index)))));
|
package/lib/mu/pages/ViewPage.js
CHANGED
|
@@ -18,6 +18,7 @@ function getItemField(field, data) {
|
|
|
18
18
|
var _a, _b, _c;
|
|
19
19
|
// Item data and label
|
|
20
20
|
let itemData, itemLabel, gridProps = {};
|
|
21
|
+
let xs = 6;
|
|
21
22
|
if (Array.isArray(field)) {
|
|
22
23
|
const [fieldData, fieldType, renderProps] = field;
|
|
23
24
|
itemData = GridDataFormat(data[fieldData], fieldType, renderProps);
|
|
@@ -25,11 +26,13 @@ function getItemField(field, data) {
|
|
|
25
26
|
}
|
|
26
27
|
else if (typeof field === 'object') {
|
|
27
28
|
// Destruct
|
|
28
|
-
const { data: fieldData, dataType, label: fieldLabel, renderProps, singleRow
|
|
29
|
+
const { data: fieldData, dataType, label: fieldLabel, renderProps, singleRow, ...rest } = field;
|
|
29
30
|
gridProps = {
|
|
30
31
|
...rest,
|
|
31
32
|
...(singleRow && { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 })
|
|
32
33
|
};
|
|
34
|
+
if (singleRow === false)
|
|
35
|
+
xs = 12;
|
|
33
36
|
// Field data
|
|
34
37
|
if (typeof fieldData === 'function')
|
|
35
38
|
itemData = fieldData(data);
|
|
@@ -50,7 +53,7 @@ function getItemField(field, data) {
|
|
|
50
53
|
return [
|
|
51
54
|
itemData,
|
|
52
55
|
itemLabel,
|
|
53
|
-
{ xs
|
|
56
|
+
{ xs, sm: 6, md: 6, lg: 4, xl: 3, ...gridProps }
|
|
54
57
|
];
|
|
55
58
|
}
|
|
56
59
|
/**
|
package/package.json
CHANGED
package/src/mu/AuditDisplay.tsx
CHANGED
|
@@ -153,6 +153,7 @@ export function AuditDisplay(props: AuditDisplayProps) {
|
|
|
153
153
|
onClick={() => showDataComparison(data.changes!)}
|
|
154
154
|
sx={{
|
|
155
155
|
marginLeft: theme.spacing(1),
|
|
156
|
+
marginTop: theme.spacing(-0.5),
|
|
156
157
|
float: 'right'
|
|
157
158
|
}}
|
|
158
159
|
>
|
|
@@ -171,7 +172,7 @@ export function AuditDisplay(props: AuditDisplayProps) {
|
|
|
171
172
|
},
|
|
172
173
|
headerTitle = (
|
|
173
174
|
<React.Fragment>
|
|
174
|
-
{getLabel('audits')}
|
|
175
|
+
<Typography>{getLabel('audits')}</Typography>
|
|
175
176
|
<Divider />
|
|
176
177
|
</React.Fragment>
|
|
177
178
|
),
|
|
@@ -103,6 +103,8 @@ function getItemField<T>(
|
|
|
103
103
|
itemLabel: React.ReactNode,
|
|
104
104
|
gridProps: GridProps = {};
|
|
105
105
|
|
|
106
|
+
let xs = 6;
|
|
107
|
+
|
|
106
108
|
if (Array.isArray(field)) {
|
|
107
109
|
const [fieldData, fieldType, renderProps] = field;
|
|
108
110
|
itemData = GridDataFormat(data[fieldData], fieldType, renderProps);
|
|
@@ -114,7 +116,7 @@ function getItemField<T>(
|
|
|
114
116
|
dataType,
|
|
115
117
|
label: fieldLabel,
|
|
116
118
|
renderProps,
|
|
117
|
-
singleRow
|
|
119
|
+
singleRow,
|
|
118
120
|
...rest
|
|
119
121
|
} = field;
|
|
120
122
|
|
|
@@ -123,6 +125,8 @@ function getItemField<T>(
|
|
|
123
125
|
...(singleRow && { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 })
|
|
124
126
|
};
|
|
125
127
|
|
|
128
|
+
if (singleRow === false) xs = 12;
|
|
129
|
+
|
|
126
130
|
// Field data
|
|
127
131
|
if (typeof fieldData === 'function') itemData = fieldData(data);
|
|
128
132
|
else if (dataType == null) itemData = formatItemData(data[fieldData]);
|
|
@@ -144,7 +148,7 @@ function getItemField<T>(
|
|
|
144
148
|
return [
|
|
145
149
|
itemData,
|
|
146
150
|
itemLabel,
|
|
147
|
-
{ xs
|
|
151
|
+
{ xs, sm: 6, md: 6, lg: 4, xl: 3, ...gridProps }
|
|
148
152
|
];
|
|
149
153
|
}
|
|
150
154
|
|