@undp/carbon-library 1.0.133-NAM-17.2 → 1.0.133-NAM-17.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,13 @@
1
1
  export declare enum TypeOfMitigation {
2
2
  AGRICULTURE = "Agriculture",
3
- SOLAR = "Solar"
3
+ SOLAR = "Solar",
4
+ EE_HOUSEHOLDS = "EEHouseholds"
5
+ }
6
+ export declare enum SubTypeOfMitigation {
7
+ SOIL_ENRICHMENT_BIOCHAR = "SoilEnrichmentBiochar",
8
+ RICE_CROPS = "RiceCrops",
9
+ SOLAR_PHOTOVOLTAICS_PV = "SolarPhotovoltaicsPV",
10
+ SOLAR_WATER_PUMPING_OFF_GRID = "SolarWaterPumpingOffGrid",
11
+ SOLAR_WATER_PUMPING_ON_GRID = "SolarWaterPumpingOnGrid",
12
+ STOVES_HOUSES_IN_NAMIBIA = "StovesHousesInNamibia"
4
13
  }
package/dist/esm/index.js CHANGED
@@ -1142,6 +1142,8 @@ var mitigationTypeList = [
1142
1142
  { value: MitigationTypes.N20.valueOf(), label: "N2O" },
1143
1143
  { value: MitigationTypes.TRANSPORT.valueOf(), label: "Transport" },
1144
1144
  { value: MitigationTypes.WIND.valueOf(), label: "Wind" },
1145
+ { value: MitigationTypes.CO2_USAGE.valueOf(), label: "CO2 usage" },
1146
+ { value: MitigationTypes.TIDAL.valueOf(), label: "Tidal" },
1145
1147
  ];
1146
1148
  var sectorMitigationTypesListMapped = {
1147
1149
  Energy: [
@@ -1203,6 +1205,8 @@ var sectorMitigationTypesListMapped = {
1203
1205
  Other: [
1204
1206
  { value: MitigationTypes.MARINE.valueOf(), label: "Marine" },
1205
1207
  { value: MitigationTypes.N20.valueOf(), label: "N2O" },
1208
+ { value: MitigationTypes.CO2_USAGE.valueOf(), label: "CO2 usage" },
1209
+ { value: MitigationTypes.TIDAL.valueOf(), label: "Tidal" },
1206
1210
  ],
1207
1211
  };
1208
1212
  var mitigationSubTypeList = [
@@ -1229,7 +1233,7 @@ var mitigationSubTypeList = [
1229
1233
  { label: "Biodiesel", value: MitigationSubTypes.BIODIESEL.valueOf() },
1230
1234
  { label: "Biodiesel from waste oil", value: MitigationSubTypes.BIODIESEL_FROM_WASTE_OIL.valueOf() },
1231
1235
  { label: "Ethanol", value: MitigationSubTypes.ETHANOL.valueOf() },
1232
- { label: "Cement", value: MitigationSubTypes.CLINKER_REPLACEMENT.valueOf() },
1236
+ { label: "Clinker replacement", value: MitigationSubTypes.CLINKER_REPLACEMENT.valueOf() },
1233
1237
  { label: "Coal Mine Methane", value: MitigationSubTypes.COAL_MINE_METHANE.valueOf() },
1234
1238
  { label: "Coal Bed Methane", value: MitigationSubTypes.COAL_BED_METHANE.valueOf() },
1235
1239
  { label: "CMM & Ventilation Air Methane", value: MitigationSubTypes.CMM_VENTILATION_AIR_METHANE.valueOf() },
@@ -1359,8 +1363,8 @@ var mitigationSubTypeList = [
1359
1363
  { label: "Cars: Green hydrogen", value: MitigationSubTypes.CARS_GREEN_HYDROGEN.valueOf() },
1360
1364
  { label: "Cars: efficient operation", value: MitigationSubTypes.CARS_EFFICIENT_OPERATION.valueOf() },
1361
1365
  { label: "Scrapping old vehicles", value: MitigationSubTypes.SCRAPPING_OLD_VEHICLES.valueOf() },
1362
- { label: "Biodiesel for transport", value: MitigationSubTypes.CABLE_CARS.valueOf() },
1363
- { label: "Cable cars", value: MitigationSubTypes.CHEMICALS.valueOf() },
1366
+ { label: "Biodiesel for transport", value: MitigationSubTypes.BIODIESEL_FOR_TRANSPORT.valueOf() },
1367
+ { label: "Cable cars", value: MitigationSubTypes.CABLE_CARS.valueOf() },
1364
1368
  { label: "Wind", value: MitigationSubTypes.WIND.valueOf() },
1365
1369
  { label: "Offshore wind", value: MitigationSubTypes.OFFSHORE_WIND.valueOf() },
1366
1370
  { label: "CO2 recycling", value: MitigationSubTypes.CO2_RECYCLING.valueOf() },
@@ -1396,7 +1400,7 @@ var mitigationSubTypesListMapped = {
1396
1400
  { label: "Ethanol", value: MitigationSubTypes.ETHANOL.valueOf() },
1397
1401
  ],
1398
1402
  Cement: [
1399
- { label: "Cement", value: MitigationSubTypes.CLINKER_REPLACEMENT.valueOf() },
1403
+ { label: "Clinker replacement", value: MitigationSubTypes.CLINKER_REPLACEMENT.valueOf() },
1400
1404
  ],
1401
1405
  "Coal/Mine": [
1402
1406
  { label: "Coal Mine Methane", value: MitigationSubTypes.COAL_MINE_METHANE.valueOf() },
@@ -1553,7 +1557,7 @@ var mitigationSubTypesListMapped = {
1553
1557
  { label: "Bus Rapid Transit: Green hydrogen", value: MitigationSubTypes.BUS_RAPID_TRANSIT_GREEN_HYDROGEN.valueOf() },
1554
1558
  { label: "Motorbikes", value: MitigationSubTypes.MOTORBIKES.valueOf() },
1555
1559
  { label: "Mode shift: Road to rail", value: MitigationSubTypes.MODE_SHIFT_ROAD_TO_RAIL.valueOf() },
1556
- { label: "More efficient train system", value: MitigationSubTypes.MORE_EFFICIENT_VEHICLES.valueOf() },
1560
+ { label: "More efficient train system", value: MitigationSubTypes.MORE_EFFICIENT_TRAIN_SYSTEM.valueOf() },
1557
1561
  { label: "More efficient vehicles", value: MitigationSubTypes.MORE_EFFICIENT_VEHICLES.valueOf() },
1558
1562
  { label: "Rail: regenerative braking", value: MitigationSubTypes.RAIL_REGENERATIVE_BRAKING.valueOf() },
1559
1563
  { label: "Rail: Green hydrogen", value: MitigationSubTypes.RAIL_GREEN_HYDROGEN.valueOf() },
@@ -1562,8 +1566,8 @@ var mitigationSubTypesListMapped = {
1562
1566
  { label: "Cars: Green hydrogen", value: MitigationSubTypes.CARS_GREEN_HYDROGEN.valueOf() },
1563
1567
  { label: "Cars: efficient operation", value: MitigationSubTypes.CARS_EFFICIENT_OPERATION.valueOf() },
1564
1568
  { label: "Scrapping old vehicles", value: MitigationSubTypes.SCRAPPING_OLD_VEHICLES.valueOf() },
1565
- { label: "Biodiesel for transport", value: MitigationSubTypes.CABLE_CARS.valueOf() },
1566
- { label: "Cable cars", value: MitigationSubTypes.CHEMICALS.valueOf() },
1569
+ { label: "Biodiesel for transport", value: MitigationSubTypes.BIODIESEL_FOR_TRANSPORT.valueOf() },
1570
+ { label: "Cable cars", value: MitigationSubTypes.CABLE_CARS.valueOf() },
1567
1571
  ],
1568
1572
  Wind: [
1569
1573
  { label: "Wind", value: MitigationSubTypes.WIND.valueOf() },
@@ -2062,7 +2066,18 @@ var TypeOfMitigation;
2062
2066
  (function (TypeOfMitigation) {
2063
2067
  TypeOfMitigation["AGRICULTURE"] = "Agriculture";
2064
2068
  TypeOfMitigation["SOLAR"] = "Solar";
2069
+ TypeOfMitigation["EE_HOUSEHOLDS"] = "EEHouseholds";
2065
2070
  })(TypeOfMitigation || (TypeOfMitigation = {}));
2071
+ // sub types of mitigation
2072
+ var SubTypeOfMitigation;
2073
+ (function (SubTypeOfMitigation) {
2074
+ SubTypeOfMitigation["SOIL_ENRICHMENT_BIOCHAR"] = "SoilEnrichmentBiochar";
2075
+ SubTypeOfMitigation["RICE_CROPS"] = "RiceCrops";
2076
+ SubTypeOfMitigation["SOLAR_PHOTOVOLTAICS_PV"] = "SolarPhotovoltaicsPV";
2077
+ SubTypeOfMitigation["SOLAR_WATER_PUMPING_OFF_GRID"] = "SolarWaterPumpingOffGrid";
2078
+ SubTypeOfMitigation["SOLAR_WATER_PUMPING_ON_GRID"] = "SolarWaterPumpingOnGrid";
2079
+ SubTypeOfMitigation["STOVES_HOUSES_IN_NAMIBIA"] = "StovesHousesInNamibia";
2080
+ })(SubTypeOfMitigation || (SubTypeOfMitigation = {}));
2066
2081
 
2067
2082
  var TxType;
2068
2083
  (function (TxType) {
@@ -17117,12 +17132,20 @@ var NdcActionDetails = function (props) {
17117
17132
  value === undefined) {
17118
17133
  throw new Error("".concat(t("ndcAction:energyGeneration"), " ").concat(t("ndcAction:isRequired")));
17119
17134
  }
17135
+ if (value < 0) {
17136
+ throw new Error("".concat(t("ndcAction:allowOnlyNumericValueAndDecimal")));
17137
+ }
17120
17138
  return [2 /*return*/];
17121
17139
  });
17122
17140
  }); },
17123
17141
  },
17124
17142
  ], name: "energyGeneration" },
17125
- React.createElement(InputNumber, { style: { width: 442, paddingRight: 12 }, onChange: calculateMethodologyEstimatedCredits }))),
17143
+ React.createElement(InputNumber, { style: { width: 442, paddingRight: 12 }, onChange: function (value) {
17144
+ var numericValue = Number(value); // Convert value to a number
17145
+ if (!isNaN(numericValue) && numericValue >= 0) {
17146
+ calculateMethodologyEstimatedCredits();
17147
+ }
17148
+ } }))),
17126
17149
  React.createElement(Col, { style: { marginLeft: "38px" } },
17127
17150
  React.createElement(Form.Item, { label: t("ndcAction:energyGenerationUnit"), name: "energyGenerationUnit", rules: [
17128
17151
  {
@@ -17157,12 +17180,20 @@ var NdcActionDetails = function (props) {
17157
17180
  value === undefined) {
17158
17181
  throw new Error("".concat(t("ndcAction:eligibleLandArea"), " ").concat(t("ndcAction:isRequired")));
17159
17182
  }
17183
+ if (value < 0) {
17184
+ throw new Error("".concat(t("ndcAction:allowOnlyNumericValueAndDecimal")));
17185
+ }
17160
17186
  return [2 /*return*/];
17161
17187
  });
17162
17188
  }); },
17163
17189
  },
17164
17190
  ] },
17165
- React.createElement(InputNumber, { style: { width: 442, paddingRight: 12 }, onChange: calculateMethodologyEstimatedCredits }))),
17191
+ React.createElement(InputNumber, { style: { width: 442, paddingRight: 12 }, onChange: function (value) {
17192
+ var numericValue = Number(value); // Convert value to a number
17193
+ if (!isNaN(numericValue) && numericValue >= 0) {
17194
+ calculateMethodologyEstimatedCredits();
17195
+ }
17196
+ } }))),
17166
17197
  React.createElement(Col, { style: { marginLeft: "38px" } },
17167
17198
  React.createElement(Form.Item, { label: t("ndcAction:landAreaUnit"), name: "landAreaUnit", rules: [
17168
17199
  {
@@ -17190,12 +17221,20 @@ var NdcActionDetails = function (props) {
17190
17221
  value === undefined) {
17191
17222
  throw new Error("".concat(t("ndcAction:tonnesOnDryBasis"), " ").concat(t("ndcAction:isRequired")));
17192
17223
  }
17224
+ if (value < 1) {
17225
+ throw new Error("".concat(t("ndcAction:allowOnlyNumericValueAndDecimal")));
17226
+ }
17193
17227
  return [2 /*return*/];
17194
17228
  });
17195
17229
  }); },
17196
17230
  },
17197
17231
  ] },
17198
- React.createElement(InputNumber, { style: { width: 442, paddingRight: 12 }, onChange: calculateMethodologyEstimatedCredits }))))),
17232
+ React.createElement(InputNumber, { style: { width: 442, paddingRight: 12 }, onChange: function (value) {
17233
+ var numericValue = Number(value); // Convert value to a number
17234
+ if (!isNaN(numericValue) && numericValue >= 0) {
17235
+ calculateMethodologyEstimatedCredits();
17236
+ }
17237
+ } }))))),
17199
17238
  (ndcActionType === NdcActionTypes.Mitigation ||
17200
17239
  ndcActionType === NdcActionTypes.CrossCutting) &&
17201
17240
  mitigationType === MitigationTypes.EE_HOUSEHOLDS &&
@@ -17216,12 +17255,23 @@ var NdcActionDetails = function (props) {
17216
17255
  value === undefined) {
17217
17256
  throw new Error("".concat(t("ndcAction:numberOfDays"), " ").concat(t("ndcAction:isRequired")));
17218
17257
  }
17258
+ if (value < 0) {
17259
+ throw new Error("".concat(t("ndcAction:allowOnlyNumericValue")));
17260
+ }
17261
+ if (!Number.isInteger(value)) {
17262
+ throw new Error("".concat(t("ndcAction:allowOnlyIntegerValue")));
17263
+ }
17219
17264
  return [2 /*return*/];
17220
17265
  });
17221
17266
  }); },
17222
17267
  },
17223
17268
  ], name: "numberOfDays" },
17224
- React.createElement(InputNumber, { style: { width: 442, paddingRight: 12 }, onChange: calculateMethodologyEstimatedCredits }))),
17269
+ React.createElement(InputNumber, { style: { width: 442, paddingRight: 12 }, onChange: function (value) {
17270
+ var numericValue = Number(value); // Convert value to a number
17271
+ if (!isNaN(numericValue) && numericValue >= 0) {
17272
+ calculateMethodologyEstimatedCredits();
17273
+ }
17274
+ } }))),
17225
17275
  React.createElement(Col, { style: { marginLeft: "38px" } },
17226
17276
  React.createElement(Form.Item, { label: t("ndcAction:numberOfPeople"), rules: [
17227
17277
  {
@@ -17237,12 +17287,23 @@ var NdcActionDetails = function (props) {
17237
17287
  value === undefined) {
17238
17288
  throw new Error("".concat(t("ndcAction:numberOfPeople"), " ").concat(t("ndcAction:isRequired")));
17239
17289
  }
17290
+ if (value < 0) {
17291
+ throw new Error("".concat(t("ndcAction:allowOnlyNumericValue")));
17292
+ }
17293
+ if (!Number.isInteger(value)) {
17294
+ throw new Error("".concat(t("ndcAction:allowOnlyIntegerValue")));
17295
+ }
17240
17296
  return [2 /*return*/];
17241
17297
  });
17242
17298
  }); },
17243
17299
  },
17244
17300
  ], name: "numberOfPeople" },
17245
- React.createElement(InputNumber, { style: { width: 442, paddingRight: 12 }, onChange: calculateMethodologyEstimatedCredits })))))),
17301
+ React.createElement(InputNumber, { style: { width: 442, paddingRight: 12 }, onChange: function (value) {
17302
+ var numericValue = Number(value); // Convert value to a number
17303
+ if (!isNaN(numericValue) && numericValue >= 0) {
17304
+ calculateMethodologyEstimatedCredits();
17305
+ }
17306
+ } })))))),
17246
17307
  (ndcActionType === NdcActionTypes.Mitigation ||
17247
17308
  ndcActionType === NdcActionTypes.CrossCutting) && (React.createElement(Row, { justify: "start", align: "middle" },
17248
17309
  React.createElement(Col, null,
@@ -26335,5 +26396,5 @@ var TimelineBody = function (props) {
26335
26396
  React.createElement("div", { className: "remark-body" }, remark)))));
26336
26397
  };
26337
26398
 
26338
- export { Action, AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, AdminBGColor, AdminColor, BaseEntity, CarbonSystemType, CertBGColor, CertColor, CoBenifitsComponent, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, CompanyState, ConfigurationSettingsType, CreditTransferComponent, CreditTransferStage, DevBGColor, DevColor, DocType, DocumentStatus, ESGType, EnergyGenerationUnits, FormElementType, GovBGColor, GovColor, ImgWithFallback, InfoView, Instrument, InvestmentBGColor, InvestmentBody, InvestmentColor, InvestmentCreationComponent, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LegendItem, Loading, ManagerBGColor, ManagerColor, MapComponent, MapTypes, MapboxComponent, MinBGColor, MinColor, MitigationSubTypes, MitigationTypes, MrvDashboardComponent, MrvStatsCardsTypes, NdcActionBody, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, NdcActionViewComponent, OrganisationStatus, ProfileIcon, ProgrammeCertify, ProgrammeCreationComponent, ProgrammeDocuments, ProgrammeEntity, ProgrammeIssueForm, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeRetireForm, ProgrammeRevokeForm, ProgrammeStageLegend, ProgrammeStageMRV, ProgrammeStageR, ProgrammeStageUnified, ProgrammeTransfer, ProgrammeTransferForm, RadioButtonStatus, RadioButtonStatus2, RegistryDashboardComponent, RejectDocumentationConfirmationModel, RetireType, Role, RoleIcon, RootBGColor, RootColor, SdgGoals$1 as SdgGoals, Sector, SectoralScope, StasticCard, StatsCardsTypes, SystemNames, TimelineBody, Titles, TooltipColor, TransferActionModel, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserRoleIcon, ViewBGColor, ViewColor, WidgetType, addCommSep, addCommSepRound, addRoundNumber, addSpaces, consumerGroupList, creditUnit, dateFormat, dateTimeFormat, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, isBase64, landAreaUnitList, methodologyOptions, mitigationSubTypeList, mitigationSubTypesListMapped, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList };
26399
+ export { Action, AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, AdminBGColor, AdminColor, BaseEntity, CarbonSystemType, CertBGColor, CertColor, CoBenifitsComponent, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, CompanyState, ConfigurationSettingsType, CreditTransferComponent, CreditTransferStage, DevBGColor, DevColor, DocType, DocumentStatus, ESGType, EnergyGenerationUnits, FormElementType, GovBGColor, GovColor, ImgWithFallback, InfoView, Instrument, InvestmentBGColor, InvestmentBody, InvestmentColor, InvestmentCreationComponent, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LegendItem, Loading, ManagerBGColor, ManagerColor, MapComponent, MapTypes, MapboxComponent, MinBGColor, MinColor, MitigationSubTypes, MitigationTypes, MrvDashboardComponent, MrvStatsCardsTypes, NdcActionBody, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, NdcActionViewComponent, OrganisationStatus, ProfileIcon, ProgrammeCertify, ProgrammeCreationComponent, ProgrammeDocuments, ProgrammeEntity, ProgrammeIssueForm, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeRetireForm, ProgrammeRevokeForm, ProgrammeStageLegend, ProgrammeStageMRV, ProgrammeStageR, ProgrammeStageUnified, ProgrammeTransfer, ProgrammeTransferForm, RadioButtonStatus, RadioButtonStatus2, RegistryDashboardComponent, RejectDocumentationConfirmationModel, RetireType, Role, RoleIcon, RootBGColor, RootColor, SdgGoals$1 as SdgGoals, Sector, SectoralScope, StasticCard, StatsCardsTypes, SubTypeOfMitigation, SystemNames, TimelineBody, Titles, TooltipColor, TransferActionModel, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserRoleIcon, ViewBGColor, ViewColor, WidgetType, addCommSep, addCommSepRound, addRoundNumber, addSpaces, consumerGroupList, creditUnit, dateFormat, dateTimeFormat, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, isBase64, landAreaUnitList, methodologyOptions, mitigationSubTypeList, mitigationSubTypesListMapped, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList };
26339
26400
  //# sourceMappingURL=index.js.map