@undp/carbon-library 1.0.1 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. package/dist/cjs/index.js +5269 -0
  2. package/dist/cjs/index.js.map +1 -0
  3. package/dist/cjs/types/Components/Common/CompanyRoleIcon/companyRoleIcon.d.ts +6 -0
  4. package/dist/cjs/types/Components/Common/InfoView/info.view.d.ts +10 -0
  5. package/dist/cjs/types/Components/Common/LanguageSelection/languageSelection.d.ts +7 -0
  6. package/dist/cjs/types/Components/Common/LegendItem/legendItem.d.ts +7 -0
  7. package/dist/cjs/types/Components/Common/Loading/loading.d.ts +2 -0
  8. package/dist/cjs/types/Components/Common/Maps/mapComponent.d.ts +3 -0
  9. package/dist/cjs/types/Components/Common/Maps/mapboxComponent.d.ts +5 -0
  10. package/dist/cjs/types/Components/Common/Models/changePasswordModel.d.ts +13 -0
  11. package/dist/cjs/types/Components/Common/Models/programmeIssueForm.d.ts +13 -0
  12. package/dist/cjs/types/Components/Common/Models/programmeRetireForm.d.ts +15 -0
  13. package/dist/cjs/types/Components/Common/Models/programmeRevokeForm.d.ts +13 -0
  14. package/dist/cjs/types/Components/Common/Models/programmeTransferForm.d.ts +18 -0
  15. package/dist/cjs/types/Components/Common/Models/userActionConfirmationModel.d.ts +13 -0
  16. package/dist/cjs/types/Components/Common/OrganisationStatus/organisationStatus.d.ts +8 -0
  17. package/dist/cjs/types/Components/Common/ProfileIcon/profile.icon.d.ts +10 -0
  18. package/dist/cjs/types/Components/Common/RoleIcon/role.icon.d.ts +9 -0
  19. package/dist/cjs/types/Components/Common/StasticCard/stasticCard.d.ts +11 -0
  20. package/dist/cjs/types/Components/Common/TimelineBody/timelineBody.d.ts +10 -0
  21. package/dist/cjs/types/Components/Common/UserRoleIcon/userRoleIcon.d.ts +6 -0
  22. package/dist/cjs/types/Components/Company/AddNewCompany/addNewCompanyComponent.d.ts +4 -0
  23. package/dist/cjs/types/Components/Company/CompanyManagement/companyManagementComponent.d.ts +4 -0
  24. package/dist/cjs/types/Components/Company/CompanyProfile/companyProfileComponent.d.ts +3 -0
  25. package/dist/cjs/types/Components/Programme/ProgrammeManagement/programmeManagementComponent.d.ts +4 -0
  26. package/dist/cjs/types/Components/Programme/ProgrammeView/programmeViewComponent.d.ts +3 -0
  27. package/dist/cjs/types/Components/User/AddNewUser/addNewUserComponent.d.ts +5 -0
  28. package/dist/cjs/types/Components/User/UserManagement/userManagementComponent.d.ts +4 -0
  29. package/dist/cjs/types/Components/User/UserProfile/userProfileComponent.d.ts +3 -0
  30. package/dist/cjs/types/Components/index.d.ts +13 -0
  31. package/dist/cjs/types/Definitions/Definitions/addUser.definitions.d.ts +22 -0
  32. package/dist/cjs/types/Definitions/Definitions/common.definitions.d.ts +3 -0
  33. package/dist/cjs/types/Definitions/Definitions/companyManagement.definitions.d.ts +15 -0
  34. package/dist/cjs/types/Definitions/Definitions/connectionContext.definitions.d.ts +26 -0
  35. package/dist/cjs/types/Definitions/Definitions/dashboard.definitions.d.ts +1 -0
  36. package/dist/cjs/types/Definitions/Definitions/layout.header.d.ts +4 -0
  37. package/dist/cjs/types/Definitions/Definitions/layout.sider.definitions.d.ts +4 -0
  38. package/dist/cjs/types/Definitions/Definitions/mapComponent.definitions.d.ts +32 -0
  39. package/dist/cjs/types/Definitions/Definitions/programme.definitions.d.ts +136 -0
  40. package/dist/cjs/types/Definitions/Definitions/settings.definitions.d.ts +3 -0
  41. package/dist/cjs/types/Definitions/Definitions/userForgotPassword.definitions.d.ts +3 -0
  42. package/dist/cjs/types/Definitions/Definitions/userInformationContext.definitions.d.ts +17 -0
  43. package/dist/cjs/types/Definitions/Definitions/userLogin.definitions.d.ts +4 -0
  44. package/dist/cjs/types/Definitions/Definitions/userManagement.definitions.d.ts +22 -0
  45. package/dist/cjs/types/Definitions/Entities/baseEntity.d.ts +2 -0
  46. package/dist/cjs/types/Definitions/Entities/company.d.ts +13 -0
  47. package/dist/cjs/types/Definitions/Entities/programmeTransfer.d.ts +23 -0
  48. package/dist/cjs/types/Definitions/Entities/user.d.ts +12 -0
  49. package/dist/cjs/types/Definitions/Enums/action.enum.d.ts +7 -0
  50. package/dist/cjs/types/Definitions/Enums/company.management.columns.enum.d.ts +8 -0
  51. package/dist/cjs/types/Definitions/Enums/company.role.enum.d.ts +17 -0
  52. package/dist/cjs/types/Definitions/Enums/company.state.enum.d.ts +4 -0
  53. package/dist/cjs/types/Definitions/Enums/programme.management.columns.enum.d.ts +11 -0
  54. package/dist/cjs/types/Definitions/Enums/statsCards.type.enum.d.ts +18 -0
  55. package/dist/cjs/types/Definitions/Enums/user.management.columns.enum.d.ts +10 -0
  56. package/dist/cjs/types/Definitions/entities/user.d.ts +12 -0
  57. package/dist/cjs/types/Definitions/enums/action.enum.d.ts +7 -0
  58. package/dist/cjs/types/Definitions/enums/company.management.columns.enum.d.ts +8 -0
  59. package/dist/cjs/types/Definitions/enums/company.state.enum.d.ts +4 -0
  60. package/dist/cjs/types/Definitions/enums/programme.management.columns.enum.d.ts +11 -0
  61. package/dist/cjs/types/Definitions/enums/user.management.columns.enum.d.ts +10 -0
  62. package/dist/cjs/types/Definitions/index.d.ts +13 -0
  63. package/dist/cjs/types/Styles/role.color.constants.d.ts +15 -0
  64. package/dist/cjs/types/index.d.ts +2 -0
  65. package/dist/esm/index.js +5222 -0
  66. package/dist/esm/index.js.map +1 -0
  67. package/dist/esm/types/Components/Common/CompanyRoleIcon/companyRoleIcon.d.ts +6 -0
  68. package/dist/esm/types/Components/Common/InfoView/info.view.d.ts +10 -0
  69. package/dist/esm/types/Components/Common/LanguageSelection/languageSelection.d.ts +7 -0
  70. package/dist/esm/types/Components/Common/LegendItem/legendItem.d.ts +7 -0
  71. package/dist/esm/types/Components/Common/Loading/loading.d.ts +2 -0
  72. package/dist/esm/types/Components/Common/Maps/mapComponent.d.ts +3 -0
  73. package/dist/esm/types/Components/Common/Maps/mapboxComponent.d.ts +5 -0
  74. package/dist/esm/types/Components/Common/Models/changePasswordModel.d.ts +13 -0
  75. package/dist/esm/types/Components/Common/Models/programmeIssueForm.d.ts +13 -0
  76. package/dist/esm/types/Components/Common/Models/programmeRetireForm.d.ts +15 -0
  77. package/dist/esm/types/Components/Common/Models/programmeRevokeForm.d.ts +13 -0
  78. package/dist/esm/types/Components/Common/Models/programmeTransferForm.d.ts +18 -0
  79. package/dist/esm/types/Components/Common/Models/userActionConfirmationModel.d.ts +13 -0
  80. package/dist/esm/types/Components/Common/OrganisationStatus/organisationStatus.d.ts +8 -0
  81. package/dist/esm/types/Components/Common/ProfileIcon/profile.icon.d.ts +10 -0
  82. package/dist/esm/types/Components/Common/RoleIcon/role.icon.d.ts +9 -0
  83. package/dist/esm/types/Components/Common/StasticCard/stasticCard.d.ts +11 -0
  84. package/dist/esm/types/Components/Common/TimelineBody/timelineBody.d.ts +10 -0
  85. package/dist/esm/types/Components/Common/UserRoleIcon/userRoleIcon.d.ts +6 -0
  86. package/dist/esm/types/Components/Company/AddNewCompany/addNewCompanyComponent.d.ts +4 -0
  87. package/dist/esm/types/Components/Company/CompanyManagement/companyManagementComponent.d.ts +4 -0
  88. package/dist/esm/types/Components/Company/CompanyProfile/companyProfileComponent.d.ts +3 -0
  89. package/dist/esm/types/Components/Programme/ProgrammeManagement/programmeManagementComponent.d.ts +4 -0
  90. package/dist/esm/types/Components/Programme/ProgrammeView/programmeViewComponent.d.ts +3 -0
  91. package/dist/esm/types/Components/User/AddNewUser/addNewUserComponent.d.ts +5 -0
  92. package/dist/esm/types/Components/User/UserManagement/userManagementComponent.d.ts +4 -0
  93. package/dist/esm/types/Components/User/UserProfile/userProfileComponent.d.ts +3 -0
  94. package/dist/esm/types/Components/index.d.ts +13 -0
  95. package/dist/esm/types/Definitions/Definitions/addUser.definitions.d.ts +22 -0
  96. package/dist/esm/types/Definitions/Definitions/common.definitions.d.ts +3 -0
  97. package/dist/esm/types/Definitions/Definitions/companyManagement.definitions.d.ts +15 -0
  98. package/dist/esm/types/Definitions/Definitions/connectionContext.definitions.d.ts +26 -0
  99. package/dist/esm/types/Definitions/Definitions/dashboard.definitions.d.ts +1 -0
  100. package/dist/esm/types/Definitions/Definitions/layout.header.d.ts +4 -0
  101. package/dist/esm/types/Definitions/Definitions/layout.sider.definitions.d.ts +4 -0
  102. package/dist/esm/types/Definitions/Definitions/mapComponent.definitions.d.ts +32 -0
  103. package/dist/esm/types/Definitions/Definitions/programme.definitions.d.ts +136 -0
  104. package/dist/esm/types/Definitions/Definitions/settings.definitions.d.ts +3 -0
  105. package/dist/esm/types/Definitions/Definitions/userForgotPassword.definitions.d.ts +3 -0
  106. package/dist/esm/types/Definitions/Definitions/userInformationContext.definitions.d.ts +17 -0
  107. package/dist/esm/types/Definitions/Definitions/userLogin.definitions.d.ts +4 -0
  108. package/dist/esm/types/Definitions/Definitions/userManagement.definitions.d.ts +22 -0
  109. package/dist/esm/types/Definitions/Entities/baseEntity.d.ts +2 -0
  110. package/dist/esm/types/Definitions/Entities/company.d.ts +13 -0
  111. package/dist/esm/types/Definitions/Entities/programmeTransfer.d.ts +23 -0
  112. package/dist/esm/types/Definitions/Entities/user.d.ts +12 -0
  113. package/dist/esm/types/Definitions/Enums/action.enum.d.ts +7 -0
  114. package/dist/esm/types/Definitions/Enums/company.management.columns.enum.d.ts +8 -0
  115. package/dist/esm/types/Definitions/Enums/company.role.enum.d.ts +17 -0
  116. package/dist/esm/types/Definitions/Enums/company.state.enum.d.ts +4 -0
  117. package/dist/esm/types/Definitions/Enums/programme.management.columns.enum.d.ts +11 -0
  118. package/dist/esm/types/Definitions/Enums/statsCards.type.enum.d.ts +18 -0
  119. package/dist/esm/types/Definitions/Enums/user.management.columns.enum.d.ts +10 -0
  120. package/dist/esm/types/Definitions/entities/user.d.ts +12 -0
  121. package/dist/esm/types/Definitions/enums/action.enum.d.ts +7 -0
  122. package/dist/esm/types/Definitions/enums/company.management.columns.enum.d.ts +8 -0
  123. package/dist/esm/types/Definitions/enums/company.state.enum.d.ts +4 -0
  124. package/dist/esm/types/Definitions/enums/programme.management.columns.enum.d.ts +11 -0
  125. package/dist/esm/types/Definitions/enums/user.management.columns.enum.d.ts +10 -0
  126. package/dist/esm/types/Definitions/index.d.ts +13 -0
  127. package/dist/esm/types/Styles/role.color.constants.d.ts +15 -0
  128. package/dist/esm/types/index.d.ts +2 -0
  129. package/dist/index.d.ts +357 -0
  130. package/package.json +47 -24
@@ -0,0 +1,8 @@
1
+ export declare enum CompanyManagementColumns {
2
+ logo = 0,
3
+ name = 1,
4
+ taxId = 2,
5
+ companyRole = 3,
6
+ programmeCount = 4,
7
+ creditBalance = 5
8
+ }
@@ -0,0 +1,17 @@
1
+ export declare enum CompanyRole {
2
+ ACADEMICS = "Academics",
3
+ SERVICE_PROVIDER = "ServiceProvider",
4
+ MITIGATION_ACTIVITY_PARTNER = "MitigationActivityParticipant",
5
+ CARBON_CREDIT_BROKER = "CarbonCreditBroker",
6
+ VALIDATION_VERIFICATION_ENTITY = "ValidationVerificationEntities",
7
+ COMMERCIAL_BANKS = "CommercialBanks",
8
+ INVESTORS = "InvestorsFinanciers",
9
+ GOV_REGULATOR = "GovernmentRegulators",
10
+ OBSERVERS = "Observers",
11
+ CIVIL_SOCIETY_ORG = "CivilSocietyOrganization",
12
+ CERTIFIER = "Certifier",
13
+ INTERNAL_ORGANIZATION = "InternationalOrganization",
14
+ PROGRAMME_DEVELOPER = "ProgrammeDeveloper",
15
+ MRV = "MRV",
16
+ GOVERNMENT = "Government"
17
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum CompanyState {
2
+ SUSPENDED = 0,
3
+ ACTIVE = 1
4
+ }
@@ -0,0 +1,11 @@
1
+ export declare enum ProgrammeManagementColumns {
2
+ title = 0,
3
+ company = 1,
4
+ sector = 2,
5
+ currentStage = 3,
6
+ creditIssued = 4,
7
+ creditBalance = 5,
8
+ creditTransferred = 6,
9
+ certifierId = 7,
10
+ serialNo = 8
11
+ }
@@ -0,0 +1,18 @@
1
+ export declare enum StatsCardsTypes {
2
+ PROGRAMMES_PENDING = "Programmes Pending",
3
+ TRANSFER_REQUEST_RECEIVED = "Pending Transfers Received",
4
+ PROGRAMMES_UNCERTIFIED = "Programmes Certifiable",
5
+ TRANSFER_REQUEST_SENT = "Pending Transfers Sent",
6
+ PROGRAMMES_CERTIFIED = "Programmes Certified",
7
+ CREDIT_BALANCE = "Credit Balance",
8
+ CREDIT_CERTIFIED = "Credits Certified",
9
+ PROGRAMMES = "Programmes",
10
+ CREDITS = "Credits",
11
+ CERTIFIED_CREDITS = "Certified Credits",
12
+ TOTAL_PROGRAMMES = "Total Programmes",
13
+ TOTAL_PROGRAMMES_SECTOR = "Total Programmes: Sector",
14
+ TOTAL_CREDITS = "Total Credits",
15
+ TOTAL_CREDITS_CERTIFIED = "Total Credits Certified",
16
+ PROGRAMME_LOCATIONS = "Programme Locations",
17
+ TRANSFER_LOCATIONS_INTERNATIONAL = "Transfer Locations International"
18
+ }
@@ -0,0 +1,10 @@
1
+ export declare enum UserManagementColumns {
2
+ logo = 0,
3
+ name = 1,
4
+ email = 2,
5
+ phoneNo = 3,
6
+ company = 4,
7
+ companyRole = 5,
8
+ role = 6,
9
+ actions = 7
10
+ }
@@ -0,0 +1,12 @@
1
+ import { BaseEntity } from "./baseEntity";
2
+ export declare class User implements BaseEntity {
3
+ id?: number;
4
+ email?: string;
5
+ role?: string;
6
+ name?: string;
7
+ country?: string;
8
+ phoneNo?: string;
9
+ companyId?: number;
10
+ companyRole?: string;
11
+ companyState?: number;
12
+ }
@@ -0,0 +1,7 @@
1
+ export declare enum Action {
2
+ Manage = "manage",
3
+ Create = "create",
4
+ Read = "read",
5
+ Update = "update",
6
+ Delete = "delete"
7
+ }
@@ -0,0 +1,8 @@
1
+ export declare enum CompanyManagementColumns {
2
+ logo = 0,
3
+ name = 1,
4
+ taxId = 2,
5
+ companyRole = 3,
6
+ programmeCount = 4,
7
+ creditBalance = 5
8
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum CompanyState {
2
+ SUSPENDED = 0,
3
+ ACTIVE = 1
4
+ }
@@ -0,0 +1,11 @@
1
+ export declare enum ProgrammeManagementColumns {
2
+ title = 0,
3
+ company = 1,
4
+ sector = 2,
5
+ currentStage = 3,
6
+ creditIssued = 4,
7
+ creditBalance = 5,
8
+ creditTransferred = 6,
9
+ certifierId = 7,
10
+ serialNo = 8
11
+ }
@@ -0,0 +1,10 @@
1
+ export declare enum UserManagementColumns {
2
+ logo = 0,
3
+ name = 1,
4
+ email = 2,
5
+ phoneNo = 3,
6
+ company = 4,
7
+ companyRole = 5,
8
+ role = 6,
9
+ actions = 7
10
+ }
@@ -0,0 +1,13 @@
1
+ export * from "./Enums/company.management.columns.enum";
2
+ export * from "./Enums/user.management.columns.enum";
3
+ export * from "./Enums/programme.management.columns.enum";
4
+ export * from "./Definitions/userLogin.definitions";
5
+ export * from "./Definitions/userInformationContext.definitions";
6
+ export * from "./Definitions/userForgotPassword.definitions";
7
+ export * from "./Definitions/settings.definitions";
8
+ export * from "./Definitions/programme.definitions";
9
+ export * from "./Definitions/addUser.definitions";
10
+ export * from "./Definitions/connectionContext.definitions";
11
+ export * from "./Definitions/layout.header";
12
+ export * from "./Definitions/layout.sider.definitions";
13
+ export * from "./Definitions/mapComponent.definitions";
@@ -0,0 +1,15 @@
1
+ export declare const AdminBGColor = "rgba(255, 166, 166, 0.42)";
2
+ export declare const AdminColor = "#D12800";
3
+ export declare const RootBGColor = "rgba(255, 0, 229, 0.15)";
4
+ export declare const RootColor = "#DB00FF";
5
+ export declare const ManagerBGColor = "rgba(96, 27, 209, 0.13)";
6
+ export declare const ManagerColor = "#75009E";
7
+ export declare const ViewBGColor = "rgba(176, 190, 197, 0.23)";
8
+ export declare const ViewColor = "#707070";
9
+ export declare const GovBGColor = "rgba(185, 226, 244, 0.56)";
10
+ export declare const GovColor = "#16B1FF";
11
+ export declare const DevBGColor = "rgba(254, 241, 173, 0.55)";
12
+ export declare const DevColor = "#FFA070";
13
+ export declare const CertBGColor = "rgba(128, 255, 0, 0.12)";
14
+ export declare const CertColor = "#519E4F";
15
+ export declare const TooltipColor = "#6ACDFF";
@@ -0,0 +1,2 @@
1
+ export * from './Components';
2
+ export * from './Definitions';
@@ -0,0 +1,357 @@
1
+ import React, { FC, ReactNode } from 'react';
2
+ import { DateTime } from 'luxon';
3
+ import { RawAxiosResponseHeaders, AxiosResponseHeaders, AxiosRequestConfig } from 'axios';
4
+
5
+ declare const CompanyManagementComponent: (props: any) => React.JSX.Element;
6
+
7
+ declare const AddNewCompanyComponent: (props: any) => React.JSX.Element;
8
+
9
+ declare const CompanyProfileComponent: (props: any) => React.JSX.Element;
10
+
11
+ declare const UserManagementComponent: (props: any) => React.JSX.Element;
12
+
13
+ declare const ProgrammeManagementComponent: (props: any) => React.JSX.Element;
14
+
15
+ declare const ProgrammeViewComponent: (props: any) => React.JSX.Element;
16
+
17
+ declare const AddNewUserComponent: (props: any) => React.JSX.Element;
18
+
19
+ declare const UserProfileComponent: (props: any) => React.JSX.Element;
20
+
21
+ declare const Loading: () => React.JSX.Element;
22
+
23
+ interface LegendItemItemProps {
24
+ text: string;
25
+ color: string;
26
+ }
27
+ declare const LegendItem: FC<LegendItemItemProps>;
28
+
29
+ declare enum MapTypes {
30
+ Mapbox = "Mapbox",
31
+ None = "None"
32
+ }
33
+ interface MarkerData {
34
+ id?: number;
35
+ color?: string;
36
+ location: number[];
37
+ element?: any;
38
+ }
39
+ interface MapSourceData {
40
+ key: string;
41
+ data: any;
42
+ }
43
+ interface MapPopupData {
44
+ html: string;
45
+ }
46
+ interface MapComponentProps {
47
+ mapType: string;
48
+ center: number[];
49
+ markers?: MarkerData[];
50
+ zoom: number;
51
+ mapSource?: MapSourceData;
52
+ onClick?: any;
53
+ showPopupOnClick?: boolean;
54
+ onMouseMove?: any;
55
+ layer?: any;
56
+ height: number;
57
+ style: string;
58
+ onRender?: any;
59
+ accessToken?: any;
60
+ }
61
+
62
+ declare const MapComponent: (props: MapComponentProps) => React.JSX.Element;
63
+
64
+ declare const MapboxComponent: (props: MapComponentProps) => React.JSX.Element;
65
+
66
+ interface StasticCardItemProps {
67
+ value: number;
68
+ title: string;
69
+ updatedDate: any;
70
+ icon: any;
71
+ loading: boolean;
72
+ companyRole: any;
73
+ }
74
+ declare const StasticCard: FC<StasticCardItemProps>;
75
+
76
+ declare enum CompanyManagementColumns {
77
+ logo = 0,
78
+ name = 1,
79
+ taxId = 2,
80
+ companyRole = 3,
81
+ programmeCount = 4,
82
+ creditBalance = 5
83
+ }
84
+
85
+ declare enum UserManagementColumns {
86
+ logo = 0,
87
+ name = 1,
88
+ email = 2,
89
+ phoneNo = 3,
90
+ company = 4,
91
+ companyRole = 5,
92
+ role = 6,
93
+ actions = 7
94
+ }
95
+
96
+ declare enum ProgrammeManagementColumns {
97
+ title = 0,
98
+ company = 1,
99
+ sector = 2,
100
+ currentStage = 3,
101
+ creditIssued = 4,
102
+ creditBalance = 5,
103
+ creditTransferred = 6,
104
+ certifierId = 7,
105
+ serialNo = 8
106
+ }
107
+
108
+ interface LoginProps {
109
+ email: string;
110
+ password: string;
111
+ }
112
+
113
+ type UserProps = {
114
+ id: string;
115
+ userRole: string;
116
+ companyId: number;
117
+ companyRole: string;
118
+ companyLogo: string;
119
+ companyName: string;
120
+ companyState: number;
121
+ };
122
+ interface UserContextProps {
123
+ userInfoState?: UserProps;
124
+ setUserInfo: (val: UserProps) => void;
125
+ removeUserInfo: () => void;
126
+ IsAuthenticated: (tkn?: any) => boolean;
127
+ isTokenExpired: boolean;
128
+ setIsTokenExpired: (val: boolean) => void;
129
+ }
130
+
131
+ interface userForgotPasswordProps {
132
+ email: string;
133
+ }
134
+
135
+ declare enum ConfigurationSettingsType {
136
+ isTransferFrozen = 0
137
+ }
138
+
139
+ declare class BaseEntity {
140
+ }
141
+
142
+ declare class ProgrammeTransfer implements BaseEntity {
143
+ [x: string]: any;
144
+ requestId?: number;
145
+ programmeId?: string;
146
+ initiator?: number;
147
+ initiatorCompanyId?: number;
148
+ toCompanyId?: number;
149
+ toAccount?: string;
150
+ fromCompanyId?: number;
151
+ creditAmount?: number;
152
+ comment?: string;
153
+ txRef?: string;
154
+ txTime?: number;
155
+ status?: CreditTransferStage;
156
+ isRetirement?: boolean;
157
+ companyId?: number[];
158
+ creditOwnerPercentage?: number[];
159
+ createdTime?: number;
160
+ retirementType?: RetireType;
161
+ toCompanyMeta?: any;
162
+ }
163
+
164
+ declare enum ProgrammeStage {
165
+ AwaitingAuthorization = "Pending",
166
+ Authorised = "Authorised",
167
+ Rejected = "Rejected"
168
+ }
169
+ declare enum Role {
170
+ Root = "Root",
171
+ Admin = "Admin",
172
+ Manager = "Manager",
173
+ ViewOnly = "ViewOnly"
174
+ }
175
+ declare enum RetireType {
176
+ CROSS_BORDER = "0",
177
+ LEGAL_ACTION = "1",
178
+ OTHER = "2"
179
+ }
180
+ declare enum CreditTransferStage {
181
+ Pending = "Pending",
182
+ Approved = "Accepted",
183
+ Rejected = "Rejected",
184
+ Cancelled = "Cancelled",
185
+ Recognised = "Recognised",
186
+ NotRecognised = "NotRecognised"
187
+ }
188
+ declare enum TxType {
189
+ CREATE = "0",
190
+ REJECT = "1",
191
+ ISSUE = "2",
192
+ TRANSFER = "3",
193
+ CERTIFY = "4",
194
+ RETIRE = "5",
195
+ REVOKE = "6",
196
+ FREEZE = "7",
197
+ AUTH = "8",
198
+ UNFREEZE = "9"
199
+ }
200
+ declare enum SectoralScope {
201
+ "Energy Industry" = "1",
202
+ "Energy Distribution" = "2",
203
+ "Agriculture" = "15"
204
+ }
205
+ declare enum TypeOfMitigation {
206
+ AGRICULTURE = "Agriculture",
207
+ SOLAR = "Solar"
208
+ }
209
+ declare const getStageEnumVal: (value: string) => string;
210
+ declare const getCreditStageVal: (value: string) => string;
211
+ declare const getStageTransferEnumVal: (value: string, transfer: ProgrammeTransfer) => string;
212
+ declare const getStageTagType: (stage: ProgrammeStage) => "error" | "processing" | "default";
213
+ declare const getTransferStageTagType: (stage: CreditTransferStage, transfer: ProgrammeTransfer) => "orange" | "purple" | "error" | "processing" | "default" | "success";
214
+ declare class UnitField {
215
+ unit: string;
216
+ value: any;
217
+ constructor(unit: string, value: any);
218
+ }
219
+ declare enum CompanyRole {
220
+ CERTIFIER = "Certifier",
221
+ PROGRAMME_DEVELOPER = "ProgrammeDeveloper",
222
+ MRV = "MRV",
223
+ GOVERNMENT = "Government"
224
+ }
225
+ interface ProgrammeProperties {
226
+ maxInternationalTransferAmount: string;
227
+ creditingPeriodInYears: number;
228
+ programmeCostUSD: number;
229
+ sourceOfFunding: any;
230
+ grantEquivalentAmount: number;
231
+ carbonPriceUSDPerTon: number;
232
+ buyerCountryEligibility: string;
233
+ geographicalLocation: string[];
234
+ greenHouseGasses: any[];
235
+ creditYear: number;
236
+ programmeMaterials: [];
237
+ projectMaterial: [];
238
+ }
239
+ interface Programme {
240
+ programmeId: string;
241
+ serialNo: string;
242
+ title: string;
243
+ sectoralScope: string;
244
+ sector: string;
245
+ countryCodeA2: string;
246
+ currentStage: ProgrammeStage;
247
+ startTime: number;
248
+ endTime: number;
249
+ creditChange: number;
250
+ creditIssued: number;
251
+ creditEst: number;
252
+ creditBalance: number;
253
+ creditTransferred: number[];
254
+ creditRetired: number[];
255
+ creditFrozen: number[];
256
+ constantVersion: string;
257
+ proponentTaxVatId: string[];
258
+ companyId: number[];
259
+ proponentPercentage: number[];
260
+ creditOwnerPercentage: number[];
261
+ certifierId: any[];
262
+ certifier: any[];
263
+ company: any[];
264
+ creditUnit: string;
265
+ programmeProperties: ProgrammeProperties;
266
+ agricultureProperties: any;
267
+ solarProperties: any;
268
+ txTime: number;
269
+ createdTime: number;
270
+ txRef: string;
271
+ typeOfMitigation: TypeOfMitigation;
272
+ geographicalLocationCordintes: any;
273
+ }
274
+ declare const getGeneralFields: (programme: Programme) => {
275
+ title: string;
276
+ serialNo: string;
277
+ currentStatus: ProgrammeStage;
278
+ applicationType: string;
279
+ sector: string;
280
+ sectoralScope: string;
281
+ startDate: DateTime;
282
+ endDate: DateTime;
283
+ buyerCountry: string;
284
+ };
285
+ declare const addCommSep: (value: any) => string;
286
+ declare const addCommSepRound: (value: any) => string;
287
+ declare const addRoundNumber: (value: any) => number;
288
+ declare const addSpaces: (text: string) => string;
289
+ declare const getFinancialFields: (programme: Programme) => {
290
+ programmeCost: string;
291
+ financingType: string;
292
+ grantEquivalent: UnitField;
293
+ carbonPrice: string;
294
+ };
295
+ declare const getCompanyBgColor: (item: string) => "rgba(185, 226, 244, 0.56)" | "rgba(254, 241, 173, 0.55)" | "rgba(128, 255, 0, 0.12)";
296
+ declare const getRetirementTypeString: (retirementType: string | null) => "-" | "CROSS BORDER TRANSFER" | "LEGAL ACTION" | "OTHER" | undefined;
297
+ declare const sumArray: (arrList: any[]) => any;
298
+
299
+ interface ProgrammeDeveloperCreation {
300
+ companyName?: string;
301
+ companyLocation?: string;
302
+ industry?: string;
303
+ registrationNo?: string;
304
+ }
305
+ interface UserCreationProps extends ProgrammeDeveloperCreation {
306
+ name: string;
307
+ email: string;
308
+ role: string;
309
+ city: string;
310
+ zipCode: string;
311
+ state: string;
312
+ country: string;
313
+ contactNo: string;
314
+ companyLogo?: string;
315
+ }
316
+ interface CountrySelect {
317
+ key: string;
318
+ label: string;
319
+ value: string;
320
+ }
321
+
322
+ type Methods = 'get' | 'post' | 'delete' | 'put' | 'patch';
323
+ type ConnectionContextProviderProps = {
324
+ serverURL: string;
325
+ children: ReactNode;
326
+ };
327
+ interface Response<T> {
328
+ data: T;
329
+ statusText: string;
330
+ status?: number;
331
+ headers: RawAxiosResponseHeaders | AxiosResponseHeaders;
332
+ config?: AxiosRequestConfig;
333
+ request?: any;
334
+ message: string;
335
+ }
336
+ type ConnectionProps = {
337
+ post<T = any, R = Response<T>>(path: string, data?: any, config?: AxiosRequestConfig, extraUrl?: string): Promise<R>;
338
+ get<T = any, R = Response<T>>(path: string, config?: AxiosRequestConfig): Promise<R>;
339
+ delete<T = any, R = Response<T>>(path: string, config?: AxiosRequestConfig): Promise<R>;
340
+ put<T = any, R = Response<T>>(path: string, data?: any, config?: AxiosRequestConfig): Promise<R>;
341
+ patch<T = any, R = Response<T>>(path: string, data?: any, config?: AxiosRequestConfig): Promise<R>;
342
+ updateToken: (token?: string) => void;
343
+ token?: string;
344
+ removeToken: (tkn?: string) => void;
345
+ };
346
+
347
+ type HeaderProps = {
348
+ title?: string;
349
+ onToggle: (val: boolean) => void;
350
+ };
351
+
352
+ type LayoutSiderProps = {
353
+ selectedKey?: string;
354
+ collapsed?: boolean;
355
+ };
356
+
357
+ export { AddNewCompanyComponent, AddNewUserComponent, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, ConfigurationSettingsType, ConnectionContextProviderProps, ConnectionProps, CountrySelect, CreditTransferStage, HeaderProps, LayoutSiderProps, LegendItem, LegendItemItemProps, Loading, LoginProps, MapComponent, MapComponentProps, MapPopupData, MapSourceData, MapTypes, MapboxComponent, MarkerData, Methods, Programme, ProgrammeDeveloperCreation, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeProperties, ProgrammeStage, ProgrammeViewComponent, Response, RetireType, Role, SectoralScope, StasticCard, StasticCardItemProps, TxType, TypeOfMitigation, UnitField, UserContextProps, UserCreationProps, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserProps, addCommSep, addCommSepRound, addRoundNumber, addSpaces, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTransferEnumVal, getTransferStageTagType, sumArray, userForgotPasswordProps };
package/package.json CHANGED
@@ -1,47 +1,70 @@
1
1
  {
2
2
  "name": "@undp/carbon-library",
3
- "version": "1.0.1",
3
+ "version": "1.0.9",
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": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
8
- "rollup": "rollup -c --bundleConfigAsCjs"
8
+ "kill-rollup": "ps aux | grep rollup | awk '{print $2}' | xargs kill -9 &",
9
+ "postbuild": "wait-on dist/cjs/index.js dist/esm/index.js dist/cjs/types dist/esm/types && sleep 5 && yarn kill-rollup",
10
+ "build": "rollup -c --bundleConfigAsCjs &"
9
11
  },
10
12
  "keywords": [],
11
13
  "author": "",
12
14
  "license": "ISC",
13
15
  "dependencies": {
14
- "rollup": "^3.22.0",
15
- "rollup-plugin-dts": "^5.3.0",
16
- "rollup-plugin-peer-deps-external": "^2.2.4",
17
- "rollup-plugin-postcss": "^4.0.2",
18
16
  "@rollup/plugin-commonjs": "^25.0.0",
19
17
  "@rollup/plugin-node-resolve": "^15.0.2",
20
18
  "@rollup/plugin-typescript": "^11.1.1",
19
+ "node-sass": "^7.0.3",
21
20
  "postcss": "^8.4.23",
21
+ "rollup": "^3.22.0",
22
+ "rollup-plugin-dts": "^5.3.0",
23
+ "rollup-plugin-peer-deps-external": "^2.2.4",
24
+ "rollup-plugin-postcss": "^4.0.2",
22
25
  "tslib": "^2.5.2",
23
- "typescript": "^5.0.4",
24
- "node-sass": "^7.0.3"
26
+ "typescript": "^5.0.4"
25
27
  },
26
- "peerDependencies": {
28
+ "devDependencies": {
29
+ "@ant-design/icons": "^4.7.0",
30
+ "@types/luxon": "^3.1.0",
31
+ "@types/mapbox-gl": "^2.7.10",
32
+ "@types/react": "^18.0.25",
33
+ "@types/validator": "^13.7.13",
34
+ "antd": "^4.24.1",
35
+ "apexcharts": "^3.36.3",
36
+ "axios": "^1.1.3",
37
+ "buffer": "^6.0.3",
38
+ "class-transformer": "^0.5.1",
39
+ "luxon": "^3.2.1",
40
+ "mapbox-gl": "^2.11.1",
27
41
  "react": "^18.2.0",
28
- "validator": "^13.9.0",
29
- "react-phone-number-input": "^3.2.12",
30
- "react-bootstrap-icons": "^1.10.2",
31
42
  "react-apexcharts": "^1.4.0",
32
- "mapbox-gl": "^2.11.1",
33
- "luxon": "^3.2.1",
34
- "class-transformer": "^0.5.1",
35
- "buffer": "^6.0.3",
36
- "axios": "^1.1.3",
37
- "apexcharts": "^3.36.3",
38
- "antd": "^4.24.1",
39
- "@types/validator": "^13.7.13",
40
- "@types/react": "^18.0.25",
41
- "@types/mapbox-gl": "^2.7.10",
42
- "@types/luxon": "^3.1.0",
43
+ "react-bootstrap-icons": "^1.10.2",
44
+ "react-mapbox-gl": "^5.1.1",
45
+ "react-phone-number-input": "^3.2.12",
46
+ "validator": "^13.9.0",
47
+ "wait-on": "^7.0.1"
48
+ },
49
+ "peerDependencies": {
43
50
  "@ant-design/icons": "^4.7.0",
44
- "react-mapbox-gl": "^5.1.1"
51
+ "@types/luxon": "^3.1.0",
52
+ "@types/mapbox-gl": "^2.7.10",
53
+ "@types/react": "^18.0.25",
54
+ "@types/validator": "^13.7.13",
55
+ "antd": "^4.24.1",
56
+ "apexcharts": "^3.36.3",
57
+ "axios": "^1.1.3",
58
+ "buffer": "^6.0.3",
59
+ "class-transformer": "^0.5.1",
60
+ "luxon": "^3.2.1",
61
+ "mapbox-gl": "^2.11.1",
62
+ "react": "^18.2.0",
63
+ "react-apexcharts": "^1.4.0",
64
+ "react-bootstrap-icons": "^1.10.2",
65
+ "react-mapbox-gl": "^5.1.1",
66
+ "react-phone-number-input": "^3.2.12",
67
+ "validator": "^13.9.0"
45
68
  },
46
69
  "main": "dist/cjs/index.js",
47
70
  "module": "dist/esm/index.js",