@undp/carbon-library 1.0.78 → 1.0.79

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -1021,6 +1021,7 @@ exports.Instrument = void 0;
1021
1021
  Instrument["GRANT"] = "Grant";
1022
1022
  Instrument["EQUITY"] = "Equity";
1023
1023
  Instrument["GUARANTEE"] = "Guarantee";
1024
+ Instrument["INKIND"] = "In-Kind";
1024
1025
  Instrument["OTHER"] = "Other";
1025
1026
  })(exports.Instrument || (exports.Instrument = {}));
1026
1027
 
@@ -5808,13 +5809,13 @@ var ProgrammeManagementComponent = function (props) {
5808
5809
  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";
5809
5810
  styleInject(css_248z$g);
5810
5811
 
5812
+ 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";
5813
+ styleInject(css_248z$f);
5814
+
5811
5815
  var dateTimeFormat = 'dd LLLL yyyy @ HH:mm';
5812
5816
  var dateFormat = 'dd LLLL yyyy';
5813
5817
  var creditUnit = 'ITMO';
5814
5818
 
5815
- 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";
5816
- styleInject(css_248z$f);
5817
-
5818
5819
  var InfoView = function (props) {
5819
5820
  var title = props.title, data = props.data, icon = props.icon, hiddenColumns = props.hiddenColumns;
5820
5821
  return (React.createElement("div", { className: "info-view" },
@@ -5822,14 +5823,20 @@ var InfoView = function (props) {
5822
5823
  React.createElement("span", { className: "title-icon" }, icon),
5823
5824
  React.createElement("span", { className: "title-text" }, title)),
5824
5825
  React.createElement("div", null, Object.keys(data).map(function (k) {
5826
+ var _a;
5825
5827
  if (hiddenColumns.indexOf(k) < 0) {
5826
5828
  return (React.createElement(antd.Row, { className: "field", key: k },
5827
5829
  React.createElement(antd.Col, { span: 12, className: "field-key" }, k),
5828
- React.createElement(antd.Col, { span: 12, className: "field-value" }, data[k] instanceof luxon.DateTime
5830
+ React.createElement(antd.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) {
5831
+ var key = _a[0]; _a[1];
5832
+ return (React.createElement("div", { className: "row" },
5833
+ React.createElement("div", { className: "key" }, key),
5834
+ React.createElement("div", { className: "data" }, data[k][key])));
5835
+ })) : (React.createElement("div", null, "-"))) : (React.createElement("span", null, data[k] instanceof luxon.DateTime
5829
5836
  ? data[k].toFormat(dateFormat)
5830
- : data[k] === '' || !data[k] || data[k] === 'NaN'
5831
- ? '-'
5832
- : data[k])));
5837
+ : data[k] === "" || !data[k] || data[k] === "NaN"
5838
+ ? "-"
5839
+ : data[k])))));
5833
5840
  }
5834
5841
  else {
5835
5842
  return null;
@@ -13555,17 +13562,17 @@ var ProgrammeCreationComponent = function (props) {
13555
13562
  var _j = React.useState(0), current = _j[0], setCurrent = _j[1];
13556
13563
  var _k = React.useState(false), isUpdate = _k[0]; _k[1];
13557
13564
  var _l = React.useState(), includedInNDC = _l[0], setIncludedInNDC = _l[1];
13558
- var _m = React.useState(), includedInNAP = _m[0], setIncludedInNAP = _m[1];
13559
- var _o = React.useState([]), countries = _o[0], setCountries = _o[1];
13560
- var _p = React.useState([]), organisationsList = _p[0], setOrganisationList = _p[1];
13561
- var _q = React.useState(""), userOrgTaxId = _q[0], setUserOrgTaxId = _q[1];
13562
- var _r = React.useState([]), regionsList = _r[0], setRegionsList = _r[1];
13563
- var _s = React.useState(); _s[0]; var setProgrammeDetailsObj = _s[1];
13564
- var _t = React.useState(), selectedOrgs = _t[0], setSelectedOrgs = _t[1];
13565
- var _u = React.useState(false), ownershipPercentageValidation = _u[0], setOwnershipPercentageValidation = _u[1];
13566
- var _v = React.useState(""), selectedSector = _v[0], setSelectedSector = _v[1];
13567
- var _w = React.useState([]); _w[0]; var setMinistrySectoralScope = _w[1];
13568
- var _x = React.useState([]), availableSecoralScope = _x[0], setAvailableSectoralScope = _x[1];
13565
+ var _m = React.useState([]), countries = _m[0], setCountries = _m[1];
13566
+ var _o = React.useState([]), organisationsList = _o[0], setOrganisationList = _o[1];
13567
+ var _p = React.useState(""), userOrgTaxId = _p[0], setUserOrgTaxId = _p[1];
13568
+ var _q = React.useState([]), regionsList = _q[0], setRegionsList = _q[1];
13569
+ var _r = React.useState(); _r[0]; var setProgrammeDetailsObj = _r[1];
13570
+ var _s = React.useState(), selectedOrgs = _s[0], setSelectedOrgs = _s[1];
13571
+ var _t = React.useState(false), ownershipPercentageValidation = _t[0], setOwnershipPercentageValidation = _t[1];
13572
+ var _u = React.useState(""), selectedSector = _u[0], setSelectedSector = _u[1];
13573
+ var _v = React.useState([]); _v[0]; var setMinistrySectoralScope = _v[1];
13574
+ var _w = React.useState([]), availableSecoralScope = _w[0], setAvailableSectoralScope = _w[1];
13575
+ var _x = React.useState([]), selectableSectoralScope = _x[0], setSelectableSectoralScope = _x[1];
13569
13576
  var _y = React.useState([]), availableSectar = _y[0], setAvailableSectar = _y[1];
13570
13577
  var initialOrganisationOwnershipValues = [
13571
13578
  {
@@ -13851,12 +13858,11 @@ var ProgrammeCreationComponent = function (props) {
13851
13858
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.MINISTRY
13852
13859
  ? __spreadArray([userOrgTaxId], proponentTxIds, true) : proponentTxIds,
13853
13860
  proponentPercentage: proponentPercentages,
13854
- 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 &&
13861
+ 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 &&
13855
13862
  (values === null || values === void 0 ? void 0 : values.ndcScope) !== null && {
13856
13863
  ndcScope: (values === null || values === void 0 ? void 0 : values.ndcScope) === "true" ? true : false,
13857
13864
  })), (includedInNDC !== undefined &&
13858
- includedInNDC !== null && { includedInNdc: includedInNDC })), (includedInNAP !== undefined &&
13859
- includedInNAP !== null && { includedInNap: includedInNAP })),
13865
+ includedInNDC !== null && { includedInNdc: includedInNDC })),
13860
13866
  };
13861
13867
  if ((logoUrls === null || logoUrls === void 0 ? void 0 : logoUrls.length) > 0) {
13862
13868
  programmeDetails.designDocument = logoUrls[1];
@@ -13966,14 +13972,6 @@ var ProgrammeCreationComponent = function (props) {
13966
13972
  setIncludedInNDC(value);
13967
13973
  }
13968
13974
  };
13969
- var onClickIncludedInNAPScope = function (value) {
13970
- if (value === includedInNAP) {
13971
- setIncludedInNAP(undefined);
13972
- }
13973
- else {
13974
- setIncludedInNAP(value);
13975
- }
13976
- };
13977
13975
  var onChangeGeoLocation = function (values) {
13978
13976
  if (values.includes("National")) {
13979
13977
  var buyerCountryValues = regionsList;
@@ -13981,15 +13979,6 @@ var ProgrammeCreationComponent = function (props) {
13981
13979
  formOne.setFieldValue("geographicalLocation", __spreadArray([], newBuyerValues, true));
13982
13980
  }
13983
13981
  };
13984
- var onInCludedNAPChange = function (event) {
13985
- var _a, _b;
13986
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNAP") {
13987
- setIncludedInNAP(true);
13988
- }
13989
- else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNAP") {
13990
- setIncludedInNAP(false);
13991
- }
13992
- };
13993
13982
  var onInCludedNDCChange = function (event) {
13994
13983
  var _a, _b;
13995
13984
  if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNDC") {
@@ -14019,8 +14008,29 @@ var ProgrammeCreationComponent = function (props) {
14019
14008
  setSelectedSector(String(val));
14020
14009
  };
14021
14010
  React.useEffect(function () {
14022
- getOrganisationsDetails();
14023
- }, []);
14011
+ if (selectedSector !== "" &&
14012
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) {
14013
+ formOne.setFieldValue("sectoralScope", "");
14014
+ if (selectedSector === String(exports.Sector.Health) ||
14015
+ selectedSector === String(exports.Sector.Education) ||
14016
+ selectedSector === String(exports.Sector.Hospitality)) {
14017
+ setSelectableSectoralScope(availableSecoralScope);
14018
+ }
14019
+ else {
14020
+ var sScopes_1 = [];
14021
+ availableSecoralScope === null || availableSecoralScope === void 0 ? void 0 : availableSecoralScope.map(function (sectoralScope) {
14022
+ var _a;
14023
+ if ((_a = sectoralScopes[selectedSector]) === null || _a === void 0 ? void 0 : _a.includes(sectoralScope === null || sectoralScope === void 0 ? void 0 : sectoralScope.key)) {
14024
+ sScopes_1.push(sectoralScope);
14025
+ }
14026
+ });
14027
+ setSelectableSectoralScope(__spreadArray([], sScopes_1, true));
14028
+ }
14029
+ }
14030
+ else if (selectedSector !== "") {
14031
+ formOne.setFieldValue("sectoralScope", "");
14032
+ }
14033
+ }, [selectedSector]);
14024
14034
  return (React.createElement("div", { className: "add-programme-main-container" },
14025
14035
  React.createElement("div", { className: "title-container" },
14026
14036
  React.createElement("div", { className: "main" }, isUpdate
@@ -14262,7 +14272,7 @@ var ProgrammeCreationComponent = function (props) {
14262
14272
  ] },
14263
14273
  React.createElement(antd.Select, { size: "large" }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
14264
14274
  exports.CompanyRole.MINISTRY
14265
- ? availableSecoralScope === null || availableSecoralScope === void 0 ? void 0 : availableSecoralScope.map(function (item) { return (React.createElement(antd.Select.Option, { key: item.value, value: item.value }, item.key)); })
14275
+ ? selectableSectoralScope === null || selectableSectoralScope === void 0 ? void 0 : selectableSectoralScope.map(function (item) { return (React.createElement(antd.Select.Option, { key: item.value, value: item.value }, item.key)); })
14266
14276
  : selectedSectoralScopes === null || selectedSectoralScopes === void 0 ? void 0 : selectedSectoralScopes.map(function (val) {
14267
14277
  if (val in exports.SectoralScope) {
14268
14278
  var key = val;
@@ -14334,24 +14344,6 @@ var ProgrammeCreationComponent = function (props) {
14334
14344
  React.createElement("div", { className: "yes-no-radio-container" },
14335
14345
  React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14336
14346
  return onClickIncludedInNDCScope(false);
14337
- } }, t("addProgramme:no"))))))),
14338
- React.createElement(antd.Col, { md: 24, xl: 12, className: "in-nap-col" },
14339
- React.createElement(antd.Row, { className: "in-nap-row" },
14340
- React.createElement(antd.Col, { md: 16, lg: 18, xl: 18 },
14341
- React.createElement("div", { className: "included-label" },
14342
- React.createElement("div", null, t("addProgramme:inNAP")),
14343
- React.createElement("div", { className: "info-container" },
14344
- React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("addProgramme:inNAPToolTip"), overlayClassName: "custom-tooltip" },
14345
- React.createElement(Icon.InfoCircle, { color: "#000000", size: 17 }))))),
14346
- React.createElement(antd.Col, { md: 8, lg: 6, xl: 6, className: "included-val" },
14347
- React.createElement(antd.Radio.Group, { size: "middle", onChange: onInCludedNAPChange, value: includedInNAP },
14348
- React.createElement("div", { className: "yes-no-radio-container" },
14349
- React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: true, onClick: function () {
14350
- return onClickIncludedInNAPScope(true);
14351
- } }, t("addProgramme:yes"))),
14352
- React.createElement("div", { className: "yes-no-radio-container" },
14353
- React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14354
- return onClickIncludedInNAPScope(false);
14355
14347
  } }, t("addProgramme:no")))))))),
14356
14348
  React.createElement("div", { className: "steps-actions" },
14357
14349
  React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onClick: checkOrgPercentageValidation }, t("addProgramme:next"))))))),
@@ -15902,6 +15894,17 @@ var InvestmentCreationComponent = function (props) {
15902
15894
  },
15903
15895
  ] },
15904
15896
  React.createElement(antd.Input, { size: "large" })))))),
15897
+ instrument &&
15898
+ instrument.indexOf(exports.Instrument.INKIND) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
15899
+ React.createElement(antd.Col, { xl: 12, md: 24 },
15900
+ React.createElement("div", { className: "details-part-two" },
15901
+ React.createElement(antd.Form.Item, { label: t("programme:description"), name: "description", rules: [
15902
+ {
15903
+ required: false,
15904
+ message: "",
15905
+ },
15906
+ ] },
15907
+ React.createElement(antd.Input, { size: "large" })))))),
15905
15908
  instrument &&
15906
15909
  instrument.indexOf(exports.Instrument.OTHER) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
15907
15910
  React.createElement(antd.Col, { xl: 12, md: 24 },
@@ -17057,28 +17060,51 @@ var NdcActionManagementComponent = function (props) {
17057
17060
  } })))))));
17058
17061
  };
17059
17062
 
17060
- 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";
17063
+ 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";
17061
17064
  styleInject(css_248z$5);
17062
17065
 
17066
+ var EnablementTypes;
17067
+ (function (EnablementTypes) {
17068
+ EnablementTypes["CapacityBuilding"] = "Capacity Building";
17069
+ EnablementTypes["InstitutionalArrangement"] = "Institutional Arrangement";
17070
+ EnablementTypes["StakeholderFramework"] = "Stakeholder Framework";
17071
+ EnablementTypes["TechnologyTransfer"] = "Technology Transfer";
17072
+ })(EnablementTypes || (EnablementTypes = {}));
17073
+ var enablementTypesAndValues = [
17074
+ { type: EnablementTypes.CapacityBuilding.valueOf(), col: 4 },
17075
+ {
17076
+ type: EnablementTypes.InstitutionalArrangement.valueOf(),
17077
+ col: 5,
17078
+ },
17079
+ { type: EnablementTypes.StakeholderFramework.valueOf(), col: 5 },
17080
+ { type: EnablementTypes.TechnologyTransfer.valueOf(), col: 4 },
17081
+ ];
17082
+
17063
17083
  var NdcActionDetails = function (props) {
17064
17084
  var isBackBtnVisible = props.isBackBtnVisible, onFormSubmit = props.onFormSubmit, ndcActionDetails = props.ndcActionDetails, translator = props.translator, programmeDetails = props.programmeDetails, onClickedBackBtn = props.onClickedBackBtn;
17085
+ translator.setDefaultNamespace("ndcAction");
17086
+ var t = translator.t;
17065
17087
  var _a = React.useState(), ndcActionType = _a[0], setNdcActionType = _a[1];
17066
17088
  var _b = React.useState(), mitigationType = _b[0], setmitigationType = _b[1];
17067
17089
  var _c = React.useState(""), sector = _c[0], setSector = _c[1];
17068
17090
  var _d = React.useState(ndcActionTypeList), ndcActionTypeListFiltered = _d[0]; _d[1];
17091
+ var _e = React.useState([]), checkedOptionsGhgReduced = _e[0], setCheckedOptionsGhgReduced = _e[1];
17092
+ var _f = React.useState([]), checkedOptionsGhgAvoided = _f[0], setCheckedOptionsGhgAvoided = _f[1];
17093
+ var _g = React.useState(), inputNumberValueGhgAvoidedGas = _g[0], setInputNumberValueGhgAvoidedGas = _g[1];
17094
+ var _h = React.useState(), inputNumberValueGhgReducedGas = _h[0], setInputNumberValueGhgReducedGas = _h[1];
17095
+ var _j = React.useState(), includedInNAP = _j[0], setIncludedInNAP = _j[1];
17069
17096
  var form = antd.Form.useForm()[0];
17070
- translator.setDefaultNamespace('ndcAction');
17071
- var t = translator.t;
17072
17097
  var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
17073
17098
  ? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
17074
17099
  : 5000000;
17100
+ var ghgEmissionsGas = ["CO2", "CH4", "N20", "HFCs", "PFCs", "SF6"];
17075
17101
  React.useEffect(function () {
17076
17102
  if (programmeDetails) {
17077
17103
  setSector(programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector);
17078
17104
  }
17079
17105
  }, [programmeDetails]);
17080
17106
  React.useEffect(function () {
17081
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
17107
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
17082
17108
  if (ndcActionDetails) {
17083
17109
  if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) {
17084
17110
  setNdcActionType(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action);
@@ -17086,6 +17112,15 @@ var NdcActionDetails = function (props) {
17086
17112
  if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation) {
17087
17113
  setmitigationType(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation);
17088
17114
  }
17115
+ if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.includedInNAP) {
17116
+ setIncludedInNAP(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.includedInNAP);
17117
+ }
17118
+ if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgAvoidedGas) {
17119
+ setInputNumberValueGhgAvoidedGas(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgAvoidedGas);
17120
+ }
17121
+ if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgReducedGas) {
17122
+ setInputNumberValueGhgReducedGas(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgReducedGas);
17123
+ }
17089
17124
  form.setFieldsValue({
17090
17125
  ndcActionType: ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action,
17091
17126
  mitigationType: ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation,
@@ -17098,8 +17133,9 @@ var NdcActionDetails = function (props) {
17098
17133
  nationalPlanObjectives: (_g = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _g === void 0 ? void 0 : _g.nationalPlanObjectives,
17099
17134
  nationalPlanCoverage: (_h = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _h === void 0 ? void 0 : _h.nationalPlanCoverage,
17100
17135
  EnablementTitle: (_j = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.enablementProperties) === null || _j === void 0 ? void 0 : _j.title,
17136
+ EnablementType: (_k = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.enablementProperties) === null || _k === void 0 ? void 0 : _k.type,
17101
17137
  EnablementReport: ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.enablementReportData,
17102
- userEstimatedCredits: (_k = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.ndcFinancing) === null || _k === void 0 ? void 0 : _k.userEstimatedCredits,
17138
+ userEstimatedCredits: (_l = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.ndcFinancing) === null || _l === void 0 ? void 0 : _l.userEstimatedCredits,
17103
17139
  methodologyEstimatedCredits: 0,
17104
17140
  });
17105
17141
  }
@@ -17213,9 +17249,9 @@ var NdcActionDetails = function (props) {
17213
17249
  case 0:
17214
17250
  ndcActionDetailObj = {};
17215
17251
  ndcActionDetailObj.action = ndcActionFormvalues.ndcActionType;
17216
- ndcActionDetailObj.methodology = t("ndcAction:goldStandard");
17217
17252
  if (ndcActionFormvalues.ndcActionType === exports.NdcActionTypes.Mitigation ||
17218
17253
  ndcActionFormvalues.ndcActionType === exports.NdcActionTypes.CrossCutting) {
17254
+ ndcActionDetailObj.methodology = t("ndcAction:goldStandard");
17219
17255
  ndcActionDetailObj.typeOfMitigation = ndcActionFormvalues.mitigationType;
17220
17256
  if (ndcActionFormvalues.mitigationType === exports.MitigationTypes.AGRICULTURE) {
17221
17257
  ndcActionDetailObj.agricultureProperties = {
@@ -17263,11 +17299,29 @@ var NdcActionDetails = function (props) {
17263
17299
  nationalPlanObjectives: ndcActionFormvalues.nationalPlanObjectives,
17264
17300
  nationalPlanCoverage: ndcActionFormvalues.nationalPlanCoverage,
17265
17301
  };
17302
+ if (includedInNAP === true || includedInNAP === false) {
17303
+ ndcActionDetailObj.adaptationProperties.includedInNAP = includedInNAP;
17304
+ }
17305
+ if (inputNumberValueGhgAvoidedGas !== null ||
17306
+ inputNumberValueGhgAvoidedGas !== undefined) {
17307
+ ndcActionDetailObj.adaptationProperties.ghgEmissionsAvoided =
17308
+ inputNumberValueGhgAvoidedGas;
17309
+ }
17310
+ if (inputNumberValueGhgReducedGas !== null ||
17311
+ inputNumberValueGhgReducedGas !== undefined) {
17312
+ ndcActionDetailObj.adaptationProperties.ghgEmissionsReduced =
17313
+ inputNumberValueGhgReducedGas;
17314
+ }
17266
17315
  }
17267
17316
  if (!(ndcActionFormvalues.ndcActionType === exports.NdcActionTypes.Enablement)) return [3 /*break*/, 3];
17268
17317
  ndcActionDetailObj.enablementProperties = {
17269
17318
  title: ndcActionFormvalues.EnablementTitle,
17270
17319
  };
17320
+ if (ndcActionFormvalues.EnablementType &&
17321
+ ndcActionFormvalues.EnablementType.length > 0) {
17322
+ ndcActionDetailObj.enablementProperties.type =
17323
+ ndcActionFormvalues.EnablementType;
17324
+ }
17271
17325
  if (!(ndcActionFormvalues.EnablementReport &&
17272
17326
  ndcActionFormvalues.EnablementReport.length > 0)) return [3 /*break*/, 2];
17273
17327
  return [4 /*yield*/, getBase64((_a = ndcActionFormvalues.EnablementReport[0]) === null || _a === void 0 ? void 0 : _a.originFileObj)];
@@ -17299,6 +17353,23 @@ var NdcActionDetails = function (props) {
17299
17353
  }
17300
17354
  return e === null || e === void 0 ? void 0 : e.fileList;
17301
17355
  };
17356
+ var onClickIncludedInNAPScope = function (value) {
17357
+ if (value === includedInNAP) {
17358
+ setIncludedInNAP(undefined);
17359
+ }
17360
+ else {
17361
+ setIncludedInNAP(value);
17362
+ }
17363
+ };
17364
+ var onInCludedNAPChange = function (event) {
17365
+ var _a, _b;
17366
+ if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNAP") {
17367
+ setIncludedInNAP(true);
17368
+ }
17369
+ else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNAP") {
17370
+ setIncludedInNAP(false);
17371
+ }
17372
+ };
17302
17373
  return (React.createElement("div", { className: "ndc-action-details-container" },
17303
17374
  React.createElement(antd.Form, { name: "ndcActionDetails", layout: "vertical", requiredMark: true, onFinish: onNdcActionDetailsFormSubmit, form: form },
17304
17375
  React.createElement(antd.Row, { justify: "start", align: "middle" },
@@ -17312,40 +17383,42 @@ var NdcActionDetails = function (props) {
17312
17383
  React.createElement(antd.Select, { size: "large", onChange: handleNdcActionChange, style: {
17313
17384
  width: "249px",
17314
17385
  borderRadius: "4px",
17315
- }, dropdownStyle: { color: "red" }, options: ndcActionTypeListFiltered }))),
17316
- React.createElement(antd.Col, { style: { marginLeft: "38px" } },
17317
- React.createElement(antd.Form.Item, { label: t("ndcAction:methodology"), name: "methodology" },
17318
- React.createElement("span", { style: {
17319
- display: "inline-block",
17320
- border: "1px solid #D9D9D9",
17321
- width: "154px",
17322
- height: "38px",
17323
- borderRadius: "4px",
17324
- padding: "7px 8px",
17325
- fontSize: "14px",
17326
- backgroundColor: "#F0F0F0",
17327
- color: "#8C8C8C",
17328
- } },
17329
- " ",
17330
- t("ndcAction:goldStandard"))))),
17386
+ }, dropdownStyle: { color: "red" }, options: ndcActionTypeListFiltered })))),
17331
17387
  ndcActionType === exports.NdcActionTypes.CrossCutting && (React.createElement(antd.Row, null,
17332
17388
  React.createElement("label", { className: "label-heading" }, t("ndcAction:mitigation")))),
17333
17389
  (ndcActionType === exports.NdcActionTypes.Mitigation ||
17334
- ndcActionType === exports.NdcActionTypes.CrossCutting) && (React.createElement(antd.Row, { justify: "start", align: "middle" },
17335
- React.createElement(antd.Form.Item, { label: t("ndcAction:mitigationType"), name: "mitigationType", rules: [
17336
- {
17337
- required: true,
17338
- message: "".concat(t("ndcAction:mitigationType"), " ").concat(t("ndcAction:isRequired")),
17339
- },
17340
- ] },
17341
- React.createElement(antd.Select, { size: "large", onChange: handleMitigationTypeChange, style: {
17342
- width: "249px",
17343
- borderRadius: "4px",
17344
- }, options: (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === exports.Sector.Health ||
17345
- (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === exports.Sector.Education ||
17346
- (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === exports.Sector.Hospitality
17347
- ? mitigationTypeList
17348
- : sectorMitigationTypesListMapped[sector] })))),
17390
+ ndcActionType === exports.NdcActionTypes.CrossCutting) && (React.createElement(React.Fragment, null,
17391
+ React.createElement(antd.Row, { justify: "start", align: "middle" },
17392
+ React.createElement(antd.Col, null,
17393
+ React.createElement(antd.Form.Item, { label: t("ndcAction:mitigationType"), name: "mitigationType", rules: [
17394
+ {
17395
+ required: true,
17396
+ message: "".concat(t("ndcAction:mitigationType"), " ").concat(t("ndcAction:isRequired")),
17397
+ },
17398
+ ] },
17399
+ React.createElement(antd.Select, { size: "large", onChange: handleMitigationTypeChange, style: {
17400
+ width: "249px",
17401
+ borderRadius: "4px",
17402
+ }, options: (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === exports.Sector.Health ||
17403
+ (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === exports.Sector.Education ||
17404
+ (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === exports.Sector.Hospitality
17405
+ ? mitigationTypeList
17406
+ : sectorMitigationTypesListMapped[sector] }))),
17407
+ React.createElement(antd.Col, { style: { marginLeft: "38px" } },
17408
+ React.createElement(antd.Form.Item, { label: t("ndcAction:methodology"), name: "methodology" },
17409
+ React.createElement("span", { style: {
17410
+ display: "inline-block",
17411
+ border: "1px solid #D9D9D9",
17412
+ width: "154px",
17413
+ height: "38px",
17414
+ borderRadius: "4px",
17415
+ padding: "7px 8px",
17416
+ fontSize: "14px",
17417
+ backgroundColor: "#F0F0F0",
17418
+ color: "#8C8C8C",
17419
+ } },
17420
+ " ",
17421
+ t("ndcAction:goldStandard"))))))),
17349
17422
  (ndcActionType === exports.NdcActionTypes.Mitigation ||
17350
17423
  ndcActionType === exports.NdcActionTypes.CrossCutting) &&
17351
17424
  mitigationType === exports.MitigationTypes.SOLAR && (React.createElement(React.Fragment, null,
@@ -17431,11 +17504,26 @@ var NdcActionDetails = function (props) {
17431
17504
  (ndcActionType === exports.NdcActionTypes.Adaptation ||
17432
17505
  ndcActionType === exports.NdcActionTypes.CrossCutting) && (React.createElement(React.Fragment, null,
17433
17506
  React.createElement(antd.Row, { justify: "start", align: "middle" },
17434
- React.createElement(antd.Form.Item, { label: t("ndcAction:implementingAgency"), name: "implementingAgency" },
17435
- React.createElement(antd.Select, { style: { width: 442 }, size: "large", options: implementingAgencyList.map(function (item) { return ({
17436
- value: item,
17437
- label: item,
17438
- }); }) }))),
17507
+ React.createElement(antd.Col, null,
17508
+ React.createElement(antd.Form.Item, { label: t("ndcAction:implementingAgency"), name: "implementingAgency" },
17509
+ React.createElement(antd.Select, { style: { width: 442 }, size: "large", options: implementingAgencyList.map(function (item) { return ({
17510
+ value: item,
17511
+ label: item,
17512
+ }); }) }))),
17513
+ React.createElement(antd.Col, { style: { marginLeft: "38px" }, className: "included-nap-col" },
17514
+ React.createElement(antd.Row, { className: "in-nap-row" },
17515
+ React.createElement(antd.Col, { span: 9 },
17516
+ React.createElement("div", { className: "included-label" },
17517
+ React.createElement("div", null, t("ndcAction:inNAP")),
17518
+ React.createElement("div", { className: "info-container" },
17519
+ React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("ndcAction:inNAPToolTip"), overlayClassName: "custom-tooltip" },
17520
+ React.createElement(Icon.InfoCircle, { color: "#000000", size: 17 }))))),
17521
+ React.createElement(antd.Col, { span: 8, className: "included-val" },
17522
+ React.createElement(antd.Radio.Group, { size: "middle", onChange: onInCludedNAPChange, value: includedInNAP },
17523
+ React.createElement("div", { className: "yes-no-radio-container" },
17524
+ React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: true, onClick: function () { return onClickIncludedInNAPScope(true); } }, t("ndcAction:yes"))),
17525
+ React.createElement("div", { className: "yes-no-radio-container" },
17526
+ React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () { return onClickIncludedInNAPScope(false); } }, t("ndcAction:no")))))))),
17439
17527
  React.createElement(antd.Row, { justify: "start", align: "middle" },
17440
17528
  React.createElement(antd.Col, null,
17441
17529
  React.createElement(antd.Form.Item, { label: t("ndcAction:nationalPlanObjectives"), name: "nationalPlanObjectives" },
@@ -17448,10 +17536,111 @@ var NdcActionDetails = function (props) {
17448
17536
  React.createElement(antd.Select, { style: { width: 442 }, size: "large", options: nationalPlanCoverageList.map(function (item) { return ({
17449
17537
  value: item,
17450
17538
  label: item,
17451
- }); }) })))))),
17539
+ }); }) })))),
17540
+ React.createElement(antd.Row, { justify: "start", align: "middle" },
17541
+ React.createElement(antd.Col, null,
17542
+ React.createElement(antd.Form.Item, { label: t("ndcAction:ghgEmiReduced"), name: "ghgEmissionsReduced", style: { width: 442 }, rules: [
17543
+ {
17544
+ required: true,
17545
+ validateTrigger: "onBlur",
17546
+ validator: function (rule, value) {
17547
+ if (!value || value.length === 0) {
17548
+ return Promise.reject("".concat(t("ndcAction:ghgEmiReduced"), " ").concat(t("ndcAction:isRequired")));
17549
+ }
17550
+ var isMissingValue = false;
17551
+ value === null || value === void 0 ? void 0 : value.map(function (item) {
17552
+ if (inputNumberValueGhgReducedGas === undefined ||
17553
+ !inputNumberValueGhgReducedGas[item]) {
17554
+ isMissingValue = true;
17555
+ }
17556
+ });
17557
+ if (isMissingValue) {
17558
+ return Promise.reject("".concat(t("ndcAction:value"), " ").concat(t("ndcAction:isRequired")));
17559
+ }
17560
+ return Promise.resolve();
17561
+ },
17562
+ },
17563
+ ] },
17564
+ React.createElement(antd.Checkbox.Group, null, ghgEmissionsGas.map(function (option, i) { return (React.createElement("div", { key: option, className: "row-custom" },
17565
+ React.createElement(antd.Checkbox, { value: option, checked: checkedOptionsGhgReduced.includes(option), onChange: function (e) {
17566
+ var _a, _b;
17567
+ if ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.checked) {
17568
+ setCheckedOptionsGhgReduced(__spreadArray(__spreadArray([], checkedOptionsGhgReduced, true), [
17569
+ option,
17570
+ ], false));
17571
+ }
17572
+ else if (!((_b = e === null || e === void 0 ? void 0 : e.target) === null || _b === void 0 ? void 0 : _b.checked)) {
17573
+ var reducedGasAndVal = inputNumberValueGhgReducedGas;
17574
+ if (reducedGasAndVal &&
17575
+ reducedGasAndVal[option]) {
17576
+ delete reducedGasAndVal[option];
17577
+ }
17578
+ setInputNumberValueGhgReducedGas(reducedGasAndVal);
17579
+ setCheckedOptionsGhgReduced(__spreadArray([], checkedOptionsGhgReduced.filter(function (value) { return value !== option; }), true));
17580
+ }
17581
+ } }, option),
17582
+ React.createElement(antd.InputNumber, { value: inputNumberValueGhgReducedGas &&
17583
+ inputNumberValueGhgReducedGas[option]
17584
+ ? inputNumberValueGhgReducedGas[option]
17585
+ : null, size: "small", min: 0, disabled: !checkedOptionsGhgReduced.includes(option), onChange: function (e) {
17586
+ var _a;
17587
+ setInputNumberValueGhgReducedGas(__assign(__assign({}, inputNumberValueGhgReducedGas), (_a = {}, _a[option] = e, _a)));
17588
+ } }))); })))),
17589
+ React.createElement(antd.Col, { style: { marginLeft: "38px" } },
17590
+ React.createElement(antd.Form.Item, { label: t("ndcAction:ghgEmiAvoided"), name: "ghgEmissionsAvoided", style: { width: 442 }, rules: [
17591
+ {
17592
+ required: true,
17593
+ validateTrigger: "onBlur",
17594
+ validator: function (rule, value) {
17595
+ if (!value || value.length === 0) {
17596
+ return Promise.reject("".concat(t("ndcAction:ghgEmiAvoided"), " ").concat(t("ndcAction:isRequired")));
17597
+ }
17598
+ var isMissingValue = false;
17599
+ value === null || value === void 0 ? void 0 : value.map(function (item) {
17600
+ if (inputNumberValueGhgAvoidedGas === undefined ||
17601
+ !inputNumberValueGhgAvoidedGas[item]) {
17602
+ isMissingValue = true;
17603
+ }
17604
+ });
17605
+ if (isMissingValue) {
17606
+ return Promise.reject("".concat(t("ndcAction:value"), " ").concat(t("ndcAction:isRequired")));
17607
+ }
17608
+ return Promise.resolve();
17609
+ },
17610
+ },
17611
+ ] },
17612
+ React.createElement(antd.Checkbox.Group, null, ghgEmissionsGas.map(function (option, i) { return (React.createElement("div", { key: option, className: "row-custom" },
17613
+ React.createElement(antd.Checkbox, { value: option, checked: checkedOptionsGhgAvoided.includes(option), onChange: function (e) {
17614
+ var _a, _b;
17615
+ if ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.checked) {
17616
+ setCheckedOptionsGhgAvoided(__spreadArray(__spreadArray([], checkedOptionsGhgAvoided, true), [
17617
+ option,
17618
+ ], false));
17619
+ }
17620
+ else if (!((_b = e === null || e === void 0 ? void 0 : e.target) === null || _b === void 0 ? void 0 : _b.checked)) {
17621
+ var avaoidedGasAndVal = inputNumberValueGhgAvoidedGas;
17622
+ if (avaoidedGasAndVal &&
17623
+ avaoidedGasAndVal[option]) {
17624
+ delete avaoidedGasAndVal[option];
17625
+ }
17626
+ setInputNumberValueGhgAvoidedGas(avaoidedGasAndVal);
17627
+ setCheckedOptionsGhgAvoided(__spreadArray([], checkedOptionsGhgAvoided.filter(function (value) { return value !== option; }), true));
17628
+ }
17629
+ } }, option),
17630
+ React.createElement(antd.InputNumber, { value: inputNumberValueGhgAvoidedGas &&
17631
+ inputNumberValueGhgAvoidedGas[option]
17632
+ ? inputNumberValueGhgAvoidedGas[option]
17633
+ : null, size: "small", min: 0, disabled: !checkedOptionsGhgAvoided.includes(option), onChange: function (e) {
17634
+ var _a;
17635
+ setInputNumberValueGhgAvoidedGas(__assign(__assign({}, inputNumberValueGhgAvoidedGas), (_a = {}, _a[option] = e, _a)));
17636
+ } }))); }))))))),
17452
17637
  ndcActionType === exports.NdcActionTypes.Enablement && (React.createElement(React.Fragment, null,
17453
17638
  React.createElement(antd.Form.Item, { label: t("ndcAction:title"), name: "EnablementTitle" },
17454
17639
  React.createElement(antd.Input, { style: { width: 442 } })),
17640
+ React.createElement(antd.Form.Item, { label: t("ndcAction:type"), name: "EnablementType", className: "enablement-type-item" },
17641
+ React.createElement(antd.Checkbox.Group, { className: "type-checkbox-grp" },
17642
+ React.createElement(antd.Row, { className: "grp-row" }, enablementTypesAndValues === null || enablementTypesAndValues === void 0 ? void 0 : enablementTypesAndValues.map(function (type) { return (React.createElement(antd.Col, { lg: type.col, md: type.col + 1 },
17643
+ React.createElement(antd.Checkbox, { value: type.type, style: { lineHeight: "32px" } }, type.type))); })))),
17455
17644
  React.createElement(antd.Row, { justify: "space-between", align: "middle" },
17456
17645
  React.createElement(antd.Form.Item, { label: t("ndcAction:report"), name: "EnablementReport", valuePropName: "fileList", getValueFromEvent: normFile, required: false, rules: [
17457
17646
  {
@@ -19825,7 +20014,6 @@ var AddNdcActionComponent = function (props) {
19825
20014
  if (ndcActionDetailsObj.enablementReportData) {
19826
20015
  delete ndcActionDetailsObj.enablementReportData;
19827
20016
  }
19828
- ndcActionDetailsObj.methodology = t("ndcAction:goldStandard");
19829
20017
  return [4 /*yield*/, post("national/programme/addNDCAction", ndcActionDetailsObj)];
19830
20018
  case 2:
19831
20019
  response = _a.sent();
@@ -19999,6 +20187,8 @@ var NdcActionViewComponent = function (props) {
19999
20187
  var _a;
20000
20188
  var _b, _c;
20001
20189
  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;
20190
+ translator.setDefaultNamespace("ndcAction");
20191
+ var t = translator.t;
20002
20192
  var userInfoState = useUserContext().userInfoState;
20003
20193
  var post = useConnection().post;
20004
20194
  var state = useLocation().state;
@@ -20011,8 +20201,6 @@ var NdcActionViewComponent = function (props) {
20011
20201
  var _k = React.useState([]), programmeOwnerId = _k[0], setProgrammeOwnerId = _k[1];
20012
20202
  var _l = React.useState(false), canUploadMonitorReport = _l[0], setCanUploadMonitorReport = _l[1];
20013
20203
  var _m = React.useState(false), monitoringReportAccepted = _m[0], setMonitoringReportAccepted = _m[1];
20014
- translator.setDefaultNamespace("ndcAction");
20015
- var t = translator.t;
20016
20204
  var getProgrammeById = function (programmeId) { return __awaiter(void 0, void 0, void 0, function () {
20017
20205
  var response, error_1;
20018
20206
  var _a, _b, _c;
@@ -20215,16 +20403,28 @@ var NdcActionViewComponent = function (props) {
20215
20403
  return mitigationDetails;
20216
20404
  };
20217
20405
  var getNdcActionAdaptationDetails = function () {
20406
+ var _a, _b, _c, _d;
20218
20407
  var adaptationDetails = {};
20219
20408
  if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) {
20220
20409
  adaptationDetails[t("ndcAction:viewAdaptationImplementingAgency")] =
20221
20410
  ndcActionDetails.adaptationProperties.implementingAgency;
20222
20411
  adaptationDetails[t("ndcAction:viewAdaptationNationalPlanObjectives")] =
20223
20412
  ndcActionDetails.adaptationProperties.nationalPlanObjectives;
20413
+ adaptationDetails[t("ndcAction:viewAdaptationNationalPlanCoverage")] =
20414
+ ndcActionDetails.adaptationProperties.nationalPlanCoverage;
20415
+ adaptationDetails[t("ndcAction:viewIncludedInNAP")] = ((_a = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _a === void 0 ? void 0 : _a.includedInNAP)
20416
+ ? "Yes"
20417
+ : ((_b = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _b === void 0 ? void 0 : _b.includedInNAP) === false
20418
+ ? "No"
20419
+ : "-";
20224
20420
  adaptationDetails[t("ndcAction:viewGhgEmissionsAvoided")] =
20225
- ndcActionDetails.adaptationProperties.ghgEmissionsAvoided;
20421
+ ((_c = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _c === void 0 ? void 0 : _c.ghgEmissionsAvoided)
20422
+ ? ndcActionDetails.adaptationProperties.ghgEmissionsAvoided
20423
+ : {};
20226
20424
  adaptationDetails[t("ndcAction:viewGhgEmissionsReduced")] =
20227
- ndcActionDetails.adaptationProperties.ghgEmissionsReduced;
20425
+ ((_d = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _d === void 0 ? void 0 : _d.ghgEmissionsReduced)
20426
+ ? ndcActionDetails.adaptationProperties.ghgEmissionsReduced
20427
+ : {};
20228
20428
  }
20229
20429
  return adaptationDetails;
20230
20430
  };
@@ -20641,6 +20841,7 @@ exports.BaseEntity = BaseEntity;
20641
20841
  exports.Company = Company;
20642
20842
  exports.CompanyManagementComponent = CompanyManagementComponent;
20643
20843
  exports.CompanyProfileComponent = CompanyProfileComponent;
20844
+ exports.InfoView = InfoView;
20644
20845
  exports.InvestmentCreationComponent = InvestmentCreationComponent;
20645
20846
  exports.InvestmentManagementComponent = InvestmentManagementComponent;
20646
20847
  exports.LegendItem = LegendItem;