@undp/carbon-library 1.0.305-CARBON-239.0 → 1.0.305-CARBON-234.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, isPossiblePhoneNumber } from 'react-phone-number-input';
7
+ import PhoneInput, { formatPhoneNumberIntl, formatPhoneNumber } 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';
@@ -6529,7 +6529,7 @@ var AddNewCompanyComponent = function (props) {
6529
6529
  }); },
6530
6530
  },
6531
6531
  ] },
6532
- React.createElement(Input, { size: "large" })))
6532
+ React.createElement(Input, { disabled: isUpdate, size: "large" })))
6533
6533
  : null,
6534
6534
  companyRole !== CompanyRole.MINISTRY
6535
6535
  ? (!isUpdate ||
@@ -6780,11 +6780,6 @@ 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
- }
6788
6783
  }
6789
6784
  }
6790
6785
  return [2 /*return*/];