@hhgtech/hhg-components 1.29.310 → 1.29.311-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/build/{LastPeriod-bf102301.js → LastPeriod-d3ac6199.js} +1 -1
- package/build/{MobileBottomNavigationIcon-ad8bada5.js → MobileBottomNavigationIcon-0fd4916c.js} +3 -3
- package/build/{Spinner-874e7661.js → Spinner-7ba2a61c.js} +1 -1
- package/build/{WhatsApp-34f43ae0.js → WhatsApp-58ff8b4f.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/mantine/modal/index.d.ts +2 -2
- package/build/components/mantine/phone/countrySelect.d.ts +1 -1
- package/build/components/mantine/phone/phoneWithCustomCountrySelect.d.ts +1 -0
- package/build/components.js +90 -90
- package/build/{constants-fa210ca2.js → constants-2eb56e24.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-00337849.js → core-498e9736.js} +1 -1
- package/build/{dataTransform-e2039e2c.js → dataTransform-23a1b90c.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-b96a5104.js → editor-d2dd468a.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-082d0fab.js → LastPeriod-7213b744.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-dc6eab1c.js → MobileBottomNavigationIcon-5c242900.js} +3 -3
- package/build/esm/{Spinner-c76eea1e.js → Spinner-4e4d5ceb.js} +1 -1
- package/build/esm/{WhatsApp-46c87a68.js → WhatsApp-b85e6042.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/mantine/modal/index.d.ts +2 -2
- package/build/esm/components/mantine/phone/countrySelect.d.ts +1 -1
- package/build/esm/components/mantine/phone/phoneWithCustomCountrySelect.d.ts +1 -0
- package/build/esm/components.js +90 -90
- package/build/esm/{constants-dd59b6bb.js → constants-5217026c.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-666bc190.js → core-11d222a6.js} +1 -1
- package/build/esm/{dataTransform-490d14d4.js → dataTransform-069af032.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-7493c15a.js → editor-ca1adae5.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-3af9d1a6.js → fixedBottomAdBlock-505bed01.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 +1 -0
- package/build/esm/i18n-values/hi-IN.js +1 -0
- package/build/esm/i18n-values/id-ID.js +1 -0
- package/build/esm/i18n-values/km-KH.js +2 -1
- package/build/esm/i18n-values/ms-MY.js +1 -0
- package/build/esm/i18n-values/my-MM.js +1 -0
- package/build/esm/i18n-values/th-TH.js +1 -0
- package/build/esm/i18n-values/tl-PH.js +1 -0
- package/build/esm/i18n-values/vi-VN.js +1 -0
- package/build/esm/i18n-values/vi-VN_MB.js +1 -0
- package/build/esm/i18n-values/zh-TW.js +1 -0
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-dbcbef2e.js → index-0789f004.js} +13 -13
- package/build/esm/{index-03d9fccc.js → index-08e233a9.js} +3 -3
- package/build/esm/{index-eca4cedb.js → index-0d5ed436.js} +26 -26
- package/build/esm/{index-ca2d4ebe.js → index-0f267f5b.js} +13 -13
- package/build/esm/{index-c828cd85.js → index-13b6cabb.js} +1 -1
- package/build/esm/{index-3e3f60cc.js → index-16195dc4.js} +16 -16
- package/build/esm/{index-6f743917.js → index-18aedc95.js} +5 -5
- package/build/esm/{index-c5be74bb.js → index-1a63aa15.js} +18 -18
- package/build/esm/{index-009d858e.js → index-1ac2fb48.js} +2 -2
- package/build/esm/{index-2fdf9522.js → index-20851054.js} +10 -10
- package/build/esm/{index-28dc6ec9.js → index-23478ad8.js} +2 -2
- package/build/esm/{index-48fc51fc.js → index-264d1558.js} +2 -2
- package/build/esm/{index-9720736f.js → index-32f29fc4.js} +3 -3
- package/build/esm/{index-f4896192.js → index-33db380e.js} +7 -7
- package/build/esm/{index-116e1d31.js → index-420a1901.js} +16 -16
- package/build/esm/{index-fefe4cc8.js → index-48e04b64.js} +16 -16
- package/build/esm/{index-8f6534fd.js → index-4e6a28ff.js} +1 -1
- package/build/esm/{index-ba1d177d.js → index-4ef871be.js} +1 -1
- package/build/esm/{index-ed22a2e5.js → index-52433776.js} +11 -11
- package/build/esm/{index-797cd5bf.js → index-5352a6dc.js} +17 -17
- package/build/esm/{index-cdca49e2.js → index-5bc309ac.js} +1 -1
- package/build/esm/{index-aedceeb0.js → index-5c3a3240.js} +32 -32
- package/build/esm/{index-fde13df0.js → index-5efc30b0.js} +21 -21
- package/build/esm/{index-3823402c.js → index-5fd96964.js} +2 -2
- package/build/esm/{index-1eb5a216.js → index-61973987.js} +6 -6
- package/build/esm/{index-8104f1e3.js → index-64f2f3db.js} +17 -17
- package/build/esm/{index-7a216561.js → index-654fef18.js} +13 -13
- package/build/esm/{index-b988d9ff.js → index-74fcde92.js} +6 -6
- package/build/esm/{index-e0b4e093.js → index-781820fa.js} +2 -2
- package/build/esm/{index-462ab3ff.js → index-83969379.js} +1 -1
- package/build/esm/{index-86bb01db.js → index-84b1c600.js} +2 -2
- package/build/esm/{index-e2a2571f.js → index-88936cbb.js} +18 -18
- package/build/esm/{index-0d9f23d4.js → index-8a4bb22a.js} +7 -7
- package/build/esm/{index-b7b7b745.js → index-8a683747.js} +3 -3
- package/build/esm/{index-8191c1c6.js → index-8e7715a6.js} +2 -2
- package/build/esm/{index-3084194d.js → index-91680300.js} +2 -2
- package/build/esm/{index-e0996b33.js → index-96c97554.js} +20 -20
- package/build/esm/{index-0d4448bd.js → index-97e2eae1.js} +3 -3
- package/build/esm/{index-87a336ce.js → index-a21831ff.js} +6 -6
- package/build/esm/{index-24133f56.js → index-a937a7cc.js} +1 -1
- package/build/esm/{index-bdc3ceee.js → index-b1286155.js} +2 -2
- package/build/esm/{index-af372347.js → index-bc3e4760.js} +18 -18
- package/build/esm/{index-5445b285.js → index-c0f56b88.js} +2 -2
- package/build/esm/{index-c2cc5925.js → index-c5316b00.js} +17 -17
- package/build/esm/{index-884ab933.js → index-c7a05161.js} +4 -4
- package/build/esm/{index-a6272b56.js → index-c8a9a951.js} +2 -2
- package/build/esm/{index-ac3f517e.js → index-cb8d4a3e.js} +2 -2
- package/build/esm/{index-385a5498.js → index-cf7745ad.js} +1 -1
- package/build/esm/{index-ceea1f7c.js → index-d092e283.js} +24 -24
- package/build/esm/{index-64b3fca2.js → index-d41578e6.js} +13 -13
- package/build/esm/{index-4dd28938.js → index-d6816bfd.js} +3 -3
- package/build/esm/{index-d204fb64.js → index-d8d68862.js} +1 -1
- package/build/esm/{index-cf86cc99.js → index-dff54fd6.js} +5 -5
- package/build/esm/{index-f1501e7e.js → index-e34c4717.js} +15 -15
- package/build/esm/{index-d6b0f5c3.js → index-e7e42be1.js} +1 -1
- package/build/esm/{index-33a44547.js → index-ebf362c2.js} +30 -30
- package/build/esm/{index-50ab695a.js → index-eddc3cde.js} +15 -15
- package/build/esm/{index-ef635844.js → index-f04f33a3.js} +3 -3
- package/build/esm/{index-ddc92a3f.js → index-ff58ff70.js} +3 -3
- package/build/esm/{index-0281f5a6.js → index-ffb9566d.js} +6 -6
- package/build/esm/index.js +112 -112
- package/build/esm/{labelSorting-71d29d3d.js → labelSorting-145dfaf9.js} +4 -4
- package/build/esm/lead.js +24 -24
- package/build/esm/{logoIcon-37333208.js → logoIcon-9799d527.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-1d607021.js → post-8df002c6.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 +1 -0
- package/build/esm/ssoV2/index.d.ts +8 -0
- package/build/esm/ssoV2/screens/components/progressBar.d.ts +14 -0
- package/build/esm/ssoV2/screens/components/progressBar.utils.d.ts +6 -0
- package/build/esm/ssoV2/screens/components/setupLater.d.ts +6 -0
- package/build/esm/ssoV2/screens/setup/otherSetup.d.ts +1 -1
- package/build/esm/ssoV2/ssoStateManager/store.d.ts +14 -0
- package/build/esm/ssoV2.js +475 -268
- package/build/esm/{store-c7b445f5.js → store-2b7e7dc0.js} +24 -5
- 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-9fd36cf3.js → surveyThankyouCard-0b769d3b.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-efe352e5.js → treePopoverMenu-45a3bd80.js} +19 -19
- package/build/esm/{types-416bf730.js → types-2e731cf6.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-16021e28.js → useCategory-8f6dce8c.js} +5 -5
- package/build/esm/{useHealthToolCache-3854d5ed.js → useHealthToolCache-85d21425.js} +1 -1
- package/build/esm/{useMantineLocale-07ea4cf6.js → useMantineLocale-88417a59.js} +6 -6
- package/build/esm/{usePlacesAutocomplete-4996a3c9.js → usePlacesAutocomplete-4c062cb7.js} +1 -1
- package/build/esm/{useScreenSize-02adc177.js → useScreenSize-2987961a.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-2f47732f.js → utils-97cce9c4.js} +2 -2
- package/build/esm/{utils-8e7408f2.js → utils-b6da8562.js} +3 -3
- package/build/esm/{utils-483662f7.js → utils-dcd621af.js} +2 -2
- package/build/esm/vaccination.js +21 -21
- package/build/{fixedBottomAdBlock-6b461854.js → fixedBottomAdBlock-44bfa9ed.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 +1 -0
- package/build/i18n-values/hi-IN.js +1 -0
- package/build/i18n-values/id-ID.js +1 -0
- package/build/i18n-values/km-KH.js +2 -1
- package/build/i18n-values/ms-MY.js +1 -0
- package/build/i18n-values/my-MM.js +1 -0
- package/build/i18n-values/th-TH.js +1 -0
- package/build/i18n-values/tl-PH.js +1 -0
- package/build/i18n-values/vi-VN.js +1 -0
- package/build/i18n-values/vi-VN_MB.js +1 -0
- package/build/i18n-values/zh-TW.js +1 -0
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-eeb534d4.js → index-0280d216.js} +15 -15
- package/build/{index-5eb26cff.js → index-08286f81.js} +1 -1
- package/build/{index-dbba4167.js → index-09304f4f.js} +2 -2
- package/build/{index-b54767aa.js → index-185a8dca.js} +2 -2
- package/build/{index-de8619b3.js → index-194c06d8.js} +2 -2
- package/build/{index-3392cffa.js → index-24c5aa04.js} +24 -24
- package/build/{index-0853b3cd.js → index-2727d2c9.js} +21 -21
- package/build/{index-a09d9e3a.js → index-27dc6882.js} +2 -2
- package/build/{index-a4b8bb7e.js → index-2e0ed87c.js} +30 -30
- package/build/{index-de85ffcc.js → index-35c7344a.js} +16 -16
- package/build/{index-89a13973.js → index-386207ff.js} +6 -6
- package/build/{index-ebae6258.js → index-3a49c1a6.js} +18 -18
- package/build/{index-e686ca2a.js → index-4422afd2.js} +1 -1
- package/build/{index-6f8821b3.js → index-473f08e1.js} +3 -3
- package/build/{index-a06fe154.js → index-48dd224d.js} +26 -26
- package/build/{index-6fba8121.js → index-4bef463e.js} +2 -2
- package/build/{index-d87b818e.js → index-4e414954.js} +11 -11
- package/build/{index-62a5386c.js → index-5269f16f.js} +6 -6
- package/build/{index-f50575bf.js → index-54ee9f57.js} +2 -2
- package/build/{index-ffa7a87f.js → index-561a444e.js} +1 -1
- package/build/{index-b3c64944.js → index-60454582.js} +1 -1
- package/build/{index-072bee2e.js → index-617b4374.js} +2 -2
- package/build/{index-3da24603.js → index-65028267.js} +18 -18
- package/build/{index-ce0b4d62.js → index-6971758e.js} +1 -1
- package/build/{index-2123a072.js → index-6a7e4b5c.js} +32 -32
- package/build/{index-a525c4cd.js → index-716e885c.js} +13 -13
- package/build/{index-19186e71.js → index-7743b602.js} +3 -3
- package/build/{index-d7792b63.js → index-77b84ca0.js} +18 -18
- package/build/{index-6395212c.js → index-7dd9b765.js} +20 -20
- package/build/{index-52213846.js → index-7e9e8564.js} +2 -2
- package/build/{index-9f8fa338.js → index-86c0c30d.js} +2 -2
- package/build/{index-5fc2cd51.js → index-886f8373.js} +2 -2
- package/build/{index-ef9025b3.js → index-8ead6c06.js} +5 -5
- package/build/{index-98e525ee.js → index-93aee61d.js} +4 -4
- package/build/{index-51dfe588.js → index-9831841e.js} +3 -3
- package/build/{index-440e211b.js → index-9d2c4948.js} +6 -6
- package/build/{index-1f1f8ee2.js → index-9fa29729.js} +17 -17
- package/build/{index-cf8f7e2b.js → index-a5f6580d.js} +3 -3
- package/build/{index-95c6b09e.js → index-b2e63280.js} +17 -17
- package/build/{index-8791c1c2.js → index-b446d1a4.js} +10 -10
- package/build/{index-e7a03912.js → index-b4b08b98.js} +16 -16
- package/build/{index-fc91b56e.js → index-bdbd20b7.js} +17 -17
- package/build/{index-d1343759.js → index-bf22e8c1.js} +3 -3
- package/build/{index-0c66ee32.js → index-c0efc3cb.js} +3 -3
- package/build/{index-e819c506.js → index-c563dd4b.js} +7 -7
- package/build/{index-1bbe12bd.js → index-d055462d.js} +16 -16
- package/build/{index-3a611dae.js → index-d422d7e7.js} +1 -1
- package/build/{index-5f0a74c3.js → index-d8bd1541.js} +15 -15
- package/build/{index-b8961d1b.js → index-db8b95cf.js} +2 -2
- package/build/{index-d341569b.js → index-e42311d3.js} +3 -3
- package/build/{index-2f000aea.js → index-e563e4da.js} +5 -5
- package/build/{index-0bae09f3.js → index-e5bfb60d.js} +13 -13
- package/build/{index-1ad5fb8c.js → index-e63065fc.js} +2 -2
- package/build/{index-6fc42bd7.js → index-e7af6164.js} +6 -6
- package/build/{index-c371b9cb.js → index-e870120a.js} +1 -1
- package/build/{index-2dd41ae9.js → index-ed839e59.js} +1 -1
- package/build/{index-a5772208.js → index-f5a45166.js} +7 -7
- package/build/{index-27aafa10.js → index-f9ada6f8.js} +1 -1
- package/build/{index-0bd3e14a.js → index-fc1b4b67.js} +13 -13
- package/build/{index-0450113e.js → index-fe848abc.js} +13 -13
- package/build/index.js +112 -112
- package/build/{labelSorting-ee9dbfed.js → labelSorting-ab270481.js} +4 -4
- package/build/lead.js +24 -24
- package/build/{logoIcon-bdd83bfe.js → logoIcon-53d3e78f.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-68d9e129.js → post-4ff99c33.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 +1 -0
- package/build/ssoV2/index.d.ts +8 -0
- package/build/ssoV2/screens/components/progressBar.d.ts +14 -0
- package/build/ssoV2/screens/components/progressBar.utils.d.ts +6 -0
- package/build/ssoV2/screens/components/setupLater.d.ts +6 -0
- package/build/ssoV2/screens/setup/otherSetup.d.ts +1 -1
- package/build/ssoV2/ssoStateManager/store.d.ts +14 -0
- package/build/ssoV2.js +472 -265
- package/build/{store-b6e93a3e.js → store-16924545.js} +26 -4
- package/build/subot.js +32 -32
- package/build/surveyOrPremiumBanner.js +31 -31
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-a2b371a5.js → surveyThankyouCard-53ee9962.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-c9756393.js → treePopoverMenu-caa9f263.js} +19 -19
- package/build/{types-2f4d9816.js → types-eae79122.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-1a397510.js → useCategory-0603e810.js} +5 -5
- package/build/{useHealthToolCache-9c18bdec.js → useHealthToolCache-6338bbd0.js} +1 -1
- package/build/{useMantineLocale-e6ec128f.js → useMantineLocale-e63a5ed8.js} +6 -6
- package/build/{usePlacesAutocomplete-f3777df5.js → usePlacesAutocomplete-2ef818d2.js} +1 -1
- package/build/{useScreenSize-6405c8d7.js → useScreenSize-3f912de5.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-9d21393e.js → utils-1f588f7b.js} +3 -3
- package/build/{utils-649a6c1a.js → utils-730f88d3.js} +2 -2
- package/build/{utils-a6a14827.js → utils-e64fadbc.js} +2 -2
- package/build/vaccination.js +21 -21
- package/package.json +1 -1
- /package/build/{BMI_BOYS.percentile.monthly-2bc64611.js → BMI_BOYS.percentile.monthly-834e5500.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-1a794178.js → BMI_BOYS.percentile.weekly-62a95635.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-58472c0f.js → BMI_BOYS.percentile.yearly-dec55a97.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-ae3ff525.js → BMI_BOYS.zscore.monthly-ec81f020.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-8a3e7cb1.js → BMI_BOYS.zscore.weekly-52124a5b.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-56e256cf.js → BMI_BOYS.zscore.yearly-2755aac0.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-fb51b8cc.js → BMI_GIRLS.percentile.monthly-f91213ec.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-c02c4d4d.js → BMI_GIRLS.percentile.weekly-6652f684.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-94e03770.js → BMI_GIRLS.percentile.yearly-112bdece.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-fb669b62.js → BMI_GIRLS.zscore.monthly-e2e702ca.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-6339f708.js → BMI_GIRLS.zscore.weekly-2ac65ca3.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-0bfa399d.js → BMI_GIRLS.zscore.yearly-fae2f078.js} +0 -0
- /package/build/{ChevronDown-aa4e9915.js → ChevronDown-98b9f210.js} +0 -0
- /package/build/{Close-49af07f7.js → Close-adb6f1a7.js} +0 -0
- /package/build/{Google-d68f1d9f.js → Google-135d45b7.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-a76666f9.js → HEAD CIRCUM_BOYS.percentile.monthly-539df0e9.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-cfc42b2a.js → HEAD CIRCUM_BOYS.percentile.weekly-65c03e42.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-4ea3be2f.js → HEAD CIRCUM_BOYS.percentile.yearly-9b5bae5b.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-3b0c0c14.js → HEAD CIRCUM_BOYS.zscore.monthly-2d762e70.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-ac84eaa7.js → HEAD CIRCUM_BOYS.zscore.weekly-c5944cc0.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-b42c2f92.js → HEAD CIRCUM_BOYS.zscore.yearly-bc3fec03.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-a2b52042.js → HEAD CIRCUM_GIRLS.percentile.monthly-6488b1ee.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-62fa3e5d.js → HEAD CIRCUM_GIRLS.percentile.weekly-a0eafa1e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-c6b1e11d.js → HEAD CIRCUM_GIRLS.percentile.yearly-7ad70008.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-a2b2377d.js → HEAD CIRCUM_GIRLS.zscore.monthly-88c46a4f.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-b12734cb.js → HEAD CIRCUM_GIRLS.zscore.weekly-31b94851.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-017edf0b.js → HEAD CIRCUM_GIRLS.zscore.yearly-82cd62dc.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-f1741fba.js → HEIGHT_BOYS.percentile.monthly-8e7d8c8b.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-c4c2a3b6.js → HEIGHT_BOYS.percentile.weekly-d5791c49.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-70ea45f9.js → HEIGHT_BOYS.percentile.yearly-0d1eee39.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-023189c7.js → HEIGHT_BOYS.zscore.monthly-e4b3d48b.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-1a445d6a.js → HEIGHT_BOYS.zscore.weekly-818dbd13.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-3f2155c4.js → HEIGHT_BOYS.zscore.yearly-581dd0af.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-bc55a691.js → HEIGHT_GIRLS.percentile.monthly-fecd8236.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-6c639055.js → HEIGHT_GIRLS.percentile.weekly-0fba900d.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-77ddcabc.js → HEIGHT_GIRLS.percentile.yearly-2494f6cb.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-d3ac795a.js → HEIGHT_GIRLS.zscore.monthly-21f3ebd0.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-b59e0ca6.js → HEIGHT_GIRLS.zscore.weekly-f9a9ce1d.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-c33ea8b9.js → HEIGHT_GIRLS.zscore.yearly-25dbbb6a.js} +0 -0
- /package/build/{Locale-bd14c9e1.js → Locale-58c4045b.js} +0 -0
- /package/build/{Visible-480ace09.js → Visible-572c3be6.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-8edee43b.js → WEIGHT_BOYS.percentile.monthly-8e8d9e68.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-34358ecf.js → WEIGHT_BOYS.percentile.weekly-65a8a895.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-b65cf0ef.js → WEIGHT_BOYS.percentile.yearly-d40c7862.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-414cdc73.js → WEIGHT_BOYS.zscore.monthly-ac331fd1.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-c2b08349.js → WEIGHT_BOYS.zscore.weekly-6db75beb.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-56dd794c.js → WEIGHT_BOYS.zscore.yearly-d3180877.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-4d0b3483.js → WEIGHT_GIRLS.percentile.monthly-14634eb8.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-08a53800.js → WEIGHT_GIRLS.percentile.weekly-72220a75.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-902227bf.js → WEIGHT_GIRLS.percentile.yearly-a105f23e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-84e95bfc.js → WEIGHT_GIRLS.zscore.monthly-384cf6d6.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-13cb4adc.js → WEIGHT_GIRLS.zscore.weekly-9fe2290d.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-19a757a6.js → WEIGHT_GIRLS.zscore.yearly-49140081.js} +0 -0
- /package/build/{animation-19e6a7bb.js → animation-c32a31ca.js} +0 -0
- /package/build/{constants-abf9a9ae.js → constants-9611abd6.js} +0 -0
- /package/build/{constants-050599c6.js → constants-9e31ec84.js} +0 -0
- /package/build/{constants-754a2443.js → constants-f56d2d44.js} +0 -0
- /package/build/{dataTransform-64023d00.js → dataTransform-5701f829.js} +0 -0
- /package/build/{doctor-26b75011.js → doctor-4d11131e.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-8af9f7ed.js → BMI_BOYS.percentile.monthly-428ddd53.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-f6d7cf47.js → BMI_BOYS.percentile.weekly-c72c0733.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-109b0941.js → BMI_BOYS.percentile.yearly-0eced11e.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-bf42d27a.js → BMI_BOYS.zscore.monthly-ee4487c3.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-c7c9ee32.js → BMI_BOYS.zscore.weekly-1a9a4d8b.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-1c44a03d.js → BMI_BOYS.zscore.yearly-ffadbfa9.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-571f181d.js → BMI_GIRLS.percentile.monthly-83db0b5b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-12487d31.js → BMI_GIRLS.percentile.weekly-370d6724.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-4e831390.js → BMI_GIRLS.percentile.yearly-07c66f69.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-188c8853.js → BMI_GIRLS.zscore.monthly-8554b909.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-f1c81e86.js → BMI_GIRLS.zscore.weekly-7e154675.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-08fc6437.js → BMI_GIRLS.zscore.yearly-3ca779e7.js} +0 -0
- /package/build/esm/{ChevronDown-99cd0a81.js → ChevronDown-5176d9a0.js} +0 -0
- /package/build/esm/{Close-36c0e89a.js → Close-f20a0a8b.js} +0 -0
- /package/build/esm/{Google-92682157.js → Google-84996434.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-98838ee5.js → HEAD CIRCUM_BOYS.percentile.monthly-c528a6e4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-10fc6540.js → HEAD CIRCUM_BOYS.percentile.weekly-0841846a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-64bde947.js → HEAD CIRCUM_BOYS.percentile.yearly-7efa6754.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-9865bf8d.js → HEAD CIRCUM_BOYS.zscore.monthly-448941d8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-88ad0c06.js → HEAD CIRCUM_BOYS.zscore.weekly-b57eb7c8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-af8b1b6a.js → HEAD CIRCUM_BOYS.zscore.yearly-5dbe6ec7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-4928c051.js → HEAD CIRCUM_GIRLS.percentile.monthly-bb5328b9.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-41d8019e.js → HEAD CIRCUM_GIRLS.percentile.weekly-45dcfe62.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-cc28a1a9.js → HEAD CIRCUM_GIRLS.percentile.yearly-d2cfd542.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-913ed954.js → HEAD CIRCUM_GIRLS.zscore.monthly-a8a6b9f0.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-995e7da7.js → HEAD CIRCUM_GIRLS.zscore.weekly-05b747b1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-b299a7d5.js → HEAD CIRCUM_GIRLS.zscore.yearly-00088e8e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-2befd4ce.js → HEIGHT_BOYS.percentile.monthly-7b97c856.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-e5518601.js → HEIGHT_BOYS.percentile.weekly-052b1137.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-980cf112.js → HEIGHT_BOYS.percentile.yearly-f0a23d07.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-252d6084.js → HEIGHT_BOYS.zscore.monthly-e7bb1344.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-cfc76a39.js → HEIGHT_BOYS.zscore.weekly-0e74ec49.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-1cf35654.js → HEIGHT_BOYS.zscore.yearly-8a4c91ac.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-37195c10.js → HEIGHT_GIRLS.percentile.monthly-a00e91ae.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-221ac9cc.js → HEIGHT_GIRLS.percentile.weekly-5ca6050f.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-4fd39f59.js → HEIGHT_GIRLS.percentile.yearly-89e4f19f.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-b7e1d64c.js → HEIGHT_GIRLS.zscore.monthly-06c7face.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-9c5ffc45.js → HEIGHT_GIRLS.zscore.weekly-27756935.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-92950ba4.js → HEIGHT_GIRLS.zscore.yearly-5871adf8.js} +0 -0
- /package/build/esm/{Locale-88e3696b.js → Locale-4c117b5c.js} +0 -0
- /package/build/esm/{Visible-1c50290d.js → Visible-3a8a673d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-823951df.js → WEIGHT_BOYS.percentile.monthly-550a0669.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-d5802949.js → WEIGHT_BOYS.percentile.weekly-1ce7e8b6.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-9285f181.js → WEIGHT_BOYS.percentile.yearly-80a6fc10.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-5da25e18.js → WEIGHT_BOYS.zscore.monthly-a8f811b9.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-bd3efec8.js → WEIGHT_BOYS.zscore.weekly-050ce869.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-ffd7d195.js → WEIGHT_BOYS.zscore.yearly-48123da1.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-7179575e.js → WEIGHT_GIRLS.percentile.monthly-225d8e0a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-b48a91f5.js → WEIGHT_GIRLS.percentile.weekly-696426cd.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-5df9dbf5.js → WEIGHT_GIRLS.percentile.yearly-ffe76f46.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-3b70fbe7.js → WEIGHT_GIRLS.zscore.monthly-cfd3dc42.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-55ec3ef5.js → WEIGHT_GIRLS.zscore.weekly-935f9551.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-d8d16a65.js → WEIGHT_GIRLS.zscore.yearly-51536743.js} +0 -0
- /package/build/esm/{animation-6ba43f05.js → animation-be5fe8e6.js} +0 -0
- /package/build/esm/{constants-381c5a9b.js → constants-37060108.js} +0 -0
- /package/build/esm/{constants-ed2d1422.js → constants-bc05b144.js} +0 -0
- /package/build/esm/{constants-7126088d.js → constants-f71d12d2.js} +0 -0
- /package/build/esm/{dataTransform-fc3b3df7.js → dataTransform-d411fe7b.js} +0 -0
- /package/build/esm/{doctor-84b8dd59.js → doctor-f3107c2e.js} +0 -0
- /package/build/esm/{index-53ca8997.js → index-0471dca9.js} +0 -0
- /package/build/esm/{index-23d8c6f8.js → index-0a5fe8db.js} +0 -0
- /package/build/esm/{index-6b39a688.js → index-2ccd5d8e.js} +0 -0
- /package/build/esm/{index-b43182e4.js → index-330703cf.js} +0 -0
- /package/build/esm/{index-80db9a3d.js → index-3bdbcb30.js} +0 -0
- /package/build/esm/{index-b4a9511d.js → index-73f5eb9a.js} +0 -0
- /package/build/esm/{index-73a1467f.js → index-bb075efd.js} +0 -0
- /package/build/esm/{index-b20e0116.js → index-c2d3c888.js} +0 -0
- /package/build/esm/{index-5d1687e2.js → index-cfb8f787.js} +0 -0
- /package/build/esm/{index.styles-c9075be7.js → index.styles-fa045c98.js} +0 -0
- /package/build/esm/{localizeNumberFormat-47fddad3.js → localizeNumberFormat-07943924.js} +0 -0
- /package/build/esm/{normalizeLink-010ca347.js → normalizeLink-1c636b22.js} +0 -0
- /package/build/esm/{other-33b4d4a0.js → other-20e10b0f.js} +0 -0
- /package/build/esm/{paths-c6f3783e.js → paths-7e0f2f0a.js} +0 -0
- /package/build/esm/{translationsContext-6eb1e527.js → translationsContext-cb16d077.js} +0 -0
- /package/build/esm/{tslib.es6-c84e4384.js → tslib.es6-0c7d68dd.js} +0 -0
- /package/build/esm/{types-6d15f25c.js → types-7c447768.js} +0 -0
- /package/build/esm/{useIsInit-ceda245d.js → useIsInit-5d0d3820.js} +0 -0
- /package/build/esm/{useOutsideClick-bdd04199.js → useOutsideClick-39412793.js} +0 -0
- /package/build/esm/{useScrollbarSize-8a202c25.js → useScrollbarSize-9d7e437b.js} +0 -0
- /package/build/esm/{useUniqueId-3ea1c9d5.js → useUniqueId-e1ce137e.js} +0 -0
- /package/build/esm/{utils-722bd86a.js → utils-f3946525.js} +0 -0
- /package/build/{index-1806c98f.js → index-383faa6d.js} +0 -0
- /package/build/{index-9f67c820.js → index-7b33a307.js} +0 -0
- /package/build/{index-cf561899.js → index-9ac78a25.js} +0 -0
- /package/build/{index-0a468885.js → index-a6cbac18.js} +0 -0
- /package/build/{index-1a26f8e1.js → index-c0b0e025.js} +0 -0
- /package/build/{index-99392e86.js → index-cb358875.js} +0 -0
- /package/build/{index-7fd58e9f.js → index-d8bd47e8.js} +0 -0
- /package/build/{index-1a9f72cf.js → index-e0ff1b22.js} +0 -0
- /package/build/{index-ea3147c3.js → index-ffa7ea9a.js} +0 -0
- /package/build/{index.styles-18c4b28b.js → index.styles-7120d8ea.js} +0 -0
- /package/build/{localizeNumberFormat-b46b98ec.js → localizeNumberFormat-60bff75f.js} +0 -0
- /package/build/{normalizeLink-504885b8.js → normalizeLink-b90878e9.js} +0 -0
- /package/build/{other-02cf041a.js → other-46db3d2f.js} +0 -0
- /package/build/{paths-cb9589ef.js → paths-b92d8f1d.js} +0 -0
- /package/build/{translationsContext-1004699f.js → translationsContext-3fb73930.js} +0 -0
- /package/build/{tslib.es6-c3f3259f.js → tslib.es6-e3f7d2e6.js} +0 -0
- /package/build/{types-4469d844.js → types-b6a74390.js} +0 -0
- /package/build/{useIsInit-90107648.js → useIsInit-caf6dcc2.js} +0 -0
- /package/build/{useOutsideClick-c0691182.js → useOutsideClick-dedc8d11.js} +0 -0
- /package/build/{useScrollbarSize-e3383cad.js → useScrollbarSize-6e5288dd.js} +0 -0
- /package/build/{useUniqueId-2418857a.js → useUniqueId-0482b249.js} +0 -0
- /package/build/{utils-fe54d063.js → utils-9f8ff31e.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, useEffect, useState,
|
|
3
|
-
import { I as Input, s as styles, O as OTP, f as PasswordInput,
|
|
4
|
-
import { a as useSSOSteps,
|
|
5
|
-
export { u as useSSOV2Store } from './store-
|
|
1
|
+
import { a as __awaiter, _ as __rest } from './tslib.es6-0c7d68dd.js';
|
|
2
|
+
import React__default, { createContext, useMemo, useEffect, useState, useCallback, forwardRef } from 'react';
|
|
3
|
+
import { I as Input, s as styles, O as OTP, f as PasswordInput, E as ErrorBoundary } from './index-52433776.js';
|
|
4
|
+
import { S as SSOStepTypeType, a as useSSOSteps, u as useSSOV2Store, i as isUserFinishedSetup, f as fetchSSOV2Api, w as websiteId, b as SSO_V2_PATHS, c as checkUserExist, F as FacebookAppId, G as GoogleAuthClientId, h as handleAuthSuccess, g as getUserInfo, d as updateUserInfo, e as isPhoneNotVerifedYet, j as isLoginWithPhoneNotVerifedYet, k as isFlowFinishedSetup, r as resetPassword, l as redirect } from './store-2b7e7dc0.js';
|
|
5
|
+
export { u as useSSOV2Store } from './store-2b7e7dc0.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-c0f56b88.js';
|
|
9
|
+
import { L as LogoIcon } from './logoIcon-9799d527.js';
|
|
10
|
+
import { B as Button } from './index-cf7745ad.js';
|
|
11
|
+
import { M as Modal } from './index-cb8d4a3e.js';
|
|
12
|
+
import { Stack, Flex, Box, Group } 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-83969379.js';
|
|
15
|
+
import './index-330703cf.js';
|
|
16
|
+
import { s as showNotification } from './useMantineLocale-88417a59.js';
|
|
17
|
+
import { T as Text } from './index-264d1558.js';
|
|
18
|
+
import { u as useTranslations } from './index-4ef871be.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-f3946525.js';
|
|
21
|
+
import './other-20e10b0f.js';
|
|
22
|
+
import './index-ff58ff70.js';
|
|
23
|
+
import { L as LOCALE } from './Locale-4c117b5c.js';
|
|
24
|
+
import { G as Google, F as Facebook } from './Google-84996434.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-2987961a.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-97cce9c4.js';
|
|
35
|
+
import { S as Spoiler } from './index-f04f33a3.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-61973987.js';
|
|
41
41
|
import '@mantine/carousel';
|
|
42
42
|
import './miscTheme.js';
|
|
43
|
-
import './useUniqueId-
|
|
43
|
+
import './useUniqueId-e1ce137e.js';
|
|
44
44
|
import './constantsSite.js';
|
|
45
45
|
import 'zustand';
|
|
46
46
|
import './constantsIsProduction.js';
|
|
47
|
-
import './normalizeLink-
|
|
47
|
+
import './normalizeLink-1c636b22.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-fa045c98.js';
|
|
52
52
|
import '@mantine/notifications';
|
|
53
|
-
import './translationsContext-
|
|
53
|
+
import './translationsContext-cb16d077.js';
|
|
54
54
|
|
|
55
55
|
const SSOStateContext = createContext({
|
|
56
56
|
locale: LOCALE.Vietnam,
|
|
@@ -158,13 +158,195 @@ 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
|
+
const previousStep = steps[currentStepIndex - 1];
|
|
277
|
+
return [
|
|
278
|
+
arrSteps.length,
|
|
279
|
+
(previousStep === null || previousStep === void 0 ? void 0 : previousStep.type) === SSOStepTypeType.UPDATE_EMAIL
|
|
280
|
+
? arrSteps.findLastIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1
|
|
281
|
+
: arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
|
|
282
|
+
];
|
|
283
|
+
}
|
|
284
|
+
if (isEmailFlow) {
|
|
285
|
+
const hasPasswordStep = !((_b = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _b === void 0 ? void 0 : _b.is_pass);
|
|
286
|
+
const hasPhoneStep = !isPhoneVerifedAlready(userInfo, flowData);
|
|
287
|
+
const hasSetupFullStep = !isSetupFullInfoAlready(userInfo, flowData);
|
|
288
|
+
if (!hasPasswordStep && !hasPhoneStep && !hasSetupFullStep)
|
|
289
|
+
return [];
|
|
290
|
+
const arrSteps = [
|
|
291
|
+
(step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
|
|
292
|
+
? SSOStepTypeType.OTP
|
|
293
|
+
: SSOStepTypeType.EMAIL,
|
|
294
|
+
hasPasswordStep
|
|
295
|
+
? SSOStepTypeType.FORGOT_PASSWORD_SETUP
|
|
296
|
+
: SSOStepTypeType.PASSWORD,
|
|
297
|
+
hasPhoneStep
|
|
298
|
+
? (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
|
|
299
|
+
? SSOStepTypeType.OTP
|
|
300
|
+
: SSOStepTypeType.VERIFY_PHONE
|
|
301
|
+
: undefined,
|
|
302
|
+
hasSetupFullStep ? SSOStepTypeType.SETUP_FULL : undefined,
|
|
303
|
+
]
|
|
304
|
+
.flat()
|
|
305
|
+
.filter(Boolean);
|
|
306
|
+
const previousStep = steps[currentStepIndex - 1];
|
|
307
|
+
return [
|
|
308
|
+
arrSteps.length,
|
|
309
|
+
(previousStep === null || previousStep === void 0 ? void 0 : previousStep.type) === SSOStepTypeType.VERIFY_PHONE
|
|
310
|
+
? arrSteps.findLastIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1
|
|
311
|
+
: arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
|
|
312
|
+
];
|
|
313
|
+
}
|
|
314
|
+
return [];
|
|
315
|
+
};
|
|
316
|
+
const ProgressBar = () => {
|
|
317
|
+
// const initUserInfo = useRef<UserInfo | undefined | null>()
|
|
318
|
+
const { steps, currentStepIndex } = useSSOSteps();
|
|
319
|
+
const { flowData, userInfo } = useSSOV2Store();
|
|
320
|
+
/** No need update state IF userInfo is changed */
|
|
321
|
+
const initUserInfo = useMemo(() => userInfo, [userInfo]);
|
|
322
|
+
const [totalStepNumber, activeStepNumber] = getCurrentStepNumber(flowData, { steps, currentStepIndex }, initUserInfo);
|
|
323
|
+
if (!activeStepNumber || totalStepNumber === 1)
|
|
324
|
+
return null;
|
|
325
|
+
return (React__default.createElement(Flex, { gap: 2 }, Array.from({ length: totalStepNumber }).map((_, idx) => {
|
|
326
|
+
const currentStepNumber = idx + 1;
|
|
327
|
+
return (React__default.createElement(Box, { key: currentStepNumber, style: {
|
|
328
|
+
width: 'auto',
|
|
329
|
+
height: 2,
|
|
330
|
+
flex: 1,
|
|
331
|
+
borderRadius: 4,
|
|
332
|
+
backgroundColor: currentStepNumber <= activeStepNumber ? '#00B16A' : '#D2D6DC',
|
|
333
|
+
} }));
|
|
334
|
+
})));
|
|
335
|
+
};
|
|
336
|
+
|
|
161
337
|
const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
162
338
|
var _a;
|
|
163
|
-
const { steps, goBack } = useSSOSteps();
|
|
339
|
+
const { steps, goBack, currentStepIndex } = useSSOSteps();
|
|
340
|
+
const { flowData } = useSSOV2Store();
|
|
164
341
|
const { locale, tracking } = useSSOState();
|
|
165
|
-
const
|
|
166
|
-
const
|
|
167
|
-
const
|
|
342
|
+
const currentStep = steps[currentStepIndex];
|
|
343
|
+
const showProgressBar = isDisplayProgressBarFn(flowData, currentStep);
|
|
344
|
+
const showBack = (steps.length > 1 && !showProgressBar) ||
|
|
345
|
+
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.OTP ||
|
|
346
|
+
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.PASSWORD ||
|
|
347
|
+
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.EMAIL;
|
|
348
|
+
const showClose = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.FIRST;
|
|
349
|
+
const showLogo = (steps.length === 1 || showProgressBar) && !showBack;
|
|
168
350
|
const logoType = (_a = LOCALE_SPECS[locale]) === null || _a === void 0 ? void 0 : _a.LOGO_TYPE;
|
|
169
351
|
const [closeConfirmOpen, setCloseConfirmOpen] = React__default.useState(false);
|
|
170
352
|
const onCloseClick = () => {
|
|
@@ -207,7 +389,11 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
207
389
|
display: 'block',
|
|
208
390
|
},
|
|
209
391
|
},
|
|
210
|
-
}), withCloseButton: false, zIndex: ZINDEX_SSO
|
|
392
|
+
}), withCloseButton: false, zIndex: ZINDEX_SSO, overlayProps: {
|
|
393
|
+
'data-event-label': 'Focus out',
|
|
394
|
+
'data-event-category': tracking === null || tracking === void 0 ? void 0 : tracking.category,
|
|
395
|
+
'data-event-action': tracking === null || tracking === void 0 ? void 0 : tracking.action,
|
|
396
|
+
} },
|
|
211
397
|
React__default.createElement("div", { style: {
|
|
212
398
|
height: 40,
|
|
213
399
|
display: 'flex',
|
|
@@ -220,7 +406,7 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
220
406
|
padding: 8,
|
|
221
407
|
background: 'white',
|
|
222
408
|
borderRadius: '100%',
|
|
223
|
-
}, onClick: goBack, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "
|
|
409
|
+
}, onClick: goBack, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Back" },
|
|
224
410
|
React__default.createElement(ChevronLeft, null))),
|
|
225
411
|
showLogo && (React__default.createElement(LogoIcon, { type: logoType, height: 32, width: 'unset' })),
|
|
226
412
|
showClose && (React__default.createElement(Button, { variant: "white", style: {
|
|
@@ -231,6 +417,7 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
231
417
|
borderRadius: '100%',
|
|
232
418
|
}, 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" },
|
|
233
419
|
React__default.createElement(Close, null)))),
|
|
420
|
+
showProgressBar && React__default.createElement(ProgressBar, null),
|
|
234
421
|
React__default.createElement("div", { style: {
|
|
235
422
|
flex: 1,
|
|
236
423
|
} }, children)),
|
|
@@ -374,7 +561,10 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
374
561
|
const { t } = useTranslations();
|
|
375
562
|
const [loading, setLoading] = React__default.useState(false);
|
|
376
563
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
377
|
-
const
|
|
564
|
+
const { flowData } = useSSOV2Store();
|
|
565
|
+
const trackingCategory = flowData.flow === 'signup'
|
|
566
|
+
? `SSO - Sign Up via Email`
|
|
567
|
+
: 'SSO - Sign In via Email';
|
|
378
568
|
const trackingAction = 'Continue With Email';
|
|
379
569
|
const { setTracking } = useSSOState();
|
|
380
570
|
useEffect(() => {
|
|
@@ -402,6 +592,7 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
402
592
|
flowData: {
|
|
403
593
|
method: 'email',
|
|
404
594
|
flow: 'login',
|
|
595
|
+
metaData: existRes._data,
|
|
405
596
|
},
|
|
406
597
|
});
|
|
407
598
|
// go to password screen
|
|
@@ -419,6 +610,7 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
419
610
|
flowData: {
|
|
420
611
|
method: 'email',
|
|
421
612
|
flow: 'signup',
|
|
613
|
+
metaData: existRes._data,
|
|
422
614
|
},
|
|
423
615
|
});
|
|
424
616
|
if (!((_b = existRes._data) === null || _b === void 0 ? void 0 : _b.provider)) {
|
|
@@ -437,7 +629,7 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
437
629
|
config: {
|
|
438
630
|
email,
|
|
439
631
|
otpType: 'email',
|
|
440
|
-
afterAction: '
|
|
632
|
+
afterAction: 'forgot',
|
|
441
633
|
},
|
|
442
634
|
});
|
|
443
635
|
goNext();
|
|
@@ -1778,7 +1970,7 @@ function CountrySelectWithIcon(_a) {
|
|
|
1778
1970
|
var { value, options, className,
|
|
1779
1971
|
// iconComponent: Icon,
|
|
1780
1972
|
// getIconAspectRatio,
|
|
1781
|
-
arrowComponent: Arrow = DefaultArrowComponent, onChange, disabled, readOnly } = _a, rest = __rest(_a, ["value", "options", "className", "arrowComponent", "onChange", "disabled", "readOnly"]);
|
|
1973
|
+
arrowComponent: Arrow = DefaultArrowComponent, onChange, disabled, readOnly, trackingFn } = _a, rest = __rest(_a, ["value", "options", "className", "arrowComponent", "onChange", "disabled", "readOnly", "trackingFn"]);
|
|
1782
1974
|
const { t } = useTranslations();
|
|
1783
1975
|
const [open, setOpen] = useState(false);
|
|
1784
1976
|
const [modalStyle, setModalStyle] = useState({});
|
|
@@ -1862,13 +2054,13 @@ function CountrySelectWithIcon(_a) {
|
|
|
1862
2054
|
React__default.createElement(SelectCountryItem, { option: selectedOption, onSelect: (option) => {
|
|
1863
2055
|
onChange_(option.value);
|
|
1864
2056
|
setOpen(false);
|
|
1865
|
-
} }))),
|
|
2057
|
+
}, trackingFn: trackingFn }))),
|
|
1866
2058
|
React__default.createElement(Stack, { spacing: 0 },
|
|
1867
2059
|
React__default.createElement(Text, { size: "s4" }, t('ssov2.first.search.country.all')),
|
|
1868
2060
|
filteredOptions.map((option) => (React__default.createElement(SelectCountryItem, { option: option, key: option.value, onSelect: (option) => {
|
|
1869
2061
|
onChange_(option.value);
|
|
1870
2062
|
setOpen(false);
|
|
1871
|
-
}, selected: selectedOption.value === option.value }))))));
|
|
2063
|
+
}, selected: selectedOption.value === option.value, trackingFn: trackingFn }))))));
|
|
1872
2064
|
const FlagSelected = Flags[selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value];
|
|
1873
2065
|
return (React__default.createElement(React__default.Fragment, null,
|
|
1874
2066
|
React__default.createElement("div", { className: "PhoneInputCountry", ref: countryDivRef },
|
|
@@ -1932,7 +2124,7 @@ function CountrySelectWithIcon(_a) {
|
|
|
1932
2124
|
}, onClick: () => setOpen(false) }),
|
|
1933
2125
|
React__default.createElement("div", { style: Object.assign({ position: 'fixed', height: 540, top: '100%', left: 0, width: '100%', backgroundColor: 'white', padding: '8px 24px', zIndex: ZINDEX_SSO + 9, borderRadius: 12, boxShadow: '0px 0px 1px 0px #0000000A, 0px 4px 8px 0px #0000000A, 0px 16px 24px 0px #0000000A, 0px 24px 32px 0px #0000000A', overflow: 'auto' }, modalStyle) }, SelectCountryContent))))));
|
|
1934
2126
|
}
|
|
1935
|
-
const SelectCountryItem = ({ option, onSelect, selected, }) => {
|
|
2127
|
+
const SelectCountryItem = ({ option, onSelect, selected, trackingFn, }) => {
|
|
1936
2128
|
const selectedCallingCode = useMemo(() => {
|
|
1937
2129
|
if (!option.value)
|
|
1938
2130
|
return '';
|
|
@@ -1943,14 +2135,15 @@ const SelectCountryItem = ({ option, onSelect, selected, }) => {
|
|
|
1943
2135
|
return '';
|
|
1944
2136
|
}, [option.value]);
|
|
1945
2137
|
const Flag = Flags[option.value];
|
|
1946
|
-
|
|
2138
|
+
const tracking = (trackingFn === null || trackingFn === void 0 ? void 0 : trackingFn(option)) || {};
|
|
2139
|
+
return (React__default.createElement(Stack, Object.assign({ sx: {
|
|
1947
2140
|
padding: '0 24px',
|
|
1948
2141
|
backgroundColor: selected ? '#e3f2ff' : 'transparent',
|
|
1949
2142
|
':hover': { backgroundColor: '#F7F9FA' },
|
|
1950
2143
|
cursor: 'pointer',
|
|
1951
2144
|
marginLeft: -24,
|
|
1952
2145
|
marginRight: -24,
|
|
1953
|
-
}, justify: "center", onClick: () => onSelect(option) },
|
|
2146
|
+
}, justify: "center", onClick: () => onSelect(option) }, tracking),
|
|
1954
2147
|
React__default.createElement(Group, { position: "apart", sx: {
|
|
1955
2148
|
height: 50,
|
|
1956
2149
|
borderBottom: '1px solid #E4E8EC',
|
|
@@ -2002,7 +2195,7 @@ function isSameOptionValue(value1, value2) {
|
|
|
2002
2195
|
const PhoneForwardRef = (props, ref) => {
|
|
2003
2196
|
const { isError, defaultCountry,
|
|
2004
2197
|
// countries = countriesDefault,
|
|
2005
|
-
countryCallingCodeEditable = false, defaultValue, value: valueProps, onChange: onChangeProps, className } = props, inputProps = __rest(props, ["isError", "defaultCountry", "countryCallingCodeEditable", "defaultValue", "value", "onChange", "className"]);
|
|
2198
|
+
countryCallingCodeEditable = false, defaultValue, value: valueProps, onChange: onChangeProps, className, trackingFn } = props, inputProps = __rest(props, ["isError", "defaultCountry", "countryCallingCodeEditable", "defaultValue", "value", "onChange", "className", "trackingFn"]);
|
|
2006
2199
|
const [value, setValue] = useState(defaultValue || valueProps);
|
|
2007
2200
|
const [PhoneInputUtils, setPhoneInputUtils] = useState(null);
|
|
2008
2201
|
const onChange = (val) => {
|
|
@@ -2026,7 +2219,7 @@ const PhoneForwardRef = (props, ref) => {
|
|
|
2026
2219
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2027
2220
|
ref: ref, value: value, onChange: onChange,
|
|
2028
2221
|
// countries={countries}
|
|
2029
|
-
defaultCountry: defaultCountry, countryCallingCodeEditable: countryCallingCodeEditable, className: cn(styles.phoneInput, { isError, [styles.error]: isError }, className), countrySelectComponent: CountrySelectWithIcon }, inputProps)));
|
|
2222
|
+
defaultCountry: defaultCountry, countryCallingCodeEditable: countryCallingCodeEditable, className: cn(styles.phoneInput, { isError, [styles.error]: isError }, className), countrySelectComponent: CountrySelectWithIcon, countrySelectProps: { trackingFn } }, inputProps)));
|
|
2030
2223
|
};
|
|
2031
2224
|
const PhoneWithCustomCountrySelect = forwardRef(PhoneForwardRef);
|
|
2032
2225
|
|
|
@@ -2062,11 +2255,12 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2062
2255
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
2063
2256
|
const { locale, onClose, setTracking } = useSSOState();
|
|
2064
2257
|
const { addStep, goNext } = useSSOSteps();
|
|
2258
|
+
const { setUserInfo } = useSSOV2Store();
|
|
2065
2259
|
const [activeTab, setActiveTab] = React__default.useState('login');
|
|
2066
2260
|
const { legalTextType } = config || {};
|
|
2067
2261
|
const { t } = useTranslations();
|
|
2068
|
-
const
|
|
2069
|
-
const
|
|
2262
|
+
const trackingAction = 'Sign In or Sign Up';
|
|
2263
|
+
const trackingCategory = `SSO - ${activeTab === 'login' ? 'Sign In' : 'Sign Up'}`;
|
|
2070
2264
|
useEffect(() => {
|
|
2071
2265
|
if (!hidden) {
|
|
2072
2266
|
setErrMsg('');
|
|
@@ -2078,20 +2272,31 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2078
2272
|
}, [hidden]);
|
|
2079
2273
|
const [loading, setLoading] = React__default.useState(false);
|
|
2080
2274
|
const handleLoginBySocial = (credential, provider) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2081
|
-
var _c, _d;
|
|
2082
2275
|
const res = yield loginBySocial(credential, provider);
|
|
2083
2276
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
2084
2277
|
handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
2085
2278
|
const userInfo = yield getUserInfo();
|
|
2279
|
+
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
2086
2280
|
if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) === 1 && userInfo._data) {
|
|
2087
2281
|
useSSOV2Store.setState({
|
|
2088
2282
|
flowData: {
|
|
2089
2283
|
method: provider,
|
|
2090
2284
|
},
|
|
2091
2285
|
});
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2286
|
+
const isNotHavePhone = !userInfo._data.phone || !userInfo._data.phone_verified_at;
|
|
2287
|
+
if (isNotHavePhone) {
|
|
2288
|
+
useSSOV2Store.setState((f) => ({
|
|
2289
|
+
flowData: Object.assign(Object.assign({}, f.flowData), { flow: 'signup', isVerifyPhone: true }),
|
|
2290
|
+
}));
|
|
2291
|
+
addStep({
|
|
2292
|
+
type: SSOStepTypeType.VERIFY_PHONE,
|
|
2293
|
+
config: {
|
|
2294
|
+
provider: provider,
|
|
2295
|
+
},
|
|
2296
|
+
});
|
|
2297
|
+
goNext();
|
|
2298
|
+
}
|
|
2299
|
+
else if (!isUserFinishedSetup(userInfo._data)) {
|
|
2095
2300
|
useSSOV2Store.setState((f) => ({
|
|
2096
2301
|
flowData: Object.assign(Object.assign({}, f.flowData), { flow: 'signup' }),
|
|
2097
2302
|
}));
|
|
@@ -2122,19 +2327,6 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2122
2327
|
goNext();
|
|
2123
2328
|
}
|
|
2124
2329
|
}
|
|
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
|
-
}
|
|
2138
2330
|
else {
|
|
2139
2331
|
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
2140
2332
|
}
|
|
@@ -2174,7 +2366,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2174
2366
|
};
|
|
2175
2367
|
}, []);
|
|
2176
2368
|
const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2177
|
-
var
|
|
2369
|
+
var _c, _d;
|
|
2178
2370
|
setLoading(true);
|
|
2179
2371
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2180
2372
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2183,12 +2375,13 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2183
2375
|
}
|
|
2184
2376
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
2185
2377
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2186
|
-
const provider = (
|
|
2187
|
-
if ((
|
|
2378
|
+
const provider = (_c = userExist._data) === null || _c === void 0 ? void 0 : _c.provider;
|
|
2379
|
+
if ((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.is_pass) {
|
|
2188
2380
|
useSSOV2Store.setState({
|
|
2189
2381
|
flowData: {
|
|
2190
2382
|
method: 'zalo',
|
|
2191
2383
|
flow: 'login',
|
|
2384
|
+
metaData: userExist._data,
|
|
2192
2385
|
},
|
|
2193
2386
|
});
|
|
2194
2387
|
addStep({
|
|
@@ -2216,6 +2409,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2216
2409
|
flowData: {
|
|
2217
2410
|
method: 'zalo',
|
|
2218
2411
|
flow: 'signup',
|
|
2412
|
+
metaData: userExist._data,
|
|
2219
2413
|
},
|
|
2220
2414
|
});
|
|
2221
2415
|
addStep({
|
|
@@ -2223,7 +2417,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2223
2417
|
config: {
|
|
2224
2418
|
phone,
|
|
2225
2419
|
otpType: 'phone-zalo',
|
|
2226
|
-
afterAction: '
|
|
2420
|
+
afterAction: 'forgot',
|
|
2227
2421
|
},
|
|
2228
2422
|
});
|
|
2229
2423
|
goNext();
|
|
@@ -2235,7 +2429,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2235
2429
|
setLoading(false);
|
|
2236
2430
|
});
|
|
2237
2431
|
const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2238
|
-
var
|
|
2432
|
+
var _e, _f;
|
|
2239
2433
|
setLoading(true);
|
|
2240
2434
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2241
2435
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2244,12 +2438,13 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2244
2438
|
}
|
|
2245
2439
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
2246
2440
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2247
|
-
const provider = (
|
|
2248
|
-
if ((
|
|
2441
|
+
const provider = (_e = userExist._data) === null || _e === void 0 ? void 0 : _e.provider;
|
|
2442
|
+
if ((_f = userExist._data) === null || _f === void 0 ? void 0 : _f.is_pass) {
|
|
2249
2443
|
useSSOV2Store.setState({
|
|
2250
2444
|
flowData: {
|
|
2251
2445
|
method: 'sms',
|
|
2252
2446
|
flow: 'login',
|
|
2447
|
+
metaData: userExist._data,
|
|
2253
2448
|
},
|
|
2254
2449
|
});
|
|
2255
2450
|
addStep({
|
|
@@ -2277,6 +2472,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2277
2472
|
flowData: {
|
|
2278
2473
|
method: 'sms',
|
|
2279
2474
|
flow: 'signup',
|
|
2475
|
+
metaData: userExist._data,
|
|
2280
2476
|
},
|
|
2281
2477
|
});
|
|
2282
2478
|
addStep({
|
|
@@ -2284,7 +2480,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2284
2480
|
config: {
|
|
2285
2481
|
phone,
|
|
2286
2482
|
otpType: 'phone-sms',
|
|
2287
|
-
afterAction: '
|
|
2483
|
+
afterAction: 'forgot',
|
|
2288
2484
|
},
|
|
2289
2485
|
});
|
|
2290
2486
|
goNext();
|
|
@@ -2296,7 +2492,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2296
2492
|
setLoading(false);
|
|
2297
2493
|
});
|
|
2298
2494
|
const onClickLoginWithPhone = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2299
|
-
var
|
|
2495
|
+
var _g, _h;
|
|
2300
2496
|
setLoading(true);
|
|
2301
2497
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2302
2498
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2305,7 +2501,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2305
2501
|
}
|
|
2306
2502
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
2307
2503
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2308
|
-
if (!userExist._data || !((
|
|
2504
|
+
if (!userExist._data || !((_g = userExist._data) === null || _g === void 0 ? void 0 : _g.is_pass)) {
|
|
2309
2505
|
showNotification({
|
|
2310
2506
|
message: t('ssov2.first.noAccountOrPass'),
|
|
2311
2507
|
type: 'danger',
|
|
@@ -2313,11 +2509,12 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2313
2509
|
setActiveTab('signup');
|
|
2314
2510
|
return setLoading(false);
|
|
2315
2511
|
}
|
|
2316
|
-
if ((
|
|
2512
|
+
if ((_h = userExist._data) === null || _h === void 0 ? void 0 : _h.is_pass) {
|
|
2317
2513
|
useSSOV2Store.setState({
|
|
2318
2514
|
flowData: {
|
|
2319
2515
|
method: 'phone',
|
|
2320
2516
|
flow: 'login',
|
|
2517
|
+
metaData: userExist._data,
|
|
2321
2518
|
},
|
|
2322
2519
|
});
|
|
2323
2520
|
addStep({
|
|
@@ -2339,7 +2536,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2339
2536
|
useSSOV2Store.setState({
|
|
2340
2537
|
flowData: {
|
|
2341
2538
|
method: 'email',
|
|
2342
|
-
flow: 'login',
|
|
2539
|
+
flow: activeTab === 'login' ? 'login' : 'signup',
|
|
2343
2540
|
},
|
|
2344
2541
|
});
|
|
2345
2542
|
addStep({
|
|
@@ -2396,7 +2593,17 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2396
2593
|
onClickContinueZalo();
|
|
2397
2594
|
} },
|
|
2398
2595
|
React__default.createElement(Input.Wrapper, { error: errMsg },
|
|
2399
|
-
React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone"
|
|
2596
|
+
React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone", trackingFn: useCallback((option) => {
|
|
2597
|
+
if (!(option === null || option === void 0 ? void 0 : option.label))
|
|
2598
|
+
return;
|
|
2599
|
+
return {
|
|
2600
|
+
'data-event-action': 'Country Selection',
|
|
2601
|
+
'data-event-label': option.label,
|
|
2602
|
+
'data-event-category': activeTab === 'signup'
|
|
2603
|
+
? 'SSO - Sign Up'
|
|
2604
|
+
: 'SSO - Sign In',
|
|
2605
|
+
};
|
|
2606
|
+
}, [activeTab]) }))),
|
|
2400
2607
|
React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickLoginWithPhone, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue Login", display: activeTab === 'login' ? 'block' : 'none' }, t('ssov2.button.continue')),
|
|
2401
2608
|
React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo", display: activeTab === 'signup' ? 'block' : 'none' }, t('ssov2.button.otp.zalo')),
|
|
2402
2609
|
React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS", display: activeTab === 'signup' ? 'block' : 'none' }, t('ssov2.button.otp.sms'))),
|
|
@@ -2478,10 +2685,8 @@ const initSendUpdateEmailOtp = (email) => __awaiter(void 0, void 0, void 0, func
|
|
|
2478
2685
|
});
|
|
2479
2686
|
});
|
|
2480
2687
|
const resendUpdateEmailOTP = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2481
|
-
const formData = new FormData();
|
|
2482
2688
|
return fetchSSOV2Api(SSO_V2_PATHS.ECOM_CARE.RESEND_OTP, {
|
|
2483
|
-
method: '
|
|
2484
|
-
body: formData,
|
|
2689
|
+
method: 'GET',
|
|
2485
2690
|
});
|
|
2486
2691
|
});
|
|
2487
2692
|
const verifyUpdateEmailOTP = (otpCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -2516,7 +2721,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2516
2721
|
? 'Sign Up'
|
|
2517
2722
|
: 'Sign In'} via ${trackingMethod}`;
|
|
2518
2723
|
const trackingAction = isEmail
|
|
2519
|
-
? 'Verify Email'
|
|
2724
|
+
? 'Verify Your Email'
|
|
2520
2725
|
: `Verify Phone Number via ${isZalo ? 'Zalo' : isSMS ? 'SMS' : ''}`;
|
|
2521
2726
|
useEffect(() => {
|
|
2522
2727
|
if (!hidden) {
|
|
@@ -2529,15 +2734,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2529
2734
|
}, [hidden]);
|
|
2530
2735
|
const addStepAndGoNext = (step) => {
|
|
2531
2736
|
useSSOSteps.setState((old) => {
|
|
2532
|
-
var _a, _b;
|
|
2533
2737
|
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
|
-
}
|
|
2541
2738
|
return {
|
|
2542
2739
|
steps: oldSteps.slice(0, index).concat(step),
|
|
2543
2740
|
currentStepIndex: index,
|
|
@@ -2868,7 +3065,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2868
3065
|
'data-event-category': trackingCategory,
|
|
2869
3066
|
'data-event-action': trackingAction,
|
|
2870
3067
|
'data-event-label': 'Enter Code',
|
|
2871
|
-
} })),
|
|
3068
|
+
}, placeholder: "*" })),
|
|
2872
3069
|
React__default.createElement(Group, { spacing: 8, align: "center", style: {
|
|
2873
3070
|
height: 40,
|
|
2874
3071
|
} },
|
|
@@ -2888,6 +3085,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
|
2888
3085
|
const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
2889
3086
|
const { t } = useTranslations();
|
|
2890
3087
|
const { onClose, setTracking } = useSSOState();
|
|
3088
|
+
const { setUserInfo, flowData } = useSSOV2Store();
|
|
2891
3089
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
2892
3090
|
const phone = config === null || config === void 0 ? void 0 : config.phone;
|
|
2893
3091
|
const method = config === null || config === void 0 ? void 0 : config.method;
|
|
@@ -2951,11 +3149,13 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
2951
3149
|
setLoading(false);
|
|
2952
3150
|
});
|
|
2953
3151
|
const onAuthSuccess = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2954
|
-
var _c, _d;
|
|
2955
3152
|
handleAuthSuccess(data);
|
|
3153
|
+
const userInfo = yield getUserInfo();
|
|
3154
|
+
const isPhoneFlow = isPhoneFlowFn(flowData);
|
|
3155
|
+
const isEmailFlow = isEmailFlowFn(flowData);
|
|
3156
|
+
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
2956
3157
|
if (!phone && !!email) {
|
|
2957
|
-
|
|
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)) {
|
|
3158
|
+
if (isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
2959
3159
|
useSSOV2Store.setState((s) => ({
|
|
2960
3160
|
flowData: Object.assign(Object.assign({}, s.flowData), { isVerifyPhone: true }),
|
|
2961
3161
|
}));
|
|
@@ -2969,6 +3169,27 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
2969
3169
|
return;
|
|
2970
3170
|
}
|
|
2971
3171
|
}
|
|
3172
|
+
if (isLoginWithPhoneNotVerifedYet(flowData, userInfo._data)) {
|
|
3173
|
+
addStep({
|
|
3174
|
+
type: SSOStepTypeType.FORGOT_PASSWORD_PHONE,
|
|
3175
|
+
config: {
|
|
3176
|
+
phone: `${userInfo._data.area_code}${userInfo._data.phone}`,
|
|
3177
|
+
afterAction: 'setup',
|
|
3178
|
+
},
|
|
3179
|
+
});
|
|
3180
|
+
goNext();
|
|
3181
|
+
return;
|
|
3182
|
+
}
|
|
3183
|
+
if ((isPhoneFlow || isEmailFlow) && !isUserFinishedSetup(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
3184
|
+
addStep({
|
|
3185
|
+
type: SSOStepTypeType.SETUP_FULL,
|
|
3186
|
+
config: {
|
|
3187
|
+
userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
|
|
3188
|
+
},
|
|
3189
|
+
});
|
|
3190
|
+
goNext();
|
|
3191
|
+
return;
|
|
3192
|
+
}
|
|
2972
3193
|
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
2973
3194
|
});
|
|
2974
3195
|
return (React__default.createElement("form", { style: {
|
|
@@ -3017,6 +3238,47 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3017
3238
|
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'))));
|
|
3018
3239
|
};
|
|
3019
3240
|
|
|
3241
|
+
const SetupLater = ({ style = {} }) => {
|
|
3242
|
+
const { t } = useTranslations();
|
|
3243
|
+
const { onClose, tracking } = useSSOState();
|
|
3244
|
+
const [loading, setLoading] = useState(false);
|
|
3245
|
+
const { userInfo, flowData } = useSSOV2Store();
|
|
3246
|
+
const { currentStepIndex, steps, addStep, goNext } = useSSOSteps();
|
|
3247
|
+
const currentStep = steps[currentStepIndex];
|
|
3248
|
+
const onClickSetupLater = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3249
|
+
if (loading)
|
|
3250
|
+
return;
|
|
3251
|
+
setLoading(true);
|
|
3252
|
+
if (userInfo &&
|
|
3253
|
+
!isUserFinishedSetup(userInfo) &&
|
|
3254
|
+
((currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.VERIFY_PHONE ||
|
|
3255
|
+
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.FORGOT_PASSWORD_PHONE)) {
|
|
3256
|
+
addStep({
|
|
3257
|
+
type: SSOStepTypeType.SETUP_FULL,
|
|
3258
|
+
config: {
|
|
3259
|
+
userInfo,
|
|
3260
|
+
},
|
|
3261
|
+
});
|
|
3262
|
+
goNext();
|
|
3263
|
+
}
|
|
3264
|
+
else if (!isFlowFinishedSetup(flowData) &&
|
|
3265
|
+
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.VERIFY_PHONE) {
|
|
3266
|
+
addStep({
|
|
3267
|
+
type: SSOStepTypeType.SETUP_FULL,
|
|
3268
|
+
config: {
|
|
3269
|
+
userInfo,
|
|
3270
|
+
},
|
|
3271
|
+
});
|
|
3272
|
+
goNext();
|
|
3273
|
+
}
|
|
3274
|
+
else {
|
|
3275
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3276
|
+
}
|
|
3277
|
+
setLoading(false);
|
|
3278
|
+
});
|
|
3279
|
+
return (React__default.createElement(Button, { size: "sm", variant: "white", color: "#737373", style: Object.assign({ fontWeight: 400 }, style), onClick: onClickSetupLater, disabled: loading, dataEventCategory: tracking === null || tracking === void 0 ? void 0 : tracking.category, dataEventAction: tracking === null || tracking === void 0 ? void 0 : tracking.action, dataEventLabel: "Setup Later" }, t('ssov2.button.setupLater')));
|
|
3280
|
+
};
|
|
3281
|
+
|
|
3020
3282
|
const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
3021
3283
|
const phone = config === null || config === void 0 ? void 0 : config.phone;
|
|
3022
3284
|
const { t } = useTranslations();
|
|
@@ -3064,7 +3326,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3064
3326
|
config: {
|
|
3065
3327
|
phone,
|
|
3066
3328
|
otpType: 'phone-zalo',
|
|
3067
|
-
afterAction: 'forgot',
|
|
3329
|
+
afterAction: config.afterAction || 'forgot',
|
|
3068
3330
|
provider: (_b = userExist._data) === null || _b === void 0 ? void 0 : _b.provider,
|
|
3069
3331
|
},
|
|
3070
3332
|
});
|
|
@@ -3107,7 +3369,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3107
3369
|
config: {
|
|
3108
3370
|
phone,
|
|
3109
3371
|
otpType: 'phone-sms',
|
|
3110
|
-
afterAction: 'forgot',
|
|
3372
|
+
afterAction: config.afterAction || 'forgot',
|
|
3111
3373
|
provider: (_d = userExist._data) === null || _d === void 0 ? void 0 : _d.provider,
|
|
3112
3374
|
},
|
|
3113
3375
|
});
|
|
@@ -3135,7 +3397,8 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3135
3397
|
isError: !!errMsg, required: true, disabled: true, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone" }),
|
|
3136
3398
|
errMsg && (React__default.createElement(Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
|
|
3137
3399
|
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')),
|
|
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'))
|
|
3400
|
+
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')),
|
|
3401
|
+
React__default.createElement(SetupLater, null))));
|
|
3139
3402
|
};
|
|
3140
3403
|
|
|
3141
3404
|
const CheckGrayIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -3176,11 +3439,12 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3176
3439
|
const { t } = useTranslations();
|
|
3177
3440
|
const [loading, setLoading] = React__default.useState(false);
|
|
3178
3441
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
3179
|
-
const { setTracking } = useSSOState();
|
|
3180
|
-
const {
|
|
3442
|
+
const { setTracking, onClose } = useSSOState();
|
|
3443
|
+
const { addStep, goNext } = useSSOSteps();
|
|
3444
|
+
const { flowData, setUserInfo } = useSSOV2Store();
|
|
3181
3445
|
const trackingMethod = flowData.method;
|
|
3182
3446
|
const trackingCategory = `SSO - Sign In via ${trackingMethod}`;
|
|
3183
|
-
const trackingAction = `Setup
|
|
3447
|
+
const trackingAction = `Setup Password`;
|
|
3184
3448
|
useEffect(() => {
|
|
3185
3449
|
if (!hidden) {
|
|
3186
3450
|
setErrMsg('');
|
|
@@ -3215,22 +3479,66 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3215
3479
|
password.length <= 50 &&
|
|
3216
3480
|
password.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/) &&
|
|
3217
3481
|
password === confirmPassword) {
|
|
3218
|
-
const
|
|
3482
|
+
const isPhoneOrEmailFlow = isPhoneFlowFn(flowData) || isEmailFlowFn(flowData);
|
|
3483
|
+
const res = isPhoneOrEmailFlow
|
|
3484
|
+
? yield updateUserInfo({
|
|
3485
|
+
password,
|
|
3486
|
+
confirm_password: confirmPassword,
|
|
3487
|
+
validate: '',
|
|
3488
|
+
})
|
|
3489
|
+
: yield resetPassword(password, confirmPassword);
|
|
3219
3490
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3491
|
+
if (isPhoneOrEmailFlow) {
|
|
3492
|
+
handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
3493
|
+
const userInfo = yield getUserInfo();
|
|
3494
|
+
// Phone
|
|
3495
|
+
if (isPhoneFlowFn(flowData)) {
|
|
3496
|
+
if (userInfo && !isUserFinishedSetup(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
3497
|
+
addStep({
|
|
3498
|
+
type: SSOStepTypeType.SETUP_FULL,
|
|
3499
|
+
config: {
|
|
3500
|
+
userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
|
|
3501
|
+
},
|
|
3502
|
+
});
|
|
3503
|
+
goNext();
|
|
3504
|
+
}
|
|
3505
|
+
else {
|
|
3506
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3507
|
+
}
|
|
3508
|
+
}
|
|
3509
|
+
// Email
|
|
3510
|
+
if (isEmailFlowFn(flowData)) {
|
|
3511
|
+
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
3512
|
+
if (isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
3513
|
+
addStep({
|
|
3514
|
+
type: SSOStepTypeType.VERIFY_PHONE,
|
|
3515
|
+
config: {
|
|
3516
|
+
provider: 'email',
|
|
3517
|
+
},
|
|
3518
|
+
});
|
|
3519
|
+
goNext();
|
|
3520
|
+
}
|
|
3521
|
+
else {
|
|
3522
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3523
|
+
}
|
|
3524
|
+
}
|
|
3230
3525
|
}
|
|
3231
3526
|
else {
|
|
3232
|
-
|
|
3233
|
-
|
|
3527
|
+
showNotification({
|
|
3528
|
+
type: 'success',
|
|
3529
|
+
message: 'Password has been reset successfully',
|
|
3530
|
+
});
|
|
3531
|
+
// back to login step
|
|
3532
|
+
const foundPasswordIndex = steps.findIndex((step) => step.type === SSOStepTypeType.PASSWORD);
|
|
3533
|
+
if (foundPasswordIndex === -1) {
|
|
3534
|
+
// reset to first step
|
|
3535
|
+
setSteps((s) => [s[0]]);
|
|
3536
|
+
useSSOSteps.setState({ currentStepIndex: 0 });
|
|
3537
|
+
}
|
|
3538
|
+
else {
|
|
3539
|
+
setSteps((s) => s.slice(0, foundPasswordIndex + 1));
|
|
3540
|
+
useSSOSteps.setState({ currentStepIndex: foundPasswordIndex });
|
|
3541
|
+
}
|
|
3234
3542
|
}
|
|
3235
3543
|
// onClose?.()
|
|
3236
3544
|
}
|
|
@@ -3258,7 +3566,9 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3258
3566
|
action: trackingAction,
|
|
3259
3567
|
} }),
|
|
3260
3568
|
errMsg && (React__default.createElement(Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
|
|
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":
|
|
3569
|
+
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": (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'signup' ? 'Create New Account' : 'Save' }, (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'signup'
|
|
3570
|
+
? t('ssov2.setup.button.createAccount')
|
|
3571
|
+
: t('ssov2.button.save')))));
|
|
3262
3572
|
};
|
|
3263
3573
|
|
|
3264
3574
|
const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
@@ -3268,7 +3578,7 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3268
3578
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
3269
3579
|
const { locale, setTracking } = useSSOState();
|
|
3270
3580
|
const { afterAction, provider } = config || {};
|
|
3271
|
-
const trackingCategory = `SSO -
|
|
3581
|
+
const trackingCategory = `SSO - Update Phone`;
|
|
3272
3582
|
const trackingAction = 'Verify Phone Number';
|
|
3273
3583
|
useEffect(() => {
|
|
3274
3584
|
if (!hidden) {
|
|
@@ -3279,6 +3589,7 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3279
3589
|
});
|
|
3280
3590
|
}
|
|
3281
3591
|
}, [hidden]);
|
|
3592
|
+
const { source } = useSSOV2Store();
|
|
3282
3593
|
const { addStep, goNext } = useSSOSteps();
|
|
3283
3594
|
const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3284
3595
|
setLoading(true);
|
|
@@ -3378,7 +3689,8 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3378
3689
|
setErrMsg('');
|
|
3379
3690
|
}, isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone" })),
|
|
3380
3691
|
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')),
|
|
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'))
|
|
3692
|
+
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')),
|
|
3693
|
+
source !== 'care_onboarding' && source !== 'ecom' && React__default.createElement(SetupLater, null)))));
|
|
3382
3694
|
};
|
|
3383
3695
|
|
|
3384
3696
|
const FemaleIcon = () => (React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -3410,39 +3722,19 @@ const MaleIcon = () => (React__default.createElement("svg", { width: "20", heigh
|
|
|
3410
3722
|
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" }),
|
|
3411
3723
|
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" })));
|
|
3412
3724
|
|
|
3725
|
+
// import { StyledPhone } from '../components/phone'
|
|
3413
3726
|
// always has name, gender dob
|
|
3414
|
-
const OtherSetup = ({ form,
|
|
3727
|
+
const OtherSetup = ({ form,
|
|
3728
|
+
// needPhone,
|
|
3729
|
+
// skipPhone,
|
|
3730
|
+
needEmail, isEmailDisable,
|
|
3731
|
+
// isPhoneDisabled,
|
|
3732
|
+
loading, tracking, }) => {
|
|
3415
3733
|
const { t } = useTranslations();
|
|
3416
|
-
const { locale = 'vi-VN' } = useSSOState()
|
|
3734
|
+
// const { locale = 'vi-VN' } = useSSOState()
|
|
3417
3735
|
const { setupSource } = useSSOV2Store();
|
|
3418
3736
|
const [dobChanged, setDobChanged] = React__default.useState(false);
|
|
3419
3737
|
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')))),
|
|
3446
3738
|
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'))),
|
|
3447
3739
|
React__default.createElement(Input.Wrapper, Object.assign({ label: t('ssov2.setup.field.gender.label'), withAsterisk: true }, form.getInputProps('gender')),
|
|
3448
3740
|
React__default.createElement(Group, null,
|
|
@@ -3457,7 +3749,7 @@ const OtherSetup = ({ form, needPhone, skipPhone, needEmail, isEmailDisable, isP
|
|
|
3457
3749
|
? 'secondary'
|
|
3458
3750
|
: 'tertiary', onClick: () => {
|
|
3459
3751
|
form.setFieldValue('gender', 'female');
|
|
3460
|
-
}, leftIcon: React__default.createElement(FemaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender
|
|
3752
|
+
}, leftIcon: React__default.createElement(FemaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender" }, t('ssov2.setup.field.gender.female')),
|
|
3461
3753
|
React__default.createElement(Button, { type: "button", styles: {
|
|
3462
3754
|
root: {
|
|
3463
3755
|
flex: 1,
|
|
@@ -3469,7 +3761,7 @@ const OtherSetup = ({ form, needPhone, skipPhone, needEmail, isEmailDisable, isP
|
|
|
3469
3761
|
? 'secondary'
|
|
3470
3762
|
: 'tertiary', onClick: () => {
|
|
3471
3763
|
form.setFieldValue('gender', 'male');
|
|
3472
|
-
}, leftIcon: React__default.createElement(MaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender
|
|
3764
|
+
}, leftIcon: React__default.createElement(MaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender" }, t('ssov2.setup.field.gender.male')))),
|
|
3473
3765
|
React__default.createElement(DatePicker, Object.assign({ name: "dob", label: t('ssov2.setup.field.dob.label'), withAsterisk: true, required: true, placeholder: t('ssov2.setup.field.dob.placeholder'), maxDate: new Date(new Date().getFullYear() - 18, new Date().getMonth(), new Date().getDate()), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Birthday" }, form.getInputProps('dob'), { onChange: (e) => {
|
|
3474
3766
|
form.getInputProps('dob').onChange(e);
|
|
3475
3767
|
setDobChanged(true);
|
|
@@ -3477,9 +3769,13 @@ const OtherSetup = ({ form, needPhone, skipPhone, needEmail, isEmailDisable, isP
|
|
|
3477
3769
|
if (!form.getInputProps('dob').value && !dobChanged)
|
|
3478
3770
|
return;
|
|
3479
3771
|
form.getInputProps('dob').onBlur(e);
|
|
3480
|
-
} }))
|
|
3772
|
+
} })),
|
|
3773
|
+
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: {
|
|
3774
|
+
display: isEmailDisable ? 'none' : 'block',
|
|
3775
|
+
} }, form.getInputProps('email'))))));
|
|
3481
3776
|
};
|
|
3482
3777
|
|
|
3778
|
+
// import { SSOPasswordWithConfirm } from '../passwordForgotSetup/passwordWithConfirm'
|
|
3483
3779
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3484
3780
|
const getDefaultData = (data) => {
|
|
3485
3781
|
try {
|
|
@@ -3505,7 +3801,6 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3505
3801
|
var _a, _b, _c;
|
|
3506
3802
|
const { onClose, setTracking } = useSSOState();
|
|
3507
3803
|
const { t } = useTranslations();
|
|
3508
|
-
const { goNext, addStep } = useSSOSteps();
|
|
3509
3804
|
const { setupSource, flowData } = useSSOV2Store();
|
|
3510
3805
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
3511
3806
|
const userInfo = config === null || config === void 0 ? void 0 : config.userInfo;
|
|
@@ -3515,13 +3810,6 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3515
3810
|
const provider = (_a = config === null || config === void 0 ? void 0 : config.userInfo) === null || _a === void 0 ? void 0 : _a.provider;
|
|
3516
3811
|
const authFlow = flowData === null || flowData === void 0 ? void 0 : flowData.flow;
|
|
3517
3812
|
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);
|
|
3525
3813
|
const skipPhone = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone) && !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone_verified_at);
|
|
3526
3814
|
const isPhoneDisabled = !!(configPhone || (defaultData === null || defaultData === void 0 ? void 0 : defaultData.phone) || skipPhone);
|
|
3527
3815
|
const needPhone = authFlow === 'signup' &&
|
|
@@ -3541,8 +3829,6 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3541
3829
|
!(flowData === null || flowData === void 0 ? void 0 : flowData.isVerifyPhone) ||
|
|
3542
3830
|
authMethod === 'facebook' ||
|
|
3543
3831
|
provider === 'facebook';
|
|
3544
|
-
// const needPhone = !userInfo?.phone_verified_at
|
|
3545
|
-
// const needEmail = authFlow !== 'verify-phone'
|
|
3546
3832
|
const isEmailDisable = (defaultEmail &&
|
|
3547
3833
|
(authMethod === 'google' ||
|
|
3548
3834
|
authMethod === 'email' ||
|
|
@@ -3550,7 +3836,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3550
3836
|
provider === 'email')) ||
|
|
3551
3837
|
(!!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email_verified_at));
|
|
3552
3838
|
const trackingCategory = `SSO - ${authFlow === 'signup' ? 'Sign Up' : 'Existing Users'} via ${authMethod || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.provider)}`;
|
|
3553
|
-
const trackingAction = '
|
|
3839
|
+
const trackingAction = 'Add Information';
|
|
3554
3840
|
useEffect(() => {
|
|
3555
3841
|
if (!hidden) {
|
|
3556
3842
|
setErrMsg('');
|
|
@@ -3579,30 +3865,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3579
3865
|
? dayjs(defaultData.birthday, 'MM/DD/YYYY').toDate()
|
|
3580
3866
|
: undefined }),
|
|
3581
3867
|
validateInputOnBlur: true,
|
|
3582
|
-
validate: yupResolver(yup.object().shape(Object.assign(Object.assign(
|
|
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
|
|
3868
|
+
validate: yupResolver(yup.object().shape(Object.assign(Object.assign({}, (needEmail
|
|
3606
3869
|
? {
|
|
3607
3870
|
email: setupSource === 'care'
|
|
3608
3871
|
? yup
|
|
@@ -3619,15 +3882,13 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3619
3882
|
const onSubmit = (values) => __awaiter(void 0, void 0, void 0, function* () {
|
|
3620
3883
|
setLoading(true);
|
|
3621
3884
|
try {
|
|
3622
|
-
const {
|
|
3885
|
+
const { phone, gender, name, dob } = values;
|
|
3623
3886
|
const { phoneNumber, areaCode } = splitPhone(phone || configPhone || '');
|
|
3624
3887
|
// validate only, delay set data to after otp
|
|
3625
3888
|
const res = yield updateUserInfo({
|
|
3626
3889
|
name,
|
|
3627
3890
|
birthday: dayjs(dob).format('YYYY-MM-DD'),
|
|
3628
3891
|
email: values.email || undefined,
|
|
3629
|
-
password,
|
|
3630
|
-
confirm_password: confirmPassword,
|
|
3631
3892
|
phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
|
|
3632
3893
|
area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '84',
|
|
3633
3894
|
gender: gender === 'male' ? 1 : 0,
|
|
@@ -3635,80 +3896,23 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3635
3896
|
validate: 'true',
|
|
3636
3897
|
});
|
|
3637
3898
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
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
|
+
const res = yield updateUserInfo({
|
|
3900
|
+
name,
|
|
3901
|
+
birthday: dayjs(dob).format('YYYY-MM-DD'),
|
|
3902
|
+
email: values.email || undefined,
|
|
3903
|
+
phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
|
|
3904
|
+
area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code),
|
|
3905
|
+
gender: gender === 'male' ? 1 : 0,
|
|
3906
|
+
source: setupSource,
|
|
3907
|
+
validate: '',
|
|
3908
|
+
});
|
|
3909
|
+
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3910
|
+
handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
3911
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3689
3912
|
}
|
|
3690
3913
|
else {
|
|
3691
|
-
|
|
3692
|
-
|
|
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
|
-
}
|
|
3914
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3915
|
+
return setLoading(false);
|
|
3712
3916
|
}
|
|
3713
3917
|
}
|
|
3714
3918
|
else {
|
|
@@ -3729,24 +3933,13 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3729
3933
|
React__default.createElement(Stack, { spacing: 8 },
|
|
3730
3934
|
React__default.createElement(Text, { size: "s1", weight: "semiBold" }, t('ssov2.setup.title')),
|
|
3731
3935
|
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
|
-
} })),
|
|
3736
3936
|
React__default.createElement(OtherSetup, { needPhone: needPhone, skipPhone: skipPhone, needEmail: needEmail, isEmailDisable: isEmailDisable, isPhoneDisabled: isPhoneDisabled, form: form, loading: loading, tracking: {
|
|
3737
3937
|
category: trackingCategory,
|
|
3738
3938
|
action: trackingAction,
|
|
3739
3939
|
} }),
|
|
3740
3940
|
errMsg && (React__default.createElement(Text, { color: "red.6", size: "p4" }, errMsg)),
|
|
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":
|
|
3742
|
-
|
|
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')))));
|
|
3941
|
+
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": "Save" }, t('ssov2.button.save')),
|
|
3942
|
+
React__default.createElement(SetupLater, { style: { marginTop: -8 } }))));
|
|
3750
3943
|
};
|
|
3751
3944
|
|
|
3752
3945
|
// import {
|
|
@@ -3855,6 +4048,20 @@ const SSOScreenRenderer = () => {
|
|
|
3855
4048
|
})));
|
|
3856
4049
|
};
|
|
3857
4050
|
|
|
4051
|
+
if (!Array.prototype.findLastIndex) {
|
|
4052
|
+
Array.prototype.findLastIndex = function (callback, thisArg) {
|
|
4053
|
+
for (let i = this.length - 1; i >= 0; i--) {
|
|
4054
|
+
if (callback.call(thisArg, this[i], i, this))
|
|
4055
|
+
return i;
|
|
4056
|
+
}
|
|
4057
|
+
return -1;
|
|
4058
|
+
};
|
|
4059
|
+
}
|
|
4060
|
+
if (!String.prototype.capitalize) {
|
|
4061
|
+
String.prototype.capitalize = function () {
|
|
4062
|
+
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
4063
|
+
};
|
|
4064
|
+
}
|
|
3858
4065
|
const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
3859
4066
|
const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, forceReloadOnClose, } = useSSOV2Store();
|
|
3860
4067
|
useEffect(() => {
|