@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/ssoV2.js
CHANGED
|
@@ -2,58 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('./tslib.es6-
|
|
5
|
+
var tslib_es6 = require('./tslib.es6-19c55cc8.js');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var miscCookieHelper = require('./miscCookieHelper.js');
|
|
8
|
+
var index$6 = require('./index-b51c88e2.js');
|
|
9
|
+
var store = require('./store-a713b63a.js');
|
|
10
|
+
var constantsIsProduction = require('./constantsIsProduction.js');
|
|
9
11
|
var arrow = require('@hhgtech/icons/arrow');
|
|
10
12
|
var core$1 = require('@hhgtech/icons/core');
|
|
11
|
-
var index$2 = require('./index-
|
|
12
|
-
var logoIcon = require('./logoIcon-
|
|
13
|
-
var index$4 = require('./index-
|
|
14
|
-
var index$1 = require('./index-
|
|
13
|
+
var index$2 = require('./index-29a53d3c.js');
|
|
14
|
+
var logoIcon = require('./logoIcon-f8693e15.js');
|
|
15
|
+
var index$4 = require('./index-fd3183da.js');
|
|
16
|
+
var index$1 = require('./index-24744e1d.js');
|
|
15
17
|
var core = require('@mantine/core');
|
|
16
18
|
require('@mantine/dates');
|
|
17
|
-
require('./index-
|
|
18
|
-
require('./index-
|
|
19
|
-
var useMantineLocale = require('./useMantineLocale-
|
|
20
|
-
var index$3 = require('./index-
|
|
21
|
-
var index = require('./index-
|
|
19
|
+
require('./index-591ad0ca.js');
|
|
20
|
+
var index$5 = require('./index-3ae84344.js');
|
|
21
|
+
var useMantineLocale = require('./useMantineLocale-0cc2d977.js');
|
|
22
|
+
var index$3 = require('./index-15a499ed.js');
|
|
23
|
+
var index = require('./index-193192d9.js');
|
|
22
24
|
require('@mantine/hooks');
|
|
23
|
-
require('./utils-
|
|
24
|
-
require('./other-
|
|
25
|
-
require('./index-
|
|
26
|
-
var Locale = require('./Locale-
|
|
27
|
-
var
|
|
25
|
+
require('./utils-ca036bb9.js');
|
|
26
|
+
require('./other-50a0b3de.js');
|
|
27
|
+
require('./index-997d3769.js');
|
|
28
|
+
var Locale = require('./Locale-46500920.js');
|
|
29
|
+
var useScreenSize = require('./useScreenSize-c85a7f01.js');
|
|
30
|
+
var Google = require('./Google-3e0ecf57.js');
|
|
28
31
|
var PhoneInputBase = require('react-phone-number-input');
|
|
32
|
+
var index$7 = require('./index-24dc48d7.js');
|
|
33
|
+
var constantsDomainLocales = require('./constantsDomainLocales.js');
|
|
29
34
|
var styled = require('@emotion/styled');
|
|
30
35
|
var cn = require('classnames');
|
|
31
36
|
var other = require('@hhgtech/icons/other');
|
|
32
37
|
var debounce = require('lodash/debounce');
|
|
33
38
|
var throttle = require('lodash/throttle');
|
|
34
39
|
var Flags = require('react-phone-number-input/flags');
|
|
35
|
-
var useScreenSize = require('./useScreenSize-b40e4305.js');
|
|
36
40
|
var vaul = require('vaul');
|
|
37
|
-
var utils = require('./utils-
|
|
38
|
-
var index$6 = require('./index-e82361de.js');
|
|
39
|
-
var constantsDomainLocales = require('./constantsDomainLocales.js');
|
|
41
|
+
var utils = require('./utils-44d3d6e7.js');
|
|
40
42
|
var form = require('@mantine/form');
|
|
41
43
|
var yup = require('yup');
|
|
42
44
|
var dayjs = require('dayjs');
|
|
43
|
-
var index$
|
|
45
|
+
var index$8 = require('./index-1a1895dc.js');
|
|
44
46
|
require('@mantine/carousel');
|
|
45
47
|
require('./miscTheme.js');
|
|
46
|
-
require('./useUniqueId-
|
|
48
|
+
require('./useUniqueId-98ff449d.js');
|
|
47
49
|
require('./constantsSite.js');
|
|
48
50
|
require('zustand');
|
|
49
|
-
require('./
|
|
50
|
-
require('./normalizeLink-79a136d4.js');
|
|
51
|
-
require('./miscCookieHelper.js');
|
|
51
|
+
require('./normalizeLink-28829417.js');
|
|
52
52
|
require('date-fns/locale');
|
|
53
53
|
require('./constantsRiskScreener.js');
|
|
54
|
-
require('./index.styles-
|
|
54
|
+
require('./index.styles-4b68abeb.js');
|
|
55
55
|
require('@mantine/notifications');
|
|
56
|
-
require('./translationsContext-
|
|
56
|
+
require('./translationsContext-eb09f732.js');
|
|
57
57
|
|
|
58
58
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
59
59
|
|
|
@@ -84,6 +84,23 @@ var Flags__default = /*#__PURE__*/_interopDefault(Flags);
|
|
|
84
84
|
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
85
85
|
var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
|
|
86
86
|
|
|
87
|
+
// const fakeData = {
|
|
88
|
+
const fetchFeatureFlag = (site) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
89
|
+
var _a, _b;
|
|
90
|
+
let data = null;
|
|
91
|
+
try {
|
|
92
|
+
const baseUrl = constantsIsProduction.isProduction
|
|
93
|
+
? 'https://mobile-be.hellohealthgroup.com'
|
|
94
|
+
: 'https://staging-mobile-be.hellohealthgroup.com';
|
|
95
|
+
const response = yield fetch(`${baseUrl}/api/feature-flag/v1/list?site=${site}`);
|
|
96
|
+
data = yield response.json();
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
data = null;
|
|
100
|
+
}
|
|
101
|
+
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');
|
|
102
|
+
});
|
|
103
|
+
|
|
87
104
|
const SSOStateContext = React.createContext({
|
|
88
105
|
locale: Locale.LOCALE.Vietnam,
|
|
89
106
|
onClose: () => false,
|
|
@@ -240,7 +257,8 @@ const isSocialFlowFn = (flowData) => {
|
|
|
240
257
|
const isPhoneFlowFn = (flowData) => {
|
|
241
258
|
return ((flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'sms' ||
|
|
242
259
|
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'zalo' ||
|
|
243
|
-
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'phone'
|
|
260
|
+
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'phone' ||
|
|
261
|
+
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'whatsapp');
|
|
244
262
|
};
|
|
245
263
|
const isEmailFlowFn = (flowData) => {
|
|
246
264
|
return (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'email';
|
|
@@ -253,6 +271,14 @@ const isResetPasswordFlowFn = (steps) => {
|
|
|
253
271
|
passwordForgotStep > 0 &&
|
|
254
272
|
passwordForgotStep > passwordStep);
|
|
255
273
|
};
|
|
274
|
+
const isResetPasswordViePhoneFlowFn = (steps) => {
|
|
275
|
+
// First -> Passsword -> Password Forgot Phone
|
|
276
|
+
const passwordStep = steps.findIndex((s) => s.type === store.SSOStepTypeType.PASSWORD);
|
|
277
|
+
const passwordForgotStep = steps.findIndex((s) => s.type === store.SSOStepTypeType.FORGOT_PASSWORD_PHONE);
|
|
278
|
+
return (passwordStep > 0 &&
|
|
279
|
+
passwordForgotStep > 0 &&
|
|
280
|
+
passwordForgotStep > passwordStep);
|
|
281
|
+
};
|
|
256
282
|
const isDisplayProgressBarFn = (flowData, step) => {
|
|
257
283
|
const showProgressBar = (step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.OTP ||
|
|
258
284
|
(step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.SETUP_FULL ||
|
|
@@ -267,29 +293,42 @@ const isDisplayProgressBarFn = (flowData, step) => {
|
|
|
267
293
|
isEmailFlowFn(flowData);
|
|
268
294
|
return showProgressBar && isWhiteListFlow;
|
|
269
295
|
};
|
|
270
|
-
const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo) => {
|
|
271
|
-
var _a, _b;
|
|
296
|
+
const getCurrentStepNumber = (flowData, { steps, currentStepIndex, abTestFlow, }, userInfo) => {
|
|
297
|
+
var _a, _b, _c;
|
|
272
298
|
const step = steps[currentStepIndex];
|
|
273
299
|
const isSocialFlow = isSocialFlowFn(flowData);
|
|
274
300
|
const isPhoneFlow = isPhoneFlowFn(flowData);
|
|
275
301
|
const isEmailFlow = isEmailFlowFn(flowData);
|
|
276
302
|
/** Social (Google, Facebook): FIRST => VERIFY_PHONE | OTP => STEP_FULL */
|
|
277
303
|
if (isSocialFlow) {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
304
|
+
// Ignore Phone in Community if in update email step
|
|
305
|
+
const isCommunityUpdateEmail = store.useSSOV2Store().setupSource === 'community' &&
|
|
306
|
+
((_a = steps[0]) === null || _a === void 0 ? void 0 : _a.type) === store.SSOStepTypeType.UPDATE_EMAIL;
|
|
307
|
+
const arrSteps = isCommunityUpdateEmail
|
|
308
|
+
? [
|
|
309
|
+
store.SSOStepTypeType.UPDATE_EMAIL,
|
|
310
|
+
store.SSOStepTypeType.OTP,
|
|
311
|
+
!userInfo || !store.isUserFinishedSetup(userInfo)
|
|
312
|
+
? store.SSOStepTypeType.SETUP_FULL
|
|
313
|
+
: undefined,
|
|
314
|
+
]
|
|
315
|
+
.flat()
|
|
316
|
+
.filter(Boolean)
|
|
317
|
+
: [
|
|
318
|
+
!isPhoneVerifedAlready(userInfo, flowData) && abTestFlow !== 'B'
|
|
319
|
+
? [store.SSOStepTypeType.VERIFY_PHONE, store.SSOStepTypeType.OTP]
|
|
320
|
+
: undefined,
|
|
321
|
+
isExistUpdateEmailStep(steps)
|
|
322
|
+
? (step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.OTP
|
|
323
|
+
? store.SSOStepTypeType.OTP
|
|
324
|
+
: store.SSOStepTypeType.UPDATE_EMAIL
|
|
325
|
+
: undefined,
|
|
326
|
+
!userInfo || !store.isUserFinishedSetup(userInfo)
|
|
327
|
+
? store.SSOStepTypeType.SETUP_FULL
|
|
328
|
+
: undefined,
|
|
329
|
+
]
|
|
330
|
+
.flat()
|
|
331
|
+
.filter(Boolean);
|
|
293
332
|
const previousStep = steps[currentStepIndex - 1];
|
|
294
333
|
return [
|
|
295
334
|
arrSteps.length,
|
|
@@ -303,7 +342,7 @@ const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo)
|
|
|
303
342
|
!isPhoneVerifedAlready(userInfo, flowData)
|
|
304
343
|
? store.SSOStepTypeType.OTP
|
|
305
344
|
: undefined,
|
|
306
|
-
!((
|
|
345
|
+
!((_b = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _b === void 0 ? void 0 : _b.is_pass)
|
|
307
346
|
? store.SSOStepTypeType.FORGOT_PASSWORD_SETUP
|
|
308
347
|
: undefined,
|
|
309
348
|
!isSetupFullInfoAlready(userInfo, flowData)
|
|
@@ -345,8 +384,11 @@ const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo)
|
|
|
345
384
|
];
|
|
346
385
|
}
|
|
347
386
|
if (isEmailFlow) {
|
|
348
|
-
const
|
|
349
|
-
const
|
|
387
|
+
const hasPhoneStepCase1 = !isPhoneVerifedAlready(userInfo, flowData) && abTestFlow !== 'B';
|
|
388
|
+
const hasPhoneStepCase2 = !isPhoneVerifedAlready(userInfo, flowData) &&
|
|
389
|
+
store.useSSOV2Store.getState().source === 'care_onboarding';
|
|
390
|
+
const hasPasswordStep = !((_c = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _c === void 0 ? void 0 : _c.is_pass);
|
|
391
|
+
const hasPhoneStep = hasPhoneStepCase1 || hasPhoneStepCase2;
|
|
350
392
|
const hasSetupFullStep = !isSetupFullInfoAlready(userInfo, flowData);
|
|
351
393
|
const isForgotPasswordSetup = steps.find((s) => s.type === store.SSOStepTypeType.FORGOT_PASSWORD_SETUP);
|
|
352
394
|
if (!hasPasswordStep && !hasPhoneStep && !hasSetupFullStep)
|
|
@@ -380,10 +422,10 @@ const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo)
|
|
|
380
422
|
const ProgressBar = () => {
|
|
381
423
|
// const initUserInfo = useRef<UserInfo | undefined | null>()
|
|
382
424
|
const { steps, currentStepIndex } = store.useSSOSteps();
|
|
383
|
-
const { flowData, userInfo } = store.useSSOV2Store();
|
|
425
|
+
const { flowData, userInfo, abTestFlow } = store.useSSOV2Store();
|
|
384
426
|
/** No need update state IF userInfo is changed */
|
|
385
427
|
const initUserInfo = React.useMemo(() => userInfo, [userInfo]);
|
|
386
|
-
const [totalStepNumber, activeStepNumber] = getCurrentStepNumber(flowData, { steps, currentStepIndex }, initUserInfo);
|
|
428
|
+
const [totalStepNumber, activeStepNumber] = getCurrentStepNumber(flowData, { steps, currentStepIndex, abTestFlow }, initUserInfo);
|
|
387
429
|
if (!activeStepNumber || totalStepNumber === 1)
|
|
388
430
|
return null;
|
|
389
431
|
return (React__default["default"].createElement(core.Flex, { gap: 2 }, Array.from({ length: totalStepNumber }).map((_, idx) => {
|
|
@@ -472,7 +514,12 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
472
514
|
borderRadius: '100%',
|
|
473
515
|
}, 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" },
|
|
474
516
|
React__default["default"].createElement(arrow.ChevronLeft, null))),
|
|
475
|
-
showLogo && (React__default["default"].createElement(
|
|
517
|
+
showLogo && (React__default["default"].createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
|
|
518
|
+
React__default["default"].createElement(logoIcon.LogoIcon, { type: logoType, height: 32, width: 'unset' }),
|
|
519
|
+
locale === Locale.LOCALE.Indonesia && (React__default["default"].createElement(useScreenSize.ImageWrap, { alt: "", src: index$5.CommonGAssets.getAssetPath('sehat-badge.png'), style: {
|
|
520
|
+
width: 56,
|
|
521
|
+
height: 23,
|
|
522
|
+
} })))),
|
|
476
523
|
showClose && (React__default["default"].createElement(index$4.Button, { variant: "white", style: {
|
|
477
524
|
width: 40,
|
|
478
525
|
height: 40,
|
|
@@ -625,11 +672,11 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
625
672
|
const { t } = index.useTranslations();
|
|
626
673
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
627
674
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
628
|
-
const { flowData } = store.useSSOV2Store();
|
|
675
|
+
const { flowData, abTestFlow } = store.useSSOV2Store();
|
|
629
676
|
const trackingCategory = flowData.flow === 'signup'
|
|
630
|
-
? `SSO - Sign Up via
|
|
631
|
-
:
|
|
632
|
-
const trackingAction =
|
|
677
|
+
? `SSO - Sign Up via Email_Phone_Adoption_Test_${abTestFlow}`
|
|
678
|
+
: `SSO - Sign In via Email_Phone_Adoption_Test_${abTestFlow}`;
|
|
679
|
+
const trackingAction = `Continue With Email`;
|
|
633
680
|
const { setTracking } = useSSOState();
|
|
634
681
|
React.useEffect(() => {
|
|
635
682
|
if (!hidden) {
|
|
@@ -712,7 +759,7 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
712
759
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
713
760
|
React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" }, t('ssov2.email.title')),
|
|
714
761
|
React__default["default"].createElement(index$3.Text, { size: "p4" }, t('ssov2.email.description'))),
|
|
715
|
-
React__default["default"].createElement(index$
|
|
762
|
+
React__default["default"].createElement(index$6.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" }),
|
|
716
763
|
React__default["default"].createElement(index$4.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'))));
|
|
717
764
|
};
|
|
718
765
|
|
|
@@ -815,6 +862,59 @@ const loginBySocial = (token, social) => tslib_es6.__awaiter(void 0, void 0, voi
|
|
|
815
862
|
});
|
|
816
863
|
});
|
|
817
864
|
|
|
865
|
+
// "phone_number": "906911910",
|
|
866
|
+
// "area_code":"+84",
|
|
867
|
+
const registerBySendWhatsAppOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
868
|
+
const formData = new FormData();
|
|
869
|
+
formData.append('phone_number', phone);
|
|
870
|
+
formData.append('area_code', areaCode);
|
|
871
|
+
formData.append('website_id', store.websiteId);
|
|
872
|
+
return store.fetchSSOV2Api(store.SSO_V2_PATHS.WHATSAPP.REGISTER_BY_SEND_OTP, {
|
|
873
|
+
method: 'POST',
|
|
874
|
+
body: formData,
|
|
875
|
+
});
|
|
876
|
+
});
|
|
877
|
+
// "phone_number": "906911910",
|
|
878
|
+
// "area_code":"+84",
|
|
879
|
+
const resendWhatsAppOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
880
|
+
const formData = new FormData();
|
|
881
|
+
formData.append('phone_number', phone);
|
|
882
|
+
formData.append('area_code', areaCode);
|
|
883
|
+
return store.fetchSSOV2Api(store.SSO_V2_PATHS.WHATSAPP.SEND_OTP, {
|
|
884
|
+
method: 'POST',
|
|
885
|
+
body: formData,
|
|
886
|
+
});
|
|
887
|
+
});
|
|
888
|
+
const resendUpdatePhoneWhatsAppOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
889
|
+
const formData = new FormData();
|
|
890
|
+
formData.append('phone_number', phone);
|
|
891
|
+
formData.append('area_code', areaCode);
|
|
892
|
+
return store.fetchSSOV2Api(store.SSO_V2_PATHS.WHATSAPP.UPDATE_PHONE_SEND_OTP, {
|
|
893
|
+
method: 'POST',
|
|
894
|
+
body: formData,
|
|
895
|
+
});
|
|
896
|
+
});
|
|
897
|
+
const verifyUpdatePhoneWhatsAppOTP = (phone, areaCode, otpCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
898
|
+
const formData = new FormData();
|
|
899
|
+
formData.append('phone_number', phone);
|
|
900
|
+
formData.append('otp_code', otpCode);
|
|
901
|
+
formData.append('area_code', areaCode);
|
|
902
|
+
return store.fetchSSOV2Api(store.SSO_V2_PATHS.WHATSAPP.UPDATE_PHONE_VERIFY_OTP, {
|
|
903
|
+
method: 'POST',
|
|
904
|
+
body: formData,
|
|
905
|
+
});
|
|
906
|
+
});
|
|
907
|
+
const verifyByWhatsAppOTP = (phone, areaCode, otpCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
908
|
+
const formData = new FormData();
|
|
909
|
+
formData.append('otp_code', otpCode);
|
|
910
|
+
formData.append('phone_number', phone);
|
|
911
|
+
formData.append('area_code', areaCode);
|
|
912
|
+
return store.fetchSSOV2Api(store.SSO_V2_PATHS.WHATSAPP.VERIFY_BY_OTP, {
|
|
913
|
+
method: 'POST',
|
|
914
|
+
body: formData,
|
|
915
|
+
});
|
|
916
|
+
});
|
|
917
|
+
|
|
818
918
|
// "phone_number": "906911910",
|
|
819
919
|
// "area_code":"+84",
|
|
820
920
|
const registerBySendZaloOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -871,9 +971,118 @@ const verifyUpdatePhoneZaloOTP = (phone, areaCode, otpCode) => tslib_es6.__await
|
|
|
871
971
|
});
|
|
872
972
|
});
|
|
873
973
|
|
|
974
|
+
// VietNam: Zalo - SMS
|
|
975
|
+
// Info: WhatsApp
|
|
976
|
+
// Malay: WhatsApp và SMS
|
|
977
|
+
const isFeatureWhatsAppEnabled = [
|
|
978
|
+
Locale.LOCALE.Indonesia,
|
|
979
|
+
Locale.LOCALE.Malaysia,
|
|
980
|
+
].includes(store.locale);
|
|
981
|
+
const isFeatureSMSEnabled = [Locale.LOCALE.Vietnam, Locale.LOCALE.Malaysia].includes(store.locale);
|
|
982
|
+
const isFeatureZaloEnabled = [Locale.LOCALE.Vietnam].includes(store.locale);
|
|
983
|
+
const isSupportProduct = (featureFlagsProduct) => {
|
|
984
|
+
const setupSource = store.useSSOV2Store.getState().setupSource || 'discover';
|
|
985
|
+
const isSupportDiscover = (featureFlagsProduct === null || featureFlagsProduct === void 0 ? void 0 : featureFlagsProduct.find((p) => p.name === 'discover')) &&
|
|
986
|
+
setupSource === 'discover';
|
|
987
|
+
const isSupportTogether = (featureFlagsProduct === null || featureFlagsProduct === void 0 ? void 0 : featureFlagsProduct.find((p) => p.name === 'together')) &&
|
|
988
|
+
setupSource === 'community';
|
|
989
|
+
const isSupportCare = (featureFlagsProduct === null || featureFlagsProduct === void 0 ? void 0 : featureFlagsProduct.find((p) => p.name === 'care')) &&
|
|
990
|
+
setupSource === 'care';
|
|
991
|
+
return isSupportDiscover || isSupportTogether || isSupportCare;
|
|
992
|
+
};
|
|
993
|
+
|
|
874
994
|
const MailIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "21", height: "20", viewBox: "0 0 21 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
875
995
|
React__default["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" })));
|
|
876
996
|
|
|
997
|
+
const PolicyContent = ({ legalTextType, trackingCategory, trackingAction, }) => {
|
|
998
|
+
var _a, _b;
|
|
999
|
+
const { t } = index.useTranslations();
|
|
1000
|
+
const { locale } = useSSOState();
|
|
1001
|
+
return (React__default["default"].createElement(core.Stack, { spacing: 24, sx: (theme) => ({
|
|
1002
|
+
marginTop: 56,
|
|
1003
|
+
[theme.fn.smallerThan('sm')]: {
|
|
1004
|
+
marginTop: 'auto',
|
|
1005
|
+
paddingTop: 50,
|
|
1006
|
+
},
|
|
1007
|
+
}) },
|
|
1008
|
+
React__default["default"].createElement(index$7.Spoiler, { maxHeight: 74, showLabel: React__default["default"].createElement(index$3.Text, { size: "p5", color: "gray.6", underline: true, align: "left" }, t('home.seeMore')), hideLabel: React__default["default"].createElement(index$3.Text, { size: "p5", color: "gray.6", underline: true, align: "left" }, t('articlePage.showLess')) },
|
|
1009
|
+
React__default["default"].createElement(index$3.Text, { size: "p5", color: "gray.6" }, t(legalTextType === 'community'
|
|
1010
|
+
? 'ssov2.policyText.community'
|
|
1011
|
+
: 'ssov2.policyText', {
|
|
1012
|
+
privacy: (React__default["default"].createElement("a", { href: `https://${constantsDomainLocales.domainLocales[locale]}/static/${((_a = index$2.STATIC_PAGES[locale]) === null || _a === void 0 ? void 0 : _a.PRIVACY_POLICY) || ''}`, target: "_blank", style: {
|
|
1013
|
+
color: '#262626',
|
|
1014
|
+
textDecoration: 'underline',
|
|
1015
|
+
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Privacy Policy", rel: "noreferrer" }, t('ssov2.policyText.privacy'))),
|
|
1016
|
+
terms: (React__default["default"].createElement("a", { href: `https://${constantsDomainLocales.domainLocales[locale]}/static/${((_b = index$2.STATIC_PAGES[locale]) === null || _b === void 0 ? void 0 : _b.TERM_OF_USE) || ''}`, target: "_blank", style: {
|
|
1017
|
+
color: '#262626',
|
|
1018
|
+
textDecoration: 'underline',
|
|
1019
|
+
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Terms of Service", rel: "noreferrer" }, t('ssov2.policyText.terms'))),
|
|
1020
|
+
})))));
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
const FirstBFlow = ({ hidden,
|
|
1024
|
+
// activeTab,
|
|
1025
|
+
legalTextType, trackingAction, trackingCategory, onTriggerGoogleLogin, onTriggerFacebookLogin, onClickEmail, }) => {
|
|
1026
|
+
const { t } = index.useTranslations();
|
|
1027
|
+
return (React__default["default"].createElement("div", { style: {
|
|
1028
|
+
display: hidden ? 'none' : 'flex',
|
|
1029
|
+
flexDirection: 'column',
|
|
1030
|
+
height: '100%',
|
|
1031
|
+
} },
|
|
1032
|
+
React__default["default"].createElement(core.Stack, { mt: 8, spacing: 8 },
|
|
1033
|
+
React__default["default"].createElement(index$3.Text, { size: "h4", weight: "semiBold" }, t('home.navigator.menu.category.noDatas.title')),
|
|
1034
|
+
React__default["default"].createElement(index$3.Text, { size: "p4" }, t('ssov2.abTestingFlowB.description'))),
|
|
1035
|
+
React__default["default"].createElement(core.Stack, { mt: 24, spacing: 24 },
|
|
1036
|
+
React__default["default"].createElement(index$4.Button, { variant: "white", style: {
|
|
1037
|
+
flex: 1,
|
|
1038
|
+
height: 48,
|
|
1039
|
+
padding: 12,
|
|
1040
|
+
background: '#F7F9FC',
|
|
1041
|
+
borderRadius: 8,
|
|
1042
|
+
}, onClick: onTriggerGoogleLogin, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Google" },
|
|
1043
|
+
React__default["default"].createElement(Google.Google, { style: {
|
|
1044
|
+
width: 20,
|
|
1045
|
+
height: 20,
|
|
1046
|
+
marginRight: 4,
|
|
1047
|
+
borderRadius: '100%',
|
|
1048
|
+
} }),
|
|
1049
|
+
' ',
|
|
1050
|
+
React__default["default"].createElement(index$3.Text, { size: "p4", color: "black", weight: "semiBold" }, t('ssov2.button.continueGoogle'))),
|
|
1051
|
+
React__default["default"].createElement(core.Stack, { spacing: 24, align: "center" },
|
|
1052
|
+
React__default["default"].createElement(index$3.Text, { size: "p4", color: "gray.4" }, t('ssov2.orContinueWith')),
|
|
1053
|
+
React__default["default"].createElement(core.Group, { spacing: 8, style: {
|
|
1054
|
+
width: '100%',
|
|
1055
|
+
} },
|
|
1056
|
+
React__default["default"].createElement(index$4.Button, { variant: "white", style: {
|
|
1057
|
+
flex: 1,
|
|
1058
|
+
height: 48,
|
|
1059
|
+
padding: 12,
|
|
1060
|
+
background: '#F7F9FC',
|
|
1061
|
+
borderRadius: 8,
|
|
1062
|
+
}, onClick: onTriggerFacebookLogin, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Facebook" },
|
|
1063
|
+
React__default["default"].createElement(Google.Facebook, { style: {
|
|
1064
|
+
width: 20,
|
|
1065
|
+
height: 20,
|
|
1066
|
+
marginRight: 4,
|
|
1067
|
+
borderRadius: '100%',
|
|
1068
|
+
} }),
|
|
1069
|
+
' ',
|
|
1070
|
+
React__default["default"].createElement(index$3.Text, { size: "p4", color: "black", weight: "regular" }, "Facebook")),
|
|
1071
|
+
React__default["default"].createElement(index$4.Button, { variant: "white", style: {
|
|
1072
|
+
flex: 1,
|
|
1073
|
+
height: 48,
|
|
1074
|
+
padding: 12,
|
|
1075
|
+
background: '#F7F9FC',
|
|
1076
|
+
borderRadius: 8,
|
|
1077
|
+
}, onClick: onClickEmail, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Email" },
|
|
1078
|
+
React__default["default"].createElement(MailIcon, { style: {
|
|
1079
|
+
marginRight: 4,
|
|
1080
|
+
} }),
|
|
1081
|
+
' ',
|
|
1082
|
+
React__default["default"].createElement(index$3.Text, { size: "p4", color: "black", weight: "regular" }, "Email"))))),
|
|
1083
|
+
React__default["default"].createElement(PolicyContent, { legalTextType: legalTextType, trackingAction: trackingAction, trackingCategory: trackingCategory })));
|
|
1084
|
+
};
|
|
1085
|
+
|
|
877
1086
|
function createCommonjsModule(fn) {
|
|
878
1087
|
var module = { exports: {} };
|
|
879
1088
|
return fn(module, module.exports), module.exports;
|
|
@@ -2107,7 +2316,7 @@ function CountrySelectWithIcon(_a) {
|
|
|
2107
2316
|
const SelectCountryContent = (React__default["default"].createElement(core.Stack, { spacing: 24 },
|
|
2108
2317
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
2109
2318
|
React__default["default"].createElement(index$3.Text, { size: "s4" }, t('ssov2.first.country.code')),
|
|
2110
|
-
React__default["default"].createElement(index$
|
|
2319
|
+
React__default["default"].createElement(index$6.Input, { size: "lg", placeholder: t('ssov2.first.search.country.placeholder'), icon: React__default["default"].createElement(core$1.Search, null), value: search, onChange: (value) => setSearch(value) })),
|
|
2111
2320
|
!!(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) && (React__default["default"].createElement(core.Stack, { spacing: 0 },
|
|
2112
2321
|
React__default["default"].createElement(index$3.Text, { size: "s4" }, t('ssov2.first.search.country.selected')),
|
|
2113
2322
|
React__default["default"].createElement(SelectCountryItem, { option: selectedOption, onSelect: (option) => {
|
|
@@ -2278,7 +2487,7 @@ const PhoneForwardRef = (props, ref) => {
|
|
|
2278
2487
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2279
2488
|
ref: ref, value: value, onChange: onChange,
|
|
2280
2489
|
// countries={countries}
|
|
2281
|
-
defaultCountry: defaultCountry, countryCallingCodeEditable: countryCallingCodeEditable, className: cn__default["default"](index$
|
|
2490
|
+
defaultCountry: defaultCountry, countryCallingCodeEditable: countryCallingCodeEditable, className: cn__default["default"](index$6.styles.phoneInput, { isError, [index$6.styles.error]: isError }, className), countrySelectComponent: CountrySelectWithIcon, countrySelectProps: { trackingFn } }, inputProps)));
|
|
2282
2491
|
};
|
|
2283
2492
|
const PhoneWithCustomCountrySelect = React.forwardRef(PhoneForwardRef);
|
|
2284
2493
|
|
|
@@ -2308,6 +2517,12 @@ const StyledPhone = styled__default["default"](PhoneWithCustomCountrySelect) `
|
|
|
2308
2517
|
}
|
|
2309
2518
|
`;
|
|
2310
2519
|
|
|
2520
|
+
const WhatsApp = ({ size = 20 }) => {
|
|
2521
|
+
return (React__default["default"].createElement("svg", { width: (size * 19) / 18, height: size, viewBox: "0 0 19 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
2522
|
+
React__default["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" }),
|
|
2523
|
+
React__default["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" })));
|
|
2524
|
+
};
|
|
2525
|
+
|
|
2311
2526
|
const Zalo = ({ size = 20, useCurrentColor = false }) => {
|
|
2312
2527
|
const color = useCurrentColor ? 'currentColor' : '#0068FF';
|
|
2313
2528
|
return (React__default["default"].createElement("svg", { width: (size * 21) / 20, height: size, viewBox: "0 0 21 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -2323,17 +2538,16 @@ const Zalo = ({ size = 20, useCurrentColor = false }) => {
|
|
|
2323
2538
|
};
|
|
2324
2539
|
|
|
2325
2540
|
const SSOFirstScreen = ({ hidden, config, }) => {
|
|
2326
|
-
var _a, _b;
|
|
2327
2541
|
const [phone, setPhone] = React__default["default"].useState('');
|
|
2328
2542
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
2329
2543
|
const { locale, onClose, setTracking } = useSSOState();
|
|
2330
2544
|
const { addStep, goNext } = store.useSSOSteps();
|
|
2331
|
-
const { setUserInfo } = store.useSSOV2Store();
|
|
2545
|
+
const { setUserInfo, abTestFlow } = store.useSSOV2Store();
|
|
2332
2546
|
const [activeTab, setActiveTab] = React__default["default"].useState('login');
|
|
2333
2547
|
const { legalTextType } = config || {};
|
|
2334
2548
|
const { t } = index.useTranslations();
|
|
2335
|
-
const trackingAction = 'Sign In or Sign Up
|
|
2336
|
-
const trackingCategory = `SSO - ${activeTab === 'login' ? 'Sign In' : 'Sign Up'}`;
|
|
2549
|
+
const trackingAction = abTestFlow === 'B' ? `Sign Up` : `Sign In or Sign Up`;
|
|
2550
|
+
const trackingCategory = `SSO - ${activeTab === 'login' ? 'Sign In' : 'Sign Up'}_Phone_Adoption_Test_${abTestFlow}`;
|
|
2337
2551
|
React.useEffect(() => {
|
|
2338
2552
|
if (!hidden) {
|
|
2339
2553
|
setErrMsg('');
|
|
@@ -2358,7 +2572,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2358
2572
|
},
|
|
2359
2573
|
});
|
|
2360
2574
|
const isNotHavePhone = !userInfo._data.phone || !userInfo._data.phone_verified_at;
|
|
2361
|
-
if (isNotHavePhone) {
|
|
2575
|
+
if (isNotHavePhone && abTestFlow !== 'B') {
|
|
2362
2576
|
store.useSSOV2Store.setState((f) => {
|
|
2363
2577
|
var _a;
|
|
2364
2578
|
return ({
|
|
@@ -2446,7 +2660,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2446
2660
|
};
|
|
2447
2661
|
}, []);
|
|
2448
2662
|
const onClickContinueZalo = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2449
|
-
var
|
|
2663
|
+
var _a, _b;
|
|
2450
2664
|
setLoading(true);
|
|
2451
2665
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2452
2666
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2455,8 +2669,8 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2455
2669
|
}
|
|
2456
2670
|
const userExist = yield store.checkUserExist({ phone: phoneNumber });
|
|
2457
2671
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2458
|
-
const provider = (
|
|
2459
|
-
if ((
|
|
2672
|
+
const provider = (_a = userExist._data) === null || _a === void 0 ? void 0 : _a.provider;
|
|
2673
|
+
if ((_b = userExist._data) === null || _b === void 0 ? void 0 : _b.is_pass) {
|
|
2460
2674
|
store.useSSOV2Store.setState({
|
|
2461
2675
|
flowData: {
|
|
2462
2676
|
method: 'zalo',
|
|
@@ -2508,6 +2722,69 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2508
2722
|
}
|
|
2509
2723
|
setLoading(false);
|
|
2510
2724
|
});
|
|
2725
|
+
const onClickContinueWhatsApp = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2726
|
+
var _c, _d;
|
|
2727
|
+
setLoading(true);
|
|
2728
|
+
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2729
|
+
if (!areaCode || !phoneNumber || !phone) {
|
|
2730
|
+
setErrMsg(t('ssov2.validate.phone.required'));
|
|
2731
|
+
return setLoading(false);
|
|
2732
|
+
}
|
|
2733
|
+
const userExist = yield store.checkUserExist({ phone: phoneNumber });
|
|
2734
|
+
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2735
|
+
const provider = (_c = userExist._data) === null || _c === void 0 ? void 0 : _c.provider;
|
|
2736
|
+
if ((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.is_pass) {
|
|
2737
|
+
store.useSSOV2Store.setState({
|
|
2738
|
+
flowData: {
|
|
2739
|
+
method: 'whatsapp',
|
|
2740
|
+
flow: 'login',
|
|
2741
|
+
metaData: userExist._data,
|
|
2742
|
+
},
|
|
2743
|
+
});
|
|
2744
|
+
addStep({
|
|
2745
|
+
type: store.SSOStepTypeType.PASSWORD,
|
|
2746
|
+
config: {
|
|
2747
|
+
phone,
|
|
2748
|
+
method: 'whatsapp',
|
|
2749
|
+
},
|
|
2750
|
+
});
|
|
2751
|
+
goNext();
|
|
2752
|
+
}
|
|
2753
|
+
else {
|
|
2754
|
+
let res;
|
|
2755
|
+
if (!provider) {
|
|
2756
|
+
res = yield registerBySendWhatsAppOTP(phoneNumber, areaCode);
|
|
2757
|
+
}
|
|
2758
|
+
else {
|
|
2759
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
2760
|
+
}
|
|
2761
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
2762
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
2763
|
+
return setLoading(false);
|
|
2764
|
+
}
|
|
2765
|
+
store.useSSOV2Store.setState({
|
|
2766
|
+
flowData: {
|
|
2767
|
+
method: 'whatsapp',
|
|
2768
|
+
flow: 'signup',
|
|
2769
|
+
metaData: userExist._data,
|
|
2770
|
+
},
|
|
2771
|
+
});
|
|
2772
|
+
addStep({
|
|
2773
|
+
type: store.SSOStepTypeType.OTP,
|
|
2774
|
+
config: {
|
|
2775
|
+
phone,
|
|
2776
|
+
otpType: 'phone-whatsapp',
|
|
2777
|
+
afterAction: 'forgot',
|
|
2778
|
+
},
|
|
2779
|
+
});
|
|
2780
|
+
goNext();
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
else {
|
|
2784
|
+
setErrMsg(getErrorTextFromCode(t, userExist === null || userExist === void 0 ? void 0 : userExist.code));
|
|
2785
|
+
}
|
|
2786
|
+
setLoading(false);
|
|
2787
|
+
});
|
|
2511
2788
|
const onClickContinuePhone = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2512
2789
|
var _e, _f;
|
|
2513
2790
|
setLoading(true);
|
|
@@ -2650,6 +2927,9 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2650
2927
|
});
|
|
2651
2928
|
}, { scope: 'public_profile,email,user_gender,user_birthday' });
|
|
2652
2929
|
};
|
|
2930
|
+
if (abTestFlow === 'B') {
|
|
2931
|
+
return (React__default["default"].createElement(FirstBFlow, { hidden: hidden, activeTab: activeTab, legalTextType: legalTextType, trackingAction: trackingAction, trackingCategory: trackingCategory, onTriggerGoogleLogin: onTriggerGoogleLogin, onTriggerFacebookLogin: onTriggerFacebookLogin, onClickEmail: onClickEmail }));
|
|
2932
|
+
}
|
|
2653
2933
|
return (React__default["default"].createElement("div", { style: {
|
|
2654
2934
|
display: hidden ? 'none' : 'flex',
|
|
2655
2935
|
flexDirection: 'column',
|
|
@@ -2672,7 +2952,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2672
2952
|
e.preventDefault();
|
|
2673
2953
|
onClickContinueZalo();
|
|
2674
2954
|
} },
|
|
2675
|
-
React__default["default"].createElement(index$
|
|
2955
|
+
React__default["default"].createElement(index$6.Input.Wrapper, { error: errMsg },
|
|
2676
2956
|
React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone", trackingFn: React.useCallback((option) => {
|
|
2677
2957
|
if (!(option === null || option === void 0 ? void 0 : option.label))
|
|
2678
2958
|
return;
|
|
@@ -2685,8 +2965,9 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2685
2965
|
};
|
|
2686
2966
|
}, [activeTab]) }))),
|
|
2687
2967
|
React__default["default"].createElement(index$4.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')),
|
|
2688
|
-
React__default["default"].createElement(index$4.Button, { size: "lg", variant: "primary", onClick:
|
|
2689
|
-
React__default["default"].createElement(index$4.Button, { size: "
|
|
2968
|
+
isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(WhatsApp, null), color: "#00B16A" }, t('ssov2.button.otp.whatsapp'))),
|
|
2969
|
+
isFeatureZaloEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(Zalo, null) }, t('ssov2.button.otp.zalo'))),
|
|
2970
|
+
isFeatureSMSEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(core$1.ReplySquare, { size: 18 }) }, t('ssov2.button.otp.sms')))),
|
|
2690
2971
|
React__default["default"].createElement(core.Divider, { color: "#E4E8EC", display: activeTab === 'signup' ? 'block' : 'none' }),
|
|
2691
2972
|
React__default["default"].createElement(core.Stack, { spacing: 16, align: "center" },
|
|
2692
2973
|
React__default["default"].createElement(index$3.Text, { size: "p4", color: "gray.4" }, t('ssov2.orContinueWith')),
|
|
@@ -2735,26 +3016,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2735
3016
|
} }),
|
|
2736
3017
|
' ',
|
|
2737
3018
|
React__default["default"].createElement(index$3.Text, { size: "p4", color: "black", weight: "regular" }, "Email"))))),
|
|
2738
|
-
React__default["default"].createElement(
|
|
2739
|
-
marginTop: 56,
|
|
2740
|
-
[theme.fn.smallerThan('sm')]: {
|
|
2741
|
-
marginTop: 'auto',
|
|
2742
|
-
paddingTop: 50,
|
|
2743
|
-
},
|
|
2744
|
-
}) },
|
|
2745
|
-
React__default["default"].createElement(index$6.Spoiler, { maxHeight: 74, showLabel: React__default["default"].createElement(index$3.Text, { size: "p5", color: "gray.6", underline: true }, t('home.seeMore')), hideLabel: React__default["default"].createElement(index$3.Text, { size: "p5", color: "gray.6", underline: true }, t('articlePage.showLess')) },
|
|
2746
|
-
React__default["default"].createElement(index$3.Text, { size: "p5", color: "gray.6" }, t(legalTextType === 'community'
|
|
2747
|
-
? 'ssov2.policyText.community'
|
|
2748
|
-
: 'ssov2.policyText', {
|
|
2749
|
-
privacy: (React__default["default"].createElement("a", { href: `https://${constantsDomainLocales.domainLocales[locale]}/static/${((_a = index$2.STATIC_PAGES[locale]) === null || _a === void 0 ? void 0 : _a.PRIVACY_POLICY) || ''}`, target: "_blank", style: {
|
|
2750
|
-
color: '#262626',
|
|
2751
|
-
textDecoration: 'underline',
|
|
2752
|
-
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Privacy Policy" }, t('ssov2.policyText.privacy'))),
|
|
2753
|
-
terms: (React__default["default"].createElement("a", { href: `https://${constantsDomainLocales.domainLocales[locale]}/static/${((_b = index$2.STATIC_PAGES[locale]) === null || _b === void 0 ? void 0 : _b.TERM_OF_USE) || ''}`, target: "_blank", style: {
|
|
2754
|
-
color: '#262626',
|
|
2755
|
-
textDecoration: 'underline',
|
|
2756
|
-
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Terms of Service" }, t('ssov2.policyText.terms'))),
|
|
2757
|
-
}))))));
|
|
3019
|
+
React__default["default"].createElement(PolicyContent, { legalTextType: legalTextType, trackingAction: trackingAction, trackingCategory: trackingCategory })));
|
|
2758
3020
|
};
|
|
2759
3021
|
|
|
2760
3022
|
const initSendUpdateEmailOtp = (email) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -2783,7 +3045,7 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2783
3045
|
const { t } = index.useTranslations();
|
|
2784
3046
|
const { onClose, setTracking } = useSSOState();
|
|
2785
3047
|
const { setSteps, steps } = store.useSSOSteps();
|
|
2786
|
-
const { flowData, userInfo } = store.useSSOV2Store();
|
|
3048
|
+
const { flowData, userInfo, abTestFlow } = store.useSSOV2Store();
|
|
2787
3049
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
2788
3050
|
const [otp, setOtp] = React__default["default"].useState('');
|
|
2789
3051
|
const [error, setError] = React__default["default"].useState('');
|
|
@@ -2795,15 +3057,16 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2795
3057
|
const isEmail = otpType === 'email' || otpType === 'update-email';
|
|
2796
3058
|
const isZalo = otpType === 'phone-zalo';
|
|
2797
3059
|
const isSMS = otpType === 'phone-sms';
|
|
3060
|
+
const isWhatsApp = otpType === 'phone-whatsapp';
|
|
2798
3061
|
const trackingMethod = flowData === null || flowData === void 0 ? void 0 : flowData.method;
|
|
2799
3062
|
const trackingCategory = userInfo && !userInfo.first_time_login
|
|
2800
|
-
? `SSO - Existing User via ${trackingMethod}`
|
|
3063
|
+
? `SSO - Existing User via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`
|
|
2801
3064
|
: isVerifyPhoneInTheSignUp(steps, flowData)
|
|
2802
|
-
? `SSO - Sign Up via ${trackingMethod}`
|
|
2803
|
-
: `SSO - Sign In via ${trackingMethod}`;
|
|
3065
|
+
? `SSO - Sign Up via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`
|
|
3066
|
+
: `SSO - Sign In via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`;
|
|
2804
3067
|
const trackingAction = isEmail
|
|
2805
|
-
?
|
|
2806
|
-
: `Verify Phone Number via ${isZalo ? 'Zalo' : isSMS ? 'SMS' : ''}`;
|
|
3068
|
+
? `Verify Your Email`
|
|
3069
|
+
: `Verify Phone Number via ${isZalo ? 'Zalo' : isSMS ? 'SMS' : isWhatsApp ? 'WhatsApp' : ''}`;
|
|
2807
3070
|
React.useEffect(() => {
|
|
2808
3071
|
if (!hidden) {
|
|
2809
3072
|
setError('');
|
|
@@ -2837,6 +3100,9 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2837
3100
|
else if (otpType === 'phone-zalo') {
|
|
2838
3101
|
res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
2839
3102
|
}
|
|
3103
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3104
|
+
res = yield resendUpdatePhoneWhatsAppOTP(phoneNumber, areaCode);
|
|
3105
|
+
}
|
|
2840
3106
|
}
|
|
2841
3107
|
else {
|
|
2842
3108
|
if (otpType === 'phone-sms') {
|
|
@@ -2845,6 +3111,9 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2845
3111
|
else if (otpType === 'phone-zalo') {
|
|
2846
3112
|
res = yield resendZaloOTP(phoneNumber, areaCode);
|
|
2847
3113
|
}
|
|
3114
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3115
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
3116
|
+
}
|
|
2848
3117
|
else if (otpType === 'email') {
|
|
2849
3118
|
res = yield resendEmailOTP(email);
|
|
2850
3119
|
}
|
|
@@ -2883,6 +3152,9 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2883
3152
|
else if (otpType === 'phone-zalo') {
|
|
2884
3153
|
res = yield verifyUpdatePhoneZaloOTP(phoneNumber, areaCode, otp);
|
|
2885
3154
|
}
|
|
3155
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3156
|
+
res = yield verifyUpdatePhoneWhatsAppOTP(phoneNumber, areaCode, otp);
|
|
3157
|
+
}
|
|
2886
3158
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
2887
3159
|
if (afterAction === 'setup') {
|
|
2888
3160
|
const userInfo = yield store.getUserInfo();
|
|
@@ -2908,6 +3180,7 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2908
3180
|
const needPass = (flowData.method === 'email' ||
|
|
2909
3181
|
flowData.method === 'zalo' ||
|
|
2910
3182
|
flowData.method === 'sms' ||
|
|
3183
|
+
flowData.method === 'whatsapp' ||
|
|
2911
3184
|
flowData.method === 'phone' ||
|
|
2912
3185
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'email' ||
|
|
2913
3186
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'phone') &&
|
|
@@ -2966,6 +3239,9 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2966
3239
|
else if (otpType === 'phone-zalo') {
|
|
2967
3240
|
res = yield verifyByZaloOTP(phoneNumber, areaCode, otp);
|
|
2968
3241
|
}
|
|
3242
|
+
else if (otpType === 'phone-whatsapp') {
|
|
3243
|
+
res = yield verifyByWhatsAppOTP(phoneNumber, areaCode, otp);
|
|
3244
|
+
}
|
|
2969
3245
|
else if (otpType === 'email') {
|
|
2970
3246
|
res = yield verifyByEmailOTP(email, otp);
|
|
2971
3247
|
}
|
|
@@ -2988,7 +3264,15 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2988
3264
|
addStepAndGoNext({
|
|
2989
3265
|
type: store.SSOStepTypeType.FORGOT_PASSWORD_SETUP,
|
|
2990
3266
|
config: {
|
|
2991
|
-
provider: isZalo
|
|
3267
|
+
provider: isZalo
|
|
3268
|
+
? 'Zalo'
|
|
3269
|
+
: isSMS
|
|
3270
|
+
? 'SMS'
|
|
3271
|
+
: isWhatsApp
|
|
3272
|
+
? 'WhatsApp'
|
|
3273
|
+
: isEmail
|
|
3274
|
+
? 'Email'
|
|
3275
|
+
: '',
|
|
2992
3276
|
},
|
|
2993
3277
|
});
|
|
2994
3278
|
}
|
|
@@ -3016,6 +3300,7 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3016
3300
|
const needPass = (flowData.method === 'email' ||
|
|
3017
3301
|
flowData.method === 'zalo' ||
|
|
3018
3302
|
flowData.method === 'sms' ||
|
|
3303
|
+
flowData.method === 'whatsapp' ||
|
|
3019
3304
|
flowData.method === 'phone' ||
|
|
3020
3305
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'email' ||
|
|
3021
3306
|
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data.provider) === 'phone') &&
|
|
@@ -3056,13 +3341,12 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3056
3341
|
}
|
|
3057
3342
|
setLoading(false);
|
|
3058
3343
|
});
|
|
3059
|
-
const
|
|
3344
|
+
const swapAnotherMethod = (newType) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3060
3345
|
if (isEmail)
|
|
3061
3346
|
return;
|
|
3062
3347
|
setLoading(true);
|
|
3063
3348
|
try {
|
|
3064
3349
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
3065
|
-
const newType = otpType === 'phone-sms' ? 'phone-zalo' : 'phone-sms';
|
|
3066
3350
|
let res;
|
|
3067
3351
|
if (isUpdatePhone) {
|
|
3068
3352
|
if (newType === 'phone-sms') {
|
|
@@ -3071,6 +3355,9 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3071
3355
|
else if (newType === 'phone-zalo') {
|
|
3072
3356
|
res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
3073
3357
|
}
|
|
3358
|
+
else if (newType === 'phone-whatsapp') {
|
|
3359
|
+
res = yield resendUpdatePhoneWhatsAppOTP(phoneNumber, areaCode);
|
|
3360
|
+
}
|
|
3074
3361
|
}
|
|
3075
3362
|
else {
|
|
3076
3363
|
if (newType === 'phone-sms') {
|
|
@@ -3079,6 +3366,9 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3079
3366
|
else if (newType === 'phone-zalo') {
|
|
3080
3367
|
res = yield resendZaloOTP(phoneNumber, areaCode);
|
|
3081
3368
|
}
|
|
3369
|
+
else if (newType === 'phone-whatsapp') {
|
|
3370
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
3371
|
+
}
|
|
3082
3372
|
}
|
|
3083
3373
|
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
3084
3374
|
setError(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
@@ -3128,12 +3418,18 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3128
3418
|
: 'ssov2.otp.phone.description', {
|
|
3129
3419
|
email,
|
|
3130
3420
|
phone,
|
|
3131
|
-
method:
|
|
3421
|
+
method: isSMS
|
|
3422
|
+
? 'SMS'
|
|
3423
|
+
: isZalo
|
|
3424
|
+
? 'Zalo'
|
|
3425
|
+
: isWhatsApp
|
|
3426
|
+
? 'WhatsApp'
|
|
3427
|
+
: '',
|
|
3132
3428
|
}),
|
|
3133
3429
|
} }))),
|
|
3134
3430
|
React__default["default"].createElement(core.Stack, { mt: 24, spacing: 8 },
|
|
3135
|
-
React__default["default"].createElement(index$
|
|
3136
|
-
React__default["default"].createElement(index$
|
|
3431
|
+
React__default["default"].createElement(index$6.Input.Wrapper, { error: error },
|
|
3432
|
+
React__default["default"].createElement(index$6.OTP, { ref: otpRef, value: otp, onChange: (otp) => {
|
|
3137
3433
|
setOtp(String(otp));
|
|
3138
3434
|
if (String(otp).length === 6) {
|
|
3139
3435
|
setTimeout(() => {
|
|
@@ -3158,21 +3454,28 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3158
3454
|
count: resendTime,
|
|
3159
3455
|
})))),
|
|
3160
3456
|
React__default["default"].createElement(index$4.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')),
|
|
3161
|
-
!isEmail && (React__default["default"].createElement(
|
|
3162
|
-
|
|
3163
|
-
|
|
3457
|
+
!isEmail && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
3458
|
+
isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(WhatsApp, null), style: { fontWeight: 400 }, color: "#595959" }, t('ssov2.otp.sendVia', {
|
|
3459
|
+
method: 'WhatsApp',
|
|
3460
|
+
}))),
|
|
3461
|
+
isFeatureZaloEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(Zalo, null), style: { fontWeight: 400 }, color: "#595959" }, t('ssov2.otp.sendVia', {
|
|
3462
|
+
method: 'Zalo',
|
|
3463
|
+
}))),
|
|
3464
|
+
isFeatureSMSEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(core$1.ReplySquare, { size: 18 }), style: { fontWeight: 400 }, color: "#595959" }, t('ssov2.otp.sendVia', {
|
|
3465
|
+
method: 'SMS',
|
|
3466
|
+
})))))));
|
|
3164
3467
|
};
|
|
3165
3468
|
|
|
3166
3469
|
const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
3167
3470
|
const { t } = index.useTranslations();
|
|
3168
3471
|
const { onClose, setTracking } = useSSOState();
|
|
3169
|
-
const { setUserInfo, flowData } = store.useSSOV2Store();
|
|
3472
|
+
const { setUserInfo, flowData, abTestFlow } = store.useSSOV2Store();
|
|
3170
3473
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
3171
3474
|
const phone = config === null || config === void 0 ? void 0 : config.phone;
|
|
3172
3475
|
const method = config === null || config === void 0 ? void 0 : config.method;
|
|
3173
3476
|
const email = config === null || config === void 0 ? void 0 : config.email;
|
|
3174
|
-
const trackingCategory = `SSO - Sign In via ${email ? 'Email' : method}`;
|
|
3175
|
-
const trackingAction =
|
|
3477
|
+
const trackingCategory = `SSO - Sign In via ${email ? 'Email' : method}_Phone_Adoption_Test_${abTestFlow}`;
|
|
3478
|
+
const trackingAction = `Welcome Back`;
|
|
3176
3479
|
React.useEffect(() => {
|
|
3177
3480
|
if (!hidden) {
|
|
3178
3481
|
setErrMsg('');
|
|
@@ -3242,7 +3545,7 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3242
3545
|
const isEmailFlow = isEmailFlowFn(flowData);
|
|
3243
3546
|
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
3244
3547
|
if (!phone && !!email) {
|
|
3245
|
-
if (store.isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
3548
|
+
if (store.isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) && abTestFlow !== 'B') {
|
|
3246
3549
|
store.useSSOV2Store.setState((s) => ({
|
|
3247
3550
|
flowData: Object.assign(Object.assign({}, s.flowData), { isVerifyPhone: true }),
|
|
3248
3551
|
}));
|
|
@@ -3314,7 +3617,7 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3314
3617
|
t('ssov2.password.title2')),
|
|
3315
3618
|
React__default["default"].createElement(index$3.Text, { size: "p4" }, t('ssov2.password.description'))),
|
|
3316
3619
|
React__default["default"].createElement(core.Stack, { mt: 24, spacing: 8 },
|
|
3317
|
-
React__default["default"].createElement(index$
|
|
3620
|
+
React__default["default"].createElement(index$6.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" }),
|
|
3318
3621
|
React__default["default"].createElement(core.Group, { spacing: 8, align: "center", style: {
|
|
3319
3622
|
height: 40,
|
|
3320
3623
|
} },
|
|
@@ -3333,6 +3636,7 @@ const SetupLater = ({ style = {} }) => {
|
|
|
3333
3636
|
const { currentStepIndex, steps, addStep, goNext } = store.useSSOSteps();
|
|
3334
3637
|
const currentStep = steps[currentStepIndex];
|
|
3335
3638
|
const onClickSetupLater = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3639
|
+
var _a;
|
|
3336
3640
|
if (loading)
|
|
3337
3641
|
return;
|
|
3338
3642
|
setLoading(true);
|
|
@@ -3341,7 +3645,9 @@ const SetupLater = ({ style = {} }) => {
|
|
|
3341
3645
|
((currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === store.SSOStepTypeType.VERIFY_PHONE ||
|
|
3342
3646
|
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === store.SSOStepTypeType.FORGOT_PASSWORD_PHONE)) {
|
|
3343
3647
|
addStep({
|
|
3344
|
-
type:
|
|
3648
|
+
type: ((_a = currentStep.config) === null || _a === void 0 ? void 0 : _a.afterAction) === 'update-email'
|
|
3649
|
+
? store.SSOStepTypeType.UPDATE_EMAIL
|
|
3650
|
+
: store.SSOStepTypeType.SETUP_FULL,
|
|
3345
3651
|
config: {
|
|
3346
3652
|
userInfo,
|
|
3347
3653
|
},
|
|
@@ -3360,7 +3666,8 @@ const SetupLater = ({ style = {} }) => {
|
|
|
3360
3666
|
goNext();
|
|
3361
3667
|
}
|
|
3362
3668
|
else {
|
|
3363
|
-
|
|
3669
|
+
const isResetPasswordFlow = isResetPasswordViePhoneFlowFn(steps);
|
|
3670
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(!isResetPasswordFlow);
|
|
3364
3671
|
}
|
|
3365
3672
|
setLoading(false);
|
|
3366
3673
|
});
|
|
@@ -3372,10 +3679,10 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3372
3679
|
const { t } = index.useTranslations();
|
|
3373
3680
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
3374
3681
|
const { setTracking, locale } = useSSOState();
|
|
3375
|
-
const { flowData } = store.useSSOV2Store();
|
|
3682
|
+
const { flowData, abTestFlow } = store.useSSOV2Store();
|
|
3376
3683
|
const trackingMethod = flowData.method;
|
|
3377
|
-
const trackingCategory = `SSO - Sign In via ${trackingMethod}`;
|
|
3378
|
-
const trackingAction =
|
|
3684
|
+
const trackingCategory = `SSO - Sign In via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`;
|
|
3685
|
+
const trackingAction = `Forgot Password`;
|
|
3379
3686
|
React.useEffect(() => {
|
|
3380
3687
|
if (!hidden) {
|
|
3381
3688
|
setErrMsg('');
|
|
@@ -3387,7 +3694,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3387
3694
|
}, [hidden]);
|
|
3388
3695
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
3389
3696
|
const { addStep, goNext } = store.useSSOSteps();
|
|
3390
|
-
const
|
|
3697
|
+
const onClickContinueWhatsApp = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3391
3698
|
var _a, _b;
|
|
3392
3699
|
setLoading(true);
|
|
3393
3700
|
try {
|
|
@@ -3400,6 +3707,49 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3400
3707
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3401
3708
|
let res;
|
|
3402
3709
|
if (!((_a = userExist._data) === null || _a === void 0 ? void 0 : _a.provider)) {
|
|
3710
|
+
res = yield registerBySendWhatsAppOTP(phoneNumber, areaCode);
|
|
3711
|
+
}
|
|
3712
|
+
else {
|
|
3713
|
+
res = yield resendWhatsAppOTP(phoneNumber, areaCode);
|
|
3714
|
+
}
|
|
3715
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
3716
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3717
|
+
return setLoading(false);
|
|
3718
|
+
}
|
|
3719
|
+
addStep({
|
|
3720
|
+
type: store.SSOStepTypeType.OTP,
|
|
3721
|
+
config: {
|
|
3722
|
+
phone,
|
|
3723
|
+
otpType: 'phone-whatsapp',
|
|
3724
|
+
afterAction: config.afterAction || 'forgot',
|
|
3725
|
+
provider: (_b = userExist._data) === null || _b === void 0 ? void 0 : _b.provider,
|
|
3726
|
+
},
|
|
3727
|
+
});
|
|
3728
|
+
goNext();
|
|
3729
|
+
}
|
|
3730
|
+
else {
|
|
3731
|
+
setErrMsg(getErrorTextFromCode(t, userExist === null || userExist === void 0 ? void 0 : userExist.code));
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
catch (e) {
|
|
3735
|
+
console.error(e);
|
|
3736
|
+
setErrMsg(getErrorTextFromCode(t, ''));
|
|
3737
|
+
}
|
|
3738
|
+
setLoading(false);
|
|
3739
|
+
});
|
|
3740
|
+
const onClickContinueZalo = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3741
|
+
var _c, _d;
|
|
3742
|
+
setLoading(true);
|
|
3743
|
+
try {
|
|
3744
|
+
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
3745
|
+
if (!areaCode || !phoneNumber || !phone) {
|
|
3746
|
+
setErrMsg(t('ssov2.validate.phone.required'));
|
|
3747
|
+
return setLoading(false);
|
|
3748
|
+
}
|
|
3749
|
+
const userExist = yield store.checkUserExist({ phone: phoneNumber });
|
|
3750
|
+
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3751
|
+
let res;
|
|
3752
|
+
if (!((_c = userExist._data) === null || _c === void 0 ? void 0 : _c.provider)) {
|
|
3403
3753
|
res = yield registerBySendZaloOTP(phoneNumber, areaCode);
|
|
3404
3754
|
}
|
|
3405
3755
|
else {
|
|
@@ -3415,7 +3765,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3415
3765
|
phone,
|
|
3416
3766
|
otpType: 'phone-zalo',
|
|
3417
3767
|
afterAction: config.afterAction || 'forgot',
|
|
3418
|
-
provider: (
|
|
3768
|
+
provider: (_d = userExist._data) === null || _d === void 0 ? void 0 : _d.provider,
|
|
3419
3769
|
},
|
|
3420
3770
|
});
|
|
3421
3771
|
goNext();
|
|
@@ -3431,7 +3781,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3431
3781
|
setLoading(false);
|
|
3432
3782
|
});
|
|
3433
3783
|
const onClickContinuePhone = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3434
|
-
var
|
|
3784
|
+
var _e, _f;
|
|
3435
3785
|
setLoading(true);
|
|
3436
3786
|
try {
|
|
3437
3787
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
@@ -3442,7 +3792,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3442
3792
|
const userExist = yield store.checkUserExist({ phone: phoneNumber });
|
|
3443
3793
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3444
3794
|
let res;
|
|
3445
|
-
if (!((
|
|
3795
|
+
if (!((_e = userExist._data) === null || _e === void 0 ? void 0 : _e.provider)) {
|
|
3446
3796
|
res = yield registerBySendPhoneOTP(phoneNumber, areaCode);
|
|
3447
3797
|
}
|
|
3448
3798
|
else {
|
|
@@ -3458,7 +3808,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3458
3808
|
phone,
|
|
3459
3809
|
otpType: 'phone-sms',
|
|
3460
3810
|
afterAction: config.afterAction || 'forgot',
|
|
3461
|
-
provider: (
|
|
3811
|
+
provider: (_f = userExist._data) === null || _f === void 0 ? void 0 : _f.provider,
|
|
3462
3812
|
},
|
|
3463
3813
|
});
|
|
3464
3814
|
goNext();
|
|
@@ -3492,8 +3842,9 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3492
3842
|
};
|
|
3493
3843
|
}, []) }),
|
|
3494
3844
|
errMsg && (React__default["default"].createElement(index$3.Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
|
|
3495
|
-
React__default["default"].createElement(index$4.Button, { size: "lg", variant: "primary", onClick:
|
|
3496
|
-
React__default["default"].createElement(index$4.Button, { size: "
|
|
3845
|
+
isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(WhatsApp, null), color: "#00B16A" }, t('ssov2.button.continueWhatsApp'))),
|
|
3846
|
+
isFeatureZaloEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(Zalo, null) }, t('ssov2.button.continueZalo'))),
|
|
3847
|
+
isFeatureSMSEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(core$1.ReplySquare, { size: 18 }) }, t('ssov2.button.continueSMS'))),
|
|
3497
3848
|
React__default["default"].createElement(SetupLater, null))));
|
|
3498
3849
|
};
|
|
3499
3850
|
|
|
@@ -3517,18 +3868,18 @@ const SSOPasswordWithConfirm = (_a) => {
|
|
|
3517
3868
|
setAtLeastOneUpper(!!password.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/));
|
|
3518
3869
|
}, [password]);
|
|
3519
3870
|
return (React__default["default"].createElement(core.Stack, Object.assign({ spacing: 12 }, props),
|
|
3520
|
-
React__default["default"].createElement(index$
|
|
3871
|
+
React__default["default"].createElement(index$6.PasswordInput, Object.assign({ name: "password", placeholder: t('ssov2.passwordForgotSetup.field.password.placeholder'), label: t('ssov2.passwordForgotSetup.field.password.label'), required: true, withAsterisk: true }, form.getInputProps('password'), { onBlur: (e) => {
|
|
3521
3872
|
form.getInputProps('password').onBlur(e);
|
|
3522
3873
|
form.values.confirmPassword && form.validateField('confirmPassword');
|
|
3523
3874
|
}, 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" })),
|
|
3524
3875
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
3525
|
-
React__default["default"].createElement(core.Group, { spacing: 4, align: "
|
|
3876
|
+
React__default["default"].createElement(core.Group, { spacing: 4, align: "flex-start" },
|
|
3526
3877
|
atLeast8Chars ? (React__default["default"].createElement(CheckGreenIcon, null)) : typeof atLeast8Chars === 'undefined' ? (React__default["default"].createElement(CheckGrayIcon, null)) : (React__default["default"].createElement(CheckRedIcon, null)),
|
|
3527
|
-
React__default["default"].createElement(index$3.Text, { size: "n1" }, t('ssov2.passwordForgotSetup.field.password.atLeast8Chars'))),
|
|
3528
|
-
React__default["default"].createElement(core.Group, { spacing: 4, align: "
|
|
3878
|
+
React__default["default"].createElement(index$3.Text, { size: "n1", style: { flex: 1 } }, t('ssov2.passwordForgotSetup.field.password.atLeast8Chars'))),
|
|
3879
|
+
React__default["default"].createElement(core.Group, { spacing: 4, align: "flex-start" },
|
|
3529
3880
|
atLeastOneUpper ? (React__default["default"].createElement(CheckGreenIcon, null)) : typeof atLeastOneUpper === 'undefined' ? (React__default["default"].createElement(CheckGrayIcon, null)) : (React__default["default"].createElement(CheckRedIcon, null)),
|
|
3530
|
-
React__default["default"].createElement(index$3.Text, { size: "n1" }, t('ssov2.passwordForgotSetup.field.password.atLeastOneUpper')))),
|
|
3531
|
-
React__default["default"].createElement(index$
|
|
3881
|
+
React__default["default"].createElement(index$3.Text, { size: "n1", style: { flex: 1 } }, t('ssov2.passwordForgotSetup.field.password.atLeastOneUpper')))),
|
|
3882
|
+
React__default["default"].createElement(index$6.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')))));
|
|
3532
3883
|
};
|
|
3533
3884
|
|
|
3534
3885
|
const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
@@ -3537,11 +3888,11 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3537
3888
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
3538
3889
|
const { setTracking, onClose } = useSSOState();
|
|
3539
3890
|
const { addStep, goNext } = store.useSSOSteps();
|
|
3540
|
-
const { flowData, setUserInfo } = store.useSSOV2Store();
|
|
3891
|
+
const { flowData, setUserInfo, source, abTestFlow } = store.useSSOV2Store();
|
|
3541
3892
|
const trackingMethod = flowData.method;
|
|
3542
3893
|
const trackingCategory = flowData.flow === 'login'
|
|
3543
|
-
? `SSO - Sign In via ${trackingMethod}`
|
|
3544
|
-
: `SSO - Sign Up via ${trackingMethod}`;
|
|
3894
|
+
? `SSO - Sign In via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`
|
|
3895
|
+
: `SSO - Sign Up via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`;
|
|
3545
3896
|
const trackingAction = `Setup Password`;
|
|
3546
3897
|
React.useEffect(() => {
|
|
3547
3898
|
if (!hidden) {
|
|
@@ -3614,7 +3965,11 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3614
3965
|
// Email
|
|
3615
3966
|
if (isEmailFlowFn(flowData)) {
|
|
3616
3967
|
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
3617
|
-
|
|
3968
|
+
const careOnboardingAndNotVerifiedYet = store.isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) &&
|
|
3969
|
+
source === 'care_onboarding';
|
|
3970
|
+
const abTestFlowAAndNotVerifiedYet = store.isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) && abTestFlow !== 'B';
|
|
3971
|
+
if (careOnboardingAndNotVerifiedYet ||
|
|
3972
|
+
abTestFlowAAndNotVerifiedYet) {
|
|
3618
3973
|
addStep({
|
|
3619
3974
|
type: store.SSOStepTypeType.VERIFY_PHONE,
|
|
3620
3975
|
config: {
|
|
@@ -3623,6 +3978,15 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3623
3978
|
});
|
|
3624
3979
|
goNext();
|
|
3625
3980
|
}
|
|
3981
|
+
else if (!isSetupFullInfoAlready(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data, flowData)) {
|
|
3982
|
+
addStep({
|
|
3983
|
+
type: store.SSOStepTypeType.SETUP_FULL,
|
|
3984
|
+
config: {
|
|
3985
|
+
userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
|
|
3986
|
+
},
|
|
3987
|
+
});
|
|
3988
|
+
goNext();
|
|
3989
|
+
}
|
|
3626
3990
|
else {
|
|
3627
3991
|
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3628
3992
|
}
|
|
@@ -3682,16 +4046,16 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3682
4046
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
3683
4047
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
3684
4048
|
const { locale, setTracking } = useSSOState();
|
|
3685
|
-
const { flowData, userInfo } = store.useSSOV2Store();
|
|
4049
|
+
const { flowData, userInfo, abTestFlow } = store.useSSOV2Store();
|
|
3686
4050
|
const { steps } = store.useSSOSteps();
|
|
3687
4051
|
const { afterAction, provider } = config || {};
|
|
3688
4052
|
const trackingMethod = flowData === null || flowData === void 0 ? void 0 : flowData.method;
|
|
3689
4053
|
const trackingCategory = userInfo && !userInfo.first_time_login
|
|
3690
|
-
? `SSO - Existing User via ${trackingMethod}`
|
|
4054
|
+
? `SSO - Existing User via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`
|
|
3691
4055
|
: isVerifyPhoneInTheSignUp(steps, flowData)
|
|
3692
|
-
? `SSO - Sign Up via ${trackingMethod}`
|
|
3693
|
-
: `SSO - Sign In via ${trackingMethod}`;
|
|
3694
|
-
const trackingAction =
|
|
4056
|
+
? `SSO - Sign Up via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`
|
|
4057
|
+
: `SSO - Sign In via ${trackingMethod}_Phone_Adoption_Test_${abTestFlow}`;
|
|
4058
|
+
const trackingAction = `Verify Phone Number`;
|
|
3695
4059
|
React.useEffect(() => {
|
|
3696
4060
|
if (!hidden) {
|
|
3697
4061
|
setErrMsg('');
|
|
@@ -3787,6 +4151,48 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3787
4151
|
}
|
|
3788
4152
|
setLoading(false);
|
|
3789
4153
|
});
|
|
4154
|
+
const onClickContinueWhatsApp = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
4155
|
+
setLoading(true);
|
|
4156
|
+
try {
|
|
4157
|
+
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
4158
|
+
if (!areaCode || !phoneNumber || !phone) {
|
|
4159
|
+
setErrMsg(t('ssov2.validate.phone.required'));
|
|
4160
|
+
return setLoading(false);
|
|
4161
|
+
}
|
|
4162
|
+
const userExist = yield store.checkUserExist({ phone: phoneNumber });
|
|
4163
|
+
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
4164
|
+
if (!userExist._data) {
|
|
4165
|
+
const res = yield resendUpdatePhoneWhatsAppOTP(phoneNumber, areaCode);
|
|
4166
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
4167
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
4168
|
+
return setLoading(false);
|
|
4169
|
+
}
|
|
4170
|
+
addStep({
|
|
4171
|
+
type: store.SSOStepTypeType.OTP,
|
|
4172
|
+
config: {
|
|
4173
|
+
provider,
|
|
4174
|
+
phone,
|
|
4175
|
+
otpType: 'phone-whatsapp',
|
|
4176
|
+
isUpdatePhone: true,
|
|
4177
|
+
afterAction: afterAction || 'setup',
|
|
4178
|
+
},
|
|
4179
|
+
});
|
|
4180
|
+
goNext();
|
|
4181
|
+
}
|
|
4182
|
+
else {
|
|
4183
|
+
setErrMsg(t('ssov2.phone.alreadyUsed'));
|
|
4184
|
+
}
|
|
4185
|
+
}
|
|
4186
|
+
else {
|
|
4187
|
+
setErrMsg(getErrorTextFromCode(t, userExist === null || userExist === void 0 ? void 0 : userExist.code));
|
|
4188
|
+
}
|
|
4189
|
+
}
|
|
4190
|
+
catch (e) {
|
|
4191
|
+
console.log(e);
|
|
4192
|
+
setErrMsg(getErrorTextFromCode(t, ''));
|
|
4193
|
+
}
|
|
4194
|
+
setLoading(false);
|
|
4195
|
+
});
|
|
3790
4196
|
return (React__default["default"].createElement("div", { style: {
|
|
3791
4197
|
display: hidden ? 'none' : 'block',
|
|
3792
4198
|
} },
|
|
@@ -3795,7 +4201,7 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3795
4201
|
React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" }, t('ssov2.phoneVerify.title')),
|
|
3796
4202
|
React__default["default"].createElement(index$3.Text, { size: "p4" }, t('ssov2.phoneVerify.description'))),
|
|
3797
4203
|
React__default["default"].createElement(core.Stack, { spacing: 16 },
|
|
3798
|
-
React__default["default"].createElement(index$
|
|
4204
|
+
React__default["default"].createElement(index$6.Input.Wrapper, { error: errMsg },
|
|
3799
4205
|
React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => {
|
|
3800
4206
|
setPhone(value);
|
|
3801
4207
|
setErrMsg('');
|
|
@@ -3808,8 +4214,9 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3808
4214
|
'data-event-category': trackingCategory,
|
|
3809
4215
|
};
|
|
3810
4216
|
}, []) })),
|
|
3811
|
-
React__default["default"].createElement(index$4.Button, { size: "lg", variant: "primary", onClick:
|
|
3812
|
-
React__default["default"].createElement(index$4.Button, { size: "
|
|
4217
|
+
isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(WhatsApp, null), color: "#00B16A" }, t('ssov2.button.continueWhatsApp'))),
|
|
4218
|
+
isFeatureZaloEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(Zalo, null) }, t('ssov2.button.continueZalo'))),
|
|
4219
|
+
isFeatureSMSEnabled && (React__default["default"].createElement(index$4.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["default"].createElement(core$1.ReplySquare, { size: 18 }) }, t('ssov2.button.continueSMS'))),
|
|
3813
4220
|
source !== 'care_onboarding' && source !== 'ecom' && React__default["default"].createElement(SetupLater, null)))));
|
|
3814
4221
|
};
|
|
3815
4222
|
|
|
@@ -3855,8 +4262,8 @@ loading, tracking, }) => {
|
|
|
3855
4262
|
const { setupSource } = store.useSSOV2Store();
|
|
3856
4263
|
const [dobChanged, setDobChanged] = React__default["default"].useState(false);
|
|
3857
4264
|
return (React__default["default"].createElement(core.Stack, { spacing: 12 },
|
|
3858
|
-
React__default["default"].createElement(index$
|
|
3859
|
-
React__default["default"].createElement(index$
|
|
4265
|
+
React__default["default"].createElement(index$6.Input, Object.assign({ name: "name", label: t('ssov2.setup.field.name.label'), withAsterisk: true, required: true, placeholder: t('ssov2.setup.field.name.placeholder'), 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 Name" }, form.getInputProps('name'))),
|
|
4266
|
+
React__default["default"].createElement(index$6.Input.Wrapper, Object.assign({ label: t('ssov2.setup.field.gender.label'), withAsterisk: true }, form.getInputProps('gender')),
|
|
3860
4267
|
React__default["default"].createElement(core.Group, null,
|
|
3861
4268
|
React__default["default"].createElement(index$4.Button, { type: "button", styles: {
|
|
3862
4269
|
root: {
|
|
@@ -3882,7 +4289,7 @@ loading, tracking, }) => {
|
|
|
3882
4289
|
: 'tertiary', onClick: () => {
|
|
3883
4290
|
form.setFieldValue('gender', 'male');
|
|
3884
4291
|
}, leftIcon: React__default["default"].createElement(MaleIcon, null), 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 Gender" }, t('ssov2.setup.field.gender.male')))),
|
|
3885
|
-
React__default["default"].createElement(index$
|
|
4292
|
+
React__default["default"].createElement(index$8.DatePicker, Object.assign({ name: "dob", label: t('ssov2.setup.field.dob.label'), withAsterisk: true, required: true, placeholder: t('ssov2.setup.field.dob.placeholder'), maxDate: new Date(new Date().getFullYear() - 18, new Date().getMonth(), new Date().getDate()), 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 Birthday" }, form.getInputProps('dob'), { onChange: (e) => {
|
|
3886
4293
|
form.getInputProps('dob').onChange(e);
|
|
3887
4294
|
setDobChanged(true);
|
|
3888
4295
|
}, onBlur: (e) => {
|
|
@@ -3890,7 +4297,7 @@ loading, tracking, }) => {
|
|
|
3890
4297
|
return;
|
|
3891
4298
|
form.getInputProps('dob').onBlur(e);
|
|
3892
4299
|
} })),
|
|
3893
|
-
needEmail && (React__default["default"].createElement(index$
|
|
4300
|
+
needEmail && (React__default["default"].createElement(index$6.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: {
|
|
3894
4301
|
display: isEmailDisable ? 'none' : 'block',
|
|
3895
4302
|
} }, form.getInputProps('email'))))));
|
|
3896
4303
|
};
|
|
@@ -3925,7 +4332,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3925
4332
|
var _a, _b, _c;
|
|
3926
4333
|
const { onClose, setTracking } = useSSOState();
|
|
3927
4334
|
const { t } = index.useTranslations();
|
|
3928
|
-
const { setupSource, flowData } = store.useSSOV2Store();
|
|
4335
|
+
const { setupSource, flowData, abTestFlow } = store.useSSOV2Store();
|
|
3929
4336
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
3930
4337
|
const userInfo = config === null || config === void 0 ? void 0 : config.userInfo;
|
|
3931
4338
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
@@ -3951,6 +4358,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3951
4358
|
undefined;
|
|
3952
4359
|
const needEmail = setupSource === 'care' ||
|
|
3953
4360
|
setupSource === 'ecom' ||
|
|
4361
|
+
setupSource === 'community' ||
|
|
3954
4362
|
!(flowData === null || flowData === void 0 ? void 0 : flowData.isVerifyPhone) ||
|
|
3955
4363
|
authMethod === 'facebook' ||
|
|
3956
4364
|
provider === 'facebook';
|
|
@@ -3960,8 +4368,8 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3960
4368
|
provider === 'google' ||
|
|
3961
4369
|
provider === 'email')) ||
|
|
3962
4370
|
(!!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email_verified_at));
|
|
3963
|
-
const trackingCategory = `SSO - ${authFlow === 'signup' ? 'Sign Up' : 'Existing Users'} via ${authMethod || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.provider)}`;
|
|
3964
|
-
const trackingAction =
|
|
4371
|
+
const trackingCategory = `SSO - ${authFlow === 'signup' ? 'Sign Up' : 'Existing Users'} via ${authMethod || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.provider)}_Phone_Adoption_Test_${abTestFlow}`;
|
|
4372
|
+
const trackingAction = `Add Information`;
|
|
3965
4373
|
React.useEffect(() => {
|
|
3966
4374
|
if (!hidden) {
|
|
3967
4375
|
setErrMsg('');
|
|
@@ -4071,9 +4479,9 @@ const SSOUpdateEmailScreen = ({ hidden, }) => {
|
|
|
4071
4479
|
const { t } = index.useTranslations();
|
|
4072
4480
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
4073
4481
|
const { setTracking } = useSSOState();
|
|
4074
|
-
const { flowData } = store.useSSOV2Store();
|
|
4075
|
-
const trackingCategory = `SSO - Existing User via ${flowData === null || flowData === void 0 ? void 0 : flowData.method}`;
|
|
4076
|
-
const trackingAction =
|
|
4482
|
+
const { flowData, abTestFlow } = store.useSSOV2Store();
|
|
4483
|
+
const trackingCategory = `SSO - Existing User via ${flowData === null || flowData === void 0 ? void 0 : flowData.method}_Phone_Adoption_Test_${abTestFlow}`;
|
|
4484
|
+
const trackingAction = `Continue With Email`;
|
|
4077
4485
|
React.useEffect(() => {
|
|
4078
4486
|
if (!hidden) {
|
|
4079
4487
|
setErrMsg('');
|
|
@@ -4132,7 +4540,7 @@ const SSOUpdateEmailScreen = ({ hidden, }) => {
|
|
|
4132
4540
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
4133
4541
|
React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" }, t('ssov2.updateEmail.title')),
|
|
4134
4542
|
React__default["default"].createElement(index$3.Text, { size: "p4" }, t('ssov2.updateEmail.description'))),
|
|
4135
|
-
React__default["default"].createElement(index$
|
|
4543
|
+
React__default["default"].createElement(index$6.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" }),
|
|
4136
4544
|
React__default["default"].createElement(index$4.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'))));
|
|
4137
4545
|
};
|
|
4138
4546
|
|
|
@@ -4182,7 +4590,7 @@ if (!String.prototype.capitalize) {
|
|
|
4182
4590
|
};
|
|
4183
4591
|
}
|
|
4184
4592
|
const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
4185
|
-
const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, forceReloadOnClose, } = store.useSSOV2Store();
|
|
4593
|
+
const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, forceReloadOnClose, setABTestFlow, } = store.useSSOV2Store();
|
|
4186
4594
|
React.useEffect(() => {
|
|
4187
4595
|
setMounted(true);
|
|
4188
4596
|
return () => {
|
|
@@ -4200,6 +4608,36 @@ const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
|
4200
4608
|
React.useEffect(() => {
|
|
4201
4609
|
setOnCloseProp(onCloseProps);
|
|
4202
4610
|
}, [onCloseProps]);
|
|
4611
|
+
React.useEffect(() => {
|
|
4612
|
+
const site = constantsDomainLocales.MAP_DOMAIN_BY_LOCALE[locale];
|
|
4613
|
+
const previousABTestingFlow = miscCookieHelper.getCookie('abTestingFlow');
|
|
4614
|
+
fetchFeatureFlag(site).then((data) => {
|
|
4615
|
+
if (data.is_enabled && isSupportProduct(data.products)) {
|
|
4616
|
+
if (previousABTestingFlow) {
|
|
4617
|
+
setABTestFlow(previousABTestingFlow);
|
|
4618
|
+
}
|
|
4619
|
+
else {
|
|
4620
|
+
const randomBetween100Percent = Math.floor(Math.random() * 100 + 1);
|
|
4621
|
+
const aFlow = data.a_percentage;
|
|
4622
|
+
if (randomBetween100Percent <= aFlow) {
|
|
4623
|
+
miscCookieHelper.setCookie('abTestingFlow', 'A', {
|
|
4624
|
+
days: 30,
|
|
4625
|
+
});
|
|
4626
|
+
setABTestFlow('A');
|
|
4627
|
+
}
|
|
4628
|
+
else {
|
|
4629
|
+
miscCookieHelper.setCookie('abTestingFlow', 'B', {
|
|
4630
|
+
days: 30,
|
|
4631
|
+
});
|
|
4632
|
+
setABTestFlow('B');
|
|
4633
|
+
}
|
|
4634
|
+
}
|
|
4635
|
+
}
|
|
4636
|
+
else {
|
|
4637
|
+
miscCookieHelper.deleteCookie('abTestingFlow');
|
|
4638
|
+
}
|
|
4639
|
+
});
|
|
4640
|
+
}, [locale]);
|
|
4203
4641
|
if (!isOpen) {
|
|
4204
4642
|
return null;
|
|
4205
4643
|
}
|
|
@@ -4230,7 +4668,7 @@ const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
|
4230
4668
|
onCloseProps === null || onCloseProps === void 0 ? void 0 : onCloseProps();
|
|
4231
4669
|
}
|
|
4232
4670
|
});
|
|
4233
|
-
return (React__default["default"].createElement(index$
|
|
4671
|
+
return (React__default["default"].createElement(index$6.ErrorBoundary, null,
|
|
4234
4672
|
React__default["default"].createElement(SSOStateProvider, { onClose: onClose, locale: locale },
|
|
4235
4673
|
React__default["default"].createElement(SSOPopupWrapper, { opened: true, onClose: onClose },
|
|
4236
4674
|
React__default["default"].createElement(SSOScreenRenderer, null)))));
|