@undp/carbon-library 1.0.299-CARBON-443.0 → 1.0.299-CARBON-234.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +1 -43
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +2 -44
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
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
|
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 ||
|
@@ -6871,27 +6871,6 @@ var AddNewCompanyComponent = function (props) {
|
|
6871
6871
|
{
|
6872
6872
|
required: false,
|
6873
6873
|
},
|
6874
|
-
{
|
6875
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
6876
|
-
var phoneNo;
|
6877
|
-
return __generator(this, function (_a) {
|
6878
|
-
phoneNo = formatPhoneNumber(String(value));
|
6879
|
-
if (String(value).trim() !== "") {
|
6880
|
-
if ((String(value).trim() !== "" &&
|
6881
|
-
String(value).trim() !== undefined &&
|
6882
|
-
value !== null &&
|
6883
|
-
value !== undefined) &&
|
6884
|
-
(phoneNo !== null &&
|
6885
|
-
phoneNo !== "" &&
|
6886
|
-
phoneNo !== undefined) &&
|
6887
|
-
!isPossiblePhoneNumber(String(value))) {
|
6888
|
-
throw new Error("".concat(t("addCompany:phoneNo"), " ").concat(t("isInvalid")));
|
6889
|
-
}
|
6890
|
-
}
|
6891
|
-
return [2 /*return*/];
|
6892
|
-
});
|
6893
|
-
}); },
|
6894
|
-
},
|
6895
6874
|
] },
|
6896
6875
|
React.createElement(PhoneInput, { placeholder: t("addCompany:phoneNo"), international: true, value: formatPhoneNumberIntl(contactNoInput), defaultCountry: "LK", countryCallingCodeEditable: false, onChange: function (v) { } })))),
|
6897
6876
|
React.createElement(Col, { xl: 12, md: 24 },
|
@@ -15100,27 +15079,6 @@ var AddNewUserComponent = function (props) {
|
|
15100
15079
|
{
|
15101
15080
|
required: false,
|
15102
15081
|
},
|
15103
|
-
{
|
15104
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15105
|
-
var phoneNo;
|
15106
|
-
return __generator(this, function (_a) {
|
15107
|
-
phoneNo = formatPhoneNumber(String(value));
|
15108
|
-
if (String(value).trim() !== "") {
|
15109
|
-
if ((String(value).trim() !== "" &&
|
15110
|
-
String(value).trim() !== undefined &&
|
15111
|
-
value !== null &&
|
15112
|
-
value !== undefined) &&
|
15113
|
-
(phoneNo !== null &&
|
15114
|
-
phoneNo !== "" &&
|
15115
|
-
phoneNo !== undefined) &&
|
15116
|
-
!isPossiblePhoneNumber(String(value))) {
|
15117
|
-
throw new Error("".concat(t("addUser:phoneNo"), " ").concat(t("isInvalid")));
|
15118
|
-
}
|
15119
|
-
}
|
15120
|
-
return [2 /*return*/];
|
15121
|
-
});
|
15122
|
-
}); },
|
15123
|
-
},
|
15124
15082
|
] },
|
15125
15083
|
React.createElement(PhoneInput, { placeholder: t("addUser:phoneNo"), international: true,
|
15126
15084
|
// value={contactNoInput}
|