@hhgtech/hhg-components 1.29.310 → 1.29.311-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/build/{LastPeriod-bf102301.js → LastPeriod-6aa75bd3.js} +1 -1
- package/build/{MobileBottomNavigationIcon-ad8bada5.js → MobileBottomNavigationIcon-35bc2dbc.js} +3 -3
- package/build/{Spinner-874e7661.js → Spinner-3edd5234.js} +1 -1
- package/build/{WhatsApp-34f43ae0.js → WhatsApp-e02be0fb.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-09fe0cff.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-f1165d8d.js} +1 -1
- package/build/{dataTransform-e2039e2c.js → dataTransform-2421197c.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-b96a5104.js → editor-8fc16a4e.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-1bf53a56.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-dc6eab1c.js → MobileBottomNavigationIcon-67de62af.js} +3 -3
- package/build/esm/{Spinner-c76eea1e.js → Spinner-c8f098c6.js} +1 -1
- package/build/esm/{WhatsApp-46c87a68.js → WhatsApp-c5b9d80d.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-e0416208.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-f99efa1a.js} +1 -1
- package/build/esm/{dataTransform-490d14d4.js → dataTransform-27bfbb46.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-7493c15a.js → editor-2a519968.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-93240933.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-87a336ce.js → index-011c2b61.js} +6 -6
- package/build/esm/{index-03d9fccc.js → index-0123b03e.js} +3 -3
- package/build/esm/{index-1eb5a216.js → index-0263bad1.js} +6 -6
- package/build/esm/{index-8f6534fd.js → index-06288869.js} +1 -1
- package/build/esm/{index-5445b285.js → index-0fa95483.js} +2 -2
- package/build/esm/{index-4dd28938.js → index-12d59f14.js} +3 -3
- package/build/esm/{index-116e1d31.js → index-20f87432.js} +16 -16
- package/build/esm/{index-9720736f.js → index-21e5ae93.js} +3 -3
- package/build/esm/{index-28dc6ec9.js → index-28b7498c.js} +2 -2
- package/build/esm/{index-385a5498.js → index-29eae795.js} +1 -1
- package/build/esm/{index-ca2d4ebe.js → index-2a18d37d.js} +13 -13
- package/build/esm/{index-462ab3ff.js → index-2ae7fa04.js} +1 -1
- package/build/esm/{index-c2cc5925.js → index-31b91912.js} +17 -17
- package/build/esm/{index-0d9f23d4.js → index-32345420.js} +7 -7
- package/build/esm/{index-bdc3ceee.js → index-34e6b722.js} +2 -2
- package/build/esm/{index-0d4448bd.js → index-354c78be.js} +3 -3
- package/build/esm/{index-ddc92a3f.js → index-3974d41d.js} +3 -3
- package/build/esm/{index-dbcbef2e.js → index-3f97c3e0.js} +13 -13
- package/build/esm/{index-884ab933.js → index-4162f5c7.js} +4 -4
- package/build/esm/{index-3e3f60cc.js → index-41c1d529.js} +16 -16
- package/build/esm/{index-eca4cedb.js → index-42dae2d5.js} +26 -26
- package/build/esm/{index-fde13df0.js → index-4be1c602.js} +21 -21
- package/build/esm/{index-7a216561.js → index-4c05882f.js} +13 -13
- package/build/esm/{index-2fdf9522.js → index-4d05056e.js} +10 -10
- package/build/esm/{index-009d858e.js → index-4d67242f.js} +2 -2
- package/build/esm/{index-ceea1f7c.js → index-4e37fd5a.js} +24 -24
- package/build/esm/{index-ac3f517e.js → index-516da591.js} +2 -2
- package/build/esm/{index-0281f5a6.js → index-55469525.js} +6 -6
- package/build/esm/{index-cf86cc99.js → index-5577065b.js} +5 -5
- package/build/esm/{index-c5be74bb.js → index-5aa83eb8.js} +18 -18
- package/build/esm/{index-b988d9ff.js → index-5abf7a73.js} +6 -6
- package/build/esm/{index-ef635844.js → index-63545479.js} +3 -3
- package/build/esm/{index-33a44547.js → index-6aae9c6b.js} +30 -30
- package/build/esm/{index-797cd5bf.js → index-6e94861a.js} +17 -17
- package/build/esm/{index-86bb01db.js → index-72bdca04.js} +2 -2
- package/build/esm/{index-ed22a2e5.js → index-769f43e2.js} +11 -11
- package/build/esm/{index-64b3fca2.js → index-7c4beac1.js} +13 -13
- package/build/esm/{index-50ab695a.js → index-88addba1.js} +15 -15
- package/build/esm/{index-8191c1c6.js → index-8a3a9007.js} +2 -2
- package/build/esm/{index-d6b0f5c3.js → index-8e3e708a.js} +1 -1
- package/build/esm/{index-f1501e7e.js → index-9165a7a1.js} +15 -15
- package/build/esm/{index-3084194d.js → index-91ecb0e4.js} +2 -2
- package/build/esm/{index-a6272b56.js → index-9b099661.js} +2 -2
- package/build/esm/{index-f4896192.js → index-a3b0f1b2.js} +7 -7
- package/build/esm/{index-aedceeb0.js → index-a5d3d154.js} +32 -32
- package/build/esm/{index-3823402c.js → index-ad45976b.js} +2 -2
- package/build/esm/{index-fefe4cc8.js → index-ade23bd1.js} +16 -16
- package/build/esm/{index-48fc51fc.js → index-b85d1ef5.js} +2 -2
- package/build/esm/{index-6f743917.js → index-bc28b2f5.js} +5 -5
- package/build/esm/{index-ba1d177d.js → index-bf9e2bef.js} +1 -1
- package/build/esm/{index-24133f56.js → index-c4bf5bc1.js} +1 -1
- package/build/esm/{index-d204fb64.js → index-c4f5a4ac.js} +1 -1
- package/build/esm/{index-b7b7b745.js → index-c7e59de7.js} +3 -3
- package/build/esm/{index-af372347.js → index-cdbd0867.js} +18 -18
- package/build/esm/{index-cdca49e2.js → index-cf69fdb6.js} +1 -1
- package/build/esm/{index-c828cd85.js → index-d5079a81.js} +1 -1
- package/build/esm/{index-e2a2571f.js → index-e617c45e.js} +18 -18
- package/build/esm/{index-8104f1e3.js → index-f6164cc1.js} +17 -17
- package/build/esm/{index-e0996b33.js → index-fe6180a4.js} +20 -20
- package/build/esm/{index-e0b4e093.js → index-ffebc2ed.js} +2 -2
- package/build/esm/index.js +112 -112
- package/build/esm/{labelSorting-71d29d3d.js → labelSorting-78f528cd.js} +4 -4
- package/build/esm/lead.js +24 -24
- package/build/esm/{logoIcon-37333208.js → logoIcon-173cd1ae.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-63500f36.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 +474 -267
- package/build/esm/{store-c7b445f5.js → store-487a7b12.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-f9115601.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-4195000d.js} +19 -19
- package/build/esm/{types-416bf730.js → types-abff4a35.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-16021e28.js → useCategory-5c19fe97.js} +5 -5
- package/build/esm/{useHealthToolCache-3854d5ed.js → useHealthToolCache-2366d683.js} +1 -1
- package/build/esm/{useMantineLocale-07ea4cf6.js → useMantineLocale-d8cddb30.js} +6 -6
- package/build/esm/{usePlacesAutocomplete-4996a3c9.js → usePlacesAutocomplete-4ccbb3f6.js} +1 -1
- package/build/esm/{useScreenSize-02adc177.js → useScreenSize-e4d03c6d.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-8e7408f2.js → utils-4245844b.js} +3 -3
- package/build/esm/{utils-2f47732f.js → utils-43ca4117.js} +2 -2
- package/build/esm/{utils-483662f7.js → utils-f726d1d7.js} +2 -2
- package/build/esm/vaccination.js +21 -21
- package/build/{fixedBottomAdBlock-6b461854.js → fixedBottomAdBlock-678b5855.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-de85ffcc.js → index-0c955ff2.js} +16 -16
- package/build/{index-a4b8bb7e.js → index-18d5eaef.js} +30 -30
- package/build/{index-0c66ee32.js → index-1a1b73a9.js} +3 -3
- package/build/{index-c371b9cb.js → index-1a319b87.js} +1 -1
- package/build/{index-ffa7a87f.js → index-20c597a1.js} +1 -1
- package/build/{index-072bee2e.js → index-25165fdd.js} +2 -2
- package/build/{index-3a611dae.js → index-27c5864b.js} +1 -1
- package/build/{index-d341569b.js → index-2eb072ac.js} +3 -3
- package/build/{index-440e211b.js → index-336f66b6.js} +6 -6
- package/build/{index-6395212c.js → index-3410f69b.js} +20 -20
- package/build/{index-fc91b56e.js → index-35e6b371.js} +17 -17
- package/build/{index-1bbe12bd.js → index-36f2b38e.js} +16 -16
- package/build/{index-8791c1c2.js → index-43e8d97c.js} +10 -10
- package/build/{index-0853b3cd.js → index-488e84ed.js} +21 -21
- package/build/{index-2123a072.js → index-52e72f30.js} +32 -32
- package/build/{index-2dd41ae9.js → index-5389dac4.js} +1 -1
- package/build/{index-a525c4cd.js → index-55598b87.js} +13 -13
- package/build/{index-d1343759.js → index-58917eb3.js} +3 -3
- package/build/{index-a5772208.js → index-592ff95a.js} +7 -7
- package/build/{index-5fc2cd51.js → index-5f56e01d.js} +2 -2
- package/build/{index-e686ca2a.js → index-62943ea5.js} +1 -1
- package/build/{index-d87b818e.js → index-6696ad89.js} +11 -11
- package/build/{index-b8961d1b.js → index-67bbdbb1.js} +2 -2
- package/build/{index-0bd3e14a.js → index-69047269.js} +13 -13
- package/build/{index-ef9025b3.js → index-6cf8b249.js} +5 -5
- package/build/{index-d7792b63.js → index-7135f18d.js} +18 -18
- package/build/{index-27aafa10.js → index-738bdffb.js} +1 -1
- package/build/{index-e7a03912.js → index-756fea6b.js} +16 -16
- package/build/{index-0450113e.js → index-8409422a.js} +13 -13
- package/build/{index-eeb534d4.js → index-887c1c29.js} +15 -15
- package/build/{index-19186e71.js → index-8de516bd.js} +3 -3
- package/build/{index-a06fe154.js → index-91346989.js} +26 -26
- package/build/{index-b54767aa.js → index-91e216ab.js} +2 -2
- package/build/{index-9f8fa338.js → index-9320f90c.js} +2 -2
- package/build/{index-1f1f8ee2.js → index-93370511.js} +17 -17
- package/build/{index-62a5386c.js → index-9968dbee.js} +6 -6
- package/build/{index-3392cffa.js → index-b0170fde.js} +24 -24
- package/build/{index-6f8821b3.js → index-b0e0926c.js} +3 -3
- package/build/{index-5eb26cff.js → index-b2fe78be.js} +1 -1
- package/build/{index-ebae6258.js → index-b3d85b3d.js} +18 -18
- package/build/{index-1ad5fb8c.js → index-b650afab.js} +2 -2
- package/build/{index-52213846.js → index-b71d5002.js} +2 -2
- package/build/{index-e819c506.js → index-c5393ae2.js} +7 -7
- package/build/{index-51dfe588.js → index-c8193e90.js} +3 -3
- package/build/{index-a09d9e3a.js → index-c8fb429a.js} +2 -2
- package/build/{index-ce0b4d62.js → index-c957b095.js} +1 -1
- package/build/{index-de8619b3.js → index-c96b819e.js} +2 -2
- package/build/{index-89a13973.js → index-cfcd6a21.js} +6 -6
- package/build/{index-3da24603.js → index-d261b04c.js} +18 -18
- package/build/{index-f50575bf.js → index-d44c15d7.js} +2 -2
- package/build/{index-b3c64944.js → index-d899cf05.js} +1 -1
- package/build/{index-cf8f7e2b.js → index-dccd5c99.js} +3 -3
- package/build/{index-98e525ee.js → index-e3e4c118.js} +4 -4
- package/build/{index-2f000aea.js → index-e478d654.js} +5 -5
- package/build/{index-5f0a74c3.js → index-e74ef826.js} +15 -15
- package/build/{index-0bae09f3.js → index-f7c9b9cd.js} +13 -13
- package/build/{index-6fc42bd7.js → index-fc10b479.js} +6 -6
- package/build/{index-6fba8121.js → index-fcb5bd92.js} +2 -2
- package/build/{index-dbba4167.js → index-fcdd2edb.js} +2 -2
- package/build/{index-95c6b09e.js → index-fda559fa.js} +17 -17
- package/build/index.js +112 -112
- package/build/{labelSorting-ee9dbfed.js → labelSorting-8f6dc43f.js} +4 -4
- package/build/lead.js +24 -24
- package/build/{logoIcon-bdd83bfe.js → logoIcon-e54bd797.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-74688ad2.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 +471 -264
- package/build/{store-b6e93a3e.js → store-6e91182d.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-57e6c1e1.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-f204d844.js} +19 -19
- package/build/{types-2f4d9816.js → types-5060522d.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-1a397510.js → useCategory-f4ca2b73.js} +5 -5
- package/build/{useHealthToolCache-9c18bdec.js → useHealthToolCache-5219ce44.js} +1 -1
- package/build/{useMantineLocale-e6ec128f.js → useMantineLocale-8c2720be.js} +6 -6
- package/build/{usePlacesAutocomplete-f3777df5.js → usePlacesAutocomplete-d2020c21.js} +1 -1
- package/build/{useScreenSize-6405c8d7.js → useScreenSize-bba57188.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-649a6c1a.js → utils-1cee05ac.js} +2 -2
- package/build/{utils-9d21393e.js → utils-4abda4aa.js} +3 -3
- package/build/{utils-a6a14827.js → utils-9bd88d5a.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-720dd1d0.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-1a794178.js → BMI_BOYS.percentile.weekly-b4f8e6a0.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-58472c0f.js → BMI_BOYS.percentile.yearly-4d79a836.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-ae3ff525.js → BMI_BOYS.zscore.monthly-2939cfda.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-8a3e7cb1.js → BMI_BOYS.zscore.weekly-ab279fdf.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-56e256cf.js → BMI_BOYS.zscore.yearly-92b2e399.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-fb51b8cc.js → BMI_GIRLS.percentile.monthly-44f6636b.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-c02c4d4d.js → BMI_GIRLS.percentile.weekly-a6c50cf6.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-94e03770.js → BMI_GIRLS.percentile.yearly-d8f02609.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-fb669b62.js → BMI_GIRLS.zscore.monthly-0490c190.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-6339f708.js → BMI_GIRLS.zscore.weekly-8f1328b4.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-0bfa399d.js → BMI_GIRLS.zscore.yearly-f6ef5777.js} +0 -0
- /package/build/{ChevronDown-aa4e9915.js → ChevronDown-ee5a75a8.js} +0 -0
- /package/build/{Close-49af07f7.js → Close-7a821cb6.js} +0 -0
- /package/build/{Google-d68f1d9f.js → Google-8931d3a8.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-a76666f9.js → HEAD CIRCUM_BOYS.percentile.monthly-603b7d6a.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-cfc42b2a.js → HEAD CIRCUM_BOYS.percentile.weekly-99208b89.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-4ea3be2f.js → HEAD CIRCUM_BOYS.percentile.yearly-2949de66.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-3b0c0c14.js → HEAD CIRCUM_BOYS.zscore.monthly-416db3fc.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-ac84eaa7.js → HEAD CIRCUM_BOYS.zscore.weekly-de1fd6a8.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-b42c2f92.js → HEAD CIRCUM_BOYS.zscore.yearly-867ecbe5.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-a2b52042.js → HEAD CIRCUM_GIRLS.percentile.monthly-3dd9f719.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-62fa3e5d.js → HEAD CIRCUM_GIRLS.percentile.weekly-81b52d56.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-c6b1e11d.js → HEAD CIRCUM_GIRLS.percentile.yearly-d1feeef9.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-a2b2377d.js → HEAD CIRCUM_GIRLS.zscore.monthly-42b732c1.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-b12734cb.js → HEAD CIRCUM_GIRLS.zscore.weekly-658d9c0d.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-017edf0b.js → HEAD CIRCUM_GIRLS.zscore.yearly-6e37e478.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-f1741fba.js → HEIGHT_BOYS.percentile.monthly-ae15d956.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-c4c2a3b6.js → HEIGHT_BOYS.percentile.weekly-9399af4c.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-70ea45f9.js → HEIGHT_BOYS.percentile.yearly-d32848d9.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-023189c7.js → HEIGHT_BOYS.zscore.monthly-25f33c91.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-1a445d6a.js → HEIGHT_BOYS.zscore.weekly-d91b0d4a.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-3f2155c4.js → HEIGHT_BOYS.zscore.yearly-0b861214.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-bc55a691.js → HEIGHT_GIRLS.percentile.monthly-e60f6f20.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-6c639055.js → HEIGHT_GIRLS.percentile.weekly-7301b9f8.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-77ddcabc.js → HEIGHT_GIRLS.percentile.yearly-8ac57abd.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-d3ac795a.js → HEIGHT_GIRLS.zscore.monthly-18b61010.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-b59e0ca6.js → HEIGHT_GIRLS.zscore.weekly-36e351eb.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-c33ea8b9.js → HEIGHT_GIRLS.zscore.yearly-74e4575a.js} +0 -0
- /package/build/{Locale-bd14c9e1.js → Locale-49f73d3d.js} +0 -0
- /package/build/{Visible-480ace09.js → Visible-c455e0a6.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-8edee43b.js → WEIGHT_BOYS.percentile.monthly-c775bdeb.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-34358ecf.js → WEIGHT_BOYS.percentile.weekly-fea9e600.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-b65cf0ef.js → WEIGHT_BOYS.percentile.yearly-ad142f6b.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-414cdc73.js → WEIGHT_BOYS.zscore.monthly-93eea704.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-c2b08349.js → WEIGHT_BOYS.zscore.weekly-02a6963f.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-56dd794c.js → WEIGHT_BOYS.zscore.yearly-421c922b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-4d0b3483.js → WEIGHT_GIRLS.percentile.monthly-5be4b9d9.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-08a53800.js → WEIGHT_GIRLS.percentile.weekly-906192f0.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-902227bf.js → WEIGHT_GIRLS.percentile.yearly-f59b21fc.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-84e95bfc.js → WEIGHT_GIRLS.zscore.monthly-f0bc115c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-13cb4adc.js → WEIGHT_GIRLS.zscore.weekly-48871a07.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-19a757a6.js → WEIGHT_GIRLS.zscore.yearly-561c83a1.js} +0 -0
- /package/build/{animation-19e6a7bb.js → animation-d677aefd.js} +0 -0
- /package/build/{constants-abf9a9ae.js → constants-0d5c1a0c.js} +0 -0
- /package/build/{constants-754a2443.js → constants-48da0702.js} +0 -0
- /package/build/{constants-050599c6.js → constants-d3ac020b.js} +0 -0
- /package/build/{dataTransform-64023d00.js → dataTransform-252ba81c.js} +0 -0
- /package/build/{doctor-26b75011.js → doctor-0e550854.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-8af9f7ed.js → BMI_BOYS.percentile.monthly-4904aff0.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-f6d7cf47.js → BMI_BOYS.percentile.weekly-b7eee7a5.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-109b0941.js → BMI_BOYS.percentile.yearly-a06da176.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-bf42d27a.js → BMI_BOYS.zscore.monthly-5a67daa9.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-c7c9ee32.js → BMI_BOYS.zscore.weekly-3220edd8.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-1c44a03d.js → BMI_BOYS.zscore.yearly-d2414f67.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-571f181d.js → BMI_GIRLS.percentile.monthly-2f8a1fd5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-12487d31.js → BMI_GIRLS.percentile.weekly-a2697025.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-4e831390.js → BMI_GIRLS.percentile.yearly-0d29fd19.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-188c8853.js → BMI_GIRLS.zscore.monthly-cdb93c40.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-f1c81e86.js → BMI_GIRLS.zscore.weekly-cc732e5c.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-08fc6437.js → BMI_GIRLS.zscore.yearly-c10f4da4.js} +0 -0
- /package/build/esm/{ChevronDown-99cd0a81.js → ChevronDown-55b2b21a.js} +0 -0
- /package/build/esm/{Close-36c0e89a.js → Close-1a966a3e.js} +0 -0
- /package/build/esm/{Google-92682157.js → Google-5d9ab9f1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-98838ee5.js → HEAD CIRCUM_BOYS.percentile.monthly-65ebdfc6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-10fc6540.js → HEAD CIRCUM_BOYS.percentile.weekly-58ef5c13.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-64bde947.js → HEAD CIRCUM_BOYS.percentile.yearly-8682ae08.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-9865bf8d.js → HEAD CIRCUM_BOYS.zscore.monthly-1220e1a2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-88ad0c06.js → HEAD CIRCUM_BOYS.zscore.weekly-425a6761.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-af8b1b6a.js → HEAD CIRCUM_BOYS.zscore.yearly-f1b0f8f7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-4928c051.js → HEAD CIRCUM_GIRLS.percentile.monthly-6f895d9c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-41d8019e.js → HEAD CIRCUM_GIRLS.percentile.weekly-96189d33.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-cc28a1a9.js → HEAD CIRCUM_GIRLS.percentile.yearly-79284d86.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-913ed954.js → HEAD CIRCUM_GIRLS.zscore.monthly-a1d67af8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-995e7da7.js → HEAD CIRCUM_GIRLS.zscore.weekly-7e13ab18.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-b299a7d5.js → HEAD CIRCUM_GIRLS.zscore.yearly-4a0fb595.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-2befd4ce.js → HEIGHT_BOYS.percentile.monthly-0d3e762d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-e5518601.js → HEIGHT_BOYS.percentile.weekly-fc856fce.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-980cf112.js → HEIGHT_BOYS.percentile.yearly-f3f48098.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-252d6084.js → HEIGHT_BOYS.zscore.monthly-37b6b368.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-cfc76a39.js → HEIGHT_BOYS.zscore.weekly-3bac1abf.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-1cf35654.js → HEIGHT_BOYS.zscore.yearly-51f1063e.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-37195c10.js → HEIGHT_GIRLS.percentile.monthly-5270ae51.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-221ac9cc.js → HEIGHT_GIRLS.percentile.weekly-28f81f2a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-4fd39f59.js → HEIGHT_GIRLS.percentile.yearly-5c445f80.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-b7e1d64c.js → HEIGHT_GIRLS.zscore.monthly-ff1b7664.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-9c5ffc45.js → HEIGHT_GIRLS.zscore.weekly-7c1d7356.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-92950ba4.js → HEIGHT_GIRLS.zscore.yearly-670f27fd.js} +0 -0
- /package/build/esm/{Locale-88e3696b.js → Locale-88a21a52.js} +0 -0
- /package/build/esm/{Visible-1c50290d.js → Visible-c49095b4.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-823951df.js → WEIGHT_BOYS.percentile.monthly-7f351f1c.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-d5802949.js → WEIGHT_BOYS.percentile.weekly-a6c1b428.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-9285f181.js → WEIGHT_BOYS.percentile.yearly-139fcf9c.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-5da25e18.js → WEIGHT_BOYS.zscore.monthly-956569bf.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-bd3efec8.js → WEIGHT_BOYS.zscore.weekly-8ba61384.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-ffd7d195.js → WEIGHT_BOYS.zscore.yearly-1c423672.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-7179575e.js → WEIGHT_GIRLS.percentile.monthly-861d4a78.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-b48a91f5.js → WEIGHT_GIRLS.percentile.weekly-8764f54f.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-5df9dbf5.js → WEIGHT_GIRLS.percentile.yearly-452dc477.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-3b70fbe7.js → WEIGHT_GIRLS.zscore.monthly-cd25ef82.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-55ec3ef5.js → WEIGHT_GIRLS.zscore.weekly-04aea4d0.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-d8d16a65.js → WEIGHT_GIRLS.zscore.yearly-774eca88.js} +0 -0
- /package/build/esm/{animation-6ba43f05.js → animation-ca13e361.js} +0 -0
- /package/build/esm/{constants-ed2d1422.js → constants-0dbcd429.js} +0 -0
- /package/build/esm/{constants-381c5a9b.js → constants-7a8ee2ee.js} +0 -0
- /package/build/esm/{constants-7126088d.js → constants-ad79c668.js} +0 -0
- /package/build/esm/{dataTransform-fc3b3df7.js → dataTransform-4ca675cd.js} +0 -0
- /package/build/esm/{doctor-84b8dd59.js → doctor-58ec7f00.js} +0 -0
- /package/build/esm/{index-53ca8997.js → index-203c1c5f.js} +0 -0
- /package/build/esm/{index-b20e0116.js → index-7bcf5279.js} +0 -0
- /package/build/esm/{index-b43182e4.js → index-92ea2ce7.js} +0 -0
- /package/build/esm/{index-6b39a688.js → index-b352753f.js} +0 -0
- /package/build/esm/{index-5d1687e2.js → index-c86ee551.js} +0 -0
- /package/build/esm/{index-73a1467f.js → index-d046c7fc.js} +0 -0
- /package/build/esm/{index-80db9a3d.js → index-d5575a8d.js} +0 -0
- /package/build/esm/{index-23d8c6f8.js → index-d8214780.js} +0 -0
- /package/build/esm/{index-b4a9511d.js → index-f158fa4c.js} +0 -0
- /package/build/esm/{index.styles-c9075be7.js → index.styles-2cbd1eb7.js} +0 -0
- /package/build/esm/{localizeNumberFormat-47fddad3.js → localizeNumberFormat-b53cdc9b.js} +0 -0
- /package/build/esm/{normalizeLink-010ca347.js → normalizeLink-24d52aa5.js} +0 -0
- /package/build/esm/{other-33b4d4a0.js → other-09aeeb91.js} +0 -0
- /package/build/esm/{paths-c6f3783e.js → paths-fbc4da23.js} +0 -0
- /package/build/esm/{translationsContext-6eb1e527.js → translationsContext-a0106fcb.js} +0 -0
- /package/build/esm/{tslib.es6-c84e4384.js → tslib.es6-d88c3b89.js} +0 -0
- /package/build/esm/{types-6d15f25c.js → types-c1d7e3fe.js} +0 -0
- /package/build/esm/{useIsInit-ceda245d.js → useIsInit-208edd1f.js} +0 -0
- /package/build/esm/{useOutsideClick-bdd04199.js → useOutsideClick-90dae7c8.js} +0 -0
- /package/build/esm/{useScrollbarSize-8a202c25.js → useScrollbarSize-f846101d.js} +0 -0
- /package/build/esm/{useUniqueId-3ea1c9d5.js → useUniqueId-ab1d124a.js} +0 -0
- /package/build/esm/{utils-722bd86a.js → utils-a5594c06.js} +0 -0
- /package/build/{index-99392e86.js → index-20114de3.js} +0 -0
- /package/build/{index-0a468885.js → index-4ecb8f52.js} +0 -0
- /package/build/{index-7fd58e9f.js → index-7a37caad.js} +0 -0
- /package/build/{index-1806c98f.js → index-7b084899.js} +0 -0
- /package/build/{index-ea3147c3.js → index-8e818b2a.js} +0 -0
- /package/build/{index-9f67c820.js → index-acf3abe2.js} +0 -0
- /package/build/{index-1a26f8e1.js → index-bdc63c1a.js} +0 -0
- /package/build/{index-1a9f72cf.js → index-c7dfff8e.js} +0 -0
- /package/build/{index-cf561899.js → index-d9cfe3fe.js} +0 -0
- /package/build/{index.styles-18c4b28b.js → index.styles-393f1d67.js} +0 -0
- /package/build/{localizeNumberFormat-b46b98ec.js → localizeNumberFormat-0a286427.js} +0 -0
- /package/build/{normalizeLink-504885b8.js → normalizeLink-ca1bb1d9.js} +0 -0
- /package/build/{other-02cf041a.js → other-ab6201ba.js} +0 -0
- /package/build/{paths-cb9589ef.js → paths-6b54a7b2.js} +0 -0
- /package/build/{translationsContext-1004699f.js → translationsContext-07bca71f.js} +0 -0
- /package/build/{tslib.es6-c3f3259f.js → tslib.es6-22334994.js} +0 -0
- /package/build/{types-4469d844.js → types-00539d96.js} +0 -0
- /package/build/{useIsInit-90107648.js → useIsInit-df5f4b16.js} +0 -0
- /package/build/{useOutsideClick-c0691182.js → useOutsideClick-8ed87dbd.js} +0 -0
- /package/build/{useScrollbarSize-e3383cad.js → useScrollbarSize-a13c3d03.js} +0 -0
- /package/build/{useUniqueId-2418857a.js → useUniqueId-63428d01.js} +0 -0
- /package/build/{utils-fe54d063.js → utils-504829b2.js} +0 -0
package/build/ssoV2.js
CHANGED
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('./tslib.es6-
|
|
5
|
+
var tslib_es6 = require('./tslib.es6-22334994.js');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var index$5 = require('./index-
|
|
8
|
-
var store = require('./store-
|
|
7
|
+
var index$5 = require('./index-6696ad89.js');
|
|
8
|
+
var store = require('./store-6e91182d.js');
|
|
9
9
|
var arrow = require('@hhgtech/icons/arrow');
|
|
10
10
|
var core$1 = require('@hhgtech/icons/core');
|
|
11
|
-
var index$2 = require('./index-
|
|
12
|
-
var logoIcon = require('./logoIcon-
|
|
13
|
-
var index$4 = require('./index-
|
|
14
|
-
var index$1 = require('./index-
|
|
11
|
+
var index$2 = require('./index-c96b819e.js');
|
|
12
|
+
var logoIcon = require('./logoIcon-e54bd797.js');
|
|
13
|
+
var index$4 = require('./index-20c597a1.js');
|
|
14
|
+
var index$1 = require('./index-5f56e01d.js');
|
|
15
15
|
var core = require('@mantine/core');
|
|
16
16
|
require('@mantine/dates');
|
|
17
|
-
require('./index-
|
|
18
|
-
require('./index-
|
|
19
|
-
var useMantineLocale = require('./useMantineLocale-
|
|
20
|
-
var index$3 = require('./index-
|
|
21
|
-
var index = require('./index-
|
|
17
|
+
require('./index-62943ea5.js');
|
|
18
|
+
require('./index-8e818b2a.js');
|
|
19
|
+
var useMantineLocale = require('./useMantineLocale-8c2720be.js');
|
|
20
|
+
var index$3 = require('./index-fcdd2edb.js');
|
|
21
|
+
var index = require('./index-d899cf05.js');
|
|
22
22
|
require('@mantine/hooks');
|
|
23
|
-
require('./utils-
|
|
24
|
-
require('./other-
|
|
25
|
-
require('./index-
|
|
26
|
-
var Locale = require('./Locale-
|
|
27
|
-
var Google = require('./Google-
|
|
23
|
+
require('./utils-504829b2.js');
|
|
24
|
+
require('./other-ab6201ba.js');
|
|
25
|
+
require('./index-1a1b73a9.js');
|
|
26
|
+
var Locale = require('./Locale-49f73d3d.js');
|
|
27
|
+
var Google = require('./Google-8931d3a8.js');
|
|
28
28
|
var PhoneInputBase = require('react-phone-number-input');
|
|
29
29
|
var styled = require('@emotion/styled');
|
|
30
30
|
var cn = require('classnames');
|
|
@@ -32,28 +32,28 @@ var other = require('@hhgtech/icons/other');
|
|
|
32
32
|
var debounce = require('lodash/debounce');
|
|
33
33
|
var throttle = require('lodash/throttle');
|
|
34
34
|
var Flags = require('react-phone-number-input/flags');
|
|
35
|
-
var useScreenSize = require('./useScreenSize-
|
|
35
|
+
var useScreenSize = require('./useScreenSize-bba57188.js');
|
|
36
36
|
var vaul = require('vaul');
|
|
37
|
-
var utils = require('./utils-
|
|
38
|
-
var index$6 = require('./index-
|
|
37
|
+
var utils = require('./utils-9bd88d5a.js');
|
|
38
|
+
var index$6 = require('./index-b0e0926c.js');
|
|
39
39
|
var constantsDomainLocales = require('./constantsDomainLocales.js');
|
|
40
40
|
var form = require('@mantine/form');
|
|
41
41
|
var yup = require('yup');
|
|
42
42
|
var dayjs = require('dayjs');
|
|
43
|
-
var index$7 = require('./index-
|
|
43
|
+
var index$7 = require('./index-cfcd6a21.js');
|
|
44
44
|
require('@mantine/carousel');
|
|
45
45
|
require('./miscTheme.js');
|
|
46
|
-
require('./useUniqueId-
|
|
46
|
+
require('./useUniqueId-63428d01.js');
|
|
47
47
|
require('./constantsSite.js');
|
|
48
48
|
require('zustand');
|
|
49
49
|
require('./constantsIsProduction.js');
|
|
50
|
-
require('./normalizeLink-
|
|
50
|
+
require('./normalizeLink-ca1bb1d9.js');
|
|
51
51
|
require('./miscCookieHelper.js');
|
|
52
52
|
require('date-fns/locale');
|
|
53
53
|
require('./constantsRiskScreener.js');
|
|
54
|
-
require('./index.styles-
|
|
54
|
+
require('./index.styles-393f1d67.js');
|
|
55
55
|
require('@mantine/notifications');
|
|
56
|
-
require('./translationsContext-
|
|
56
|
+
require('./translationsContext-07bca71f.js');
|
|
57
57
|
|
|
58
58
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
59
59
|
|
|
@@ -190,13 +190,195 @@ const BackgroundHeader = () => (React__default["default"].createElement("svg", {
|
|
|
190
190
|
React__default["default"].createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
|
|
191
191
|
React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff" })))));
|
|
192
192
|
|
|
193
|
+
const isPhoneVerifedAlready = (userInfo, flowData) => {
|
|
194
|
+
var _a;
|
|
195
|
+
if (flowData === null || flowData === void 0 ? void 0 : flowData.metaData) {
|
|
196
|
+
return (_a = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _a === void 0 ? void 0 : _a.is_phone_verified;
|
|
197
|
+
}
|
|
198
|
+
return (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone_verified_at) && (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone);
|
|
199
|
+
};
|
|
200
|
+
const isSetupFullInfoAlready = (userInfo, flowData) => {
|
|
201
|
+
var _a, _b, _c;
|
|
202
|
+
if (flowData === null || flowData === void 0 ? void 0 : flowData.metaData) {
|
|
203
|
+
return (((_a = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _a === void 0 ? void 0 : _a.is_name) &&
|
|
204
|
+
((_b = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _b === void 0 ? void 0 : _b.is_gender) &&
|
|
205
|
+
((_c = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _c === void 0 ? void 0 : _c.is_birthday));
|
|
206
|
+
}
|
|
207
|
+
const hasName = !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.name);
|
|
208
|
+
const hasGender = typeof (userInfo === null || userInfo === void 0 ? void 0 : userInfo.gender) === 'number';
|
|
209
|
+
const hasBirthday = !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.birthday);
|
|
210
|
+
return hasName && hasGender && hasBirthday;
|
|
211
|
+
};
|
|
212
|
+
const isExistUpdateEmailStep = (steps) => {
|
|
213
|
+
return steps.find((s) => s.type === store.SSOStepTypeType.UPDATE_EMAIL);
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
const isSocialFlowFn = (flowData) => {
|
|
217
|
+
return (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'google' || (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'facebook';
|
|
218
|
+
};
|
|
219
|
+
const isPhoneFlowFn = (flowData) => {
|
|
220
|
+
return ((flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'sms' ||
|
|
221
|
+
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'zalo' ||
|
|
222
|
+
(flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'phone');
|
|
223
|
+
};
|
|
224
|
+
const isEmailFlowFn = (flowData) => {
|
|
225
|
+
return (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'email';
|
|
226
|
+
};
|
|
227
|
+
const isDisplayProgressBarFn = (flowData, step) => {
|
|
228
|
+
const showProgressBar = (step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.OTP ||
|
|
229
|
+
(step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.SETUP_FULL ||
|
|
230
|
+
(step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.VERIFY_PHONE ||
|
|
231
|
+
(step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.PASSWORD ||
|
|
232
|
+
(step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.FORGOT_PASSWORD_PHONE ||
|
|
233
|
+
(step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.FORGOT_PASSWORD_SETUP ||
|
|
234
|
+
(step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.EMAIL ||
|
|
235
|
+
(step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.UPDATE_EMAIL;
|
|
236
|
+
const isWhiteListFlow = isSocialFlowFn(flowData) ||
|
|
237
|
+
isPhoneFlowFn(flowData) ||
|
|
238
|
+
isEmailFlowFn(flowData);
|
|
239
|
+
return showProgressBar && isWhiteListFlow;
|
|
240
|
+
};
|
|
241
|
+
const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo) => {
|
|
242
|
+
var _a, _b;
|
|
243
|
+
const step = steps[currentStepIndex];
|
|
244
|
+
const isSocialFlow = isSocialFlowFn(flowData);
|
|
245
|
+
const isPhoneFlow = isPhoneFlowFn(flowData);
|
|
246
|
+
const isEmailFlow = isEmailFlowFn(flowData);
|
|
247
|
+
/** Social (Google, Facebook): FIRST => VERIFY_PHONE | OTP => STEP_FULL */
|
|
248
|
+
if (isSocialFlow) {
|
|
249
|
+
const arrSteps = [
|
|
250
|
+
!isPhoneVerifedAlready(userInfo, flowData)
|
|
251
|
+
? [store.SSOStepTypeType.VERIFY_PHONE, store.SSOStepTypeType.OTP]
|
|
252
|
+
: undefined,
|
|
253
|
+
isExistUpdateEmailStep(steps)
|
|
254
|
+
? (step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.OTP
|
|
255
|
+
? store.SSOStepTypeType.OTP
|
|
256
|
+
: store.SSOStepTypeType.UPDATE_EMAIL
|
|
257
|
+
: undefined,
|
|
258
|
+
!userInfo || !store.isUserFinishedSetup(userInfo)
|
|
259
|
+
? store.SSOStepTypeType.SETUP_FULL
|
|
260
|
+
: undefined,
|
|
261
|
+
]
|
|
262
|
+
.flat()
|
|
263
|
+
.filter(Boolean);
|
|
264
|
+
const previousStep = steps[currentStepIndex - 1];
|
|
265
|
+
return [
|
|
266
|
+
arrSteps.length,
|
|
267
|
+
(previousStep === null || previousStep === void 0 ? void 0 : previousStep.type) === store.SSOStepTypeType.UPDATE_EMAIL
|
|
268
|
+
? arrSteps.findLastIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1
|
|
269
|
+
: arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
|
|
270
|
+
];
|
|
271
|
+
}
|
|
272
|
+
if (isPhoneFlow && (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'signup') {
|
|
273
|
+
const arrSteps = [
|
|
274
|
+
!isPhoneVerifedAlready(userInfo, flowData)
|
|
275
|
+
? store.SSOStepTypeType.OTP
|
|
276
|
+
: undefined,
|
|
277
|
+
!((_a = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _a === void 0 ? void 0 : _a.is_pass)
|
|
278
|
+
? store.SSOStepTypeType.FORGOT_PASSWORD_SETUP
|
|
279
|
+
: undefined,
|
|
280
|
+
!isSetupFullInfoAlready(userInfo, flowData)
|
|
281
|
+
? store.SSOStepTypeType.SETUP_FULL
|
|
282
|
+
: undefined,
|
|
283
|
+
]
|
|
284
|
+
.flat()
|
|
285
|
+
.filter(Boolean);
|
|
286
|
+
return [
|
|
287
|
+
arrSteps.length,
|
|
288
|
+
arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
|
|
289
|
+
];
|
|
290
|
+
}
|
|
291
|
+
if (isPhoneFlow && (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'login') {
|
|
292
|
+
const arrSteps = [
|
|
293
|
+
store.SSOStepTypeType.PASSWORD,
|
|
294
|
+
!isPhoneVerifedAlready(userInfo, flowData)
|
|
295
|
+
? [store.SSOStepTypeType.FORGOT_PASSWORD_PHONE, store.SSOStepTypeType.OTP]
|
|
296
|
+
: undefined,
|
|
297
|
+
isExistUpdateEmailStep(steps)
|
|
298
|
+
? (step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.OTP
|
|
299
|
+
? store.SSOStepTypeType.OTP
|
|
300
|
+
: store.SSOStepTypeType.UPDATE_EMAIL
|
|
301
|
+
: undefined,
|
|
302
|
+
!isSetupFullInfoAlready(userInfo, flowData)
|
|
303
|
+
? store.SSOStepTypeType.SETUP_FULL
|
|
304
|
+
: undefined,
|
|
305
|
+
]
|
|
306
|
+
.flat()
|
|
307
|
+
.filter(Boolean);
|
|
308
|
+
const previousStep = steps[currentStepIndex - 1];
|
|
309
|
+
return [
|
|
310
|
+
arrSteps.length,
|
|
311
|
+
(previousStep === null || previousStep === void 0 ? void 0 : previousStep.type) === store.SSOStepTypeType.UPDATE_EMAIL
|
|
312
|
+
? arrSteps.findLastIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1
|
|
313
|
+
: arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
|
|
314
|
+
];
|
|
315
|
+
}
|
|
316
|
+
if (isEmailFlow) {
|
|
317
|
+
const hasPasswordStep = !((_b = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _b === void 0 ? void 0 : _b.is_pass);
|
|
318
|
+
const hasPhoneStep = !isPhoneVerifedAlready(userInfo, flowData);
|
|
319
|
+
const hasSetupFullStep = !isSetupFullInfoAlready(userInfo, flowData);
|
|
320
|
+
if (!hasPasswordStep && !hasPhoneStep && !hasSetupFullStep)
|
|
321
|
+
return [];
|
|
322
|
+
const arrSteps = [
|
|
323
|
+
(step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.OTP
|
|
324
|
+
? store.SSOStepTypeType.OTP
|
|
325
|
+
: store.SSOStepTypeType.EMAIL,
|
|
326
|
+
hasPasswordStep
|
|
327
|
+
? store.SSOStepTypeType.FORGOT_PASSWORD_SETUP
|
|
328
|
+
: store.SSOStepTypeType.PASSWORD,
|
|
329
|
+
hasPhoneStep
|
|
330
|
+
? (step === null || step === void 0 ? void 0 : step.type) === store.SSOStepTypeType.OTP
|
|
331
|
+
? store.SSOStepTypeType.OTP
|
|
332
|
+
: store.SSOStepTypeType.VERIFY_PHONE
|
|
333
|
+
: undefined,
|
|
334
|
+
hasSetupFullStep ? store.SSOStepTypeType.SETUP_FULL : undefined,
|
|
335
|
+
]
|
|
336
|
+
.flat()
|
|
337
|
+
.filter(Boolean);
|
|
338
|
+
const previousStep = steps[currentStepIndex - 1];
|
|
339
|
+
return [
|
|
340
|
+
arrSteps.length,
|
|
341
|
+
(previousStep === null || previousStep === void 0 ? void 0 : previousStep.type) === store.SSOStepTypeType.VERIFY_PHONE
|
|
342
|
+
? arrSteps.findLastIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1
|
|
343
|
+
: arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
|
|
344
|
+
];
|
|
345
|
+
}
|
|
346
|
+
return [];
|
|
347
|
+
};
|
|
348
|
+
const ProgressBar = () => {
|
|
349
|
+
// const initUserInfo = useRef<UserInfo | undefined | null>()
|
|
350
|
+
const { steps, currentStepIndex } = store.useSSOSteps();
|
|
351
|
+
const { flowData, userInfo } = store.useSSOV2Store();
|
|
352
|
+
/** No need update state IF userInfo is changed */
|
|
353
|
+
const initUserInfo = React.useMemo(() => userInfo, [userInfo]);
|
|
354
|
+
const [totalStepNumber, activeStepNumber] = getCurrentStepNumber(flowData, { steps, currentStepIndex }, initUserInfo);
|
|
355
|
+
if (!activeStepNumber || totalStepNumber === 1)
|
|
356
|
+
return null;
|
|
357
|
+
return (React__default["default"].createElement(core.Flex, { gap: 2 }, Array.from({ length: totalStepNumber }).map((_, idx) => {
|
|
358
|
+
const currentStepNumber = idx + 1;
|
|
359
|
+
return (React__default["default"].createElement(core.Box, { key: currentStepNumber, style: {
|
|
360
|
+
width: 'auto',
|
|
361
|
+
height: 2,
|
|
362
|
+
flex: 1,
|
|
363
|
+
borderRadius: 4,
|
|
364
|
+
backgroundColor: currentStepNumber <= activeStepNumber ? '#00B16A' : '#D2D6DC',
|
|
365
|
+
} }));
|
|
366
|
+
})));
|
|
367
|
+
};
|
|
368
|
+
|
|
193
369
|
const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
194
370
|
var _a;
|
|
195
|
-
const { steps, goBack } = store.useSSOSteps();
|
|
371
|
+
const { steps, goBack, currentStepIndex } = store.useSSOSteps();
|
|
372
|
+
const { flowData } = store.useSSOV2Store();
|
|
196
373
|
const { locale, tracking } = useSSOState();
|
|
197
|
-
const
|
|
198
|
-
const
|
|
199
|
-
const
|
|
374
|
+
const currentStep = steps[currentStepIndex];
|
|
375
|
+
const showProgressBar = isDisplayProgressBarFn(flowData, currentStep);
|
|
376
|
+
const showBack = (steps.length > 1 && !showProgressBar) ||
|
|
377
|
+
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === store.SSOStepTypeType.OTP ||
|
|
378
|
+
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === store.SSOStepTypeType.PASSWORD ||
|
|
379
|
+
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === store.SSOStepTypeType.EMAIL;
|
|
380
|
+
const showClose = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === store.SSOStepTypeType.FIRST;
|
|
381
|
+
const showLogo = (steps.length === 1 || showProgressBar) && !showBack;
|
|
200
382
|
const logoType = (_a = index$2.LOCALE_SPECS[locale]) === null || _a === void 0 ? void 0 : _a.LOGO_TYPE;
|
|
201
383
|
const [closeConfirmOpen, setCloseConfirmOpen] = React__default["default"].useState(false);
|
|
202
384
|
const onCloseClick = () => {
|
|
@@ -239,7 +421,11 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
239
421
|
display: 'block',
|
|
240
422
|
},
|
|
241
423
|
},
|
|
242
|
-
}), withCloseButton: false, zIndex: index$2.ZINDEX_SSO
|
|
424
|
+
}), withCloseButton: false, zIndex: index$2.ZINDEX_SSO, overlayProps: {
|
|
425
|
+
'data-event-label': 'Focus out',
|
|
426
|
+
'data-event-category': tracking === null || tracking === void 0 ? void 0 : tracking.category,
|
|
427
|
+
'data-event-action': tracking === null || tracking === void 0 ? void 0 : tracking.action,
|
|
428
|
+
} },
|
|
243
429
|
React__default["default"].createElement("div", { style: {
|
|
244
430
|
height: 40,
|
|
245
431
|
display: 'flex',
|
|
@@ -252,7 +438,7 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
252
438
|
padding: 8,
|
|
253
439
|
background: 'white',
|
|
254
440
|
borderRadius: '100%',
|
|
255
|
-
}, 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": "
|
|
441
|
+
}, 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" },
|
|
256
442
|
React__default["default"].createElement(arrow.ChevronLeft, null))),
|
|
257
443
|
showLogo && (React__default["default"].createElement(logoIcon.LogoIcon, { type: logoType, height: 32, width: 'unset' })),
|
|
258
444
|
showClose && (React__default["default"].createElement(index$4.Button, { variant: "white", style: {
|
|
@@ -263,6 +449,7 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
263
449
|
borderRadius: '100%',
|
|
264
450
|
}, 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" },
|
|
265
451
|
React__default["default"].createElement(core$1.Close, null)))),
|
|
452
|
+
showProgressBar && React__default["default"].createElement(ProgressBar, null),
|
|
266
453
|
React__default["default"].createElement("div", { style: {
|
|
267
454
|
flex: 1,
|
|
268
455
|
} }, children)),
|
|
@@ -406,7 +593,10 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
406
593
|
const { t } = index.useTranslations();
|
|
407
594
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
408
595
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
409
|
-
const
|
|
596
|
+
const { flowData } = store.useSSOV2Store();
|
|
597
|
+
const trackingCategory = flowData.flow === 'signup'
|
|
598
|
+
? `SSO - Sign Up via Email`
|
|
599
|
+
: 'SSO - Sign In via Email';
|
|
410
600
|
const trackingAction = 'Continue With Email';
|
|
411
601
|
const { setTracking } = useSSOState();
|
|
412
602
|
React.useEffect(() => {
|
|
@@ -434,6 +624,7 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
434
624
|
flowData: {
|
|
435
625
|
method: 'email',
|
|
436
626
|
flow: 'login',
|
|
627
|
+
metaData: existRes._data,
|
|
437
628
|
},
|
|
438
629
|
});
|
|
439
630
|
// go to password screen
|
|
@@ -451,6 +642,7 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
451
642
|
flowData: {
|
|
452
643
|
method: 'email',
|
|
453
644
|
flow: 'signup',
|
|
645
|
+
metaData: existRes._data,
|
|
454
646
|
},
|
|
455
647
|
});
|
|
456
648
|
if (!((_b = existRes._data) === null || _b === void 0 ? void 0 : _b.provider)) {
|
|
@@ -469,7 +661,7 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
469
661
|
config: {
|
|
470
662
|
email,
|
|
471
663
|
otpType: 'email',
|
|
472
|
-
afterAction: '
|
|
664
|
+
afterAction: 'forgot',
|
|
473
665
|
},
|
|
474
666
|
});
|
|
475
667
|
goNext();
|
|
@@ -1810,7 +2002,7 @@ function CountrySelectWithIcon(_a) {
|
|
|
1810
2002
|
var { value, options, className,
|
|
1811
2003
|
// iconComponent: Icon,
|
|
1812
2004
|
// getIconAspectRatio,
|
|
1813
|
-
arrowComponent: Arrow = DefaultArrowComponent, onChange, disabled, readOnly } = _a, rest = tslib_es6.__rest(_a, ["value", "options", "className", "arrowComponent", "onChange", "disabled", "readOnly"]);
|
|
2005
|
+
arrowComponent: Arrow = DefaultArrowComponent, onChange, disabled, readOnly, trackingFn } = _a, rest = tslib_es6.__rest(_a, ["value", "options", "className", "arrowComponent", "onChange", "disabled", "readOnly", "trackingFn"]);
|
|
1814
2006
|
const { t } = index.useTranslations();
|
|
1815
2007
|
const [open, setOpen] = React.useState(false);
|
|
1816
2008
|
const [modalStyle, setModalStyle] = React.useState({});
|
|
@@ -1894,13 +2086,13 @@ function CountrySelectWithIcon(_a) {
|
|
|
1894
2086
|
React__default["default"].createElement(SelectCountryItem, { option: selectedOption, onSelect: (option) => {
|
|
1895
2087
|
onChange_(option.value);
|
|
1896
2088
|
setOpen(false);
|
|
1897
|
-
} }))),
|
|
2089
|
+
}, trackingFn: trackingFn }))),
|
|
1898
2090
|
React__default["default"].createElement(core.Stack, { spacing: 0 },
|
|
1899
2091
|
React__default["default"].createElement(index$3.Text, { size: "s4" }, t('ssov2.first.search.country.all')),
|
|
1900
2092
|
filteredOptions.map((option) => (React__default["default"].createElement(SelectCountryItem, { option: option, key: option.value, onSelect: (option) => {
|
|
1901
2093
|
onChange_(option.value);
|
|
1902
2094
|
setOpen(false);
|
|
1903
|
-
}, selected: selectedOption.value === option.value }))))));
|
|
2095
|
+
}, selected: selectedOption.value === option.value, trackingFn: trackingFn }))))));
|
|
1904
2096
|
const FlagSelected = Flags__default["default"][selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value];
|
|
1905
2097
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1906
2098
|
React__default["default"].createElement("div", { className: "PhoneInputCountry", ref: countryDivRef },
|
|
@@ -1964,7 +2156,7 @@ function CountrySelectWithIcon(_a) {
|
|
|
1964
2156
|
}, onClick: () => setOpen(false) }),
|
|
1965
2157
|
React__default["default"].createElement("div", { style: Object.assign({ position: 'fixed', height: 540, top: '100%', left: 0, width: '100%', backgroundColor: 'white', padding: '8px 24px', zIndex: index$2.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))))));
|
|
1966
2158
|
}
|
|
1967
|
-
const SelectCountryItem = ({ option, onSelect, selected, }) => {
|
|
2159
|
+
const SelectCountryItem = ({ option, onSelect, selected, trackingFn, }) => {
|
|
1968
2160
|
const selectedCallingCode = React.useMemo(() => {
|
|
1969
2161
|
if (!option.value)
|
|
1970
2162
|
return '';
|
|
@@ -1975,14 +2167,15 @@ const SelectCountryItem = ({ option, onSelect, selected, }) => {
|
|
|
1975
2167
|
return '';
|
|
1976
2168
|
}, [option.value]);
|
|
1977
2169
|
const Flag = Flags__default["default"][option.value];
|
|
1978
|
-
|
|
2170
|
+
const tracking = (trackingFn === null || trackingFn === void 0 ? void 0 : trackingFn(option)) || {};
|
|
2171
|
+
return (React__default["default"].createElement(core.Stack, Object.assign({ sx: {
|
|
1979
2172
|
padding: '0 24px',
|
|
1980
2173
|
backgroundColor: selected ? '#e3f2ff' : 'transparent',
|
|
1981
2174
|
':hover': { backgroundColor: '#F7F9FA' },
|
|
1982
2175
|
cursor: 'pointer',
|
|
1983
2176
|
marginLeft: -24,
|
|
1984
2177
|
marginRight: -24,
|
|
1985
|
-
}, justify: "center", onClick: () => onSelect(option) },
|
|
2178
|
+
}, justify: "center", onClick: () => onSelect(option) }, tracking),
|
|
1986
2179
|
React__default["default"].createElement(core.Group, { position: "apart", sx: {
|
|
1987
2180
|
height: 50,
|
|
1988
2181
|
borderBottom: '1px solid #E4E8EC',
|
|
@@ -2034,7 +2227,7 @@ function isSameOptionValue(value1, value2) {
|
|
|
2034
2227
|
const PhoneForwardRef = (props, ref) => {
|
|
2035
2228
|
const { isError, defaultCountry,
|
|
2036
2229
|
// countries = countriesDefault,
|
|
2037
|
-
countryCallingCodeEditable = false, defaultValue, value: valueProps, onChange: onChangeProps, className } = props, inputProps = tslib_es6.__rest(props, ["isError", "defaultCountry", "countryCallingCodeEditable", "defaultValue", "value", "onChange", "className"]);
|
|
2230
|
+
countryCallingCodeEditable = false, defaultValue, value: valueProps, onChange: onChangeProps, className, trackingFn } = props, inputProps = tslib_es6.__rest(props, ["isError", "defaultCountry", "countryCallingCodeEditable", "defaultValue", "value", "onChange", "className", "trackingFn"]);
|
|
2038
2231
|
const [value, setValue] = React.useState(defaultValue || valueProps);
|
|
2039
2232
|
const [PhoneInputUtils, setPhoneInputUtils] = React.useState(null);
|
|
2040
2233
|
const onChange = (val) => {
|
|
@@ -2058,7 +2251,7 @@ const PhoneForwardRef = (props, ref) => {
|
|
|
2058
2251
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2059
2252
|
ref: ref, value: value, onChange: onChange,
|
|
2060
2253
|
// countries={countries}
|
|
2061
|
-
defaultCountry: defaultCountry, countryCallingCodeEditable: countryCallingCodeEditable, className: cn__default["default"](index$5.styles.phoneInput, { isError, [index$5.styles.error]: isError }, className), countrySelectComponent: CountrySelectWithIcon }, inputProps)));
|
|
2254
|
+
defaultCountry: defaultCountry, countryCallingCodeEditable: countryCallingCodeEditable, className: cn__default["default"](index$5.styles.phoneInput, { isError, [index$5.styles.error]: isError }, className), countrySelectComponent: CountrySelectWithIcon, countrySelectProps: { trackingFn } }, inputProps)));
|
|
2062
2255
|
};
|
|
2063
2256
|
const PhoneWithCustomCountrySelect = React.forwardRef(PhoneForwardRef);
|
|
2064
2257
|
|
|
@@ -2094,11 +2287,12 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2094
2287
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
2095
2288
|
const { locale, onClose, setTracking } = useSSOState();
|
|
2096
2289
|
const { addStep, goNext } = store.useSSOSteps();
|
|
2290
|
+
const { setUserInfo } = store.useSSOV2Store();
|
|
2097
2291
|
const [activeTab, setActiveTab] = React__default["default"].useState('login');
|
|
2098
2292
|
const { legalTextType } = config || {};
|
|
2099
2293
|
const { t } = index.useTranslations();
|
|
2100
|
-
const
|
|
2101
|
-
const
|
|
2294
|
+
const trackingAction = 'Sign In or Sign Up';
|
|
2295
|
+
const trackingCategory = `SSO - ${activeTab === 'login' ? 'Sign In' : 'Sign Up'}`;
|
|
2102
2296
|
React.useEffect(() => {
|
|
2103
2297
|
if (!hidden) {
|
|
2104
2298
|
setErrMsg('');
|
|
@@ -2110,20 +2304,31 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2110
2304
|
}, [hidden]);
|
|
2111
2305
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
2112
2306
|
const handleLoginBySocial = (credential, provider) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2113
|
-
var _c, _d;
|
|
2114
2307
|
const res = yield loginBySocial(credential, provider);
|
|
2115
2308
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
2116
2309
|
store.handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
2117
2310
|
const userInfo = yield store.getUserInfo();
|
|
2311
|
+
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
2118
2312
|
if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) === 1 && userInfo._data) {
|
|
2119
2313
|
store.useSSOV2Store.setState({
|
|
2120
2314
|
flowData: {
|
|
2121
2315
|
method: provider,
|
|
2122
2316
|
},
|
|
2123
2317
|
});
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2318
|
+
const isNotHavePhone = !userInfo._data.phone || !userInfo._data.phone_verified_at;
|
|
2319
|
+
if (isNotHavePhone) {
|
|
2320
|
+
store.useSSOV2Store.setState((f) => ({
|
|
2321
|
+
flowData: Object.assign(Object.assign({}, f.flowData), { flow: 'signup', isVerifyPhone: true }),
|
|
2322
|
+
}));
|
|
2323
|
+
addStep({
|
|
2324
|
+
type: store.SSOStepTypeType.VERIFY_PHONE,
|
|
2325
|
+
config: {
|
|
2326
|
+
provider: provider,
|
|
2327
|
+
},
|
|
2328
|
+
});
|
|
2329
|
+
goNext();
|
|
2330
|
+
}
|
|
2331
|
+
else if (!store.isUserFinishedSetup(userInfo._data)) {
|
|
2127
2332
|
store.useSSOV2Store.setState((f) => ({
|
|
2128
2333
|
flowData: Object.assign(Object.assign({}, f.flowData), { flow: 'signup' }),
|
|
2129
2334
|
}));
|
|
@@ -2154,19 +2359,6 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2154
2359
|
goNext();
|
|
2155
2360
|
}
|
|
2156
2361
|
}
|
|
2157
|
-
else if (!((_c = userInfo._data) === null || _c === void 0 ? void 0 : _c.phone_verified_at) ||
|
|
2158
|
-
!((_d = userInfo._data) === null || _d === void 0 ? void 0 : _d.phone)) {
|
|
2159
|
-
store.useSSOV2Store.setState((f) => ({
|
|
2160
|
-
flowData: Object.assign(Object.assign({}, f.flowData), { flow: 'login', isVerifyPhone: true }),
|
|
2161
|
-
}));
|
|
2162
|
-
addStep({
|
|
2163
|
-
type: store.SSOStepTypeType.VERIFY_PHONE,
|
|
2164
|
-
config: {
|
|
2165
|
-
provider: provider,
|
|
2166
|
-
},
|
|
2167
|
-
});
|
|
2168
|
-
goNext();
|
|
2169
|
-
}
|
|
2170
2362
|
else {
|
|
2171
2363
|
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
2172
2364
|
}
|
|
@@ -2206,7 +2398,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2206
2398
|
};
|
|
2207
2399
|
}, []);
|
|
2208
2400
|
const onClickContinueZalo = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2209
|
-
var
|
|
2401
|
+
var _c, _d;
|
|
2210
2402
|
setLoading(true);
|
|
2211
2403
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2212
2404
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2215,12 +2407,13 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2215
2407
|
}
|
|
2216
2408
|
const userExist = yield store.checkUserExist({ phone: phoneNumber });
|
|
2217
2409
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2218
|
-
const provider = (
|
|
2219
|
-
if ((
|
|
2410
|
+
const provider = (_c = userExist._data) === null || _c === void 0 ? void 0 : _c.provider;
|
|
2411
|
+
if ((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.is_pass) {
|
|
2220
2412
|
store.useSSOV2Store.setState({
|
|
2221
2413
|
flowData: {
|
|
2222
2414
|
method: 'zalo',
|
|
2223
2415
|
flow: 'login',
|
|
2416
|
+
metaData: userExist._data,
|
|
2224
2417
|
},
|
|
2225
2418
|
});
|
|
2226
2419
|
addStep({
|
|
@@ -2248,6 +2441,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2248
2441
|
flowData: {
|
|
2249
2442
|
method: 'zalo',
|
|
2250
2443
|
flow: 'signup',
|
|
2444
|
+
metaData: userExist._data,
|
|
2251
2445
|
},
|
|
2252
2446
|
});
|
|
2253
2447
|
addStep({
|
|
@@ -2255,7 +2449,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2255
2449
|
config: {
|
|
2256
2450
|
phone,
|
|
2257
2451
|
otpType: 'phone-zalo',
|
|
2258
|
-
afterAction: '
|
|
2452
|
+
afterAction: 'forgot',
|
|
2259
2453
|
},
|
|
2260
2454
|
});
|
|
2261
2455
|
goNext();
|
|
@@ -2267,7 +2461,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2267
2461
|
setLoading(false);
|
|
2268
2462
|
});
|
|
2269
2463
|
const onClickContinuePhone = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2270
|
-
var
|
|
2464
|
+
var _e, _f;
|
|
2271
2465
|
setLoading(true);
|
|
2272
2466
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2273
2467
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2276,12 +2470,13 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2276
2470
|
}
|
|
2277
2471
|
const userExist = yield store.checkUserExist({ phone: phoneNumber });
|
|
2278
2472
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2279
|
-
const provider = (
|
|
2280
|
-
if ((
|
|
2473
|
+
const provider = (_e = userExist._data) === null || _e === void 0 ? void 0 : _e.provider;
|
|
2474
|
+
if ((_f = userExist._data) === null || _f === void 0 ? void 0 : _f.is_pass) {
|
|
2281
2475
|
store.useSSOV2Store.setState({
|
|
2282
2476
|
flowData: {
|
|
2283
2477
|
method: 'sms',
|
|
2284
2478
|
flow: 'login',
|
|
2479
|
+
metaData: userExist._data,
|
|
2285
2480
|
},
|
|
2286
2481
|
});
|
|
2287
2482
|
addStep({
|
|
@@ -2309,6 +2504,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2309
2504
|
flowData: {
|
|
2310
2505
|
method: 'sms',
|
|
2311
2506
|
flow: 'signup',
|
|
2507
|
+
metaData: userExist._data,
|
|
2312
2508
|
},
|
|
2313
2509
|
});
|
|
2314
2510
|
addStep({
|
|
@@ -2316,7 +2512,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2316
2512
|
config: {
|
|
2317
2513
|
phone,
|
|
2318
2514
|
otpType: 'phone-sms',
|
|
2319
|
-
afterAction: '
|
|
2515
|
+
afterAction: 'forgot',
|
|
2320
2516
|
},
|
|
2321
2517
|
});
|
|
2322
2518
|
goNext();
|
|
@@ -2328,7 +2524,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2328
2524
|
setLoading(false);
|
|
2329
2525
|
});
|
|
2330
2526
|
const onClickLoginWithPhone = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2331
|
-
var
|
|
2527
|
+
var _g, _h;
|
|
2332
2528
|
setLoading(true);
|
|
2333
2529
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
2334
2530
|
if (!areaCode || !phoneNumber || !phone) {
|
|
@@ -2337,7 +2533,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2337
2533
|
}
|
|
2338
2534
|
const userExist = yield store.checkUserExist({ phone: phoneNumber });
|
|
2339
2535
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2340
|
-
if (!userExist._data || !((
|
|
2536
|
+
if (!userExist._data || !((_g = userExist._data) === null || _g === void 0 ? void 0 : _g.is_pass)) {
|
|
2341
2537
|
useMantineLocale.showNotification({
|
|
2342
2538
|
message: t('ssov2.first.noAccountOrPass'),
|
|
2343
2539
|
type: 'danger',
|
|
@@ -2345,11 +2541,12 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2345
2541
|
setActiveTab('signup');
|
|
2346
2542
|
return setLoading(false);
|
|
2347
2543
|
}
|
|
2348
|
-
if ((
|
|
2544
|
+
if ((_h = userExist._data) === null || _h === void 0 ? void 0 : _h.is_pass) {
|
|
2349
2545
|
store.useSSOV2Store.setState({
|
|
2350
2546
|
flowData: {
|
|
2351
2547
|
method: 'phone',
|
|
2352
2548
|
flow: 'login',
|
|
2549
|
+
metaData: userExist._data,
|
|
2353
2550
|
},
|
|
2354
2551
|
});
|
|
2355
2552
|
addStep({
|
|
@@ -2371,7 +2568,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2371
2568
|
store.useSSOV2Store.setState({
|
|
2372
2569
|
flowData: {
|
|
2373
2570
|
method: 'email',
|
|
2374
|
-
flow: 'login',
|
|
2571
|
+
flow: activeTab === 'login' ? 'login' : 'signup',
|
|
2375
2572
|
},
|
|
2376
2573
|
});
|
|
2377
2574
|
addStep({
|
|
@@ -2428,7 +2625,17 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2428
2625
|
onClickContinueZalo();
|
|
2429
2626
|
} },
|
|
2430
2627
|
React__default["default"].createElement(index$5.Input.Wrapper, { error: errMsg },
|
|
2431
|
-
React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone"
|
|
2628
|
+
React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone", trackingFn: React.useCallback((option) => {
|
|
2629
|
+
if (!(option === null || option === void 0 ? void 0 : option.label))
|
|
2630
|
+
return;
|
|
2631
|
+
return {
|
|
2632
|
+
'data-event-action': 'Country Selection',
|
|
2633
|
+
'data-event-label': option.label,
|
|
2634
|
+
'data-event-category': activeTab === 'signup'
|
|
2635
|
+
? 'SSO - Sign Up'
|
|
2636
|
+
: 'SSO - Sign In',
|
|
2637
|
+
};
|
|
2638
|
+
}, [activeTab]) }))),
|
|
2432
2639
|
React__default["default"].createElement(index$4.Button, { size: "lg", variant: "primary", onClick: onClickLoginWithPhone, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue Login", display: activeTab === 'login' ? 'block' : 'none' }, t('ssov2.button.continue')),
|
|
2433
2640
|
React__default["default"].createElement(index$4.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo", display: activeTab === 'signup' ? 'block' : 'none' }, t('ssov2.button.otp.zalo')),
|
|
2434
2641
|
React__default["default"].createElement(index$4.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'))),
|
|
@@ -2510,10 +2717,8 @@ const initSendUpdateEmailOtp = (email) => tslib_es6.__awaiter(void 0, void 0, vo
|
|
|
2510
2717
|
});
|
|
2511
2718
|
});
|
|
2512
2719
|
const resendUpdateEmailOTP = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2513
|
-
const formData = new FormData();
|
|
2514
2720
|
return store.fetchSSOV2Api(store.SSO_V2_PATHS.ECOM_CARE.RESEND_OTP, {
|
|
2515
|
-
method: '
|
|
2516
|
-
body: formData,
|
|
2721
|
+
method: 'GET',
|
|
2517
2722
|
});
|
|
2518
2723
|
});
|
|
2519
2724
|
const verifyUpdateEmailOTP = (otpCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -2548,7 +2753,7 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2548
2753
|
? 'Sign Up'
|
|
2549
2754
|
: 'Sign In'} via ${trackingMethod}`;
|
|
2550
2755
|
const trackingAction = isEmail
|
|
2551
|
-
? 'Verify Email'
|
|
2756
|
+
? 'Verify Your Email'
|
|
2552
2757
|
: `Verify Phone Number via ${isZalo ? 'Zalo' : isSMS ? 'SMS' : ''}`;
|
|
2553
2758
|
React.useEffect(() => {
|
|
2554
2759
|
if (!hidden) {
|
|
@@ -2561,15 +2766,7 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2561
2766
|
}, [hidden]);
|
|
2562
2767
|
const addStepAndGoNext = (step) => {
|
|
2563
2768
|
store.useSSOSteps.setState((old) => {
|
|
2564
|
-
var _a, _b;
|
|
2565
2769
|
const oldSteps = old.steps;
|
|
2566
|
-
if (((_a = oldSteps[index$1 - 1]) === null || _a === void 0 ? void 0 : _a.type) === store.SSOStepTypeType.VERIFY_PHONE ||
|
|
2567
|
-
((_b = oldSteps[index$1 - 1]) === null || _b === void 0 ? void 0 : _b.type) === store.SSOStepTypeType.UPDATE_EMAIL) {
|
|
2568
|
-
return {
|
|
2569
|
-
steps: oldSteps.slice(0, index$1 - 1).concat(step),
|
|
2570
|
-
currentStepIndex: index$1 - 1,
|
|
2571
|
-
};
|
|
2572
|
-
}
|
|
2573
2770
|
return {
|
|
2574
2771
|
steps: oldSteps.slice(0, index$1).concat(step),
|
|
2575
2772
|
currentStepIndex: index$1,
|
|
@@ -2900,7 +3097,7 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2900
3097
|
'data-event-category': trackingCategory,
|
|
2901
3098
|
'data-event-action': trackingAction,
|
|
2902
3099
|
'data-event-label': 'Enter Code',
|
|
2903
|
-
} })),
|
|
3100
|
+
}, placeholder: "*" })),
|
|
2904
3101
|
React__default["default"].createElement(core.Group, { spacing: 8, align: "center", style: {
|
|
2905
3102
|
height: 40,
|
|
2906
3103
|
} },
|
|
@@ -2920,6 +3117,7 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
2920
3117
|
const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
2921
3118
|
const { t } = index.useTranslations();
|
|
2922
3119
|
const { onClose, setTracking } = useSSOState();
|
|
3120
|
+
const { setUserInfo, flowData } = store.useSSOV2Store();
|
|
2923
3121
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
2924
3122
|
const phone = config === null || config === void 0 ? void 0 : config.phone;
|
|
2925
3123
|
const method = config === null || config === void 0 ? void 0 : config.method;
|
|
@@ -2983,11 +3181,13 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
2983
3181
|
setLoading(false);
|
|
2984
3182
|
});
|
|
2985
3183
|
const onAuthSuccess = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2986
|
-
var _c, _d;
|
|
2987
3184
|
store.handleAuthSuccess(data);
|
|
3185
|
+
const userInfo = yield store.getUserInfo();
|
|
3186
|
+
const isPhoneFlow = isPhoneFlowFn(flowData);
|
|
3187
|
+
const isEmailFlow = isEmailFlowFn(flowData);
|
|
3188
|
+
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
2988
3189
|
if (!phone && !!email) {
|
|
2989
|
-
|
|
2990
|
-
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)) {
|
|
3190
|
+
if (store.isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
2991
3191
|
store.useSSOV2Store.setState((s) => ({
|
|
2992
3192
|
flowData: Object.assign(Object.assign({}, s.flowData), { isVerifyPhone: true }),
|
|
2993
3193
|
}));
|
|
@@ -3001,6 +3201,27 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3001
3201
|
return;
|
|
3002
3202
|
}
|
|
3003
3203
|
}
|
|
3204
|
+
if (store.isLoginWithPhoneNotVerifedYet(flowData, userInfo._data)) {
|
|
3205
|
+
addStep({
|
|
3206
|
+
type: store.SSOStepTypeType.FORGOT_PASSWORD_PHONE,
|
|
3207
|
+
config: {
|
|
3208
|
+
phone: `${userInfo._data.area_code}${userInfo._data.phone}`,
|
|
3209
|
+
afterAction: 'setup',
|
|
3210
|
+
},
|
|
3211
|
+
});
|
|
3212
|
+
goNext();
|
|
3213
|
+
return;
|
|
3214
|
+
}
|
|
3215
|
+
if ((isPhoneFlow || isEmailFlow) && !store.isUserFinishedSetup(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
3216
|
+
addStep({
|
|
3217
|
+
type: store.SSOStepTypeType.SETUP_FULL,
|
|
3218
|
+
config: {
|
|
3219
|
+
userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
|
|
3220
|
+
},
|
|
3221
|
+
});
|
|
3222
|
+
goNext();
|
|
3223
|
+
return;
|
|
3224
|
+
}
|
|
3004
3225
|
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3005
3226
|
});
|
|
3006
3227
|
return (React__default["default"].createElement("form", { style: {
|
|
@@ -3049,6 +3270,47 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3049
3270
|
React__default["default"].createElement(index$4.Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Sign In" }, t('ssov2.password.signIn'))));
|
|
3050
3271
|
};
|
|
3051
3272
|
|
|
3273
|
+
const SetupLater = ({ style = {} }) => {
|
|
3274
|
+
const { t } = index.useTranslations();
|
|
3275
|
+
const { onClose, tracking } = useSSOState();
|
|
3276
|
+
const [loading, setLoading] = React.useState(false);
|
|
3277
|
+
const { userInfo, flowData } = store.useSSOV2Store();
|
|
3278
|
+
const { currentStepIndex, steps, addStep, goNext } = store.useSSOSteps();
|
|
3279
|
+
const currentStep = steps[currentStepIndex];
|
|
3280
|
+
const onClickSetupLater = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3281
|
+
if (loading)
|
|
3282
|
+
return;
|
|
3283
|
+
setLoading(true);
|
|
3284
|
+
if (userInfo &&
|
|
3285
|
+
!store.isUserFinishedSetup(userInfo) &&
|
|
3286
|
+
((currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === store.SSOStepTypeType.VERIFY_PHONE ||
|
|
3287
|
+
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === store.SSOStepTypeType.FORGOT_PASSWORD_PHONE)) {
|
|
3288
|
+
addStep({
|
|
3289
|
+
type: store.SSOStepTypeType.SETUP_FULL,
|
|
3290
|
+
config: {
|
|
3291
|
+
userInfo,
|
|
3292
|
+
},
|
|
3293
|
+
});
|
|
3294
|
+
goNext();
|
|
3295
|
+
}
|
|
3296
|
+
else if (!store.isFlowFinishedSetup(flowData) &&
|
|
3297
|
+
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === store.SSOStepTypeType.VERIFY_PHONE) {
|
|
3298
|
+
addStep({
|
|
3299
|
+
type: store.SSOStepTypeType.SETUP_FULL,
|
|
3300
|
+
config: {
|
|
3301
|
+
userInfo,
|
|
3302
|
+
},
|
|
3303
|
+
});
|
|
3304
|
+
goNext();
|
|
3305
|
+
}
|
|
3306
|
+
else {
|
|
3307
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3308
|
+
}
|
|
3309
|
+
setLoading(false);
|
|
3310
|
+
});
|
|
3311
|
+
return (React__default["default"].createElement(index$4.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')));
|
|
3312
|
+
};
|
|
3313
|
+
|
|
3052
3314
|
const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
3053
3315
|
const phone = config === null || config === void 0 ? void 0 : config.phone;
|
|
3054
3316
|
const { t } = index.useTranslations();
|
|
@@ -3096,7 +3358,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3096
3358
|
config: {
|
|
3097
3359
|
phone,
|
|
3098
3360
|
otpType: 'phone-zalo',
|
|
3099
|
-
afterAction: 'forgot',
|
|
3361
|
+
afterAction: config.afterAction || 'forgot',
|
|
3100
3362
|
provider: (_b = userExist._data) === null || _b === void 0 ? void 0 : _b.provider,
|
|
3101
3363
|
},
|
|
3102
3364
|
});
|
|
@@ -3139,7 +3401,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3139
3401
|
config: {
|
|
3140
3402
|
phone,
|
|
3141
3403
|
otpType: 'phone-sms',
|
|
3142
|
-
afterAction: 'forgot',
|
|
3404
|
+
afterAction: config.afterAction || 'forgot',
|
|
3143
3405
|
provider: (_d = userExist._data) === null || _d === void 0 ? void 0 : _d.provider,
|
|
3144
3406
|
},
|
|
3145
3407
|
});
|
|
@@ -3167,7 +3429,8 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3167
3429
|
isError: !!errMsg, required: true, disabled: true, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone" }),
|
|
3168
3430
|
errMsg && (React__default["default"].createElement(index$3.Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
|
|
3169
3431
|
React__default["default"].createElement(index$4.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo" }, t('ssov2.button.continueZalo')),
|
|
3170
|
-
React__default["default"].createElement(index$4.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'))
|
|
3432
|
+
React__default["default"].createElement(index$4.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')),
|
|
3433
|
+
React__default["default"].createElement(SetupLater, null))));
|
|
3171
3434
|
};
|
|
3172
3435
|
|
|
3173
3436
|
const CheckGrayIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -3208,11 +3471,12 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3208
3471
|
const { t } = index.useTranslations();
|
|
3209
3472
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
3210
3473
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
3211
|
-
const { setTracking } = useSSOState();
|
|
3212
|
-
const {
|
|
3474
|
+
const { setTracking, onClose } = useSSOState();
|
|
3475
|
+
const { addStep, goNext } = store.useSSOSteps();
|
|
3476
|
+
const { flowData, setUserInfo } = store.useSSOV2Store();
|
|
3213
3477
|
const trackingMethod = flowData.method;
|
|
3214
3478
|
const trackingCategory = `SSO - Sign In via ${trackingMethod}`;
|
|
3215
|
-
const trackingAction = `Setup
|
|
3479
|
+
const trackingAction = `Setup Password`;
|
|
3216
3480
|
React.useEffect(() => {
|
|
3217
3481
|
if (!hidden) {
|
|
3218
3482
|
setErrMsg('');
|
|
@@ -3247,22 +3511,66 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3247
3511
|
password.length <= 50 &&
|
|
3248
3512
|
password.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/) &&
|
|
3249
3513
|
password === confirmPassword) {
|
|
3250
|
-
const
|
|
3514
|
+
const isPhoneOrEmailFlow = isPhoneFlowFn(flowData) || isEmailFlowFn(flowData);
|
|
3515
|
+
const res = isPhoneOrEmailFlow
|
|
3516
|
+
? yield store.updateUserInfo({
|
|
3517
|
+
password,
|
|
3518
|
+
confirm_password: confirmPassword,
|
|
3519
|
+
validate: '',
|
|
3520
|
+
})
|
|
3521
|
+
: yield store.resetPassword(password, confirmPassword);
|
|
3251
3522
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3523
|
+
if (isPhoneOrEmailFlow) {
|
|
3524
|
+
store.handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
3525
|
+
const userInfo = yield store.getUserInfo();
|
|
3526
|
+
// Phone
|
|
3527
|
+
if (isPhoneFlowFn(flowData)) {
|
|
3528
|
+
if (userInfo && !store.isUserFinishedSetup(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
3529
|
+
addStep({
|
|
3530
|
+
type: store.SSOStepTypeType.SETUP_FULL,
|
|
3531
|
+
config: {
|
|
3532
|
+
userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
|
|
3533
|
+
},
|
|
3534
|
+
});
|
|
3535
|
+
goNext();
|
|
3536
|
+
}
|
|
3537
|
+
else {
|
|
3538
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3539
|
+
}
|
|
3540
|
+
}
|
|
3541
|
+
// Email
|
|
3542
|
+
if (isEmailFlowFn(flowData)) {
|
|
3543
|
+
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
3544
|
+
if (store.isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
3545
|
+
addStep({
|
|
3546
|
+
type: store.SSOStepTypeType.VERIFY_PHONE,
|
|
3547
|
+
config: {
|
|
3548
|
+
provider: 'email',
|
|
3549
|
+
},
|
|
3550
|
+
});
|
|
3551
|
+
goNext();
|
|
3552
|
+
}
|
|
3553
|
+
else {
|
|
3554
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3555
|
+
}
|
|
3556
|
+
}
|
|
3262
3557
|
}
|
|
3263
3558
|
else {
|
|
3264
|
-
|
|
3265
|
-
|
|
3559
|
+
useMantineLocale.showNotification({
|
|
3560
|
+
type: 'success',
|
|
3561
|
+
message: 'Password has been reset successfully',
|
|
3562
|
+
});
|
|
3563
|
+
// back to login step
|
|
3564
|
+
const foundPasswordIndex = steps.findIndex((step) => step.type === store.SSOStepTypeType.PASSWORD);
|
|
3565
|
+
if (foundPasswordIndex === -1) {
|
|
3566
|
+
// reset to first step
|
|
3567
|
+
setSteps((s) => [s[0]]);
|
|
3568
|
+
store.useSSOSteps.setState({ currentStepIndex: 0 });
|
|
3569
|
+
}
|
|
3570
|
+
else {
|
|
3571
|
+
setSteps((s) => s.slice(0, foundPasswordIndex + 1));
|
|
3572
|
+
store.useSSOSteps.setState({ currentStepIndex: foundPasswordIndex });
|
|
3573
|
+
}
|
|
3266
3574
|
}
|
|
3267
3575
|
// onClose?.()
|
|
3268
3576
|
}
|
|
@@ -3290,7 +3598,9 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
3290
3598
|
action: trackingAction,
|
|
3291
3599
|
} }),
|
|
3292
3600
|
errMsg && (React__default["default"].createElement(index$3.Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
|
|
3293
|
-
React__default["default"].createElement(index$4.Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label":
|
|
3601
|
+
React__default["default"].createElement(index$4.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'
|
|
3602
|
+
? t('ssov2.setup.button.createAccount')
|
|
3603
|
+
: t('ssov2.button.save')))));
|
|
3294
3604
|
};
|
|
3295
3605
|
|
|
3296
3606
|
const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
@@ -3311,6 +3621,7 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3311
3621
|
});
|
|
3312
3622
|
}
|
|
3313
3623
|
}, [hidden]);
|
|
3624
|
+
const { source } = store.useSSOV2Store();
|
|
3314
3625
|
const { addStep, goNext } = store.useSSOSteps();
|
|
3315
3626
|
const onClickContinueZalo = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3316
3627
|
setLoading(true);
|
|
@@ -3410,7 +3721,8 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
3410
3721
|
setErrMsg('');
|
|
3411
3722
|
}, isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone" })),
|
|
3412
3723
|
React__default["default"].createElement(index$4.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo" }, t('ssov2.button.continueZalo')),
|
|
3413
|
-
React__default["default"].createElement(index$4.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'))
|
|
3724
|
+
React__default["default"].createElement(index$4.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')),
|
|
3725
|
+
source !== 'care_onboarding' && source !== 'ecom' && React__default["default"].createElement(SetupLater, null)))));
|
|
3414
3726
|
};
|
|
3415
3727
|
|
|
3416
3728
|
const FemaleIcon = () => (React__default["default"].createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -3442,39 +3754,19 @@ const MaleIcon = () => (React__default["default"].createElement("svg", { width:
|
|
|
3442
3754
|
React__default["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" }),
|
|
3443
3755
|
React__default["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" })));
|
|
3444
3756
|
|
|
3757
|
+
// import { StyledPhone } from '../components/phone'
|
|
3445
3758
|
// always has name, gender dob
|
|
3446
|
-
const OtherSetup = ({ form,
|
|
3759
|
+
const OtherSetup = ({ form,
|
|
3760
|
+
// needPhone,
|
|
3761
|
+
// skipPhone,
|
|
3762
|
+
needEmail, isEmailDisable,
|
|
3763
|
+
// isPhoneDisabled,
|
|
3764
|
+
loading, tracking, }) => {
|
|
3447
3765
|
const { t } = index.useTranslations();
|
|
3448
|
-
const { locale = 'vi-VN' } = useSSOState()
|
|
3766
|
+
// const { locale = 'vi-VN' } = useSSOState()
|
|
3449
3767
|
const { setupSource } = store.useSSOV2Store();
|
|
3450
3768
|
const [dobChanged, setDobChanged] = React__default["default"].useState(false);
|
|
3451
3769
|
return (React__default["default"].createElement(core.Stack, { spacing: 12 },
|
|
3452
|
-
needPhone && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
3453
|
-
React__default["default"].createElement(index$5.Input.Wrapper, Object.assign({ label: t('ssov2.setup.field.phone.label'), withAsterisk: true }, form.getInputProps('phone')),
|
|
3454
|
-
React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: form.getInputProps('phone').value, onChange: (value) => {
|
|
3455
|
-
form.setFieldValue('phone', value);
|
|
3456
|
-
}, 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" })),
|
|
3457
|
-
!skipPhone && (React__default["default"].createElement(core.Group, { spacing: 24 },
|
|
3458
|
-
React__default["default"].createElement(index$3.Text, { size: "p4" }, t('ssov2.setup.field.otp.label')),
|
|
3459
|
-
React__default["default"].createElement(index$5.Radio.Group, Object.assign({ name: "otpMethod", styles: {
|
|
3460
|
-
root: {
|
|
3461
|
-
display: 'flex',
|
|
3462
|
-
flexDirection: 'row',
|
|
3463
|
-
flexWrap: 'wrap',
|
|
3464
|
-
gap: 24,
|
|
3465
|
-
},
|
|
3466
|
-
} }, form.getInputProps('otpMethod')),
|
|
3467
|
-
React__default["default"].createElement(index$5.Radio, { value: "zalo", label: "Zalo", styles: {
|
|
3468
|
-
label: {
|
|
3469
|
-
paddingLeft: 8,
|
|
3470
|
-
},
|
|
3471
|
-
}, 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" }),
|
|
3472
|
-
React__default["default"].createElement(index$5.Radio, { value: "sms", label: "SMS", styles: {
|
|
3473
|
-
label: {
|
|
3474
|
-
paddingLeft: 8,
|
|
3475
|
-
},
|
|
3476
|
-
}, 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" })))))),
|
|
3477
|
-
needEmail && (React__default["default"].createElement(index$5.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')))),
|
|
3478
3770
|
React__default["default"].createElement(index$5.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'))),
|
|
3479
3771
|
React__default["default"].createElement(index$5.Input.Wrapper, Object.assign({ label: t('ssov2.setup.field.gender.label'), withAsterisk: true }, form.getInputProps('gender')),
|
|
3480
3772
|
React__default["default"].createElement(core.Group, null,
|
|
@@ -3489,7 +3781,7 @@ const OtherSetup = ({ form, needPhone, skipPhone, needEmail, isEmailDisable, isP
|
|
|
3489
3781
|
? 'secondary'
|
|
3490
3782
|
: 'tertiary', onClick: () => {
|
|
3491
3783
|
form.setFieldValue('gender', 'female');
|
|
3492
|
-
}, leftIcon: React__default["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
|
|
3784
|
+
}, leftIcon: React__default["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')),
|
|
3493
3785
|
React__default["default"].createElement(index$4.Button, { type: "button", styles: {
|
|
3494
3786
|
root: {
|
|
3495
3787
|
flex: 1,
|
|
@@ -3501,7 +3793,7 @@ const OtherSetup = ({ form, needPhone, skipPhone, needEmail, isEmailDisable, isP
|
|
|
3501
3793
|
? 'secondary'
|
|
3502
3794
|
: 'tertiary', onClick: () => {
|
|
3503
3795
|
form.setFieldValue('gender', 'male');
|
|
3504
|
-
}, leftIcon: React__default["default"].createElement(MaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender
|
|
3796
|
+
}, leftIcon: React__default["default"].createElement(MaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender" }, t('ssov2.setup.field.gender.male')))),
|
|
3505
3797
|
React__default["default"].createElement(index$7.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) => {
|
|
3506
3798
|
form.getInputProps('dob').onChange(e);
|
|
3507
3799
|
setDobChanged(true);
|
|
@@ -3509,9 +3801,13 @@ const OtherSetup = ({ form, needPhone, skipPhone, needEmail, isEmailDisable, isP
|
|
|
3509
3801
|
if (!form.getInputProps('dob').value && !dobChanged)
|
|
3510
3802
|
return;
|
|
3511
3803
|
form.getInputProps('dob').onBlur(e);
|
|
3512
|
-
} }))
|
|
3804
|
+
} })),
|
|
3805
|
+
needEmail && (React__default["default"].createElement(index$5.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: {
|
|
3806
|
+
display: isEmailDisable ? 'none' : 'block',
|
|
3807
|
+
} }, form.getInputProps('email'))))));
|
|
3513
3808
|
};
|
|
3514
3809
|
|
|
3810
|
+
// import { SSOPasswordWithConfirm } from '../passwordForgotSetup/passwordWithConfirm'
|
|
3515
3811
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3516
3812
|
const getDefaultData = (data) => {
|
|
3517
3813
|
try {
|
|
@@ -3537,7 +3833,6 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3537
3833
|
var _a, _b, _c;
|
|
3538
3834
|
const { onClose, setTracking } = useSSOState();
|
|
3539
3835
|
const { t } = index.useTranslations();
|
|
3540
|
-
const { goNext, addStep } = store.useSSOSteps();
|
|
3541
3836
|
const { setupSource, flowData } = store.useSSOV2Store();
|
|
3542
3837
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
3543
3838
|
const userInfo = config === null || config === void 0 ? void 0 : config.userInfo;
|
|
@@ -3547,13 +3842,6 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3547
3842
|
const provider = (_a = config === null || config === void 0 ? void 0 : config.userInfo) === null || _a === void 0 ? void 0 : _a.provider;
|
|
3548
3843
|
const authFlow = flowData === null || flowData === void 0 ? void 0 : flowData.flow;
|
|
3549
3844
|
const defaultData = getDefaultData(config === null || config === void 0 ? void 0 : config.setupDefaultData);
|
|
3550
|
-
const needPass = (authMethod === 'phone' ||
|
|
3551
|
-
authMethod === 'zalo' ||
|
|
3552
|
-
authMethod === 'sms' ||
|
|
3553
|
-
authMethod === 'email' ||
|
|
3554
|
-
provider === 'email' ||
|
|
3555
|
-
provider === 'phone') &&
|
|
3556
|
-
!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.is_pass);
|
|
3557
3845
|
const skipPhone = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone) && !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone_verified_at);
|
|
3558
3846
|
const isPhoneDisabled = !!(configPhone || (defaultData === null || defaultData === void 0 ? void 0 : defaultData.phone) || skipPhone);
|
|
3559
3847
|
const needPhone = authFlow === 'signup' &&
|
|
@@ -3573,8 +3861,6 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3573
3861
|
!(flowData === null || flowData === void 0 ? void 0 : flowData.isVerifyPhone) ||
|
|
3574
3862
|
authMethod === 'facebook' ||
|
|
3575
3863
|
provider === 'facebook';
|
|
3576
|
-
// const needPhone = !userInfo?.phone_verified_at
|
|
3577
|
-
// const needEmail = authFlow !== 'verify-phone'
|
|
3578
3864
|
const isEmailDisable = (defaultEmail &&
|
|
3579
3865
|
(authMethod === 'google' ||
|
|
3580
3866
|
authMethod === 'email' ||
|
|
@@ -3582,7 +3868,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3582
3868
|
provider === 'email')) ||
|
|
3583
3869
|
(!!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email_verified_at));
|
|
3584
3870
|
const trackingCategory = `SSO - ${authFlow === 'signup' ? 'Sign Up' : 'Existing Users'} via ${authMethod || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.provider)}`;
|
|
3585
|
-
const trackingAction = '
|
|
3871
|
+
const trackingAction = 'Add Information';
|
|
3586
3872
|
React.useEffect(() => {
|
|
3587
3873
|
if (!hidden) {
|
|
3588
3874
|
setErrMsg('');
|
|
@@ -3611,30 +3897,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3611
3897
|
? dayjs__default["default"](defaultData.birthday, 'MM/DD/YYYY').toDate()
|
|
3612
3898
|
: undefined }),
|
|
3613
3899
|
validateInputOnBlur: true,
|
|
3614
|
-
validate: form.yupResolver(yup__namespace.object().shape(Object.assign(Object.assign(
|
|
3615
|
-
? {
|
|
3616
|
-
password: yup__namespace
|
|
3617
|
-
.string()
|
|
3618
|
-
.required(t('ssov2.validate.password.required'))
|
|
3619
|
-
.min(8, ' ')
|
|
3620
|
-
.max(50, ' ')
|
|
3621
|
-
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/, ' '),
|
|
3622
|
-
confirmPassword: yup__namespace
|
|
3623
|
-
.string()
|
|
3624
|
-
.required(t('ssov2.validate.confirmPassword.required'))
|
|
3625
|
-
.test('passwords-match', t('ssov2.validate.confirmPassword.match'), function (value) {
|
|
3626
|
-
return this.parent.password === value;
|
|
3627
|
-
}),
|
|
3628
|
-
}
|
|
3629
|
-
: {})), (needPhone
|
|
3630
|
-
? Object.assign({ phone: yup__namespace.string().required(t('ssov2.validate.phone.required')) }, (!skipPhone
|
|
3631
|
-
? {
|
|
3632
|
-
otpMethod: yup__namespace
|
|
3633
|
-
.string()
|
|
3634
|
-
.required(t('ssov2.validate.otp.required'))
|
|
3635
|
-
.oneOf(['zalo', 'sms']),
|
|
3636
|
-
}
|
|
3637
|
-
: {})) : {})), (needEmail
|
|
3900
|
+
validate: form.yupResolver(yup__namespace.object().shape(Object.assign(Object.assign({}, (needEmail
|
|
3638
3901
|
? {
|
|
3639
3902
|
email: setupSource === 'care'
|
|
3640
3903
|
? yup__namespace
|
|
@@ -3651,15 +3914,13 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3651
3914
|
const onSubmit = (values) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3652
3915
|
setLoading(true);
|
|
3653
3916
|
try {
|
|
3654
|
-
const {
|
|
3917
|
+
const { phone, gender, name, dob } = values;
|
|
3655
3918
|
const { phoneNumber, areaCode } = splitPhone(phone || configPhone || '');
|
|
3656
3919
|
// validate only, delay set data to after otp
|
|
3657
3920
|
const res = yield store.updateUserInfo({
|
|
3658
3921
|
name,
|
|
3659
3922
|
birthday: dayjs__default["default"](dob).format('YYYY-MM-DD'),
|
|
3660
3923
|
email: values.email || undefined,
|
|
3661
|
-
password,
|
|
3662
|
-
confirm_password: confirmPassword,
|
|
3663
3924
|
phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
|
|
3664
3925
|
area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '84',
|
|
3665
3926
|
gender: gender === 'male' ? 1 : 0,
|
|
@@ -3667,80 +3928,23 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3667
3928
|
validate: 'true',
|
|
3668
3929
|
});
|
|
3669
3930
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
if (otpMethod === 'zalo') {
|
|
3684
|
-
const res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
3685
|
-
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
3686
|
-
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3687
|
-
return setLoading(false);
|
|
3688
|
-
}
|
|
3689
|
-
addStep({
|
|
3690
|
-
type: store.SSOStepTypeType.OTP,
|
|
3691
|
-
config: {
|
|
3692
|
-
phone,
|
|
3693
|
-
otpType: 'phone-zalo',
|
|
3694
|
-
isUpdatePhone: true,
|
|
3695
|
-
afterAction: 'submitSetup',
|
|
3696
|
-
setupData,
|
|
3697
|
-
provider,
|
|
3698
|
-
},
|
|
3699
|
-
});
|
|
3700
|
-
goNext();
|
|
3701
|
-
}
|
|
3702
|
-
else {
|
|
3703
|
-
const res = yield resendUpdatePhoneOTP(phoneNumber, areaCode);
|
|
3704
|
-
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
3705
|
-
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3706
|
-
return setLoading(false);
|
|
3707
|
-
}
|
|
3708
|
-
addStep({
|
|
3709
|
-
type: store.SSOStepTypeType.OTP,
|
|
3710
|
-
config: {
|
|
3711
|
-
phone,
|
|
3712
|
-
otpType: 'phone-sms',
|
|
3713
|
-
isUpdatePhone: true,
|
|
3714
|
-
afterAction: 'submitSetup',
|
|
3715
|
-
setupData,
|
|
3716
|
-
provider,
|
|
3717
|
-
},
|
|
3718
|
-
});
|
|
3719
|
-
goNext();
|
|
3720
|
-
}
|
|
3931
|
+
const res = yield store.updateUserInfo({
|
|
3932
|
+
name,
|
|
3933
|
+
birthday: dayjs__default["default"](dob).format('YYYY-MM-DD'),
|
|
3934
|
+
email: values.email || undefined,
|
|
3935
|
+
phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
|
|
3936
|
+
area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code),
|
|
3937
|
+
gender: gender === 'male' ? 1 : 0,
|
|
3938
|
+
source: setupSource,
|
|
3939
|
+
validate: '',
|
|
3940
|
+
});
|
|
3941
|
+
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3942
|
+
store.handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
3943
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3721
3944
|
}
|
|
3722
3945
|
else {
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
name,
|
|
3726
|
-
birthday: dayjs__default["default"](dob).format('YYYY-MM-DD'),
|
|
3727
|
-
email: values.email || undefined,
|
|
3728
|
-
password,
|
|
3729
|
-
confirm_password: confirmPassword,
|
|
3730
|
-
phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
|
|
3731
|
-
area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code),
|
|
3732
|
-
gender: gender === 'male' ? 1 : 0,
|
|
3733
|
-
source: setupSource,
|
|
3734
|
-
validate: '',
|
|
3735
|
-
});
|
|
3736
|
-
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3737
|
-
store.handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
3738
|
-
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3739
|
-
}
|
|
3740
|
-
else {
|
|
3741
|
-
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3742
|
-
return setLoading(false);
|
|
3743
|
-
}
|
|
3946
|
+
setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3947
|
+
return setLoading(false);
|
|
3744
3948
|
}
|
|
3745
3949
|
}
|
|
3746
3950
|
else {
|
|
@@ -3761,24 +3965,13 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
3761
3965
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
3762
3966
|
React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" }, t('ssov2.setup.title')),
|
|
3763
3967
|
React__default["default"].createElement(index$3.Text, { size: "p4" }, t('ssov2.setup.description'))),
|
|
3764
|
-
needPass && (React__default["default"].createElement(SSOPasswordWithConfirm, { form: form$1, loading: loading, tracking: {
|
|
3765
|
-
category: trackingCategory,
|
|
3766
|
-
action: trackingAction,
|
|
3767
|
-
} })),
|
|
3768
3968
|
React__default["default"].createElement(OtherSetup, { needPhone: needPhone, skipPhone: skipPhone, needEmail: needEmail, isEmailDisable: isEmailDisable, isPhoneDisabled: isPhoneDisabled, form: form$1, loading: loading, tracking: {
|
|
3769
3969
|
category: trackingCategory,
|
|
3770
3970
|
action: trackingAction,
|
|
3771
3971
|
} }),
|
|
3772
3972
|
errMsg && (React__default["default"].createElement(index$3.Text, { color: "red.6", size: "p4" }, errMsg)),
|
|
3773
|
-
React__default["default"].createElement(index$4.Button, { type: "submit", variant: "primary", fullWidth: true, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label":
|
|
3774
|
-
|
|
3775
|
-
: authFlow === 'signup'
|
|
3776
|
-
? 'Create New Account'
|
|
3777
|
-
: 'Save' }, needPhone && !skipPhone
|
|
3778
|
-
? t('ssov2.setup.button.veriyPhone')
|
|
3779
|
-
: authFlow === 'signup'
|
|
3780
|
-
? t('ssov2.setup.button.createAccount')
|
|
3781
|
-
: t('ssov2.button.save')))));
|
|
3973
|
+
React__default["default"].createElement(index$4.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')),
|
|
3974
|
+
React__default["default"].createElement(SetupLater, { style: { marginTop: -8 } }))));
|
|
3782
3975
|
};
|
|
3783
3976
|
|
|
3784
3977
|
// import {
|
|
@@ -3887,6 +4080,20 @@ const SSOScreenRenderer = () => {
|
|
|
3887
4080
|
})));
|
|
3888
4081
|
};
|
|
3889
4082
|
|
|
4083
|
+
if (!Array.prototype.findLastIndex) {
|
|
4084
|
+
Array.prototype.findLastIndex = function (callback, thisArg) {
|
|
4085
|
+
for (let i = this.length - 1; i >= 0; i--) {
|
|
4086
|
+
if (callback.call(thisArg, this[i], i, this))
|
|
4087
|
+
return i;
|
|
4088
|
+
}
|
|
4089
|
+
return -1;
|
|
4090
|
+
};
|
|
4091
|
+
}
|
|
4092
|
+
if (!String.prototype.capitalize) {
|
|
4093
|
+
String.prototype.capitalize = function () {
|
|
4094
|
+
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
4095
|
+
};
|
|
4096
|
+
}
|
|
3890
4097
|
const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
3891
4098
|
const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, forceReloadOnClose, } = store.useSSOV2Store();
|
|
3892
4099
|
React.useEffect(() => {
|