@undp/carbon-library 1.0.62 → 1.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/cjs/index.js +3540 -198
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/Components/Common/CoBenifits/assessment.d.ts +3 -0
  4. package/dist/cjs/types/Components/Common/CoBenifits/coBenifits.d.ts +14 -0
  5. package/dist/cjs/types/Components/Common/CoBenifits/economic.d.ts +3 -0
  6. package/dist/cjs/types/Components/Common/CoBenifits/environmental.d.ts +3 -0
  7. package/dist/cjs/types/Components/Common/CoBenifits/genderParity.d.ts +3 -0
  8. package/dist/cjs/types/Components/Common/CoBenifits/safeguards.d.ts +3 -0
  9. package/dist/cjs/types/Components/Common/CoBenifits/sdgGoals.d.ts +3 -0
  10. package/dist/cjs/types/Components/Common/CoBenifits/social.d.ts +3 -0
  11. package/dist/cjs/types/Components/Common/NdcActionDetails/ndcActionDetails.d.ts +13 -0
  12. package/dist/cjs/types/Components/NdcActions/AddNdcAction/addNdcActionComponent.d.ts +3 -0
  13. package/dist/cjs/types/Definitions/Definitions/programme.definitions.d.ts +2 -0
  14. package/dist/cjs/types/Definitions/Enums/commonEnums.d.ts +23 -0
  15. package/dist/cjs/types/Definitions/Enums/consumerGroups.enum.d.ts +4 -0
  16. package/dist/cjs/types/Definitions/Enums/energyGenerationUnits.enum.d.ts +13 -0
  17. package/dist/cjs/types/Definitions/Enums/landAreaUnits.enum.d.ts +15 -0
  18. package/dist/cjs/types/Definitions/Enums/mitigation.types.enum.d.ts +1 -0
  19. package/dist/cjs/types/Definitions/Enums/sdgGoals.enum.d.ts +19 -0
  20. package/dist/cjs/types/Definitions/Enums/sector.enum.d.ts +12 -0
  21. package/dist/cjs/types/Definitions/index.d.ts +7 -0
  22. package/dist/esm/index.js +3481 -145
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/esm/types/Components/Common/CoBenifits/assessment.d.ts +3 -0
  25. package/dist/esm/types/Components/Common/CoBenifits/coBenifits.d.ts +14 -0
  26. package/dist/esm/types/Components/Common/CoBenifits/economic.d.ts +3 -0
  27. package/dist/esm/types/Components/Common/CoBenifits/environmental.d.ts +3 -0
  28. package/dist/esm/types/Components/Common/CoBenifits/genderParity.d.ts +3 -0
  29. package/dist/esm/types/Components/Common/CoBenifits/safeguards.d.ts +3 -0
  30. package/dist/esm/types/Components/Common/CoBenifits/sdgGoals.d.ts +3 -0
  31. package/dist/esm/types/Components/Common/CoBenifits/social.d.ts +3 -0
  32. package/dist/esm/types/Components/Common/NdcActionDetails/ndcActionDetails.d.ts +13 -0
  33. package/dist/esm/types/Components/NdcActions/AddNdcAction/addNdcActionComponent.d.ts +3 -0
  34. package/dist/esm/types/Definitions/Definitions/programme.definitions.d.ts +2 -0
  35. package/dist/esm/types/Definitions/Enums/commonEnums.d.ts +23 -0
  36. package/dist/esm/types/Definitions/Enums/consumerGroups.enum.d.ts +4 -0
  37. package/dist/esm/types/Definitions/Enums/energyGenerationUnits.enum.d.ts +13 -0
  38. package/dist/esm/types/Definitions/Enums/landAreaUnits.enum.d.ts +15 -0
  39. package/dist/esm/types/Definitions/Enums/mitigation.types.enum.d.ts +1 -0
  40. package/dist/esm/types/Definitions/Enums/sdgGoals.enum.d.ts +19 -0
  41. package/dist/esm/types/Definitions/Enums/sector.enum.d.ts +12 -0
  42. package/dist/esm/types/Definitions/index.d.ts +7 -0
  43. package/dist/index.d.ts +116 -1
  44. package/package.json +2 -1
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const Assessment: (props: any) => React.JSX.Element;
3
+ export default Assessment;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import "./coBenifits.scss";
3
+ export interface CoBenefitProps {
4
+ onClickedBackBtn?: any;
5
+ onFormSubmit?: any;
6
+ coBenefitsDetails?: any;
7
+ submitButtonText?: any;
8
+ viewOnly?: boolean;
9
+ coBenifitsViewDetails?: any;
10
+ loading?: any;
11
+ t: any;
12
+ }
13
+ declare const CoBenifitsComponent: (props: CoBenefitProps) => React.JSX.Element;
14
+ export default CoBenifitsComponent;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const Economic: (props: any) => React.JSX.Element;
3
+ export default Economic;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const Environmental: (props: any) => React.JSX.Element;
3
+ export default Environmental;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const GenderParity: (props: any) => React.JSX.Element;
3
+ export default GenderParity;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const Safeguards: (props: any) => React.JSX.Element;
3
+ export default Safeguards;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const SdgGoals: (props: any) => React.JSX.Element;
3
+ export default SdgGoals;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const Social: (props: any) => React.JSX.Element;
3
+ export default Social;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import "./ndcActionDetails.scss";
3
+ import "../../../Styles/common.table.scss";
4
+ export interface NdcActionDetailsProps {
5
+ isBackBtnVisible: boolean;
6
+ onFormSubmit: any;
7
+ ndcActionDetails: any;
8
+ t: any;
9
+ programmeDetails?: any;
10
+ onClickedBackBtn?: any;
11
+ }
12
+ declare const NdcActionDetails: (props: NdcActionDetailsProps) => React.JSX.Element;
13
+ export default NdcActionDetails;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import "./addNdcActionComponent.scss";
3
+ export declare const AddNdcActionComponent: (props: any) => React.JSX.Element;
@@ -4,6 +4,7 @@ import { ProgrammeStage } from "../Enums/programmeStage.enum";
4
4
  import { ProgrammeStageMRV } from "../Enums/programmeStageMRV.enum";
5
5
  import { TypeOfMitigation } from "../Enums/typeOfMitigation.enum";
6
6
  import { CreditTransferStage } from "../Enums/creditTransferStage.enum";
7
+ import { RcFile } from "rc-upload/lib/interface";
7
8
  export declare const getStageEnumVal: (value: string) => string;
8
9
  export declare const getCreditStageVal: (value: string) => string;
9
10
  export declare const getStageTransferEnumVal: (value: string, transfer: ProgrammeTransfer) => string;
@@ -139,3 +140,4 @@ export declare const getFinancialFields: (programme: Programme) => {
139
140
  export declare const getCompanyBgColor: (item: string) => "rgba(185, 226, 244, 0.56)" | "rgba(254, 241, 173, 0.55)" | "rgba(128, 255, 0, 0.12)";
140
141
  export declare const getRetirementTypeString: (retirementType: string | null) => "-" | "CROSS BORDER TRANSFER" | "LEGAL ACTION" | "OTHER" | undefined;
141
142
  export declare const sumArray: (arrList: any[]) => any;
143
+ export declare const getBase64: (file: RcFile) => Promise<string>;
@@ -0,0 +1,23 @@
1
+ export declare enum RadioButtonStatus {
2
+ YES = "YES",
3
+ NO = "NO",
4
+ NA = "N/A"
5
+ }
6
+ export declare enum RadioButtonStatus2 {
7
+ YES = "YES",
8
+ NO = "NO",
9
+ MAYBE = "MAYBE"
10
+ }
11
+ export declare enum Titles {
12
+ Mr = "Mr",
13
+ Mrs = "Mrs"
14
+ }
15
+ export declare const titleList: {
16
+ value: Titles;
17
+ label: string;
18
+ }[];
19
+ export declare enum FormElementType {
20
+ Radio = 0,
21
+ Label = 1,
22
+ Input = 2
23
+ }
@@ -0,0 +1,4 @@
1
+ export declare const consumerGroupList: {
2
+ value: string;
3
+ label: string;
4
+ }[];
@@ -0,0 +1,13 @@
1
+ export declare enum EnergyGenerationUnits {
2
+ Wh = "Wh/year/unit",
3
+ mWh = "mWh/year/unit",
4
+ kWh = "kWh/year/unit",
5
+ MWh = "MWh/year/unit",
6
+ GWh = "GWh/year/unit",
7
+ J = "J/year/unit",
8
+ KJ = "kJ/year/unit"
9
+ }
10
+ export declare const energyGenerationUnitList: {
11
+ value: string;
12
+ label: string;
13
+ }[];
@@ -0,0 +1,15 @@
1
+ export declare enum LandAreaUnits {
2
+ mm2 = "mm2",
3
+ cm2 = "cm2",
4
+ m2 = "m2",
5
+ ha = "ha",
6
+ km2 = "km2",
7
+ in2 = "in2",
8
+ ft2 = "ft2",
9
+ ac = "ac",
10
+ Mi2 = "Mi2"
11
+ }
12
+ export declare const landAreaUnitList: {
13
+ value: string;
14
+ label: string;
15
+ }[];
@@ -28,3 +28,4 @@ export declare const mitigationTypeList: {
28
28
  value: string;
29
29
  label: string;
30
30
  }[];
31
+ export declare const sectorMitigationTypesListMapped: any;
@@ -0,0 +1,19 @@
1
+ export declare enum SdgGoals {
2
+ noPoverty = "No Poverty",
3
+ zeroHunger = "Zero Hunger",
4
+ gdHealth = "Good Health and Well-being",
5
+ qualityEducation = "Quality Education",
6
+ genderEq = "Gender Equality",
7
+ cleanWatr = "Clean Water and Sanitation",
8
+ affEnergy = "Affordable and Clean Energy",
9
+ decentWork = "Decent Work and Economic Growth",
10
+ industry = "Industry, Innovation and Infrastructure",
11
+ reducedInEq = "Reduced Inequalities",
12
+ sustainableCities = "Sustainable Cities and Communities",
13
+ responsibleConsumption = "Responsible Consumption and Production",
14
+ climateAction = "Climate Action",
15
+ lifeBelowWater = "Life Below Water",
16
+ lifeOnLand = "Life On Land",
17
+ peace = "Peace, Justice and Strong Institutions",
18
+ partnership = "Partnerships for the Goals"
19
+ }
@@ -0,0 +1,12 @@
1
+ export declare enum Sector {
2
+ Energy = "Energy",
3
+ Health = "Health",
4
+ Education = "Education",
5
+ Transport = "Transport",
6
+ Manufacturing = "Manufacturing",
7
+ Hospitality = "Hospitality",
8
+ Forestry = "Forestry",
9
+ Waste = "Waste",
10
+ Agriculture = "Agriculture",
11
+ Other = "Other"
12
+ }
@@ -15,6 +15,13 @@ export * from "./Enums/creditTransferStage.enum";
15
15
  export * from "./Enums/retireType.enum";
16
16
  export * from "./Enums/programmeStageMRV.enum";
17
17
  export * from "./Enums/programmeStage.enum";
18
+ export * from "./Enums/company.role.enum";
19
+ export * from "./Enums/energyGenerationUnits.enum";
20
+ export * from "./Enums/landAreaUnits.enum";
21
+ export * from "./Enums/consumerGroups.enum";
22
+ export * from "./Enums/sector.enum";
23
+ export * from "./Enums/commonEnums";
24
+ export * from "./Enums/sdgGoals.enum";
18
25
  export * from "./Definitions/userLogin.definitions";
19
26
  export * from "./Definitions/userInformationContext.definitions";
20
27
  export * from "./Definitions/userForgotPassword.definitions";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import React, { FC, ReactNode } from 'react';
2
2
  import { DateTime } from 'luxon';
3
+ import { RcFile } from 'rc-upload/lib/interface';
3
4
  import { RawAxiosResponseHeaders, AxiosResponseHeaders, AxiosRequestConfig } from 'axios';
4
5
 
5
6
  declare const CompanyManagementComponent: (props: any) => React.JSX.Element;
@@ -179,6 +180,7 @@ declare const mitigationTypeList: {
179
180
  value: string;
180
181
  label: string;
181
182
  }[];
183
+ declare const sectorMitigationTypesListMapped: any;
182
184
 
183
185
  declare enum ESGType {
184
186
  AAA = "AAA",
@@ -295,6 +297,118 @@ declare enum ProgrammeStage {
295
297
  Rejected = "Rejected"
296
298
  }
297
299
 
300
+ declare enum CompanyRole {
301
+ ACADEMICS = "Academics",
302
+ SERVICE_PROVIDER = "ServiceProvider",
303
+ MITIGATION_ACTIVITY_PARTNER = "MitigationActivityParticipant",
304
+ CARBON_CREDIT_BROKER = "CarbonCreditBroker",
305
+ VALIDATION_VERIFICATION_ENTITY = "ValidationVerificationEntities",
306
+ COMMERCIAL_BANKS = "CommercialBanks",
307
+ INVESTORS = "InvestorsFinanciers",
308
+ GOV_REGULATOR = "GovernmentRegulators",
309
+ OBSERVERS = "Observers",
310
+ CIVIL_SOCIETY_ORG = "CivilSocietyOrganization",
311
+ CERTIFIER = "Certifier",
312
+ INTERNAL_ORGANIZATION = "InternationalOrganization",
313
+ PROGRAMME_DEVELOPER = "ProgrammeDeveloper",
314
+ MRV = "MRV",
315
+ GOVERNMENT = "Government",
316
+ MINISTRY = "Ministry",
317
+ API = "API"
318
+ }
319
+
320
+ declare enum EnergyGenerationUnits {
321
+ Wh = "Wh/year/unit",
322
+ mWh = "mWh/year/unit",
323
+ kWh = "kWh/year/unit",
324
+ MWh = "MWh/year/unit",
325
+ GWh = "GWh/year/unit",
326
+ J = "J/year/unit",
327
+ KJ = "kJ/year/unit"
328
+ }
329
+ declare const energyGenerationUnitList: {
330
+ value: string;
331
+ label: string;
332
+ }[];
333
+
334
+ declare enum LandAreaUnits {
335
+ mm2 = "mm2",
336
+ cm2 = "cm2",
337
+ m2 = "m2",
338
+ ha = "ha",
339
+ km2 = "km2",
340
+ in2 = "in2",
341
+ ft2 = "ft2",
342
+ ac = "ac",
343
+ Mi2 = "Mi2"
344
+ }
345
+ declare const landAreaUnitList: {
346
+ value: string;
347
+ label: string;
348
+ }[];
349
+
350
+ declare const consumerGroupList: {
351
+ value: string;
352
+ label: string;
353
+ }[];
354
+
355
+ declare enum Sector {
356
+ Energy = "Energy",
357
+ Health = "Health",
358
+ Education = "Education",
359
+ Transport = "Transport",
360
+ Manufacturing = "Manufacturing",
361
+ Hospitality = "Hospitality",
362
+ Forestry = "Forestry",
363
+ Waste = "Waste",
364
+ Agriculture = "Agriculture",
365
+ Other = "Other"
366
+ }
367
+
368
+ declare enum RadioButtonStatus {
369
+ YES = "YES",
370
+ NO = "NO",
371
+ NA = "N/A"
372
+ }
373
+ declare enum RadioButtonStatus2 {
374
+ YES = "YES",
375
+ NO = "NO",
376
+ MAYBE = "MAYBE"
377
+ }
378
+ declare enum Titles {
379
+ Mr = "Mr",
380
+ Mrs = "Mrs"
381
+ }
382
+ declare const titleList: {
383
+ value: Titles;
384
+ label: string;
385
+ }[];
386
+ declare enum FormElementType {
387
+ Radio = 0,
388
+ Label = 1,
389
+ Input = 2
390
+ }
391
+
392
+ declare enum SdgGoals {
393
+ noPoverty = "No Poverty",
394
+ zeroHunger = "Zero Hunger",
395
+ gdHealth = "Good Health and Well-being",
396
+ qualityEducation = "Quality Education",
397
+ genderEq = "Gender Equality",
398
+ cleanWatr = "Clean Water and Sanitation",
399
+ affEnergy = "Affordable and Clean Energy",
400
+ decentWork = "Decent Work and Economic Growth",
401
+ industry = "Industry, Innovation and Infrastructure",
402
+ reducedInEq = "Reduced Inequalities",
403
+ sustainableCities = "Sustainable Cities and Communities",
404
+ responsibleConsumption = "Responsible Consumption and Production",
405
+ climateAction = "Climate Action",
406
+ lifeBelowWater = "Life Below Water",
407
+ lifeOnLand = "Life On Land",
408
+ peace = "Peace, Justice and Strong Institutions",
409
+ partnership = "Partnerships for the Goals"
410
+ }
411
+
298
412
  interface LoginProps {
299
413
  email: string;
300
414
  password: string;
@@ -486,6 +600,7 @@ declare const getFinancialFields: (programme: Programme) => {
486
600
  declare const getCompanyBgColor: (item: string) => "rgba(185, 226, 244, 0.56)" | "rgba(254, 241, 173, 0.55)" | "rgba(128, 255, 0, 0.12)";
487
601
  declare const getRetirementTypeString: (retirementType: string | null) => "-" | "CROSS BORDER TRANSFER" | "LEGAL ACTION" | "OTHER" | undefined;
488
602
  declare const sumArray: (arrList: any[]) => any;
603
+ declare const getBase64: (file: RcFile) => Promise<string>;
489
604
 
490
605
  interface ProgrammeDeveloperCreation {
491
606
  companyName?: string;
@@ -581,4 +696,4 @@ declare class ProgrammeEntity implements BaseEntity {
581
696
  companyId?: number[];
582
697
  }
583
698
 
584
- export { AddNewCompanyComponent, AddNewUserComponent, BaseEntity, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, ConfigurationSettingsType, ConnectionContextProviderProps, ConnectionProps, CountrySelect, CreditTransferStage, ESGType, HeaderProps, Instrument, InvestmentCreationComponent, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LayoutSiderProps, LegendItem, LegendItemItemProps, Loading, LoginProps, MapComponent, MapComponentProps, MapPopupData, MapSourceData, MapTypes, MapboxComponent, MarkerData, Methods, MitigationTypes, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, ProfileIcon, ProfileIconProps, Programme, ProgrammeDeveloperCreation, ProgrammeEntity, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeProperties, ProgrammePropertiesT, ProgrammeStage, ProgrammeStageMRV, ProgrammeT, ProgrammeTransfer, ProgrammeViewComponent, Response, RetireType, Role, RoleIcon, RoleIconProps, SectoralScope, StasticCard, StasticCardItemProps, TxType, TypeOfMitigation, UnitField, User, UserContextProps, UserCreationProps, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserProps, addCommSep, addCommSepRound, addRoundNumber, addSpaces, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, isBase64, mitigationTypeList, ndcActionTypeList, sumArray, userForgotPasswordProps };
699
+ export { AddNewCompanyComponent, AddNewUserComponent, BaseEntity, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, ConfigurationSettingsType, ConnectionContextProviderProps, ConnectionProps, CountrySelect, CreditTransferStage, ESGType, EnergyGenerationUnits, FormElementType, HeaderProps, Instrument, InvestmentCreationComponent, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LayoutSiderProps, LegendItem, LegendItemItemProps, Loading, LoginProps, MapComponent, MapComponentProps, MapPopupData, MapSourceData, MapTypes, MapboxComponent, MarkerData, Methods, MitigationTypes, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, ProfileIcon, ProfileIconProps, Programme, ProgrammeDeveloperCreation, ProgrammeEntity, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeProperties, ProgrammePropertiesT, ProgrammeStage, ProgrammeStageMRV, ProgrammeT, ProgrammeTransfer, ProgrammeViewComponent, RadioButtonStatus, RadioButtonStatus2, Response, RetireType, Role, RoleIcon, RoleIconProps, SdgGoals, Sector, SectoralScope, StasticCard, StasticCardItemProps, Titles, TxType, TypeOfMitigation, UnitField, User, UserContextProps, UserCreationProps, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserProps, addCommSep, addCommSepRound, addRoundNumber, addSpaces, consumerGroupList, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, isBase64, landAreaUnitList, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList, userForgotPasswordProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@undp/carbon-library",
3
- "version": "1.0.62",
3
+ "version": "1.0.64",
4
4
  "description": "Shared Library of tools for Carbon Credits applications ecosystem for ExO and and HQ/GEF",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -15,6 +15,7 @@
15
15
  "@rollup/plugin-commonjs": "^25.0.0",
16
16
  "@rollup/plugin-node-resolve": "^15.0.2",
17
17
  "@rollup/plugin-typescript": "^11.1.1",
18
+ "@undp/carbon-credit-calculator": "^1.0.0",
18
19
  "node-sass": "^7.0.3",
19
20
  "postcss": "^8.4.23",
20
21
  "rollup": "^3.22.0",