@undp/carbon-library 1.0.135-ghg-inventory.2 → 1.0.135-ghg-inventory.3

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -25017,7 +25017,7 @@ var TimelineBody = function (props) {
25017
25017
  React.createElement("div", { className: "remark-body" }, remark)))));
25018
25018
  };
25019
25019
 
25020
- var css_248z$1 = ".ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n background: #16b1ff !important;\n line-height: 30px !important; }\n\n.ant-picker-cell-disabled::before {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n line-height: 30px !important; }\n\n.ant-picker-cell::before {\n left: 11px; }\n\n.ant-input-suffix {\n display: flex;\n flex: none;\n align-items: center;\n height: 50px; }\n .ant-input-suffix button {\n border: none;\n color: #8C8C8C; }\n\n.ant-input-affix-wrapper {\n padding: 0 11px;\n border-radius: 5px; }\n\n.emission-tab-container .add-emission {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .emission-tab-container .add-emission .add-new-year-picker-col {\n padding-left: 5%; }\n .emission-tab-container .add-emission .ant-picker {\n border-radius: 5px !important;\n height: 50px !important;\n width: 80%; }\n .emission-tab-container .add-emission .add-new-upload-file-label {\n color: rgba(58, 53, 65, 0.5);\n padding: 0 0 8px;\n line-height: 1.5715;\n white-space: initial;\n text-align: left; }\n .emission-tab-container .add-emission .add-new-upload-file-name-input input {\n height: 50px;\n color: #16b1ff; }\n .emission-tab-container .add-emission .add-new-upload-file-inner-col button {\n height: 50px;\n font-size: 11px;\n width: 120px; }\n .emission-tab-container .add-emission .table-heading-row {\n padding-top: 20px;\n padding-bottom: 25px;\n margin-left: 10px !important; }\n .emission-tab-container .add-emission .table-heading-row .table-heading-col {\n text-align: center;\n font-size: 18px;\n font-weight: 600;\n color: #28282899; }\n .emission-tab-container .add-emission .total-emission-row {\n padding: 12px 16px;\n margin-left: 30px !important; }\n .emission-tab-container .add-emission .total-emission-row span {\n font-size: 20px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-emission-row .total-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .panel-header-col {\n font-size: 20px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .panel-header-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .sub-panel .panel-header-emission-value-col {\n border-bottom: none !important;\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .sub-panel-heading {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n margin-top: 35px; }\n .emission-tab-container .add-emission .sub-panel-heading .panel-header-col {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .ant-collapse-ghost > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {\n padding-top: 0px;\n padding-bottom: 12px;\n margin-left: 25px; }\n .emission-tab-container .add-emission .ant-collapse-expand-icon {\n margin-top: 5px; }\n .emission-tab-container .add-emission .ant-collapse-expand-icon svg {\n font-size: 20px;\n color: #976ED7; }\n .emission-tab-container .add-emission .ant-collapse {\n margin-left: 10px; }\n .emission-tab-container .add-emission .co2-total-pill {\n border-radius: 20px;\n background-color: rgba(145, 85, 253, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .emission-tab-container .add-emission .ch4-total-pill {\n border-radius: 20px;\n background-color: rgba(217, 217, 217, 0.6);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .emission-tab-container .add-emission .n2o-total-pill {\n border-radius: 20px;\n background-color: rgba(185, 226, 244, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .emission-tab-container .add-emission .co2eq-total-pill {\n border-radius: 20px;\n background-color: rgba(255, 166, 166, 0.6);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .emission-tab-container .add-emission .panel-content-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n height: 68px;\n align-items: center; }\n .emission-tab-container .add-emission .panel-content-row .panel-content-title {\n font-size: 16px;\n font-weight: 500;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .panel-content-input-box-row {\n margin-top: 14px; }\n .emission-tab-container .add-emission .panel-content-input-box-row .ant-input-number {\n height: 40px;\n width: 50px;\n margin-left: 33%; }\n .emission-tab-container .add-emission .total-co2-without-land-row {\n margin-left: 40px !important;\n align-items: center;\n margin-top: 50px; }\n .emission-tab-container .add-emission .total-co2-without-land-row .total-co2-without-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-co2-without-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .emission-tab-container .add-emission .total-co2-with-land-row {\n margin-left: 40px !important;\n align-items: center; }\n .emission-tab-container .add-emission .total-co2-with-land-row .total-co2-with-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-co2-with-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .emission-tab-container .add-emission .steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n margin-top: 3rem; }\n .emission-tab-container .add-emission .steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .submit-btn {\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n @media only screen and (max-width: 1600px) {\n .emission-tab-container .add-emission .panel-content-input-box-row .ant-input-number {\n margin-left: 25%; } }\n";
25020
+ var css_248z$1 = ".ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n background: #16b1ff !important;\n line-height: 30px !important; }\n\n.ant-picker-cell-disabled::before {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n line-height: 30px !important; }\n\n.ant-picker-cell::before {\n left: 11px; }\n\n.ant-input-suffix {\n display: flex;\n flex: none;\n align-items: center;\n height: 50px; }\n .ant-input-suffix button {\n border: none;\n color: #8C8C8C; }\n\n.ant-input-affix-wrapper {\n padding: 0 11px;\n border-radius: 5px; }\n\n.emission-tab-container .add-emission {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .emission-tab-container .add-emission .add-new-year-picker-col {\n padding-left: 5%; }\n .emission-tab-container .add-emission .ant-picker {\n border-radius: 5px !important;\n height: 50px !important;\n width: 80%; }\n .emission-tab-container .add-emission .add-new-upload-file-label {\n color: rgba(58, 53, 65, 0.5);\n padding: 0 0 8px;\n line-height: 1.5715;\n white-space: initial;\n text-align: left; }\n .emission-tab-container .add-emission .add-new-upload-file-name-input input {\n height: 50px;\n color: #16b1ff; }\n .emission-tab-container .add-emission .add-new-upload-file-inner-col button {\n height: 50px;\n font-size: 11px;\n width: 120px;\n color: #8C8C8C;\n border-radius: 4px; }\n .emission-tab-container .add-emission .view-download-file-name-input input {\n height: 50px;\n color: #16b1ff; }\n .emission-tab-container .add-emission .view-download-file-inner-col button {\n height: 50px;\n font-size: 12px;\n font-weight: 400;\n width: 135px;\n margin-left: 5px;\n color: #8C8C8C;\n border-radius: 4px; }\n .emission-tab-container .add-emission .table-heading-row {\n padding-top: 20px;\n padding-bottom: 25px;\n margin-left: 10px !important; }\n .emission-tab-container .add-emission .table-heading-row .table-heading-col {\n text-align: center;\n font-size: 18px;\n font-weight: 600;\n color: #28282899; }\n .emission-tab-container .add-emission .total-emission-row {\n padding: 12px 16px;\n margin-left: 30px !important; }\n .emission-tab-container .add-emission .total-emission-row span {\n font-size: 20px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-emission-row .total-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .panel-header-col {\n font-size: 20px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .panel-header-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .sub-panel .panel-header-emission-value-col {\n border-bottom: none !important;\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .sub-panel-heading {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n margin-top: 35px; }\n .emission-tab-container .add-emission .sub-panel-heading .panel-header-col {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .ant-collapse-ghost > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {\n padding-top: 0px;\n padding-bottom: 12px;\n margin-left: 25px; }\n .emission-tab-container .add-emission .ant-collapse-expand-icon {\n margin-top: 5px; }\n .emission-tab-container .add-emission .ant-collapse-expand-icon svg {\n font-size: 20px;\n color: #976ED7; }\n .emission-tab-container .add-emission .ant-collapse {\n margin-left: 10px; }\n .emission-tab-container .add-emission .co2-total-pill {\n border-radius: 20px;\n background-color: rgba(145, 85, 253, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .emission-tab-container .add-emission .ch4-total-pill {\n border-radius: 20px;\n background-color: rgba(217, 217, 217, 0.6);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .emission-tab-container .add-emission .n2o-total-pill {\n border-radius: 20px;\n background-color: rgba(185, 226, 244, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .emission-tab-container .add-emission .co2eq-total-pill {\n border-radius: 20px;\n background-color: rgba(255, 166, 166, 0.6);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .emission-tab-container .add-emission .panel-content-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n height: 68px;\n align-items: center; }\n .emission-tab-container .add-emission .panel-content-row .panel-content-title {\n font-size: 16px;\n font-weight: 500;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .panel-content-input-box-row {\n margin-top: 14px; }\n .emission-tab-container .add-emission .panel-content-input-box-row .ant-input-number {\n height: 40px;\n width: 50px;\n margin-left: 33%; }\n .emission-tab-container .add-emission .total-co2-without-land-row {\n margin-left: 40px !important;\n align-items: center;\n margin-top: 50px; }\n .emission-tab-container .add-emission .total-co2-without-land-row .total-co2-without-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-co2-without-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .emission-tab-container .add-emission .view-data-panel .panel-content-input-box-row {\n padding-bottom: 24px; }\n .emission-tab-container .add-emission .total-co2-with-land-row {\n margin-left: 40px !important;\n align-items: center; }\n .emission-tab-container .add-emission .total-co2-with-land-row .total-co2-with-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-co2-with-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .emission-tab-container .add-emission .steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n margin-top: 3rem; }\n .emission-tab-container .add-emission .steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .submit-btn {\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n @media only screen and (max-width: 1600px) {\n .emission-tab-container .add-emission .panel-content-input-box-row .ant-input-number {\n margin-left: 25%; } }\n";
25021
25021
  styleInject(css_248z$1);
25022
25022
 
25023
25023
  var EmissionTypes = { co2: 'CO2', ch4: 'CH4', n2o: 'N2O', co2eq: 'CO2-eq' };
@@ -25088,6 +25088,238 @@ var formFields = {
25088
25088
  ],
25089
25089
  other: ['indirectN2oEmissions', 'other'],
25090
25090
  };
25091
+ var emissionCsvFieldMap = {
25092
+ "year": "Year",
25093
+ "energyEmissions_fuelCombustionActivities_transport_ch4": "Transport - CH4",
25094
+ "energyEmissions_fuelCombustionActivities_transport_co2": "Transport - CO2",
25095
+ "energyEmissions_fuelCombustionActivities_transport_n2o": "Transport - N2O",
25096
+ "energyEmissions_fuelCombustionActivities_transport_co2eq": "Transport - CO2-eq",
25097
+ "energyEmissions_fuelCombustionActivities_nonSpecified_ch4": "Non-Specified - CH4",
25098
+ "energyEmissions_fuelCombustionActivities_nonSpecified_co2": "Non-Specified - CO2",
25099
+ "energyEmissions_fuelCombustionActivities_nonSpecified_n2o": "Non-Specified - N2O",
25100
+ "energyEmissions_fuelCombustionActivities_nonSpecified_co2eq": "Non-Specified - CO2-eq",
25101
+ "energyEmissions_fuelCombustionActivities_otherSectors_ch4": "Other Sectors - CH4",
25102
+ "energyEmissions_fuelCombustionActivities_otherSectors_co2": "Other Sectors - CO2",
25103
+ "energyEmissions_fuelCombustionActivities_otherSectors_n2o": "Other Sectors - N2O",
25104
+ "energyEmissions_fuelCombustionActivities_otherSectors_co2eq": "Other Sectors - CO2-eq",
25105
+ "energyEmissions_fuelCombustionActivities_energyIndustries_ch4": "Energy Industries - CH4",
25106
+ "energyEmissions_fuelCombustionActivities_energyIndustries_co2": "Energy Industries - CO2",
25107
+ "energyEmissions_fuelCombustionActivities_energyIndustries_n2o": "Energy Industries - N2O",
25108
+ "energyEmissions_fuelCombustionActivities_energyIndustries_co2eq": "Energy Industries - CO2-eq",
25109
+ "energyEmissions_fuelCombustionActivities_manufacturingIndustriesConstruction_ch4": "Manufacturing Industries and Construction - CH4",
25110
+ "energyEmissions_fuelCombustionActivities_manufacturingIndustriesConstruction_co2": "Manufacturing Industries and Construction - CO2",
25111
+ "energyEmissions_fuelCombustionActivities_manufacturingIndustriesConstruction_n2o": "Manufacturing Industries and Construction - N2O",
25112
+ "energyEmissions_fuelCombustionActivities_manufacturingIndustriesConstruction_co2eq": "Manufacturing Industries and Construction - CO2-eq",
25113
+ "energyEmissions_fugitiveEmissionsFromFuels_solidFuels_ch4": "Solid Fuels - CH4",
25114
+ "energyEmissions_fugitiveEmissionsFromFuels_solidFuels_co2": "Solid Fuels - CO2",
25115
+ "energyEmissions_fugitiveEmissionsFromFuels_solidFuels_n2o": "Solid Fuels - N2O",
25116
+ "energyEmissions_fugitiveEmissionsFromFuels_solidFuels_co2eq": "Solid Fuels - CO2-eq",
25117
+ "energyEmissions_fugitiveEmissionsFromFuels_oilNaturalGas_ch4": "Oil and Natural Gas - CH4",
25118
+ "energyEmissions_fugitiveEmissionsFromFuels_oilNaturalGas_co2": "Oil and Natural Gas - CO2",
25119
+ "energyEmissions_fugitiveEmissionsFromFuels_oilNaturalGas_n2o": "Oil and Natural Gas - N2O",
25120
+ "energyEmissions_fugitiveEmissionsFromFuels_oilNaturalGas_co2eq": "Oil and Natural Gas - CO2-eq",
25121
+ "energyEmissions_fugitiveEmissionsFromFuels_otherEmissionsEnergyProduction_ch4": "Other emissions from Energy Production - CH4",
25122
+ "energyEmissions_fugitiveEmissionsFromFuels_otherEmissionsEnergyProduction_co2": "Other emissions from Energy Production - CO2",
25123
+ "energyEmissions_fugitiveEmissionsFromFuels_otherEmissionsEnergyProduction_n2o": "Other emissions from Energy Production - N2O",
25124
+ "energyEmissions_fugitiveEmissionsFromFuels_otherEmissionsEnergyProduction_co2eq": "Other emissions from Energy Production - CO2-eq",
25125
+ "energyEmissions_carbonDioxideTransportStorage_other_ch4": "Other (Carbon dioxide Transport and Storage) - CH4",
25126
+ "energyEmissions_carbonDioxideTransportStorage_other_co2": "Other (Carbon dioxide Transport and Storage) - CO2",
25127
+ "energyEmissions_carbonDioxideTransportStorage_other_n2o": "Other (Carbon dioxide Transport and Storage) - N2O",
25128
+ "energyEmissions_carbonDioxideTransportStorage_other_co2eq": "Other (Carbon dioxide Transport and Storage) - CO2-eq",
25129
+ "energyEmissions_carbonDioxideTransportStorage_transportOfCo2_ch4": "Transport of CO2 - CH4",
25130
+ "energyEmissions_carbonDioxideTransportStorage_transportOfCo2_co2": "Transport of CO2 - CO2",
25131
+ "energyEmissions_carbonDioxideTransportStorage_transportOfCo2_n2o": "Transport of CO2 - N2O",
25132
+ "energyEmissions_carbonDioxideTransportStorage_transportOfCo2_co2eq": "Transport of CO2 - CO2-eq",
25133
+ "energyEmissions_carbonDioxideTransportStorage_injectionStorage_ch4": "Injection and Storage - CH4",
25134
+ "energyEmissions_carbonDioxideTransportStorage_injectionStorage_co2": "Injection and Storage - CO2",
25135
+ "energyEmissions_carbonDioxideTransportStorage_injectionStorage_n2o": "Injection and Storage - N2O",
25136
+ "energyEmissions_carbonDioxideTransportStorage_injectionStorage_co2eq": "Injection and Storage - CO2-eq",
25137
+ "industrialProcessesProductUse_other_ch4": "Other (Industrial Processes & Product Use) - CH4",
25138
+ "industrialProcessesProductUse_other_co2": "Other (Industrial Processes & Product Use) - CO2",
25139
+ "industrialProcessesProductUse_other_n2o": "Other (Industrial Processes & Product Use) - N2O",
25140
+ "industrialProcessesProductUse_other_co2eq": "Other (Industrial Processes & Product Use) - CO2-eq",
25141
+ "industrialProcessesProductUse_metalIndustry_ch4": "Metal Industry - CH4",
25142
+ "industrialProcessesProductUse_metalIndustry_co2": "Metal Industry - CO2",
25143
+ "industrialProcessesProductUse_metalIndustry_n2o": "Metal Industry - N2O",
25144
+ "industrialProcessesProductUse_metalIndustry_co2eq": "Metal Industry - CO2-eq",
25145
+ "industrialProcessesProductUse_mineralIndustry_ch4": "Mineral Industry - CH4",
25146
+ "industrialProcessesProductUse_mineralIndustry_co2": "Mineral Industry - CO2",
25147
+ "industrialProcessesProductUse_mineralIndustry_n2o": "Mineral Industry - N2O",
25148
+ "industrialProcessesProductUse_mineralIndustry_co2eq": "Mineral Industry - CO2-eq",
25149
+ "industrialProcessesProductUse_chemicalIndustry_ch4": "Chemical Industry - CH4",
25150
+ "industrialProcessesProductUse_chemicalIndustry_co2": "Chemical Industry - CO2",
25151
+ "industrialProcessesProductUse_chemicalIndustry_n2o": "Chemical Industry - N2O",
25152
+ "industrialProcessesProductUse_chemicalIndustry_co2eq": "Chemical Industry - CO2-eq",
25153
+ "industrialProcessesProductUse_electronicsIndustry_ch4": "Electronics Industry - CH4",
25154
+ "industrialProcessesProductUse_electronicsIndustry_co2": "Electronics Industry - CO2",
25155
+ "industrialProcessesProductUse_electronicsIndustry_n2o": "Electronics Industry - N2O",
25156
+ "industrialProcessesProductUse_electronicsIndustry_co2eq": "Electronics Industry - CO2-eq",
25157
+ "industrialProcessesProductUse_otherProductManufactureUse_ch4": "Other Product Manufacture and Use - CH4",
25158
+ "industrialProcessesProductUse_otherProductManufactureUse_co2": "Other Product Manufacture and Use - CO2",
25159
+ "industrialProcessesProductUse_otherProductManufactureUse_n2o": "Other Product Manufacture and Use - N2O",
25160
+ "industrialProcessesProductUse_otherProductManufactureUse_co2eq": "Other Product Manufacture and Use - CO2-eq",
25161
+ "industrialProcessesProductUse_nonEnergyProductsFuelsSolventUse_ch4": "Non-Energy Products from Fuels and Solvent Use - CH4",
25162
+ "industrialProcessesProductUse_nonEnergyProductsFuelsSolventUse_co2": "Non-Energy Products from Fuels and Solvent Use - CO2",
25163
+ "industrialProcessesProductUse_nonEnergyProductsFuelsSolventUse_n2o": "Non-Energy Products from Fuels and Solvent Use - N2O",
25164
+ "industrialProcessesProductUse_nonEnergyProductsFuelsSolventUse_co2eq": "Non-Energy Products from Fuels and Solvent Use - CO2-eq",
25165
+ "industrialProcessesProductUse_productUsesSubstOzoneDepletingSubs_ch4": "Product Uses as Substitutes for Ozone Depleting Substances - CH4",
25166
+ "industrialProcessesProductUse_productUsesSubstOzoneDepletingSubs_co2": "Product Uses as Substitutes for Ozone Depleting Substances - CO2",
25167
+ "industrialProcessesProductUse_productUsesSubstOzoneDepletingSubs_n2o": "Product Uses as Substitutes for Ozone Depleting Substances - N2O",
25168
+ "industrialProcessesProductUse_productUsesSubstOzoneDepletingSubs_co2eq": "Product Uses as Substitutes for Ozone Depleting Substances - CO2-eq",
25169
+ "agricultureForestryOtherLandUse_land_ch4": "Land - CH4",
25170
+ "agricultureForestryOtherLandUse_land_co2": "Land - CO2",
25171
+ "agricultureForestryOtherLandUse_land_n2o": "Land - N2O",
25172
+ "agricultureForestryOtherLandUse_land_co2eq": "Land - CO2-eq",
25173
+ "agricultureForestryOtherLandUse_other_ch4": "Other (Agriculture, Forestry, and Other Land Use) - CH4",
25174
+ "agricultureForestryOtherLandUse_other_co2": "Other (Agriculture, Forestry, and Other Land Use) - CO2",
25175
+ "agricultureForestryOtherLandUse_other_n2o": "Other (Agriculture, Forestry, and Other Land Use) - N2O",
25176
+ "agricultureForestryOtherLandUse_other_co2eq": "Other (Agriculture, Forestry, and Other Land Use) - CO2-eq",
25177
+ "agricultureForestryOtherLandUse_livestock_ch4": "Livestock - CH4",
25178
+ "agricultureForestryOtherLandUse_livestock_co2": "Livestock - CO2",
25179
+ "agricultureForestryOtherLandUse_livestock_n2o": "Livestock - N2O",
25180
+ "agricultureForestryOtherLandUse_livestock_co2eq": "Livestock - CO2-eq",
25181
+ "agricultureForestryOtherLandUse_aggregateNonCo2SourcesLand_ch4": "Aggregate sources and non-CO2 emissions sources on land - CH4",
25182
+ "agricultureForestryOtherLandUse_aggregateNonCo2SourcesLand_co2": "Aggregate sources and non-CO2 emissions sources on land - CO2",
25183
+ "agricultureForestryOtherLandUse_aggregateNonCo2SourcesLand_n2o": "Aggregate sources and non-CO2 emissions sources on land - N2O",
25184
+ "agricultureForestryOtherLandUse_aggregateNonCo2SourcesLand_co2eq": "Aggregate sources and non-CO2 emissions sources on land - CO2-eq",
25185
+ "waste_other_ch4": "Other (Waste) - CH4",
25186
+ "waste_other_co2": "Other (Waste) - CO2",
25187
+ "waste_other_n2o": "Other (Waste) - N2O",
25188
+ "waste_other_co2eq": "Other (Waste) - CO2-eq",
25189
+ "waste_solidWasteDisposal_ch4": "Solid Waste Disposal - CH4",
25190
+ "waste_solidWasteDisposal_co2": "Solid Waste Disposal - CO2",
25191
+ "waste_solidWasteDisposal_n2o": "Solid Waste Disposal - N2O",
25192
+ "waste_solidWasteDisposal_co2eq": "Solid Waste Disposal - CO2-eq",
25193
+ "waste_incinerationOpenBurningWaste_ch4": "Incineration and Open Burning of Waste - CH4",
25194
+ "waste_incinerationOpenBurningWaste_co2": "Incineration and Open Burning of Waste - CO2",
25195
+ "waste_incinerationOpenBurningWaste_n2o": "Incineration and Open Burning of Waste - N2O",
25196
+ "waste_incinerationOpenBurningWaste_co2eq": "Incineration and Open Burning of Waste - CO2-eq",
25197
+ "waste_wastewaterTreatmentDischarge_ch4": "Wastewater Treatment and Discharge - CH4",
25198
+ "waste_wastewaterTreatmentDischarge_co2": "Wastewater Treatment and Discharge - CO2",
25199
+ "waste_wastewaterTreatmentDischarge_n2o": "Wastewater Treatment and Discharge - N2O",
25200
+ "waste_wastewaterTreatmentDischarge_co2eq": "Wastewater Treatment and Discharge - CO2-eq",
25201
+ "waste_biologicalTreatmentSolidWaste_ch4": "Biological Treatment of Solid Waste - CH4",
25202
+ "waste_biologicalTreatmentSolidWaste_co2": "Biological Treatment of Solid Waste - CO2",
25203
+ "waste_biologicalTreatmentSolidWaste_n2o": "Biological Treatment of Solid Waste - N2O",
25204
+ "waste_biologicalTreatmentSolidWaste_co2eq": "Biological Treatment of Solid Waste - CO2-eq",
25205
+ "other_other_ch4": "Other - CH4",
25206
+ "other_other_co2": "Other - CO2",
25207
+ "other_other_n2o": "Other - N2O",
25208
+ "other_other_co2eq": "Other - CO2-eq",
25209
+ "other_indirectN2oEmissions_ch4": "Indirect N2O emissions from the atmospheric deposition of nitrogen in NOx and NH3 - CH4",
25210
+ "other_indirectN2oEmissions_co2": "Indirect N2O emissions from the atmospheric deposition of nitrogen in NOx and NH3 - CO2",
25211
+ "other_indirectN2oEmissions_n2o": "Indirect N2O emissions from the atmospheric deposition of nitrogen in NOx and NH3 - N2O",
25212
+ "other_indirectN2oEmissions_co2eq": "Indirect N2O emissions from the atmospheric deposition of nitrogen in NOx and NH3 - CO2-eq",
25213
+ "totalCo2WithoutLand_ch4": "Total CO2 equivalent emissions without land use, land-use change and forestry - CH4",
25214
+ "totalCo2WithoutLand_co2": "Total CO2 equivalent emissions without land use, land-use change and forestry - CO2",
25215
+ "totalCo2WithoutLand_n2o": "Total CO2 equivalent emissions without land use, land-use change and forestry - N2O",
25216
+ "totalCo2WithoutLand_co2eq": "Total CO2 equivalent emissions without land use, land-use change and forestry - CO2-eq",
25217
+ "totalCo2WithLand_ch4": "Total CO2 equivalent emissions with land use, land-use change and forestry - CH4",
25218
+ "totalCo2WithLand_co2": "Total CO2 equivalent emissions with land use, land-use change and forestry - CO2",
25219
+ "totalCo2WithLand_n2o": "Total CO2 equivalent emissions with land use, land-use change and forestry - N2O",
25220
+ "totalCo2WithLand_co2eq": "Total CO2 equivalent emissions with land use, land-use change and forestry - CO2-eq",
25221
+ // "state": "Status"
25222
+ };
25223
+ var projectionsCsvFieldMap = {
25224
+ "year": "Year",
25225
+ "energyEmissions_fuelCombustionActivities_transport_bau": "Transport - BAU",
25226
+ "energyEmissions_fuelCombustionActivities_transport_conditionalNdc": "Transport - Conditional NDC",
25227
+ "energyEmissions_fuelCombustionActivities_transport_unconditionalNdc": "Transport - Unconditional NDC",
25228
+ "energyEmissions_fuelCombustionActivities_nonSpecified_bau": "Non-Specified - BAU",
25229
+ "energyEmissions_fuelCombustionActivities_nonSpecified_conditionalNdc": "Non-Specified - Conditional NDC",
25230
+ "energyEmissions_fuelCombustionActivities_nonSpecified_unconditionalNdc": "Non-Specified - Unconditional NDC",
25231
+ "energyEmissions_fuelCombustionActivities_otherSectors_bau": "Other Sectors - BAU",
25232
+ "energyEmissions_fuelCombustionActivities_otherSectors_conditionalNdc": "Other Sectors - Conditional NDC",
25233
+ "energyEmissions_fuelCombustionActivities_otherSectors_unconditionalNdc": "Other Sectors - Unconditional NDC",
25234
+ "energyEmissions_fuelCombustionActivities_energyIndustries_bau": "Energy Industries - BAU",
25235
+ "energyEmissions_fuelCombustionActivities_energyIndustries_conditionalNdc": "Energy Industries - Conditional NDC",
25236
+ "energyEmissions_fuelCombustionActivities_energyIndustries_unconditionalNdc": "Energy Industries - Unconditional NDC",
25237
+ "energyEmissions_fuelCombustionActivities_manufacturingIndustriesConstruction_bau": "Manufacturing Industries and Construction - BAU",
25238
+ "energyEmissions_fuelCombustionActivities_manufacturingIndustriesConstruction_conditionalNdc": "Manufacturing Industries and Construction - Conditional NDC",
25239
+ "energyEmissions_fuelCombustionActivities_manufacturingIndustriesConstruction_unconditionalNdc": "Manufacturing Industries and Construction - Unconditional NDC",
25240
+ "energyEmissions_fugitiveEmissionsFromFuels_solidFuels_bau": "Solid Fuels - BAU",
25241
+ "energyEmissions_fugitiveEmissionsFromFuels_solidFuels_conditionalNdc": "Solid Fuels - Conditional NDC",
25242
+ "energyEmissions_fugitiveEmissionsFromFuels_solidFuels_unconditionalNdc": "Solid Fuels - Unconditional NDC",
25243
+ "energyEmissions_fugitiveEmissionsFromFuels_oilNaturalGas_bau": "Oil and Natural Gas - BAU",
25244
+ "energyEmissions_fugitiveEmissionsFromFuels_oilNaturalGas_conditionalNdc": "Oil and Natural Gas - Conditional NDC",
25245
+ "energyEmissions_fugitiveEmissionsFromFuels_oilNaturalGas_unconditionalNdc": "Oil and Natural Gas - Unconditional NDC",
25246
+ "energyEmissions_fugitiveEmissionsFromFuels_otherEmissionsEnergyProduction_bau": "Other emissions from Energy Production - BAU",
25247
+ "energyEmissions_fugitiveEmissionsFromFuels_otherEmissionsEnergyProduction_conditionalNdc": "Other emissions from Energy Production - Conditional NDC",
25248
+ "energyEmissions_fugitiveEmissionsFromFuels_otherEmissionsEnergyProduction_unconditionalNdc": "Other emissions from Energy Production - Unconditional NDC",
25249
+ "energyEmissions_carbonDioxideTransportStorage_other_bau": "Other (Carbon dioxide Transport and Storage) - BAU",
25250
+ "energyEmissions_carbonDioxideTransportStorage_other_conditionalNdc": "Other (Carbon dioxide Transport and Storage) - Conditional NDC",
25251
+ "energyEmissions_carbonDioxideTransportStorage_other_unconditionalNdc": "Other (Carbon dioxide Transport and Storage) - Unconditional NDC",
25252
+ "energyEmissions_carbonDioxideTransportStorage_transportOfCo2_bau": "Transport of CO2 - BAU",
25253
+ "energyEmissions_carbonDioxideTransportStorage_transportOfCo2_conditionalNdc": "Transport of CO2 - Conditional NDC",
25254
+ "energyEmissions_carbonDioxideTransportStorage_transportOfCo2_unconditionalNdc": "Transport of CO2 - Unconditional NDC",
25255
+ "energyEmissions_carbonDioxideTransportStorage_injectionStorage_bau": "Injection and Storage - BAU",
25256
+ "energyEmissions_carbonDioxideTransportStorage_injectionStorage_conditionalNdc": "Injection and Storage - Conditional NDC",
25257
+ "energyEmissions_carbonDioxideTransportStorage_injectionStorage_unconditionalNdc": "Injection and Storage - Unconditional NDC",
25258
+ "industrialProcessesProductUse_other_bau": "Other (Industrial Processes & Product Use) - BAU",
25259
+ "industrialProcessesProductUse_other_conditionalNdc": "Other (Industrial Processes & Product Use) - Conditional NDC",
25260
+ "industrialProcessesProductUse_other_unconditionalNdc": "Other (Industrial Processes & Product Use) - Unconditional NDC",
25261
+ "industrialProcessesProductUse_metalIndustry_bau": "Metal Industry - BAU",
25262
+ "industrialProcessesProductUse_metalIndustry_conditionalNdc": "Metal Industry - Conditional NDC",
25263
+ "industrialProcessesProductUse_metalIndustry_unconditionalNdc": "Metal Industry - Unconditional NDC",
25264
+ "industrialProcessesProductUse_mineralIndustry_bau": "Mineral Industry - BAU",
25265
+ "industrialProcessesProductUse_mineralIndustry_conditionalNdc": "Mineral Industry - Conditional NDC",
25266
+ "industrialProcessesProductUse_mineralIndustry_unconditionalNdc": "Mineral Industry - Unconditional NDC",
25267
+ "industrialProcessesProductUse_chemicalIndustry_bau": "Chemical Industry - BAU",
25268
+ "industrialProcessesProductUse_chemicalIndustry_conditionalNdc": "Chemical Industry - Conditional NDC",
25269
+ "industrialProcessesProductUse_chemicalIndustry_unconditionalNdc": "Chemical Industry - Unconditional NDC",
25270
+ "industrialProcessesProductUse_electronicsIndustry_bau": "Electronics Industry - BAU",
25271
+ "industrialProcessesProductUse_electronicsIndustry_conditionalNdc": "Electronics Industry - Conditional NDC",
25272
+ "industrialProcessesProductUse_electronicsIndustry_unconditionalNdc": "Electronics Industry - Unconditional NDC",
25273
+ "industrialProcessesProductUse_otherProductManufactureUse_bau": "Other Product Manufacture and Use - BAU",
25274
+ "industrialProcessesProductUse_otherProductManufactureUse_conditionalNdc": "Other Product Manufacture and Use - Conditional NDC",
25275
+ "industrialProcessesProductUse_otherProductManufactureUse_unconditionalNdc": "Other Product Manufacture and Use - Unconditional NDC",
25276
+ "industrialProcessesProductUse_nonEnergyProductsFuelsSolventUse_bau": "Non-Energy Products from Fuels and Solvent Use - BAU",
25277
+ "industrialProcessesProductUse_nonEnergyProductsFuelsSolventUse_conditionalNdc": "Non-Energy Products from Fuels and Solvent Use - Conditional NDC",
25278
+ "industrialProcessesProductUse_nonEnergyProductsFuelsSolventUse_unconditionalNdc": "Non-Energy Products from Fuels and Solvent Use - Unconditional NDC",
25279
+ "industrialProcessesProductUse_productUsesSubstOzoneDepletingSubs_bau": "Product Uses as Substitutes for Ozone Depleting Substances - BAU",
25280
+ "industrialProcessesProductUse_productUsesSubstOzoneDepletingSubs_conditionalNdc": "Product Uses as Substitutes for Ozone Depleting Substances - Conditional NDC",
25281
+ "industrialProcessesProductUse_productUsesSubstOzoneDepletingSubs_unconditionalNdc": "Product Uses as Substitutes for Ozone Depleting Substances - Unconditional NDC",
25282
+ "agricultureForestryOtherLandUse_land_bau": "Land - BAU",
25283
+ "agricultureForestryOtherLandUse_land_conditionalNdc": "Land - Conditional NDC",
25284
+ "agricultureForestryOtherLandUse_land_unconditionalNdc": "Land - Unconditional NDC",
25285
+ "agricultureForestryOtherLandUse_other_bau": "Other (Agriculture, Forestry, and Other Land Use) - BAU",
25286
+ "agricultureForestryOtherLandUse_other_conditionalNdc": "Other (Agriculture, Forestry, and Other Land Use) - Conditional NDC",
25287
+ "agricultureForestryOtherLandUse_other_unconditionalNdc": "Other (Agriculture, Forestry, and Other Land Use) - Unconditional NDC",
25288
+ "agricultureForestryOtherLandUse_livestock_bau": "Livestock - BAU",
25289
+ "agricultureForestryOtherLandUse_livestock_conditionalNdc": "Livestock - Conditional NDC",
25290
+ "agricultureForestryOtherLandUse_livestock_unconditionalNdc": "Livestock - Unconditional NDC",
25291
+ "agricultureForestryOtherLandUse_aggregateNonCo2SourcesLand_bau": "Aggregate sources and non-CO2 emissions sources on land - BAU",
25292
+ "agricultureForestryOtherLandUse_aggregateNonCo2SourcesLand_conditionalNdc": "Aggregate sources and non-CO2 emissions sources on land - Conditional NDC",
25293
+ "agricultureForestryOtherLandUse_aggregateNonCo2SourcesLand_unconditionalNdc": "Aggregate sources and non-CO2 emissions sources on land - Unconditional NDC",
25294
+ "waste_other_bau": "Other (Waste) - BAU",
25295
+ "waste_other_conditionalNdc": "Other (Waste) - Conditional NDC",
25296
+ "waste_other_unconditionalNdc": "Other (Waste) - Unconditional NDC",
25297
+ "waste_solidWasteDisposal_bau": "Solid Waste Disposal - BAU",
25298
+ "waste_solidWasteDisposal_conditionalNdc": "Solid Waste Disposal - Conditional NDC",
25299
+ "waste_solidWasteDisposal_unconditionalNdc": "Solid Waste Disposal - Unconditional NDC",
25300
+ "waste_incinerationOpenBurningWaste_bau": "Incineration and Open Burning of Waste - BAU",
25301
+ "waste_incinerationOpenBurningWaste_conditionalNdc": "Incineration and Open Burning of Waste - Conditional NDC",
25302
+ "waste_incinerationOpenBurningWaste_unconditionalNdc": "Incineration and Open Burning of Waste - Unconditional NDC",
25303
+ "waste_wastewaterTreatmentDischarge_bau": "Wastewater Treatment and Discharge - BAU",
25304
+ "waste_wastewaterTreatmentDischarge_conditionalNdc": "Wastewater Treatment and Discharge - Conditional NDC",
25305
+ "waste_wastewaterTreatmentDischarge_unconditionalNdc": "Wastewater Treatment and Discharge - Unconditional NDC",
25306
+ "waste_biologicalTreatmentSolidWaste_bau": "Biological Treatment of Solid Waste - BAU",
25307
+ "waste_biologicalTreatmentSolidWaste_conditionalNdc": "Biological Treatment of Solid Waste - Conditional NDC",
25308
+ "waste_biologicalTreatmentSolidWaste_unconditionalNdc": "Biological Treatment of Solid Waste - Unconditional NDC",
25309
+ "other_other_bau": "Other - BAU",
25310
+ "other_other_conditionalNdc": "Other - Conditional NDC",
25311
+ "other_other_unconditionalNdc": "Other - Unconditional NDC",
25312
+ "other_indirectN2oEmissions_bau": "Indirect N2O emissions from the atmospheric deposition of nitrogen in NOx and NH3 - BAU",
25313
+ "other_indirectN2oEmissions_conditionalNdc": "Indirect N2O emissions from the atmospheric deposition of nitrogen in NOx and NH3 - Conditional NDC",
25314
+ "other_indirectN2oEmissions_unconditionalNdc": "Indirect N2O emissions from the atmospheric deposition of nitrogen in NOx and NH3 - Unconditional NDC",
25315
+ "totalCo2WithoutLand_bau": "Total CO2 equivalent emissions without land use, land-use change and forestry - BAU",
25316
+ "totalCo2WithoutLand_conditionalNdc": "Total CO2 equivalent emissions without land use, land-use change and forestry - Conditional NDC",
25317
+ "totalCo2WithoutLand_unconditionalNdc": "Total CO2 equivalent emissions without land use, land-use change and forestry - Unconditional NDC",
25318
+ "totalCo2WithLand_bau": "Total CO2 equivalent emissions with land use, land-use change and forestry - BAU",
25319
+ "totalCo2WithLand_conditionalNdc": "Total CO2 equivalent emissions with land use, land-use change and forestry - Conditional NDC",
25320
+ "totalCo2WithLand_unconditionalNdc": "Total CO2 equivalent emissions with land use, land-use change and forestry - Unconditional NDC",
25321
+ // "state": "Status"
25322
+ };
25091
25323
 
25092
25324
  antd.Input.TextArea;
25093
25325
  var DiscardChangesConfirmationModel = function (props) {
@@ -26329,6 +26561,67 @@ var GHGEmissionsComponent = function (props) {
26329
26561
  React.createElement(antd.Col, { xl: 6 },
26330
26562
  React.createElement(antd.InputNumber, { value: co2eq, disabled: true }))))));
26331
26563
  };
26564
+ var objectToCSV = function (dataToDownload) {
26565
+ var flattenObject = function (obj, prefix) {
26566
+ if (prefix === void 0) { prefix = ''; }
26567
+ return Object.keys(obj).reduce(function (acc, key) {
26568
+ var pre = prefix.length ? "".concat(prefix, "_") : '';
26569
+ if (typeof obj[key] === 'object' && obj[key] !== null) {
26570
+ Object.assign(acc, flattenObject(obj[key], pre + key));
26571
+ }
26572
+ else {
26573
+ acc[pre + key] = obj[key];
26574
+ }
26575
+ return acc;
26576
+ }, {});
26577
+ };
26578
+ var headers = [];
26579
+ var contentKeys = [];
26580
+ var flattenedObj = flattenObject(dataToDownload);
26581
+ var objKeys = Object.keys(flattenedObj);
26582
+ objKeys.map(function (key) {
26583
+ if (emissionCsvFieldMap[key]) {
26584
+ headers.push(emissionCsvFieldMap[key]);
26585
+ contentKeys.push(key);
26586
+ }
26587
+ });
26588
+ var flattenedData = [dataToDownload].map(function (item) {
26589
+ var flattened = flattenObject(item);
26590
+ return contentKeys.map(function (header) { return flattened[header]; });
26591
+ });
26592
+ var csvContent = headers.map(function (header) { return "\"".concat(header, "\""); }).join(',') +
26593
+ '\n' +
26594
+ flattenedData.map(function (row) { return row.map(function (value) { return (value === undefined || value === null) ? "" : value; }).join(','); }).join('\n');
26595
+ return csvContent;
26596
+ };
26597
+ var downloadCSV = function (dataToDownload) {
26598
+ var csvContent = objectToCSV(dataToDownload);
26599
+ var encodedUri = encodeURI("data:text/csv;charset=utf-8,".concat(csvContent));
26600
+ var link = document.createElement('a');
26601
+ link.setAttribute('href', encodedUri);
26602
+ link.setAttribute('download', "GHG-Reporting Emission_".concat(dataToDownload.year, "_V").concat(dataToDownload.version, ".csv"));
26603
+ document.body.appendChild(link);
26604
+ link.click();
26605
+ };
26606
+ var isRowDataEmpty = function (emissionDataObj) {
26607
+ if (emissionDataObj == undefined || emissionDataObj == null) {
26608
+ return true;
26609
+ }
26610
+ var co2 = emissionDataObj === null || emissionDataObj === void 0 ? void 0 : emissionDataObj.co2;
26611
+ var ch4 = emissionDataObj === null || emissionDataObj === void 0 ? void 0 : emissionDataObj.ch4;
26612
+ var n2o = emissionDataObj === null || emissionDataObj === void 0 ? void 0 : emissionDataObj.n2o;
26613
+ var co2eq = emissionDataObj === null || emissionDataObj === void 0 ? void 0 : emissionDataObj.co2eq;
26614
+ if (!co2 && !ch4 && !n2o && !co2eq) {
26615
+ return true;
26616
+ }
26617
+ return false;
26618
+ };
26619
+ var isSectionDataEmpty = function (sectionTotalCo2, sectionTotalCh4, sectionTotalN2o, sectionTotalCo2eq) {
26620
+ if (!sectionTotalCo2 && !sectionTotalCh4 && !sectionTotalN2o && !sectionTotalCo2eq) {
26621
+ return true;
26622
+ }
26623
+ return false;
26624
+ };
26332
26625
  return (React.createElement("div", null,
26333
26626
  React.createElement("div", { className: "content-container emission-tab-container" },
26334
26627
  React.createElement("div", { className: "emission-title-bar" },
@@ -26509,7 +26802,8 @@ var GHGEmissionsComponent = function (props) {
26509
26802
  React.createElement(antd.Button, { className: "submit-btn", type: "primary", htmlType: "submit", loading: loading }, "Submit"),
26510
26803
  React.createElement(antd.Button, { className: "back-btn", onClick: onOpenResetFormModel, loading: loading }, "Cancel")))))),
26511
26804
  data.map(function (tabData) {
26512
- return tabData.state === 'FINALIZED' && (React.createElement(antd.Tabs.TabPane, { key: tabData.id.toString(), tab: React.createElement("span", null,
26805
+ var _a, _b, _c, _d, _e, _f, _g, _h;
26806
+ return tabData.state === 'FINALIZED' && (React.createElement(antd.Tabs.TabPane, { className: 'view-data-panel', key: tabData.id.toString(), tab: React.createElement("span", null,
26513
26807
  tabData.year,
26514
26808
  tabData.state === 'FINALIZED' && React.createElement(icons.LockFilled, { style: { marginLeft: 5 } })) },
26515
26809
  React.createElement("div", null,
@@ -26521,39 +26815,10 @@ var GHGEmissionsComponent = function (props) {
26521
26815
  React.createElement(antd.Col, { xl: 12, md: 12, className: "add-new-upload-file-col" },
26522
26816
  React.createElement(antd.Row, { className: "add-new-upload-file-label" }, t("ghgInventory:emissionRemovalDocument")),
26523
26817
  React.createElement(antd.Row, null,
26524
- React.createElement(antd.Col, { xl: 5, md: 5, className: "add-new-upload-file-inner-col" },
26525
- React.createElement(antd.Form.Item, null,
26526
- React.createElement(antd.Upload, { accept: ".xlsx", customRequest: function (_a) {
26527
- _a.onSuccess; _a.onError; _a.file;
26528
- var reader = new FileReader();
26529
- reader.onload = function (e) {
26530
- if (e && e.target) {
26531
- // Check if e and e.target are defined
26532
- var xldata = e.target.result;
26533
- if (xldata) {
26534
- try {
26535
- var workbook = XLSX__namespace.read(xldata, { type: 'array' });
26536
- var sheetName = workbook.SheetNames[0];
26537
- var sheet = workbook.Sheets[sheetName];
26538
- var excelData = XLSX__namespace.utils.sheet_to_json(sheet);
26539
- // Use excelData as needed, e.g., display it in a table.
26540
- console.log(excelData);
26541
- // You can perform any further processing with the data here.
26542
- // For example, you can call a function to handle the uploaded data.
26543
- // handleFileUpload(excelData);
26544
- // onSuccess('ok', file);
26545
- }
26546
- catch (error) {
26547
- // onError(error, 'error', file);
26548
- }
26549
- }
26550
- }
26551
- };
26552
- // reader.readAsArrayBuffer(file);
26553
- } },
26554
- React.createElement(antd.Button, { icon: React.createElement(icons.UploadOutlined, null) }, t("ghgInventory:upload"))))),
26555
- React.createElement(antd.Col, { xl: 16, md: 16, className: "add-new-upload-file-name-input" },
26556
- React.createElement(antd.Input, { value: uploadedFileName, readOnly: true }))))),
26818
+ React.createElement(antd.Col, { xl: 15, md: 15, className: "view-download-file-name-input" },
26819
+ React.createElement(antd.Input, { value: "GHG-Reporting Emission_".concat(tabData.year, "_V").concat(tabData.version, ".csv"), disabled: true })),
26820
+ React.createElement(antd.Col, { xl: 5, md: 5, className: "view-download-file-inner-col" },
26821
+ React.createElement(antd.Button, { icon: React.createElement(icons.DownloadOutlined, null), onClick: function () { downloadCSV(tabData); } }, t("ghgInventory:download")))))),
26557
26822
  React.createElement(antd.Row, { gutter: 16 },
26558
26823
  React.createElement(antd.Col, { span: 9, offset: 12 },
26559
26824
  React.createElement(antd.Row, { gutter: 16, className: "table-heading-row" },
@@ -26589,38 +26854,82 @@ var GHGEmissionsComponent = function (props) {
26589
26854
  return isActive ? React.createElement(icons.MinusCircleOutlined, null) : React.createElement(icons.PlusCircleOutlined, null);
26590
26855
  } }, Object.entries(formFields).map(function (_a) {
26591
26856
  var panelHeading = _a[0], panelContent = _a[1];
26592
- return (React.createElement(Panel, { header: renderPanelHeaderView(panelHeading, tabData), key: panelHeading }, Array.isArray(panelContent)
26593
- ? panelContent.map(function (item, index) {
26594
- for (var key in tabData) {
26595
- if (key === panelHeading) {
26596
- var emissionsObject = tabData[key];
26597
- var emissionsData = emissionsObject[item];
26598
- return renderPanelContentView(emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.co2, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.ch4, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.n2o, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.co2eq, item, index);
26599
- }
26600
- }
26601
- })
26602
- : Object.entries(panelContent).map(function (_a) {
26603
- var subPanelHeading = _a[0], subPanelContent = _a[1];
26604
- return (React.createElement("div", { className: "sub-panel" },
26605
- React.createElement("div", { className: "sub-panel-heading" }, renderPanelHeaderView(subPanelHeading, tabData.energyEmissions)),
26606
- subPanelContent.map(function (item, index) {
26607
- for (var key in tabData.energyEmissions[subPanelHeading]) {
26608
- if (key === item) {
26609
- var emissionsObject = tabData.energyEmissions[subPanelHeading];
26610
- var emissionsData = emissionsObject[item];
26857
+ var emissionsObject = tabData[panelHeading];
26858
+ var sectionTotalCo2 = calculateSumEmissionView(emissionsObject, 'co2');
26859
+ var sectionTotalCh4 = calculateSumEmissionView(emissionsObject, 'ch4');
26860
+ var sectionTotalN2o = calculateSumEmissionView(emissionsObject, 'n2o');
26861
+ var sectionTotalCo2eq = calculateSumEmissionView(emissionsObject, 'co2eq');
26862
+ if (!isSectionDataEmpty(sectionTotalCo2, sectionTotalCh4, sectionTotalN2o, sectionTotalCo2eq)) {
26863
+ return (React.createElement(Panel, { header: renderPanelHeaderView(panelHeading, tabData), key: panelHeading }, Array.isArray(panelContent)
26864
+ ? panelContent.map(function (item, index) {
26865
+ for (var key in tabData) {
26866
+ if (key === panelHeading) {
26867
+ var emissionsObject_1 = tabData[key];
26868
+ var emissionsData = emissionsObject_1[item];
26869
+ if (!isRowDataEmpty(emissionsData)) {
26611
26870
  return renderPanelContentView(emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.co2, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.ch4, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.n2o, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.co2eq, item, index);
26612
26871
  }
26613
26872
  }
26614
- })));
26615
- })));
26616
- })))));
26873
+ }
26874
+ })
26875
+ : Object.entries(panelContent).map(function (_a) {
26876
+ var subPanelHeading = _a[0], subPanelContent = _a[1];
26877
+ var emissionsObject = tabData.energyEmissions[subPanelHeading];
26878
+ var sectionTotalCo2 = calculateSumEmissionView(emissionsObject, 'co2');
26879
+ var sectionTotalCh4 = calculateSumEmissionView(emissionsObject, 'ch4');
26880
+ var sectionTotalN2o = calculateSumEmissionView(emissionsObject, 'n2o');
26881
+ var sectionTotalCo2eq = calculateSumEmissionView(emissionsObject, 'co2eq');
26882
+ if (!isSectionDataEmpty(sectionTotalCo2, sectionTotalCh4, sectionTotalN2o, sectionTotalCo2eq)) {
26883
+ return (React.createElement("div", { className: "sub-panel" },
26884
+ React.createElement("div", { className: "sub-panel-heading" }, renderPanelHeaderView(subPanelHeading, tabData.energyEmissions)),
26885
+ subPanelContent.map(function (item, index) {
26886
+ for (var key in tabData.energyEmissions[subPanelHeading]) {
26887
+ if (key === item) {
26888
+ var emissionsObject_2 = tabData.energyEmissions[subPanelHeading];
26889
+ var emissionsData = emissionsObject_2[item];
26890
+ if (!isRowDataEmpty(emissionsData)) {
26891
+ return renderPanelContentView(emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.co2, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.ch4, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.n2o, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.co2eq, item, index);
26892
+ }
26893
+ }
26894
+ }
26895
+ })));
26896
+ }
26897
+ })));
26898
+ }
26899
+ })),
26900
+ (!isRowDataEmpty(tabData.totalCo2WithoutLand)) && (React.createElement(antd.Row, { gutter: 16, key: 'totalCo2WithoutLand', className: "total-co2-without-land-row" },
26901
+ React.createElement(antd.Col, { xl: 12, md: 12, className: "total-co2-without-land-title" },
26902
+ React.createElement("span", null, t("ghgInventory:totalCo2WithoutLand"))),
26903
+ React.createElement(antd.Col, { xl: 9, md: 9 },
26904
+ React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row" },
26905
+ React.createElement(antd.Col, { xl: 6 },
26906
+ React.createElement(antd.InputNumber, { value: (_a = tabData.totalCo2WithoutLand) === null || _a === void 0 ? void 0 : _a.co2, disabled: true })),
26907
+ React.createElement(antd.Col, { xl: 6 },
26908
+ React.createElement(antd.InputNumber, { value: (_b = tabData.totalCo2WithoutLand) === null || _b === void 0 ? void 0 : _b.ch4, disabled: true })),
26909
+ React.createElement(antd.Col, { xl: 6 },
26910
+ React.createElement(antd.InputNumber, { value: (_c = tabData.totalCo2WithoutLand) === null || _c === void 0 ? void 0 : _c.n2o, disabled: true })),
26911
+ React.createElement(antd.Col, { xl: 6 },
26912
+ React.createElement(antd.InputNumber, { value: (_d = tabData.totalCo2WithoutLand) === null || _d === void 0 ? void 0 : _d.co2eq, disabled: true })))))),
26913
+ (!isRowDataEmpty(tabData.totalCo2WithLand)) && (React.createElement(antd.Row, { gutter: 16, key: 'totalCo2WithLand', className: "total-co2-with-land-row" },
26914
+ React.createElement(antd.Col, { xl: 12, md: 12, className: "total-co2-with-land-title" },
26915
+ React.createElement("span", null, t("ghgInventory:totalCo2WithLand"))),
26916
+ React.createElement(antd.Col, { xl: 9, md: 9 },
26917
+ React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row" },
26918
+ React.createElement(antd.Col, { xl: 6 },
26919
+ React.createElement(antd.InputNumber, { value: (_e = tabData.totalCo2WithLand) === null || _e === void 0 ? void 0 : _e.co2, disabled: true })),
26920
+ React.createElement(antd.Col, { xl: 6 },
26921
+ React.createElement(antd.InputNumber, { value: (_f = tabData.totalCo2WithLand) === null || _f === void 0 ? void 0 : _f.ch4, disabled: true })),
26922
+ React.createElement(antd.Col, { xl: 6 },
26923
+ React.createElement(antd.InputNumber, { value: (_g = tabData.totalCo2WithLand) === null || _g === void 0 ? void 0 : _g.n2o, disabled: true })),
26924
+ React.createElement(antd.Col, { xl: 6 },
26925
+ React.createElement(antd.InputNumber, { value: (_h = tabData.totalCo2WithLand) === null || _h === void 0 ? void 0 : _h.co2eq, disabled: true })))))))));
26617
26926
  })))),
26618
26927
  React.createElement(GHGUserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onSubmitForm, onActionCanceled: onSaveFormCanceled, openModal: openSaveFormModal, errorMsg: errorMsg, loading: loading }),
26619
26928
  React.createElement(GHGUserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onSubmitForm, onActionCanceled: onFinalizeFormCanceled, openModal: openFinalizeFormModal, errorMsg: errorMsg, loading: loading }),
26620
26929
  React.createElement(DiscardChangesConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: resetForm, onActionCanceled: onResetFormCanceled, openModal: openResetFormModal, errorMsg: errorMsg, loading: loading })));
26621
26930
  };
26622
26931
 
26623
- var css_248z = ".ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n background: #16b1ff !important;\n line-height: 30px !important; }\n\n.ant-picker-cell-disabled::before {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n line-height: 30px !important; }\n\n.ant-picker-cell::before {\n left: 11px; }\n\n.ant-input-suffix {\n display: flex;\n flex: none;\n align-items: center;\n height: 50px; }\n .ant-input-suffix button {\n border: none;\n color: #8C8C8C; }\n\n.ant-input-affix-wrapper {\n padding: 0 11px;\n border-radius: 5px; }\n\n.projection-tab-container .add-projection {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .projection-tab-container .add-projection .add-new-year-picker-col {\n padding-left: 5%; }\n .projection-tab-container .add-projection .ant-picker {\n border-radius: 5px !important;\n height: 50px !important;\n width: 80%; }\n .projection-tab-container .add-projection .add-new-upload-file-label {\n color: rgba(58, 53, 65, 0.5);\n padding: 0 0 8px;\n line-height: 1.5715;\n white-space: initial;\n text-align: left; }\n .projection-tab-container .add-projection .add-new-upload-file-name-input input {\n height: 50px;\n color: #16b1ff; }\n .projection-tab-container .add-projection .add-new-upload-file-inner-col button {\n height: 50px;\n font-size: 11px;\n width: 120px; }\n .projection-tab-container .add-projection .table-heading-row {\n padding-top: 20px;\n padding-bottom: 25px;\n margin-left: 10px !important; }\n .projection-tab-container .add-projection .table-heading-row .table-heading-col {\n text-align: center;\n font-size: 16px;\n font-weight: 600;\n color: #28282899; }\n .projection-tab-container .add-projection .total-emission-row {\n padding: 12px 16px;\n margin-left: 30px !important; }\n .projection-tab-container .add-projection .total-emission-row span {\n font-size: 20px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-emission-row .total-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .panel-header-col {\n font-size: 20px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .panel-header-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .sub-panel .panel-header-emission-value-col {\n border-bottom: none !important;\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .sub-panel-heading {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n margin-top: 35px; }\n .projection-tab-container .add-projection .sub-panel-heading .panel-header-col {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .ant-collapse-ghost > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {\n padding-top: 0px;\n padding-bottom: 12px;\n margin-left: 25px; }\n .projection-tab-container .add-projection .ant-collapse-expand-icon {\n margin-top: 5px; }\n .projection-tab-container .add-projection .ant-collapse-expand-icon svg {\n font-size: 20px;\n color: #976ED7; }\n .projection-tab-container .add-projection .ant-collapse {\n margin-left: 10px; }\n .projection-tab-container .add-projection .co2-total-pill {\n border-radius: 20px;\n background-color: rgba(145, 85, 253, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .projection-tab-container .add-projection .ch4-total-pill {\n border-radius: 20px;\n background-color: rgba(217, 217, 217, 0.6);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .projection-tab-container .add-projection .n2o-total-pill {\n border-radius: 20px;\n background-color: rgba(185, 226, 244, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .projection-tab-container .add-projection .co2eq-total-pill {\n border-radius: 20px;\n background-color: rgba(255, 166, 166, 0.6);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .projection-tab-container .add-projection .panel-content-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n height: 68px;\n align-items: center; }\n .projection-tab-container .add-projection .panel-content-row .panel-content-title {\n font-size: 16px;\n font-weight: 500;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .panel-content-input-box-row {\n margin-top: 14px; }\n .projection-tab-container .add-projection .panel-content-input-box-row .ant-input-number {\n height: 40px;\n width: 50px;\n margin-left: 35%; }\n .projection-tab-container .add-projection .total-co2-without-land-row {\n margin-left: 40px !important;\n align-items: center;\n margin-top: 50px; }\n .projection-tab-container .add-projection .total-co2-without-land-row .total-co2-without-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-co2-without-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .projection-tab-container .add-projection .total-co2-with-land-row {\n margin-left: 40px !important;\n align-items: center; }\n .projection-tab-container .add-projection .total-co2-with-land-row .total-co2-with-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-co2-with-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .projection-tab-container .add-projection .steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n margin-top: 3rem; }\n .projection-tab-container .add-projection .steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .submit-btn {\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n @media only screen and (max-width: 1600px) {\n .projection-tab-container .add-projection .panel-content-input-box-row .ant-input-number {\n margin-left: 30%; } }\n";
26932
+ var css_248z = ".ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n background: #16b1ff !important;\n line-height: 30px !important; }\n\n.ant-picker-cell-disabled::before {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n line-height: 30px !important; }\n\n.ant-picker-cell::before {\n left: 11px; }\n\n.ant-input-suffix {\n display: flex;\n flex: none;\n align-items: center;\n height: 50px; }\n .ant-input-suffix button {\n border: none;\n color: #8C8C8C; }\n\n.ant-input-affix-wrapper {\n padding: 0 11px;\n border-radius: 5px; }\n\n.projection-tab-container .add-projection {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .projection-tab-container .add-projection .add-new-year-picker-col {\n padding-left: 5%; }\n .projection-tab-container .add-projection .ant-picker {\n border-radius: 5px !important;\n height: 50px !important;\n width: 80%; }\n .projection-tab-container .add-projection .add-new-upload-file-label {\n color: rgba(58, 53, 65, 0.5);\n padding: 0 0 8px;\n line-height: 1.5715;\n white-space: initial;\n text-align: left; }\n .projection-tab-container .add-projection .add-new-upload-file-name-input input {\n height: 50px;\n color: #16b1ff; }\n .projection-tab-container .add-projection .add-new-upload-file-inner-col button {\n height: 50px;\n font-size: 11px;\n width: 120px; }\n .projection-tab-container .add-projection .view-download-file-name-input input {\n height: 50px;\n color: #16b1ff; }\n .projection-tab-container .add-projection .view-download-file-inner-col button {\n height: 50px;\n font-size: 12px;\n font-weight: 400;\n width: 135px;\n margin-left: 5px;\n color: #8C8C8C;\n border-radius: 4px; }\n .projection-tab-container .add-projection .table-heading-row {\n padding-top: 20px;\n padding-bottom: 25px;\n margin-left: 10px !important; }\n .projection-tab-container .add-projection .table-heading-row .table-heading-col {\n text-align: center;\n font-size: 16px;\n font-weight: 600;\n color: #28282899; }\n .projection-tab-container .add-projection .total-emission-row {\n padding: 12px 16px;\n margin-left: 30px !important; }\n .projection-tab-container .add-projection .total-emission-row span {\n font-size: 20px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-emission-row .total-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .panel-header-col {\n font-size: 20px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .panel-header-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .sub-panel .panel-header-emission-value-col {\n border-bottom: none !important;\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .sub-panel-heading {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n margin-top: 35px; }\n .projection-tab-container .add-projection .sub-panel-heading .panel-header-col {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .ant-collapse-ghost > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {\n padding-top: 0px;\n padding-bottom: 12px;\n margin-left: 25px; }\n .projection-tab-container .add-projection .ant-collapse-expand-icon {\n margin-top: 5px; }\n .projection-tab-container .add-projection .ant-collapse-expand-icon svg {\n font-size: 20px;\n color: #976ED7; }\n .projection-tab-container .add-projection .ant-collapse {\n margin-left: 10px; }\n .projection-tab-container .add-projection .co2-total-pill {\n border-radius: 20px;\n background-color: rgba(145, 85, 253, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .projection-tab-container .add-projection .ch4-total-pill {\n border-radius: 20px;\n background-color: rgba(217, 217, 217, 0.6);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .projection-tab-container .add-projection .n2o-total-pill {\n border-radius: 20px;\n background-color: rgba(185, 226, 244, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .projection-tab-container .add-projection .co2eq-total-pill {\n border-radius: 20px;\n background-color: rgba(255, 166, 166, 0.6);\n padding: 4px 15px;\n height: 28px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n .projection-tab-container .add-projection .panel-content-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n height: 68px;\n align-items: center; }\n .projection-tab-container .add-projection .panel-content-row .panel-content-title {\n font-size: 16px;\n font-weight: 500;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .panel-content-input-box-row {\n margin-top: 14px; }\n .projection-tab-container .add-projection .panel-content-input-box-row .ant-input-number {\n height: 40px;\n width: 50px;\n margin-left: 35%; }\n .projection-tab-container .add-projection .total-co2-without-land-row {\n margin-left: 40px !important;\n align-items: center;\n margin-top: 50px; }\n .projection-tab-container .add-projection .total-co2-without-land-row .total-co2-without-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-co2-without-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .projection-tab-container .add-projection .total-co2-with-land-row {\n margin-left: 40px !important;\n align-items: center; }\n .projection-tab-container .add-projection .total-co2-with-land-row .total-co2-with-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-co2-with-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .projection-tab-container .add-projection .view-data-panel .panel-content-input-box-row {\n padding-bottom: 24px; }\n .projection-tab-container .add-projection .steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n margin-top: 3rem; }\n .projection-tab-container .add-projection .steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .submit-btn {\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n @media only screen and (max-width: 1600px) {\n .projection-tab-container .add-projection .panel-content-input-box-row .ant-input-number {\n margin-left: 30%; } }\n";
26624
26933
  styleInject(css_248z);
26625
26934
 
26626
26935
  var ProjectionTypes = {
@@ -27670,6 +27979,66 @@ var GHGProjectionsComponent = function (props) {
27670
27979
  React.createElement(antd.Col, { xl: 7 },
27671
27980
  React.createElement(antd.InputNumber, { value: unconditionalNdc, disabled: true }))))));
27672
27981
  };
27982
+ var objectToCSV = function (dataToDownload) {
27983
+ var flattenObject = function (obj, prefix) {
27984
+ if (prefix === void 0) { prefix = ''; }
27985
+ return Object.keys(obj).reduce(function (acc, key) {
27986
+ var pre = prefix.length ? "".concat(prefix, "_") : '';
27987
+ if (typeof obj[key] === 'object' && obj[key] !== null) {
27988
+ Object.assign(acc, flattenObject(obj[key], pre + key));
27989
+ }
27990
+ else {
27991
+ acc[pre + key] = obj[key];
27992
+ }
27993
+ return acc;
27994
+ }, {});
27995
+ };
27996
+ var headers = [];
27997
+ var contentKeys = [];
27998
+ var flattenedObj = flattenObject(dataToDownload);
27999
+ var objKeys = Object.keys(flattenedObj);
28000
+ objKeys.map(function (key) {
28001
+ if (projectionsCsvFieldMap[key]) {
28002
+ headers.push(projectionsCsvFieldMap[key]);
28003
+ contentKeys.push(key);
28004
+ }
28005
+ });
28006
+ var flattenedData = [dataToDownload].map(function (item) {
28007
+ var flattened = flattenObject(item);
28008
+ return contentKeys.map(function (header) { return flattened[header]; });
28009
+ });
28010
+ var csvContent = headers.map(function (header) { return "\"".concat(header, "\""); }).join(',') +
28011
+ '\n' +
28012
+ flattenedData.map(function (row) { return row.map(function (value) { return (value === undefined || value === null) ? "" : value; }).join(','); }).join('\n');
28013
+ return csvContent;
28014
+ };
28015
+ var downloadCSV = function (dataToDownload) {
28016
+ var csvContent = objectToCSV(dataToDownload);
28017
+ var encodedUri = encodeURI("data:text/csv;charset=utf-8,".concat(csvContent));
28018
+ var link = document.createElement('a');
28019
+ link.setAttribute('href', encodedUri);
28020
+ link.setAttribute('download', "GHG-Reporting Projections_".concat(dataToDownload.year, "_V").concat(dataToDownload.version, ".csv"));
28021
+ document.body.appendChild(link);
28022
+ link.click();
28023
+ };
28024
+ var isRowDataEmpty = function (projectionDataObj) {
28025
+ if (projectionDataObj == undefined || projectionDataObj == null) {
28026
+ return true;
28027
+ }
28028
+ var bau = projectionDataObj === null || projectionDataObj === void 0 ? void 0 : projectionDataObj.bau;
28029
+ var conditionalNdc = projectionDataObj === null || projectionDataObj === void 0 ? void 0 : projectionDataObj.conditionalNdc;
28030
+ var unconditionalNdc = projectionDataObj === null || projectionDataObj === void 0 ? void 0 : projectionDataObj.unconditionalNdc;
28031
+ if (!bau && !conditionalNdc && !unconditionalNdc) {
28032
+ return true;
28033
+ }
28034
+ return false;
28035
+ };
28036
+ var isSectionDataEmpty = function (sectionTotalBau, sectionTotalConditionalNdc, sectionTotalUnconditionalNdc) {
28037
+ if (!sectionTotalBau && !sectionTotalConditionalNdc && !sectionTotalUnconditionalNdc) {
28038
+ return true;
28039
+ }
28040
+ return false;
28041
+ };
27673
28042
  return (React.createElement("div", null,
27674
28043
  React.createElement("div", { className: "content-container projection-tab-container" },
27675
28044
  React.createElement("div", { className: "projection-title-bar" },
@@ -27832,7 +28201,8 @@ var GHGProjectionsComponent = function (props) {
27832
28201
  React.createElement(antd.Button, { className: "submit-btn", type: "primary", htmlType: "submit", loading: loading }, "Submit"),
27833
28202
  React.createElement(antd.Button, { className: "back-btn", onClick: onOpenResetFormModel, loading: loading }, "Cancel")))))),
27834
28203
  data.map(function (tabData) {
27835
- return tabData.state === 'FINALIZED' && (React.createElement(antd.Tabs.TabPane, { key: tabData.id.toString(), tab: React.createElement("span", null,
28204
+ var _a, _b, _c, _d, _e, _f;
28205
+ return tabData.state === 'FINALIZED' && (React.createElement(antd.Tabs.TabPane, { className: 'view-data-panel', key: tabData.id.toString(), tab: React.createElement("span", null,
27836
28206
  tabData.year,
27837
28207
  tabData.state === 'FINALIZED' && React.createElement(icons.LockFilled, { style: { marginLeft: 5 } })) },
27838
28208
  React.createElement("div", null,
@@ -27848,39 +28218,10 @@ var GHGProjectionsComponent = function (props) {
27848
28218
  React.createElement(antd.Col, { xl: 12, md: 12, className: "add-new-upload-file-col" },
27849
28219
  React.createElement(antd.Row, { className: "add-new-upload-file-label" }, t("ghgInventory:emissionRemovalDocument")),
27850
28220
  React.createElement(antd.Row, null,
27851
- React.createElement(antd.Col, { xl: 5, md: 5, className: "add-new-upload-file-inner-col" },
27852
- React.createElement(antd.Form.Item, null,
27853
- React.createElement(antd.Upload, { accept: ".xlsx", customRequest: function (_a) {
27854
- _a.onSuccess; _a.onError; _a.file;
27855
- var reader = new FileReader();
27856
- reader.onload = function (e) {
27857
- if (e && e.target) {
27858
- // Check if e and e.target are defined
27859
- var xldata = e.target.result;
27860
- if (xldata) {
27861
- try {
27862
- var workbook = XLSX__namespace.read(xldata, { type: 'array' });
27863
- var sheetName = workbook.SheetNames[0];
27864
- var sheet = workbook.Sheets[sheetName];
27865
- var excelData = XLSX__namespace.utils.sheet_to_json(sheet);
27866
- // Use excelData as needed, e.g., display it in a table.
27867
- console.log(excelData);
27868
- // You can perform any further processing with the data here.
27869
- // For example, you can call a function to handle the uploaded data.
27870
- // handleFileUpload(excelData);
27871
- // onSuccess('ok', file);
27872
- }
27873
- catch (error) {
27874
- // onError(error, 'error', file);
27875
- }
27876
- }
27877
- }
27878
- };
27879
- // reader.readAsArrayBuffer(file);
27880
- } },
27881
- React.createElement(antd.Button, { icon: React.createElement(icons.UploadOutlined, null) }, t("ghgInventory:upload"))))),
27882
- React.createElement(antd.Col, { xl: 16, md: 16, className: "add-new-upload-file-name-input" },
27883
- React.createElement(antd.Input, { value: uploadedFileName, readOnly: true }))))),
28221
+ React.createElement(antd.Col, { xl: 15, md: 15, className: "view-download-file-name-input" },
28222
+ React.createElement(antd.Input, { value: "GHG-Reporting Emission_".concat(tabData.year, "_V").concat(tabData.version, ".csv"), disabled: true })),
28223
+ React.createElement(antd.Col, { xl: 5, md: 5, className: "view-download-file-inner-col" },
28224
+ React.createElement(antd.Button, { icon: React.createElement(icons.DownloadOutlined, null), onClick: function () { downloadCSV(tabData); } }, t("ghgInventory:download")))))),
27884
28225
  React.createElement(antd.Row, { gutter: 16 },
27885
28226
  React.createElement(antd.Col, { span: 9, offset: 12 },
27886
28227
  React.createElement(antd.Row, { gutter: 16, className: "table-heading-row" },
@@ -27903,31 +28244,69 @@ var GHGProjectionsComponent = function (props) {
27903
28244
  return isActive ? React.createElement(icons.MinusCircleOutlined, null) : React.createElement(icons.PlusCircleOutlined, null);
27904
28245
  } }, Object.entries(formFields).map(function (_a) {
27905
28246
  var panelHeading = _a[0], panelContent = _a[1];
27906
- return (React.createElement(Panel, { header: renderPanelHeaderView(panelHeading, tabData), key: panelHeading }, Array.isArray(panelContent)
27907
- ? panelContent.map(function (item, index) {
27908
- for (var key in tabData) {
27909
- if (key === panelHeading) {
27910
- var emissionsObject = tabData[key];
27911
- var emissionsData = emissionsObject[item];
27912
- return renderPanelContentView(emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.bau, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.conditionalNdc, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.unconditionalNdc, item, index);
27913
- }
27914
- }
27915
- })
27916
- : Object.entries(panelContent).map(function (_a) {
27917
- var subPanelHeading = _a[0], subPanelContent = _a[1];
27918
- return (React.createElement("div", { className: "sub-panel" },
27919
- React.createElement("div", { className: "sub-panel-heading" }, renderPanelHeaderView(subPanelHeading, tabData.energyEmissions)),
27920
- subPanelContent.map(function (item, index) {
27921
- for (var key in tabData.energyEmissions[subPanelHeading]) {
27922
- if (key === item) {
27923
- var emissionsObject = tabData.energyEmissions[subPanelHeading];
27924
- var emissionsData = emissionsObject[item];
28247
+ var projectionsObject = tabData[panelHeading];
28248
+ var sectionTotalBau = calculateSumEmissionView(projectionsObject, 'bau');
28249
+ var sectionTotalConditionalNdc = calculateSumEmissionView(projectionsObject, 'conditionalNdc');
28250
+ var sectionTotalUnconditionalNdc = calculateSumEmissionView(projectionsObject, 'unconditionalNdc');
28251
+ if (!isSectionDataEmpty(sectionTotalBau, sectionTotalConditionalNdc, sectionTotalUnconditionalNdc)) {
28252
+ return (React.createElement(Panel, { header: renderPanelHeaderView(panelHeading, tabData), key: panelHeading }, Array.isArray(panelContent)
28253
+ ? panelContent.map(function (item, index) {
28254
+ for (var key in tabData) {
28255
+ if (key === panelHeading) {
28256
+ var emissionsObject = tabData[key];
28257
+ var emissionsData = emissionsObject[item];
28258
+ if (!isRowDataEmpty(emissionsData)) {
27925
28259
  return renderPanelContentView(emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.bau, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.conditionalNdc, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.unconditionalNdc, item, index);
27926
28260
  }
27927
28261
  }
27928
- })));
27929
- })));
27930
- })))));
28262
+ }
28263
+ })
28264
+ : Object.entries(panelContent).map(function (_a) {
28265
+ var subPanelHeading = _a[0], subPanelContent = _a[1];
28266
+ var projectionsObject = tabData.energyEmissions[subPanelHeading];
28267
+ var sectionTotalBau = calculateSumEmissionView(projectionsObject, 'bau');
28268
+ var sectionTotalConditionalNdc = calculateSumEmissionView(projectionsObject, 'conditionalNdc');
28269
+ var sectionTotalUnconditionalNdc = calculateSumEmissionView(projectionsObject, 'unconditionalNdc');
28270
+ if (!isSectionDataEmpty(sectionTotalBau, sectionTotalConditionalNdc, sectionTotalUnconditionalNdc)) {
28271
+ return (React.createElement("div", { className: "sub-panel" },
28272
+ React.createElement("div", { className: "sub-panel-heading" }, renderPanelHeaderView(subPanelHeading, tabData.energyEmissions)),
28273
+ subPanelContent.map(function (item, index) {
28274
+ for (var key in tabData.energyEmissions[subPanelHeading]) {
28275
+ if (key === item) {
28276
+ var emissionsObject = tabData.energyEmissions[subPanelHeading];
28277
+ var emissionsData = emissionsObject[item];
28278
+ if (!isRowDataEmpty(emissionsData)) {
28279
+ return renderPanelContentView(emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.bau, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.conditionalNdc, emissionsData === null || emissionsData === void 0 ? void 0 : emissionsData.unconditionalNdc, item, index);
28280
+ }
28281
+ }
28282
+ }
28283
+ })));
28284
+ }
28285
+ })));
28286
+ }
28287
+ })),
28288
+ (!isRowDataEmpty(tabData.totalCo2WithoutLand)) && (React.createElement(antd.Row, { gutter: 16, key: 'totalCo2WithoutLand', className: "total-co2-without-land-row" },
28289
+ React.createElement(antd.Col, { xl: 12, md: 12, className: "total-co2-without-land-title" },
28290
+ React.createElement("span", null, t("ghgInventory:totalCo2WithoutLand"))),
28291
+ React.createElement(antd.Col, { xl: 9, md: 9 },
28292
+ React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row" },
28293
+ React.createElement(antd.Col, { xl: 7 },
28294
+ React.createElement(antd.InputNumber, { value: (_a = tabData.totalCo2WithoutLand) === null || _a === void 0 ? void 0 : _a.bau, disabled: true })),
28295
+ React.createElement(antd.Col, { xl: 7 },
28296
+ React.createElement(antd.InputNumber, { value: (_b = tabData.totalCo2WithoutLand) === null || _b === void 0 ? void 0 : _b.conditionalNdc, disabled: true })),
28297
+ React.createElement(antd.Col, { xl: 7 },
28298
+ React.createElement(antd.InputNumber, { value: (_c = tabData.totalCo2WithoutLand) === null || _c === void 0 ? void 0 : _c.unconditionalNdc, disabled: true })))))),
28299
+ (!isRowDataEmpty(tabData.totalCo2WithLand)) && (React.createElement(antd.Row, { gutter: 16, key: 'totalCo2WithLand', className: "total-co2-with-land-row" },
28300
+ React.createElement(antd.Col, { xl: 12, md: 12, className: "total-co2-with-land-title" },
28301
+ React.createElement("span", null, t("ghgInventory:totalCo2WithLand"))),
28302
+ React.createElement(antd.Col, { xl: 9, md: 9 },
28303
+ React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row" },
28304
+ React.createElement(antd.Col, { xl: 7 },
28305
+ React.createElement(antd.InputNumber, { value: (_d = tabData.totalCo2WithLand) === null || _d === void 0 ? void 0 : _d.bau, disabled: true })),
28306
+ React.createElement(antd.Col, { xl: 7 },
28307
+ React.createElement(antd.InputNumber, { value: (_e = tabData.totalCo2WithLand) === null || _e === void 0 ? void 0 : _e.conditionalNdc, disabled: true })),
28308
+ React.createElement(antd.Col, { xl: 7 },
28309
+ React.createElement(antd.InputNumber, { value: (_f = tabData.totalCo2WithLand) === null || _f === void 0 ? void 0 : _f.unconditionalNdc, disabled: true })))))))));
27931
28310
  })))),
27932
28311
  React.createElement(GHGUserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onSubmitForm, onActionCanceled: onSaveFormCanceled, openModal: openSaveFormModal, errorMsg: errorMsg, loading: loading }),
27933
28312
  React.createElement(GHGUserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onSubmitForm, onActionCanceled: onFinalizeFormCanceled, openModal: openFinalizeFormModal, errorMsg: errorMsg, loading: loading }),