@undp/carbon-library 1.0.305-CARBON-261.0 → 1.0.305-CARBON-239.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/esm/index.js CHANGED
@@ -4,7 +4,7 @@ import React, { createContext, useState, useEffect, useCallback, useContext, use
4
4
  import { DateTime } from 'luxon';
5
5
  import { Buffer } from 'buffer';
6
6
  import axios, { HttpStatusCode } from 'axios';
7
- import PhoneInput, { formatPhoneNumberIntl, formatPhoneNumber } from 'react-phone-number-input';
7
+ import PhoneInput, { formatPhoneNumberIntl, formatPhoneNumber, isPossiblePhoneNumber } from 'react-phone-number-input';
8
8
  import validator from 'validator';
9
9
  import { plainToClass } from 'class-transformer';
10
10
  import * as Icon from 'react-bootstrap-icons';
@@ -6780,6 +6780,11 @@ var AddNewCompanyComponent = function (props) {
6780
6780
  phoneNo === undefined) {
6781
6781
  throw new Error("".concat(t("addCompany:phoneNo"), " ").concat(t("isRequired")));
6782
6782
  }
6783
+ else {
6784
+ if (!isPossiblePhoneNumber(String(value))) {
6785
+ throw new Error("".concat(t("addCompany:phoneNo"), " ").concat(t("isInvalid")));
6786
+ }
6787
+ }
6783
6788
  }
6784
6789
  }
6785
6790
  return [2 /*return*/];
@@ -16248,7 +16253,7 @@ var InvestmentCreationComponent = function (props) {
16248
16253
  .unix();
16249
16254
  }
16250
16255
  payload.instrument = Array.isArray(payload.instrument) ? payload.instrument : [payload.instrument];
16251
- // payload.fromCompanyIds = data.companyId.map((e) => Number(e));
16256
+ payload.fromCompanyIds = data.companyId.map(function (e) { return Number(e); });
16252
16257
  payload.percentage = val.percentage;
16253
16258
  payload.toCompanyId = Number(payload.toCompanyId);
16254
16259
  _a.label = 1;
@@ -19036,8 +19041,7 @@ var NdcActionDetails = function (props) {
19036
19041
  var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
19037
19042
  ? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
19038
19043
  : 5000000;
19039
- //changing value to N2O. Previously it was N20(N-Two-Zero)
19040
- var ghgEmissionsGas = ["CO2", "CH4", "N2O", "HFCs", "PFCs", "SF6"];
19044
+ var ghgEmissionsGas = ["CO2", "CH4", "N20", "HFCs", "PFCs", "SF6"];
19041
19045
  useEffect(function () {
19042
19046
  if (programmeDetails) {
19043
19047
  setSector(programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector);