@hhgtech/hhg-components 1.29.332-beta-2 → 1.29.332-beta-3
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 +2 -0
- package/build/{LastPeriod-6172ea06.js → LastPeriod-2e864fac.js} +1 -1
- package/build/{MobileBottomNavigationIcon-c62e5d2f.js → MobileBottomNavigationIcon-413add0d.js} +3 -3
- package/build/{Spinner-220b4df5.js → Spinner-0a5d5b55.js} +1 -1
- package/build/{WhatsApp-f4ba2c3a.js → WhatsApp-f6235352.js} +1 -1
- package/build/adapters.js +19 -19
- package/build/atoms.js +46 -46
- package/build/babyGrowth.js +83 -83
- package/build/cache.js +2 -2
- package/build/care/components/organisms/bookingSearchBar/mobileTopbar/index.styled.d.ts +1 -1
- package/build/care/components/organisms/bookingSearchBar/resultSection/index.styled.d.ts +1 -1
- package/build/care/components/organisms/bookingSearchBar/resultSectionItem/index.styled.d.ts +1 -1
- package/build/care.js +17 -17
- package/build/careBookingSearchBar.js +14 -14
- package/build/careBookingSearchBarV2.js +15 -15
- package/build/components/mantine/text/index.d.ts +1 -1
- package/build/components/mantine/theme/other.d.ts +1 -1
- package/build/components/mantine/theme/text.d.ts +1 -0
- package/build/components.js +90 -90
- package/build/{constants-96011b5e.js → constants-ae42df04.js} +1 -1
- package/build/constants.js +3 -3
- package/build/constantsDomainLocales.js +1 -1
- package/build/constantsRiskScreener.js +2 -2
- package/build/constantsSite.js +2 -2
- package/build/{core-b9f5d30d.js → core-b5523de4.js} +1 -1
- package/build/{dataTransform-2a2c0bcf.js → dataTransform-3f20a028.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-210e9c3d.js → editor-16c6ef2d.js} +11 -11
- package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/{LastPeriod-5977f75b.js → LastPeriod-3dc0c5d6.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-2a178f75.js → MobileBottomNavigationIcon-c8ee469b.js} +3 -3
- package/build/esm/{Spinner-a5293db7.js → Spinner-1c936113.js} +1 -1
- package/build/esm/{WhatsApp-7274cfdd.js → WhatsApp-cdcc37f8.js} +1 -1
- package/build/esm/adapters.js +19 -19
- package/build/esm/atoms.js +46 -46
- package/build/esm/babyGrowth.js +83 -83
- package/build/esm/cache.js +2 -2
- package/build/esm/care/components/organisms/bookingSearchBar/mobileTopbar/index.styled.d.ts +1 -1
- package/build/esm/care/components/organisms/bookingSearchBar/resultSection/index.styled.d.ts +1 -1
- package/build/esm/care/components/organisms/bookingSearchBar/resultSectionItem/index.styled.d.ts +1 -1
- package/build/esm/care.js +17 -17
- package/build/esm/careBookingSearchBar.js +14 -14
- package/build/esm/careBookingSearchBarV2.js +15 -15
- package/build/esm/components/mantine/text/index.d.ts +1 -1
- package/build/esm/components/mantine/theme/other.d.ts +1 -1
- package/build/esm/components/mantine/theme/text.d.ts +1 -0
- package/build/esm/components.js +90 -90
- package/build/esm/{constants-9c146dd4.js → constants-cc82c3b4.js} +1 -1
- package/build/esm/constants.js +3 -3
- package/build/esm/constantsDomainLocales.js +1 -1
- package/build/esm/constantsRiskScreener.js +2 -2
- package/build/esm/constantsSite.js +2 -2
- package/build/esm/{core-f4994b1f.js → core-02ac7a95.js} +1 -1
- package/build/esm/{dataTransform-162e63dc.js → dataTransform-2c896e55.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-0d5649f0.js → editor-0d5324bf.js} +11 -11
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/footer.js +21 -21
- package/build/esm/gAssets.js +2 -2
- package/build/esm/healthToolsCardWrapper.js +18 -18
- package/build/esm/healthToolsForm.js +33 -33
- package/build/esm/hooks.js +13 -13
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-704d508d.js → index-037afe40.js} +13 -13
- package/build/esm/{index-180c1351.js → index-04055fd4.js} +13 -13
- package/build/esm/{index-dcd2bd6a.js → index-056a590c.js} +2 -2
- package/build/esm/{index-6c0bddde.js → index-0cbcafb3.js} +11 -11
- package/build/esm/{index-cf22b9bb.js → index-0edfd0a3.js} +2 -2
- package/build/esm/{index-cb6af1a9.js → index-102d0c53.js} +1 -1
- package/build/esm/{index-040a7079.js → index-103680a9.js} +13 -13
- package/build/esm/{index-fb5b2cdf.js → index-18147fca.js} +1 -1
- package/build/esm/{index-7d68e0c5.js → index-225e37ef.js} +2 -2
- package/build/esm/{index-943c8111.js → index-267f521f.js} +18 -18
- package/build/esm/{index-025e3fe2.js → index-270d522a.js} +17 -17
- package/build/esm/{index-22410751.js → index-2d44a819.js} +5 -5
- package/build/esm/{index-e6eb1bfe.js → index-31b37763.js} +16 -16
- package/build/esm/{index-39d88505.js → index-37642fbc.js} +15 -15
- package/build/esm/{index-a82add16.js → index-3f7cab05.js} +21 -21
- package/build/esm/{index-428e7f16.js → index-4505ff91.js} +16 -16
- package/build/esm/{index-0cbd934c.js → index-45575337.js} +2 -2
- package/build/esm/{index-192a22c1.js → index-49b61b7b.js} +3 -3
- package/build/esm/{index-31da2aa3.js → index-4c58a9fd.js} +2 -2
- package/build/esm/{index-b2596856.js → index-4e709a6b.js} +2 -2
- package/build/esm/{index-cfebe807.js → index-4f06b237.js} +2 -2
- package/build/esm/{index-ed1d0be7.js → index-50dacc47.js} +17 -17
- package/build/esm/{index-26a7a617.js → index-53de34a1.js} +1 -1
- package/build/esm/{index-c0c17984.js → index-541aa3ef.js} +4 -4
- package/build/esm/{index-faef630d.js → index-5b26d83d.js} +2 -2
- package/build/esm/{index-b2387910.js → index-5edb3292.js} +30 -30
- package/build/esm/{index-cbd6dc55.js → index-67412127.js} +3 -3
- package/build/esm/{index-6a1f8712.js → index-68101047.js} +7 -7
- package/build/esm/{index-db770f1c.js → index-6e2b6647.js} +3 -3
- package/build/esm/{index-dfda146e.js → index-758be42e.js} +1 -1
- package/build/esm/{index-87faecba.js → index-7810d9cb.js} +16 -16
- package/build/esm/{index-f8665258.js → index-7ec0009b.js} +2 -2
- package/build/esm/{index-f7fa4b2c.js → index-829c6ade.js} +6 -6
- package/build/esm/{index-c26d9fb3.js → index-93f93f1e.js} +5 -5
- package/build/esm/{index-13265cec.js → index-972102dd.js} +2 -2
- package/build/esm/{index-77748643.js → index-9bd3b249.js} +1 -1
- package/build/esm/{index-eb5365af.js → index-a24c3f5f.js} +16 -16
- package/build/esm/{index-0a0e307d.js → index-aae6d3b9.js} +7 -7
- package/build/esm/{index-ce93b5ca.js → index-b1379785.js} +26 -26
- package/build/esm/{index-9d796b61.js → index-b1d76cbe.js} +6 -6
- package/build/esm/{index-1a0cb565.js → index-b39f6414.js} +24 -24
- package/build/esm/{index-c830eb81.js → index-b48d0ce7.js} +3 -3
- package/build/esm/{index-28b75011.js → index-b500925d.js} +1 -1
- package/build/esm/{index-27f048b9.js → index-b5b3f418.js} +24 -24
- package/build/esm/{index-50bbd74c.js → index-b74053a3.js} +1 -1
- package/build/esm/{index-c272a3ed.js → index-b98b3e1f.js} +6 -6
- package/build/esm/{index-6863d2e3.js → index-bb762f25.js} +13 -13
- package/build/esm/{index-c27b7687.js → index-c22ca9e7.js} +3 -3
- package/build/esm/{index-e4b06b36.js → index-c4e6a303.js} +10 -10
- package/build/esm/{index-c94a8792.js → index-cd749dfd.js} +17 -17
- package/build/esm/{index-7ee530c1.js → index-d3048d96.js} +1 -1
- package/build/esm/{index-0aebcbd7.js → index-d78f5238.js} +18 -18
- package/build/esm/{index-178a46aa.js → index-da7b506e.js} +20 -20
- package/build/esm/{index-9e775518.js → index-e66986bc.js} +6 -6
- package/build/esm/{index-79f07b9d.js → index-e728fbbd.js} +2 -2
- package/build/esm/{index-b953fc77.js → index-eb25ef51.js} +2 -2
- package/build/esm/{index-a3ed7040.js → index-f1c30726.js} +2 -2
- package/build/esm/{index-7e62ec12.js → index-f6eaef5f.js} +3 -3
- package/build/esm/{index-0b5cab3a.js → index-f750b1ca.js} +15 -15
- package/build/esm/{index-348d1b17.js → index-f9dd3ef4.js} +32 -32
- package/build/esm/{index-ddd4ba66.js → index-fb17f6c8.js} +3 -3
- package/build/esm/index.js +112 -112
- package/build/esm/{labelSorting-969895e6.js → labelSorting-906853e0.js} +4 -4
- package/build/esm/lead.js +24 -24
- package/build/esm/{logoIcon-de6aaf63.js → logoIcon-1571b9ad.js} +2 -2
- package/build/esm/mantine.js +25 -25
- package/build/esm/misc.js +16 -16
- package/build/esm/miscGetDynamicHealthTool.js +4 -4
- package/build/esm/miscGetSocialList.js +8 -8
- package/build/esm/miscScreenSizeContext.js +1 -1
- package/build/esm/mobileBottomNavigation.js +5 -5
- package/build/esm/mobileBottomNavigationIcon.js +5 -5
- package/build/esm/molecules.js +69 -69
- package/build/esm/moleculesArticleCard.js +6 -6
- package/build/esm/moleculesArticleCardV2.js +16 -16
- package/build/esm/navigation.js +40 -40
- package/build/esm/navigationLogoutPopup.js +9 -9
- package/build/esm/navigationProfileButton.js +23 -23
- package/build/esm/onboardingV2.js +29 -29
- package/build/esm/organisms.js +44 -44
- package/build/esm/{other-d8ec0292.js → other-450270b6.js} +1 -0
- package/build/esm/{post-d886cd47.js → post-d592b44e.js} +2 -2
- package/build/esm/profileNavigation.js +19 -19
- package/build/esm/progressBar.js +1 -1
- package/build/esm/pwg.js +22 -22
- package/build/esm/ssoV2/api/featureFlag.d.ts +2 -0
- package/build/esm/ssoV2/api/index.d.ts +1 -0
- package/build/esm/ssoV2/api/paths.d.ts +7 -0
- package/build/esm/ssoV2/api/whatsapp.d.ts +6 -0
- package/build/esm/ssoV2/screens/components/progressBar.d.ts +3 -1
- package/build/esm/ssoV2/screens/components/whatsapp.d.ts +5 -0
- package/build/esm/ssoV2/screens/first/firstBFlow.d.ts +12 -0
- package/build/esm/ssoV2/screens/first/policyContent.d.ts +8 -0
- package/build/esm/ssoV2/screens/otp.d.ts +1 -1
- package/build/esm/ssoV2/ssoStateManager/store.d.ts +9 -1
- package/build/esm/ssoV2/utils.d.ts +3 -0
- package/build/esm/ssoV2.js +523 -107
- package/build/esm/{store-f112828b.js → store-b1723e37.js} +114 -9
- package/build/esm/subot.js +33 -33
- package/build/esm/surveyOrPremiumBanner.js +31 -31
- package/build/esm/surveyQuestionCard.js +10 -10
- package/build/esm/{surveyThankyouCard-8460012b.js → surveyThankyouCard-7be6f93a.js} +5 -5
- package/build/esm/together.js +53 -53
- package/build/esm/togetherApiUtils.js +4 -4
- package/build/esm/togetherAtoms.js +30 -30
- package/build/esm/togetherComponentGlobalContext.js +4 -4
- package/build/esm/togetherMolecules.js +48 -48
- package/build/esm/togetherMoleculesCardAuthor.js +27 -27
- package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
- package/build/esm/togetherMoleculesProfileDetail.js +37 -37
- package/build/esm/togetherOrganisms.js +47 -47
- package/build/esm/togetherRichTextEditor.js +17 -17
- package/build/esm/togetherShareBox.js +10 -10
- package/build/esm/{treePopoverMenu-0ff6d75f.js → treePopoverMenu-76c4c5ff.js} +19 -19
- package/build/esm/{types-805fd34e.js → types-667e197e.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-f5178d2c.js → useCategory-d29cd416.js} +5 -5
- package/build/esm/{useHealthToolCache-d7232c11.js → useHealthToolCache-fc1bb245.js} +1 -1
- package/build/esm/{useMantineLocale-1036f1bc.js → useMantineLocale-f91cefec.js} +6 -6
- package/build/esm/{usePlacesAutocomplete-cfd67016.js → usePlacesAutocomplete-eea2f0f8.js} +1 -1
- package/build/esm/{useScreenSize-6c204f26.js → useScreenSize-a04fceba.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-67d21524.js → utils-03d12da7.js} +2 -2
- package/build/esm/{utils-97c3048c.js → utils-19299334.js} +2 -2
- package/build/esm/{utils-6252f32d.js → utils-22f4ffaf.js} +3 -3
- package/build/esm/vaccination.js +21 -21
- package/build/footer.js +21 -21
- package/build/gAssets.js +2 -2
- package/build/healthToolsCardWrapper.js +18 -18
- package/build/healthToolsForm.js +33 -33
- package/build/hooks.js +13 -13
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-2100291a.js → index-010bec6f.js} +3 -3
- package/build/{index-6f6bc4e5.js → index-0382a63b.js} +21 -21
- package/build/{index-790b58fc.js → index-03f09a23.js} +18 -18
- package/build/{index-79ff428c.js → index-068a3f5d.js} +3 -3
- package/build/{index-00a5156b.js → index-0761a0e7.js} +2 -2
- package/build/{index-0198d5bf.js → index-0fca44a1.js} +32 -32
- package/build/{index-3f43ebff.js → index-18323bed.js} +16 -16
- package/build/{index-5e2bf851.js → index-1aacafd7.js} +13 -13
- package/build/{index-6dc7665b.js → index-1ac7755e.js} +7 -7
- package/build/{index-692f90c7.js → index-1b3cac10.js} +1 -1
- package/build/{index-321a21c6.js → index-201dfa58.js} +2 -2
- package/build/{index-ca99427b.js → index-27ce4ee1.js} +4 -4
- package/build/{index-ba781174.js → index-2bcb2a5a.js} +6 -6
- package/build/{index-b1bceaf2.js → index-2c4212f8.js} +15 -15
- package/build/{index-09f263eb.js → index-2fd69105.js} +26 -26
- package/build/{index-7a1ad389.js → index-3510fc7b.js} +2 -2
- package/build/{index-b93745ff.js → index-3849562e.js} +16 -16
- package/build/{index-d7df785e.js → index-3919c185.js} +1 -1
- package/build/{index-2b47f6da.js → index-3f81cf36.js} +1 -1
- package/build/{index-805d3208.js → index-41597280.js} +2 -2
- package/build/{index-119e18e1.js → index-4af203dd.js} +11 -11
- package/build/{index-9c1a3c0e.js → index-4fb2ff00.js} +3 -3
- package/build/{index-965888fd.js → index-57d66442.js} +2 -2
- package/build/{index-3be445d4.js → index-57e6bd71.js} +3 -3
- package/build/{index-f33166bd.js → index-5a3c3eb8.js} +17 -17
- package/build/{index-f91a9053.js → index-61b3066a.js} +2 -2
- package/build/{index-90013360.js → index-643e5e54.js} +24 -24
- package/build/{index-7930a85b.js → index-693fc4aa.js} +2 -2
- package/build/{index-d6c31b0f.js → index-69a6991b.js} +16 -16
- package/build/{index-f7bbfbd9.js → index-6bef3231.js} +5 -5
- package/build/{index-c01567d6.js → index-6f8b99fc.js} +2 -2
- package/build/{index-ac6a67eb.js → index-718b0626.js} +7 -7
- package/build/{index-3307139e.js → index-73a157dd.js} +1 -1
- package/build/{index-0be3d057.js → index-73ca1e12.js} +1 -1
- package/build/{index-5688f514.js → index-76753ca3.js} +5 -5
- package/build/{index-a72d5b86.js → index-7bf445a0.js} +3 -3
- package/build/{index-ac350dac.js → index-7cfe6cbe.js} +13 -13
- package/build/{index-d14c390c.js → index-7ed65a47.js} +2 -2
- package/build/{index-19d9b5b6.js → index-845815e4.js} +15 -15
- package/build/{index-a2eedf15.js → index-85a4674e.js} +2 -2
- package/build/{index-26d24411.js → index-8642a72f.js} +2 -2
- package/build/{index-1ffdbf81.js → index-8e7dcce8.js} +17 -17
- package/build/{index-8a6bec1a.js → index-94b33f21.js} +3 -3
- package/build/{index-924708c6.js → index-9afc2f18.js} +18 -18
- package/build/{index-3e1add94.js → index-9bf9db06.js} +24 -24
- package/build/{index-728d1e29.js → index-9da562f0.js} +13 -13
- package/build/{index-dc3a5d87.js → index-a7d9870c.js} +2 -2
- package/build/{index-00a36e21.js → index-abd42471.js} +3 -3
- package/build/{index-01caff4f.js → index-ac055782.js} +16 -16
- package/build/{index-4fc006ee.js → index-ba6a3db9.js} +30 -30
- package/build/{index-80cc4168.js → index-be1289ab.js} +1 -1
- package/build/{index-7b305dc2.js → index-be751e75.js} +1 -1
- package/build/{index-47f85472.js → index-c79c98c9.js} +10 -10
- package/build/{index-b7d8b868.js → index-d1276fda.js} +2 -2
- package/build/{index-adde712c.js → index-d8151d6f.js} +13 -13
- package/build/{index-00f24ae0.js → index-d86e73ba.js} +6 -6
- package/build/{index-21ffaf8c.js → index-e3eae147.js} +17 -17
- package/build/{index-3b897c5c.js → index-e95339b8.js} +6 -6
- package/build/{index-3e0b631b.js → index-f2859d0a.js} +6 -6
- package/build/{index-2ca1f57d.js → index-f46edb71.js} +20 -20
- package/build/{index-e8f3c85d.js → index-f64abcb7.js} +1 -1
- package/build/index.js +112 -112
- package/build/{labelSorting-56bfc813.js → labelSorting-f3089aa0.js} +4 -4
- package/build/lead.js +24 -24
- package/build/{logoIcon-e3a0433c.js → logoIcon-5fd93be0.js} +2 -2
- package/build/mantine.js +22 -22
- package/build/misc.js +16 -16
- package/build/miscGetDynamicHealthTool.js +4 -4
- package/build/miscGetSocialList.js +8 -8
- package/build/miscScreenSizeContext.js +1 -1
- package/build/mobileBottomNavigation.js +5 -5
- package/build/mobileBottomNavigationIcon.js +5 -5
- package/build/molecules.js +69 -69
- package/build/moleculesArticleCard.js +6 -6
- package/build/moleculesArticleCardV2.js +16 -16
- package/build/navigation.js +40 -40
- package/build/navigationLogoutPopup.js +9 -9
- package/build/navigationProfileButton.js +23 -23
- package/build/onboardingV2.js +28 -28
- package/build/organisms.js +44 -44
- package/build/{other-49d7d04c.js → other-4c608104.js} +1 -0
- package/build/{post-96345ec1.js → post-e5c4fc36.js} +2 -2
- package/build/profileNavigation.js +19 -19
- package/build/progressBar.js +1 -1
- package/build/pwg.js +22 -22
- package/build/ssoV2/api/featureFlag.d.ts +2 -0
- package/build/ssoV2/api/index.d.ts +1 -0
- package/build/ssoV2/api/paths.d.ts +7 -0
- package/build/ssoV2/api/whatsapp.d.ts +6 -0
- package/build/ssoV2/screens/components/progressBar.d.ts +3 -1
- package/build/ssoV2/screens/components/whatsapp.d.ts +5 -0
- package/build/ssoV2/screens/first/firstBFlow.d.ts +12 -0
- package/build/ssoV2/screens/first/policyContent.d.ts +8 -0
- package/build/ssoV2/screens/otp.d.ts +1 -1
- package/build/ssoV2/ssoStateManager/store.d.ts +9 -1
- package/build/ssoV2/utils.d.ts +3 -0
- package/build/ssoV2.js +534 -118
- package/build/{store-7f5903a1.js → store-c6176b7e.js} +114 -8
- package/build/subot.js +32 -32
- package/build/surveyOrPremiumBanner.js +31 -31
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-96632c79.js → surveyThankyouCard-3c8388b5.js} +5 -5
- package/build/together.js +53 -53
- package/build/togetherApiUtils.js +4 -4
- package/build/togetherAtoms.js +30 -30
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +48 -48
- package/build/togetherMoleculesCardAuthor.js +27 -27
- package/build/togetherMoleculesPostImagePreview.js +11 -11
- package/build/togetherMoleculesProfileDetail.js +37 -37
- package/build/togetherOrganisms.js +47 -47
- package/build/togetherRichTextEditor.js +17 -17
- package/build/togetherShareBox.js +10 -10
- package/build/{treePopoverMenu-df55543d.js → treePopoverMenu-15fdec78.js} +19 -19
- package/build/{types-31d6718e.js → types-aef0a0ea.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-cde5dad1.js → useCategory-8f11b137.js} +5 -5
- package/build/{useHealthToolCache-90b7283a.js → useHealthToolCache-da738d6a.js} +1 -1
- package/build/{useMantineLocale-1e39b18b.js → useMantineLocale-d549f4df.js} +6 -6
- package/build/{usePlacesAutocomplete-04d276ae.js → usePlacesAutocomplete-99d4236d.js} +1 -1
- package/build/{useScreenSize-42737a5f.js → useScreenSize-a16ba609.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-a4b3e470.js → utils-6b85af94.js} +3 -3
- package/build/{utils-64a0cb14.js → utils-a82e44e2.js} +2 -2
- package/build/{utils-f7446c9b.js → utils-fac629ca.js} +2 -2
- package/build/vaccination.js +21 -21
- package/package.json +1 -1
- /package/build/{BMI_BOYS.percentile.monthly-dd2135df.js → BMI_BOYS.percentile.monthly-7dd011ac.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-eb2773ba.js → BMI_BOYS.percentile.weekly-976834b6.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-acc1a4b3.js → BMI_BOYS.percentile.yearly-2ff60241.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-f8f80115.js → BMI_BOYS.zscore.monthly-100ad6a9.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-3c8260c3.js → BMI_BOYS.zscore.weekly-e4cea760.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-9af2ae1f.js → BMI_BOYS.zscore.yearly-87d210f5.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-27f4cae3.js → BMI_GIRLS.percentile.monthly-61167638.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-3b4df93f.js → BMI_GIRLS.percentile.weekly-74458430.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-be346ca4.js → BMI_GIRLS.percentile.yearly-8d87ab46.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-de183391.js → BMI_GIRLS.zscore.monthly-fa379cf7.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-8a7ed9e6.js → BMI_GIRLS.zscore.weekly-eb11be72.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-1121093a.js → BMI_GIRLS.zscore.yearly-188c7669.js} +0 -0
- /package/build/{ChevronDown-f65951ef.js → ChevronDown-f24769ed.js} +0 -0
- /package/build/{Close-72999ba9.js → Close-f031d35a.js} +0 -0
- /package/build/{Google-e2baeeee.js → Google-9502a65c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-28af6346.js → HEAD CIRCUM_BOYS.percentile.monthly-19f90351.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-00cd7982.js → HEAD CIRCUM_BOYS.percentile.weekly-82481e75.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-e492e1c3.js → HEAD CIRCUM_BOYS.percentile.yearly-23b8af4a.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-251c6551.js → HEAD CIRCUM_BOYS.zscore.monthly-f905d070.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-930a88fa.js → HEAD CIRCUM_BOYS.zscore.weekly-fd4b9627.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-8b4001b4.js → HEAD CIRCUM_BOYS.zscore.yearly-a32d111c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-35dd9ade.js → HEAD CIRCUM_GIRLS.percentile.monthly-337389fc.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-1452edc9.js → HEAD CIRCUM_GIRLS.percentile.weekly-8a7681fe.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-4a5e26d6.js → HEAD CIRCUM_GIRLS.percentile.yearly-2e71403c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-d51586ec.js → HEAD CIRCUM_GIRLS.zscore.monthly-1975c3dd.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-8ccd4348.js → HEAD CIRCUM_GIRLS.zscore.weekly-c53123c1.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-4ddf2b3f.js → HEAD CIRCUM_GIRLS.zscore.yearly-35c55b9e.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-136139b4.js → HEIGHT_BOYS.percentile.monthly-7f3c8959.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-cbdac401.js → HEIGHT_BOYS.percentile.weekly-947d9815.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-19033b85.js → HEIGHT_BOYS.percentile.yearly-ed56b75c.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-f692abdf.js → HEIGHT_BOYS.zscore.monthly-261aa32c.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-e2acd3bf.js → HEIGHT_BOYS.zscore.weekly-41ded793.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-f9b55cb0.js → HEIGHT_BOYS.zscore.yearly-384c41c4.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-0ae73719.js → HEIGHT_GIRLS.percentile.monthly-09084927.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-290b0c54.js → HEIGHT_GIRLS.percentile.weekly-0eae9792.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-c0a7d542.js → HEIGHT_GIRLS.percentile.yearly-2bec4239.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-ccf86958.js → HEIGHT_GIRLS.zscore.monthly-49819a08.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-eeb4d771.js → HEIGHT_GIRLS.zscore.weekly-095e13cd.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-ae7229c1.js → HEIGHT_GIRLS.zscore.yearly-1b91419e.js} +0 -0
- /package/build/{Locale-29c4aa10.js → Locale-ae54d0e4.js} +0 -0
- /package/build/{Visible-cc2f13cd.js → Visible-c61ddd22.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-911fd0aa.js → WEIGHT_BOYS.percentile.monthly-f0260a21.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-d1e77dc4.js → WEIGHT_BOYS.percentile.weekly-3cb736e8.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-f171d8fd.js → WEIGHT_BOYS.percentile.yearly-94f85ddb.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-64b86646.js → WEIGHT_BOYS.zscore.monthly-cdb47903.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-23da7dbb.js → WEIGHT_BOYS.zscore.weekly-12d6f5d9.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-9348f61a.js → WEIGHT_BOYS.zscore.yearly-e4b75611.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-b779c2d2.js → WEIGHT_GIRLS.percentile.monthly-b8394bdc.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-4db69085.js → WEIGHT_GIRLS.percentile.weekly-631e8b78.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-8c79fb45.js → WEIGHT_GIRLS.percentile.yearly-ca287eb7.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-b617718d.js → WEIGHT_GIRLS.zscore.monthly-16230324.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-05e8be91.js → WEIGHT_GIRLS.zscore.weekly-d49e2a51.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-649d3075.js → WEIGHT_GIRLS.zscore.yearly-eca44e34.js} +0 -0
- /package/build/{animation-c88c01c5.js → animation-33859969.js} +0 -0
- /package/build/{constants-7ad2d737.js → constants-8d98bacf.js} +0 -0
- /package/build/{constants-9e097d03.js → constants-a74adb57.js} +0 -0
- /package/build/{constants-b80f312a.js → constants-dfbd726f.js} +0 -0
- /package/build/{dataTransform-aa3a190f.js → dataTransform-7c6d51e7.js} +0 -0
- /package/build/{doctor-04a2b037.js → doctor-bafacaea.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-dac06638.js → BMI_BOYS.percentile.monthly-19a85e6a.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-b09b104e.js → BMI_BOYS.percentile.weekly-5c511923.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-8d2bbf26.js → BMI_BOYS.percentile.yearly-782aa5f5.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-ff83b34e.js → BMI_BOYS.zscore.monthly-59ee6975.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-f8f2e38e.js → BMI_BOYS.zscore.weekly-8f11e427.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-e3f86867.js → BMI_BOYS.zscore.yearly-455e2975.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-693387f7.js → BMI_GIRLS.percentile.monthly-3a5e9d86.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-9cdff5f9.js → BMI_GIRLS.percentile.weekly-c405eba7.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-6da73623.js → BMI_GIRLS.percentile.yearly-85d427c7.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-49729d6a.js → BMI_GIRLS.zscore.monthly-453c4e29.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-7410f0ae.js → BMI_GIRLS.zscore.weekly-93d69f58.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-7369215f.js → BMI_GIRLS.zscore.yearly-d965563b.js} +0 -0
- /package/build/esm/{ChevronDown-d925d7d1.js → ChevronDown-6a0c6187.js} +0 -0
- /package/build/esm/{Close-e745eca7.js → Close-73a18788.js} +0 -0
- /package/build/esm/{Google-f5cf8cd1.js → Google-78874fd3.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-697c6eba.js → HEAD CIRCUM_BOYS.percentile.monthly-7d590246.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-0d52dfc7.js → HEAD CIRCUM_BOYS.percentile.weekly-0360da90.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-3b224b30.js → HEAD CIRCUM_BOYS.percentile.yearly-2b59c6a9.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-cfe010db.js → HEAD CIRCUM_BOYS.zscore.monthly-09593e8e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-957869f3.js → HEAD CIRCUM_BOYS.zscore.weekly-b40087f3.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-b97d2672.js → HEAD CIRCUM_BOYS.zscore.yearly-87589da2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-f65d9d43.js → HEAD CIRCUM_GIRLS.percentile.monthly-388fac78.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-e14df14e.js → HEAD CIRCUM_GIRLS.percentile.weekly-e80ba6a4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-b013bb58.js → HEAD CIRCUM_GIRLS.percentile.yearly-a4774fee.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-e8ed167d.js → HEAD CIRCUM_GIRLS.zscore.monthly-b7f1323e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-297b44a0.js → HEAD CIRCUM_GIRLS.zscore.weekly-0ae29c4b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-1d077df4.js → HEAD CIRCUM_GIRLS.zscore.yearly-d98f50f2.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-3f1b9fd5.js → HEIGHT_BOYS.percentile.monthly-e31728d6.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-6da81195.js → HEIGHT_BOYS.percentile.weekly-33eae1b1.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-72639770.js → HEIGHT_BOYS.percentile.yearly-d1f80e5b.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-1c413f4d.js → HEIGHT_BOYS.zscore.monthly-7fdb75fd.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-572dbefe.js → HEIGHT_BOYS.zscore.weekly-56575afc.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-43999b94.js → HEIGHT_BOYS.zscore.yearly-0391ab08.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-601fc33a.js → HEIGHT_GIRLS.percentile.monthly-5fa76899.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-9e8a6eb2.js → HEIGHT_GIRLS.percentile.weekly-38fd6cd5.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-7f0eff10.js → HEIGHT_GIRLS.percentile.yearly-4d288686.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-394d3747.js → HEIGHT_GIRLS.zscore.monthly-69b600b2.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-3ca42552.js → HEIGHT_GIRLS.zscore.weekly-09625159.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-c126d249.js → HEIGHT_GIRLS.zscore.yearly-ef8707cc.js} +0 -0
- /package/build/esm/{Locale-9c9185ab.js → Locale-b20f025e.js} +0 -0
- /package/build/esm/{Visible-076218f9.js → Visible-ccdf45f3.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-c9e47a21.js → WEIGHT_BOYS.percentile.monthly-a1dbd900.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-fd131d92.js → WEIGHT_BOYS.percentile.weekly-56fcfd2b.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-70795bd9.js → WEIGHT_BOYS.percentile.yearly-e190d2b8.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-1e3ec477.js → WEIGHT_BOYS.zscore.monthly-8e9a134a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-8efa19e8.js → WEIGHT_BOYS.zscore.weekly-fa23f966.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-7e44b1e1.js → WEIGHT_BOYS.zscore.yearly-2852bb9d.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-63523ce1.js → WEIGHT_GIRLS.percentile.monthly-6d731628.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-3bc7aaad.js → WEIGHT_GIRLS.percentile.weekly-913239dc.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-1a7c8145.js → WEIGHT_GIRLS.percentile.yearly-47436c1c.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-0136fc57.js → WEIGHT_GIRLS.zscore.monthly-c5dfa7be.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-f1399b90.js → WEIGHT_GIRLS.zscore.weekly-4e6055bf.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-a4632d64.js → WEIGHT_GIRLS.zscore.yearly-0b87a5ed.js} +0 -0
- /package/build/esm/{animation-fbd82fe7.js → animation-341e833c.js} +0 -0
- /package/build/esm/{constants-b66a28d0.js → constants-4f2bcabd.js} +0 -0
- /package/build/esm/{constants-d3f09dbf.js → constants-768bc5d6.js} +0 -0
- /package/build/esm/{constants-6a441f8c.js → constants-c0a54468.js} +0 -0
- /package/build/esm/{dataTransform-12801895.js → dataTransform-10530d63.js} +0 -0
- /package/build/esm/{doctor-a79990d3.js → doctor-3e127e72.js} +0 -0
- /package/build/esm/{index-389818db.js → index-159fb3d2.js} +0 -0
- /package/build/esm/{index-93a209fc.js → index-1c7b5953.js} +0 -0
- /package/build/esm/{index-73385afa.js → index-2aec4c22.js} +0 -0
- /package/build/esm/{index-283c3c12.js → index-5b2508f3.js} +0 -0
- /package/build/esm/{index-1bc048c5.js → index-5dc0f6af.js} +0 -0
- /package/build/esm/{index-695a4f3e.js → index-90d5ebd3.js} +0 -0
- /package/build/esm/{index-ef772cb5.js → index-cdd23479.js} +0 -0
- /package/build/esm/{index-797495df.js → index-f5739538.js} +0 -0
- /package/build/esm/{index-df36821b.js → index-fe7b84bc.js} +0 -0
- /package/build/esm/{index.styles-3afea8f8.js → index.styles-e20f3514.js} +0 -0
- /package/build/esm/{localizeNumberFormat-d9bd744b.js → localizeNumberFormat-1132bfc4.js} +0 -0
- /package/build/esm/{normalizeLink-716ad4a9.js → normalizeLink-b6a085ad.js} +0 -0
- /package/build/esm/{paths-352a80c6.js → paths-7ce95b5f.js} +0 -0
- /package/build/esm/{translationsContext-b994af79.js → translationsContext-a142e63a.js} +0 -0
- /package/build/esm/{tslib.es6-110835f1.js → tslib.es6-80e797b8.js} +0 -0
- /package/build/esm/{types-599548f3.js → types-3dd48134.js} +0 -0
- /package/build/esm/{useIsInit-3f173f7d.js → useIsInit-47f58a40.js} +0 -0
- /package/build/esm/{useOutsideClick-16c6ae64.js → useOutsideClick-eb833c17.js} +0 -0
- /package/build/esm/{useScrollbarSize-4b136d1e.js → useScrollbarSize-c9bdade4.js} +0 -0
- /package/build/esm/{useUniqueId-fd9caff9.js → useUniqueId-00775850.js} +0 -0
- /package/build/esm/{utils-33bf1d9a.js → utils-5710d70d.js} +0 -0
- /package/build/{index-1e8f6d92.js → index-0dff20ec.js} +0 -0
- /package/build/{index-a44b2a4f.js → index-297daef9.js} +0 -0
- /package/build/{index-72bb28e1.js → index-2aa4eeaa.js} +0 -0
- /package/build/{index-2b248cb9.js → index-4c8bfabf.js} +0 -0
- /package/build/{index-dbd9101a.js → index-4d2d7e8f.js} +0 -0
- /package/build/{index-a080550f.js → index-5c57b12c.js} +0 -0
- /package/build/{index-bc42ce4b.js → index-913c5e26.js} +0 -0
- /package/build/{index-3b70649c.js → index-a1c019eb.js} +0 -0
- /package/build/{index-ba44f30e.js → index-d80d28c5.js} +0 -0
- /package/build/{index.styles-7c549786.js → index.styles-ac73292c.js} +0 -0
- /package/build/{localizeNumberFormat-d376aa33.js → localizeNumberFormat-c3eac707.js} +0 -0
- /package/build/{normalizeLink-78099ea1.js → normalizeLink-4a1c486b.js} +0 -0
- /package/build/{paths-6891bc5d.js → paths-63709de3.js} +0 -0
- /package/build/{translationsContext-bcf08185.js → translationsContext-22a8f5f8.js} +0 -0
- /package/build/{tslib.es6-af233969.js → tslib.es6-fe11dca0.js} +0 -0
- /package/build/{types-f28e0ad8.js → types-9c5a496e.js} +0 -0
- /package/build/{useIsInit-6f684b16.js → useIsInit-a45de7f2.js} +0 -0
- /package/build/{useOutsideClick-fec97459.js → useOutsideClick-dd845432.js} +0 -0
- /package/build/{useScrollbarSize-ecc5d833.js → useScrollbarSize-253cc927.js} +0 -0
- /package/build/{useUniqueId-69a422c8.js → useUniqueId-0a0b00a7.js} +0 -0
- /package/build/{utils-bfae5c4f.js → utils-5d577044.js} +0 -0
package/build/esm/ssoV2.js
CHANGED
|
@@ -1,56 +1,71 @@
|
|
|
1
|
-
import { a as __awaiter, _ as __rest } from './tslib.es6-
|
|
1
|
+
import { a as __awaiter, _ as __rest } from './tslib.es6-80e797b8.js';
|
|
2
2
|
import React__default, { createContext, useMemo, useEffect, useState, useCallback, forwardRef } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { getCookie, setCookie, deleteCookie } from './miscCookieHelper.js';
|
|
4
|
+
import { I as Input, s as styles, O as OTP, f as PasswordInput, E as ErrorBoundary } from './index-0cbcafb3.js';
|
|
5
|
+
import { S as SSOStepTypeType, a as useSSOSteps, u as useSSOV2Store, i as isUserFinishedSetup, f as fetchSSOV2Api, w as websiteId, b as SSO_V2_PATHS, c as checkUserExist, l as locale, F as FacebookAppId, G as GoogleAuthClientId, h as handleAuthSuccess, g as getUserInfo, d as updateUserInfo, e as isPhoneNotVerifedYet, j as isLoginWithPhoneNotVerifedYet, k as isFlowFinishedSetup, r as resetPassword, m as redirect } from './store-b1723e37.js';
|
|
6
|
+
export { u as useSSOV2Store } from './store-b1723e37.js';
|
|
6
7
|
import { ChevronLeft } from '@hhgtech/icons/arrow';
|
|
7
8
|
import { Close, Search, ReplySquare } from '@hhgtech/icons/core';
|
|
8
|
-
import { Z as ZINDEX_SSO, L as LOCALE_SPECS, S as STATIC_PAGES, Q as QUERY_HEALTH_TOOL } from './index-
|
|
9
|
-
import { L as LogoIcon } from './logoIcon-
|
|
10
|
-
import { B as Button } from './index-
|
|
11
|
-
import { M as Modal } from './index-
|
|
9
|
+
import { Z as ZINDEX_SSO, L as LOCALE_SPECS, S as STATIC_PAGES, Q as QUERY_HEALTH_TOOL } from './index-7ec0009b.js';
|
|
10
|
+
import { L as LogoIcon } from './logoIcon-1571b9ad.js';
|
|
11
|
+
import { B as Button } from './index-45575337.js';
|
|
12
|
+
import { M as Modal } from './index-225e37ef.js';
|
|
12
13
|
import { Stack, Flex, Box, Group, Divider } from '@mantine/core';
|
|
13
14
|
import '@mantine/dates';
|
|
14
|
-
import './index-
|
|
15
|
-
import './index-
|
|
16
|
-
import { s as showNotification } from './useMantineLocale-
|
|
17
|
-
import { T as Text } from './index-
|
|
18
|
-
import { u as useTranslations } from './index-
|
|
15
|
+
import './index-758be42e.js';
|
|
16
|
+
import { C as CommonGAssets } from './index-5b2508f3.js';
|
|
17
|
+
import { s as showNotification } from './useMantineLocale-f91cefec.js';
|
|
18
|
+
import { T as Text } from './index-4e709a6b.js';
|
|
19
|
+
import { u as useTranslations } from './index-102d0c53.js';
|
|
19
20
|
import '@mantine/hooks';
|
|
20
|
-
import './utils-
|
|
21
|
-
import './other-
|
|
22
|
-
import './index-
|
|
23
|
-
import { L as LOCALE } from './Locale-
|
|
24
|
-
import {
|
|
21
|
+
import './utils-5710d70d.js';
|
|
22
|
+
import './other-450270b6.js';
|
|
23
|
+
import './index-fb17f6c8.js';
|
|
24
|
+
import { L as LOCALE } from './Locale-b20f025e.js';
|
|
25
|
+
import { I as ImageWrap, u as useScreenSize } from './useScreenSize-a04fceba.js';
|
|
26
|
+
import { G as Google, F as Facebook } from './Google-78874fd3.js';
|
|
25
27
|
import { parsePhoneNumber, getCountryCallingCode } from 'react-phone-number-input';
|
|
28
|
+
import { S as Spoiler } from './index-67412127.js';
|
|
29
|
+
import { domainLocales, MAP_DOMAIN_BY_LOCALE } from './constantsDomainLocales.js';
|
|
26
30
|
import styled from '@emotion/styled';
|
|
27
31
|
import cn from 'classnames';
|
|
28
32
|
import { CaretDown } from '@hhgtech/icons/other';
|
|
29
33
|
import debounce from 'lodash/debounce';
|
|
30
34
|
import throttle from 'lodash/throttle';
|
|
31
35
|
import Flags from 'react-phone-number-input/flags';
|
|
32
|
-
import { u as useScreenSize } from './useScreenSize-6c204f26.js';
|
|
33
36
|
import { Drawer } from 'vaul';
|
|
34
|
-
import { M as MAPPED_LOCALE } from './utils-
|
|
35
|
-
import { S as Spoiler } from './index-cbd6dc55.js';
|
|
36
|
-
import { domainLocales } from './constantsDomainLocales.js';
|
|
37
|
+
import { M as MAPPED_LOCALE } from './utils-19299334.js';
|
|
37
38
|
import { useForm, yupResolver } from '@mantine/form';
|
|
38
39
|
import * as yup from 'yup';
|
|
39
40
|
import dayjs from 'dayjs';
|
|
40
|
-
import { D as DatePicker } from './index-
|
|
41
|
+
import { D as DatePicker } from './index-829c6ade.js';
|
|
41
42
|
import '@mantine/carousel';
|
|
42
43
|
import './miscTheme.js';
|
|
43
|
-
import './useUniqueId-
|
|
44
|
+
import './useUniqueId-00775850.js';
|
|
44
45
|
import './constantsSite.js';
|
|
45
46
|
import 'zustand';
|
|
46
47
|
import './constantsIsProduction.js';
|
|
47
|
-
import './normalizeLink-
|
|
48
|
-
import './miscCookieHelper.js';
|
|
48
|
+
import './normalizeLink-b6a085ad.js';
|
|
49
49
|
import 'date-fns/locale';
|
|
50
50
|
import './constantsRiskScreener.js';
|
|
51
|
-
import './index.styles-
|
|
51
|
+
import './index.styles-e20f3514.js';
|
|
52
52
|
import '@mantine/notifications';
|
|
53
|
-
import './translationsContext-
|
|
53
|
+
import './translationsContext-a142e63a.js';
|
|
54
|
+
|
|
55
|
+
/** */
|
|
56
|
+
const fetchFeatureFlag = (site) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
|
+
var _a, _b;
|
|
58
|
+
let data = null;
|
|
59
|
+
try {
|
|
60
|
+
const baseUrl = 'https://staging-mobile-be.hellohealthgroup.com';
|
|
61
|
+
const response = yield fetch(`${baseUrl}/api/feature-flag/v1/list?site=${site}`);
|
|
62
|
+
data = response.json();
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
data = null;
|
|
66
|
+
}
|
|
67
|
+
return (_b = (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.flags) === null || _b === void 0 ? void 0 : _b.find((o) => o.name === 'SSO_V2_flag');
|
|
68
|
+
});
|
|
54
69
|
|
|
55
70
|
const SSOStateContext = createContext({
|
|
56
71
|
locale: LOCALE.Vietnam,
|
|
@@ -208,7 +223,8 @@ const isSocialFlowFn = (flowData) => {
|
|
|
208
223
|
const isPhoneFlowFn = (flowData) => {
|
|
209
224
|
return ((flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'sms' ||
|
|
210
225
|
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'zalo' ||
|
|
211
|
-
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'phone'
|
|
226
|
+
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'phone' ||
|
|
227
|
+
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'whatsapp');
|
|
212
228
|
};
|
|
213
229
|
const isEmailFlowFn = (flowData) => {
|
|
214
230
|
return (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'email';
|
|
@@ -221,6 +237,14 @@ const isResetPasswordFlowFn = (steps) => {
|
|
|
221
237
|
passwordForgotStep > 0 &&
|
|
222
238
|
passwordForgotStep > passwordStep);
|
|
223
239
|
};
|
|
240
|
+
const isResetPasswordViePhoneFlowFn = (steps) => {
|
|
241
|
+
// First -> Passsword -> Password Forgot Phone
|
|
242
|
+
const passwordStep = steps.findIndex((s) => s.type === SSOStepTypeType.PASSWORD);
|
|
243
|
+
const passwordForgotStep = steps.findIndex((s) => s.type === SSOStepTypeType.FORGOT_PASSWORD_PHONE);
|
|
244
|
+
return (passwordStep > 0 &&
|
|
245
|
+
passwordForgotStep > 0 &&
|
|
246
|
+
passwordForgotStep > passwordStep);
|
|
247
|
+
};
|
|
224
248
|
const isDisplayProgressBarFn = (flowData, step) => {
|
|
225
249
|
const showProgressBar = (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP ||
|
|
226
250
|
(step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.SETUP_FULL ||
|
|
@@ -235,29 +259,42 @@ const isDisplayProgressBarFn = (flowData, step) => {
|
|
|
235
259
|
isEmailFlowFn(flowData);
|
|
236
260
|
return showProgressBar && isWhiteListFlow;
|
|
237
261
|
};
|
|
238
|
-
const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo) => {
|
|
239
|
-
var _a, _b;
|
|
262
|
+
const getCurrentStepNumber = (flowData, { steps, currentStepIndex, abTestFlow, }, userInfo) => {
|
|
263
|
+
var _a, _b, _c;
|
|
240
264
|
const step = steps[currentStepIndex];
|
|
241
265
|
const isSocialFlow = isSocialFlowFn(flowData);
|
|
242
266
|
const isPhoneFlow = isPhoneFlowFn(flowData);
|
|
243
267
|
const isEmailFlow = isEmailFlowFn(flowData);
|
|
244
268
|
/** Social (Google, Facebook): FIRST => VERIFY_PHONE | OTP => STEP_FULL */
|
|
245
269
|
if (isSocialFlow) {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
270
|
+
// Ignore Phone in Community if in update email step
|
|
271
|
+
const isCommunityUpdateEmail = useSSOV2Store().setupSource === 'community' &&
|
|
272
|
+
((_a = steps[0]) === null || _a === void 0 ? void 0 : _a.type) === SSOStepTypeType.UPDATE_EMAIL;
|
|
273
|
+
const arrSteps = isCommunityUpdateEmail
|
|
274
|
+
? [
|
|
275
|
+
SSOStepTypeType.UPDATE_EMAIL,
|
|
276
|
+
SSOStepTypeType.OTP,
|
|
277
|
+
!userInfo || !isUserFinishedSetup(userInfo)
|
|
278
|
+
? SSOStepTypeType.SETUP_FULL
|
|
279
|
+
: undefined,
|
|
280
|
+
]
|
|
281
|
+
.flat()
|
|
282
|
+
.filter(Boolean)
|
|
283
|
+
: [
|
|
284
|
+
!isPhoneVerifedAlready(userInfo, flowData) && abTestFlow !== 'B'
|
|
285
|
+
? [SSOStepTypeType.VERIFY_PHONE, SSOStepTypeType.OTP]
|
|
286
|
+
: undefined,
|
|
287
|
+
isExistUpdateEmailStep(steps)
|
|
288
|
+
? (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
|
|
289
|
+
? SSOStepTypeType.OTP
|
|
290
|
+
: SSOStepTypeType.UPDATE_EMAIL
|
|
291
|
+
: undefined,
|
|
292
|
+
!userInfo || !isUserFinishedSetup(userInfo)
|
|
293
|
+
? SSOStepTypeType.SETUP_FULL
|
|
294
|
+
: undefined,
|
|
295
|
+
]
|
|
296
|
+
.flat()
|
|
297
|
+
.filter(Boolean);
|
|
261
298
|
const previousStep = steps[currentStepIndex - 1];
|
|
262
299
|
return [
|
|
263
300
|
arrSteps.length,
|
|
@@ -271,7 +308,7 @@ const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo)
|
|
|
271
308
|
!isPhoneVerifedAlready(userInfo, flowData)
|
|
272
309
|
? SSOStepTypeType.OTP
|
|
273
310
|
: undefined,
|
|
274
|
-
!((
|
|
311
|
+
!((_b = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _b === void 0 ? void 0 : _b.is_pass)
|
|
275
312
|
? SSOStepTypeType.FORGOT_PASSWORD_SETUP
|
|
276
313
|
: undefined,
|
|
277
314
|
!isSetupFullInfoAlready(userInfo, flowData)
|
|
@@ -313,7 +350,7 @@ const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo)
|
|
|
313
350
|
];
|
|
314
351
|
}
|
|
315
352
|
if (isEmailFlow) {
|
|
316
|
-
const hasPasswordStep = !((
|
|
353
|
+
const hasPasswordStep = !((_c = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _c === void 0 ? void 0 : _c.is_pass);
|
|
317
354
|
const hasPhoneStep = !isPhoneVerifedAlready(userInfo, flowData);
|
|
318
355
|
const hasSetupFullStep = !isSetupFullInfoAlready(userInfo, flowData);
|
|
319
356
|
const isForgotPasswordSetup = steps.find((s) => s.type === SSOStepTypeType.FORGOT_PASSWORD_SETUP);
|
|
@@ -348,10 +385,10 @@ const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo)
|
|
|
348
385
|
const ProgressBar = () => {
|
|
349
386
|
// const initUserInfo = useRef<UserInfo | undefined | null>()
|
|
350
387
|
const { steps, currentStepIndex } = useSSOSteps();
|
|
351
|
-
const { flowData, userInfo } = useSSOV2Store();
|
|
388
|
+
const { flowData, userInfo, abTestFlow } = useSSOV2Store();
|
|
352
389
|
/** No need update state IF userInfo is changed */
|
|
353
390
|
const initUserInfo = useMemo(() => userInfo, [userInfo]);
|
|
354
|
-
const [totalStepNumber, activeStepNumber] = getCurrentStepNumber(flowData, { steps, currentStepIndex }, initUserInfo);
|
|
391
|
+
const [totalStepNumber, activeStepNumber] = getCurrentStepNumber(flowData, { steps, currentStepIndex, abTestFlow }, initUserInfo);
|
|
355
392
|
if (!activeStepNumber || totalStepNumber === 1)
|
|
356
393
|
return null;
|
|
357
394
|
return (React__default.createElement(Flex, { gap: 2 }, Array.from({ length: totalStepNumber }).map((_, idx) => {
|
|
@@ -440,7 +477,12 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
440
477
|
borderRadius: '100%',
|
|
441
478
|
}, onClick: goBack, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Back" },
|
|
442
479
|
React__default.createElement(ChevronLeft, null))),
|
|
443
|
-
showLogo && (React__default.createElement(
|
|
480
|
+
showLogo && (React__default.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
|
|
481
|
+
React__default.createElement(LogoIcon, { type: logoType, height: 32, width: 'unset' }),
|
|
482
|
+
locale === LOCALE.Indonesia && (React__default.createElement(ImageWrap, { alt: "", src: CommonGAssets.getAssetPath('sehat-badge.png'), style: {
|
|
483
|
+
width: 56,
|
|
484
|
+
height: 23,
|
|
485
|
+
} })))),
|
|
444
486
|
showClose && (React__default.createElement(Button, { variant: "white", style: {
|
|
445
487
|
width: 40,
|
|
446
488
|
height: 40,
|
|
@@ -680,7 +722,7 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
680
722
|
React__default.createElement(Stack, { spacing: 8 },
|
|
681
723
|
React__default.createElement(Text, { size: "s1", weight: "semiBold" }, t('ssov2.email.title')),
|
|
682
724
|
React__default.createElement(Text, { size: "p4" }, t('ssov2.email.description'))),
|
|
683
|
-
React__default.createElement(Input, { name: "email", placeholder:
|
|
725
|
+
React__default.createElement(Input, { name: "email", placeholder: t('onboarding.formEmail.yourEmail'), error: errMsg || undefined, type: "email", required: true, mt: 24, disabled: loading, onChange: () => setErrMsg(''), "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Email" }),
|
|
684
726
|
React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, mt: 16, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Verify Your Email" }, t('ssov2.email.button'))));
|
|
685
727
|
};
|
|
686
728
|
|
|
@@ -783,6 +825,59 @@ const loginBySocial = (token, social) => __awaiter(void 0, void 0, void 0, funct
|
|
|
783
825
|
});
|
|
784
826
|
});
|
|
785
827
|
|
|
828
|
+
// "phone_number": "906911910",
|
|
829
|
+
// "area_code":"+84",
|
|
830
|
+
const registerBySendWhatsAppOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
831
|
+
const formData = new FormData();
|
|
832
|
+
formData.append('phone_number', phone);
|
|
833
|
+
formData.append('area_code', areaCode);
|
|
834
|
+
formData.append('website_id', websiteId);
|
|
835
|
+
return fetchSSOV2Api(SSO_V2_PATHS.WHATSAPP.REGISTER_BY_SEND_OTP, {
|
|
836
|
+
method: 'POST',
|
|
837
|
+
body: formData,
|
|
838
|
+
});
|
|
839
|
+
});
|
|
840
|
+
// "phone_number": "906911910",
|
|
841
|
+
// "area_code":"+84",
|
|
842
|
+
const resendWhatsAppOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
843
|
+
const formData = new FormData();
|
|
844
|
+
formData.append('phone_number', phone);
|
|
845
|
+
formData.append('area_code', areaCode);
|
|
846
|
+
return fetchSSOV2Api(SSO_V2_PATHS.WHATSAPP.SEND_OTP, {
|
|
847
|
+
method: 'POST',
|
|
848
|
+
body: formData,
|
|
849
|
+
});
|
|
850
|
+
});
|
|
851
|
+
const resendUpdatePhoneWhatsAppOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
852
|
+
const formData = new FormData();
|
|
853
|
+
formData.append('phone_number', phone);
|
|
854
|
+
formData.append('area_code', areaCode);
|
|
855
|
+
return fetchSSOV2Api(SSO_V2_PATHS.WHATSAPP.UPDATE_PHONE_SEND_OTP, {
|
|
856
|
+
method: 'POST',
|
|
857
|
+
body: formData,
|
|
858
|
+
});
|
|
859
|
+
});
|
|
860
|
+
const verifyUpdatePhoneWhatsAppOTP = (phone, areaCode, otpCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
861
|
+
const formData = new FormData();
|
|
862
|
+
formData.append('phone_number', phone);
|
|
863
|
+
formData.append('otp_code', otpCode);
|
|
864
|
+
formData.append('area_code', areaCode);
|
|
865
|
+
return fetchSSOV2Api(SSO_V2_PATHS.WHATSAPP.UPDATE_PHONE_VERIFY_OTP, {
|
|
866
|
+
method: 'POST',
|
|
867
|
+
body: formData,
|
|
868
|
+
});
|
|
869
|
+
});
|
|
870
|
+
const verifyByWhatsAppOTP = (phone, areaCode, otpCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
871
|
+
const formData = new FormData();
|
|
872
|
+
formData.append('otp_code', otpCode);
|
|
873
|
+
formData.append('phone_number', phone);
|
|
874
|
+
formData.append('area_code', areaCode);
|
|
875
|
+
return fetchSSOV2Api(SSO_V2_PATHS.WHATSAPP.VERIFY_BY_OTP, {
|
|
876
|
+
method: 'POST',
|
|
877
|
+
body: formData,
|
|
878
|
+
});
|
|
879
|
+
});
|
|
880
|
+
|
|
786
881
|
// "phone_number": "906911910",
|
|
787
882
|
// "area_code":"+84",
|
|
788
883
|
const registerBySendZaloOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -839,9 +934,113 @@ const verifyUpdatePhoneZaloOTP = (phone, areaCode, otpCode) => __awaiter(void 0,
|
|
|
839
934
|
});
|
|
840
935
|
});
|
|
841
936
|
|
|
937
|
+
// VietNam: Zalo - SMS
|
|
938
|
+
// Info: WhatsApp
|
|
939
|
+
// Malay: WhatsApp và SMS
|
|
940
|
+
const isFeatureWhatsAppEnabled = [
|
|
941
|
+
LOCALE.Indonesia,
|
|
942
|
+
LOCALE.Malaysia,
|
|
943
|
+
].includes(locale);
|
|
944
|
+
const isFeatureSMSEnabled = [LOCALE.Vietnam, LOCALE.Malaysia].includes(locale);
|
|
945
|
+
const isFeatureZaloEnabled = [LOCALE.Vietnam].includes(locale);
|
|
946
|
+
|
|
842
947
|
const MailIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "21", height: "20", viewBox: "0 0 21 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
843
948
|
React__default.createElement("path", { d: "M15.043 2.56348H6.29297C3.66797 2.56348 1.91797 3.87598 1.91797 6.93848V13.0635C1.91797 16.126 3.66797 17.4385 6.29297 17.4385H15.043C17.668 17.4385 19.418 16.126 19.418 13.0635V6.93848C19.418 3.87598 17.668 2.56348 15.043 2.56348ZM15.4542 7.89223L12.7155 10.0797C12.138 10.5435 11.403 10.771 10.668 10.771C9.93297 10.771 9.18922 10.5435 8.62047 10.0797L5.88172 7.89223C5.60172 7.66473 5.55797 7.24473 5.77672 6.96473C6.00422 6.68473 6.41547 6.63223 6.69547 6.85973L9.43422 9.04723C10.0992 9.58098 11.228 9.58098 11.893 9.04723L14.6317 6.85973C14.9117 6.63223 15.3317 6.67598 15.5505 6.96473C15.778 7.24473 15.7342 7.66473 15.4542 7.89223Z", fill: "#00B16A" })));
|
|
844
949
|
|
|
950
|
+
const PolicyContent = ({ legalTextType, trackingCategory, trackingAction, }) => {
|
|
951
|
+
var _a, _b;
|
|
952
|
+
const { t } = useTranslations();
|
|
953
|
+
const { locale } = useSSOState();
|
|
954
|
+
return (React__default.createElement(Stack, { spacing: 24, sx: (theme) => ({
|
|
955
|
+
marginTop: 56,
|
|
956
|
+
[theme.fn.smallerThan('sm')]: {
|
|
957
|
+
marginTop: 'auto',
|
|
958
|
+
paddingTop: 50,
|
|
959
|
+
},
|
|
960
|
+
}) },
|
|
961
|
+
React__default.createElement(Spoiler, { maxHeight: 74, showLabel: React__default.createElement(Text, { size: "p5", color: "gray.6", underline: true }, t('home.seeMore')), hideLabel: React__default.createElement(Text, { size: "p5", color: "gray.6", underline: true }, t('articlePage.showLess')) },
|
|
962
|
+
React__default.createElement(Text, { size: "p5", color: "gray.6" }, t(legalTextType === 'community'
|
|
963
|
+
? 'ssov2.policyText.community'
|
|
964
|
+
: 'ssov2.policyText', {
|
|
965
|
+
privacy: (React__default.createElement("a", { href: `https://${domainLocales[locale]}/static/${((_a = STATIC_PAGES[locale]) === null || _a === void 0 ? void 0 : _a.PRIVACY_POLICY) || ''}`, target: "_blank", style: {
|
|
966
|
+
color: '#262626',
|
|
967
|
+
textDecoration: 'underline',
|
|
968
|
+
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Privacy Policy", rel: "noreferrer" }, t('ssov2.policyText.privacy'))),
|
|
969
|
+
terms: (React__default.createElement("a", { href: `https://${domainLocales[locale]}/static/${((_b = STATIC_PAGES[locale]) === null || _b === void 0 ? void 0 : _b.TERM_OF_USE) || ''}`, target: "_blank", style: {
|
|
970
|
+
color: '#262626',
|
|
971
|
+
textDecoration: 'underline',
|
|
972
|
+
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Terms of Service", rel: "noreferrer" }, t('ssov2.policyText.terms'))),
|
|
973
|
+
})))));
|
|
974
|
+
};
|
|
975
|
+
|
|
976
|
+
const FirstBFlow = ({ hidden,
|
|
977
|
+
// activeTab,
|
|
978
|
+
legalTextType, trackingAction, trackingCategory, onTriggerGoogleLogin, onTriggerFacebookLogin, onClickEmail, }) => {
|
|
979
|
+
const { locale } = useSSOState();
|
|
980
|
+
const domain = MAP_DOMAIN_BY_LOCALE[locale];
|
|
981
|
+
const { t } = useTranslations();
|
|
982
|
+
return (React__default.createElement("div", { style: {
|
|
983
|
+
display: hidden ? 'none' : 'flex',
|
|
984
|
+
flexDirection: 'column',
|
|
985
|
+
height: '100%',
|
|
986
|
+
} },
|
|
987
|
+
React__default.createElement(Stack, { mt: 8, spacing: 8 },
|
|
988
|
+
React__default.createElement(Text, { size: "h4", weight: "semiBold" },
|
|
989
|
+
"Welcome to",
|
|
990
|
+
' ',
|
|
991
|
+
domain.replace('.com.ph', '').replace('.tw', '').replace('.com', '')),
|
|
992
|
+
React__default.createElement(Text, { size: "p4" }, "Sign up or log in with your email or social media account.")),
|
|
993
|
+
React__default.createElement(Stack, { mt: 24, spacing: 24 },
|
|
994
|
+
React__default.createElement(Button, { variant: "white", style: {
|
|
995
|
+
flex: 1,
|
|
996
|
+
height: 48,
|
|
997
|
+
padding: 12,
|
|
998
|
+
background: '#F7F9FC',
|
|
999
|
+
borderRadius: 8,
|
|
1000
|
+
}, onClick: onTriggerGoogleLogin, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Google" },
|
|
1001
|
+
React__default.createElement(Google, { style: {
|
|
1002
|
+
width: 20,
|
|
1003
|
+
height: 20,
|
|
1004
|
+
marginRight: 4,
|
|
1005
|
+
borderRadius: '100%',
|
|
1006
|
+
} }),
|
|
1007
|
+
' ',
|
|
1008
|
+
React__default.createElement(Text, { size: "p4", color: "black", weight: "semiBold" }, "Continue with Google")),
|
|
1009
|
+
React__default.createElement(Stack, { spacing: 24, align: "center" },
|
|
1010
|
+
React__default.createElement(Text, { size: "p4", color: "gray.4" }, t('ssov2.orContinueWith')),
|
|
1011
|
+
React__default.createElement(Group, { spacing: 8, style: {
|
|
1012
|
+
width: '100%',
|
|
1013
|
+
} },
|
|
1014
|
+
React__default.createElement(Button, { variant: "white", style: {
|
|
1015
|
+
flex: 1,
|
|
1016
|
+
height: 48,
|
|
1017
|
+
padding: 12,
|
|
1018
|
+
background: '#F7F9FC',
|
|
1019
|
+
borderRadius: 8,
|
|
1020
|
+
}, onClick: onTriggerFacebookLogin, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Facebook" },
|
|
1021
|
+
React__default.createElement(Facebook, { style: {
|
|
1022
|
+
width: 20,
|
|
1023
|
+
height: 20,
|
|
1024
|
+
marginRight: 4,
|
|
1025
|
+
borderRadius: '100%',
|
|
1026
|
+
} }),
|
|
1027
|
+
' ',
|
|
1028
|
+
React__default.createElement(Text, { size: "p4", color: "black", weight: "regular" }, "Facebook")),
|
|
1029
|
+
React__default.createElement(Button, { variant: "white", style: {
|
|
1030
|
+
flex: 1,
|
|
1031
|
+
height: 48,
|
|
1032
|
+
padding: 12,
|
|
1033
|
+
background: '#F7F9FC',
|
|
1034
|
+
borderRadius: 8,
|
|
1035
|
+
}, onClick: onClickEmail, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Email" },
|
|
1036
|
+
React__default.createElement(MailIcon, { style: {
|
|
1037
|
+
marginRight: 4,
|
|
1038
|
+
} }),
|
|
1039
|
+
' ',
|
|
1040
|
+
React__default.createElement(Text, { size: "p4", color: "black", weight: "regular" }, "Email"))))),
|
|
1041
|
+
React__default.createElement(PolicyContent, { legalTextType: legalTextType, trackingAction: trackingAction, trackingCategory: trackingCategory })));
|
|
1042
|
+
};
|
|
1043
|
+
|
|
845
1044
|
function createCommonjsModule(fn) {
|
|
846
1045
|
var module = { exports: {} };
|
|
847
1046
|
return fn(module, module.exports), module.exports;
|
|
@@ -2276,6 +2475,12 @@ const StyledPhone = styled(PhoneWithCustomCountrySelect) `
|
|
|
2276
2475
|
}
|
|
2277
2476
|
`;
|
|
2278
2477
|
|
|
2478
|
+
const WhatsApp = ({ size = 20 }) => {
|
|
2479
|
+
return (React__default.createElement("svg", { width: (size * 19) / 18, height: size, viewBox: "0 0 19 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
2480
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.92578 1.07422C5.78895 1.07422 2.42578 4.43738 2.42578 8.57422C2.42578 10.0305 2.83992 11.4277 3.62269 12.6382L2.48494 15.1458C2.38027 15.3779 2.41668 15.6464 2.58506 15.8421C2.71249 15.9923 2.89453 16.0742 3.08112 16.0742C3.14028 16.0742 3.19489 16.0651 3.25406 16.0515L6.39423 15.1913C7.47736 15.7693 8.69247 16.0742 9.92578 16.0742C14.0626 16.0742 17.4258 12.711 17.4258 8.57422C17.4258 4.44193 14.0626 1.07422 9.92578 1.07422ZM9.92578 14.7635C8.82899 14.7635 7.75497 14.4723 6.80836 13.9216C6.70824 13.8624 6.59447 13.8306 6.47614 13.8306C6.41698 13.8306 6.35782 13.8397 6.30321 13.8533L4.25072 14.4177L4.96522 12.843C5.06079 12.6291 5.03804 12.3788 4.90151 12.1877C4.13695 11.1273 3.73191 9.88035 3.73191 8.56967C3.73191 5.15644 6.508 2.38035 9.92123 2.38035C13.3345 2.38035 16.1105 5.15644 16.1105 8.56967C16.1151 11.9874 13.339 14.7635 9.92578 14.7635Z", fill: "currentColor" }),
|
|
2481
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.8115 9.69834C12.4975 9.51175 12.0879 9.30241 11.7193 9.4526C11.4371 9.57092 11.2551 10.0124 11.0685 10.2399C10.9729 10.3582 10.8637 10.3764 10.7181 10.3173C9.65315 9.89404 8.83397 9.17954 8.2469 8.20108C8.14678 8.0509 8.16498 7.92802 8.2833 7.78694C8.46079 7.57759 8.68379 7.34095 8.73385 7.05879C8.78391 6.77663 8.65193 6.44896 8.53361 6.19865C8.38343 5.88009 8.21959 5.42043 7.89647 5.2384C7.60066 5.07001 7.21383 5.16558 6.94987 5.37948C6.49477 5.74811 6.27633 6.33063 6.28543 6.90405C6.28543 7.06788 6.30818 7.23172 6.34459 7.38645C6.43561 7.76418 6.6131 8.11916 6.80879 8.45593C6.95897 8.71079 7.11826 8.95654 7.29119 9.19319C7.86006 9.96685 8.57002 10.6404 9.38919 11.141C9.79878 11.3913 10.2402 11.6143 10.6999 11.7645C11.2141 11.9329 11.6692 12.1104 12.2244 12.0057C12.8024 11.8965 13.3758 11.5369 13.6079 10.9772C13.6762 10.8133 13.7081 10.6267 13.6717 10.4538C13.5897 10.0897 13.1028 9.87128 12.8115 9.69834Z", fill: "currentColor" })));
|
|
2482
|
+
};
|
|
2483
|
+
|
|
2279
2484
|
const Zalo = ({ size = 20, useCurrentColor = false }) => {
|
|
2280
2485
|
const color = useCurrentColor ? 'currentColor' : '#0068FF';
|
|
2281
2486
|
return (React__default.createElement("svg", { width: (size * 21) / 20, height: size, viewBox: "0 0 21 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -2291,12 +2496,11 @@ const Zalo = ({ size = 20, useCurrentColor = false }) => {
|
|
|
2291
2496
|
};
|
|
2292
2497
|
|
|
2293
2498
|
const SSOFirstScreen = ({ hidden, config, }) => {
|
|
2294
|
-
var _a, _b;
|
|
2295
2499
|
const [phone, setPhone] = React__default.useState('');
|
|
2296
2500
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
2297
2501
|
const { locale, onClose, setTracking } = useSSOState();
|
|
2298
2502
|
const { addStep, goNext } = useSSOSteps();
|
|
2299
|
-
const { setUserInfo } = useSSOV2Store();
|
|
2503
|
+
const { setUserInfo, abTestFlow } = useSSOV2Store();
|
|
2300
2504
|
const [activeTab, setActiveTab] = React__default.useState('login');
|
|
2301
2505
|
const { legalTextType } = config || {};
|
|
2302
2506
|
const { t } = useTranslations();
|
|
@@ -2326,7 +2530,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2326
2530
|
},
|
|
2327
2531
|
});
|
|
2328
2532
|
const isNotHavePhone = !userInfo._data.phone || !userInfo._data.phone_verified_at;
|
|
2329
|
-
if (isNotHavePhone) {
|
|
2533
|
+
if (isNotHavePhone && abTestFlow !== 'B') {
|
|
2330
2534
|
useSSOV2Store.setState((f) => {
|
|
2331
2535
|
var _a;
|
|
2332
2536
|
return ({
|
|
@@ -2414,7 +2618,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2414
2618
|
};
|
|
2415
2619
|
}, []);
|
|
2416
2620
|
const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2417
|
-
var
|
|
2621
|
+
var _a, _b;
|
|
2418
2622
|
setLoading(true);
|
|
2419
2623
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2420
2624
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2423,8 +2627,8 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2423
2627
|
}
|
|
2424
2628
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
2425
2629
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2426
|
-
const provider = (
|
|
2427
|
-
if ((
|
|
2630
|
+
const provider = (_a = userExist._data) === null || _a === void 0 ? void 0 : _a.provider;
|
|
2631
|
+
if ((_b = userExist._data) === null || _b === void 0 ? void 0 : _b.is_pass) {
|
|
2428
2632
|
useSSOV2Store.setState({
|
|
2429
2633
|
flowData: {
|
|
2430
2634
|
method: 'zalo',
|
|
@@ -2476,6 +2680,69 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2476
2680
|
}
|
|
2477
2681
|
setLoading(false);
|
|
2478
2682
|
});
|
|
2683
|
+
const onClickContinueWhatsApp = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2684
|
+
var _c, _d;
|
|
2685
|
+
setLoading(true);
|
|
2686
|
+
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2687
|
+
if (!areaCode || !phoneNumber || !phone) {
|
|
2688
|
+
setErrMsg(t('ssov2.validate.phone.required'));
|
|
2689
|
+
return setLoading(false);
|
|
2690
|
+
}
|
|
2691
|
+
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
2692
|
+
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2693
|
+
const provider = (_c = userExist._data) === null || _c === void 0 ? void 0 : _c.provider;
|
|
2694
|
+
if ((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.is_pass) {
|
|
2695
|
+
useSSOV2Store.setState({
|
|
2696
|
+
flowData: {
|
|
2697
|
+
method: 'whatsapp',
|
|
2698
|
+
flow: 'login',
|
|
2699
|
+
metaData: userExist._data,
|
|
2700
|
+
},
|
|
2701
|
+
});
|
|
2702
|
+
addStep({
|
|
2703
|
+
type: SSOStepTypeType.PASSWORD,
|
|
2704
|
+
config: {
|
|
2705
|
+
phone,
|
|
2706
|
+
method: 'whatsapp',
|
|
2707
|
+
},
|
|
2708
|
+
});
|
|
2709
|
+
goNext();
|
|
2710
|
+
}
|
|
2711
|
+
else {
|
|
2712
|
+
let res;
|
|
2713
|
+
if (!provider) {
|
|
2714
|
+
res = yield registerBySendWhatsAppOTP(phoneNumber, areaCode);
|
|
2715
|
+
}
|
|
2716
|
+
else {
|
|
2717
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
2718
|
+
}
|
|
2719
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
2720
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
2721
|
+
return setLoading(false);
|
|
2722
|
+
}
|
|
2723
|
+
useSSOV2Store.setState({
|
|
2724
|
+
flowData: {
|
|
2725
|
+
method: 'whatsapp',
|
|
2726
|
+
flow: 'signup',
|
|
2727
|
+
metaData: userExist._data,
|
|
2728
|
+
},
|
|
2729
|
+
});
|
|
2730
|
+
addStep({
|
|
2731
|
+
type: SSOStepTypeType.OTP,
|
|
2732
|
+
config: {
|
|
2733
|
+
phone,
|
|
2734
|
+
otpType: 'phone-whatsapp',
|
|
2735
|
+
afterAction: 'forgot',
|
|
2736
|
+
},
|
|
2737
|
+
});
|
|
2738
|
+
goNext();
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2741
|
+
else {
|
|
2742
|
+
setErrMsg(getErrorTextFromCode(t, userExist === null || userExist === void 0 ? void 0 : userExist.code));
|
|
2743
|
+
}
|
|
2744
|
+
setLoading(false);
|
|
2745
|
+
});
|
|
2479
2746
|
const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2480
2747
|
var _e, _f;
|
|
2481
2748
|
setLoading(true);
|
|
@@ -2618,6 +2885,9 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2618
2885
|
});
|
|
2619
2886
|
}, { scope: 'public_profile,email,user_gender,user_birthday' });
|
|
2620
2887
|
};
|
|
2888
|
+
if (abTestFlow === 'B') {
|
|
2889
|
+
return (React__default.createElement(FirstBFlow, { hidden: hidden, activeTab: activeTab, legalTextType: legalTextType, trackingAction: trackingAction, trackingCategory: trackingCategory, onTriggerGoogleLogin: onTriggerGoogleLogin, onTriggerFacebookLogin: onTriggerFacebookLogin, onClickEmail: onClickEmail }));
|
|
2890
|
+
}
|
|
2621
2891
|
return (React__default.createElement("div", { style: {
|
|
2622
2892
|
display: hidden ? 'none' : 'flex',
|
|
2623
2893
|
flexDirection: 'column',
|
|
@@ -2653,8 +2923,9 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2653
2923
|
};
|
|
2654
2924
|
}, [activeTab]) }))),
|
|
2655
2925
|
React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickLoginWithPhone, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue Login", display: activeTab === 'login' ? 'block' : 'none' }, t('ssov2.button.continue')),
|
|
2656
|
-
React__default.createElement(Button, { size: "lg", variant: "primary", onClick:
|
|
2657
|
-
React__default.createElement(Button, { size: "
|
|
2926
|
+
isFeatureWhatsAppEnabled && (React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueWhatsApp, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with WhatsApp", display: activeTab === 'signup' ? 'block' : 'none', leftIcon: React__default.createElement(WhatsApp, null), color: "#00B16A" }, t('ssov2.button.otp.whatsapp'))),
|
|
2927
|
+
isFeatureZaloEnabled && (React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo", display: activeTab === 'signup' ? 'block' : 'none', leftIcon: React__default.createElement(Zalo, null) }, t('ssov2.button.otp.zalo'))),
|
|
2928
|
+
isFeatureSMSEnabled && (React__default.createElement(Button, { size: "sm", variant: "white", onClick: onClickContinuePhone, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS", display: activeTab === 'signup' ? 'block' : 'none', style: { fontWeight: 400 }, color: "#595959", leftIcon: React__default.createElement(ReplySquare, { size: 18 }) }, t('ssov2.button.otp.sms')))),
|
|
2658
2929
|
React__default.createElement(Divider, { color: "#E4E8EC", display: activeTab === 'signup' ? 'block' : 'none' }),
|
|
2659
2930
|
React__default.createElement(Stack, { spacing: 16, align: "center" },
|
|
2660
2931
|
React__default.createElement(Text, { size: "p4", color: "gray.4" }, t('ssov2.orContinueWith')),
|
|
@@ -2703,26 +2974,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2703
2974
|
} }),
|
|
2704
2975
|
' ',
|
|
2705
2976
|
React__default.createElement(Text, { size: "p4", color: "black", weight: "regular" }, "Email"))))),
|
|
2706
|
-
React__default.createElement(
|
|
2707
|
-
marginTop: 56,
|
|
2708
|
-
[theme.fn.smallerThan('sm')]: {
|
|
2709
|
-
marginTop: 'auto',
|
|
2710
|
-
paddingTop: 50,
|
|
2711
|
-
},
|
|
2712
|
-
}) },
|
|
2713
|
-
React__default.createElement(Spoiler, { maxHeight: 74, showLabel: React__default.createElement(Text, { size: "p5", color: "gray.6", underline: true }, t('home.seeMore')), hideLabel: React__default.createElement(Text, { size: "p5", color: "gray.6", underline: true }, t('articlePage.showLess')) },
|
|
2714
|
-
React__default.createElement(Text, { size: "p5", color: "gray.6" }, t(legalTextType === 'community'
|
|
2715
|
-
? 'ssov2.policyText.community'
|
|
2716
|
-
: 'ssov2.policyText', {
|
|
2717
|
-
privacy: (React__default.createElement("a", { href: `https://${domainLocales[locale]}/static/${((_a = STATIC_PAGES[locale]) === null || _a === void 0 ? void 0 : _a.PRIVACY_POLICY) || ''}`, target: "_blank", style: {
|
|
2718
|
-
color: '#262626',
|
|
2719
|
-
textDecoration: 'underline',
|
|
2720
|
-
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Privacy Policy" }, t('ssov2.policyText.privacy'))),
|
|
2721
|
-
terms: (React__default.createElement("a", { href: `https://${domainLocales[locale]}/static/${((_b = STATIC_PAGES[locale]) === null || _b === void 0 ? void 0 : _b.TERM_OF_USE) || ''}`, target: "_blank", style: {
|
|
2722
|
-
color: '#262626',
|
|
2723
|
-
textDecoration: 'underline',
|
|
2724
|
-
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Terms of Service" }, t('ssov2.policyText.terms'))),
|
|
2725
|
-
}))))));
|
|
2977
|
+
React__default.createElement(PolicyContent, { legalTextType: legalTextType, trackingAction: trackingAction, trackingCategory: trackingCategory })));
|
|
2726
2978
|
};
|
|
2727
2979
|
|
|
2728
2980
|
const initSendUpdateEmailOtp = (email) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -2763,6 +3015,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2763
3015
|
const isEmail = otpType === 'email' || otpType === 'update-email';
|
|
2764
3016
|
const isZalo = otpType === 'phone-zalo';
|
|
2765
3017
|
const isSMS = otpType === 'phone-sms';
|
|
3018
|
+
const isWhatsApp = otpType === 'phone-whatsapp';
|
|
2766
3019
|
const trackingMethod = flowData === null || flowData === void 0 ? void 0 : flowData.method;
|
|
2767
3020
|
const trackingCategory = userInfo && !userInfo.first_time_login
|
|
2768
3021
|
? `SSO - Existing User via ${trackingMethod}`
|
|
@@ -2771,7 +3024,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2771
3024
|
: `SSO - Sign In via ${trackingMethod}`;
|
|
2772
3025
|
const trackingAction = isEmail
|
|
2773
3026
|
? 'Verify Your Email'
|
|
2774
|
-
: `Verify Phone Number via ${isZalo ? 'Zalo' : isSMS ? 'SMS' : ''}`;
|
|
3027
|
+
: `Verify Phone Number via ${isZalo ? 'Zalo' : isSMS ? 'SMS' : isWhatsApp ? 'WhatsApp' : ''}`;
|
|
2775
3028
|
useEffect(() => {
|
|
2776
3029
|
if (!hidden) {
|
|
2777
3030
|
setError('');
|
|
@@ -2805,6 +3058,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2805
3058
|
else if (otpType === 'phone-zalo') {
|
|
2806
3059
|
res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
2807
3060
|
}
|
|
3061
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3062
|
+
res = yield resendUpdatePhoneWhatsAppOTP(phoneNumber, areaCode);
|
|
3063
|
+
}
|
|
2808
3064
|
}
|
|
2809
3065
|
else {
|
|
2810
3066
|
if (otpType === 'phone-sms') {
|
|
@@ -2813,6 +3069,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2813
3069
|
else if (otpType === 'phone-zalo') {
|
|
2814
3070
|
res = yield resendZaloOTP(phoneNumber, areaCode);
|
|
2815
3071
|
}
|
|
3072
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3073
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
3074
|
+
}
|
|
2816
3075
|
else if (otpType === 'email') {
|
|
2817
3076
|
res = yield resendEmailOTP(email);
|
|
2818
3077
|
}
|
|
@@ -2851,6 +3110,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2851
3110
|
else if (otpType === 'phone-zalo') {
|
|
2852
3111
|
res = yield verifyUpdatePhoneZaloOTP(phoneNumber, areaCode, otp);
|
|
2853
3112
|
}
|
|
3113
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3114
|
+
res = yield verifyUpdatePhoneWhatsAppOTP(phoneNumber, areaCode, otp);
|
|
3115
|
+
}
|
|
2854
3116
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
2855
3117
|
if (afterAction === 'setup') {
|
|
2856
3118
|
const userInfo = yield getUserInfo();
|
|
@@ -2876,6 +3138,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2876
3138
|
const needPass = (flowData.method === 'email' ||
|
|
2877
3139
|
flowData.method === 'zalo' ||
|
|
2878
3140
|
flowData.method === 'sms' ||
|
|
3141
|
+
flowData.method === 'whatsapp' ||
|
|
2879
3142
|
flowData.method === 'phone' ||
|
|
2880
3143
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'email' ||
|
|
2881
3144
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'phone') &&
|
|
@@ -2934,6 +3197,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2934
3197
|
else if (otpType === 'phone-zalo') {
|
|
2935
3198
|
res = yield verifyByZaloOTP(phoneNumber, areaCode, otp);
|
|
2936
3199
|
}
|
|
3200
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3201
|
+
res = yield verifyByWhatsAppOTP(phoneNumber, areaCode, otp);
|
|
3202
|
+
}
|
|
2937
3203
|
else if (otpType === 'email') {
|
|
2938
3204
|
res = yield verifyByEmailOTP(email, otp);
|
|
2939
3205
|
}
|
|
@@ -2956,7 +3222,15 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2956
3222
|
addStepAndGoNext({
|
|
2957
3223
|
type: SSOStepTypeType.FORGOT_PASSWORD_SETUP,
|
|
2958
3224
|
config: {
|
|
2959
|
-
provider: isZalo
|
|
3225
|
+
provider: isZalo
|
|
3226
|
+
? 'Zalo'
|
|
3227
|
+
: isSMS
|
|
3228
|
+
? 'SMS'
|
|
3229
|
+
: isWhatsApp
|
|
3230
|
+
? 'WhatsApp'
|
|
3231
|
+
: isEmail
|
|
3232
|
+
? 'Email'
|
|
3233
|
+
: '',
|
|
2960
3234
|
},
|
|
2961
3235
|
});
|
|
2962
3236
|
}
|
|
@@ -2984,6 +3258,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2984
3258
|
const needPass = (flowData.method === 'email' ||
|
|
2985
3259
|
flowData.method === 'zalo' ||
|
|
2986
3260
|
flowData.method === 'sms' ||
|
|
3261
|
+
flowData.method === 'whatsapp' ||
|
|
2987
3262
|
flowData.method === 'phone' ||
|
|
2988
3263
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'email' ||
|
|
2989
3264
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'phone') &&
|
|
@@ -3024,13 +3299,12 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3024
3299
|
}
|
|
3025
3300
|
setLoading(false);
|
|
3026
3301
|
});
|
|
3027
|
-
const
|
|
3302
|
+
const swapAnotherMethod = (newType) => __awaiter(void 0, void 0, void 0, function* () {
|
|
3028
3303
|
if (isEmail)
|
|
3029
3304
|
return;
|
|
3030
3305
|
setLoading(true);
|
|
3031
3306
|
try {
|
|
3032
3307
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
3033
|
-
const newType = otpType === 'phone-sms' ? 'phone-zalo' : 'phone-sms';
|
|
3034
3308
|
let res;
|
|
3035
3309
|
if (isUpdatePhone) {
|
|
3036
3310
|
if (newType === 'phone-sms') {
|
|
@@ -3039,6 +3313,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3039
3313
|
else if (newType === 'phone-zalo') {
|
|
3040
3314
|
res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
3041
3315
|
}
|
|
3316
|
+
else if (newType === 'phone-whatsapp') {
|
|
3317
|
+
res = yield resendUpdatePhoneWhatsAppOTP(phoneNumber, areaCode);
|
|
3318
|
+
}
|
|
3042
3319
|
}
|
|
3043
3320
|
else {
|
|
3044
3321
|
if (newType === 'phone-sms') {
|
|
@@ -3047,6 +3324,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3047
3324
|
else if (newType === 'phone-zalo') {
|
|
3048
3325
|
res = yield resendZaloOTP(phoneNumber, areaCode);
|
|
3049
3326
|
}
|
|
3327
|
+
else if (newType === 'phone-whatsapp') {
|
|
3328
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
3329
|
+
}
|
|
3050
3330
|
}
|
|
3051
3331
|
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
3052
3332
|
setError(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
@@ -3096,7 +3376,13 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3096
3376
|
: 'ssov2.otp.phone.description', {
|
|
3097
3377
|
email,
|
|
3098
3378
|
phone,
|
|
3099
|
-
method:
|
|
3379
|
+
method: isSMS
|
|
3380
|
+
? 'SMS'
|
|
3381
|
+
: isZalo
|
|
3382
|
+
? 'Zalo'
|
|
3383
|
+
: isWhatsApp
|
|
3384
|
+
? 'WhatsApp'
|
|
3385
|
+
: '',
|
|
3100
3386
|
}),
|
|
3101
3387
|
} }))),
|
|
3102
3388
|
React__default.createElement(Stack, { mt: 24, spacing: 8 },
|
|
@@ -3126,9 +3412,16 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3126
3412
|
count: resendTime,
|
|
3127
3413
|
})))),
|
|
3128
3414
|
React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue", ref: submitButtonRef }, t('ssov2.button.continue')),
|
|
3129
|
-
!isEmail && (React__default.createElement(
|
|
3130
|
-
|
|
3131
|
-
|
|
3415
|
+
!isEmail && (React__default.createElement(React__default.Fragment, null,
|
|
3416
|
+
isFeatureWhatsAppEnabled && (React__default.createElement(Button, { size: "sm", variant: "white", mt: 12, fullWidth: true, onClick: () => swapAnotherMethod('phone-whatsapp'), loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Send OTP Code via WhatsApp", display: !isWhatsApp ? 'block' : 'none', leftIcon: React__default.createElement(WhatsApp, null), style: { fontWeight: 400 }, color: "#595959" }, t('ssov2.otp.sendVia', {
|
|
3417
|
+
method: 'WhatsApp',
|
|
3418
|
+
}))),
|
|
3419
|
+
isFeatureZaloEnabled && (React__default.createElement(Button, { size: "sm", variant: "white", mt: 12, fullWidth: true, onClick: () => swapAnotherMethod('phone-zalo'), loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Send OTP Code via Zalo", display: !isZalo ? 'block' : 'none', leftIcon: React__default.createElement(Zalo, null), style: { fontWeight: 400 }, color: "#595959" }, t('ssov2.otp.sendVia', {
|
|
3420
|
+
method: 'Zalo',
|
|
3421
|
+
}))),
|
|
3422
|
+
isFeatureSMSEnabled && (React__default.createElement(Button, { size: "sm", variant: "white", mt: 12, fullWidth: true, onClick: () => swapAnotherMethod('phone-sms'), loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Send OTP Code via SMS", display: !isSMS ? 'block' : 'none', leftIcon: React__default.createElement(ReplySquare, { size: 18 }), style: { fontWeight: 400 }, color: "#595959" }, t('ssov2.otp.sendVia', {
|
|
3423
|
+
method: 'SMS',
|
|
3424
|
+
})))))));
|
|
3132
3425
|
};
|
|
3133
3426
|
|
|
3134
3427
|
const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
@@ -3282,7 +3575,7 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3282
3575
|
t('ssov2.password.title2')),
|
|
3283
3576
|
React__default.createElement(Text, { size: "p4" }, t('ssov2.password.description'))),
|
|
3284
3577
|
React__default.createElement(Stack, { mt: 24, spacing: 8 },
|
|
3285
|
-
React__default.createElement(PasswordInput, { name: "password", placeholder:
|
|
3578
|
+
React__default.createElement(PasswordInput, { name: "password", placeholder: t('ssov2.passwordForgotSetup.field.password.placeholder'), error: errMsg || undefined, onChange: () => setErrMsg(''), disabled: loading, required: true, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Password" }),
|
|
3286
3579
|
React__default.createElement(Group, { spacing: 8, align: "center", style: {
|
|
3287
3580
|
height: 40,
|
|
3288
3581
|
} },
|
|
@@ -3301,6 +3594,7 @@ const SetupLater = ({ style = {} }) => {
|
|
|
3301
3594
|
const { currentStepIndex, steps, addStep, goNext } = useSSOSteps();
|
|
3302
3595
|
const currentStep = steps[currentStepIndex];
|
|
3303
3596
|
const onClickSetupLater = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3597
|
+
var _a;
|
|
3304
3598
|
if (loading)
|
|
3305
3599
|
return;
|
|
3306
3600
|
setLoading(true);
|
|
@@ -3309,7 +3603,9 @@ const SetupLater = ({ style = {} }) => {
|
|
|
3309
3603
|
((currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.VERIFY_PHONE ||
|
|
3310
3604
|
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.FORGOT_PASSWORD_PHONE)) {
|
|
3311
3605
|
addStep({
|
|
3312
|
-
type:
|
|
3606
|
+
type: ((_a = currentStep.config) === null || _a === void 0 ? void 0 : _a.afterAction) === 'update-email'
|
|
3607
|
+
? SSOStepTypeType.UPDATE_EMAIL
|
|
3608
|
+
: SSOStepTypeType.SETUP_FULL,
|
|
3313
3609
|
config: {
|
|
3314
3610
|
userInfo,
|
|
3315
3611
|
},
|
|
@@ -3328,7 +3624,8 @@ const SetupLater = ({ style = {} }) => {
|
|
|
3328
3624
|
goNext();
|
|
3329
3625
|
}
|
|
3330
3626
|
else {
|
|
3331
|
-
|
|
3627
|
+
const isResetPasswordFlow = isResetPasswordViePhoneFlowFn(steps);
|
|
3628
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(!isResetPasswordFlow);
|
|
3332
3629
|
}
|
|
3333
3630
|
setLoading(false);
|
|
3334
3631
|
});
|
|
@@ -3355,7 +3652,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3355
3652
|
}, [hidden]);
|
|
3356
3653
|
const [loading, setLoading] = React__default.useState(false);
|
|
3357
3654
|
const { addStep, goNext } = useSSOSteps();
|
|
3358
|
-
const
|
|
3655
|
+
const onClickContinueWhatsApp = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3359
3656
|
var _a, _b;
|
|
3360
3657
|
setLoading(true);
|
|
3361
3658
|
try {
|
|
@@ -3368,6 +3665,49 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3368
3665
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3369
3666
|
let res;
|
|
3370
3667
|
if (!((_a = userExist._data) === null || _a === void 0 ? void 0 : _a.provider)) {
|
|
3668
|
+
res = yield registerBySendWhatsAppOTP(phoneNumber, areaCode);
|
|
3669
|
+
}
|
|
3670
|
+
else {
|
|
3671
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
3672
|
+
}
|
|
3673
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
3674
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3675
|
+
return setLoading(false);
|
|
3676
|
+
}
|
|
3677
|
+
addStep({
|
|
3678
|
+
type: SSOStepTypeType.OTP,
|
|
3679
|
+
config: {
|
|
3680
|
+
phone,
|
|
3681
|
+
otpType: 'phone-whatsapp',
|
|
3682
|
+
afterAction: config.afterAction || 'forgot',
|
|
3683
|
+
provider: (_b = userExist._data) === null || _b === void 0 ? void 0 : _b.provider,
|
|
3684
|
+
},
|
|
3685
|
+
});
|
|
3686
|
+
goNext();
|
|
3687
|
+
}
|
|
3688
|
+
else {
|
|
3689
|
+
setErrMsg(getErrorTextFromCode(t, userExist === null || userExist === void 0 ? void 0 : userExist.code));
|
|
3690
|
+
}
|
|
3691
|
+
}
|
|
3692
|
+
catch (e) {
|
|
3693
|
+
console.error(e);
|
|
3694
|
+
setErrMsg(getErrorTextFromCode(t, ''));
|
|
3695
|
+
}
|
|
3696
|
+
setLoading(false);
|
|
3697
|
+
});
|
|
3698
|
+
const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3699
|
+
var _c, _d;
|
|
3700
|
+
setLoading(true);
|
|
3701
|
+
try {
|
|
3702
|
+
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
3703
|
+
if (!areaCode || !phoneNumber || !phone) {
|
|
3704
|
+
setErrMsg(t('ssov2.validate.phone.required'));
|
|
3705
|
+
return setLoading(false);
|
|
3706
|
+
}
|
|
3707
|
+
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
3708
|
+
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3709
|
+
let res;
|
|
3710
|
+
if (!((_c = userExist._data) === null || _c === void 0 ? void 0 : _c.provider)) {
|
|
3371
3711
|
res = yield registerBySendZaloOTP(phoneNumber, areaCode);
|
|
3372
3712
|
}
|
|
3373
3713
|
else {
|
|
@@ -3383,7 +3723,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3383
3723
|
phone,
|
|
3384
3724
|
otpType: 'phone-zalo',
|
|
3385
3725
|
afterAction: config.afterAction || 'forgot',
|
|
3386
|
-
provider: (
|
|
3726
|
+
provider: (_d = userExist._data) === null || _d === void 0 ? void 0 : _d.provider,
|
|
3387
3727
|
},
|
|
3388
3728
|
});
|
|
3389
3729
|
goNext();
|
|
@@ -3399,7 +3739,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3399
3739
|
setLoading(false);
|
|
3400
3740
|
});
|
|
3401
3741
|
const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3402
|
-
var
|
|
3742
|
+
var _e, _f;
|
|
3403
3743
|
setLoading(true);
|
|
3404
3744
|
try {
|
|
3405
3745
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
@@ -3410,7 +3750,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3410
3750
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
3411
3751
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3412
3752
|
let res;
|
|
3413
|
-
if (!((
|
|
3753
|
+
if (!((_e = userExist._data) === null || _e === void 0 ? void 0 : _e.provider)) {
|
|
3414
3754
|
res = yield registerBySendPhoneOTP(phoneNumber, areaCode);
|
|
3415
3755
|
}
|
|
3416
3756
|
else {
|
|
@@ -3426,7 +3766,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3426
3766
|
phone,
|
|
3427
3767
|
otpType: 'phone-sms',
|
|
3428
3768
|
afterAction: config.afterAction || 'forgot',
|
|
3429
|
-
provider: (
|
|
3769
|
+
provider: (_f = userExist._data) === null || _f === void 0 ? void 0 : _f.provider,
|
|
3430
3770
|
},
|
|
3431
3771
|
});
|
|
3432
3772
|
goNext();
|
|
@@ -3460,8 +3800,9 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3460
3800
|
};
|
|
3461
3801
|
}, []) }),
|
|
3462
3802
|
errMsg && (React__default.createElement(Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
|
|
3463
|
-
React__default.createElement(Button, { size: "lg", variant: "primary", onClick:
|
|
3464
|
-
React__default.createElement(Button, { size: "
|
|
3803
|
+
isFeatureWhatsAppEnabled && (React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueWhatsApp, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with WhatsApp", leftIcon: React__default.createElement(WhatsApp, null), color: "#00B16A" }, t('ssov2.button.continueWhatsApp'))),
|
|
3804
|
+
isFeatureZaloEnabled && (React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo", leftIcon: React__default.createElement(Zalo, null) }, t('ssov2.button.continueZalo'))),
|
|
3805
|
+
isFeatureSMSEnabled && (React__default.createElement(Button, { size: "sm", variant: "white", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS", style: { fontWeight: 400 }, color: "#595959", leftIcon: React__default.createElement(ReplySquare, { size: 18 }) }, t('ssov2.button.continueSMS'))),
|
|
3465
3806
|
React__default.createElement(SetupLater, null))));
|
|
3466
3807
|
};
|
|
3467
3808
|
|
|
@@ -3490,12 +3831,12 @@ const SSOPasswordWithConfirm = (_a) => {
|
|
|
3490
3831
|
form.values.confirmPassword && form.validateField('confirmPassword');
|
|
3491
3832
|
}, disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Password" })),
|
|
3492
3833
|
React__default.createElement(Stack, { spacing: 8 },
|
|
3493
|
-
React__default.createElement(Group, { spacing: 4, align: "
|
|
3834
|
+
React__default.createElement(Group, { spacing: 4, align: "flex-start" },
|
|
3494
3835
|
atLeast8Chars ? (React__default.createElement(CheckGreenIcon, null)) : typeof atLeast8Chars === 'undefined' ? (React__default.createElement(CheckGrayIcon, null)) : (React__default.createElement(CheckRedIcon, null)),
|
|
3495
|
-
React__default.createElement(Text, { size: "n1" }, t('ssov2.passwordForgotSetup.field.password.atLeast8Chars'))),
|
|
3496
|
-
React__default.createElement(Group, { spacing: 4, align: "
|
|
3836
|
+
React__default.createElement(Text, { size: "n1", style: { flex: 1 } }, t('ssov2.passwordForgotSetup.field.password.atLeast8Chars'))),
|
|
3837
|
+
React__default.createElement(Group, { spacing: 4, align: "flex-start" },
|
|
3497
3838
|
atLeastOneUpper ? (React__default.createElement(CheckGreenIcon, null)) : typeof atLeastOneUpper === 'undefined' ? (React__default.createElement(CheckGrayIcon, null)) : (React__default.createElement(CheckRedIcon, null)),
|
|
3498
|
-
React__default.createElement(Text, { size: "n1" }, t('ssov2.passwordForgotSetup.field.password.atLeastOneUpper')))),
|
|
3839
|
+
React__default.createElement(Text, { size: "n1", style: { flex: 1 } }, t('ssov2.passwordForgotSetup.field.password.atLeastOneUpper')))),
|
|
3499
3840
|
React__default.createElement(PasswordInput, Object.assign({ name: "confirm-password", placeholder: t('ssov2.passwordForgotSetup.field.passwordConfirm.placeholder'), label: t('ssov2.passwordForgotSetup.field.passwordConfirm.label'), required: true, withAsterisk: true, disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Confirm Password" }, form.getInputProps('confirmPassword')))));
|
|
3500
3841
|
};
|
|
3501
3842
|
|
|
@@ -3755,6 +4096,48 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3755
4096
|
}
|
|
3756
4097
|
setLoading(false);
|
|
3757
4098
|
});
|
|
4099
|
+
const onClickContinueWhatsApp = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
4100
|
+
setLoading(true);
|
|
4101
|
+
try {
|
|
4102
|
+
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
4103
|
+
if (!areaCode || !phoneNumber || !phone) {
|
|
4104
|
+
setErrMsg(t('ssov2.validate.phone.required'));
|
|
4105
|
+
return setLoading(false);
|
|
4106
|
+
}
|
|
4107
|
+
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
4108
|
+
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
4109
|
+
if (!userExist._data) {
|
|
4110
|
+
const res = yield resendUpdatePhoneWhatsAppOTP(phoneNumber, areaCode);
|
|
4111
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
4112
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
4113
|
+
return setLoading(false);
|
|
4114
|
+
}
|
|
4115
|
+
addStep({
|
|
4116
|
+
type: SSOStepTypeType.OTP,
|
|
4117
|
+
config: {
|
|
4118
|
+
provider,
|
|
4119
|
+
phone,
|
|
4120
|
+
otpType: 'phone-whatsapp',
|
|
4121
|
+
isUpdatePhone: true,
|
|
4122
|
+
afterAction: afterAction || 'setup',
|
|
4123
|
+
},
|
|
4124
|
+
});
|
|
4125
|
+
goNext();
|
|
4126
|
+
}
|
|
4127
|
+
else {
|
|
4128
|
+
setErrMsg(t('ssov2.phone.alreadyUsed'));
|
|
4129
|
+
}
|
|
4130
|
+
}
|
|
4131
|
+
else {
|
|
4132
|
+
setErrMsg(getErrorTextFromCode(t, userExist === null || userExist === void 0 ? void 0 : userExist.code));
|
|
4133
|
+
}
|
|
4134
|
+
}
|
|
4135
|
+
catch (e) {
|
|
4136
|
+
console.log(e);
|
|
4137
|
+
setErrMsg(getErrorTextFromCode(t, ''));
|
|
4138
|
+
}
|
|
4139
|
+
setLoading(false);
|
|
4140
|
+
});
|
|
3758
4141
|
return (React__default.createElement("div", { style: {
|
|
3759
4142
|
display: hidden ? 'none' : 'block',
|
|
3760
4143
|
} },
|
|
@@ -3776,8 +4159,9 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3776
4159
|
'data-event-category': trackingCategory,
|
|
3777
4160
|
};
|
|
3778
4161
|
}, []) })),
|
|
3779
|
-
React__default.createElement(Button, { size: "lg", variant: "primary", onClick:
|
|
3780
|
-
React__default.createElement(Button, { size: "
|
|
4162
|
+
isFeatureWhatsAppEnabled && (React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueWhatsApp, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with WhatsApp", leftIcon: React__default.createElement(WhatsApp, null), color: "#00B16A" }, t('ssov2.button.continueWhatsApp'))),
|
|
4163
|
+
isFeatureZaloEnabled && (React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo", leftIcon: React__default.createElement(Zalo, null) }, t('ssov2.button.continueZalo'))),
|
|
4164
|
+
isFeatureSMSEnabled && (React__default.createElement(Button, { size: "sm", variant: "white", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS", style: { fontWeight: 400 }, color: "#595959", leftIcon: React__default.createElement(ReplySquare, { size: 18 }) }, t('ssov2.button.continueSMS'))),
|
|
3781
4165
|
source !== 'care_onboarding' && source !== 'ecom' && React__default.createElement(SetupLater, null)))));
|
|
3782
4166
|
};
|
|
3783
4167
|
|
|
@@ -3858,7 +4242,7 @@ loading, tracking, }) => {
|
|
|
3858
4242
|
return;
|
|
3859
4243
|
form.getInputProps('dob').onBlur(e);
|
|
3860
4244
|
} })),
|
|
3861
|
-
needEmail && (React__default.createElement(Input, Object.assign({ name: "email", type: "email", label: t('ssov2.setup.field.email.label'), disabled: isEmailDisable || loading, required:
|
|
4245
|
+
needEmail && (React__default.createElement(Input, Object.assign({ name: "email", type: "email", label: t('ssov2.setup.field.email.label'), disabled: isEmailDisable || loading, required: ['care', 'ecom', 'community'].includes(setupSource), withAsterisk: ['care', 'ecom', 'community'].includes(setupSource), "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Email", style: {
|
|
3862
4246
|
display: isEmailDisable ? 'none' : 'block',
|
|
3863
4247
|
} }, form.getInputProps('email'))))));
|
|
3864
4248
|
};
|
|
@@ -3919,6 +4303,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3919
4303
|
undefined;
|
|
3920
4304
|
const needEmail = setupSource === 'care' ||
|
|
3921
4305
|
setupSource === 'ecom' ||
|
|
4306
|
+
setupSource === 'community' ||
|
|
3922
4307
|
!(flowData === null || flowData === void 0 ? void 0 : flowData.isVerifyPhone) ||
|
|
3923
4308
|
authMethod === 'facebook' ||
|
|
3924
4309
|
provider === 'facebook';
|
|
@@ -4100,7 +4485,7 @@ const SSOUpdateEmailScreen = ({ hidden, }) => {
|
|
|
4100
4485
|
React__default.createElement(Stack, { spacing: 8 },
|
|
4101
4486
|
React__default.createElement(Text, { size: "s1", weight: "semiBold" }, t('ssov2.updateEmail.title')),
|
|
4102
4487
|
React__default.createElement(Text, { size: "p4" }, t('ssov2.updateEmail.description'))),
|
|
4103
|
-
React__default.createElement(Input, { name: "email", placeholder:
|
|
4488
|
+
React__default.createElement(Input, { name: "email", placeholder: t('onboarding.formEmail.yourEmail'), error: errMsg || undefined, type: "email", required: true, mt: 24, onChange: () => setErrMsg(''), disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Email" }),
|
|
4104
4489
|
React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, mt: 16, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Verify Your Email" }, t('ssov2.updateEmail.button'))));
|
|
4105
4490
|
};
|
|
4106
4491
|
|
|
@@ -4150,7 +4535,7 @@ if (!String.prototype.capitalize) {
|
|
|
4150
4535
|
};
|
|
4151
4536
|
}
|
|
4152
4537
|
const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
4153
|
-
const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, forceReloadOnClose, } = useSSOV2Store();
|
|
4538
|
+
const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, forceReloadOnClose, setABTestFlow, } = useSSOV2Store();
|
|
4154
4539
|
useEffect(() => {
|
|
4155
4540
|
setMounted(true);
|
|
4156
4541
|
return () => {
|
|
@@ -4168,6 +4553,37 @@ const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
|
4168
4553
|
useEffect(() => {
|
|
4169
4554
|
setOnCloseProp(onCloseProps);
|
|
4170
4555
|
}, [onCloseProps]);
|
|
4556
|
+
useEffect(() => {
|
|
4557
|
+
const site = MAP_DOMAIN_BY_LOCALE[locale];
|
|
4558
|
+
const previousABTestingFlow = getCookie('abTestingFlow');
|
|
4559
|
+
fetchFeatureFlag(site).then((data) => {
|
|
4560
|
+
if (data.is_enabled) {
|
|
4561
|
+
if (previousABTestingFlow) {
|
|
4562
|
+
setABTestFlow(previousABTestingFlow);
|
|
4563
|
+
}
|
|
4564
|
+
else {
|
|
4565
|
+
const randomBetween100Percent = Math.floor(Math.random() * 100 + 1);
|
|
4566
|
+
const aFlow = data.a_percentage;
|
|
4567
|
+
console.log('randomBetween100Percent', randomBetween100Percent);
|
|
4568
|
+
if (randomBetween100Percent <= aFlow) {
|
|
4569
|
+
setCookie('abTestingFlow', 'A', {
|
|
4570
|
+
days: 30,
|
|
4571
|
+
});
|
|
4572
|
+
setABTestFlow('A');
|
|
4573
|
+
}
|
|
4574
|
+
else {
|
|
4575
|
+
setCookie('abTestingFlow', 'B', {
|
|
4576
|
+
days: 30,
|
|
4577
|
+
});
|
|
4578
|
+
setABTestFlow('B');
|
|
4579
|
+
}
|
|
4580
|
+
}
|
|
4581
|
+
}
|
|
4582
|
+
else {
|
|
4583
|
+
deleteCookie('abTestingFlow');
|
|
4584
|
+
}
|
|
4585
|
+
});
|
|
4586
|
+
}, [locale]);
|
|
4171
4587
|
if (!isOpen) {
|
|
4172
4588
|
return null;
|
|
4173
4589
|
}
|