oa-componentbook 1.0.1-stage.361 → 1.0.1-stage.363

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.
@@ -17,7 +17,6 @@ function Header(_ref) {
17
17
  let {
18
18
  heading,
19
19
  subHeading,
20
- subHeading1,
21
20
  onSubHeadingClick,
22
21
  handleSubHeadingSelect
23
22
  } = _ref;
@@ -64,11 +63,6 @@ function Header(_ref) {
64
63
  color: (_subHeading$color = subHeading === null || subHeading === void 0 ? void 0 : subHeading.color) !== null && _subHeading$color !== void 0 ? _subHeading$color : "secondary-content"
65
64
  }, (subHeading === null || subHeading === void 0 || (_subHeading$icon = subHeading.icon) === null || _subHeading$icon === void 0 ? void 0 : _subHeading$icon.position) === "left" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, _extends({}, subHeading === null || subHeading === void 0 || (_subHeading$icon2 = subHeading.icon) === null || _subHeading$icon2 === void 0 ? void 0 : _subHeading$icon2.iconConfig, {
66
65
  className: "margin-right-8"
67
- })), subHeading === null || subHeading === void 0 ? void 0 : subHeading.text, (subHeading === null || subHeading === void 0 || (_subHeading$icon3 = subHeading.icon) === null || _subHeading$icon3 === void 0 ? void 0 : _subHeading$icon3.position) === "right" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, subHeading === null || subHeading === void 0 || (_subHeading$icon4 = subHeading.icon) === null || _subHeading$icon4 === void 0 ? void 0 : _subHeading$icon4.iconConfig)), subHeadingJsx(subHeading)), subHeading1 && /*#__PURE__*/_react.default.createElement("div", {
68
- className: "subHadingText marginNone"
69
- }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
70
- typography: subHeading1 === null || subHeading1 === void 0 ? void 0 : subHeading1.type,
71
- color: "secondary-content"
72
- }, subHeading1 === null || subHeading1 === void 0 ? void 0 : subHeading1.text)));
66
+ })), subHeading === null || subHeading === void 0 ? void 0 : subHeading.text, (subHeading === null || subHeading === void 0 || (_subHeading$icon3 = subHeading.icon) === null || _subHeading$icon3 === void 0 ? void 0 : _subHeading$icon3.position) === "right" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, subHeading === null || subHeading === void 0 || (_subHeading$icon4 = subHeading.icon) === null || _subHeading$icon4 === void 0 ? void 0 : _subHeading$icon4.iconConfig)), subHeadingJsx(subHeading)));
73
67
  }
74
68
  var _default = exports.default = Header;
@@ -16,7 +16,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
16
16
  const DrawerWithOutFooter = exports.DrawerWithOutFooter = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.hubAutomationContainer .fullPageLayout {padding: 0 !important; background: #fff !important;}\n.hubAutomationContainer .fullPageLayout .oaRightLayouts{\n max-width: 1154px;\n margin: 24px auto;\n padding: 0 16px;\n box-shadow: none;}\n.oaDrawer div + div.ant-drawer-body{padding-bottom:100px !important;}\n\n.ant-checkbox-indeterminate .ant-checkbox-inner:after {\n background-color: #014fc5;\n}\n\n.ant-form-item .ant-form-item-label >label.ant-form-item-required::before {display:none;}\n.ant-form-item .ant-form-item-label >label.ant-form-item-required::after{ content: \"*\"; color: #DE350B; visibility: visible !important;}\n\n\n.cstUplaodWithFullWidth{margin-bottom:24px;}\n.cstUplaodWithFullWidth:last-child{margin-bottom:0;}\n.cstUplaodWithFullWidth .uploadDiv{width:100%;}\n.cstUplaodWithFullWidth .uploadDiv .ant-upload-list-item-container, .cstUplaodWithFullWidth .uploadDiv .ant-upload-wrapper .ant-upload-list-picture-card .ant-upload-select, .cstUplaodWithFullWidth .uploadDiv .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container {\n width: 100%; \n height: 120px;\n}\n\n\n\n\n.oaDrawer .ant-form-item .ant-form-item-explain-error {\n color: #DE350B;\n font-size: 12px;\n margin: 4px 0 0 0;\n}\n.bottomSelectedSecion{background: #F6F6F6; padding: 16px 36px; position: fixed; bottom: 0; left: 0; right: 0;\nbox-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n display: flex; z-index: 2;\n align-items: center;\n justify-content: end;\n gap: 24px;}\n\n\n\n.listOfItems{ border-radius: 12px;\n border: 1px solid #E0E0E0;\n padding: 24px;\n margin: 24px 0 0 0;}\n modalSubheading{\n padding: 24px;\n margin: 24px 0 0 0;}\n\n.listOfItemsWithoutBorder{\n padding: 24px 0;\n margin: 24px 0 0 0;}\n\n modalSubheading{\n padding: 24px;\n margin: 24px 0 0 0;}\n\n\n\n\n.modalIconAndTextBox{display:flex; flex-direction:row; align-items: center; margin: 0 0 16px 0; gap:4px;}\n"])));
17
17
  const FormWidgetStyle = exports.FormWidgetStyle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .formBottomAction {\n position: absolute;\n bottom: 0px;\n background-color: rgb(249, 249, 249);\n box-shadow: rgba(0, 0, 0, 0.1) 0px -2px 8px;\n padding: 16px;\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n z-index: 10;\n left: 0;\n right: 0;\n }\n\n .formBottomAction .ant-form-item {\n margin-bottom: 0px;\n }\n\n .searchErrorMsg {\n font-size: 12px;\n }\n .searchErrorMsg {\n font-size: 12px;\n }\n"])));
18
18
  const TableDataStyle = exports.TableDataStyle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .tableContainerList th,\n button {\n white-space: nowrap;\n }\n .tableContainerList th,\n button {\n white-space: nowrap;\n }\n"])));
19
- const OapageWithDataStyle = exports.OapageWithDataStyle = _styledComponents.default.aside(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .oaTopHeaderAndBtnSec {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n\n .fullPageLayout {\n display: flex;\n padding: 8px;\n background: #f6f6f6;\n }\n .ant-pagination {\n padding: 0 16px;\n justify-content: end;\n }\n .layoutHeadingPage {\n display: flex;\n gap: 8px;\n margin: 0 0 32px 0;\n flex-direction: column;\n justify-content: flex-start;\n }\n\n .topHadingWithIcon span {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n }\n\n .subHadingText {\n margin: 0 0 0 36px;\n }\n\n .marginNone {\n margin: 0 !important;\n }\n\n .subHadingText > span {\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n }\n\n .oaRightLayouts {\n width: 100%;\n min-height: calc(100vh - 16px);\n padding: 76px 48px;\n overflow-y: auto;\n border-radius: 16px;\n background: #fff;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n }\n\n .oaheaderSearchAndFilter {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 0 16px 0;\n gap: 16px;\n }\n\n .oaRightLayouts .iconAndTextSecBox {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n }\n .inLine {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n\n .customeSelectDropdown {\n margin: 4px 0 0 8px;\n }\n\n .cardData {\n padding: 28px 0 48px 0;\n }\n\n .ant-carousel .slick-dots {\n position: static;\n margin: 20px auto 12px 0;\n }\n .ant-carousel .slick-dots li {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li button {\n width: 8px;\n height: 8px;\n background: #cacaca;\n border-radius: 50%;\n opacity: 0.5;\n }\n .ant-carousel .slick-dots li.slick-active {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li.slick-active button {\n width: 8px;\n height: 8px;\n opacity: 1;\n }\n .ant-carousel .slick-dots li::after {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n opacity: 1;\n background: #717171;\n }\n\n .oaTabs .ant-tabs-nav {\n border-top: 1px solid #e0e0e0;\n border-left: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n padding: 12px 22px 0 22px;\n margin: 0 0 8px 0;\n background: #fff;\n border-radius: 4px 4px 0 0;\n }\n .ant-card-body {\n padding: 24px 16px !important;\n border-radius: 16px;\n background: #f6f6f6;\n }\n .cardContainer {\n display: flex;\n gap: 24px;\n }\n .selectAndSearch .noClear {\n border-radius: 0 4px 4px 0;\n width: 320px;\n }\n\n .searchErrorMsg {\n font-size: 12px;\n margin: 4px 0px 0px;\n color: #de350b;\n }\n .searchOnly {\n margin: 0px 0px 16px;\n position: relative;\n }\n .searchOnly .ant-input-affix-wrapper {\n border-radius: 4px;\n max-width: 420px;\n padding-left: 44px;\n }\n .searchOnly .cstSearchIcon {\n position: absolute;\n left: 16px;\n top: 14px;\n z-index: 2;\n }\n\n .selectAndSearch .ant-input-affix-wrapper {\n border-radius: 0 4px 4px 0;\n width: 320px;\n }\n\n .selectAndSearch {\n flex-shrink: 0;\n }\n\n .customeSelectDropdown .ant-select-selector {\n border: none;\n padding: 0;\n }\n .customeSelectDropdown .ant-select-selection-item > span {\n font-size: 24px;\n font-weight: 500;\n line-height: 32px;\n }\n\n .customeSelectDropdown .ant-select {\n margin: 0 0 0 32px;\n }\n\n .customeSelectDropdown .ant-select .ant-select-arrow {\n color: #014fc5;\n inset-inline-end: -6px;\n }\n\n .customeSelectDropdown .ant-select-selector {\n box-shadow: none !important;\n }\n .oaheaderButtons {\n display: flex;\n gap: 24px;\n align-items: center;\n position: relative;\n flex-grow: 1;\n justify-content: space-between;\n }\n\n .oaheaderButtons.single-child {\n justify-content: flex-end;\n }\n\n .oaheaderButtonsRight {\n display: flex;\n flex-direction: row;\n gap: 16px;\n }\n\n .oaheaderButtons .notifyDot {\n width: 12px;\n height: 12px;\n background: #de350b;\n position: absolute;\n top: -4px;\n right: -4px;\n border-radius: 50%;\n }\n\n @media only screen and (max-width: 600px) {\n .selectAndSearch .ant-input-affix-wrapper {\n width: calc(100% - 84px);\n }\n .oaheaderSearchAndFilter .dropDownSearchContainer {\n width: 100%;\n }\n\n .oaheaderSearchAndFilter {\n align-items: flex-end;\n flex-direction: column;\n gap: 16px;\n }\n\n .inLine {\n flex-direction: column;\n gap: 0;\n align-items: flex-start;\n }\n\n .subHadingText > span {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .fullPageLayout {\n flex-direction: column;\n padding: 0;\n }\n .oaRightLayouts {\n padding: 16px;\n border-radius: 0;\n background: #fff;\n box-shadow: none;\n height: auto;\n background: #f6f6f6;\n }\n .oaTabs .ant-tabs-nav {\n margin: 0 0 28px 0;\n padding: 12px 0 0 0;\n }\n .layoutHeadingPage {\n margin: 0 0 16px 0;\n background: #fff;\n padding: 16px;\n border-radius: 8px;\n width: 100%;\n }\n .layoutHeadingAndSearch {\n background: #fff;\n padding: 20px 16px;\n margin: 0;\n width: 100%;\n border-radius: 8px;\n }\n }\n"])));
19
+ const OapageWithDataStyle = exports.OapageWithDataStyle = _styledComponents.default.aside(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .oaTopHeaderAndBtnSec {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n\n .fullPageLayout {\n display: flex;\n padding: 8px;\n background: #f6f6f6;\n }\n .ant-pagination {\n padding: 0 16px;\n justify-content: end;\n }\n .layoutHeadingPage {\n display: flex;\n gap: 8px;\n margin: 0 0 32px 0;\n flex-direction: column;\n justify-content: flex-start;\n }\n\n .topHadingWithIcon span {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n }\n\n .subHadingText {\n margin: 0 0 0 36px;\n }\n\n .marginNone {\n margin: 0 !important;\n }\n\n .subHadingText > span {\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n }\n\n .oaRightLayouts {\n width: 100%;\n min-height: calc(100vh - 16px);\n padding: 76px 48px;\n overflow-y: auto;\n border-radius: 16px;\n background: #fff;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n }\n\n .oaheaderSearchAndFilter {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 0 16px 0;\n gap: 16px;\n }\n\n\n .oaRightLayouts .iconAndTextSecBox {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n }\n .inLine {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n\n .customeSelectDropdown {\n margin: 4px 0 0 8px;\n }\n\n .cardData {\n padding: 28px 0 48px 0;\n }\n\n .ant-carousel .slick-dots {\n position: static;\n margin: 20px auto 12px 0;\n }\n .ant-carousel .slick-dots li {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li button {\n width: 8px;\n height: 8px;\n background: #cacaca;\n border-radius: 50%;\n opacity: 0.5;\n }\n .ant-carousel .slick-dots li.slick-active {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li.slick-active button {\n width: 8px;\n height: 8px;\n opacity: 1;\n }\n .ant-carousel .slick-dots li::after {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n opacity: 1;\n background: #717171;\n }\n\n .oaTabs .ant-tabs-nav {\n border-top: 1px solid #e0e0e0;\n border-left: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n padding: 12px 22px 0 22px;\n margin: 0 0 8px 0;\n background: #fff;\n border-radius: 4px 4px 0 0;\n }\n .ant-card-body {\n padding: 24px 16px !important;\n border-radius: 16px;\n background: #f6f6f6;\n }\n .cardContainer {\n display: flex;\n gap: 24px;\n }\n .selectAndSearch .noClear {\n border-radius: 0 4px 4px 0;\n max-width: 320px;\n width: 100%;\n }\n\n .searchErrorMsg {\n font-size: 12px;\n margin: 4px 0px 0px;\n color: #de350b;\n }\n .searchOnly {\n margin: 0px 0px 16px;\n position: relative;\n }\n .searchOnly .ant-input-affix-wrapper {\n border-radius: 4px;\n max-width: 420px;\n padding-left: 44px;\n }\n .searchOnly .cstSearchIcon {\n position: absolute;\n left: 16px;\n top: 14px;\n z-index: 2;\n }\n\n .selectAndSearch .ant-input-affix-wrapper {\n border-radius: 0 4px 4px 0;\n width: 320px;\n }\n\n .selectAndSearch {\n flex-shrink: 0;\n }\n\n .customeSelectDropdown .ant-select-selector {\n border: none;\n padding: 0;\n }\n .customeSelectDropdown .ant-select-selection-item > span {\n font-size: 24px;\n font-weight: 500;\n line-height: 32px;\n }\n\n .customeSelectDropdown .ant-select {\n margin: 0 0 0 32px;\n }\n\n .customeSelectDropdown .ant-select .ant-select-arrow {\n color: #014fc5;\n inset-inline-end: -6px;\n }\n\n .customeSelectDropdown .ant-select-selector {\n box-shadow: none !important;\n }\n .oaheaderButtons {\n display: flex;\n gap: 24px;\n align-items: center;\n position: relative;\n flex-grow: 1;\n justify-content:space-between;\n }\n\n .oaheaderButtons.single-child {\n justify-content: flex-end;\n}\n\n .oaheaderButtonsRight{display:flex; flex-direction:row; gap:16px;} \n\n .oaheaderButtons .notifyDot {\n width: 12px;\n height: 12px;\n background: #de350b;\n position: absolute;\n top: -4px;\n right: -4px;\n border-radius: 50%;\n }\n\n @media only screen and (max-width: 600px) {\n\n\n .selectAndSearch .ant-input-affix-wrapper {\n width:calc(100% - 84px);\n }\n.oaheaderSearchAndFilter .dropDownSearchContainer {width:100%;}\n\n\n.oaheaderSearchAndFilter{ \n align-items: flex-end;\n flex-direction: column;\n gap: 16px;\n }\n\n .inLine {\n flex-direction: column;\n gap: 0;\n align-items: flex-start;\n }\n\n .subHadingText > span {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .fullPageLayout {\n flex-direction: column;\n padding: 0;\n }\n .oaRightLayouts {\n padding: 16px;\n border-radius: 0;\n background: #fff;\n box-shadow: none;\n height: auto;\n background: #f6f6f6;\n }\n .oaTabs .ant-tabs-nav {\n margin: 0 0 28px 0;\n padding: 12px 0 0 0;\n }\n .layoutHeadingPage {\n margin: 0 0 16px 0;\n background: #fff;\n padding: 16px;\n border-radius: 8px;\n width: 100%;\n }\n .layoutHeadingAndSearch {\n background: #fff;\n padding: 20px 16px;\n margin: 0;\n width: 100%;\n border-radius: 8px;\n }\n }\n"])));
20
20
  const ListofDamageParts = exports.ListofDamageParts = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ul.damagedParts {\n display: flex;\n flex-direction: column;\n margin: 8px 0 0 16px;\n list-style-type: disc;\n }\n ul.damagedParts li {\n padding: 4px 0;\n width: 100%;\n }\n ul.damagedParts li::marker {\n color: #717171;\n font-size: 20px;\n }\n"])));
21
21
  const IncidentListParts = exports.IncidentListParts = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .qaSec dl {\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n }\n .qaSec dl dt {\n display: flex;\n flex-direction: column;\n margin: 16px 0 0 0;\n }\n .qaSec dl dt:first-child {\n margin-top: 8px;\n }\n"])));
22
22
  var _default = exports.default = {};
@@ -8,9 +8,6 @@ Object.defineProperty(exports, "__esModule", {
8
8
  });
9
9
  exports.default = FormWidget;
10
10
  require("core-js/modules/web.dom-collections.iterator.js");
11
- require("core-js/modules/es.regexp.constructor.js");
12
- require("core-js/modules/es.regexp.exec.js");
13
- require("core-js/modules/es.regexp.to-string.js");
14
11
  require("core-js/modules/es.array.includes.js");
15
12
  require("core-js/modules/es.string.includes.js");
16
13
  var _antd = require("antd");
@@ -46,7 +43,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
46
43
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
47
44
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint-disable */
48
45
  function FormWidget(props) {
49
- var _cancel$type, _cancel$size, _clear$type, _clear$size, _submit$type, _submit$disabled;
46
+ var _cancel$type, _cancel$size, _clear$type, _clear$size, _submit$type;
50
47
  const [form] = _antd.Form.useForm();
51
48
  const [dynamicRules, setDynamicRules] = (0, _react.useState)({});
52
49
  const {
@@ -64,47 +61,15 @@ function FormWidget(props) {
64
61
  visible,
65
62
  clear
66
63
  } = cta !== null && cta !== void 0 ? cta : {};
67
- const getFieldRules = (itemData, item) => {
68
- if (item.customRulesCheck) {
69
- return dynamicRules[item === null || item === void 0 ? void 0 : item.name] || (item === null || item === void 0 ? void 0 : item.rules) || [];
70
- } else {
71
- return getInputRules(itemData, item);
72
- }
73
- };
74
- const modifedRuleWithItem = item => {
75
- const temp = item === null || item === void 0 ? void 0 : item.map(r => {
76
- if (!(r !== null && r !== void 0 && r.checkValidator) || !(r !== null && r !== void 0 && r.rule)) {
77
- return null;
78
- }
79
- let pattern = r.rule.pattern;
80
- if (typeof pattern === "string") {
81
- const regex = new RegExp(pattern);
82
- pattern = regex;
83
- }
84
- return _objectSpread(_objectSpread({}, r.rule), {}, {
85
- pattern
86
- });
87
- }).filter(Boolean);
88
- return temp;
89
- };
90
- const getInputRules = (itemData, item) => {
91
- var _ref;
92
- if (itemData !== null && itemData !== void 0 && itemData.customRules) {
93
- for (const key in itemData === null || itemData === void 0 ? void 0 : itemData.customRules) {
94
- if (item[key]) {
95
- const modifiedRules = modifedRuleWithItem(itemData === null || itemData === void 0 ? void 0 : itemData.customRules[key]);
96
- return modifiedRules;
97
- }
98
- }
99
- }
100
- const itemRules = (_ref = itemData || item) === null || _ref === void 0 ? void 0 : _ref.rules;
101
- return modifedRuleWithItem(itemRules);
64
+ const getFieldRules = item => {
65
+ return dynamicRules[item === null || item === void 0 ? void 0 : item.name] || (item === null || item === void 0 ? void 0 : item.rules) || [];
102
66
  };
103
67
  const handleDynamicRuleUpdate = (fieldName, value, dynamicRulesConfig) => {
104
68
  if (!dynamicRulesConfig) return;
105
- Object.entries(dynamicRulesConfig).forEach(_ref2 => {
69
+ console.log(value, "handleDynamicRuleUpdate");
70
+ Object.entries(dynamicRulesConfig).forEach(_ref => {
106
71
  var _config$conditions;
107
- let [targetField, config] = _ref2;
72
+ let [targetField, config] = _ref;
108
73
  const condition = (_config$conditions = config.conditions) === null || _config$conditions === void 0 ? void 0 : _config$conditions.find(c => c.type === "equals" ? value == c.value : c.type == "not_equals" ? value != c.value : c.type == "includes" ? value === null || value === void 0 ? void 0 : value.includes(c.value) : c.validator ? c.validator(value) : false);
109
74
  const newRules = condition ? condition.rules : config.defaultRules || [];
110
75
  setDynamicRules(prev => _objectSpread(_objectSpread({}, prev), {}, {
@@ -138,7 +103,7 @@ function FormWidget(props) {
138
103
  };
139
104
  const renderFieldWidget = (item, index, itemData) => {
140
105
  if ((item === null || item === void 0 ? void 0 : item.widget) === "date" && (item === null || item === void 0 ? void 0 : item.visible) !== false) {
141
- var _item$props, _item$props$getDisabl, _item$disabled;
106
+ var _item$props, _item$props$getDisabl;
142
107
  return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
143
108
  value: item === null || item === void 0 ? void 0 : item.value,
144
109
  name: item === null || item === void 0 ? void 0 : item.name,
@@ -151,12 +116,11 @@ function FormWidget(props) {
151
116
  width: "100%"
152
117
  },
153
118
  disabledDateFunction: item === null || item === void 0 || (_item$props = item.props) === null || _item$props === void 0 || (_item$props$getDisabl = _item$props.getDisabledDateLogic) === null || _item$props$getDisabl === void 0 ? void 0 : _item$props$getDisabl.call(_item$props, item.valueProp),
154
- disabled: (_item$disabled = item.disabled) !== null && _item$disabled !== void 0 ? _item$disabled : false,
155
119
  defaultValue: item.defaultValue
156
120
  }, item === null || item === void 0 ? void 0 : item.props)));
157
121
  }
158
122
  if ((item === null || item === void 0 ? void 0 : item.widget) === "select" && (item === null || item === void 0 ? void 0 : item.visible) !== false) {
159
- var _item$disabled2, _item$showSearch, _item$optionLabelProp;
123
+ var _item$disabled, _item$showSearch, _item$optionLabelProp;
160
124
  return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
161
125
  name: item === null || item === void 0 ? void 0 : item.name,
162
126
  label: item === null || item === void 0 ? void 0 : item.label,
@@ -166,7 +130,7 @@ function FormWidget(props) {
166
130
  options: item === null || item === void 0 ? void 0 : item.value,
167
131
  placeholder: item === null || item === void 0 ? void 0 : item.placeholder,
168
132
  defaultValue: item.defaultValueRequired && (item === null || item === void 0 ? void 0 : item.defaultValue) !== "" ? item === null || item === void 0 ? void 0 : item.defaultValue : undefined,
169
- disabled: (_item$disabled2 = item.disabled) !== null && _item$disabled2 !== void 0 ? _item$disabled2 : false
133
+ disabled: (_item$disabled = item.disabled) !== null && _item$disabled !== void 0 ? _item$disabled : false
170
134
  }, (item === null || item === void 0 ? void 0 : item.onChange) && {
171
135
  onChange: value => {
172
136
  // Call the original onChange if provided
@@ -187,22 +151,20 @@ function FormWidget(props) {
187
151
  },
188
152
  showSearch: (_item$showSearch = item === null || item === void 0 ? void 0 : item.showSearch) !== null && _item$showSearch !== void 0 ? _item$showSearch : false,
189
153
  filterOption: (input, option) => {
190
- var _toLowerCase, _ref3, _option$label$props$t, _option$label, _input$toLowerCase;
191
- return (_toLowerCase = (_ref3 = (_option$label$props$t = option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 || (_option$label = _option$label.props) === null || _option$label === void 0 ? void 0 : _option$label.title) !== null && _option$label$props$t !== void 0 ? _option$label$props$t : "").toLowerCase) === null || _toLowerCase === void 0 || (_toLowerCase = _toLowerCase.call(_ref3)) === null || _toLowerCase === void 0 ? void 0 : _toLowerCase.includes(input === null || input === void 0 || (_input$toLowerCase = input.toLowerCase) === null || _input$toLowerCase === void 0 ? void 0 : _input$toLowerCase.call(input));
154
+ var _toLowerCase, _ref2, _option$label$props$t, _option$label, _input$toLowerCase;
155
+ return (_toLowerCase = (_ref2 = (_option$label$props$t = option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 || (_option$label = _option$label.props) === null || _option$label === void 0 ? void 0 : _option$label.title) !== null && _option$label$props$t !== void 0 ? _option$label$props$t : "").toLowerCase) === null || _toLowerCase === void 0 || (_toLowerCase = _toLowerCase.call(_ref2)) === null || _toLowerCase === void 0 ? void 0 : _toLowerCase.includes(input === null || input === void 0 || (_input$toLowerCase = input.toLowerCase) === null || _input$toLowerCase === void 0 ? void 0 : _input$toLowerCase.call(input));
192
156
  }
193
157
  }, item.optionLabelProp && {
194
158
  optionLabelProp: (_item$optionLabelProp = item === null || item === void 0 ? void 0 : item.optionLabelProp) !== null && _item$optionLabelProp !== void 0 ? _item$optionLabelProp : ""
195
159
  })));
196
160
  }
197
161
  if ((item === null || item === void 0 ? void 0 : item.widget) === "textArea") {
198
- var _item$disabled3;
199
162
  return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
200
163
  name: item === null || item === void 0 ? void 0 : item.name,
201
164
  label: item === null || item === void 0 ? void 0 : item.label,
202
165
  rules: item === null || item === void 0 ? void 0 : item.rules
203
166
  }, /*#__PURE__*/_react.default.createElement(_CustomTextArea.default, {
204
167
  rows: 4,
205
- disabled: (_item$disabled3 = item.disabled) !== null && _item$disabled3 !== void 0 ? _item$disabled3 : false,
206
168
  placeholder: item === null || item === void 0 ? void 0 : item.placeholder
207
169
  }));
208
170
  }
@@ -223,7 +185,7 @@ function FormWidget(props) {
223
185
  return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
224
186
  name: "".concat(item === null || item === void 0 ? void 0 : item.name).concat(index ? index : ""),
225
187
  label: renderLabelWithTooltip(item === null || item === void 0 ? void 0 : item.label, item === null || item === void 0 ? void 0 : item.tooltip),
226
- rules: getFieldRules(itemData, item),
188
+ rules: getFieldRules(item),
227
189
  extra: item === null || item === void 0 ? void 0 : item.helpText,
228
190
  initialValue: item === null || item === void 0 ? void 0 : item.value
229
191
  }, /*#__PURE__*/_react.default.createElement(_CustomInput.default, _extends({}, item === null || item === void 0 ? void 0 : item.props, {
@@ -236,14 +198,13 @@ function FormWidget(props) {
236
198
  })));
237
199
  }
238
200
  if ((item === null || item === void 0 ? void 0 : item.widget) === "checkbox") {
239
- var _item$rules, _item$disabled4, _item$className;
201
+ var _item$rules, _item$className;
240
202
  return /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.BgColorCheckBox, null, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
241
203
  name: "".concat(item === null || item === void 0 ? void 0 : item.name).concat(index ? index : ""),
242
204
  rules: item === null || item === void 0 || (_item$rules = item.rules) === null || _item$rules === void 0 ? void 0 : _item$rules.map(r => (r === null || r === void 0 ? void 0 : r.checkValidator) && (r === null || r === void 0 ? void 0 : r.rule)).filter(Boolean),
243
205
  valuePropName: "checked",
244
206
  initialValue: item === null || item === void 0 ? void 0 : item.checked
245
207
  }, /*#__PURE__*/_react.default.createElement(_CustomCheckBox.default, {
246
- disabled: (_item$disabled4 = item.disabled) !== null && _item$disabled4 !== void 0 ? _item$disabled4 : false,
247
208
  size: "large",
248
209
  label: item === null || item === void 0 ? void 0 : item.label,
249
210
  className: (_item$className = item === null || item === void 0 ? void 0 : item.className) !== null && _item$className !== void 0 ? _item$className : ""
@@ -281,7 +242,7 @@ function FormWidget(props) {
281
242
  }
282
243
  };
283
244
  const renderWidget = item => {
284
- var _item$value, _item$value2, _item$value2$map, _item$value3, _item$value4, _item$value5, _item$value6, _item$iconConfig, _item$subType, _item$disabled5;
245
+ var _item$value, _item$value2, _item$value2$map, _item$value3, _item$value4, _item$value5, _item$value6, _item$iconConfig, _item$subType, _item$disabled2;
285
246
  switch (item === null || item === void 0 ? void 0 : item.type) {
286
247
  case "simpleList":
287
248
  if ((item === null || item === void 0 || (_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value.length) === 0) return null;
@@ -352,8 +313,7 @@ function FormWidget(props) {
352
313
  key: item.key,
353
314
  data: item.value,
354
315
  info: keyValueInfo,
355
- customClassName: item.className,
356
- tagStatus: item === null || item === void 0 ? void 0 : item.tagStatus
316
+ customClassName: item.className
357
317
  });
358
318
  case "tag":
359
319
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -384,7 +344,7 @@ function FormWidget(props) {
384
344
  }, /*#__PURE__*/_react.default.createElement(_CustomButton.default, _extends({
385
345
  type: (_item$subType = item === null || item === void 0 ? void 0 : item.subType) !== null && _item$subType !== void 0 ? _item$subType : "primary",
386
346
  label: item === null || item === void 0 ? void 0 : item.label,
387
- disabled: (_item$disabled5 = item === null || item === void 0 ? void 0 : item.disabled) !== null && _item$disabled5 !== void 0 ? _item$disabled5 : false,
347
+ disabled: (_item$disabled2 = item === null || item === void 0 ? void 0 : item.disabled) !== null && _item$disabled2 !== void 0 ? _item$disabled2 : false,
388
348
  onClick: () => {
389
349
  if (item !== null && item !== void 0 && item.onClick) {
390
350
  item.onClick(item === null || item === void 0 ? void 0 : item.action, item === null || item === void 0 ? void 0 : item.key);
@@ -441,15 +401,13 @@ function FormWidget(props) {
441
401
  heading,
442
402
  headingInfo,
443
403
  items,
444
- topDividerRequired
404
+ topDividerRequired = true
445
405
  } = group;
446
406
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
447
407
  key: index
448
- }, bordered ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, topDividerRequired === true && /*#__PURE__*/_react.default.createElement(_antd.Divider, {
449
- className: "dividerLine"
450
- }), Heading(heading, headingInfo), /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.FieldBoxBorder, null, items.map((item, i) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
408
+ }, bordered ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, Heading(heading, headingInfo), /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.FieldBoxBorder, null, items.map((item, i) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
451
409
  key: i
452
- }, renderWidget(item))))) : /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.FieldWithoutBorder, null, topDividerRequired !== false && /*#__PURE__*/_react.default.createElement(_antd.Divider, {
410
+ }, renderWidget(item))))) : /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.FieldWithoutBorder, null, topDividerRequired && /*#__PURE__*/_react.default.createElement(_antd.Divider, {
453
411
  className: "dividerLine"
454
412
  }), Heading(heading, headingInfo), items.map((item, i) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
455
413
  key: i
@@ -498,7 +456,6 @@ function FormWidget(props) {
498
456
  }
499
457
  })), submit && /*#__PURE__*/_react.default.createElement(_antd.Form.Item, null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
500
458
  type: (_submit$type = submit === null || submit === void 0 ? void 0 : submit.type) !== null && _submit$type !== void 0 ? _submit$type : "primary",
501
- disabled: (_submit$disabled = submit.disabled) !== null && _submit$disabled !== void 0 ? _submit$disabled : false,
502
459
  onClick: () => {
503
460
  var _form$validateFields3;
504
461
  form === null || form === void 0 || (_form$validateFields3 = form.validateFields()) === null || _form$validateFields3 === void 0 || _form$validateFields3.then(value => {
@@ -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$disable5, _actionContent$label, _approvalForm$disable6, _approvalForm$disable7, _approvalForm$disable8, _approvalForm$disable9, _approvalForm$remarks2, _approvalForm$disable10;
57
+ var _approvalForm$disable2, _actionContent$label, _approvalForm$disable3, _approvalForm$disable4, _approvalForm$disable5, _approvalForm$remarks, _approvalForm$disable6, _approvalForm$disable7, _approvalForm$disable8, _approvalForm$disable9, _approvalForm$remarks2, _approvalForm$disable10;
58
58
  let {
59
59
  children,
60
60
  description,
@@ -134,92 +134,6 @@ function ApprovalWidget(_ref) {
134
134
  return "";
135
135
  }
136
136
  };
137
-
138
- /**
139
- * Renders the approval radio group with validation
140
- * @param {boolean} isRequired - Whether the field is required
141
- * @returns {React.ReactNode} Radio group component
142
- */
143
- const renderApprovalRadioGroup = function renderApprovalRadioGroup() {
144
- var _approvalForm$disable, _approvalForm$disable2;
145
- let isRequired = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
146
- return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
147
- name: "isApproved-".concat(questionId),
148
- className: "custom-radio-group",
149
- initialValue: isApproved,
150
- rules: isRequired ? [{
151
- required: true,
152
- message: dataTest ? /*#__PURE__*/_react.default.createElement("span", {
153
- "data-test": "".concat(dataTest, "--is-approved-validation-message")
154
- }, "Approval status needs to be selected.") : "Approval status needs to be selected."
155
- }] : []
156
- }, /*#__PURE__*/_react.default.createElement(_CustomRadio.default.Group, {
157
- "data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-group") : undefined,
158
- onChange: onRadioChange,
159
- value: isApproved
160
- }, /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
161
- "data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-yes") : undefined,
162
- disabled: (_approvalForm$disable = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable !== void 0 ? _approvalForm$disable : false,
163
- label: "Mark as Approved",
164
- value: 1
165
- }), /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
166
- "data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-no") : undefined,
167
- disabled: (_approvalForm$disable2 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable2 !== void 0 ? _approvalForm$disable2 : false,
168
- label: "Mark as Pending",
169
- value: 0
170
- })));
171
- };
172
-
173
- /**
174
- * Renders the remarks textarea with validation
175
- * @param {boolean} isRequired - Whether the field is required
176
- * @returns {React.ReactNode} Remarks section component
177
- */
178
- const renderRemarksSection = function renderRemarksSection() {
179
- var _approvalForm$remarks, _approvalForm$disable3;
180
- let isRequired = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
181
- return isApproved === 0 && /*#__PURE__*/_react.default.createElement("section", null, /*#__PURE__*/_react.default.createElement("h5", {
182
- className: "type-b2-400"
183
- }, "Remarks"), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
184
- name: "remarks-".concat(questionId),
185
- initialValue: (_approvalForm$remarks = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.remarks) !== null && _approvalForm$remarks !== void 0 ? _approvalForm$remarks : "",
186
- rules: isRequired ? [{
187
- required: true,
188
- message: dataTest ? /*#__PURE__*/_react.default.createElement("span", {
189
- "data-test": "".concat(dataTest, "--remarks-validation-message")
190
- }, "Remarks cannot be empty.") : "Remarks cannot be empty."
191
- }] : []
192
- }, /*#__PURE__*/_react.default.createElement(_antd.Input.TextArea, {
193
- "data-test": dataTest ? "".concat(dataTest, "--remarks") : undefined,
194
- disabled: (_approvalForm$disable3 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable3 !== void 0 ? _approvalForm$disable3 : false
195
- })));
196
- };
197
-
198
- /**
199
- * BUSINESS LOGIC: Two different radio implementations exist for different approval scenarios
200
- *
201
- * "radio" - MANDATORY APPROVAL: Always requires user to select approval status
202
- * - Used when approval decision is compulsory (e.g., critical business processes)
203
- * - Both approval status AND remarks (if pending) are mandatory
204
- * - Cannot proceed without making a selection
205
- *
206
- * "radioOptional" - OPTIONAL APPROVAL: Approval status depends on isMandatory flag
207
- * - Used when approval might be optional based on business rules
208
- * - If isMandatory=true: Same behavior as "radio" (mandatory)
209
- * - If isMandatory=false: User can skip approval selection
210
- * - Provides flexibility for different approval workflows
211
- *
212
- * This separation allows the same component to handle both strict and flexible approval processes
213
- *
214
- * Renders the approval section based on action render type
215
- * @returns {React.ReactNode} Approval section component
216
- */
217
- const renderApprovalSection = () => {
218
- const isRadioType = actionRenderType === "radio" || actionRenderType === "radioOptional";
219
- if (!isRadioType) return null;
220
- const isRequired = actionRenderType === "radio" || isMandatory;
221
- return /*#__PURE__*/_react.default.createElement("div", null, renderApprovalRadioGroup(isRequired), renderRemarksSection(isRequired));
222
- };
223
137
  return /*#__PURE__*/_react.default.createElement(_styles.StyledContainer, null, /*#__PURE__*/_react.default.createElement("div", {
224
138
  className: "row"
225
139
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -233,14 +147,14 @@ function ApprovalWidget(_ref) {
233
147
  typography: "type-b2-400",
234
148
  color: "primary-content"
235
149
  }, description)), !isQuestionStyleWidget && ((multipleDocDetails === null || multipleDocDetails === void 0 ? void 0 : multipleDocDetails.length) > 0 ? multipleDocDetails.map(docDetails => {
236
- var _approvalForm$disable4;
150
+ var _approvalForm$disable;
237
151
  return /*#__PURE__*/_react.default.createElement("div", {
238
152
  className: "oaCustomerResponse"
239
153
  }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
240
154
  typography: "type-b2-400",
241
155
  color: "secondary-content"
242
156
  }, docDetails.documentTitle, " \xA0"), /*#__PURE__*/_react.default.createElement(_UploadDownloadWidget.default, _extends({
243
- disabled: (_approvalForm$disable4 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable4 !== void 0 ? _approvalForm$disable4 : false,
157
+ disabled: (_approvalForm$disable = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable !== void 0 ? _approvalForm$disable : false,
244
158
  "data-test": dataTest ? "".concat(dataTest, "--upload-download-widget") : undefined
245
159
  }, docDetails, {
246
160
  formName: isMandatory ? "file-".concat(questionId) : undefined
@@ -251,7 +165,7 @@ function ApprovalWidget(_ref) {
251
165
  typography: "type-b2-400",
252
166
  color: "secondary-content"
253
167
  }, documentTitle, " \xA0"), /*#__PURE__*/_react.default.createElement(_UploadDownloadWidget.default, _extends({
254
- disabled: (_approvalForm$disable5 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable5 !== void 0 ? _approvalForm$disable5 : false,
168
+ disabled: (_approvalForm$disable2 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable2 !== void 0 ? _approvalForm$disable2 : false,
255
169
  "data-test": dataTest ? "".concat(dataTest, "--upload-download-widget") : undefined
256
170
  }, docDetails, {
257
171
  formName: isMandatory ? "file-".concat(questionId) : undefined
@@ -326,8 +240,49 @@ function ApprovalWidget(_ref) {
326
240
  typography: "type-b2-400",
327
241
  color: "secondary-content"
328
242
  }, (_actionContent$label = actionContent === null || actionContent === void 0 ? void 0 : actionContent.label) !== null && _actionContent$label !== void 0 ? _actionContent$label : "-")), actionRenderType === "button" && /*#__PURE__*/_react.default.createElement(_CustomButton.default, _extends({
243
+ disabled: (_approvalForm$disable3 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable3 !== void 0 ? _approvalForm$disable3 : false
244
+ }, actionContent)), actionRenderType === "radio" &&
245
+ /*#__PURE__*/
246
+ //className="col-sm-12 col-md-4 col-lg-4"
247
+ _react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
248
+ name: "isApproved-".concat(questionId),
249
+ className: "custom-radio-group",
250
+ initialValue: isApproved,
251
+ rules: [{
252
+ required: true,
253
+ message: dataTest ? /*#__PURE__*/_react.default.createElement("span", {
254
+ "data-test": "".concat(dataTest, "--is-approved-validation-message")
255
+ }, "Approval status needs to be selected.") : "Approval status needs to be selected."
256
+ }]
257
+ }, /*#__PURE__*/_react.default.createElement(_CustomRadio.default.Group, {
258
+ "data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-group") : undefined,
259
+ onChange: onRadioChange,
260
+ value: isApproved
261
+ }, /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
262
+ "data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-yes") : undefined,
263
+ disabled: (_approvalForm$disable4 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable4 !== void 0 ? _approvalForm$disable4 : false,
264
+ label: "Mark as Approved",
265
+ value: 1
266
+ }), /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
267
+ "data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-no") : undefined,
268
+ disabled: (_approvalForm$disable5 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable5 !== void 0 ? _approvalForm$disable5 : false,
269
+ label: "Mark as Pending",
270
+ value: 0
271
+ }))), isApproved === 0 && /*#__PURE__*/_react.default.createElement("section", null, /*#__PURE__*/_react.default.createElement("h5", {
272
+ className: "type-b2-400"
273
+ }, "Remarks"), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
274
+ name: "remarks-".concat(questionId),
275
+ initialValue: (_approvalForm$remarks = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.remarks) !== null && _approvalForm$remarks !== void 0 ? _approvalForm$remarks : "",
276
+ rules: [{
277
+ required: true,
278
+ message: dataTest ? /*#__PURE__*/_react.default.createElement("span", {
279
+ "data-test": "".concat(dataTest, "--remarks-validation-message")
280
+ }, "Remarks cannot be empty.") : "Remarks cannot be empty."
281
+ }]
282
+ }, /*#__PURE__*/_react.default.createElement(_antd.Input.TextArea, {
283
+ "data-test": dataTest ? "".concat(dataTest, "--remarks") : undefined,
329
284
  disabled: (_approvalForm$disable6 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable6 !== void 0 ? _approvalForm$disable6 : false
330
- }, actionContent)), renderApprovalSection(), actionRenderType === "buttonWithForm" && /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
285
+ })))), actionRenderType === "buttonWithForm" && /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
331
286
  validateStatus: form.getFieldError("validateDocumentButton#".concat(questionId)) ? "error" : "",
332
287
  help: /*#__PURE__*/_react.default.createElement("div", {
333
288
  className: "errorForRtv"
@@ -77,9 +77,6 @@ function KeyValueDataView(_ref) {
77
77
  className: "type-b2-400",
78
78
  title: value
79
79
  }, value) || _react.default.isValidElement && /*#__PURE__*/_react.default.createElement("span", null, value), (tagStatus === null || tagStatus === void 0 ? void 0 : tagStatus.tagKey) === key && (tagStatus === null || tagStatus === void 0 ? void 0 : tagStatus.tagData) && /*#__PURE__*/_react.default.createElement(_CustomTag.default, {
80
- style: {
81
- width: "100px"
82
- },
83
80
  type: tagStatus.tagData.type || "success",
84
81
  label: tagStatus.tagData.label,
85
82
  size: tagStatus.tagData.size || "small"
@@ -22,7 +22,7 @@ var _CustomSteps = _interopRequireDefault(require("../../components/oa-component
22
22
  var _Typography = require("../../components/oa-component-typography/Typography");
23
23
  var _utils = require("../../utils");
24
24
  var _styles = require("./styles");
25
- const _excluded = ["data", "data-test", "current", "initialAnswers", "onComplete", "onStepChange", "style"];
25
+ const _excluded = ["data", "data-test", "current", "initialAnswers", "onComplete", "onStepChange", "style", "showSubmitButton"];
26
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
27
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
28
28
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -49,7 +49,8 @@ function ProgressiveStepsWidget(_ref) {
49
49
  initialAnswers = {},
50
50
  onComplete,
51
51
  onStepChange,
52
- style
52
+ style,
53
+ showSubmitButton = true
53
54
  } = _ref,
54
55
  otherProps = _objectWithoutProperties(_ref, _excluded);
55
56
  const [currentStep, setCurrentStep] = (0, _react.useState)(externalCurrent || 0);
@@ -343,7 +344,7 @@ function ProgressiveStepsWidget(_ref) {
343
344
  current: currentStep,
344
345
  direction: "vertical",
345
346
  "data-test": dataTest
346
- }, otherProps)), isAllStepsCompleted() && /*#__PURE__*/_react.default.createElement(_styles.SubmitButton, null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
347
+ }, otherProps)), showSubmitButton && isAllStepsCompleted() && /*#__PURE__*/_react.default.createElement(_styles.SubmitButton, null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
347
348
  type: "primary",
348
349
  size: "large",
349
350
  onClick: handleSubmit,
@@ -376,7 +377,8 @@ ProgressiveStepsWidget.propTypes = {
376
377
  initialAnswers: _propTypes.default.object,
377
378
  onComplete: _propTypes.default.func,
378
379
  onStepChange: _propTypes.default.func,
379
- style: _propTypes.default.object
380
+ style: _propTypes.default.object,
381
+ showSubmitButton: _propTypes.default.bool
380
382
  };
381
383
  ProgressiveStepsWidget.defaultProps = {
382
384
  data: {
@@ -387,6 +389,7 @@ ProgressiveStepsWidget.defaultProps = {
387
389
  initialAnswers: {},
388
390
  onComplete: undefined,
389
391
  onStepChange: undefined,
390
- style: {}
392
+ style: {},
393
+ showSubmitButton: true
391
394
  };
392
395
  var _default = exports.default = ProgressiveStepsWidget;
@@ -11,7 +11,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
11
11
 
12
12
  function Header(_ref) {
13
13
  let {
14
- icons = []
14
+ icons = [],
15
+ text = null
15
16
  } = _ref;
16
17
  return /*#__PURE__*/_react.default.createElement("div", {
17
18
  className: "leftLogoSec"
@@ -25,6 +26,8 @@ function Header(_ref) {
25
26
  preview: false,
26
27
  className: "logo"
27
28
  }));
28
- }));
29
+ }), text && /*#__PURE__*/_react.default.createElement(_antd.Typography, {
30
+ typography: "type-h3-500"
31
+ }, text));
29
32
  }
30
33
  var _default = exports.default = Header;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "1.0.1-stage.361",
3
+ "version": "1.0.1-stage.363",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",