monkey-style-guide 2.0.157 → 2.0.159
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/esm2020/lib/components/input-phone/input-phone.component.mjs +4 -3
- package/esm2020/lib/core/utils/utils.mjs +2 -2
- package/fesm2015/monkey-style-guide.mjs +4 -3
- package/fesm2015/monkey-style-guide.mjs.map +1 -1
- package/fesm2020/monkey-style-guide.mjs +4 -3
- package/fesm2020/monkey-style-guide.mjs.map +1 -1
- package/monkey-style-guide-2.0.159.tgz +0 -0
- package/package.json +1 -1
- package/monkey-style-guide-2.0.157.tgz +0 -0
|
@@ -352,7 +352,7 @@ class MonkeyUtils {
|
|
|
352
352
|
static getPhoneNumberFormated(phone, internationalNumber = 55) {
|
|
353
353
|
if (!phone)
|
|
354
354
|
return '';
|
|
355
|
-
phone = phone.replace(
|
|
355
|
+
phone = phone.replace(new RegExp(`\\+${internationalNumber}`, 'g'), '');
|
|
356
356
|
try {
|
|
357
357
|
const country = phoneUtil.getRegionCodeForCountryCode(internationalNumber);
|
|
358
358
|
const number = phoneUtil.parse(phone, country);
|
|
@@ -5785,8 +5785,9 @@ class MonkeyInputPhoneComponent {
|
|
|
5785
5785
|
}
|
|
5786
5786
|
getValue() {
|
|
5787
5787
|
const { internationalNumber, _handledValue } = this;
|
|
5788
|
-
|
|
5789
|
-
|
|
5788
|
+
const handled = `${_handledValue}`.replace(new RegExp(`\\+${internationalNumber}`, 'g'), '');
|
|
5789
|
+
if (handled)
|
|
5790
|
+
return `+${internationalNumber}${handled}`;
|
|
5790
5791
|
return '';
|
|
5791
5792
|
}
|
|
5792
5793
|
ngOnInit() {
|