-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove libphonenumber js #6222
Remove libphonenumber js #6222
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@print-Sathvik the cypress is failing back to back, fix it , PR looks good to me |
@rithviknishad New changes:
|
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice Work! LGTM
Just a minor suggestion, you could've moved the phone number related utility methods to a seperate file under say: Currently, the |
👋 Hi, @print-Sathvik, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
I pulled, rebased and separated phone number utils in my local but that requires me to force push to current branch. Doing that will close this PR. So I will create a new PR for seperating phone number utils once this PR is merged. |
LGTM |
WHAT
Replaced libphonenumber-js with custom functions
Proposed Changes
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
HOW
🤖 Generated by Copilot at 1b89556
libphonenumber-js
dependency and replace it with custom phone number parsing and formatting functions (link)AREACODES
andIN_LANDLINE_AREA_CODES
constants to store the area codes for different countries and Indian landline numbers (link)parsePhoneNumber
,formatPhoneNumber
, andgetCountryCode
functions andCountryData
interface tosrc/Utils/utils.ts
to implement the custom phone number logic (link)code
values for some countries insrc/Common/static/countryPhoneAndFlags.json
to remove the+
and-
symbols and handle countries with multiple area codes under the same country code (link, link, link, link, link, link, link, link, link, link, link, link)parse
function for thesupport_phone
field in theXLSXAssetImportSchema
to use the customPhoneNumberValidator
function and handle the1800
prefix differently (link)src/Utils/utils.ts
and handle the+91
and1800
prefixes differently (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)libphonenumber-js
imports from various files (link, link, link, link, link, link, link, link, link)parsePhoneNumber
andPhoneNumberValidator
imports to various files to use the custom functions fromsrc/Utils/utils.ts
andsrc/Components/Form/FieldValidators.tsx
(link, link, link, link, link, link, link, link, link, link, link, link)useEffect
hook tosrc/Components/Form/FormFields/PhoneNumberFormField.tsx
to initialize thefield.value
with+91
if it is empty (link)