oa-componentbook 1.0.1-stage.84 → 1.0.1-stage.86

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.
@@ -54,7 +54,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
54
54
  * @property {string} ['data-test'] Data test string to be applied to the outermost element.
55
55
  */
56
56
  function ApprovalWidget(_ref) {
57
- var _approvalForm$disable2, _actionContent$label, _approvalForm$disable3, _approvalForm$disable4, _approvalForm$disable5, _approvalForm$remarks, _approvalForm$disable6, _approvalForm$disable7, _approvalForm$disable8, _approvalForm$disable9, _approvalForm$disable10, _approvalForm$disable11;
57
+ var _approvalForm$disable2, _actionContent$label, _approvalForm$disable3, _approvalForm$disable4, _approvalForm$disable5, _approvalForm$remarks, _approvalForm$disable6, _approvalForm$disable7, _approvalForm$disable8, _approvalForm$disable9, _approvalForm$disable10;
58
58
  let {
59
59
  children,
60
60
  description,
@@ -177,7 +177,7 @@ function ApprovalWidget(_ref) {
177
177
  }, columnItems.map(item => /*#__PURE__*/_react.default.createElement("li", {
178
178
  key: item.title,
179
179
  className: "tooltip-item"
180
- }, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
180
+ }, !item.hideIcon && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
181
181
  size: 20,
182
182
  icon: item.type === "positive" ? _Check.default : _Close.default,
183
183
  color: item.type === "positive" ? "positive" : "negative"
@@ -286,15 +286,13 @@ function ApprovalWidget(_ref) {
286
286
  name: "validateDocumentButton#".concat(questionId)
287
287
  // initialValue={isApproved}
288
288
  ,
289
- rules: [{
289
+ rules: isMandatory ? [{
290
290
  required: true,
291
291
  message: dataTest ? /*#__PURE__*/_react.default.createElement("span", {
292
292
  "data-test": "".concat(dataTest, "--is-approved-validation-message")
293
293
  }, "Approval status needs to be selected.") : "Approval status needs to be selected."
294
- }]
295
- }, /*#__PURE__*/_react.default.createElement(_CustomButton.default, _extends({}, actionContent, {
296
- disabled: (_approvalForm$disable11 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable11 !== void 0 ? _approvalForm$disable11 : false
297
- }))))), hasDivider && /*#__PURE__*/_react.default.createElement(_antd.Divider, null));
294
+ }] : []
295
+ }, /*#__PURE__*/_react.default.createElement(_CustomButton.default, actionContent)))), hasDivider && /*#__PURE__*/_react.default.createElement(_antd.Divider, null));
298
296
  }
299
297
  ApprovalWidget.propTypes = {
300
298
  children: _propTypes.default.node,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "1.0.1-stage.84",
3
+ "version": "1.0.1-stage.86",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",