@undp/carbon-library 1.0.78 → 1.0.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/dist/esm/index.js CHANGED
@@ -1001,6 +1001,7 @@ var Instrument;
1001
1001
  Instrument["GRANT"] = "Grant";
1002
1002
  Instrument["EQUITY"] = "Equity";
1003
1003
  Instrument["GUARANTEE"] = "Guarantee";
1004
+ Instrument["INKIND"] = "In-Kind";
1004
1005
  Instrument["OTHER"] = "Other";
1005
1006
  })(Instrument || (Instrument = {}));
1006
1007
 
@@ -5788,13 +5789,13 @@ var ProgrammeManagementComponent = function (props) {
5788
5789
  var css_248z$g = ".programme-view {\n padding: 0px 50px; }\n .programme-view .ant-steps-item-tail::after {\n background-color: #ffff !important;\n background-color: #ffff !important;\n border-left: 1px dashed #d9d9d9;\n border-style: dashed;\n border-width: 1px;\n border-color: #d9d9d9; }\n .programme-view .action-btns {\n justify-content: center !important; }\n .programme-view .action-btns button:first-child {\n margin-right: 15px;\n margin-left: 10px; }\n .programme-view .action-btns button:last-child {\n margin-right: 15px; }\n .programme-view .title-bar {\n display: flex;\n justify-content: space-between; }\n .programme-view .ant-steps-vertical > .ant-steps-item > .ant-steps-item-container > .ant-steps-item-tail {\n left: 13px; }\n .programme-view .apexcharts-legend-series {\n padding-bottom: 5px; }\n .programme-view .card-container {\n margin-bottom: 20px;\n width: 100%;\n border-radius: 10px; }\n .programme-view .card-container .action-btns {\n margin-top: 25px;\n margin-bottom: -15px;\n justify-content: end; }\n .programme-view .programme-logo {\n width: 100px;\n height: 100px;\n border-radius: 100%;\n background-color: rgba(254, 241, 173, 0.5);\n font-size: 50px;\n color: #ffa070;\n text-align: center;\n padding: 12px;\n margin: auto; }\n .programme-view .centered-card {\n display: flex;\n justify-content: center;\n text-align: center;\n flex-direction: column;\n width: 100%; }\n .programme-view .separator {\n border-bottom: 1px solid #f0f0f0;\n width: 100%; }\n .programme-view .cert-info {\n text-align: center;\n padding: 20px 15px 20px 15px; }\n .programme-view .cert-info img {\n height: 60px; }\n .programme-view .cert-content {\n display: flex;\n flex-wrap: wrap; }\n .programme-view .cert-logo {\n width: 60px;\n height: 60px;\n border-radius: 100%;\n background-color: rgba(254, 241, 173, 0.5);\n font-size: 30px;\n color: #ffa070;\n text-align: center;\n padding: 6px;\n margin: 0 auto; }\n .programme-view .cert-name {\n color: rgba(58, 53, 65, 0.8);\n margin-top: 14px;\n font-weight: 600; }\n .programme-view .cert-date {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 400;\n font-size: 0.8rem; }\n .programme-view .company-info {\n padding: 25px 10px 30px 10px;\n min-width: 200px; }\n .programme-view .company-info img {\n height: 90px; }\n .programme-view .company-info .progress-bar {\n width: calc(max(200px, 60%));\n font-size: 0.8rem;\n color: rgba(58, 53, 65, 0.6);\n margin: 15px auto 0px; }\n .programme-view .company-info .ant-progress-success-bg,\n .programme-view .company-info .ant-progress-bg {\n background-color: #16b1ff; }\n .programme-view .programme-name {\n color: rgba(58, 53, 65, 0.8);\n margin-top: 14px;\n font-weight: 600; }\n .programme-view .file-name {\n cursor: pointer;\n color: rgba(58, 53, 65, 0.6); }\n .programme-view .file-name:hover {\n color: #16b1ff; }\n\n.info-view .content {\n padding: 15px 0px;\n margin-left: -8px; }\n\n.info-view .map-content {\n padding: 15px 0px; }\n\n.info-view .ant-steps-item-subtitle {\n display: block;\n margin-left: 0px;\n font-size: 0.8rem;\n color: rgba(58, 53, 65, 0.3);\n margin-top: -12px;\n font-weight: 500; }\n\n.info-view .ant-steps-item-process\n> .ant-steps-item-container\n> .ant-steps-item-content\n> .ant-steps-item-title {\n color: rgba(58, 53, 65, 0.8);\n font-size: 0.8rem;\n font-weight: 600; }\n\n.info-view .ant-steps-item-process\n> .ant-steps-item-container\n> .ant-steps-item-content\n> .ant-steps-item-description {\n font-size: 0.8rem;\n font-weight: 500;\n color: rgba(58, 53, 65, 0.6); }\n\n.info-view .step-icon {\n border-radius: 100%;\n margin-right: 10px;\n padding: 0.5rem 0.5rem 0.3rem 0.5rem;\n font-size: 0.8rem; }\n\n.info-view .created-step {\n color: #ff8f56;\n background-color: rgba(254, 241, 173, 0.5);\n font-size: 1rem;\n padding: 0.4rem 0.4rem 0.2rem 0.4rem; }\n\n.info-view .auth-step {\n color: #16b1ff;\n background-color: rgba(185, 226, 244, 0.5); }\n\n.info-view .reject-step {\n color: #ff9900;\n background-color: rgba(254, 179, 159, 0.3); }\n\n.info-view .issue-step {\n color: #4f9d83;\n background-color: rgba(128, 255, 0, 0.12); }\n\n.info-view .cert-step {\n color: #4f9d83;\n background-color: rgba(128, 255, 0, 0.12); }\n\n.info-view .revoke-step {\n color: rgba(255, 0, 199, 0.56);\n background-color: rgba(255, 159, 222, 0.5); }\n\n.info-view .transfer-step {\n background-color: rgba(215, 223, 226, 0.5);\n color: #949599; }\n\n.info-view .retire-step {\n color: #ff4d4f;\n background-color: rgba(255, 211, 211, 0.5);\n padding: 0.5rem 0.5rem 0.3rem 0.5rem; }\n\n.info-view .freeze-step {\n color: #976ed7;\n background-color: rgba(183, 164, 254, 0.3); }\n\n.info-view .region-list {\n padding-top: 20px; }\n\n.loc-tag {\n padding: 10px 20px 0px 0px;\n color: rgba(58, 53, 65, 0.6); }\n\n.loc-icon {\n margin-right: 5px;\n font-size: 1rem; }\n\n.loc-text {\n line-height: 1.2rem;\n vertical-align: top; }\n\n.apexcharts-datalabels-group {\n font-family: \"Inter\" !important;\n color: rgba(58, 53, 65, 0.8) !important; }\n\n.remark {\n font-size: 0.8rem; }\n\n.footer-btn {\n margin: 39px 20px 0px 20px;\n display: flex;\n justify-content: center;\n column-gap: 30px; }\n .footer-btn button {\n text-transform: uppercase; }\n\n.retire-form .ant-radio-group {\n text-align: left; }\n\n.only-head .title {\n margin-bottom: 0px !important; }\n .only-head .title .link {\n font-size: 1.2rem;\n line-height: 0.5rem;\n cursor: pointer;\n color: rgba(58, 53, 65, 0.8); }\n\n.mapboxgl-popup-tip {\n border-bottom-color: #16b1ff !important;\n border-top-color: #16b1ff !important; }\n\n.mapboxgl-popup-content {\n background-color: #16b1ff;\n color: white;\n font-family: \"Inter\";\n font-weight: 500;\n min-width: 60px;\n height: 30px;\n padding: 5px 20px; }\n";
5789
5790
  styleInject(css_248z$g);
5790
5791
 
5792
+ var css_248z$f = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-view .title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.info-view .title {\n margin-bottom: 5px; }\n\n.info-view .field-key {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden; }\n\n.info-view .field-value {\n color: rgba(58, 53, 65, 0.6);\n text-overflow: ellipsis;\n overflow: hidden; }\n .info-view .field-value .row {\n display: flex;\n width: 40%;\n align-items: center;\n justify-content: space-between; }\n .info-view .field-value .row .key {\n display: flex;\n width: 50%;\n align-items: center;\n justify-content: flex-start; }\n .info-view .field-value .row .data {\n display: flex;\n width: 50%;\n align-items: center;\n justify-content: flex-start; }\n\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
5793
+ styleInject(css_248z$f);
5794
+
5791
5795
  var dateTimeFormat = 'dd LLLL yyyy @ HH:mm';
5792
5796
  var dateFormat = 'dd LLLL yyyy';
5793
5797
  var creditUnit = 'ITMO';
5794
5798
 
5795
- var css_248z$f = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-view .title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.info-view .title {\n margin-bottom: 5px; }\n\n.info-view .field-key {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden; }\n\n.info-view .field-value {\n color: rgba(58, 53, 65, 0.6);\n text-overflow: ellipsis;\n overflow: hidden; }\n\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
5796
- styleInject(css_248z$f);
5797
-
5798
5799
  var InfoView = function (props) {
5799
5800
  var title = props.title, data = props.data, icon = props.icon, hiddenColumns = props.hiddenColumns;
5800
5801
  return (React.createElement("div", { className: "info-view" },
@@ -5802,14 +5803,20 @@ var InfoView = function (props) {
5802
5803
  React.createElement("span", { className: "title-icon" }, icon),
5803
5804
  React.createElement("span", { className: "title-text" }, title)),
5804
5805
  React.createElement("div", null, Object.keys(data).map(function (k) {
5806
+ var _a;
5805
5807
  if (hiddenColumns.indexOf(k) < 0) {
5806
5808
  return (React.createElement(Row, { className: "field", key: k },
5807
5809
  React.createElement(Col, { span: 12, className: "field-key" }, k),
5808
- React.createElement(Col, { span: 12, className: "field-value" }, data[k] instanceof DateTime
5810
+ React.createElement(Col, { span: 12, className: "field-value" }, k.includes("GHG Emissions") ? (((_a = Object.values(data[k])) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (Object.entries(data[k]).map(function (_a) {
5811
+ var key = _a[0]; _a[1];
5812
+ return (React.createElement("div", { className: "row" },
5813
+ React.createElement("div", { className: "key" }, key),
5814
+ React.createElement("div", { className: "data" }, data[k][key])));
5815
+ })) : (React.createElement("div", null, "-"))) : (React.createElement("span", null, data[k] instanceof DateTime
5809
5816
  ? data[k].toFormat(dateFormat)
5810
- : data[k] === '' || !data[k] || data[k] === 'NaN'
5811
- ? '-'
5812
- : data[k])));
5817
+ : data[k] === "" || !data[k] || data[k] === "NaN"
5818
+ ? "-"
5819
+ : data[k])))));
5813
5820
  }
5814
5821
  else {
5815
5822
  return null;
@@ -13535,17 +13542,17 @@ var ProgrammeCreationComponent = function (props) {
13535
13542
  var _j = useState(0), current = _j[0], setCurrent = _j[1];
13536
13543
  var _k = useState(false), isUpdate = _k[0]; _k[1];
13537
13544
  var _l = useState(), includedInNDC = _l[0], setIncludedInNDC = _l[1];
13538
- var _m = useState(), includedInNAP = _m[0], setIncludedInNAP = _m[1];
13539
- var _o = useState([]), countries = _o[0], setCountries = _o[1];
13540
- var _p = useState([]), organisationsList = _p[0], setOrganisationList = _p[1];
13541
- var _q = useState(""), userOrgTaxId = _q[0], setUserOrgTaxId = _q[1];
13542
- var _r = useState([]), regionsList = _r[0], setRegionsList = _r[1];
13543
- var _s = useState(); _s[0]; var setProgrammeDetailsObj = _s[1];
13544
- var _t = useState(), selectedOrgs = _t[0], setSelectedOrgs = _t[1];
13545
- var _u = useState(false), ownershipPercentageValidation = _u[0], setOwnershipPercentageValidation = _u[1];
13546
- var _v = useState(""), selectedSector = _v[0], setSelectedSector = _v[1];
13547
- var _w = useState([]); _w[0]; var setMinistrySectoralScope = _w[1];
13548
- var _x = useState([]), availableSecoralScope = _x[0], setAvailableSectoralScope = _x[1];
13545
+ var _m = useState([]), countries = _m[0], setCountries = _m[1];
13546
+ var _o = useState([]), organisationsList = _o[0], setOrganisationList = _o[1];
13547
+ var _p = useState(""), userOrgTaxId = _p[0], setUserOrgTaxId = _p[1];
13548
+ var _q = useState([]), regionsList = _q[0], setRegionsList = _q[1];
13549
+ var _r = useState(); _r[0]; var setProgrammeDetailsObj = _r[1];
13550
+ var _s = useState(), selectedOrgs = _s[0], setSelectedOrgs = _s[1];
13551
+ var _t = useState(false), ownershipPercentageValidation = _t[0], setOwnershipPercentageValidation = _t[1];
13552
+ var _u = useState(""), selectedSector = _u[0], setSelectedSector = _u[1];
13553
+ var _v = useState([]); _v[0]; var setMinistrySectoralScope = _v[1];
13554
+ var _w = useState([]), availableSecoralScope = _w[0], setAvailableSectoralScope = _w[1];
13555
+ var _x = useState([]), selectableSectoralScope = _x[0], setSelectableSectoralScope = _x[1];
13549
13556
  var _y = useState([]), availableSectar = _y[0], setAvailableSectar = _y[1];
13550
13557
  var initialOrganisationOwnershipValues = [
13551
13558
  {
@@ -13831,12 +13838,11 @@ var ProgrammeCreationComponent = function (props) {
13831
13838
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== CompanyRole.MINISTRY
13832
13839
  ? __spreadArray([userOrgTaxId], proponentTxIds, true) : proponentTxIds,
13833
13840
  proponentPercentage: proponentPercentages,
13834
- programmeProperties: __assign(__assign(__assign({ buyerCountryEligibility: values === null || values === void 0 ? void 0 : values.buyerCountryEligibility, geographicalLocation: values === null || values === void 0 ? void 0 : values.geographicalLocation, greenHouseGasses: values === null || values === void 0 ? void 0 : values.greenHouseGasses }, ((values === null || values === void 0 ? void 0 : values.ndcScope) !== undefined &&
13841
+ programmeProperties: __assign(__assign({ buyerCountryEligibility: values === null || values === void 0 ? void 0 : values.buyerCountryEligibility, geographicalLocation: values === null || values === void 0 ? void 0 : values.geographicalLocation, greenHouseGasses: values === null || values === void 0 ? void 0 : values.greenHouseGasses }, ((values === null || values === void 0 ? void 0 : values.ndcScope) !== undefined &&
13835
13842
  (values === null || values === void 0 ? void 0 : values.ndcScope) !== null && {
13836
13843
  ndcScope: (values === null || values === void 0 ? void 0 : values.ndcScope) === "true" ? true : false,
13837
13844
  })), (includedInNDC !== undefined &&
13838
- includedInNDC !== null && { includedInNdc: includedInNDC })), (includedInNAP !== undefined &&
13839
- includedInNAP !== null && { includedInNap: includedInNAP })),
13845
+ includedInNDC !== null && { includedInNdc: includedInNDC })),
13840
13846
  };
13841
13847
  if ((logoUrls === null || logoUrls === void 0 ? void 0 : logoUrls.length) > 0) {
13842
13848
  programmeDetails.designDocument = logoUrls[1];
@@ -13946,14 +13952,6 @@ var ProgrammeCreationComponent = function (props) {
13946
13952
  setIncludedInNDC(value);
13947
13953
  }
13948
13954
  };
13949
- var onClickIncludedInNAPScope = function (value) {
13950
- if (value === includedInNAP) {
13951
- setIncludedInNAP(undefined);
13952
- }
13953
- else {
13954
- setIncludedInNAP(value);
13955
- }
13956
- };
13957
13955
  var onChangeGeoLocation = function (values) {
13958
13956
  if (values.includes("National")) {
13959
13957
  var buyerCountryValues = regionsList;
@@ -13961,15 +13959,6 @@ var ProgrammeCreationComponent = function (props) {
13961
13959
  formOne.setFieldValue("geographicalLocation", __spreadArray([], newBuyerValues, true));
13962
13960
  }
13963
13961
  };
13964
- var onInCludedNAPChange = function (event) {
13965
- var _a, _b;
13966
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNAP") {
13967
- setIncludedInNAP(true);
13968
- }
13969
- else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNAP") {
13970
- setIncludedInNAP(false);
13971
- }
13972
- };
13973
13962
  var onInCludedNDCChange = function (event) {
13974
13963
  var _a, _b;
13975
13964
  if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNDC") {
@@ -13999,8 +13988,29 @@ var ProgrammeCreationComponent = function (props) {
13999
13988
  setSelectedSector(String(val));
14000
13989
  };
14001
13990
  useEffect(function () {
14002
- getOrganisationsDetails();
14003
- }, []);
13991
+ if (selectedSector !== "" &&
13992
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY) {
13993
+ formOne.setFieldValue("sectoralScope", "");
13994
+ if (selectedSector === String(Sector.Health) ||
13995
+ selectedSector === String(Sector.Education) ||
13996
+ selectedSector === String(Sector.Hospitality)) {
13997
+ setSelectableSectoralScope(availableSecoralScope);
13998
+ }
13999
+ else {
14000
+ var sScopes_1 = [];
14001
+ availableSecoralScope === null || availableSecoralScope === void 0 ? void 0 : availableSecoralScope.map(function (sectoralScope) {
14002
+ var _a;
14003
+ if ((_a = sectoralScopes[selectedSector]) === null || _a === void 0 ? void 0 : _a.includes(sectoralScope === null || sectoralScope === void 0 ? void 0 : sectoralScope.key)) {
14004
+ sScopes_1.push(sectoralScope);
14005
+ }
14006
+ });
14007
+ setSelectableSectoralScope(__spreadArray([], sScopes_1, true));
14008
+ }
14009
+ }
14010
+ else if (selectedSector !== "") {
14011
+ formOne.setFieldValue("sectoralScope", "");
14012
+ }
14013
+ }, [selectedSector]);
14004
14014
  return (React.createElement("div", { className: "add-programme-main-container" },
14005
14015
  React.createElement("div", { className: "title-container" },
14006
14016
  React.createElement("div", { className: "main" }, isUpdate
@@ -14242,7 +14252,7 @@ var ProgrammeCreationComponent = function (props) {
14242
14252
  ] },
14243
14253
  React.createElement(Select, { size: "large" }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
14244
14254
  CompanyRole.MINISTRY
14245
- ? availableSecoralScope === null || availableSecoralScope === void 0 ? void 0 : availableSecoralScope.map(function (item) { return (React.createElement(Select.Option, { key: item.value, value: item.value }, item.key)); })
14255
+ ? selectableSectoralScope === null || selectableSectoralScope === void 0 ? void 0 : selectableSectoralScope.map(function (item) { return (React.createElement(Select.Option, { key: item.value, value: item.value }, item.key)); })
14246
14256
  : selectedSectoralScopes === null || selectedSectoralScopes === void 0 ? void 0 : selectedSectoralScopes.map(function (val) {
14247
14257
  if (val in SectoralScope) {
14248
14258
  var key = val;
@@ -14314,24 +14324,6 @@ var ProgrammeCreationComponent = function (props) {
14314
14324
  React.createElement("div", { className: "yes-no-radio-container" },
14315
14325
  React.createElement(Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14316
14326
  return onClickIncludedInNDCScope(false);
14317
- } }, t("addProgramme:no"))))))),
14318
- React.createElement(Col, { md: 24, xl: 12, className: "in-nap-col" },
14319
- React.createElement(Row, { className: "in-nap-row" },
14320
- React.createElement(Col, { md: 16, lg: 18, xl: 18 },
14321
- React.createElement("div", { className: "included-label" },
14322
- React.createElement("div", null, t("addProgramme:inNAP")),
14323
- React.createElement("div", { className: "info-container" },
14324
- React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("addProgramme:inNAPToolTip"), overlayClassName: "custom-tooltip" },
14325
- React.createElement(InfoCircle, { color: "#000000", size: 17 }))))),
14326
- React.createElement(Col, { md: 8, lg: 6, xl: 6, className: "included-val" },
14327
- React.createElement(Radio.Group, { size: "middle", onChange: onInCludedNAPChange, value: includedInNAP },
14328
- React.createElement("div", { className: "yes-no-radio-container" },
14329
- React.createElement(Radio.Button, { className: "yes-no-radio", value: true, onClick: function () {
14330
- return onClickIncludedInNAPScope(true);
14331
- } }, t("addProgramme:yes"))),
14332
- React.createElement("div", { className: "yes-no-radio-container" },
14333
- React.createElement(Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14334
- return onClickIncludedInNAPScope(false);
14335
14327
  } }, t("addProgramme:no")))))))),
14336
14328
  React.createElement("div", { className: "steps-actions" },
14337
14329
  React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onClick: checkOrgPercentageValidation }, t("addProgramme:next"))))))),
@@ -15882,6 +15874,17 @@ var InvestmentCreationComponent = function (props) {
15882
15874
  },
15883
15875
  ] },
15884
15876
  React.createElement(Input, { size: "large" })))))),
15877
+ instrument &&
15878
+ instrument.indexOf(Instrument.INKIND) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
15879
+ React.createElement(Col, { xl: 12, md: 24 },
15880
+ React.createElement("div", { className: "details-part-two" },
15881
+ React.createElement(Form.Item, { label: t("programme:description"), name: "description", rules: [
15882
+ {
15883
+ required: false,
15884
+ message: "",
15885
+ },
15886
+ ] },
15887
+ React.createElement(Input, { size: "large" })))))),
15885
15888
  instrument &&
15886
15889
  instrument.indexOf(Instrument.OTHER) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
15887
15890
  React.createElement(Col, { xl: 12, md: 24 },
@@ -17037,28 +17040,51 @@ var NdcActionManagementComponent = function (props) {
17037
17040
  } })))))));
17038
17041
  };
17039
17042
 
17040
- var css_248z$5 = ".ndc-action-details-container Input {\n height: 40px; }\n\n.ndc-action-details-container .ant-select-selection-item {\n color: #949599 !important; }\n\n.ndc-action-details-container .ant-select-dropdown {\n font-family: \"Inter\";\n color: #949599 !important; }\n\n.ndc-action-details-container .ant-select-selector {\n color: #949599 !important; }\n\n.ndc-action-details-container .label-heading {\n font-family: \"Inter\";\n font-style: normal;\n font-weight: 600;\n font-size: 14px;\n line-height: 22px;\n color: rgba(58, 53, 65, 0.5);\n margin-bottom: 5px; }\n\n.ndc-action-details-container .steps-actions {\n display: flex;\n flex-direction: row-reverse; }\n .ndc-action-details-container .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n\n.ndc-action-details-container .upload-doc {\n height: 40px !important;\n margin-right: 240px; }\n\n.ndc-action-details-container .ant-upload-list-item {\n border-radius: 5px !important;\n height: 40px !important; }\n\n.ndc-action-details-container .design-upload-section {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: start;\n width: 100%; }\n .ndc-action-details-container .design-upload-section .icon-color {\n color: #16b1ff !important; }\n .ndc-action-details-container .design-upload-section .ant-upload {\n width: 20%; }\n .ndc-action-details-container .design-upload-section .ant-upload-list {\n align-items: center;\n justify-content: center;\n width: 75%; }\n .ndc-action-details-container .design-upload-section .ant-upload-list .ant-upload-list-item {\n margin-top: 0; }\n";
17043
+ var css_248z$5 = ".ndc-action-details-container Input {\n height: 40px; }\n\n.ndc-action-details-container .in-nap-col {\n width: 100%; }\n\n.ndc-action-details-container .included-nap-col {\n width: 40%;\n display: flex; }\n .ndc-action-details-container .included-nap-col .in-nap-row {\n width: 100%;\n align-items: center; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-label {\n display: flex;\n flex-direction: row;\n width: fit-content;\n align-items: center;\n justify-content: space-between;\n font-size: 14px;\n color: rgba(58, 53, 65, 0.5); }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-label .info-container {\n display: flex;\n flex-direction: row;\n width: 10%;\n height: 30px;\n align-items: center;\n justify-content: flex-end; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val {\n width: 100%; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .yes-no-radio-container {\n width: 43%;\n text-align: center; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .yes-no-radio-container .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {\n color: #ffffff !important;\n border-color: #9155fd !important;\n box-shadow: none;\n border-radius: 4px; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .ant-radio-button-wrapper::before {\n background-color: transparent;\n border-radius: 4px; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n color: #8c8c8c; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .anticon {\n margin-right: 0.5rem; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .yes-no-radio {\n width: 100%; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .yes-no-radio .ant-radio-button-checked {\n background: #9155fd;\n color: #ffffff; }\n\n.ndc-action-details-container .row-custom-1 {\n display: flex;\n margin-bottom: 2px; }\n\n.ndc-action-details-container .row-custom {\n display: flex;\n width: 200px;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem; }\n .ndc-action-details-container .row-custom .ant-input-number {\n height: 35px;\n display: flex;\n align-items: center;\n justify-content: center; }\n\n.ndc-action-details-container .enablement-type-item {\n display: flex;\n width: 100%; }\n .ndc-action-details-container .enablement-type-item .ant-form-item-row {\n display: flex;\n width: 100%; }\n .ndc-action-details-container .enablement-type-item .ant-checkbox-wrapper {\n color: rgba(58, 53, 65, 0.5);\n font-size: 14px; }\n .ndc-action-details-container .enablement-type-item .type-checkbox-grp {\n display: flex;\n width: 100%; }\n .ndc-action-details-container .enablement-type-item .type-checkbox-grp .grp-row {\n display: flex;\n width: 100%; }\n\n.ndc-action-details-container .ant-select-selection-item {\n color: #949599 !important; }\n\n.ndc-action-details-container .ant-select-dropdown {\n font-family: \"Inter\";\n color: #949599 !important; }\n\n.ndc-action-details-container .ant-select-selector {\n color: #949599 !important; }\n\n.ndc-action-details-container .label-heading {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-size: 14px;\n line-height: 22px;\n color: rgba(58, 53, 65, 0.5);\n margin-bottom: 5px; }\n\n.ndc-action-details-container .steps-actions {\n display: flex;\n flex-direction: row-reverse; }\n .ndc-action-details-container .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n\n.ndc-action-details-container .upload-doc {\n height: 40px !important;\n margin-right: 240px; }\n\n.ndc-action-details-container .ant-upload-list-item {\n border-radius: 5px !important;\n height: 40px !important; }\n\n.ndc-action-details-container .design-upload-section {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: start;\n width: 100%; }\n .ndc-action-details-container .design-upload-section .icon-color {\n color: #16b1ff !important; }\n .ndc-action-details-container .design-upload-section .ant-upload {\n width: 20%; }\n .ndc-action-details-container .design-upload-section .ant-upload-list {\n align-items: center;\n justify-content: center;\n width: 75%; }\n .ndc-action-details-container .design-upload-section .ant-upload-list .ant-upload-list-item {\n margin-top: 0; }\n";
17041
17044
  styleInject(css_248z$5);
17042
17045
 
17046
+ var EnablementTypes;
17047
+ (function (EnablementTypes) {
17048
+ EnablementTypes["CapacityBuilding"] = "Capacity Building";
17049
+ EnablementTypes["InstitutionalArrangement"] = "Institutional Arrangement";
17050
+ EnablementTypes["StakeholderFramework"] = "Stakeholder Framework";
17051
+ EnablementTypes["TechnologyTransfer"] = "Technology Transfer";
17052
+ })(EnablementTypes || (EnablementTypes = {}));
17053
+ var enablementTypesAndValues = [
17054
+ { type: EnablementTypes.CapacityBuilding.valueOf(), col: 4 },
17055
+ {
17056
+ type: EnablementTypes.InstitutionalArrangement.valueOf(),
17057
+ col: 5,
17058
+ },
17059
+ { type: EnablementTypes.StakeholderFramework.valueOf(), col: 5 },
17060
+ { type: EnablementTypes.TechnologyTransfer.valueOf(), col: 4 },
17061
+ ];
17062
+
17043
17063
  var NdcActionDetails = function (props) {
17044
17064
  var isBackBtnVisible = props.isBackBtnVisible, onFormSubmit = props.onFormSubmit, ndcActionDetails = props.ndcActionDetails, translator = props.translator, programmeDetails = props.programmeDetails, onClickedBackBtn = props.onClickedBackBtn;
17065
+ translator.setDefaultNamespace("ndcAction");
17066
+ var t = translator.t;
17045
17067
  var _a = useState(), ndcActionType = _a[0], setNdcActionType = _a[1];
17046
17068
  var _b = useState(), mitigationType = _b[0], setmitigationType = _b[1];
17047
17069
  var _c = useState(""), sector = _c[0], setSector = _c[1];
17048
17070
  var _d = useState(ndcActionTypeList), ndcActionTypeListFiltered = _d[0]; _d[1];
17071
+ var _e = useState([]), checkedOptionsGhgReduced = _e[0], setCheckedOptionsGhgReduced = _e[1];
17072
+ var _f = useState([]), checkedOptionsGhgAvoided = _f[0], setCheckedOptionsGhgAvoided = _f[1];
17073
+ var _g = useState(), inputNumberValueGhgAvoidedGas = _g[0], setInputNumberValueGhgAvoidedGas = _g[1];
17074
+ var _h = useState(), inputNumberValueGhgReducedGas = _h[0], setInputNumberValueGhgReducedGas = _h[1];
17075
+ var _j = useState(), includedInNAP = _j[0], setIncludedInNAP = _j[1];
17049
17076
  var form = Form.useForm()[0];
17050
- translator.setDefaultNamespace('ndcAction');
17051
- var t = translator.t;
17052
17077
  var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
17053
17078
  ? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
17054
17079
  : 5000000;
17080
+ var ghgEmissionsGas = ["CO2", "CH4", "N20", "HFCs", "PFCs", "SF6"];
17055
17081
  useEffect(function () {
17056
17082
  if (programmeDetails) {
17057
17083
  setSector(programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector);
17058
17084
  }
17059
17085
  }, [programmeDetails]);
17060
17086
  useEffect(function () {
17061
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
17087
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
17062
17088
  if (ndcActionDetails) {
17063
17089
  if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) {
17064
17090
  setNdcActionType(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action);
@@ -17066,6 +17092,15 @@ var NdcActionDetails = function (props) {
17066
17092
  if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation) {
17067
17093
  setmitigationType(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation);
17068
17094
  }
17095
+ if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.includedInNAP) {
17096
+ setIncludedInNAP(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.includedInNAP);
17097
+ }
17098
+ if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgAvoidedGas) {
17099
+ setInputNumberValueGhgAvoidedGas(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgAvoidedGas);
17100
+ }
17101
+ if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgReducedGas) {
17102
+ setInputNumberValueGhgReducedGas(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgReducedGas);
17103
+ }
17069
17104
  form.setFieldsValue({
17070
17105
  ndcActionType: ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action,
17071
17106
  mitigationType: ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation,
@@ -17078,8 +17113,9 @@ var NdcActionDetails = function (props) {
17078
17113
  nationalPlanObjectives: (_g = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _g === void 0 ? void 0 : _g.nationalPlanObjectives,
17079
17114
  nationalPlanCoverage: (_h = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _h === void 0 ? void 0 : _h.nationalPlanCoverage,
17080
17115
  EnablementTitle: (_j = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.enablementProperties) === null || _j === void 0 ? void 0 : _j.title,
17116
+ EnablementType: (_k = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.enablementProperties) === null || _k === void 0 ? void 0 : _k.type,
17081
17117
  EnablementReport: ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.enablementReportData,
17082
- userEstimatedCredits: (_k = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.ndcFinancing) === null || _k === void 0 ? void 0 : _k.userEstimatedCredits,
17118
+ userEstimatedCredits: (_l = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.ndcFinancing) === null || _l === void 0 ? void 0 : _l.userEstimatedCredits,
17083
17119
  methodologyEstimatedCredits: 0,
17084
17120
  });
17085
17121
  }
@@ -17193,9 +17229,9 @@ var NdcActionDetails = function (props) {
17193
17229
  case 0:
17194
17230
  ndcActionDetailObj = {};
17195
17231
  ndcActionDetailObj.action = ndcActionFormvalues.ndcActionType;
17196
- ndcActionDetailObj.methodology = t("ndcAction:goldStandard");
17197
17232
  if (ndcActionFormvalues.ndcActionType === NdcActionTypes.Mitigation ||
17198
17233
  ndcActionFormvalues.ndcActionType === NdcActionTypes.CrossCutting) {
17234
+ ndcActionDetailObj.methodology = t("ndcAction:goldStandard");
17199
17235
  ndcActionDetailObj.typeOfMitigation = ndcActionFormvalues.mitigationType;
17200
17236
  if (ndcActionFormvalues.mitigationType === MitigationTypes.AGRICULTURE) {
17201
17237
  ndcActionDetailObj.agricultureProperties = {
@@ -17243,11 +17279,29 @@ var NdcActionDetails = function (props) {
17243
17279
  nationalPlanObjectives: ndcActionFormvalues.nationalPlanObjectives,
17244
17280
  nationalPlanCoverage: ndcActionFormvalues.nationalPlanCoverage,
17245
17281
  };
17282
+ if (includedInNAP === true || includedInNAP === false) {
17283
+ ndcActionDetailObj.adaptationProperties.includedInNAP = includedInNAP;
17284
+ }
17285
+ if (inputNumberValueGhgAvoidedGas !== null ||
17286
+ inputNumberValueGhgAvoidedGas !== undefined) {
17287
+ ndcActionDetailObj.adaptationProperties.ghgEmissionsAvoided =
17288
+ inputNumberValueGhgAvoidedGas;
17289
+ }
17290
+ if (inputNumberValueGhgReducedGas !== null ||
17291
+ inputNumberValueGhgReducedGas !== undefined) {
17292
+ ndcActionDetailObj.adaptationProperties.ghgEmissionsReduced =
17293
+ inputNumberValueGhgReducedGas;
17294
+ }
17246
17295
  }
17247
17296
  if (!(ndcActionFormvalues.ndcActionType === NdcActionTypes.Enablement)) return [3 /*break*/, 3];
17248
17297
  ndcActionDetailObj.enablementProperties = {
17249
17298
  title: ndcActionFormvalues.EnablementTitle,
17250
17299
  };
17300
+ if (ndcActionFormvalues.EnablementType &&
17301
+ ndcActionFormvalues.EnablementType.length > 0) {
17302
+ ndcActionDetailObj.enablementProperties.type =
17303
+ ndcActionFormvalues.EnablementType;
17304
+ }
17251
17305
  if (!(ndcActionFormvalues.EnablementReport &&
17252
17306
  ndcActionFormvalues.EnablementReport.length > 0)) return [3 /*break*/, 2];
17253
17307
  return [4 /*yield*/, getBase64((_a = ndcActionFormvalues.EnablementReport[0]) === null || _a === void 0 ? void 0 : _a.originFileObj)];
@@ -17279,6 +17333,23 @@ var NdcActionDetails = function (props) {
17279
17333
  }
17280
17334
  return e === null || e === void 0 ? void 0 : e.fileList;
17281
17335
  };
17336
+ var onClickIncludedInNAPScope = function (value) {
17337
+ if (value === includedInNAP) {
17338
+ setIncludedInNAP(undefined);
17339
+ }
17340
+ else {
17341
+ setIncludedInNAP(value);
17342
+ }
17343
+ };
17344
+ var onInCludedNAPChange = function (event) {
17345
+ var _a, _b;
17346
+ if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNAP") {
17347
+ setIncludedInNAP(true);
17348
+ }
17349
+ else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNAP") {
17350
+ setIncludedInNAP(false);
17351
+ }
17352
+ };
17282
17353
  return (React.createElement("div", { className: "ndc-action-details-container" },
17283
17354
  React.createElement(Form, { name: "ndcActionDetails", layout: "vertical", requiredMark: true, onFinish: onNdcActionDetailsFormSubmit, form: form },
17284
17355
  React.createElement(Row, { justify: "start", align: "middle" },
@@ -17292,40 +17363,42 @@ var NdcActionDetails = function (props) {
17292
17363
  React.createElement(Select, { size: "large", onChange: handleNdcActionChange, style: {
17293
17364
  width: "249px",
17294
17365
  borderRadius: "4px",
17295
- }, dropdownStyle: { color: "red" }, options: ndcActionTypeListFiltered }))),
17296
- React.createElement(Col, { style: { marginLeft: "38px" } },
17297
- React.createElement(Form.Item, { label: t("ndcAction:methodology"), name: "methodology" },
17298
- React.createElement("span", { style: {
17299
- display: "inline-block",
17300
- border: "1px solid #D9D9D9",
17301
- width: "154px",
17302
- height: "38px",
17303
- borderRadius: "4px",
17304
- padding: "7px 8px",
17305
- fontSize: "14px",
17306
- backgroundColor: "#F0F0F0",
17307
- color: "#8C8C8C",
17308
- } },
17309
- " ",
17310
- t("ndcAction:goldStandard"))))),
17366
+ }, dropdownStyle: { color: "red" }, options: ndcActionTypeListFiltered })))),
17311
17367
  ndcActionType === NdcActionTypes.CrossCutting && (React.createElement(Row, null,
17312
17368
  React.createElement("label", { className: "label-heading" }, t("ndcAction:mitigation")))),
17313
17369
  (ndcActionType === NdcActionTypes.Mitigation ||
17314
- ndcActionType === NdcActionTypes.CrossCutting) && (React.createElement(Row, { justify: "start", align: "middle" },
17315
- React.createElement(Form.Item, { label: t("ndcAction:mitigationType"), name: "mitigationType", rules: [
17316
- {
17317
- required: true,
17318
- message: "".concat(t("ndcAction:mitigationType"), " ").concat(t("ndcAction:isRequired")),
17319
- },
17320
- ] },
17321
- React.createElement(Select, { size: "large", onChange: handleMitigationTypeChange, style: {
17322
- width: "249px",
17323
- borderRadius: "4px",
17324
- }, options: (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === Sector.Health ||
17325
- (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === Sector.Education ||
17326
- (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === Sector.Hospitality
17327
- ? mitigationTypeList
17328
- : sectorMitigationTypesListMapped[sector] })))),
17370
+ ndcActionType === NdcActionTypes.CrossCutting) && (React.createElement(React.Fragment, null,
17371
+ React.createElement(Row, { justify: "start", align: "middle" },
17372
+ React.createElement(Col, null,
17373
+ React.createElement(Form.Item, { label: t("ndcAction:mitigationType"), name: "mitigationType", rules: [
17374
+ {
17375
+ required: true,
17376
+ message: "".concat(t("ndcAction:mitigationType"), " ").concat(t("ndcAction:isRequired")),
17377
+ },
17378
+ ] },
17379
+ React.createElement(Select, { size: "large", onChange: handleMitigationTypeChange, style: {
17380
+ width: "249px",
17381
+ borderRadius: "4px",
17382
+ }, options: (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === Sector.Health ||
17383
+ (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === Sector.Education ||
17384
+ (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === Sector.Hospitality
17385
+ ? mitigationTypeList
17386
+ : sectorMitigationTypesListMapped[sector] }))),
17387
+ React.createElement(Col, { style: { marginLeft: "38px" } },
17388
+ React.createElement(Form.Item, { label: t("ndcAction:methodology"), name: "methodology" },
17389
+ React.createElement("span", { style: {
17390
+ display: "inline-block",
17391
+ border: "1px solid #D9D9D9",
17392
+ width: "154px",
17393
+ height: "38px",
17394
+ borderRadius: "4px",
17395
+ padding: "7px 8px",
17396
+ fontSize: "14px",
17397
+ backgroundColor: "#F0F0F0",
17398
+ color: "#8C8C8C",
17399
+ } },
17400
+ " ",
17401
+ t("ndcAction:goldStandard"))))))),
17329
17402
  (ndcActionType === NdcActionTypes.Mitigation ||
17330
17403
  ndcActionType === NdcActionTypes.CrossCutting) &&
17331
17404
  mitigationType === MitigationTypes.SOLAR && (React.createElement(React.Fragment, null,
@@ -17411,11 +17484,26 @@ var NdcActionDetails = function (props) {
17411
17484
  (ndcActionType === NdcActionTypes.Adaptation ||
17412
17485
  ndcActionType === NdcActionTypes.CrossCutting) && (React.createElement(React.Fragment, null,
17413
17486
  React.createElement(Row, { justify: "start", align: "middle" },
17414
- React.createElement(Form.Item, { label: t("ndcAction:implementingAgency"), name: "implementingAgency" },
17415
- React.createElement(Select, { style: { width: 442 }, size: "large", options: implementingAgencyList.map(function (item) { return ({
17416
- value: item,
17417
- label: item,
17418
- }); }) }))),
17487
+ React.createElement(Col, null,
17488
+ React.createElement(Form.Item, { label: t("ndcAction:implementingAgency"), name: "implementingAgency" },
17489
+ React.createElement(Select, { style: { width: 442 }, size: "large", options: implementingAgencyList.map(function (item) { return ({
17490
+ value: item,
17491
+ label: item,
17492
+ }); }) }))),
17493
+ React.createElement(Col, { style: { marginLeft: "38px" }, className: "included-nap-col" },
17494
+ React.createElement(Row, { className: "in-nap-row" },
17495
+ React.createElement(Col, { span: 9 },
17496
+ React.createElement("div", { className: "included-label" },
17497
+ React.createElement("div", null, t("ndcAction:inNAP")),
17498
+ React.createElement("div", { className: "info-container" },
17499
+ React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("ndcAction:inNAPToolTip"), overlayClassName: "custom-tooltip" },
17500
+ React.createElement(InfoCircle, { color: "#000000", size: 17 }))))),
17501
+ React.createElement(Col, { span: 8, className: "included-val" },
17502
+ React.createElement(Radio.Group, { size: "middle", onChange: onInCludedNAPChange, value: includedInNAP },
17503
+ React.createElement("div", { className: "yes-no-radio-container" },
17504
+ React.createElement(Radio.Button, { className: "yes-no-radio", value: true, onClick: function () { return onClickIncludedInNAPScope(true); } }, t("ndcAction:yes"))),
17505
+ React.createElement("div", { className: "yes-no-radio-container" },
17506
+ React.createElement(Radio.Button, { className: "yes-no-radio", value: false, onClick: function () { return onClickIncludedInNAPScope(false); } }, t("ndcAction:no")))))))),
17419
17507
  React.createElement(Row, { justify: "start", align: "middle" },
17420
17508
  React.createElement(Col, null,
17421
17509
  React.createElement(Form.Item, { label: t("ndcAction:nationalPlanObjectives"), name: "nationalPlanObjectives" },
@@ -17428,10 +17516,111 @@ var NdcActionDetails = function (props) {
17428
17516
  React.createElement(Select, { style: { width: 442 }, size: "large", options: nationalPlanCoverageList.map(function (item) { return ({
17429
17517
  value: item,
17430
17518
  label: item,
17431
- }); }) })))))),
17519
+ }); }) })))),
17520
+ React.createElement(Row, { justify: "start", align: "middle" },
17521
+ React.createElement(Col, null,
17522
+ React.createElement(Form.Item, { label: t("ndcAction:ghgEmiReduced"), name: "ghgEmissionsReduced", style: { width: 442 }, rules: [
17523
+ {
17524
+ required: true,
17525
+ validateTrigger: "onBlur",
17526
+ validator: function (rule, value) {
17527
+ if (!value || value.length === 0) {
17528
+ return Promise.reject("".concat(t("ndcAction:ghgEmiReduced"), " ").concat(t("ndcAction:isRequired")));
17529
+ }
17530
+ var isMissingValue = false;
17531
+ value === null || value === void 0 ? void 0 : value.map(function (item) {
17532
+ if (inputNumberValueGhgReducedGas === undefined ||
17533
+ !inputNumberValueGhgReducedGas[item]) {
17534
+ isMissingValue = true;
17535
+ }
17536
+ });
17537
+ if (isMissingValue) {
17538
+ return Promise.reject("".concat(t("ndcAction:value"), " ").concat(t("ndcAction:isRequired")));
17539
+ }
17540
+ return Promise.resolve();
17541
+ },
17542
+ },
17543
+ ] },
17544
+ React.createElement(Checkbox.Group, null, ghgEmissionsGas.map(function (option, i) { return (React.createElement("div", { key: option, className: "row-custom" },
17545
+ React.createElement(Checkbox, { value: option, checked: checkedOptionsGhgReduced.includes(option), onChange: function (e) {
17546
+ var _a, _b;
17547
+ if ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.checked) {
17548
+ setCheckedOptionsGhgReduced(__spreadArray(__spreadArray([], checkedOptionsGhgReduced, true), [
17549
+ option,
17550
+ ], false));
17551
+ }
17552
+ else if (!((_b = e === null || e === void 0 ? void 0 : e.target) === null || _b === void 0 ? void 0 : _b.checked)) {
17553
+ var reducedGasAndVal = inputNumberValueGhgReducedGas;
17554
+ if (reducedGasAndVal &&
17555
+ reducedGasAndVal[option]) {
17556
+ delete reducedGasAndVal[option];
17557
+ }
17558
+ setInputNumberValueGhgReducedGas(reducedGasAndVal);
17559
+ setCheckedOptionsGhgReduced(__spreadArray([], checkedOptionsGhgReduced.filter(function (value) { return value !== option; }), true));
17560
+ }
17561
+ } }, option),
17562
+ React.createElement(InputNumber, { value: inputNumberValueGhgReducedGas &&
17563
+ inputNumberValueGhgReducedGas[option]
17564
+ ? inputNumberValueGhgReducedGas[option]
17565
+ : null, size: "small", min: 0, disabled: !checkedOptionsGhgReduced.includes(option), onChange: function (e) {
17566
+ var _a;
17567
+ setInputNumberValueGhgReducedGas(__assign(__assign({}, inputNumberValueGhgReducedGas), (_a = {}, _a[option] = e, _a)));
17568
+ } }))); })))),
17569
+ React.createElement(Col, { style: { marginLeft: "38px" } },
17570
+ React.createElement(Form.Item, { label: t("ndcAction:ghgEmiAvoided"), name: "ghgEmissionsAvoided", style: { width: 442 }, rules: [
17571
+ {
17572
+ required: true,
17573
+ validateTrigger: "onBlur",
17574
+ validator: function (rule, value) {
17575
+ if (!value || value.length === 0) {
17576
+ return Promise.reject("".concat(t("ndcAction:ghgEmiAvoided"), " ").concat(t("ndcAction:isRequired")));
17577
+ }
17578
+ var isMissingValue = false;
17579
+ value === null || value === void 0 ? void 0 : value.map(function (item) {
17580
+ if (inputNumberValueGhgAvoidedGas === undefined ||
17581
+ !inputNumberValueGhgAvoidedGas[item]) {
17582
+ isMissingValue = true;
17583
+ }
17584
+ });
17585
+ if (isMissingValue) {
17586
+ return Promise.reject("".concat(t("ndcAction:value"), " ").concat(t("ndcAction:isRequired")));
17587
+ }
17588
+ return Promise.resolve();
17589
+ },
17590
+ },
17591
+ ] },
17592
+ React.createElement(Checkbox.Group, null, ghgEmissionsGas.map(function (option, i) { return (React.createElement("div", { key: option, className: "row-custom" },
17593
+ React.createElement(Checkbox, { value: option, checked: checkedOptionsGhgAvoided.includes(option), onChange: function (e) {
17594
+ var _a, _b;
17595
+ if ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.checked) {
17596
+ setCheckedOptionsGhgAvoided(__spreadArray(__spreadArray([], checkedOptionsGhgAvoided, true), [
17597
+ option,
17598
+ ], false));
17599
+ }
17600
+ else if (!((_b = e === null || e === void 0 ? void 0 : e.target) === null || _b === void 0 ? void 0 : _b.checked)) {
17601
+ var avaoidedGasAndVal = inputNumberValueGhgAvoidedGas;
17602
+ if (avaoidedGasAndVal &&
17603
+ avaoidedGasAndVal[option]) {
17604
+ delete avaoidedGasAndVal[option];
17605
+ }
17606
+ setInputNumberValueGhgAvoidedGas(avaoidedGasAndVal);
17607
+ setCheckedOptionsGhgAvoided(__spreadArray([], checkedOptionsGhgAvoided.filter(function (value) { return value !== option; }), true));
17608
+ }
17609
+ } }, option),
17610
+ React.createElement(InputNumber, { value: inputNumberValueGhgAvoidedGas &&
17611
+ inputNumberValueGhgAvoidedGas[option]
17612
+ ? inputNumberValueGhgAvoidedGas[option]
17613
+ : null, size: "small", min: 0, disabled: !checkedOptionsGhgAvoided.includes(option), onChange: function (e) {
17614
+ var _a;
17615
+ setInputNumberValueGhgAvoidedGas(__assign(__assign({}, inputNumberValueGhgAvoidedGas), (_a = {}, _a[option] = e, _a)));
17616
+ } }))); }))))))),
17432
17617
  ndcActionType === NdcActionTypes.Enablement && (React.createElement(React.Fragment, null,
17433
17618
  React.createElement(Form.Item, { label: t("ndcAction:title"), name: "EnablementTitle" },
17434
17619
  React.createElement(Input, { style: { width: 442 } })),
17620
+ React.createElement(Form.Item, { label: t("ndcAction:type"), name: "EnablementType", className: "enablement-type-item" },
17621
+ React.createElement(Checkbox.Group, { className: "type-checkbox-grp" },
17622
+ React.createElement(Row, { className: "grp-row" }, enablementTypesAndValues === null || enablementTypesAndValues === void 0 ? void 0 : enablementTypesAndValues.map(function (type) { return (React.createElement(Col, { lg: type.col, md: type.col + 1 },
17623
+ React.createElement(Checkbox, { value: type.type, style: { lineHeight: "32px" } }, type.type))); })))),
17435
17624
  React.createElement(Row, { justify: "space-between", align: "middle" },
17436
17625
  React.createElement(Form.Item, { label: t("ndcAction:report"), name: "EnablementReport", valuePropName: "fileList", getValueFromEvent: normFile, required: false, rules: [
17437
17626
  {
@@ -19805,7 +19994,6 @@ var AddNdcActionComponent = function (props) {
19805
19994
  if (ndcActionDetailsObj.enablementReportData) {
19806
19995
  delete ndcActionDetailsObj.enablementReportData;
19807
19996
  }
19808
- ndcActionDetailsObj.methodology = t("ndcAction:goldStandard");
19809
19997
  return [4 /*yield*/, post("national/programme/addNDCAction", ndcActionDetailsObj)];
19810
19998
  case 2:
19811
19999
  response = _a.sent();
@@ -19979,6 +20167,8 @@ var NdcActionViewComponent = function (props) {
19979
20167
  var _a;
19980
20168
  var _b, _c;
19981
20169
  var useUserContext = props.useUserContext, linkDocVisible = props.linkDocVisible, uploadDocUserPermission = props.uploadDocUserPermission, useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, translator = props.translator, sdgGoalImages = props.sdgGoalImages;
20170
+ translator.setDefaultNamespace("ndcAction");
20171
+ var t = translator.t;
19982
20172
  var userInfoState = useUserContext().userInfoState;
19983
20173
  var post = useConnection().post;
19984
20174
  var state = useLocation().state;
@@ -19991,8 +20181,6 @@ var NdcActionViewComponent = function (props) {
19991
20181
  var _k = useState([]), programmeOwnerId = _k[0], setProgrammeOwnerId = _k[1];
19992
20182
  var _l = useState(false), canUploadMonitorReport = _l[0], setCanUploadMonitorReport = _l[1];
19993
20183
  var _m = useState(false), monitoringReportAccepted = _m[0], setMonitoringReportAccepted = _m[1];
19994
- translator.setDefaultNamespace("ndcAction");
19995
- var t = translator.t;
19996
20184
  var getProgrammeById = function (programmeId) { return __awaiter(void 0, void 0, void 0, function () {
19997
20185
  var response, error_1;
19998
20186
  var _a, _b, _c;
@@ -20195,16 +20383,28 @@ var NdcActionViewComponent = function (props) {
20195
20383
  return mitigationDetails;
20196
20384
  };
20197
20385
  var getNdcActionAdaptationDetails = function () {
20386
+ var _a, _b, _c, _d;
20198
20387
  var adaptationDetails = {};
20199
20388
  if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) {
20200
20389
  adaptationDetails[t("ndcAction:viewAdaptationImplementingAgency")] =
20201
20390
  ndcActionDetails.adaptationProperties.implementingAgency;
20202
20391
  adaptationDetails[t("ndcAction:viewAdaptationNationalPlanObjectives")] =
20203
20392
  ndcActionDetails.adaptationProperties.nationalPlanObjectives;
20393
+ adaptationDetails[t("ndcAction:viewAdaptationNationalPlanCoverage")] =
20394
+ ndcActionDetails.adaptationProperties.nationalPlanCoverage;
20395
+ adaptationDetails[t("ndcAction:viewIncludedInNAP")] = ((_a = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _a === void 0 ? void 0 : _a.includedInNAP)
20396
+ ? "Yes"
20397
+ : ((_b = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _b === void 0 ? void 0 : _b.includedInNAP) === false
20398
+ ? "No"
20399
+ : "-";
20204
20400
  adaptationDetails[t("ndcAction:viewGhgEmissionsAvoided")] =
20205
- ndcActionDetails.adaptationProperties.ghgEmissionsAvoided;
20401
+ ((_c = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _c === void 0 ? void 0 : _c.ghgEmissionsAvoided)
20402
+ ? ndcActionDetails.adaptationProperties.ghgEmissionsAvoided
20403
+ : {};
20206
20404
  adaptationDetails[t("ndcAction:viewGhgEmissionsReduced")] =
20207
- ndcActionDetails.adaptationProperties.ghgEmissionsReduced;
20405
+ ((_d = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _d === void 0 ? void 0 : _d.ghgEmissionsReduced)
20406
+ ? ndcActionDetails.adaptationProperties.ghgEmissionsReduced
20407
+ : {};
20208
20408
  }
20209
20409
  return adaptationDetails;
20210
20410
  };
@@ -20614,5 +20814,5 @@ var StasticCard = function (props) {
20614
20814
  updatedDate !== '0' && React.createElement("div", { className: "updated-on" }, updatedDate)))));
20615
20815
  };
20616
20816
 
20617
- export { AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, BaseEntity, CarbonSystemType, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, ConfigurationSettingsType, CreditTransferStage, DocType, DocumentStatus, ESGType, EnergyGenerationUnits, FormElementType, Instrument, InvestmentCreationComponent, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LegendItem, Loading, MapComponent, MapTypes, MapboxComponent, MitigationTypes, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, NdcActionViewComponent, ProfileIcon, ProgrammeCreationComponent, ProgrammeEntity, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeStage, ProgrammeStageMRV, ProgrammeTransfer, ProgrammeViewComponent, RadioButtonStatus, RadioButtonStatus2, RetireType, Role, RoleIcon, SdgGoals$1 as SdgGoals, Sector, SectoralScope, StasticCard, Titles, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, addCommSep, addCommSepRound, addRoundNumber, addSpaces, consumerGroupList, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, isBase64, landAreaUnitList, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList };
20817
+ export { AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, BaseEntity, CarbonSystemType, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, ConfigurationSettingsType, CreditTransferStage, DocType, DocumentStatus, ESGType, EnergyGenerationUnits, FormElementType, InfoView, Instrument, InvestmentCreationComponent, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LegendItem, Loading, MapComponent, MapTypes, MapboxComponent, MitigationTypes, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, NdcActionViewComponent, ProfileIcon, ProgrammeCreationComponent, ProgrammeEntity, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeStage, ProgrammeStageMRV, ProgrammeTransfer, ProgrammeViewComponent, RadioButtonStatus, RadioButtonStatus2, RetireType, Role, RoleIcon, SdgGoals$1 as SdgGoals, Sector, SectoralScope, StasticCard, Titles, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, addCommSep, addCommSepRound, addRoundNumber, addSpaces, consumerGroupList, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, isBase64, landAreaUnitList, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList };
20618
20818
  //# sourceMappingURL=index.js.map