@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/esm/index.js CHANGED
@@ -6208,7 +6208,7 @@ var AddNewCompanyComponent = function (props) {
6208
6208
  });
6209
6209
  }); };
6210
6210
  var getRegionList = function () { return __awaiter(void 0, void 0, void 0, function () {
6211
- var response, regionNames, uniqueRegionNames, error_1;
6211
+ var response, regionNames, error_1;
6212
6212
  return __generator(this, function (_a) {
6213
6213
  switch (_a.label) {
6214
6214
  case 0:
@@ -6231,8 +6231,7 @@ var AddNewCompanyComponent = function (props) {
6231
6231
  response = _a.sent();
6232
6232
  if (response.data) {
6233
6233
  regionNames = response.data.map(function (item) { return item.regionName; });
6234
- uniqueRegionNames = Array.from(new Set(regionNames));
6235
- setRegionsList(__spreadArray([t("national")], uniqueRegionNames, true));
6234
+ setRegionsList(__spreadArray([t("national")], regionNames, true));
6236
6235
  }
6237
6236
  return [3 /*break*/, 5];
6238
6237
  case 3:
@@ -13730,7 +13729,7 @@ var ProgrammeCreationComponent = function (props) {
13730
13729
  });
13731
13730
  }); };
13732
13731
  var getRegionList = function () { return __awaiter(void 0, void 0, void 0, function () {
13733
- var response, regionNames, uniqueRegionNames, error_2;
13732
+ var response, regionNames, error_2;
13734
13733
  return __generator(this, function (_a) {
13735
13734
  switch (_a.label) {
13736
13735
  case 0:
@@ -13753,8 +13752,7 @@ var ProgrammeCreationComponent = function (props) {
13753
13752
  response = _a.sent();
13754
13753
  if (response.data) {
13755
13754
  regionNames = response.data.map(function (item) { return item.regionName; });
13756
- uniqueRegionNames = Array.from(new Set(regionNames));
13757
- setRegionsList(__spreadArray(["National"], uniqueRegionNames, true));
13755
+ setRegionsList(__spreadArray(["National"], regionNames, true));
13758
13756
  }
13759
13757
  return [3 /*break*/, 5];
13760
13758
  case 3:
@@ -20580,8 +20578,7 @@ var Safeguards = function (props) {
20580
20578
 
20581
20579
  var Environmental = function (props) {
20582
20580
  var onFormSubmit = props.onFormSubmit, environmentalViewData = props.environmentalViewData, viewOnly = props.viewOnly, translator = props.translator;
20583
- translator.setDefaultNamespace("unfcccSdTool");
20584
- var t = translator.t;
20581
+ var t = translator;
20585
20582
  var environmentalDetailsInitial = [
20586
20583
  {
20587
20584
  section: t("air"),
@@ -20909,8 +20906,7 @@ var Environmental = function (props) {
20909
20906
 
20910
20907
  var Economic = function (props) {
20911
20908
  var onFormSubmit = props.onFormSubmit, economicViewData = props.economicViewData, viewOnly = props.viewOnly, translator = props.translator;
20912
- translator.setDefaultNamespace("unfcccSdTool");
20913
- var t = translator.t;
20909
+ var t = translator;
20914
20910
  var economicDetailsInitial = [
20915
20911
  {
20916
20912
  section: t("growth"),
@@ -21201,8 +21197,7 @@ var Economic = function (props) {
21201
21197
 
21202
21198
  var Social = function (props) {
21203
21199
  var onFormSubmit = props.onFormSubmit, socialViewData = props.socialViewData, viewOnly = props.viewOnly, translator = props.translator;
21204
- translator.setDefaultNamespace("unfcccSdTool");
21205
- var t = translator.t;
21200
+ var t = translator;
21206
21201
  var form = Form.useForm()[0];
21207
21202
  var _a = useState(0); _a[0]; var setRefreshCounter = _a[1];
21208
21203
  var _b = useState(), socialDetails = _b[0], setSocialDetails = _b[1];
@@ -22005,14 +22000,14 @@ var CoBenifitsComponent = function (props) {
22005
22000
  ? (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.environmental)
22006
22001
  ? coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.environmental
22007
22002
  : {}
22008
- : undefined, viewOnly: viewOnly || false, translator: translator }),
22003
+ : undefined, viewOnly: viewOnly || false, translator: t }),
22009
22004
  React.createElement(Social, { onFormSubmit: onSocialFormSubmit, socialViewData: (viewOnly && (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.socialValueDetails)) ||
22010
- (!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.socialValueDetails)), viewOnly: viewOnly || false, translator: translator }),
22005
+ (!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.socialValueDetails)), viewOnly: viewOnly || false, translator: t }),
22011
22006
  React.createElement(Economic, { onFormSubmit: onEconomicFormSubmit, economicViewData: viewOnly
22012
22007
  ? (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.economic)
22013
22008
  ? coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.economic
22014
22009
  : {}
22015
- : undefined, viewOnly: viewOnly || false, translator: translator }))),
22010
+ : undefined, viewOnly: viewOnly || false, translator: t }))),
22016
22011
  },
22017
22012
  {
22018
22013
  label: t("coBenifits:assessment"),