dynamic-mui 1.0.32 → 1.0.34
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.
|
@@ -7,10 +7,12 @@ exports.default = Radio;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _Radio = _interopRequireDefault(require("@mui/material/Radio"));
|
|
10
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
10
11
|
var _RadioGroup = _interopRequireDefault(require("@mui/material/RadioGroup"));
|
|
11
12
|
var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormControlLabel"));
|
|
12
13
|
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
13
14
|
var _FormLabel = _interopRequireDefault(require("@mui/material/FormLabel"));
|
|
15
|
+
var _material = require("@mui/material");
|
|
14
16
|
var _useUpdateEffect = _interopRequireDefault(require("../../../util/useUpdateEffect"));
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -29,7 +31,8 @@ function Radio(_ref) {
|
|
|
29
31
|
id = '',
|
|
30
32
|
MuiFLAttributes = {},
|
|
31
33
|
MuiFCLabels = [],
|
|
32
|
-
MuiFLabel = ''
|
|
34
|
+
MuiFLabel = '',
|
|
35
|
+
MuiFLabelIcon = {}
|
|
33
36
|
} = attributes;
|
|
34
37
|
const [value, setValue] = _react.default.useState('');
|
|
35
38
|
(0, _react.useEffect)(() => {
|
|
@@ -45,9 +48,15 @@ function Radio(_ref) {
|
|
|
45
48
|
value: event.target.value
|
|
46
49
|
});
|
|
47
50
|
};
|
|
48
|
-
return /*#__PURE__*/_react.default.createElement(_FormControl.default, null, MuiFLabel && /*#__PURE__*/_react.default.createElement(
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_FormControl.default, null, MuiFLabel && /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
52
|
+
sx: {
|
|
53
|
+
display: 'flex'
|
|
54
|
+
}
|
|
55
|
+
}, MuiFLabelIcon && MuiFLabelIcon.icon && /*#__PURE__*/_react.default.createElement(_material.Icon, _extends({
|
|
56
|
+
key: MuiFLabelIcon.icon
|
|
57
|
+
}, MuiFLabelIcon.MuiFLabelIconAttributes), MuiFLabelIcon.icon), /*#__PURE__*/_react.default.createElement(_FormLabel.default, _extends({}, MuiFLAttributes, {
|
|
49
58
|
id: "radio-buttons-group-label"
|
|
50
|
-
}), MuiFLabel), /*#__PURE__*/_react.default.createElement(_RadioGroup.default, _extends({
|
|
59
|
+
}), MuiFLabel)), /*#__PURE__*/_react.default.createElement(_RadioGroup.default, _extends({
|
|
51
60
|
"aria-labelledby": "radio-buttons-group-label",
|
|
52
61
|
name: "radio-buttons-group"
|
|
53
62
|
}, MuiRGAttributes, {
|
|
@@ -7,7 +7,9 @@ exports.default = Typography;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
10
|
+
var _material = require("@mui/material");
|
|
10
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
13
|
/** Typography Component */
|
|
12
14
|
function Typography(_ref) {
|
|
13
15
|
let {
|
|
@@ -15,8 +17,19 @@ function Typography(_ref) {
|
|
|
15
17
|
} = _ref;
|
|
16
18
|
const {
|
|
17
19
|
MuiAttributes = {},
|
|
18
|
-
text = ''
|
|
20
|
+
text = '',
|
|
21
|
+
MuiIcon = {}
|
|
19
22
|
} = attributes;
|
|
23
|
+
if (MuiIcon && MuiIcon.icon) {
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
25
|
+
sx: {
|
|
26
|
+
display: 'flex',
|
|
27
|
+
width: '100%'
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Icon, _extends({
|
|
30
|
+
key: MuiIcon.icon
|
|
31
|
+
}, MuiIcon.MuiIconAttributes), MuiIcon.icon), /*#__PURE__*/_react.default.createElement(_Typography.default, MuiAttributes, text));
|
|
32
|
+
}
|
|
20
33
|
return /*#__PURE__*/_react.default.createElement(_Typography.default, MuiAttributes, text);
|
|
21
34
|
}
|
|
22
35
|
Typography.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -11,9 +11,17 @@ const radioData = exports.radioData = [{
|
|
|
11
11
|
id: 'staggerpenaltytype',
|
|
12
12
|
value: 'Apply penalty now',
|
|
13
13
|
MuiAttributes: {},
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
MuiFLabelIcon: {
|
|
15
|
+
icon: 'person',
|
|
16
|
+
MuiFLabelIconAttributes: {
|
|
17
|
+
sx: {
|
|
18
|
+
mr: 1,
|
|
19
|
+
color: 'rgba(0, 0, 0, 0.6)'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
16
22
|
},
|
|
23
|
+
MuiFLabel: 'Account',
|
|
24
|
+
MuiFCLAttributes: {},
|
|
17
25
|
MuiFCLabels: ['Apply penalty now', 'Apply penalty after due date'],
|
|
18
26
|
MuiRGAttributes: {
|
|
19
27
|
row: true
|
|
@@ -23,13 +31,6 @@ const radioData = exports.radioData = [{
|
|
|
23
31
|
row: 4,
|
|
24
32
|
xs: 9,
|
|
25
33
|
sm: 9
|
|
26
|
-
}
|
|
27
|
-
onChangeUpdate: [{
|
|
28
|
-
formula: '({outstandingbalance} + ({outstandingbalance} * 0.10))',
|
|
29
|
-
patchId: 'newoutstanding'
|
|
30
|
-
}, {
|
|
31
|
-
formula: '({outstandingbalance} + ({outstandingbalance} * 0.10)) - {outstandingbalance}',
|
|
32
|
-
patchId: 'penalty'
|
|
33
|
-
}]
|
|
34
|
+
}
|
|
34
35
|
}];
|
|
35
36
|
const customRadioData = exports.customRadioData = [];
|