@undp/carbon-library 2.1.13-PAN-1.8 → 2.1.13-PAN-1.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +21 -33
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +21 -33
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
@@ -20413,22 +20413,22 @@ var enablementTypesAndValues = [
|
|
20413
20413
|
];
|
20414
20414
|
|
20415
20415
|
var NdcActionDetails = function (props) {
|
20416
|
-
var _a, _b, _c, _d;
|
20416
|
+
var _a, _b, _c, _d, _e;
|
20417
20417
|
var isBackBtnVisible = props.isBackBtnVisible, onFormSubmit = props.onFormSubmit, ndcActionDetails = props.ndcActionDetails, translator = props.translator, programmeDetails = props.programmeDetails, onClickedBackBtn = props.onClickedBackBtn;
|
20418
20418
|
translator.setDefaultNamespace("ndcAction");
|
20419
20419
|
var t = translator.t;
|
20420
|
-
var
|
20421
|
-
var
|
20422
|
-
var
|
20423
|
-
var
|
20424
|
-
var
|
20425
|
-
var
|
20426
|
-
var
|
20427
|
-
var
|
20428
|
-
var
|
20429
|
-
var
|
20430
|
-
var
|
20431
|
-
var
|
20420
|
+
var _f = React.useState(), ndcActionType = _f[0], setNdcActionType = _f[1];
|
20421
|
+
var _g = React.useState(), methodology = _g[0], setMethodology = _g[1];
|
20422
|
+
var _h = React.useState(), mitigationType = _h[0], setmitigationType = _h[1];
|
20423
|
+
var _j = React.useState(""), mitigationSubType = _j[0], setMitigationSubType = _j[1];
|
20424
|
+
var _k = React.useState(""), sector = _k[0], setSector = _k[1];
|
20425
|
+
var _l = React.useState(""), subSector = _l[0], setSubSector = _l[1];
|
20426
|
+
var _m = React.useState(ndcActionTypeList), ndcActionTypeListFiltered = _m[0]; _m[1];
|
20427
|
+
var _o = React.useState([]), checkedOptionsGhgReduced = _o[0], setCheckedOptionsGhgReduced = _o[1];
|
20428
|
+
var _p = React.useState([]), checkedOptionsGhgAvoided = _p[0], setCheckedOptionsGhgAvoided = _p[1];
|
20429
|
+
var _q = React.useState(), inputNumberValueGhgAvoidedGas = _q[0], setInputNumberValueGhgAvoidedGas = _q[1];
|
20430
|
+
var _r = React.useState(), inputNumberValueGhgReducedGas = _r[0], setInputNumberValueGhgReducedGas = _r[1];
|
20431
|
+
var _s = React.useState(), includedInNAP = _s[0], setIncludedInNAP = _s[1];
|
20432
20432
|
var form = antd.Form.useForm()[0];
|
20433
20433
|
var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
|
20434
20434
|
? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
|
@@ -20834,7 +20834,9 @@ var NdcActionDetails = function (props) {
|
|
20834
20834
|
ndcActionType === exports.NdcActionTypes.CrossCutting) && (React.createElement(React.Fragment, null,
|
20835
20835
|
React.createElement(antd.Row, { justify: "start", align: "middle" },
|
20836
20836
|
React.createElement(antd.Col, null,
|
20837
|
-
React.createElement(antd.Form.Item, { label: t("ndcAction:mitigationType"),
|
20837
|
+
React.createElement(antd.Form.Item, { label: t("ndcAction:mitigationType"), initialValue: sectorMitigationTypesListMapped[sector]
|
20838
|
+
? (_c = (_b = (_a = sectorMitigationTypesListMapped[sector]) === null || _a === void 0 ? void 0 : _a.find(function (item) { return item.label === sector; })) === null || _b === void 0 ? void 0 : _b.label) !== null && _c !== void 0 ? _c : ""
|
20839
|
+
: "", name: "mitigationType", rules: [
|
20838
20840
|
{
|
20839
20841
|
required: true,
|
20840
20842
|
message: "".concat(t("ndcAction:mitigationType"), " ").concat(t("ndcAction:isRequired")),
|
@@ -20847,22 +20849,14 @@ var NdcActionDetails = function (props) {
|
|
20847
20849
|
(programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === exports.Sector.Education ||
|
20848
20850
|
(programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === exports.Sector.Hospitality
|
20849
20851
|
? mitigationTypeList
|
20850
|
-
: sectorMitigationTypesListMapped[sector],
|
20851
|
-
// defaultValue={
|
20852
|
-
// sectorMitigationTypesListMapped[sector]
|
20853
|
-
// ? sectorMitigationTypesListMapped[sector]?.find(
|
20854
|
-
// (item: any) => item.label === sector
|
20855
|
-
// )?.label ?? ""
|
20856
|
-
// : ""
|
20857
|
-
// }
|
20858
|
-
value: sectorMitigationTypesListMapped[sector]
|
20859
|
-
? (_b = (_a = sectorMitigationTypesListMapped[sector]) === null || _a === void 0 ? void 0 : _a.find(function (item) { return item.label === sector; })) !== null && _b !== void 0 ? _b : { value: "", label: "" }
|
20860
|
-
: { value: "", label: "" } }))),
|
20852
|
+
: sectorMitigationTypesListMapped[sector] }))),
|
20861
20853
|
(ndcActionType === exports.NdcActionTypes.Mitigation ||
|
20862
20854
|
ndcActionType === exports.NdcActionTypes.CrossCutting) &&
|
20863
20855
|
mitigationType &&
|
20864
20856
|
mitigationSubTypesListMapped[mitigationType] && (React.createElement(antd.Col, { style: { marginLeft: "38px" } },
|
20865
|
-
React.createElement(antd.Form.Item, { label: t("ndcAction:mitigationSubType"), name: "mitigationSubType",
|
20857
|
+
React.createElement(antd.Form.Item, { label: t("ndcAction:mitigationSubType"), name: "mitigationSubType", initialValue: mitigationSubTypesListMapped[subSector]
|
20858
|
+
? (_e = (_d = mitigationSubTypesListMapped[subSector]) === null || _d === void 0 ? void 0 : _d.find(function (item) { return item.label === subSector; })) === null || _e === void 0 ? void 0 : _e.label
|
20859
|
+
: "", rules: [
|
20866
20860
|
{
|
20867
20861
|
required: true,
|
20868
20862
|
message: "".concat(t("ndcAction:mitigationSubType"), " ").concat(t("ndcAction:isRequired")),
|
@@ -20871,13 +20865,7 @@ var NdcActionDetails = function (props) {
|
|
20871
20865
|
React.createElement(antd.Select, { size: "large", onChange: handleMitigationSubTypeChange, style: {
|
20872
20866
|
width: "249px",
|
20873
20867
|
borderRadius: "4px",
|
20874
|
-
}, options: mitigationSubTypesListMapped[mitigationType],
|
20875
|
-
((_d = (mitigationSubTypesListMapped[subSector]
|
20876
|
-
? (_c = mitigationSubTypesListMapped[subSector]) === null || _c === void 0 ? void 0 : _c.find(function (item) { return item.label === subSector; })
|
20877
|
-
: { value: "", label: "" })) !== null && _d !== void 0 ? _d : {
|
20878
|
-
value: "",
|
20879
|
-
label: "",
|
20880
|
-
}) }))))),
|
20868
|
+
}, options: mitigationSubTypesListMapped[mitigationType] }))))),
|
20881
20869
|
React.createElement(antd.Row, { justify: "start", align: "middle" },
|
20882
20870
|
React.createElement(antd.Col, { span: 20 },
|
20883
20871
|
React.createElement(antd.Form.Item, { label: t("ndcAction:methodology"), name: "methodology", rules: [
|