@hhgtech/hhg-components 1.29.338 → 1.29.340
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/{LastPeriod-89091c7b.js → LastPeriod-1a6374f3.js} +1 -1
- package/build/{MobileBottomNavigationIcon-399ad3ad.js → MobileBottomNavigationIcon-c5c86978.js} +3 -3
- package/build/{Spinner-d17a0ca2.js → Spinner-76126de0.js} +1 -1
- package/build/{WhatsApp-acd71b03.js → WhatsApp-97f43937.js} +1 -1
- package/build/adapters.js +19 -19
- package/build/atoms.js +49 -46
- package/build/babyGrowth.js +83 -83
- package/build/cache.js +2 -2
- package/build/care.js +17 -17
- package/build/careBookingSearchBar.js +14 -14
- package/build/careBookingSearchBarV2.js +15 -15
- package/build/components/adapters/button/index.d.ts +3 -1
- package/build/components/atoms/drawerComponent/index.d.ts +17 -0
- package/build/components/atoms/drawerComponent/index.styled.d.ts +7 -0
- package/build/components/atoms/googleLocation/index.d.ts +7 -0
- package/build/components/atoms/index.d.ts +1 -0
- package/build/components.js +134 -131
- package/build/{constants-b7eb5278.js → constants-f300306e.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-ee13f589.js → core-5bc451dd.js} +1 -1
- package/build/{dataTransform-0ef14648.js → dataTransform-ed8fe670.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-189b8ca4.js → editor-6fed0488.js} +11 -11
- package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/{LastPeriod-8070f658.js → LastPeriod-90585413.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-211a27a0.js → MobileBottomNavigationIcon-858da525.js} +3 -3
- package/build/esm/{Spinner-db782b3d.js → Spinner-be0e4092.js} +1 -1
- package/build/esm/{WhatsApp-5b6c06ac.js → WhatsApp-78edc199.js} +1 -1
- package/build/esm/adapters.js +19 -19
- package/build/esm/atoms.js +48 -46
- package/build/esm/babyGrowth.js +83 -83
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +17 -17
- package/build/esm/careBookingSearchBar.js +14 -14
- package/build/esm/careBookingSearchBarV2.js +15 -15
- package/build/esm/components/adapters/button/index.d.ts +3 -1
- package/build/esm/components/atoms/drawerComponent/index.d.ts +17 -0
- package/build/esm/components/atoms/drawerComponent/index.styled.d.ts +7 -0
- package/build/esm/components/atoms/googleLocation/index.d.ts +7 -0
- package/build/esm/components/atoms/index.d.ts +1 -0
- package/build/esm/components.js +92 -90
- package/build/esm/{constants-f241a79c.js → constants-ecb29762.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-43e30311.js → core-87c7b461.js} +1 -1
- package/build/esm/{dataTransform-7822d509.js → dataTransform-87d9625e.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-7fa5ef1b.js → editor-d4330cef.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/healthToolsCardWrapper.js +18 -18
- package/build/esm/healthToolsForm.js +33 -33
- package/build/esm/hooks/usePlacesAutocomplete.d.ts +2 -0
- package/build/esm/hooks.js +13 -13
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/icons/ChatbotBg.d.ts +4 -0
- package/build/esm/icons/Search.d.ts +4 -0
- package/build/esm/icons/index.d.ts +5 -3
- package/build/esm/{index-62b26728.js → index-00f09cf6.js} +16 -16
- package/build/esm/{index-e9043aa2.js → index-019adbaf.js} +1 -1
- package/build/esm/{index-8f89df60.js → index-01d9e536.js} +5 -5
- package/build/esm/{index-3bd5b04a.js → index-03288bcf.js} +4 -4
- package/build/esm/{index-6974a987.js → index-0b7d8963.js} +2 -2
- package/build/esm/{index-8668ed7f.js → index-0f1543d7.js} +10 -10
- package/build/esm/{index-e8b0b4d9.js → index-123c081a.js} +7 -7
- package/build/esm/{index-64ec31be.js → index-13fce5ac.js} +15 -15
- package/build/esm/{index-a5e752c6.js → index-1504c2aa.js} +2 -2
- package/build/esm/{index-5d674bf4.js → index-1e9f4237.js} +17 -17
- package/build/esm/{index-74ac12bd.js → index-1eae6dad.js} +18 -18
- package/build/esm/{index-86c0fae2.js → index-1fd8f540.js} +24 -24
- package/build/esm/{index-87edbb1d.js → index-2337fa14.js} +2 -2
- package/build/esm/{index-56a25ec2.js → index-2632aa93.js} +1 -1
- package/build/esm/{index-f59720b5.js → index-2c1feeb6.js} +2 -2
- package/build/esm/{index-2faf0a35.js → index-2e63b230.js} +13 -13
- package/build/esm/{index-3650dce4.js → index-32e6be45.js} +2 -2
- package/build/esm/{index-39d3aeb9.js → index-34be1eba.js} +3 -3
- package/build/esm/{index-70197d3f.js → index-37f903a4.js} +32 -32
- package/build/esm/{index-fb6bc7e7.js → index-4111dadd.js} +2 -2
- package/build/esm/{index-3b85366b.js → index-44468b41.js} +2 -2
- package/build/esm/{index-5445efe1.js → index-4af76041.js} +24 -24
- package/build/esm/{index-1f331099.js → index-4ce0d02d.js} +2 -2
- package/build/esm/index-4e6ef889.js +106 -0
- package/build/esm/{index-b17969e1.js → index-555a1475.js} +21 -21
- package/build/esm/{index-07038d76.js → index-58761cf6.js} +18 -18
- package/build/esm/{index-c089e01f.js → index-5ea23630.js} +3 -3
- package/build/esm/{index-91d66c14.js → index-5ff73b27.js} +16 -16
- package/build/esm/{index-966e4436.js → index-72ce6bda.js} +6 -6
- package/build/esm/{index-26da292d.js → index-7e4b41a6.js} +3 -3
- package/build/esm/{index-80b73302.js → index-7f413fc2.js} +1 -1
- package/build/esm/{index-1835251a.js → index-82f8ee8c.js} +3 -3
- package/build/esm/{index-38aa414e.js → index-83808412.js} +16 -16
- package/build/esm/{index-640ebb25.js → index-839868dd.js} +18 -18
- package/build/esm/{index-0978e0f7.js → index-87c1194c.js} +13 -13
- package/build/esm/{index-9997bba8.js → index-8908050f.js} +13 -13
- package/build/esm/{index-3e7a320f.js → index-8effb8bb.js} +16 -16
- package/build/esm/{index-1d50efb8.js → index-91ab046b.js} +2 -2
- package/build/esm/{index-0f5a89fe.js → index-936e8df5.js} +30 -30
- package/build/esm/{index-88cd3b64.js → index-a04fca87.js} +15 -15
- package/build/esm/{index-bbe96515.js → index-a3f67580.js} +3 -3
- package/build/esm/{index-2d1a1fb1.js → index-a5b7cee7.js} +5 -5
- package/build/esm/{index-7b1c9112.js → index-a62790f3.js} +31 -31
- package/build/esm/{index-e8c8ada3.js → index-abc8e5a2.js} +17 -17
- package/build/esm/{index-2d144eb6.js → index-adc9b0f5.js} +1 -1
- package/build/esm/{index-c304f86e.js → index-b10f98a4.js} +2 -2
- package/build/esm/{index-d6107e3f.js → index-bc14da4f.js} +3 -3
- package/build/esm/{index-721f9e73.js → index-bd07e913.js} +5 -5
- package/build/esm/{index-3ffca583.js → index-bf299dbd.js} +1 -1
- package/build/esm/{index-678562b1.js → index-cf3f2487.js} +2 -2
- package/build/esm/{index-7a43081b.js → index-d43b616f.js} +1 -1
- package/build/esm/{index-a9595e58.js → index-d66fae79.js} +7 -7
- package/build/esm/{index-83b8314e.js → index-d7b5a6d0.js} +13 -13
- package/build/esm/{index-6c457282.js → index-e0229c87.js} +1 -1
- package/build/esm/{index-fce0a0ff.js → index-e236a5ee.js} +6 -6
- package/build/esm/{index-09617215.js → index-e2e59f48.js} +2 -2
- package/build/esm/{index-d5e4dd35.js → index-e5a32d34.js} +1 -1
- package/build/esm/{index-5781be37.js → index-e82581e5.js} +3 -3
- package/build/esm/{index-8a772bc8.js → index-eb189e33.js} +14 -14
- package/build/esm/{index-acf3e61a.js → index-ee1def10.js} +6 -6
- package/build/esm/{index-ed980322.js → index-f3792616.js} +20 -20
- package/build/esm/{index-8efcbe09.js → index-f52571df.js} +1 -1
- package/build/esm/{index-184683ba.js → index-f5dad8b7.js} +6 -6
- package/build/esm/index.css +1 -1
- package/build/esm/index.js +146 -117
- package/build/esm/{labelSorting-563231b1.js → labelSorting-3e75f9ce.js} +4 -4
- package/build/esm/lead/components/context.d.ts +2 -0
- package/build/esm/lead/components/index.d.ts +4 -2
- package/build/esm/lead/index.d.ts +1 -1
- package/build/esm/lead/layouts/ emptyIcon.d.ts +6 -0
- package/build/esm/lead/layouts/lightbox/fields/textField/index.d.ts +13 -0
- package/build/esm/lead/layouts/lightbox/fields/textField/index.styled.d.ts +11 -0
- package/build/esm/lead/layouts/lightbox/index.d.ts +4 -2
- package/build/esm/lead/newLeadPopup.d.ts +4 -2
- package/build/esm/lead.css +1 -1
- package/build/esm/lead.js +822 -352
- package/build/esm/{logoIcon-0e2158e2.js → logoIcon-f7b17d63.js} +2 -2
- package/build/esm/mantine.js +25 -25
- package/build/esm/misc.js +16 -16
- package/build/esm/miscGetDynamicHealthTool.js +4 -4
- package/build/esm/miscGetSocialList.js +8 -8
- package/build/esm/miscScreenSizeContext.js +1 -1
- package/build/esm/mobileBottomNavigation.js +5 -5
- package/build/esm/mobileBottomNavigationIcon.js +5 -5
- package/build/esm/molecules.js +69 -69
- package/build/esm/moleculesArticleCard.js +6 -6
- package/build/esm/moleculesArticleCardV2.js +16 -16
- package/build/esm/navigation.js +40 -40
- package/build/esm/navigationLogoutPopup.js +9 -9
- package/build/esm/navigationProfileButton.js +23 -23
- package/build/esm/onboardingV2.js +29 -29
- package/build/esm/organisms.js +44 -44
- package/build/esm/{post-f1d31186.js → post-4c7a5a88.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 +26 -26
- package/build/esm/{store-403e6889.js → store-d898de37.js} +4 -4
- package/build/esm/subot.js +33 -33
- package/build/esm/surveyOrPremiumBanner.js +31 -31
- package/build/esm/surveyQuestionCard.js +10 -10
- package/build/esm/{surveyThankyouCard-1f4a4fb8.js → surveyThankyouCard-46b6c332.js} +5 -5
- package/build/esm/together.js +53 -53
- package/build/esm/togetherApiUtils.js +4 -4
- package/build/esm/togetherAtoms.js +30 -30
- package/build/esm/togetherComponentGlobalContext.js +4 -4
- package/build/esm/togetherMolecules.js +48 -48
- package/build/esm/togetherMoleculesCardAuthor.js +27 -27
- package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
- package/build/esm/togetherMoleculesProfileDetail.js +37 -37
- package/build/esm/togetherOrganisms.js +47 -47
- package/build/esm/togetherRichTextEditor.js +17 -17
- package/build/esm/togetherShareBox.js +10 -10
- package/build/esm/{treePopoverMenu-d654cbb8.js → treePopoverMenu-7f9c09b5.js} +19 -19
- package/build/esm/{types-700125e9.js → types-f5af3308.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-f1aaee5c.js → useCategory-ad0f6153.js} +5 -5
- package/build/esm/{useHealthToolCache-b12dcbb3.js → useHealthToolCache-31742124.js} +1 -1
- package/build/esm/{useMantineLocale-889fb2af.js → useMantineLocale-374d7d18.js} +6 -6
- package/build/esm/{usePlacesAutocomplete-0e947041.js → usePlacesAutocomplete-765a96ce.js} +2 -1
- package/build/esm/{useScreenSize-46100ed1.js → useScreenSize-77e1ec29.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-d0898b84.js → utils-062a0cfa.js} +2 -2
- package/build/esm/{utils-f6a880d4.js → utils-16593d15.js} +3 -3
- package/build/esm/{utils-bfbcca3e.js → utils-1711bf04.js} +2 -2
- package/build/esm/vaccination.js +21 -21
- package/build/footer.js +21 -21
- package/build/gAssets.js +2 -2
- package/build/healthToolsCardWrapper.js +18 -18
- package/build/healthToolsForm.js +33 -33
- package/build/hooks/usePlacesAutocomplete.d.ts +2 -0
- package/build/hooks.js +13 -13
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/icons/ChatbotBg.d.ts +4 -0
- package/build/icons/Search.d.ts +4 -0
- package/build/icons/index.d.ts +5 -3
- package/build/{index-b26691c0.js → index-08c3c80a.js} +3 -3
- package/build/index-0a9e192e.js +113 -0
- package/build/{index-58cd5e47.js → index-107b2539.js} +2 -2
- package/build/{index-e05a4a05.js → index-16b266f3.js} +20 -20
- package/build/{index-26cc33c5.js → index-1cd0877e.js} +18 -18
- package/build/{index-5eff89f2.js → index-1d6e363b.js} +2 -2
- package/build/{index-dee56331.js → index-23225bea.js} +24 -24
- package/build/{index-31bdea2f.js → index-24dd62ce.js} +3 -3
- package/build/{index-05ddfb23.js → index-2797c1c7.js} +3 -3
- package/build/{index-1d26ca5a.js → index-29b11213.js} +5 -5
- package/build/{index-62595bed.js → index-2db8fdfd.js} +17 -17
- package/build/{index-8e1d5a40.js → index-2e4b0f2b.js} +6 -6
- package/build/{index-6f9f6858.js → index-3ac0dc17.js} +1 -1
- package/build/{index-358c6222.js → index-448ed4a1.js} +21 -21
- package/build/{index-acd083c0.js → index-4e4572d9.js} +31 -31
- package/build/{index-52e284ef.js → index-52d58ff1.js} +15 -15
- package/build/{index-6585b48c.js → index-58ab8d09.js} +2 -2
- package/build/{index-bcde20b2.js → index-5e2a2480.js} +1 -1
- package/build/{index-80c74e91.js → index-605d1690.js} +5 -5
- package/build/{index-f80c5d0b.js → index-61db4e9f.js} +2 -2
- package/build/{index-de6e4030.js → index-62ca9eb9.js} +13 -13
- package/build/{index-743ceb06.js → index-657e8416.js} +16 -16
- package/build/{index-1fbc0d0f.js → index-679373d9.js} +1 -1
- package/build/{index-05ffd406.js → index-6acb6793.js} +16 -16
- package/build/{index-1c6d4213.js → index-6c67dbd7.js} +2 -2
- package/build/{index-efe744ce.js → index-6c8d0207.js} +2 -2
- package/build/{index-7d08ebe5.js → index-6d175c73.js} +7 -7
- package/build/{index-7c98d10b.js → index-7028be28.js} +18 -18
- package/build/{index-1ecd6812.js → index-724294c9.js} +3 -3
- package/build/{index-7ce80c7d.js → index-73e7b24c.js} +2 -2
- package/build/{index-4c2ccf4d.js → index-7806b087.js} +7 -7
- package/build/{index-5c820b7b.js → index-7fcc98e3.js} +2 -2
- package/build/{index-1e5fa2ff.js → index-877f210f.js} +6 -6
- package/build/{index-0952639d.js → index-87d420a6.js} +13 -13
- package/build/{index-178ae355.js → index-89facf04.js} +15 -15
- package/build/{index-f514fb32.js → index-90ff088b.js} +2 -2
- package/build/{index-e4465144.js → index-91fdb86b.js} +16 -16
- package/build/{index-dc8ba750.js → index-9609f03e.js} +3 -3
- package/build/{index-d01e81b4.js → index-963b6444.js} +18 -18
- package/build/{index-9f87dde3.js → index-9de80aaf.js} +1 -1
- package/build/{index-fb8b8b6c.js → index-a3373cf4.js} +30 -30
- package/build/{index-9a0d7a3f.js → index-a409772d.js} +1 -1
- package/build/{index-51aa12b0.js → index-a73c7607.js} +1 -1
- package/build/{index-f3949701.js → index-b670f6a7.js} +2 -2
- package/build/{index-a9f31528.js → index-bc2367a8.js} +1 -1
- package/build/{index-f8d69400.js → index-bdba2d3a.js} +3 -3
- package/build/{index-8e926121.js → index-bfa5c299.js} +32 -32
- package/build/{index-7c6a2cad.js → index-c578d779.js} +6 -6
- package/build/{index-28644532.js → index-c8c3c797.js} +3 -3
- package/build/{index-3a171639.js → index-cbf4864b.js} +5 -5
- package/build/{index-4ca23fbd.js → index-d06471d1.js} +10 -10
- package/build/{index-416ca4bd.js → index-d125712a.js} +24 -24
- package/build/{index-f299e740.js → index-d2eeb6ea.js} +14 -14
- package/build/{index-6077be80.js → index-e833d31d.js} +1 -1
- package/build/{index-b5273b31.js → index-eb0a6dd1.js} +16 -16
- package/build/{index-398cf6f6.js → index-f25b2fa4.js} +17 -17
- package/build/{index-3b056c36.js → index-f34ed5c5.js} +13 -13
- package/build/{index-a6cfb399.js → index-f4ccfca1.js} +2 -2
- package/build/{index-49e2a0cc.js → index-f5509a6e.js} +2 -2
- package/build/{index-6d811606.js → index-f5fa9c34.js} +4 -4
- package/build/{index-5fba312d.js → index-f7194690.js} +6 -6
- package/build/{index-8c1eb3d5.js → index-fd84c125.js} +1 -1
- package/build/{index-b943fa6a.js → index-ffc89258.js} +13 -13
- package/build/index.css +1 -1
- package/build/index.js +211 -179
- package/build/{labelSorting-a33ed0e5.js → labelSorting-55c2f473.js} +4 -4
- package/build/lead/components/context.d.ts +2 -0
- package/build/lead/components/index.d.ts +4 -2
- package/build/lead/index.d.ts +1 -1
- package/build/lead/layouts/ emptyIcon.d.ts +6 -0
- package/build/lead/layouts/lightbox/fields/textField/index.d.ts +13 -0
- package/build/lead/layouts/lightbox/fields/textField/index.styled.d.ts +11 -0
- package/build/lead/layouts/lightbox/index.d.ts +4 -2
- package/build/lead/newLeadPopup.d.ts +4 -2
- package/build/lead.css +1 -1
- package/build/lead.js +822 -351
- package/build/{logoIcon-fa159ee7.js → logoIcon-c210497d.js} +2 -2
- package/build/mantine.js +22 -22
- package/build/misc.js +16 -16
- package/build/miscGetDynamicHealthTool.js +4 -4
- package/build/miscGetSocialList.js +8 -8
- package/build/miscScreenSizeContext.js +1 -1
- package/build/mobileBottomNavigation.js +5 -5
- package/build/mobileBottomNavigationIcon.js +5 -5
- package/build/molecules.js +69 -69
- package/build/moleculesArticleCard.js +6 -6
- package/build/moleculesArticleCardV2.js +16 -16
- package/build/navigation.js +40 -40
- package/build/navigationLogoutPopup.js +9 -9
- package/build/navigationProfileButton.js +23 -23
- package/build/onboardingV2.js +28 -28
- package/build/organisms.js +44 -44
- package/build/{post-53156d7c.js → post-9fe1b1ac.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 +25 -25
- package/build/{store-5fb3b94a.js → store-4d6b2eef.js} +4 -4
- package/build/subot.js +32 -32
- package/build/surveyOrPremiumBanner.js +31 -31
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-a4459b54.js → surveyThankyouCard-9cdac971.js} +5 -5
- package/build/together.js +53 -53
- package/build/togetherApiUtils.js +4 -4
- package/build/togetherAtoms.js +30 -30
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +48 -48
- package/build/togetherMoleculesCardAuthor.js +27 -27
- package/build/togetherMoleculesPostImagePreview.js +11 -11
- package/build/togetherMoleculesProfileDetail.js +37 -37
- package/build/togetherOrganisms.js +47 -47
- package/build/togetherRichTextEditor.js +17 -17
- package/build/togetherShareBox.js +10 -10
- package/build/{treePopoverMenu-857603b7.js → treePopoverMenu-2f711f7c.js} +19 -19
- package/build/{types-c3ac440c.js → types-4536b0a8.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-27f93852.js → useCategory-2c791f02.js} +5 -5
- package/build/{useHealthToolCache-bb8d399a.js → useHealthToolCache-571b4ad1.js} +1 -1
- package/build/{useMantineLocale-86fbec4e.js → useMantineLocale-a663d23a.js} +6 -6
- package/build/{usePlacesAutocomplete-fe805aca.js → usePlacesAutocomplete-72c61ff9.js} +2 -1
- package/build/{useScreenSize-9d86a79e.js → useScreenSize-649868cb.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-cd3b75de.js → utils-3bf46111.js} +2 -2
- package/build/{utils-ae3b21bd.js → utils-72e979f1.js} +2 -2
- package/build/{utils-1c540d48.js → utils-d4f5c7a2.js} +3 -3
- package/build/vaccination.js +21 -21
- package/package.json +1 -1
- /package/build/{BMI_BOYS.percentile.monthly-7af13201.js → BMI_BOYS.percentile.monthly-eb315095.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-c60abb35.js → BMI_BOYS.percentile.weekly-69cc3a94.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-e8dfca9f.js → BMI_BOYS.percentile.yearly-8001d98c.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-a59d11bc.js → BMI_BOYS.zscore.monthly-5181dd2c.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-c7fe36b2.js → BMI_BOYS.zscore.weekly-4e764f75.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-641a3d0d.js → BMI_BOYS.zscore.yearly-3f0c8df8.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-109e8d93.js → BMI_GIRLS.percentile.monthly-e3913ee4.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-1c4da79e.js → BMI_GIRLS.percentile.weekly-c3f497dc.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-8dbee3de.js → BMI_GIRLS.percentile.yearly-088c756b.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-3c0ff0ea.js → BMI_GIRLS.zscore.monthly-02e032c3.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-b1b000ee.js → BMI_GIRLS.zscore.weekly-c196d6fa.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-d01bd65b.js → BMI_GIRLS.zscore.yearly-63296930.js} +0 -0
- /package/build/{ChevronDown-b7b51192.js → ChevronDown-1ec29fc9.js} +0 -0
- /package/build/{Close-05bf573e.js → Close-82e58de8.js} +0 -0
- /package/build/{Google-e80408c1.js → Google-3b057619.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-f3375e51.js → HEAD CIRCUM_BOYS.percentile.monthly-a138c344.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-a631b610.js → HEAD CIRCUM_BOYS.percentile.weekly-f95e2775.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-d200e828.js → HEAD CIRCUM_BOYS.percentile.yearly-f310c9eb.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-44660477.js → HEAD CIRCUM_BOYS.zscore.monthly-b1624745.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-6ae93ca1.js → HEAD CIRCUM_BOYS.zscore.weekly-c90ec91e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-724eb9b1.js → HEAD CIRCUM_BOYS.zscore.yearly-930290d7.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-3ee3243d.js → HEAD CIRCUM_GIRLS.percentile.monthly-80fbfe27.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-3ac5b68c.js → HEAD CIRCUM_GIRLS.percentile.weekly-58da06e2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-1c78ae2c.js → HEAD CIRCUM_GIRLS.percentile.yearly-c2529c26.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-f54e15d9.js → HEAD CIRCUM_GIRLS.zscore.monthly-74ce7c3b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-02c79e6e.js → HEAD CIRCUM_GIRLS.zscore.weekly-b155babd.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-5ed9ec8b.js → HEAD CIRCUM_GIRLS.zscore.yearly-7e1a0ad9.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-4e615473.js → HEIGHT_BOYS.percentile.monthly-7e8bdd61.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-e248a487.js → HEIGHT_BOYS.percentile.weekly-9fb83720.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-730bde4d.js → HEIGHT_BOYS.percentile.yearly-f6a791a0.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-30b8b80f.js → HEIGHT_BOYS.zscore.monthly-4e7c9f27.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-c4c860f6.js → HEIGHT_BOYS.zscore.weekly-5ed0b3b6.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-3eed3d6e.js → HEIGHT_BOYS.zscore.yearly-a1e1f16b.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-ff97b330.js → HEIGHT_GIRLS.percentile.monthly-8085fb4c.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-da6df2e8.js → HEIGHT_GIRLS.percentile.weekly-5faec400.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-764a2a89.js → HEIGHT_GIRLS.percentile.yearly-6c0da113.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-2533db61.js → HEIGHT_GIRLS.zscore.monthly-c0880cc0.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-4f2e8e82.js → HEIGHT_GIRLS.zscore.weekly-8a4e3801.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-7552926c.js → HEIGHT_GIRLS.zscore.yearly-9f4e388b.js} +0 -0
- /package/build/{Locale-a84972f1.js → Locale-75a16190.js} +0 -0
- /package/build/{Visible-aa469f34.js → Visible-1438459a.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-bd71a4a2.js → WEIGHT_BOYS.percentile.monthly-3976c0ae.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-ca94e3b8.js → WEIGHT_BOYS.percentile.weekly-62063307.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-6fc2ad5f.js → WEIGHT_BOYS.percentile.yearly-278ff5b0.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-b689f0c0.js → WEIGHT_BOYS.zscore.monthly-f4584383.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-88fbd653.js → WEIGHT_BOYS.zscore.weekly-9a7a5c88.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-9c11943a.js → WEIGHT_BOYS.zscore.yearly-0968b88b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-b2828ee9.js → WEIGHT_GIRLS.percentile.monthly-30d47d1c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-5eea57bb.js → WEIGHT_GIRLS.percentile.weekly-a74ba8d1.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-66d395e6.js → WEIGHT_GIRLS.percentile.yearly-ae69e967.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-79f44cbc.js → WEIGHT_GIRLS.zscore.monthly-f5caa21a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-916ef905.js → WEIGHT_GIRLS.zscore.weekly-246a85c2.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-1dec3417.js → WEIGHT_GIRLS.zscore.yearly-13628bd9.js} +0 -0
- /package/build/{animation-edf71167.js → animation-87847fc6.js} +0 -0
- /package/build/{constants-f33ecff0.js → constants-9d1ffae7.js} +0 -0
- /package/build/{constants-a12fb11e.js → constants-b2e334f6.js} +0 -0
- /package/build/{constants-0e2856d5.js → constants-bb670df2.js} +0 -0
- /package/build/{dataTransform-d29fd6af.js → dataTransform-1a69af3d.js} +0 -0
- /package/build/{doctor-820638d0.js → doctor-9e7d5dab.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-e2fcb6e9.js → BMI_BOYS.percentile.monthly-d97644cf.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-110d0b31.js → BMI_BOYS.percentile.weekly-ddaa4e04.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-1ca26bf7.js → BMI_BOYS.percentile.yearly-c265609c.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-e1c4d0f2.js → BMI_BOYS.zscore.monthly-543553b0.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-bfb9b410.js → BMI_BOYS.zscore.weekly-6f92afe4.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-4f42e72e.js → BMI_BOYS.zscore.yearly-198fba05.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-6b17a094.js → BMI_GIRLS.percentile.monthly-023545e9.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-f84a05ae.js → BMI_GIRLS.percentile.weekly-ca0c3d8a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-6bae7806.js → BMI_GIRLS.percentile.yearly-c6a57e9f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-b8bfb009.js → BMI_GIRLS.zscore.monthly-f069a265.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-b2097723.js → BMI_GIRLS.zscore.weekly-5c2324fc.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-792b0918.js → BMI_GIRLS.zscore.yearly-401d41a6.js} +0 -0
- /package/build/esm/{ChevronDown-462c07b6.js → ChevronDown-66b5c705.js} +0 -0
- /package/build/esm/{Close-b601f8c6.js → Close-66729e85.js} +0 -0
- /package/build/esm/{Google-d89b098e.js → Google-9896e314.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-7ee5fb76.js → HEAD CIRCUM_BOYS.percentile.monthly-fa43749e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-7e9f05b6.js → HEAD CIRCUM_BOYS.percentile.weekly-1ef0e3ae.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-ca5b84d0.js → HEAD CIRCUM_BOYS.percentile.yearly-c0cb0e14.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-77ea9f5b.js → HEAD CIRCUM_BOYS.zscore.monthly-5645e3d8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-82cafb52.js → HEAD CIRCUM_BOYS.zscore.weekly-6ad6eedd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-d68085f6.js → HEAD CIRCUM_BOYS.zscore.yearly-9d1a5064.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-b9857993.js → HEAD CIRCUM_GIRLS.percentile.monthly-ac8bf2c5.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-2744bd66.js → HEAD CIRCUM_GIRLS.percentile.weekly-bb81c16a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-2708a10f.js → HEAD CIRCUM_GIRLS.percentile.yearly-e5f673e5.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-decba749.js → HEAD CIRCUM_GIRLS.zscore.monthly-6be639ea.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-09e2d0ec.js → HEAD CIRCUM_GIRLS.zscore.weekly-d60444d8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-022b460d.js → HEAD CIRCUM_GIRLS.zscore.yearly-811fec8c.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-5a605e45.js → HEIGHT_BOYS.percentile.monthly-465e377e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-d98394c2.js → HEIGHT_BOYS.percentile.weekly-dcc74cd9.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-fd47afd1.js → HEIGHT_BOYS.percentile.yearly-53cf5ade.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-fdaf734e.js → HEIGHT_BOYS.zscore.monthly-5452c2c8.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-99fafec2.js → HEIGHT_BOYS.zscore.weekly-81451204.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-8e636645.js → HEIGHT_BOYS.zscore.yearly-d876531c.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-0bfebdd5.js → HEIGHT_GIRLS.percentile.monthly-9f156ca3.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-5b97bf97.js → HEIGHT_GIRLS.percentile.weekly-1edebef6.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-23098366.js → HEIGHT_GIRLS.percentile.yearly-11108955.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-741476f5.js → HEIGHT_GIRLS.zscore.monthly-8ed6c1a7.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-ad51e80a.js → HEIGHT_GIRLS.zscore.weekly-0aeaa915.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-96534f47.js → HEIGHT_GIRLS.zscore.yearly-26b8cb11.js} +0 -0
- /package/build/esm/{Locale-a04301dd.js → Locale-14481773.js} +0 -0
- /package/build/esm/{Visible-845a101b.js → Visible-4027956b.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-90b7733e.js → WEIGHT_BOYS.percentile.monthly-c586605d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-97bf7920.js → WEIGHT_BOYS.percentile.weekly-b354f6cf.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-dcb08a0e.js → WEIGHT_BOYS.percentile.yearly-25150ce0.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-697ae633.js → WEIGHT_BOYS.zscore.monthly-88527a94.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-8f983b81.js → WEIGHT_BOYS.zscore.weekly-666296f3.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-e52c9abe.js → WEIGHT_BOYS.zscore.yearly-f67d84ec.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-8351a08c.js → WEIGHT_GIRLS.percentile.monthly-228e9f48.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-9da4527c.js → WEIGHT_GIRLS.percentile.weekly-17c3c1fd.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-309de2b6.js → WEIGHT_GIRLS.percentile.yearly-8455e1a6.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-34f77dd2.js → WEIGHT_GIRLS.zscore.monthly-ad124ed3.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-a8cdb500.js → WEIGHT_GIRLS.zscore.weekly-2582d569.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-294b724e.js → WEIGHT_GIRLS.zscore.yearly-94ff115a.js} +0 -0
- /package/build/esm/{animation-1efca15e.js → animation-4432ef2c.js} +0 -0
- /package/build/esm/{constants-ff226fe7.js → constants-1446dfa4.js} +0 -0
- /package/build/esm/{constants-33d5062f.js → constants-72a20280.js} +0 -0
- /package/build/esm/{constants-eeddfe1c.js → constants-93e9bca8.js} +0 -0
- /package/build/esm/{dataTransform-265e4bd7.js → dataTransform-a01b4819.js} +0 -0
- /package/build/esm/{doctor-2fcd3d3b.js → doctor-e47b59fe.js} +0 -0
- /package/build/esm/{index-1df34a7c.js → index-0cf8b752.js} +0 -0
- /package/build/esm/{index-36e8354a.js → index-0d46a3d6.js} +0 -0
- /package/build/esm/{index-56567792.js → index-5dd54b2b.js} +0 -0
- /package/build/esm/{index-4fb85af7.js → index-7bd87b78.js} +0 -0
- /package/build/esm/{index-daadbc71.js → index-a48b249a.js} +0 -0
- /package/build/esm/{index-ed18ed6d.js → index-c1586c4b.js} +0 -0
- /package/build/esm/{index-54053d20.js → index-c3a2148b.js} +0 -0
- /package/build/esm/{index-491be176.js → index-fc6e19ca.js} +0 -0
- /package/build/esm/{index.styles-fd5fc54f.js → index.styles-79e59f1a.js} +0 -0
- /package/build/esm/{localizeNumberFormat-7dfdca1f.js → localizeNumberFormat-4bf1b4d7.js} +0 -0
- /package/build/esm/{normalizeLink-c78a7386.js → normalizeLink-816f0420.js} +0 -0
- /package/build/esm/{other-409a2b44.js → other-dc718449.js} +0 -0
- /package/build/esm/{paths-857c4df9.js → paths-1bc49820.js} +0 -0
- /package/build/esm/{translationsContext-0e849bd0.js → translationsContext-6aa41d1c.js} +0 -0
- /package/build/esm/{tslib.es6-ab932a5e.js → tslib.es6-3bb80a38.js} +0 -0
- /package/build/esm/{types-9d219f01.js → types-99dc4540.js} +0 -0
- /package/build/esm/{useIsInit-be7bef3c.js → useIsInit-97b3cab0.js} +0 -0
- /package/build/esm/{useOutsideClick-18015985.js → useOutsideClick-da55119f.js} +0 -0
- /package/build/esm/{useScrollbarSize-f358a079.js → useScrollbarSize-95bbd724.js} +0 -0
- /package/build/esm/{useUniqueId-53120fce.js → useUniqueId-182c5412.js} +0 -0
- /package/build/esm/{utils-061bf274.js → utils-733c431a.js} +0 -0
- /package/build/{index-807e8a62.js → index-0df9464b.js} +0 -0
- /package/build/{index-c1cfbe95.js → index-209b7939.js} +0 -0
- /package/build/{index-36fbe569.js → index-423bc217.js} +0 -0
- /package/build/{index-e33eb820.js → index-959a5817.js} +0 -0
- /package/build/{index-e588db3a.js → index-ad869942.js} +0 -0
- /package/build/{index-9d0ecf23.js → index-ba916406.js} +0 -0
- /package/build/{index-075d0cb6.js → index-c19f8ad3.js} +0 -0
- /package/build/{index-476ab98b.js → index-d2f22629.js} +0 -0
- /package/build/{index.styles-c9451960.js → index.styles-881b266b.js} +0 -0
- /package/build/{localizeNumberFormat-45b60304.js → localizeNumberFormat-f8a588fc.js} +0 -0
- /package/build/{normalizeLink-52f9f9e3.js → normalizeLink-f28d8351.js} +0 -0
- /package/build/{other-d9bcd91c.js → other-3b371b3e.js} +0 -0
- /package/build/{paths-488e9226.js → paths-5ae03a6a.js} +0 -0
- /package/build/{translationsContext-895166b2.js → translationsContext-cc7e58b5.js} +0 -0
- /package/build/{tslib.es6-ed0b2bf6.js → tslib.es6-1239a751.js} +0 -0
- /package/build/{types-8256853d.js → types-d7965e5a.js} +0 -0
- /package/build/{useIsInit-81f134d9.js → useIsInit-02cfc1e8.js} +0 -0
- /package/build/{useOutsideClick-a71cc1cc.js → useOutsideClick-25c4fe83.js} +0 -0
- /package/build/{useScrollbarSize-9ffdf305.js → useScrollbarSize-23b109e5.js} +0 -0
- /package/build/{useUniqueId-1863885c.js → useUniqueId-70b095bf.js} +0 -0
- /package/build/{utils-2665f140.js → utils-17728d9b.js} +0 -0
package/build/esm/lead.js
CHANGED
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { _ as __rest, a as __awaiter } from './tslib.es6-
|
|
2
|
-
import React__default, { createContext, useEffect, useMemo, useRef, useState, useContext } from 'react';
|
|
3
|
-
import { createStyles, Box, Portal, Transition, Overlay } from '@mantine/core';
|
|
1
|
+
import { _ as __rest, a as __awaiter } from './tslib.es6-3bb80a38.js';
|
|
2
|
+
import React__default, { createContext, useEffect, useMemo, useRef, useState, useContext, useCallback } from 'react';
|
|
3
|
+
import { createStyles, Box, Autocomplete, clsx, Input as Input$1, TextInput, NumberInput as NumberInput$1, Button as Button$2, Portal, Transition, Overlay } from '@mantine/core';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import debounce from 'lodash/debounce';
|
|
6
6
|
import { createFormContext } from '@mantine/form';
|
|
7
|
-
import { u as useTranslations } from './index-
|
|
8
|
-
import { T as Text } from './index-
|
|
9
|
-
import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput } from './index-
|
|
10
|
-
import { D as DatePicker } from './index-
|
|
11
|
-
import { M as MAPPED_LOCALE } from './utils-
|
|
7
|
+
import { u as useTranslations } from './index-019adbaf.js';
|
|
8
|
+
import { T as Text } from './index-91ab046b.js';
|
|
9
|
+
import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput } from './index-eb189e33.js';
|
|
10
|
+
import { D as DatePicker } from './index-72ce6bda.js';
|
|
11
|
+
import { M as MAPPED_LOCALE } from './utils-062a0cfa.js';
|
|
12
12
|
import '@mantine/dates';
|
|
13
|
-
import { Z as ZINDEX_SSO } from './index-
|
|
14
|
-
import './index-
|
|
15
|
-
import { C as CommonGAssets } from './index-
|
|
16
|
-
import './useMantineLocale-
|
|
17
|
-
import { B as Button$1 } from './index-
|
|
18
|
-
import './index.styles-
|
|
19
|
-
import { T as TranslationsContext } from './translationsContext-
|
|
20
|
-
import '@mantine/hooks';
|
|
21
|
-
import { b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-
|
|
22
|
-
import './other-
|
|
23
|
-
import './index-
|
|
24
|
-
import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-
|
|
25
|
-
import { B as Button } from './index-
|
|
26
|
-
import { H as Heading$1 } from './index-
|
|
13
|
+
import { Z as ZINDEX_SSO } from './index-2337fa14.js';
|
|
14
|
+
import './index-d43b616f.js';
|
|
15
|
+
import { C as CommonGAssets } from './index-fc6e19ca.js';
|
|
16
|
+
import './useMantineLocale-374d7d18.js';
|
|
17
|
+
import { B as Button$1 } from './index-e0229c87.js';
|
|
18
|
+
import './index.styles-79e59f1a.js';
|
|
19
|
+
import { T as TranslationsContext } from './translationsContext-6aa41d1c.js';
|
|
20
|
+
import { useClickOutside } from '@mantine/hooks';
|
|
21
|
+
import { b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-733c431a.js';
|
|
22
|
+
import './other-dc718449.js';
|
|
23
|
+
import './index-34be1eba.js';
|
|
24
|
+
import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-765a96ce.js';
|
|
25
|
+
import { B as Button } from './index-1504c2aa.js';
|
|
26
|
+
import { H as Heading$1 } from './index-4ce0d02d.js';
|
|
27
27
|
import { v1 } from 'uuid';
|
|
28
|
-
import { i as isVideo } from './index-
|
|
29
|
-
import {
|
|
28
|
+
import { i as isVideo } from './index-5dd54b2b.js';
|
|
29
|
+
import { D as DrawerComponent } from './index-4e6ef889.js';
|
|
30
|
+
import { u as useScreenSize } from './useScreenSize-77e1ec29.js';
|
|
30
31
|
import { createPortal } from 'react-dom';
|
|
32
|
+
import { css } from '@emotion/react';
|
|
33
|
+
import styled from '@emotion/styled';
|
|
34
|
+
import { theme } from './miscTheme.js';
|
|
31
35
|
import { getCookie, setCookie } from './miscCookieHelper.js';
|
|
32
|
-
import { C as Close } from './Close-
|
|
36
|
+
import { C as Close } from './Close-66729e85.js';
|
|
33
37
|
import '@hhgtech/icons/other';
|
|
34
|
-
import './useScreenSize-46100ed1.js';
|
|
35
|
-
import '@emotion/styled';
|
|
36
38
|
import '@mantine/carousel';
|
|
37
|
-
import './Locale-
|
|
39
|
+
import './Locale-14481773.js';
|
|
38
40
|
import 'classnames';
|
|
39
|
-
import './useUniqueId-
|
|
41
|
+
import './useUniqueId-182c5412.js';
|
|
40
42
|
import './constantsSite.js';
|
|
41
43
|
import '@hhgtech/icons/core';
|
|
42
44
|
import 'date-fns/locale';
|
|
@@ -44,6 +46,7 @@ import './constantsDomainLocales.js';
|
|
|
44
46
|
import './constantsRiskScreener.js';
|
|
45
47
|
import './constantsIsProduction.js';
|
|
46
48
|
import '@mantine/notifications';
|
|
49
|
+
import 'vaul';
|
|
47
50
|
|
|
48
51
|
const LeadGenComponentContext = createContext({});
|
|
49
52
|
|
|
@@ -517,7 +520,7 @@ const useLeadFormConfig$1 = ({ listBlockAdded = [], validatingPhoneRef, validati
|
|
|
517
520
|
return { form, validateObj };
|
|
518
521
|
};
|
|
519
522
|
|
|
520
|
-
const Component = ({ campaign, onClose: onCloseProp, onOtherSubmit, onSubmit, showThankyou, setShowThankyou, locale, children, }) => {
|
|
523
|
+
const Component = ({ campaign, onClose: onCloseProp, onOtherSubmit, onSubmit, showThankyou, setShowThankyou, locale, children, showEmpty, setShowEmpty, }) => {
|
|
521
524
|
var _a, _b;
|
|
522
525
|
const extraFields = campaign.extra_fields;
|
|
523
526
|
const campaignId = campaign.id;
|
|
@@ -570,6 +573,8 @@ const Component = ({ campaign, onClose: onCloseProp, onOtherSubmit, onSubmit, sh
|
|
|
570
573
|
onSubmit,
|
|
571
574
|
showThankyou,
|
|
572
575
|
setShowThankyou,
|
|
576
|
+
showEmpty,
|
|
577
|
+
setShowEmpty,
|
|
573
578
|
} }, children)) : null;
|
|
574
579
|
};
|
|
575
580
|
|
|
@@ -586,7 +591,7 @@ var useStyles$2 = createStyles(() => {
|
|
|
586
591
|
});
|
|
587
592
|
|
|
588
593
|
const libraries$1 = ['places'];
|
|
589
|
-
const LocationBlock
|
|
594
|
+
const LocationBlock = ({ name, placeholder, locale, required = true, }) => {
|
|
590
595
|
var _a;
|
|
591
596
|
const form = useLeadFormContext$1();
|
|
592
597
|
const [searchValue, setSearchValue] = useState('');
|
|
@@ -686,7 +691,7 @@ const Fields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, style
|
|
|
686
691
|
id: id, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel" })));
|
|
687
692
|
}
|
|
688
693
|
case 'LocationBlock': {
|
|
689
|
-
return (React__default.createElement(LocationBlock
|
|
694
|
+
return (React__default.createElement(LocationBlock, { key: index, name: value, placeholder: placeholder, locale: locale, required: required }));
|
|
690
695
|
}
|
|
691
696
|
case 'DateBlock':
|
|
692
697
|
return (React__default.createElement(React__default.Fragment, null,
|
|
@@ -1036,7 +1041,10 @@ var enPH = {
|
|
|
1036
1041
|
"lead.otp.verify": "Verify",
|
|
1037
1042
|
"lead.otp.resend": "Resend OTP{timer}",
|
|
1038
1043
|
"lead.otp.phoneLabel": "Phone OTP",
|
|
1039
|
-
"lead.otp.phonePlaceholder": "Enter OTP"
|
|
1044
|
+
"lead.otp.phonePlaceholder": "Enter OTP",
|
|
1045
|
+
"lead.empty.title": "Oops, seem your information is empty, do you want to submit the information again?",
|
|
1046
|
+
"lead.empty.cancel": "Cancel",
|
|
1047
|
+
"lead.empty.submitAgain": "Submit again"
|
|
1040
1048
|
};
|
|
1041
1049
|
|
|
1042
1050
|
var hiIN = {
|
|
@@ -1052,7 +1060,10 @@ var hiIN = {
|
|
|
1052
1060
|
"lead.otp.title": "Enter OTP",
|
|
1053
1061
|
"lead.otp.desc": "We have sent an OTP to your mobile number {phone}",
|
|
1054
1062
|
"lead.otp.verify": "Verify",
|
|
1055
|
-
"lead.otp.resend": "Resend OTP{timer}"
|
|
1063
|
+
"lead.otp.resend": "Resend OTP{timer}",
|
|
1064
|
+
"lead.empty.title": "ऊप्स! लगता है आपकी जानकारी खाली है। क्या आप जानकारी फिर से सबमिट करना चाहते हैं?",
|
|
1065
|
+
"lead.empty.cancel": "रद्द करें",
|
|
1066
|
+
"lead.empty.submitAgain": "फिर से सबमिट करें"
|
|
1056
1067
|
};
|
|
1057
1068
|
|
|
1058
1069
|
var idID = {
|
|
@@ -1070,7 +1081,10 @@ var idID = {
|
|
|
1070
1081
|
"lead.otp.verify": "Verifikasi",
|
|
1071
1082
|
"lead.otp.resend": "Kirim Ulang OTP {timer}",
|
|
1072
1083
|
"lead.otp.phoneLabel": "OTP Telepon",
|
|
1073
|
-
"lead.otp.phonePlaceholder": "Masukkan OTP"
|
|
1084
|
+
"lead.otp.phonePlaceholder": "Masukkan OTP",
|
|
1085
|
+
"lead.empty.title": "Oops, sepertinya informasi Anda kosong. Apakah Anda ingin mengirimkan informasi lagi?",
|
|
1086
|
+
"lead.empty.cancel": "Batal",
|
|
1087
|
+
"lead.empty.submitAgain": "Kirim lagi"
|
|
1074
1088
|
};
|
|
1075
1089
|
|
|
1076
1090
|
var kmKH = {
|
|
@@ -1088,7 +1102,10 @@ var kmKH = {
|
|
|
1088
1102
|
"lead.otp.verify": "ផ្ទៀងផ្ទាត់",
|
|
1089
1103
|
"lead.otp.resend": "ផ្ញើ OTP ម្តងទៀត {timer}",
|
|
1090
1104
|
"lead.otp.phoneLabel": "OTP ទូរស័ព្ទ",
|
|
1091
|
-
"lead.otp.phonePlaceholder": "បញ្ចូល OTP"
|
|
1105
|
+
"lead.otp.phonePlaceholder": "បញ្ចូល OTP",
|
|
1106
|
+
"lead.empty.title": "អូុបស! ហាក់ដូចជាព័ត៌មានរបស់អ្នកទទេ។ តើអ្នកចង់ដាក់ស្នើព័ត៌មានម្តងទៀតទេ?",
|
|
1107
|
+
"lead.empty.cancel": "លុបចោល",
|
|
1108
|
+
"lead.empty.submitAgain": "ដាក់ស្នើម្ដងទៀត"
|
|
1092
1109
|
};
|
|
1093
1110
|
|
|
1094
1111
|
var msMY = {
|
|
@@ -1106,7 +1123,10 @@ var msMY = {
|
|
|
1106
1123
|
"lead.otp.verify": "Sahkan",
|
|
1107
1124
|
"lead.otp.resend": "Hantar semula OTP {timer}",
|
|
1108
1125
|
"lead.otp.phoneLabel": "OTP Telefon",
|
|
1109
|
-
"lead.otp.phonePlaceholder": "Masukkan OTP"
|
|
1126
|
+
"lead.otp.phonePlaceholder": "Masukkan OTP",
|
|
1127
|
+
"lead.empty.title": "Oops, nampaknya maklumat anda kosong. Adakah anda ingin menghantar maklumat semula?",
|
|
1128
|
+
"lead.empty.cancel": "Batal",
|
|
1129
|
+
"lead.empty.submitAgain": "Hantar semula"
|
|
1110
1130
|
};
|
|
1111
1131
|
|
|
1112
1132
|
var myMM = {
|
|
@@ -1124,7 +1144,10 @@ var myMM = {
|
|
|
1124
1144
|
"lead.otp.verify": "အတည်ပြုပါ",
|
|
1125
1145
|
"lead.otp.resend": "OTP ကိုထပ်မံပို့ရန် {timer}",
|
|
1126
1146
|
"lead.otp.phoneLabel": "ဖုန်း OTP",
|
|
1127
|
-
"lead.otp.phonePlaceholder": "OTP ကိုထည့်ပါ"
|
|
1147
|
+
"lead.otp.phonePlaceholder": "OTP ကိုထည့်ပါ",
|
|
1148
|
+
"lead.empty.title": "အုပ်စ်! သင့်အချက်အလက်သည် ဗလာဖြစ်နေသလိုဖြစ်သည်။ ထပ်မံတင်သွင်းလိုပါသလား?",
|
|
1149
|
+
"lead.empty.cancel": "မလုပ်ဆောင်ပါ",
|
|
1150
|
+
"lead.empty.submitAgain": "ထပ်မံတင်သွင်းပါ"
|
|
1128
1151
|
};
|
|
1129
1152
|
|
|
1130
1153
|
var thTH = {
|
|
@@ -1142,7 +1165,10 @@ var thTH = {
|
|
|
1142
1165
|
"lead.otp.verify": "ยืนยัน",
|
|
1143
1166
|
"lead.otp.resend": "ส่ง OTP อีกครั้ง {timer}",
|
|
1144
1167
|
"lead.otp.phoneLabel": "OTP โทรศัพท์",
|
|
1145
|
-
"lead.otp.phonePlaceholder": "ป้อน OTP"
|
|
1168
|
+
"lead.otp.phonePlaceholder": "ป้อน OTP",
|
|
1169
|
+
"lead.empty.title": "อุ๊ปส์! ดูเหมือนว่าข้อมูลของคุณว่างเปล่า คุณต้องการส่งข้อมูลอีกครั้งหรือไม่?",
|
|
1170
|
+
"lead.empty.cancel": "ยกเลิก",
|
|
1171
|
+
"lead.empty.submitAgain": "ส่งอีกครั้ง"
|
|
1146
1172
|
};
|
|
1147
1173
|
|
|
1148
1174
|
var viVN = {
|
|
@@ -1171,7 +1197,10 @@ var viVN = {
|
|
|
1171
1197
|
"lead.otp.verify": "Xác minh",
|
|
1172
1198
|
"lead.otp.resend": "Gửi lại OTP {timer}",
|
|
1173
1199
|
"lead.otp.phoneLabel": "Nhập OTP",
|
|
1174
|
-
"lead.otp.phonePlaceholder": "Nhập OTP"
|
|
1200
|
+
"lead.otp.phonePlaceholder": "Nhập OTP",
|
|
1201
|
+
"lead.empty.title": "Oops, có vẻ như thông tin của bạn đang trống. Bạn có muốn gửi lại thông tin không?",
|
|
1202
|
+
"lead.empty.cancel": "Hủy",
|
|
1203
|
+
"lead.empty.submitAgain": "Gửi lại"
|
|
1175
1204
|
};
|
|
1176
1205
|
|
|
1177
1206
|
var zhTW = {
|
|
@@ -1189,7 +1218,10 @@ var zhTW = {
|
|
|
1189
1218
|
"lead.otp.verify": "驗證",
|
|
1190
1219
|
"lead.otp.resend": "重新發送 OTP {timer}",
|
|
1191
1220
|
"lead.otp.phoneLabel": "電話 OTP",
|
|
1192
|
-
"lead.otp.phonePlaceholder": "輸入 OTP"
|
|
1221
|
+
"lead.otp.phonePlaceholder": "輸入 OTP",
|
|
1222
|
+
"lead.empty.title": "哎呀,您的資訊似乎是空的,您想要重新提交資訊嗎?",
|
|
1223
|
+
"lead.empty.cancel": "取消",
|
|
1224
|
+
"lead.empty.submitAgain": "重新提交"
|
|
1193
1225
|
};
|
|
1194
1226
|
|
|
1195
1227
|
const translationsMap = {
|
|
@@ -1249,9 +1281,8 @@ const useImageSize = (src) => {
|
|
|
1249
1281
|
};
|
|
1250
1282
|
|
|
1251
1283
|
const CloseButton = ({ onClose, containerClassName, svgClassName, }) => (React__default.createElement("button", { onClick: onClose, className: `le-newbuilder-close-button js-modal__close ${containerClassName || ''}` },
|
|
1252
|
-
React__default.createElement("svg", { width: "
|
|
1253
|
-
React__default.createElement("
|
|
1254
|
-
React__default.createElement("path", { d: "m16 17.05-5.075 5.075a.74.74 0 0 1-.512.212.7.7 0 0 1-.538-.212.72.72 0 0 1-.225-.525q0-.3.225-.525L14.95 16l-5.075-5.075a.74.74 0 0 1-.212-.513.7.7 0 0 1 .212-.537.72.72 0 0 1 .525-.225q.3 0 .525.225L16 14.95l5.075-5.075a.74.74 0 0 1 .513-.213.7.7 0 0 1 .537.213.72.72 0 0 1 .225.525.72.72 0 0 1-.225.525L17.05 16l5.075 5.075a.74.74 0 0 1 .212.512.7.7 0 0 1-.212.538.72.72 0 0 1-.525.225.72.72 0 0 1-.525-.225z", fill: "#595959" }))));
|
|
1284
|
+
React__default.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", className: svgClassName },
|
|
1285
|
+
React__default.createElement("path", { d: "M9.99981 10.8432L14.0583 14.9017C14.1691 15.0125 14.3083 15.0691 14.476 15.0717C14.6437 15.0743 14.7854 15.0176 14.9013 14.9017C15.0172 14.7858 15.0752 14.6453 15.0752 14.4802C15.0752 14.3151 15.0172 14.1746 14.9013 14.0587L10.8429 10.0002L14.9013 5.9417C15.0121 5.83094 15.0688 5.69172 15.0713 5.52402C15.0739 5.35634 15.0172 5.21456 14.9013 5.09866C14.7854 4.98276 14.6449 4.9248 14.4798 4.9248C14.3147 4.9248 14.1742 4.98276 14.0583 5.09866L9.99981 9.15712L5.94133 5.09866C5.83057 4.98789 5.69135 4.93122 5.52365 4.92866C5.35598 4.92609 5.21419 4.98276 5.09829 5.09866C4.98239 5.21456 4.92444 5.35506 4.92444 5.52018C4.92444 5.6853 4.98239 5.82581 5.09829 5.9417L9.15675 10.0002L5.09829 14.0587C4.98752 14.1694 4.93085 14.3087 4.9283 14.4763C4.92572 14.644 4.98239 14.7858 5.09829 14.9017C5.21419 15.0176 5.3547 15.0756 5.51982 15.0756C5.68493 15.0756 5.82544 15.0176 5.94133 14.9017L9.99981 10.8432Z" }))));
|
|
1255
1286
|
|
|
1256
1287
|
// url: imageBlocks.imageMobile.data.url
|
|
1257
1288
|
// newTab: imageBlocks.imageMobile.data.newtab
|
|
@@ -1328,6 +1359,192 @@ const FloatingLayout = ({ popupId, url, title, urlText, titleAlign, subtitle, su
|
|
|
1328
1359
|
React__default.createElement(CloseButton, { onClose: onClose, containerClassName: "close-button-top-right" }))))));
|
|
1329
1360
|
};
|
|
1330
1361
|
|
|
1362
|
+
const ThankyouPopup = ({ title, titleAlign, subtitle, subtitleAlign, link, linkNewTab, linkText, image, }) => {
|
|
1363
|
+
const { width: imageWidth, height: imageHeight, loaded: imageLoaded, } = useImageSize(image);
|
|
1364
|
+
if (!imageLoaded)
|
|
1365
|
+
return null;
|
|
1366
|
+
return (React__default.createElement("div", { className: "lead-modal__thank-you" },
|
|
1367
|
+
React__default.createElement("div", { style: { width: '100%' } },
|
|
1368
|
+
React__default.createElement("img", { src: image, style: {
|
|
1369
|
+
maxHeight: 162,
|
|
1370
|
+
objectFit: 'cover',
|
|
1371
|
+
aspectRatio: `${imageWidth}/${imageHeight}`,
|
|
1372
|
+
}, loading: "lazy" }),
|
|
1373
|
+
title && (React__default.createElement("h1", { className: `le-thankyou-title le-text-align-${titleAlign}` }, title)),
|
|
1374
|
+
subtitle && (React__default.createElement("p", { className: `le-thankyou-subtitle le-text-align-${subtitleAlign}` }, subtitle.split('\n').map((text, idx, list) => {
|
|
1375
|
+
const isShowBr = idx < list.length - 1;
|
|
1376
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1377
|
+
text,
|
|
1378
|
+
isShowBr && React__default.createElement("br", null)));
|
|
1379
|
+
}))),
|
|
1380
|
+
linkText && (React__default.createElement("div", null,
|
|
1381
|
+
React__default.createElement("a", { href: link, target: linkNewTab ? '_blank' : 'parrent', rel: "noreferrer" },
|
|
1382
|
+
React__default.createElement("button", { className: `lead-modal__btn ${LEAD_CLASS}` }, linkText)))))));
|
|
1383
|
+
};
|
|
1384
|
+
|
|
1385
|
+
const InlineLayout = ({ content, inlinePosition, }) => {
|
|
1386
|
+
const target = useMemo(() => {
|
|
1387
|
+
if (!inlinePosition)
|
|
1388
|
+
return null;
|
|
1389
|
+
const parents = document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`);
|
|
1390
|
+
const allChildren = Array.from(parents).reduce((r, p) => {
|
|
1391
|
+
return [...r, ...Array.from(p.children)];
|
|
1392
|
+
}, []);
|
|
1393
|
+
if (allChildren === null || allChildren === void 0 ? void 0 : allChildren.length) {
|
|
1394
|
+
// find the third p tag in the body content, some other tags might mix in between
|
|
1395
|
+
const allPTags = allChildren.filter((c) => c.nodeName === 'P');
|
|
1396
|
+
const allH2Tags = allChildren.filter((c) => c.nodeName === 'H2');
|
|
1397
|
+
let target = null;
|
|
1398
|
+
switch (inlinePosition) {
|
|
1399
|
+
case '1th':
|
|
1400
|
+
target = allPTags[0];
|
|
1401
|
+
break;
|
|
1402
|
+
case '2th':
|
|
1403
|
+
target = allPTags[1];
|
|
1404
|
+
break;
|
|
1405
|
+
case '3th':
|
|
1406
|
+
target = allPTags[2];
|
|
1407
|
+
break;
|
|
1408
|
+
case '4th':
|
|
1409
|
+
target = allPTags[3];
|
|
1410
|
+
break;
|
|
1411
|
+
case '5th':
|
|
1412
|
+
target = allPTags[4];
|
|
1413
|
+
break;
|
|
1414
|
+
case '6th':
|
|
1415
|
+
target = allPTags[5];
|
|
1416
|
+
break;
|
|
1417
|
+
case '7th':
|
|
1418
|
+
target = allPTags[6];
|
|
1419
|
+
break;
|
|
1420
|
+
case '8th':
|
|
1421
|
+
target = allPTags[7];
|
|
1422
|
+
break;
|
|
1423
|
+
case '9th':
|
|
1424
|
+
target = allPTags[8];
|
|
1425
|
+
break;
|
|
1426
|
+
case '10th':
|
|
1427
|
+
target = allPTags[9];
|
|
1428
|
+
break;
|
|
1429
|
+
case '11th':
|
|
1430
|
+
target = allPTags[10];
|
|
1431
|
+
break;
|
|
1432
|
+
case '12th':
|
|
1433
|
+
target = allPTags[11];
|
|
1434
|
+
break;
|
|
1435
|
+
case 'lastP':
|
|
1436
|
+
target = allPTags[allPTags.length - 1];
|
|
1437
|
+
break;
|
|
1438
|
+
case '1thH2':
|
|
1439
|
+
target = allH2Tags[0];
|
|
1440
|
+
break;
|
|
1441
|
+
case '2thH2':
|
|
1442
|
+
target = allH2Tags[1];
|
|
1443
|
+
break;
|
|
1444
|
+
case '3thH2':
|
|
1445
|
+
target = allH2Tags[2];
|
|
1446
|
+
break;
|
|
1447
|
+
case '4thH2':
|
|
1448
|
+
target = allH2Tags[3];
|
|
1449
|
+
break;
|
|
1450
|
+
case '5thH2':
|
|
1451
|
+
target = allH2Tags[4];
|
|
1452
|
+
break;
|
|
1453
|
+
case '6thH2':
|
|
1454
|
+
target = allH2Tags[5];
|
|
1455
|
+
break;
|
|
1456
|
+
case '7thH2':
|
|
1457
|
+
target = allH2Tags[6];
|
|
1458
|
+
break;
|
|
1459
|
+
case '8thH2':
|
|
1460
|
+
target = allH2Tags[7];
|
|
1461
|
+
break;
|
|
1462
|
+
case '9thH2':
|
|
1463
|
+
target = allH2Tags[8];
|
|
1464
|
+
break;
|
|
1465
|
+
case '10thH2':
|
|
1466
|
+
target = allH2Tags[9];
|
|
1467
|
+
break;
|
|
1468
|
+
case 'lastH2':
|
|
1469
|
+
target = allH2Tags[allH2Tags.length - 1];
|
|
1470
|
+
break;
|
|
1471
|
+
}
|
|
1472
|
+
if (target) {
|
|
1473
|
+
if (!target.parentElement.querySelector('.inline-lead-wrapper')) {
|
|
1474
|
+
const wrapper = document.createElement('div');
|
|
1475
|
+
wrapper.classList.add('inline-lead-wrapper');
|
|
1476
|
+
if (target.nextElementSibling) {
|
|
1477
|
+
target.parentElement.insertBefore(wrapper, target.nextElementSibling);
|
|
1478
|
+
}
|
|
1479
|
+
else {
|
|
1480
|
+
target.parentElement.appendChild(wrapper);
|
|
1481
|
+
}
|
|
1482
|
+
return wrapper;
|
|
1483
|
+
}
|
|
1484
|
+
else {
|
|
1485
|
+
return target.parentElement.querySelector('.inline-lead-wrapper');
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
}, [inlinePosition]);
|
|
1490
|
+
if (!inlinePosition || !target)
|
|
1491
|
+
return null;
|
|
1492
|
+
return createPortal(content, target);
|
|
1493
|
+
};
|
|
1494
|
+
|
|
1495
|
+
const SideBarLayout = ({ content }) => {
|
|
1496
|
+
const targets = useMemo(() => {
|
|
1497
|
+
const targetDoms = Array.from(document.querySelectorAll('.hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar'));
|
|
1498
|
+
targetDoms.forEach((dom) => {
|
|
1499
|
+
if (dom.querySelector('.sidebar-lead-modal-wrapper'))
|
|
1500
|
+
return;
|
|
1501
|
+
const wrapper = document.createElement('div');
|
|
1502
|
+
wrapper.classList.add('sidebar-lead-modal-wrapper');
|
|
1503
|
+
dom.prepend(wrapper);
|
|
1504
|
+
});
|
|
1505
|
+
return targetDoms.map((d) => d.querySelector('.sidebar-lead-modal-wrapper'));
|
|
1506
|
+
}, []);
|
|
1507
|
+
return (React__default.createElement(React__default.Fragment, null, targets.map((target) => createPortal(content, getWrapperDomWithSelector(target, 'sidebar-lead-modal-wrapper')))));
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
const libraries = ['places'];
|
|
1511
|
+
const GoogleLocation = (props) => {
|
|
1512
|
+
var _a;
|
|
1513
|
+
const { inputWrapperOrder = ['label', 'input', 'description', 'error'], defaultValue, value: valueProps, onChange: onChangeProps, locale } = props, restProps = __rest(props, ["inputWrapperOrder", "defaultValue", "value", "onChange", "locale"]);
|
|
1514
|
+
const [LoadScript, setLoadScript] = useState(null);
|
|
1515
|
+
const [value, setValue] = useState(defaultValue || valueProps);
|
|
1516
|
+
const { predictions } = usePlacesAutocomplete(value, '', locale === 'tl-PH' ? 'en' : (_a = locale === null || locale === void 0 ? void 0 : locale.split('-')) === null || _a === void 0 ? void 0 : _a[0]);
|
|
1517
|
+
const onChangeAutocomplete = useCallback((s) => {
|
|
1518
|
+
setValue(s);
|
|
1519
|
+
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(s);
|
|
1520
|
+
}, []);
|
|
1521
|
+
const onClickItem = useCallback((item) => {
|
|
1522
|
+
/** For sure get value */
|
|
1523
|
+
setValue(item.value);
|
|
1524
|
+
const predCur = predictions === null || predictions === void 0 ? void 0 : predictions.find(({ description }) => description === item.value);
|
|
1525
|
+
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(item.value, predCur === null || predCur === void 0 ? void 0 : predCur.rawData);
|
|
1526
|
+
}, [onChangeProps, predictions]);
|
|
1527
|
+
useEffect(() => {
|
|
1528
|
+
setValue(valueProps);
|
|
1529
|
+
}, [valueProps]);
|
|
1530
|
+
useEffect(() => {
|
|
1531
|
+
var _a, _b, _c;
|
|
1532
|
+
// only load extra google script when not yet loaded
|
|
1533
|
+
if (!((_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.places) === null || _c === void 0 ? void 0 : _c.AutocompleteService) && !LoadScript) {
|
|
1534
|
+
import('@react-google-maps/api').then((m) => {
|
|
1535
|
+
setLoadScript(() => m.LoadScript);
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
}, []);
|
|
1539
|
+
return (React__default.createElement(Autocomplete, Object.assign({ defaultValue: defaultValue, value: value, onChange: onChangeAutocomplete, data: predictions.map((pred) => {
|
|
1540
|
+
return { value: pred.description, label: pred.description };
|
|
1541
|
+
}), filter: () => true, onItemSubmit: onClickItem, inputWrapperOrder: inputWrapperOrder, inputContainer: (children) => {
|
|
1542
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1543
|
+
LoadScript && (React__default.createElement(LoadScript, { googleMapsApiKey: GOOGLE_API_KEY, libraries: libraries, loadingElement: React__default.createElement(React__default.Fragment, null), style: { width: '100%' } })),
|
|
1544
|
+
children));
|
|
1545
|
+
} }, restProps)));
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1331
1548
|
// You can give context variables any name
|
|
1332
1549
|
const [LeadFormProvider, useLeadFormContext, useLeadForm] = createFormContext();
|
|
1333
1550
|
const useLeadFormConfig = ({ listBlockAdded = [], validatingPhoneRef, validatingEmailRef, campaignId, campaign_subot_id = [], }) => {
|
|
@@ -1357,9 +1574,9 @@ const useLeadFormConfig = ({ listBlockAdded = [], validatingPhoneRef, validating
|
|
|
1357
1574
|
const isBLockRequired = (_a = block === null || block === void 0 ? void 0 : block.data) === null || _a === void 0 ? void 0 : _a.required;
|
|
1358
1575
|
if (!formRef.current.isTouched(name))
|
|
1359
1576
|
return;
|
|
1360
|
-
if (typeof value === '
|
|
1577
|
+
if ((typeof value === 'string' && value.replace(' ', '') === '') ||
|
|
1578
|
+
typeof value === 'undefined' ||
|
|
1361
1579
|
value === '' ||
|
|
1362
|
-
(typeof value === 'string' && value.replace(' ', '') === '') ||
|
|
1363
1580
|
(Array.isArray(value) && value.length === 0)) {
|
|
1364
1581
|
return isBLockRequired
|
|
1365
1582
|
? t('validator.required')
|
|
@@ -1493,108 +1710,407 @@ const useLeadFormConfig = ({ listBlockAdded = [], validatingPhoneRef, validating
|
|
|
1493
1710
|
return { form, validateObj };
|
|
1494
1711
|
};
|
|
1495
1712
|
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1713
|
+
const SubtitleBlock = ({ children, align, }) => (React__default.createElement("p", { className: `lead-modal__description ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
1714
|
+
|
|
1715
|
+
const cssInputNotShrink = css `
|
|
1716
|
+
height: 100% !important;
|
|
1717
|
+
min-height: calc(var(--container-height, 56px) * 22 / 56);
|
|
1718
|
+
color: ${theme.colors.gray800};
|
|
1719
|
+
font-size: var(--input, 16px);
|
|
1720
|
+
line-height: calc(var(--container-height, 56px) * 22 / 56);
|
|
1721
|
+
border: none !important;
|
|
1722
|
+
border-radius: 0 !important;
|
|
1723
|
+
outline: none !important;
|
|
1724
|
+
box-shadow: none !important;
|
|
1725
|
+
padding: 0;
|
|
1726
|
+
cursor: pointer;
|
|
1727
|
+
opacity: 0;
|
|
1728
|
+
|
|
1729
|
+
::placeholder {
|
|
1730
|
+
color: ${theme.colors.gray400};
|
|
1731
|
+
}
|
|
1732
|
+
`;
|
|
1733
|
+
const cssInputShrink = css `
|
|
1734
|
+
height: auto !important;
|
|
1735
|
+
cursor: text;
|
|
1736
|
+
opacity: 1;
|
|
1737
|
+
transition: 0.1s ease-in-out all;
|
|
1738
|
+
`;
|
|
1739
|
+
const cssLabelNotShrink = css `
|
|
1740
|
+
position: absolute;
|
|
1741
|
+
top: calc(var(--container-height) / 2);
|
|
1742
|
+
left: var(--space-x, 16px);
|
|
1743
|
+
color: ${theme.colors.gray400};
|
|
1744
|
+
font-size: var(--label-not-shrink, 16px);
|
|
1745
|
+
font-weight: 400;
|
|
1746
|
+
line-height: calc(var(--container-height, 56px) * 18 / 56);
|
|
1747
|
+
margin: 0;
|
|
1748
|
+
z-index: 1;
|
|
1749
|
+
cursor: pointer;
|
|
1750
|
+
transform: translateY(-50%);
|
|
1751
|
+
transition: 0.125s ease-in all;
|
|
1752
|
+
`;
|
|
1753
|
+
const cssLabelShrink = css `
|
|
1754
|
+
color: ${theme.colors.gray600};
|
|
1755
|
+
font-weight: 600;
|
|
1756
|
+
font-size: var(--label-shrink, 12px);
|
|
1757
|
+
top: calc(var(--container-height) * 7 / 56);
|
|
1758
|
+
transform: none;
|
|
1759
|
+
transition: 0.125s ease-out all;
|
|
1760
|
+
`;
|
|
1761
|
+
const cssWrapperInputNotShrink = css `
|
|
1762
|
+
min-height: var(--container-height, 56px);
|
|
1763
|
+
display: flex;
|
|
1764
|
+
align-items: flex-end;
|
|
1765
|
+
border: 1px solid ${theme.colors.gray200};
|
|
1766
|
+
border-radius: 8px;
|
|
1767
|
+
background-color: #fff;
|
|
1768
|
+
padding-inline: var(--space-x, 16px);
|
|
1769
|
+
padding-block: var(--space-y-not-shrink, 16px);
|
|
1770
|
+
cursor: pointer;
|
|
1771
|
+
pointer-events: none;
|
|
1772
|
+
|
|
1773
|
+
&:has(.mantine-Input-rightSection) {
|
|
1774
|
+
padding-right: var(--container-height, 56px);
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
.mantine-Input-icon {
|
|
1778
|
+
display: none;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
.mantine-NumberInput-control {
|
|
1782
|
+
border-color: ${theme.colors.gray200};
|
|
1783
|
+
}
|
|
1784
|
+
`;
|
|
1785
|
+
const cssWrapperInputShrink = css `
|
|
1786
|
+
height: auto;
|
|
1787
|
+
min-height: var(--container-height, 56px);
|
|
1788
|
+
padding-block: var(--space-y-shrink, 7px);
|
|
1789
|
+
cursor: text;
|
|
1790
|
+
pointer-events: auto;
|
|
1791
|
+
`;
|
|
1792
|
+
const cssInputWrapperError = css `
|
|
1793
|
+
color: ${theme.colors.red800};
|
|
1794
|
+
font-size: 12px;
|
|
1795
|
+
line-height: 1.5;
|
|
1796
|
+
`;
|
|
1797
|
+
const StyledTextFieldContainer = styled.div `
|
|
1798
|
+
--space-x: 16px;
|
|
1799
|
+
--space-y-not-shrink: 16px;
|
|
1800
|
+
--space-y-shrink: 7px;
|
|
1801
|
+
--container-height: 56px;
|
|
1802
|
+
--label-not-shrink: 16px;
|
|
1803
|
+
--label-shrink: 12px;
|
|
1804
|
+
--input: 16px;
|
|
1805
|
+
|
|
1806
|
+
position: relative;
|
|
1807
|
+
min-width: 100px;
|
|
1808
|
+
max-width: 100%;
|
|
1809
|
+
display: inline-block;
|
|
1810
|
+
|
|
1811
|
+
.textField_wrapper {
|
|
1812
|
+
display: inline-block;
|
|
1813
|
+
width: 100%;
|
|
1814
|
+
cursor: pointer;
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
.mantine-InputWrapper-root {
|
|
1818
|
+
&[data-invalid='true'] {
|
|
1819
|
+
.mantine-Input-wrapper {
|
|
1820
|
+
border-color: ${theme.colors.red400};
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
.mantine-Input-wrapper {
|
|
1825
|
+
&:has([data-invalid]) {
|
|
1826
|
+
border-color: ${theme.colors.red400};
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
.mantine-InputWrapper-label {
|
|
1832
|
+
${cssLabelNotShrink}
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
.mantine-Input-wrapper {
|
|
1836
|
+
${cssWrapperInputNotShrink}
|
|
1837
|
+
|
|
1838
|
+
+ .mantine-Popover-dropdown[data-position="bottom-start"] {
|
|
1839
|
+
left: 0 !important;
|
|
1840
|
+
}
|
|
1841
|
+
+ .mantine-Popover-dropdown[data-position='top-start'] {
|
|
1842
|
+
top: unset !important;
|
|
1843
|
+
left: 0 !important;
|
|
1844
|
+
bottom: 100% !important;
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
.mantine-Input-input {
|
|
1849
|
+
${cssInputNotShrink}
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
&.textField_shrink,
|
|
1853
|
+
&:focus-within {
|
|
1854
|
+
.mantine-InputWrapper-label {
|
|
1855
|
+
${cssLabelShrink}
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
.mantine-Input-wrapper {
|
|
1859
|
+
${cssWrapperInputShrink}
|
|
1860
|
+
&.mantine-Select-wrapper {
|
|
1861
|
+
.mantine-Select-rightSection {
|
|
1862
|
+
pointer-events: auto !important;
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
.mantine-Input-input {
|
|
1868
|
+
${cssInputShrink}
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
&:has(.PhoneInput) {
|
|
1872
|
+
.mantine-InputWrapper-label {
|
|
1873
|
+
left: var(--space-x, 16px);
|
|
1874
|
+
}
|
|
1875
|
+
.PhoneInput {
|
|
1876
|
+
.PhoneInputInput {
|
|
1877
|
+
opacity: 1;
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
.PhoneInput {
|
|
1884
|
+
--phone-select: 75px;
|
|
1885
|
+
--phone-input-space-x: 8px;
|
|
1886
|
+
width: 100%;
|
|
1887
|
+
opacity: 1;
|
|
1888
|
+
border: none;
|
|
1889
|
+
.PhoneInputCountry {
|
|
1890
|
+
background-color: transparent;
|
|
1891
|
+
border: none;
|
|
1892
|
+
padding: 0;
|
|
1893
|
+
width: var(--phone-select, 75px);
|
|
1894
|
+
}
|
|
1895
|
+
.PhoneInputInput {
|
|
1896
|
+
flex: 1;
|
|
1897
|
+
min-width: 0;
|
|
1898
|
+
line-height: 1.5;
|
|
1899
|
+
outline: none !important;
|
|
1900
|
+
border: none;
|
|
1901
|
+
box-shadow: none;
|
|
1902
|
+
padding: 0 var(--phone-input-space-x, 8px);
|
|
1903
|
+
opacity: 0;
|
|
1904
|
+
color: ${theme.colors.gray800} !important;
|
|
1905
|
+
:focus {
|
|
1906
|
+
color: ${theme.colors.gray800} !important;
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
&:has(.PhoneInput) {
|
|
1912
|
+
.mantine-InputWrapper-label {
|
|
1913
|
+
left: calc(
|
|
1914
|
+
var(--space-x, 16px) + var(--phone-select, 75px) +
|
|
1915
|
+
var(--phone-input-space-x, 8px)
|
|
1916
|
+
);
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
`;
|
|
1920
|
+
const StyledChoiceFieldContainer = styled.div `
|
|
1921
|
+
&.leadgen-form_checkbox,
|
|
1922
|
+
&.leadgen-form_radio {
|
|
1923
|
+
width: 100%;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
&.leadgen-form_dropdown {
|
|
1927
|
+
width: calc(50% - 12px);
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
.mantine-InputWrapper-root {
|
|
1931
|
+
display: block;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
.mantine-InputWrapper-label {
|
|
1935
|
+
margin-bottom: 0.5rem;
|
|
1936
|
+
color: ${theme.colors.gray800};
|
|
1937
|
+
font-size: 16px;
|
|
1938
|
+
font-weight: 400;
|
|
1939
|
+
line-height: 1.5;
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
.mantine-Radio-root,
|
|
1943
|
+
.mantine-Checkbox-root {
|
|
1944
|
+
gap: 8px;
|
|
1945
|
+
min-width: calc(50% - 4px);
|
|
1946
|
+
|
|
1947
|
+
input[type='radio'],
|
|
1948
|
+
input[type='checkbox'] {
|
|
1949
|
+
border-color: ${theme.colors.gray600};
|
|
1950
|
+
width: 18px;
|
|
1951
|
+
height: 18px;
|
|
1952
|
+
}
|
|
1953
|
+
input[type='checkbox'] {
|
|
1954
|
+
border-radius: 4px;
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
&[data-checked='true'] {
|
|
1958
|
+
input[type='radio'],
|
|
1959
|
+
input[type='checkbox'] {
|
|
1960
|
+
border-color: ${theme.colors.primary600};
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
input[type='radio'] {
|
|
1964
|
+
background-color: white;
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
.mantine-Checkbox-input {
|
|
1969
|
+
&:checked {
|
|
1970
|
+
border-color: ${theme.colors.primary600};
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
.mantine-Radio-inner,
|
|
1976
|
+
.mantine-Checkbox-inner {
|
|
1977
|
+
width: 24px;
|
|
1978
|
+
height: 24px;
|
|
1979
|
+
display: flex;
|
|
1980
|
+
align-items: center;
|
|
1981
|
+
justify-content: center;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
.mantine-Radio-body,
|
|
1985
|
+
.mantine-Checkbox-body {
|
|
1986
|
+
display: flex;
|
|
1987
|
+
align-items: center;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
.mantine-Radio-label,
|
|
1991
|
+
.mantine-Checkbox-label {
|
|
1992
|
+
padding-left: 8px;
|
|
1993
|
+
color: ${theme.colors.gray800};
|
|
1994
|
+
font-size: 14px;
|
|
1995
|
+
line-height: 1.4;
|
|
1996
|
+
letter-spacing: -0.2px;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
.leadgen-choiceContainer {
|
|
2000
|
+
display: flex;
|
|
2001
|
+
flex-wrap: wrap;
|
|
2002
|
+
align-items: flex-start;
|
|
2003
|
+
gap: 8px;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
.mantine-InputWrapper-error {
|
|
2007
|
+
${cssInputWrapperError}
|
|
2008
|
+
}
|
|
2009
|
+
`;
|
|
2010
|
+
|
|
2011
|
+
const TextField = (props) => {
|
|
2012
|
+
const { shrink: shrinkProps, onChangeShrink, className, children } = props, restProps = __rest(props, ["shrink", "onChangeShrink", "className", "children"]);
|
|
2013
|
+
const containerRef = useClickOutside(() => {
|
|
2014
|
+
if (shrinkProps) {
|
|
2015
|
+
return;
|
|
1516
2016
|
}
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
setReady(true);
|
|
1527
|
-
}, 200);
|
|
1528
|
-
});
|
|
2017
|
+
setShrink(false);
|
|
2018
|
+
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(false);
|
|
2019
|
+
});
|
|
2020
|
+
const [shrink, setShrink] = useState(shrinkProps);
|
|
2021
|
+
const onClick = useCallback((e) => {
|
|
2022
|
+
setShrink(true);
|
|
2023
|
+
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(true);
|
|
2024
|
+
if (shrink) {
|
|
2025
|
+
return;
|
|
1529
2026
|
}
|
|
1530
|
-
|
|
1531
|
-
|
|
2027
|
+
const $textEl = e.currentTarget.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])');
|
|
2028
|
+
const $focusEl = $textEl.item($textEl.length - 1);
|
|
2029
|
+
if ($focusEl) {
|
|
2030
|
+
$focusEl.focus();
|
|
2031
|
+
$focusEl.scrollIntoView({
|
|
2032
|
+
behavior: 'auto',
|
|
2033
|
+
block: 'center',
|
|
2034
|
+
inline: 'start',
|
|
2035
|
+
});
|
|
1532
2036
|
}
|
|
1533
|
-
}, []);
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
}, filter: () => true, clearable: true, searchable: true, onChange: (val) => setAddress(val || ''), icon: React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" },
|
|
1544
|
-
React__default.createElement("path", { d: "M10 9.792q.605 0 1.032-.427.426-.428.426-1.032 0-.603-.426-1.031A1.4 1.4 0 0 0 10 6.875q-.604 0-1.032.427a1.4 1.4 0 0 0-.426 1.031q0 .604.426 1.032.428.426 1.032.427m0 8.083q-.145 0-.292-.042a.7.7 0 0 1-.27-.145Q6.478 15 5.01 12.708 3.54 10.418 3.54 8.5q0-3.021 1.949-4.823T10 1.875t4.51 1.802q1.95 1.802 1.949 4.823 0 1.917-1.468 4.208-1.47 2.292-4.427 4.98a.7.7 0 0 1-.271.145 1 1 0 0 1-.292.042", fill: "#8C8C8C" })), autoComplete: 'no-auto-complete-' + randRef.current, rightSection: React__default.createElement(React__default.Fragment, null) }, form.getInputProps(name)))));
|
|
2037
|
+
}, [shrink]);
|
|
2038
|
+
useEffect(() => {
|
|
2039
|
+
setShrink(shrinkProps);
|
|
2040
|
+
}, [shrinkProps]);
|
|
2041
|
+
return (React__default.createElement(StyledTextFieldContainer, Object.assign({ shrink: shrink, className: clsx(className, 'textField', { textField_shrink: !!shrink }) }, restProps),
|
|
2042
|
+
React__default.createElement("div", { ref: containerRef, onClick: onClick, className: "textField_wrapper" }, children)));
|
|
2043
|
+
};
|
|
2044
|
+
const ChoiceField = (props) => {
|
|
2045
|
+
const { children, className } = props, restProps = __rest(props, ["children", "className"]);
|
|
2046
|
+
return (React__default.createElement(StyledChoiceFieldContainer, Object.assign({ className: clsx(className, 'choiceField') }, restProps), children));
|
|
1545
2047
|
};
|
|
1546
2048
|
|
|
1547
|
-
const SubtitleBlock = ({ children, align, }) => (React__default.createElement("p", { className: `lead-modal__description ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
1548
|
-
|
|
1549
2049
|
const TitleBlock = ({ children, align, }) => (React__default.createElement("h2", { className: `lead-modal__title ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
1550
2050
|
|
|
1551
2051
|
const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, }) => {
|
|
1552
2052
|
const form = useLeadFormContext();
|
|
2053
|
+
const formValues = form.values;
|
|
1553
2054
|
return (React__default.createElement(React__default.Fragment, null, listBlockAdded.map((b, index) => {
|
|
1554
2055
|
var _a;
|
|
1555
2056
|
const { name = '', data = {} } = b || {};
|
|
1556
2057
|
const { placeholder, value, align, listQuestion, isSendMailChimp = false, newtab, url, } = data;
|
|
1557
2058
|
const required = (_a = data.required) !== null && _a !== void 0 ? _a : true;
|
|
2059
|
+
const formValue = (formValues === null || formValues === void 0 ? void 0 : formValues[value]) || null;
|
|
1558
2060
|
switch (name) {
|
|
1559
2061
|
case 'TitleBlock':
|
|
1560
2062
|
return (React__default.createElement(TitleBlock, { key: index, align: align }, value));
|
|
1561
2063
|
case 'SubtitleBlock':
|
|
1562
2064
|
return (React__default.createElement(SubtitleBlock, { key: index, align: align }, value));
|
|
1563
2065
|
case 'TextBlock':
|
|
1564
|
-
return (React__default.createElement(
|
|
1565
|
-
|
|
1566
|
-
|
|
2066
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2067
|
+
React__default.createElement(TextInput, Object.assign({ key: index, withAsterisk: required, spellCheck: false, type: "text", placeholder: placeholder,
|
|
2068
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2069
|
+
// onChangeRaw={(e) => inputOnChange('text', e)}
|
|
2070
|
+
label: placeholder, "data-control": "text", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
1567
2071
|
case 'NumberBlock':
|
|
1568
|
-
return (React__default.createElement(
|
|
1569
|
-
|
|
1570
|
-
|
|
2072
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2073
|
+
React__default.createElement(NumberInput$1, Object.assign({ key: index, withAsterisk: required, spellCheck: false, type: "number", placeholder: placeholder,
|
|
2074
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2075
|
+
// onChange={(e) => inputOnChange('number', e)}
|
|
2076
|
+
label: placeholder, "data-control": "number", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
1571
2077
|
case 'EmailBlock':
|
|
1572
|
-
return (React__default.createElement(
|
|
1573
|
-
|
|
1574
|
-
|
|
2078
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2079
|
+
React__default.createElement(TextInput, Object.assign({ key: index, withAsterisk: required, spellCheck: false,
|
|
2080
|
+
// type="email"
|
|
2081
|
+
placeholder: placeholder,
|
|
2082
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2083
|
+
label: placeholder, "data-control": "email", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
1575
2084
|
case 'PhoneOtpBlock':
|
|
1576
2085
|
case 'WhatsappOtpBlock':
|
|
1577
2086
|
case 'ZaloOtpBlock':
|
|
1578
2087
|
case 'PhoneBlock': {
|
|
1579
2088
|
const id = popupId + '-' + value + '-' + index;
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
},
|
|
1588
|
-
|
|
1589
|
-
|
|
2089
|
+
const _b = form.getInputProps(value), { error } = _b, formPhoneInputWrapper = __rest(_b, ["error"]);
|
|
2090
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: clsx('lead-modal__form-control leadgen-form_field', {
|
|
2091
|
+
'leadgen-form_field_error': !!error,
|
|
2092
|
+
}) },
|
|
2093
|
+
React__default.createElement(Input$1.Wrapper, Object.assign({ size: "md", withAsterisk: required, key: index, label: placeholder, "data-invalid": !!error, labelProps: {
|
|
2094
|
+
htmlFor: id,
|
|
2095
|
+
}, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, formPhoneInputWrapper, { error: error }),
|
|
2096
|
+
React__default.createElement("div", { className: "mantine-Input-wrapper" },
|
|
2097
|
+
React__default.createElement(Phone, { className: "mantine-Input-input", name: value, spellCheck: false, type: "tel", placeholder: placeholder, onChange: (v) => {
|
|
2098
|
+
form.setFieldValue(value, v);
|
|
2099
|
+
},
|
|
2100
|
+
// onBlur={(e) => inputOnBlur('tel', e)}
|
|
2101
|
+
id: id, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel" })))));
|
|
1590
2102
|
}
|
|
1591
2103
|
case 'LocationBlock': {
|
|
1592
|
-
return (React__default.createElement(
|
|
2104
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2105
|
+
React__default.createElement(GoogleLocation, Object.assign({ withAsterisk: required, key: index, name: value, placeholder: placeholder, label: placeholder, "data-control": "text", locale: locale, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
1593
2106
|
}
|
|
1594
2107
|
case 'DateBlock':
|
|
1595
|
-
return (React__default.createElement(
|
|
1596
|
-
React__default.createElement(DatePicker, Object.assign({ withAsterisk: required, key: index, type: "default", name: value, placeholder: placeholder,
|
|
1597
|
-
|
|
2108
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2109
|
+
React__default.createElement(DatePicker, Object.assign({ clearable: true, withAsterisk: required, key: index, type: "default", name: value, placeholder: placeholder, label: placeholder, inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
|
|
2110
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
2111
|
+
children,
|
|
2112
|
+
React__default.createElement("input", { type: "hidden", "data-control": "date", name: value, value: formValue })));
|
|
2113
|
+
} }, form.getInputProps(value)))));
|
|
1598
2114
|
case 'LinkButtonBlock':
|
|
1599
2115
|
return (React__default.createElement("div", { key: index },
|
|
1600
2116
|
React__default.createElement("a", { target: newtab ? 'blank' : 'parrent', href: url, style: { textDecoration: 'none' } },
|
|
@@ -1603,30 +2119,42 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
1603
2119
|
onOtherSubmit === null || onOtherSubmit === void 0 ? void 0 : onOtherSubmit();
|
|
1604
2120
|
} }, value))));
|
|
1605
2121
|
case 'CheckboxBlock':
|
|
1606
|
-
return (React__default.createElement(
|
|
2122
|
+
return (React__default.createElement(ChoiceField, { className: "leadgen-form_checkbox" },
|
|
1607
2123
|
isSendMailChimp && (React__default.createElement("div", { style: {
|
|
1608
2124
|
display: 'none',
|
|
1609
2125
|
}, "data-name": value + '-mailchimp' })),
|
|
1610
|
-
React__default.createElement(Checkbox.Group, Object.assign({ withAsterisk: required,
|
|
2126
|
+
React__default.createElement(Checkbox.Group, Object.assign({ withAsterisk: required,
|
|
2127
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2128
|
+
key: index, label: placeholder, size: "md", sx: {
|
|
1611
2129
|
display: 'flex',
|
|
1612
2130
|
flexDirection: 'column',
|
|
2131
|
+
flexWrap: 'wrap',
|
|
1613
2132
|
gap: 8,
|
|
2133
|
+
}, inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
|
|
2134
|
+
return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
1614
2135
|
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Checkbox, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "checkbox" }))))));
|
|
1615
2136
|
case 'RadioBlock':
|
|
1616
|
-
return (React__default.createElement(
|
|
1617
|
-
isSendMailChimp && (React__default.createElement(Input, { type: "hidden", name: value + '-mailchimp', value: isSendMailChimp })),
|
|
1618
|
-
React__default.createElement(Radio.Group, Object.assign({ withAsterisk: required,
|
|
2137
|
+
return (React__default.createElement(ChoiceField, { className: "leadgen-form_radio" },
|
|
2138
|
+
isSendMailChimp && (React__default.createElement(Input$1, { type: "hidden", name: value + '-mailchimp', value: isSendMailChimp })),
|
|
2139
|
+
React__default.createElement(Radio.Group, Object.assign({ withAsterisk: required,
|
|
2140
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2141
|
+
key: index, label: placeholder, size: "md", inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
|
|
2142
|
+
return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
2143
|
+
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Radio, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "radio" }))))));
|
|
1619
2144
|
case 'DropdownBlock':
|
|
1620
|
-
return (React__default.createElement(
|
|
2145
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
1621
2146
|
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown' }),
|
|
1622
|
-
React__default.createElement(Select, Object.assign({ key: index,
|
|
2147
|
+
React__default.createElement(Select, Object.assign({ key: index,
|
|
2148
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2149
|
+
label: placeholder, placeholder: placeholder, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
|
|
1623
2150
|
value: l.value,
|
|
1624
2151
|
label: l.placeholder,
|
|
1625
2152
|
})) }, form.getInputProps(value)))));
|
|
1626
2153
|
case 'TncBlock':
|
|
1627
|
-
const
|
|
1628
|
-
return (React__default.createElement(
|
|
1629
|
-
React__default.createElement(
|
|
2154
|
+
const _c = form.getInputProps(`TNC-${b.id}`), { error } = _c, tncInputProps = __rest(_c, ["error"]);
|
|
2155
|
+
return (React__default.createElement(ChoiceField, { className: "leadgen-form_checkbox" },
|
|
2156
|
+
React__default.createElement(Input$1.Wrapper, { error: error },
|
|
2157
|
+
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" }, tncInputProps)))));
|
|
1630
2158
|
}
|
|
1631
2159
|
return null;
|
|
1632
2160
|
})));
|
|
@@ -1757,169 +2285,27 @@ const OtpBlock = ({ otpData, onSuccess, autoSendWhenOpen, }) => {
|
|
|
1757
2285
|
})))));
|
|
1758
2286
|
};
|
|
1759
2287
|
|
|
1760
|
-
const
|
|
1761
|
-
const {
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
React__default.createElement("
|
|
1766
|
-
React__default.createElement("img", { src: image, style: {
|
|
1767
|
-
maxHeight: 162,
|
|
1768
|
-
objectFit: 'cover',
|
|
1769
|
-
aspectRatio: `${imageWidth}/${imageHeight}`,
|
|
1770
|
-
}, loading: "lazy" }),
|
|
1771
|
-
title && (React__default.createElement("h1", { className: `le-thankyou-title le-text-align-${titleAlign}` }, title)),
|
|
1772
|
-
subtitle && (React__default.createElement("p", { className: `le-thankyou-subtitle le-text-align-${subtitleAlign}` }, subtitle.split('\n').map((text, idx, list) => {
|
|
1773
|
-
const isShowBr = idx < list.length - 1;
|
|
1774
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
1775
|
-
text,
|
|
1776
|
-
isShowBr && React__default.createElement("br", null)));
|
|
1777
|
-
}))),
|
|
1778
|
-
linkText && (React__default.createElement("div", null,
|
|
1779
|
-
React__default.createElement("a", { href: link, target: linkNewTab ? '_blank' : 'parrent', rel: "noreferrer" },
|
|
1780
|
-
React__default.createElement("button", { className: `lead-modal__btn ${LEAD_CLASS}` }, linkText)))))));
|
|
1781
|
-
};
|
|
1782
|
-
|
|
1783
|
-
const InlineLayout = ({ content, inlinePosition, }) => {
|
|
1784
|
-
const target = useMemo(() => {
|
|
1785
|
-
if (!inlinePosition)
|
|
1786
|
-
return null;
|
|
1787
|
-
const parents = document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`);
|
|
1788
|
-
const allChildren = Array.from(parents).reduce((r, p) => {
|
|
1789
|
-
return [...r, ...Array.from(p.children)];
|
|
1790
|
-
}, []);
|
|
1791
|
-
if (allChildren === null || allChildren === void 0 ? void 0 : allChildren.length) {
|
|
1792
|
-
// find the third p tag in the body content, some other tags might mix in between
|
|
1793
|
-
const allPTags = allChildren.filter((c) => c.nodeName === 'P');
|
|
1794
|
-
const allH2Tags = allChildren.filter((c) => c.nodeName === 'H2');
|
|
1795
|
-
let target = null;
|
|
1796
|
-
switch (inlinePosition) {
|
|
1797
|
-
case '1th':
|
|
1798
|
-
target = allPTags[0];
|
|
1799
|
-
break;
|
|
1800
|
-
case '2th':
|
|
1801
|
-
target = allPTags[1];
|
|
1802
|
-
break;
|
|
1803
|
-
case '3th':
|
|
1804
|
-
target = allPTags[2];
|
|
1805
|
-
break;
|
|
1806
|
-
case '4th':
|
|
1807
|
-
target = allPTags[3];
|
|
1808
|
-
break;
|
|
1809
|
-
case '5th':
|
|
1810
|
-
target = allPTags[4];
|
|
1811
|
-
break;
|
|
1812
|
-
case '6th':
|
|
1813
|
-
target = allPTags[5];
|
|
1814
|
-
break;
|
|
1815
|
-
case '7th':
|
|
1816
|
-
target = allPTags[6];
|
|
1817
|
-
break;
|
|
1818
|
-
case '8th':
|
|
1819
|
-
target = allPTags[7];
|
|
1820
|
-
break;
|
|
1821
|
-
case '9th':
|
|
1822
|
-
target = allPTags[8];
|
|
1823
|
-
break;
|
|
1824
|
-
case '10th':
|
|
1825
|
-
target = allPTags[9];
|
|
1826
|
-
break;
|
|
1827
|
-
case '11th':
|
|
1828
|
-
target = allPTags[10];
|
|
1829
|
-
break;
|
|
1830
|
-
case '12th':
|
|
1831
|
-
target = allPTags[11];
|
|
1832
|
-
break;
|
|
1833
|
-
case 'lastP':
|
|
1834
|
-
target = allPTags[allPTags.length - 1];
|
|
1835
|
-
break;
|
|
1836
|
-
case '1thH2':
|
|
1837
|
-
target = allH2Tags[0];
|
|
1838
|
-
break;
|
|
1839
|
-
case '2thH2':
|
|
1840
|
-
target = allH2Tags[1];
|
|
1841
|
-
break;
|
|
1842
|
-
case '3thH2':
|
|
1843
|
-
target = allH2Tags[2];
|
|
1844
|
-
break;
|
|
1845
|
-
case '4thH2':
|
|
1846
|
-
target = allH2Tags[3];
|
|
1847
|
-
break;
|
|
1848
|
-
case '5thH2':
|
|
1849
|
-
target = allH2Tags[4];
|
|
1850
|
-
break;
|
|
1851
|
-
case '6thH2':
|
|
1852
|
-
target = allH2Tags[5];
|
|
1853
|
-
break;
|
|
1854
|
-
case '7thH2':
|
|
1855
|
-
target = allH2Tags[6];
|
|
1856
|
-
break;
|
|
1857
|
-
case '8thH2':
|
|
1858
|
-
target = allH2Tags[7];
|
|
1859
|
-
break;
|
|
1860
|
-
case '9thH2':
|
|
1861
|
-
target = allH2Tags[8];
|
|
1862
|
-
break;
|
|
1863
|
-
case '10thH2':
|
|
1864
|
-
target = allH2Tags[9];
|
|
1865
|
-
break;
|
|
1866
|
-
case 'lastH2':
|
|
1867
|
-
target = allH2Tags[allH2Tags.length - 1];
|
|
1868
|
-
break;
|
|
1869
|
-
}
|
|
1870
|
-
if (target) {
|
|
1871
|
-
if (!target.parentElement.querySelector('.inline-lead-wrapper')) {
|
|
1872
|
-
const wrapper = document.createElement('div');
|
|
1873
|
-
wrapper.classList.add('inline-lead-wrapper');
|
|
1874
|
-
if (target.nextElementSibling) {
|
|
1875
|
-
target.parentElement.insertBefore(wrapper, target.nextElementSibling);
|
|
1876
|
-
}
|
|
1877
|
-
else {
|
|
1878
|
-
target.parentElement.appendChild(wrapper);
|
|
1879
|
-
}
|
|
1880
|
-
return wrapper;
|
|
1881
|
-
}
|
|
1882
|
-
else {
|
|
1883
|
-
return target.parentElement.querySelector('.inline-lead-wrapper');
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
}, [inlinePosition]);
|
|
1888
|
-
if (!inlinePosition || !target)
|
|
1889
|
-
return null;
|
|
1890
|
-
return createPortal(content, target);
|
|
1891
|
-
};
|
|
1892
|
-
|
|
1893
|
-
const SideBarLayout = ({ content }) => {
|
|
1894
|
-
const targets = useMemo(() => {
|
|
1895
|
-
const targetDoms = Array.from(document.querySelectorAll('.hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar'));
|
|
1896
|
-
targetDoms.forEach((dom) => {
|
|
1897
|
-
if (dom.querySelector('.sidebar-lead-modal-wrapper'))
|
|
1898
|
-
return;
|
|
1899
|
-
const wrapper = document.createElement('div');
|
|
1900
|
-
wrapper.classList.add('sidebar-lead-modal-wrapper');
|
|
1901
|
-
dom.prepend(wrapper);
|
|
1902
|
-
});
|
|
1903
|
-
return targetDoms.map((d) => d.querySelector('.sidebar-lead-modal-wrapper'));
|
|
1904
|
-
}, []);
|
|
1905
|
-
return (React__default.createElement(React__default.Fragment, null, targets.map((target) => createPortal(content, getWrapperDomWithSelector(target, 'sidebar-lead-modal-wrapper')))));
|
|
2288
|
+
const EmptyIcon = (props) => {
|
|
2289
|
+
const { className, style } = props;
|
|
2290
|
+
return (React__default.createElement("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, style: style },
|
|
2291
|
+
React__default.createElement("path", { d: "M79.9974 113.333C98.4069 113.333 113.331 98.4096 113.331 80.0001C113.331 61.5906 98.4069 46.6667 79.9974 46.6667C61.5879 46.6667 46.6641 61.5906 46.6641 80.0001C46.6641 98.4096 61.5879 113.333 79.9974 113.333Z", fill: "#F44D2C" }),
|
|
2292
|
+
React__default.createElement("path", { d: "M92.434 95.0004C91.7771 95.0004 91.1213 94.7499 90.6194 94.249L65.7521 69.3807C64.7493 68.3779 64.7493 66.7542 65.7521 65.7524C66.7549 64.7507 68.3786 64.7497 69.3804 65.7524L94.2487 90.6208C95.2515 91.6235 95.2515 93.2473 94.2487 94.249C93.7468 94.7499 93.0909 95.0004 92.434 95.0004Z", fill: "white" }),
|
|
2293
|
+
React__default.createElement("path", { d: "M67.5648 95C66.9079 95 66.252 94.7496 65.7501 94.2487C64.7474 93.2459 64.7474 91.6222 65.7501 90.6204L90.6185 65.7521C91.6212 64.7493 93.245 64.7493 94.2467 65.7521C95.2485 66.7549 95.2495 68.3786 94.2467 69.3804L69.3794 94.2487C68.8786 94.7496 68.2217 95 67.5648 95Z", fill: "white" })));
|
|
1906
2294
|
};
|
|
1907
2295
|
|
|
1908
2296
|
// url: imageBlocks.imageMobile.data.url
|
|
1909
2297
|
// newTab: imageBlocks.imageMobile.data.newtab
|
|
1910
2298
|
// image: campaignShow.image
|
|
1911
2299
|
// imageDestkop: campaignShow.image_desktop
|
|
1912
|
-
const
|
|
2300
|
+
const LEADGEN_LIMIT_LIGHTBOXB = 6;
|
|
2301
|
+
const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, showThankyou, campaignId, campaign_subot_id, locale, showEmpty, setShowEmpty, }) => {
|
|
1913
2302
|
var _a, _b, _c;
|
|
1914
|
-
const
|
|
1915
|
-
const
|
|
1916
|
-
const
|
|
1917
|
-
const popUpSubmitText = actionBlocks.submitBlock.data.value;
|
|
1918
|
-
const currentPath = location.pathname;
|
|
1919
|
-
const isInPage = currentLayout.includes('Inline') || currentLayout === 'Sidebar';
|
|
1920
|
-
const isSlider = currentLayout === 'Slider';
|
|
2303
|
+
const { t } = useTranslations();
|
|
2304
|
+
const { isMobile } = useScreenSize();
|
|
2305
|
+
const [open, setOpen] = useState(!!campaignId);
|
|
1921
2306
|
const [showOtpPhone, setShowOtpPhone] = useState(null);
|
|
1922
2307
|
const [isSubmitLoading, setIsSubmitLoading] = useState(false);
|
|
2308
|
+
const [snap, setSnap] = useState(0.8);
|
|
1923
2309
|
const formRef = useRef();
|
|
1924
2310
|
const onClose = () => {
|
|
1925
2311
|
if (showOtpPhone) {
|
|
@@ -1929,6 +2315,35 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
1929
2315
|
onCloseProp === null || onCloseProp === void 0 ? void 0 : onCloseProp();
|
|
1930
2316
|
}
|
|
1931
2317
|
};
|
|
2318
|
+
const listBlockAdded = JSON.parse(extraFields.listBlockAdded);
|
|
2319
|
+
const actionBlocks = JSON.parse(extraFields.actionBlocks);
|
|
2320
|
+
const textBlocks = JSON.parse(extraFields.textBlocks);
|
|
2321
|
+
const popUpSubmitText = actionBlocks.submitBlock.data.value;
|
|
2322
|
+
const currentPath = location.pathname;
|
|
2323
|
+
const isInPage = currentLayout.includes('Inline') || currentLayout === 'Sidebar';
|
|
2324
|
+
const isSlider = currentLayout === 'Slider';
|
|
2325
|
+
const isDrawer = currentLayout.includes('LightBoxB') && isMobile;
|
|
2326
|
+
const isLightBox = currentLayout.includes('LightBox');
|
|
2327
|
+
const isSmallLightBoxB = currentLayout === 'LightBoxB' &&
|
|
2328
|
+
listBlockAdded.length <= LEADGEN_LIMIT_LIGHTBOXB;
|
|
2329
|
+
const isShowHeader = showOtpPhone || !!imageMobile || !!imageDesktop;
|
|
2330
|
+
const isFormSubmit = currentLayout === 'LightBoxA'
|
|
2331
|
+
? listBlockAdded.some((item) => [
|
|
2332
|
+
'TextBlock',
|
|
2333
|
+
'NumberBlock',
|
|
2334
|
+
'DateBlock',
|
|
2335
|
+
'EmailBlock',
|
|
2336
|
+
'PhoneBlock',
|
|
2337
|
+
'PhoneOtpBlock',
|
|
2338
|
+
'WhatsappOtpBlock',
|
|
2339
|
+
'ZaloOtpBlock',
|
|
2340
|
+
'LocationBlock',
|
|
2341
|
+
'RadioBlock',
|
|
2342
|
+
'DropdownBlock',
|
|
2343
|
+
'CheckboxBlock',
|
|
2344
|
+
'TncBlock',
|
|
2345
|
+
].some((k) => k === (item === null || item === void 0 ? void 0 : item.name)))
|
|
2346
|
+
: true;
|
|
1932
2347
|
if (window.innerWidth < 769 &&
|
|
1933
2348
|
['Fullscreen', 'Slider'].includes(currentLayout)) {
|
|
1934
2349
|
console.log('😎 Not show fullscreen, slider on mobile ');
|
|
@@ -2019,83 +2434,134 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
2019
2434
|
})(e);
|
|
2020
2435
|
}, 100);
|
|
2021
2436
|
};
|
|
2437
|
+
const onOpenChange = (_open) => {
|
|
2438
|
+
setOpen(_open);
|
|
2439
|
+
if (!_open) {
|
|
2440
|
+
setTimeout(() => {
|
|
2441
|
+
onClose();
|
|
2442
|
+
}, 250);
|
|
2443
|
+
}
|
|
2444
|
+
};
|
|
2022
2445
|
const { width: imageBackgroundWidth, height: imageBackgroundHeight, loaded: imageBackgroundLoaded, } = useImageSize(imageBackground);
|
|
2023
2446
|
const { width: imageMobileWidth, height: imageMobileHeight, loaded: imageMobileLoaded, } = useImageSize(imageMobile);
|
|
2024
2447
|
const { width: imageDesktopWidth, height: imageDesktopHeight, loaded: imageDesktopLoaded, } = useImageSize(imageDesktop);
|
|
2025
2448
|
const renderAfterImageSizes = imageMobileLoaded &&
|
|
2026
2449
|
imageDesktopLoaded &&
|
|
2027
2450
|
(currentLayout == 'Fullscreen' ? imageBackgroundLoaded : true);
|
|
2028
|
-
const
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2451
|
+
const ButtonSubmit = !((_a = actionBlocks === null || actionBlocks === void 0 ? void 0 : actionBlocks.submitBlock) === null || _a === void 0 ? void 0 : _a.isHide) && (React__default.createElement(Button$2, { size: "lg", id: "lead-submit", type: "submit", variant: "filled", className: clsx(`lead-modal__btn ${LEAD_CLASS}`, 'leadgen-btn leadgen-btn_action'), loading: isSubmitLoading }, popUpSubmitText));
|
|
2452
|
+
const LinkButtonBlock = listBlockAdded.filter(({ name }) => name == 'LinkButtonBlock');
|
|
2453
|
+
const ButtonLink = !!(LinkButtonBlock === null || LinkButtonBlock === void 0 ? void 0 : LinkButtonBlock.length) && (React__default.createElement(React__default.Fragment, null, LinkButtonBlock.map((item, index) => {
|
|
2454
|
+
var _a, _b, _c;
|
|
2455
|
+
return (React__default.createElement(Button$2, { 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: clsx(`lead-modal__btn ${LEAD_CLASS}`, 'leadgen-btn leadgen-btn_action'), onClick: () => {
|
|
2456
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
2457
|
+
onOtherSubmit === null || onOtherSubmit === void 0 ? void 0 : onOtherSubmit();
|
|
2458
|
+
} }, (_c = item === null || item === void 0 ? void 0 : item.data) === null || _c === void 0 ? void 0 : _c.value));
|
|
2459
|
+
})));
|
|
2460
|
+
const PopupHeader = (React__default.createElement("header", { className: clsx('lead-modal__header', {
|
|
2461
|
+
'leadgen-header': isLightBox,
|
|
2462
|
+
'leadgen-header_hidden': !isShowHeader,
|
|
2463
|
+
}) }, showOtpPhone ? (React__default.createElement("img", { src: CommonGAssets.getAssetPath('lead-otp-thumb.png'), draggable: "false", alt: "", style: {
|
|
2464
|
+
width: '100%',
|
|
2465
|
+
minHeight: '150px',
|
|
2466
|
+
backgroundColor: '#f2f2f2',
|
|
2467
|
+
}, loading: "lazy" })) : (React__default.createElement(React__default.Fragment, null, ['LightBoxA', 'InlineA', 'Sidebar', 'Slider'].includes(currentLayout) ? (imageMobile ? (isVideo(imageMobile) ? (React__default.createElement("video", { className: "lead-modal__image lead-modal-image-cover", muted: true, autoPlay: true, loop: true },
|
|
2468
|
+
React__default.createElement("source", { src: imageMobile, type: "video/mp4" }))) : (React__default.createElement("img", { draggable: "false", className: "lead-modal__image lead-modal-image-cover", src: imageMobile, style: {
|
|
2469
|
+
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
2470
|
+
}, alt: "" }))) : null) : (React__default.createElement(React__default.Fragment, null,
|
|
2471
|
+
imageDesktop ? (isVideo(imageDesktop) ? (React__default.createElement("video", { className: "le-only-desktop lead-modal__image lead-modal-image-cover", muted: true, autoPlay: true, loop: true },
|
|
2472
|
+
React__default.createElement("source", { src: imageDesktop, type: "video/mp4" }))) : (React__default.createElement("img", { draggable: "false", className: "le-only-desktop lead-modal__image lead-modal-image-cover", style: {
|
|
2473
|
+
objectFit: 'cover',
|
|
2474
|
+
aspectRatio: `${imageDesktopWidth}/${imageDesktopHeight}`,
|
|
2475
|
+
}, src: imageDesktop, alt: "" }))) : null,
|
|
2476
|
+
imageMobile ? (isVideo(imageMobile) ? (React__default.createElement("video", { className: "le-only-mobile lead-modal__image lead-modal-image-cover", muted: true, autoPlay: true, loop: true },
|
|
2477
|
+
React__default.createElement("source", { src: imageMobile, type: "video/mp4" }))) : (React__default.createElement("img", { draggable: "false", className: "le-only-mobile lead-modal__image lead-modal-image-cover", src: imageMobile, alt: "", style: {
|
|
2478
|
+
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
2479
|
+
} }))) : null))))));
|
|
2480
|
+
const PopupEmpty = showEmpty && (React__default.createElement("div", { className: "leadgen-empty" },
|
|
2481
|
+
React__default.createElement("div", { className: "leadgen-empty_body" },
|
|
2482
|
+
React__default.createElement("div", { className: "leadgen-empty_wrapper" },
|
|
2483
|
+
React__default.createElement(EmptyIcon, { className: "leadgen-empty_image" }),
|
|
2484
|
+
React__default.createElement("h5", { className: "leadgen-empty_title" }, t('lead.empty.title')))),
|
|
2485
|
+
React__default.createElement("div", { className: "leadgen-empty_footer" },
|
|
2486
|
+
React__default.createElement(Button$2, { onClick: onClose, size: "lg", variant: "default", fullWidth: false, className: "leadgen-btn leadgen-btn_empty_cancel" }, t('lead.empty.cancel')),
|
|
2487
|
+
React__default.createElement(Button$2, { onClick: () => setShowEmpty(false), size: "lg", variant: "filled", fullWidth: false, className: "leadgen-btn leadgen-btn_empty_again" }, t('lead.empty.submitAgain')))));
|
|
2488
|
+
const PopupFormTitle = (React__default.createElement("h2", { title: title, className: clsx(LEAD_CLASS, `lead-modal__title`, `le-text-align-${(_b = textBlocks.titleBlock.data) === null || _b === void 0 ? void 0 : _b.align}`, { 'leadgen-title': isLightBox }) }, title));
|
|
2489
|
+
const PopupFormDescription = (React__default.createElement("p", { title: textBlocks.subtitleBlock.data.value, className: clsx(LEAD_CLASS, `lead-modal__description`, `le-text-align-${(_c = textBlocks.subtitleBlock.data) === null || _c === void 0 ? void 0 : _c.align}`, { 'leadgen-description': isLightBox }) }, textBlocks.subtitleBlock.data.value));
|
|
2490
|
+
const PopupForm = (React__default.createElement(LeadFormProvider, { form: form },
|
|
2491
|
+
React__default.createElement("form", { ref: formRef, className: clsx(`lead-modal__form ${popupId}`, {
|
|
2492
|
+
'leadgen-form': isLightBox,
|
|
2493
|
+
}), onSubmit: middlewareOnSubmit },
|
|
2494
|
+
React__default.createElement("div", { className: clsx('lead-modal__form-header', {
|
|
2495
|
+
'leadgen-form_header': isLightBox,
|
|
2496
|
+
}) },
|
|
2497
|
+
PopupFormTitle,
|
|
2498
|
+
PopupFormDescription),
|
|
2499
|
+
React__default.createElement("div", { className: clsx('lead-modal__form-control-wrapper', {
|
|
2500
|
+
'leadgen-form_body': isLightBox,
|
|
2501
|
+
}), "data-hidden": !isFormSubmit },
|
|
2502
|
+
React__default.createElement("div", { className: "leadgen-form_inner" },
|
|
2503
|
+
React__default.createElement(LightboxFields, { listBlockAdded: listBlockAdded, popupId: popupId, locale: locale, onClose: onClose, onOtherSubmit: onOtherSubmit }))),
|
|
2504
|
+
React__default.createElement("div", { className: "leadgen-form_footer" }, isFormSubmit ? ButtonSubmit : ButtonLink))));
|
|
2505
|
+
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 }));
|
|
2506
|
+
const popupContentClassName = clsx('lead-modal__content', `le-newbuilder-${currentLayout}`, 'leadPopupContent', { 'leadgen-content': isLightBox });
|
|
2507
|
+
const PopupContent = (React__default.createElement("div", { className: popupContentClassName },
|
|
2508
|
+
PopupHeader,
|
|
2509
|
+
React__default.createElement("div", { className: "leadgen-inner" },
|
|
2510
|
+
PopupThankYou,
|
|
2511
|
+
!showThankyou && (React__default.createElement(React__default.Fragment, null,
|
|
2512
|
+
showOtpPhone && (React__default.createElement(OtpBlock, { otpData: showOtpPhone, autoSendWhenOpen: false, onSuccess: () => {
|
|
2513
|
+
setShowOtpPhone(null);
|
|
2514
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(formRef.current, form.values);
|
|
2515
|
+
} })),
|
|
2516
|
+
showEmpty && PopupEmpty,
|
|
2517
|
+
React__default.createElement("div", { "data-hidden": !!showOtpPhone || !!showEmpty, className: clsx('lead-modal__body le-newbuilder-overlay', {
|
|
2518
|
+
'leadgen-body': isLightBox,
|
|
2519
|
+
}) }, PopupForm))))));
|
|
2520
|
+
const PopupWrapper = (React__default.createElement("div", { className: clsx(`lead-modal__wrapper le-newbuilder-wrap-${currentLayout}`, {
|
|
2521
|
+
'leadgen-wrapper': isLightBox,
|
|
2522
|
+
'leadgen-wrapper_small': isSmallLightBoxB,
|
|
2523
|
+
}) },
|
|
2524
|
+
!currentLayout.includes('Inline') && (React__default.createElement(CloseButton, { onClose: () => onOpenChange(false), containerClassName: clsx('close-button-top-right', {
|
|
2525
|
+
'leadgen-close_btn': isLightBox,
|
|
2526
|
+
}) })),
|
|
2527
|
+
PopupContent));
|
|
2528
|
+
const styleOverlay = useMemo(() => {
|
|
2529
|
+
let styleContent = `.le-newbuilder-overlay {background-repeat: no-repeat;background-size: cover;background-position:center;}`;
|
|
2530
|
+
if (isMobile && imageOverlayMobile) {
|
|
2531
|
+
styleContent += `.le-newbuilder-overlay {background-image: url(${imageOverlayMobile});}`;
|
|
2532
|
+
}
|
|
2533
|
+
if (!isMobile && imageOverlayDesktop) {
|
|
2534
|
+
styleContent += `@media screen and (min-width:768px) {.le-newbuilder-overlay {background-image: url(${imageOverlayDesktop});}}`;
|
|
2535
|
+
}
|
|
2536
|
+
return styleContent;
|
|
2537
|
+
}, [isMobile, imageOverlayDesktop, imageOverlayMobile]);
|
|
2538
|
+
const popupContainerClassName = clsx('lead-modal lead-modal-wrapper modal--animate-scale', `leadgen-${currentLayout}`, {
|
|
2539
|
+
'le-buider-inline': !!isInPage,
|
|
2540
|
+
'le-buider-slider': !!isSlider,
|
|
2541
|
+
leadgen: isLightBox,
|
|
2542
|
+
});
|
|
2543
|
+
const PopupContainer = isDrawer ? (React__default.createElement(DrawerComponent, { open: open, snapPoints: [0.8, 1], activeSnapPoint: snap, setActiveSnapPoint: setSnap, onOpenChange: onOpenChange, overlayClassName: popupContainerClassName, className: "leadgen-drawer" },
|
|
2544
|
+
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: styleOverlay } }),
|
|
2545
|
+
PopupWrapper,
|
|
2546
|
+
React__default.createElement("div", { className: "", style: { position: 'absolute', inset: 0, zIndex: snap === 1 ? -1 : 1 }, onClick: () => setSnap(1) }))) : (React__default.createElement(React__default.Fragment, null,
|
|
2547
|
+
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: styleOverlay } }),
|
|
2548
|
+
React__default.createElement("div", { id: popupId, "data-popup-url": currentPath, "data-popup-type": "lightbox-inline", className: popupContainerClassName },
|
|
2051
2549
|
currentLayout == 'Fullscreen' ? (React__default.createElement("img", { className: "le-only-desktop le-fullscreen-img", draggable: false, src: imageBackground || '', style: {
|
|
2052
2550
|
aspectRatio: `${imageBackgroundWidth}/${imageBackgroundHeight}`,
|
|
2053
2551
|
} })) : null,
|
|
2054
|
-
|
|
2055
|
-
React__default.createElement("div", { className: `lead-modal__content le-newbuilder-${currentLayout}` }, 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 })) : (React__default.createElement(React__default.Fragment, null,
|
|
2056
|
-
React__default.createElement("header", { className: "lead-modal__header" }, showOtpPhone ? (React__default.createElement("img", { src: CommonGAssets.getAssetPath('lead-otp-thumb.png'), draggable: "false", alt: "", style: {
|
|
2057
|
-
width: '100%',
|
|
2058
|
-
minHeight: '150px',
|
|
2059
|
-
backgroundColor: '#f2f2f2',
|
|
2060
|
-
}, loading: "lazy" })) : (React__default.createElement(React__default.Fragment, null, ['LightBoxA', 'InlineA', 'Sidebar', 'Slider'].includes(currentLayout) ? (imageMobile ? (isVideo(imageMobile) ? (React__default.createElement("video", { className: "lead-modal__image lead-modal-image-cover", muted: true, autoPlay: true, loop: true },
|
|
2061
|
-
React__default.createElement("source", { src: imageMobile, type: "video/mp4" }))) : (React__default.createElement("img", { draggable: "false", className: "lead-modal__image lead-modal-image-cover", src: imageMobile, style: {
|
|
2062
|
-
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
2063
|
-
}, alt: "" }))) : null) : (React__default.createElement(React__default.Fragment, null,
|
|
2064
|
-
imageDesktop ? (isVideo(imageDesktop) ? (React__default.createElement("video", { className: "le-only-desktop lead-modal__image lead-modal-image-cover", muted: true, autoPlay: true, loop: true },
|
|
2065
|
-
React__default.createElement("source", { src: imageDesktop, type: "video/mp4" }))) : (React__default.createElement("img", { draggable: "false", className: "le-only-desktop lead-modal__image lead-modal-image-cover", style: {
|
|
2066
|
-
objectFit: 'cover',
|
|
2067
|
-
aspectRatio: `${imageDesktopWidth}/${imageDesktopHeight}`,
|
|
2068
|
-
}, src: imageDesktop, alt: "" }))) : null,
|
|
2069
|
-
imageMobile ? (isVideo(imageMobile) ? (React__default.createElement("video", { className: "le-only-mobile lead-modal__image lead-modal-image-cover", muted: true, autoPlay: true, loop: true },
|
|
2070
|
-
React__default.createElement("source", { src: imageMobile, type: "video/mp4" }))) : (React__default.createElement("img", { draggable: "false", className: "le-only-mobile lead-modal__image lead-modal-image-cover", src: imageMobile, alt: "", style: {
|
|
2071
|
-
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
2072
|
-
} }))) : null))))),
|
|
2073
|
-
showOtpPhone && (React__default.createElement(OtpBlock, { otpData: showOtpPhone, autoSendWhenOpen: false, onSuccess: () => {
|
|
2074
|
-
setShowOtpPhone(null);
|
|
2075
|
-
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(formRef.current, form.values);
|
|
2076
|
-
} })),
|
|
2077
|
-
React__default.createElement("div", { "data-hidden": !!showOtpPhone, className: "lead-modal__body le-newbuilder-overlay" },
|
|
2078
|
-
React__default.createElement(LeadFormProvider, { form: form },
|
|
2079
|
-
React__default.createElement("form", { ref: formRef, className: `lead-modal__form ${popupId}`, onSubmit: middlewareOnSubmit },
|
|
2080
|
-
React__default.createElement("div", { style: { marginBottom: 20 } },
|
|
2081
|
-
React__default.createElement("h2", { className: `lead-modal__title ${'le-text-align-' + ((_a = textBlocks.titleBlock.data) === null || _a === void 0 ? void 0 : _a.align)} ${LEAD_CLASS}` }, title),
|
|
2082
|
-
React__default.createElement("p", { className: `lead-modal__description ${'le-text-align-' + ((_b = textBlocks.titleBlock.data) === null || _b === void 0 ? void 0 : _b.align)} ${LEAD_CLASS}` }, textBlocks.subtitleBlock.data.value)),
|
|
2083
|
-
React__default.createElement("div", { className: "lead-modal__form-control-wrapper" },
|
|
2084
|
-
React__default.createElement(LightboxFields, { listBlockAdded: listBlockAdded, popupId: popupId, locale: locale, onClose: onClose, onOtherSubmit: onOtherSubmit })),
|
|
2085
|
-
((_c = actionBlocks === null || actionBlocks === void 0 ? void 0 : actionBlocks.submitBlock) === null || _c === void 0 ? void 0 : _c.isHide) ? null : (React__default.createElement(Button, { size: "md", id: "lead-submit", type: "submit", className: `lead-modal__btn ${LEAD_CLASS}`, isLoading: isSubmitLoading }, popUpSubmitText)))))))),
|
|
2086
|
-
!currentLayout.includes('Inline') && (React__default.createElement(CloseButton, { onClose: onClose, containerClassName: "close-button-top-right" }))))));
|
|
2552
|
+
PopupWrapper)));
|
|
2087
2553
|
if (!renderAfterImageSizes)
|
|
2088
2554
|
return null;
|
|
2089
2555
|
if (currentLayout.includes('LightBox') ||
|
|
2090
2556
|
currentLayout == 'Fullscreen' ||
|
|
2091
2557
|
currentLayout == 'Slider') {
|
|
2092
|
-
return
|
|
2558
|
+
return PopupContainer;
|
|
2093
2559
|
}
|
|
2094
2560
|
else if (currentLayout == 'Sidebar') {
|
|
2095
|
-
return React__default.createElement(SideBarLayout, { content:
|
|
2561
|
+
return React__default.createElement(SideBarLayout, { content: PopupContainer });
|
|
2096
2562
|
}
|
|
2097
2563
|
else if (currentLayout.includes('Inline')) {
|
|
2098
|
-
return (React__default.createElement(InlineLayout, { content:
|
|
2564
|
+
return (React__default.createElement(InlineLayout, { content: PopupContainer, inlinePosition: extraFields.popupInlinePosition }));
|
|
2099
2565
|
}
|
|
2100
2566
|
return null;
|
|
2101
2567
|
};
|
|
@@ -2540,7 +3006,7 @@ function getCategoryLevel(t = 'Xin chao {{category_2}} extra') {
|
|
|
2540
3006
|
return null;
|
|
2541
3007
|
}
|
|
2542
3008
|
}
|
|
2543
|
-
const NewLeadPopup = ({ campaign, action, onSubmit, onClose, showThankyou, locale, }) => {
|
|
3009
|
+
const NewLeadPopup = ({ campaign, action, onSubmit, onClose, showThankyou, locale, showEmpty, setShowEmpty, }) => {
|
|
2544
3010
|
var _a, _b;
|
|
2545
3011
|
const { apiUrl, siteDomain } = useContext(LeadGenContext);
|
|
2546
3012
|
useEffect(() => {
|
|
@@ -2659,7 +3125,7 @@ const NewLeadPopup = ({ campaign, action, onSubmit, onClose, showThankyou, local
|
|
|
2659
3125
|
currentLayout == 'Fullscreen' ||
|
|
2660
3126
|
currentLayout == 'Sidebar' ||
|
|
2661
3127
|
currentLayout == 'Slider') {
|
|
2662
|
-
return (React__default.createElement(LightboxLayout, { popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (form, values) => onSubmit(form, values, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaign_subot_id: campaign.bot_id || [], locale: locale }));
|
|
3128
|
+
return (React__default.createElement(LightboxLayout, { popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (form, values) => onSubmit(form, values, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaign_subot_id: campaign.bot_id || [], locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty }));
|
|
2663
3129
|
}
|
|
2664
3130
|
else if (currentLayout.includes('Skin')) {
|
|
2665
3131
|
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 }));
|
|
@@ -2684,6 +3150,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2684
3150
|
const [showCampaign, setShowCampaign] = useState(forceCampaign);
|
|
2685
3151
|
const [action, setAction] = useState('');
|
|
2686
3152
|
const [showThankyou, setShowThankyou] = useState(null);
|
|
3153
|
+
const [showEmpty, setShowEmpty] = useState(false);
|
|
2687
3154
|
useEffect(() => {
|
|
2688
3155
|
if (forceCampaign) {
|
|
2689
3156
|
setShowCampaign(forceCampaign);
|
|
@@ -2699,6 +3166,11 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2699
3166
|
setShowCampaign(campaign);
|
|
2700
3167
|
setAction(action);
|
|
2701
3168
|
};
|
|
3169
|
+
const onCloseBase = () => {
|
|
3170
|
+
document.body.classList.remove('noscroll');
|
|
3171
|
+
setShowCampaign(null);
|
|
3172
|
+
setShowThankyou(null);
|
|
3173
|
+
};
|
|
2702
3174
|
const onClose = () => {
|
|
2703
3175
|
var _a, _b;
|
|
2704
3176
|
if (!showCampaign)
|
|
@@ -2716,7 +3188,6 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2716
3188
|
}
|
|
2717
3189
|
}
|
|
2718
3190
|
}
|
|
2719
|
-
document.body.classList.remove('noscroll');
|
|
2720
3191
|
fetch(`${apiUrl}api/campaign/${showCampaign.code}/popup_exit`, {
|
|
2721
3192
|
method: 'POST',
|
|
2722
3193
|
headers: {
|
|
@@ -2730,8 +3201,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2730
3201
|
duration: Math.ceil((Date.now() - leadStartTimeRef.current) / 1000),
|
|
2731
3202
|
}),
|
|
2732
3203
|
});
|
|
2733
|
-
|
|
2734
|
-
setShowThankyou(null);
|
|
3204
|
+
onCloseBase();
|
|
2735
3205
|
}; //
|
|
2736
3206
|
useEffect(() => {
|
|
2737
3207
|
if (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code)
|
|
@@ -2773,8 +3243,10 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2773
3243
|
}, []);
|
|
2774
3244
|
const onSubmit = (currentForm, formDataObj, categoryLevel, categoryData) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2775
3245
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2776
|
-
if (!formDataObj)
|
|
3246
|
+
if (!formDataObj || Object.values(formDataObj).every((v) => !Boolean(v))) {
|
|
3247
|
+
setShowEmpty(true);
|
|
2777
3248
|
return;
|
|
3249
|
+
}
|
|
2778
3250
|
LeadLog('submitHandler', categoryLevel, categoryData);
|
|
2779
3251
|
const formData = Object.keys(formDataObj)
|
|
2780
3252
|
.filter((key) => !!formDataObj[key])
|
|
@@ -2782,6 +3254,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2782
3254
|
name: key,
|
|
2783
3255
|
value: String(formDataObj[key]),
|
|
2784
3256
|
}));
|
|
3257
|
+
console.log('** RYAN index.tsx 218 formData : ', formData);
|
|
2785
3258
|
const numberFormatType = 2; // i18n.phonenumbers.PhoneNumberFormat.NATIONAL
|
|
2786
3259
|
// Get ga_client_id from cookies
|
|
2787
3260
|
const gaCookie = getCookie('_ga') || null;
|
|
@@ -2929,18 +3402,15 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2929
3402
|
}
|
|
2930
3403
|
}, [showCampaign]);
|
|
2931
3404
|
return (React__default.createElement(LeadGenContext.Provider, { value: { apiUrl, siteDomain, siteId, locale } },
|
|
2932
|
-
React__default.createElement(TranslationsContext.Provider, { value: {
|
|
2933
|
-
locale,
|
|
2934
|
-
values: getTranslations(locale),
|
|
2935
|
-
} }, children ? (React__default.createElement(Component, { campaign: showCampaign, onSubmit: onSubmit, onClose: onClose, showThankyou: showThankyou, setShowThankyou: setShowThankyou, locale: locale }, children)) : (React__default.createElement(Portal, { target: getPopupWrapperDom() },
|
|
3405
|
+
React__default.createElement(TranslationsContext.Provider, { value: { locale, values: getTranslations(locale) } }, children ? (React__default.createElement(Component, { campaign: showCampaign, onSubmit: onSubmit, onClose: onClose, showThankyou: showThankyou, setShowThankyou: setShowThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty }, children)) : (React__default.createElement(Portal, { target: getPopupWrapperDom() },
|
|
2936
3406
|
React__default.createElement(Box, { sx: { position: 'fixed', zIndex: ZINDEX_SSO - 9e6 } },
|
|
2937
3407
|
React__default.createElement(Transition, { mounted: Boolean(((_a = showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.extra_fields) === null || _a === void 0 ? void 0 : _a.popupVersion) === '2.1'), transition: "fade", duration: 600, timingFunction: "ease" }, (styles) => {
|
|
2938
3408
|
var _a;
|
|
2939
3409
|
return (React__default.createElement(Box, { style: styles }, ((_a = showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.extra_fields) === null || _a === void 0 ? void 0 : _a.popupVersion) === '2.1' && (React__default.createElement(React__default.Fragment, null,
|
|
2940
3410
|
!!showCampaign.extra_fields.currentLayout &&
|
|
2941
3411
|
!showCampaign.extra_fields.currentLayout.includes('Inline') &&
|
|
2942
|
-
!showCampaign.extra_fields.currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.
|
|
2943
|
-
React__default.createElement(NewLeadPopup, { campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, showThankyou: showThankyou, locale: locale })))));
|
|
3412
|
+
!showCampaign.extra_fields.currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.6, center: true, zIndex: 400, pos: 'fixed', onClick: () => onClose() })),
|
|
3413
|
+
React__default.createElement(NewLeadPopup, { campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, showThankyou: showThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty })))));
|
|
2944
3414
|
})))))));
|
|
2945
3415
|
};
|
|
2946
3416
|
const LeadGen = _LeadGen;
|