@undp/carbon-library 1.0.305-CARBON-428-bugfix.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/cjs/index.js +6 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +7 -2
- 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 } 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
|
-
|
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;
|