@undp/carbon-library 1.0.292-CARBON-411.0 → 1.0.292-CARBON-337.1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -6229,7 +6229,7 @@ var AddNewCompanyComponent = function (props) {
6229
6229
  });
6230
6230
  }); };
6231
6231
  var getRegionList = function () { return __awaiter(void 0, void 0, void 0, function () {
6232
- var response, regionNames, uniqueRegionNames, error_1;
6232
+ var response, regionNames, error_1;
6233
6233
  return __generator(this, function (_a) {
6234
6234
  switch (_a.label) {
6235
6235
  case 0:
@@ -6252,8 +6252,7 @@ var AddNewCompanyComponent = function (props) {
6252
6252
  response = _a.sent();
6253
6253
  if (response.data) {
6254
6254
  regionNames = response.data.map(function (item) { return item.regionName; });
6255
- uniqueRegionNames = Array.from(new Set(regionNames));
6256
- setRegionsList(__spreadArray([t("national")], uniqueRegionNames, true));
6255
+ setRegionsList(__spreadArray([t("national")], regionNames, true));
6257
6256
  }
6258
6257
  return [3 /*break*/, 5];
6259
6258
  case 3:
@@ -13751,7 +13750,7 @@ var ProgrammeCreationComponent = function (props) {
13751
13750
  });
13752
13751
  }); };
13753
13752
  var getRegionList = function () { return __awaiter(void 0, void 0, void 0, function () {
13754
- var response, regionNames, uniqueRegionNames, error_2;
13753
+ var response, regionNames, error_2;
13755
13754
  return __generator(this, function (_a) {
13756
13755
  switch (_a.label) {
13757
13756
  case 0:
@@ -13774,8 +13773,7 @@ var ProgrammeCreationComponent = function (props) {
13774
13773
  response = _a.sent();
13775
13774
  if (response.data) {
13776
13775
  regionNames = response.data.map(function (item) { return item.regionName; });
13777
- uniqueRegionNames = Array.from(new Set(regionNames));
13778
- setRegionsList(__spreadArray(["National"], uniqueRegionNames, true));
13776
+ setRegionsList(__spreadArray(["National"], regionNames, true));
13779
13777
  }
13780
13778
  return [3 /*break*/, 5];
13781
13779
  case 3:
@@ -20601,8 +20599,7 @@ var Safeguards = function (props) {
20601
20599
 
20602
20600
  var Environmental = function (props) {
20603
20601
  var onFormSubmit = props.onFormSubmit, environmentalViewData = props.environmentalViewData, viewOnly = props.viewOnly, translator = props.translator;
20604
- translator.setDefaultNamespace("unfcccSdTool");
20605
- var t = translator.t;
20602
+ var t = translator;
20606
20603
  var environmentalDetailsInitial = [
20607
20604
  {
20608
20605
  section: t("air"),
@@ -20930,8 +20927,7 @@ var Environmental = function (props) {
20930
20927
 
20931
20928
  var Economic = function (props) {
20932
20929
  var onFormSubmit = props.onFormSubmit, economicViewData = props.economicViewData, viewOnly = props.viewOnly, translator = props.translator;
20933
- translator.setDefaultNamespace("unfcccSdTool");
20934
- var t = translator.t;
20930
+ var t = translator;
20935
20931
  var economicDetailsInitial = [
20936
20932
  {
20937
20933
  section: t("growth"),
@@ -21222,8 +21218,7 @@ var Economic = function (props) {
21222
21218
 
21223
21219
  var Social = function (props) {
21224
21220
  var onFormSubmit = props.onFormSubmit, socialViewData = props.socialViewData, viewOnly = props.viewOnly, translator = props.translator;
21225
- translator.setDefaultNamespace("unfcccSdTool");
21226
- var t = translator.t;
21221
+ var t = translator;
21227
21222
  var form = antd.Form.useForm()[0];
21228
21223
  var _a = React.useState(0); _a[0]; var setRefreshCounter = _a[1];
21229
21224
  var _b = React.useState(), socialDetails = _b[0], setSocialDetails = _b[1];
@@ -22026,14 +22021,14 @@ var CoBenifitsComponent = function (props) {
22026
22021
  ? (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.environmental)
22027
22022
  ? coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.environmental
22028
22023
  : {}
22029
- : undefined, viewOnly: viewOnly || false, translator: translator }),
22024
+ : undefined, viewOnly: viewOnly || false, translator: t }),
22030
22025
  React.createElement(Social, { onFormSubmit: onSocialFormSubmit, socialViewData: (viewOnly && (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.socialValueDetails)) ||
22031
- (!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.socialValueDetails)), viewOnly: viewOnly || false, translator: translator }),
22026
+ (!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.socialValueDetails)), viewOnly: viewOnly || false, translator: t }),
22032
22027
  React.createElement(Economic, { onFormSubmit: onEconomicFormSubmit, economicViewData: viewOnly
22033
22028
  ? (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.economic)
22034
22029
  ? coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.economic
22035
22030
  : {}
22036
- : undefined, viewOnly: viewOnly || false, translator: translator }))),
22031
+ : undefined, viewOnly: viewOnly || false, translator: t }))),
22037
22032
  },
22038
22033
  {
22039
22034
  label: t("coBenifits:assessment"),