@hhgtech/hhg-components 1.29.310-beta-5 → 1.29.311
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 +0 -2
- package/build/{LastPeriod-93ebc51a.js → LastPeriod-2107ce0b.js} +1 -1
- package/build/{MobileBottomNavigationIcon-3d454fab.js → MobileBottomNavigationIcon-2fa0dfec.js} +3 -3
- package/build/{Spinner-545ead79.js → Spinner-5eeed23a.js} +1 -1
- package/build/{WhatsApp-0ddcf5ef.js → WhatsApp-93a9b026.js} +1 -1
- package/build/adapters.js +19 -19
- package/build/atoms.js +46 -46
- package/build/babyGrowth.js +83 -83
- package/build/cache.js +2 -2
- package/build/care.js +17 -17
- package/build/careBookingSearchBar.js +14 -14
- package/build/careBookingSearchBarV2.js +15 -15
- package/build/components.js +90 -90
- package/build/{constants-29d2c733.js → constants-a3c59889.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-79b621cd.js → core-ecc818f0.js} +1 -1
- package/build/{dataTransform-603cb3b7.js → dataTransform-df350bff.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-ee813604.js → editor-40df96a9.js} +11 -11
- package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/{LastPeriod-6427f16d.js → LastPeriod-e3951455.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-54afba79.js → MobileBottomNavigationIcon-9216cca7.js} +3 -3
- package/build/esm/{Spinner-d9c3c089.js → Spinner-903430aa.js} +1 -1
- package/build/esm/{WhatsApp-3817574d.js → WhatsApp-a64943bc.js} +1 -1
- package/build/esm/adapters.js +19 -19
- package/build/esm/atoms.js +46 -46
- package/build/esm/babyGrowth.js +83 -83
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +17 -17
- package/build/esm/careBookingSearchBar.js +14 -14
- package/build/esm/careBookingSearchBarV2.js +15 -15
- package/build/esm/components.js +90 -90
- package/build/esm/{constants-93492225.js → constants-79f4e640.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-f0306b16.js → core-1a9ff9e4.js} +1 -1
- package/build/esm/{dataTransform-1ef6e73e.js → dataTransform-c881832b.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-9e48c6c6.js → editor-cf4bd5c2.js} +11 -11
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/{fixedBottomAdBlock-1240d06b.js → fixedBottomAdBlock-46427068.js} +24 -24
- package/build/esm/footer.js +21 -21
- package/build/esm/gAssets.js +2 -2
- package/build/esm/healthToolsCardWrapper.js +18 -18
- package/build/esm/healthToolsForm.js +33 -33
- package/build/esm/hooks.js +13 -13
- package/build/esm/i18n/translationKeys.d.ts +1 -1
- package/build/esm/i18n-values/en-PH.js +0 -1
- package/build/esm/i18n-values/hi-IN.js +0 -1
- package/build/esm/i18n-values/id-ID.js +0 -1
- package/build/esm/i18n-values/km-KH.js +1 -2
- package/build/esm/i18n-values/ms-MY.js +0 -1
- package/build/esm/i18n-values/my-MM.js +0 -1
- package/build/esm/i18n-values/th-TH.js +0 -1
- package/build/esm/i18n-values/tl-PH.js +0 -1
- package/build/esm/i18n-values/vi-VN.js +0 -1
- package/build/esm/i18n-values/vi-VN_MB.js +0 -1
- package/build/esm/i18n-values/zh-TW.js +0 -1
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-4bd879eb.js → index-0099b8f2.js} +1 -1
- package/build/esm/{index-334295e8.js → index-0202ef16.js} +3 -3
- package/build/esm/{index-efc5bd83.js → index-060736dd.js} +7 -7
- package/build/esm/{index-02c7eba8.js → index-0fa8c9a5.js} +5 -5
- package/build/esm/{index-c691a5d0.js → index-10898fb6.js} +15 -15
- package/build/esm/{index-84288de1.js → index-116f69cf.js} +1 -1
- package/build/esm/{index-333c675d.js → index-13f9bf44.js} +30 -30
- package/build/esm/{index-18d2773b.js → index-148c8577.js} +5 -5
- package/build/esm/{index-26ac0d81.js → index-14bfa2c9.js} +2 -2
- package/build/esm/{index-a65a00ab.js → index-16e03c09.js} +2 -2
- package/build/esm/{index-c6dd477d.js → index-189a9824.js} +3 -3
- package/build/esm/{index-de9b6c66.js → index-1d64e6cf.js} +26 -26
- package/build/esm/{index-f92a27e8.js → index-2bf08a6b.js} +2 -2
- package/build/esm/{index-30a6b0c3.js → index-2f27692b.js} +13 -13
- package/build/esm/{index-a6debbcc.js → index-308d4854.js} +3 -3
- package/build/esm/{index-556eaa5a.js → index-340d1a01.js} +24 -24
- package/build/esm/{index-ff0d87c0.js → index-347f6319.js} +2 -2
- package/build/esm/{index-6f2084f2.js → index-3afff570.js} +18 -18
- package/build/esm/{index-de0db7c7.js → index-3d3d0613.js} +2 -2
- package/build/esm/{index-53dbc2d0.js → index-41fff10e.js} +3 -3
- package/build/esm/{index-5915bbe9.js → index-434b8921.js} +21 -21
- package/build/esm/{index-a61170d8.js → index-4a13f41d.js} +1 -1
- package/build/esm/{index-9f703518.js → index-4c62f4db.js} +6 -6
- package/build/esm/{index-58646f33.js → index-4cc596e0.js} +7 -7
- package/build/esm/{index-43b78550.js → index-53014194.js} +13 -13
- package/build/esm/{index-c96c8d0b.js → index-630296c3.js} +1 -1
- package/build/esm/{index-6dc065e0.js → index-6354b22f.js} +3 -3
- package/build/esm/{index-902860a7.js → index-66c9c3c6.js} +16 -16
- package/build/esm/{index-88759ed1.js → index-6bb36621.js} +1 -1
- package/build/esm/{index-bba5d96b.js → index-6c43703a.js} +6 -6
- package/build/esm/{index-fe138667.js → index-75b8afb7.js} +1 -1
- package/build/esm/{index-6eca1b84.js → index-78e5203a.js} +13 -13
- package/build/esm/{index-8d741397.js → index-7da61d52.js} +2 -2
- package/build/esm/{index-67433083.js → index-809fc2cb.js} +32 -32
- package/build/esm/{index-eff9c6f6.js → index-81f30b2c.js} +6 -6
- package/build/esm/{index-e65a76fd.js → index-85f514dd.js} +17 -17
- package/build/esm/{index-1f3e450b.js → index-88358d84.js} +13 -13
- package/build/esm/{index-8e632574.js → index-8d5b7ebd.js} +16 -16
- package/build/esm/{index-d5abff8c.js → index-9e9fd42c.js} +1 -1
- package/build/esm/{index-9ed6478a.js → index-a7f516ad.js} +2 -2
- package/build/esm/{index-5bbc2e7e.js → index-ae56762e.js} +17 -17
- package/build/esm/{index-5756472c.js → index-b4ead995.js} +2 -2
- package/build/esm/{index-974c8ac0.js → index-b5a40899.js} +11 -11
- package/build/esm/{index-2995d38d.js → index-b6442a0d.js} +20 -20
- package/build/esm/{index-7cbc7122.js → index-be992c75.js} +3 -3
- package/build/esm/{index-5e983251.js → index-c5c3e71e.js} +2 -2
- package/build/esm/{index-df945777.js → index-c5c4cd20.js} +6 -6
- package/build/esm/{index-728d3672.js → index-c85f723d.js} +15 -15
- package/build/esm/{index-56166ea9.js → index-ca0e9bf8.js} +18 -18
- package/build/esm/{index-5e38d731.js → index-cdb8c87e.js} +1 -1
- package/build/esm/{index-f7a1be3d.js → index-cde9ca6c.js} +18 -18
- package/build/esm/{index-8d92fdfc.js → index-cf31f84c.js} +2 -2
- package/build/esm/{index-6d670de3.js → index-d291e7d4.js} +3 -3
- package/build/esm/{index-21dd1ec2.js → index-d5dc6344.js} +2 -2
- package/build/esm/{index-da48077f.js → index-d92ce05b.js} +17 -17
- package/build/esm/{index-463a73f4.js → index-dd2caaea.js} +4 -4
- package/build/esm/{index-eaa201ba.js → index-e33334d0.js} +2 -2
- package/build/esm/{index-a4d5e355.js → index-e66f15e0.js} +10 -10
- package/build/esm/{index-ad33b0de.js → index-e6e1a986.js} +16 -16
- package/build/esm/{index-2ec3c0b8.js → index-fa13fe6b.js} +1 -1
- package/build/esm/index.js +112 -112
- package/build/esm/{labelSorting-69152711.js → labelSorting-76cf0104.js} +4 -4
- package/build/esm/lead.js +24 -24
- package/build/esm/{logoIcon-f7d8a376.js → logoIcon-90c6ed4d.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/{post-bb0e92f7.js → post-0c8fcb47.js} +2 -2
- package/build/esm/profileNavigation.js +19 -19
- package/build/esm/progressBar.js +1 -1
- package/build/esm/pwg.js +22 -22
- package/build/esm/ssoV2/api/paths.d.ts +0 -1
- package/build/esm/ssoV2/index.d.ts +0 -5
- package/build/esm/ssoV2/screens/setup/otherSetup.d.ts +1 -1
- package/build/esm/ssoV2/ssoStateManager/store.d.ts +0 -14
- package/build/esm/ssoV2.js +247 -436
- package/build/esm/{store-36a2023e.js → store-2a1b6eeb.js} +5 -24
- 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-2fcfe267.js → surveyThankyouCard-876d3fa8.js} +5 -5
- package/build/esm/together.js +53 -53
- package/build/esm/togetherApiUtils.js +4 -4
- package/build/esm/togetherAtoms.js +30 -30
- package/build/esm/togetherComponentGlobalContext.js +4 -4
- package/build/esm/togetherMolecules.js +48 -48
- package/build/esm/togetherMoleculesCardAuthor.js +27 -27
- package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
- package/build/esm/togetherMoleculesProfileDetail.js +37 -37
- package/build/esm/togetherOrganisms.js +47 -47
- package/build/esm/togetherRichTextEditor.js +17 -17
- package/build/esm/togetherShareBox.js +10 -10
- package/build/esm/{treePopoverMenu-f4cb9e8b.js → treePopoverMenu-b567b402.js} +19 -19
- package/build/esm/{types-2bf4e0a0.js → types-98286e03.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-937f06fd.js → useCategory-e9703fcc.js} +5 -5
- package/build/esm/{useHealthToolCache-cbe233c1.js → useHealthToolCache-497b3113.js} +1 -1
- package/build/esm/{useMantineLocale-c2b902a7.js → useMantineLocale-bd1e758a.js} +6 -6
- package/build/esm/{usePlacesAutocomplete-f8b1b6ce.js → usePlacesAutocomplete-d6c6019b.js} +1 -1
- package/build/esm/{useScreenSize-adb5e955.js → useScreenSize-40c82c05.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-33525a90.js → utils-10430638.js} +3 -3
- package/build/esm/{utils-10cbbbdc.js → utils-5f291626.js} +2 -2
- package/build/esm/{utils-3a31fb8d.js → utils-e5d33fe3.js} +2 -2
- package/build/esm/vaccination.js +21 -21
- package/build/{fixedBottomAdBlock-2bdd69ca.js → fixedBottomAdBlock-fb98a4e6.js} +24 -24
- package/build/footer.js +21 -21
- package/build/gAssets.js +2 -2
- package/build/healthToolsCardWrapper.js +18 -18
- package/build/healthToolsForm.js +33 -33
- package/build/hooks.js +13 -13
- package/build/i18n/translationKeys.d.ts +1 -1
- package/build/i18n-values/en-PH.js +0 -1
- package/build/i18n-values/hi-IN.js +0 -1
- package/build/i18n-values/id-ID.js +0 -1
- package/build/i18n-values/km-KH.js +1 -2
- package/build/i18n-values/ms-MY.js +0 -1
- package/build/i18n-values/my-MM.js +0 -1
- package/build/i18n-values/th-TH.js +0 -1
- package/build/i18n-values/tl-PH.js +0 -1
- package/build/i18n-values/vi-VN.js +0 -1
- package/build/i18n-values/vi-VN_MB.js +0 -1
- package/build/i18n-values/zh-TW.js +0 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-a8cd4428.js → index-0c5b5a40.js} +20 -20
- package/build/{index-cda50901.js → index-188f5a1c.js} +2 -2
- package/build/{index-01483c32.js → index-1d6281f6.js} +1 -1
- package/build/{index-c6dabd17.js → index-1e0434fd.js} +5 -5
- package/build/{index-3aae6ed2.js → index-1f9ad2eb.js} +1 -1
- package/build/{index-ad80b183.js → index-23805e05.js} +6 -6
- package/build/{index-c01afb63.js → index-2551c303.js} +1 -1
- package/build/{index-165472b7.js → index-286cce3b.js} +17 -17
- package/build/{index-141b85d6.js → index-2baef874.js} +1 -1
- package/build/{index-06cf85bd.js → index-2e0023c8.js} +15 -15
- package/build/{index-cb4468c0.js → index-32f52199.js} +4 -4
- package/build/{index-635f1e73.js → index-34fe205a.js} +10 -10
- package/build/{index-11a6f008.js → index-3aec5aee.js} +2 -2
- package/build/{index-82cf4d4f.js → index-3c10fbfa.js} +2 -2
- package/build/{index-8ffe558b.js → index-40771dad.js} +3 -3
- package/build/{index-2977f557.js → index-46b2200b.js} +16 -16
- package/build/{index-fddb8755.js → index-4a04c1d8.js} +7 -7
- package/build/{index-b541306a.js → index-4b623617.js} +2 -2
- package/build/{index-81b58b86.js → index-4df71ee6.js} +17 -17
- package/build/{index-fc6f41d4.js → index-4ee89043.js} +3 -3
- package/build/{index-990699bb.js → index-4f1ed7eb.js} +2 -2
- package/build/{index-9749de0b.js → index-53aa2337.js} +15 -15
- package/build/{index-e99a6160.js → index-55e75fea.js} +18 -18
- package/build/{index-885aede1.js → index-56fff3f2.js} +1 -1
- package/build/{index-21fee443.js → index-5874bcf9.js} +6 -6
- package/build/{index-ed995666.js → index-606a09c0.js} +1 -1
- package/build/{index-ea44eed5.js → index-6089f95a.js} +16 -16
- package/build/{index-9e32cd19.js → index-685db51a.js} +24 -24
- package/build/{index-eca921e1.js → index-6ee7fe98.js} +30 -30
- package/build/{index-1f6c4aae.js → index-76efb5fb.js} +1 -1
- package/build/{index-107686c2.js → index-89b71178.js} +3 -3
- package/build/{index-48c10a94.js → index-8aad4619.js} +18 -18
- package/build/{index-e3c62210.js → index-8fc3d400.js} +7 -7
- package/build/{index-ba55adbd.js → index-90ab1ea7.js} +3 -3
- package/build/{index-841cb4ad.js → index-9125292c.js} +3 -3
- package/build/{index-fded0d44.js → index-95320aa8.js} +1 -1
- package/build/{index-56d369df.js → index-95ccdb7f.js} +3 -3
- package/build/{index-85bca058.js → index-969cd112.js} +11 -11
- package/build/{index-650908cb.js → index-96be67bf.js} +2 -2
- package/build/{index-5fd6dce7.js → index-99410d26.js} +2 -2
- package/build/{index-17c0c2f6.js → index-9a625f5e.js} +13 -13
- package/build/{index-aee4ebbb.js → index-9de29abf.js} +16 -16
- package/build/{index-c253c3e4.js → index-9e2d7c97.js} +5 -5
- package/build/{index-a7456a60.js → index-a834d49b.js} +3 -3
- package/build/{index-4391c1be.js → index-ad33b8f9.js} +18 -18
- package/build/{index-0c5d68d1.js → index-aef6ff34.js} +32 -32
- package/build/{index-e957ae0f.js → index-b6d27f9a.js} +21 -21
- package/build/{index-998e8726.js → index-bfad3960.js} +2 -2
- package/build/{index-6c4992c4.js → index-c08747a6.js} +26 -26
- package/build/{index-d8a7becc.js → index-c3785047.js} +2 -2
- package/build/{index-f5f85dbf.js → index-d3872755.js} +2 -2
- package/build/{index-23f0f591.js → index-e1e08c25.js} +2 -2
- package/build/{index-e9d88ea8.js → index-e208b34a.js} +13 -13
- package/build/{index-390495f0.js → index-e649c3f8.js} +6 -6
- package/build/{index-be776730.js → index-e67c5ae1.js} +1 -1
- package/build/{index-a8e43760.js → index-e811fb10.js} +13 -13
- package/build/{index-487476a5.js → index-e8747d65.js} +13 -13
- package/build/{index-a1f7a19c.js → index-ea370ff2.js} +17 -17
- package/build/{index-54fe7b0a.js → index-ee69c925.js} +2 -2
- package/build/{index-cc290860.js → index-fd92c8a1.js} +6 -6
- package/build/index.js +112 -112
- package/build/{labelSorting-dc2c3bd8.js → labelSorting-95a1a528.js} +4 -4
- package/build/lead.js +24 -24
- package/build/{logoIcon-135dc217.js → logoIcon-e5bd7343.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/{post-8b96aa7f.js → post-88476eaa.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/paths.d.ts +0 -1
- package/build/ssoV2/index.d.ts +0 -5
- package/build/ssoV2/screens/setup/otherSetup.d.ts +1 -1
- package/build/ssoV2/ssoStateManager/store.d.ts +0 -14
- package/build/ssoV2.js +244 -433
- package/build/{store-77e43fb8.js → store-69bb3be7.js} +4 -26
- package/build/subot.js +32 -32
- package/build/surveyOrPremiumBanner.js +31 -31
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-51d2f175.js → surveyThankyouCard-56f0ae37.js} +5 -5
- package/build/together.js +53 -53
- package/build/togetherApiUtils.js +4 -4
- package/build/togetherAtoms.js +30 -30
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +48 -48
- package/build/togetherMoleculesCardAuthor.js +27 -27
- package/build/togetherMoleculesPostImagePreview.js +11 -11
- package/build/togetherMoleculesProfileDetail.js +37 -37
- package/build/togetherOrganisms.js +47 -47
- package/build/togetherRichTextEditor.js +17 -17
- package/build/togetherShareBox.js +10 -10
- package/build/{treePopoverMenu-ec18536b.js → treePopoverMenu-87ca9b4c.js} +19 -19
- package/build/{types-e37ef133.js → types-267e6ecb.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-645f6b16.js → useCategory-601dc682.js} +5 -5
- package/build/{useHealthToolCache-0dd32c9d.js → useHealthToolCache-fb8ea8e7.js} +1 -1
- package/build/{useMantineLocale-ed32e2e5.js → useMantineLocale-48052e4d.js} +6 -6
- package/build/{usePlacesAutocomplete-15ca451d.js → usePlacesAutocomplete-32fb6ea6.js} +1 -1
- package/build/{useScreenSize-ce6c2232.js → useScreenSize-e56ada5a.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-7b31a6bc.js → utils-51039a43.js} +2 -2
- package/build/{utils-03448a22.js → utils-741b2173.js} +3 -3
- package/build/{utils-1f5a1128.js → utils-bc112548.js} +2 -2
- package/build/vaccination.js +21 -21
- package/package.json +1 -1
- package/build/esm/ssoV2/screens/components/progressBar.d.ts +0 -14
- package/build/esm/ssoV2/screens/components/progressBar.utils.d.ts +0 -6
- package/build/esm/ssoV2/screens/components/setupLater.d.ts +0 -6
- package/build/ssoV2/screens/components/progressBar.d.ts +0 -14
- package/build/ssoV2/screens/components/progressBar.utils.d.ts +0 -6
- package/build/ssoV2/screens/components/setupLater.d.ts +0 -6
- /package/build/{BMI_BOYS.percentile.monthly-34bb802d.js → BMI_BOYS.percentile.monthly-93d6990e.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-b781fbf4.js → BMI_BOYS.percentile.weekly-9de93fe7.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-1b135a83.js → BMI_BOYS.percentile.yearly-a40e7b56.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-372c40c1.js → BMI_BOYS.zscore.monthly-ba9026f5.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-b9cb7209.js → BMI_BOYS.zscore.weekly-a7de23e7.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-afbab117.js → BMI_BOYS.zscore.yearly-1416c78c.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-6c835e41.js → BMI_GIRLS.percentile.monthly-4790fce8.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-91964c71.js → BMI_GIRLS.percentile.weekly-f929726a.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-14ec2adc.js → BMI_GIRLS.percentile.yearly-4387c6c5.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-ea677d60.js → BMI_GIRLS.zscore.monthly-4c264643.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-1ddc89e0.js → BMI_GIRLS.zscore.weekly-a133bb6e.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-c8bc48fd.js → BMI_GIRLS.zscore.yearly-a0404db2.js} +0 -0
- /package/build/{ChevronDown-a4736fff.js → ChevronDown-aaa35ea2.js} +0 -0
- /package/build/{Close-c60379ca.js → Close-6c6e9720.js} +0 -0
- /package/build/{Google-b0097190.js → Google-10b046ef.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-f02ba12b.js → HEAD CIRCUM_BOYS.percentile.monthly-f63b1535.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-3da81a47.js → HEAD CIRCUM_BOYS.percentile.weekly-5a387c89.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-fcfb0d59.js → HEAD CIRCUM_BOYS.percentile.yearly-e257b63e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-cbbbcaaa.js → HEAD CIRCUM_BOYS.zscore.monthly-2676a44b.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-492600c3.js → HEAD CIRCUM_BOYS.zscore.weekly-4fee3b5b.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-c2e10d0c.js → HEAD CIRCUM_BOYS.zscore.yearly-545e264d.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-96aa3937.js → HEAD CIRCUM_GIRLS.percentile.monthly-ae0d3971.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-bd027857.js → HEAD CIRCUM_GIRLS.percentile.weekly-b472028c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-e96a83fc.js → HEAD CIRCUM_GIRLS.percentile.yearly-7a362bfe.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-dfbce003.js → HEAD CIRCUM_GIRLS.zscore.monthly-e48d6185.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-683838ce.js → HEAD CIRCUM_GIRLS.zscore.weekly-8a9676c2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-87483c17.js → HEAD CIRCUM_GIRLS.zscore.yearly-d213569e.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-f212f0ef.js → HEIGHT_BOYS.percentile.monthly-57cf9281.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-bf145456.js → HEIGHT_BOYS.percentile.weekly-155a877f.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-8645cdb1.js → HEIGHT_BOYS.percentile.yearly-94b0bdeb.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-6ad90703.js → HEIGHT_BOYS.zscore.monthly-4d7065ee.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-a669ab0f.js → HEIGHT_BOYS.zscore.weekly-cc0f3ef4.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-e6cb3749.js → HEIGHT_BOYS.zscore.yearly-1d12eeaa.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-da82bbaf.js → HEIGHT_GIRLS.percentile.monthly-5af692bf.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-71cca834.js → HEIGHT_GIRLS.percentile.weekly-82607a5b.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-5c051f8c.js → HEIGHT_GIRLS.percentile.yearly-1f188b70.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-9cc31b45.js → HEIGHT_GIRLS.zscore.monthly-20f568c9.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-3465f90a.js → HEIGHT_GIRLS.zscore.weekly-351d9c9c.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-41c11015.js → HEIGHT_GIRLS.zscore.yearly-66277de4.js} +0 -0
- /package/build/{Locale-edfd1e2d.js → Locale-4c8042b0.js} +0 -0
- /package/build/{Visible-7e79d0b4.js → Visible-fd04e5be.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-d1610d56.js → WEIGHT_BOYS.percentile.monthly-98d965cb.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-21585523.js → WEIGHT_BOYS.percentile.weekly-8f8e8921.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-15d84bf6.js → WEIGHT_BOYS.percentile.yearly-154795f6.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-6dd42b57.js → WEIGHT_BOYS.zscore.monthly-d0519c13.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-51b94935.js → WEIGHT_BOYS.zscore.weekly-e1ead695.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-c25c6271.js → WEIGHT_BOYS.zscore.yearly-2fe02df0.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-f8dce4e5.js → WEIGHT_GIRLS.percentile.monthly-3efc2d52.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-2f3f40df.js → WEIGHT_GIRLS.percentile.weekly-dc56f5bc.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-1300f090.js → WEIGHT_GIRLS.percentile.yearly-7e0956b7.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-7af91795.js → WEIGHT_GIRLS.zscore.monthly-cafaa82f.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-9836b82b.js → WEIGHT_GIRLS.zscore.weekly-68994c02.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-3c254b6d.js → WEIGHT_GIRLS.zscore.yearly-2981a41f.js} +0 -0
- /package/build/{animation-c517204e.js → animation-b507cd11.js} +0 -0
- /package/build/{constants-871de1bb.js → constants-10359dd4.js} +0 -0
- /package/build/{constants-462dad39.js → constants-2b28086d.js} +0 -0
- /package/build/{constants-3453d8ac.js → constants-992b0578.js} +0 -0
- /package/build/{dataTransform-840432fc.js → dataTransform-6e222d1a.js} +0 -0
- /package/build/{doctor-ed1c422f.js → doctor-b2ec210f.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-1eda819d.js → BMI_BOYS.percentile.monthly-a07f0f54.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-03afbbe9.js → BMI_BOYS.percentile.weekly-85dbca5e.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-72e641fb.js → BMI_BOYS.percentile.yearly-f41886bc.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-3c52129d.js → BMI_BOYS.zscore.monthly-ea595935.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-6b460309.js → BMI_BOYS.zscore.weekly-7d9c599e.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-3200e347.js → BMI_BOYS.zscore.yearly-805285c0.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-0f6539fd.js → BMI_GIRLS.percentile.monthly-540f6f76.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-37b9af79.js → BMI_GIRLS.percentile.weekly-57919e11.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-a758416c.js → BMI_GIRLS.percentile.yearly-93301c51.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-b18785f2.js → BMI_GIRLS.zscore.monthly-da84c887.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-3e68338e.js → BMI_GIRLS.zscore.weekly-0955bde2.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-bcbe13d0.js → BMI_GIRLS.zscore.yearly-971fce28.js} +0 -0
- /package/build/esm/{ChevronDown-7684e837.js → ChevronDown-1e78a8e7.js} +0 -0
- /package/build/esm/{Close-94c355de.js → Close-d0842035.js} +0 -0
- /package/build/esm/{Google-42d190a1.js → Google-64dc9f05.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-93fffb49.js → HEAD CIRCUM_BOYS.percentile.monthly-c15a00f2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-ad5b48eb.js → HEAD CIRCUM_BOYS.percentile.weekly-954bfb7e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-e3d6819a.js → HEAD CIRCUM_BOYS.percentile.yearly-821fc4f5.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-d3f9bfe1.js → HEAD CIRCUM_BOYS.zscore.monthly-db8b365a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-84436351.js → HEAD CIRCUM_BOYS.zscore.weekly-eb78ff15.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-1a7c80ea.js → HEAD CIRCUM_BOYS.zscore.yearly-ec7bc0b9.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-a6d1a41f.js → HEAD CIRCUM_GIRLS.percentile.monthly-4cda8496.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-841c7dd7.js → HEAD CIRCUM_GIRLS.percentile.weekly-fede4105.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-30807d6f.js → HEAD CIRCUM_GIRLS.percentile.yearly-dccd0acf.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-e74bf964.js → HEAD CIRCUM_GIRLS.zscore.monthly-14e6354f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-b28c3d16.js → HEAD CIRCUM_GIRLS.zscore.weekly-b2f1adef.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-7746023e.js → HEAD CIRCUM_GIRLS.zscore.yearly-d01b98b8.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-46eec644.js → HEIGHT_BOYS.percentile.monthly-82e1ff12.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-74ae0ace.js → HEIGHT_BOYS.percentile.weekly-2ad2d4ca.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-1640c7b5.js → HEIGHT_BOYS.percentile.yearly-7086aebe.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-d41ab946.js → HEIGHT_BOYS.zscore.monthly-838e2b31.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-ec199baa.js → HEIGHT_BOYS.zscore.weekly-e4449bdc.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-ec37fc0d.js → HEIGHT_BOYS.zscore.yearly-23327e54.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-684faf5f.js → HEIGHT_GIRLS.percentile.monthly-4d4e9eb8.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-063c3783.js → HEIGHT_GIRLS.percentile.weekly-56a63779.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-8fbf740a.js → HEIGHT_GIRLS.percentile.yearly-4489fbb4.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-f7fe5edb.js → HEIGHT_GIRLS.zscore.monthly-32157cb0.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-3e5362a9.js → HEIGHT_GIRLS.zscore.weekly-082dac9e.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-188674a2.js → HEIGHT_GIRLS.zscore.yearly-5deb5013.js} +0 -0
- /package/build/esm/{Locale-e7dd53a3.js → Locale-05f46f2a.js} +0 -0
- /package/build/esm/{Visible-76046539.js → Visible-fd6bc425.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-fc5c846b.js → WEIGHT_BOYS.percentile.monthly-1c1fad72.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-ce33d1dc.js → WEIGHT_BOYS.percentile.weekly-6d494fdd.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-859b9e55.js → WEIGHT_BOYS.percentile.yearly-9be5f2bb.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-5a20a925.js → WEIGHT_BOYS.zscore.monthly-fc1521fe.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-ad46a7d4.js → WEIGHT_BOYS.zscore.weekly-8485d2f3.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-4e795b4b.js → WEIGHT_BOYS.zscore.yearly-e232227b.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-1e70a54f.js → WEIGHT_GIRLS.percentile.monthly-4736c7aa.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-471c1aba.js → WEIGHT_GIRLS.percentile.weekly-00d5d075.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-cdd5a5e1.js → WEIGHT_GIRLS.percentile.yearly-17fafef1.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-e5c4f0cb.js → WEIGHT_GIRLS.zscore.monthly-0f34e73c.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-6e6e542b.js → WEIGHT_GIRLS.zscore.weekly-7df80bb8.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-bdc35cf0.js → WEIGHT_GIRLS.zscore.yearly-9b920f57.js} +0 -0
- /package/build/esm/{animation-c95ffdee.js → animation-8e63068e.js} +0 -0
- /package/build/esm/{constants-6f6ddc36.js → constants-1ed528a3.js} +0 -0
- /package/build/esm/{constants-801453a8.js → constants-25cc884e.js} +0 -0
- /package/build/esm/{constants-c98ae9ee.js → constants-fff0e873.js} +0 -0
- /package/build/esm/{dataTransform-44516f8c.js → dataTransform-7f13a99d.js} +0 -0
- /package/build/esm/{doctor-b4f4f389.js → doctor-e1757149.js} +0 -0
- /package/build/esm/{index-5ee57de7.js → index-0552435e.js} +0 -0
- /package/build/esm/{index-66150149.js → index-3f41e1e2.js} +0 -0
- /package/build/esm/{index-24663632.js → index-618f0b0c.js} +0 -0
- /package/build/esm/{index-0c9f015b.js → index-84bd0271.js} +0 -0
- /package/build/esm/{index-f18ef1e3.js → index-c02e04f4.js} +0 -0
- /package/build/esm/{index-45755052.js → index-cef61a9e.js} +0 -0
- /package/build/esm/{index-66d97368.js → index-d3f5d34b.js} +0 -0
- /package/build/esm/{index-565a80b0.js → index-d50c1b6d.js} +0 -0
- /package/build/esm/{index-ea14dc61.js → index-f4597cea.js} +0 -0
- /package/build/esm/{index.styles-0e5fc387.js → index.styles-dfe31537.js} +0 -0
- /package/build/esm/{localizeNumberFormat-236a4b14.js → localizeNumberFormat-c14eab14.js} +0 -0
- /package/build/esm/{normalizeLink-20a616dd.js → normalizeLink-2bf24c8c.js} +0 -0
- /package/build/esm/{other-d17b315d.js → other-8e7af889.js} +0 -0
- /package/build/esm/{paths-3b888e98.js → paths-a859c358.js} +0 -0
- /package/build/esm/{translationsContext-9d15b26c.js → translationsContext-b6c33e91.js} +0 -0
- /package/build/esm/{tslib.es6-35c86ab7.js → tslib.es6-709d7787.js} +0 -0
- /package/build/esm/{types-38561610.js → types-0904d32f.js} +0 -0
- /package/build/esm/{useIsInit-4edc15a1.js → useIsInit-3383f41b.js} +0 -0
- /package/build/esm/{useOutsideClick-1fe587d9.js → useOutsideClick-11006abd.js} +0 -0
- /package/build/esm/{useScrollbarSize-b51b8144.js → useScrollbarSize-c15fd39e.js} +0 -0
- /package/build/esm/{useUniqueId-310f5e9a.js → useUniqueId-cf5d6065.js} +0 -0
- /package/build/esm/{utils-d7279c01.js → utils-e21b8836.js} +0 -0
- /package/build/{index-01dde6e7.js → index-0d669510.js} +0 -0
- /package/build/{index-143cc75d.js → index-39237568.js} +0 -0
- /package/build/{index-1da6abe7.js → index-44dd2ed3.js} +0 -0
- /package/build/{index-2f754923.js → index-6cb41f70.js} +0 -0
- /package/build/{index-e4aac848.js → index-8fc12b04.js} +0 -0
- /package/build/{index-1c2b8342.js → index-950cbd1e.js} +0 -0
- /package/build/{index-906f7ec1.js → index-ba7abd78.js} +0 -0
- /package/build/{index-cbf82b14.js → index-c2436bb5.js} +0 -0
- /package/build/{index-cb131ad9.js → index-c7782352.js} +0 -0
- /package/build/{index.styles-7a285dc7.js → index.styles-483ecf51.js} +0 -0
- /package/build/{localizeNumberFormat-74bf45ff.js → localizeNumberFormat-c35b4fab.js} +0 -0
- /package/build/{normalizeLink-bb0c5a5d.js → normalizeLink-d98c5115.js} +0 -0
- /package/build/{other-43aa6d8c.js → other-a39e1798.js} +0 -0
- /package/build/{paths-b9ab401f.js → paths-cc67867e.js} +0 -0
- /package/build/{translationsContext-65682f9f.js → translationsContext-9fb25554.js} +0 -0
- /package/build/{tslib.es6-114a4ba8.js → tslib.es6-54d5a3b5.js} +0 -0
- /package/build/{types-35b59d6d.js → types-5e6fd5c4.js} +0 -0
- /package/build/{useIsInit-e2a88e32.js → useIsInit-044fcacb.js} +0 -0
- /package/build/{useOutsideClick-baeacb64.js → useOutsideClick-e29d71c0.js} +0 -0
- /package/build/{useScrollbarSize-1ae23b0a.js → useScrollbarSize-46c0ff33.js} +0 -0
- /package/build/{useUniqueId-373a4f10.js → useUniqueId-45824993.js} +0 -0
- /package/build/{utils-0d9945f3.js → utils-ca404e47.js} +0 -0
package/build/esm/ssoV2.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { a as __awaiter, _ as __rest } from './tslib.es6-
|
|
2
|
-
import React__default, { createContext,
|
|
3
|
-
import { I as Input, s as styles, O as OTP, f as PasswordInput, E as ErrorBoundary } from './index-
|
|
4
|
-
import {
|
|
5
|
-
export { u as useSSOV2Store } from './store-
|
|
1
|
+
import { a as __awaiter, _ as __rest } from './tslib.es6-709d7787.js';
|
|
2
|
+
import React__default, { createContext, useEffect, useState, useMemo, useCallback, forwardRef } from 'react';
|
|
3
|
+
import { I as Input, s as styles, O as OTP, f as PasswordInput, R as Radio, E as ErrorBoundary } from './index-b5a40899.js';
|
|
4
|
+
import { a as useSSOSteps, f as fetchSSOV2Api, w as websiteId, S as SSO_V2_PATHS, c as checkUserExist, u as useSSOV2Store, b as SSOStepTypeType, F as FacebookAppId, G as GoogleAuthClientId, h as handleAuthSuccess, g as getUserInfo, i as isUserFinishedSetup, d as updateUserInfo, r as resetPassword, e as redirect } from './store-2a1b6eeb.js';
|
|
5
|
+
export { u as useSSOV2Store } from './store-2a1b6eeb.js';
|
|
6
6
|
import { ChevronLeft } from '@hhgtech/icons/arrow';
|
|
7
7
|
import { Close, Search } from '@hhgtech/icons/core';
|
|
8
|
-
import { Z as ZINDEX_SSO, L as LOCALE_SPECS, S as STATIC_PAGES } from './index-
|
|
9
|
-
import { L as LogoIcon } from './logoIcon-
|
|
10
|
-
import { B as Button } from './index-
|
|
11
|
-
import { M as Modal } from './index-
|
|
12
|
-
import { Stack,
|
|
8
|
+
import { Z as ZINDEX_SSO, L as LOCALE_SPECS, S as STATIC_PAGES } from './index-b4ead995.js';
|
|
9
|
+
import { L as LogoIcon } from './logoIcon-90c6ed4d.js';
|
|
10
|
+
import { B as Button } from './index-0099b8f2.js';
|
|
11
|
+
import { M as Modal } from './index-2bf08a6b.js';
|
|
12
|
+
import { Stack, Group, Box } from '@mantine/core';
|
|
13
13
|
import '@mantine/dates';
|
|
14
|
-
import './index-
|
|
15
|
-
import './index-
|
|
16
|
-
import { s as showNotification } from './useMantineLocale-
|
|
17
|
-
import { T as Text } from './index-
|
|
18
|
-
import { u as useTranslations } from './index-
|
|
14
|
+
import './index-4a13f41d.js';
|
|
15
|
+
import './index-d50c1b6d.js';
|
|
16
|
+
import { s as showNotification } from './useMantineLocale-bd1e758a.js';
|
|
17
|
+
import { T as Text } from './index-14bfa2c9.js';
|
|
18
|
+
import { u as useTranslations } from './index-6bb36621.js';
|
|
19
19
|
import '@mantine/hooks';
|
|
20
|
-
import './utils-
|
|
21
|
-
import './other-
|
|
22
|
-
import './index-
|
|
23
|
-
import { L as LOCALE } from './Locale-
|
|
24
|
-
import { G as Google, F as Facebook } from './Google-
|
|
20
|
+
import './utils-e21b8836.js';
|
|
21
|
+
import './other-8e7af889.js';
|
|
22
|
+
import './index-6354b22f.js';
|
|
23
|
+
import { L as LOCALE } from './Locale-05f46f2a.js';
|
|
24
|
+
import { G as Google, F as Facebook } from './Google-64dc9f05.js';
|
|
25
25
|
import { parsePhoneNumber, getCountryCallingCode } from 'react-phone-number-input';
|
|
26
26
|
import styled from '@emotion/styled';
|
|
27
27
|
import cn from 'classnames';
|
|
@@ -29,28 +29,28 @@ import { CaretDown } from '@hhgtech/icons/other';
|
|
|
29
29
|
import debounce from 'lodash/debounce';
|
|
30
30
|
import throttle from 'lodash/throttle';
|
|
31
31
|
import Flags from 'react-phone-number-input/flags';
|
|
32
|
-
import { u as useScreenSize } from './useScreenSize-
|
|
32
|
+
import { u as useScreenSize } from './useScreenSize-40c82c05.js';
|
|
33
33
|
import { Drawer } from 'vaul';
|
|
34
|
-
import { M as MAPPED_LOCALE } from './utils-
|
|
35
|
-
import { S as Spoiler } from './index-
|
|
34
|
+
import { M as MAPPED_LOCALE } from './utils-5f291626.js';
|
|
35
|
+
import { S as Spoiler } from './index-be992c75.js';
|
|
36
36
|
import { domainLocales } from './constantsDomainLocales.js';
|
|
37
37
|
import { useForm, yupResolver } from '@mantine/form';
|
|
38
38
|
import * as yup from 'yup';
|
|
39
39
|
import dayjs from 'dayjs';
|
|
40
|
-
import { D as DatePicker } from './index-
|
|
40
|
+
import { D as DatePicker } from './index-6c43703a.js';
|
|
41
41
|
import '@mantine/carousel';
|
|
42
42
|
import './miscTheme.js';
|
|
43
|
-
import './useUniqueId-
|
|
43
|
+
import './useUniqueId-cf5d6065.js';
|
|
44
44
|
import './constantsSite.js';
|
|
45
45
|
import 'zustand';
|
|
46
46
|
import './constantsIsProduction.js';
|
|
47
|
-
import './normalizeLink-
|
|
47
|
+
import './normalizeLink-2bf24c8c.js';
|
|
48
48
|
import './miscCookieHelper.js';
|
|
49
49
|
import 'date-fns/locale';
|
|
50
50
|
import './constantsRiskScreener.js';
|
|
51
|
-
import './index.styles-
|
|
51
|
+
import './index.styles-dfe31537.js';
|
|
52
52
|
import '@mantine/notifications';
|
|
53
|
-
import './translationsContext-
|
|
53
|
+
import './translationsContext-b6c33e91.js';
|
|
54
54
|
|
|
55
55
|
const SSOStateContext = createContext({
|
|
56
56
|
locale: LOCALE.Vietnam,
|
|
@@ -158,200 +158,13 @@ const BackgroundHeader = () => (React__default.createElement("svg", { width: "29
|
|
|
158
158
|
React__default.createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
|
|
159
159
|
React__default.createElement("stop", { offset: "1", stopColor: "#fff" })))));
|
|
160
160
|
|
|
161
|
-
const isPhoneVerifedAlready = (userInfo, flowData) => {
|
|
162
|
-
var _a;
|
|
163
|
-
if (flowData === null || flowData === void 0 ? void 0 : flowData.metaData) {
|
|
164
|
-
return (_a = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _a === void 0 ? void 0 : _a.is_phone_verified;
|
|
165
|
-
}
|
|
166
|
-
return (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone_verified_at) && (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone);
|
|
167
|
-
};
|
|
168
|
-
const isSetupFullInfoAlready = (userInfo, flowData) => {
|
|
169
|
-
var _a, _b, _c;
|
|
170
|
-
if (flowData === null || flowData === void 0 ? void 0 : flowData.metaData) {
|
|
171
|
-
return (((_a = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _a === void 0 ? void 0 : _a.is_name) &&
|
|
172
|
-
((_b = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _b === void 0 ? void 0 : _b.is_gender) &&
|
|
173
|
-
((_c = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _c === void 0 ? void 0 : _c.is_birthday));
|
|
174
|
-
}
|
|
175
|
-
const hasName = !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.name);
|
|
176
|
-
const hasGender = typeof (userInfo === null || userInfo === void 0 ? void 0 : userInfo.gender) === 'number';
|
|
177
|
-
const hasBirthday = !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.birthday);
|
|
178
|
-
return hasName && hasGender && hasBirthday;
|
|
179
|
-
};
|
|
180
|
-
const isExistUpdateEmailStep = (steps) => {
|
|
181
|
-
return steps.find((s) => s.type === SSOStepTypeType.UPDATE_EMAIL);
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
const isSocialFlowFn = (flowData) => {
|
|
185
|
-
return (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'google' || (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'facebook';
|
|
186
|
-
};
|
|
187
|
-
const isPhoneFlowFn = (flowData) => {
|
|
188
|
-
return ((flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'sms' ||
|
|
189
|
-
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'zalo' ||
|
|
190
|
-
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'phone');
|
|
191
|
-
};
|
|
192
|
-
const isEmailFlowFn = (flowData) => {
|
|
193
|
-
return (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'email';
|
|
194
|
-
};
|
|
195
|
-
const isDisplayProgressBarFn = (flowData, step) => {
|
|
196
|
-
const showProgressBar = (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP ||
|
|
197
|
-
(step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.SETUP_FULL ||
|
|
198
|
-
(step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.VERIFY_PHONE ||
|
|
199
|
-
(step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.PASSWORD ||
|
|
200
|
-
(step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.FORGOT_PASSWORD_PHONE ||
|
|
201
|
-
(step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.FORGOT_PASSWORD_SETUP ||
|
|
202
|
-
(step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.EMAIL ||
|
|
203
|
-
(step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.UPDATE_EMAIL;
|
|
204
|
-
const isWhiteListFlow = isSocialFlowFn(flowData) ||
|
|
205
|
-
isPhoneFlowFn(flowData) ||
|
|
206
|
-
isEmailFlowFn(flowData);
|
|
207
|
-
return showProgressBar && isWhiteListFlow;
|
|
208
|
-
};
|
|
209
|
-
const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo) => {
|
|
210
|
-
var _a, _b;
|
|
211
|
-
const step = steps[currentStepIndex];
|
|
212
|
-
const isSocialFlow = isSocialFlowFn(flowData);
|
|
213
|
-
const isPhoneFlow = isPhoneFlowFn(flowData);
|
|
214
|
-
const isEmailFlow = isEmailFlowFn(flowData);
|
|
215
|
-
/** Social (Google, Facebook): FIRST => VERIFY_PHONE | OTP => STEP_FULL */
|
|
216
|
-
if (isSocialFlow) {
|
|
217
|
-
const arrSteps = [
|
|
218
|
-
!isPhoneVerifedAlready(userInfo, flowData)
|
|
219
|
-
? [SSOStepTypeType.VERIFY_PHONE, SSOStepTypeType.OTP]
|
|
220
|
-
: undefined,
|
|
221
|
-
isExistUpdateEmailStep(steps)
|
|
222
|
-
? (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
|
|
223
|
-
? SSOStepTypeType.OTP
|
|
224
|
-
: SSOStepTypeType.UPDATE_EMAIL
|
|
225
|
-
: undefined,
|
|
226
|
-
!userInfo || !isUserFinishedSetup(userInfo)
|
|
227
|
-
? SSOStepTypeType.SETUP_FULL
|
|
228
|
-
: undefined,
|
|
229
|
-
]
|
|
230
|
-
.flat()
|
|
231
|
-
.filter(Boolean);
|
|
232
|
-
const previousStep = steps[currentStepIndex - 1];
|
|
233
|
-
return [
|
|
234
|
-
arrSteps.length,
|
|
235
|
-
(previousStep === null || previousStep === void 0 ? void 0 : previousStep.type) === SSOStepTypeType.UPDATE_EMAIL
|
|
236
|
-
? arrSteps.findLastIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1
|
|
237
|
-
: arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
|
|
238
|
-
];
|
|
239
|
-
}
|
|
240
|
-
if (isPhoneFlow && (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'signup') {
|
|
241
|
-
const arrSteps = [
|
|
242
|
-
!isPhoneVerifedAlready(userInfo, flowData)
|
|
243
|
-
? SSOStepTypeType.OTP
|
|
244
|
-
: undefined,
|
|
245
|
-
!((_a = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _a === void 0 ? void 0 : _a.is_pass)
|
|
246
|
-
? SSOStepTypeType.FORGOT_PASSWORD_SETUP
|
|
247
|
-
: undefined,
|
|
248
|
-
!isSetupFullInfoAlready(userInfo, flowData)
|
|
249
|
-
? SSOStepTypeType.SETUP_FULL
|
|
250
|
-
: undefined,
|
|
251
|
-
]
|
|
252
|
-
.flat()
|
|
253
|
-
.filter(Boolean);
|
|
254
|
-
return [
|
|
255
|
-
arrSteps.length,
|
|
256
|
-
arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
|
|
257
|
-
];
|
|
258
|
-
}
|
|
259
|
-
if (isPhoneFlow && (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'login') {
|
|
260
|
-
const arrSteps = [
|
|
261
|
-
SSOStepTypeType.PASSWORD,
|
|
262
|
-
!isPhoneVerifedAlready(userInfo, flowData)
|
|
263
|
-
? [SSOStepTypeType.FORGOT_PASSWORD_PHONE, SSOStepTypeType.OTP]
|
|
264
|
-
: undefined,
|
|
265
|
-
isExistUpdateEmailStep(steps)
|
|
266
|
-
? (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
|
|
267
|
-
? SSOStepTypeType.OTP
|
|
268
|
-
: SSOStepTypeType.UPDATE_EMAIL
|
|
269
|
-
: undefined,
|
|
270
|
-
!isSetupFullInfoAlready(userInfo, flowData)
|
|
271
|
-
? SSOStepTypeType.SETUP_FULL
|
|
272
|
-
: undefined,
|
|
273
|
-
]
|
|
274
|
-
.flat()
|
|
275
|
-
.filter(Boolean);
|
|
276
|
-
if (arrSteps.length === 2 &&
|
|
277
|
-
arrSteps[0] === SSOStepTypeType.PASSWORD &&
|
|
278
|
-
arrSteps[1] === SSOStepTypeType.SETUP_FULL) {
|
|
279
|
-
return [];
|
|
280
|
-
}
|
|
281
|
-
const previousStep = steps[currentStepIndex - 1];
|
|
282
|
-
return [
|
|
283
|
-
arrSteps.length,
|
|
284
|
-
(previousStep === null || previousStep === void 0 ? void 0 : previousStep.type) === SSOStepTypeType.UPDATE_EMAIL
|
|
285
|
-
? arrSteps.findLastIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1
|
|
286
|
-
: arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
|
|
287
|
-
];
|
|
288
|
-
}
|
|
289
|
-
if (isEmailFlow) {
|
|
290
|
-
const hasPasswordStep = !((_b = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _b === void 0 ? void 0 : _b.is_pass);
|
|
291
|
-
const hasPhoneStep = !isPhoneVerifedAlready(userInfo, flowData);
|
|
292
|
-
const hasSetupFullStep = !isSetupFullInfoAlready(userInfo, flowData);
|
|
293
|
-
if (!hasPasswordStep && !hasPhoneStep && !hasSetupFullStep)
|
|
294
|
-
return [];
|
|
295
|
-
const arrSteps = [
|
|
296
|
-
(step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
|
|
297
|
-
? SSOStepTypeType.OTP
|
|
298
|
-
: SSOStepTypeType.EMAIL,
|
|
299
|
-
hasPasswordStep
|
|
300
|
-
? SSOStepTypeType.FORGOT_PASSWORD_SETUP
|
|
301
|
-
: SSOStepTypeType.PASSWORD,
|
|
302
|
-
hasPhoneStep
|
|
303
|
-
? (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
|
|
304
|
-
? SSOStepTypeType.OTP
|
|
305
|
-
: SSOStepTypeType.VERIFY_PHONE
|
|
306
|
-
: undefined,
|
|
307
|
-
hasSetupFullStep ? SSOStepTypeType.SETUP_FULL : undefined,
|
|
308
|
-
]
|
|
309
|
-
.flat()
|
|
310
|
-
.filter(Boolean);
|
|
311
|
-
const previousStep = steps[currentStepIndex - 1];
|
|
312
|
-
return [
|
|
313
|
-
arrSteps.length,
|
|
314
|
-
(previousStep === null || previousStep === void 0 ? void 0 : previousStep.type) === SSOStepTypeType.VERIFY_PHONE
|
|
315
|
-
? arrSteps.findLastIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1
|
|
316
|
-
: arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
|
|
317
|
-
];
|
|
318
|
-
}
|
|
319
|
-
return [];
|
|
320
|
-
};
|
|
321
|
-
const ProgressBar = () => {
|
|
322
|
-
// const initUserInfo = useRef<UserInfo | undefined | null>()
|
|
323
|
-
const { steps, currentStepIndex } = useSSOSteps();
|
|
324
|
-
const { flowData, userInfo } = useSSOV2Store();
|
|
325
|
-
/** No need update state IF userInfo is changed */
|
|
326
|
-
const initUserInfo = useMemo(() => userInfo, [userInfo]);
|
|
327
|
-
const [totalStepNumber, activeStepNumber] = getCurrentStepNumber(flowData, { steps, currentStepIndex }, initUserInfo);
|
|
328
|
-
if (!activeStepNumber || totalStepNumber === 1)
|
|
329
|
-
return null;
|
|
330
|
-
return (React__default.createElement(Flex, { gap: 2 }, Array.from({ length: totalStepNumber }).map((_, idx) => {
|
|
331
|
-
const currentStepNumber = idx + 1;
|
|
332
|
-
return (React__default.createElement(Box, { key: currentStepNumber, style: {
|
|
333
|
-
width: 'auto',
|
|
334
|
-
height: 2,
|
|
335
|
-
flex: 1,
|
|
336
|
-
borderRadius: 4,
|
|
337
|
-
backgroundColor: currentStepNumber <= activeStepNumber ? '#00B16A' : '#D2D6DC',
|
|
338
|
-
} }));
|
|
339
|
-
})));
|
|
340
|
-
};
|
|
341
|
-
|
|
342
161
|
const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
343
162
|
var _a;
|
|
344
|
-
const { steps, goBack
|
|
345
|
-
const { flowData } = useSSOV2Store();
|
|
163
|
+
const { steps, goBack } = useSSOSteps();
|
|
346
164
|
const { locale, tracking } = useSSOState();
|
|
347
|
-
const
|
|
348
|
-
const
|
|
349
|
-
const
|
|
350
|
-
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.OTP ||
|
|
351
|
-
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.PASSWORD ||
|
|
352
|
-
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.EMAIL;
|
|
353
|
-
const showClose = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.FIRST;
|
|
354
|
-
const showLogo = (steps.length === 1 || showProgressBar) && !showBack;
|
|
165
|
+
const showBack = steps.length > 1;
|
|
166
|
+
const showClose = steps.length === 1;
|
|
167
|
+
const showLogo = steps.length === 1;
|
|
355
168
|
const logoType = (_a = LOCALE_SPECS[locale]) === null || _a === void 0 ? void 0 : _a.LOGO_TYPE;
|
|
356
169
|
const [closeConfirmOpen, setCloseConfirmOpen] = React__default.useState(false);
|
|
357
170
|
const onCloseClick = () => {
|
|
@@ -418,7 +231,6 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
418
231
|
borderRadius: '100%',
|
|
419
232
|
}, onClick: onCloseClick, "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": "Exit" },
|
|
420
233
|
React__default.createElement(Close, null)))),
|
|
421
|
-
showProgressBar && React__default.createElement(ProgressBar, null),
|
|
422
234
|
React__default.createElement("div", { style: {
|
|
423
235
|
flex: 1,
|
|
424
236
|
} }, children)),
|
|
@@ -590,7 +402,6 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
590
402
|
flowData: {
|
|
591
403
|
method: 'email',
|
|
592
404
|
flow: 'login',
|
|
593
|
-
metaData: existRes._data,
|
|
594
405
|
},
|
|
595
406
|
});
|
|
596
407
|
// go to password screen
|
|
@@ -608,7 +419,6 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
608
419
|
flowData: {
|
|
609
420
|
method: 'email',
|
|
610
421
|
flow: 'signup',
|
|
611
|
-
metaData: existRes._data,
|
|
612
422
|
},
|
|
613
423
|
});
|
|
614
424
|
if (!((_b = existRes._data) === null || _b === void 0 ? void 0 : _b.provider)) {
|
|
@@ -627,7 +437,7 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
627
437
|
config: {
|
|
628
438
|
email,
|
|
629
439
|
otpType: 'email',
|
|
630
|
-
afterAction: '
|
|
440
|
+
afterAction: 'setup',
|
|
631
441
|
},
|
|
632
442
|
});
|
|
633
443
|
goNext();
|
|
@@ -2252,7 +2062,6 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2252
2062
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
2253
2063
|
const { locale, onClose, setTracking } = useSSOState();
|
|
2254
2064
|
const { addStep, goNext } = useSSOSteps();
|
|
2255
|
-
const { setUserInfo } = useSSOV2Store();
|
|
2256
2065
|
const [activeTab, setActiveTab] = React__default.useState('login');
|
|
2257
2066
|
const { legalTextType } = config || {};
|
|
2258
2067
|
const { t } = useTranslations();
|
|
@@ -2269,31 +2078,20 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2269
2078
|
}, [hidden]);
|
|
2270
2079
|
const [loading, setLoading] = React__default.useState(false);
|
|
2271
2080
|
const handleLoginBySocial = (credential, provider) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2081
|
+
var _c, _d;
|
|
2272
2082
|
const res = yield loginBySocial(credential, provider);
|
|
2273
2083
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
2274
2084
|
handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
2275
2085
|
const userInfo = yield getUserInfo();
|
|
2276
|
-
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
2277
2086
|
if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) === 1 && userInfo._data) {
|
|
2278
2087
|
useSSOV2Store.setState({
|
|
2279
2088
|
flowData: {
|
|
2280
2089
|
method: provider,
|
|
2281
2090
|
},
|
|
2282
2091
|
});
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
flowData: Object.assign(Object.assign({}, f.flowData), { flow: 'signup', isVerifyPhone: true }),
|
|
2287
|
-
}));
|
|
2288
|
-
addStep({
|
|
2289
|
-
type: SSOStepTypeType.VERIFY_PHONE,
|
|
2290
|
-
config: {
|
|
2291
|
-
provider: provider,
|
|
2292
|
-
},
|
|
2293
|
-
});
|
|
2294
|
-
goNext();
|
|
2295
|
-
}
|
|
2296
|
-
else if (!isUserFinishedSetup(userInfo._data)) {
|
|
2092
|
+
if (!isUserFinishedSetup(userInfo._data) ||
|
|
2093
|
+
!userInfo._data.phone ||
|
|
2094
|
+
!userInfo._data.phone_verified_at) {
|
|
2297
2095
|
useSSOV2Store.setState((f) => ({
|
|
2298
2096
|
flowData: Object.assign(Object.assign({}, f.flowData), { flow: 'signup' }),
|
|
2299
2097
|
}));
|
|
@@ -2324,6 +2122,19 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2324
2122
|
goNext();
|
|
2325
2123
|
}
|
|
2326
2124
|
}
|
|
2125
|
+
else if (!((_c = userInfo._data) === null || _c === void 0 ? void 0 : _c.phone_verified_at) ||
|
|
2126
|
+
!((_d = userInfo._data) === null || _d === void 0 ? void 0 : _d.phone)) {
|
|
2127
|
+
useSSOV2Store.setState((f) => ({
|
|
2128
|
+
flowData: Object.assign(Object.assign({}, f.flowData), { flow: 'login', isVerifyPhone: true }),
|
|
2129
|
+
}));
|
|
2130
|
+
addStep({
|
|
2131
|
+
type: SSOStepTypeType.VERIFY_PHONE,
|
|
2132
|
+
config: {
|
|
2133
|
+
provider: provider,
|
|
2134
|
+
},
|
|
2135
|
+
});
|
|
2136
|
+
goNext();
|
|
2137
|
+
}
|
|
2327
2138
|
else {
|
|
2328
2139
|
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
2329
2140
|
}
|
|
@@ -2363,7 +2174,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2363
2174
|
};
|
|
2364
2175
|
}, []);
|
|
2365
2176
|
const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2366
|
-
var
|
|
2177
|
+
var _e, _f;
|
|
2367
2178
|
setLoading(true);
|
|
2368
2179
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2369
2180
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2372,13 +2183,12 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2372
2183
|
}
|
|
2373
2184
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
2374
2185
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2375
|
-
const provider = (
|
|
2376
|
-
if ((
|
|
2186
|
+
const provider = (_e = userExist._data) === null || _e === void 0 ? void 0 : _e.provider;
|
|
2187
|
+
if ((_f = userExist._data) === null || _f === void 0 ? void 0 : _f.is_pass) {
|
|
2377
2188
|
useSSOV2Store.setState({
|
|
2378
2189
|
flowData: {
|
|
2379
2190
|
method: 'zalo',
|
|
2380
2191
|
flow: 'login',
|
|
2381
|
-
metaData: userExist._data,
|
|
2382
2192
|
},
|
|
2383
2193
|
});
|
|
2384
2194
|
addStep({
|
|
@@ -2406,7 +2216,6 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2406
2216
|
flowData: {
|
|
2407
2217
|
method: 'zalo',
|
|
2408
2218
|
flow: 'signup',
|
|
2409
|
-
metaData: userExist._data,
|
|
2410
2219
|
},
|
|
2411
2220
|
});
|
|
2412
2221
|
addStep({
|
|
@@ -2414,7 +2223,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2414
2223
|
config: {
|
|
2415
2224
|
phone,
|
|
2416
2225
|
otpType: 'phone-zalo',
|
|
2417
|
-
afterAction: '
|
|
2226
|
+
afterAction: 'setup',
|
|
2418
2227
|
},
|
|
2419
2228
|
});
|
|
2420
2229
|
goNext();
|
|
@@ -2426,7 +2235,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2426
2235
|
setLoading(false);
|
|
2427
2236
|
});
|
|
2428
2237
|
const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2429
|
-
var
|
|
2238
|
+
var _g, _h;
|
|
2430
2239
|
setLoading(true);
|
|
2431
2240
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2432
2241
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2435,13 +2244,12 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2435
2244
|
}
|
|
2436
2245
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
2437
2246
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2438
|
-
const provider = (
|
|
2439
|
-
if ((
|
|
2247
|
+
const provider = (_g = userExist._data) === null || _g === void 0 ? void 0 : _g.provider;
|
|
2248
|
+
if ((_h = userExist._data) === null || _h === void 0 ? void 0 : _h.is_pass) {
|
|
2440
2249
|
useSSOV2Store.setState({
|
|
2441
2250
|
flowData: {
|
|
2442
2251
|
method: 'sms',
|
|
2443
2252
|
flow: 'login',
|
|
2444
|
-
metaData: userExist._data,
|
|
2445
2253
|
},
|
|
2446
2254
|
});
|
|
2447
2255
|
addStep({
|
|
@@ -2469,7 +2277,6 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2469
2277
|
flowData: {
|
|
2470
2278
|
method: 'sms',
|
|
2471
2279
|
flow: 'signup',
|
|
2472
|
-
metaData: userExist._data,
|
|
2473
2280
|
},
|
|
2474
2281
|
});
|
|
2475
2282
|
addStep({
|
|
@@ -2477,7 +2284,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2477
2284
|
config: {
|
|
2478
2285
|
phone,
|
|
2479
2286
|
otpType: 'phone-sms',
|
|
2480
|
-
afterAction: '
|
|
2287
|
+
afterAction: 'setup',
|
|
2481
2288
|
},
|
|
2482
2289
|
});
|
|
2483
2290
|
goNext();
|
|
@@ -2489,7 +2296,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2489
2296
|
setLoading(false);
|
|
2490
2297
|
});
|
|
2491
2298
|
const onClickLoginWithPhone = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2492
|
-
var
|
|
2299
|
+
var _j, _k;
|
|
2493
2300
|
setLoading(true);
|
|
2494
2301
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2495
2302
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2498,7 +2305,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2498
2305
|
}
|
|
2499
2306
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
2500
2307
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2501
|
-
if (!userExist._data || !((
|
|
2308
|
+
if (!userExist._data || !((_j = userExist._data) === null || _j === void 0 ? void 0 : _j.is_pass)) {
|
|
2502
2309
|
showNotification({
|
|
2503
2310
|
message: t('ssov2.first.noAccountOrPass'),
|
|
2504
2311
|
type: 'danger',
|
|
@@ -2506,12 +2313,11 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2506
2313
|
setActiveTab('signup');
|
|
2507
2314
|
return setLoading(false);
|
|
2508
2315
|
}
|
|
2509
|
-
if ((
|
|
2316
|
+
if ((_k = userExist._data) === null || _k === void 0 ? void 0 : _k.is_pass) {
|
|
2510
2317
|
useSSOV2Store.setState({
|
|
2511
2318
|
flowData: {
|
|
2512
2319
|
method: 'phone',
|
|
2513
2320
|
flow: 'login',
|
|
2514
|
-
metaData: userExist._data,
|
|
2515
2321
|
},
|
|
2516
2322
|
});
|
|
2517
2323
|
addStep({
|
|
@@ -2672,8 +2478,10 @@ const initSendUpdateEmailOtp = (email) => __awaiter(void 0, void 0, void 0, func
|
|
|
2672
2478
|
});
|
|
2673
2479
|
});
|
|
2674
2480
|
const resendUpdateEmailOTP = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2481
|
+
const formData = new FormData();
|
|
2675
2482
|
return fetchSSOV2Api(SSO_V2_PATHS.ECOM_CARE.RESEND_OTP, {
|
|
2676
|
-
method: '
|
|
2483
|
+
method: 'POST',
|
|
2484
|
+
body: formData,
|
|
2677
2485
|
});
|
|
2678
2486
|
});
|
|
2679
2487
|
const verifyUpdateEmailOTP = (otpCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -2721,7 +2529,15 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2721
2529
|
}, [hidden]);
|
|
2722
2530
|
const addStepAndGoNext = (step) => {
|
|
2723
2531
|
useSSOSteps.setState((old) => {
|
|
2532
|
+
var _a, _b;
|
|
2724
2533
|
const oldSteps = old.steps;
|
|
2534
|
+
if (((_a = oldSteps[index - 1]) === null || _a === void 0 ? void 0 : _a.type) === SSOStepTypeType.VERIFY_PHONE ||
|
|
2535
|
+
((_b = oldSteps[index - 1]) === null || _b === void 0 ? void 0 : _b.type) === SSOStepTypeType.UPDATE_EMAIL) {
|
|
2536
|
+
return {
|
|
2537
|
+
steps: oldSteps.slice(0, index - 1).concat(step),
|
|
2538
|
+
currentStepIndex: index - 1,
|
|
2539
|
+
};
|
|
2540
|
+
}
|
|
2725
2541
|
return {
|
|
2726
2542
|
steps: oldSteps.slice(0, index).concat(step),
|
|
2727
2543
|
currentStepIndex: index,
|
|
@@ -3052,7 +2868,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3052
2868
|
'data-event-category': trackingCategory,
|
|
3053
2869
|
'data-event-action': trackingAction,
|
|
3054
2870
|
'data-event-label': 'Enter Code',
|
|
3055
|
-
}
|
|
2871
|
+
} })),
|
|
3056
2872
|
React__default.createElement(Group, { spacing: 8, align: "center", style: {
|
|
3057
2873
|
height: 40,
|
|
3058
2874
|
} },
|
|
@@ -3072,7 +2888,6 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
3072
2888
|
const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
3073
2889
|
const { t } = useTranslations();
|
|
3074
2890
|
const { onClose, setTracking } = useSSOState();
|
|
3075
|
-
const { setUserInfo, flowData } = useSSOV2Store();
|
|
3076
2891
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
3077
2892
|
const phone = config === null || config === void 0 ? void 0 : config.phone;
|
|
3078
2893
|
const method = config === null || config === void 0 ? void 0 : config.method;
|
|
@@ -3136,13 +2951,11 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3136
2951
|
setLoading(false);
|
|
3137
2952
|
});
|
|
3138
2953
|
const onAuthSuccess = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2954
|
+
var _c, _d;
|
|
3139
2955
|
handleAuthSuccess(data);
|
|
3140
|
-
const userInfo = yield getUserInfo();
|
|
3141
|
-
const isPhoneFlow = isPhoneFlowFn(flowData);
|
|
3142
|
-
const isEmailFlow = isEmailFlowFn(flowData);
|
|
3143
|
-
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
3144
2956
|
if (!phone && !!email) {
|
|
3145
|
-
|
|
2957
|
+
const userInfo = yield getUserInfo();
|
|
2958
|
+
if (!((_c = userInfo._data) === null || _c === void 0 ? void 0 : _c.phone_verified_at) || !((_d = userInfo._data) === null || _d === void 0 ? void 0 : _d.phone)) {
|
|
3146
2959
|
useSSOV2Store.setState((s) => ({
|
|
3147
2960
|
flowData: Object.assign(Object.assign({}, s.flowData), { isVerifyPhone: true }),
|
|
3148
2961
|
}));
|
|
@@ -3156,27 +2969,6 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3156
2969
|
return;
|
|
3157
2970
|
}
|
|
3158
2971
|
}
|
|
3159
|
-
if (isLoginWithPhoneNotVerifedYet(flowData, userInfo._data)) {
|
|
3160
|
-
addStep({
|
|
3161
|
-
type: SSOStepTypeType.FORGOT_PASSWORD_PHONE,
|
|
3162
|
-
config: {
|
|
3163
|
-
phone: `${userInfo._data.area_code}${userInfo._data.phone}`,
|
|
3164
|
-
afterAction: 'setup',
|
|
3165
|
-
},
|
|
3166
|
-
});
|
|
3167
|
-
goNext();
|
|
3168
|
-
return;
|
|
3169
|
-
}
|
|
3170
|
-
if ((isPhoneFlow || isEmailFlow) && !isUserFinishedSetup(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
3171
|
-
addStep({
|
|
3172
|
-
type: SSOStepTypeType.SETUP_FULL,
|
|
3173
|
-
config: {
|
|
3174
|
-
userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
|
|
3175
|
-
},
|
|
3176
|
-
});
|
|
3177
|
-
goNext();
|
|
3178
|
-
return;
|
|
3179
|
-
}
|
|
3180
2972
|
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3181
2973
|
});
|
|
3182
2974
|
return (React__default.createElement("form", { style: {
|
|
@@ -3225,47 +3017,6 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3225
3017
|
React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Sign In" }, t('ssov2.password.signIn'))));
|
|
3226
3018
|
};
|
|
3227
3019
|
|
|
3228
|
-
const SetupLater = ({ style = {} }) => {
|
|
3229
|
-
const { t } = useTranslations();
|
|
3230
|
-
const { onClose } = useSSOState();
|
|
3231
|
-
const [loading, setLoading] = useState(false);
|
|
3232
|
-
const { userInfo, flowData } = useSSOV2Store();
|
|
3233
|
-
const { currentStepIndex, steps, addStep, goNext } = useSSOSteps();
|
|
3234
|
-
const currentStep = steps[currentStepIndex];
|
|
3235
|
-
const onClickSetupLater = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3236
|
-
if (loading)
|
|
3237
|
-
return;
|
|
3238
|
-
setLoading(true);
|
|
3239
|
-
if (userInfo &&
|
|
3240
|
-
!isUserFinishedSetup(userInfo) &&
|
|
3241
|
-
((currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.VERIFY_PHONE ||
|
|
3242
|
-
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.FORGOT_PASSWORD_PHONE)) {
|
|
3243
|
-
addStep({
|
|
3244
|
-
type: SSOStepTypeType.SETUP_FULL,
|
|
3245
|
-
config: {
|
|
3246
|
-
userInfo,
|
|
3247
|
-
},
|
|
3248
|
-
});
|
|
3249
|
-
goNext();
|
|
3250
|
-
}
|
|
3251
|
-
else if (!isFlowFinishedSetup(flowData) &&
|
|
3252
|
-
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.VERIFY_PHONE) {
|
|
3253
|
-
addStep({
|
|
3254
|
-
type: SSOStepTypeType.SETUP_FULL,
|
|
3255
|
-
config: {
|
|
3256
|
-
userInfo,
|
|
3257
|
-
},
|
|
3258
|
-
});
|
|
3259
|
-
goNext();
|
|
3260
|
-
}
|
|
3261
|
-
else {
|
|
3262
|
-
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3263
|
-
}
|
|
3264
|
-
setLoading(false);
|
|
3265
|
-
});
|
|
3266
|
-
return (React__default.createElement(Button, { size: "sm", variant: "white", color: "#737373", style: Object.assign({ fontWeight: 400 }, style), onClick: onClickSetupLater, disabled: loading }, t('ssov2.button.setupLater')));
|
|
3267
|
-
};
|
|
3268
|
-
|
|
3269
3020
|
const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
3270
3021
|
const phone = config === null || config === void 0 ? void 0 : config.phone;
|
|
3271
3022
|
const { t } = useTranslations();
|
|
@@ -3313,7 +3064,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3313
3064
|
config: {
|
|
3314
3065
|
phone,
|
|
3315
3066
|
otpType: 'phone-zalo',
|
|
3316
|
-
afterAction:
|
|
3067
|
+
afterAction: 'forgot',
|
|
3317
3068
|
provider: (_b = userExist._data) === null || _b === void 0 ? void 0 : _b.provider,
|
|
3318
3069
|
},
|
|
3319
3070
|
});
|
|
@@ -3356,7 +3107,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3356
3107
|
config: {
|
|
3357
3108
|
phone,
|
|
3358
3109
|
otpType: 'phone-sms',
|
|
3359
|
-
afterAction:
|
|
3110
|
+
afterAction: 'forgot',
|
|
3360
3111
|
provider: (_d = userExist._data) === null || _d === void 0 ? void 0 : _d.provider,
|
|
3361
3112
|
},
|
|
3362
3113
|
});
|
|
@@ -3384,8 +3135,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3384
3135
|
isError: !!errMsg, required: true, disabled: true, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone" }),
|
|
3385
3136
|
errMsg && (React__default.createElement(Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
|
|
3386
3137
|
React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo" }, t('ssov2.button.continueZalo')),
|
|
3387
|
-
React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS" }, t('ssov2.button.continueSMS'))
|
|
3388
|
-
React__default.createElement(SetupLater, null))));
|
|
3138
|
+
React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS" }, t('ssov2.button.continueSMS')))));
|
|
3389
3139
|
};
|
|
3390
3140
|
|
|
3391
3141
|
const CheckGrayIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -3426,9 +3176,8 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3426
3176
|
const { t } = useTranslations();
|
|
3427
3177
|
const [loading, setLoading] = React__default.useState(false);
|
|
3428
3178
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
3429
|
-
const { setTracking
|
|
3430
|
-
const {
|
|
3431
|
-
const { flowData, setUserInfo } = useSSOV2Store();
|
|
3179
|
+
const { setTracking } = useSSOState();
|
|
3180
|
+
const { flowData } = useSSOV2Store();
|
|
3432
3181
|
const trackingMethod = flowData.method;
|
|
3433
3182
|
const trackingCategory = `SSO - Sign In via ${trackingMethod}`;
|
|
3434
3183
|
const trackingAction = `Setup New Password`;
|
|
@@ -3466,66 +3215,22 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3466
3215
|
password.length <= 50 &&
|
|
3467
3216
|
password.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/) &&
|
|
3468
3217
|
password === confirmPassword) {
|
|
3469
|
-
const
|
|
3470
|
-
const res = isPhoneOrEmailFlow
|
|
3471
|
-
? yield updateUserInfo({
|
|
3472
|
-
password,
|
|
3473
|
-
confirm_password: confirmPassword,
|
|
3474
|
-
validate: '',
|
|
3475
|
-
})
|
|
3476
|
-
: yield resetPassword(password, confirmPassword);
|
|
3218
|
+
const res = yield resetPassword(password, confirmPassword);
|
|
3477
3219
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
},
|
|
3489
|
-
});
|
|
3490
|
-
goNext();
|
|
3491
|
-
}
|
|
3492
|
-
else {
|
|
3493
|
-
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3494
|
-
}
|
|
3495
|
-
}
|
|
3496
|
-
// Email
|
|
3497
|
-
if (isEmailFlowFn(flowData)) {
|
|
3498
|
-
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
3499
|
-
if (isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
3500
|
-
addStep({
|
|
3501
|
-
type: SSOStepTypeType.VERIFY_PHONE,
|
|
3502
|
-
config: {
|
|
3503
|
-
provider: 'email',
|
|
3504
|
-
},
|
|
3505
|
-
});
|
|
3506
|
-
goNext();
|
|
3507
|
-
}
|
|
3508
|
-
else {
|
|
3509
|
-
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3510
|
-
}
|
|
3511
|
-
}
|
|
3220
|
+
showNotification({
|
|
3221
|
+
type: 'success',
|
|
3222
|
+
message: 'Password has been reset successfully',
|
|
3223
|
+
});
|
|
3224
|
+
// back to login step
|
|
3225
|
+
const foundPasswordIndex = steps.findIndex((step) => step.type === SSOStepTypeType.PASSWORD);
|
|
3226
|
+
if (foundPasswordIndex === -1) {
|
|
3227
|
+
// reset to first step
|
|
3228
|
+
setSteps((s) => [s[0]]);
|
|
3229
|
+
useSSOSteps.setState({ currentStepIndex: 0 });
|
|
3512
3230
|
}
|
|
3513
3231
|
else {
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
message: 'Password has been reset successfully',
|
|
3517
|
-
});
|
|
3518
|
-
// back to login step
|
|
3519
|
-
const foundPasswordIndex = steps.findIndex((step) => step.type === SSOStepTypeType.PASSWORD);
|
|
3520
|
-
if (foundPasswordIndex === -1) {
|
|
3521
|
-
// reset to first step
|
|
3522
|
-
setSteps((s) => [s[0]]);
|
|
3523
|
-
useSSOSteps.setState({ currentStepIndex: 0 });
|
|
3524
|
-
}
|
|
3525
|
-
else {
|
|
3526
|
-
setSteps((s) => s.slice(0, foundPasswordIndex + 1));
|
|
3527
|
-
useSSOSteps.setState({ currentStepIndex: foundPasswordIndex });
|
|
3528
|
-
}
|
|
3232
|
+
setSteps((s) => s.slice(0, foundPasswordIndex + 1));
|
|
3233
|
+
useSSOSteps.setState({ currentStepIndex: foundPasswordIndex });
|
|
3529
3234
|
}
|
|
3530
3235
|
// onClose?.()
|
|
3531
3236
|
}
|
|
@@ -3553,9 +3258,7 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3553
3258
|
action: trackingAction,
|
|
3554
3259
|
} }),
|
|
3555
3260
|
errMsg && (React__default.createElement(Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
|
|
3556
|
-
React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label":
|
|
3557
|
-
? t('ssov2.setup.button.createAccount')
|
|
3558
|
-
: t('ssov2.button.save')))));
|
|
3261
|
+
React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Save" }, t('ssov2.button.save')))));
|
|
3559
3262
|
};
|
|
3560
3263
|
|
|
3561
3264
|
const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
@@ -3576,7 +3279,6 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3576
3279
|
});
|
|
3577
3280
|
}
|
|
3578
3281
|
}, [hidden]);
|
|
3579
|
-
const { source } = useSSOV2Store();
|
|
3580
3282
|
const { addStep, goNext } = useSSOSteps();
|
|
3581
3283
|
const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3582
3284
|
setLoading(true);
|
|
@@ -3676,8 +3378,7 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3676
3378
|
setErrMsg('');
|
|
3677
3379
|
}, isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone" })),
|
|
3678
3380
|
React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo" }, t('ssov2.button.continueZalo')),
|
|
3679
|
-
React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS" }, t('ssov2.button.continueSMS'))
|
|
3680
|
-
source !== 'care_onboarding' && source !== 'ecom' && React__default.createElement(SetupLater, null)))));
|
|
3381
|
+
React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS" }, t('ssov2.button.continueSMS'))))));
|
|
3681
3382
|
};
|
|
3682
3383
|
|
|
3683
3384
|
const FemaleIcon = () => (React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -3709,19 +3410,39 @@ const MaleIcon = () => (React__default.createElement("svg", { width: "20", heigh
|
|
|
3709
3410
|
React__default.createElement("path", { d: "M11.122 6.393a.157.157 0 0 1-.051-.304c.687-.234 1.688-.344 2.26-.03a.156.156 0 0 1-.15.274c-.463-.254-1.38-.163-2.009.052a.2.2 0 0 1-.05.008m-2.19.572a.16.16 0 0 1-.144-.097c-.013-.027-.123-.097-.363-.129-.325-.043-.672.016-.772.131a.156.156 0 1 1-.236-.205c.214-.245.721-.29 1.103-.228.209.034.475.116.556.311a.156.156 0 0 1-.144.217m.222-.571a.2.2 0 0 1-.05-.009c-.629-.215-1.546-.306-2.009-.051a.156.156 0 1 1-.15-.274c.572-.315 1.572-.206 2.26.03a.156.156 0 0 1-.05.304", fill: "#404040" }),
|
|
3710
3411
|
React__default.createElement("path", { d: "m11.12 9.547-.019.001a8 8 0 0 1-1.928 0 .156.156 0 1 0-.037.31c.665.08 1.337.08 2.003 0a.156.156 0 0 0-.019-.31", fill: "#D84023" })));
|
|
3711
3412
|
|
|
3712
|
-
// import { StyledPhone } from '../components/phone'
|
|
3713
3413
|
// always has name, gender dob
|
|
3714
|
-
const OtherSetup = ({ form,
|
|
3715
|
-
// needPhone,
|
|
3716
|
-
// skipPhone,
|
|
3717
|
-
needEmail, isEmailDisable,
|
|
3718
|
-
// isPhoneDisabled,
|
|
3719
|
-
loading, tracking, }) => {
|
|
3414
|
+
const OtherSetup = ({ form, needPhone, skipPhone, needEmail, isEmailDisable, isPhoneDisabled, loading, tracking, }) => {
|
|
3720
3415
|
const { t } = useTranslations();
|
|
3721
|
-
|
|
3416
|
+
const { locale = 'vi-VN' } = useSSOState();
|
|
3722
3417
|
const { setupSource } = useSSOV2Store();
|
|
3723
3418
|
const [dobChanged, setDobChanged] = React__default.useState(false);
|
|
3724
3419
|
return (React__default.createElement(Stack, { spacing: 12 },
|
|
3420
|
+
needPhone && (React__default.createElement(React__default.Fragment, null,
|
|
3421
|
+
React__default.createElement(Input.Wrapper, Object.assign({ label: t('ssov2.setup.field.phone.label'), withAsterisk: true }, form.getInputProps('phone')),
|
|
3422
|
+
React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: form.getInputProps('phone').value, onChange: (value) => {
|
|
3423
|
+
form.setFieldValue('phone', value);
|
|
3424
|
+
}, isError: !!form.getInputProps('phone').error, required: true, name: "phone", disabled: loading || isPhoneDisabled, "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 Phone" })),
|
|
3425
|
+
!skipPhone && (React__default.createElement(Group, { spacing: 24 },
|
|
3426
|
+
React__default.createElement(Text, { size: "p4" }, t('ssov2.setup.field.otp.label')),
|
|
3427
|
+
React__default.createElement(Radio.Group, Object.assign({ name: "otpMethod", styles: {
|
|
3428
|
+
root: {
|
|
3429
|
+
display: 'flex',
|
|
3430
|
+
flexDirection: 'row',
|
|
3431
|
+
flexWrap: 'wrap',
|
|
3432
|
+
gap: 24,
|
|
3433
|
+
},
|
|
3434
|
+
} }, form.getInputProps('otpMethod')),
|
|
3435
|
+
React__default.createElement(Radio, { value: "zalo", label: "Zalo", styles: {
|
|
3436
|
+
label: {
|
|
3437
|
+
paddingLeft: 8,
|
|
3438
|
+
},
|
|
3439
|
+
}, 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": "Send OTP Code via Zalo" }),
|
|
3440
|
+
React__default.createElement(Radio, { value: "sms", label: "SMS", styles: {
|
|
3441
|
+
label: {
|
|
3442
|
+
paddingLeft: 8,
|
|
3443
|
+
},
|
|
3444
|
+
}, 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": "Send OTP Code via SMS" })))))),
|
|
3445
|
+
needEmail && (React__default.createElement(Input, Object.assign({ name: "email", type: "email", label: t('ssov2.setup.field.email.label'), disabled: isEmailDisable || loading, required: setupSource === 'care' ? true : false, withAsterisk: setupSource === 'care' ? true : false, "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" }, form.getInputProps('email')))),
|
|
3725
3446
|
React__default.createElement(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'))),
|
|
3726
3447
|
React__default.createElement(Input.Wrapper, Object.assign({ label: t('ssov2.setup.field.gender.label'), withAsterisk: true }, form.getInputProps('gender')),
|
|
3727
3448
|
React__default.createElement(Group, null,
|
|
@@ -3756,13 +3477,9 @@ loading, tracking, }) => {
|
|
|
3756
3477
|
if (!form.getInputProps('dob').value && !dobChanged)
|
|
3757
3478
|
return;
|
|
3758
3479
|
form.getInputProps('dob').onBlur(e);
|
|
3759
|
-
} }))
|
|
3760
|
-
needEmail && (React__default.createElement(Input, Object.assign({ name: "email", type: "email", label: t('ssov2.setup.field.email.label'), disabled: isEmailDisable || loading, required: setupSource === 'care' ? true : false, withAsterisk: setupSource === 'care' ? true : false, "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: {
|
|
3761
|
-
display: isEmailDisable ? 'none' : 'block',
|
|
3762
|
-
} }, form.getInputProps('email'))))));
|
|
3480
|
+
} }))));
|
|
3763
3481
|
};
|
|
3764
3482
|
|
|
3765
|
-
// import { SSOPasswordWithConfirm } from '../passwordForgotSetup/passwordWithConfirm'
|
|
3766
3483
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3767
3484
|
const getDefaultData = (data) => {
|
|
3768
3485
|
try {
|
|
@@ -3788,6 +3505,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3788
3505
|
var _a, _b, _c;
|
|
3789
3506
|
const { onClose, setTracking } = useSSOState();
|
|
3790
3507
|
const { t } = useTranslations();
|
|
3508
|
+
const { goNext, addStep } = useSSOSteps();
|
|
3791
3509
|
const { setupSource, flowData } = useSSOV2Store();
|
|
3792
3510
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
3793
3511
|
const userInfo = config === null || config === void 0 ? void 0 : config.userInfo;
|
|
@@ -3797,6 +3515,13 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3797
3515
|
const provider = (_a = config === null || config === void 0 ? void 0 : config.userInfo) === null || _a === void 0 ? void 0 : _a.provider;
|
|
3798
3516
|
const authFlow = flowData === null || flowData === void 0 ? void 0 : flowData.flow;
|
|
3799
3517
|
const defaultData = getDefaultData(config === null || config === void 0 ? void 0 : config.setupDefaultData);
|
|
3518
|
+
const needPass = (authMethod === 'phone' ||
|
|
3519
|
+
authMethod === 'zalo' ||
|
|
3520
|
+
authMethod === 'sms' ||
|
|
3521
|
+
authMethod === 'email' ||
|
|
3522
|
+
provider === 'email' ||
|
|
3523
|
+
provider === 'phone') &&
|
|
3524
|
+
!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.is_pass);
|
|
3800
3525
|
const skipPhone = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone) && !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone_verified_at);
|
|
3801
3526
|
const isPhoneDisabled = !!(configPhone || (defaultData === null || defaultData === void 0 ? void 0 : defaultData.phone) || skipPhone);
|
|
3802
3527
|
const needPhone = authFlow === 'signup' &&
|
|
@@ -3816,6 +3541,8 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3816
3541
|
!(flowData === null || flowData === void 0 ? void 0 : flowData.isVerifyPhone) ||
|
|
3817
3542
|
authMethod === 'facebook' ||
|
|
3818
3543
|
provider === 'facebook';
|
|
3544
|
+
// const needPhone = !userInfo?.phone_verified_at
|
|
3545
|
+
// const needEmail = authFlow !== 'verify-phone'
|
|
3819
3546
|
const isEmailDisable = (defaultEmail &&
|
|
3820
3547
|
(authMethod === 'google' ||
|
|
3821
3548
|
authMethod === 'email' ||
|
|
@@ -3852,7 +3579,30 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3852
3579
|
? dayjs(defaultData.birthday, 'MM/DD/YYYY').toDate()
|
|
3853
3580
|
: undefined }),
|
|
3854
3581
|
validateInputOnBlur: true,
|
|
3855
|
-
validate: yupResolver(yup.object().shape(Object.assign(Object.assign({}, (
|
|
3582
|
+
validate: yupResolver(yup.object().shape(Object.assign(Object.assign(Object.assign(Object.assign({}, (needPass
|
|
3583
|
+
? {
|
|
3584
|
+
password: yup
|
|
3585
|
+
.string()
|
|
3586
|
+
.required(t('ssov2.validate.password.required'))
|
|
3587
|
+
.min(8, ' ')
|
|
3588
|
+
.max(50, ' ')
|
|
3589
|
+
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/, ' '),
|
|
3590
|
+
confirmPassword: yup
|
|
3591
|
+
.string()
|
|
3592
|
+
.required(t('ssov2.validate.confirmPassword.required'))
|
|
3593
|
+
.test('passwords-match', t('ssov2.validate.confirmPassword.match'), function (value) {
|
|
3594
|
+
return this.parent.password === value;
|
|
3595
|
+
}),
|
|
3596
|
+
}
|
|
3597
|
+
: {})), (needPhone
|
|
3598
|
+
? Object.assign({ phone: yup.string().required(t('ssov2.validate.phone.required')) }, (!skipPhone
|
|
3599
|
+
? {
|
|
3600
|
+
otpMethod: yup
|
|
3601
|
+
.string()
|
|
3602
|
+
.required(t('ssov2.validate.otp.required'))
|
|
3603
|
+
.oneOf(['zalo', 'sms']),
|
|
3604
|
+
}
|
|
3605
|
+
: {})) : {})), (needEmail
|
|
3856
3606
|
? {
|
|
3857
3607
|
email: setupSource === 'care'
|
|
3858
3608
|
? yup
|
|
@@ -3869,13 +3619,15 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3869
3619
|
const onSubmit = (values) => __awaiter(void 0, void 0, void 0, function* () {
|
|
3870
3620
|
setLoading(true);
|
|
3871
3621
|
try {
|
|
3872
|
-
const { phone, gender, name, dob } = values;
|
|
3622
|
+
const { password, confirmPassword, phone, gender, name, dob, otpMethod } = values;
|
|
3873
3623
|
const { phoneNumber, areaCode } = splitPhone(phone || configPhone || '');
|
|
3874
3624
|
// validate only, delay set data to after otp
|
|
3875
3625
|
const res = yield updateUserInfo({
|
|
3876
3626
|
name,
|
|
3877
3627
|
birthday: dayjs(dob).format('YYYY-MM-DD'),
|
|
3878
3628
|
email: values.email || undefined,
|
|
3629
|
+
password,
|
|
3630
|
+
confirm_password: confirmPassword,
|
|
3879
3631
|
phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
|
|
3880
3632
|
area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '84',
|
|
3881
3633
|
gender: gender === 'male' ? 1 : 0,
|
|
@@ -3883,23 +3635,80 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3883
3635
|
validate: 'true',
|
|
3884
3636
|
});
|
|
3885
3637
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3638
|
+
// if need phone and has phone then start phone verify step, close after done
|
|
3639
|
+
if (needPhone && !skipPhone) {
|
|
3640
|
+
const setupData = {
|
|
3641
|
+
name,
|
|
3642
|
+
birthday: dayjs(dob).format('YYYY-MM-DD'),
|
|
3643
|
+
email: values.email || undefined,
|
|
3644
|
+
password,
|
|
3645
|
+
confirm_password: confirmPassword,
|
|
3646
|
+
phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
|
|
3647
|
+
area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '84',
|
|
3648
|
+
gender: gender === 'male' ? 1 : 0,
|
|
3649
|
+
source: setupSource,
|
|
3650
|
+
};
|
|
3651
|
+
if (otpMethod === 'zalo') {
|
|
3652
|
+
const res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
3653
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
3654
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3655
|
+
return setLoading(false);
|
|
3656
|
+
}
|
|
3657
|
+
addStep({
|
|
3658
|
+
type: SSOStepTypeType.OTP,
|
|
3659
|
+
config: {
|
|
3660
|
+
phone,
|
|
3661
|
+
otpType: 'phone-zalo',
|
|
3662
|
+
isUpdatePhone: true,
|
|
3663
|
+
afterAction: 'submitSetup',
|
|
3664
|
+
setupData,
|
|
3665
|
+
provider,
|
|
3666
|
+
},
|
|
3667
|
+
});
|
|
3668
|
+
goNext();
|
|
3669
|
+
}
|
|
3670
|
+
else {
|
|
3671
|
+
const res = yield resendUpdatePhoneOTP(phoneNumber, areaCode);
|
|
3672
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
3673
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3674
|
+
return setLoading(false);
|
|
3675
|
+
}
|
|
3676
|
+
addStep({
|
|
3677
|
+
type: SSOStepTypeType.OTP,
|
|
3678
|
+
config: {
|
|
3679
|
+
phone,
|
|
3680
|
+
otpType: 'phone-sms',
|
|
3681
|
+
isUpdatePhone: true,
|
|
3682
|
+
afterAction: 'submitSetup',
|
|
3683
|
+
setupData,
|
|
3684
|
+
provider,
|
|
3685
|
+
},
|
|
3686
|
+
});
|
|
3687
|
+
goNext();
|
|
3688
|
+
}
|
|
3899
3689
|
}
|
|
3900
3690
|
else {
|
|
3901
|
-
|
|
3902
|
-
|
|
3691
|
+
// close?
|
|
3692
|
+
const res = yield updateUserInfo({
|
|
3693
|
+
name,
|
|
3694
|
+
birthday: dayjs(dob).format('YYYY-MM-DD'),
|
|
3695
|
+
email: values.email || undefined,
|
|
3696
|
+
password,
|
|
3697
|
+
confirm_password: confirmPassword,
|
|
3698
|
+
phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
|
|
3699
|
+
area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code),
|
|
3700
|
+
gender: gender === 'male' ? 1 : 0,
|
|
3701
|
+
source: setupSource,
|
|
3702
|
+
validate: '',
|
|
3703
|
+
});
|
|
3704
|
+
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3705
|
+
handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
3706
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3707
|
+
}
|
|
3708
|
+
else {
|
|
3709
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3710
|
+
return setLoading(false);
|
|
3711
|
+
}
|
|
3903
3712
|
}
|
|
3904
3713
|
}
|
|
3905
3714
|
else {
|
|
@@ -3920,13 +3729,24 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3920
3729
|
React__default.createElement(Stack, { spacing: 8 },
|
|
3921
3730
|
React__default.createElement(Text, { size: "s1", weight: "semiBold" }, t('ssov2.setup.title')),
|
|
3922
3731
|
React__default.createElement(Text, { size: "p4" }, t('ssov2.setup.description'))),
|
|
3732
|
+
needPass && (React__default.createElement(SSOPasswordWithConfirm, { form: form, loading: loading, tracking: {
|
|
3733
|
+
category: trackingCategory,
|
|
3734
|
+
action: trackingAction,
|
|
3735
|
+
} })),
|
|
3923
3736
|
React__default.createElement(OtherSetup, { needPhone: needPhone, skipPhone: skipPhone, needEmail: needEmail, isEmailDisable: isEmailDisable, isPhoneDisabled: isPhoneDisabled, form: form, loading: loading, tracking: {
|
|
3924
3737
|
category: trackingCategory,
|
|
3925
3738
|
action: trackingAction,
|
|
3926
3739
|
} }),
|
|
3927
3740
|
errMsg && (React__default.createElement(Text, { color: "red.6", size: "p4" }, errMsg)),
|
|
3928
|
-
React__default.createElement(Button, { type: "submit", variant: "primary", fullWidth: true, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label":
|
|
3929
|
-
|
|
3741
|
+
React__default.createElement(Button, { type: "submit", variant: "primary", fullWidth: true, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": needPhone && !skipPhone
|
|
3742
|
+
? 'Verify Phone Number'
|
|
3743
|
+
: authFlow === 'signup'
|
|
3744
|
+
? 'Create New Account'
|
|
3745
|
+
: 'Save' }, needPhone && !skipPhone
|
|
3746
|
+
? t('ssov2.setup.button.veriyPhone')
|
|
3747
|
+
: authFlow === 'signup'
|
|
3748
|
+
? t('ssov2.setup.button.createAccount')
|
|
3749
|
+
: t('ssov2.button.save')))));
|
|
3930
3750
|
};
|
|
3931
3751
|
|
|
3932
3752
|
// import {
|
|
@@ -4035,15 +3855,6 @@ const SSOScreenRenderer = () => {
|
|
|
4035
3855
|
})));
|
|
4036
3856
|
};
|
|
4037
3857
|
|
|
4038
|
-
if (!Array.prototype.findLastIndex) {
|
|
4039
|
-
Array.prototype.findLastIndex = function (callback, thisArg) {
|
|
4040
|
-
for (let i = this.length - 1; i >= 0; i--) {
|
|
4041
|
-
if (callback.call(thisArg, this[i], i, this))
|
|
4042
|
-
return i;
|
|
4043
|
-
}
|
|
4044
|
-
return -1;
|
|
4045
|
-
};
|
|
4046
|
-
}
|
|
4047
3858
|
const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
4048
3859
|
const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, forceReloadOnClose, } = useSSOV2Store();
|
|
4049
3860
|
useEffect(() => {
|