oa-componentbook 0.17.77 → 0.17.79
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/build/components/oa-component-auto-complete/CustomAutoComplete.js +2 -1
- package/build/components/oa-component-info/CustomInfo.js +3 -2
- package/build/components/oa-component-select/CustomSelect.js +4 -3
- package/build/components/oa-component-table/CustomTable.js +6 -6
- package/build/widgets/oa-widget-approval/ApprovalWidget.js +1 -3
- package/package.json +1 -1
|
@@ -130,13 +130,14 @@ function CustomAutoComplete(_ref) {
|
|
|
130
130
|
}
|
|
131
131
|
}, /*#__PURE__*/_react.default.createElement(_antd.AutoComplete, _extends({
|
|
132
132
|
"data-test": dataTest,
|
|
133
|
-
options: actualOptions,
|
|
133
|
+
options: (actualOptions === null || actualOptions === void 0 ? void 0 : actualOptions.length) > 0 ? actualOptions : undefined,
|
|
134
134
|
dropdownStyle: {
|
|
135
135
|
padding: '0px'
|
|
136
136
|
},
|
|
137
137
|
filterOption: true
|
|
138
138
|
}, props)));
|
|
139
139
|
}
|
|
140
|
+
CustomAutoComplete.Option = _antd.AutoComplete.Option;
|
|
140
141
|
CustomAutoComplete.propTypes = {
|
|
141
142
|
'data-test': _propTypes.default.string,
|
|
142
143
|
size: _propTypes.default.oneOf(['small', 'middle']),
|
|
@@ -10,6 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
10
10
|
var _styles = require("./styles");
|
|
11
11
|
var _CustomButton = _interopRequireDefault(require("../oa-component-button/CustomButton"));
|
|
12
12
|
var _Typography = _interopRequireDefault(require("../oa-component-typography/Typography"));
|
|
13
|
+
require("antd/dist/reset.css");
|
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
15
|
function CustomInfo(_ref) {
|
|
15
16
|
let {
|
|
@@ -27,8 +28,8 @@ function CustomInfo(_ref) {
|
|
|
27
28
|
size: 24
|
|
28
29
|
})), /*#__PURE__*/_react.default.createElement(_styles.ColFlex, null, title && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
29
30
|
typography: "type-t2-700"
|
|
30
|
-
}, title), description && /*#__PURE__*/_react.default.createElement(
|
|
31
|
-
|
|
31
|
+
}, title), description && /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
className: "type-b2-400"
|
|
32
33
|
}, description)), iconConfig.position === 'right' && (!title ? /*#__PURE__*/_react.default.isValidElement(iconConfig.icon) && /*#__PURE__*/_react.default.cloneElement(iconConfig.icon, {
|
|
33
34
|
size: 20
|
|
34
35
|
}) : /*#__PURE__*/_react.default.isValidElement(iconConfig.icon) && /*#__PURE__*/_react.default.cloneElement(iconConfig.icon, {
|
|
@@ -31,7 +31,7 @@ function CustomSelect(_ref) {
|
|
|
31
31
|
options
|
|
32
32
|
} = _ref,
|
|
33
33
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
const actualOptions = options.map(option => {
|
|
34
|
+
const actualOptions = options === null || options === void 0 ? void 0 : options.map(option => {
|
|
35
35
|
const {
|
|
36
36
|
label,
|
|
37
37
|
disabled
|
|
@@ -120,20 +120,21 @@ function CustomSelect(_ref) {
|
|
|
120
120
|
}
|
|
121
121
|
}, /*#__PURE__*/_react.default.createElement(_antd.Select, _extends({
|
|
122
122
|
"data-test": dataTest,
|
|
123
|
-
options: actualOptions,
|
|
123
|
+
options: (actualOptions === null || actualOptions === void 0 ? void 0 : actualOptions.length) > 0 ? actualOptions : undefined,
|
|
124
124
|
dropdownStyle: {
|
|
125
125
|
padding: '0px'
|
|
126
126
|
},
|
|
127
127
|
maxTagCount: "responsive"
|
|
128
128
|
}, props)));
|
|
129
129
|
}
|
|
130
|
+
CustomSelect.Option = _antd.Select.Option;
|
|
130
131
|
CustomSelect.propTypes = {
|
|
131
132
|
'data-test': _propTypes.default.string,
|
|
132
133
|
size: _propTypes.default.oneOf(['small', 'middle']),
|
|
133
134
|
options: _propTypes.default.arrayOf(
|
|
134
135
|
// Checked from antd's github
|
|
135
136
|
_propTypes.default.shape({
|
|
136
|
-
label: _propTypes.default.node
|
|
137
|
+
label: _propTypes.default.node,
|
|
137
138
|
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired
|
|
138
139
|
}))
|
|
139
140
|
};
|
|
@@ -77,12 +77,12 @@ function CustomTable(_ref) {
|
|
|
77
77
|
headerBorderRadius: '0',
|
|
78
78
|
headerSplitColor: _ColorVariablesMap.default['--color-secondary-background'],
|
|
79
79
|
footerColor: _ColorVariablesMap.default['--color-primary-content'],
|
|
80
|
-
cellPaddingBlock:
|
|
81
|
-
cellPaddingBlockMD:
|
|
82
|
-
cellPaddingBlockSM:
|
|
83
|
-
cellPaddingInline:
|
|
84
|
-
cellPaddingInlineMD:
|
|
85
|
-
cellPaddingInlineSM:
|
|
80
|
+
cellPaddingBlock: 24,
|
|
81
|
+
cellPaddingBlockMD: 16,
|
|
82
|
+
cellPaddingBlockSM: 12,
|
|
83
|
+
cellPaddingInline: 16,
|
|
84
|
+
cellPaddingInlineMD: 16,
|
|
85
|
+
cellPaddingInlineSM: 16,
|
|
86
86
|
cellFontSize: '14px',
|
|
87
87
|
cellFontSizeMD: '14px',
|
|
88
88
|
cellFontSizeSM: '14px',
|
|
@@ -52,8 +52,6 @@ function ApprovalWidget(_ref) {
|
|
|
52
52
|
const [isApproved, setIsApproved] = (0, _react.useState)(getInitialValue(approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.isApproved));
|
|
53
53
|
const onRadioChange = event => setIsApproved(event.target.value);
|
|
54
54
|
return /*#__PURE__*/_react.default.createElement(_styles.StyledContainer, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
-
className: "container"
|
|
56
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
57
55
|
className: "row"
|
|
58
56
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
59
57
|
className: approvalForm.hidden ? 'col-sm-12 col-md-12 col-lg-12' : 'col-sm-12 col-md-7 col-lg-7 gutter'
|
|
@@ -120,7 +118,7 @@ function ApprovalWidget(_ref) {
|
|
|
120
118
|
}, /*#__PURE__*/_react.default.createElement(_antd.Input.TextArea, {
|
|
121
119
|
"data-test": dataTest ? "".concat(dataTest, "--remarks") : undefined,
|
|
122
120
|
disabled: (_approvalForm$disable3 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable3 !== void 0 ? _approvalForm$disable3 : false
|
|
123
|
-
})))) || undefined)
|
|
121
|
+
})))) || undefined), hasDivider && /*#__PURE__*/_react.default.createElement(_antd.Divider, null));
|
|
124
122
|
}
|
|
125
123
|
ApprovalWidget.propTypes = {
|
|
126
124
|
children: _propTypes.default.node,
|