easykar-backoffice-ui 0.0.5 → 0.0.6
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/dist/index.cjs +10 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3268,14 +3268,17 @@ var EasyOtp = React34.forwardRef(
|
|
|
3268
3268
|
}
|
|
3269
3269
|
);
|
|
3270
3270
|
EasyOtp.displayName = "EasyOtp";
|
|
3271
|
-
|
|
3272
|
-
if (phone
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3271
|
+
function formatPhoneNumber(phone) {
|
|
3272
|
+
if (!phone) return phone;
|
|
3273
|
+
const cleaned = phone.replace(/\D/g, "");
|
|
3274
|
+
const phoneWithoutCountryCode = cleaned.startsWith("90") ? cleaned.slice(2) : cleaned;
|
|
3275
|
+
if (phoneWithoutCountryCode.length < 10) {
|
|
3276
|
+
return phone.startsWith("+") ? phone : `+90${phone}`;
|
|
3276
3277
|
}
|
|
3277
|
-
|
|
3278
|
-
|
|
3278
|
+
const firstThreeDigits = phoneWithoutCountryCode.slice(0, 3);
|
|
3279
|
+
const lastTwoDigits = phoneWithoutCountryCode.slice(-2);
|
|
3280
|
+
return `+90 (${firstThreeDigits}) *** ** ${lastTwoDigits}`;
|
|
3281
|
+
}
|
|
3279
3282
|
var formatEmail = (emailAddress) => {
|
|
3280
3283
|
const [localPart, domain] = emailAddress.split("@");
|
|
3281
3284
|
if (localPart && domain) {
|