@undp/carbon-library 1.0.0 → 1.0.2
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.
- package/dist/cjs/index.js +5269 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/Components/Common/CompanyRoleIcon/companyRoleIcon.d.ts +6 -0
- package/dist/cjs/types/Components/Common/InfoView/info.view.d.ts +10 -0
- package/dist/cjs/types/Components/Common/LanguageSelection/languageSelection.d.ts +7 -0
- package/dist/cjs/types/Components/Common/LegendItem/legendItem.d.ts +7 -0
- package/dist/cjs/types/Components/Common/Loading/loading.d.ts +1 -0
- package/dist/cjs/types/Components/Common/Maps/mapComponent.d.ts +2 -0
- package/dist/cjs/types/Components/Common/Maps/mapboxComponent.d.ts +4 -0
- package/dist/cjs/types/Components/Common/Models/changePasswordModel.d.ts +13 -0
- package/dist/cjs/types/Components/Common/Models/programmeIssueForm.d.ts +13 -0
- package/dist/cjs/types/Components/Common/Models/programmeRetireForm.d.ts +15 -0
- package/dist/cjs/types/Components/Common/Models/programmeRevokeForm.d.ts +13 -0
- package/dist/cjs/types/Components/Common/Models/programmeTransferForm.d.ts +18 -0
- package/dist/cjs/types/Components/Common/Models/userActionConfirmationModel.d.ts +13 -0
- package/dist/cjs/types/Components/Common/OrganisationStatus/organisationStatus.d.ts +7 -0
- package/dist/cjs/types/Components/Common/ProfileIcon/profile.icon.d.ts +10 -0
- package/dist/cjs/types/Components/Common/RoleIcon/role.icon.d.ts +9 -0
- package/dist/cjs/types/Components/Common/StasticCard/stasticCard.d.ts +11 -0
- package/dist/cjs/types/Components/Common/TimelineBody/timelineBody.d.ts +10 -0
- package/dist/cjs/types/Components/Common/UserRoleIcon/userRoleIcon.d.ts +6 -0
- package/dist/cjs/types/Components/Company/AddNewCompany/addNewCompanyComponent.d.ts +3 -0
- package/dist/cjs/types/Components/Company/CompanyManagement/companyManagementComponent.d.ts +3 -0
- package/dist/cjs/types/Components/Company/CompanyProfile/companyProfileComponent.d.ts +2 -0
- package/dist/cjs/types/Components/Programme/ProgrammeManagement/programmeManagementComponent.d.ts +3 -0
- package/dist/cjs/types/Components/Programme/ProgrammeView/programmeViewComponent.d.ts +2 -0
- package/dist/cjs/types/Components/User/AddNewUser/addNewUserComponent.d.ts +4 -0
- package/dist/cjs/types/Components/User/UserManagement/userManagementComponent.d.ts +3 -0
- package/dist/cjs/types/Components/User/UserProfile/userProfileComponent.d.ts +2 -0
- package/dist/cjs/types/Components/index.d.ts +13 -0
- package/dist/cjs/types/Definitions/Definitions/addUser.definitions.d.ts +22 -0
- package/dist/cjs/types/Definitions/Definitions/common.definitions.d.ts +3 -0
- package/dist/cjs/types/Definitions/Definitions/companyManagement.definitions.d.ts +15 -0
- package/dist/cjs/types/Definitions/Definitions/connectionContext.definitions.d.ts +26 -0
- package/dist/cjs/types/Definitions/Definitions/dashboard.definitions.d.ts +1 -0
- package/dist/cjs/types/Definitions/Definitions/layout.header.d.ts +4 -0
- package/dist/cjs/types/Definitions/Definitions/layout.sider.definitions.d.ts +4 -0
- package/dist/cjs/types/Definitions/Definitions/mapComponent.definitions.d.ts +32 -0
- package/dist/cjs/types/Definitions/Definitions/programme.definitions.d.ts +135 -0
- package/dist/cjs/types/Definitions/Definitions/settings.definitions.d.ts +3 -0
- package/dist/cjs/types/Definitions/Definitions/userForgotPassword.definitions.d.ts +3 -0
- package/dist/cjs/types/Definitions/Definitions/userInformationContext.definitions.d.ts +17 -0
- package/dist/cjs/types/Definitions/Definitions/userLogin.definitions.d.ts +4 -0
- package/dist/cjs/types/Definitions/Definitions/userManagement.definitions.d.ts +22 -0
- package/dist/cjs/types/Definitions/Entities/baseEntity.d.ts +2 -0
- package/dist/cjs/types/Definitions/Entities/company.d.ts +13 -0
- package/dist/cjs/types/Definitions/Entities/programmeTransfer.d.ts +23 -0
- package/dist/cjs/types/Definitions/Entities/user.d.ts +12 -0
- package/dist/cjs/types/Definitions/Enums/action.enum.d.ts +7 -0
- package/dist/cjs/types/Definitions/Enums/company.management.columns.enum.d.ts +8 -0
- package/dist/cjs/types/Definitions/Enums/company.role.enum.d.ts +17 -0
- package/dist/cjs/types/Definitions/Enums/company.state.enum.d.ts +4 -0
- package/dist/cjs/types/Definitions/Enums/programme.management.columns.enum.d.ts +11 -0
- package/dist/cjs/types/Definitions/Enums/statsCards.type.enum.d.ts +18 -0
- package/dist/cjs/types/Definitions/Enums/user.management.columns.enum.d.ts +10 -0
- package/dist/cjs/types/Definitions/index.d.ts +13 -0
- package/dist/cjs/types/Styles/role.color.constants.d.ts +15 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/esm/index.js +5222 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/Components/Common/CompanyRoleIcon/companyRoleIcon.d.ts +6 -0
- package/dist/esm/types/Components/Common/InfoView/info.view.d.ts +10 -0
- package/dist/esm/types/Components/Common/LanguageSelection/languageSelection.d.ts +7 -0
- package/dist/esm/types/Components/Common/LegendItem/legendItem.d.ts +7 -0
- package/dist/esm/types/Components/Common/Loading/loading.d.ts +1 -0
- package/dist/esm/types/Components/Common/Maps/mapComponent.d.ts +2 -0
- package/dist/esm/types/Components/Common/Maps/mapboxComponent.d.ts +4 -0
- package/dist/esm/types/Components/Common/Models/changePasswordModel.d.ts +13 -0
- package/dist/esm/types/Components/Common/Models/programmeIssueForm.d.ts +13 -0
- package/dist/esm/types/Components/Common/Models/programmeRetireForm.d.ts +15 -0
- package/dist/esm/types/Components/Common/Models/programmeRevokeForm.d.ts +13 -0
- package/dist/esm/types/Components/Common/Models/programmeTransferForm.d.ts +18 -0
- package/dist/esm/types/Components/Common/Models/userActionConfirmationModel.d.ts +13 -0
- package/dist/esm/types/Components/Common/OrganisationStatus/organisationStatus.d.ts +7 -0
- package/dist/esm/types/Components/Common/ProfileIcon/profile.icon.d.ts +10 -0
- package/dist/esm/types/Components/Common/RoleIcon/role.icon.d.ts +9 -0
- package/dist/esm/types/Components/Common/StasticCard/stasticCard.d.ts +11 -0
- package/dist/esm/types/Components/Common/TimelineBody/timelineBody.d.ts +10 -0
- package/dist/esm/types/Components/Common/UserRoleIcon/userRoleIcon.d.ts +6 -0
- package/dist/esm/types/Components/Company/AddNewCompany/addNewCompanyComponent.d.ts +3 -0
- package/dist/esm/types/Components/Company/CompanyManagement/companyManagementComponent.d.ts +3 -0
- package/dist/esm/types/Components/Company/CompanyProfile/companyProfileComponent.d.ts +2 -0
- package/dist/esm/types/Components/Programme/ProgrammeManagement/programmeManagementComponent.d.ts +3 -0
- package/dist/esm/types/Components/Programme/ProgrammeView/programmeViewComponent.d.ts +2 -0
- package/dist/esm/types/Components/User/AddNewUser/addNewUserComponent.d.ts +4 -0
- package/dist/esm/types/Components/User/UserManagement/userManagementComponent.d.ts +3 -0
- package/dist/esm/types/Components/User/UserProfile/userProfileComponent.d.ts +2 -0
- package/dist/esm/types/Components/index.d.ts +13 -0
- package/dist/esm/types/Definitions/Definitions/addUser.definitions.d.ts +22 -0
- package/dist/esm/types/Definitions/Definitions/common.definitions.d.ts +3 -0
- package/dist/esm/types/Definitions/Definitions/companyManagement.definitions.d.ts +15 -0
- package/dist/esm/types/Definitions/Definitions/connectionContext.definitions.d.ts +26 -0
- package/dist/esm/types/Definitions/Definitions/dashboard.definitions.d.ts +1 -0
- package/dist/esm/types/Definitions/Definitions/layout.header.d.ts +4 -0
- package/dist/esm/types/Definitions/Definitions/layout.sider.definitions.d.ts +4 -0
- package/dist/esm/types/Definitions/Definitions/mapComponent.definitions.d.ts +32 -0
- package/dist/esm/types/Definitions/Definitions/programme.definitions.d.ts +135 -0
- package/dist/esm/types/Definitions/Definitions/settings.definitions.d.ts +3 -0
- package/dist/esm/types/Definitions/Definitions/userForgotPassword.definitions.d.ts +3 -0
- package/dist/esm/types/Definitions/Definitions/userInformationContext.definitions.d.ts +17 -0
- package/dist/esm/types/Definitions/Definitions/userLogin.definitions.d.ts +4 -0
- package/dist/esm/types/Definitions/Definitions/userManagement.definitions.d.ts +22 -0
- package/dist/esm/types/Definitions/Entities/baseEntity.d.ts +2 -0
- package/dist/esm/types/Definitions/Entities/company.d.ts +13 -0
- package/dist/esm/types/Definitions/Entities/programmeTransfer.d.ts +23 -0
- package/dist/esm/types/Definitions/Entities/user.d.ts +12 -0
- package/dist/esm/types/Definitions/Enums/action.enum.d.ts +7 -0
- package/dist/esm/types/Definitions/Enums/company.management.columns.enum.d.ts +8 -0
- package/dist/esm/types/Definitions/Enums/company.role.enum.d.ts +17 -0
- package/dist/esm/types/Definitions/Enums/company.state.enum.d.ts +4 -0
- package/dist/esm/types/Definitions/Enums/programme.management.columns.enum.d.ts +11 -0
- package/dist/esm/types/Definitions/Enums/statsCards.type.enum.d.ts +18 -0
- package/dist/esm/types/Definitions/Enums/user.management.columns.enum.d.ts +10 -0
- package/dist/esm/types/Definitions/index.d.ts +13 -0
- package/dist/esm/types/Styles/role.color.constants.d.ts +15 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/index.d.ts +356 -0
- package/package.json +3 -2
|
@@ -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,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,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";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { RawAxiosResponseHeaders, AxiosResponseHeaders, AxiosRequestConfig } from 'axios';
|
|
3
|
+
|
|
4
|
+
declare const CompanyManagementComponent: (props: any) => any;
|
|
5
|
+
|
|
6
|
+
declare const AddNewCompanyComponent: (props: any) => any;
|
|
7
|
+
|
|
8
|
+
declare const CompanyProfileComponent: (props: any) => any;
|
|
9
|
+
|
|
10
|
+
declare const UserManagementComponent: (props: any) => any;
|
|
11
|
+
|
|
12
|
+
declare const ProgrammeManagementComponent: (props: any) => any;
|
|
13
|
+
|
|
14
|
+
declare const ProgrammeViewComponent: (props: any) => any;
|
|
15
|
+
|
|
16
|
+
declare const AddNewUserComponent: (props: any) => any;
|
|
17
|
+
|
|
18
|
+
declare const UserProfileComponent: (props: any) => any;
|
|
19
|
+
|
|
20
|
+
declare const Loading: () => any;
|
|
21
|
+
|
|
22
|
+
interface LegendItemItemProps {
|
|
23
|
+
text: string;
|
|
24
|
+
color: string;
|
|
25
|
+
}
|
|
26
|
+
declare const LegendItem: FC<LegendItemItemProps>;
|
|
27
|
+
|
|
28
|
+
declare enum MapTypes {
|
|
29
|
+
Mapbox = "Mapbox",
|
|
30
|
+
None = "None"
|
|
31
|
+
}
|
|
32
|
+
interface MarkerData {
|
|
33
|
+
id?: number;
|
|
34
|
+
color?: string;
|
|
35
|
+
location: number[];
|
|
36
|
+
element?: any;
|
|
37
|
+
}
|
|
38
|
+
interface MapSourceData {
|
|
39
|
+
key: string;
|
|
40
|
+
data: any;
|
|
41
|
+
}
|
|
42
|
+
interface MapPopupData {
|
|
43
|
+
html: string;
|
|
44
|
+
}
|
|
45
|
+
interface MapComponentProps {
|
|
46
|
+
mapType: string;
|
|
47
|
+
center: number[];
|
|
48
|
+
markers?: MarkerData[];
|
|
49
|
+
zoom: number;
|
|
50
|
+
mapSource?: MapSourceData;
|
|
51
|
+
onClick?: any;
|
|
52
|
+
showPopupOnClick?: boolean;
|
|
53
|
+
onMouseMove?: any;
|
|
54
|
+
layer?: any;
|
|
55
|
+
height: number;
|
|
56
|
+
style: string;
|
|
57
|
+
onRender?: any;
|
|
58
|
+
accessToken?: any;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
declare const MapComponent: (props: MapComponentProps) => any;
|
|
62
|
+
|
|
63
|
+
declare const MapboxComponent: (props: MapComponentProps) => any;
|
|
64
|
+
|
|
65
|
+
interface StasticCardItemProps {
|
|
66
|
+
value: number;
|
|
67
|
+
title: string;
|
|
68
|
+
updatedDate: any;
|
|
69
|
+
icon: any;
|
|
70
|
+
loading: boolean;
|
|
71
|
+
companyRole: any;
|
|
72
|
+
}
|
|
73
|
+
declare const StasticCard: FC<StasticCardItemProps>;
|
|
74
|
+
|
|
75
|
+
declare enum CompanyManagementColumns {
|
|
76
|
+
logo = 0,
|
|
77
|
+
name = 1,
|
|
78
|
+
taxId = 2,
|
|
79
|
+
companyRole = 3,
|
|
80
|
+
programmeCount = 4,
|
|
81
|
+
creditBalance = 5
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
declare enum UserManagementColumns {
|
|
85
|
+
logo = 0,
|
|
86
|
+
name = 1,
|
|
87
|
+
email = 2,
|
|
88
|
+
phoneNo = 3,
|
|
89
|
+
company = 4,
|
|
90
|
+
companyRole = 5,
|
|
91
|
+
role = 6,
|
|
92
|
+
actions = 7
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare enum ProgrammeManagementColumns {
|
|
96
|
+
title = 0,
|
|
97
|
+
company = 1,
|
|
98
|
+
sector = 2,
|
|
99
|
+
currentStage = 3,
|
|
100
|
+
creditIssued = 4,
|
|
101
|
+
creditBalance = 5,
|
|
102
|
+
creditTransferred = 6,
|
|
103
|
+
certifierId = 7,
|
|
104
|
+
serialNo = 8
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
interface LoginProps {
|
|
108
|
+
email: string;
|
|
109
|
+
password: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
type UserProps = {
|
|
113
|
+
id: string;
|
|
114
|
+
userRole: string;
|
|
115
|
+
companyId: number;
|
|
116
|
+
companyRole: string;
|
|
117
|
+
companyLogo: string;
|
|
118
|
+
companyName: string;
|
|
119
|
+
companyState: number;
|
|
120
|
+
};
|
|
121
|
+
interface UserContextProps {
|
|
122
|
+
userInfoState?: UserProps;
|
|
123
|
+
setUserInfo: (val: UserProps) => void;
|
|
124
|
+
removeUserInfo: () => void;
|
|
125
|
+
IsAuthenticated: (tkn?: any) => boolean;
|
|
126
|
+
isTokenExpired: boolean;
|
|
127
|
+
setIsTokenExpired: (val: boolean) => void;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
interface userForgotPasswordProps {
|
|
131
|
+
email: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
declare enum ConfigurationSettingsType {
|
|
135
|
+
isTransferFrozen = 0
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare class BaseEntity {
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
declare class ProgrammeTransfer implements BaseEntity {
|
|
142
|
+
[x: string]: any;
|
|
143
|
+
requestId?: number;
|
|
144
|
+
programmeId?: string;
|
|
145
|
+
initiator?: number;
|
|
146
|
+
initiatorCompanyId?: number;
|
|
147
|
+
toCompanyId?: number;
|
|
148
|
+
toAccount?: string;
|
|
149
|
+
fromCompanyId?: number;
|
|
150
|
+
creditAmount?: number;
|
|
151
|
+
comment?: string;
|
|
152
|
+
txRef?: string;
|
|
153
|
+
txTime?: number;
|
|
154
|
+
status?: CreditTransferStage;
|
|
155
|
+
isRetirement?: boolean;
|
|
156
|
+
companyId?: number[];
|
|
157
|
+
creditOwnerPercentage?: number[];
|
|
158
|
+
createdTime?: number;
|
|
159
|
+
retirementType?: RetireType;
|
|
160
|
+
toCompanyMeta?: any;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
declare enum ProgrammeStage {
|
|
164
|
+
AwaitingAuthorization = "Pending",
|
|
165
|
+
Authorised = "Authorised",
|
|
166
|
+
Rejected = "Rejected"
|
|
167
|
+
}
|
|
168
|
+
declare enum Role {
|
|
169
|
+
Root = "Root",
|
|
170
|
+
Admin = "Admin",
|
|
171
|
+
Manager = "Manager",
|
|
172
|
+
ViewOnly = "ViewOnly"
|
|
173
|
+
}
|
|
174
|
+
declare enum RetireType {
|
|
175
|
+
CROSS_BORDER = "0",
|
|
176
|
+
LEGAL_ACTION = "1",
|
|
177
|
+
OTHER = "2"
|
|
178
|
+
}
|
|
179
|
+
declare enum CreditTransferStage {
|
|
180
|
+
Pending = "Pending",
|
|
181
|
+
Approved = "Accepted",
|
|
182
|
+
Rejected = "Rejected",
|
|
183
|
+
Cancelled = "Cancelled",
|
|
184
|
+
Recognised = "Recognised",
|
|
185
|
+
NotRecognised = "NotRecognised"
|
|
186
|
+
}
|
|
187
|
+
declare enum TxType {
|
|
188
|
+
CREATE = "0",
|
|
189
|
+
REJECT = "1",
|
|
190
|
+
ISSUE = "2",
|
|
191
|
+
TRANSFER = "3",
|
|
192
|
+
CERTIFY = "4",
|
|
193
|
+
RETIRE = "5",
|
|
194
|
+
REVOKE = "6",
|
|
195
|
+
FREEZE = "7",
|
|
196
|
+
AUTH = "8",
|
|
197
|
+
UNFREEZE = "9"
|
|
198
|
+
}
|
|
199
|
+
declare enum SectoralScope {
|
|
200
|
+
"Energy Industry" = "1",
|
|
201
|
+
"Energy Distribution" = "2",
|
|
202
|
+
"Agriculture" = "15"
|
|
203
|
+
}
|
|
204
|
+
declare enum TypeOfMitigation {
|
|
205
|
+
AGRICULTURE = "Agriculture",
|
|
206
|
+
SOLAR = "Solar"
|
|
207
|
+
}
|
|
208
|
+
declare const getStageEnumVal: (value: string) => string;
|
|
209
|
+
declare const getCreditStageVal: (value: string) => string;
|
|
210
|
+
declare const getStageTransferEnumVal: (value: string, transfer: ProgrammeTransfer) => string;
|
|
211
|
+
declare const getStageTagType: (stage: ProgrammeStage) => "error" | "processing" | "default";
|
|
212
|
+
declare const getTransferStageTagType: (stage: CreditTransferStage, transfer: ProgrammeTransfer) => "error" | "processing" | "default" | "success" | "purple" | "orange";
|
|
213
|
+
declare class UnitField {
|
|
214
|
+
unit: string;
|
|
215
|
+
value: any;
|
|
216
|
+
constructor(unit: string, value: any);
|
|
217
|
+
}
|
|
218
|
+
declare enum CompanyRole {
|
|
219
|
+
CERTIFIER = "Certifier",
|
|
220
|
+
PROGRAMME_DEVELOPER = "ProgrammeDeveloper",
|
|
221
|
+
MRV = "MRV",
|
|
222
|
+
GOVERNMENT = "Government"
|
|
223
|
+
}
|
|
224
|
+
interface ProgrammeProperties {
|
|
225
|
+
maxInternationalTransferAmount: string;
|
|
226
|
+
creditingPeriodInYears: number;
|
|
227
|
+
programmeCostUSD: number;
|
|
228
|
+
sourceOfFunding: any;
|
|
229
|
+
grantEquivalentAmount: number;
|
|
230
|
+
carbonPriceUSDPerTon: number;
|
|
231
|
+
buyerCountryEligibility: string;
|
|
232
|
+
geographicalLocation: string[];
|
|
233
|
+
greenHouseGasses: any[];
|
|
234
|
+
creditYear: number;
|
|
235
|
+
programmeMaterials: [];
|
|
236
|
+
projectMaterial: [];
|
|
237
|
+
}
|
|
238
|
+
interface Programme {
|
|
239
|
+
programmeId: string;
|
|
240
|
+
serialNo: string;
|
|
241
|
+
title: string;
|
|
242
|
+
sectoralScope: string;
|
|
243
|
+
sector: string;
|
|
244
|
+
countryCodeA2: string;
|
|
245
|
+
currentStage: ProgrammeStage;
|
|
246
|
+
startTime: number;
|
|
247
|
+
endTime: number;
|
|
248
|
+
creditChange: number;
|
|
249
|
+
creditIssued: number;
|
|
250
|
+
creditEst: number;
|
|
251
|
+
creditBalance: number;
|
|
252
|
+
creditTransferred: number[];
|
|
253
|
+
creditRetired: number[];
|
|
254
|
+
creditFrozen: number[];
|
|
255
|
+
constantVersion: string;
|
|
256
|
+
proponentTaxVatId: string[];
|
|
257
|
+
companyId: number[];
|
|
258
|
+
proponentPercentage: number[];
|
|
259
|
+
creditOwnerPercentage: number[];
|
|
260
|
+
certifierId: any[];
|
|
261
|
+
certifier: any[];
|
|
262
|
+
company: any[];
|
|
263
|
+
creditUnit: string;
|
|
264
|
+
programmeProperties: ProgrammeProperties;
|
|
265
|
+
agricultureProperties: any;
|
|
266
|
+
solarProperties: any;
|
|
267
|
+
txTime: number;
|
|
268
|
+
createdTime: number;
|
|
269
|
+
txRef: string;
|
|
270
|
+
typeOfMitigation: TypeOfMitigation;
|
|
271
|
+
geographicalLocationCordintes: any;
|
|
272
|
+
}
|
|
273
|
+
declare const getGeneralFields: (programme: Programme) => {
|
|
274
|
+
title: string;
|
|
275
|
+
serialNo: string;
|
|
276
|
+
currentStatus: ProgrammeStage;
|
|
277
|
+
applicationType: string;
|
|
278
|
+
sector: string;
|
|
279
|
+
sectoralScope: string;
|
|
280
|
+
startDate: any;
|
|
281
|
+
endDate: any;
|
|
282
|
+
buyerCountry: string;
|
|
283
|
+
};
|
|
284
|
+
declare const addCommSep: (value: any) => string;
|
|
285
|
+
declare const addCommSepRound: (value: any) => string;
|
|
286
|
+
declare const addRoundNumber: (value: any) => number;
|
|
287
|
+
declare const addSpaces: (text: string) => string;
|
|
288
|
+
declare const getFinancialFields: (programme: Programme) => {
|
|
289
|
+
programmeCost: string;
|
|
290
|
+
financingType: string;
|
|
291
|
+
grantEquivalent: UnitField;
|
|
292
|
+
carbonPrice: string;
|
|
293
|
+
};
|
|
294
|
+
declare const getCompanyBgColor: (item: string) => "rgba(185, 226, 244, 0.56)" | "rgba(254, 241, 173, 0.55)" | "rgba(128, 255, 0, 0.12)";
|
|
295
|
+
declare const getRetirementTypeString: (retirementType: string | null) => "-" | "CROSS BORDER TRANSFER" | "LEGAL ACTION" | "OTHER" | undefined;
|
|
296
|
+
declare const sumArray: (arrList: any[]) => any;
|
|
297
|
+
|
|
298
|
+
interface ProgrammeDeveloperCreation {
|
|
299
|
+
companyName?: string;
|
|
300
|
+
companyLocation?: string;
|
|
301
|
+
industry?: string;
|
|
302
|
+
registrationNo?: string;
|
|
303
|
+
}
|
|
304
|
+
interface UserCreationProps extends ProgrammeDeveloperCreation {
|
|
305
|
+
name: string;
|
|
306
|
+
email: string;
|
|
307
|
+
role: string;
|
|
308
|
+
city: string;
|
|
309
|
+
zipCode: string;
|
|
310
|
+
state: string;
|
|
311
|
+
country: string;
|
|
312
|
+
contactNo: string;
|
|
313
|
+
companyLogo?: string;
|
|
314
|
+
}
|
|
315
|
+
interface CountrySelect {
|
|
316
|
+
key: string;
|
|
317
|
+
label: string;
|
|
318
|
+
value: string;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
type Methods = 'get' | 'post' | 'delete' | 'put' | 'patch';
|
|
322
|
+
type ConnectionContextProviderProps = {
|
|
323
|
+
serverURL: string;
|
|
324
|
+
children: ReactNode;
|
|
325
|
+
};
|
|
326
|
+
interface Response<T> {
|
|
327
|
+
data: T;
|
|
328
|
+
statusText: string;
|
|
329
|
+
status?: number;
|
|
330
|
+
headers: RawAxiosResponseHeaders | AxiosResponseHeaders;
|
|
331
|
+
config?: AxiosRequestConfig;
|
|
332
|
+
request?: any;
|
|
333
|
+
message: string;
|
|
334
|
+
}
|
|
335
|
+
type ConnectionProps = {
|
|
336
|
+
post<T = any, R = Response<T>>(path: string, data?: any, config?: AxiosRequestConfig, extraUrl?: string): Promise<R>;
|
|
337
|
+
get<T = any, R = Response<T>>(path: string, config?: AxiosRequestConfig): Promise<R>;
|
|
338
|
+
delete<T = any, R = Response<T>>(path: string, config?: AxiosRequestConfig): Promise<R>;
|
|
339
|
+
put<T = any, R = Response<T>>(path: string, data?: any, config?: AxiosRequestConfig): Promise<R>;
|
|
340
|
+
patch<T = any, R = Response<T>>(path: string, data?: any, config?: AxiosRequestConfig): Promise<R>;
|
|
341
|
+
updateToken: (token?: string) => void;
|
|
342
|
+
token?: string;
|
|
343
|
+
removeToken: (tkn?: string) => void;
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
type HeaderProps = {
|
|
347
|
+
title?: string;
|
|
348
|
+
onToggle: (val: boolean) => void;
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
type LayoutSiderProps = {
|
|
352
|
+
selectedKey?: string;
|
|
353
|
+
collapsed?: boolean;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@undp/carbon-library",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
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": {
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"@types/react": "^18.0.25",
|
|
41
41
|
"@types/mapbox-gl": "^2.7.10",
|
|
42
42
|
"@types/luxon": "^3.1.0",
|
|
43
|
-
"@ant-design/icons": "^4.7.0"
|
|
43
|
+
"@ant-design/icons": "^4.7.0",
|
|
44
|
+
"react-mapbox-gl": "^5.1.1"
|
|
44
45
|
},
|
|
45
46
|
"main": "dist/cjs/index.js",
|
|
46
47
|
"module": "dist/esm/index.js",
|