@undp/carbon-library 1.0.66 → 1.0.68

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/esm/index.js CHANGED
@@ -4354,6 +4354,13 @@ var SdgGoals$1;
4354
4354
  SdgGoals["partnership"] = "Partnerships for the Goals";
4355
4355
  })(SdgGoals$1 || (SdgGoals$1 = {}));
4356
4356
 
4357
+ var CarbonSystemType;
4358
+ (function (CarbonSystemType) {
4359
+ CarbonSystemType[CarbonSystemType["REGISTRY"] = 0] = "REGISTRY";
4360
+ CarbonSystemType[CarbonSystemType["MRV"] = 1] = "MRV";
4361
+ CarbonSystemType[CarbonSystemType["UNIFIED"] = 2] = "UNIFIED";
4362
+ })(CarbonSystemType || (CarbonSystemType = {}));
4363
+
4357
4364
  var ConfigurationSettingsType;
4358
4365
  (function (ConfigurationSettingsType) {
4359
4366
  ConfigurationSettingsType[ConfigurationSettingsType["isTransferFrozen"] = 0] = "isTransferFrozen";
@@ -5336,9 +5343,18 @@ var CompanyProfileComponent = function (props) {
5336
5343
  var css_248z$g = ".programme-management .programme-title-bar {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0px 0px 30px 0px; }\n .programme-management .programme-title-bar .title {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .programme-management .programme-title-bar .actions {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .programme-management .programme-title-bar .flex-display {\n margin-left: 15px; }\n\n.programme-management .certify-list {\n width: 110px;\n display: flex;\n align-items: center;\n flex-wrap: wrap; }\n .programme-management .certify-list .profile-icon {\n margin-bottom: 4px; }\n\n.programme-management .table-actions-section {\n margin-bottom: 0px; }\n .programme-management .table-actions-section input {\n font-family: \"Inter\";\n font-size: 0.8rem; }\n\n.programme-management .all-check {\n margin-right: 10px; }\n .programme-management .all-check .ant-checkbox-inner::after {\n background-color: rgba(58, 53, 65, 0.5); }\n .programme-management .all-check .ant-checkbox-checked .ant-checkbox-inner::after {\n background-color: transparent; }\n .programme-management .all-check .ant-checkbox-checked .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.5);\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"Retired\"] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"AwaitingAuthorization\"] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"Rejected\"] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"Authorised\"] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"Approved\"] + .ant-checkbox-inner {\n background-color: rgba(145, 85, 253, 0.6);\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"Transferred\"] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n";
5337
5344
  styleInject(css_248z$g);
5338
5345
 
5346
+ var ProgrammeStageUnified;
5347
+ (function (ProgrammeStageUnified) {
5348
+ ProgrammeStageUnified["New"] = "New";
5349
+ ProgrammeStageUnified["AwaitingAuthorization"] = "Pending";
5350
+ ProgrammeStageUnified["Authorised"] = "Authorised";
5351
+ ProgrammeStageUnified["Approved"] = "Approved";
5352
+ ProgrammeStageUnified["Rejected"] = "Rejected";
5353
+ })(ProgrammeStageUnified || (ProgrammeStageUnified = {}));
5354
+
5339
5355
  var Search$1 = Input.Search;
5340
5356
  var ProgrammeManagementComponent = function (props) {
5341
- var t = props.t, visibleColumns = props.visibleColumns, useUserContext = props.useUserContext, useConnection = props.useConnection, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext;
5357
+ var t = props.t, visibleColumns = props.visibleColumns, useUserContext = props.useUserContext, useConnection = props.useConnection, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext, carbonSystemType = props.carbonSystemType;
5342
5358
  var _a = useConnection(); _a.get; _a.delete; var post = _a.post;
5343
5359
  var _b = useState(), totalProgramme = _b[0], setTotalProgramme = _b[1];
5344
5360
  var _c = useState(false), loading = _c[0], setLoading = _c[1];
@@ -5355,7 +5371,11 @@ var ProgrammeManagementComponent = function (props) {
5355
5371
  var _p = useState(false), ministryLevelFilter = _p[0], setMinistryLevelFilter = _p[1];
5356
5372
  var userInfoState = useUserContext().userInfoState;
5357
5373
  var ability = useAbilityContext();
5358
- var stageObject = enableAddProgramme ? ProgrammeStageMRV : ProgrammeStage;
5374
+ var stageObject = carbonSystemType === CarbonSystemType.MRV
5375
+ ? ProgrammeStageMRV
5376
+ : carbonSystemType === CarbonSystemType.REGISTRY
5377
+ ? ProgrammeStage
5378
+ : ProgrammeStageUnified;
5359
5379
  var statusOptions = Object.keys(stageObject).map(function (k, index) { return ({
5360
5380
  label: Object.values(stageObject)[index],
5361
5381
  value: k,
@@ -13472,20 +13492,27 @@ var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
13472
13492
  : 5000000;
13473
13493
  var sectoralScopes = {
13474
13494
  Energy: [
13475
- 'Energy Industries (Renewable – / Non-Renewable Sources)',
13476
- 'Energy Distribution',
13477
- 'Energy Demand',
13495
+ "Energy Industries (Renewable – / Non-Renewable Sources)",
13496
+ "Energy Distribution",
13497
+ "Energy Demand",
13498
+ ],
13499
+ Transport: ["Transport"],
13500
+ Manufacturing: [
13501
+ "Manufacturing Industries",
13502
+ "Chemical Industries",
13503
+ "Metal Production",
13504
+ ],
13505
+ Forestry: ["Afforestation and Reforestation"],
13506
+ Waste: [
13507
+ "Waste Handling and Disposal",
13508
+ "Fugitive Emissions From Fuels (Solid, Oil and Gas)",
13478
13509
  ],
13479
- Transport: ['Transport'],
13480
- Manufacturing: ['Manufacturing Industries', 'Chemical Industries', 'Metal Production'],
13481
- Forestry: ['Afforestation and Reforestation'],
13482
- Waste: ['Waste Handling and Disposal', 'Fugitive Emissions From Fuels (Solid, Oil and Gas)'],
13483
- Agriculture: ['Agriculture'],
13510
+ Agriculture: ["Agriculture"],
13484
13511
  Other: [
13485
- 'Mining/Mineral Production',
13486
- 'Construction',
13487
- 'Fugitive Emissions From Production and Consumption of Halocarbons and Sulphur Hexafluoride',
13488
- 'Solvent Use',
13512
+ "Mining/Mineral Production",
13513
+ "Construction",
13514
+ "Fugitive Emissions From Production and Consumption of Halocarbons and Sulphur Hexafluoride",
13515
+ "Solvent Use",
13489
13516
  ],
13490
13517
  };
13491
13518
  var ProgrammeCreationComponent = function (props) {
@@ -13508,12 +13535,12 @@ var ProgrammeCreationComponent = function (props) {
13508
13535
  var _m = useState(), includedInNAP = _m[0], setIncludedInNAP = _m[1];
13509
13536
  var _o = useState([]), countries = _o[0], setCountries = _o[1];
13510
13537
  var _p = useState([]), organisationsList = _p[0], setOrganisationList = _p[1];
13511
- var _q = useState(''), userOrgTaxId = _q[0], setUserOrgTaxId = _q[1];
13538
+ var _q = useState(""), userOrgTaxId = _q[0], setUserOrgTaxId = _q[1];
13512
13539
  var _r = useState([]), regionsList = _r[0], setRegionsList = _r[1];
13513
13540
  var _s = useState(); _s[0]; var setProgrammeDetailsObj = _s[1];
13514
13541
  var _t = useState(), selectedOrgs = _t[0], setSelectedOrgs = _t[1];
13515
13542
  var _u = useState(false), ownershipPercentageValidation = _u[0], setOwnershipPercentageValidation = _u[1];
13516
- var _v = useState(''), selectedSector = _v[0], setSelectedSector = _v[1];
13543
+ var _v = useState(""), selectedSector = _v[0], setSelectedSector = _v[1];
13517
13544
  var _w = useState([]); _w[0]; var setMinistrySectoralScope = _w[1];
13518
13545
  var _x = useState([]), availableSecoralScope = _x[0], setAvailableSectoralScope = _x[1];
13519
13546
  var _y = useState([]), availableSectar = _y[0], setAvailableSectar = _y[1];
@@ -13552,7 +13579,7 @@ var ProgrammeCreationComponent = function (props) {
13552
13579
  _a.label = 1;
13553
13580
  case 1:
13554
13581
  _a.trys.push([1, 3, 4, 5]);
13555
- return [4 /*yield*/, get('national/organisation/countries')];
13582
+ return [4 /*yield*/, get("national/organisation/countries")];
13556
13583
  case 2:
13557
13584
  response = _a.sent();
13558
13585
  if (response.data) {
@@ -13561,7 +13588,7 @@ var ProgrammeCreationComponent = function (props) {
13561
13588
  return [3 /*break*/, 5];
13562
13589
  case 3:
13563
13590
  error_1 = _a.sent();
13564
- console.log('Error in getting country list', error_1);
13591
+ console.log("Error in getting country list", error_1);
13565
13592
  return [3 /*break*/, 5];
13566
13593
  case 4:
13567
13594
  setLoadingList(false);
@@ -13579,14 +13606,14 @@ var ProgrammeCreationComponent = function (props) {
13579
13606
  _a.label = 1;
13580
13607
  case 1:
13581
13608
  _a.trys.push([1, 3, 4, 5]);
13582
- return [4 /*yield*/, post('national/organisation/regions', {
13609
+ return [4 /*yield*/, post("national/organisation/regions", {
13583
13610
  page: 1,
13584
13611
  size: 100,
13585
13612
  filterAnd: [
13586
13613
  {
13587
- key: 'lang',
13588
- operation: '=',
13589
- value: 'en',
13614
+ key: "lang",
13615
+ operation: "=",
13616
+ value: "en",
13590
13617
  },
13591
13618
  ],
13592
13619
  })];
@@ -13594,12 +13621,12 @@ var ProgrammeCreationComponent = function (props) {
13594
13621
  response = _a.sent();
13595
13622
  if (response.data) {
13596
13623
  regionNames = response.data.map(function (item) { return item.regionName; });
13597
- setRegionsList(__spreadArray(['National'], regionNames, true));
13624
+ setRegionsList(__spreadArray(["National"], regionNames, true));
13598
13625
  }
13599
13626
  return [3 /*break*/, 5];
13600
13627
  case 3:
13601
13628
  error_2 = _a.sent();
13602
- console.log('Error in getting regions list', error_2);
13629
+ console.log("Error in getting regions list", error_2);
13603
13630
  return [3 /*break*/, 5];
13604
13631
  case 4:
13605
13632
  setLoadingList(false);
@@ -13617,13 +13644,13 @@ var ProgrammeCreationComponent = function (props) {
13617
13644
  _a.label = 1;
13618
13645
  case 1:
13619
13646
  _a.trys.push([1, 3, 4, 5]);
13620
- return [4 /*yield*/, post('national/organisation/queryNames', {
13647
+ return [4 /*yield*/, post("national/organisation/queryNames", {
13621
13648
  page: 1,
13622
13649
  size: 100,
13623
13650
  filterAnd: [
13624
13651
  {
13625
- key: 'companyRole',
13626
- operation: '=',
13652
+ key: "companyRole",
13653
+ operation: "=",
13627
13654
  value: CompanyRole.PROGRAMME_DEVELOPER,
13628
13655
  },
13629
13656
  ],
@@ -13639,7 +13666,7 @@ var ProgrammeCreationComponent = function (props) {
13639
13666
  return [3 /*break*/, 5];
13640
13667
  case 3:
13641
13668
  error_3 = _a.sent();
13642
- console.log('Error in getting organisation list', error_3);
13669
+ console.log("Error in getting organisation list", error_3);
13643
13670
  return [3 /*break*/, 5];
13644
13671
  case 4:
13645
13672
  setLoadingList(false);
@@ -13658,13 +13685,13 @@ var ProgrammeCreationComponent = function (props) {
13658
13685
  _k.label = 1;
13659
13686
  case 1:
13660
13687
  _k.trys.push([1, 3, , 4]);
13661
- return [4 /*yield*/, post('national/user/query', {
13688
+ return [4 /*yield*/, post("national/user/query", {
13662
13689
  page: 1,
13663
13690
  size: 10,
13664
13691
  filterAnd: [
13665
13692
  {
13666
- key: 'id',
13667
- operation: '=',
13693
+ key: "id",
13694
+ operation: "=",
13668
13695
  value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.id,
13669
13696
  },
13670
13697
  ],
@@ -13699,19 +13726,23 @@ var ProgrammeCreationComponent = function (props) {
13699
13726
  }
13700
13727
  });
13701
13728
  });
13702
- setAvailableSectar(__spreadArray(__spreadArray([], sectors_1, true), ['Health', 'Education', 'Hospitality'], false));
13729
+ setAvailableSectar(__spreadArray(__spreadArray([], sectors_1, true), [
13730
+ "Health",
13731
+ "Education",
13732
+ "Hospitality",
13733
+ ], false));
13703
13734
  }
13704
13735
  }
13705
13736
  setLoading(false);
13706
13737
  return [3 /*break*/, 4];
13707
13738
  case 3:
13708
13739
  error_4 = _k.sent();
13709
- console.log('Error in getting users', error_4);
13740
+ console.log("Error in getting users", error_4);
13710
13741
  message.open({
13711
- type: 'error',
13742
+ type: "error",
13712
13743
  content: error_4.message,
13713
13744
  duration: 3,
13714
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13745
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13715
13746
  });
13716
13747
  setLoading(false);
13717
13748
  return [3 /*break*/, 4];
@@ -13754,13 +13785,13 @@ var ProgrammeCreationComponent = function (props) {
13754
13785
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== CompanyRole.MINISTRY
13755
13786
  ? ownershipPercentage === null || ownershipPercentage === void 0 ? void 0 : ownershipPercentage.slice(1).map(function (item) { return item.organisation; })
13756
13787
  : ownershipPercentage === null || ownershipPercentage === void 0 ? void 0 : ownershipPercentage.map(function (item) { return item.organisation; });
13757
- logoBase64 = '';
13788
+ logoBase64 = "";
13758
13789
  logoUrls = [];
13759
13790
  if (!(((_a = values === null || values === void 0 ? void 0 : values.designDocument) === null || _a === void 0 ? void 0 : _a.length) > 0)) return [3 /*break*/, 2];
13760
13791
  return [4 /*yield*/, getBase64((_b = values === null || values === void 0 ? void 0 : values.designDocument[0]) === null || _b === void 0 ? void 0 : _b.originFileObj)];
13761
13792
  case 1:
13762
13793
  logoBase64 = _c.sent();
13763
- logoUrls = logoBase64 === null || logoBase64 === void 0 ? void 0 : logoBase64.split(',');
13794
+ logoUrls = logoBase64 === null || logoBase64 === void 0 ? void 0 : logoBase64.split(",");
13764
13795
  _c.label = 2;
13765
13796
  case 2:
13766
13797
  propTaxIds = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== CompanyRole.GOVERNMENT &&
@@ -13769,19 +13800,19 @@ var ProgrammeCreationComponent = function (props) {
13769
13800
  duplicateIds = new Set(propTaxIds).size !== propTaxIds.length;
13770
13801
  if (totalPercentage !== 100) {
13771
13802
  message.open({
13772
- type: 'error',
13773
- content: t('addProgramme:proponentPercentValidation'),
13803
+ type: "error",
13804
+ content: t("addProgramme:proponentPercentValidation"),
13774
13805
  duration: 4,
13775
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13806
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13776
13807
  });
13777
13808
  setLoading(false);
13778
13809
  }
13779
13810
  else if (duplicateIds) {
13780
13811
  message.open({
13781
- type: 'error',
13782
- content: t('addProgramme:duplicateOrg'),
13812
+ type: "error",
13813
+ content: t("addProgramme:duplicateOrg"),
13783
13814
  duration: 4,
13784
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13815
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13785
13816
  });
13786
13817
  setLoading(false);
13787
13818
  }
@@ -13791,14 +13822,16 @@ var ProgrammeCreationComponent = function (props) {
13791
13822
  externalId: values === null || values === void 0 ? void 0 : values.externalId,
13792
13823
  sectoralScope: values === null || values === void 0 ? void 0 : values.sectoralScope,
13793
13824
  sector: values === null || values === void 0 ? void 0 : values.sector,
13794
- startTime: moment(values === null || values === void 0 ? void 0 : values.startTime).startOf('day').unix(),
13795
- endTime: moment(values === null || values === void 0 ? void 0 : values.endTime).endOf('day').unix(),
13825
+ startTime: moment(values === null || values === void 0 ? void 0 : values.startTime).startOf("day").unix(),
13826
+ endTime: moment(values === null || values === void 0 ? void 0 : values.endTime).endOf("day").unix(),
13796
13827
  proponentTaxVatId: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== CompanyRole.GOVERNMENT &&
13797
13828
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== CompanyRole.MINISTRY
13798
13829
  ? __spreadArray([userOrgTaxId], proponentTxIds, true) : proponentTxIds,
13799
13830
  proponentPercentage: proponentPercentages,
13800
13831
  programmeProperties: __assign(__assign(__assign({ buyerCountryEligibility: values === null || values === void 0 ? void 0 : values.buyerCountryEligibility, geographicalLocation: values === null || values === void 0 ? void 0 : values.geographicalLocation, greenHouseGasses: values === null || values === void 0 ? void 0 : values.greenHouseGasses }, ((values === null || values === void 0 ? void 0 : values.ndcScope) !== undefined &&
13801
- (values === null || values === void 0 ? void 0 : values.ndcScope) !== null && { ndcScope: (values === null || values === void 0 ? void 0 : values.ndcScope) === 'true' ? true : false })), (includedInNDC !== undefined &&
13832
+ (values === null || values === void 0 ? void 0 : values.ndcScope) !== null && {
13833
+ ndcScope: (values === null || values === void 0 ? void 0 : values.ndcScope) === "true" ? true : false,
13834
+ })), (includedInNDC !== undefined &&
13802
13835
  includedInNDC !== null && { includedInNdc: includedInNDC })), (includedInNAP !== undefined &&
13803
13836
  includedInNAP !== null && { includedInNap: includedInNAP })),
13804
13837
  };
@@ -13822,29 +13855,28 @@ var ProgrammeCreationComponent = function (props) {
13822
13855
  _a.label = 1;
13823
13856
  case 1:
13824
13857
  _a.trys.push([1, 3, 4, 5]);
13825
- return [4 /*yield*/, post('national/programme/create', payload)];
13858
+ return [4 /*yield*/, post("national/programme/create", payload)];
13826
13859
  case 2:
13827
13860
  response = _a.sent();
13828
- console.log('Programme creation -> ', response);
13829
- if ((response === null || response === void 0 ? void 0 : response.statusText) === 'SUCCESS') {
13861
+ console.log("Programme creation -> ", response);
13862
+ if ((response === null || response === void 0 ? void 0 : response.statusText) === "SUCCESS") {
13830
13863
  message.open({
13831
- type: 'success',
13832
- content: t('addProgramme:programmeCreationSuccess'),
13864
+ type: "success",
13865
+ content: t("addProgramme:programmeCreationSuccess"),
13833
13866
  duration: 4,
13834
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13867
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13835
13868
  });
13836
13869
  }
13837
- //navigate('/programmeManagement/view');
13838
13870
  onNavigateToProgrammeView();
13839
13871
  return [3 /*break*/, 5];
13840
13872
  case 3:
13841
13873
  error_5 = _a.sent();
13842
- console.log('Error in programme creation - ', error_5);
13874
+ console.log("Error in programme creation - ", error_5);
13843
13875
  message.open({
13844
- type: 'error',
13876
+ type: "error",
13845
13877
  content: error_5 === null || error_5 === void 0 ? void 0 : error_5.message,
13846
13878
  duration: 4,
13847
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13879
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13848
13880
  });
13849
13881
  return [3 /*break*/, 5];
13850
13882
  case 4:
@@ -13878,10 +13910,10 @@ var ProgrammeCreationComponent = function (props) {
13878
13910
  (allValues === null || allValues === void 0 ? void 0 : allValues.estimatedProgrammeCostUSD) !== null &&
13879
13911
  (allValues === null || allValues === void 0 ? void 0 : allValues.estimatedProgrammeCostUSD) > 0) {
13880
13912
  var minViableCarbonPrice = Number((allValues === null || allValues === void 0 ? void 0 : allValues.estimatedProgrammeCostUSD) / (allValues === null || allValues === void 0 ? void 0 : allValues.creditEst)).toFixed(2);
13881
- formTwo.setFieldValue('minViableCarbonPrice', addCommSepRound(minViableCarbonPrice));
13913
+ formTwo.setFieldValue("minViableCarbonPrice", addCommSepRound(minViableCarbonPrice));
13882
13914
  }
13883
13915
  else {
13884
- formTwo.setFieldValue('minViableCarbonPrice', '');
13916
+ formTwo.setFieldValue("minViableCarbonPrice", "");
13885
13917
  }
13886
13918
  };
13887
13919
  var onChangeNDCScope = function (event) {
@@ -13898,7 +13930,7 @@ var ProgrammeCreationComponent = function (props) {
13898
13930
  var onClickNDCScope = function (value) {
13899
13931
  if (value === ndcScopeValue) {
13900
13932
  setNdcScopeValue(null);
13901
- formOne.setFieldValue('ndcScope', null);
13933
+ formOne.setFieldValue("ndcScope", null);
13902
13934
  setNdcScopeChanged(undefined);
13903
13935
  setIncludedInNDC(undefined);
13904
13936
  }
@@ -13920,41 +13952,43 @@ var ProgrammeCreationComponent = function (props) {
13920
13952
  }
13921
13953
  };
13922
13954
  var onChangeGeoLocation = function (values) {
13923
- if (values.includes('National')) {
13955
+ if (values.includes("National")) {
13924
13956
  var buyerCountryValues = regionsList;
13925
- var newBuyerValues = buyerCountryValues === null || buyerCountryValues === void 0 ? void 0 : buyerCountryValues.filter(function (item) { return item !== 'National'; });
13926
- formOne.setFieldValue('geographicalLocation', __spreadArray([], newBuyerValues, true));
13957
+ var newBuyerValues = buyerCountryValues === null || buyerCountryValues === void 0 ? void 0 : buyerCountryValues.filter(function (item) { return item !== "National"; });
13958
+ formOne.setFieldValue("geographicalLocation", __spreadArray([], newBuyerValues, true));
13927
13959
  }
13928
13960
  };
13929
13961
  var onInCludedNAPChange = function (event) {
13930
13962
  var _a, _b;
13931
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === 'inNAP') {
13963
+ if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNAP") {
13932
13964
  setIncludedInNAP(true);
13933
13965
  }
13934
- else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === 'notInNAP') {
13966
+ else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNAP") {
13935
13967
  setIncludedInNAP(false);
13936
13968
  }
13937
13969
  };
13938
13970
  var onInCludedNDCChange = function (event) {
13939
13971
  var _a, _b;
13940
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === 'inNDC') {
13972
+ if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNDC") {
13941
13973
  setIncludedInNDC(true);
13942
13974
  }
13943
- else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === 'notInNDC') {
13975
+ else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNDC") {
13944
13976
  setIncludedInNDC(false);
13945
13977
  }
13946
13978
  };
13947
13979
  var onChangeStepOne = function (changedValues, allValues) {
13948
13980
  var _a, _b;
13949
13981
  var selectedCompanies = (_a = allValues === null || allValues === void 0 ? void 0 : allValues.ownershipPercentage) === null || _a === void 0 ? void 0 : _a.map(function (org) { return org === null || org === void 0 ? void 0 : org.organisation; });
13950
- var orgPercentValidation = ((_b = allValues === null || allValues === void 0 ? void 0 : allValues.ownershipPercentage[0]) === null || _b === void 0 ? void 0 : _b.proponentPercentage) === false ? true : false;
13982
+ var orgPercentValidation = ((_b = allValues === null || allValues === void 0 ? void 0 : allValues.ownershipPercentage[0]) === null || _b === void 0 ? void 0 : _b.proponentPercentage) === false
13983
+ ? true
13984
+ : false;
13951
13985
  setOwnershipPercentageValidation(orgPercentValidation);
13952
13986
  var uniqueOrgs = new Set(selectedCompanies);
13953
13987
  setSelectedOrgs(__spreadArray([], uniqueOrgs, true));
13954
13988
  };
13955
13989
  var checkOrgPercentageValidation = function () {
13956
13990
  var _a;
13957
- var orgPercentage = formOne.getFieldValue('ownershipPercentage');
13991
+ var orgPercentage = formOne.getFieldValue("ownershipPercentage");
13958
13992
  var orgPercentValidation = ((_a = orgPercentage[0]) === null || _a === void 0 ? void 0 : _a.proponentPercentage) === false ? true : false;
13959
13993
  setOwnershipPercentageValidation(orgPercentValidation);
13960
13994
  };
@@ -13966,34 +14000,38 @@ var ProgrammeCreationComponent = function (props) {
13966
14000
  }, []);
13967
14001
  return (React.createElement("div", { className: "add-programme-main-container" },
13968
14002
  React.createElement("div", { className: "title-container" },
13969
- React.createElement("div", { className: "main" }, isUpdate ? t('addProgramme:editProgramme') : t('addProgramme:addProgramme')),
13970
- React.createElement("div", { className: "sub" }, isUpdate ? t('addProgramme:editProgrammeSub') : t('addProgramme:addProgrammeSub'))),
14003
+ React.createElement("div", { className: "main" }, isUpdate
14004
+ ? t("addProgramme:editProgramme")
14005
+ : t("addProgramme:addProgramme")),
14006
+ React.createElement("div", { className: "sub" }, isUpdate
14007
+ ? t("addProgramme:editProgrammeSub")
14008
+ : t("addProgramme:addProgrammeSub"))),
13971
14009
  React.createElement("div", { className: "adding-section" },
13972
14010
  React.createElement("div", { className: "form-section" },
13973
14011
  React.createElement(Steps, { progressDot: true, direction: "vertical", current: current, items: [
13974
14012
  {
13975
14013
  title: (React.createElement("div", { className: "step-title-container" },
13976
14014
  React.createElement("div", { className: "step-count" }, "01"),
13977
- React.createElement("div", { className: "title" }, t('addProgramme:addProgramme1')))),
14015
+ React.createElement("div", { className: "title" }, t("addProgramme:addProgramme1")))),
13978
14016
  description: current === 0 && (React.createElement("div", { className: "programme-details-form-container" },
13979
14017
  React.createElement("div", { className: "programme-details-form" },
13980
14018
  React.createElement(Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, name: "programme-details", className: "programme-details-form", layout: "vertical", requiredMark: true, form: formOne, onFinish: onFinishStepOne, onValuesChange: onChangeStepOne },
13981
14019
  React.createElement(Row, { className: "row", gutter: [16, 16] },
13982
14020
  React.createElement(Col, { xl: 12, md: 24 },
13983
14021
  React.createElement("div", { className: "details-part-one" },
13984
- React.createElement(Form.Item, { label: t('addProgramme:title'), name: "title", initialValue: (_a = state === null || state === void 0 ? void 0 : state.record) === null || _a === void 0 ? void 0 : _a.name, rules: [
14022
+ React.createElement(Form.Item, { label: t("addProgramme:title"), name: "title", initialValue: (_a = state === null || state === void 0 ? void 0 : state.record) === null || _a === void 0 ? void 0 : _a.name, rules: [
13985
14023
  {
13986
14024
  required: true,
13987
- message: '',
14025
+ message: "",
13988
14026
  },
13989
14027
  {
13990
14028
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
13991
14029
  return __generator(this, function (_a) {
13992
- if (String(value).trim() === '' ||
14030
+ if (String(value).trim() === "" ||
13993
14031
  String(value).trim() === undefined ||
13994
14032
  value === null ||
13995
14033
  value === undefined) {
13996
- throw new Error("".concat(t('addProgramme:title'), " ").concat(t('isRequired')));
14034
+ throw new Error("".concat(t("addProgramme:title"), " ").concat(t("isRequired")));
13997
14035
  }
13998
14036
  return [2 /*return*/];
13999
14037
  });
@@ -14001,34 +14039,35 @@ var ProgrammeCreationComponent = function (props) {
14001
14039
  },
14002
14040
  ] },
14003
14041
  React.createElement(Input, { size: "large" })),
14004
- React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:sector'), name: "sector", rules: [
14042
+ React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:sector"), name: "sector", rules: [
14005
14043
  {
14006
14044
  required: true,
14007
- message: "".concat(t('addProgramme:sector'), " ").concat(t('isRequired')),
14045
+ message: "".concat(t("addProgramme:sector"), " ").concat(t("isRequired")),
14008
14046
  },
14009
14047
  ] },
14010
- React.createElement(Select, { size: "large", onChange: onChangeSector }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY
14048
+ React.createElement(Select, { size: "large", onChange: onChangeSector }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
14049
+ CompanyRole.MINISTRY
14011
14050
  ? availableSectar === null || availableSectar === void 0 ? void 0 : availableSectar.map(function (sector) { return (React.createElement(Select.Option, { value: sector }, sector)); })
14012
14051
  : Object.values(Sector).map(function (sector) { return (React.createElement(Select.Option, { value: sector }, sector)); }))),
14013
- React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:startTime'), name: "startTime", rules: [
14052
+ React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:startTime"), name: "startTime", rules: [
14014
14053
  {
14015
14054
  required: true,
14016
- message: '',
14055
+ message: "",
14017
14056
  },
14018
14057
  {
14019
14058
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14020
14059
  var endTime;
14021
14060
  return __generator(this, function (_a) {
14022
- if (String(value).trim() === '' ||
14061
+ if (String(value).trim() === "" ||
14023
14062
  String(value).trim() === undefined ||
14024
14063
  value === null ||
14025
14064
  value === undefined) {
14026
- throw new Error("".concat(t('addProgramme:startTime'), " ").concat(t('isRequired')));
14065
+ throw new Error("".concat(t("addProgramme:startTime"), " ").concat(t("isRequired")));
14027
14066
  }
14028
14067
  else {
14029
- endTime = formOne.getFieldValue('endTime');
14068
+ endTime = formOne.getFieldValue("endTime");
14030
14069
  if (endTime && value >= endTime) {
14031
- throw new Error("".concat(t('addProgramme:endTimeVal')));
14070
+ throw new Error("".concat(t("addProgramme:endTimeVal")));
14032
14071
  }
14033
14072
  }
14034
14073
  return [2 /*return*/];
@@ -14037,12 +14076,12 @@ var ProgrammeCreationComponent = function (props) {
14037
14076
  },
14038
14077
  ] },
14039
14078
  React.createElement(DatePicker, { size: "large", disabledDate: function (currentDate) {
14040
- return currentDate < moment().startOf('day');
14079
+ return currentDate < moment().startOf("day");
14041
14080
  } })),
14042
- React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:ghgCovered'), name: "greenHouseGasses", rules: [
14081
+ React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:ghgCovered"), name: "greenHouseGasses", rules: [
14043
14082
  {
14044
14083
  required: true,
14045
- message: "".concat(t('addProgramme:ghgCovered'), " ").concat(t('isRequired')),
14084
+ message: "".concat(t("addProgramme:ghgCovered"), " ").concat(t("isRequired")),
14046
14085
  },
14047
14086
  ] },
14048
14087
  React.createElement(Select, { size: "large", mode: "multiple", maxTagCount: 2, allowClear: true },
@@ -14065,10 +14104,10 @@ var ProgrammeCreationComponent = function (props) {
14065
14104
  React.createElement(Select.Option, { value: "SF6" },
14066
14105
  "SF",
14067
14106
  React.createElement("sub", null, "6")))),
14068
- React.createElement(Form.Item, { label: t('addProgramme:designDoc'), name: "designDocument", valuePropName: "fileList", getValueFromEvent: normFile, required: true, rules: [
14107
+ React.createElement(Form.Item, { label: t("addProgramme:designDoc"), name: "designDocument", valuePropName: "fileList", getValueFromEvent: normFile, required: true, rules: [
14069
14108
  {
14070
14109
  required: true,
14071
- message: "".concat(t('addProgramme:designDoc'), " ").concat(t('addProgramme:isRequired')),
14110
+ message: "".concat(t("addProgramme:designDoc"), " ").concat(t("addProgramme:isRequired")),
14072
14111
  },
14073
14112
  {
14074
14113
  validator: function (rule, file) { return __awaiter(void 0, void 0, void 0, function () {
@@ -14077,15 +14116,15 @@ var ProgrammeCreationComponent = function (props) {
14077
14116
  return __generator(this, function (_c) {
14078
14117
  if ((file === null || file === void 0 ? void 0 : file.length) > 0) {
14079
14118
  isCorrectFormat = false;
14080
- if (((_a = file[0]) === null || _a === void 0 ? void 0 : _a.type) === 'application/pdf') {
14119
+ if (((_a = file[0]) === null || _a === void 0 ? void 0 : _a.type) === "application/pdf") {
14081
14120
  isCorrectFormat = true;
14082
14121
  }
14083
14122
  if (!isCorrectFormat) {
14084
- throw new Error("".concat(t('addProgramme:invalidFileFormat')));
14123
+ throw new Error("".concat(t("addProgramme:invalidFileFormat")));
14085
14124
  }
14086
14125
  else if (((_b = file[0]) === null || _b === void 0 ? void 0 : _b.size) > maximumImageSize) {
14087
14126
  // default size format of files would be in bytes -> 1MB = 1000000bytes
14088
- throw new Error("".concat(t('common:maxSizeVal')));
14127
+ throw new Error("".concat(t("common:maxSizeVal")));
14089
14128
  }
14090
14129
  }
14091
14130
  return [2 /*return*/];
@@ -14099,7 +14138,7 @@ var ProgrammeCreationComponent = function (props) {
14099
14138
  // defaultFileList={fileList}
14100
14139
  maxCount: 1 },
14101
14140
  React.createElement(Button, { className: "upload-doc", size: "large", icon: React.createElement(UploadOutlined, null) }, "Upload"))),
14102
- React.createElement(Form.Item, { label: t('addProgramme:buyerCountryEligibility'), name: "buyerCountryEligibility", initialValue: (_b = state === null || state === void 0 ? void 0 : state.record) === null || _b === void 0 ? void 0 : _b.name, rules: [
14141
+ React.createElement(Form.Item, { label: t("addProgramme:buyerCountryEligibility"), name: "buyerCountryEligibility", initialValue: (_b = state === null || state === void 0 ? void 0 : state.record) === null || _b === void 0 ? void 0 : _b.name, rules: [
14103
14142
  {
14104
14143
  required: false,
14105
14144
  },
@@ -14107,16 +14146,19 @@ var ProgrammeCreationComponent = function (props) {
14107
14146
  React.createElement(Select, { size: "large", loading: loadingList }, countries.map(function (country) { return (React.createElement(Select.Option, { key: country.alpha2, value: country.alpha2 }, country.name)); }))),
14108
14147
  React.createElement(Form.List, { name: "ownershipPercentage", initialValue: initialOrganisationOwnershipValues }, function (fields, _a) {
14109
14148
  var add = _a.add, remove = _a.remove;
14110
- return (React.createElement("div", { className: "space-container", style: { width: '100%' } },
14149
+ return (React.createElement("div", { className: "space-container", style: { width: "100%" } },
14111
14150
  fields.map(function (_a) {
14112
14151
  var key = _a.key, name = _a.name, restField = __rest(_a, ["key", "name"]);
14113
- return (React.createElement(Space, { wrap: true, key: key, style: { display: 'flex', marginBottom: 8 }, align: "center", size: 'large' },
14152
+ return (React.createElement(Space, { wrap: true, key: key, style: {
14153
+ display: "flex",
14154
+ marginBottom: 8,
14155
+ }, align: "center", size: "large" },
14114
14156
  React.createElement("div", { className: "ownership-list-item" },
14115
- React.createElement(Form.Item, __assign({}, restField, { label: t('addProgramme:company'), name: [name, 'organisation'], wrapperCol: { span: 24 }, className: "organisation", rules: [
14157
+ React.createElement(Form.Item, __assign({}, restField, { label: t("addProgramme:company"), name: [name, "organisation"], wrapperCol: { span: 24 }, className: "organisation", rules: [
14116
14158
  {
14117
14159
  required: true,
14118
- message: "".concat(t('addProgramme:company'), " ").concat(t('isRequired')),
14119
- validateTrigger: 'onBlur',
14160
+ message: "".concat(t("addProgramme:company"), " ").concat(t("isRequired")),
14161
+ validateTrigger: "onBlur",
14120
14162
  },
14121
14163
  ], shouldUpdate: true }),
14122
14164
  React.createElement(Select, { size: "large", loading: loadingList, disabled: name === 0 &&
@@ -14128,30 +14170,39 @@ var ProgrammeCreationComponent = function (props) {
14128
14170
  CompanyRole.GOVERNMENT &&
14129
14171
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14130
14172
  CompanyRole.MINISTRY &&
14131
- userOrgTaxId === (organisation === null || organisation === void 0 ? void 0 : organisation.taxId)) }, organisation.name)); }))),
14132
- React.createElement(Form.Item, __assign({}, restField, { label: t('addProgramme:proponentPercentage'), className: "ownership-percent", name: [name, 'proponentPercentage'], labelCol: { span: 24 }, wrapperCol: { span: 24 }, required: true, rules: [
14173
+ userOrgTaxId ===
14174
+ (organisation === null || organisation === void 0 ? void 0 : organisation.taxId)) }, organisation.name)); }))),
14175
+ React.createElement(Form.Item, __assign({}, restField, { label: t("addProgramme:proponentPercentage"), className: "ownership-percent", name: [
14176
+ name,
14177
+ "proponentPercentage",
14178
+ ], labelCol: { span: 24 }, wrapperCol: { span: 24 }, required: true, rules: [
14133
14179
  {
14134
14180
  required: true,
14135
- message: "".concat(t('addProgramme:proponentPercentage'), " ").concat(t('isRequired')),
14181
+ message: "".concat(t("addProgramme:proponentPercentage"), " ").concat(t("isRequired")),
14136
14182
  },
14137
14183
  {
14138
14184
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14139
14185
  return __generator(this, function (_a) {
14140
14186
  if (ownershipPercentageValidation &&
14141
14187
  name === 0) {
14142
- throw new Error("".concat(t('addProgramme:proponentPercentage'), " ").concat(t('isRequired')));
14188
+ throw new Error("".concat(t("addProgramme:proponentPercentage"), " ").concat(t("isRequired")));
14143
14189
  }
14144
14190
  return [2 /*return*/];
14145
14191
  });
14146
14192
  }); },
14147
14193
  },
14148
14194
  ], shouldUpdate: true }),
14149
- React.createElement(InputNumber, { size: "large", min: 1, max: 100, formatter: function (value) { return "".concat(value, "%"); }, parser: function (value) { return value.replace('%', ''); }, disabled: (fields === null || fields === void 0 ? void 0 : fields.length) < 2 &&
14195
+ React.createElement(InputNumber, { size: "large", min: 1, max: 100, formatter: function (value) {
14196
+ return "".concat(value, "%");
14197
+ }, parser: function (value) {
14198
+ return value.replace("%", "");
14199
+ }, disabled: (fields === null || fields === void 0 ? void 0 : fields.length) < 2 &&
14150
14200
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14151
14201
  CompanyRole.GOVERNMENT &&
14152
14202
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14153
14203
  CompanyRole.MINISTRY })),
14154
- (fields === null || fields === void 0 ? void 0 : fields.length) > 1 && name !== 0 && (React.createElement(MinusCircleOutlined, { className: "dynamic-delete-button", onClick: function () {
14204
+ (fields === null || fields === void 0 ? void 0 : fields.length) > 1 &&
14205
+ name !== 0 && (React.createElement(MinusCircleOutlined, { className: "dynamic-delete-button", onClick: function () {
14155
14206
  remove(name);
14156
14207
  } })))));
14157
14208
  }),
@@ -14160,19 +14211,19 @@ var ProgrammeCreationComponent = function (props) {
14160
14211
  }))),
14161
14212
  React.createElement(Col, { xl: 12, md: 24 },
14162
14213
  React.createElement("div", { className: "details-part-two" },
14163
- React.createElement(Form.Item, { label: t('addProgramme:externalId'), name: "externalId", rules: [
14214
+ React.createElement(Form.Item, { label: t("addProgramme:externalId"), name: "externalId", rules: [
14164
14215
  {
14165
14216
  required: true,
14166
- message: '',
14217
+ message: "",
14167
14218
  },
14168
14219
  {
14169
14220
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14170
14221
  return __generator(this, function (_a) {
14171
- if (String(value).trim() === '' ||
14222
+ if (String(value).trim() === "" ||
14172
14223
  String(value).trim() === undefined ||
14173
14224
  value === null ||
14174
14225
  value === undefined) {
14175
- throw new Error("".concat(t('addProgramme:externalId'), " ").concat(t('isRequired')));
14226
+ throw new Error("".concat(t("addProgramme:externalId"), " ").concat(t("isRequired")));
14176
14227
  }
14177
14228
  return [2 /*return*/];
14178
14229
  });
@@ -14180,13 +14231,14 @@ var ProgrammeCreationComponent = function (props) {
14180
14231
  },
14181
14232
  ] },
14182
14233
  React.createElement(Input, { size: "large" })),
14183
- React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:sectoralScope'), name: "sectoralScope", rules: [
14234
+ React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:sectoralScope"), name: "sectoralScope", rules: [
14184
14235
  {
14185
14236
  required: true,
14186
- message: "".concat(t('addProgramme:sectoralScope'), " ").concat(t('isRequired')),
14237
+ message: "".concat(t("addProgramme:sectoralScope"), " ").concat(t("isRequired")),
14187
14238
  },
14188
14239
  ] },
14189
- React.createElement(Select, { size: "large" }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY
14240
+ React.createElement(Select, { size: "large" }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
14241
+ CompanyRole.MINISTRY
14190
14242
  ? availableSecoralScope === null || availableSecoralScope === void 0 ? void 0 : availableSecoralScope.map(function (item) { return (React.createElement(Select.Option, { key: item.value, value: item.value }, item.key)); })
14191
14243
  : selectedSectoralScopes === null || selectedSectoralScopes === void 0 ? void 0 : selectedSectoralScopes.map(function (val) {
14192
14244
  if (val in SectoralScope) {
@@ -14195,25 +14247,25 @@ var ProgrammeCreationComponent = function (props) {
14195
14247
  }
14196
14248
  return null;
14197
14249
  }))),
14198
- React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:endTime'), name: "endTime", rules: [
14250
+ React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:endTime"), name: "endTime", rules: [
14199
14251
  {
14200
14252
  required: true,
14201
- message: '',
14253
+ message: "",
14202
14254
  },
14203
14255
  {
14204
14256
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14205
14257
  var startTime;
14206
14258
  return __generator(this, function (_a) {
14207
- if (String(value).trim() === '' ||
14259
+ if (String(value).trim() === "" ||
14208
14260
  String(value).trim() === undefined ||
14209
14261
  value === null ||
14210
14262
  value === undefined) {
14211
- throw new Error("".concat(t('addProgramme:endTime'), " ").concat(t('isRequired')));
14263
+ throw new Error("".concat(t("addProgramme:endTime"), " ").concat(t("isRequired")));
14212
14264
  }
14213
14265
  else {
14214
- startTime = formOne.getFieldValue('startTime');
14266
+ startTime = formOne.getFieldValue("startTime");
14215
14267
  if (startTime && value <= startTime) {
14216
- throw new Error("".concat(t('addProgramme:endTimeVal')));
14268
+ throw new Error("".concat(t("addProgramme:endTimeVal")));
14217
14269
  }
14218
14270
  }
14219
14271
  return [2 /*return*/];
@@ -14222,22 +14274,22 @@ var ProgrammeCreationComponent = function (props) {
14222
14274
  },
14223
14275
  ] },
14224
14276
  React.createElement(DatePicker, { size: "large", disabledDate: function (currentDate) {
14225
- return currentDate < moment().endOf('day');
14277
+ return currentDate < moment().endOf("day");
14226
14278
  } })),
14227
- React.createElement(Form.Item, { label: t('addProgramme:ndcScope'), wrapperCol: { span: 13 }, className: "role-group", name: "ndcScope", initialValue: ndcScopeValue, rules: [
14279
+ React.createElement(Form.Item, { label: t("addProgramme:ndcScope"), wrapperCol: { span: 13 }, className: "role-group", name: "ndcScope", initialValue: ndcScopeValue, rules: [
14228
14280
  {
14229
14281
  required: false,
14230
14282
  },
14231
14283
  ] },
14232
14284
  React.createElement(Radio.Group, { size: "large", onChange: onChangeNDCScope, value: ndcScopeValue },
14233
14285
  React.createElement("div", { className: "condition-radio-container" },
14234
- React.createElement(Radio.Button, { className: "condition-radio", value: "true", onClick: function () { return onClickNDCScope('true'); } }, t('addProgramme:conditional'))),
14286
+ React.createElement(Radio.Button, { className: "condition-radio", value: "true", onClick: function () { return onClickNDCScope("true"); } }, t("addProgramme:conditional"))),
14235
14287
  React.createElement("div", { className: "condition-radio-container" },
14236
- React.createElement(Radio.Button, { className: "condition-radio", value: "false", onClick: function () { return onClickNDCScope('false'); } }, t('addProgramme:unConditional'))))),
14237
- React.createElement(Form.Item, { label: t('addProgramme:geographicalLocation'), name: "geographicalLocation", rules: [
14288
+ React.createElement(Radio.Button, { className: "condition-radio", value: "false", onClick: function () { return onClickNDCScope("false"); } }, t("addProgramme:unConditional"))))),
14289
+ React.createElement(Form.Item, { label: t("addProgramme:geographicalLocation"), name: "geographicalLocation", rules: [
14238
14290
  {
14239
14291
  required: true,
14240
- message: "".concat(t('addProgramme:geographicalLocation'), " ").concat(t('isRequired')),
14292
+ message: "".concat(t("addProgramme:geographicalLocation"), " ").concat(t("isRequired")),
14241
14293
  },
14242
14294
  ] },
14243
14295
  React.createElement(Select, { mode: "multiple", size: "large", maxTagCount: 2, onChange: onChangeGeoLocation, loading: loadingList, className: "custom-select", allowClear: true }, regionsList.map(function (region) { return (React.createElement(Select.Option, { value: region }, region)); })))))),
@@ -14246,100 +14298,110 @@ var ProgrammeCreationComponent = function (props) {
14246
14298
  React.createElement(Row, { className: "in-ndc-row" },
14247
14299
  React.createElement(Col, { md: 16, lg: 18, xl: 18 },
14248
14300
  React.createElement("div", { className: "included-label" },
14249
- React.createElement("div", null, t('addProgramme:inNDC')),
14301
+ React.createElement("div", null, t("addProgramme:inNDC")),
14250
14302
  React.createElement("div", { className: "info-container" },
14251
- React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t('addProgramme:inNDCToolTip'), overlayClassName: "custom-tooltip" },
14303
+ React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("addProgramme:inNDCToolTip"), overlayClassName: "custom-tooltip" },
14252
14304
  React.createElement(InfoCircle, { color: "#000000", size: 17 }))))),
14253
14305
  React.createElement(Col, { md: 8, lg: 6, xl: 6, className: "included-val" },
14254
14306
  React.createElement(Radio.Group, { size: "middle", disabled: ndcScopeChanged, value: includedInNDC, onChange: onInCludedNDCChange },
14255
14307
  React.createElement("div", { className: "yes-no-radio-container" },
14256
- React.createElement(Radio.Button, { className: "yes-no-radio", value: true, onClick: function () { return onClickIncludedInNDCScope(true); } }, t('addProgramme:yes'))),
14308
+ React.createElement(Radio.Button, { className: "yes-no-radio", value: true, onClick: function () {
14309
+ return onClickIncludedInNDCScope(true);
14310
+ } }, t("addProgramme:yes"))),
14257
14311
  React.createElement("div", { className: "yes-no-radio-container" },
14258
- React.createElement(Radio.Button, { className: "yes-no-radio", value: false, onClick: function () { return onClickIncludedInNDCScope(false); } }, t('addProgramme:no'))))))),
14312
+ React.createElement(Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14313
+ return onClickIncludedInNDCScope(false);
14314
+ } }, t("addProgramme:no"))))))),
14259
14315
  React.createElement(Col, { md: 24, xl: 12, className: "in-nap-col" },
14260
14316
  React.createElement(Row, { className: "in-nap-row" },
14261
14317
  React.createElement(Col, { md: 16, lg: 18, xl: 18 },
14262
14318
  React.createElement("div", { className: "included-label" },
14263
- React.createElement("div", null, t('addProgramme:inNAP')),
14319
+ React.createElement("div", null, t("addProgramme:inNAP")),
14264
14320
  React.createElement("div", { className: "info-container" },
14265
- React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t('addProgramme:inNAPToolTip'), overlayClassName: "custom-tooltip" },
14321
+ React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("addProgramme:inNAPToolTip"), overlayClassName: "custom-tooltip" },
14266
14322
  React.createElement(InfoCircle, { color: "#000000", size: 17 }))))),
14267
14323
  React.createElement(Col, { md: 8, lg: 6, xl: 6, className: "included-val" },
14268
14324
  React.createElement(Radio.Group, { size: "middle", onChange: onInCludedNAPChange, value: includedInNAP },
14269
14325
  React.createElement("div", { className: "yes-no-radio-container" },
14270
- React.createElement(Radio.Button, { className: "yes-no-radio", value: true, onClick: function () { return onClickIncludedInNAPScope(true); } }, t('addProgramme:yes'))),
14326
+ React.createElement(Radio.Button, { className: "yes-no-radio", value: true, onClick: function () {
14327
+ return onClickIncludedInNAPScope(true);
14328
+ } }, t("addProgramme:yes"))),
14271
14329
  React.createElement("div", { className: "yes-no-radio-container" },
14272
- React.createElement(Radio.Button, { className: "yes-no-radio", value: false, onClick: function () { return onClickIncludedInNAPScope(false); } }, t('addProgramme:no')))))))),
14330
+ React.createElement(Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14331
+ return onClickIncludedInNAPScope(false);
14332
+ } }, t("addProgramme:no")))))))),
14273
14333
  React.createElement("div", { className: "steps-actions" },
14274
- React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onClick: checkOrgPercentageValidation }, t('addProgramme:next'))))))),
14334
+ React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onClick: checkOrgPercentageValidation }, t("addProgramme:next"))))))),
14275
14335
  },
14276
14336
  {
14277
14337
  title: (React.createElement("div", { className: "step-title-container" },
14278
14338
  React.createElement("div", { className: "step-count" }, "02"),
14279
- React.createElement("div", { className: "title" }, t('addProgramme:addProgramme2')))),
14339
+ React.createElement("div", { className: "title" }, t("addProgramme:addProgramme2")))),
14280
14340
  description: current === 1 && (React.createElement("div", { className: "programme-sought-form-container" },
14281
14341
  React.createElement("div", { className: "programme-sought-form" },
14282
14342
  React.createElement(Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, name: "programme-sought", className: "programme-sought-form", layout: "vertical", requiredMark: true, form: formTwo, onFinish: onFinishStepTwo, onValuesChange: onFormTwoValuesChane },
14283
14343
  React.createElement(Row, { className: "row", gutter: [16, 16] },
14284
14344
  React.createElement(Col, { xl: 12, md: 24 },
14285
14345
  React.createElement("div", { className: "details-part-one" },
14286
- React.createElement(Form.Item, { label: t('addProgramme:estimatedProgrammeCostUSD'), name: "estimatedProgrammeCostUSD", rules: [
14346
+ React.createElement(Form.Item, { label: t("addProgramme:estimatedProgrammeCostUSD"), name: "estimatedProgrammeCostUSD", rules: [
14287
14347
  {
14288
14348
  required: true,
14289
- message: '',
14349
+ message: "",
14290
14350
  },
14291
14351
  {
14292
14352
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14293
14353
  return __generator(this, function (_a) {
14294
- if (String(value).trim() === '' ||
14354
+ if (String(value).trim() === "" ||
14295
14355
  String(value).trim() === undefined ||
14296
14356
  value === null ||
14297
14357
  value === undefined) {
14298
- throw new Error("".concat(t('addProgramme:estimatedProgrammeCostUSD'), " ").concat(t('isRequired')));
14358
+ throw new Error("".concat(t("addProgramme:estimatedProgrammeCostUSD"), " ").concat(t("isRequired")));
14299
14359
  }
14300
- else if (!isNaN(value) && Number(value) > 0) {
14360
+ else if (!isNaN(value) &&
14361
+ Number(value) > 0) {
14301
14362
  return [2 /*return*/, Promise.resolve()];
14302
14363
  }
14303
14364
  else {
14304
- throw new Error("".concat(t('addProgramme:estimatedProgrammeCostUSD'), " ").concat(t('isInvalid')));
14365
+ throw new Error("".concat(t("addProgramme:estimatedProgrammeCostUSD"), " ").concat(t("isInvalid")));
14305
14366
  }
14306
14367
  });
14307
14368
  }); },
14308
14369
  },
14309
14370
  ] },
14310
- React.createElement(InputNumber, { size: "large", style: { width: '100%', paddingRight: 12 } })),
14311
- React.createElement(Form.Item, { label: t('addProgramme:minViableCarbonPrice'), name: "minViableCarbonPrice" },
14312
- React.createElement(InputNumber, { disabled: true, size: "large", style: { width: '100%', paddingRight: 12 } })))),
14371
+ React.createElement(InputNumber, { size: "large", style: { width: "100%", paddingRight: 12 } })),
14372
+ React.createElement(Form.Item, { label: t("addProgramme:minViableCarbonPrice"), name: "minViableCarbonPrice" },
14373
+ React.createElement(InputNumber, { disabled: true, size: "large", style: { width: "100%", paddingRight: 12 } })))),
14313
14374
  React.createElement(Col, { xl: 12, md: 24 },
14314
14375
  React.createElement("div", { className: "details-part-two" },
14315
- React.createElement(Form.Item, { label: t('addProgramme:creditEst'), name: "creditEst", rules: [
14376
+ React.createElement(Form.Item, { label: t("addProgramme:creditEst"), name: "creditEst", rules: [
14316
14377
  {
14317
14378
  required: true,
14318
- message: '',
14379
+ message: "",
14319
14380
  },
14320
14381
  {
14321
14382
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14322
14383
  return __generator(this, function (_a) {
14323
- if (String(value).trim() === '' ||
14384
+ if (String(value).trim() === "" ||
14324
14385
  String(value).trim() === undefined ||
14325
14386
  value === null ||
14326
14387
  value === undefined) {
14327
- throw new Error("".concat(t('addProgramme:creditEst'), " ").concat(t('isRequired')));
14388
+ throw new Error("".concat(t("addProgramme:creditEst"), " ").concat(t("isRequired")));
14328
14389
  }
14329
- else if (!isNaN(value) && Number(value) > 0) {
14390
+ else if (!isNaN(value) &&
14391
+ Number(value) > 0) {
14330
14392
  return [2 /*return*/, Promise.resolve()];
14331
14393
  }
14332
14394
  else {
14333
- throw new Error("".concat(t('addProgramme:creditEst'), " ").concat(t('isInvalid')));
14395
+ throw new Error("".concat(t("addProgramme:creditEst"), " ").concat(t("isInvalid")));
14334
14396
  }
14335
14397
  });
14336
14398
  }); },
14337
14399
  },
14338
14400
  ] },
14339
- React.createElement(InputNumber, { size: "large", style: { width: '100%', paddingRight: 12 } }))))),
14401
+ React.createElement(InputNumber, { size: "large", style: { width: "100%", paddingRight: 12 } }))))),
14340
14402
  React.createElement("div", { className: "steps-actions" },
14341
- React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading }, t('addProgramme:submit')),
14342
- current === 1 && (React.createElement(Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t('addProgramme:back')))))))),
14403
+ React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading }, t("addProgramme:submit")),
14404
+ current === 1 && (React.createElement(Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("addProgramme:back")))))))),
14343
14405
  },
14344
14406
  ] })))));
14345
14407
  };
@@ -19445,7 +19507,7 @@ var Social = function (props) {
19445
19507
  };
19446
19508
 
19447
19509
  var CoBenifitsComponent = function (props) {
19448
- var onClickedBackBtn = props.onClickedBackBtn, onFormSubmit = props.onFormSubmit, coBenefitsDetails = props.coBenefitsDetails, submitButtonText = props.submitButtonText, viewOnly = props.viewOnly, coBenifitsViewDetails = props.coBenifitsViewDetails, _a = props.loading, loading = _a === void 0 ? false : _a, t = props.t;
19510
+ var onClickedBackBtn = props.onClickedBackBtn, onFormSubmit = props.onFormSubmit, coBenefitsDetails = props.coBenefitsDetails, submitButtonText = props.submitButtonText, viewOnly = props.viewOnly, coBenifitsViewDetails = props.coBenifitsViewDetails, _a = props.loading, loading = _a === void 0 ? false : _a, sdgGoalImages = props.sdgGoalImages, t = props.t;
19449
19511
  var _b = useState(), coBenefitDetails = _b[0], setCoBenefitDetails = _b[1];
19450
19512
  var _c = useState(true), isSocialFormValid = _c[0], setIsSocialFormValid = _c[1];
19451
19513
  var _d = useState(true), isAssessmentFormValid = _d[0], setIsAssessmentFormValid = _d[1];
@@ -19480,7 +19542,7 @@ var CoBenifitsComponent = function (props) {
19480
19542
  ? (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.sdgGoals)
19481
19543
  ? coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.sdgGoals
19482
19544
  : []
19483
- : coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.sdgGoals, viewOnly: viewOnly || false })),
19545
+ : coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.sdgGoals, viewOnly: viewOnly || false, sdgGoalImages: sdgGoalImages })),
19484
19546
  },
19485
19547
  {
19486
19548
  label: t("coBenifits:genderPart"),
@@ -19682,7 +19744,7 @@ var CoBenifitsComponent = function (props) {
19682
19744
  };
19683
19745
 
19684
19746
  var AddNdcActionComponent = function (props) {
19685
- var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, t = props.t;
19747
+ var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, t = props.t;
19686
19748
  var _a = useState(1), current = _a[0], setCurrent = _a[1];
19687
19749
  var _b = useState(), programmeDetails = _b[0], setprogrammeDetails = _b[1];
19688
19750
  var _c = useState(), ndcActionDetails = _c[0], setNdcActionDetails = _c[1];
@@ -19823,7 +19885,7 @@ var AddNdcActionComponent = function (props) {
19823
19885
  description: (React.createElement("div", { className: current !== 2 ? "hide" : "" },
19824
19886
  React.createElement(CoBenifitsComponent, { onClickedBackBtn: onClickBackCoBenefits, coBenefitsDetails: ndcActionDetails ? ndcActionDetails.coBenefitsProperties : {}, onFormSubmit: onCoBenefitsSubmit, submitButtonText: isProjectReportsVisible()
19825
19887
  ? t("ndcAction:next")
19826
- : t("ndcAction:submit"), loading: loading, t: t }))),
19888
+ : t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, t: t }))),
19827
19889
  },
19828
19890
  ];
19829
19891
  if (isProjectReportsVisible()) {
@@ -20132,5 +20194,5 @@ var StasticCard = function (props) {
20132
20194
  updatedDate !== '0' && React.createElement("div", { className: "updated-on" }, updatedDate)))));
20133
20195
  };
20134
20196
 
20135
- export { AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, BaseEntity, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, ConfigurationSettingsType, CreditTransferStage, ESGType, EnergyGenerationUnits, FormElementType, Instrument, InvestmentCreationComponent, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LegendItem, Loading, MapComponent, MapTypes, MapboxComponent, MitigationTypes, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, ProfileIcon, ProgrammeCreationComponent, ProgrammeEntity, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeStage, ProgrammeStageMRV, ProgrammeTransfer, ProgrammeViewComponent, RadioButtonStatus, RadioButtonStatus2, RetireType, Role, RoleIcon, SdgGoals$1 as SdgGoals, Sector, SectoralScope, StasticCard, Titles, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, addCommSep, addCommSepRound, addRoundNumber, addSpaces, consumerGroupList, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, isBase64, landAreaUnitList, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList };
20197
+ export { AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, BaseEntity, CarbonSystemType, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, ConfigurationSettingsType, CreditTransferStage, ESGType, EnergyGenerationUnits, FormElementType, Instrument, InvestmentCreationComponent, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LegendItem, Loading, MapComponent, MapTypes, MapboxComponent, MitigationTypes, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, ProfileIcon, ProgrammeCreationComponent, ProgrammeEntity, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeStage, ProgrammeStageMRV, ProgrammeTransfer, ProgrammeViewComponent, RadioButtonStatus, RadioButtonStatus2, RetireType, Role, RoleIcon, SdgGoals$1 as SdgGoals, Sector, SectoralScope, StasticCard, Titles, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, addCommSep, addCommSepRound, addRoundNumber, addSpaces, consumerGroupList, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, isBase64, landAreaUnitList, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList };
20136
20198
  //# sourceMappingURL=index.js.map