@hhgtech/hhg-components 1.29.409 → 1.29.410
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/build/{InputDate-d86c9a58.js → InputDate-b470654c.js} +3 -3
- package/build/{LastPeriod-75c68a79.js → LastPeriod-a5b7e73a.js} +1 -1
- package/build/{MobileBottomNavigationIcon-23850ab3.js → MobileBottomNavigationIcon-8fed2997.js} +10 -10
- package/build/{Spinner-328dd3b2.js → Spinner-fbf2aa2a.js} +1 -1
- package/build/{WhatsApp-34b0c2b4.js → WhatsApp-d3476293.js} +1 -1
- package/build/adapters.js +19 -19
- package/build/atoms.js +48 -48
- 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/button/index.styles.d.ts +1 -0
- package/build/components/molecules/mobileBottomNavigation/index.d.ts +1 -0
- package/build/components/molecules/mobileBottomNavigation/index.styled.d.ts +1 -0
- package/build/components.js +97 -97
- package/build/{constants-87397721.js → constants-7d332bd1.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-f40327af.js → core-be69156f.js} +1 -1
- package/build/{dataTransform-30b2b70b.js → dataTransform-1553c091.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-0edf97dd.js → editor-abf581d9.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/{InputDate-0ad31feb.js → InputDate-d39313b4.js} +3 -3
- package/build/esm/{LastPeriod-18fcca2f.js → LastPeriod-01db5349.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-609c80a3.js → MobileBottomNavigationIcon-c8a6586d.js} +10 -10
- package/build/esm/{Spinner-04f7882b.js → Spinner-a80dd1a6.js} +1 -1
- package/build/esm/{WhatsApp-4cb38334.js → WhatsApp-c0b83857.js} +1 -1
- package/build/esm/adapters.js +19 -19
- package/build/esm/atoms.js +48 -48
- 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/button/index.styles.d.ts +1 -0
- package/build/esm/components/molecules/mobileBottomNavigation/index.d.ts +1 -0
- package/build/esm/components/molecules/mobileBottomNavigation/index.styled.d.ts +1 -0
- package/build/esm/components.js +97 -97
- package/build/esm/{constants-65f1817f.js → constants-44fc8ce7.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-cdbd4148.js → core-82d361f1.js} +1 -1
- package/build/esm/{dataTransform-28fd8925.js → dataTransform-5b6b2dcb.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-da3bb487.js → editor-1aed1687.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/footer.js +21 -21
- package/build/esm/gAssets.js +2 -2
- package/build/esm/{healthTools-4a5e8f74.js → healthTools-1c89749a.js} +1 -1
- package/build/esm/healthToolsCardWrapper.js +18 -18
- package/build/esm/healthToolsForm.js +33 -33
- package/build/esm/hooks/useScrollTo.d.ts +1 -0
- package/build/esm/hooks/useVirtualKeyboard.d.ts +6 -0
- package/build/esm/hooks.js +13 -13
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-b1d26654.js → index-044d67b3.js} +11 -11
- package/build/esm/{index-914a61f1.js → index-05a0b1a0.js} +13 -13
- package/build/esm/{index-327ed244.js → index-08551aae.js} +4 -4
- package/build/esm/{index-256aba74.js → index-098bc92f.js} +18 -18
- package/build/esm/{index-29d1cecb.js → index-0ab475a3.js} +3 -3
- package/build/esm/{index-370a78fe.js → index-149adcd4.js} +6 -6
- package/build/esm/{index-5e9d919b.js → index-174b961f.js} +7 -7
- package/build/esm/{index-e61bc67f.js → index-178fc49e.js} +3 -3
- package/build/esm/{index-8a3ca938.js → index-188fc0ab.js} +32 -32
- package/build/esm/{index-050f3680.js → index-18ecb56d.js} +2 -2
- package/build/esm/{index-7dea7904.js → index-1badfe41.js} +6 -6
- package/build/esm/{index-2694afc1.js → index-23ba6711.js} +2 -2
- package/build/esm/{index-1ed9eedf.js → index-265c599c.js} +1 -1
- package/build/esm/{index-2a53afac.js → index-2772bfd3.js} +16 -16
- package/build/esm/{index-55aa1d77.js → index-2ea001fb.js} +7 -7
- package/build/esm/{index-c9d44c47.js → index-33c2c3b1.js} +2 -2
- package/build/esm/{index-af9bf8f9.js → index-3b8476a5.js} +18 -18
- package/build/esm/{index-3f57b9ba.js → index-3debc0f8.js} +2 -2
- package/build/esm/{index-7f8a67a6.js → index-48ceac41.js} +25 -25
- package/build/esm/{index-1c4d94fa.js → index-49decbc7.js} +3 -3
- package/build/esm/{index-53012fa1.js → index-4bac77ee.js} +21 -21
- package/build/esm/{index-3f4f22ae.js → index-4cdd7da3.js} +3 -3
- package/build/esm/{index-d64ef94a.js → index-4d741d84.js} +2 -2
- package/build/esm/{index-bb7bd9cb.js → index-5467f483.js} +16 -16
- package/build/esm/{index-e73d6471.js → index-5a50ba0c.js} +17 -17
- package/build/esm/{index-a279126e.js → index-5cf7e162.js} +10 -10
- package/build/esm/{index-b3e36592.js → index-6aff0e32.js} +6 -6
- package/build/esm/{index-fc4af817.js → index-6e605c38.js} +1 -1
- package/build/esm/{index-15616477.js → index-6f3409b2.js} +11 -11
- package/build/esm/{index-4b7ecded.js → index-6f7bfec4.js} +1 -1
- package/build/esm/{index-f34c6fea.js → index-6fd99785.js} +2 -2
- package/build/esm/{index-b346950c.js → index-7647451b.js} +6 -6
- package/build/esm/{index-833c504d.js → index-768eca3c.js} +2 -2
- package/build/esm/{index-d9e0b0f7.js → index-7a6729e8.js} +2 -2
- package/build/esm/{index-8185ff89.js → index-7d02c5ab.js} +6 -6
- package/build/esm/{index-e8beeb0e.js → index-81d77f68.js} +16 -16
- package/build/esm/{index-7b2aa32a.js → index-86035b43.js} +3 -3
- package/build/esm/{index-53a72182.js → index-8a031ec3.js} +1 -1
- package/build/esm/{index-da2ad68a.js → index-8e441f24.js} +17 -17
- package/build/esm/{index-cc4ddef1.js → index-948c1db7.js} +13 -13
- package/build/esm/{index-e7cf2188.js → index-98a0661f.js} +2 -2
- package/build/esm/{index-126fbcd1.js → index-99f8bc19.js} +5 -1
- package/build/esm/{index-00d4af32.js → index-9b0e1d6f.js} +1 -1
- package/build/esm/{index-9d732e1b.js → index-9cc54027.js} +3 -3
- package/build/esm/{index-bbd22e4c.js → index-9d76b90d.js} +30 -30
- package/build/esm/{index-dee78f6d.js → index-a567b90e.js} +22 -22
- package/build/esm/{index-485fbe34.js → index-af02b9fe.js} +1 -1
- package/build/esm/{index-163f1c53.js → index-aff40434.js} +5 -5
- package/build/esm/{index-3d4793a1.js → index-b62ba2ff.js} +2 -2
- package/build/esm/{index-d7d39dae.js → index-b8c609c2.js} +2 -2
- package/build/esm/{index-77ba81dc.js → index-bc93117f.js} +15 -15
- package/build/esm/{index-97dc1595.js → index-be412788.js} +4 -4
- package/build/esm/{index-d98769d5.js → index-c0051fc3.js} +13 -13
- package/build/esm/{index-8a66087e.js → index-c72a7032.js} +2 -2
- package/build/esm/{index-202b3ba5.js → index-c7d2906f.js} +31 -31
- package/build/esm/{index-3451b9bc.js → index-c7daacf8.js} +13 -13
- package/build/esm/{index-e3099f88.js → index-cbf80fbe.js} +16 -16
- package/build/esm/{index-ed4f26f6.js → index-d2734548.js} +2 -2
- package/build/esm/{index-8af129d3.js → index-d5e83eeb.js} +17 -17
- package/build/esm/{index-38189093.js → index-d8b7dd39.js} +5 -5
- package/build/esm/{index-7e039b09.js → index-e51892ab.js} +1 -1
- package/build/esm/{index-f3153b23.js → index-f5465d03.js} +17 -17
- package/build/esm/{index-ffaab18a.js → index-f7cd3cc6.js} +1 -1
- package/build/esm/{index-c950cbb1.js → index-f902c810.js} +24 -24
- package/build/esm/{index-a58077fe.js → index-f94625f3.js} +2 -2
- package/build/esm/index.js +118 -118
- package/build/esm/{labelSorting-7582fdfd.js → labelSorting-9016b4b0.js} +4 -4
- package/build/esm/lead/LeadGen.type.d.ts +3 -0
- package/build/esm/lead/layouts/centerTab.d.ts +3 -1
- package/build/esm/lead/layouts/inline.d.ts +2 -1
- package/build/esm/lead/layouts/lightbox/index.d.ts +2 -1
- package/build/esm/lead/newLeadPopup.d.ts +2 -1
- package/build/esm/lead/utils/formatFormData.d.ts +2 -1
- package/build/esm/lead/utils/formatTrackingData.d.ts +1 -0
- package/build/esm/lead.js +310 -134
- package/build/esm/{logoIcon-bee620b3.js → logoIcon-c5f3a1d7.js} +2 -2
- package/build/esm/mantine.js +25 -25
- package/build/esm/misc.js +17 -17
- 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 +7 -7
- package/build/esm/mobileBottomNavigationIcon.js +5 -5
- package/build/esm/molecules.js +74 -74
- package/build/esm/moleculesArticleCard.js +6 -6
- package/build/esm/moleculesArticleCardV2.js +16 -16
- package/build/esm/navigation.js +46 -46
- package/build/esm/navigationLogoutPopup.js +9 -9
- package/build/esm/navigationProfileButton.js +26 -26
- package/build/esm/onboardingV2.js +29 -29
- package/build/esm/organisms.js +50 -50
- package/build/esm/{post-c1230e03.js → post-74247854.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.js +30 -30
- package/build/esm/{store-c49a20ef.js → store-07dc10fe.js} +3 -3
- package/build/esm/subot.js +36 -36
- package/build/esm/surveyOrPremiumBanner.js +33 -33
- package/build/esm/surveyQuestionCard.js +10 -10
- package/build/esm/{surveyThankyouCard-65e073b3.js → surveyThankyouCard-1896e8a6.js} +5 -5
- package/build/esm/together.js +56 -56
- 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 +51 -51
- package/build/esm/togetherMoleculesCardAuthor.js +28 -28
- package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
- package/build/esm/togetherMoleculesProfileDetail.js +39 -39
- package/build/esm/togetherOrganisms.js +50 -50
- package/build/esm/togetherRichTextEditor.js +17 -17
- package/build/esm/togetherShareBox.js +10 -10
- package/build/esm/{translationsProvider-4b51e16e.js → translationsProvider-7203b02f.js} +1 -1
- package/build/esm/{treePopoverMenu-7c2a63d0.js → treePopoverMenu-ee3e923f.js} +19 -19
- package/build/esm/{types-4e376283.js → types-b4748e23.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-87fb83a5.js → useCategory-9fc7ed52.js} +5 -5
- package/build/esm/{useHealthToolCache-a345d325.js → useHealthToolCache-5c3bf4c6.js} +1 -1
- package/build/esm/{useMantineLocale-fbe1cc4b.js → useMantineLocale-852d98ca.js} +6 -6
- package/build/esm/{usePlacesAutocomplete-57581cbe.js → usePlacesAutocomplete-2114a712.js} +1 -1
- package/build/esm/{useScreenSize-4b2e3b33.js → useScreenSize-1c2fca51.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +10 -10
- package/build/esm/{utils-0d0df972.js → utils-0fb1f78e.js} +5 -5
- package/build/esm/{utils-6ec1332d.js → utils-14b6e2d4.js} +2 -2
- package/build/esm/{utils-d987af46.js → utils-4c7c5e43.js} +3 -3
- package/build/esm/{utils-c599099d.js → utils-c26d5c72.js} +2 -2
- package/build/esm/vaccination.js +21 -21
- package/build/footer.js +21 -21
- package/build/gAssets.js +2 -2
- package/build/{healthTools-6dff7f5b.js → healthTools-1e2dd684.js} +1 -1
- package/build/healthToolsCardWrapper.js +18 -18
- package/build/healthToolsForm.js +33 -33
- package/build/hooks/useScrollTo.d.ts +1 -0
- package/build/hooks/useVirtualKeyboard.d.ts +6 -0
- package/build/hooks.js +13 -13
- package/build/i18n.js +2 -2
- package/build/i18nV2.js +1 -1
- package/build/{index-649af0d7.js → index-006cff9c.js} +18 -18
- package/build/{index-fce4b525.js → index-05b9176a.js} +17 -17
- package/build/{index-ce081f8c.js → index-07bc4d6e.js} +6 -6
- package/build/{index-3c243d7b.js → index-0ce9af9a.js} +31 -31
- package/build/{index-84ce50e1.js → index-18dfa7f4.js} +13 -13
- package/build/{index-c8aea60d.js → index-1ab40e10.js} +2 -2
- package/build/{index-4db8d7ea.js → index-1b040010.js} +3 -3
- package/build/{index-00f329a6.js → index-1d965d0f.js} +1 -1
- package/build/{index-2e5d1740.js → index-2416d642.js} +4 -4
- package/build/{index-aed1a592.js → index-2781a411.js} +18 -18
- package/build/{index-b769f373.js → index-295751e1.js} +13 -13
- package/build/{index-fa07464d.js → index-2999ac0d.js} +16 -16
- package/build/{index-88d0e6db.js → index-2cec834f.js} +11 -11
- package/build/{index-42f42af3.js → index-35ef55bc.js} +10 -10
- package/build/{index-aa4cc3e2.js → index-3627589f.js} +2 -2
- package/build/{index-1b984213.js → index-393216c4.js} +2 -2
- package/build/{index-3591c38b.js → index-3a20bf76.js} +11 -11
- package/build/{index-38f7c96d.js → index-3a7aeda1.js} +1 -1
- package/build/{index-b5e77ca3.js → index-3ab869de.js} +5 -5
- package/build/{index-213a9d1a.js → index-3daff161.js} +2 -2
- package/build/{index-f0263cc6.js → index-409bb578.js} +1 -1
- package/build/{index-764ef4a7.js → index-44625662.js} +16 -16
- package/build/{index-bd784a95.js → index-56491c3f.js} +1 -1
- package/build/{index-f70a0a70.js → index-60d75e98.js} +16 -16
- package/build/{index-d89d38d6.js → index-61fe3b96.js} +30 -30
- package/build/{index-8698489a.js → index-64fd0fb3.js} +4 -4
- package/build/{index-e2ec2c94.js → index-682f2de7.js} +3 -3
- package/build/{index-d00d1aa8.js → index-698e8ff2.js} +7 -7
- package/build/{index-3878a900.js → index-763f9544.js} +3 -3
- package/build/{index-174bf646.js → index-786995f2.js} +2 -2
- package/build/{index-4afcd183.js → index-7b1974d6.js} +6 -6
- package/build/{index-3bb6c7e2.js → index-83fee24e.js} +2 -2
- package/build/{index-6b06c1ac.js → index-87d8bb0a.js} +17 -17
- package/build/{index-8cdc694a.js → index-925d653b.js} +5 -5
- package/build/{index-2a8ba3b1.js → index-964ae59a.js} +17 -17
- package/build/{index-b6ac22e0.js → index-9de247e8.js} +17 -17
- package/build/{index-8fa63da9.js → index-a12d64a7.js} +2 -2
- package/build/{index-f9933387.js → index-a3a64ccc.js} +22 -22
- package/build/{index-0885ff16.js → index-a3c6c38e.js} +13 -13
- package/build/{index-9613f09e.js → index-a8d1d275.js} +7 -7
- package/build/{index-37b31439.js → index-a9bb3dbd.js} +6 -6
- package/build/{index-9d4fcb4e.js → index-ab8e166d.js} +25 -25
- package/build/{index-f1ec68ad.js → index-ac2fbb7b.js} +32 -32
- package/build/{index-42ced1e4.js → index-acc5ba0b.js} +2 -2
- package/build/{index-4cea0956.js → index-aeb49f5a.js} +2 -2
- package/build/{index-2383046e.js → index-b0c4cd59.js} +2 -2
- package/build/{index-8f534e86.js → index-b4b22694.js} +3 -3
- package/build/{index-3fa5613f.js → index-c05a62aa.js} +3 -3
- package/build/{index-a870d7e7.js → index-c06cdf4f.js} +2 -2
- package/build/{index-57c95311.js → index-c09fdff3.js} +1 -1
- package/build/{index-b153f865.js → index-c515a0d1.js} +6 -6
- package/build/{index-09c639e6.js → index-c61ec8b9.js} +1 -1
- package/build/{index-ad5d9205.js → index-cb42ed3f.js} +2 -2
- package/build/{index-83bc596d.js → index-cddbfd39.js} +24 -24
- package/build/{index-a9052a05.js → index-cf87644b.js} +3 -3
- package/build/{index-ec1bfcc0.js → index-d201c0f9.js} +15 -15
- package/build/{index-82684087.js → index-dc7e1cd4.js} +5 -1
- package/build/{index-65d07ecc.js → index-dda1006f.js} +16 -16
- package/build/{index-dd1f8fac.js → index-e00d157e.js} +13 -13
- package/build/{index-e6811a66.js → index-e148b13e.js} +2 -2
- package/build/{index-2a03f152.js → index-e2521662.js} +2 -2
- package/build/{index-cafcda2a.js → index-e5f16815.js} +1 -1
- package/build/{index-de5dff61.js → index-e79f5a23.js} +1 -1
- package/build/{index-c10fc944.js → index-e95076dd.js} +21 -21
- package/build/{index-e32d8900.js → index-f5bc4984.js} +6 -6
- package/build/index.js +118 -118
- package/build/{labelSorting-ba052bc0.js → labelSorting-77b4848f.js} +4 -4
- package/build/lead/LeadGen.type.d.ts +3 -0
- package/build/lead/layouts/centerTab.d.ts +3 -1
- package/build/lead/layouts/inline.d.ts +2 -1
- package/build/lead/layouts/lightbox/index.d.ts +2 -1
- package/build/lead/newLeadPopup.d.ts +2 -1
- package/build/lead/utils/formatFormData.d.ts +2 -1
- package/build/lead/utils/formatTrackingData.d.ts +1 -0
- package/build/lead.js +311 -135
- package/build/{logoIcon-1fb938c2.js → logoIcon-c90f0a6d.js} +2 -2
- package/build/mantine.js +22 -22
- package/build/misc.js +17 -17
- package/build/miscGetDynamicHealthTool.js +4 -4
- package/build/miscGetSocialList.js +8 -8
- package/build/miscScreenSizeContext.js +1 -1
- package/build/mobileBottomNavigation.js +7 -7
- package/build/mobileBottomNavigationIcon.js +5 -5
- package/build/molecules.js +74 -74
- package/build/moleculesArticleCard.js +6 -6
- package/build/moleculesArticleCardV2.js +16 -16
- package/build/navigation.js +46 -46
- package/build/navigationLogoutPopup.js +9 -9
- package/build/navigationProfileButton.js +26 -26
- package/build/onboardingV2.js +28 -28
- package/build/organisms.js +50 -50
- package/build/{post-301aae8b.js → post-9f4e3c7b.js} +2 -2
- package/build/profileNavigation.js +19 -19
- package/build/progressBar.js +1 -1
- package/build/pwg.js +22 -22
- package/build/ssoV2.js +28 -28
- package/build/{store-4bbaa089.js → store-00258743.js} +3 -3
- package/build/subot.js +35 -35
- package/build/surveyOrPremiumBanner.js +33 -33
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-f833f6a2.js → surveyThankyouCard-fa16d8c1.js} +5 -5
- package/build/together.js +56 -56
- package/build/togetherApiUtils.js +4 -4
- package/build/togetherAtoms.js +30 -30
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +51 -51
- package/build/togetherMoleculesCardAuthor.js +28 -28
- package/build/togetherMoleculesPostImagePreview.js +11 -11
- package/build/togetherMoleculesProfileDetail.js +39 -39
- package/build/togetherOrganisms.js +50 -50
- package/build/togetherRichTextEditor.js +17 -17
- package/build/togetherShareBox.js +10 -10
- package/build/{translationsProvider-1d59bf5a.js → translationsProvider-ec28ac86.js} +1 -1
- package/build/{treePopoverMenu-f8342374.js → treePopoverMenu-d4acebc8.js} +19 -19
- package/build/{types-b36bed7f.js → types-f6f36948.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-8b2aea12.js → useCategory-bff78fbc.js} +5 -5
- package/build/{useHealthToolCache-89bc6021.js → useHealthToolCache-d73acf2a.js} +1 -1
- package/build/{useMantineLocale-444816ce.js → useMantineLocale-df00655b.js} +6 -6
- package/build/{usePlacesAutocomplete-9f762629.js → usePlacesAutocomplete-2f9c0a8b.js} +1 -1
- package/build/{useScreenSize-46632319.js → useScreenSize-e81bca5e.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +10 -10
- package/build/{utils-b39e3338.js → utils-05b51bde.js} +5 -5
- package/build/{utils-9c2945d9.js → utils-3c5b1acc.js} +2 -2
- package/build/{utils-4d3bf035.js → utils-49128753.js} +3 -3
- package/build/{utils-e4e4d192.js → utils-a8d8cbfe.js} +2 -2
- package/build/vaccination.js +21 -21
- package/package.json +1 -1
- /package/build/{BMI_BOYS.percentile.monthly-d3d44634.js → BMI_BOYS.percentile.monthly-e3018263.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-8f3e17f5.js → BMI_BOYS.percentile.weekly-004a3887.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-99a7a356.js → BMI_BOYS.percentile.yearly-1e8e80ad.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-15103c2d.js → BMI_BOYS.zscore.monthly-3ce1abd0.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-6c1805fb.js → BMI_BOYS.zscore.weekly-0ff8a099.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-53dc6765.js → BMI_BOYS.zscore.yearly-c9cd8cb8.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-1ac73b29.js → BMI_GIRLS.percentile.monthly-5a0656bc.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-991680d5.js → BMI_GIRLS.percentile.weekly-7029db32.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-dccbdf3f.js → BMI_GIRLS.percentile.yearly-a4fe85b8.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-c87691da.js → BMI_GIRLS.zscore.monthly-cc6338cd.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-2854895b.js → BMI_GIRLS.zscore.weekly-69c9e31c.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-0f5b7013.js → BMI_GIRLS.zscore.yearly-97fe1244.js} +0 -0
- /package/build/{ChevronDown-0c169c0d.js → ChevronDown-971555ea.js} +0 -0
- /package/build/{Close-85c460fb.js → Close-e056eadd.js} +0 -0
- /package/build/{Google-b8d07d3a.js → Google-f9700cb3.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-22d4d9d5.js → HEAD CIRCUM_BOYS.percentile.monthly-ad49c311.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-d9ff9622.js → HEAD CIRCUM_BOYS.percentile.weekly-25e63d86.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-6983c8c9.js → HEAD CIRCUM_BOYS.percentile.yearly-ba79c2bc.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-d29a2840.js → HEAD CIRCUM_BOYS.zscore.monthly-34dbe013.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-bffcc405.js → HEAD CIRCUM_BOYS.zscore.weekly-28f734d9.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-ca381668.js → HEAD CIRCUM_BOYS.zscore.yearly-2648cd54.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-e6c93a76.js → HEAD CIRCUM_GIRLS.percentile.monthly-989e4a3c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-a7084199.js → HEAD CIRCUM_GIRLS.percentile.weekly-a04b787c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-73b37783.js → HEAD CIRCUM_GIRLS.percentile.yearly-fdbfcdb6.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-671601e2.js → HEAD CIRCUM_GIRLS.zscore.monthly-35100dc1.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-97991d56.js → HEAD CIRCUM_GIRLS.zscore.weekly-68705615.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-9445cd4b.js → HEAD CIRCUM_GIRLS.zscore.yearly-4f273fd6.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-5c0c4ee7.js → HEIGHT_BOYS.percentile.monthly-09f48382.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-d467748c.js → HEIGHT_BOYS.percentile.weekly-f0ea2fd7.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-cd796fae.js → HEIGHT_BOYS.percentile.yearly-5107f8dc.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-1e38b8db.js → HEIGHT_BOYS.zscore.monthly-ab29e5ca.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-1e09e16f.js → HEIGHT_BOYS.zscore.weekly-40935b62.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-59c84f45.js → HEIGHT_BOYS.zscore.yearly-8997fedd.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-fc61bded.js → HEIGHT_GIRLS.percentile.monthly-49e43d47.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-2a64da64.js → HEIGHT_GIRLS.percentile.weekly-6a0f2180.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-94431a64.js → HEIGHT_GIRLS.percentile.yearly-0b365fc9.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-513756a5.js → HEIGHT_GIRLS.zscore.monthly-e012a87a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-3486573b.js → HEIGHT_GIRLS.zscore.weekly-951abf8e.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-0efc99b7.js → HEIGHT_GIRLS.zscore.yearly-5beab592.js} +0 -0
- /package/build/{Locale-ef5a2ef7.js → Locale-54283620.js} +0 -0
- /package/build/{Visible-4f47a606.js → Visible-bf96c0d1.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-6fac198f.js → WEIGHT_BOYS.percentile.monthly-603c3a73.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-0dbc5c29.js → WEIGHT_BOYS.percentile.weekly-7a53a271.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-20e33a81.js → WEIGHT_BOYS.percentile.yearly-b0b17bf1.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-e0c45c53.js → WEIGHT_BOYS.zscore.monthly-99d1ea13.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-8af6f77c.js → WEIGHT_BOYS.zscore.weekly-98200eda.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-a5c0ffd2.js → WEIGHT_BOYS.zscore.yearly-2914bbd7.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-34d9ec95.js → WEIGHT_GIRLS.percentile.monthly-280d760d.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-029408f7.js → WEIGHT_GIRLS.percentile.weekly-9b85ecf7.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-2af9c94e.js → WEIGHT_GIRLS.percentile.yearly-dfd22b1a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-24e34116.js → WEIGHT_GIRLS.zscore.monthly-989c01f4.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-20ec6af3.js → WEIGHT_GIRLS.zscore.weekly-513e155c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-e2574067.js → WEIGHT_GIRLS.zscore.yearly-a3507a91.js} +0 -0
- /package/build/{animation-25f54131.js → animation-4f4f59fd.js} +0 -0
- /package/build/{constants-a8b2d7be.js → constants-680455fd.js} +0 -0
- /package/build/{constants-8f2e2211.js → constants-6915be38.js} +0 -0
- /package/build/{constants-d441baad.js → constants-a5282cc1.js} +0 -0
- /package/build/{dataTransform-be706219.js → dataTransform-3afae009.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-61200c7a.js → BMI_BOYS.percentile.monthly-bffc9988.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-8821a98b.js → BMI_BOYS.percentile.weekly-86e62dd4.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-426277c3.js → BMI_BOYS.percentile.yearly-c477f3de.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-d43e5472.js → BMI_BOYS.zscore.monthly-555f75b3.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-9995f125.js → BMI_BOYS.zscore.weekly-965c6556.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-fe3955b4.js → BMI_BOYS.zscore.yearly-d45794e5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-b8aa67ff.js → BMI_GIRLS.percentile.monthly-6ab4b625.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-f8853c60.js → BMI_GIRLS.percentile.weekly-35978088.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-942fa700.js → BMI_GIRLS.percentile.yearly-6dd20e8c.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-deb8f01d.js → BMI_GIRLS.zscore.monthly-9c961d7f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-9ae9b6fc.js → BMI_GIRLS.zscore.weekly-1b6ad449.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-fb2b3b44.js → BMI_GIRLS.zscore.yearly-c885669e.js} +0 -0
- /package/build/esm/{ChevronDown-c0ad1238.js → ChevronDown-ff531be8.js} +0 -0
- /package/build/esm/{Close-a90a54d8.js → Close-88ad1c4a.js} +0 -0
- /package/build/esm/{Google-2d17263a.js → Google-1ee92e9e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-ebc9d09a.js → HEAD CIRCUM_BOYS.percentile.monthly-7a221d44.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-5ef200ff.js → HEAD CIRCUM_BOYS.percentile.weekly-1b3fe483.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-6f8c5316.js → HEAD CIRCUM_BOYS.percentile.yearly-7262aac6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-cbf8b7f8.js → HEAD CIRCUM_BOYS.zscore.monthly-24ae7823.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-bb0a910f.js → HEAD CIRCUM_BOYS.zscore.weekly-5c9b2475.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-1e290ec4.js → HEAD CIRCUM_BOYS.zscore.yearly-fc8c30eb.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-cbbf7e1d.js → HEAD CIRCUM_GIRLS.percentile.monthly-baeaed23.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-0541eb9a.js → HEAD CIRCUM_GIRLS.percentile.weekly-c311f57d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-0747fef4.js → HEAD CIRCUM_GIRLS.percentile.yearly-5c1c83fd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-d55a2dc2.js → HEAD CIRCUM_GIRLS.zscore.monthly-d68f0c5f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-e5930717.js → HEAD CIRCUM_GIRLS.zscore.weekly-eb3136c4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-9dc8acc6.js → HEAD CIRCUM_GIRLS.zscore.yearly-add9fa25.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-734dd0e6.js → HEIGHT_BOYS.percentile.monthly-f2ebb737.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-7e0a350e.js → HEIGHT_BOYS.percentile.weekly-f97094f6.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-c980b32b.js → HEIGHT_BOYS.percentile.yearly-d8454a5d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-06088af1.js → HEIGHT_BOYS.zscore.monthly-34962073.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-65a3fb0e.js → HEIGHT_BOYS.zscore.weekly-d6ea6e39.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-917b6e23.js → HEIGHT_BOYS.zscore.yearly-f5b30a69.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-601bf583.js → HEIGHT_GIRLS.percentile.monthly-9b7c5fa6.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-372fa5f4.js → HEIGHT_GIRLS.percentile.weekly-64f43e0c.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-1f67e167.js → HEIGHT_GIRLS.percentile.yearly-1335f9e7.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-3863129d.js → HEIGHT_GIRLS.zscore.monthly-90c7ecfc.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-cbbde146.js → HEIGHT_GIRLS.zscore.weekly-d5beecbc.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-e1c866a3.js → HEIGHT_GIRLS.zscore.yearly-5871ee03.js} +0 -0
- /package/build/esm/{Locale-f57e0efa.js → Locale-798a572b.js} +0 -0
- /package/build/esm/{Visible-b0d2bd83.js → Visible-c27175a5.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-6f945f9f.js → WEIGHT_BOYS.percentile.monthly-fb3f4a50.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-550d83b5.js → WEIGHT_BOYS.percentile.weekly-f707e484.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-ed998b53.js → WEIGHT_BOYS.percentile.yearly-5b235963.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-17d9c710.js → WEIGHT_BOYS.zscore.monthly-f96d19b9.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-2956ae76.js → WEIGHT_BOYS.zscore.weekly-a988c29b.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-251d1b27.js → WEIGHT_BOYS.zscore.yearly-ded29ca9.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-39ba0505.js → WEIGHT_GIRLS.percentile.monthly-c47bfc83.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-484f5e33.js → WEIGHT_GIRLS.percentile.weekly-b47d01e5.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-11066178.js → WEIGHT_GIRLS.percentile.yearly-49381bc1.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-49525014.js → WEIGHT_GIRLS.zscore.monthly-8f512e00.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-6d80838c.js → WEIGHT_GIRLS.zscore.weekly-d2bbb256.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-c058f405.js → WEIGHT_GIRLS.zscore.yearly-d1d119ea.js} +0 -0
- /package/build/esm/{animation-a051cb6e.js → animation-9451fea9.js} +0 -0
- /package/build/esm/{constants-32395ab6.js → constants-6d6a7d1d.js} +0 -0
- /package/build/esm/{constants-6dbcca91.js → constants-9ab4e5ff.js} +0 -0
- /package/build/esm/{constants-ff23d67a.js → constants-d14a2383.js} +0 -0
- /package/build/esm/{dataTransform-1f6a7da3.js → dataTransform-4590f3d3.js} +0 -0
- /package/build/esm/{index-15906202.js → index-021a0b51.js} +0 -0
- /package/build/esm/{index-78e09b51.js → index-39172244.js} +0 -0
- /package/build/esm/{index-1d7646eb.js → index-6317b6e1.js} +0 -0
- /package/build/esm/{index-f55cd701.js → index-73bb3647.js} +0 -0
- /package/build/esm/{index-f08cdd06.js → index-742195e5.js} +0 -0
- /package/build/esm/{index-12c0536e.js → index-9577ad9a.js} +0 -0
- /package/build/esm/{index-0efcb68a.js → index-b20b3229.js} +0 -0
- /package/build/esm/{index-5bad5320.js → index-f277ac96.js} +0 -0
- /package/build/esm/{index.styles-7c96a819.js → index.styles-8802b687.js} +0 -0
- /package/build/esm/{localizeNumberFormat-ba993ad8.js → localizeNumberFormat-b835fdfc.js} +0 -0
- /package/build/esm/{normalizeLink-91ad99af.js → normalizeLink-5ae23f13.js} +0 -0
- /package/build/esm/{number-d0073553.js → number-5694c21b.js} +0 -0
- /package/build/esm/{other-199980b9.js → other-4313f7b0.js} +0 -0
- /package/build/esm/{paths-35997975.js → paths-97c58e9d.js} +0 -0
- /package/build/esm/{translationsContext-04a3cfff.js → translationsContext-95095e13.js} +0 -0
- /package/build/esm/{tslib.es6-6934a2e2.js → tslib.es6-bfa42c42.js} +0 -0
- /package/build/esm/{types-154c2b6c.js → types-9b208b90.js} +0 -0
- /package/build/esm/{useIsInit-db6f2bf2.js → useIsInit-b8e07b60.js} +0 -0
- /package/build/esm/{useOutsideClick-d2be114f.js → useOutsideClick-0672877d.js} +0 -0
- /package/build/esm/{useScrollbarSize-a5d9f2a1.js → useScrollbarSize-5fc9d905.js} +0 -0
- /package/build/esm/{useUniqueId-30b07686.js → useUniqueId-31cc5f66.js} +0 -0
- /package/build/esm/{utils-19c5a929.js → utils-c526b4d5.js} +0 -0
- /package/build/{index-1dbc433e.js → index-069afe44.js} +0 -0
- /package/build/{index-efd30eb5.js → index-074e8617.js} +0 -0
- /package/build/{index-d988c1a9.js → index-25897a02.js} +0 -0
- /package/build/{index-22655c5a.js → index-5efdba9a.js} +0 -0
- /package/build/{index-8af88372.js → index-6dfff25a.js} +0 -0
- /package/build/{index-1bb22599.js → index-c9a71f8e.js} +0 -0
- /package/build/{index-48d1aa7c.js → index-d99e3fa3.js} +0 -0
- /package/build/{index-69ae1641.js → index-e9081baa.js} +0 -0
- /package/build/{index.styles-531266da.js → index.styles-ce05c58d.js} +0 -0
- /package/build/{localizeNumberFormat-1f298fd9.js → localizeNumberFormat-70242287.js} +0 -0
- /package/build/{normalizeLink-380b57d1.js → normalizeLink-c0d4e317.js} +0 -0
- /package/build/{number-fc1e78f6.js → number-52a5a4b7.js} +0 -0
- /package/build/{other-c168dfaf.js → other-5a2f90ff.js} +0 -0
- /package/build/{paths-7eec53df.js → paths-4c90e3d9.js} +0 -0
- /package/build/{translationsContext-dd8a22b4.js → translationsContext-41e0a315.js} +0 -0
- /package/build/{tslib.es6-b7e9e65e.js → tslib.es6-005d140e.js} +0 -0
- /package/build/{types-be0c9ca3.js → types-a49b9458.js} +0 -0
- /package/build/{useIsInit-16945d45.js → useIsInit-ee723be4.js} +0 -0
- /package/build/{useOutsideClick-649ee656.js → useOutsideClick-83fac88e.js} +0 -0
- /package/build/{useScrollbarSize-f8f7ed8c.js → useScrollbarSize-b7b039c3.js} +0 -0
- /package/build/{useUniqueId-0c0d2cf9.js → useUniqueId-f7ae3f63.js} +0 -0
- /package/build/{utils-ec4da018.js → utils-dd6d237d.js} +0 -0
package/build/esm/lead.js
CHANGED
|
@@ -1,53 +1,52 @@
|
|
|
1
|
-
import { _ as __rest, a as __awaiter } from './tslib.es6-
|
|
1
|
+
import { _ as __rest, a as __awaiter } from './tslib.es6-bfa42c42.js';
|
|
2
2
|
import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, useCallback, forwardRef, useImperativeHandle, memo, useLayoutEffect } from 'react';
|
|
3
3
|
import { createStyles, Box, Button as Button$1, Input as Input$1, Autocomplete, clsx, Checkbox as Checkbox$1, Radio as Radio$1, Select as Select$1, TextInput, NumberInput as NumberInput$1, Portal, Transition, Overlay } from '@mantine/core';
|
|
4
4
|
import debounce from 'lodash/debounce';
|
|
5
5
|
import { createFormContext, useForm } from '@mantine/form';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
|
-
import { B as BEARER_TOKEN_COOKIE } from './index-
|
|
7
|
+
import { B as BEARER_TOKEN_COOKIE } from './index-08551aae.js';
|
|
8
8
|
import { getCookie, setCookie } from './miscCookieHelper.js';
|
|
9
|
-
import { u as useTranslations } from './index-
|
|
10
|
-
import { T as TranslationsContext } from './translationsContext-
|
|
11
|
-
import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-
|
|
12
|
-
import { T as Text } from './index-
|
|
13
|
-
import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-
|
|
14
|
-
import { D as DatePicker } from './index-
|
|
15
|
-
import { B as Button } from './index-
|
|
16
|
-
import './index.styles-
|
|
9
|
+
import { u as useTranslations } from './index-265c599c.js';
|
|
10
|
+
import { T as TranslationsContext } from './translationsContext-95095e13.js';
|
|
11
|
+
import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-c526b4d5.js';
|
|
12
|
+
import { T as Text } from './index-b8c609c2.js';
|
|
13
|
+
import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-6f3409b2.js';
|
|
14
|
+
import { D as DatePicker } from './index-7d02c5ab.js';
|
|
15
|
+
import { B as Button } from './index-99f8bc19.js';
|
|
16
|
+
import './index.styles-8802b687.js';
|
|
17
17
|
import { useIntersection, useClickOutside } from '@mantine/hooks';
|
|
18
|
-
import './useMantineLocale-
|
|
19
|
-
import { C as COMMON_DATE_TRANSLATE_KEY } from './index-
|
|
20
|
-
import './index-
|
|
21
|
-
import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-
|
|
22
|
-
import './other-
|
|
23
|
-
import './index-
|
|
24
|
-
import { M as MAPPED_LOCALE } from './utils-
|
|
18
|
+
import './useMantineLocale-852d98ca.js';
|
|
19
|
+
import { C as COMMON_DATE_TRANSLATE_KEY } from './index-8a031ec3.js';
|
|
20
|
+
import './index-73bb3647.js';
|
|
21
|
+
import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-18ecb56d.js';
|
|
22
|
+
import './other-4313f7b0.js';
|
|
23
|
+
import './index-178fc49e.js';
|
|
24
|
+
import { M as MAPPED_LOCALE } from './utils-14b6e2d4.js';
|
|
25
25
|
import { DateInput } from '@mantine/dates';
|
|
26
|
-
import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-
|
|
27
|
-
import { H as Heading$1 } from './index-
|
|
28
|
-
import { t as translationsMap$1 } from './translationsProvider-
|
|
29
|
-
import { L as LOCALE } from './Locale-
|
|
26
|
+
import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-2114a712.js';
|
|
27
|
+
import { H as Heading$1 } from './index-23ba6711.js';
|
|
28
|
+
import { t as translationsMap$1 } from './translationsProvider-7203b02f.js';
|
|
29
|
+
import { L as LOCALE } from './Locale-798a572b.js';
|
|
30
30
|
import { v1 } from 'uuid';
|
|
31
31
|
import { domainLocales } from './constantsDomainLocales.js';
|
|
32
32
|
import { parsePhoneNumber } from 'react-phone-number-input';
|
|
33
33
|
import styled from '@emotion/styled';
|
|
34
34
|
import { theme } from './miscTheme.js';
|
|
35
35
|
import { css } from '@emotion/react';
|
|
36
|
-
import { T as TogetherComponentGlobalContext } from './utils-
|
|
37
|
-
import { i as isVideo } from './index-
|
|
38
|
-
import { u as useScreenSize } from './useScreenSize-
|
|
36
|
+
import { T as TogetherComponentGlobalContext } from './utils-4c7c5e43.js';
|
|
37
|
+
import { i as isVideo } from './index-9577ad9a.js';
|
|
38
|
+
import { u as useScreenSize } from './useScreenSize-1c2fca51.js';
|
|
39
39
|
import { motion } from 'framer-motion';
|
|
40
40
|
import { createPortal } from 'react-dom';
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import { C as Close } from './Close-a90a54d8.js';
|
|
41
|
+
import { I as InputDate } from './InputDate-d39313b4.js';
|
|
42
|
+
import { D as DrawerComponent } from './index-768eca3c.js';
|
|
43
|
+
import { C as Close } from './Close-88ad1c4a.js';
|
|
45
44
|
import './constantsIsProduction.js';
|
|
46
|
-
import './normalizeLink-
|
|
45
|
+
import './normalizeLink-5ae23f13.js';
|
|
47
46
|
import '@hhgtech/icons/other';
|
|
48
47
|
import '@mantine/carousel';
|
|
49
48
|
import 'classnames';
|
|
50
|
-
import './useUniqueId-
|
|
49
|
+
import './useUniqueId-31cc5f66.js';
|
|
51
50
|
import './constantsSite.js';
|
|
52
51
|
import '@hhgtech/icons/core';
|
|
53
52
|
import '@mantine/notifications';
|
|
@@ -65,11 +64,11 @@ import './i18n-values/vi-VN.js';
|
|
|
65
64
|
import './i18n-values/vi-VN_MB.js';
|
|
66
65
|
import './i18n-values/zh-SG.js';
|
|
67
66
|
import './i18n-values/zh-TW.js';
|
|
68
|
-
import './index-
|
|
67
|
+
import './index-b20b3229.js';
|
|
69
68
|
import 'slugify';
|
|
70
69
|
import 'string-format';
|
|
71
70
|
import './togetherApiPaths.js';
|
|
72
|
-
import './constants-
|
|
71
|
+
import './constants-d14a2383.js';
|
|
73
72
|
import 'vaul';
|
|
74
73
|
|
|
75
74
|
const LeadGenComponentContext = createContext({});
|
|
@@ -995,15 +994,15 @@ const Fields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, style
|
|
|
995
994
|
case 'TextBlock':
|
|
996
995
|
return (React__default.createElement(Input, Object.assign({ key: index, withAsterisk: required, spellCheck: false, type: "text", placeholder: placeholder, className: cx('leadgen-control', classes.control),
|
|
997
996
|
// onChangeRaw={(e) => inputOnChange('text', e)}
|
|
998
|
-
label: placeholder, "data-control": "text", "data-lead-control": name, name: value }, form.getInputProps(value))));
|
|
997
|
+
label: placeholder, "data-control": "text", "data-lead-control": name, "data-is-required": required, name: value }, form.getInputProps(value))));
|
|
999
998
|
case 'NumberBlock':
|
|
1000
999
|
return (React__default.createElement(NumberInput, Object.assign({ key: index, withAsterisk: required, spellCheck: false, type: "number", placeholder: placeholder, className: cx('leadgen-control', classes.control),
|
|
1001
1000
|
// onChange={(e) => inputOnChange('number', e)}
|
|
1002
|
-
label: placeholder, "data-control": "number", "data-lead-control": name, name: value }, form.getInputProps(value))));
|
|
1001
|
+
label: placeholder, "data-control": "number", "data-lead-control": name, "data-is-required": required, name: value }, form.getInputProps(value))));
|
|
1003
1002
|
case 'EmailBlock':
|
|
1004
1003
|
return (React__default.createElement(Input, Object.assign({ key: index, withAsterisk: required, spellCheck: false,
|
|
1005
1004
|
// type="email"
|
|
1006
|
-
placeholder: placeholder, className: cx('leadgen-control', classes.control), label: placeholder, "data-control": "email", "data-lead-control": name, name: value }, form.getInputProps(value))));
|
|
1005
|
+
placeholder: placeholder, className: cx('leadgen-control', classes.control), label: placeholder, "data-control": "email", "data-lead-control": name, "data-is-required": required, name: value }, form.getInputProps(value))));
|
|
1007
1006
|
case 'PhoneOtpBlock':
|
|
1008
1007
|
case 'WhatsappOtpBlock':
|
|
1009
1008
|
case 'ZaloOtpBlock':
|
|
@@ -1018,14 +1017,14 @@ const Fields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, style
|
|
|
1018
1017
|
form.setFieldValue(value, v);
|
|
1019
1018
|
},
|
|
1020
1019
|
// onBlur={(e) => inputOnBlur('tel', e)}
|
|
1021
|
-
id: id, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel", "data-lead-control": name })));
|
|
1020
|
+
id: id, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel", "data-lead-control": name, "data-is-required": required })));
|
|
1022
1021
|
}
|
|
1023
1022
|
case 'LocationBlock': {
|
|
1024
1023
|
return (React__default.createElement(LocationBlock, { key: index, name: value, placeholder: placeholder, locale: locale, required: required }));
|
|
1025
1024
|
}
|
|
1026
1025
|
case 'DateBlock':
|
|
1027
1026
|
return (React__default.createElement(React__default.Fragment, null,
|
|
1028
|
-
React__default.createElement(DatePicker, Object.assign({ withAsterisk: required, key: index, type: "default", name: value, placeholder: placeholder, className: cx('leadgen-control', classes.control), label: placeholder, "data-control": "date", "data-lead-control": name, popoverProps: popoverProps }, form.getInputProps(value))),
|
|
1027
|
+
React__default.createElement(DatePicker, Object.assign({ withAsterisk: required, key: index, type: "default", name: value, placeholder: placeholder, className: cx('leadgen-control', classes.control), label: placeholder, "data-control": "date", "data-lead-control": name, "data-is-required": required, popoverProps: popoverProps }, form.getInputProps(value))),
|
|
1029
1028
|
React__default.createElement("input", { type: "hidden", name: value, "data-control": "date" })));
|
|
1030
1029
|
case 'LinkButtonBlock':
|
|
1031
1030
|
return (React__default.createElement("div", { key: index },
|
|
@@ -1043,14 +1042,14 @@ const Fields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, style
|
|
|
1043
1042
|
display: 'flex',
|
|
1044
1043
|
flexDirection: 'column',
|
|
1045
1044
|
gap: 8,
|
|
1046
|
-
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Checkbox, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "checkbox", "data-lead-control": name }))))));
|
|
1045
|
+
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Checkbox, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }))))));
|
|
1047
1046
|
case 'RadioBlock':
|
|
1048
1047
|
return (React__default.createElement(React__default.Fragment, null,
|
|
1049
1048
|
isSendMailChimp && (React__default.createElement(Input, { type: "hidden", name: value + '-mailchimp', value: isSendMailChimp })),
|
|
1050
|
-
React__default.createElement(Radio.Group, Object.assign({ withAsterisk: required, className: cx('leadgen-control', classes.control), key: index, label: placeholder, size: "md" }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Radio, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "radio", "data-lead-control": name }))))));
|
|
1049
|
+
React__default.createElement(Radio.Group, Object.assign({ withAsterisk: required, className: cx('leadgen-control', classes.control), key: index, label: placeholder, size: "md" }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Radio, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "radio", "data-lead-control": name, "data-is-required": required }))))));
|
|
1051
1050
|
case 'DropdownBlock':
|
|
1052
1051
|
return (React__default.createElement(React__default.Fragment, null,
|
|
1053
|
-
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown', "data-lead-control": name }),
|
|
1052
|
+
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown', "data-lead-control": name, "data-is-required": required }),
|
|
1054
1053
|
React__default.createElement(Select, Object.assign({ key: index, className: cx('leadgen-control', classes.control), label: placeholder, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
|
|
1055
1054
|
value: l.value,
|
|
1056
1055
|
label: l.placeholder,
|
|
@@ -1058,7 +1057,7 @@ const Fields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, style
|
|
|
1058
1057
|
case 'TncBlock':
|
|
1059
1058
|
const tncInputProps = form.getInputProps('TNC-' + b.id);
|
|
1060
1059
|
return (React__default.createElement(React__default.Fragment, null,
|
|
1061
|
-
React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + b.id, key: b.id, label: React__default.createElement("p", { className: "lead-modal__tnc-link", dangerouslySetInnerHTML: { __html: data.valueHTML } }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name }, tncInputProps, { error: tncInputProps.error ? tncInputProps.error : undefined }))));
|
|
1060
|
+
React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + b.id, key: b.id, label: React__default.createElement("p", { className: "lead-modal__tnc-link", dangerouslySetInnerHTML: { __html: data.valueHTML } }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps, { error: tncInputProps.error ? tncInputProps.error : undefined }))));
|
|
1062
1061
|
}
|
|
1063
1062
|
return null;
|
|
1064
1063
|
})));
|
|
@@ -2261,8 +2260,11 @@ const useLeadGenContext = () => {
|
|
|
2261
2260
|
};
|
|
2262
2261
|
|
|
2263
2262
|
const ImpressionTrackingWrapper = ({ children, stayDuration = 3, onImpression, dependency = '', }) => {
|
|
2263
|
+
var _a;
|
|
2264
|
+
const boxRef = useRef(null);
|
|
2265
|
+
const [percent, setPercent] = useState(100);
|
|
2264
2266
|
const { ref, entry } = useIntersection({
|
|
2265
|
-
threshold:
|
|
2267
|
+
threshold: percent / 100,
|
|
2266
2268
|
});
|
|
2267
2269
|
const [tracked, setTracked] = useState(false);
|
|
2268
2270
|
useEffect(() => {
|
|
@@ -2283,14 +2285,20 @@ const ImpressionTrackingWrapper = ({ children, stayDuration = 3, onImpression, d
|
|
|
2283
2285
|
}, [entry === null || entry === void 0 ? void 0 : entry.isIntersecting, tracked]);
|
|
2284
2286
|
useEffect(() => {
|
|
2285
2287
|
if (tracked) {
|
|
2286
|
-
onImpression();
|
|
2287
2288
|
console.log('Impression call API');
|
|
2289
|
+
onImpression();
|
|
2288
2290
|
}
|
|
2289
2291
|
}, [tracked]);
|
|
2290
2292
|
useEffect(() => {
|
|
2291
2293
|
setTracked(false);
|
|
2292
2294
|
}, [dependency]);
|
|
2293
|
-
|
|
2295
|
+
useEffect(() => {
|
|
2296
|
+
if (boxRef.current.clientHeight > window.innerHeight * 0.8) {
|
|
2297
|
+
setPercent(50);
|
|
2298
|
+
}
|
|
2299
|
+
}, [(_a = boxRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight]);
|
|
2300
|
+
return (React__default.createElement(Box, { "data-impression": true, ref: ref },
|
|
2301
|
+
React__default.createElement("div", { ref: boxRef }, children)));
|
|
2294
2302
|
};
|
|
2295
2303
|
|
|
2296
2304
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
@@ -3455,9 +3463,14 @@ const CloseButton = ({ onClose, containerClassName, svgClassName, }) => (React__
|
|
|
3455
3463
|
// newTab: imageBlocks.imageMobile.data.newtab
|
|
3456
3464
|
// imageMobile: campaignShow.image
|
|
3457
3465
|
// imageDestkop: campaignShow.image_desktop
|
|
3458
|
-
const CenterTabLayout = ({ popupId, url, newTab, imageDestkop, imageMobile, onClose, onOtherSubmit, }) => {
|
|
3466
|
+
const CenterTabLayout = ({ popupId, url, newTab, imageDestkop, imageMobile, onClose, onOtherSubmit, doImpression, }) => {
|
|
3459
3467
|
const { width: imageMobileWidth, height: imageMobileHeight, loaded: imageMobileLoaded, } = useImageSize(imageMobile);
|
|
3460
3468
|
const { width: imageDestkopWidth, height: imageDestkopHeight, loaded: imageDestkopLoaded, } = useImageSize(imageDestkop);
|
|
3469
|
+
useEffect(() => {
|
|
3470
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
3471
|
+
yield doImpression();
|
|
3472
|
+
}))();
|
|
3473
|
+
}, []);
|
|
3461
3474
|
useEffect(() => {
|
|
3462
3475
|
if (popupId && imageMobileLoaded && imageDestkopLoaded) {
|
|
3463
3476
|
document.body.classList.add('noscroll');
|
|
@@ -3471,7 +3484,12 @@ const CenterTabLayout = ({ popupId, url, newTab, imageDestkop, imageMobile, onCl
|
|
|
3471
3484
|
return (React__default.createElement("div", { id: popupId, className: "leadgen lead-modal-wrapper", "data-popup-url": location.pathname, "data-popup-type": "center_tab" },
|
|
3472
3485
|
React__default.createElement("div", { className: "le-center-tab-popup" },
|
|
3473
3486
|
React__default.createElement("div", { style: { position: 'relative' } },
|
|
3474
|
-
React__default.createElement("a", { className: "js-popup-other-submit", href: url, target: newTab ? 'blank' : '_parent', onClick:
|
|
3487
|
+
React__default.createElement("a", { className: "js-popup-other-submit", href: url, target: newTab ? 'blank' : '_parent', onClick: (e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
3488
|
+
e.preventDefault();
|
|
3489
|
+
onOtherSubmit();
|
|
3490
|
+
yield doImpression({ type: 'redirects' });
|
|
3491
|
+
window.open(url, newTab ? 'blank' : '_parent');
|
|
3492
|
+
}) },
|
|
3475
3493
|
isVideo(imageMobile) ? (React__default.createElement("video", { loop: true, muted: true, autoPlay: true, className: "le-only-mobile" },
|
|
3476
3494
|
React__default.createElement("source", { src: imageMobile }))) : (React__default.createElement("img", { className: "le-only-mobile", src: imageMobile, style: {
|
|
3477
3495
|
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
@@ -3534,6 +3552,29 @@ const FloatingLayout = ({ popupId, url, title, urlText, titleAlign, subtitle, su
|
|
|
3534
3552
|
React__default.createElement(CloseButton, { onClose: onClose, containerClassName: "close-button-top-right" }))))));
|
|
3535
3553
|
};
|
|
3536
3554
|
|
|
3555
|
+
function useScrollTo() {
|
|
3556
|
+
const scrollTo = useCallback((element, to, duration = 500) => {
|
|
3557
|
+
if (!element)
|
|
3558
|
+
return;
|
|
3559
|
+
const start = element.scrollTop;
|
|
3560
|
+
const change = to - start;
|
|
3561
|
+
const startTime = performance.now();
|
|
3562
|
+
const easeInOutQuad = (t) => {
|
|
3563
|
+
return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
|
|
3564
|
+
};
|
|
3565
|
+
const animateScroll = (currentTime) => {
|
|
3566
|
+
const elapsed = currentTime - startTime;
|
|
3567
|
+
const progress = Math.min(elapsed / duration, 1);
|
|
3568
|
+
element.scrollTop = start + change * easeInOutQuad(progress);
|
|
3569
|
+
if (progress < 1) {
|
|
3570
|
+
requestAnimationFrame(animateScroll);
|
|
3571
|
+
}
|
|
3572
|
+
};
|
|
3573
|
+
requestAnimationFrame(animateScroll);
|
|
3574
|
+
}, []);
|
|
3575
|
+
return scrollTo;
|
|
3576
|
+
}
|
|
3577
|
+
|
|
3537
3578
|
const useViewportDimensions = () => {
|
|
3538
3579
|
const dimensionsRef = useRef({ width: 0, height: 0 });
|
|
3539
3580
|
const [dimensions, setDimensions] = useState(() => ({
|
|
@@ -3563,6 +3604,50 @@ const useViewportDimensions = () => {
|
|
|
3563
3604
|
return useMemo(() => (Object.assign({}, dimensions)), [dimensions.height, dimensions.width]);
|
|
3564
3605
|
};
|
|
3565
3606
|
|
|
3607
|
+
// Default handling for Safari & Chrome
|
|
3608
|
+
function useViewportPushedByKeyboard(threshold = 20) {
|
|
3609
|
+
const ref = useRef(null);
|
|
3610
|
+
const [isPushed, setIsPushed] = useState(false);
|
|
3611
|
+
useEffect(() => {
|
|
3612
|
+
const check = () => {
|
|
3613
|
+
if (!ref.current)
|
|
3614
|
+
return;
|
|
3615
|
+
const rect = ref.current.getBoundingClientRect();
|
|
3616
|
+
const diff = window.innerHeight - rect.bottom;
|
|
3617
|
+
setIsPushed(diff > threshold);
|
|
3618
|
+
};
|
|
3619
|
+
window.addEventListener('resize', check);
|
|
3620
|
+
const id = setInterval(check, 300); // fallback để cập nhật khi resize không đủ
|
|
3621
|
+
return () => {
|
|
3622
|
+
window.removeEventListener('resize', check);
|
|
3623
|
+
clearInterval(id);
|
|
3624
|
+
};
|
|
3625
|
+
}, [threshold]);
|
|
3626
|
+
return { isPushed, bottomRef: ref };
|
|
3627
|
+
}
|
|
3628
|
+
function useKeyboardOpen(isAndroid = false) {
|
|
3629
|
+
const [keyOpen, setKeyOpen] = useState(false);
|
|
3630
|
+
useEffect(() => {
|
|
3631
|
+
var _a;
|
|
3632
|
+
const initialHeight = window.innerHeight;
|
|
3633
|
+
const onResize = () => {
|
|
3634
|
+
var _a, _b;
|
|
3635
|
+
const diff = initialHeight - ((_b = (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height) !== null && _b !== void 0 ? _b : window.innerHeight);
|
|
3636
|
+
if (diff > 150) {
|
|
3637
|
+
console.log('🟡 Keyboard likely opened');
|
|
3638
|
+
setKeyOpen(true);
|
|
3639
|
+
}
|
|
3640
|
+
else {
|
|
3641
|
+
console.log('⚪️ Keyboard likely closed');
|
|
3642
|
+
setKeyOpen(false);
|
|
3643
|
+
}
|
|
3644
|
+
};
|
|
3645
|
+
(_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.addEventListener('resize', onResize);
|
|
3646
|
+
return () => { var _a; return (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.removeEventListener('resize', onResize); };
|
|
3647
|
+
}, [isAndroid]);
|
|
3648
|
+
return keyOpen;
|
|
3649
|
+
}
|
|
3650
|
+
|
|
3566
3651
|
function isMac() {
|
|
3567
3652
|
return testPlatform(/^Mac/);
|
|
3568
3653
|
}
|
|
@@ -4038,8 +4123,7 @@ const ThankyouPopup = ({ title, titleAlign, subtitle, subtitleAlign, link, linkN
|
|
|
4038
4123
|
React__default.createElement(Button, { className: `lead-modal__btn ${LEAD_CLASS}`, color: primaryColor }, linkText)))))));
|
|
4039
4124
|
};
|
|
4040
4125
|
|
|
4041
|
-
const InlineLayout = ({
|
|
4042
|
-
const { apiUrl } = useContext(LeadGenContext$1);
|
|
4126
|
+
const InlineLayout = ({ content, inlinePosition, doImpression, }) => {
|
|
4043
4127
|
const target = useMemo(() => {
|
|
4044
4128
|
if (!inlinePosition)
|
|
4045
4129
|
return null;
|
|
@@ -4146,22 +4230,7 @@ const InlineLayout = ({ action, content, inlinePosition, campaignCode, }) => {
|
|
|
4146
4230
|
}, [inlinePosition]);
|
|
4147
4231
|
if (!inlinePosition || !target)
|
|
4148
4232
|
return null;
|
|
4149
|
-
return createPortal(React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
4150
|
-
const gaCookie = getCookie('_ga') || null;
|
|
4151
|
-
fetch(`${apiUrl}api/campaign/${campaignCode}/impression`, {
|
|
4152
|
-
method: 'POST',
|
|
4153
|
-
headers: {
|
|
4154
|
-
'Content-Type': 'application/json',
|
|
4155
|
-
},
|
|
4156
|
-
body: JSON.stringify({
|
|
4157
|
-
action,
|
|
4158
|
-
url: location.href.toLowerCase(),
|
|
4159
|
-
title_article: document.title,
|
|
4160
|
-
cookie_id: getCookie('hhg-id'),
|
|
4161
|
-
ga_client_id: gaCookie,
|
|
4162
|
-
}),
|
|
4163
|
-
});
|
|
4164
|
-
}) }, content), target);
|
|
4233
|
+
return createPortal(React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content), target);
|
|
4165
4234
|
};
|
|
4166
4235
|
|
|
4167
4236
|
const SideBarLayout = ({ content }) => {
|
|
@@ -4574,20 +4643,20 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
4574
4643
|
React__default.createElement(TextInput, Object.assign({ withAsterisk: required, spellCheck: false, type: "text", placeholder: " ",
|
|
4575
4644
|
// className="lead-modal__form-control leadgen-form_field"
|
|
4576
4645
|
// onChangeRaw={(e) => inputOnChange('text', e)}
|
|
4577
|
-
label: label, "data-control": "text", "data-lead-control":
|
|
4646
|
+
label: label, "data-control": "text", "data-lead-control": name, "data-is-required": required, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value), { name: value }))));
|
|
4578
4647
|
case 'NumberBlock':
|
|
4579
4648
|
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
4580
4649
|
React__default.createElement(NumberInput$1, Object.assign({ withAsterisk: required, spellCheck: false, type: "number", placeholder: " ",
|
|
4581
4650
|
// className="lead-modal__form-control leadgen-form_field"
|
|
4582
4651
|
// onChange={(e) => inputOnChange('number', e)}
|
|
4583
|
-
label: label, "data-control": "number", "data-lead-control": name, name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
4652
|
+
label: label, "data-control": "number", "data-lead-control": name, "data-is-required": required, name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
4584
4653
|
case 'EmailBlock':
|
|
4585
4654
|
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
4586
4655
|
React__default.createElement(TextInput, Object.assign({ withAsterisk: required, spellCheck: false,
|
|
4587
4656
|
// type="email"
|
|
4588
4657
|
placeholder: " ",
|
|
4589
4658
|
// className="lead-modal__form-control leadgen-form_field"
|
|
4590
|
-
label: label, "data-control": "email", "data-lead-control": name, name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
4659
|
+
label: label, "data-control": "email", "data-lead-control": name, "data-is-required": required, name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
4591
4660
|
case 'PhoneOtpBlock':
|
|
4592
4661
|
case 'WhatsappOtpBlock':
|
|
4593
4662
|
case 'ZaloOtpBlock':
|
|
@@ -4601,21 +4670,21 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
4601
4670
|
React__default.createElement("div", { className: "mantine-Input-wrapper" },
|
|
4602
4671
|
React__default.createElement(Phone, Object.assign({ className: "mantine-Input-input", name: value, spellCheck: false, type: "tel", placeholder: " ",
|
|
4603
4672
|
// onBlur={(e) => inputOnBlur('tel', e)}
|
|
4604
|
-
id: htmlForId, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel", "data-lead-control": name }, formPhoneInputWrapper))))));
|
|
4673
|
+
id: htmlForId, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel", "data-lead-control": name, "data-is-required": required }, formPhoneInputWrapper))))));
|
|
4605
4674
|
}
|
|
4606
4675
|
case 'LocationBlock': {
|
|
4607
4676
|
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
4608
|
-
React__default.createElement(GoogleLocationBlock, Object.assign({ withAsterisk: required, name: value, placeholder: " ", label: label, "data-control": "text", "data-lead-control": name, locale: locale, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
4677
|
+
React__default.createElement(GoogleLocationBlock, Object.assign({ withAsterisk: required, name: value, placeholder: " ", label: label, "data-control": "text", "data-lead-control": name, "data-is-required": required, locale: locale, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
4609
4678
|
}
|
|
4610
4679
|
case 'DateBlock': {
|
|
4611
4680
|
const _c = form.getInputProps(value), { error } = _c, formInputProps = __rest(_c, ["error"]);
|
|
4612
4681
|
return (React__default.createElement(Input$1.Wrapper, { key: index, size: "md", withAsterisk: required, label: label, "data-invalid": !!error, inputWrapperOrder: ['label', 'input', 'description', 'error'], error: error, className: "lead-modal__form-control leadgen-form_field" },
|
|
4613
|
-
React__default.createElement(InputDate, Object.assign({ name: value, error: Boolean(error), locale: locale, "data-extra": true, "data-name": value, "data-control": "date", "data-lead-control": name, className: "leadgen-form_field_date", labelTuples: labelTuples }, formInputProps))));
|
|
4682
|
+
React__default.createElement(InputDate, Object.assign({ name: value, error: Boolean(error), locale: locale, "data-extra": true, "data-name": value, "data-control": "date", "data-lead-control": name, "data-is-required": required, className: "leadgen-form_field_date", labelTuples: labelTuples }, formInputProps))));
|
|
4614
4683
|
}
|
|
4615
4684
|
case 'LinkButtonBlock':
|
|
4616
4685
|
return (React__default.createElement("div", { key: index },
|
|
4617
4686
|
React__default.createElement("a", { target: newtab ? 'blank' : 'parrent', href: url, style: { textDecoration: 'none' } },
|
|
4618
|
-
React__default.createElement(Button
|
|
4687
|
+
React__default.createElement(Button, { type: "button", size: "md", className: `lead-modal__btn ${LEAD_CLASS}`, onClick: () => {
|
|
4619
4688
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
4620
4689
|
onOtherSubmit === null || onOtherSubmit === void 0 ? void 0 : onOtherSubmit();
|
|
4621
4690
|
} }, value))));
|
|
@@ -4633,7 +4702,7 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
4633
4702
|
gap: 8,
|
|
4634
4703
|
}, inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
|
|
4635
4704
|
return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
4636
|
-
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Checkbox, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "checkbox", "data-lead-control": name }))))));
|
|
4705
|
+
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Checkbox, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }))))));
|
|
4637
4706
|
case 'RadioBlock':
|
|
4638
4707
|
return (React__default.createElement(ChoiceField, { className: "leadgen-form_radio", key: index },
|
|
4639
4708
|
isSendMailChimp && (React__default.createElement(Input$1, { type: "hidden", name: value + '-mailchimp', value: isSendMailChimp })),
|
|
@@ -4641,10 +4710,10 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
4641
4710
|
// className="lead-modal__form-control leadgen-form_field"
|
|
4642
4711
|
label: label, size: "md", inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
|
|
4643
4712
|
return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
4644
|
-
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Radio, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "radio", "data-lead-control": name }))))));
|
|
4713
|
+
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Radio, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "radio", "data-lead-control": name, "data-is-required": required }))))));
|
|
4645
4714
|
case 'DropdownBlock':
|
|
4646
4715
|
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field DropdownBlock", key: index },
|
|
4647
|
-
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown', "data-lead-control": name }),
|
|
4716
|
+
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown', "data-lead-control": name, "data-is-required": required }),
|
|
4648
4717
|
React__default.createElement(Select
|
|
4649
4718
|
// className="lead-modal__form-control leadgen-form_field"
|
|
4650
4719
|
, Object.assign({
|
|
@@ -4678,7 +4747,7 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
4678
4747
|
const _d = form.getInputProps(`TNC-${id}`), { error } = _d, tncInputProps = __rest(_d, ["error"]);
|
|
4679
4748
|
return (React__default.createElement(ChoiceField, { className: "leadgen-form_checkbox", key: id },
|
|
4680
4749
|
React__default.createElement(Input$1.Wrapper, { error: error },
|
|
4681
|
-
React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + id, label: React__default.createElement("p", { className: "lead-modal__tnc-link", dangerouslySetInnerHTML: { __html: data.valueHTML } }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name }, tncInputProps)))));
|
|
4750
|
+
React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + id, label: React__default.createElement("p", { className: "lead-modal__tnc-link", dangerouslySetInnerHTML: { __html: data.valueHTML } }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps)))));
|
|
4682
4751
|
}
|
|
4683
4752
|
return null;
|
|
4684
4753
|
})));
|
|
@@ -4928,7 +4997,7 @@ const LEADGEN_SHOW_HEADER = [
|
|
|
4928
4997
|
];
|
|
4929
4998
|
// const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39', 'u0adw7hw8kw7t89']
|
|
4930
4999
|
const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39'];
|
|
4931
|
-
const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, onUnmount, showThankyou, campaignId, campaignCode, campaign_subot_id, locale, showEmpty, setShowEmpty, userInfo, action, }) => {
|
|
5000
|
+
const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, onUnmount, doImpression, showThankyou, campaignId, campaignCode, campaign_subot_id, locale, showEmpty, setShowEmpty, userInfo, action, }) => {
|
|
4932
5001
|
var _a, _b;
|
|
4933
5002
|
const { primaryColor } = useContext(LeadGenContext$1);
|
|
4934
5003
|
const { isMobile } = useScreenSize();
|
|
@@ -4939,7 +5008,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
4939
5008
|
const isTrackedForm = useRef(false);
|
|
4940
5009
|
const formRef = useRef();
|
|
4941
5010
|
const [lastFormRef, setLastFormRef] = useState();
|
|
4942
|
-
const onClose = () => {
|
|
5011
|
+
const onClose = (preventTrackingClose = false) => {
|
|
4943
5012
|
if (showOtpPhone) {
|
|
4944
5013
|
setShowOtpPhone(null);
|
|
4945
5014
|
}
|
|
@@ -4949,6 +5018,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
4949
5018
|
formActiveTime: formActiveTime.current,
|
|
4950
5019
|
formRef: formRef.current,
|
|
4951
5020
|
listBlockAdded,
|
|
5021
|
+
preventTrackingClose,
|
|
4952
5022
|
});
|
|
4953
5023
|
}
|
|
4954
5024
|
};
|
|
@@ -4991,12 +5061,34 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
4991
5061
|
userInfo,
|
|
4992
5062
|
format: (_a = (ISO_FORMAT[locale] || ISO_FORMAT['vi-VN'])) === null || _a === void 0 ? void 0 : _a.dateFormat,
|
|
4993
5063
|
});
|
|
5064
|
+
const popupContentRef = useRef(null);
|
|
5065
|
+
const isIos = isIOS();
|
|
5066
|
+
const keyOpen = useKeyboardOpen();
|
|
5067
|
+
const { isPushed, bottomRef } = useViewportPushedByKeyboard();
|
|
5068
|
+
const [bottomSpacing, setBottomSpacing] = useState(0);
|
|
5069
|
+
const bottomSpacingRef = useRef(bottomSpacing);
|
|
5070
|
+
const isPushedRef = useRef(isPushed);
|
|
5071
|
+
const keyOpenRef = useRef(keyOpen);
|
|
5072
|
+
const [isScrolling, setIsScrolling] = useState(false);
|
|
5073
|
+
const isScrollingRef = useRef(false);
|
|
5074
|
+
const gapBottomSpace = useRef(40);
|
|
5075
|
+
const initialHeight = useRef(0);
|
|
5076
|
+
const scrollTo = useScrollTo();
|
|
5077
|
+
const handleDoImpression = useCallback((type = 'impression') => doImpression({
|
|
5078
|
+
formValues: form.values,
|
|
5079
|
+
formActiveTime: formActiveTime.current,
|
|
5080
|
+
formRef: formRef.current,
|
|
5081
|
+
listBlockAdded,
|
|
5082
|
+
type,
|
|
5083
|
+
}), [form]);
|
|
4994
5084
|
if (window.innerWidth < 769 &&
|
|
4995
5085
|
LEADGEN_LAYOUT_NOT_SHOW_IN_MOBILE.includes(currentLayout)) {
|
|
4996
5086
|
console.log('😎 Not show fullscreen, slider on mobile ');
|
|
4997
5087
|
return null;
|
|
4998
5088
|
}
|
|
4999
5089
|
useEffect(() => {
|
|
5090
|
+
initialHeight.current = window.innerHeight;
|
|
5091
|
+
(isLightBox || isSlider) && handleDoImpression();
|
|
5000
5092
|
if (isLightBox || isFullscreen) {
|
|
5001
5093
|
document.body.classList.add('noscroll');
|
|
5002
5094
|
}
|
|
@@ -5005,6 +5097,18 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
5005
5097
|
}
|
|
5006
5098
|
clearCacheUsedEmailOrPhone();
|
|
5007
5099
|
}, []);
|
|
5100
|
+
useEffect(() => {
|
|
5101
|
+
isPushedRef.current = isPushed;
|
|
5102
|
+
}, [isPushed]);
|
|
5103
|
+
useEffect(() => {
|
|
5104
|
+
keyOpenRef.current = keyOpen;
|
|
5105
|
+
}, [keyOpen]);
|
|
5106
|
+
useEffect(() => {
|
|
5107
|
+
bottomSpacingRef.current = bottomSpacing;
|
|
5108
|
+
}, [bottomSpacing]);
|
|
5109
|
+
useEffect(() => {
|
|
5110
|
+
isScrollingRef.current = isScrolling;
|
|
5111
|
+
}, [isScrolling]);
|
|
5008
5112
|
useEffect(() => {
|
|
5009
5113
|
formRef.current && setLastFormRef(formRef.current);
|
|
5010
5114
|
}, [formRef.current]);
|
|
@@ -5032,6 +5136,18 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
5032
5136
|
}
|
|
5033
5137
|
return () => clearInterval(intervalId);
|
|
5034
5138
|
}, [showThankyou]);
|
|
5139
|
+
useEffect(() => {
|
|
5140
|
+
setBottomSpacing(isMobile && isIos && isLightBoxB
|
|
5141
|
+
? !isPushed && keyOpen
|
|
5142
|
+
? (() => {
|
|
5143
|
+
var _a;
|
|
5144
|
+
const visualHeight = (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height;
|
|
5145
|
+
const isErrorDevice = visualHeight === initialHeight.current;
|
|
5146
|
+
return isErrorDevice ? window.innerHeight * 0.4 : visualHeight;
|
|
5147
|
+
})()
|
|
5148
|
+
: 0
|
|
5149
|
+
: 0);
|
|
5150
|
+
}, [isPushed, keyOpen, isMobile, isIos, isLightBoxB]);
|
|
5035
5151
|
const listBlockAddedRequired = useMemo(() => leadGenFieldRequired(listBlockAdded), listBlockAdded);
|
|
5036
5152
|
const disabledButtonSubmit = useMemo(() => {
|
|
5037
5153
|
if (listBlockAddedRequired.length) {
|
|
@@ -5039,9 +5155,47 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
5039
5155
|
}
|
|
5040
5156
|
return false;
|
|
5041
5157
|
}, [...listBlockAddedRequired.map((k) => form.values[k])]);
|
|
5158
|
+
const handlePopupContentScroll = () => {
|
|
5159
|
+
if (!isScrollingRef.current) {
|
|
5160
|
+
const active = document.activeElement;
|
|
5161
|
+
if (formRef.current && formRef.current.contains(active)) {
|
|
5162
|
+
active.blur();
|
|
5163
|
+
}
|
|
5164
|
+
}
|
|
5165
|
+
};
|
|
5042
5166
|
const onFocus = (e) => {
|
|
5043
5167
|
// EL-926 Temporary turn off handling focus form on mobile to fix scrolling bug on lightbox A
|
|
5044
|
-
return false
|
|
5168
|
+
// return false
|
|
5169
|
+
e.preventDefault();
|
|
5170
|
+
if (!isMobile || !isIos || !isLightBoxB)
|
|
5171
|
+
return;
|
|
5172
|
+
setTimeout(() => {
|
|
5173
|
+
var _a, _b;
|
|
5174
|
+
if (!isPushedRef.current && keyOpenRef.current) {
|
|
5175
|
+
const input = e.target;
|
|
5176
|
+
const rect = input.getBoundingClientRect();
|
|
5177
|
+
const inputHeight = rect.height;
|
|
5178
|
+
const inputTop = rect.top;
|
|
5179
|
+
const viewportHeight = (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height;
|
|
5180
|
+
const isErrorDevice = viewportHeight === initialHeight.current;
|
|
5181
|
+
const currentTop = inputTop + inputHeight + (isErrorDevice ? 0 : gapBottomSpace.current);
|
|
5182
|
+
const currentScrollY = popupContentRef.current.scrollTop;
|
|
5183
|
+
const viewPort = isErrorDevice
|
|
5184
|
+
? window.innerHeight * 0.4
|
|
5185
|
+
: (_b = window.visualViewport) === null || _b === void 0 ? void 0 : _b.height;
|
|
5186
|
+
if (currentTop >= viewPort) {
|
|
5187
|
+
const gap = currentTop - viewPort;
|
|
5188
|
+
const targetScrollY = currentScrollY + gap;
|
|
5189
|
+
if (!isNaN(targetScrollY)) {
|
|
5190
|
+
setIsScrolling(true);
|
|
5191
|
+
scrollTo(popupContentRef.current, targetScrollY, 400);
|
|
5192
|
+
setTimeout(() => {
|
|
5193
|
+
setIsScrolling(false);
|
|
5194
|
+
}, 500);
|
|
5195
|
+
}
|
|
5196
|
+
}
|
|
5197
|
+
}
|
|
5198
|
+
}, 300);
|
|
5045
5199
|
};
|
|
5046
5200
|
const middlewareOnSubmit = (e) => {
|
|
5047
5201
|
e.preventDefault();
|
|
@@ -5145,13 +5299,19 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
5145
5299
|
disabledButtonSubmit,
|
|
5146
5300
|
(_b = actionBlocks === null || actionBlocks === void 0 ? void 0 : actionBlocks.submitBlock) === null || _b === void 0 ? void 0 : _b.isHide,
|
|
5147
5301
|
]);
|
|
5302
|
+
const [btnLinkLoading, setbtnLinkLoading] = useState(false);
|
|
5148
5303
|
const LinkButtonBlock = listBlockAdded.filter(({ name }) => name == LEADGEN_BLOCK.LinkButtonBlock);
|
|
5149
5304
|
const ButtonLink = !!(LinkButtonBlock === null || LinkButtonBlock === void 0 ? void 0 : LinkButtonBlock.length) && (React__default.createElement(React__default.Fragment, null, LinkButtonBlock.map((item, index) => {
|
|
5150
5305
|
var _a, _b, _c;
|
|
5151
|
-
return (React__default.createElement(Button$1, { key: `${item.name}-${index}`, component: "a", href: (_a = item === null || item === void 0 ? void 0 : item.data) === null || _a === void 0 ? void 0 : _a.url, target: ((_b = item === null || item === void 0 ? void 0 : item.data) === null || _b === void 0 ? void 0 : _b.newtab) ? '_blank' : undefined, size: "lg", variant: "filled", className: "leadgen-btn leadgen-btn_action", color: primaryColor, onClick: () => {
|
|
5152
|
-
|
|
5306
|
+
return (React__default.createElement(Button$1, { key: `${item.name}-${index}`, component: "a", href: (_a = item === null || item === void 0 ? void 0 : item.data) === null || _a === void 0 ? void 0 : _a.url, target: ((_b = item === null || item === void 0 ? void 0 : item.data) === null || _b === void 0 ? void 0 : _b.newtab) ? '_blank' : undefined, size: "lg", variant: "filled", className: "leadgen-btn leadgen-btn_action", color: primaryColor, loading: btnLinkLoading, onClick: (e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
5307
|
+
var _d, _e;
|
|
5308
|
+
e.preventDefault();
|
|
5309
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
5310
|
+
setbtnLinkLoading(true);
|
|
5311
|
+
yield handleDoImpression('redirects');
|
|
5153
5312
|
onOtherSubmit === null || onOtherSubmit === void 0 ? void 0 : onOtherSubmit();
|
|
5154
|
-
|
|
5313
|
+
window.open((_d = item === null || item === void 0 ? void 0 : item.data) === null || _d === void 0 ? void 0 : _d.url, ((_e = item === null || item === void 0 ? void 0 : item.data) === null || _e === void 0 ? void 0 : _e.newtab) ? '_blank' : undefined);
|
|
5314
|
+
}) }, (_c = item === null || item === void 0 ? void 0 : item.data) === null || _c === void 0 ? void 0 : _c.value));
|
|
5155
5315
|
})));
|
|
5156
5316
|
const PopupHeader = showHeader && (React__default.createElement("header", { className: clsx('leadgen-header', { 'leadgen-header_only': onlyHeader }) }, LEADGEN_SHOW_HEADER.includes(currentLayout) ? (React__default.createElement(HeaderImage, { src: imageMobile, className: "lead-modal__image" })) : (React__default.createElement(React__default.Fragment, null,
|
|
5157
5317
|
React__default.createElement(HeaderImage, { src: imageDesktop, className: "le-only-desktop lead-modal__image" }),
|
|
@@ -5161,7 +5321,12 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
5161
5321
|
React__default.createElement("form", { ref: formRef, className: "leadgen-form", onFocus: onFocus, onSubmit: middlewareOnSubmit },
|
|
5162
5322
|
React__default.createElement(FormContainer, { title: title, titleAlign: titleAlign, description: description, descriptionAlign: descriptionAlign, header: headerInsideFormContainer && PopupHeader, footer: hasForm ? ButtonSubmit : ButtonLink, "data-hidden-form": !hasForm },
|
|
5163
5323
|
React__default.createElement("div", { className: "leadgen-form_inner" },
|
|
5164
|
-
React__default.createElement(LightboxFields, { listBlockAdded: listBlockAdded, popupId: popupId, locale: locale, onClose: onClose, onOtherSubmit: onOtherSubmit }))))
|
|
5324
|
+
React__default.createElement(LightboxFields, { listBlockAdded: listBlockAdded, popupId: popupId, locale: locale, onClose: onClose, onOtherSubmit: onOtherSubmit })))),
|
|
5325
|
+
React__default.createElement("div", { style: {
|
|
5326
|
+
height: `${bottomSpacing}px`,
|
|
5327
|
+
width: '100%',
|
|
5328
|
+
transition: 'height .2s ease',
|
|
5329
|
+
} })));
|
|
5165
5330
|
const PopupOtp = showOtpPhone && (React__default.createElement(OtpBlock, { otpData: showOtpPhone, autoSendWhenOpen: false, onSuccess: () => {
|
|
5166
5331
|
setShowOtpPhone(null);
|
|
5167
5332
|
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit({
|
|
@@ -5172,16 +5337,24 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
5172
5337
|
});
|
|
5173
5338
|
} }));
|
|
5174
5339
|
const PopupThankYou = showThankyou && (React__default.createElement(ThankyouPopup, { title: showThankyou.title, titleAlign: showThankyou.titleAlign, subtitle: showThankyou.subtitle, subtitleAlign: showThankyou.subtitleAlign, link: showThankyou.link, linkNewTab: showThankyou.linkNewTab, linkText: showThankyou.linkText, image: showThankyou.image }));
|
|
5175
|
-
const PopupContent = (React__default.createElement("div", { className: clsx('leadgen-content', {
|
|
5340
|
+
const PopupContent = (React__default.createElement("div", { ref: popupContentRef, className: clsx('leadgen-content', {
|
|
5176
5341
|
'leadgen-content_small': limitFieldsLightBoxB,
|
|
5177
|
-
}) },
|
|
5342
|
+
}), onScroll: handlePopupContentScroll },
|
|
5178
5343
|
!headerInsideFormContainer && PopupHeader,
|
|
5179
5344
|
!onlyHeader && (React__default.createElement("div", { className: "leadgen-inner" },
|
|
5180
5345
|
PopupThankYou,
|
|
5181
5346
|
!showThankyou && (React__default.createElement(React__default.Fragment, null,
|
|
5182
5347
|
PopupOtp,
|
|
5183
5348
|
PopupEmpty,
|
|
5184
|
-
!(showOtpPhone || showEmpty) && PopupForm))))
|
|
5349
|
+
!(showOtpPhone || showEmpty) && PopupForm)))),
|
|
5350
|
+
React__default.createElement("div", { ref: bottomRef, style: {
|
|
5351
|
+
position: 'fixed',
|
|
5352
|
+
bottom: 0,
|
|
5353
|
+
left: 0,
|
|
5354
|
+
height: 1,
|
|
5355
|
+
width: '100%',
|
|
5356
|
+
pointerEvents: 'none',
|
|
5357
|
+
} })));
|
|
5185
5358
|
const styleOverlay = useMemo(() => {
|
|
5186
5359
|
let styleContent = `.leadgen-inner {background-repeat: no-repeat;background-size: cover;background-position:center;}`;
|
|
5187
5360
|
if (isMobile && imageOverlayMobile) {
|
|
@@ -5224,7 +5397,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
5224
5397
|
return React__default.createElement(SideBarLayout, { content: PopupContainer });
|
|
5225
5398
|
}
|
|
5226
5399
|
else if (isInline) {
|
|
5227
|
-
return (React__default.createElement(InlineLayout, { action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition }));
|
|
5400
|
+
return (React__default.createElement(InlineLayout, { action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
|
|
5228
5401
|
}
|
|
5229
5402
|
return null;
|
|
5230
5403
|
};
|
|
@@ -5317,26 +5490,9 @@ function getCategoryLevel(t = 'Xin chao {{category_2}} extra') {
|
|
|
5317
5490
|
return null;
|
|
5318
5491
|
}
|
|
5319
5492
|
}
|
|
5320
|
-
const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
|
|
5493
|
+
const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
|
|
5321
5494
|
var _a, _b;
|
|
5322
5495
|
const { apiUrl, siteDomain } = useContext(LeadGenContext$1);
|
|
5323
|
-
useEffect(() => {
|
|
5324
|
-
const gaCookie = getCookie('_ga') || null;
|
|
5325
|
-
!currentLayout.includes('Inline') &&
|
|
5326
|
-
fetch(`${apiUrl}api/campaign/${code}/impression`, {
|
|
5327
|
-
method: 'POST',
|
|
5328
|
-
headers: {
|
|
5329
|
-
'Content-Type': 'application/json',
|
|
5330
|
-
},
|
|
5331
|
-
body: JSON.stringify({
|
|
5332
|
-
action,
|
|
5333
|
-
url: location.href.toLowerCase(),
|
|
5334
|
-
title_article: document.title,
|
|
5335
|
-
cookie_id: getCookie('hhg-id'),
|
|
5336
|
-
ga_client_id: gaCookie,
|
|
5337
|
-
}),
|
|
5338
|
-
});
|
|
5339
|
-
}, []);
|
|
5340
5496
|
const { extra_fields, image, image_desktop, code, image_background, image_overlay_mobile, image_overlay_desktop, } = campaign || {};
|
|
5341
5497
|
const { currentLayout } = extra_fields;
|
|
5342
5498
|
const imageBlocks = extra_fields.imageBlocks
|
|
@@ -5424,7 +5580,7 @@ const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, showThan
|
|
|
5424
5580
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
5425
5581
|
};
|
|
5426
5582
|
if (currentLayout === 'CenterTab') {
|
|
5427
|
-
return (React__default.createElement(CenterTabLayout, { popupId: popupIdRef.current, url: imageBlocks.imageMobile.data.url, newTab: imageBlocks.imageMobile.data.newtab, imageMobile: image, imageDestkop: image_desktop, onClose: onClose, onOtherSubmit: onOtherSubmit }));
|
|
5583
|
+
return (React__default.createElement(CenterTabLayout, { popupId: popupIdRef.current, url: imageBlocks.imageMobile.data.url, newTab: imageBlocks.imageMobile.data.newtab, imageMobile: image, imageDestkop: image_desktop, onClose: onClose, onOtherSubmit: onOtherSubmit, doImpression: doImpression }));
|
|
5428
5584
|
}
|
|
5429
5585
|
else if (currentLayout === 'Tab') {
|
|
5430
5586
|
return (React__default.createElement(TabLayout, { popupId: popupIdRef.current, url: imageBlocks.imageMobile.data.url, newTab: imageBlocks.imageMobile.data.newtab, image: image, onClose: onClose, onOtherSubmit: onOtherSubmit }));
|
|
@@ -5437,7 +5593,7 @@ const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, showThan
|
|
|
5437
5593
|
currentLayout == 'Fullscreen' ||
|
|
5438
5594
|
currentLayout == 'Sidebar' ||
|
|
5439
5595
|
currentLayout == 'Slider') {
|
|
5440
|
-
return (React__default.createElement(LightboxLayout, { popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, onUnmount: onUnmount, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (params) => onSubmit(params, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaignCode: campaign.code, campaign_subot_id: campaign.bot_id || [], locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo, action: action }));
|
|
5596
|
+
return (React__default.createElement(LightboxLayout, { popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, onUnmount: onUnmount, doImpression: doImpression, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (params) => onSubmit(params, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaignCode: campaign.code, campaign_subot_id: campaign.bot_id || [], locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo, action: action }));
|
|
5441
5597
|
}
|
|
5442
5598
|
else if (currentLayout.includes('Skin')) {
|
|
5443
5599
|
return (React__default.createElement(SkinLayout, { popupId: popupIdRef.current, link: actionBlocks.linkButtonBlock.data.url, linkNewTab: !!actionBlocks.linkButtonBlock.data.newtab, linkText: actionBlocks.linkButtonBlock.data.value, onClose: onClose, onOtherSubmit: onOtherSubmit, imageMobile: image, imageDesktop: image_desktop, currentLayout: currentLayout }));
|
|
@@ -5446,11 +5602,11 @@ const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, showThan
|
|
|
5446
5602
|
};
|
|
5447
5603
|
|
|
5448
5604
|
const numberFormatType = 2; // i18n.phonenumbers.PhoneNumberFormat.NATIONAL
|
|
5449
|
-
const formatFormData = (currentForm, formData) => {
|
|
5605
|
+
const formatFormData = (currentForm, formData = []) => {
|
|
5450
5606
|
return Object.keys(formData)
|
|
5451
5607
|
.filter((key) => !!formData[key])
|
|
5452
5608
|
.map((name) => {
|
|
5453
|
-
var _a, _b, _c, _d;
|
|
5609
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5454
5610
|
const value = String(formData[name]);
|
|
5455
5611
|
const control = ((_a = currentForm
|
|
5456
5612
|
.querySelector(`*[name="${name}"][data-control]`)) === null || _a === void 0 ? void 0 : _a.getAttribute('data-control')) ||
|
|
@@ -5462,6 +5618,11 @@ const formatFormData = (currentForm, formData) => {
|
|
|
5462
5618
|
((_d = currentForm
|
|
5463
5619
|
.querySelector(`*[data-extra][data-name="${name}"]`)) === null || _d === void 0 ? void 0 : _d.getAttribute('data-lead-control')) ||
|
|
5464
5620
|
'text';
|
|
5621
|
+
const isRequired = Boolean(((_e = currentForm
|
|
5622
|
+
.querySelector(`*[name="${name}"][data-is-required]`)) === null || _e === void 0 ? void 0 : _e.getAttribute('data-is-required')) ||
|
|
5623
|
+
((_f = currentForm
|
|
5624
|
+
.querySelector(`*[data-extra][data-name="${name}"]`)) === null || _f === void 0 ? void 0 : _f.getAttribute('data-is-required')) ||
|
|
5625
|
+
'text');
|
|
5465
5626
|
const formatedValue = control === 'tel'
|
|
5466
5627
|
? window.intlTelInputUtils
|
|
5467
5628
|
.formatNumber(String(value), LEAD_LOCALE === null || LEAD_LOCALE === void 0 ? void 0 : LEAD_LOCALE.countryCodeNumber, numberFormatType)
|
|
@@ -5474,6 +5635,7 @@ const formatFormData = (currentForm, formData) => {
|
|
|
5474
5635
|
value: formatedValue,
|
|
5475
5636
|
control,
|
|
5476
5637
|
leadControl,
|
|
5638
|
+
isRequired,
|
|
5477
5639
|
// is_sent_mailchimp: currentForm.querySelector(
|
|
5478
5640
|
// `div[data-name="${i.name}-mailchimp"]`,
|
|
5479
5641
|
// )
|
|
@@ -5498,12 +5660,13 @@ const formatTrackingData = (params) => {
|
|
|
5498
5660
|
return compareVal == control.key;
|
|
5499
5661
|
});
|
|
5500
5662
|
if (findIndex > -1) {
|
|
5501
|
-
const
|
|
5502
|
-
listFieldHasValue.push(
|
|
5663
|
+
const curInfo = listBlockAdded[findIndex];
|
|
5664
|
+
listFieldHasValue.push(curInfo.data.value);
|
|
5503
5665
|
return {
|
|
5504
5666
|
field_name: control.key,
|
|
5505
|
-
component_type:
|
|
5667
|
+
component_type: curInfo.name,
|
|
5506
5668
|
value: control.value,
|
|
5669
|
+
is_required: curInfo.data.required,
|
|
5507
5670
|
};
|
|
5508
5671
|
}
|
|
5509
5672
|
})
|
|
@@ -5513,6 +5676,7 @@ const formatTrackingData = (params) => {
|
|
|
5513
5676
|
return {
|
|
5514
5677
|
field_name: item.data.value,
|
|
5515
5678
|
component_type: item.name,
|
|
5679
|
+
is_required: item.data.required,
|
|
5516
5680
|
};
|
|
5517
5681
|
}
|
|
5518
5682
|
})
|
|
@@ -5563,7 +5727,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5563
5727
|
};
|
|
5564
5728
|
const onClose = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
5565
5729
|
var _c, _d;
|
|
5566
|
-
const { formRef, listBlockAdded
|
|
5730
|
+
const { formRef, listBlockAdded = [], formValues: formDataObj, } = params || {};
|
|
5567
5731
|
if (!showCampaign)
|
|
5568
5732
|
return;
|
|
5569
5733
|
LeadLog(`👋👋👋 CLOSE POPUP ${showCampaign.code} 👋👋👋`);
|
|
@@ -5579,7 +5743,6 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5579
5743
|
}
|
|
5580
5744
|
}
|
|
5581
5745
|
}
|
|
5582
|
-
const listBlockAdded = listBlockAddedProp.filter((i) => i.name !== 'LinkButtonBlock');
|
|
5583
5746
|
yield Promise.all([
|
|
5584
5747
|
fetch(`${apiUrl}api/campaign/${showCampaign.code}/popup_exit`, {
|
|
5585
5748
|
method: 'POST',
|
|
@@ -5590,20 +5753,21 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5590
5753
|
action: 'CLICK',
|
|
5591
5754
|
url: location.href.toLowerCase(),
|
|
5592
5755
|
title_article: document.title,
|
|
5593
|
-
cookie_id: getCookie('hhg-id'),
|
|
5756
|
+
cookie_id: getCookie('hhg-id') || '',
|
|
5594
5757
|
duration: Math.ceil((Date.now() - leadStartTimeRef.current) / 1000),
|
|
5595
5758
|
}),
|
|
5596
5759
|
}),
|
|
5597
5760
|
!showThankyou &&
|
|
5598
|
-
|
|
5761
|
+
!params.preventTrackingClose &&
|
|
5599
5762
|
trackingCompletionForm({
|
|
5600
5763
|
commonData: {
|
|
5601
|
-
cookie_id: getCookie('hhg-id'),
|
|
5764
|
+
cookie_id: getCookie('hhg-id') || '',
|
|
5602
5765
|
ga_client_id: getCookie('_ga') || null,
|
|
5603
5766
|
country_code: locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN',
|
|
5604
5767
|
status: 'in_progress',
|
|
5605
5768
|
campaign_id: showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.id,
|
|
5606
5769
|
total_fields: listBlockAdded.length,
|
|
5770
|
+
type: 'close',
|
|
5607
5771
|
},
|
|
5608
5772
|
currentLayout,
|
|
5609
5773
|
formParams: Object.assign(Object.assign({}, params), { listBlockAdded, formValues: formatFormData(formRef, formDataObj) }),
|
|
@@ -5612,21 +5776,16 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5612
5776
|
onCloseBase();
|
|
5613
5777
|
});
|
|
5614
5778
|
const onUnmount = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
5615
|
-
const { formRef, listBlockAdded
|
|
5616
|
-
const listBlockAdded = listBlockAddedProp.filter((i) => i.name !== 'LinkButtonBlock');
|
|
5617
|
-
if (listBlockAdded.length === 0)
|
|
5618
|
-
return;
|
|
5619
|
-
if ([LEADGEN_LAYOUT.InlineA, LEADGEN_LAYOUT.InlineB].includes(currentLayout) &&
|
|
5620
|
-
Object.keys(formDataObj).length === 0)
|
|
5621
|
-
return;
|
|
5779
|
+
const { formRef, listBlockAdded, formValues: formDataObj } = params || {};
|
|
5622
5780
|
const data = formatTrackingData({
|
|
5623
5781
|
commonData: {
|
|
5624
|
-
cookie_id: getCookie('hhg-id'),
|
|
5782
|
+
cookie_id: getCookie('hhg-id') || '',
|
|
5625
5783
|
ga_client_id: getCookie('_ga') || null,
|
|
5626
5784
|
country_code: locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN',
|
|
5627
5785
|
status: 'in_progress',
|
|
5628
5786
|
campaign_id: showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.id,
|
|
5629
5787
|
total_fields: listBlockAdded.length,
|
|
5788
|
+
type: 'close',
|
|
5630
5789
|
},
|
|
5631
5790
|
currentLayout,
|
|
5632
5791
|
formParams: Object.assign(Object.assign({}, params), { listBlockAdded, formValues: formatFormData(formRef, formDataObj) }),
|
|
@@ -5634,6 +5793,29 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5634
5793
|
const blob = new Blob([JSON.stringify(data)], { type: 'application/json' });
|
|
5635
5794
|
navigator.sendBeacon(`${apiUrl}api/collection/tracking-completion`, blob);
|
|
5636
5795
|
});
|
|
5796
|
+
const doImpression = (params) => {
|
|
5797
|
+
const { listBlockAdded = [] } = params || {};
|
|
5798
|
+
const data = formatTrackingData({
|
|
5799
|
+
commonData: {
|
|
5800
|
+
cookie_id: getCookie('hhg-id') || '',
|
|
5801
|
+
ga_client_id: getCookie('_ga') || null,
|
|
5802
|
+
country_code: locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN',
|
|
5803
|
+
status: 'in_progress',
|
|
5804
|
+
campaign_id: showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.id,
|
|
5805
|
+
total_fields: listBlockAdded.length,
|
|
5806
|
+
type: (params === null || params === void 0 ? void 0 : params.type) || 'impression',
|
|
5807
|
+
},
|
|
5808
|
+
currentLayout,
|
|
5809
|
+
formParams: Object.assign(Object.assign({}, params), { listBlockAdded, formValues: [] }),
|
|
5810
|
+
});
|
|
5811
|
+
return fetch(`${apiUrl}api/collection/tracking-completion`, {
|
|
5812
|
+
method: 'POST',
|
|
5813
|
+
headers: {
|
|
5814
|
+
'Content-Type': 'application/json',
|
|
5815
|
+
},
|
|
5816
|
+
body: JSON.stringify(data),
|
|
5817
|
+
});
|
|
5818
|
+
};
|
|
5637
5819
|
useEffect(() => {
|
|
5638
5820
|
if (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code)
|
|
5639
5821
|
return;
|
|
@@ -5673,11 +5855,6 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5673
5855
|
});
|
|
5674
5856
|
}, []);
|
|
5675
5857
|
const trackingCompletionForm = useCallback((params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
5676
|
-
const { currentLayout, formParams } = params || {};
|
|
5677
|
-
const { formValues } = formParams;
|
|
5678
|
-
if ([LEADGEN_LAYOUT.InlineA, LEADGEN_LAYOUT.InlineB].includes(currentLayout) &&
|
|
5679
|
-
Object.keys(formValues).length === 0)
|
|
5680
|
-
return;
|
|
5681
5858
|
const data = formatTrackingData(params);
|
|
5682
5859
|
return fetch(`${apiUrl}api/collection/tracking-completion`, {
|
|
5683
5860
|
method: 'POST',
|
|
@@ -5689,8 +5866,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5689
5866
|
}), [(_a = showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.extra_fields) === null || _a === void 0 ? void 0 : _a.currentLayout]);
|
|
5690
5867
|
const onSubmit = (params, categoryLevel, categoryData) => __awaiter(void 0, void 0, void 0, function* () {
|
|
5691
5868
|
var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
5692
|
-
const { formRef, listBlockAdded
|
|
5693
|
-
const listBlockAdded = listBlockAddedProp.filter((i) => i.name !== 'LinkButtonBlock');
|
|
5869
|
+
const { formRef, listBlockAdded = [], formValues: formDataObj, } = params || {};
|
|
5694
5870
|
if (!formDataObj || Object.values(formDataObj).every((v) => !Boolean(v))) {
|
|
5695
5871
|
setShowEmpty(true);
|
|
5696
5872
|
return;
|
|
@@ -5709,7 +5885,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5709
5885
|
yield require('intl-tel-input/build/js/utils');
|
|
5710
5886
|
}
|
|
5711
5887
|
const commonData = {
|
|
5712
|
-
cookie_id: getCookie('hhg-id'),
|
|
5888
|
+
cookie_id: getCookie('hhg-id') || '',
|
|
5713
5889
|
ga_client_id: gaCookie,
|
|
5714
5890
|
};
|
|
5715
5891
|
const data = Object.assign({ url: location.href.toLowerCase(), title_article: document.title, meta: [...formData, ...extraPayloadValues] }, commonData);
|
|
@@ -5740,7 +5916,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5740
5916
|
}),
|
|
5741
5917
|
listBlockAdded.length > 0 &&
|
|
5742
5918
|
trackingCompletionForm({
|
|
5743
|
-
commonData: Object.assign(Object.assign({}, commonData), { country_code: locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN', status: 'complete', campaign_id: showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.id, total_fields: listBlockAdded.length }),
|
|
5919
|
+
commonData: Object.assign(Object.assign({}, commonData), { country_code: locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN', status: 'complete', campaign_id: showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.id, total_fields: listBlockAdded.length, type: 'submit_form' }),
|
|
5744
5920
|
currentLayout,
|
|
5745
5921
|
formParams: Object.assign(Object.assign({}, params), { listBlockAdded, formValues: formatedFormData }),
|
|
5746
5922
|
}),
|
|
@@ -5843,7 +6019,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5843
6019
|
!!currentLayout &&
|
|
5844
6020
|
!currentLayout.includes('Inline') &&
|
|
5845
6021
|
!currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.6, center: true, zIndex: 400, pos: 'fixed', onClick: () => onClose() })),
|
|
5846
|
-
React__default.createElement(NewLeadPopup, { campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, onUnmount: onUnmount, showThankyou: showThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo })))));
|
|
6022
|
+
React__default.createElement(NewLeadPopup, { campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, onUnmount: onUnmount, doImpression: doImpression, showThankyou: showThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo })))));
|
|
5847
6023
|
})))))));
|
|
5848
6024
|
};
|
|
5849
6025
|
const LeadGen = _LeadGen;
|