@hhgtech/hhg-components 1.29.332 → 1.29.334-beta-1
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-f1221bad.js → LastPeriod-b829cab9.js} +1 -1
- package/build/{MobileBottomNavigationIcon-0770acc1.js → MobileBottomNavigationIcon-57554ccb.js} +3 -3
- package/build/{Spinner-7719819a.js → Spinner-4f558116.js} +1 -1
- package/build/{WhatsApp-d2628e6a.js → WhatsApp-af0830fe.js} +1 -1
- package/build/adapters.js +19 -19
- package/build/atoms.js +49 -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/adapters/button/index.d.ts +3 -1
- package/build/components/atoms/drawerComponent/index.d.ts +8 -0
- package/build/components/atoms/drawerComponent/index.styled.d.ts +7 -0
- package/build/components/atoms/googleLocation/index.d.ts +7 -0
- package/build/components/atoms/index.d.ts +1 -0
- 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 +134 -131
- package/build/{constants-38e0dd27.js → constants-bbcf29ec.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-6554e5d3.js → core-ceaaff44.js} +1 -1
- package/build/{dataTransform-bb9d60c1.js → dataTransform-744c0776.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-07b39f82.js → editor-64f2bf27.js} +12 -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-3e7641e1.js → LastPeriod-fd5114dd.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-77a6e5d1.js → MobileBottomNavigationIcon-4e0fbb01.js} +3 -3
- package/build/esm/{Spinner-4cc30c73.js → Spinner-912c6f34.js} +1 -1
- package/build/esm/{WhatsApp-ec0a8966.js → WhatsApp-f2d8fb5b.js} +1 -1
- package/build/esm/adapters.js +19 -19
- package/build/esm/atoms.js +48 -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/adapters/button/index.d.ts +3 -1
- package/build/esm/components/atoms/drawerComponent/index.d.ts +8 -0
- package/build/esm/components/atoms/drawerComponent/index.styled.d.ts +7 -0
- package/build/esm/components/atoms/googleLocation/index.d.ts +7 -0
- package/build/esm/components/atoms/index.d.ts +1 -0
- 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 +92 -90
- package/build/esm/{constants-6f9893fd.js → constants-09521ace.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-ab886886.js → core-56dc0f05.js} +1 -1
- package/build/esm/{dataTransform-f75c268c.js → dataTransform-e01a7da8.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-1449176b.js → editor-30eaf984.js} +12 -12
- 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/usePlacesAutocomplete.d.ts +2 -0
- package/build/esm/hooks.js +13 -13
- package/build/esm/i18n/translationKeys.d.ts +1 -1
- package/build/esm/i18n-values/en-PH.js +16 -1
- package/build/esm/i18n-values/hi-IN.js +16 -1
- package/build/esm/i18n-values/id-ID.js +16 -1
- package/build/esm/i18n-values/km-KH.js +20 -5
- package/build/esm/i18n-values/ms-MY.js +16 -1
- package/build/esm/i18n-values/my-MM.js +16 -1
- package/build/esm/i18n-values/th-TH.js +16 -1
- package/build/esm/i18n-values/tl-PH.js +15 -0
- package/build/esm/i18n-values/vi-VN.js +18 -3
- package/build/esm/i18n-values/vi-VN_MB.js +17 -2
- package/build/esm/i18n-values/zh-TW.js +16 -1
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/icons/ChatbotBg.d.ts +4 -0
- package/build/esm/icons/Search.d.ts +4 -0
- package/build/esm/icons/index.d.ts +5 -3
- package/build/esm/{index-9f09e594.js → index-01b0835c.js} +20 -20
- package/build/esm/{index-340baab5.js → index-02d06202.js} +1 -1
- package/build/esm/{index-551006c8.js → index-114de66f.js} +15 -15
- package/build/esm/{index-cf7a91f6.js → index-11d07def.js} +2 -2
- package/build/esm/{index-ffd06730.js → index-1b3d0fb7.js} +13 -13
- package/build/esm/{index-553c50fe.js → index-262b1416.js} +2 -2
- package/build/esm/{index-c66fecf7.js → index-26e9ffe8.js} +6 -6
- package/build/esm/{index-598e5fc5.js → index-2a882430.js} +24 -24
- package/build/esm/{index-b862cd16.js → index-2ae8c1c0.js} +14 -14
- package/build/esm/{index-1b8bee31.js → index-34400a59.js} +2 -2
- package/build/esm/{index-9d368a52.js → index-363f17cf.js} +21 -21
- package/build/esm/{index-38378d3d.js → index-36bec6bb.js} +3 -3
- package/build/esm/{index-8d9be31d.js → index-37fb0987.js} +13 -13
- package/build/esm/{index-85de8bc8.js → index-386e43b1.js} +13 -13
- package/build/esm/{index-36987931.js → index-3992c8d4.js} +17 -17
- package/build/esm/{index-f553164d.js → index-3a8b29b4.js} +3 -3
- package/build/esm/{index-c55fb0c7.js → index-3b662cf8.js} +5 -5
- package/build/esm/{index-e68cca13.js → index-3e4223fe.js} +10 -10
- package/build/esm/{index-d15a459d.js → index-44932361.js} +17 -17
- package/build/esm/{index-be936e72.js → index-4d6b5301.js} +2 -2
- package/build/esm/{index-123655ef.js → index-50127890.js} +2 -2
- package/build/esm/{index-2f65032f.js → index-5acd728d.js} +6 -6
- package/build/esm/{index-db7f7f08.js → index-60bcab63.js} +1 -1
- package/build/esm/{index-13293188.js → index-6245b66b.js} +2 -2
- package/build/esm/{index-815dc140.js → index-662db5b7.js} +24 -24
- package/build/esm/{index-2a338d3f.js → index-663f72f5.js} +3 -3
- package/build/esm/{index-1da6b8c4.js → index-6a7614d1.js} +7 -7
- package/build/esm/{index-e975529a.js → index-6c5a0c74.js} +2 -2
- package/build/esm/index-6cf33c17.js +4013 -0
- package/build/esm/{index-230adb31.js → index-6fa5ac76.js} +3 -3
- package/build/esm/{index-9c14c4af.js → index-7418a32c.js} +2 -2
- package/build/esm/index-77225364.js +96 -0
- package/build/esm/{index-d7ffec42.js → index-7908e4ff.js} +16 -16
- package/build/esm/{index-587dca1f.js → index-7ed54614.js} +30 -30
- package/build/esm/{index-0982a002.js → index-7fee70e4.js} +3 -3
- package/build/esm/{index-0668f85c.js → index-813b32e4.js} +17 -17
- package/build/esm/{index-737db3be.js → index-81772684.js} +2 -2
- package/build/esm/{index-452968eb.js → index-89269f7e.js} +2 -2
- package/build/esm/{index-9eafbe6c.js → index-8dccb669.js} +18 -18
- package/build/esm/{index-945d5a71.js → index-915183b3.js} +1 -1
- package/build/esm/{index-c4b63c56.js → index-98ef5263.js} +3 -3
- package/build/esm/{index-521c6a0c.js → index-993de4d6.js} +13 -13
- package/build/esm/{index-3330a1a5.js → index-99655cbc.js} +2 -2
- package/build/esm/{index-cbe8ec85.js → index-9ab041aa.js} +1 -1
- package/build/esm/{index-eff9f904.js → index-a38d2351.js} +16 -16
- package/build/esm/{index-1853a9de.js → index-bb193a95.js} +1 -1
- package/build/esm/{index-bd313745.js → index-bd17eb4a.js} +18 -24
- package/build/esm/{index-cb6671de.js → index-c2325b70.js} +32 -32
- package/build/esm/{index-b87a8b69.js → index-cb0a2c0d.js} +7 -7
- package/build/esm/{index-5a1e82b3.js → index-cff2c593.js} +5 -5
- package/build/esm/{index-e9816b31.js → index-d53bf495.js} +15 -15
- package/build/esm/{index-1e12ffe2.js → index-d57214b0.js} +23 -13
- package/build/esm/{index-7052c7b0.js → index-db606269.js} +1 -1
- package/build/esm/{index-8d9e3179.js → index-dcb2ecbc.js} +2 -2
- package/build/esm/{index-3e8b2ccd.js → index-df46e084.js} +3 -3
- package/build/esm/{index-b8ca6394.js → index-e1ef9807.js} +2 -2
- package/build/esm/{index-94c25537.js → index-e422ad02.js} +1 -1
- package/build/esm/{index-79909b08.js → index-e47632c4.js} +4 -4
- package/build/esm/{index-526f2b6c.js → index-e9bc7d35.js} +16 -16
- package/build/esm/{index-2910ca55.js → index-eca43394.js} +16 -16
- package/build/esm/{index-adff8c44.js → index-ef1106eb.js} +6 -6
- package/build/esm/{index-bc0971ee.js → index-f8daa1b0.js} +1 -1
- package/build/esm/index.css +1 -1
- package/build/esm/index.js +146 -117
- package/build/esm/{labelSorting-cfc7acbd.js → labelSorting-7f70ac1e.js} +4 -4
- package/build/esm/lead/components/context.d.ts +2 -0
- package/build/esm/lead/components/index.d.ts +4 -2
- package/build/esm/lead/index.d.ts +1 -1
- package/build/esm/lead/layouts/ emptyIcon.d.ts +6 -0
- package/build/esm/lead/layouts/lightbox/fields/textField/index.d.ts +13 -0
- package/build/esm/lead/layouts/lightbox/fields/textField/index.styled.d.ts +11 -0
- package/build/esm/lead/layouts/lightbox/index.d.ts +4 -2
- package/build/esm/lead/newLeadPopup.d.ts +4 -2
- package/build/esm/lead.css +1 -1
- package/build/esm/lead.js +753 -350
- package/build/esm/{logoIcon-024fd614.js → logoIcon-b2e3b6df.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-f9bf3f6d.js → other-0db5dab2.js} +1 -0
- package/build/esm/{post-126f46d9.js → post-403e7563.js} +3 -3
- 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 +1 -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 +6 -0
- package/build/esm/ssoV2.js +580 -142
- package/build/esm/{store-937026d6.js → store-d1eca1fa.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-dddd60e0.js → surveyThankyouCard-1386cdb8.js} +5 -5
- package/build/esm/together/api/paths.d.ts +2 -0
- package/build/esm/together/api/utils.d.ts +3 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.d.ts +7 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.styled.d.ts +5 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.d.ts +15 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.styled.d.ts +13 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/index.d.ts +31 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styled.d.ts +9 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styles.d.ts +12 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.d.ts +11 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.styled.d.ts +17 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostDescription/editor.d.ts +21 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostDescription/index.d.ts +21 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostDescription/index.styled.d.ts +9 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostPhotos/index.d.ts +7 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostTitle/index.d.ts +11 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/createPostTitle/index.styled.d.ts +12 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/index.d.ts +27 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/index.styled.d.ts +33 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/postPhotosReview/index.d.ts +10 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styled.d.ts +5 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styles.d.ts +12 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/topicSelectList/index.d.ts +16 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/topicSelectList/index.styled.d.ts +5 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/type.d.ts +4 -0
- package/build/esm/together/components/molecules/createNewPostContentV2/types.d.ts +14 -0
- package/build/esm/together/components/molecules/index.d.ts +1 -0
- package/build/esm/together/components/molecules/postImagePreview/index.d.ts +2 -1
- package/build/esm/together/togetherComponentGlobalContext.d.ts +1 -0
- package/build/esm/together.js +53 -53
- package/build/esm/togetherApiPaths.js +4 -2
- 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 +11 -26
- package/build/esm/{treePopoverMenu-6d3392c6.js → treePopoverMenu-f031a29b.js} +19 -19
- package/build/esm/{types-787fdf6c.js → types-2fc793a8.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-a0fa12e8.js → useCategory-ad6a4d34.js} +5 -5
- package/build/esm/{useHealthToolCache-7cf19f32.js → useHealthToolCache-28a49075.js} +1 -1
- package/build/esm/{useMantineLocale-5fd08281.js → useMantineLocale-1c095a66.js} +6 -6
- package/build/esm/{usePlacesAutocomplete-c942413f.js → usePlacesAutocomplete-1e1bf12f.js} +2 -1
- package/build/esm/{useScreenSize-11bcbfcc.js → useScreenSize-3a80d6c1.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-af3e4870.js → utils-2c532973.js} +2 -2
- package/build/esm/{utils-8b70a691.js → utils-d0d4f26f.js} +2 -2
- package/build/esm/{utils-b417174f.js → utils-d3ab24c2.js} +13 -4
- 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/usePlacesAutocomplete.d.ts +2 -0
- package/build/hooks.js +13 -13
- package/build/i18n/translationKeys.d.ts +1 -1
- package/build/i18n-values/en-PH.js +16 -1
- package/build/i18n-values/hi-IN.js +16 -1
- package/build/i18n-values/id-ID.js +16 -1
- package/build/i18n-values/km-KH.js +20 -5
- package/build/i18n-values/ms-MY.js +16 -1
- package/build/i18n-values/my-MM.js +16 -1
- package/build/i18n-values/th-TH.js +16 -1
- package/build/i18n-values/tl-PH.js +15 -0
- package/build/i18n-values/vi-VN.js +18 -3
- package/build/i18n-values/vi-VN_MB.js +17 -2
- package/build/i18n-values/zh-TW.js +16 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/icons/ChatbotBg.d.ts +4 -0
- package/build/icons/Search.d.ts +4 -0
- package/build/icons/index.d.ts +5 -3
- package/build/{index-eb99216b.js → index-0130a454.js} +2 -2
- package/build/{index-7ea932b9.js → index-0b1c5835.js} +17 -17
- package/build/{index-9ff1bb36.js → index-14ae8248.js} +3 -3
- package/build/{index-8c16bd1f.js → index-15a499ed.js} +2 -2
- package/build/{index-3432b1c6.js → index-162cf5ec.js} +13 -13
- package/build/{index-c297b1f0.js → index-168cb23c.js} +20 -20
- package/build/{index-d1c81e81.js → index-193192d9.js} +1 -1
- package/build/{index-4fc7edb3.js → index-1a1895dc.js} +6 -6
- package/build/{index-18f346d7.js → index-235ee6a4.js} +1 -1
- package/build/{index-4bf4104b.js → index-24744e1d.js} +2 -2
- package/build/{index-3ebe1824.js → index-24ad1f42.js} +13 -13
- package/build/{index-e82361de.js → index-24dc48d7.js} +3 -3
- package/build/{index-ecd3b645.js → index-29a53d3c.js} +2 -2
- package/build/{index-cf29a8cb.js → index-38aa9aae.js} +1 -1
- package/build/{index-beeded5c.js → index-393e9124.js} +2 -2
- package/build/{index-4f94ee57.js → index-396aca20.js} +3 -3
- package/build/{index-9c5bf014.js → index-3ec47f62.js} +1 -1
- package/build/{index-49c62b30.js → index-40a47778.js} +10 -10
- package/build/{index-b664e501.js → index-48ead17e.js} +3 -3
- package/build/{index-1f6f7242.js → index-4c063acd.js} +6 -6
- package/build/{index-7b9dff6f.js → index-50394ff2.js} +16 -16
- package/build/{index-3af36119.js → index-591ad0ca.js} +1 -1
- package/build/{index-ccb74872.js → index-5d8baaf6.js} +1 -1
- package/build/{index-81a129cd.js → index-5ddf7e2d.js} +1 -1
- package/build/{index-a9c442d7.js → index-62fbd1d0.js} +2 -2
- package/build/{index-68f35f42.js → index-6ea74eeb.js} +24 -24
- package/build/{index-b0471cfe.js → index-7017d901.js} +5 -5
- package/build/{index-559021c0.js → index-7ca5e861.js} +3 -3
- package/build/{index-7a0d23fd.js → index-7d255c7b.js} +7 -7
- package/build/{index-0ef028da.js → index-7d868903.js} +3 -3
- package/build/{index-37407423.js → index-7dc1bc92.js} +2 -2
- package/build/{index-532b1cd6.js → index-814045ef.js} +2 -2
- package/build/{index-192e338c.js → index-82632b4a.js} +17 -17
- package/build/{index-145fe27d.js → index-8976b33e.js} +18 -18
- package/build/{index-0b869059.js → index-8e25c967.js} +2 -2
- package/build/{index-0c875dfb.js → index-94a58e2b.js} +17 -17
- package/build/{index-01d1fcca.js → index-997d3769.js} +3 -3
- package/build/{index-68d28651.js → index-9a11ed37.js} +32 -32
- package/build/{index-a8e7297d.js → index-9e9a9169.js} +15 -15
- package/build/{index-b4169dcd.js → index-9fb3018a.js} +18 -24
- package/build/{index-b6555da2.js → index-a2924e1e.js} +6 -6
- package/build/{index-2cfe485f.js → index-a9722b58.js} +4 -4
- package/build/{index-4e3d0ce7.js → index-aa89a022.js} +13 -13
- package/build/{index-f194fe0a.js → index-b0c5d4ef.js} +16 -16
- package/build/{index-31e8674f.js → index-b3e0585e.js} +23 -12
- package/build/{index-7a077f5a.js → index-b3fb752f.js} +16 -16
- package/build/{index-af7ec0fa.js → index-b51c88e2.js} +14 -14
- package/build/{index-cd1c7203.js → index-b5cd6a21.js} +5 -5
- package/build/{index-a336f953.js → index-b6847418.js} +2 -2
- package/build/index-c10d9832.js +4047 -0
- package/build/{index-d8846871.js → index-c5376e9c.js} +16 -16
- package/build/index-d699cb98.js +103 -0
- package/build/{index-cf488262.js → index-dc3ef09a.js} +2 -2
- package/build/{index-d4ff6de4.js → index-e294968d.js} +1 -1
- package/build/{index-08ed5b29.js → index-e8ad0b71.js} +30 -30
- package/build/{index-7097786d.js → index-e8b1a161.js} +15 -15
- package/build/{index-0f12f189.js → index-ec184323.js} +21 -21
- package/build/{index-b35e6f64.js → index-ec9f092e.js} +24 -24
- package/build/{index-02ceb781.js → index-ef816e26.js} +7 -7
- package/build/{index-e55fc286.js → index-f5666a40.js} +2 -2
- package/build/{index-64199471.js → index-f888f598.js} +13 -13
- package/build/{index-e3c1a688.js → index-fd3183da.js} +2 -2
- package/build/index.css +1 -1
- package/build/index.js +211 -178
- package/build/{labelSorting-59b40f42.js → labelSorting-469fb53d.js} +4 -4
- package/build/lead/components/context.d.ts +2 -0
- package/build/lead/components/index.d.ts +4 -2
- package/build/lead/index.d.ts +1 -1
- package/build/lead/layouts/ emptyIcon.d.ts +6 -0
- package/build/lead/layouts/lightbox/fields/textField/index.d.ts +13 -0
- package/build/lead/layouts/lightbox/fields/textField/index.styled.d.ts +11 -0
- package/build/lead/layouts/lightbox/index.d.ts +4 -2
- package/build/lead/newLeadPopup.d.ts +4 -2
- package/build/lead.css +1 -1
- package/build/lead.js +753 -349
- package/build/{logoIcon-07538b4d.js → logoIcon-f8693e15.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-8c01b366.js → other-50a0b3de.js} +1 -0
- package/build/{post-1e4e6b72.js → post-cd6c6c29.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 +1 -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 +6 -0
- package/build/ssoV2.js +591 -153
- package/build/{store-d0c4a5e4.js → store-a713b63a.js} +114 -8
- package/build/subot.js +32 -32
- package/build/surveyOrPremiumBanner.js +31 -31
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-93c2b9e1.js → surveyThankyouCard-80794b25.js} +5 -5
- package/build/together/api/paths.d.ts +2 -0
- package/build/together/api/utils.d.ts +3 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.d.ts +7 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.styled.d.ts +5 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.d.ts +15 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.styled.d.ts +13 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/index.d.ts +31 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styled.d.ts +9 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styles.d.ts +12 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.d.ts +11 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.styled.d.ts +17 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostDescription/editor.d.ts +21 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostDescription/index.d.ts +21 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostDescription/index.styled.d.ts +9 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostPhotos/index.d.ts +7 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostTitle/index.d.ts +11 -0
- package/build/together/components/molecules/createNewPostContentV2/createPostTitle/index.styled.d.ts +12 -0
- package/build/together/components/molecules/createNewPostContentV2/index.d.ts +27 -0
- package/build/together/components/molecules/createNewPostContentV2/index.styled.d.ts +33 -0
- package/build/together/components/molecules/createNewPostContentV2/postPhotosReview/index.d.ts +10 -0
- package/build/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styled.d.ts +5 -0
- package/build/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styles.d.ts +12 -0
- package/build/together/components/molecules/createNewPostContentV2/topicSelectList/index.d.ts +16 -0
- package/build/together/components/molecules/createNewPostContentV2/topicSelectList/index.styled.d.ts +5 -0
- package/build/together/components/molecules/createNewPostContentV2/type.d.ts +4 -0
- package/build/together/components/molecules/createNewPostContentV2/types.d.ts +14 -0
- package/build/together/components/molecules/index.d.ts +1 -0
- package/build/together/components/molecules/postImagePreview/index.d.ts +2 -1
- package/build/together/togetherComponentGlobalContext.d.ts +1 -0
- package/build/together.js +54 -53
- package/build/togetherApiPaths.js +4 -2
- package/build/togetherApiUtils.js +5 -4
- package/build/togetherAtoms.js +30 -30
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +49 -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 +11 -26
- package/build/{treePopoverMenu-9c6f299f.js → treePopoverMenu-889d80ba.js} +19 -19
- package/build/{types-98e7c3a2.js → types-0c05791e.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-7a1ab711.js → useCategory-55a423cc.js} +5 -5
- package/build/{useHealthToolCache-82b1911f.js → useHealthToolCache-84921b9b.js} +1 -1
- package/build/{useMantineLocale-d9ecaa5f.js → useMantineLocale-0cc2d977.js} +6 -6
- package/build/{usePlacesAutocomplete-67fa9759.js → usePlacesAutocomplete-07762c76.js} +2 -1
- package/build/{useScreenSize-b40e4305.js → useScreenSize-c85a7f01.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-4c1a6793.js → utils-44d3d6e7.js} +2 -2
- package/build/{utils-6761a983.js → utils-872abd64.js} +2 -2
- package/build/{utils-c69ec5e6.js → utils-c1ec3cc4.js} +13 -3
- package/build/vaccination.js +21 -21
- package/package.json +1 -1
- package/build/esm/index-c21e43f7.js +0 -1533
- package/build/index-1596c959.js +0 -1547
- /package/build/{BMI_BOYS.percentile.monthly-2f2f928d.js → BMI_BOYS.percentile.monthly-6337a2c7.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-7e24810c.js → BMI_BOYS.percentile.weekly-fa39b2e6.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-81f8dac9.js → BMI_BOYS.percentile.yearly-1eaf306b.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-a1363b20.js → BMI_BOYS.zscore.monthly-851088df.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-ba2583ff.js → BMI_BOYS.zscore.weekly-175cdc97.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-62c54183.js → BMI_BOYS.zscore.yearly-5937ecfa.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-98bfbad1.js → BMI_GIRLS.percentile.monthly-8073e552.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-036ea7b6.js → BMI_GIRLS.percentile.weekly-5c7a9b5f.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-23c106af.js → BMI_GIRLS.percentile.yearly-7462e3cf.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-b355926b.js → BMI_GIRLS.zscore.monthly-2e1abf01.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-7f660a6e.js → BMI_GIRLS.zscore.weekly-a27d90ae.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-dcd261ee.js → BMI_GIRLS.zscore.yearly-199d33bc.js} +0 -0
- /package/build/{ChevronDown-9d3d7b9c.js → ChevronDown-6646fd47.js} +0 -0
- /package/build/{Close-088d8ac5.js → Close-acfa8c86.js} +0 -0
- /package/build/{Google-25f7be94.js → Google-3e0ecf57.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-ffbc283d.js → HEAD CIRCUM_BOYS.percentile.monthly-c39e84b8.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-eb80ed27.js → HEAD CIRCUM_BOYS.percentile.weekly-17a9f67f.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-cfd524be.js → HEAD CIRCUM_BOYS.percentile.yearly-53db10b8.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-9c834e4c.js → HEAD CIRCUM_BOYS.zscore.monthly-9024b5f9.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-bf24e14d.js → HEAD CIRCUM_BOYS.zscore.weekly-93e16617.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-33244c0b.js → HEAD CIRCUM_BOYS.zscore.yearly-32adcfa6.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-2119f263.js → HEAD CIRCUM_GIRLS.percentile.monthly-4ee6667f.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-76f04daa.js → HEAD CIRCUM_GIRLS.percentile.weekly-ddf49204.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-80b14bf5.js → HEAD CIRCUM_GIRLS.percentile.yearly-6d6a8456.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-0dc71b80.js → HEAD CIRCUM_GIRLS.zscore.monthly-5de917f7.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-b179533a.js → HEAD CIRCUM_GIRLS.zscore.weekly-716eac35.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-6c2c43d7.js → HEAD CIRCUM_GIRLS.zscore.yearly-b6b319cb.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-fd53ff3a.js → HEIGHT_BOYS.percentile.monthly-0b9355cf.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-bea10e78.js → HEIGHT_BOYS.percentile.weekly-91f90514.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-d005441d.js → HEIGHT_BOYS.percentile.yearly-a6be39f1.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-d5871f7f.js → HEIGHT_BOYS.zscore.monthly-5c280bcc.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-c7a971d5.js → HEIGHT_BOYS.zscore.weekly-8892a3e2.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-e0daca1d.js → HEIGHT_BOYS.zscore.yearly-e22fdc89.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-16a28494.js → HEIGHT_GIRLS.percentile.monthly-203d80e4.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-f72c6498.js → HEIGHT_GIRLS.percentile.weekly-b70110c1.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-e639e06e.js → HEIGHT_GIRLS.percentile.yearly-4673ac32.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-49ee3f65.js → HEIGHT_GIRLS.zscore.monthly-04a15496.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-75b6db14.js → HEIGHT_GIRLS.zscore.weekly-f2a6e2f3.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-7f170e82.js → HEIGHT_GIRLS.zscore.yearly-146a83ba.js} +0 -0
- /package/build/{Locale-9d76089c.js → Locale-46500920.js} +0 -0
- /package/build/{Visible-f7357dea.js → Visible-b2ca2811.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-09c9209a.js → WEIGHT_BOYS.percentile.monthly-ce64c00f.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-13f6c1fa.js → WEIGHT_BOYS.percentile.weekly-d8b54060.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-cf517b5f.js → WEIGHT_BOYS.percentile.yearly-b1a691e5.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-3af2f51a.js → WEIGHT_BOYS.zscore.monthly-b8180ab3.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-ec101877.js → WEIGHT_BOYS.zscore.weekly-6efaa547.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-dd575af7.js → WEIGHT_BOYS.zscore.yearly-ff104f70.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-106e896d.js → WEIGHT_GIRLS.percentile.monthly-ffe5fb55.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-53154421.js → WEIGHT_GIRLS.percentile.weekly-7f9490d0.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-3e01a7ca.js → WEIGHT_GIRLS.percentile.yearly-99f26592.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-035a8445.js → WEIGHT_GIRLS.zscore.monthly-7ef27570.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-de0848cb.js → WEIGHT_GIRLS.zscore.weekly-4b489c3f.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-34e0310d.js → WEIGHT_GIRLS.zscore.yearly-25f8790b.js} +0 -0
- /package/build/{animation-b679f087.js → animation-ed541692.js} +0 -0
- /package/build/{constants-a9df2dc4.js → constants-3b2ad03d.js} +0 -0
- /package/build/{constants-c590c60e.js → constants-7fc2f0d3.js} +0 -0
- /package/build/{constants-1b37a00c.js → constants-eb2323ad.js} +0 -0
- /package/build/{dataTransform-946e1e43.js → dataTransform-ed9d25b3.js} +0 -0
- /package/build/{doctor-e7e731d5.js → doctor-45a98dfc.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-749f4ff1.js → BMI_BOYS.percentile.monthly-f2cf5eae.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-1b0d8d77.js → BMI_BOYS.percentile.weekly-0145a904.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-2d99a39a.js → BMI_BOYS.percentile.yearly-67c360ab.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-3aa69438.js → BMI_BOYS.zscore.monthly-4016078d.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-da93e931.js → BMI_BOYS.zscore.weekly-f40a0cf4.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-b0c89cae.js → BMI_BOYS.zscore.yearly-9784ed8c.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-92457f2e.js → BMI_GIRLS.percentile.monthly-bd8a858b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-73b416b8.js → BMI_GIRLS.percentile.weekly-0629c8ac.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-02cd164f.js → BMI_GIRLS.percentile.yearly-31ec01f4.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-43e43cfd.js → BMI_GIRLS.zscore.monthly-3c941b8a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-f4bfe5f4.js → BMI_GIRLS.zscore.weekly-67d9e952.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-6a2ad249.js → BMI_GIRLS.zscore.yearly-39bb1163.js} +0 -0
- /package/build/esm/{ChevronDown-b8d5b3a6.js → ChevronDown-0a237fe1.js} +0 -0
- /package/build/esm/{Close-29383bc8.js → Close-8ec53854.js} +0 -0
- /package/build/esm/{Google-8ccb1c86.js → Google-2abb6d1e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-6dcfff5c.js → HEAD CIRCUM_BOYS.percentile.monthly-5af4c0cf.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-ba419b4a.js → HEAD CIRCUM_BOYS.percentile.weekly-8b55aea6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-20a6e1d1.js → HEAD CIRCUM_BOYS.percentile.yearly-00c4cd86.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-8d4a3ac8.js → HEAD CIRCUM_BOYS.zscore.monthly-fa7f6d17.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-975f4471.js → HEAD CIRCUM_BOYS.zscore.weekly-412720ed.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-8ad8ad71.js → HEAD CIRCUM_BOYS.zscore.yearly-933cf312.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-71269cc3.js → HEAD CIRCUM_GIRLS.percentile.monthly-7dbd4c64.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-186275c1.js → HEAD CIRCUM_GIRLS.percentile.weekly-145fae5a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-ce02adcd.js → HEAD CIRCUM_GIRLS.percentile.yearly-ed8721c1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-ab37a6bd.js → HEAD CIRCUM_GIRLS.zscore.monthly-6270e769.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-1c138752.js → HEAD CIRCUM_GIRLS.zscore.weekly-68dfc85f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-e9f86886.js → HEAD CIRCUM_GIRLS.zscore.yearly-bad5818a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-34ed5c0d.js → HEIGHT_BOYS.percentile.monthly-409700e6.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-829700ee.js → HEIGHT_BOYS.percentile.weekly-a3239541.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-ec71a3fa.js → HEIGHT_BOYS.percentile.yearly-9b7c3292.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-8b4e2a97.js → HEIGHT_BOYS.zscore.monthly-384eb890.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-86b61e9a.js → HEIGHT_BOYS.zscore.weekly-f11a3f12.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-602fddbe.js → HEIGHT_BOYS.zscore.yearly-cf037809.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-d2ecb80e.js → HEIGHT_GIRLS.percentile.monthly-e6a77a33.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-a3f105d3.js → HEIGHT_GIRLS.percentile.weekly-dfd33b25.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-9f1734f2.js → HEIGHT_GIRLS.percentile.yearly-9c893db0.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-e44d78d7.js → HEIGHT_GIRLS.zscore.monthly-db8fff55.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-92a73070.js → HEIGHT_GIRLS.zscore.weekly-8698b559.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-9fbb071d.js → HEIGHT_GIRLS.zscore.yearly-a8818df0.js} +0 -0
- /package/build/esm/{Locale-22ec3908.js → Locale-00bfd7ae.js} +0 -0
- /package/build/esm/{Visible-bb919e6d.js → Visible-ea326bdf.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-0aa80f60.js → WEIGHT_BOYS.percentile.monthly-ed97a016.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-cd67b3db.js → WEIGHT_BOYS.percentile.weekly-52b2ba8f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-c424241d.js → WEIGHT_BOYS.percentile.yearly-938fb5ab.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-699042b7.js → WEIGHT_BOYS.zscore.monthly-9cedf9fe.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-29afee99.js → WEIGHT_BOYS.zscore.weekly-5661c740.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-c611c753.js → WEIGHT_BOYS.zscore.yearly-553b054d.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-319b82bc.js → WEIGHT_GIRLS.percentile.monthly-db164c0b.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-17db85b6.js → WEIGHT_GIRLS.percentile.weekly-f6bf7418.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-95ad118d.js → WEIGHT_GIRLS.percentile.yearly-014f7957.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-f1d157a9.js → WEIGHT_GIRLS.zscore.monthly-fda7dd74.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-847a6e3b.js → WEIGHT_GIRLS.zscore.weekly-136807df.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-3a824923.js → WEIGHT_GIRLS.zscore.yearly-2e586fff.js} +0 -0
- /package/build/esm/{animation-9d4336ef.js → animation-07c05d28.js} +0 -0
- /package/build/esm/{constants-6b039ef7.js → constants-7afbacd8.js} +0 -0
- /package/build/esm/{constants-c3212847.js → constants-8fbe2670.js} +0 -0
- /package/build/esm/{constants-2e19be73.js → constants-dc697937.js} +0 -0
- /package/build/esm/{dataTransform-d0cf26c9.js → dataTransform-ecd54e69.js} +0 -0
- /package/build/esm/{doctor-3cc8fc7d.js → doctor-17090568.js} +0 -0
- /package/build/esm/{index-d247dffe.js → index-000e0e9e.js} +0 -0
- /package/build/esm/{index-f7ad233d.js → index-0942d379.js} +0 -0
- /package/build/esm/{index-87e4c6b1.js → index-1befcee7.js} +0 -0
- /package/build/esm/{index-acef2a62.js → index-2e55cfda.js} +0 -0
- /package/build/esm/{index-5182c746.js → index-5cec6573.js} +0 -0
- /package/build/esm/{index-6e29e7f0.js → index-a0303055.js} +0 -0
- /package/build/esm/{index-b199d103.js → index-a232379f.js} +0 -0
- /package/build/esm/{index-10cef35f.js → index-d0f53887.js} +0 -0
- /package/build/esm/{index-1a5534b7.js → index-fdc14c24.js} +0 -0
- /package/build/esm/{index.styles-4e255421.js → index.styles-d02c3a5a.js} +0 -0
- /package/build/esm/{localizeNumberFormat-d6346829.js → localizeNumberFormat-6de5a75e.js} +0 -0
- /package/build/esm/{normalizeLink-5406e34c.js → normalizeLink-43a86413.js} +0 -0
- /package/build/esm/{paths-e6e0ed3e.js → paths-035cff11.js} +0 -0
- /package/build/esm/{translationsContext-7f3cb10c.js → translationsContext-10772791.js} +0 -0
- /package/build/esm/{tslib.es6-8b49e916.js → tslib.es6-e23bfd26.js} +0 -0
- /package/build/esm/{types-207cd2ab.js → types-34201c73.js} +0 -0
- /package/build/esm/{useIsInit-73176efd.js → useIsInit-6477f3a4.js} +0 -0
- /package/build/esm/{useOutsideClick-cdf878ef.js → useOutsideClick-6c9cf98a.js} +0 -0
- /package/build/esm/{useScrollbarSize-e0da9043.js → useScrollbarSize-6473c2fd.js} +0 -0
- /package/build/esm/{useUniqueId-30da00de.js → useUniqueId-5817d5a2.js} +0 -0
- /package/build/esm/{utils-8921b115.js → utils-cdbd3de5.js} +0 -0
- /package/build/{index-972f0263.js → index-098fed08.js} +0 -0
- /package/build/{index-05dda990.js → index-0d70f22c.js} +0 -0
- /package/build/{index-12dcc550.js → index-0dc126e4.js} +0 -0
- /package/build/{index-3b7bc531.js → index-3231a973.js} +0 -0
- /package/build/{index-ac33274a.js → index-3ae84344.js} +0 -0
- /package/build/{index-db8e29db.js → index-71c3d68d.js} +0 -0
- /package/build/{index-9fc5a7e8.js → index-741c96d4.js} +0 -0
- /package/build/{index-a8aaf35d.js → index-7541c6b0.js} +0 -0
- /package/build/{index-b1eb912c.js → index-a19550a4.js} +0 -0
- /package/build/{index.styles-92031143.js → index.styles-4b68abeb.js} +0 -0
- /package/build/{localizeNumberFormat-064f9c12.js → localizeNumberFormat-59035008.js} +0 -0
- /package/build/{normalizeLink-79a136d4.js → normalizeLink-28829417.js} +0 -0
- /package/build/{paths-db1ac919.js → paths-4921d775.js} +0 -0
- /package/build/{translationsContext-4f392f72.js → translationsContext-eb09f732.js} +0 -0
- /package/build/{tslib.es6-39b96c18.js → tslib.es6-19c55cc8.js} +0 -0
- /package/build/{types-4efa0b4d.js → types-3cfdfed1.js} +0 -0
- /package/build/{useIsInit-b3f040cc.js → useIsInit-bee13c08.js} +0 -0
- /package/build/{useOutsideClick-4ab98215.js → useOutsideClick-f77588fe.js} +0 -0
- /package/build/{useScrollbarSize-ec9ed0a7.js → useScrollbarSize-12f1eea9.js} +0 -0
- /package/build/{useUniqueId-b9cbf69c.js → useUniqueId-98ff449d.js} +0 -0
- /package/build/{utils-2fec8698.js → utils-ca036bb9.js} +0 -0
package/build/esm/ssoV2.js
CHANGED
|
@@ -1,56 +1,73 @@
|
|
|
1
|
-
import { a as __awaiter, _ as __rest } from './tslib.es6-
|
|
1
|
+
import { a as __awaiter, _ as __rest } from './tslib.es6-e23bfd26.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-2ae8c1c0.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-d1eca1fa.js';
|
|
6
|
+
export { u as useSSOV2Store } from './store-d1eca1fa.js';
|
|
7
|
+
import { isProduction } from './constantsIsProduction.js';
|
|
6
8
|
import { ChevronLeft } from '@hhgtech/icons/arrow';
|
|
7
9
|
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-
|
|
10
|
+
import { Z as ZINDEX_SSO, L as LOCALE_SPECS, S as STATIC_PAGES, Q as QUERY_HEALTH_TOOL } from './index-81772684.js';
|
|
11
|
+
import { L as LogoIcon } from './logoIcon-b2e3b6df.js';
|
|
12
|
+
import { B as Button } from './index-11d07def.js';
|
|
13
|
+
import { M as Modal } from './index-50127890.js';
|
|
12
14
|
import { Stack, Flex, Box, Group, Divider } from '@mantine/core';
|
|
13
15
|
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-
|
|
16
|
+
import './index-02d06202.js';
|
|
17
|
+
import { C as CommonGAssets } from './index-000e0e9e.js';
|
|
18
|
+
import { s as showNotification } from './useMantineLocale-1c095a66.js';
|
|
19
|
+
import { T as Text } from './index-262b1416.js';
|
|
20
|
+
import { u as useTranslations } from './index-e422ad02.js';
|
|
19
21
|
import '@mantine/hooks';
|
|
20
|
-
import './utils-
|
|
21
|
-
import './other-
|
|
22
|
-
import './index-
|
|
23
|
-
import { L as LOCALE } from './Locale-
|
|
24
|
-
import {
|
|
22
|
+
import './utils-cdbd3de5.js';
|
|
23
|
+
import './other-0db5dab2.js';
|
|
24
|
+
import './index-df46e084.js';
|
|
25
|
+
import { L as LOCALE } from './Locale-00bfd7ae.js';
|
|
26
|
+
import { I as ImageWrap, u as useScreenSize } from './useScreenSize-3a80d6c1.js';
|
|
27
|
+
import { G as Google, F as Facebook } from './Google-2abb6d1e.js';
|
|
25
28
|
import { parsePhoneNumber, getCountryCallingCode } from 'react-phone-number-input';
|
|
29
|
+
import { S as Spoiler } from './index-663f72f5.js';
|
|
30
|
+
import { domainLocales, MAP_DOMAIN_BY_LOCALE } from './constantsDomainLocales.js';
|
|
26
31
|
import styled from '@emotion/styled';
|
|
27
32
|
import cn from 'classnames';
|
|
28
33
|
import { CaretDown } from '@hhgtech/icons/other';
|
|
29
34
|
import debounce from 'lodash/debounce';
|
|
30
35
|
import throttle from 'lodash/throttle';
|
|
31
36
|
import Flags from 'react-phone-number-input/flags';
|
|
32
|
-
import { u as useScreenSize } from './useScreenSize-11bcbfcc.js';
|
|
33
37
|
import { Drawer } from 'vaul';
|
|
34
|
-
import { M as MAPPED_LOCALE } from './utils-
|
|
35
|
-
import { S as Spoiler } from './index-2a338d3f.js';
|
|
36
|
-
import { domainLocales } from './constantsDomainLocales.js';
|
|
38
|
+
import { M as MAPPED_LOCALE } from './utils-d0d4f26f.js';
|
|
37
39
|
import { useForm, yupResolver } from '@mantine/form';
|
|
38
40
|
import * as yup from 'yup';
|
|
39
41
|
import dayjs from 'dayjs';
|
|
40
|
-
import { D as DatePicker } from './index-
|
|
42
|
+
import { D as DatePicker } from './index-26e9ffe8.js';
|
|
41
43
|
import '@mantine/carousel';
|
|
42
44
|
import './miscTheme.js';
|
|
43
|
-
import './useUniqueId-
|
|
45
|
+
import './useUniqueId-5817d5a2.js';
|
|
44
46
|
import './constantsSite.js';
|
|
45
47
|
import 'zustand';
|
|
46
|
-
import './
|
|
47
|
-
import './normalizeLink-5406e34c.js';
|
|
48
|
-
import './miscCookieHelper.js';
|
|
48
|
+
import './normalizeLink-43a86413.js';
|
|
49
49
|
import 'date-fns/locale';
|
|
50
50
|
import './constantsRiskScreener.js';
|
|
51
|
-
import './index.styles-
|
|
51
|
+
import './index.styles-d02c3a5a.js';
|
|
52
52
|
import '@mantine/notifications';
|
|
53
|
-
import './translationsContext-
|
|
53
|
+
import './translationsContext-10772791.js';
|
|
54
|
+
|
|
55
|
+
// const fakeData = {
|
|
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 = isProduction
|
|
61
|
+
? 'https://mobile-be.hellohealthgroup.com'
|
|
62
|
+
: 'https://staging-mobile-be.hellohealthgroup.com';
|
|
63
|
+
const response = yield fetch(`${baseUrl}/api/feature-flag/v1/list?site=${site}`);
|
|
64
|
+
data = yield response.json();
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
data = null;
|
|
68
|
+
}
|
|
69
|
+
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');
|
|
70
|
+
});
|
|
54
71
|
|
|
55
72
|
const SSOStateContext = createContext({
|
|
56
73
|
locale: LOCALE.Vietnam,
|
|
@@ -208,7 +225,8 @@ const isSocialFlowFn = (flowData) => {
|
|
|
208
225
|
const isPhoneFlowFn = (flowData) => {
|
|
209
226
|
return ((flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'sms' ||
|
|
210
227
|
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'zalo' ||
|
|
211
|
-
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'phone'
|
|
228
|
+
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'phone' ||
|
|
229
|
+
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'whatsapp');
|
|
212
230
|
};
|
|
213
231
|
const isEmailFlowFn = (flowData) => {
|
|
214
232
|
return (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'email';
|
|
@@ -221,6 +239,14 @@ const isResetPasswordFlowFn = (steps) => {
|
|
|
221
239
|
passwordForgotStep > 0 &&
|
|
222
240
|
passwordForgotStep > passwordStep);
|
|
223
241
|
};
|
|
242
|
+
const isResetPasswordViePhoneFlowFn = (steps) => {
|
|
243
|
+
// First -> Passsword -> Password Forgot Phone
|
|
244
|
+
const passwordStep = steps.findIndex((s) => s.type === SSOStepTypeType.PASSWORD);
|
|
245
|
+
const passwordForgotStep = steps.findIndex((s) => s.type === SSOStepTypeType.FORGOT_PASSWORD_PHONE);
|
|
246
|
+
return (passwordStep > 0 &&
|
|
247
|
+
passwordForgotStep > 0 &&
|
|
248
|
+
passwordForgotStep > passwordStep);
|
|
249
|
+
};
|
|
224
250
|
const isDisplayProgressBarFn = (flowData, step) => {
|
|
225
251
|
const showProgressBar = (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP ||
|
|
226
252
|
(step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.SETUP_FULL ||
|
|
@@ -235,29 +261,42 @@ const isDisplayProgressBarFn = (flowData, step) => {
|
|
|
235
261
|
isEmailFlowFn(flowData);
|
|
236
262
|
return showProgressBar && isWhiteListFlow;
|
|
237
263
|
};
|
|
238
|
-
const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo) => {
|
|
239
|
-
var _a, _b;
|
|
264
|
+
const getCurrentStepNumber = (flowData, { steps, currentStepIndex, abTestFlow, }, userInfo) => {
|
|
265
|
+
var _a, _b, _c;
|
|
240
266
|
const step = steps[currentStepIndex];
|
|
241
267
|
const isSocialFlow = isSocialFlowFn(flowData);
|
|
242
268
|
const isPhoneFlow = isPhoneFlowFn(flowData);
|
|
243
269
|
const isEmailFlow = isEmailFlowFn(flowData);
|
|
244
270
|
/** Social (Google, Facebook): FIRST => VERIFY_PHONE | OTP => STEP_FULL */
|
|
245
271
|
if (isSocialFlow) {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
272
|
+
// Ignore Phone in Community if in update email step
|
|
273
|
+
const isCommunityUpdateEmail = useSSOV2Store().setupSource === 'community' &&
|
|
274
|
+
((_a = steps[0]) === null || _a === void 0 ? void 0 : _a.type) === SSOStepTypeType.UPDATE_EMAIL;
|
|
275
|
+
const arrSteps = isCommunityUpdateEmail
|
|
276
|
+
? [
|
|
277
|
+
SSOStepTypeType.UPDATE_EMAIL,
|
|
278
|
+
SSOStepTypeType.OTP,
|
|
279
|
+
!userInfo || !isUserFinishedSetup(userInfo)
|
|
280
|
+
? SSOStepTypeType.SETUP_FULL
|
|
281
|
+
: undefined,
|
|
282
|
+
]
|
|
283
|
+
.flat()
|
|
284
|
+
.filter(Boolean)
|
|
285
|
+
: [
|
|
286
|
+
!isPhoneVerifedAlready(userInfo, flowData) && abTestFlow !== 'B'
|
|
287
|
+
? [SSOStepTypeType.VERIFY_PHONE, SSOStepTypeType.OTP]
|
|
288
|
+
: undefined,
|
|
289
|
+
isExistUpdateEmailStep(steps)
|
|
290
|
+
? (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
|
|
291
|
+
? SSOStepTypeType.OTP
|
|
292
|
+
: SSOStepTypeType.UPDATE_EMAIL
|
|
293
|
+
: undefined,
|
|
294
|
+
!userInfo || !isUserFinishedSetup(userInfo)
|
|
295
|
+
? SSOStepTypeType.SETUP_FULL
|
|
296
|
+
: undefined,
|
|
297
|
+
]
|
|
298
|
+
.flat()
|
|
299
|
+
.filter(Boolean);
|
|
261
300
|
const previousStep = steps[currentStepIndex - 1];
|
|
262
301
|
return [
|
|
263
302
|
arrSteps.length,
|
|
@@ -271,7 +310,7 @@ const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo)
|
|
|
271
310
|
!isPhoneVerifedAlready(userInfo, flowData)
|
|
272
311
|
? SSOStepTypeType.OTP
|
|
273
312
|
: undefined,
|
|
274
|
-
!((
|
|
313
|
+
!((_b = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _b === void 0 ? void 0 : _b.is_pass)
|
|
275
314
|
? SSOStepTypeType.FORGOT_PASSWORD_SETUP
|
|
276
315
|
: undefined,
|
|
277
316
|
!isSetupFullInfoAlready(userInfo, flowData)
|
|
@@ -313,8 +352,11 @@ const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo)
|
|
|
313
352
|
];
|
|
314
353
|
}
|
|
315
354
|
if (isEmailFlow) {
|
|
316
|
-
const
|
|
317
|
-
const
|
|
355
|
+
const hasPhoneStepCase1 = !isPhoneVerifedAlready(userInfo, flowData) && abTestFlow !== 'B';
|
|
356
|
+
const hasPhoneStepCase2 = !isPhoneVerifedAlready(userInfo, flowData) &&
|
|
357
|
+
useSSOV2Store.getState().source === 'care_onboarding';
|
|
358
|
+
const hasPasswordStep = !((_c = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _c === void 0 ? void 0 : _c.is_pass);
|
|
359
|
+
const hasPhoneStep = hasPhoneStepCase1 || hasPhoneStepCase2;
|
|
318
360
|
const hasSetupFullStep = !isSetupFullInfoAlready(userInfo, flowData);
|
|
319
361
|
const isForgotPasswordSetup = steps.find((s) => s.type === SSOStepTypeType.FORGOT_PASSWORD_SETUP);
|
|
320
362
|
if (!hasPasswordStep && !hasPhoneStep && !hasSetupFullStep)
|
|
@@ -348,10 +390,10 @@ const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo)
|
|
|
348
390
|
const ProgressBar = () => {
|
|
349
391
|
// const initUserInfo = useRef<UserInfo | undefined | null>()
|
|
350
392
|
const { steps, currentStepIndex } = useSSOSteps();
|
|
351
|
-
const { flowData, userInfo } = useSSOV2Store();
|
|
393
|
+
const { flowData, userInfo, abTestFlow } = useSSOV2Store();
|
|
352
394
|
/** No need update state IF userInfo is changed */
|
|
353
395
|
const initUserInfo = useMemo(() => userInfo, [userInfo]);
|
|
354
|
-
const [totalStepNumber, activeStepNumber] = getCurrentStepNumber(flowData, { steps, currentStepIndex }, initUserInfo);
|
|
396
|
+
const [totalStepNumber, activeStepNumber] = getCurrentStepNumber(flowData, { steps, currentStepIndex, abTestFlow }, initUserInfo);
|
|
355
397
|
if (!activeStepNumber || totalStepNumber === 1)
|
|
356
398
|
return null;
|
|
357
399
|
return (React__default.createElement(Flex, { gap: 2 }, Array.from({ length: totalStepNumber }).map((_, idx) => {
|
|
@@ -440,7 +482,12 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
440
482
|
borderRadius: '100%',
|
|
441
483
|
}, 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
484
|
React__default.createElement(ChevronLeft, null))),
|
|
443
|
-
showLogo && (React__default.createElement(
|
|
485
|
+
showLogo && (React__default.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
|
|
486
|
+
React__default.createElement(LogoIcon, { type: logoType, height: 32, width: 'unset' }),
|
|
487
|
+
locale === LOCALE.Indonesia && (React__default.createElement(ImageWrap, { alt: "", src: CommonGAssets.getAssetPath('sehat-badge.png'), style: {
|
|
488
|
+
width: 56,
|
|
489
|
+
height: 23,
|
|
490
|
+
} })))),
|
|
444
491
|
showClose && (React__default.createElement(Button, { variant: "white", style: {
|
|
445
492
|
width: 40,
|
|
446
493
|
height: 40,
|
|
@@ -593,11 +640,11 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
593
640
|
const { t } = useTranslations();
|
|
594
641
|
const [loading, setLoading] = React__default.useState(false);
|
|
595
642
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
596
|
-
const { flowData } = useSSOV2Store();
|
|
643
|
+
const { flowData, abTestFlow } = useSSOV2Store();
|
|
597
644
|
const trackingCategory = flowData.flow === 'signup'
|
|
598
|
-
? `SSO - Sign Up via
|
|
599
|
-
:
|
|
600
|
-
const trackingAction =
|
|
645
|
+
? `SSO - Sign Up via Email_Phone_Adoption_Test_${abTestFlow}`
|
|
646
|
+
: `SSO - Sign In via Email_Phone_Adoption_Test_${abTestFlow}`;
|
|
647
|
+
const trackingAction = `Continue With Email`;
|
|
601
648
|
const { setTracking } = useSSOState();
|
|
602
649
|
useEffect(() => {
|
|
603
650
|
if (!hidden) {
|
|
@@ -680,7 +727,7 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
680
727
|
React__default.createElement(Stack, { spacing: 8 },
|
|
681
728
|
React__default.createElement(Text, { size: "s1", weight: "semiBold" }, t('ssov2.email.title')),
|
|
682
729
|
React__default.createElement(Text, { size: "p4" }, t('ssov2.email.description'))),
|
|
683
|
-
React__default.createElement(Input, { name: "email", placeholder:
|
|
730
|
+
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
731
|
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
732
|
};
|
|
686
733
|
|
|
@@ -783,6 +830,59 @@ const loginBySocial = (token, social) => __awaiter(void 0, void 0, void 0, funct
|
|
|
783
830
|
});
|
|
784
831
|
});
|
|
785
832
|
|
|
833
|
+
// "phone_number": "906911910",
|
|
834
|
+
// "area_code":"+84",
|
|
835
|
+
const registerBySendWhatsAppOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
836
|
+
const formData = new FormData();
|
|
837
|
+
formData.append('phone_number', phone);
|
|
838
|
+
formData.append('area_code', areaCode);
|
|
839
|
+
formData.append('website_id', websiteId);
|
|
840
|
+
return fetchSSOV2Api(SSO_V2_PATHS.WHATSAPP.REGISTER_BY_SEND_OTP, {
|
|
841
|
+
method: 'POST',
|
|
842
|
+
body: formData,
|
|
843
|
+
});
|
|
844
|
+
});
|
|
845
|
+
// "phone_number": "906911910",
|
|
846
|
+
// "area_code":"+84",
|
|
847
|
+
const resendWhatsAppOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
848
|
+
const formData = new FormData();
|
|
849
|
+
formData.append('phone_number', phone);
|
|
850
|
+
formData.append('area_code', areaCode);
|
|
851
|
+
return fetchSSOV2Api(SSO_V2_PATHS.WHATSAPP.SEND_OTP, {
|
|
852
|
+
method: 'POST',
|
|
853
|
+
body: formData,
|
|
854
|
+
});
|
|
855
|
+
});
|
|
856
|
+
const resendUpdatePhoneWhatsAppOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
857
|
+
const formData = new FormData();
|
|
858
|
+
formData.append('phone_number', phone);
|
|
859
|
+
formData.append('area_code', areaCode);
|
|
860
|
+
return fetchSSOV2Api(SSO_V2_PATHS.WHATSAPP.UPDATE_PHONE_SEND_OTP, {
|
|
861
|
+
method: 'POST',
|
|
862
|
+
body: formData,
|
|
863
|
+
});
|
|
864
|
+
});
|
|
865
|
+
const verifyUpdatePhoneWhatsAppOTP = (phone, areaCode, otpCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
866
|
+
const formData = new FormData();
|
|
867
|
+
formData.append('phone_number', phone);
|
|
868
|
+
formData.append('otp_code', otpCode);
|
|
869
|
+
formData.append('area_code', areaCode);
|
|
870
|
+
return fetchSSOV2Api(SSO_V2_PATHS.WHATSAPP.UPDATE_PHONE_VERIFY_OTP, {
|
|
871
|
+
method: 'POST',
|
|
872
|
+
body: formData,
|
|
873
|
+
});
|
|
874
|
+
});
|
|
875
|
+
const verifyByWhatsAppOTP = (phone, areaCode, otpCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
876
|
+
const formData = new FormData();
|
|
877
|
+
formData.append('otp_code', otpCode);
|
|
878
|
+
formData.append('phone_number', phone);
|
|
879
|
+
formData.append('area_code', areaCode);
|
|
880
|
+
return fetchSSOV2Api(SSO_V2_PATHS.WHATSAPP.VERIFY_BY_OTP, {
|
|
881
|
+
method: 'POST',
|
|
882
|
+
body: formData,
|
|
883
|
+
});
|
|
884
|
+
});
|
|
885
|
+
|
|
786
886
|
// "phone_number": "906911910",
|
|
787
887
|
// "area_code":"+84",
|
|
788
888
|
const registerBySendZaloOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -839,9 +939,118 @@ const verifyUpdatePhoneZaloOTP = (phone, areaCode, otpCode) => __awaiter(void 0,
|
|
|
839
939
|
});
|
|
840
940
|
});
|
|
841
941
|
|
|
942
|
+
// VietNam: Zalo - SMS
|
|
943
|
+
// Info: WhatsApp
|
|
944
|
+
// Malay: WhatsApp và SMS
|
|
945
|
+
const isFeatureWhatsAppEnabled = [
|
|
946
|
+
LOCALE.Indonesia,
|
|
947
|
+
LOCALE.Malaysia,
|
|
948
|
+
].includes(locale);
|
|
949
|
+
const isFeatureSMSEnabled = [LOCALE.Vietnam, LOCALE.Malaysia].includes(locale);
|
|
950
|
+
const isFeatureZaloEnabled = [LOCALE.Vietnam].includes(locale);
|
|
951
|
+
const isSupportProduct = (featureFlagsProduct) => {
|
|
952
|
+
const setupSource = useSSOV2Store.getState().setupSource || 'discover';
|
|
953
|
+
const isSupportDiscover = (featureFlagsProduct === null || featureFlagsProduct === void 0 ? void 0 : featureFlagsProduct.find((p) => p.name === 'discover')) &&
|
|
954
|
+
setupSource === 'discover';
|
|
955
|
+
const isSupportTogether = (featureFlagsProduct === null || featureFlagsProduct === void 0 ? void 0 : featureFlagsProduct.find((p) => p.name === 'together')) &&
|
|
956
|
+
setupSource === 'community';
|
|
957
|
+
const isSupportCare = (featureFlagsProduct === null || featureFlagsProduct === void 0 ? void 0 : featureFlagsProduct.find((p) => p.name === 'care')) &&
|
|
958
|
+
setupSource === 'care';
|
|
959
|
+
return isSupportDiscover || isSupportTogether || isSupportCare;
|
|
960
|
+
};
|
|
961
|
+
|
|
842
962
|
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
963
|
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
964
|
|
|
965
|
+
const PolicyContent = ({ legalTextType, trackingCategory, trackingAction, }) => {
|
|
966
|
+
var _a, _b;
|
|
967
|
+
const { t } = useTranslations();
|
|
968
|
+
const { locale } = useSSOState();
|
|
969
|
+
return (React__default.createElement(Stack, { spacing: 24, sx: (theme) => ({
|
|
970
|
+
marginTop: 56,
|
|
971
|
+
[theme.fn.smallerThan('sm')]: {
|
|
972
|
+
marginTop: 'auto',
|
|
973
|
+
paddingTop: 50,
|
|
974
|
+
},
|
|
975
|
+
}) },
|
|
976
|
+
React__default.createElement(Spoiler, { maxHeight: 74, showLabel: React__default.createElement(Text, { size: "p5", color: "gray.6", underline: true, align: "left" }, t('home.seeMore')), hideLabel: React__default.createElement(Text, { size: "p5", color: "gray.6", underline: true, align: "left" }, t('articlePage.showLess')) },
|
|
977
|
+
React__default.createElement(Text, { size: "p5", color: "gray.6" }, t(legalTextType === 'community'
|
|
978
|
+
? 'ssov2.policyText.community'
|
|
979
|
+
: 'ssov2.policyText', {
|
|
980
|
+
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: {
|
|
981
|
+
color: '#262626',
|
|
982
|
+
textDecoration: 'underline',
|
|
983
|
+
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Privacy Policy", rel: "noreferrer" }, t('ssov2.policyText.privacy'))),
|
|
984
|
+
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: {
|
|
985
|
+
color: '#262626',
|
|
986
|
+
textDecoration: 'underline',
|
|
987
|
+
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Terms of Service", rel: "noreferrer" }, t('ssov2.policyText.terms'))),
|
|
988
|
+
})))));
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
const FirstBFlow = ({ hidden,
|
|
992
|
+
// activeTab,
|
|
993
|
+
legalTextType, trackingAction, trackingCategory, onTriggerGoogleLogin, onTriggerFacebookLogin, onClickEmail, }) => {
|
|
994
|
+
const { t } = useTranslations();
|
|
995
|
+
return (React__default.createElement("div", { style: {
|
|
996
|
+
display: hidden ? 'none' : 'flex',
|
|
997
|
+
flexDirection: 'column',
|
|
998
|
+
height: '100%',
|
|
999
|
+
} },
|
|
1000
|
+
React__default.createElement(Stack, { mt: 8, spacing: 8 },
|
|
1001
|
+
React__default.createElement(Text, { size: "h4", weight: "semiBold" }, t('home.navigator.menu.category.noDatas.title')),
|
|
1002
|
+
React__default.createElement(Text, { size: "p4" }, t('ssov2.abTestingFlowB.description'))),
|
|
1003
|
+
React__default.createElement(Stack, { mt: 24, spacing: 24 },
|
|
1004
|
+
React__default.createElement(Button, { variant: "white", style: {
|
|
1005
|
+
flex: 1,
|
|
1006
|
+
height: 48,
|
|
1007
|
+
padding: 12,
|
|
1008
|
+
background: '#F7F9FC',
|
|
1009
|
+
borderRadius: 8,
|
|
1010
|
+
}, onClick: onTriggerGoogleLogin, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Google" },
|
|
1011
|
+
React__default.createElement(Google, { style: {
|
|
1012
|
+
width: 20,
|
|
1013
|
+
height: 20,
|
|
1014
|
+
marginRight: 4,
|
|
1015
|
+
borderRadius: '100%',
|
|
1016
|
+
} }),
|
|
1017
|
+
' ',
|
|
1018
|
+
React__default.createElement(Text, { size: "p4", color: "black", weight: "semiBold" }, t('ssov2.button.continueGoogle'))),
|
|
1019
|
+
React__default.createElement(Stack, { spacing: 24, align: "center" },
|
|
1020
|
+
React__default.createElement(Text, { size: "p4", color: "gray.4" }, t('ssov2.orContinueWith')),
|
|
1021
|
+
React__default.createElement(Group, { spacing: 8, style: {
|
|
1022
|
+
width: '100%',
|
|
1023
|
+
} },
|
|
1024
|
+
React__default.createElement(Button, { variant: "white", style: {
|
|
1025
|
+
flex: 1,
|
|
1026
|
+
height: 48,
|
|
1027
|
+
padding: 12,
|
|
1028
|
+
background: '#F7F9FC',
|
|
1029
|
+
borderRadius: 8,
|
|
1030
|
+
}, onClick: onTriggerFacebookLogin, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Facebook" },
|
|
1031
|
+
React__default.createElement(Facebook, { style: {
|
|
1032
|
+
width: 20,
|
|
1033
|
+
height: 20,
|
|
1034
|
+
marginRight: 4,
|
|
1035
|
+
borderRadius: '100%',
|
|
1036
|
+
} }),
|
|
1037
|
+
' ',
|
|
1038
|
+
React__default.createElement(Text, { size: "p4", color: "black", weight: "regular" }, "Facebook")),
|
|
1039
|
+
React__default.createElement(Button, { variant: "white", style: {
|
|
1040
|
+
flex: 1,
|
|
1041
|
+
height: 48,
|
|
1042
|
+
padding: 12,
|
|
1043
|
+
background: '#F7F9FC',
|
|
1044
|
+
borderRadius: 8,
|
|
1045
|
+
}, onClick: onClickEmail, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Email" },
|
|
1046
|
+
React__default.createElement(MailIcon, { style: {
|
|
1047
|
+
marginRight: 4,
|
|
1048
|
+
} }),
|
|
1049
|
+
' ',
|
|
1050
|
+
React__default.createElement(Text, { size: "p4", color: "black", weight: "regular" }, "Email"))))),
|
|
1051
|
+
React__default.createElement(PolicyContent, { legalTextType: legalTextType, trackingAction: trackingAction, trackingCategory: trackingCategory })));
|
|
1052
|
+
};
|
|
1053
|
+
|
|
845
1054
|
function createCommonjsModule(fn) {
|
|
846
1055
|
var module = { exports: {} };
|
|
847
1056
|
return fn(module, module.exports), module.exports;
|
|
@@ -2276,6 +2485,12 @@ const StyledPhone = styled(PhoneWithCustomCountrySelect) `
|
|
|
2276
2485
|
}
|
|
2277
2486
|
`;
|
|
2278
2487
|
|
|
2488
|
+
const WhatsApp = ({ size = 20 }) => {
|
|
2489
|
+
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" },
|
|
2490
|
+
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" }),
|
|
2491
|
+
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" })));
|
|
2492
|
+
};
|
|
2493
|
+
|
|
2279
2494
|
const Zalo = ({ size = 20, useCurrentColor = false }) => {
|
|
2280
2495
|
const color = useCurrentColor ? 'currentColor' : '#0068FF';
|
|
2281
2496
|
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,17 +2506,16 @@ const Zalo = ({ size = 20, useCurrentColor = false }) => {
|
|
|
2291
2506
|
};
|
|
2292
2507
|
|
|
2293
2508
|
const SSOFirstScreen = ({ hidden, config, }) => {
|
|
2294
|
-
var _a, _b;
|
|
2295
2509
|
const [phone, setPhone] = React__default.useState('');
|
|
2296
2510
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
2297
2511
|
const { locale, onClose, setTracking } = useSSOState();
|
|
2298
2512
|
const { addStep, goNext } = useSSOSteps();
|
|
2299
|
-
const { setUserInfo } = useSSOV2Store();
|
|
2513
|
+
const { setUserInfo, abTestFlow } = useSSOV2Store();
|
|
2300
2514
|
const [activeTab, setActiveTab] = React__default.useState('login');
|
|
2301
2515
|
const { legalTextType } = config || {};
|
|
2302
2516
|
const { t } = useTranslations();
|
|
2303
|
-
const trackingAction = 'Sign In or Sign Up
|
|
2304
|
-
const trackingCategory = `SSO - ${activeTab === 'login' ? 'Sign In' : 'Sign Up'}`;
|
|
2517
|
+
const trackingAction = abTestFlow === 'B' ? `Sign Up` : `Sign In or Sign Up`;
|
|
2518
|
+
const trackingCategory = `SSO - ${activeTab === 'login' ? 'Sign In' : 'Sign Up'}_Phone_Adoption_Test_${abTestFlow}`;
|
|
2305
2519
|
useEffect(() => {
|
|
2306
2520
|
if (!hidden) {
|
|
2307
2521
|
setErrMsg('');
|
|
@@ -2326,7 +2540,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2326
2540
|
},
|
|
2327
2541
|
});
|
|
2328
2542
|
const isNotHavePhone = !userInfo._data.phone || !userInfo._data.phone_verified_at;
|
|
2329
|
-
if (isNotHavePhone) {
|
|
2543
|
+
if (isNotHavePhone && abTestFlow !== 'B') {
|
|
2330
2544
|
useSSOV2Store.setState((f) => {
|
|
2331
2545
|
var _a;
|
|
2332
2546
|
return ({
|
|
@@ -2414,7 +2628,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2414
2628
|
};
|
|
2415
2629
|
}, []);
|
|
2416
2630
|
const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2417
|
-
var
|
|
2631
|
+
var _a, _b;
|
|
2418
2632
|
setLoading(true);
|
|
2419
2633
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2420
2634
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2423,8 +2637,8 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2423
2637
|
}
|
|
2424
2638
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
2425
2639
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2426
|
-
const provider = (
|
|
2427
|
-
if ((
|
|
2640
|
+
const provider = (_a = userExist._data) === null || _a === void 0 ? void 0 : _a.provider;
|
|
2641
|
+
if ((_b = userExist._data) === null || _b === void 0 ? void 0 : _b.is_pass) {
|
|
2428
2642
|
useSSOV2Store.setState({
|
|
2429
2643
|
flowData: {
|
|
2430
2644
|
method: 'zalo',
|
|
@@ -2476,6 +2690,69 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2476
2690
|
}
|
|
2477
2691
|
setLoading(false);
|
|
2478
2692
|
});
|
|
2693
|
+
const onClickContinueWhatsApp = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2694
|
+
var _c, _d;
|
|
2695
|
+
setLoading(true);
|
|
2696
|
+
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2697
|
+
if (!areaCode || !phoneNumber || !phone) {
|
|
2698
|
+
setErrMsg(t('ssov2.validate.phone.required'));
|
|
2699
|
+
return setLoading(false);
|
|
2700
|
+
}
|
|
2701
|
+
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
2702
|
+
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2703
|
+
const provider = (_c = userExist._data) === null || _c === void 0 ? void 0 : _c.provider;
|
|
2704
|
+
if ((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.is_pass) {
|
|
2705
|
+
useSSOV2Store.setState({
|
|
2706
|
+
flowData: {
|
|
2707
|
+
method: 'whatsapp',
|
|
2708
|
+
flow: 'login',
|
|
2709
|
+
metaData: userExist._data,
|
|
2710
|
+
},
|
|
2711
|
+
});
|
|
2712
|
+
addStep({
|
|
2713
|
+
type: SSOStepTypeType.PASSWORD,
|
|
2714
|
+
config: {
|
|
2715
|
+
phone,
|
|
2716
|
+
method: 'whatsapp',
|
|
2717
|
+
},
|
|
2718
|
+
});
|
|
2719
|
+
goNext();
|
|
2720
|
+
}
|
|
2721
|
+
else {
|
|
2722
|
+
let res;
|
|
2723
|
+
if (!provider) {
|
|
2724
|
+
res = yield registerBySendWhatsAppOTP(phoneNumber, areaCode);
|
|
2725
|
+
}
|
|
2726
|
+
else {
|
|
2727
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
2728
|
+
}
|
|
2729
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
2730
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
2731
|
+
return setLoading(false);
|
|
2732
|
+
}
|
|
2733
|
+
useSSOV2Store.setState({
|
|
2734
|
+
flowData: {
|
|
2735
|
+
method: 'whatsapp',
|
|
2736
|
+
flow: 'signup',
|
|
2737
|
+
metaData: userExist._data,
|
|
2738
|
+
},
|
|
2739
|
+
});
|
|
2740
|
+
addStep({
|
|
2741
|
+
type: SSOStepTypeType.OTP,
|
|
2742
|
+
config: {
|
|
2743
|
+
phone,
|
|
2744
|
+
otpType: 'phone-whatsapp',
|
|
2745
|
+
afterAction: 'forgot',
|
|
2746
|
+
},
|
|
2747
|
+
});
|
|
2748
|
+
goNext();
|
|
2749
|
+
}
|
|
2750
|
+
}
|
|
2751
|
+
else {
|
|
2752
|
+
setErrMsg(getErrorTextFromCode(t, userExist === null || userExist === void 0 ? void 0 : userExist.code));
|
|
2753
|
+
}
|
|
2754
|
+
setLoading(false);
|
|
2755
|
+
});
|
|
2479
2756
|
const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2480
2757
|
var _e, _f;
|
|
2481
2758
|
setLoading(true);
|
|
@@ -2618,6 +2895,9 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2618
2895
|
});
|
|
2619
2896
|
}, { scope: 'public_profile,email,user_gender,user_birthday' });
|
|
2620
2897
|
};
|
|
2898
|
+
if (abTestFlow === 'B') {
|
|
2899
|
+
return (React__default.createElement(FirstBFlow, { hidden: hidden, activeTab: activeTab, legalTextType: legalTextType, trackingAction: trackingAction, trackingCategory: trackingCategory, onTriggerGoogleLogin: onTriggerGoogleLogin, onTriggerFacebookLogin: onTriggerFacebookLogin, onClickEmail: onClickEmail }));
|
|
2900
|
+
}
|
|
2621
2901
|
return (React__default.createElement("div", { style: {
|
|
2622
2902
|
display: hidden ? 'none' : 'flex',
|
|
2623
2903
|
flexDirection: 'column',
|
|
@@ -2653,8 +2933,9 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2653
2933
|
};
|
|
2654
2934
|
}, [activeTab]) }))),
|
|
2655
2935
|
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: "
|
|
2936
|
+
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'))),
|
|
2937
|
+
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'))),
|
|
2938
|
+
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
2939
|
React__default.createElement(Divider, { color: "#E4E8EC", display: activeTab === 'signup' ? 'block' : 'none' }),
|
|
2659
2940
|
React__default.createElement(Stack, { spacing: 16, align: "center" },
|
|
2660
2941
|
React__default.createElement(Text, { size: "p4", color: "gray.4" }, t('ssov2.orContinueWith')),
|
|
@@ -2703,26 +2984,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2703
2984
|
} }),
|
|
2704
2985
|
' ',
|
|
2705
2986
|
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
|
-
}))))));
|
|
2987
|
+
React__default.createElement(PolicyContent, { legalTextType: legalTextType, trackingAction: trackingAction, trackingCategory: trackingCategory })));
|
|
2726
2988
|
};
|
|
2727
2989
|
|
|
2728
2990
|
const initSendUpdateEmailOtp = (email) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -2751,7 +3013,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2751
3013
|
const { t } = useTranslations();
|
|
2752
3014
|
const { onClose, setTracking } = useSSOState();
|
|
2753
3015
|
const { setSteps, steps } = useSSOSteps();
|
|
2754
|
-
const { flowData, userInfo } = useSSOV2Store();
|
|
3016
|
+
const { flowData, userInfo, abTestFlow } = useSSOV2Store();
|
|
2755
3017
|
const [loading, setLoading] = React__default.useState(false);
|
|
2756
3018
|
const [otp, setOtp] = React__default.useState('');
|
|
2757
3019
|
const [error, setError] = React__default.useState('');
|
|
@@ -2763,15 +3025,16 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2763
3025
|
const isEmail = otpType === 'email' || otpType === 'update-email';
|
|
2764
3026
|
const isZalo = otpType === 'phone-zalo';
|
|
2765
3027
|
const isSMS = otpType === 'phone-sms';
|
|
3028
|
+
const isWhatsApp = otpType === 'phone-whatsapp';
|
|
2766
3029
|
const trackingMethod = flowData === null || flowData === void 0 ? void 0 : flowData.method;
|
|
2767
3030
|
const trackingCategory = userInfo && !userInfo.first_time_login
|
|
2768
|
-
? `SSO - Existing User via ${trackingMethod}`
|
|
3031
|
+
? `SSO - Existing User via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`
|
|
2769
3032
|
: isVerifyPhoneInTheSignUp(steps, flowData)
|
|
2770
|
-
? `SSO - Sign Up via ${trackingMethod}`
|
|
2771
|
-
: `SSO - Sign In via ${trackingMethod}`;
|
|
3033
|
+
? `SSO - Sign Up via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`
|
|
3034
|
+
: `SSO - Sign In via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`;
|
|
2772
3035
|
const trackingAction = isEmail
|
|
2773
|
-
?
|
|
2774
|
-
: `Verify Phone Number via ${isZalo ? 'Zalo' : isSMS ? 'SMS' : ''}`;
|
|
3036
|
+
? `Verify Your Email`
|
|
3037
|
+
: `Verify Phone Number via ${isZalo ? 'Zalo' : isSMS ? 'SMS' : isWhatsApp ? 'WhatsApp' : ''}`;
|
|
2775
3038
|
useEffect(() => {
|
|
2776
3039
|
if (!hidden) {
|
|
2777
3040
|
setError('');
|
|
@@ -2805,6 +3068,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2805
3068
|
else if (otpType === 'phone-zalo') {
|
|
2806
3069
|
res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
2807
3070
|
}
|
|
3071
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3072
|
+
res = yield resendUpdatePhoneWhatsAppOTP(phoneNumber, areaCode);
|
|
3073
|
+
}
|
|
2808
3074
|
}
|
|
2809
3075
|
else {
|
|
2810
3076
|
if (otpType === 'phone-sms') {
|
|
@@ -2813,6 +3079,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2813
3079
|
else if (otpType === 'phone-zalo') {
|
|
2814
3080
|
res = yield resendZaloOTP(phoneNumber, areaCode);
|
|
2815
3081
|
}
|
|
3082
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3083
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
3084
|
+
}
|
|
2816
3085
|
else if (otpType === 'email') {
|
|
2817
3086
|
res = yield resendEmailOTP(email);
|
|
2818
3087
|
}
|
|
@@ -2851,6 +3120,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2851
3120
|
else if (otpType === 'phone-zalo') {
|
|
2852
3121
|
res = yield verifyUpdatePhoneZaloOTP(phoneNumber, areaCode, otp);
|
|
2853
3122
|
}
|
|
3123
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3124
|
+
res = yield verifyUpdatePhoneWhatsAppOTP(phoneNumber, areaCode, otp);
|
|
3125
|
+
}
|
|
2854
3126
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
2855
3127
|
if (afterAction === 'setup') {
|
|
2856
3128
|
const userInfo = yield getUserInfo();
|
|
@@ -2876,6 +3148,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2876
3148
|
const needPass = (flowData.method === 'email' ||
|
|
2877
3149
|
flowData.method === 'zalo' ||
|
|
2878
3150
|
flowData.method === 'sms' ||
|
|
3151
|
+
flowData.method === 'whatsapp' ||
|
|
2879
3152
|
flowData.method === 'phone' ||
|
|
2880
3153
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'email' ||
|
|
2881
3154
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'phone') &&
|
|
@@ -2934,6 +3207,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2934
3207
|
else if (otpType === 'phone-zalo') {
|
|
2935
3208
|
res = yield verifyByZaloOTP(phoneNumber, areaCode, otp);
|
|
2936
3209
|
}
|
|
3210
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3211
|
+
res = yield verifyByWhatsAppOTP(phoneNumber, areaCode, otp);
|
|
3212
|
+
}
|
|
2937
3213
|
else if (otpType === 'email') {
|
|
2938
3214
|
res = yield verifyByEmailOTP(email, otp);
|
|
2939
3215
|
}
|
|
@@ -2956,7 +3232,15 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2956
3232
|
addStepAndGoNext({
|
|
2957
3233
|
type: SSOStepTypeType.FORGOT_PASSWORD_SETUP,
|
|
2958
3234
|
config: {
|
|
2959
|
-
provider: isZalo
|
|
3235
|
+
provider: isZalo
|
|
3236
|
+
? 'Zalo'
|
|
3237
|
+
: isSMS
|
|
3238
|
+
? 'SMS'
|
|
3239
|
+
: isWhatsApp
|
|
3240
|
+
? 'WhatsApp'
|
|
3241
|
+
: isEmail
|
|
3242
|
+
? 'Email'
|
|
3243
|
+
: '',
|
|
2960
3244
|
},
|
|
2961
3245
|
});
|
|
2962
3246
|
}
|
|
@@ -2984,6 +3268,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2984
3268
|
const needPass = (flowData.method === 'email' ||
|
|
2985
3269
|
flowData.method === 'zalo' ||
|
|
2986
3270
|
flowData.method === 'sms' ||
|
|
3271
|
+
flowData.method === 'whatsapp' ||
|
|
2987
3272
|
flowData.method === 'phone' ||
|
|
2988
3273
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'email' ||
|
|
2989
3274
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'phone') &&
|
|
@@ -3024,13 +3309,12 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3024
3309
|
}
|
|
3025
3310
|
setLoading(false);
|
|
3026
3311
|
});
|
|
3027
|
-
const
|
|
3312
|
+
const swapAnotherMethod = (newType) => __awaiter(void 0, void 0, void 0, function* () {
|
|
3028
3313
|
if (isEmail)
|
|
3029
3314
|
return;
|
|
3030
3315
|
setLoading(true);
|
|
3031
3316
|
try {
|
|
3032
3317
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
3033
|
-
const newType = otpType === 'phone-sms' ? 'phone-zalo' : 'phone-sms';
|
|
3034
3318
|
let res;
|
|
3035
3319
|
if (isUpdatePhone) {
|
|
3036
3320
|
if (newType === 'phone-sms') {
|
|
@@ -3039,6 +3323,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3039
3323
|
else if (newType === 'phone-zalo') {
|
|
3040
3324
|
res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
3041
3325
|
}
|
|
3326
|
+
else if (newType === 'phone-whatsapp') {
|
|
3327
|
+
res = yield resendUpdatePhoneWhatsAppOTP(phoneNumber, areaCode);
|
|
3328
|
+
}
|
|
3042
3329
|
}
|
|
3043
3330
|
else {
|
|
3044
3331
|
if (newType === 'phone-sms') {
|
|
@@ -3047,6 +3334,9 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3047
3334
|
else if (newType === 'phone-zalo') {
|
|
3048
3335
|
res = yield resendZaloOTP(phoneNumber, areaCode);
|
|
3049
3336
|
}
|
|
3337
|
+
else if (newType === 'phone-whatsapp') {
|
|
3338
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
3339
|
+
}
|
|
3050
3340
|
}
|
|
3051
3341
|
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
3052
3342
|
setError(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
@@ -3096,7 +3386,13 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3096
3386
|
: 'ssov2.otp.phone.description', {
|
|
3097
3387
|
email,
|
|
3098
3388
|
phone,
|
|
3099
|
-
method:
|
|
3389
|
+
method: isSMS
|
|
3390
|
+
? 'SMS'
|
|
3391
|
+
: isZalo
|
|
3392
|
+
? 'Zalo'
|
|
3393
|
+
: isWhatsApp
|
|
3394
|
+
? 'WhatsApp'
|
|
3395
|
+
: '',
|
|
3100
3396
|
}),
|
|
3101
3397
|
} }))),
|
|
3102
3398
|
React__default.createElement(Stack, { mt: 24, spacing: 8 },
|
|
@@ -3126,21 +3422,28 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3126
3422
|
count: resendTime,
|
|
3127
3423
|
})))),
|
|
3128
3424
|
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
|
-
|
|
3425
|
+
!isEmail && (React__default.createElement(React__default.Fragment, null,
|
|
3426
|
+
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', {
|
|
3427
|
+
method: 'WhatsApp',
|
|
3428
|
+
}))),
|
|
3429
|
+
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', {
|
|
3430
|
+
method: 'Zalo',
|
|
3431
|
+
}))),
|
|
3432
|
+
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', {
|
|
3433
|
+
method: 'SMS',
|
|
3434
|
+
})))))));
|
|
3132
3435
|
};
|
|
3133
3436
|
|
|
3134
3437
|
const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
3135
3438
|
const { t } = useTranslations();
|
|
3136
3439
|
const { onClose, setTracking } = useSSOState();
|
|
3137
|
-
const { setUserInfo, flowData } = useSSOV2Store();
|
|
3440
|
+
const { setUserInfo, flowData, abTestFlow } = useSSOV2Store();
|
|
3138
3441
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
3139
3442
|
const phone = config === null || config === void 0 ? void 0 : config.phone;
|
|
3140
3443
|
const method = config === null || config === void 0 ? void 0 : config.method;
|
|
3141
3444
|
const email = config === null || config === void 0 ? void 0 : config.email;
|
|
3142
|
-
const trackingCategory = `SSO - Sign In via ${email ? 'Email' : method}`;
|
|
3143
|
-
const trackingAction =
|
|
3445
|
+
const trackingCategory = `SSO - Sign In via ${email ? 'Email' : method}_Phone_Adoption_Test_${abTestFlow}`;
|
|
3446
|
+
const trackingAction = `Welcome Back`;
|
|
3144
3447
|
useEffect(() => {
|
|
3145
3448
|
if (!hidden) {
|
|
3146
3449
|
setErrMsg('');
|
|
@@ -3210,7 +3513,7 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3210
3513
|
const isEmailFlow = isEmailFlowFn(flowData);
|
|
3211
3514
|
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
3212
3515
|
if (!phone && !!email) {
|
|
3213
|
-
if (isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
3516
|
+
if (isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) && abTestFlow !== 'B') {
|
|
3214
3517
|
useSSOV2Store.setState((s) => ({
|
|
3215
3518
|
flowData: Object.assign(Object.assign({}, s.flowData), { isVerifyPhone: true }),
|
|
3216
3519
|
}));
|
|
@@ -3282,7 +3585,7 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3282
3585
|
t('ssov2.password.title2')),
|
|
3283
3586
|
React__default.createElement(Text, { size: "p4" }, t('ssov2.password.description'))),
|
|
3284
3587
|
React__default.createElement(Stack, { mt: 24, spacing: 8 },
|
|
3285
|
-
React__default.createElement(PasswordInput, { name: "password", placeholder:
|
|
3588
|
+
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
3589
|
React__default.createElement(Group, { spacing: 8, align: "center", style: {
|
|
3287
3590
|
height: 40,
|
|
3288
3591
|
} },
|
|
@@ -3301,6 +3604,7 @@ const SetupLater = ({ style = {} }) => {
|
|
|
3301
3604
|
const { currentStepIndex, steps, addStep, goNext } = useSSOSteps();
|
|
3302
3605
|
const currentStep = steps[currentStepIndex];
|
|
3303
3606
|
const onClickSetupLater = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3607
|
+
var _a;
|
|
3304
3608
|
if (loading)
|
|
3305
3609
|
return;
|
|
3306
3610
|
setLoading(true);
|
|
@@ -3309,7 +3613,9 @@ const SetupLater = ({ style = {} }) => {
|
|
|
3309
3613
|
((currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.VERIFY_PHONE ||
|
|
3310
3614
|
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.FORGOT_PASSWORD_PHONE)) {
|
|
3311
3615
|
addStep({
|
|
3312
|
-
type:
|
|
3616
|
+
type: ((_a = currentStep.config) === null || _a === void 0 ? void 0 : _a.afterAction) === 'update-email'
|
|
3617
|
+
? SSOStepTypeType.UPDATE_EMAIL
|
|
3618
|
+
: SSOStepTypeType.SETUP_FULL,
|
|
3313
3619
|
config: {
|
|
3314
3620
|
userInfo,
|
|
3315
3621
|
},
|
|
@@ -3328,7 +3634,8 @@ const SetupLater = ({ style = {} }) => {
|
|
|
3328
3634
|
goNext();
|
|
3329
3635
|
}
|
|
3330
3636
|
else {
|
|
3331
|
-
|
|
3637
|
+
const isResetPasswordFlow = isResetPasswordViePhoneFlowFn(steps);
|
|
3638
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(!isResetPasswordFlow);
|
|
3332
3639
|
}
|
|
3333
3640
|
setLoading(false);
|
|
3334
3641
|
});
|
|
@@ -3340,10 +3647,10 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3340
3647
|
const { t } = useTranslations();
|
|
3341
3648
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
3342
3649
|
const { setTracking, locale } = useSSOState();
|
|
3343
|
-
const { flowData } = useSSOV2Store();
|
|
3650
|
+
const { flowData, abTestFlow } = useSSOV2Store();
|
|
3344
3651
|
const trackingMethod = flowData.method;
|
|
3345
|
-
const trackingCategory = `SSO - Sign In via ${trackingMethod}`;
|
|
3346
|
-
const trackingAction =
|
|
3652
|
+
const trackingCategory = `SSO - Sign In via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`;
|
|
3653
|
+
const trackingAction = `Forgot Password`;
|
|
3347
3654
|
useEffect(() => {
|
|
3348
3655
|
if (!hidden) {
|
|
3349
3656
|
setErrMsg('');
|
|
@@ -3355,7 +3662,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3355
3662
|
}, [hidden]);
|
|
3356
3663
|
const [loading, setLoading] = React__default.useState(false);
|
|
3357
3664
|
const { addStep, goNext } = useSSOSteps();
|
|
3358
|
-
const
|
|
3665
|
+
const onClickContinueWhatsApp = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3359
3666
|
var _a, _b;
|
|
3360
3667
|
setLoading(true);
|
|
3361
3668
|
try {
|
|
@@ -3368,6 +3675,49 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3368
3675
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3369
3676
|
let res;
|
|
3370
3677
|
if (!((_a = userExist._data) === null || _a === void 0 ? void 0 : _a.provider)) {
|
|
3678
|
+
res = yield registerBySendWhatsAppOTP(phoneNumber, areaCode);
|
|
3679
|
+
}
|
|
3680
|
+
else {
|
|
3681
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
3682
|
+
}
|
|
3683
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
3684
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3685
|
+
return setLoading(false);
|
|
3686
|
+
}
|
|
3687
|
+
addStep({
|
|
3688
|
+
type: SSOStepTypeType.OTP,
|
|
3689
|
+
config: {
|
|
3690
|
+
phone,
|
|
3691
|
+
otpType: 'phone-whatsapp',
|
|
3692
|
+
afterAction: config.afterAction || 'forgot',
|
|
3693
|
+
provider: (_b = userExist._data) === null || _b === void 0 ? void 0 : _b.provider,
|
|
3694
|
+
},
|
|
3695
|
+
});
|
|
3696
|
+
goNext();
|
|
3697
|
+
}
|
|
3698
|
+
else {
|
|
3699
|
+
setErrMsg(getErrorTextFromCode(t, userExist === null || userExist === void 0 ? void 0 : userExist.code));
|
|
3700
|
+
}
|
|
3701
|
+
}
|
|
3702
|
+
catch (e) {
|
|
3703
|
+
console.error(e);
|
|
3704
|
+
setErrMsg(getErrorTextFromCode(t, ''));
|
|
3705
|
+
}
|
|
3706
|
+
setLoading(false);
|
|
3707
|
+
});
|
|
3708
|
+
const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3709
|
+
var _c, _d;
|
|
3710
|
+
setLoading(true);
|
|
3711
|
+
try {
|
|
3712
|
+
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
3713
|
+
if (!areaCode || !phoneNumber || !phone) {
|
|
3714
|
+
setErrMsg(t('ssov2.validate.phone.required'));
|
|
3715
|
+
return setLoading(false);
|
|
3716
|
+
}
|
|
3717
|
+
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
3718
|
+
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3719
|
+
let res;
|
|
3720
|
+
if (!((_c = userExist._data) === null || _c === void 0 ? void 0 : _c.provider)) {
|
|
3371
3721
|
res = yield registerBySendZaloOTP(phoneNumber, areaCode);
|
|
3372
3722
|
}
|
|
3373
3723
|
else {
|
|
@@ -3383,7 +3733,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3383
3733
|
phone,
|
|
3384
3734
|
otpType: 'phone-zalo',
|
|
3385
3735
|
afterAction: config.afterAction || 'forgot',
|
|
3386
|
-
provider: (
|
|
3736
|
+
provider: (_d = userExist._data) === null || _d === void 0 ? void 0 : _d.provider,
|
|
3387
3737
|
},
|
|
3388
3738
|
});
|
|
3389
3739
|
goNext();
|
|
@@ -3399,7 +3749,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3399
3749
|
setLoading(false);
|
|
3400
3750
|
});
|
|
3401
3751
|
const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3402
|
-
var
|
|
3752
|
+
var _e, _f;
|
|
3403
3753
|
setLoading(true);
|
|
3404
3754
|
try {
|
|
3405
3755
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
@@ -3410,7 +3760,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3410
3760
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
3411
3761
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3412
3762
|
let res;
|
|
3413
|
-
if (!((
|
|
3763
|
+
if (!((_e = userExist._data) === null || _e === void 0 ? void 0 : _e.provider)) {
|
|
3414
3764
|
res = yield registerBySendPhoneOTP(phoneNumber, areaCode);
|
|
3415
3765
|
}
|
|
3416
3766
|
else {
|
|
@@ -3426,7 +3776,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3426
3776
|
phone,
|
|
3427
3777
|
otpType: 'phone-sms',
|
|
3428
3778
|
afterAction: config.afterAction || 'forgot',
|
|
3429
|
-
provider: (
|
|
3779
|
+
provider: (_f = userExist._data) === null || _f === void 0 ? void 0 : _f.provider,
|
|
3430
3780
|
},
|
|
3431
3781
|
});
|
|
3432
3782
|
goNext();
|
|
@@ -3460,8 +3810,9 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3460
3810
|
};
|
|
3461
3811
|
}, []) }),
|
|
3462
3812
|
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: "
|
|
3813
|
+
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'))),
|
|
3814
|
+
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'))),
|
|
3815
|
+
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
3816
|
React__default.createElement(SetupLater, null))));
|
|
3466
3817
|
};
|
|
3467
3818
|
|
|
@@ -3490,12 +3841,12 @@ const SSOPasswordWithConfirm = (_a) => {
|
|
|
3490
3841
|
form.values.confirmPassword && form.validateField('confirmPassword');
|
|
3491
3842
|
}, 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
3843
|
React__default.createElement(Stack, { spacing: 8 },
|
|
3493
|
-
React__default.createElement(Group, { spacing: 4, align: "
|
|
3844
|
+
React__default.createElement(Group, { spacing: 4, align: "flex-start" },
|
|
3494
3845
|
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: "
|
|
3846
|
+
React__default.createElement(Text, { size: "n1", style: { flex: 1 } }, t('ssov2.passwordForgotSetup.field.password.atLeast8Chars'))),
|
|
3847
|
+
React__default.createElement(Group, { spacing: 4, align: "flex-start" },
|
|
3497
3848
|
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')))),
|
|
3849
|
+
React__default.createElement(Text, { size: "n1", style: { flex: 1 } }, t('ssov2.passwordForgotSetup.field.password.atLeastOneUpper')))),
|
|
3499
3850
|
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
3851
|
};
|
|
3501
3852
|
|
|
@@ -3505,11 +3856,11 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3505
3856
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
3506
3857
|
const { setTracking, onClose } = useSSOState();
|
|
3507
3858
|
const { addStep, goNext } = useSSOSteps();
|
|
3508
|
-
const { flowData, setUserInfo } = useSSOV2Store();
|
|
3859
|
+
const { flowData, setUserInfo, source, abTestFlow } = useSSOV2Store();
|
|
3509
3860
|
const trackingMethod = flowData.method;
|
|
3510
3861
|
const trackingCategory = flowData.flow === 'login'
|
|
3511
|
-
? `SSO - Sign In via ${trackingMethod}`
|
|
3512
|
-
: `SSO - Sign Up via ${trackingMethod}`;
|
|
3862
|
+
? `SSO - Sign In via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`
|
|
3863
|
+
: `SSO - Sign Up via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`;
|
|
3513
3864
|
const trackingAction = `Setup Password`;
|
|
3514
3865
|
useEffect(() => {
|
|
3515
3866
|
if (!hidden) {
|
|
@@ -3582,7 +3933,11 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3582
3933
|
// Email
|
|
3583
3934
|
if (isEmailFlowFn(flowData)) {
|
|
3584
3935
|
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
3585
|
-
|
|
3936
|
+
const careOnboardingAndNotVerifiedYet = isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) &&
|
|
3937
|
+
source === 'care_onboarding';
|
|
3938
|
+
const abTestFlowAAndNotVerifiedYet = isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) && abTestFlow !== 'B';
|
|
3939
|
+
if (careOnboardingAndNotVerifiedYet ||
|
|
3940
|
+
abTestFlowAAndNotVerifiedYet) {
|
|
3586
3941
|
addStep({
|
|
3587
3942
|
type: SSOStepTypeType.VERIFY_PHONE,
|
|
3588
3943
|
config: {
|
|
@@ -3591,6 +3946,15 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3591
3946
|
});
|
|
3592
3947
|
goNext();
|
|
3593
3948
|
}
|
|
3949
|
+
else if (!isSetupFullInfoAlready(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data, flowData)) {
|
|
3950
|
+
addStep({
|
|
3951
|
+
type: SSOStepTypeType.SETUP_FULL,
|
|
3952
|
+
config: {
|
|
3953
|
+
userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
|
|
3954
|
+
},
|
|
3955
|
+
});
|
|
3956
|
+
goNext();
|
|
3957
|
+
}
|
|
3594
3958
|
else {
|
|
3595
3959
|
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3596
3960
|
}
|
|
@@ -3650,16 +4014,16 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3650
4014
|
const [loading, setLoading] = React__default.useState(false);
|
|
3651
4015
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
3652
4016
|
const { locale, setTracking } = useSSOState();
|
|
3653
|
-
const { flowData, userInfo } = useSSOV2Store();
|
|
4017
|
+
const { flowData, userInfo, abTestFlow } = useSSOV2Store();
|
|
3654
4018
|
const { steps } = useSSOSteps();
|
|
3655
4019
|
const { afterAction, provider } = config || {};
|
|
3656
4020
|
const trackingMethod = flowData === null || flowData === void 0 ? void 0 : flowData.method;
|
|
3657
4021
|
const trackingCategory = userInfo && !userInfo.first_time_login
|
|
3658
|
-
? `SSO - Existing User via ${trackingMethod}`
|
|
4022
|
+
? `SSO - Existing User via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`
|
|
3659
4023
|
: isVerifyPhoneInTheSignUp(steps, flowData)
|
|
3660
|
-
? `SSO - Sign Up via ${trackingMethod}`
|
|
3661
|
-
: `SSO - Sign In via ${trackingMethod}`;
|
|
3662
|
-
const trackingAction =
|
|
4024
|
+
? `SSO - Sign Up via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`
|
|
4025
|
+
: `SSO - Sign In via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`;
|
|
4026
|
+
const trackingAction = `Verify Phone Number`;
|
|
3663
4027
|
useEffect(() => {
|
|
3664
4028
|
if (!hidden) {
|
|
3665
4029
|
setErrMsg('');
|
|
@@ -3755,6 +4119,48 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3755
4119
|
}
|
|
3756
4120
|
setLoading(false);
|
|
3757
4121
|
});
|
|
4122
|
+
const onClickContinueWhatsApp = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
4123
|
+
setLoading(true);
|
|
4124
|
+
try {
|
|
4125
|
+
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
4126
|
+
if (!areaCode || !phoneNumber || !phone) {
|
|
4127
|
+
setErrMsg(t('ssov2.validate.phone.required'));
|
|
4128
|
+
return setLoading(false);
|
|
4129
|
+
}
|
|
4130
|
+
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
4131
|
+
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
4132
|
+
if (!userExist._data) {
|
|
4133
|
+
const res = yield resendUpdatePhoneWhatsAppOTP(phoneNumber, areaCode);
|
|
4134
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
4135
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
4136
|
+
return setLoading(false);
|
|
4137
|
+
}
|
|
4138
|
+
addStep({
|
|
4139
|
+
type: SSOStepTypeType.OTP,
|
|
4140
|
+
config: {
|
|
4141
|
+
provider,
|
|
4142
|
+
phone,
|
|
4143
|
+
otpType: 'phone-whatsapp',
|
|
4144
|
+
isUpdatePhone: true,
|
|
4145
|
+
afterAction: afterAction || 'setup',
|
|
4146
|
+
},
|
|
4147
|
+
});
|
|
4148
|
+
goNext();
|
|
4149
|
+
}
|
|
4150
|
+
else {
|
|
4151
|
+
setErrMsg(t('ssov2.phone.alreadyUsed'));
|
|
4152
|
+
}
|
|
4153
|
+
}
|
|
4154
|
+
else {
|
|
4155
|
+
setErrMsg(getErrorTextFromCode(t, userExist === null || userExist === void 0 ? void 0 : userExist.code));
|
|
4156
|
+
}
|
|
4157
|
+
}
|
|
4158
|
+
catch (e) {
|
|
4159
|
+
console.log(e);
|
|
4160
|
+
setErrMsg(getErrorTextFromCode(t, ''));
|
|
4161
|
+
}
|
|
4162
|
+
setLoading(false);
|
|
4163
|
+
});
|
|
3758
4164
|
return (React__default.createElement("div", { style: {
|
|
3759
4165
|
display: hidden ? 'none' : 'block',
|
|
3760
4166
|
} },
|
|
@@ -3776,8 +4182,9 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3776
4182
|
'data-event-category': trackingCategory,
|
|
3777
4183
|
};
|
|
3778
4184
|
}, []) })),
|
|
3779
|
-
React__default.createElement(Button, { size: "lg", variant: "primary", onClick:
|
|
3780
|
-
React__default.createElement(Button, { size: "
|
|
4185
|
+
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'))),
|
|
4186
|
+
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'))),
|
|
4187
|
+
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
4188
|
source !== 'care_onboarding' && source !== 'ecom' && React__default.createElement(SetupLater, null)))));
|
|
3782
4189
|
};
|
|
3783
4190
|
|
|
@@ -3858,7 +4265,7 @@ loading, tracking, }) => {
|
|
|
3858
4265
|
return;
|
|
3859
4266
|
form.getInputProps('dob').onBlur(e);
|
|
3860
4267
|
} })),
|
|
3861
|
-
needEmail && (React__default.createElement(Input, Object.assign({ name: "email", type: "email", label: t('ssov2.setup.field.email.label'), disabled: isEmailDisable || loading, required:
|
|
4268
|
+
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
4269
|
display: isEmailDisable ? 'none' : 'block',
|
|
3863
4270
|
} }, form.getInputProps('email'))))));
|
|
3864
4271
|
};
|
|
@@ -3893,7 +4300,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3893
4300
|
var _a, _b, _c;
|
|
3894
4301
|
const { onClose, setTracking } = useSSOState();
|
|
3895
4302
|
const { t } = useTranslations();
|
|
3896
|
-
const { setupSource, flowData } = useSSOV2Store();
|
|
4303
|
+
const { setupSource, flowData, abTestFlow } = useSSOV2Store();
|
|
3897
4304
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
3898
4305
|
const userInfo = config === null || config === void 0 ? void 0 : config.userInfo;
|
|
3899
4306
|
const [loading, setLoading] = React__default.useState(false);
|
|
@@ -3919,6 +4326,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3919
4326
|
undefined;
|
|
3920
4327
|
const needEmail = setupSource === 'care' ||
|
|
3921
4328
|
setupSource === 'ecom' ||
|
|
4329
|
+
setupSource === 'community' ||
|
|
3922
4330
|
!(flowData === null || flowData === void 0 ? void 0 : flowData.isVerifyPhone) ||
|
|
3923
4331
|
authMethod === 'facebook' ||
|
|
3924
4332
|
provider === 'facebook';
|
|
@@ -3928,8 +4336,8 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3928
4336
|
provider === 'google' ||
|
|
3929
4337
|
provider === 'email')) ||
|
|
3930
4338
|
(!!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email_verified_at));
|
|
3931
|
-
const trackingCategory = `SSO - ${authFlow === 'signup' ? 'Sign Up' : 'Existing Users'} via ${authMethod || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.provider)}`;
|
|
3932
|
-
const trackingAction =
|
|
4339
|
+
const trackingCategory = `SSO - ${authFlow === 'signup' ? 'Sign Up' : 'Existing Users'} via ${authMethod || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.provider)}_Phone_Adoption_Test_${abTestFlow}`;
|
|
4340
|
+
const trackingAction = `Add Information`;
|
|
3933
4341
|
useEffect(() => {
|
|
3934
4342
|
if (!hidden) {
|
|
3935
4343
|
setErrMsg('');
|
|
@@ -4039,9 +4447,9 @@ const SSOUpdateEmailScreen = ({ hidden, }) => {
|
|
|
4039
4447
|
const { t } = useTranslations();
|
|
4040
4448
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
4041
4449
|
const { setTracking } = useSSOState();
|
|
4042
|
-
const { flowData } = useSSOV2Store();
|
|
4043
|
-
const trackingCategory = `SSO - Existing User via ${flowData === null || flowData === void 0 ? void 0 : flowData.method}`;
|
|
4044
|
-
const trackingAction =
|
|
4450
|
+
const { flowData, abTestFlow } = useSSOV2Store();
|
|
4451
|
+
const trackingCategory = `SSO - Existing User via ${flowData === null || flowData === void 0 ? void 0 : flowData.method}_Phone_Adoption_Test_${abTestFlow}`;
|
|
4452
|
+
const trackingAction = `Continue With Email`;
|
|
4045
4453
|
useEffect(() => {
|
|
4046
4454
|
if (!hidden) {
|
|
4047
4455
|
setErrMsg('');
|
|
@@ -4100,7 +4508,7 @@ const SSOUpdateEmailScreen = ({ hidden, }) => {
|
|
|
4100
4508
|
React__default.createElement(Stack, { spacing: 8 },
|
|
4101
4509
|
React__default.createElement(Text, { size: "s1", weight: "semiBold" }, t('ssov2.updateEmail.title')),
|
|
4102
4510
|
React__default.createElement(Text, { size: "p4" }, t('ssov2.updateEmail.description'))),
|
|
4103
|
-
React__default.createElement(Input, { name: "email", placeholder:
|
|
4511
|
+
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
4512
|
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
4513
|
};
|
|
4106
4514
|
|
|
@@ -4150,7 +4558,7 @@ if (!String.prototype.capitalize) {
|
|
|
4150
4558
|
};
|
|
4151
4559
|
}
|
|
4152
4560
|
const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
4153
|
-
const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, forceReloadOnClose, } = useSSOV2Store();
|
|
4561
|
+
const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, forceReloadOnClose, setABTestFlow, } = useSSOV2Store();
|
|
4154
4562
|
useEffect(() => {
|
|
4155
4563
|
setMounted(true);
|
|
4156
4564
|
return () => {
|
|
@@ -4168,6 +4576,36 @@ const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
|
4168
4576
|
useEffect(() => {
|
|
4169
4577
|
setOnCloseProp(onCloseProps);
|
|
4170
4578
|
}, [onCloseProps]);
|
|
4579
|
+
useEffect(() => {
|
|
4580
|
+
const site = MAP_DOMAIN_BY_LOCALE[locale];
|
|
4581
|
+
const previousABTestingFlow = getCookie('abTestingFlow');
|
|
4582
|
+
fetchFeatureFlag(site).then((data) => {
|
|
4583
|
+
if (data.is_enabled && isSupportProduct(data.products)) {
|
|
4584
|
+
if (previousABTestingFlow) {
|
|
4585
|
+
setABTestFlow(previousABTestingFlow);
|
|
4586
|
+
}
|
|
4587
|
+
else {
|
|
4588
|
+
const randomBetween100Percent = Math.floor(Math.random() * 100 + 1);
|
|
4589
|
+
const aFlow = data.a_percentage;
|
|
4590
|
+
if (randomBetween100Percent <= aFlow) {
|
|
4591
|
+
setCookie('abTestingFlow', 'A', {
|
|
4592
|
+
days: 30,
|
|
4593
|
+
});
|
|
4594
|
+
setABTestFlow('A');
|
|
4595
|
+
}
|
|
4596
|
+
else {
|
|
4597
|
+
setCookie('abTestingFlow', 'B', {
|
|
4598
|
+
days: 30,
|
|
4599
|
+
});
|
|
4600
|
+
setABTestFlow('B');
|
|
4601
|
+
}
|
|
4602
|
+
}
|
|
4603
|
+
}
|
|
4604
|
+
else {
|
|
4605
|
+
deleteCookie('abTestingFlow');
|
|
4606
|
+
}
|
|
4607
|
+
});
|
|
4608
|
+
}, [locale]);
|
|
4171
4609
|
if (!isOpen) {
|
|
4172
4610
|
return null;
|
|
4173
4611
|
}
|