|
@@ -1151,44 +1151,47 @@ var BootstrapInput = styles.withStyles(function (theme) {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
})(core.InputBase);
|
|
})(core.InputBase);
|
|
-var useStyles = styles.makeStyles(function (theme) {
|
|
|
|
- return {
|
|
|
|
- root: {
|
|
|
|
- width: '100%'
|
|
|
|
- },
|
|
|
|
- paper: {
|
|
|
|
- width: '100%',
|
|
|
|
- marginBottom: theme.spacing(2)
|
|
|
|
- },
|
|
|
|
- table: {
|
|
|
|
- minWidth: 750
|
|
|
|
- },
|
|
|
|
- visuallyHidden: {
|
|
|
|
- border: 0,
|
|
|
|
- clip: 'rect(0 0 0 0)',
|
|
|
|
- height: 1,
|
|
|
|
- margin: -1,
|
|
|
|
- overflow: 'hidden',
|
|
|
|
- padding: 0,
|
|
|
|
- position: 'absolute',
|
|
|
|
- top: 20,
|
|
|
|
- width: 1
|
|
|
|
|
|
+var useStyles = styles.makeStyles({
|
|
|
|
+ root: {
|
|
|
|
+ width: '100%'
|
|
|
|
+ },
|
|
|
|
+ paper: {
|
|
|
|
+ width: '100%'
|
|
|
|
+ },
|
|
|
|
+ table: {
|
|
|
|
+ minWidth: 750
|
|
|
|
+ },
|
|
|
|
+ visuallyHidden: {
|
|
|
|
+ border: 0,
|
|
|
|
+ clip: 'rect(0 0 0 0)',
|
|
|
|
+ height: 1,
|
|
|
|
+ margin: -1,
|
|
|
|
+ overflow: 'hidden',
|
|
|
|
+ padding: 0,
|
|
|
|
+ position: 'absolute',
|
|
|
|
+ top: 20,
|
|
|
|
+ width: 1
|
|
|
|
+ },
|
|
|
|
+ underline: {
|
|
|
|
+ "&&&:before": {
|
|
|
|
+ borderBottom: "none"
|
|
},
|
|
},
|
|
- underline: {
|
|
|
|
- "&&&:before": {
|
|
|
|
- borderBottom: "none"
|
|
|
|
- },
|
|
|
|
- "&&:after": {
|
|
|
|
- borderBottom: "none"
|
|
|
|
- }
|
|
|
|
|
|
+ "&&:after": {
|
|
|
|
+ borderBottom: "none"
|
|
}
|
|
}
|
|
- };
|
|
|
|
|
|
+ },
|
|
|
|
+ actionButton: function actionButton(props) {
|
|
|
|
+ return {
|
|
|
|
+ backgroundColor: props.primaryColor === undefined ? 'grey' : props.primaryColor,
|
|
|
|
+ color: props.actionTextColor === undefined ? 'white' : props.actionTextColor
|
|
|
|
+ };
|
|
|
|
+ }
|
|
});
|
|
});
|
|
|
|
|
|
function MButton(props) {
|
|
function MButton(props) {
|
|
- var classes = useStyles();
|
|
|
|
var action = props.action,
|
|
var action = props.action,
|
|
- onCallback = props.onCallback;
|
|
|
|
|
|
+ onCallback = props.onCallback,
|
|
|
|
+ buttonStyle = props.buttonStyle;
|
|
|
|
|
|
var handleAction = function handleAction(e) {
|
|
var handleAction = function handleAction(e) {
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
@@ -1196,8 +1199,9 @@ function MButton(props) {
|
|
};
|
|
};
|
|
|
|
|
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
- className: classes.root
|
|
|
|
|
|
+ className: buttonStyle.root
|
|
}, /*#__PURE__*/React__default.createElement(core.Box, null, /*#__PURE__*/React__default.createElement(core.Button, {
|
|
}, /*#__PURE__*/React__default.createElement(core.Box, null, /*#__PURE__*/React__default.createElement(core.Button, {
|
|
|
|
+ className: buttonStyle.actionButton,
|
|
variant: "contained",
|
|
variant: "contained",
|
|
style: {
|
|
style: {
|
|
"float": 'right',
|
|
"float": 'right',
|
|
@@ -1211,12 +1215,13 @@ function MButton(props) {
|
|
|
|
|
|
MButton.propTypes = {
|
|
MButton.propTypes = {
|
|
history: propTypes.object,
|
|
history: propTypes.object,
|
|
|
|
+ buttonStyle: propTypes.any,
|
|
action: propTypes.object.isRequired,
|
|
action: propTypes.object.isRequired,
|
|
onCallback: propTypes.func.isRequired
|
|
onCallback: propTypes.func.isRequired
|
|
};
|
|
};
|
|
|
|
|
|
function MkForm(props) {
|
|
function MkForm(props) {
|
|
- var classes = useStyles();
|
|
|
|
|
|
+ var styles = useStyles(props.styles);
|
|
var _props$fields = props.fields,
|
|
var _props$fields = props.fields,
|
|
fields = _props$fields === void 0 ? [] : _props$fields,
|
|
fields = _props$fields === void 0 ? [] : _props$fields,
|
|
_props$data = props.data,
|
|
_props$data = props.data,
|
|
@@ -1287,7 +1292,7 @@ function MkForm(props) {
|
|
var handleSelectItemDialog = function handleSelectItemDialog() {};
|
|
var handleSelectItemDialog = function handleSelectItemDialog() {};
|
|
|
|
|
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
- className: classes.root
|
|
|
|
|
|
+ className: styles.root
|
|
}, /*#__PURE__*/React__default.createElement(core.Grid, {
|
|
}, /*#__PURE__*/React__default.createElement(core.Grid, {
|
|
container: true
|
|
container: true
|
|
}, /*#__PURE__*/React__default.createElement(core.Grid, {
|
|
}, /*#__PURE__*/React__default.createElement(core.Grid, {
|
|
@@ -1643,7 +1648,7 @@ function MkForm(props) {
|
|
marginBottom: '10px'
|
|
marginBottom: '10px'
|
|
}
|
|
}
|
|
}, /*#__PURE__*/React__default.createElement(core.GridList, {
|
|
}, /*#__PURE__*/React__default.createElement(core.GridList, {
|
|
- className: classes.gridList
|
|
|
|
|
|
+ className: styles.gridList
|
|
}, _data[f.field_name] === undefined ? /*#__PURE__*/React__default.createElement("span", null) : _data[f.field_name].map(function (tile) {
|
|
}, _data[f.field_name] === undefined ? /*#__PURE__*/React__default.createElement("span", null) : _data[f.field_name].map(function (tile) {
|
|
return /*#__PURE__*/React__default.createElement(core.GridListTile, {
|
|
return /*#__PURE__*/React__default.createElement(core.GridListTile, {
|
|
key: tile,
|
|
key: tile,
|
|
@@ -1744,7 +1749,7 @@ function MkForm(props) {
|
|
marginBottom: '10px'
|
|
marginBottom: '10px'
|
|
}
|
|
}
|
|
}, /*#__PURE__*/React__default.createElement(core.TableContainer, null, /*#__PURE__*/React__default.createElement(core.Table, {
|
|
}, /*#__PURE__*/React__default.createElement(core.TableContainer, null, /*#__PURE__*/React__default.createElement(core.Table, {
|
|
- className: classes.table,
|
|
|
|
|
|
+ className: styles.table,
|
|
size: "small",
|
|
size: "small",
|
|
"aria-label": "a dense table"
|
|
"aria-label": "a dense table"
|
|
}, /*#__PURE__*/React__default.createElement(core.TableHead, null, /*#__PURE__*/React__default.createElement(core.TableRow, null, partHeaders.map(function (h, i) {
|
|
}, /*#__PURE__*/React__default.createElement(core.TableHead, null, /*#__PURE__*/React__default.createElement(core.TableRow, null, partHeaders.map(function (h, i) {
|
|
@@ -1793,7 +1798,7 @@ function MkForm(props) {
|
|
variant: "outlined",
|
|
variant: "outlined",
|
|
size: "small",
|
|
size: "small",
|
|
type: "time",
|
|
type: "time",
|
|
- className: classes.textField,
|
|
|
|
|
|
+ className: styles.textField,
|
|
InputLabelProps: {
|
|
InputLabelProps: {
|
|
shrink: true
|
|
shrink: true
|
|
},
|
|
},
|
|
@@ -1811,7 +1816,8 @@ function MkForm(props) {
|
|
action: a,
|
|
action: a,
|
|
onCallback: function onCallback(event) {
|
|
onCallback: function onCallback(event) {
|
|
return a.callback(event, _data);
|
|
return a.callback(event, _data);
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ buttonStyle: styles
|
|
});
|
|
});
|
|
}
|
|
}
|
|
})) : /*#__PURE__*/React__default.createElement(core.Grid, null)));
|
|
})) : /*#__PURE__*/React__default.createElement(core.Grid, null)));
|
|
@@ -1823,7 +1829,8 @@ MkForm.propTypes = {
|
|
data: propTypes.object,
|
|
data: propTypes.object,
|
|
isNew: propTypes.bool,
|
|
isNew: propTypes.bool,
|
|
actions: propTypes.array,
|
|
actions: propTypes.array,
|
|
- onDropdownCreateNew: propTypes.func
|
|
|
|
|
|
+ onDropdownCreateNew: propTypes.func,
|
|
|
|
+ styles: propTypes.any
|
|
};
|
|
};
|
|
|
|
|
|
function descendingComparator(a, b, _orderBy) {
|
|
function descendingComparator(a, b, _orderBy) {
|
|
@@ -2239,6 +2246,7 @@ function MkTable(props) {
|
|
var handleChangeRowsPerPage = function handleChangeRowsPerPage(event) {
|
|
var handleChangeRowsPerPage = function handleChangeRowsPerPage(event) {
|
|
setRowsPerPage(parseInt(event.target.value));
|
|
setRowsPerPage(parseInt(event.target.value));
|
|
onChangeRowPerPage(parseInt(event.target.value));
|
|
onChangeRowPerPage(parseInt(event.target.value));
|
|
|
|
+ setPage(0);
|
|
};
|
|
};
|
|
|
|
|
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
return /*#__PURE__*/React__default.createElement("div", {
|