@zerocarbon/erp-config-sdk 1.0.4 → 1.0.6
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/index.d.ts +348 -335
- package/dist/index.esm.js +4213 -3997
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4218 -3996
- package/dist/index.js.map +1 -1
- package/package.json +1 -9
package/dist/index.d.ts
CHANGED
|
@@ -144,7 +144,7 @@ interface ApiEndpointConfig {
|
|
|
144
144
|
description: string;
|
|
145
145
|
mappingFunction: (data: StrapiItem<any>[]) => ProcessedEmissionItem[];
|
|
146
146
|
}
|
|
147
|
-
interface IndustryConfig
|
|
147
|
+
interface IndustryConfig {
|
|
148
148
|
industry: string;
|
|
149
149
|
displayName: string;
|
|
150
150
|
apiEndpoints: ApiEndpointConfig[];
|
|
@@ -357,7 +357,7 @@ interface FormValidationResult {
|
|
|
357
357
|
isValid: boolean;
|
|
358
358
|
errors: ValidationError[];
|
|
359
359
|
}
|
|
360
|
-
interface
|
|
360
|
+
interface FrontendIndustryConfig {
|
|
361
361
|
name: IndustryType;
|
|
362
362
|
displayName: string;
|
|
363
363
|
requiredFields: string[];
|
|
@@ -366,7 +366,7 @@ interface IndustryConfig {
|
|
|
366
366
|
fieldTypes: Record<string, "number" | "text">;
|
|
367
367
|
placeholders: Record<string, string>;
|
|
368
368
|
}
|
|
369
|
-
declare const FRONTEND_INDUSTRY_CONFIGS: Record<IndustryType,
|
|
369
|
+
declare const FRONTEND_INDUSTRY_CONFIGS: Record<IndustryType, FrontendIndustryConfig>;
|
|
370
370
|
declare const API_ENDPOINTS: {
|
|
371
371
|
readonly CALCULATE: "/carbon-intensity/calculate";
|
|
372
372
|
readonly INDUSTRIES: "/carbon-intensity/industries";
|
|
@@ -951,9 +951,6 @@ type Scope3Item$2 = {
|
|
|
951
951
|
desc: string;
|
|
952
952
|
};
|
|
953
953
|
|
|
954
|
-
declare const INDUSTRY_MAPPING: Record<string, IndustryType>;
|
|
955
|
-
declare const getApiIndustryType: (erpIndustry: string) => IndustryType;
|
|
956
|
-
|
|
957
954
|
/**
|
|
958
955
|
* Format emission values to handle small numbers properly while keeping UI clean
|
|
959
956
|
*/
|
|
@@ -984,6 +981,14 @@ interface BillFilterOptions {
|
|
|
984
981
|
nestedSubCategory?: string;
|
|
985
982
|
plant?: string;
|
|
986
983
|
}
|
|
984
|
+
interface BillCalculationConfig {
|
|
985
|
+
industry: string;
|
|
986
|
+
scope: string;
|
|
987
|
+
category: string;
|
|
988
|
+
calculationMethod: "multiply" | "divide" | "custom";
|
|
989
|
+
divisionFactor?: number;
|
|
990
|
+
customFormula?: (activityData: number, emissionFactor: number, massData?: number) => number;
|
|
991
|
+
}
|
|
987
992
|
interface BillMatchingConfig {
|
|
988
993
|
matchBy: "exact" | "contains" | "startsWith";
|
|
989
994
|
caseSensitive: boolean;
|
|
@@ -994,6 +999,8 @@ interface BillMatchingConfig {
|
|
|
994
999
|
type: boolean;
|
|
995
1000
|
};
|
|
996
1001
|
}
|
|
1002
|
+
declare const BILL_CALCULATION_CONFIGS: BillCalculationConfig[];
|
|
1003
|
+
declare const DEFAULT_BILL_MATCHING_CONFIG: BillMatchingConfig;
|
|
997
1004
|
declare class BillManager {
|
|
998
1005
|
private bills;
|
|
999
1006
|
private matchingConfig;
|
|
@@ -1009,6 +1016,9 @@ declare class BillManager {
|
|
|
1009
1016
|
getMonthlyEmissions(category: string, year: number, scope: string): number[];
|
|
1010
1017
|
updateBills(newBills: Bill[]): void;
|
|
1011
1018
|
}
|
|
1019
|
+
declare const sanitizeNumber: (value: any) => number;
|
|
1020
|
+
declare const cleanValue: (value: any) => string;
|
|
1021
|
+
declare const createBillManager: (bills: Bill[], matchingConfig?: BillMatchingConfig) => BillManager;
|
|
1012
1022
|
|
|
1013
1023
|
interface EmissionSource {
|
|
1014
1024
|
id: string;
|
|
@@ -1071,334 +1081,33 @@ declare const createCapitalizedMonthMapping: () => {
|
|
|
1071
1081
|
};
|
|
1072
1082
|
declare const createEmissionSourceGenerator: (billManager: BillManager) => EmissionSourceGenerator;
|
|
1073
1083
|
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
*
|
|
1077
|
-
* This file defines all UI features and components that can be configured per user.
|
|
1078
|
-
* By default, all features are enabled (true).
|
|
1079
|
-
* To disable features for specific users, add their username to USER_OVERRIDES with the feature set to false.
|
|
1080
|
-
*
|
|
1081
|
-
* Usage:
|
|
1082
|
-
* - isFeatureEnabled('DASHBOARD_CARDS.GHG_INTENSITY', username) -> checks if feature is enabled for user
|
|
1083
|
-
* - getUserFeatures(username) -> gets all features for a specific user
|
|
1084
|
-
*/
|
|
1085
|
-
declare const UI_FEATURES: {
|
|
1086
|
-
readonly DASHBOARD_CARDS: {
|
|
1087
|
-
readonly SCOPE_1: "dashboard.cards.scope1";
|
|
1088
|
-
readonly SCOPE_2: "dashboard.cards.scope2";
|
|
1089
|
-
readonly SCOPE_3: "dashboard.cards.scope3";
|
|
1090
|
-
readonly WATER_MANAGEMENT: "dashboard.cards.waterManagement";
|
|
1091
|
-
readonly GHG_INTENSITY: "dashboard.cards.ghgIntensity";
|
|
1092
|
-
readonly GENERAL_INFORMATION: "dashboard.cards.generalInformation";
|
|
1093
|
-
readonly BEE_SHEET: "dashboard.cards.beeSheet";
|
|
1094
|
-
readonly CCTS_KPI: "dashboard.cards.cctsKpi";
|
|
1095
|
-
readonly CCTS_LEVERS: "dashboard.cards.cctsLevers";
|
|
1096
|
-
readonly GHG_REPORTS: "dashboard.cards.ghgReports";
|
|
1097
|
-
readonly CCTS_REPORTS: "dashboard.cards.cctsReports";
|
|
1098
|
-
};
|
|
1099
|
-
readonly DASHBOARD_SECTIONS: {
|
|
1100
|
-
readonly GHG_SECTION: "dashboard.sections.ghg";
|
|
1101
|
-
readonly CCTS_SECTION: "dashboard.sections.ccts";
|
|
1102
|
-
readonly REPORTS_SECTION: "dashboard.sections.reports";
|
|
1103
|
-
readonly ANALYTICS_SECTION: "dashboard.sections.analytics";
|
|
1104
|
-
};
|
|
1105
|
-
readonly NAVIGATION: {
|
|
1106
|
-
readonly HOME_BUTTON: "navigation.homeButton";
|
|
1107
|
-
readonly RESET_DATA_BUTTON: "navigation.resetDataButton";
|
|
1108
|
-
readonly RESET_ALL_DATA_BUTTON: "navigation.resetAllDataButton";
|
|
1109
|
-
readonly ESG_MIS_BUTTON: "navigation.esgMisButton";
|
|
1110
|
-
readonly TICKETS_BUTTON: "navigation.ticketsButton";
|
|
1111
|
-
readonly LOGOUT_BUTTON: "navigation.logoutButton";
|
|
1112
|
-
readonly GLOBAL_SEARCH: "navigation.globalSearch";
|
|
1113
|
-
readonly PLANT_SELECTION: "navigation.plantSelection";
|
|
1114
|
-
readonly ADD_PLANT_BUTTON: "navigation.addPlantButton";
|
|
1115
|
-
readonly NOTIFICATION_BELL: "navigation.notificationBell";
|
|
1116
|
-
readonly COMPANY_PROFILE: "navigation.companyProfile";
|
|
1117
|
-
};
|
|
1118
|
-
readonly AI_FEATURES: {
|
|
1119
|
-
readonly FLOAT_CHAT: "ai.floatChat";
|
|
1120
|
-
readonly AI_AGENT_CHAT: "ai.agentChat";
|
|
1121
|
-
readonly AGENT_SELECTOR: "ai.agentSelector";
|
|
1122
|
-
readonly THREAD_MANAGEMENT: "ai.threadManagement";
|
|
1123
|
-
readonly TOOL_CALL_DISPLAY: "ai.toolCallDisplay";
|
|
1124
|
-
readonly CHAT_SETTINGS: "ai.chatSettings";
|
|
1125
|
-
readonly GHG_AI_ANALYTICS: "ai.ghgAnalytics";
|
|
1126
|
-
readonly CCTS_AI_ANALYTICS: "ai.cctsAnalytics";
|
|
1127
|
-
readonly PREDICTIVE_ANALYTICS: "ai.predictiveAnalytics";
|
|
1128
|
-
};
|
|
1129
|
-
readonly TABS: {
|
|
1130
|
-
readonly GHG_TAB_GROUP: "tabs.ghgGroup";
|
|
1131
|
-
readonly GHG_TAB: "tabs.ghgTab";
|
|
1132
|
-
readonly GHG_INTENSITY_TAB: "tabs.ghgIntensityTab";
|
|
1133
|
-
readonly CCTS_TAB_GROUP: "tabs.cctsGroup";
|
|
1134
|
-
readonly CCTS_TAB: "tabs.cctsTab";
|
|
1135
|
-
readonly CCTS_KPI_TAB: "tabs.cctsKpiTab";
|
|
1136
|
-
readonly CCTS_LEVERS_TAB: "tabs.cctsLeversTab";
|
|
1137
|
-
readonly REPORTING_AI_TAB_GROUP: "tabs.reportingAiGroup";
|
|
1138
|
-
readonly CCTS_AI_ANALYTICS_TAB: "tabs.cctsAiAnalyticsTab";
|
|
1139
|
-
readonly GHG_AI_ANALYTICS_TAB: "tabs.ghgAiAnalyticsTab";
|
|
1140
|
-
};
|
|
1141
|
-
readonly MODALS: {
|
|
1142
|
-
readonly DELETE_MODAL: "modals.deleteModal";
|
|
1143
|
-
readonly DELETE_YEAR_SELECTION: "modals.deleteYearSelection";
|
|
1144
|
-
readonly DELETE_SCOPE_SELECTION: "modals.deleteScopeSelection";
|
|
1145
|
-
readonly DELETE_CATEGORY_SELECTION: "modals.deleteCategorySelection";
|
|
1146
|
-
readonly RESET_DATA_MODAL: "modals.resetDataModal";
|
|
1147
|
-
readonly RESET_COMPLETE_DATA: "modals.resetCompleteData";
|
|
1148
|
-
readonly RESET_PLANT_DATA: "modals.resetPlantData";
|
|
1149
|
-
readonly RESET_CONFIRMATION: "modals.resetConfirmation";
|
|
1150
|
-
readonly UNSAVED_WARNINGS: "modals.unsavedWarnings";
|
|
1151
|
-
};
|
|
1152
|
-
readonly FORMS: {
|
|
1153
|
-
readonly GENERAL_INFO_FORM: "forms.generalInfo";
|
|
1154
|
-
readonly FORM_1: "forms.form1";
|
|
1155
|
-
readonly FORM_E2: "forms.formE2";
|
|
1156
|
-
readonly FORM_SB: "forms.formSb";
|
|
1157
|
-
readonly EMISSION_FACTOR_FORMS: "forms.emissionFactor";
|
|
1158
|
-
readonly NF_FORMS: "forms.nfForms";
|
|
1159
|
-
readonly SUMMARY_FORMS: "forms.summaryForms";
|
|
1160
|
-
readonly WATER_MANAGEMENT_FORMS: "forms.waterManagement";
|
|
1161
|
-
readonly PLANT_INFO_FORMS: "forms.plantInfo";
|
|
1162
|
-
readonly BASELINE_PARAMETERS: "forms.baselineParameters";
|
|
1163
|
-
};
|
|
1164
|
-
readonly UPLOADS: {
|
|
1165
|
-
readonly EXCEL_UPLOAD_CENTER: "uploads.excelUploadCenter";
|
|
1166
|
-
readonly FILE_UPLOAD_INTERFACE: "uploads.fileUploadInterface";
|
|
1167
|
-
readonly FILE_VALIDATION: "uploads.fileValidation";
|
|
1168
|
-
readonly SUBMIT_DELETE_ACTIONS: "uploads.submitDeleteActions";
|
|
1169
|
-
readonly DOCUMENT_UPLOAD: "uploads.documentUpload";
|
|
1170
|
-
readonly IMAGE_UPLOAD: "uploads.imageUpload";
|
|
1171
|
-
readonly BULK_UPLOAD: "uploads.bulkUpload";
|
|
1172
|
-
};
|
|
1173
|
-
readonly ANALYTICS: {
|
|
1174
|
-
readonly SCOPE_ANALYTICS_CHARTS: "analytics.scopeAnalyticsCharts";
|
|
1175
|
-
readonly SCOPE_1_CHARTS: "analytics.scope1Charts";
|
|
1176
|
-
readonly SCOPE_2_CHARTS: "analytics.scope2Charts";
|
|
1177
|
-
readonly SCOPE_3_CHARTS: "analytics.scope3Charts";
|
|
1178
|
-
readonly BAR_CHARTS: "analytics.barCharts";
|
|
1179
|
-
readonly DOUGHNUT_CHARTS: "analytics.doughnutCharts";
|
|
1180
|
-
readonly YEAR_OVER_YEAR_COMPARISON: "analytics.yearOverYearComparison";
|
|
1181
|
-
readonly CARBON_INTENSITY_CALCULATOR: "analytics.carbonIntensityCalculator";
|
|
1182
|
-
readonly INTENSITY_CALCULATIONS: "analytics.intensityCalculations";
|
|
1183
|
-
readonly COMPARISON_TOOLS: "analytics.comparisonTools";
|
|
1184
|
-
readonly MIS_DASHBOARD: "analytics.misDashboard";
|
|
1185
|
-
readonly KPI_DISPLAYS: "analytics.kpiDisplays";
|
|
1186
|
-
readonly EXPORT_FUNCTIONS: "analytics.exportFunctions";
|
|
1187
|
-
};
|
|
1188
|
-
readonly SEARCH: {
|
|
1189
|
-
readonly GLOBAL_SEARCH_INPUT: "search.globalSearchInput";
|
|
1190
|
-
readonly FILTER_OPTIONS: "search.filterOptions";
|
|
1191
|
-
readonly RESULTS_DISPLAY: "search.resultsDisplay";
|
|
1192
|
-
readonly ADVANCED_FILTERS: "search.advancedFilters";
|
|
1193
|
-
readonly INDUSTRY_SELECTION: "search.industrySelection";
|
|
1194
|
-
readonly YEAR_TYPE_SELECTION: "search.yearTypeSelection";
|
|
1195
|
-
readonly COUNTRY_SELECTION: "search.countrySelection";
|
|
1196
|
-
readonly PLANT_SELECTION_FILTER: "search.plantSelectionFilter";
|
|
1197
|
-
};
|
|
1198
|
-
readonly SUPPORT: {
|
|
1199
|
-
readonly TICKET_SYSTEM: "support.ticketSystem";
|
|
1200
|
-
readonly CREATE_TICKET_FORM: "support.createTicketForm";
|
|
1201
|
-
readonly TICKET_CATEGORIES: "support.ticketCategories";
|
|
1202
|
-
readonly STATUS_TRACKING: "support.statusTracking";
|
|
1203
|
-
readonly COMMENT_SYSTEM: "support.commentSystem";
|
|
1204
|
-
readonly INFO_BAR_COMPONENTS: "support.infoBarComponents";
|
|
1205
|
-
readonly HELP_TEXT_DISPLAY: "support.helpTextDisplay";
|
|
1206
|
-
readonly NOTIFICATION_MESSAGES: "support.notificationMessages";
|
|
1207
|
-
readonly STATUS_INDICATORS: "support.statusIndicators";
|
|
1208
|
-
};
|
|
1209
|
-
readonly AUTH: {
|
|
1210
|
-
readonly BUSINESS_LOGIN: "auth.businessLogin";
|
|
1211
|
-
readonly LOGIN_FORM_FIELDS: "auth.loginFormFields";
|
|
1212
|
-
readonly COMPANY_SELECTION: "auth.companySelection";
|
|
1213
|
-
readonly INDUSTRY_SELECTION: "auth.industrySelection";
|
|
1214
|
-
readonly AUTO_FILL_OPTIONS: "auth.autoFillOptions";
|
|
1215
|
-
readonly DASHBOARD_SELECTION: "auth.dashboardSelection";
|
|
1216
|
-
readonly ROLE_BASED_ROUTING: "auth.roleBasedRouting";
|
|
1217
|
-
};
|
|
1218
|
-
readonly GRI: {
|
|
1219
|
-
readonly GRI_DASHBOARD: "gri.dashboard";
|
|
1220
|
-
readonly GRI_MODULE_CARDS: "gri.moduleCards";
|
|
1221
|
-
readonly COMPLETION_TRACKING: "gri.completionTracking";
|
|
1222
|
-
readonly REPORT_GENERATION: "gri.reportGeneration";
|
|
1223
|
-
readonly BLOCKCHAIN_PUBLISHING: "gri.blockchainPublishing";
|
|
1224
|
-
readonly GRI_IMAGE_UPLOAD: "gri.imageUpload";
|
|
1225
|
-
};
|
|
1226
|
-
readonly WATER: {
|
|
1227
|
-
readonly WATER_KPI_DASHBOARD: "water.kpiDashboard";
|
|
1228
|
-
readonly MONTHLY_TRACKING: "water.monthlyTracking";
|
|
1229
|
-
readonly WATER_UPLOAD_INTERFACE: "water.uploadInterface";
|
|
1230
|
-
readonly WATER_USAGE_INPUT: "water.usageInput";
|
|
1231
|
-
};
|
|
1232
|
-
readonly CCTS: {
|
|
1233
|
-
readonly CCTS_FORMS: "ccts.forms";
|
|
1234
|
-
readonly BEE_SHEET_ACCESS: "ccts.beeSheetAccess";
|
|
1235
|
-
readonly CCTS_KPI_ACCESS: "ccts.kpiAccess";
|
|
1236
|
-
readonly CCTS_LEVERS_ACCESS: "ccts.leversAccess";
|
|
1237
|
-
readonly EMISSION_FACTORS_LIBRARY: "ccts.emissionFactorsLibrary";
|
|
1238
|
-
};
|
|
1239
|
-
readonly MICRO: {
|
|
1240
|
-
readonly DROPDOWN_COMPONENTS: "micro.dropdownComponents";
|
|
1241
|
-
readonly INPUT_COMPONENTS: "micro.inputComponents";
|
|
1242
|
-
readonly BUTTON_COMPONENTS: "micro.buttonComponents";
|
|
1243
|
-
readonly TABLE_COMPONENTS: "micro.tableComponents";
|
|
1244
|
-
readonly MODAL_COMPONENTS: "micro.modalComponents";
|
|
1245
|
-
readonly RADIO_COMPONENTS: "micro.radioComponents";
|
|
1246
|
-
readonly LABEL_COMPONENTS: "micro.labelComponents";
|
|
1247
|
-
};
|
|
1248
|
-
readonly ADVANCED: {
|
|
1249
|
-
readonly BULK_OPERATIONS: "advanced.bulkOperations";
|
|
1250
|
-
readonly DATA_EXPORT: "advanced.dataExport";
|
|
1251
|
-
readonly DATA_IMPORT: "advanced.dataImport";
|
|
1252
|
-
readonly ADVANCED_ANALYTICS: "advanced.analytics";
|
|
1253
|
-
readonly CUSTOM_REPORTS: "advanced.customReports";
|
|
1254
|
-
readonly API_ACCESS: "advanced.apiAccess";
|
|
1255
|
-
readonly INTEGRATION_FEATURES: "advanced.integrationFeatures";
|
|
1256
|
-
};
|
|
1257
|
-
};
|
|
1258
|
-
/**
|
|
1259
|
-
* Helper function to get feature value using the constant paths
|
|
1260
|
-
* @param featureConstant - Use UI_FEATURES constants (e.g., UI_FEATURES.DASHBOARD_CARDS.GHG_INTENSITY)
|
|
1261
|
-
* @param username - The username to check
|
|
1262
|
-
* @returns boolean - true if feature is enabled, false if disabled
|
|
1263
|
-
*/
|
|
1264
|
-
declare const isUIFeatureEnabled: (featureConstant: string, username?: string) => boolean;
|
|
1084
|
+
declare const INDUSTRY_MAPPING: Record<string, IndustryType>;
|
|
1085
|
+
declare const getApiIndustryType: (erpIndustry: string) => IndustryType;
|
|
1265
1086
|
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
placeholder?: string;
|
|
1276
|
-
options?: FieldOption[];
|
|
1277
|
-
required?: boolean;
|
|
1278
|
-
readonly?: boolean;
|
|
1279
|
-
validation?: {
|
|
1280
|
-
min?: number;
|
|
1281
|
-
max?: number;
|
|
1282
|
-
pattern?: string;
|
|
1283
|
-
};
|
|
1284
|
-
conditionalOn?: string;
|
|
1285
|
-
conditionalValue?: string;
|
|
1087
|
+
interface MappingRules {
|
|
1088
|
+
includeIfCategoryContains?: string[];
|
|
1089
|
+
includeIfSubCategoryContains?: string[];
|
|
1090
|
+
includeIfModeContains?: string[];
|
|
1091
|
+
includeIfTypeContains?: string[];
|
|
1092
|
+
includeIfVehicleContains?: string[];
|
|
1093
|
+
includeIfProcessContains?: string[];
|
|
1094
|
+
includeIfActivityContains?: string[];
|
|
1095
|
+
excludeIfCategoryContains?: string[];
|
|
1286
1096
|
}
|
|
1287
|
-
interface
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
gridCols?: number;
|
|
1292
|
-
conditionalOn?: string;
|
|
1293
|
-
conditionalValue?: string;
|
|
1097
|
+
interface ApiSource {
|
|
1098
|
+
endpoint: string;
|
|
1099
|
+
categoryFilters: string[];
|
|
1100
|
+
subcategoryFilters: string[];
|
|
1294
1101
|
}
|
|
1295
|
-
interface
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
scope3AreaIntensity?: number;
|
|
1305
|
-
scope3ProductionIntensity?: number;
|
|
1306
|
-
totalAreaIntensity?: number;
|
|
1307
|
-
totalProductionIntensity?: number;
|
|
1308
|
-
}
|
|
1309
|
-
interface EmissionData {
|
|
1310
|
-
scope1Emissions: number;
|
|
1311
|
-
scope2Emissions: number;
|
|
1312
|
-
scope3Emissions: number;
|
|
1313
|
-
totalEmissions: number;
|
|
1314
|
-
}
|
|
1315
|
-
interface ProductionData {
|
|
1316
|
-
manufacturingFacilityArea: number;
|
|
1317
|
-
annualProductionVolume: number;
|
|
1318
|
-
}
|
|
1319
|
-
interface IndustryFieldConfig {
|
|
1320
|
-
plantNameConfig?: PlantNameConfig;
|
|
1321
|
-
plantInfoFields?: FieldConfig[];
|
|
1322
|
-
additionalSections?: IndustryFieldSection[];
|
|
1323
|
-
enableIntensityCalculations?: boolean;
|
|
1324
|
-
}
|
|
1325
|
-
declare const INDUSTRY_SPECIFIC_FIELDS: Record<string, IndustryFieldConfig>;
|
|
1326
|
-
declare const getIndustryFieldConfig: (industry: string) => IndustryFieldConfig;
|
|
1327
|
-
declare const getPlantNameConfig: (industry: string) => PlantNameConfig;
|
|
1328
|
-
declare const calculateIntensityMetrics: (emissionData: EmissionData, productionData: ProductionData) => IntensityCalculation;
|
|
1329
|
-
declare const formatIntensityValue: (value: number, unit: string) => string;
|
|
1330
|
-
declare const getIntensityFormulas: () => {
|
|
1331
|
-
scope1AreaFormula: string;
|
|
1332
|
-
scope1ProductionFormula: string;
|
|
1333
|
-
scope2AreaFormula: string;
|
|
1334
|
-
scope2ProductionFormula: string;
|
|
1335
|
-
scope3AreaFormula: string;
|
|
1336
|
-
scope3ProductionFormula: string;
|
|
1337
|
-
totalAreaFormula: string;
|
|
1338
|
-
totalProductionFormula: string;
|
|
1339
|
-
};
|
|
1340
|
-
declare const supportsIntensityCalculations: (industry: string) => boolean;
|
|
1341
|
-
interface UserData {
|
|
1342
|
-
buissnessID?: {
|
|
1343
|
-
industry?: string;
|
|
1344
|
-
};
|
|
1345
|
-
additionalConfig?: {
|
|
1346
|
-
erp?: {
|
|
1347
|
-
[industry: string]: any;
|
|
1348
|
-
};
|
|
1349
|
-
};
|
|
1350
|
-
}
|
|
1351
|
-
interface CarbonIntensityApiMapping {
|
|
1352
|
-
[apiField: string]: {
|
|
1353
|
-
userDataPath: string;
|
|
1354
|
-
transform?: (value: any) => number;
|
|
1355
|
-
fallback?: number;
|
|
1356
|
-
required?: boolean;
|
|
1357
|
-
fieldLabel?: string;
|
|
1358
|
-
industryFieldKey?: string;
|
|
1359
|
-
};
|
|
1360
|
-
}
|
|
1361
|
-
declare const CARBON_INTENSITY_FIELD_MAPPINGS: Record<string, CarbonIntensityApiMapping>;
|
|
1362
|
-
declare const getNestedValue: (obj: any, path: string) => any;
|
|
1363
|
-
declare const extractCarbonIntensityData: (userData: UserData, industry: string) => Record<string, number>;
|
|
1364
|
-
declare const mapIndustryToApiType: (industryName: string) => string;
|
|
1365
|
-
declare const getAvailableFieldsForIndustry: (userData: UserData, industry: string) => string[];
|
|
1366
|
-
declare const validateCarbonIntensityData: (userData: UserData, industry: string) => {
|
|
1367
|
-
isValid: boolean;
|
|
1368
|
-
missingFields: Array<{
|
|
1369
|
-
apiField: string;
|
|
1370
|
-
fieldLabel: string;
|
|
1371
|
-
industryFieldKey: string;
|
|
1372
|
-
userDataPath: string;
|
|
1373
|
-
}>;
|
|
1374
|
-
errors: string[];
|
|
1375
|
-
};
|
|
1376
|
-
declare const debugCarbonIntensityMapping: (userData: UserData, industry: string) => void;
|
|
1377
|
-
|
|
1378
|
-
interface MappingRules {
|
|
1379
|
-
includeIfCategoryContains?: string[];
|
|
1380
|
-
includeIfSubCategoryContains?: string[];
|
|
1381
|
-
includeIfModeContains?: string[];
|
|
1382
|
-
includeIfTypeContains?: string[];
|
|
1383
|
-
includeIfVehicleContains?: string[];
|
|
1384
|
-
includeIfProcessContains?: string[];
|
|
1385
|
-
includeIfActivityContains?: string[];
|
|
1386
|
-
excludeIfCategoryContains?: string[];
|
|
1387
|
-
}
|
|
1388
|
-
interface ApiSource {
|
|
1389
|
-
endpoint: string;
|
|
1390
|
-
categoryFilters: string[];
|
|
1391
|
-
subcategoryFilters: string[];
|
|
1392
|
-
}
|
|
1393
|
-
interface Scope3Config {
|
|
1394
|
-
name: string;
|
|
1395
|
-
displayName: string;
|
|
1396
|
-
icon: any;
|
|
1397
|
-
scope: string;
|
|
1398
|
-
unit: string;
|
|
1399
|
-
desc: string;
|
|
1400
|
-
apiSources: ApiSource[];
|
|
1401
|
-
mappingRules: MappingRules;
|
|
1102
|
+
interface Scope3Config {
|
|
1103
|
+
name: string;
|
|
1104
|
+
displayName: string;
|
|
1105
|
+
icon: any;
|
|
1106
|
+
scope: string;
|
|
1107
|
+
unit: string;
|
|
1108
|
+
desc: string;
|
|
1109
|
+
apiSources: ApiSource[];
|
|
1110
|
+
mappingRules: MappingRules;
|
|
1402
1111
|
}
|
|
1403
1112
|
declare const API_SCOPE3_CEMENT_CONFIG: Scope3Config[];
|
|
1404
1113
|
declare const categorizeApiItem: (item: any, apiEndpoint: string) => string | null;
|
|
@@ -1688,6 +1397,310 @@ declare const CCTS_TABLE_COLUMNS: {
|
|
|
1688
1397
|
}[];
|
|
1689
1398
|
declare const calculateCCTSEmission: (bill: any) => number;
|
|
1690
1399
|
|
|
1400
|
+
type FieldType = "text" | "number" | "dropdown" | "multiDropdown" | "country";
|
|
1401
|
+
interface FieldOption {
|
|
1402
|
+
value: string;
|
|
1403
|
+
label: string;
|
|
1404
|
+
}
|
|
1405
|
+
interface FieldConfig {
|
|
1406
|
+
key: string;
|
|
1407
|
+
label: string;
|
|
1408
|
+
type: FieldType;
|
|
1409
|
+
placeholder?: string;
|
|
1410
|
+
options?: FieldOption[];
|
|
1411
|
+
required?: boolean;
|
|
1412
|
+
readonly?: boolean;
|
|
1413
|
+
validation?: {
|
|
1414
|
+
min?: number;
|
|
1415
|
+
max?: number;
|
|
1416
|
+
pattern?: string;
|
|
1417
|
+
};
|
|
1418
|
+
conditionalOn?: string;
|
|
1419
|
+
conditionalValue?: string;
|
|
1420
|
+
}
|
|
1421
|
+
interface IndustryFieldSection {
|
|
1422
|
+
title: string;
|
|
1423
|
+
description?: string;
|
|
1424
|
+
fields: FieldConfig[];
|
|
1425
|
+
gridCols?: number;
|
|
1426
|
+
conditionalOn?: string;
|
|
1427
|
+
conditionalValue?: string;
|
|
1428
|
+
}
|
|
1429
|
+
interface PlantNameConfig {
|
|
1430
|
+
label: string;
|
|
1431
|
+
placeholder: string;
|
|
1432
|
+
}
|
|
1433
|
+
interface IntensityCalculation {
|
|
1434
|
+
scope1AreaIntensity?: number;
|
|
1435
|
+
scope1ProductionIntensity?: number;
|
|
1436
|
+
scope2AreaIntensity?: number;
|
|
1437
|
+
scope2ProductionIntensity?: number;
|
|
1438
|
+
scope3AreaIntensity?: number;
|
|
1439
|
+
scope3ProductionIntensity?: number;
|
|
1440
|
+
totalAreaIntensity?: number;
|
|
1441
|
+
totalProductionIntensity?: number;
|
|
1442
|
+
}
|
|
1443
|
+
interface EmissionData {
|
|
1444
|
+
scope1Emissions: number;
|
|
1445
|
+
scope2Emissions: number;
|
|
1446
|
+
scope3Emissions: number;
|
|
1447
|
+
totalEmissions: number;
|
|
1448
|
+
}
|
|
1449
|
+
interface ProductionData {
|
|
1450
|
+
manufacturingFacilityArea: number;
|
|
1451
|
+
annualProductionVolume: number;
|
|
1452
|
+
}
|
|
1453
|
+
interface IndustryFieldConfig {
|
|
1454
|
+
plantNameConfig?: PlantNameConfig;
|
|
1455
|
+
plantInfoFields?: FieldConfig[];
|
|
1456
|
+
additionalSections?: IndustryFieldSection[];
|
|
1457
|
+
enableIntensityCalculations?: boolean;
|
|
1458
|
+
}
|
|
1459
|
+
declare const INDUSTRY_SPECIFIC_FIELDS: Record<string, IndustryFieldConfig>;
|
|
1460
|
+
declare const getIndustryFieldConfig: (industry: string) => IndustryFieldConfig;
|
|
1461
|
+
declare const getPlantNameConfig: (industry: string) => PlantNameConfig;
|
|
1462
|
+
declare const calculateIntensityMetrics: (emissionData: EmissionData, productionData: ProductionData) => IntensityCalculation;
|
|
1463
|
+
declare const formatIntensityValue: (value: number, unit: string) => string;
|
|
1464
|
+
declare const getIntensityFormulas: () => {
|
|
1465
|
+
scope1AreaFormula: string;
|
|
1466
|
+
scope1ProductionFormula: string;
|
|
1467
|
+
scope2AreaFormula: string;
|
|
1468
|
+
scope2ProductionFormula: string;
|
|
1469
|
+
scope3AreaFormula: string;
|
|
1470
|
+
scope3ProductionFormula: string;
|
|
1471
|
+
totalAreaFormula: string;
|
|
1472
|
+
totalProductionFormula: string;
|
|
1473
|
+
};
|
|
1474
|
+
declare const supportsIntensityCalculations: (industry: string) => boolean;
|
|
1475
|
+
interface UserData {
|
|
1476
|
+
buissnessID?: {
|
|
1477
|
+
industry?: string;
|
|
1478
|
+
};
|
|
1479
|
+
additionalConfig?: {
|
|
1480
|
+
erp?: {
|
|
1481
|
+
[industry: string]: any;
|
|
1482
|
+
};
|
|
1483
|
+
};
|
|
1484
|
+
}
|
|
1485
|
+
interface CarbonIntensityApiMapping {
|
|
1486
|
+
[apiField: string]: {
|
|
1487
|
+
userDataPath: string;
|
|
1488
|
+
transform?: (value: any) => number;
|
|
1489
|
+
fallback?: number;
|
|
1490
|
+
required?: boolean;
|
|
1491
|
+
fieldLabel?: string;
|
|
1492
|
+
industryFieldKey?: string;
|
|
1493
|
+
};
|
|
1494
|
+
}
|
|
1495
|
+
declare const CARBON_INTENSITY_FIELD_MAPPINGS: Record<string, CarbonIntensityApiMapping>;
|
|
1496
|
+
declare const getNestedValue: (obj: any, path: string) => any;
|
|
1497
|
+
declare const extractCarbonIntensityData: (userData: UserData, industry: string) => Record<string, number>;
|
|
1498
|
+
declare const mapIndustryToApiType: (industryName: string) => string;
|
|
1499
|
+
declare const getAvailableFieldsForIndustry: (userData: UserData, industry: string) => string[];
|
|
1500
|
+
declare const validateCarbonIntensityData: (userData: UserData, industry: string) => {
|
|
1501
|
+
isValid: boolean;
|
|
1502
|
+
missingFields: Array<{
|
|
1503
|
+
apiField: string;
|
|
1504
|
+
fieldLabel: string;
|
|
1505
|
+
industryFieldKey: string;
|
|
1506
|
+
userDataPath: string;
|
|
1507
|
+
}>;
|
|
1508
|
+
errors: string[];
|
|
1509
|
+
};
|
|
1510
|
+
declare const debugCarbonIntensityMapping: (userData: UserData, industry: string) => void;
|
|
1511
|
+
|
|
1512
|
+
/**
|
|
1513
|
+
* UI Features Configuration System
|
|
1514
|
+
*
|
|
1515
|
+
* This file defines all UI features and components that can be configured per user.
|
|
1516
|
+
* By default, all features are enabled (true).
|
|
1517
|
+
* To disable features for specific users, add their username to USER_OVERRIDES with the feature set to false.
|
|
1518
|
+
*
|
|
1519
|
+
* Usage:
|
|
1520
|
+
* - isFeatureEnabled('DASHBOARD_CARDS.GHG_INTENSITY', username) -> checks if feature is enabled for user
|
|
1521
|
+
* - getUserFeatures(username) -> gets all features for a specific user
|
|
1522
|
+
*/
|
|
1523
|
+
declare const UI_FEATURES: {
|
|
1524
|
+
readonly DASHBOARD_CARDS: {
|
|
1525
|
+
readonly SCOPE_1: "dashboard.cards.scope1";
|
|
1526
|
+
readonly SCOPE_2: "dashboard.cards.scope2";
|
|
1527
|
+
readonly SCOPE_3: "dashboard.cards.scope3";
|
|
1528
|
+
readonly WATER_MANAGEMENT: "dashboard.cards.waterManagement";
|
|
1529
|
+
readonly GHG_INTENSITY: "dashboard.cards.ghgIntensity";
|
|
1530
|
+
readonly GENERAL_INFORMATION: "dashboard.cards.generalInformation";
|
|
1531
|
+
readonly BEE_SHEET: "dashboard.cards.beeSheet";
|
|
1532
|
+
readonly CCTS_KPI: "dashboard.cards.cctsKpi";
|
|
1533
|
+
readonly CCTS_LEVERS: "dashboard.cards.cctsLevers";
|
|
1534
|
+
readonly GHG_REPORTS: "dashboard.cards.ghgReports";
|
|
1535
|
+
readonly CCTS_REPORTS: "dashboard.cards.cctsReports";
|
|
1536
|
+
};
|
|
1537
|
+
readonly DASHBOARD_SECTIONS: {
|
|
1538
|
+
readonly GHG_SECTION: "dashboard.sections.ghg";
|
|
1539
|
+
readonly CCTS_SECTION: "dashboard.sections.ccts";
|
|
1540
|
+
readonly REPORTS_SECTION: "dashboard.sections.reports";
|
|
1541
|
+
readonly ANALYTICS_SECTION: "dashboard.sections.analytics";
|
|
1542
|
+
};
|
|
1543
|
+
readonly NAVIGATION: {
|
|
1544
|
+
readonly HOME_BUTTON: "navigation.homeButton";
|
|
1545
|
+
readonly RESET_DATA_BUTTON: "navigation.resetDataButton";
|
|
1546
|
+
readonly RESET_ALL_DATA_BUTTON: "navigation.resetAllDataButton";
|
|
1547
|
+
readonly ESG_MIS_BUTTON: "navigation.esgMisButton";
|
|
1548
|
+
readonly TICKETS_BUTTON: "navigation.ticketsButton";
|
|
1549
|
+
readonly LOGOUT_BUTTON: "navigation.logoutButton";
|
|
1550
|
+
readonly GLOBAL_SEARCH: "navigation.globalSearch";
|
|
1551
|
+
readonly PLANT_SELECTION: "navigation.plantSelection";
|
|
1552
|
+
readonly ADD_PLANT_BUTTON: "navigation.addPlantButton";
|
|
1553
|
+
readonly NOTIFICATION_BELL: "navigation.notificationBell";
|
|
1554
|
+
readonly COMPANY_PROFILE: "navigation.companyProfile";
|
|
1555
|
+
};
|
|
1556
|
+
readonly AI_FEATURES: {
|
|
1557
|
+
readonly FLOAT_CHAT: "ai.floatChat";
|
|
1558
|
+
readonly AI_AGENT_CHAT: "ai.agentChat";
|
|
1559
|
+
readonly AGENT_SELECTOR: "ai.agentSelector";
|
|
1560
|
+
readonly THREAD_MANAGEMENT: "ai.threadManagement";
|
|
1561
|
+
readonly TOOL_CALL_DISPLAY: "ai.toolCallDisplay";
|
|
1562
|
+
readonly CHAT_SETTINGS: "ai.chatSettings";
|
|
1563
|
+
readonly GHG_AI_ANALYTICS: "ai.ghgAnalytics";
|
|
1564
|
+
readonly CCTS_AI_ANALYTICS: "ai.cctsAnalytics";
|
|
1565
|
+
readonly PREDICTIVE_ANALYTICS: "ai.predictiveAnalytics";
|
|
1566
|
+
};
|
|
1567
|
+
readonly TABS: {
|
|
1568
|
+
readonly GHG_TAB_GROUP: "tabs.ghgGroup";
|
|
1569
|
+
readonly GHG_TAB: "tabs.ghgTab";
|
|
1570
|
+
readonly GHG_INTENSITY_TAB: "tabs.ghgIntensityTab";
|
|
1571
|
+
readonly CCTS_TAB_GROUP: "tabs.cctsGroup";
|
|
1572
|
+
readonly CCTS_TAB: "tabs.cctsTab";
|
|
1573
|
+
readonly CCTS_KPI_TAB: "tabs.cctsKpiTab";
|
|
1574
|
+
readonly CCTS_LEVERS_TAB: "tabs.cctsLeversTab";
|
|
1575
|
+
readonly REPORTING_AI_TAB_GROUP: "tabs.reportingAiGroup";
|
|
1576
|
+
readonly CCTS_AI_ANALYTICS_TAB: "tabs.cctsAiAnalyticsTab";
|
|
1577
|
+
readonly GHG_AI_ANALYTICS_TAB: "tabs.ghgAiAnalyticsTab";
|
|
1578
|
+
};
|
|
1579
|
+
readonly MODALS: {
|
|
1580
|
+
readonly DELETE_MODAL: "modals.deleteModal";
|
|
1581
|
+
readonly DELETE_YEAR_SELECTION: "modals.deleteYearSelection";
|
|
1582
|
+
readonly DELETE_SCOPE_SELECTION: "modals.deleteScopeSelection";
|
|
1583
|
+
readonly DELETE_CATEGORY_SELECTION: "modals.deleteCategorySelection";
|
|
1584
|
+
readonly RESET_DATA_MODAL: "modals.resetDataModal";
|
|
1585
|
+
readonly RESET_COMPLETE_DATA: "modals.resetCompleteData";
|
|
1586
|
+
readonly RESET_PLANT_DATA: "modals.resetPlantData";
|
|
1587
|
+
readonly RESET_CONFIRMATION: "modals.resetConfirmation";
|
|
1588
|
+
readonly UNSAVED_WARNINGS: "modals.unsavedWarnings";
|
|
1589
|
+
};
|
|
1590
|
+
readonly FORMS: {
|
|
1591
|
+
readonly GENERAL_INFO_FORM: "forms.generalInfo";
|
|
1592
|
+
readonly FORM_1: "forms.form1";
|
|
1593
|
+
readonly FORM_E2: "forms.formE2";
|
|
1594
|
+
readonly FORM_SB: "forms.formSb";
|
|
1595
|
+
readonly EMISSION_FACTOR_FORMS: "forms.emissionFactor";
|
|
1596
|
+
readonly NF_FORMS: "forms.nfForms";
|
|
1597
|
+
readonly SUMMARY_FORMS: "forms.summaryForms";
|
|
1598
|
+
readonly WATER_MANAGEMENT_FORMS: "forms.waterManagement";
|
|
1599
|
+
readonly PLANT_INFO_FORMS: "forms.plantInfo";
|
|
1600
|
+
readonly BASELINE_PARAMETERS: "forms.baselineParameters";
|
|
1601
|
+
};
|
|
1602
|
+
readonly UPLOADS: {
|
|
1603
|
+
readonly EXCEL_UPLOAD_CENTER: "uploads.excelUploadCenter";
|
|
1604
|
+
readonly FILE_UPLOAD_INTERFACE: "uploads.fileUploadInterface";
|
|
1605
|
+
readonly FILE_VALIDATION: "uploads.fileValidation";
|
|
1606
|
+
readonly SUBMIT_DELETE_ACTIONS: "uploads.submitDeleteActions";
|
|
1607
|
+
readonly DOCUMENT_UPLOAD: "uploads.documentUpload";
|
|
1608
|
+
readonly IMAGE_UPLOAD: "uploads.imageUpload";
|
|
1609
|
+
readonly BULK_UPLOAD: "uploads.bulkUpload";
|
|
1610
|
+
};
|
|
1611
|
+
readonly ANALYTICS: {
|
|
1612
|
+
readonly SCOPE_ANALYTICS_CHARTS: "analytics.scopeAnalyticsCharts";
|
|
1613
|
+
readonly SCOPE_1_CHARTS: "analytics.scope1Charts";
|
|
1614
|
+
readonly SCOPE_2_CHARTS: "analytics.scope2Charts";
|
|
1615
|
+
readonly SCOPE_3_CHARTS: "analytics.scope3Charts";
|
|
1616
|
+
readonly BAR_CHARTS: "analytics.barCharts";
|
|
1617
|
+
readonly DOUGHNUT_CHARTS: "analytics.doughnutCharts";
|
|
1618
|
+
readonly YEAR_OVER_YEAR_COMPARISON: "analytics.yearOverYearComparison";
|
|
1619
|
+
readonly CARBON_INTENSITY_CALCULATOR: "analytics.carbonIntensityCalculator";
|
|
1620
|
+
readonly INTENSITY_CALCULATIONS: "analytics.intensityCalculations";
|
|
1621
|
+
readonly COMPARISON_TOOLS: "analytics.comparisonTools";
|
|
1622
|
+
readonly MIS_DASHBOARD: "analytics.misDashboard";
|
|
1623
|
+
readonly KPI_DISPLAYS: "analytics.kpiDisplays";
|
|
1624
|
+
readonly EXPORT_FUNCTIONS: "analytics.exportFunctions";
|
|
1625
|
+
};
|
|
1626
|
+
readonly SEARCH: {
|
|
1627
|
+
readonly GLOBAL_SEARCH_INPUT: "search.globalSearchInput";
|
|
1628
|
+
readonly FILTER_OPTIONS: "search.filterOptions";
|
|
1629
|
+
readonly RESULTS_DISPLAY: "search.resultsDisplay";
|
|
1630
|
+
readonly ADVANCED_FILTERS: "search.advancedFilters";
|
|
1631
|
+
readonly INDUSTRY_SELECTION: "search.industrySelection";
|
|
1632
|
+
readonly YEAR_TYPE_SELECTION: "search.yearTypeSelection";
|
|
1633
|
+
readonly COUNTRY_SELECTION: "search.countrySelection";
|
|
1634
|
+
readonly PLANT_SELECTION_FILTER: "search.plantSelectionFilter";
|
|
1635
|
+
};
|
|
1636
|
+
readonly SUPPORT: {
|
|
1637
|
+
readonly TICKET_SYSTEM: "support.ticketSystem";
|
|
1638
|
+
readonly CREATE_TICKET_FORM: "support.createTicketForm";
|
|
1639
|
+
readonly TICKET_CATEGORIES: "support.ticketCategories";
|
|
1640
|
+
readonly STATUS_TRACKING: "support.statusTracking";
|
|
1641
|
+
readonly COMMENT_SYSTEM: "support.commentSystem";
|
|
1642
|
+
readonly INFO_BAR_COMPONENTS: "support.infoBarComponents";
|
|
1643
|
+
readonly HELP_TEXT_DISPLAY: "support.helpTextDisplay";
|
|
1644
|
+
readonly NOTIFICATION_MESSAGES: "support.notificationMessages";
|
|
1645
|
+
readonly STATUS_INDICATORS: "support.statusIndicators";
|
|
1646
|
+
};
|
|
1647
|
+
readonly AUTH: {
|
|
1648
|
+
readonly BUSINESS_LOGIN: "auth.businessLogin";
|
|
1649
|
+
readonly LOGIN_FORM_FIELDS: "auth.loginFormFields";
|
|
1650
|
+
readonly COMPANY_SELECTION: "auth.companySelection";
|
|
1651
|
+
readonly INDUSTRY_SELECTION: "auth.industrySelection";
|
|
1652
|
+
readonly AUTO_FILL_OPTIONS: "auth.autoFillOptions";
|
|
1653
|
+
readonly DASHBOARD_SELECTION: "auth.dashboardSelection";
|
|
1654
|
+
readonly ROLE_BASED_ROUTING: "auth.roleBasedRouting";
|
|
1655
|
+
};
|
|
1656
|
+
readonly GRI: {
|
|
1657
|
+
readonly GRI_DASHBOARD: "gri.dashboard";
|
|
1658
|
+
readonly GRI_MODULE_CARDS: "gri.moduleCards";
|
|
1659
|
+
readonly COMPLETION_TRACKING: "gri.completionTracking";
|
|
1660
|
+
readonly REPORT_GENERATION: "gri.reportGeneration";
|
|
1661
|
+
readonly BLOCKCHAIN_PUBLISHING: "gri.blockchainPublishing";
|
|
1662
|
+
readonly GRI_IMAGE_UPLOAD: "gri.imageUpload";
|
|
1663
|
+
};
|
|
1664
|
+
readonly WATER: {
|
|
1665
|
+
readonly WATER_KPI_DASHBOARD: "water.kpiDashboard";
|
|
1666
|
+
readonly MONTHLY_TRACKING: "water.monthlyTracking";
|
|
1667
|
+
readonly WATER_UPLOAD_INTERFACE: "water.uploadInterface";
|
|
1668
|
+
readonly WATER_USAGE_INPUT: "water.usageInput";
|
|
1669
|
+
};
|
|
1670
|
+
readonly CCTS: {
|
|
1671
|
+
readonly CCTS_FORMS: "ccts.forms";
|
|
1672
|
+
readonly BEE_SHEET_ACCESS: "ccts.beeSheetAccess";
|
|
1673
|
+
readonly CCTS_KPI_ACCESS: "ccts.kpiAccess";
|
|
1674
|
+
readonly CCTS_LEVERS_ACCESS: "ccts.leversAccess";
|
|
1675
|
+
readonly EMISSION_FACTORS_LIBRARY: "ccts.emissionFactorsLibrary";
|
|
1676
|
+
};
|
|
1677
|
+
readonly MICRO: {
|
|
1678
|
+
readonly DROPDOWN_COMPONENTS: "micro.dropdownComponents";
|
|
1679
|
+
readonly INPUT_COMPONENTS: "micro.inputComponents";
|
|
1680
|
+
readonly BUTTON_COMPONENTS: "micro.buttonComponents";
|
|
1681
|
+
readonly TABLE_COMPONENTS: "micro.tableComponents";
|
|
1682
|
+
readonly MODAL_COMPONENTS: "micro.modalComponents";
|
|
1683
|
+
readonly RADIO_COMPONENTS: "micro.radioComponents";
|
|
1684
|
+
readonly LABEL_COMPONENTS: "micro.labelComponents";
|
|
1685
|
+
};
|
|
1686
|
+
readonly ADVANCED: {
|
|
1687
|
+
readonly BULK_OPERATIONS: "advanced.bulkOperations";
|
|
1688
|
+
readonly DATA_EXPORT: "advanced.dataExport";
|
|
1689
|
+
readonly DATA_IMPORT: "advanced.dataImport";
|
|
1690
|
+
readonly ADVANCED_ANALYTICS: "advanced.analytics";
|
|
1691
|
+
readonly CUSTOM_REPORTS: "advanced.customReports";
|
|
1692
|
+
readonly API_ACCESS: "advanced.apiAccess";
|
|
1693
|
+
readonly INTEGRATION_FEATURES: "advanced.integrationFeatures";
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
/**
|
|
1697
|
+
* Helper function to get feature value using the constant paths
|
|
1698
|
+
* @param featureConstant - Use UI_FEATURES constants (e.g., UI_FEATURES.DASHBOARD_CARDS.GHG_INTENSITY)
|
|
1699
|
+
* @param username - The username to check
|
|
1700
|
+
* @returns boolean - true if feature is enabled, false if disabled
|
|
1701
|
+
*/
|
|
1702
|
+
declare const isUIFeatureEnabled: (featureConstant: string, username?: string) => boolean;
|
|
1703
|
+
|
|
1691
1704
|
declare const WATER_PRODUCTS: {
|
|
1692
1705
|
name: string;
|
|
1693
1706
|
unit: string;
|
|
@@ -2456,8 +2469,8 @@ declare const WATER_MANAGEMENT_SCOPE: {
|
|
|
2456
2469
|
}[];
|
|
2457
2470
|
desc: string;
|
|
2458
2471
|
};
|
|
2459
|
-
declare const CEMENT_INDUSTRY_CONFIG: IndustryConfig
|
|
2460
|
-
declare const getIndustryConfig: (industry: string) => IndustryConfig
|
|
2472
|
+
declare const CEMENT_INDUSTRY_CONFIG: IndustryConfig;
|
|
2473
|
+
declare const getIndustryConfig: (industry: string) => IndustryConfig | null;
|
|
2461
2474
|
declare const getEndpointConfig: (industry: string, endpointName: string) => ApiEndpointConfig | undefined;
|
|
2462
2475
|
|
|
2463
2476
|
type EmissionItem$f = {
|
|
@@ -4007,5 +4020,5 @@ declare namespace index {
|
|
|
4007
4020
|
};
|
|
4008
4021
|
}
|
|
4009
4022
|
|
|
4010
|
-
export { API_ENDPOINTS, API_SCOPE3_CEMENT_CONFIG, CARBON_INTENSITY_FIELD_MAPPINGS, CCTS_ALLSCOPES_CEMENT, CCTS_CALCINATION_PRODUCTS, CCTS_ELECTRICITY_PRODUCTS, CCTS_FIRE_EXTINGUISHER_PRODUCTS, CCTS_FUEL_COMBUSTION_PRODUCTS, CCTS_LPG_PRODUCTS, CCTS_MINING_OPERATIONS_PRODUCTS, CCTS_ONSITE_POWER_PRODUCTS, CCTS_PURCHASED_ELECTRICITY, CCTS_REFRIGERANTS, CCTS_SCOPE1_CEMENT, CCTS_SCOPE2_CEMENT, CCTS_SF6_PRODUCTS, CCTS_TABLE_COLUMNS, EmissionSourceGenerator, FRONTEND_INDUSTRY_CONFIGS, HTTP_STATUS, INDUSTRIES_CONFIG, INDUSTRY_MAPPING, INDUSTRY_SPECIFIC_FIELDS, INTENSITY_FIELD_LABELS, ISO_CATEGORIES_PACKAGING, index as Industries, UI_FEATURES, WATER_PRODUCTS, calculateCCTSEmission, calculateIntensityMetrics, categorizeApiItem, createCapitalizedMonthMapping, createEmissionSourceGenerator, createMonthMapping, debugCarbonIntensityMapping, extractCarbonIntensityData, formatEmissionValue, formatIntensityValue, formatKPIEmission, formatMonthlyEmission, formatPercentage, getApiIndustryType, getAvailableFieldsForIndustry, getIndustryConfig$1 as getIndustryConfig, getIndustryFieldConfig, getIntensityFormulas, getNestedValue, getPlantNameConfig, getScope3ConfigByName, getUserNameWaterManagementConfig, hasIntensities, isUIFeatureEnabled, mapIndustryToApiType, supportsIntensityCalculations, validateCarbonIntensityData };
|
|
4011
|
-
export type { AlloyRequest, AlloyResponse, AluminiumRequest, AluminiumResponse, ApiEndpointConfig, ApiResponse, AutomobileRequest, AutomobileResponse, AviationRequest, AviationResponse, BaseRequest, BaseResponse, Bill, BusinessTravelEmission, BusinessTravelEmissionAttributes, BusinessTravelEmissionsResponse, CarbonIntensityApiMapping, CarbonIntensityRequest, CarbonIntensityResponse, ChemicalRequest, ChemicalResponse, DetailedCarbonIntensityResponse, EditableItem, EmissionSource, Emissions$j as Emissions, EmissionsDataAttributes, EmissionsDataResponse, FieldConfig, FieldOption, FieldType, FoodBeveragesRequest, FoodBeveragesResponse, FormData, FormValidationResult, HospitalityRequest, HospitalityResponse, IndustryFieldConfig, IndustryFieldSection, IndustryType, IntensityCalculation, IntensityValue, LogisticsRequest, LogisticsResponse, ManufacturingRequest, ManufacturingResponse, Meta, MetalEnergyRequest, MetalEnergyResponse, PackagingRequest, PackagingResponse, Pagination, PetrochemicalRequest, PetrochemicalResponse, PharmaRequest, PharmaResponse, PlantNameConfig, ProcessedEmissionCategory, ProcessedEmissionItem, ProcessedScope3Data, ProductionData, RealEstateRequest, RealEstateResponse, ScopeConfig, ScopeProduct, ShippingRequest, ShippingResponse, SteelRequest, SteelResponse, StrapiItem, StrapiResponse, TelecommunicationRequest, TelecommunicationResponse, TextileRequest, TextileResponse, TransportationEmission, TransportationEmissionAttributes, TransportationEmissionsResponse, UserData, UtilitiesRequest, UtilitiesResponse, ValidationError, VehicleEmission, VehicleEmissionAttributes, VehicleEmissionsResponse };
|
|
4023
|
+
export { API_ENDPOINTS, API_SCOPE3_CEMENT_CONFIG, BILL_CALCULATION_CONFIGS, BillManager, CARBON_INTENSITY_FIELD_MAPPINGS, CCTS_ALLSCOPES_CEMENT, CCTS_CALCINATION_PRODUCTS, CCTS_ELECTRICITY_PRODUCTS, CCTS_FIRE_EXTINGUISHER_PRODUCTS, CCTS_FUEL_COMBUSTION_PRODUCTS, CCTS_LPG_PRODUCTS, CCTS_MINING_OPERATIONS_PRODUCTS, CCTS_ONSITE_POWER_PRODUCTS, CCTS_PURCHASED_ELECTRICITY, CCTS_REFRIGERANTS, CCTS_SCOPE1_CEMENT, CCTS_SCOPE2_CEMENT, CCTS_SF6_PRODUCTS, CCTS_TABLE_COLUMNS, DEFAULT_BILL_MATCHING_CONFIG, EmissionSourceGenerator, FRONTEND_INDUSTRY_CONFIGS, HTTP_STATUS, INDUSTRIES_CONFIG, INDUSTRY_MAPPING, INDUSTRY_SPECIFIC_FIELDS, INTENSITY_FIELD_LABELS, ISO_CATEGORIES_PACKAGING, index as Industries, UI_FEATURES, WATER_PRODUCTS, calculateCCTSEmission, calculateIntensityMetrics, categorizeApiItem, cleanValue, createBillManager, createCapitalizedMonthMapping, createEmissionSourceGenerator, createMonthMapping, debugCarbonIntensityMapping, extractCarbonIntensityData, formatEmissionValue, formatIntensityValue, formatKPIEmission, formatMonthlyEmission, formatPercentage, getApiIndustryType, getAvailableFieldsForIndustry, getIndustryConfig$1 as getIndustryConfig, getIndustryFieldConfig, getIntensityFormulas, getNestedValue, getPlantNameConfig, getScope3ConfigByName, getUserNameWaterManagementConfig, hasIntensities, isUIFeatureEnabled, mapIndustryToApiType, sanitizeNumber, supportsIntensityCalculations, validateCarbonIntensityData };
|
|
4024
|
+
export type { AlloyRequest, AlloyResponse, AluminiumRequest, AluminiumResponse, ApiEndpointConfig, ApiResponse, AutomobileRequest, AutomobileResponse, AviationRequest, AviationResponse, BaseRequest, BaseResponse, Bill, BillCalculationConfig, BillFilterOptions, BillMatchingConfig, BusinessTravelEmission, BusinessTravelEmissionAttributes, BusinessTravelEmissionsResponse, CarbonIntensityApiMapping, CarbonIntensityRequest, CarbonIntensityResponse, ChemicalRequest, ChemicalResponse, DetailedCarbonIntensityResponse, EditableItem, EmissionSource, Emissions$j as Emissions, EmissionsDataAttributes, EmissionsDataResponse, FieldConfig, FieldOption, FieldType, FoodBeveragesRequest, FoodBeveragesResponse, FormData, FormValidationResult, FrontendIndustryConfig, HospitalityRequest, HospitalityResponse, IndustryConfig, IndustryFieldConfig, IndustryFieldSection, IndustryType, IntensityCalculation, IntensityValue, LogisticsRequest, LogisticsResponse, ManufacturingRequest, ManufacturingResponse, Meta, MetalEnergyRequest, MetalEnergyResponse, PackagingRequest, PackagingResponse, Pagination, PetrochemicalRequest, PetrochemicalResponse, PharmaRequest, PharmaResponse, PlantNameConfig, ProcessedEmissionCategory, ProcessedEmissionItem, ProcessedScope3Data, ProductionData, RealEstateRequest, RealEstateResponse, ScopeConfig, ScopeProduct, ShippingRequest, ShippingResponse, SteelRequest, SteelResponse, StrapiItem, StrapiResponse, TelecommunicationRequest, TelecommunicationResponse, TextileRequest, TextileResponse, TransportationEmission, TransportationEmissionAttributes, TransportationEmissionsResponse, UserData, UtilitiesRequest, UtilitiesResponse, ValidationError, VehicleEmission, VehicleEmissionAttributes, VehicleEmissionsResponse };
|